mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Merge moonbone.local:/work/latest-4.1-opt-mysql
into moonbone.local:/work/latest-5.0-opt-mysql mysql-test/t/func_str.test: Auto merged sql/item_strfunc.cc: Auto merged sql/item_strfunc.h: Auto merged sql/sql_delete.cc: Auto merged mysql-test/r/delete.result: Manual merge mysql-test/r/func_str.result: Manual merge mysql-test/t/delete.test: Manual merge
This commit is contained in:
@ -176,6 +176,14 @@ create table t1 (a int);
|
||||
delete `4.t1` from t1 as `4.t1` where `4.t1`.a = 5;
|
||||
delete FROM `4.t1` USING t1 as `4.t1` where `4.t1`.a = 5;
|
||||
drop table t1;
|
||||
create table t1(f1 int primary key);
|
||||
insert into t1 values (4),(3),(1),(2);
|
||||
delete from t1 where (@a:= f1) order by f1 limit 1;
|
||||
select @a;
|
||||
@a
|
||||
1
|
||||
drop table t1;
|
||||
End of 4.1 tests
|
||||
CREATE TABLE t1 (a int not null,b int not null);
|
||||
CREATE TABLE t2 (a int not null, b int not null, primary key (a,b));
|
||||
CREATE TABLE t3 (a int not null, b int not null, primary key (a,b));
|
||||
|
@ -1084,6 +1084,18 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t1`.`s` AS `s` from `test`.`t1` where (trim(both _latin1'y' from `test`.`t1`.`s`) > _latin1'ab')
|
||||
DROP TABLE t1;
|
||||
create table t1(f1 varchar(4));
|
||||
explain extended select encode(f1,'zxcv') as 'enc' from t1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 system NULL NULL NULL NULL 0 const row not found
|
||||
Warnings:
|
||||
Note 1003 select encode(test.t1.f1,'zxcv') AS `enc` from test.t1
|
||||
explain extended select decode(f1,'zxcv') as 'enc' from t1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 system NULL NULL NULL NULL 0 const row not found
|
||||
Warnings:
|
||||
Note 1003 select decode(test.t1.f1,'zxcv') AS `enc` from test.t1
|
||||
drop table t1;
|
||||
End of 4.1 tests
|
||||
create table t1 (d decimal default null);
|
||||
insert into t1 values (null);
|
||||
|
@ -163,6 +163,17 @@ delete `4.t1` from t1 as `4.t1` where `4.t1`.a = 5;
|
||||
delete FROM `4.t1` USING t1 as `4.t1` where `4.t1`.a = 5;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug#17711: DELETE doesn't use index when ORDER BY, LIMIT and
|
||||
# non-restricting WHERE is present.
|
||||
#
|
||||
create table t1(f1 int primary key);
|
||||
insert into t1 values (4),(3),(1),(2);
|
||||
delete from t1 where (@a:= f1) order by f1 limit 1;
|
||||
select @a;
|
||||
drop table t1;
|
||||
|
||||
--echo End of 4.1 tests
|
||||
# End of 4.1 tests
|
||||
|
||||
#
|
||||
|
@ -730,6 +730,14 @@ EXPLAIN EXTENDED SELECT s FROM t1 WHERE TRIM(BOTH 'y' FROM s) > 'ab';
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Bug#23409: ENCODE() and DECODE() functions aren't printed correctly
|
||||
#
|
||||
create table t1(f1 varchar(4));
|
||||
explain extended select encode(f1,'zxcv') as 'enc' from t1;
|
||||
explain extended select decode(f1,'zxcv') as 'enc' from t1;
|
||||
drop table t1;
|
||||
|
||||
--echo End of 4.1 tests
|
||||
|
||||
#
|
||||
|
Reference in New Issue
Block a user