mirror of
https://github.com/MariaDB/server.git
synced 2025-11-10 23:02:54 +03:00
Merge sanja.is.com.ua:/home/bell/mysql/bk/work-top3-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-simple_in-4.1 mysql-test/r/subselect.result: Auto merged mysql-test/t/subselect.test: Auto merged sql/item_subselect.cc: Auto merged sql/item_sum.cc: Auto merged sql/sql_lex.h: Auto merged sql/sql_select.cc: Auto merged
This commit is contained in:
@@ -73,3 +73,14 @@ select * from t1 where word like 'AE';
|
||||
select * from t1 where word like binary 0xDF;
|
||||
select * from t1 where word like CAST(0xDF as CHAR);
|
||||
drop table t1;
|
||||
|
||||
CREATE TABLE t1 (
|
||||
s1 CHAR(5) CHARACTER SET latin1 COLLATE latin1_german2_ci
|
||||
);
|
||||
INSERT INTO t1 VALUES ('<27>');
|
||||
INSERT INTO t1 VALUES ('ue');
|
||||
SELECT DISTINCT s1 FROM t1;
|
||||
SELECT s1,COUNT(*) FROM t1 GROUP BY s1;
|
||||
SELECT COUNT(DISTINCT s1) FROM t1;
|
||||
SELECT FIELD('ue',s1), FIELD('<27>',s1), s1='ue', s1='<27>' FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
@@ -27,3 +27,14 @@ SHOW FIELDS FROM таблица;
|
||||
SET CHARACTER SET koi8r;
|
||||
DROP TABLE <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>;
|
||||
SET CHARACTER SET default;
|
||||
|
||||
SET CHARACTER SET koi8r;
|
||||
CREATE DATABASE <20><><EFBFBD><EFBFBD>;
|
||||
USE <20><><EFBFBD><EFBFBD>;
|
||||
SHOW TABLES;
|
||||
SHOW TABLES IN <20><><EFBFBD><EFBFBD>;
|
||||
SET CHARACTER SET cp1251;
|
||||
SHOW TABLES;
|
||||
SHOW TABLES IN <20><><EFBFBD><EFBFBD>;
|
||||
SET CHARACTER SET koi8r;
|
||||
DROP DATABASE <20><><EFBFBD><EFBFBD>;
|
||||
|
||||
@@ -17,6 +17,7 @@ CREATE TABLE t1 (
|
||||
) TYPE=MyISAM;
|
||||
|
||||
# two-level entry, second-level tree with depth 2
|
||||
--disable_query_log
|
||||
let $1=260;
|
||||
while ($1)
|
||||
{
|
||||
@@ -39,6 +40,7 @@ while ($1)
|
||||
eval insert t1 (a) values ('aaayyy');
|
||||
dec $1;
|
||||
}
|
||||
--enable_query_log
|
||||
|
||||
# converting to two-level
|
||||
repair table t1 quick;
|
||||
|
||||
@@ -355,3 +355,8 @@ insert into t1 values (1, 3);
|
||||
select count(*) + MAX_REQ - MAX_REQ + MAX_REQ - MAX_REQ + MAX_REQ - MAX_REQ + MAX_REQ - MAX_REQ + MAX_REQ - MAX_REQ from t1 group by MAX_REQ;
|
||||
select Case When Count(*) < MAX_REQ Then 1 Else 0 End from t1 where t1.USR_ID = 1 group by MAX_REQ;
|
||||
drop table t1;
|
||||
|
||||
create table t1 (a char(10));
|
||||
insert into t1 values ('a'),('b'),('c');
|
||||
select coercibility(max(a)) from t1;
|
||||
drop table t1;
|
||||
|
||||
@@ -305,3 +305,13 @@ select SUBSTR('abcdefg',-1,5) FROM DUAL;
|
||||
select SUBSTR('abcdefg',0,0) FROM DUAL;
|
||||
select SUBSTR('abcdefg',-1,-1) FROM DUAL;
|
||||
select SUBSTR('abcdefg',1,-1) FROM DUAL;
|
||||
|
||||
#
|
||||
# Test that fix_fields doesn't follow to upper level (to comparison)
|
||||
# when an error on a lower level (in concat) has accured:
|
||||
#
|
||||
create table t7 (s1 char);
|
||||
--error 1265
|
||||
select * from t7
|
||||
where concat(s1 collate latin1_general_ci,s1 collate latin1_swedish_ci) = 'AA';
|
||||
drop table t7;
|
||||
|
||||
@@ -260,8 +260,9 @@ show status like "Qcache_queries_in_cache";
|
||||
#
|
||||
# Charset convertion (cp1251_koi8 always present)
|
||||
#
|
||||
create table t1 (a char(1) not null);
|
||||
insert into t1 values("<22>");
|
||||
create table t1 (a char(1) not null collate koi8r_general_ci);
|
||||
insert into t1 values(_koi8r"<22>");
|
||||
set CHARACTER SET koi8r;
|
||||
select * from t1;
|
||||
set CHARACTER SET cp1251_koi8;
|
||||
select * from t1;
|
||||
@@ -368,6 +369,15 @@ drop table t2;
|
||||
set GLOBAL query_cache_min_res_unit=default;
|
||||
show global variables like "query_cache_min_res_unit";
|
||||
|
||||
#
|
||||
# Case sensitive test
|
||||
#
|
||||
create table t1 (a int not null);
|
||||
insert into t1 values (1);
|
||||
select "aaa" from t1;
|
||||
select "AAA" from t1;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Test of query cache resizing
|
||||
#
|
||||
|
||||
@@ -864,4 +864,26 @@ insert into t1 values (0,100),(1,2), (1,3), (2,2), (2,7), (2,-1), (3,10);
|
||||
insert into t2 values (0,0), (1,1), (2,1), (3,1), (4,1);
|
||||
insert into t3 values (3,3), (2,2), (1,1);
|
||||
select a,(select count(distinct t1.b) as sum from t1,t2 where t1.a=t2.a and t2.b > 0 and t1.a <= t3.b group by t1.a order by sum limit 1) from t3;
|
||||
drop table t1,t2,t3;s
|
||||
drop table t1,t2,t3;
|
||||
|
||||
#
|
||||
# aggregate functions in HAVING test
|
||||
#
|
||||
create table t1 (s1 int);
|
||||
create table t2 (s1 int);
|
||||
insert into t1 values (1);
|
||||
insert into t2 values (1);
|
||||
select * from t1 where exists (select s1 from t2 having max(t2.s1)=t1.s1);
|
||||
drop table t1,t2;
|
||||
#
|
||||
# update subquery with wrong field (to force name resolving
|
||||
# in UPDATE name space)
|
||||
#
|
||||
create table t1 (s1 int);
|
||||
create table t2 (s1 int);
|
||||
insert into t1 values (1);
|
||||
insert into t2 values (1);
|
||||
-- error 1109
|
||||
update t1 set s1 = s1 + 1 where 1 = (select x.s1 as A from t2 WHERE t2.s1 > t1.s1 order by A);
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user