1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Fixing bug #8850 in such a way that when TRUNCATE is called within

stored  procedure,  it  is converted  to DELETE.
This commit is contained in:
Sinisa@sinisa.nasamreza.org
2005-03-05 21:44:15 +02:00
parent 71c69f42cd
commit a54b5ea52f
5 changed files with 49 additions and 2 deletions

View File

@ -3312,7 +3312,7 @@ unsent_create_error:
Don't allow this within a transaction because we want to use
re-generate table
*/
if (thd->locked_tables || thd->active_transaction())
if ((thd->locked_tables && !lex->sphead) || thd->active_transaction())
{
my_message(ER_LOCK_OR_ACTIVE_TRANSACTION,
ER(ER_LOCK_OR_ACTIVE_TRANSACTION), MYF(0));