summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <jani@a193-229-222-105.elisa-laajakaista.fi>2005-09-12 20:18:49 +0300
committerunknown <jani@a193-229-222-105.elisa-laajakaista.fi>2005-09-12 20:18:49 +0300
commit8c3423652deeaeae02261ecd12cb5428db4072bc (patch)
treecc28287d4e3a1d922ebc277929fd7e9d0ff264fa /mysql-test
parent4efcca023b47e9d8fff148da2c65254ddbee6c9b (diff)
parent17233698fcf91f482419ece675f2d747fae9f501 (diff)
downloadmariadb-git-8c3423652deeaeae02261ecd12cb5428db4072bc.tar.gz
Merge a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-4.1
into a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-5.0 mysql-test/r/temp_table.result: Auto merged mysql-test/r/warnings.result: Auto merged sql/sql_db.cc: Auto merged client/mysqltest.c: Auto merged mysql-test/t/innodb.test: Auto merged sql/filesort.cc: Auto merged sql/sql_select.cc: Auto merged mysql-test/r/create.result: Merged from 4.1 to 5.0 mysql-test/r/innodb.result: Merged from 4.1 to 5.0 mysql-test/t/create.test: Merged from 4.1 to 5.0 sql/item_cmpfunc.cc: Merged from 4.1 to 5.0 sql/sql_table.cc: Merged from 4.1 to 5.0
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/create.result25
-rw-r--r--mysql-test/r/innodb.result11
-rw-r--r--mysql-test/r/temp_table.result2
-rw-r--r--mysql-test/r/warnings.result4
-rw-r--r--mysql-test/t/create.test12
-rw-r--r--mysql-test/t/innodb.test10
6 files changed, 63 insertions, 1 deletions
diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result
index e1e66019f65..a463fb309f9 100644
--- a/mysql-test/r/create.result
+++ b/mysql-test/r/create.result
@@ -9,6 +9,8 @@ NULL
drop table if exists t1;
create table t1 (b char(0) not null);
create table if not exists t1 (b char(0) not null);
+Warnings:
+Note 1050 Table 't1' already exists
insert into t1 values (""),(null);
Warnings:
Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'b' at row 2
@@ -244,9 +246,13 @@ create table t1 select x'4132';
drop table t1;
create table t1 select 1,2,3;
create table if not exists t1 select 1,2;
+Warnings:
+Note 1050 Table 't1' already exists
create table if not exists t1 select 1,2,3,4;
ERROR 21S01: Column count doesn't match value count at row 1
create table if not exists t1 select 1;
+Warnings:
+Note 1050 Table 't1' already exists
select * from t1;
1 2 3
1 2 3
@@ -255,9 +261,13 @@ select * from t1;
drop table t1;
create table t1 select 1,2,3;
create table if not exists t1 select 1,2;
+Warnings:
+Note 1050 Table 't1' already exists
create table if not exists t1 select 1,2,3,4;
ERROR 21S01: Column count doesn't match value count at row 1
create table if not exists t1 select 1;
+Warnings:
+Note 1050 Table 't1' already exists
select * from t1;
1 2 3
1 2 3
@@ -269,6 +279,7 @@ insert into t1 values (1,1);
create table if not exists t1 select 2;
Warnings:
Warning 1364 Field 'a' doesn't have a default value
+Note 1050 Table 't1' already exists
select * from t1;
a b
1 1
@@ -276,6 +287,7 @@ a b
create table if not exists t1 select 3 as 'a',4 as 'b';
Warnings:
Warning 1364 Field 'a' doesn't have a default value
+Note 1050 Table 't1' already exists
create table if not exists t1 select 3 as 'a',3 as 'b';
ERROR 23000: Duplicate entry '3' for key 1
select * from t1;
@@ -609,6 +621,19 @@ create table test.t1 like x;
ERROR 42000: Incorrect database name 'NULL'
drop table if exists test.t1;
create database mysqltest;
+create database if not exists mysqltest character set latin2;
+Warnings:
+Note 1007 Can't create database 'mysqltest'; database exists
+show create database mysqltest;
+Database Create Database
+mysqltest CREATE DATABASE `mysqltest` /*!40100 DEFAULT CHARACTER SET latin1 */
+drop database mysqltest;
+use test;
+create table t1 (a int);
+create table if not exists t1 (a int);
+Warnings:
+Note 1050 Table 't1' already exists
+drop table t1;
use mysqltest;
create view v1 as select 'foo' from dual;
create table t1 like v1;
diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result
index cc074c8ebf5..21397fade5d 100644
--- a/mysql-test/r/innodb.result
+++ b/mysql-test/r/innodb.result
@@ -1719,6 +1719,17 @@ select * from t1;
a
42
drop table t1;
+create table t1 (a int not null, b int not null, c blob not null, d int not null, e int, primary key (a,b,c(255),d)) engine=innodb;
+insert into t1 values (2,2,"b",2,2),(1,1,"a",1,1),(3,3,"ab",3,3);
+select * from t1 order by a,b,c,d;
+a b c d e
+1 1 a 1 1
+2 2 b 2 2
+3 3 ab 3 3
+explain select * from t1 order by a,b,c,d;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using filesort
+drop table t1;
create table t1 (x bigint unsigned not null primary key) engine=innodb;
insert into t1(x) values (0xfffffffffffffff0),(0xfffffffffffffff1);
select * from t1;
diff --git a/mysql-test/r/temp_table.result b/mysql-test/r/temp_table.result
index 081bd35622e..1b7e3927adb 100644
--- a/mysql-test/r/temp_table.result
+++ b/mysql-test/r/temp_table.result
@@ -23,6 +23,8 @@ a b
6 g
create TEMPORARY TABLE t2 engine=heap select * from t1;
create TEMPORARY TABLE IF NOT EXISTS t2 (a int) engine=heap;
+Warnings:
+Note 1050 Table 't2' already exists
CREATE TEMPORARY TABLE t1 (a int not null, b char (10) not null);
ERROR 42S01: Table 't1' already exists
ALTER TABLE t1 RENAME t2;
diff --git a/mysql-test/r/warnings.result b/mysql-test/r/warnings.result
index fd516996ae8..d8329e446ac 100644
--- a/mysql-test/r/warnings.result
+++ b/mysql-test/r/warnings.result
@@ -63,9 +63,11 @@ show count(*) warnings;
1
create table t1(id int);
create table if not exists t1(id int);
+Warnings:
+Note 1050 Table 't1' already exists
select @@warning_count;
@@warning_count
-0
+1
drop table t1;
create table t1(a tinyint, b int not null, c date, d char(5));
load data infile '../../std_data/warnings_loaddata.dat' into table t1 fields terminated by ',';
diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test
index 450bcd0344a..b72dc49e89a 100644
--- a/mysql-test/t/create.test
+++ b/mysql-test/t/create.test
@@ -533,4 +533,16 @@ create view v1 as select 'foo' from dual;
create table t1 like v1;
drop view v1;
drop database mysqltest;
+# Bug #6008 MySQL does not create warnings when
+# creating database and using IF NOT EXISTS
+#
+create database mysqltest;
+create database if not exists mysqltest character set latin2;
+show create database mysqltest;
+drop database mysqltest;
+use test;
+create table t1 (a int);
+create table if not exists t1 (a int);
+drop table t1;
+
# End of 4.1 tests
diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test
index 7d449ac9261..ed238f46e0b 100644
--- a/mysql-test/t/innodb.test
+++ b/mysql-test/t/innodb.test
@@ -1249,6 +1249,16 @@ insert into t1 values (42);
select * from t1;
drop table t1;
+#
+# Bug #13025 Server crash during filesort
+#
+
+create table t1 (a int not null, b int not null, c blob not null, d int not null, e int, primary key (a,b,c(255),d)) engine=innodb;
+insert into t1 values (2,2,"b",2,2),(1,1,"a",1,1),(3,3,"ab",3,3);
+select * from t1 order by a,b,c,d;
+explain select * from t1 order by a,b,c,d;
+drop table t1;
+
# End of 4.1 tests
#