Originally posted by [b]theultramage[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=1939
The sql mapreg loading code apparently suffers from an off-by-one mistake:
CODE
[Debug]: at g:\meinserver (server)\src\common\sql.c:513 - SELECT `varname`, `index`, `value` FROM `mapreg`
[SQL]: DB error - data of field 'value' was truncated.
[Debug]: column - 2
[Debug]: data - type=MYSQL_TYPE_VAR_STRING, length=255
[Debug]: buffer - type=MYSQL_TYPE_STRING, length=254+1(nul-terminator)
the related code is
CODE
char varname[32+1];
char value[255+1];
SqlStmt_BindColumn(stmt, 0, SQLDT_STRING, &varname[0], 32, &length, NULL);
SqlStmt_BindColumn(stmt, 2, SQLDT_STRING, &value[0], 255, NULL, NULL);
it is possible that bindcolumn needs the array with with the zero terminator included?