From 518caa9b14e58e4eca00548ac7084e4b5a8e11cd Mon Sep 17 00:00:00 2001 From: skotlex Date: Wed, 1 Mar 2006 20:51:21 +0000 Subject: [PATCH] - Added sql init for the mapreg handle. git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5416 54d463be-8e91-2dee-dedb-b68131a5f0ec --- Changelog-Trunk.txt | 1 + src/map/map.c | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 1bd66fea04..50badae502 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -5,6 +5,7 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. EV GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS 2006/03/01 + * Added a missing mysql_init call to the mapreg sql handle. [Skotlex] * Checked and fixed the script engine barking when you try to have a label with the same name as a const.txt defined parameter. [Skotlex] * Turn Undead and Offensive Resurrection should now work on undead players. diff --git a/src/map/map.c b/src/map/map.c index bf77e213de..429c1b85a8 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -3542,11 +3542,12 @@ int map_sql_init(void){ #ifdef MAPREGSQL // [zBuffer] SQL Mapreg connection start ShowInfo("Connect Mapreg DB Server....\n"); - if(!mysql_real_connect(&mapregsql_handle, map_server_ip, map_server_id, map_server_pw, + mysql_init(&mapregsql_handle); + if(!mysql_real_connect(&mapregsql_handle, map_server_ip, map_server_id, map_server_pw, map_server_db ,map_server_port, (char *)NULL, 0)) { //pointer check - ShowSQL("DB error - %s\n",mysql_error(&mapregsql_handle)); - exit(1); + ShowSQL("DB error - %s\n",mysql_error(&mapregsql_handle)); + exit(1); } else { ShowStatus ("Connect success! (Mapreg DB Connection)\n"); if( strlen(default_codepage) > 0 ) {