mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
Merged code.
This commit is contained in:
@@ -4060,8 +4060,8 @@ end_with_restore_list:
|
|||||||
name= thd->strdup(name);
|
name= thd->strdup(name);
|
||||||
db= thd->strmake(lex->sphead->m_db.str, lex->sphead->m_db.length);
|
db= thd->strmake(lex->sphead->m_db.str, lex->sphead->m_db.length);
|
||||||
res= (result= lex->sphead->create(thd));
|
res= (result= lex->sphead->create(thd));
|
||||||
switch (result) {
|
if (result == SP_OK)
|
||||||
case SP_OK:
|
{
|
||||||
lex->unit.cleanup();
|
lex->unit.cleanup();
|
||||||
delete lex->sphead;
|
delete lex->sphead;
|
||||||
lex->sphead= 0;
|
lex->sphead= 0;
|
||||||
@@ -4081,33 +4081,26 @@ end_with_restore_list:
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
send_ok(thd);
|
send_ok(thd);
|
||||||
break;
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
switch (result) {
|
||||||
case SP_WRITE_ROW_FAILED:
|
case SP_WRITE_ROW_FAILED:
|
||||||
my_error(ER_SP_ALREADY_EXISTS, MYF(0), SP_TYPE_STRING(lex), name);
|
my_error(ER_SP_ALREADY_EXISTS, MYF(0), SP_TYPE_STRING(lex), name);
|
||||||
lex->unit.cleanup();
|
break;
|
||||||
delete lex->sphead;
|
|
||||||
lex->sphead= 0;
|
|
||||||
goto error;
|
|
||||||
case SP_NO_DB_ERROR:
|
case SP_NO_DB_ERROR:
|
||||||
my_error(ER_BAD_DB_ERROR, MYF(0), lex->sphead->m_db.str);
|
my_error(ER_BAD_DB_ERROR, MYF(0), lex->sphead->m_db.str);
|
||||||
lex->unit.cleanup();
|
break;
|
||||||
delete lex->sphead;
|
|
||||||
lex->sphead= 0;
|
|
||||||
goto error;
|
|
||||||
case SP_BAD_IDENTIFIER:
|
case SP_BAD_IDENTIFIER:
|
||||||
my_error(ER_TOO_LONG_IDENT, MYF(0), name);
|
my_error(ER_TOO_LONG_IDENT, MYF(0), name);
|
||||||
lex->unit.cleanup();
|
break;
|
||||||
delete lex->sphead;
|
|
||||||
lex->sphead= 0;
|
|
||||||
goto error;
|
|
||||||
case SP_BODY_TOO_LONG:
|
case SP_BODY_TOO_LONG:
|
||||||
my_error(ER_TOO_LONG_BODY, MYF(0), name);
|
my_error(ER_TOO_LONG_BODY, MYF(0), name);
|
||||||
lex->unit.cleanup();
|
break;
|
||||||
delete lex->sphead;
|
|
||||||
lex->sphead= 0;
|
|
||||||
goto error;
|
|
||||||
default:
|
default:
|
||||||
my_error(ER_SP_STORE_FAILED, MYF(0), SP_TYPE_STRING(lex), name);
|
my_error(ER_SP_STORE_FAILED, MYF(0), SP_TYPE_STRING(lex), name);
|
||||||
|
break;
|
||||||
|
}
|
||||||
lex->unit.cleanup();
|
lex->unit.cleanup();
|
||||||
delete lex->sphead;
|
delete lex->sphead;
|
||||||
lex->sphead= 0;
|
lex->sphead= 0;
|
||||||
|
Reference in New Issue
Block a user