diff --git a/ma_statement.c b/ma_statement.c index e2f4e814..3741ed46 100644 --- a/ma_statement.c +++ b/ma_statement.c @@ -662,7 +662,8 @@ void MADB_AddQueryTime(MADB_QUERY* Query, unsigned long long Timeout) Query->Length= _snprintf(NewStr, NewSize, "SET STATEMENT max_statement_time=%llu FOR %s", Timeout, Query->Original); - MADB_RESET(Query->Original, NewStr); + MADB_FREE(Query->Original); + Query->Original= NewStr; } /* {{{ MADB_StmtPrepare */