summaryrefslogtreecommitdiff
path: root/src/char_sql
diff options
context:
space:
mode:
authorLupus <Lupus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-02 18:24:27 +0000
committerLupus <Lupus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-02 18:24:27 +0000
commit571fb052a6712e5cd387fe1705fae778f5af7cf3 (patch)
treefda1ef205ae1e814de56b8ab22d802e2ed02df65 /src/char_sql
parent665680682b57d01415afb478b67d0c7c61d21119 (diff)
downloadhercules-571fb052a6712e5cd387fe1705fae778f5af7cf3.tar.gz
hercules-571fb052a6712e5cd387fe1705fae778f5af7cf3.tar.bz2
hercules-571fb052a6712e5cd387fe1705fae778f5af7cf3.tar.xz
hercules-571fb052a6712e5cd387fe1705fae778f5af7cf3.zip
speedup of SQL logs
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@437 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char_sql')
-rw-r--r--src/char_sql/char.c8
-rw-r--r--src/char_sql/int_party.c2
-rw-r--r--src/char_sql/inter.c2
3 files changed, 6 insertions, 6 deletions
diff --git a/src/char_sql/char.c b/src/char_sql/char.c
index c23c45bdb..d018390cb 100644
--- a/src/char_sql/char.c
+++ b/src/char_sql/char.c
@@ -1011,7 +1011,7 @@ int make_new_char_sql(int fd, unsigned char *dat) {
}
// char.log to charlog
- sprintf(tmp_sql,"INSERT INTO `%s` (`time`, `char_msg`,`account_id`,`char_num`,`name`,`str`,`agi`,`vit`,`int`,`dex`,`luk`,`hair`,`hair_color`)"
+ sprintf(tmp_sql,"INSERT DELAYED INTO `%s` (`time`, `char_msg`,`account_id`,`char_num`,`name`,`str`,`agi`,`vit`,`int`,`dex`,`luk`,`hair`,`hair_color`)"
"VALUES (NOW(), '%s', '%d', '%d', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d')",
charlog_db,"make new char error", sd->account_id, dat[30], dat, dat[24], dat[25], dat[26], dat[27], dat[28], dat[29], dat[33], dat[31]);
//query
@@ -1024,7 +1024,7 @@ int make_new_char_sql(int fd, unsigned char *dat) {
}
// char.log to charlog
- sprintf(tmp_sql,"INSERT INTO `%s`(`time`, `char_msg`,`account_id`,`char_num`,`name`,`str`,`agi`,`vit`,`int`,`dex`,`luk`,`hair`,`hair_color`)"
+ sprintf(tmp_sql,"INSERT DELAYED INTO `%s`(`time`, `char_msg`,`account_id`,`char_num`,`name`,`str`,`agi`,`vit`,`int`,`dex`,`luk`,`hair`,`hair_color`)"
"VALUES (NOW(), '%s', '%d', '%d', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d')",
charlog_db,"make new char", sd->account_id, dat[30], dat, dat[24], dat[25], dat[26], dat[27], dat[28], dat[29], dat[33], dat[31]);
//query
@@ -1939,7 +1939,7 @@ int parse_frommap(int fd) {
case 0x2b16:
if (RFIFOREST(fd) < 6 || RFIFOREST(fd) < RFIFOW(fd,8))
return 0;
- sprintf(tmp_sql, "INSERT INTO `ragsrvinfo` SET `index`='%d',`name`='%s',`exp`='%d',`jexp`='%d',`drop`='%d',`motd`='%s'",
+ sprintf(tmp_sql, "INSERT DELAYED INTO `ragsrvinfo` SET `index`='%d',`name`='%s',`exp`='%d',`jexp`='%d',`drop`='%d',`motd`='%s'",
fd, server_name, RFIFOW(fd,2), RFIFOW(fd,4), RFIFOW(fd,6), RFIFOP(fd,10));
if (mysql_query(&mysql_handle, tmp_sql)) {
printf("DB server Error - %s\n", mysql_error(&mysql_handle));
@@ -2185,7 +2185,7 @@ int parse_char(int fd) {
break;
}
- sprintf(tmp_sql,"INSERT INTO `%s`(`time`, `account_id`,`char_num`,`name`) VALUES (NOW(), '%d', '%d', '%s')",
+ sprintf(tmp_sql,"INSERT DELAYED INTO `%s`(`time`, `account_id`,`char_num`,`name`) VALUES (NOW(), '%d', '%d', '%s')",
charlog_db, sd->account_id, RFIFOB(fd, 2), char_dat[0].name);
//query
if(mysql_query(&mysql_handle, tmp_sql)) {
diff --git a/src/char_sql/int_party.c b/src/char_sql/int_party.c
index b5950d3a1..297481453 100644
--- a/src/char_sql/int_party.c
+++ b/src/char_sql/int_party.c
@@ -120,7 +120,7 @@ int inter_party_tosql(int party_id,struct party *p)
int i = 0;
while (i<MAX_PARTY&&((p->member[i].account_id>0&&p->member[i].leader==0)||(p->member[i].account_id<0))) i++;
if (i<MAX_PARTY) leader_id = p->member[i].account_id;
- sprintf(tmp_sql,"INSERT INTO `%s` (`party_id`, `name`, `exp`, `item`, `leader_id`) VALUES ('%d', '%s', '%d', '%d', '%d')",
+ sprintf(tmp_sql,"INSERT DELAYED INTO `%s` (`party_id`, `name`, `exp`, `item`, `leader_id`) VALUES ('%d', '%s', '%d', '%d', '%d')",
party_db, party_id, t_name, p->exp, p->item,leader_id);
if(mysql_query(&mysql_handle, tmp_sql) ) {
printf("DB server Error (inset/update `party`)- %s\n", mysql_error(&mysql_handle) );
diff --git a/src/char_sql/inter.c b/src/char_sql/inter.c
index 9c10cf6c5..52d688dce 100644
--- a/src/char_sql/inter.c
+++ b/src/char_sql/inter.c
@@ -241,7 +241,7 @@ int inter_log(char *fmt,...)
va_start(ap,fmt);
vsprintf(str,fmt,ap);
- sprintf(tmp_sql,"INSERT INTO `%s` (`time`, `log`) VALUES (NOW(), '%s')",interlog_db, jstrescapecpy(temp_str,str));
+ sprintf(tmp_sql,"INSERT DELAYED INTO `%s` (`time`, `log`) VALUES (NOW(), '%s')",interlog_db, jstrescapecpy(temp_str,str));
if(mysql_query(&mysql_handle, tmp_sql) ) {
printf("DB server Error (insert `interlog`)- %s\n", mysql_error(&mysql_handle) );
}