1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fix for bug#4236 "Server crash on attempt to execute non-prepared

statement": check that statement is not null when accessing it's name.


tests/client_test.c:
  A test case for bug#4236
This commit is contained in:
unknown
2004-06-22 11:04:41 +04:00
parent 5552234cd2
commit 8efd5089c0
2 changed files with 31 additions and 1 deletions

View File

@ -561,7 +561,7 @@ public:
{
Statement *stmt;
stmt= (Statement *) hash_search(&st_hash, (byte *) &id, sizeof(id));
if (stmt->name.str)
if (stmt && stmt->name.str)
return NULL;
last_found_statement= stmt;
}