diff options
-rw-r--r-- | Changelog-Trunk.txt | 3 | ||||
-rw-r--r-- | Makefile.in | 28 | ||||
-rw-r--r-- | conf/Changelog.txt (renamed from conf-tmpl/Changelog.txt) | 0 | ||||
-rw-r--r-- | conf/GM_account.txt (renamed from conf-tmpl/GM_account.txt) | 0 | ||||
-rw-r--r-- | conf/atcommand_athena.conf (renamed from conf-tmpl/atcommand_athena.conf) | 0 | ||||
-rw-r--r-- | conf/battle/battle.conf (renamed from conf-tmpl/battle/battle.conf) | 0 | ||||
-rw-r--r-- | conf/battle/client.conf (renamed from conf-tmpl/battle/client.conf) | 0 | ||||
-rw-r--r-- | conf/battle/drops.conf (renamed from conf-tmpl/battle/drops.conf) | 0 | ||||
-rw-r--r-- | conf/battle/exp.conf (renamed from conf-tmpl/battle/exp.conf) | 0 | ||||
-rw-r--r-- | conf/battle/gm.conf (renamed from conf-tmpl/battle/gm.conf) | 0 | ||||
-rw-r--r-- | conf/battle/guild.conf (renamed from conf-tmpl/battle/guild.conf) | 0 | ||||
-rw-r--r-- | conf/battle/homunc.conf (renamed from conf-tmpl/battle/homunc.conf) | 0 | ||||
-rw-r--r-- | conf/battle/items.conf (renamed from conf-tmpl/battle/items.conf) | 0 | ||||
-rw-r--r-- | conf/battle/misc.conf (renamed from conf-tmpl/battle/misc.conf) | 0 | ||||
-rw-r--r-- | conf/battle/monster.conf (renamed from conf-tmpl/battle/monster.conf) | 0 | ||||
-rw-r--r-- | conf/battle/party.conf (renamed from conf-tmpl/battle/party.conf) | 0 | ||||
-rw-r--r-- | conf/battle/pet.conf (renamed from conf-tmpl/battle/pet.conf) | 0 | ||||
-rw-r--r-- | conf/battle/player.conf (renamed from conf-tmpl/battle/player.conf) | 0 | ||||
-rw-r--r-- | conf/battle/skill.conf (renamed from conf-tmpl/battle/skill.conf) | 0 | ||||
-rw-r--r-- | conf/battle/status.conf (renamed from conf-tmpl/battle/status.conf) | 0 | ||||
-rw-r--r-- | conf/battle_athena.conf (renamed from conf-tmpl/battle_athena.conf) | 0 | ||||
-rw-r--r-- | conf/char_athena.conf (renamed from conf-tmpl/char_athena.conf) | 0 | ||||
-rw-r--r-- | conf/charcommand_athena.conf (renamed from conf-tmpl/charcommand_athena.conf) | 0 | ||||
-rw-r--r-- | conf/charhelp.txt (renamed from conf-tmpl/charhelp.txt) | 0 | ||||
-rw-r--r-- | conf/grf-files.txt (renamed from conf-tmpl/grf-files.txt) | 0 | ||||
-rw-r--r-- | conf/help.txt (renamed from conf-tmpl/help.txt) | 0 | ||||
-rw-r--r-- | conf/help2.txt (renamed from conf-tmpl/help2.txt) | 0 | ||||
-rw-r--r-- | conf/import/atcommand_conf.txt (renamed from conf-tmpl/import/atcommand_conf.txt) | 0 | ||||
-rw-r--r-- | conf/import/battle_conf.txt (renamed from conf-tmpl/import/battle_conf.txt) | 0 | ||||
-rw-r--r-- | conf/import/char_conf.txt (renamed from conf-tmpl/import/char_conf.txt) | 0 | ||||
-rw-r--r-- | conf/import/charcommand_conf.txt (renamed from conf-tmpl/import/charcommand_conf.txt) | 0 | ||||
-rw-r--r-- | conf/import/inter_conf.txt (renamed from conf-tmpl/import/inter_conf.txt) | 0 | ||||
-rw-r--r-- | conf/import/ladmin_conf.txt (renamed from conf-tmpl/import/ladmin_conf.txt) | 0 | ||||
-rw-r--r-- | conf/import/log_conf.txt (renamed from conf-tmpl/import/log_conf.txt) | 0 | ||||
-rw-r--r-- | conf/import/login_conf.txt (renamed from conf-tmpl/import/login_conf.txt) | 0 | ||||
-rw-r--r-- | conf/import/map_conf.txt (renamed from conf-tmpl/import/map_conf.txt) | 0 | ||||
-rw-r--r-- | conf/import/msg_conf.txt (renamed from conf-tmpl/import/msg_conf.txt) | 0 | ||||
-rw-r--r-- | conf/import/packet_conf.txt (renamed from conf-tmpl/import/packet_conf.txt) | 0 | ||||
-rw-r--r-- | conf/import/script_conf.txt (renamed from conf-tmpl/import/script_conf.txt) | 0 | ||||
-rw-r--r-- | conf/inter_athena.conf (renamed from conf-tmpl/inter_athena.conf) | 0 | ||||
-rw-r--r-- | conf/irc_athena.conf (renamed from conf-tmpl/irc_athena.conf) | 0 | ||||
-rw-r--r-- | conf/ladmin_athena.conf (renamed from conf-tmpl/ladmin_athena.conf) | 0 | ||||
-rw-r--r-- | conf/log_athena.conf (renamed from conf-tmpl/log_athena.conf) | 0 | ||||
-rw-r--r-- | conf/login_athena.conf (renamed from conf-tmpl/login_athena.conf) | 0 | ||||
-rw-r--r-- | conf/map_athena.conf (renamed from conf-tmpl/map_athena.conf) | 0 | ||||
-rw-r--r-- | conf/mapflag/gvg.txt (renamed from conf-tmpl/mapflag/gvg.txt) | 0 | ||||
-rw-r--r-- | conf/mapflag/indoors.txt (renamed from conf-tmpl/mapflag/indoors.txt) | 0 | ||||
-rw-r--r-- | conf/mapflag/jail.txt (renamed from conf-tmpl/mapflag/jail.txt) | 0 | ||||
-rw-r--r-- | conf/mapflag/night.txt (renamed from conf-tmpl/mapflag/night.txt) | 0 | ||||
-rw-r--r-- | conf/mapflag/nightmare.txt (renamed from conf-tmpl/mapflag/nightmare.txt) | 0 | ||||
-rw-r--r-- | conf/mapflag/nobranch.txt (renamed from conf-tmpl/mapflag/nobranch.txt) | 0 | ||||
-rw-r--r-- | conf/mapflag/noexp.txt (renamed from conf-tmpl/mapflag/noexp.txt) | 0 | ||||
-rw-r--r-- | conf/mapflag/noicewall.txt (renamed from conf-tmpl/mapflag/noicewall.txt) | 0 | ||||
-rw-r--r-- | conf/mapflag/noloot.txt (renamed from conf-tmpl/mapflag/noloot.txt) | 0 | ||||
-rw-r--r-- | conf/mapflag/nomemo.txt (renamed from conf-tmpl/mapflag/nomemo.txt) | 0 | ||||
-rw-r--r-- | conf/mapflag/nopenalty.txt (renamed from conf-tmpl/mapflag/nopenalty.txt) | 0 | ||||
-rw-r--r-- | conf/mapflag/nopvp.txt (renamed from conf-tmpl/mapflag/nopvp.txt) | 0 | ||||
-rw-r--r-- | conf/mapflag/noreturn.txt (renamed from conf-tmpl/mapflag/noreturn.txt) | 0 | ||||
-rw-r--r-- | conf/mapflag/nosave.txt (renamed from conf-tmpl/mapflag/nosave.txt) | 0 | ||||
-rw-r--r-- | conf/mapflag/noteleport.txt (renamed from conf-tmpl/mapflag/noteleport.txt) | 0 | ||||
-rw-r--r-- | conf/mapflag/nowarp.txt (renamed from conf-tmpl/mapflag/nowarp.txt) | 0 | ||||
-rw-r--r-- | conf/mapflag/nowarpto.txt (renamed from conf-tmpl/mapflag/nowarpto.txt) | 0 | ||||
-rw-r--r-- | conf/mapflag/pvp.txt (renamed from conf-tmpl/mapflag/pvp.txt) | 0 | ||||
-rw-r--r-- | conf/mapflag/pvp_noguild.txt (renamed from conf-tmpl/mapflag/pvp_noguild.txt) | 0 | ||||
-rw-r--r-- | conf/mapflag/pvp_noparty.txt (renamed from conf-tmpl/mapflag/pvp_noparty.txt) | 0 | ||||
-rw-r--r-- | conf/mapflag/restricted.txt (renamed from conf-tmpl/mapflag/restricted.txt) | 0 | ||||
-rw-r--r-- | conf/maps_athena.conf (renamed from conf-tmpl/maps_athena.conf) | 0 | ||||
-rw-r--r-- | conf/motd.txt (renamed from conf-tmpl/motd.txt) | 0 | ||||
-rw-r--r-- | conf/msg_athena.conf (renamed from conf-tmpl/msg_athena.conf) | 0 | ||||
-rw-r--r-- | conf/packet_athena.conf (renamed from conf-tmpl/packet_athena.conf) | 0 | ||||
-rw-r--r-- | conf/plugin_athena.conf (renamed from conf-tmpl/plugin_athena.conf) | 0 | ||||
-rw-r--r-- | conf/readme.txt (renamed from conf-tmpl/readme.txt) | 0 | ||||
-rw-r--r-- | conf/script_athena.conf (renamed from conf-tmpl/script_athena.conf) | 0 | ||||
-rw-r--r-- | conf/subnet_athena.conf (renamed from conf-tmpl/subnet_athena.conf) | 0 | ||||
-rw-r--r-- | src/common/sql.c | 24 |
75 files changed, 31 insertions, 24 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 8de95ff3c..2f31235b0 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -3,6 +3,9 @@ Date Added AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK. IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. +2007/09/24 + * Limited manual detection of data truncation to string/enum/blob columns. + * Renamed conf-tmpl to conf. [FlavioJS] 2007/09/23 * Added flag svn:executable to the configure script. * Added code for MySQL versions (below 5.0) that don't have diff --git a/Makefile.in b/Makefile.in index c2c5efc2d..61a4a5e2f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -2,15 +2,15 @@ HAVE_MYSQL=@HAVE_MYSQL@ ifeq ($(HAVE_MYSQL),yes) - ALL_DEPENDS=common common_sql login login_sql char char_sql map map_sql ladmin tools converters plugins conf - SQL_DEPENDS=common_sql login_sql char_sql map_sql conf + ALL_DEPENDS=common common_sql login login_sql char char_sql map map_sql ladmin tools converters plugins save + SQL_DEPENDS=common_sql login_sql char_sql map_sql COMMON_SQL_DEPENDS= LOGIN_SQL_DEPENDS=common_sql CHAR_SQL_DEPENDS=common_sql MAP_SQL_DEPENDS=common_sql CONVERTERS_DEPENDS=common_sql else - ALL_DEPENDS=common login char map ladmin tools plugins conf + ALL_DEPENDS=common login char map ladmin tools plugins save SQL_DEPENDS=needs_mysql COMMON_SQL_DEPENDS=needs_mysql LOGIN_SQL_DEPENDS=needs_mysql @@ -21,7 +21,7 @@ endif ##################################################################### .PHONY: txt sql common common_sql login login_sql char char_sql map map_sql \ - ladmin tools converters plugins addons conf clean help depend + ladmin tools converters plugins addons save clean help depend all: $(ALL_DEPENDS) @@ -65,19 +65,7 @@ converters: $(CONVERTERS_DEPENDS) plugins addons: common @$(MAKE) -C src/plugins -conf: -# conf: -# 1) create conf and conf/import folders -# 2) add missing import files -# 3) copy the rest of the files and folders -# 4) remove remaining .svn folders - @echo "building conf folder..." - @if test ! -d conf ; then mkdir conf ; fi - @if test ! -d conf/import ; then mkdir conf/import ; fi - @for f in $$(ls conf-tmpl/import) ; do if test ! -e conf/import/$$f ; then cp conf-tmpl/import/$$f conf/import ; fi ; done - @for f in $$(ls conf-tmpl) ; do if test "$$f" != "import" ; then cp -rf conf-tmpl/$$f conf ; fi ; done - @rm -rf conf/*/.svn -# save: +save: # 1) create save folder # 2) add missing files # 3) remove remaining .svn folder @@ -114,12 +102,12 @@ help: @echo "'converters' - builds the login/char converters" @echo "'plugins' - builds all the plugins in src/plugins" @echo "'addons'" - @echo "'conf' - builds conf and save folders from the templates" + @echo "'save' - builds save folder from the template" @echo "'all' - builds all above targets" @echo "'txt' - builds txt servers (targets 'common' 'login' 'char' 'map' and" - @echo " 'conf')" + @echo " 'save')" @echo "'sql' - builds sql servers (targets 'common_sql' 'login_sql' 'char_sql'" - @echo " 'map_sql' and 'conf')" + @echo " and 'map_sql')" @echo "'clean' - cleans builds and objects" @echo "'help' - outputs this message" diff --git a/conf-tmpl/Changelog.txt b/conf/Changelog.txt index 6ce0bcd9e..6ce0bcd9e 100644 --- a/conf-tmpl/Changelog.txt +++ b/conf/Changelog.txt diff --git a/conf-tmpl/GM_account.txt b/conf/GM_account.txt index e49f9df16..e49f9df16 100644 --- a/conf-tmpl/GM_account.txt +++ b/conf/GM_account.txt diff --git a/conf-tmpl/atcommand_athena.conf b/conf/atcommand_athena.conf index 183278246..183278246 100644 --- a/conf-tmpl/atcommand_athena.conf +++ b/conf/atcommand_athena.conf diff --git a/conf-tmpl/battle/battle.conf b/conf/battle/battle.conf index 9c0f708fd..9c0f708fd 100644 --- a/conf-tmpl/battle/battle.conf +++ b/conf/battle/battle.conf diff --git a/conf-tmpl/battle/client.conf b/conf/battle/client.conf index 756083f85..756083f85 100644 --- a/conf-tmpl/battle/client.conf +++ b/conf/battle/client.conf diff --git a/conf-tmpl/battle/drops.conf b/conf/battle/drops.conf index c46de1c85..c46de1c85 100644 --- a/conf-tmpl/battle/drops.conf +++ b/conf/battle/drops.conf diff --git a/conf-tmpl/battle/exp.conf b/conf/battle/exp.conf index f3d438ea2..f3d438ea2 100644 --- a/conf-tmpl/battle/exp.conf +++ b/conf/battle/exp.conf diff --git a/conf-tmpl/battle/gm.conf b/conf/battle/gm.conf index 040a91ef7..040a91ef7 100644 --- a/conf-tmpl/battle/gm.conf +++ b/conf/battle/gm.conf diff --git a/conf-tmpl/battle/guild.conf b/conf/battle/guild.conf index 2c474552e..2c474552e 100644 --- a/conf-tmpl/battle/guild.conf +++ b/conf/battle/guild.conf diff --git a/conf-tmpl/battle/homunc.conf b/conf/battle/homunc.conf index 5e9e627ef..5e9e627ef 100644 --- a/conf-tmpl/battle/homunc.conf +++ b/conf/battle/homunc.conf diff --git a/conf-tmpl/battle/items.conf b/conf/battle/items.conf index 8ef1aac3e..8ef1aac3e 100644 --- a/conf-tmpl/battle/items.conf +++ b/conf/battle/items.conf diff --git a/conf-tmpl/battle/misc.conf b/conf/battle/misc.conf index 3fa7b34e6..3fa7b34e6 100644 --- a/conf-tmpl/battle/misc.conf +++ b/conf/battle/misc.conf diff --git a/conf-tmpl/battle/monster.conf b/conf/battle/monster.conf index 58111ab2d..58111ab2d 100644 --- a/conf-tmpl/battle/monster.conf +++ b/conf/battle/monster.conf diff --git a/conf-tmpl/battle/party.conf b/conf/battle/party.conf index 2dce065af..2dce065af 100644 --- a/conf-tmpl/battle/party.conf +++ b/conf/battle/party.conf diff --git a/conf-tmpl/battle/pet.conf b/conf/battle/pet.conf index 0d13d26b9..0d13d26b9 100644 --- a/conf-tmpl/battle/pet.conf +++ b/conf/battle/pet.conf diff --git a/conf-tmpl/battle/player.conf b/conf/battle/player.conf index 58f0f9bb1..58f0f9bb1 100644 --- a/conf-tmpl/battle/player.conf +++ b/conf/battle/player.conf diff --git a/conf-tmpl/battle/skill.conf b/conf/battle/skill.conf index a7ddc3cac..a7ddc3cac 100644 --- a/conf-tmpl/battle/skill.conf +++ b/conf/battle/skill.conf diff --git a/conf-tmpl/battle/status.conf b/conf/battle/status.conf index 87d76de7a..87d76de7a 100644 --- a/conf-tmpl/battle/status.conf +++ b/conf/battle/status.conf diff --git a/conf-tmpl/battle_athena.conf b/conf/battle_athena.conf index 6098b0fa6..6098b0fa6 100644 --- a/conf-tmpl/battle_athena.conf +++ b/conf/battle_athena.conf diff --git a/conf-tmpl/char_athena.conf b/conf/char_athena.conf index 200831220..200831220 100644 --- a/conf-tmpl/char_athena.conf +++ b/conf/char_athena.conf diff --git a/conf-tmpl/charcommand_athena.conf b/conf/charcommand_athena.conf index acd89779a..acd89779a 100644 --- a/conf-tmpl/charcommand_athena.conf +++ b/conf/charcommand_athena.conf diff --git a/conf-tmpl/charhelp.txt b/conf/charhelp.txt index c64a0c330..c64a0c330 100644 --- a/conf-tmpl/charhelp.txt +++ b/conf/charhelp.txt diff --git a/conf-tmpl/grf-files.txt b/conf/grf-files.txt index 39cee544e..39cee544e 100644 --- a/conf-tmpl/grf-files.txt +++ b/conf/grf-files.txt diff --git a/conf-tmpl/help.txt b/conf/help.txt index 2fe7726ef..2fe7726ef 100644 --- a/conf-tmpl/help.txt +++ b/conf/help.txt diff --git a/conf-tmpl/help2.txt b/conf/help2.txt index 3a0772425..3a0772425 100644 --- a/conf-tmpl/help2.txt +++ b/conf/help2.txt diff --git a/conf-tmpl/import/atcommand_conf.txt b/conf/import/atcommand_conf.txt index e69de29bb..e69de29bb 100644 --- a/conf-tmpl/import/atcommand_conf.txt +++ b/conf/import/atcommand_conf.txt diff --git a/conf-tmpl/import/battle_conf.txt b/conf/import/battle_conf.txt index e69de29bb..e69de29bb 100644 --- a/conf-tmpl/import/battle_conf.txt +++ b/conf/import/battle_conf.txt diff --git a/conf-tmpl/import/char_conf.txt b/conf/import/char_conf.txt index e69de29bb..e69de29bb 100644 --- a/conf-tmpl/import/char_conf.txt +++ b/conf/import/char_conf.txt diff --git a/conf-tmpl/import/charcommand_conf.txt b/conf/import/charcommand_conf.txt index e69de29bb..e69de29bb 100644 --- a/conf-tmpl/import/charcommand_conf.txt +++ b/conf/import/charcommand_conf.txt diff --git a/conf-tmpl/import/inter_conf.txt b/conf/import/inter_conf.txt index e69de29bb..e69de29bb 100644 --- a/conf-tmpl/import/inter_conf.txt +++ b/conf/import/inter_conf.txt diff --git a/conf-tmpl/import/ladmin_conf.txt b/conf/import/ladmin_conf.txt index e69de29bb..e69de29bb 100644 --- a/conf-tmpl/import/ladmin_conf.txt +++ b/conf/import/ladmin_conf.txt diff --git a/conf-tmpl/import/log_conf.txt b/conf/import/log_conf.txt index e69de29bb..e69de29bb 100644 --- a/conf-tmpl/import/log_conf.txt +++ b/conf/import/log_conf.txt diff --git a/conf-tmpl/import/login_conf.txt b/conf/import/login_conf.txt index e69de29bb..e69de29bb 100644 --- a/conf-tmpl/import/login_conf.txt +++ b/conf/import/login_conf.txt diff --git a/conf-tmpl/import/map_conf.txt b/conf/import/map_conf.txt index e69de29bb..e69de29bb 100644 --- a/conf-tmpl/import/map_conf.txt +++ b/conf/import/map_conf.txt diff --git a/conf-tmpl/import/msg_conf.txt b/conf/import/msg_conf.txt index e69de29bb..e69de29bb 100644 --- a/conf-tmpl/import/msg_conf.txt +++ b/conf/import/msg_conf.txt diff --git a/conf-tmpl/import/packet_conf.txt b/conf/import/packet_conf.txt index e69de29bb..e69de29bb 100644 --- a/conf-tmpl/import/packet_conf.txt +++ b/conf/import/packet_conf.txt diff --git a/conf-tmpl/import/script_conf.txt b/conf/import/script_conf.txt index e69de29bb..e69de29bb 100644 --- a/conf-tmpl/import/script_conf.txt +++ b/conf/import/script_conf.txt diff --git a/conf-tmpl/inter_athena.conf b/conf/inter_athena.conf index 29bdb7aa2..29bdb7aa2 100644 --- a/conf-tmpl/inter_athena.conf +++ b/conf/inter_athena.conf diff --git a/conf-tmpl/irc_athena.conf b/conf/irc_athena.conf index c55b9c2c0..c55b9c2c0 100644 --- a/conf-tmpl/irc_athena.conf +++ b/conf/irc_athena.conf diff --git a/conf-tmpl/ladmin_athena.conf b/conf/ladmin_athena.conf index b091b47ff..b091b47ff 100644 --- a/conf-tmpl/ladmin_athena.conf +++ b/conf/ladmin_athena.conf diff --git a/conf-tmpl/log_athena.conf b/conf/log_athena.conf index 80aacd122..80aacd122 100644 --- a/conf-tmpl/log_athena.conf +++ b/conf/log_athena.conf diff --git a/conf-tmpl/login_athena.conf b/conf/login_athena.conf index 3ad980de6..3ad980de6 100644 --- a/conf-tmpl/login_athena.conf +++ b/conf/login_athena.conf diff --git a/conf-tmpl/map_athena.conf b/conf/map_athena.conf index 06fe87eb2..06fe87eb2 100644 --- a/conf-tmpl/map_athena.conf +++ b/conf/map_athena.conf diff --git a/conf-tmpl/mapflag/gvg.txt b/conf/mapflag/gvg.txt index 16046e4e0..16046e4e0 100644 --- a/conf-tmpl/mapflag/gvg.txt +++ b/conf/mapflag/gvg.txt diff --git a/conf-tmpl/mapflag/indoors.txt b/conf/mapflag/indoors.txt index 19ee69828..19ee69828 100644 --- a/conf-tmpl/mapflag/indoors.txt +++ b/conf/mapflag/indoors.txt diff --git a/conf-tmpl/mapflag/jail.txt b/conf/mapflag/jail.txt index 99cd7b653..99cd7b653 100644 --- a/conf-tmpl/mapflag/jail.txt +++ b/conf/mapflag/jail.txt diff --git a/conf-tmpl/mapflag/night.txt b/conf/mapflag/night.txt index 3feb96c6e..3feb96c6e 100644 --- a/conf-tmpl/mapflag/night.txt +++ b/conf/mapflag/night.txt diff --git a/conf-tmpl/mapflag/nightmare.txt b/conf/mapflag/nightmare.txt index 8bf7e3484..8bf7e3484 100644 --- a/conf-tmpl/mapflag/nightmare.txt +++ b/conf/mapflag/nightmare.txt diff --git a/conf-tmpl/mapflag/nobranch.txt b/conf/mapflag/nobranch.txt index 1a33a862d..1a33a862d 100644 --- a/conf-tmpl/mapflag/nobranch.txt +++ b/conf/mapflag/nobranch.txt diff --git a/conf-tmpl/mapflag/noexp.txt b/conf/mapflag/noexp.txt index f01181b38..f01181b38 100644 --- a/conf-tmpl/mapflag/noexp.txt +++ b/conf/mapflag/noexp.txt diff --git a/conf-tmpl/mapflag/noicewall.txt b/conf/mapflag/noicewall.txt index a27e4cc90..a27e4cc90 100644 --- a/conf-tmpl/mapflag/noicewall.txt +++ b/conf/mapflag/noicewall.txt diff --git a/conf-tmpl/mapflag/noloot.txt b/conf/mapflag/noloot.txt index a260ed5b3..a260ed5b3 100644 --- a/conf-tmpl/mapflag/noloot.txt +++ b/conf/mapflag/noloot.txt diff --git a/conf-tmpl/mapflag/nomemo.txt b/conf/mapflag/nomemo.txt index e5ea69811..e5ea69811 100644 --- a/conf-tmpl/mapflag/nomemo.txt +++ b/conf/mapflag/nomemo.txt diff --git a/conf-tmpl/mapflag/nopenalty.txt b/conf/mapflag/nopenalty.txt index 8d6f257f2..8d6f257f2 100644 --- a/conf-tmpl/mapflag/nopenalty.txt +++ b/conf/mapflag/nopenalty.txt diff --git a/conf-tmpl/mapflag/nopvp.txt b/conf/mapflag/nopvp.txt index bda34e055..bda34e055 100644 --- a/conf-tmpl/mapflag/nopvp.txt +++ b/conf/mapflag/nopvp.txt diff --git a/conf-tmpl/mapflag/noreturn.txt b/conf/mapflag/noreturn.txt index ee3720da0..ee3720da0 100644 --- a/conf-tmpl/mapflag/noreturn.txt +++ b/conf/mapflag/noreturn.txt diff --git a/conf-tmpl/mapflag/nosave.txt b/conf/mapflag/nosave.txt index 7bfe836c3..7bfe836c3 100644 --- a/conf-tmpl/mapflag/nosave.txt +++ b/conf/mapflag/nosave.txt diff --git a/conf-tmpl/mapflag/noteleport.txt b/conf/mapflag/noteleport.txt index 81907d513..81907d513 100644 --- a/conf-tmpl/mapflag/noteleport.txt +++ b/conf/mapflag/noteleport.txt diff --git a/conf-tmpl/mapflag/nowarp.txt b/conf/mapflag/nowarp.txt index 07767a589..07767a589 100644 --- a/conf-tmpl/mapflag/nowarp.txt +++ b/conf/mapflag/nowarp.txt diff --git a/conf-tmpl/mapflag/nowarpto.txt b/conf/mapflag/nowarpto.txt index 15fba8d65..15fba8d65 100644 --- a/conf-tmpl/mapflag/nowarpto.txt +++ b/conf/mapflag/nowarpto.txt diff --git a/conf-tmpl/mapflag/pvp.txt b/conf/mapflag/pvp.txt index e32d58aca..e32d58aca 100644 --- a/conf-tmpl/mapflag/pvp.txt +++ b/conf/mapflag/pvp.txt diff --git a/conf-tmpl/mapflag/pvp_noguild.txt b/conf/mapflag/pvp_noguild.txt index 33937ea31..33937ea31 100644 --- a/conf-tmpl/mapflag/pvp_noguild.txt +++ b/conf/mapflag/pvp_noguild.txt diff --git a/conf-tmpl/mapflag/pvp_noparty.txt b/conf/mapflag/pvp_noparty.txt index 4371ca365..4371ca365 100644 --- a/conf-tmpl/mapflag/pvp_noparty.txt +++ b/conf/mapflag/pvp_noparty.txt diff --git a/conf-tmpl/mapflag/restricted.txt b/conf/mapflag/restricted.txt index 6ae69efaf..6ae69efaf 100644 --- a/conf-tmpl/mapflag/restricted.txt +++ b/conf/mapflag/restricted.txt diff --git a/conf-tmpl/maps_athena.conf b/conf/maps_athena.conf index 57f14af53..57f14af53 100644 --- a/conf-tmpl/maps_athena.conf +++ b/conf/maps_athena.conf diff --git a/conf-tmpl/motd.txt b/conf/motd.txt index b443cc434..b443cc434 100644 --- a/conf-tmpl/motd.txt +++ b/conf/motd.txt diff --git a/conf-tmpl/msg_athena.conf b/conf/msg_athena.conf index 851350300..851350300 100644 --- a/conf-tmpl/msg_athena.conf +++ b/conf/msg_athena.conf diff --git a/conf-tmpl/packet_athena.conf b/conf/packet_athena.conf index 76203bedb..76203bedb 100644 --- a/conf-tmpl/packet_athena.conf +++ b/conf/packet_athena.conf diff --git a/conf-tmpl/plugin_athena.conf b/conf/plugin_athena.conf index b7c30dfab..b7c30dfab 100644 --- a/conf-tmpl/plugin_athena.conf +++ b/conf/plugin_athena.conf diff --git a/conf-tmpl/readme.txt b/conf/readme.txt index db8777680..db8777680 100644 --- a/conf-tmpl/readme.txt +++ b/conf/readme.txt diff --git a/conf-tmpl/script_athena.conf b/conf/script_athena.conf index 1c426a634..1c426a634 100644 --- a/conf-tmpl/script_athena.conf +++ b/conf/script_athena.conf diff --git a/conf-tmpl/subnet_athena.conf b/conf/subnet_athena.conf index e91fb7376..e91fb7376 100644 --- a/conf-tmpl/subnet_athena.conf +++ b/conf/subnet_athena.conf diff --git a/src/common/sql.c b/src/common/sql.c index 6b69c8ce4..5df751643 100644 --- a/src/common/sql.c +++ b/src/common/sql.c @@ -394,40 +394,52 @@ static int Sql_P_BindSqlDataType(MYSQL_BIND* bind, enum SqlDataType buffer_type, switch( buffer_type ) { case SQLDT_NULL: bind->buffer_type = MYSQL_TYPE_NULL; + buffer_len = 0;// FIXME length = ? [FlavioJS] break; // fixed size case SQLDT_UINT8: bind->is_unsigned = 1; case SQLDT_INT8: bind->buffer_type = MYSQL_TYPE_TINY; + buffer_len = 1; break; case SQLDT_UINT16: bind->is_unsigned = 1; case SQLDT_INT16: bind->buffer_type = MYSQL_TYPE_SHORT; + buffer_len = 2; break; case SQLDT_UINT32: bind->is_unsigned = 1; case SQLDT_INT32: bind->buffer_type = MYSQL_TYPE_LONG; + buffer_len = 4; break; case SQLDT_UINT64: bind->is_unsigned = 1; case SQLDT_INT64: bind->buffer_type = MYSQL_TYPE_LONGLONG; + buffer_len = 8; break; // platform dependent size case SQLDT_UCHAR: bind->is_unsigned = 1; case SQLDT_CHAR: bind->buffer_type = Sql_P_SizeToMysqlIntType(sizeof(char)); + buffer_len = sizeof(char); break; case SQLDT_USHORT: bind->is_unsigned = 1; case SQLDT_SHORT: bind->buffer_type = Sql_P_SizeToMysqlIntType(sizeof(short)); + buffer_len = sizeof(short); break; case SQLDT_UINT: bind->is_unsigned = 1; case SQLDT_INT: bind->buffer_type = Sql_P_SizeToMysqlIntType(sizeof(int)); + buffer_len = sizeof(int); break; case SQLDT_ULONG: bind->is_unsigned = 1; case SQLDT_LONG: bind->buffer_type = Sql_P_SizeToMysqlIntType(sizeof(long)); + buffer_len = sizeof(long); break; case SQLDT_ULONGLONG: bind->is_unsigned = 1; case SQLDT_LONGLONG: bind->buffer_type = Sql_P_SizeToMysqlIntType(sizeof(long long)); + buffer_len = sizeof(long long); break; // floating point case SQLDT_FLOAT: bind->buffer_type = MYSQL_TYPE_FLOAT; + buffer_len = 4; break; case SQLDT_DOUBLE: bind->buffer_type = MYSQL_TYPE_DOUBLE; + buffer_len = 8; break; // other case SQLDT_STRING: @@ -806,17 +818,21 @@ int SqlStmt_NextRow(SqlStmt* self) for( i = 0; i < cols; ++i ) { length = self->column_lengths[i].length; + column = &self->columns[i]; #if !defined(MYSQL_DATA_TRUNCATED) // MySQL 4.1/(below?) returns success even if data is truncated, so we test truncation manually [FlavioJS] - if( self->columns[i].buffer_length < length ) + if( column->buffer_length < length ) {// report truncated column - SqlStmt_P_ShowDebugTruncatedColumn(self, i); - return SQL_ERROR; + if( column->buffer_type == MYSQL_TYPE_STRING || column->buffer_type == MYSQL_TYPE_BLOB ) + {// string/enum/blob column + SqlStmt_P_ShowDebugTruncatedColumn(self, i); + return SQL_ERROR; + } + // FIXME numeric types and null [FlavioJS] } #endif if( self->column_lengths[i].out_length ) *self->column_lengths[i].out_length = (uint32)length; - column = &self->columns[i]; if( column->buffer_type == MYSQL_TYPE_STRING ) {// clear unused part of the string/enum buffer (and nul-terminate) memset((char*)column->buffer + length, 0, column->buffer_length - length + 1); |