Commit 00c36b69 authored by unknown's avatar unknown

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)


mysql-test/r/multi_update.result:
  don't fail w/o bdb (or innodb)
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)
parent 54c80b5b
......@@ -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);
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment