Commit db56447b authored by unknown's avatar unknown
Browse files

Merge bk-internal.mysql.com:/data0/bk/mysql-5.0

into  bk-internal.mysql.com:/data0/bk/mysql-5.0-kt

parents 7070c9c1 a1ea1025
Loading
Loading
Loading
Loading
+0 −29
Original line number Diff line number Diff line
@@ -202,35 +202,6 @@ select count(*) from t1 where id not in (1,2);
count(*)
1
drop table t1;
create table t1 (f1 char(1), f2 int);
insert into t1 values (1,0),('a',1),('z',2);
select f1 from t1 where f1 in (1,'z');
f1
1
z
select f2 from t1 where f2 in (1,'z');
f2
0
1
Warnings:
Warning	1292	Truncated incorrect INTEGER value: 'z'
select f1 from t1 where 'z' in (1,f1);
f1
z
select * from t1 where 'z' in (f2,f1);
f1	f2
1	0
a	1
z	2
Warnings:
Warning	1292	Truncated incorrect DOUBLE value: 'z'
Warning	1292	Truncated incorrect DOUBLE value: 'z'
Warning	1292	Truncated incorrect DOUBLE value: 'z'
select * from t1 where 1 in (f2,f1);
f1	f2
1	0
a	1
drop table t1;
CREATE TABLE t1 (a int PRIMARY KEY);
INSERT INTO t1 VALUES (44), (45), (46);
SELECT * FROM t1 WHERE a IN (45);
+12 −5
Original line number Diff line number Diff line
@@ -785,8 +785,8 @@ select f1 from t1 where "2006-1-1" between f1 and 'zzz';
f1
Warnings:
Warning	1292	Incorrect date value: 'zzz' for column 'f1' at row 1
Warning	1292	Truncated incorrect INTEGER value: 'zzz'
Warning	1292	Truncated incorrect INTEGER value: 'zzz'
Warning	1292	Truncated incorrect DOUBLE value: 'zzz'
Warning	1292	Truncated incorrect DOUBLE value: 'zzz'
select f1 from t1 where makedate(2006,1) between date(f1) and date(f3);
f1
2006-01-01
@@ -794,10 +794,17 @@ select f1 from t1 where makedate(2006,2) between date(f1) and date(f3);
f1
2006-01-02
drop table t1;
select now() - now() + 0, curtime() - curtime() + 0, 
create table t1 select now() - now(), curtime() - curtime(), 
sec_to_time(1) + 0, from_unixtime(1) + 0;
now() - now() + 0	curtime() - curtime() + 0	sec_to_time(1) + 0	from_unixtime(1) + 0
0.000000	0.000000	1.000000	19700101030001.000000
show create table t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `now() - now()` double(23,6) NOT NULL default '0.000000',
  `curtime() - curtime()` double(23,6) NOT NULL default '0.000000',
  `sec_to_time(1) + 0` double(23,6) default NULL,
  `from_unixtime(1) + 0` double(23,6) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
explain extended select timestampdiff(SQL_TSI_WEEK, '2001-02-01', '2001-05-01') as a1,
timestampdiff(SQL_TSI_FRAC_SECOND, '2001-02-01 12:59:59.120000', '2001-05-01 12:58:58.119999') as a2;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+4 −0
Original line number Diff line number Diff line
@@ -686,3 +686,7 @@ ERROR 42S22: Unknown column 'z' in 'field list'
insert into t1(x,y) select x,z from t2 on duplicate key update x=values(t2.x);
ERROR 42S22: Unknown column 't2.x' in 'field list'
drop table t1,t2;
CREATE TABLE t1 (a int PRIMARY KEY);
INSERT INTO t1 values (1), (2);
INSERT INTO t1 SELECT a + 2 FROM t1 LIMIT 1;
DROP TABLE t1;
+6 −0
Original line number Diff line number Diff line
@@ -67,3 +67,9 @@ Select_priv
N
use test;
use test;
create table t1 (f1 int(12) unsigned not null auto_increment, primary key(f1)) engine=innodb;
lock tables t1 write;
 alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; //
 alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; //
unlock tables;
drop table t1;
+22 −1
Original line number Diff line number Diff line
drop table if exists t1;
drop table if exists t1,t2;
CREATE TABLE t1 (
gesuchnr int(11) DEFAULT '0' NOT NULL,
benutzer_id int(11) DEFAULT '0' NOT NULL,
@@ -31,3 +31,24 @@ SELECT * from t1 ORDER BY i;
i	j	k
3	1	42
17	2	24
CREATE TABLE t2 (a INT(11) NOT NULL,
b INT(11) NOT NULL,
c INT(11) NOT NULL,
x TEXT,
y TEXT,
z TEXT,
id INT(10) unsigned NOT NULL AUTO_INCREMENT,
i INT(11) DEFAULT NULL,
PRIMARY KEY (id),
UNIQUE KEY a (a,b,c)
) ENGINE=ndbcluster;
REPLACE INTO t2 (a,b,c,x,y,z,i) VALUES (1,1,1,'a','a','a',1),(1,1,1,'b','b','b',2), (1,1,1,'c','c','c',3);
SELECT * FROM t2 ORDER BY id;
a	b	c	x	y	z	id	i
1	1	1	c	c	c	3	3
REPLACE INTO t2(a,b,c,x,y,z,i) values (1,1,1,'a','a','a',1);
REPLACE INTO t2(a,b,c,x,y,z,i) values (1,1,1,'b','b','b',2);
SELECT * FROM t2 ORDER BY id;
a	b	c	x	y	z	id	i
1	1	1	b	b	b	5	2
DROP TABLE t2;
Loading