Commit ab6059c8 authored by unknown's avatar unknown
Browse files

Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0

into moonbone.local:/work/tmp_merge-5.0-opt-mysql

parents 23467331 37511b3b
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -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
+13 −0
Original line number Diff line number Diff line
@@ -747,6 +747,19 @@ select count(id1) from t1 where id2 = 10;
count(id1)
5
drop table t1;
CREATE TABLE t1(a TINYINT, KEY(a)) ENGINE=MyISAM;
INSERT INTO t1 VALUES(1);
SELECT MAX(a) FROM t1 IGNORE INDEX(a);
MAX(a)
1
ALTER TABLE t1 DISABLE KEYS;
SELECT MAX(a) FROM t1;
MAX(a)
1
SELECT MAX(a) FROM t1 IGNORE INDEX(a);
MAX(a)
1
DROP TABLE t1;
CREATE TABLE t1(a CHAR(9), b VARCHAR(7)) ENGINE=MyISAM;
INSERT INTO t1(a) VALUES('xxxxxxxxx'),('xxxxxxxxx');
UPDATE t1 AS ta1,t1 AS ta2 SET ta1.b='aaaaaa',ta2.b='bbbbbb';
+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;
+4 −2
Original line number Diff line number Diff line
@@ -392,8 +392,10 @@ drop table t1;
# Bug #16546
# 

select now() - now() + 0, curtime() - curtime() + 0, 
create table t1 select now() - now(), curtime() - curtime(), 
                       sec_to_time(1) + 0, from_unixtime(1) + 0;
show create table t1;
drop table t1;

# End of 4.1 tests

+12 −0
Original line number Diff line number Diff line
@@ -697,6 +697,18 @@ select count(*) from t1 where id2 = 10;
select count(id1) from t1 where id2 = 10;
drop table t1;

#
# BUG##20357 - Got error 124 from storage engine using MIN and MAX functions
#              in queries
#
CREATE TABLE t1(a TINYINT, KEY(a)) ENGINE=MyISAM;
INSERT INTO t1 VALUES(1);
SELECT MAX(a) FROM t1 IGNORE INDEX(a);
ALTER TABLE t1 DISABLE KEYS;
SELECT MAX(a) FROM t1;
SELECT MAX(a) FROM t1 IGNORE INDEX(a);
DROP TABLE t1;

#
# BUG#18036 - update of table joined to self reports table as crashed
#
Loading