mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 19:37:16 +02:00
Merge with 4.0.13
This commit is contained in:
commit
40109c574a
61 changed files with 1150 additions and 336 deletions
|
|
@ -276,3 +276,8 @@ t1 0 a 1 a A 3 NULL NULL YES BTREE
|
|||
t1 0 a 2 b A 300 NULL NULL YES BTREE
|
||||
t1 1 b 1 b A 100 NULL NULL YES BTREE
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (i int(10), index(i) );
|
||||
ALTER TABLE t1 DISABLE KEYS;
|
||||
INSERT DELAYED INTO t1 VALUES(1),(2),(3);
|
||||
ALTER TABLE t1 ENABLE KEYS;
|
||||
drop table t1;
|
||||
|
|
|
|||
2
mysql-test/r/have_mest_timezone.require
Normal file
2
mysql-test/r/have_mest_timezone.require
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
Variable_name Value
|
||||
timezone MEST
|
||||
|
|
@ -65,3 +65,15 @@ INSERT INTO t1 (numeropost,icone,contenu,pseudo,date,signature,ip)
|
|||
SELECT 1718,icone,contenu,pseudo,date,signature,ip FROM t2
|
||||
WHERE numeropost=9 ORDER BY numreponse ASC;
|
||||
DROP TABLE IF EXISTS t1,t2;
|
||||
create table t1(a int, unique(a));
|
||||
insert into t1 values(2);
|
||||
create table t2(a int);
|
||||
insert into t2 values(1),(2);
|
||||
reset master;
|
||||
insert into t1 select * from t2;
|
||||
Duplicate entry '2' for key 1
|
||||
show binlog events;
|
||||
Log_name Pos Event_type Server_id Orig_log_pos Info
|
||||
master-bin.001 4 Start 1 4 Server ver: VERSION, Binlog ver: 3
|
||||
master-bin.001 79 Query 1 79 use test; insert into t1 select * from t2
|
||||
drop table t1, t2;
|
||||
|
|
|
|||
|
|
@ -15,4 +15,11 @@ a b c d
|
|||
0000-00-00 0000-00-00 0000-00-00 0000-00-00
|
||||
2003-03-03 2003-03-03 2003-03-03 NULL
|
||||
2003-03-03 2003-03-03 2003-03-03 NULL
|
||||
truncate table t1;
|
||||
load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',' LINES STARTING BY ',' (b,c,d);
|
||||
SELECT * from t1;
|
||||
a b c d
|
||||
NULL NULL 0000-00-00 0000-00-00
|
||||
NULL 0000-00-00 0000-00-00 0000-00-00
|
||||
NULL 2003-03-03 2003-03-03 NULL
|
||||
drop table t1;
|
||||
|
|
|
|||
|
|
@ -13,3 +13,15 @@ show tables like 't_';
|
|||
Tables_in_test (t_)
|
||||
t3
|
||||
drop table t3;
|
||||
create table t1 (a int);
|
||||
select count(*) from T1;
|
||||
count(*)
|
||||
0
|
||||
select count(*) from t1;
|
||||
count(*)
|
||||
0
|
||||
select count(T1.a) from t1;
|
||||
Unknown table 'T1' in field list
|
||||
select count(bags.a) from t1 as Bags;
|
||||
Unknown table 'bags' in field list
|
||||
drop table t1;
|
||||
|
|
|
|||
|
|
@ -502,6 +502,7 @@ drop table t1;
|
|||
show status like "Qcache_queries_in_cache";
|
||||
Variable_name Value
|
||||
Qcache_queries_in_cache 0
|
||||
create table t1 (a int);
|
||||
show global variables like "query_cache_min_res_unit";
|
||||
Variable_name Value
|
||||
query_cache_min_res_unit 4096
|
||||
|
|
@ -565,18 +566,57 @@ set GLOBAL query_cache_size=1000;
|
|||
show global variables like "query_cache_size";
|
||||
Variable_name Value
|
||||
query_cache_size 0
|
||||
set GLOBAL query_cache_size=1100;
|
||||
set GLOBAL query_cache_size=1200;
|
||||
set GLOBAL query_cache_size=1300;
|
||||
set GLOBAL query_cache_size=1400;
|
||||
set GLOBAL query_cache_size=1500;
|
||||
set GLOBAL query_cache_size=1600;
|
||||
set GLOBAL query_cache_size=1700;
|
||||
set GLOBAL query_cache_size=1800;
|
||||
set GLOBAL query_cache_size=1900;
|
||||
select * from t1;
|
||||
a
|
||||
set GLOBAL query_cache_size=1024;
|
||||
show global variables like "query_cache_size";
|
||||
Variable_name Value
|
||||
query_cache_size 1024
|
||||
query_cache_size 0
|
||||
select * from t1;
|
||||
a
|
||||
set GLOBAL query_cache_size=10240;
|
||||
show global variables like "query_cache_size";
|
||||
Variable_name Value
|
||||
query_cache_size 0
|
||||
select * from t1;
|
||||
a
|
||||
set GLOBAL query_cache_size=20480;
|
||||
show global variables like "query_cache_size";
|
||||
Variable_name Value
|
||||
query_cache_size 0
|
||||
select * from t1;
|
||||
a
|
||||
set GLOBAL query_cache_size=40960;
|
||||
show global variables like "query_cache_size";
|
||||
Variable_name Value
|
||||
query_cache_size 0
|
||||
select * from t1;
|
||||
a
|
||||
set GLOBAL query_cache_size=51200;
|
||||
show global variables like "query_cache_size";
|
||||
Variable_name Value
|
||||
query_cache_size 51200
|
||||
select * from t1;
|
||||
a
|
||||
set GLOBAL query_cache_size=61440;
|
||||
show global variables like "query_cache_size";
|
||||
Variable_name Value
|
||||
query_cache_size 61440
|
||||
select * from t1;
|
||||
a
|
||||
set GLOBAL query_cache_size=81920;
|
||||
show global variables like "query_cache_size";
|
||||
Variable_name Value
|
||||
query_cache_size 81920
|
||||
select * from t1;
|
||||
a
|
||||
set GLOBAL query_cache_size=102400;
|
||||
show global variables like "query_cache_size";
|
||||
Variable_name Value
|
||||
query_cache_size 102400
|
||||
select * from t1;
|
||||
a
|
||||
drop table t1;
|
||||
set GLOBAL query_cache_size=1048576;
|
||||
create table t1 (i int not null);
|
||||
create table t2 (i int not null);
|
||||
|
|
|
|||
|
|
@ -22,10 +22,12 @@ drop table t1;
|
|||
drop table t2;
|
||||
create table t1(a int auto_increment, key(a));
|
||||
create table t2(b int auto_increment, c int, key(b));
|
||||
SET FOREIGN_KEY_CHECKS=0;
|
||||
insert into t1 values (10);
|
||||
insert into t1 values (null),(null),(null);
|
||||
insert into t2 values (5,0);
|
||||
insert into t2 values (null,last_insert_id());
|
||||
SET FOREIGN_KEY_CHECKS=1;
|
||||
select * from t1;
|
||||
a
|
||||
10
|
||||
|
|
@ -38,3 +40,31 @@ b c
|
|||
6 11
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
create table t1(a int auto_increment, key(a));
|
||||
create table t2(b int auto_increment, c int, key(b));
|
||||
insert into t1 values (10);
|
||||
insert into t1 values (null),(null),(null);
|
||||
insert into t2 values (5,0);
|
||||
insert into t2 (c) select * from t1;
|
||||
select * from t2;
|
||||
b c
|
||||
5 0
|
||||
6 10
|
||||
7 11
|
||||
8 12
|
||||
9 13
|
||||
select * from t1;
|
||||
a
|
||||
10
|
||||
11
|
||||
12
|
||||
13
|
||||
select * from t2;
|
||||
b c
|
||||
5 0
|
||||
6 10
|
||||
7 11
|
||||
8 12
|
||||
9 13
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
|
|
|
|||
25
mysql-test/r/timezone.result
Normal file
25
mysql-test/r/timezone.result
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (ts int);
|
||||
INSERT INTO t1 (ts) VALUES (Unix_timestamp('2002-10-27 01:00'));
|
||||
INSERT INTO t1 (ts) VALUES (Unix_timestamp('2002-10-27 02:00'));
|
||||
INSERT INTO t1 (ts) VALUES (Unix_timestamp('2002-10-27 03:00'));
|
||||
INSERT INTO t1 (ts) VALUES (Unix_timestamp('2002-10-27 02:00'));
|
||||
INSERT INTO t1 (ts) VALUES (Unix_timestamp('2002-10-27 01:00'));
|
||||
INSERT INTO t1 (ts) VALUES (Unix_timestamp('2002-10-27 02:00'));
|
||||
INSERT INTO t1 (ts) VALUES (Unix_timestamp('2003-03-30 02:59:59'));
|
||||
INSERT INTO t1 (ts) VALUES (Unix_timestamp('2003-03-30 03:00:00'));
|
||||
INSERT INTO t1 (ts) VALUES (Unix_timestamp('2003-03-30 03:59:59'));
|
||||
INSERT INTO t1 (ts) VALUES (Unix_timestamp('2003-03-30 04:00:01'));
|
||||
SELECT ts,from_unixtime(ts) FROM t1;
|
||||
ts from_unixtime(ts)
|
||||
1035673200 2002-10-27 01:00:00
|
||||
1035680400 2002-10-27 02:00:00
|
||||
1035684000 2002-10-27 03:00:00
|
||||
1035680400 2002-10-27 02:00:00
|
||||
1035673200 2002-10-27 01:00:00
|
||||
1035680400 2002-10-27 02:00:00
|
||||
1048986000 2003-03-30 03:00:00
|
||||
1048986000 2003-03-30 03:00:00
|
||||
1048989599 2003-03-30 03:59:59
|
||||
1048989601 2003-03-30 04:00:01
|
||||
DROP TABLE t1;
|
||||
Loading…
Add table
Add a link
Reference in a new issue