mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
After merge fixes
Added initialization of all important global variables
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
-- require r/not_embedded.require
|
||||
disable_query_log;
|
||||
select version() like "%embedded%" as "have_embedded";
|
||||
select version() like N'%embedded%' as 'have_embedded';
|
||||
enable_query_log;
|
||||
|
||||
|
@ -158,8 +158,8 @@ alter table t2 rename t1, add c char(10) comment "no comment";
|
||||
show columns from t1;
|
||||
Field Type Collation Null Key Default Extra
|
||||
i int(10) unsigned binary PRI NULL auto_increment
|
||||
c char(10) latin1_swedish_ci YES NULL
|
||||
drop table t1;
|
||||
c char(10) latin1_swedish_ci YES NULL
|
||||
drop table t1;
|
||||
create table t1 (a int, b int);
|
||||
insert into t1 values(1,100), (2,100), (3, 100);
|
||||
insert into t1 values(1,99), (2,99), (3, 99);
|
||||
|
@ -183,18 +183,20 @@ show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) NOT NULL default '0'
|
||||
) TYPE=HEAP
|
||||
) TYPE=HEAP CHARSET=latin1
|
||||
drop table t1;
|
||||
SET SESSION table_type="gemini";
|
||||
SELECT @@table_type;
|
||||
@@table_type
|
||||
GEMINI
|
||||
CREATE TABLE t1 (a int not null);
|
||||
Warnings:
|
||||
Warning 1259 Using storage engine MYISAM for table 't1'
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) NOT NULL default '0'
|
||||
) TYPE=MyISAM
|
||||
) TYPE=MyISAM CHARSET=latin1
|
||||
SET SESSION table_type=default;
|
||||
drop table t1;
|
||||
create table t1 ( k1 varchar(2), k2 int, primary key(k1,k2));
|
||||
|
@ -41,3 +41,4 @@ Field Type Collation Null Key Default Extra
|
||||
поле char(32) character set koi8r koi8r_general_ci
|
||||
SET CHARACTER SET koi8r;
|
||||
DROP TABLE <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>;
|
||||
SET CHARACTER SET default;
|
||||
|
@ -216,7 +216,6 @@ test.t1 repair status OK
|
||||
select * from t1 where match (a) against ('aaaa');
|
||||
a
|
||||
drop table t1;
|
||||
drop table if exists t1;
|
||||
create table t1 ( ref_mag text not null, fulltext (ref_mag));
|
||||
insert into t1 values ('test');
|
||||
select ref_mag from t1 where match ref_mag against ('+test' in boolean mode);
|
||||
|
@ -42,22 +42,12 @@ insert into t1 values (null,null,'');
|
||||
select count(distinct a),count(distinct grp) from t1;
|
||||
count(distinct a) count(distinct grp)
|
||||
6 3
|
||||
select sum(all a),count(all a),avg(all a),std(all a),bit_or(all a),bit_and(all a),min(all a),max(all a),min(all c),max(all c) from t1;
|
||||
sum(all a) count(all a) avg(all a) std(all a) bit_or(all a) bit_and(all a) min(all a) max(all a) min(all c) max(all c)
|
||||
21 6 3.5000 1.7078 7 0 1 6 E
|
||||
select grp, sum(a),count(a),avg(a),std(a),bit_or(a),bit_and(a),min(a),max(a),min(c),max(c) from t1 group by grp;
|
||||
grp sum(a) count(a) avg(a) std(a) bit_or(a) bit_and(a) min(a) max(a) min(c) max(c)
|
||||
NULL NULL 0 NULL NULL 0 0 NULL NULL
|
||||
1 1 1 1.0000 0.0000 1 1 1 1 a a
|
||||
2 5 2 2.5000 0.5000 3 2 2 3 b c
|
||||
3 15 3 5.0000 0.8165 7 4 4 6 C E
|
||||
select grp, sum(a)+count(a)+avg(a)+std(a)+bit_or(a)+bit_and(a)+min(a)+max(a)+min(c)+max(c) as sum from t1 group by grp;
|
||||
select sum(all a),count(all a),avg(all a),std(all a),variance(all a),bit_or(all a),bit_and(all a),min(all a),max(all a),min(all c),max(all c) from t1;
|
||||
sum(all a) count(all a) avg(all a) std(all a) variance(all a) bit_or(all a) bit_and(all a) min(all a) max(all a) min(all c) max(all c)
|
||||
21 6 3.5000 1.7078 2.9167 7 0 1 6 E
|
||||
select grp, sum(a),count(a),avg(a),std(a),variance(a),bit_or(a),bit_and(a),min(a),max(a),min(c),max(c) from t1 group by grp;
|
||||
grp sum(a) count(a) avg(a) std(a) variance(a) bit_or(a) bit_and(a) min(a) max(a) min(c) max(c)
|
||||
NULL 0 0 NULL NULL NULL 0 0 NULL NULL
|
||||
NULL NULL 0 NULL NULL NULL 0 0 NULL NULL
|
||||
1 1 1 1.0000 0.0000 0.0000 1 1 1 1 a a
|
||||
2 5 2 2.5000 0.5000 0.2500 3 2 2 3 b c
|
||||
3 15 3 5.0000 0.8165 0.6667 7 4 4 6 C E
|
||||
@ -231,47 +221,6 @@ select max(t1.a2),max(t2.a1) from t1 left outer join t2 on t1.a1=10;
|
||||
max(t1.a2) max(t2.a1)
|
||||
zzz BBB
|
||||
drop table t1,t2;
|
||||
CREATE TABLE t1 (a int, b int);
|
||||
select count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1;
|
||||
count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b)
|
||||
0 NULL NULL NULL NULL NULL -1 0
|
||||
select a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a;
|
||||
a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b)
|
||||
insert into t1 values (1,null);
|
||||
select a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a;
|
||||
a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b)
|
||||
1 0 NULL NULL NULL NULL NULL -1 0
|
||||
insert into t1 values (1,null);
|
||||
insert into t1 values (2,null);
|
||||
select a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a;
|
||||
a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b)
|
||||
1 0 NULL NULL NULL NULL NULL 0 0
|
||||
2 0 NULL NULL NULL NULL NULL 0 0
|
||||
select SQL_BIG_RESULT a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a;
|
||||
a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b)
|
||||
1 0 NULL NULL NULL NULL NULL -1 0
|
||||
2 0 NULL NULL NULL NULL NULL -1 0
|
||||
insert into t1 values (2,1);
|
||||
select a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a;
|
||||
a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b)
|
||||
1 0 NULL NULL NULL NULL NULL 0 0
|
||||
2 1 1 1.0000 0.0000 1 1 0 1
|
||||
select SQL_BIG_RESULT a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a;
|
||||
a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b)
|
||||
1 0 NULL NULL NULL NULL NULL -1 0
|
||||
2 1 1 1.0000 0.0000 1 1 1 1
|
||||
insert into t1 values (3,1);
|
||||
select a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a;
|
||||
a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b)
|
||||
1 0 NULL NULL NULL NULL NULL 0 0
|
||||
2 1 1 1.0000 0.0000 1 1 0 1
|
||||
3 1 1 1.0000 0.0000 1 1 1 1
|
||||
select SQL_BIG_RESULT a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a;
|
||||
a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b)
|
||||
1 0 NULL NULL NULL NULL NULL -1 0
|
||||
2 1 1 1.0000 0.0000 1 1 1 1
|
||||
3 1 1 1.0000 0.0000 1 1 1 1
|
||||
drop table t1;
|
||||
create table t1(
|
||||
a1 char(3) primary key,
|
||||
a2 smallint,
|
||||
@ -613,3 +562,44 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index NULL PRIMARY 3 NULL 14 Using index
|
||||
1 SIMPLE t2 index NULL k2 4 NULL 6 Using where; Using index
|
||||
drop table t1, t2;
|
||||
CREATE TABLE t1 (a int, b int);
|
||||
select count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1;
|
||||
count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b)
|
||||
0 NULL NULL NULL NULL NULL 18446744073709551615 0
|
||||
select a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a;
|
||||
a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b)
|
||||
insert into t1 values (1,null);
|
||||
select a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a;
|
||||
a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b)
|
||||
1 0 NULL NULL NULL NULL NULL 18446744073709551615 0
|
||||
insert into t1 values (1,null);
|
||||
insert into t1 values (2,null);
|
||||
select a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a;
|
||||
a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b)
|
||||
1 0 NULL NULL NULL NULL NULL 0 0
|
||||
2 0 NULL NULL NULL NULL NULL 0 0
|
||||
select SQL_BIG_RESULT a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a;
|
||||
a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b)
|
||||
1 0 NULL NULL NULL NULL NULL 18446744073709551615 0
|
||||
2 0 NULL NULL NULL NULL NULL 18446744073709551615 0
|
||||
insert into t1 values (2,1);
|
||||
select a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a;
|
||||
a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b)
|
||||
1 0 NULL NULL NULL NULL NULL 0 0
|
||||
2 1 1 1.0000 0.0000 1 1 0 1
|
||||
select SQL_BIG_RESULT a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a;
|
||||
a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b)
|
||||
1 0 NULL NULL NULL NULL NULL 18446744073709551615 0
|
||||
2 1 1 1.0000 0.0000 1 1 1 1
|
||||
insert into t1 values (3,1);
|
||||
select a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a;
|
||||
a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b)
|
||||
1 0 NULL NULL NULL NULL NULL 0 0
|
||||
2 1 1 1.0000 0.0000 1 1 0 1
|
||||
3 1 1 1.0000 0.0000 1 1 1 1
|
||||
select SQL_BIG_RESULT a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a;
|
||||
a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b)
|
||||
1 0 NULL NULL NULL NULL NULL 18446744073709551615 0
|
||||
2 1 1 1.0000 0.0000 1 1 1 1
|
||||
3 1 1 1.0000 0.0000 1 1 1 1
|
||||
drop table t1;
|
||||
|
@ -54,9 +54,9 @@ userid MIN(t1.score+0.0)
|
||||
2 2.0
|
||||
1 1.0
|
||||
EXPLAIN SELECT t2.userid, MIN(t1.score+0.0) FROM t1, t2 WHERE t1.userID=t2.userID AND t1.spID=2 GROUP BY t2.userid ORDER BY NULL;
|
||||
table type possible_keys key key_len ref rows Extra
|
||||
t1 ALL NULL NULL NULL NULL 4 Using where; Using temporary
|
||||
t2 eq_ref PRIMARY PRIMARY 4 t1.userID 1 Using index
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using where; Using temporary
|
||||
1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 t1.userID 1 Using index
|
||||
drop table t1,t2;
|
||||
CREATE TABLE t1 (
|
||||
PID int(10) unsigned NOT NULL auto_increment,
|
||||
@ -253,10 +253,10 @@ key (score)
|
||||
INSERT INTO t1 VALUES (1,1,1),(2,2,2),(2,1,1),(3,3,3),(4,3,3),(5,3,3),(6,3,3),(7,3,3);
|
||||
explain select userid,count(*) from t1 group by userid desc;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 6 Using temporary; Using filesort
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 8 Using temporary; Using filesort
|
||||
explain select userid,count(*) from t1 group by userid desc order by null;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 6 Using temporary
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 8 Using temporary
|
||||
select userid,count(*) from t1 group by userid desc;
|
||||
userid count(*)
|
||||
3 5
|
||||
@ -269,13 +269,13 @@ select userid,count(*) from t1 group by userid desc having 3 IN (1,COUNT(*));
|
||||
userid count(*)
|
||||
explain select spid,count(*) from t1 where spid between 1 and 2 group by spid desc;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range spID spID 5 NULL 2 Using where; Using index
|
||||
1 SIMPLE t1 range spID spID 5 NULL 3 Using where; Using index
|
||||
explain select spid,count(*) from t1 where spid between 1 and 2 group by spid;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range spID spID 5 NULL 2 Using where; Using index
|
||||
1 SIMPLE t1 range spID spID 5 NULL 3 Using where; Using index
|
||||
explain select spid,count(*) from t1 where spid between 1 and 2 group by spid order by null;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range spID spID 5 NULL 2 Using where; Using index
|
||||
1 SIMPLE t1 range spID spID 5 NULL 3 Using where; Using index
|
||||
select spid,count(*) from t1 where spid between 1 and 2 group by spid;
|
||||
spid count(*)
|
||||
1 1
|
||||
|
@ -1209,7 +1209,8 @@ SET AUTOCOMMIT=0;
|
||||
INSERT INTO t1 ( B_ID ) VALUES ( 1 );
|
||||
INSERT INTO t2 ( NEXT_T ) VALUES ( 1 );
|
||||
ROLLBACK;
|
||||
Warning: Some non-transactional changed tables couldn't be rolled back
|
||||
Warnings:
|
||||
Warning 1196 Some non-transactional changed tables couldn't be rolled back
|
||||
SELECT * FROM t1;
|
||||
B_ID
|
||||
drop table t1,t2;
|
||||
@ -1247,12 +1248,12 @@ select count(*) from t1;
|
||||
count(*)
|
||||
29267
|
||||
explain select * from t1 where c between 1 and 10000;
|
||||
table type possible_keys key key_len ref rows Extra
|
||||
t1 range c c 5 NULL 1 Using where
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range c c 5 NULL 1 Using where
|
||||
update t1 set c=a;
|
||||
explain select * from t1 where c between 1 and 10000;
|
||||
table type possible_keys key key_len ref rows Extra
|
||||
t1 ALL c NULL NULL NULL 29537 Using where
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL c NULL NULL NULL 29537 Using where
|
||||
drop table t1,t2;
|
||||
create table t1 (id int primary key auto_increment, fk int, index index_fk (fk)) type=innodb;
|
||||
insert into t1 (id) values (null),(null),(null),(null),(null);
|
||||
@ -1286,6 +1287,7 @@ a b
|
||||
13 2
|
||||
111 100
|
||||
111 100
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (col1 int(1))TYPE=InnoDB;
|
||||
CREATE TABLE t2 (col1 int(1),stamp TIMESTAMP(+0),INDEX stamp_idx
|
||||
(stamp))TYPE=InnoDB;
|
||||
|
@ -646,7 +646,6 @@ fooID barID fooID
|
||||
20 2 NULL
|
||||
30 3 30
|
||||
drop table t1,t2;
|
||||
drop table if exists t3;
|
||||
create table t1 (i int);
|
||||
create table t2 (i int);
|
||||
create table t3 (i int);
|
||||
|
@ -84,7 +84,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range a,b a 5 NULL 5 Using where
|
||||
explain select * from t1 where (a is null or a = 7) and b=7 and c=0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range a,b a 5 NULL 12 Using where
|
||||
1 SIMPLE t1 ALL a,b NULL NULL NULL 12 Using where
|
||||
explain select * from t1 where (a is null and b>a) or a is null and b=7 limit 2;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref a,b a 5 const 3 Using where
|
||||
|
@ -549,10 +549,10 @@ KEY FieldKey (FieldKey),
|
||||
KEY LongField (FieldKey,LongVal),
|
||||
KEY StringField (FieldKey,StringVal(32))
|
||||
);
|
||||
INSERT INTO t1 VALUES ('0',3,'0'),('0',2,'1'),('0',1,'2'),('1',2,'1'),('1',1,'3'), ('1',0,'2'),('2',3,'0'),('2',2,'1'),('2',1,'2'),('3',2,'1'),('3',1,'2'),('3','3','3');
|
||||
INSERT INTO t1 VALUES ('0',3,'0'),('0',2,'1'),('0',1,'2'),('1',2,'1'),('1',1,'3'), ('1',0,'2'),('2',3,'0'),('2',2,'1'),('2',1,'2'),('2',3,'0'),('2',2,'1'),('2',1,'2'),('3',2,'1'),('3',1,'2'),('3','3','3');
|
||||
EXPLAIN SELECT * FROM t1 WHERE FieldKey = '1' ORDER BY LongVal;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref FieldKey,LongField,StringField LongField 36 const 2 Using where
|
||||
1 SIMPLE t1 ref FieldKey,LongField,StringField StringField 36 const 3 Using where; Using filesort
|
||||
SELECT * FROM t1 WHERE FieldKey = '1' ORDER BY LongVal;
|
||||
FieldKey LongVal StringVal
|
||||
1 0 2
|
||||
|
@ -382,14 +382,14 @@ a
|
||||
set CHARACTER SET cp1251_koi8;
|
||||
select * from t1;
|
||||
a
|
||||
?
|
||||
<EFBFBD>
|
||||
set CHARACTER SET DEFAULT;
|
||||
show status like "Qcache_queries_in_cache";
|
||||
Variable_name Value
|
||||
Qcache_queries_in_cache 2
|
||||
Qcache_queries_in_cache 1
|
||||
show status like "Qcache_hits";
|
||||
Variable_name Value
|
||||
Qcache_hits 4
|
||||
Qcache_hits 5
|
||||
drop table t1;
|
||||
create database if not exists mysqltest;
|
||||
create table mysqltest.t1 (i int not null);
|
||||
@ -415,7 +415,7 @@ Variable_name Value
|
||||
Qcache_queries_in_cache 2
|
||||
show status like "Qcache_hits";
|
||||
Variable_name Value
|
||||
Qcache_hits 6
|
||||
Qcache_hits 7
|
||||
drop database mysqltest;
|
||||
drop table t1;
|
||||
create table t1 (i int not null);
|
||||
@ -429,7 +429,7 @@ FOUND_ROWS()
|
||||
4
|
||||
show status like "Qcache_hits";
|
||||
Variable_name Value
|
||||
Qcache_hits 6
|
||||
Qcache_hits 7
|
||||
show status like "Qcache_queries_in_cache";
|
||||
Variable_name Value
|
||||
Qcache_queries_in_cache 1
|
||||
@ -441,7 +441,7 @@ FOUND_ROWS()
|
||||
1
|
||||
show status like "Qcache_hits";
|
||||
Variable_name Value
|
||||
Qcache_hits 6
|
||||
Qcache_hits 7
|
||||
show status like "Qcache_queries_in_cache";
|
||||
Variable_name Value
|
||||
Qcache_queries_in_cache 2
|
||||
@ -454,7 +454,7 @@ FOUND_ROWS()
|
||||
4
|
||||
show status like "Qcache_hits";
|
||||
Variable_name Value
|
||||
Qcache_hits 7
|
||||
Qcache_hits 8
|
||||
show status like "Qcache_queries_in_cache";
|
||||
Variable_name Value
|
||||
Qcache_queries_in_cache 2
|
||||
@ -466,7 +466,7 @@ FOUND_ROWS()
|
||||
1
|
||||
show status like "Qcache_hits";
|
||||
Variable_name Value
|
||||
Qcache_hits 8
|
||||
Qcache_hits 9
|
||||
show status like "Qcache_queries_in_cache";
|
||||
Variable_name Value
|
||||
Qcache_queries_in_cache 2
|
||||
@ -535,7 +535,7 @@ a
|
||||
3
|
||||
show status like "Qcache_hits";
|
||||
Variable_name Value
|
||||
Qcache_hits 11
|
||||
Qcache_hits 12
|
||||
show status like "Qcache_queries_in_cache";
|
||||
Variable_name Value
|
||||
Qcache_queries_in_cache 2
|
||||
@ -552,7 +552,7 @@ a
|
||||
3
|
||||
show status like "Qcache_hits";
|
||||
Variable_name Value
|
||||
Qcache_hits 12
|
||||
Qcache_hits 13
|
||||
show status like "Qcache_queries_in_cache";
|
||||
Variable_name Value
|
||||
Qcache_queries_in_cache 2
|
||||
|
@ -7,7 +7,7 @@ test.t1 repair status OK
|
||||
alter table t1 TYPE=HEAP;
|
||||
repair table t1 use_frm;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair error The handler for the table doesn't support repair
|
||||
test.t1 repair error The storage enginge for the table doesn't support repair
|
||||
drop table t1;
|
||||
repair table t1 use_frm;
|
||||
Table Op Msg_type Msg_text
|
||||
|
@ -14,7 +14,7 @@ rename table t1 to t5, t2 to t1;
|
||||
flush no_write_to_binlog tables;
|
||||
show binlog events;
|
||||
Log_name Pos Event_type Server_id Orig_log_pos Info
|
||||
master-bin.000001 4 Start 1 4 Server ver: 4.1.1-alpha-debug-log, Binlog ver: 3
|
||||
master-bin.000001 4 Start 1 4 Server ver: SERVER_VERSION, Binlog ver: 3
|
||||
master-bin.000001 79 Query 1 79 use `test`; create table t1 (a int)
|
||||
master-bin.000001 137 Query 1 137 use `test`; insert into t1 values (10)
|
||||
master-bin.000001 198 Query 1 198 use `test`; create table t2 (a int)
|
||||
@ -27,7 +27,7 @@ a
|
||||
flush tables;
|
||||
show binlog events;
|
||||
Log_name Pos Event_type Server_id Orig_log_pos Info
|
||||
master-bin.000001 4 Start 1 4 Server ver: 4.1.1-alpha-debug-log, Binlog ver: 3
|
||||
master-bin.000001 4 Start 1 4 Server ver: SERVER_VERSION, Binlog ver: 3
|
||||
master-bin.000001 79 Query 1 79 use `test`; create table t1 (a int)
|
||||
master-bin.000001 137 Query 1 137 use `test`; insert into t1 values (10)
|
||||
master-bin.000001 198 Query 1 198 use `test`; create table t2 (a int)
|
||||
|
@ -90,9 +90,6 @@ explain (select a,b from t1 limit 2) union all (select a,b from t2 order by a l
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 ALL NULL NULL NULL NULL 4
|
||||
2 UNION t2 ALL NULL NULL NULL NULL 4 Using filesort
|
||||
select found_rows();
|
||||
found_rows()
|
||||
0
|
||||
explain select a,b from t1 union all select a,b from t2;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 ALL NULL NULL NULL NULL 4
|
||||
@ -132,6 +129,23 @@ create table t3 select a,b from t1 union all select a,b from t2;
|
||||
insert into t3 select a,b from t1 union all select a,b from t2;
|
||||
replace into t3 select a,b as c from t1 union all select a,b from t2;
|
||||
drop table t1,t2,t3;
|
||||
select * union select 1;
|
||||
No tables used
|
||||
select 1 as a,(select a union select a);
|
||||
a (select a union select a)
|
||||
1 1
|
||||
(select 1) union (select 2) order by 0;
|
||||
Unknown column '0' in 'order clause'
|
||||
SELECT @a:=1 UNION SELECT @a:=@a+1;
|
||||
@a:=1
|
||||
1
|
||||
2
|
||||
(SELECT 1) UNION (SELECT 2) ORDER BY (SELECT a);
|
||||
Unknown column 'a' in 'field list'
|
||||
(SELECT 1,3) UNION (SELECT 2,1) ORDER BY (SELECT 2);
|
||||
1 3
|
||||
1 3
|
||||
2 1
|
||||
CREATE TABLE t1 (
|
||||
`pseudo` char(35) NOT NULL default '',
|
||||
`pseudo1` char(35) NOT NULL default '',
|
||||
@ -255,11 +269,6 @@ uid rl g1 cid gg
|
||||
uid rl g1 cid gg
|
||||
1 NULL V1 NULL 1
|
||||
drop table t1,t2,t3,t4,t5,t6;
|
||||
select * union select 1;
|
||||
No tables used
|
||||
select 1 as a,(select a union select a);
|
||||
a (select a union select a)
|
||||
1 1
|
||||
CREATE TABLE t1 ( id int(3) unsigned default '0') TYPE=MyISAM;
|
||||
INSERT INTO t1 (id) VALUES("1");
|
||||
CREATE TABLE t2 ( id int(3) unsigned default '0', id_master int(5) default '0', text1 varchar(5) default NULL, text2 varchar(5) default NULL) TYPE=MyISAM;
|
||||
@ -286,10 +295,6 @@ id_master id text1 text2
|
||||
1 3 NULL bar3
|
||||
1 4 foo4 bar4
|
||||
drop table if exists t1,t2;
|
||||
(SELECT 1,3) UNION (SELECT 2,1) ORDER BY (SELECT 2);
|
||||
1 3
|
||||
1 3
|
||||
2 1
|
||||
create table t1 (a int not null primary key auto_increment, b int, key(b));
|
||||
create table t2 (a int not null primary key auto_increment, b int);
|
||||
insert into t1 (b) values (1),(2),(2),(3);
|
||||
@ -323,11 +328,3 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 const PRIMARY PRIMARY 4 const 1
|
||||
2 UNION t1 ref b b 5 const 1 Using where
|
||||
drop table t1,t2;
|
||||
(select 1) union (select 2) order by 0;
|
||||
Unknown column '0' in 'order clause'
|
||||
SELECT @a:=1 UNION SELECT @a:=@a+1;
|
||||
@a:=1
|
||||
1
|
||||
2
|
||||
(SELECT 1) UNION (SELECT 2) ORDER BY (SELECT a);
|
||||
Unknown column 'a' in 'field list'
|
||||
|
@ -137,7 +137,10 @@ a b
|
||||
13 2
|
||||
111 100
|
||||
111 100
|
||||
drop table t1;
|
||||
create table t2 (a int not null, b int not null);
|
||||
insert into t2 values (1,1),(1,2),(1,3);
|
||||
update t1 set b=(select distinct 1 from (select * from t2) a);
|
||||
drop table t1,t2;
|
||||
CREATE TABLE t1 (
|
||||
`id_param` smallint(3) unsigned NOT NULL default '0',
|
||||
`nom_option` char(40) NOT NULL default '',
|
||||
|
@ -2,7 +2,9 @@
|
||||
# Test of ansi mode
|
||||
#
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
||||
# Test some functions that works different in ansi mode
|
||||
|
||||
|
@ -145,9 +145,13 @@ drop table t1;
|
||||
#
|
||||
create table t1 ( k1 varchar(2), k2 int, primary key(k1,k2));
|
||||
insert into t1 values ("a", 1), ("b", 2);
|
||||
!$1048 insert into t1 values ("c", NULL);
|
||||
!$1048 insert into t1 values (NULL, 3);
|
||||
!$1048 insert into t1 values (NULL, NULL);
|
||||
--error 1048
|
||||
insert into t1 values ("c", NULL);
|
||||
--error 1048
|
||||
insert into t1 values (NULL, 3);
|
||||
--error 1048
|
||||
insert into t1 values (NULL, NULL);
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Test create with foreign keys
|
||||
|
@ -26,3 +26,4 @@ SHOW FIELDS FROM таблица;
|
||||
|
||||
SET CHARACTER SET koi8r;
|
||||
DROP TABLE <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>;
|
||||
SET CHARACTER SET default;
|
||||
|
@ -1,7 +1,9 @@
|
||||
#
|
||||
# Tests with the ujis character set
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
||||
#
|
||||
# Test problem with LEFT()
|
||||
|
@ -180,11 +180,9 @@ drop table t1;
|
||||
# FULLTEXT index on a TEXT filed converted to a CHAR field doesn't work anymore
|
||||
#
|
||||
|
||||
drop table if exists t1;
|
||||
create table t1 ( ref_mag text not null, fulltext (ref_mag));
|
||||
insert into t1 values ('test');
|
||||
select ref_mag from t1 where match ref_mag against ('+test' in boolean mode);
|
||||
alter table t1 change ref_mag ref_mag char (255) not null;
|
||||
select ref_mag from t1 where match ref_mag against ('+test' in boolean mode);
|
||||
drop table t1;
|
||||
|
||||
|
@ -807,7 +807,6 @@ CREATE TABLE t1 ( B_ID INTEGER NOT NULL PRIMARY KEY) TYPE=InnoDB;
|
||||
SET AUTOCOMMIT=0;
|
||||
INSERT INTO t1 ( B_ID ) VALUES ( 1 );
|
||||
INSERT INTO t2 ( NEXT_T ) VALUES ( 1 );
|
||||
-- error 1196
|
||||
ROLLBACK;
|
||||
SELECT * FROM t1;
|
||||
drop table t1,t2;
|
||||
|
@ -417,7 +417,7 @@ explain select * from t2 left join t1 on t1.fooID = t2.fooID and t1.fooID = 30;
|
||||
select * from t2 left join t1 on t1.fooID = t2.fooID and t1.fooID = 30;
|
||||
select * from t2 left join t1 ignore index(primary) on t1.fooID = t2.fooID and t1.fooID = 30;
|
||||
drop table t1,t2;
|
||||
drop table if exists t3;
|
||||
|
||||
create table t1 (i int);
|
||||
create table t2 (i int);
|
||||
create table t3 (i int);
|
||||
|
@ -2,7 +2,9 @@
|
||||
# Some simple test of load data
|
||||
#
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
||||
create table t1 (a date, b date, c date not null, d date);
|
||||
load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',';
|
||||
|
@ -357,7 +357,7 @@ CREATE TABLE t1 (
|
||||
KEY LongField (FieldKey,LongVal),
|
||||
KEY StringField (FieldKey,StringVal(32))
|
||||
);
|
||||
INSERT INTO t1 VALUES ('0',3,'0'),('0',2,'1'),('0',1,'2'),('1',2,'1'),('1',1,'3'), ('1',0,'2'),('2',3,'0'),('2',2,'1'),('2',1,'2'),('3',2,'1'),('3',1,'2'),('3','3','3');
|
||||
INSERT INTO t1 VALUES ('0',3,'0'),('0',2,'1'),('0',1,'2'),('1',2,'1'),('1',1,'3'), ('1',0,'2'),('2',3,'0'),('2',2,'1'),('2',1,'2'),('2',3,'0'),('2',2,'1'),('2',1,'2'),('3',2,'1'),('3',1,'2'),('3','3','3');
|
||||
EXPLAIN SELECT * FROM t1 WHERE FieldKey = '1' ORDER BY LongVal;
|
||||
SELECT * FROM t1 WHERE FieldKey = '1' ORDER BY LongVal;
|
||||
EXPLAIN SELECT * FROM t1 WHERE FieldKey > '2' ORDER BY LongVal;
|
||||
|
@ -17,12 +17,14 @@ rename table t1 to t5, t2 to t1;
|
||||
# first don't write it to the binlog, to test the NO_WRITE_TO_BINLOG keyword.
|
||||
flush no_write_to_binlog tables;
|
||||
# Check that it's not in the binlog.
|
||||
--replace_result $SERVER_VERSION SERVER_VERSION
|
||||
show binlog events;
|
||||
# Check that the master is not confused.
|
||||
select * from t3;
|
||||
# This FLUSH should go into the binlog to not confuse the slave.
|
||||
flush tables;
|
||||
# Check that it's in the binlog.
|
||||
--replace_result $SERVER_VERSION SERVER_VERSION
|
||||
show binlog events;
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
|
@ -4,7 +4,7 @@
|
||||
# This would work if mysqltest run would be threaded and handle each
|
||||
# connection in a separate thread.
|
||||
#
|
||||
-- source include/not_embedded.inc
|
||||
--source include/not_embedded.inc
|
||||
|
||||
connect (con1,localhost,root,,);
|
||||
connect (con2,localhost,root,,);
|
||||
|
@ -396,6 +396,8 @@ SELECT * FROM t2 WHERE id IN (SELECT 5 UNION SELECT 3);
|
||||
SELECT * FROM t2 WHERE id IN (SELECT 5 UNION SELECT 2);
|
||||
-- error 1093
|
||||
INSERT INTO t2 VALUES ((SELECT * FROM t2));
|
||||
-- error 1093
|
||||
INSERT INTO t2 VALUES ((SELECT id FROM t2));
|
||||
SELECT * FROM t2;
|
||||
CREATE TABLE t1 (id int(11) default NULL, KEY id (id)) TYPE=MyISAM CHARSET=latin1;
|
||||
INSERT INTO t1 values (1),(1);
|
||||
|
Reference in New Issue
Block a user