diff options
author | unknown <konstantin@mysql.com> | 2006-04-13 01:46:44 +0400 |
---|---|---|
committer | unknown <konstantin@mysql.com> | 2006-04-13 01:46:44 +0400 |
commit | c5ed5c4b1cba6761a0f2d79d939893f028c2bd22 (patch) | |
tree | 7b71c9c16b89ef08edc5b2f5b5f227d0b5c54d4a /sql/sql_prepare.cc | |
parent | e46a193be82ba9956ac2db8e015fb528c84842da (diff) | |
download | mariadb-git-c5ed5c4b1cba6761a0f2d79d939893f028c2bd22.tar.gz |
Post-merge fixes. Add a new error message for max_prepared_stmt_count
limit.
mysql-test/r/ps.result:
Post-merge fixes.
mysql-test/t/ps.test:
Post-merge fixes.
sql/share/errmsg.txt:
Add a new error message for max_prepared_stmt_count limit,
we can do it in 5.0
sql/sql_class.cc:
Post-merge fixes.
sql/sql_class.h:
Post-merge fixes.
sql/sql_prepare.cc:
Post-merge fixes.
Diffstat (limited to 'sql/sql_prepare.cc')
-rw-r--r-- | sql/sql_prepare.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 5a15e67da8e..4fa0a2dcb6e 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -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)) + /* Set the name first, insert should know that this statement has a name */ + if (stmt->set_name(name)) { - /* The statement is deleted and an error is set if insert fails */ + delete stmt; DBUG_VOID_RETURN; } - if (stmt->set_name(name)) + if (thd->stmt_map.insert(thd, stmt)) { - thd->stmt_map.erase(stmt); + /* The statement is deleted and an error is set if insert fails */ DBUG_VOID_RETURN; } |