Commit c2e06f58 authored by pem@mysql.comhem.se's avatar pem@mysql.comhem.se

Fixed a valgrind warning when creating stored procedures containing complex

unions (crashed randomly), and made "label" not a reserved word.
parent 5b165c75
...@@ -3584,21 +3584,25 @@ purposes internal to the MySQL server", MYF(0)); ...@@ -3584,21 +3584,25 @@ purposes internal to the MySQL server", MYF(0));
switch (res) { switch (res) {
case SP_OK: case SP_OK:
send_ok(thd); send_ok(thd);
lex->unit.cleanup();
delete lex->sphead; delete lex->sphead;
lex->sphead= 0; lex->sphead= 0;
break; break;
case SP_WRITE_ROW_FAILED: case SP_WRITE_ROW_FAILED:
net_printf(thd, ER_SP_ALREADY_EXISTS, SP_TYPE_STRING(lex), name); net_printf(thd, ER_SP_ALREADY_EXISTS, SP_TYPE_STRING(lex), name);
lex->unit.cleanup();
delete lex->sphead; delete lex->sphead;
lex->sphead= 0; lex->sphead= 0;
goto error; goto error;
case SP_NO_DB_ERROR: case SP_NO_DB_ERROR:
net_printf(thd, ER_BAD_DB_ERROR, lex->sphead->m_db.str); net_printf(thd, ER_BAD_DB_ERROR, lex->sphead->m_db.str);
lex->unit.cleanup();
delete lex->sphead; delete lex->sphead;
lex->sphead= 0; lex->sphead= 0;
goto error; goto error;
default: default:
net_printf(thd, ER_SP_STORE_FAILED, SP_TYPE_STRING(lex), name); net_printf(thd, ER_SP_STORE_FAILED, SP_TYPE_STRING(lex), name);
lex->unit.cleanup();
delete lex->sphead; delete lex->sphead;
lex->sphead= 0; lex->sphead= 0;
goto error; goto error;
......
...@@ -6573,6 +6573,7 @@ keyword: ...@@ -6573,6 +6573,7 @@ keyword:
| INNOBASE_SYM {} | INNOBASE_SYM {}
| INSERT_METHOD {} | INSERT_METHOD {}
| RELAY_THREAD {} | RELAY_THREAD {}
| LABEL_SYM {}
| LANGUAGE_SYM {} | LANGUAGE_SYM {}
| LAST_SYM {} | LAST_SYM {}
| LEAVES {} | LEAVES {}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment