mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
mysql-test/r/multi_update.result, mysql-test/t/multi_update.test
don't fail w/o bdb (or innodb) sql/sql_base.cc typo fixed. "mysql-test-run --ps-protocol select" fixed (item->cached_item was set to the last table if many matches)
This commit is contained in:
parent
e363e55b51
commit
b23a226151
3 changed files with 10 additions and 21 deletions
|
@ -476,9 +476,7 @@ aclid bigint, index idx_acl(aclid)
|
|||
insert into t2 values(1,null);
|
||||
delete t2, t1 from t2 left join t1 on (t2.aclid=t1.aclid) where t2.refid='1';
|
||||
drop table t1, t2;
|
||||
set @ttype_save=@@storage_engine;
|
||||
set @@storage_engine=innodb;
|
||||
create table t1 ( c char(8) not null );
|
||||
create table t1 ( c char(8) not null ) engine=innodb;
|
||||
insert into t1 values ('0'),('1'),('2'),('3'),('4'),('5'),('6'),('7'),('8'),('9');
|
||||
insert into t1 values ('A'),('B'),('C'),('D'),('E'),('F');
|
||||
alter table t1 add b char(8) not null;
|
||||
|
@ -489,8 +487,7 @@ create table t2 like t1;
|
|||
insert into t2 select * from t1;
|
||||
delete t1,t2 from t2,t1 where t1.a<'B' and t2.b=t1.b;
|
||||
drop table t1,t2;
|
||||
set @@storage_engine=bdb;
|
||||
create table t1 ( c char(8) not null );
|
||||
create table t1 ( c char(8) not null ) engine=bdb;
|
||||
insert into t1 values ('0'),('1'),('2'),('3'),('4'),('5'),('6'),('7'),('8'),('9');
|
||||
insert into t1 values ('A'),('B'),('C'),('D'),('E'),('F');
|
||||
alter table t1 add b char(8) not null;
|
||||
|
@ -500,7 +497,6 @@ update t1 set a=c, b=c;
|
|||
create table t2 like t1;
|
||||
insert into t2 select * from t1;
|
||||
delete t1,t2 from t2,t1 where t1.a<'B' and t2.b=t1.b;
|
||||
set @@storage_engine=@ttype_save;
|
||||
drop table t1,t2;
|
||||
create table t1 (a int, b int);
|
||||
insert into t1 values (1, 2), (2, 3), (3, 4);
|
||||
|
|
|
@ -452,11 +452,8 @@ drop table t1, t2;
|
|||
#
|
||||
# Test for bug #1980.
|
||||
#
|
||||
set @ttype_save=@@storage_engine;
|
||||
|
||||
--disable_warnings
|
||||
set @@storage_engine=innodb;
|
||||
create table t1 ( c char(8) not null );
|
||||
create table t1 ( c char(8) not null ) engine=innodb;
|
||||
--enable_warnings
|
||||
|
||||
insert into t1 values ('0'),('1'),('2'),('3'),('4'),('5'),('6'),('7'),('8'),('9');
|
||||
|
@ -475,8 +472,7 @@ delete t1,t2 from t2,t1 where t1.a<'B' and t2.b=t1.b;
|
|||
drop table t1,t2;
|
||||
|
||||
--disable_warnings
|
||||
set @@storage_engine=bdb;
|
||||
create table t1 ( c char(8) not null );
|
||||
create table t1 ( c char(8) not null ) engine=bdb;
|
||||
--enable_warnings
|
||||
|
||||
insert into t1 values ('0'),('1'),('2'),('3'),('4'),('5'),('6'),('7'),('8'),('9');
|
||||
|
@ -492,7 +488,6 @@ insert into t2 select * from t1;
|
|||
|
||||
delete t1,t2 from t2,t1 where t1.a<'B' and t2.b=t1.b;
|
||||
|
||||
set @@storage_engine=@ttype_save;
|
||||
drop table t1,t2;
|
||||
|
||||
create table t1 (a int, b int);
|
||||
|
|
|
@ -2247,12 +2247,12 @@ find_field_in_tables(THD *thd, Item_ident *item, TABLE_LIST *tables,
|
|||
if (item->cached_table)
|
||||
{
|
||||
/*
|
||||
This shortcut is used by prepared statements. We assuming that
|
||||
TABLE_LIST *tables is not changed during query execution (which
|
||||
is true for all queries except RENAME but luckily RENAME doesn't
|
||||
This shortcut is used by prepared statements. We assuming that
|
||||
TABLE_LIST *tables is not changed during query execution (which
|
||||
is true for all queries except RENAME but luckily RENAME doesn't
|
||||
use fields...) so we can rely on reusing pointer to its member.
|
||||
With this optimization we also miss case when addition of one more
|
||||
field makes some prepared query ambiguous and so erroneous, but we
|
||||
field makes some prepared query ambiguous and so erroneous, but we
|
||||
accept this trade off.
|
||||
*/
|
||||
if (item->cached_table->table)
|
||||
|
@ -2268,7 +2268,7 @@ find_field_in_tables(THD *thd, Item_ident *item, TABLE_LIST *tables,
|
|||
else
|
||||
{
|
||||
TABLE_LIST *table= item->cached_table;
|
||||
Field *find= find_field_in_table(thd, table, name, item->name, length,
|
||||
found= find_field_in_table(thd, table, name, item->name, length,
|
||||
ref,
|
||||
(table->table &&
|
||||
test(table->table->grant.
|
||||
|
@ -2391,9 +2391,7 @@ find_field_in_tables(THD *thd, Item_ident *item, TABLE_LIST *tables,
|
|||
{
|
||||
if (field == WRONG_GRANT)
|
||||
return (Field*) 0;
|
||||
item->cached_table= tables;
|
||||
if (!tables->cacheable_table)
|
||||
item->cached_table= 0;
|
||||
item->cached_table= (!tables->cacheable_table || found) ? 0 : tables;
|
||||
if (found)
|
||||
{
|
||||
if (!thd->where) // Returns first found
|
||||
|
|
Loading…
Reference in a new issue