mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge mysql.com:/home/bkroot/mysql-4.1
into mysql.com:/home/bk/b6883-mysql-4.1
This commit is contained in:
@ -2407,6 +2407,20 @@ mysql_execute_command(THD *thd)
|
||||
|
||||
case SQLCOM_CREATE_TABLE:
|
||||
{
|
||||
/* If CREATE TABLE of non-temporary table, do implicit commit */
|
||||
if (!(lex->create_info.options & HA_LEX_CREATE_TMP_TABLE))
|
||||
{
|
||||
if (end_active_trans(thd))
|
||||
{
|
||||
res= -1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* So that CREATE TEMPORARY TABLE gets to binlog at commit/rollback */
|
||||
thd->options|= OPTION_STATUS_NO_TRANS_UPDATE;
|
||||
}
|
||||
/* Skip first table, which is the table we are creating */
|
||||
TABLE_LIST *create_table, *create_table_local;
|
||||
tables= lex->unlink_first_table(tables, &create_table,
|
||||
@ -2870,6 +2884,11 @@ unsent_create_error:
|
||||
break;
|
||||
}
|
||||
case SQLCOM_TRUNCATE:
|
||||
if (end_active_trans(thd))
|
||||
{
|
||||
res= -1;
|
||||
break;
|
||||
}
|
||||
if (check_one_table_access(thd, DELETE_ACL, tables))
|
||||
goto error;
|
||||
/*
|
||||
@ -2984,6 +3003,9 @@ unsent_create_error:
|
||||
*/
|
||||
if (thd->slave_thread)
|
||||
lex->drop_if_exists= 1;
|
||||
|
||||
/* So that DROP TEMPORARY TABLE gets to binlog at commit/rollback */
|
||||
thd->options|= OPTION_STATUS_NO_TRANS_UPDATE;
|
||||
}
|
||||
res= mysql_rm_table(thd,tables,lex->drop_if_exists, lex->drop_temporary);
|
||||
}
|
||||
@ -3228,6 +3250,11 @@ purposes internal to the MySQL server", MYF(0));
|
||||
break;
|
||||
case SQLCOM_CREATE_DB:
|
||||
{
|
||||
if (end_active_trans(thd))
|
||||
{
|
||||
res= -1;
|
||||
break;
|
||||
}
|
||||
char *alias;
|
||||
if (!(alias=thd->strdup(lex->name)) || check_db_name(lex->name))
|
||||
{
|
||||
@ -3258,6 +3285,11 @@ purposes internal to the MySQL server", MYF(0));
|
||||
}
|
||||
case SQLCOM_DROP_DB:
|
||||
{
|
||||
if (end_active_trans(thd))
|
||||
{
|
||||
res= -1;
|
||||
break;
|
||||
}
|
||||
char *alias;
|
||||
if (!(alias=thd->strdup(lex->name)) || check_db_name(lex->name))
|
||||
{
|
||||
|
Reference in New Issue
Block a user