mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Merge mysql.com:/home/bk/mysql-5.0 into mysql.com:/home/bk/mysql-5.1
BitKeeper/etc/logging_ok: auto-union configure.in: Auto merged BUILD/FINISH.sh: Auto merged BUILD/compile-dist: Auto merged sql/ha_innodb.cc: Auto merged sql/ha_ndbcluster.cc: Auto merged sql/item.cc: Auto merged sql/log.cc: Auto merged sql/mysql_priv.h: Auto merged sql/mysqld.cc: Auto merged sql/sql_acl.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_select.cc: Auto merged storage/ndb/src/cw/cpcd/Process.cpp: Auto merged storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp: Auto merged storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp: Auto merged storage/ndb/src/kernel/error/ErrorReporter.cpp: Auto merged storage/ndb/src/ndbapi/Ndb.cpp: Auto merged
This commit is contained in:
@ -5,3 +5,12 @@ insert into t1 values (200000);
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
drop table t1;
|
||||
Create table t1(f1 int);
|
||||
Create table t2(f1 int);
|
||||
Create view v1 as Select * from t1;
|
||||
Check Table v1,t2;
|
||||
Table Op Msg_type Msg_text
|
||||
test.v1 check status OK
|
||||
test.t2 check status OK
|
||||
drop view v1;
|
||||
drop table t1, t2;
|
||||
|
@ -429,7 +429,7 @@ explain t2;
|
||||
Field Type Null Key Default Extra
|
||||
a int(11) YES NULL
|
||||
b bigint(11) NO 0
|
||||
c bigint(10) NO 0
|
||||
c bigint(11) NO 0
|
||||
d date YES NULL
|
||||
e varchar(1) NO
|
||||
f datetime YES NULL
|
||||
@ -448,11 +448,11 @@ Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`ifnull(a,a)` tinyint(4) default NULL,
|
||||
`ifnull(b,b)` smallint(6) default NULL,
|
||||
`ifnull(c,c)` mediumint(9) default NULL,
|
||||
`ifnull(c,c)` mediumint(8) default NULL,
|
||||
`ifnull(d,d)` int(11) default NULL,
|
||||
`ifnull(e,e)` bigint(20) default NULL,
|
||||
`ifnull(f,f)` float(3,2) default NULL,
|
||||
`ifnull(g,g)` double(4,3) default NULL,
|
||||
`ifnull(f,f)` float(24,2) default NULL,
|
||||
`ifnull(g,g)` double(53,3) default NULL,
|
||||
`ifnull(h,h)` decimal(5,4) default NULL,
|
||||
`ifnull(i,i)` year(4) default NULL,
|
||||
`ifnull(j,j)` date default NULL,
|
||||
@ -568,3 +568,14 @@ NULL 1
|
||||
Test 0
|
||||
NULL 1
|
||||
drop table t1, t2, t3;
|
||||
create table t1 (b bool not null default false);
|
||||
create table t2 (b bool not null default true);
|
||||
insert into t1 values ();
|
||||
insert into t2 values ();
|
||||
select * from t1;
|
||||
b
|
||||
0
|
||||
select * from t2;
|
||||
b
|
||||
1
|
||||
drop table t1,t2;
|
||||
|
Binary file not shown.
@ -3,10 +3,12 @@ Variable_name Value
|
||||
skip_show_database OFF
|
||||
grant select, update, execute on test.* to mysqltest_2@localhost;
|
||||
grant select, update on test.* to mysqltest_1@localhost;
|
||||
create user mysqltest_3@localhost;
|
||||
create user mysqltest_3;
|
||||
select * from information_schema.SCHEMATA where schema_name > 'm';
|
||||
CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME SQL_PATH
|
||||
NULL mysql latin1 NULL
|
||||
NULL test latin1 NULL
|
||||
CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
|
||||
NULL mysql latin1 latin1_swedish_ci NULL
|
||||
NULL test latin1 latin1_swedish_ci NULL
|
||||
select schema_name from information_schema.schemata;
|
||||
schema_name
|
||||
information_schema
|
||||
@ -154,7 +156,9 @@ NULL mysqltest t1 a 1 NULL YES int NULL NULL 11 0 NULL NULL int(11) select,ins
|
||||
show columns from mysqltest.t1 where field like "%a%";
|
||||
Field Type Null Key Default Extra
|
||||
a int(11) YES NULL
|
||||
create view mysqltest.v1 (c) as select a from mysqltest.t1;
|
||||
grant select (a) on mysqltest.t1 to mysqltest_2@localhost;
|
||||
grant select on mysqltest.v1 to mysqltest_3;
|
||||
select table_name, column_name, privileges from information_schema.columns
|
||||
where table_schema = 'mysqltest' and table_name = 't1';
|
||||
table_name column_name privileges
|
||||
@ -163,7 +167,11 @@ show columns from mysqltest.t1;
|
||||
Field Type Null Key Default Extra
|
||||
a int(11) YES NULL
|
||||
b varchar(30) YES MUL NULL
|
||||
drop view v1;
|
||||
select table_name, column_name, privileges from information_schema.columns
|
||||
where table_schema = 'mysqltest' and table_name = 'v1';
|
||||
table_name column_name privileges
|
||||
v1 c select
|
||||
drop view v1, mysqltest.v1;
|
||||
drop tables mysqltest.t4, mysqltest.t1, t2, t3;
|
||||
drop database mysqltest;
|
||||
select * from information_schema.CHARACTER_SETS
|
||||
@ -376,10 +384,10 @@ GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRAN
|
||||
'mysqltest_1'@'localhost' NULL test t1 a INSERT NO
|
||||
'mysqltest_1'@'localhost' NULL test t1 a UPDATE NO
|
||||
'mysqltest_1'@'localhost' NULL test t1 a REFERENCES NO
|
||||
delete from mysql.user where user='mysqltest_1' or user='mysqltest_2';
|
||||
delete from mysql.db where user='mysqltest_1' or user='mysqltest_2';
|
||||
delete from mysql.tables_priv where user='mysqltest_1' or user='mysqltest_2';
|
||||
delete from mysql.columns_priv where user='mysqltest_1' or user='mysqltest_2';
|
||||
delete from mysql.user where user like 'mysqltest%';
|
||||
delete from mysql.db where user like 'mysqltest%';
|
||||
delete from mysql.tables_priv where user like 'mysqltest%';
|
||||
delete from mysql.columns_priv where user like 'mysqltest%';
|
||||
flush privileges;
|
||||
drop table t1;
|
||||
create table t1 (a int null, primary key(a));
|
||||
@ -726,3 +734,17 @@ x_real NULL NULL
|
||||
x_float NULL NULL
|
||||
x_double_precision NULL NULL
|
||||
drop table t1;
|
||||
create user mysqltest_4@localhost;
|
||||
SELECT TABLE_NAME, COLUMN_NAME, PRIVILEGES FROM INFORMATION_SCHEMA.COLUMNS
|
||||
where COLUMN_NAME='TABLE_NAME';
|
||||
TABLE_NAME COLUMN_NAME PRIVILEGES
|
||||
TABLES TABLE_NAME select
|
||||
COLUMNS TABLE_NAME select
|
||||
STATISTICS TABLE_NAME select
|
||||
VIEWS TABLE_NAME select
|
||||
TABLE_PRIVILEGES TABLE_NAME select
|
||||
COLUMN_PRIVILEGES TABLE_NAME select
|
||||
TABLE_CONSTRAINTS TABLE_NAME select
|
||||
KEY_COLUMN_USAGE TABLE_NAME select
|
||||
delete from mysql.user where user='mysqltest_4';
|
||||
flush privileges;
|
||||
|
@ -2391,3 +2391,9 @@ drop table t1;
|
||||
set storage_engine=MyISAM;
|
||||
create table t1 (v varchar(16384)) engine=innodb;
|
||||
drop table t1;
|
||||
create table t1(a int(1) , b int(1)) engine=innodb;
|
||||
insert into t1 values ('1111', '3333');
|
||||
select distinct concat(a, b) from t1;
|
||||
concat(a, b)
|
||||
11113333
|
||||
drop table t1;
|
||||
|
@ -167,3 +167,16 @@ a b c VALUES(a)
|
||||
2 1 11 NULL
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
create table t1 (a int not null unique);
|
||||
insert into t1 values (1),(2);
|
||||
insert ignore into t1 select 1 on duplicate key update a=2;
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
2
|
||||
insert ignore into t1 select a from t1 on duplicate key update a=a+1 ;
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
3
|
||||
drop table t1;
|
||||
|
@ -2455,3 +2455,24 @@ a
|
||||
select x.a, y.a, z.a from ( (t1 x inner join t2 y on x.a=y.a) inner join t2 z on y.a=z.a) WHERE x.a=1;
|
||||
a a a
|
||||
drop table t1,t2;
|
||||
create table t1 (s1 varchar(5));
|
||||
insert into t1 values ('Wall');
|
||||
select min(s1) from t1 group by s1 with rollup;
|
||||
min(s1)
|
||||
Wall
|
||||
Wall
|
||||
drop table t1;
|
||||
create table t1 (s1 int) engine=myisam;
|
||||
insert into t1 values (0);
|
||||
select avg(distinct s1) from t1 group by s1 with rollup;
|
||||
avg(distinct s1)
|
||||
0.0000
|
||||
0.0000
|
||||
drop table t1;
|
||||
create table t1 (s1 int);
|
||||
insert into t1 values (null),(1);
|
||||
select distinct avg(s1) as x from t1 group by s1 with rollup;
|
||||
x
|
||||
NULL
|
||||
1.0000
|
||||
drop table t1;
|
||||
|
@ -1404,11 +1404,10 @@ show procedure status like '%p%'|
|
||||
Db Name Type Definer Modified Created Security_type Comment
|
||||
drop table if exists fib|
|
||||
create table fib ( f bigint unsigned not null )|
|
||||
insert into fib values (1), (1)|
|
||||
drop procedure if exists fib|
|
||||
create procedure fib(n int unsigned)
|
||||
begin
|
||||
if n > 0 then
|
||||
if n > 1 then
|
||||
begin
|
||||
declare x, y bigint unsigned;
|
||||
declare c cursor for select f from fib order by f desc limit 2;
|
||||
@ -1421,9 +1420,20 @@ call fib(n-1);
|
||||
end;
|
||||
end if;
|
||||
end|
|
||||
insert into fib values (0), (1)|
|
||||
call fib(3)|
|
||||
select * from fib order by f asc|
|
||||
f
|
||||
0
|
||||
1
|
||||
1
|
||||
2
|
||||
delete from fib|
|
||||
insert into fib values (0), (1)|
|
||||
call fib(20)|
|
||||
select * from fib order by f asc|
|
||||
f
|
||||
0
|
||||
1
|
||||
1
|
||||
2
|
||||
@ -1444,8 +1454,6 @@ f
|
||||
2584
|
||||
4181
|
||||
6765
|
||||
10946
|
||||
17711
|
||||
drop table fib|
|
||||
drop procedure fib|
|
||||
drop procedure if exists bar|
|
||||
|
@ -123,3 +123,12 @@ select * from t1;
|
||||
A
|
||||
This is view again
|
||||
drop view t1;
|
||||
create table t1 (a int, b int, index(a), index(b));
|
||||
create table t2 (c int auto_increment, d varchar(255), primary key (c));
|
||||
insert into t1 values (3,1),(3,2);
|
||||
insert into t2 values (NULL, 'foo'), (NULL, 'bar');
|
||||
select d, c from t1 left join t2 on b = c where a = 3 order by d;
|
||||
d c
|
||||
bar 2
|
||||
foo 1
|
||||
drop table t1, t2;
|
||||
|
@ -92,7 +92,7 @@ show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`col1` double default NULL,
|
||||
`col2` double(22,5) default NULL,
|
||||
`col2` double(53,5) default NULL,
|
||||
`col3` double default NULL,
|
||||
`col4` double default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
|
@ -846,3 +846,20 @@ set sql_mode='';
|
||||
select 0/0;
|
||||
0/0
|
||||
NULL
|
||||
select 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 as x;
|
||||
x
|
||||
999999999999999999999999999999999999999999999999999999999999999999999999999999999
|
||||
Warnings:
|
||||
Error 1292 Truncated incorrect DECIMAL value: ''
|
||||
select 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 + 1 as x;
|
||||
x
|
||||
NULL
|
||||
Warnings:
|
||||
Error 1292 Truncated incorrect DECIMAL value: ''
|
||||
Error 1292 Truncated incorrect DECIMAL value: ''
|
||||
select 0.190287977636363637 + 0.040372670 * 0 - 0;
|
||||
0.190287977636363637 + 0.040372670 * 0 - 0
|
||||
0.190287977636363637
|
||||
select -0.123 * 0;
|
||||
-0.123 * 0
|
||||
0.000
|
||||
|
@ -270,7 +270,7 @@ drop table t2;
|
||||
create table t2 (primary key (auto)) select auto+1 as auto,1 as t1, 'a' as t2, repeat('a',256) as t3, binary repeat('b',256) as t4, repeat('a',4096) as t5, binary repeat('b',4096) as t6, '' as t7, binary '' as t8 from t1;
|
||||
show full columns from t2;
|
||||
Field Type Collation Null Key Default Extra Privileges Comment
|
||||
auto int(6) unsigned NULL NO PRI 0 #
|
||||
auto bigint(12) unsigned NULL NO PRI 0 #
|
||||
t1 bigint(1) NULL NO 0 #
|
||||
t2 varchar(1) latin1_swedish_ci NO #
|
||||
t3 varchar(256) latin1_swedish_ci NO #
|
||||
|
@ -1296,6 +1296,8 @@ select fld1,fld3 from t2 where fld1 like "25050_";
|
||||
create table t3 engine=archive select * from t2;
|
||||
select * from t3 where fld3='bonfire';
|
||||
select count(*) from t3;
|
||||
# Clean up path in error message
|
||||
--replace_result $MYSQL_TEST_DIR . /var/master-data/ /
|
||||
rename table t3 to t4;
|
||||
select * from t4 where fld3='bonfire';
|
||||
select count(*) from t4;
|
||||
|
@ -22,3 +22,15 @@ connection con1;
|
||||
reap;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug #9897 Views: 'Check Table' crashes MySQL, with a view and a table
|
||||
# in the statement
|
||||
#
|
||||
|
||||
connection default;
|
||||
Create table t1(f1 int);
|
||||
Create table t2(f1 int);
|
||||
Create view v1 as Select * from t1;
|
||||
Check Table v1,t2;
|
||||
drop view v1;
|
||||
drop table t1, t2;
|
||||
|
@ -460,3 +460,14 @@ INSERT INTO t2 VALUES ('5000000001', 'proc01', '20031029090650', '2003-10-29 13:
|
||||
CREATE TABLE t3 SELECT t1.dsc,COUNT(DISTINCT t2.id) AS countOfRuns FROM t1 LEFT JOIN t2 ON (t1.id=t2.id) GROUP BY t1.id;
|
||||
SELECT * FROM t3;
|
||||
drop table t1, t2, t3;
|
||||
|
||||
#
|
||||
# Bug#9666: Can't use 'DEFAULT FALSE' for column of type bool
|
||||
#
|
||||
create table t1 (b bool not null default false);
|
||||
create table t2 (b bool not null default true);
|
||||
insert into t1 values ();
|
||||
insert into t2 values ();
|
||||
select * from t1;
|
||||
select * from t2;
|
||||
drop table t1,t2;
|
||||
|
@ -7,10 +7,6 @@ drop table if exists t1;
|
||||
|
||||
SET NAMES latin2;
|
||||
CREATE TABLE t1 (a char(1) character set latin2);
|
||||
INSERT INTO t1 VALUES (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07);
|
||||
INSERT INTO t1 VALUES (0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F);
|
||||
INSERT INTO t1 VALUES (0x10),(0x11),(0x12),(0x13),(0x14),(0x15),(0x16),(0x17);
|
||||
INSERT INTO t1 VALUES (0x18),(0x19),(0x1A),(0x1B),(0x1C),(0x1D),(0x1E),(0x1F);
|
||||
INSERT INTO t1 VALUES (0x20),(0x21),(0x22),(0x23),(0x24),(0x25),(0x26),(0x27);
|
||||
INSERT INTO t1 VALUES (0x28),(0x29),(0x2A),(0x2B),(0x2C),(0x2D),(0x2E),(0x2F);
|
||||
INSERT INTO t1 VALUES (0x30),(0x31),(0x32),(0x33),(0x34),(0x35),(0x36),(0x37);
|
||||
@ -45,3 +41,10 @@ INSERT INTO t1 VALUES (0xF8),(0xF9),(0xFA),(0xFB),(0xFC),(0xFD),(0xFE),(0xFF);
|
||||
#
|
||||
SELECT hex(a) ha, hex(lower(a)) hl, hex(upper(a)) hu,
|
||||
a, lower(a) l, upper(a) u from t1 order by ha;
|
||||
|
||||
|
||||
#
|
||||
# Bug#6505 wrong sorting order
|
||||
#
|
||||
SELECT group_concat(a collate latin2_croatian_ci order by binary a) from t1 group by a collate latin2_croatian_ci;
|
||||
drop table t1;
|
||||
|
@ -7,6 +7,9 @@
|
||||
show variables where variable_name like "skip_show_database";
|
||||
grant select, update, execute on test.* to mysqltest_2@localhost;
|
||||
grant select, update on test.* to mysqltest_1@localhost;
|
||||
create user mysqltest_3@localhost;
|
||||
create user mysqltest_3;
|
||||
|
||||
|
||||
select * from information_schema.SCHEMATA where schema_name > 'm';
|
||||
select schema_name from information_schema.schemata;
|
||||
@ -53,15 +56,21 @@ select * from information_schema.COLUMNS where table_name="t1"
|
||||
and column_name= "a";
|
||||
show columns from mysqltest.t1 where field like "%a%";
|
||||
|
||||
create view mysqltest.v1 (c) as select a from mysqltest.t1;
|
||||
grant select (a) on mysqltest.t1 to mysqltest_2@localhost;
|
||||
grant select on mysqltest.v1 to mysqltest_3;
|
||||
connect (user3,localhost,mysqltest_2,,);
|
||||
connection user3;
|
||||
select table_name, column_name, privileges from information_schema.columns
|
||||
where table_schema = 'mysqltest' and table_name = 't1';
|
||||
show columns from mysqltest.t1;
|
||||
connect (user4,localhost,mysqltest_3,,mysqltest);
|
||||
connection user4;
|
||||
select table_name, column_name, privileges from information_schema.columns
|
||||
where table_schema = 'mysqltest' and table_name = 'v1';
|
||||
connection default;
|
||||
|
||||
drop view v1;
|
||||
drop view v1, mysqltest.v1;
|
||||
drop tables mysqltest.t4, mysqltest.t1, t2, t3;
|
||||
drop database mysqltest;
|
||||
|
||||
@ -176,10 +185,10 @@ select * from information_schema.USER_PRIVILEGES where grantee like '%mysqltest_
|
||||
select * from information_schema.SCHEMA_PRIVILEGES where grantee like '%mysqltest_1%';
|
||||
select * from information_schema.TABLE_PRIVILEGES where grantee like '%mysqltest_1%';
|
||||
select * from information_schema.COLUMN_PRIVILEGES where grantee like '%mysqltest_1%';
|
||||
delete from mysql.user where user='mysqltest_1' or user='mysqltest_2';
|
||||
delete from mysql.db where user='mysqltest_1' or user='mysqltest_2';
|
||||
delete from mysql.tables_priv where user='mysqltest_1' or user='mysqltest_2';
|
||||
delete from mysql.columns_priv where user='mysqltest_1' or user='mysqltest_2';
|
||||
delete from mysql.user where user like 'mysqltest%';
|
||||
delete from mysql.db where user like 'mysqltest%';
|
||||
delete from mysql.tables_priv where user like 'mysqltest%';
|
||||
delete from mysql.columns_priv where user like 'mysqltest%';
|
||||
flush privileges;
|
||||
drop table t1;
|
||||
|
||||
@ -464,3 +473,16 @@ SELECT COLUMN_NAME, CHARACTER_MAXIMUM_LENGTH, CHARACTER_OCTET_LENGTH
|
||||
FROM INFORMATION_SCHEMA.COLUMNS
|
||||
WHERE TABLE_NAME= 't1';
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug#10261 INFORMATION_SCHEMA.COLUMNS, incomplete result for non root user
|
||||
#
|
||||
|
||||
create user mysqltest_4@localhost;
|
||||
connect (user4,localhost,mysqltest_4,,);
|
||||
connection user4;
|
||||
SELECT TABLE_NAME, COLUMN_NAME, PRIVILEGES FROM INFORMATION_SCHEMA.COLUMNS
|
||||
where COLUMN_NAME='TABLE_NAME';
|
||||
connection default;
|
||||
delete from mysql.user where user='mysqltest_4';
|
||||
flush privileges;
|
||||
|
@ -1300,3 +1300,12 @@ eval set storage_engine=$default;
|
||||
# InnoDB specific varchar tests
|
||||
create table t1 (v varchar(16384)) engine=innodb;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug #4082: integer truncation
|
||||
#
|
||||
|
||||
create table t1(a int(1) , b int(1)) engine=innodb;
|
||||
insert into t1 values ('1111', '3333');
|
||||
select distinct concat(a, b) from t1;
|
||||
drop table t1;
|
||||
|
@ -80,3 +80,15 @@ INSERT t1 SELECT a,b,c FROM t2 WHERE d=2 ON DUPLICATE KEY UPDATE c=c+VALUES(a);
|
||||
SELECT *, VALUES(a) FROM t1;
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
|
||||
#
|
||||
# Bug#9725 - "disapearing query/hang" and "unknown error" with "on duplicate key update"
|
||||
# INSERT INGORE...UPDATE gives bad error or breaks protocol.
|
||||
#
|
||||
create table t1 (a int not null unique);
|
||||
insert into t1 values (1),(2);
|
||||
insert ignore into t1 select 1 on duplicate key update a=2;
|
||||
select * from t1;
|
||||
insert ignore into t1 select a from t1 on duplicate key update a=a+1 ;
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
@ -2029,3 +2029,30 @@ select t1.a from (t1 inner join t2 on t1.a=t2.a) where t2.a=1;
|
||||
select t1.a from ((t1 inner join t2 on t1.a=t2.a)) where t2.a=1;
|
||||
select x.a, y.a, z.a from ( (t1 x inner join t2 y on x.a=y.a) inner join t2 z on y.a=z.a) WHERE x.a=1;
|
||||
drop table t1,t2;
|
||||
|
||||
#
|
||||
# Bug#9820
|
||||
#
|
||||
|
||||
create table t1 (s1 varchar(5));
|
||||
insert into t1 values ('Wall');
|
||||
select min(s1) from t1 group by s1 with rollup;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug#9799
|
||||
#
|
||||
|
||||
create table t1 (s1 int) engine=myisam;
|
||||
insert into t1 values (0);
|
||||
select avg(distinct s1) from t1 group by s1 with rollup;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug#9800
|
||||
#
|
||||
|
||||
create table t1 (s1 int);
|
||||
insert into t1 values (null),(1);
|
||||
select distinct avg(s1) as x from t1 group by s1 with rollup;
|
||||
drop table t1;
|
||||
|
@ -1634,8 +1634,6 @@ drop table if exists fib|
|
||||
--enable_warnings
|
||||
create table fib ( f bigint unsigned not null )|
|
||||
|
||||
insert into fib values (1), (1)|
|
||||
|
||||
# We deliberately do it the awkward way, fetching the last two
|
||||
# values from the table, in order to exercise various statements
|
||||
# and table accesses at each turn.
|
||||
@ -1644,7 +1642,7 @@ drop procedure if exists fib|
|
||||
--enable_warnings
|
||||
create procedure fib(n int unsigned)
|
||||
begin
|
||||
if n > 0 then
|
||||
if n > 1 then
|
||||
begin
|
||||
declare x, y bigint unsigned;
|
||||
declare c cursor for select f from fib order by f desc limit 2;
|
||||
@ -1659,6 +1657,20 @@ begin
|
||||
end if;
|
||||
end|
|
||||
|
||||
# Minimum test: recursion of 3 levels
|
||||
|
||||
insert into fib values (0), (1)|
|
||||
|
||||
call fib(3)|
|
||||
|
||||
select * from fib order by f asc|
|
||||
|
||||
delete from fib|
|
||||
|
||||
# Original test: 20 levels (may run into memory limits!)
|
||||
|
||||
insert into fib values (0), (1)|
|
||||
|
||||
call fib(20)|
|
||||
|
||||
select * from fib order by f asc|
|
||||
|
1
mysql-test/t/temp_table-master.opt
Normal file
1
mysql-test/t/temp_table-master.opt
Normal file
@ -0,0 +1 @@
|
||||
--tmpdir=$MYSQL_TEST_DIR/var//tmp
|
@ -104,3 +104,11 @@ drop table t1;
|
||||
select * from t1;
|
||||
drop view t1;
|
||||
|
||||
# Bug #8497: tmpdir with extra slashes would cause failures
|
||||
#
|
||||
create table t1 (a int, b int, index(a), index(b));
|
||||
create table t2 (c int auto_increment, d varchar(255), primary key (c));
|
||||
insert into t1 values (3,1),(3,2);
|
||||
insert into t2 values (NULL, 'foo'), (NULL, 'bar');
|
||||
select d, c from t1 left join t2 on b = c where a = 3 order by d;
|
||||
drop table t1, t2;
|
||||
|
@ -876,3 +876,19 @@ select 10.3330000000000/12.34500000;
|
||||
|
||||
set sql_mode='';
|
||||
select 0/0;
|
||||
|
||||
#
|
||||
# bug #9546
|
||||
#
|
||||
--disable_ps_protocol
|
||||
select 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 as x;
|
||||
select 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 + 1 as x;
|
||||
--enable_ps_protocol
|
||||
#
|
||||
# Bug #10004
|
||||
#
|
||||
select 0.190287977636363637 + 0.040372670 * 0 - 0;
|
||||
#
|
||||
# Bug #9527
|
||||
#
|
||||
select -0.123 * 0;
|
||||
|
Reference in New Issue
Block a user