mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 18:41:56 +01:00
Merge bk-internal:/home/bk/mysql-4.0/
into serg.mylan:/usr/home/serg/Abk/mysql-4.0
This commit is contained in:
commit
b07b5f7a6d
3 changed files with 8 additions and 2 deletions
|
@ -821,6 +821,7 @@ truncate table t1;
|
||||||
Can't execute the given command because you have active locked tables or an active transaction
|
Can't execute the given command because you have active locked tables or an active transaction
|
||||||
commit;
|
commit;
|
||||||
truncate table t1;
|
truncate table t1;
|
||||||
|
truncate table t1;
|
||||||
select * from t1;
|
select * from t1;
|
||||||
a
|
a
|
||||||
insert into t1 values(1),(2);
|
insert into t1 values(1),(2);
|
||||||
|
|
|
@ -528,6 +528,7 @@ insert into t1 values(1),(2);
|
||||||
truncate table t1;
|
truncate table t1;
|
||||||
commit;
|
commit;
|
||||||
truncate table t1;
|
truncate table t1;
|
||||||
|
truncate table t1;
|
||||||
select * from t1;
|
select * from t1;
|
||||||
insert into t1 values(1),(2);
|
insert into t1 values(1),(2);
|
||||||
delete from t1;
|
delete from t1;
|
||||||
|
|
|
@ -590,8 +590,12 @@ int mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok)
|
||||||
{
|
{
|
||||||
/* Probably InnoDB table */
|
/* Probably InnoDB table */
|
||||||
table_list->lock_type= TL_WRITE;
|
table_list->lock_type= TL_WRITE;
|
||||||
DBUG_RETURN(mysql_delete(thd, table_list, (COND*) 0, (ORDER*) 0,
|
ulong save_options= thd->options;
|
||||||
HA_POS_ERROR, 0));
|
thd->options&= ~(ulong) (OPTION_BEGIN | OPTION_NOT_AUTOCOMMIT);
|
||||||
|
int res= mysql_delete(thd, table_list, (COND*) 0, (ORDER*) 0,
|
||||||
|
HA_POS_ERROR, 0);
|
||||||
|
thd->options= save_options;
|
||||||
|
DBUG_RETURN(res);
|
||||||
}
|
}
|
||||||
if (lock_and_wait_for_table_name(thd, table_list))
|
if (lock_and_wait_for_table_name(thd, table_list))
|
||||||
DBUG_RETURN(-1);
|
DBUG_RETURN(-1);
|
||||||
|
|
Loading…
Add table
Reference in a new issue