From f4b3dff16a0b23c915cfae1de150b0943db83620 Mon Sep 17 00:00:00 2001 From: amber Date: Sun, 5 Dec 2004 06:54:02 +0000 Subject: added debugging git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@456 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/char_sql/char.c | 17 ++++++++++++----- src/char_sql/int_guild.c | 4 ++++ src/char_sql/int_party.c | 4 ++++ src/char_sql/int_pet.c | 2 ++ src/char_sql/int_storage.c | 3 +++ src/char_sql/inter.c | 3 +++ src/char_sql/itemdb.c | 3 +++ 7 files changed, 31 insertions(+), 5 deletions(-) (limited to 'src/char_sql') diff --git a/src/char_sql/char.c b/src/char_sql/char.c index 382c654b9..364755cf1 100644 --- a/src/char_sql/char.c +++ b/src/char_sql/char.c @@ -190,6 +190,7 @@ void read_gm_account(void) { sprintf(tmp_lsql, "SELECT `%s`,`%s` FROM `%s` WHERE `%s`>='%d'",login_db_account_id,login_db_level,login_db,login_db_level,lowest_gm_level); if (mysql_query(&lmysql_handle, tmp_lsql)) { printf("DB server Error (select %s to Memory)- %s\n",login_db,mysql_error(&lmysql_handle)); + return; } lsql_res = mysql_store_result(&lmysql_handle); if (lsql_res) { @@ -507,7 +508,6 @@ int memitemdata_to_sql(struct itemtemp mapitem, int eqcount, int noteqcount, int if((eqcount==1) && (dbeqcount==1)){//printf("%s Equip Empty\n",tablename); //item empty } else { - for(i=1;i #include + +extern int debug_mysql_query(MYSQL *mysql, const char *q); +#define mysql_query(_x, _y) debug_mysql_query(_x, _y) + static struct guild *guild_pt; static struct guild *guild_pt2; static struct guild_castle * guildcastle_pt; diff --git a/src/char_sql/int_party.c b/src/char_sql/int_party.c index 84de078c9..2ac955230 100644 --- a/src/char_sql/int_party.c +++ b/src/char_sql/int_party.c @@ -10,6 +10,10 @@ #include #include + +extern int debug_mysql_query(MYSQL *mysql, const char *q); +#define mysql_query(_x, _y) debug_mysql_query(_x, _y) + static struct party *party_pt; static int party_newid=100; diff --git a/src/char_sql/int_pet.c b/src/char_sql/int_pet.c index 14d2144c7..bf42670b6 100644 --- a/src/char_sql/int_pet.c +++ b/src/char_sql/int_pet.c @@ -12,6 +12,8 @@ struct s_pet *pet_pt; static int pet_newid = 100; +extern int debug_mysql_query(MYSQL *mysql, const char *q); +#define mysql_query(_x, _y) debug_mysql_query(_x, _y) //--------------------------------------------------------- int inter_pet_tosql(int pet_id, struct s_pet *p) { diff --git a/src/char_sql/int_storage.c b/src/char_sql/int_storage.c index 7c8c8ce4a..72b8386fc 100644 --- a/src/char_sql/int_storage.c +++ b/src/char_sql/int_storage.c @@ -14,6 +14,9 @@ struct storage *storage_pt=NULL; struct guild_storage *guild_storage_pt=NULL; +extern int debug_mysql_query(MYSQL *mysql, const char *q); +#define mysql_query(_x, _y) debug_mysql_query(_x, _y) + // storage data -> DB conversion int storage_tosql(int account_id,struct storage *p){ int i; diff --git a/src/char_sql/inter.c b/src/char_sql/inter.c index 9c10cf6c5..95768b049 100644 --- a/src/char_sql/inter.c +++ b/src/char_sql/inter.c @@ -15,6 +15,9 @@ #include "int_pet.h" #include "lock.h" +extern int debug_mysql_query(MYSQL *mysql, const char *q); +#define mysql_query(_x, _y) debug_mysql_query(_x, _y) + #define WISDATA_TTL (60*1000) // Wisデータの生存時間(60秒) #define WISDELLIST_MAX 256 // Wisデータ削除リストの要素数 diff --git a/src/char_sql/itemdb.c b/src/char_sql/itemdb.c index 0bed07c23..7a8db9e7e 100644 --- a/src/char_sql/itemdb.c +++ b/src/char_sql/itemdb.c @@ -13,6 +13,9 @@ #include "memwatch.h" #endif +extern int debug_mysql_query(MYSQL *mysql, const char *q); +#define mysql_query(_x, _y) debug_mysql_query(_x, _y) + #define MAX_RANDITEM 2000 // ** ITEMDB_OVERRIDE_NAME_VERBOSE ** -- cgit v1.2.3-70-g09d2