From 571fb052a6712e5cd387fe1705fae778f5af7cf3 Mon Sep 17 00:00:00 2001 From: Lupus Date: Thu, 2 Dec 2004 18:24:27 +0000 Subject: speedup of SQL logs git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@437 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/char_sql/char.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/char_sql/char.c') 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)) { -- cgit v1.2.3-70-g09d2