1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Fixed BUG#3339: Stored procedures in nonexistent schemas are uncallable.

Also added some related security tests and corrected related error messages.
This commit is contained in:
pem@mysql.comhem.se
2004-06-15 15:42:28 +02:00
parent 26ec49f1a8
commit ecd424ac58
7 changed files with 67 additions and 12 deletions

View File

@@ -3410,6 +3410,11 @@ unsent_create_error:
delete lex->sphead;
lex->sphead= 0;
goto error;
case SP_NO_DB_ERROR:
net_printf(thd, ER_BAD_DB_ERROR, lex->sphead->m_db);
delete lex->sphead;
lex->sphead= 0;
goto error;
default:
net_printf(thd, ER_SP_STORE_FAILED, SP_TYPE_STRING(lex), name);
delete lex->sphead;
@@ -3425,7 +3430,7 @@ unsent_create_error:
if (!(sp= sp_find_procedure(thd, lex->spname)))
{
net_printf(thd, ER_SP_DOES_NOT_EXIST, "PROCEDURE",
lex->spname->m_name.str);
lex->spname->m_qname.str);
goto error;
}
else
@@ -3519,11 +3524,11 @@ unsent_create_error:
break;
case SP_KEY_NOT_FOUND:
net_printf(thd, ER_SP_DOES_NOT_EXIST, SP_COM_STRING(lex),
lex->spname->m_name.str);
lex->spname->m_qname.str);
goto error;
default:
net_printf(thd, ER_SP_CANT_ALTER, SP_COM_STRING(lex),
lex->spname->m_name.str);
lex->spname->m_qname.str);
goto error;
}
break;
@@ -3570,11 +3575,11 @@ unsent_create_error:
break;
}
net_printf(thd, ER_SP_DOES_NOT_EXIST, SP_COM_STRING(lex),
lex->spname->m_name.str);
lex->spname->m_qname.str);
goto error;
default:
net_printf(thd, ER_SP_DROP_FAILED, SP_COM_STRING(lex),
lex->spname->m_name.str);
lex->spname->m_qname.str);
goto error;
}
break;