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

Post-merge fixes. Add a new error message for max_prepared_stmt_count

limit.
This commit is contained in:
konstantin@mysql.com
2006-04-13 01:46:44 +04:00
parent 75792fc0dc
commit c49e6f8869
6 changed files with 161 additions and 47 deletions

View File

@ -1846,7 +1846,7 @@ void mysql_stmt_prepare(THD *thd, const char *packet, uint packet_length)
if (! (stmt= new Prepared_statement(thd, &thd->protocol_prep)))
DBUG_VOID_RETURN; /* out of memory: error is set in Sql_alloc */
if (thd->stmt_map.insert(stmt))
if (thd->stmt_map.insert(thd, stmt))
{
/*
The error is set in the insert. The statement itself
@ -2029,14 +2029,15 @@ void mysql_sql_stmt_prepare(THD *thd)
DBUG_VOID_RETURN; /* out of memory */
}
if (thd->stmt_map.insert(stmt))
{
/* The statement is deleted and an error is set if insert fails */
DBUG_VOID_RETURN;
}
/* Set the name first, insert should know that this statement has a name */
if (stmt->set_name(name))
{
thd->stmt_map.erase(stmt);
delete stmt;
DBUG_VOID_RETURN;
}
if (thd->stmt_map.insert(thd, stmt))
{
/* The statement is deleted and an error is set if insert fails */
DBUG_VOID_RETURN;
}