diff options
author | unknown <joerg@mysql.com> | 2005-05-26 18:12:56 +0200 |
---|---|---|
committer | unknown <joerg@mysql.com> | 2005-05-26 18:12:56 +0200 |
commit | e3beea23a0f202866c293947a74fc6df092e5763 (patch) | |
tree | 56393e9df08f316d03246dd2022515284aa290c8 /mysql-test | |
parent | d4be3ae2a3ae1e89756763655044d41bd702cd44 (diff) | |
parent | df16d85926c6cdfe9b59bdf7b7b56e4f343ddec4 (diff) | |
download | mariadb-git-e3beea23a0f202866c293947a74fc6df092e5763.tar.gz |
Merge jbruehe@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/M50/mysql-5.0
sql/item.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/mysqldump.result | 38 | ||||
-rw-r--r-- | mysql-test/r/reserved_win_names.require | 2 | ||||
-rw-r--r-- | mysql-test/r/reserved_win_names.result | 7 | ||||
-rw-r--r-- | mysql-test/r/select.result | 6 | ||||
-rw-r--r-- | mysql-test/r/union.result | 29 | ||||
-rw-r--r-- | mysql-test/t/mysqldump.test | 9 | ||||
-rw-r--r-- | mysql-test/t/reserved_win_names.test | 12 | ||||
-rw-r--r-- | mysql-test/t/select.test | 9 | ||||
-rw-r--r-- | mysql-test/t/union.test | 15 |
9 files changed, 99 insertions, 28 deletions
diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result index 35d0df0c888..f73c9b223fd 100644 --- a/mysql-test/r/mysqldump.result +++ b/mysql-test/r/mysqldump.result @@ -1384,3 +1384,41 @@ UNLOCK TABLES; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; drop table t1; +CREATE TABLE t1 (a int); +INSERT INTO t1 VALUES (1),(2),(3); + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +/*!40000 DROP DATABASE IF EXISTS `test`*/; + +CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET latin1 */; + +USE `test`; +DROP TABLE IF EXISTS `t1`; +CREATE TABLE `t1` ( + `a` int(11) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1; + + +/*!40000 ALTER TABLE `t1` DISABLE KEYS */; +LOCK TABLES `t1` WRITE; +INSERT INTO `t1` VALUES (1),(2),(3); +UNLOCK TABLES; +/*!40000 ALTER TABLE `t1` ENABLE KEYS */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +DROP TABLE t1; diff --git a/mysql-test/r/reserved_win_names.require b/mysql-test/r/reserved_win_names.require deleted file mode 100644 index 7f803aca482..00000000000 --- a/mysql-test/r/reserved_win_names.require +++ /dev/null @@ -1,2 +0,0 @@ -Variable_name Value -lower_case_table_names 1 diff --git a/mysql-test/r/reserved_win_names.result b/mysql-test/r/reserved_win_names.result deleted file mode 100644 index eaa0f71513f..00000000000 --- a/mysql-test/r/reserved_win_names.result +++ /dev/null @@ -1,7 +0,0 @@ -use COM1; -ERROR 42000: Unknown database 'com1' -use LPT1; -ERROR 42000: Unknown database 'lpt1' -use PRN; -ERROR 42000: Unknown database 'prn' - diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index 8932d2c78ae..eaed7719673 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -2423,6 +2423,12 @@ ERROR HY000: Incorrect usage of ALL and DISTINCT select distinct all * from t1; ERROR HY000: Incorrect usage of ALL and DISTINCT drop table t1; +CREATE TABLE t1 (b BIGINT(20) UNSIGNED NOT NULL, PRIMARY KEY (b)); +INSERT INTO t1 VALUES (0x8000000000000000); +SELECT b FROM t1 WHERE b=0x8000000000000000; +b +9223372036854775808 +DROP TABLE t1; CREATE TABLE t1 ( K2C4 varchar(4) character set latin1 collate latin1_bin NOT NULL default '', K4N4 varchar(4) character set latin1 collate latin1_bin NOT NULL default '0000', diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result index aae3c414c5c..22417136f67 100644 --- a/mysql-test/r/union.result +++ b/mysql-test/r/union.result @@ -1201,27 +1201,27 @@ concat('value is: ', @val) value is: 6 some text CREATE TABLE t1 ( -a ENUM('ä','ö','ü') character set utf8 not null default 'ü', +a ENUM('ä','ö','ü') character set utf8 not null default 'ü', b ENUM("one", "two") character set utf8, c ENUM("one", "two") ); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` enum('ä','ö','ü') character set utf8 NOT NULL default 'ü', + `a` enum('ä','ö','ü') character set utf8 NOT NULL default 'ü', `b` enum('one','two') character set utf8 default NULL, `c` enum('one','two') default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -insert into t1 values ('ä', 'one', 'one'), ('ö', 'two', 'one'), ('ü', NULL, NULL); +insert into t1 values ('ä', 'one', 'one'), ('ö', 'two', 'one'), ('ü', NULL, NULL); create table t2 select NULL union select a from t1; show columns from t2; Field Type Null Key Default Extra -NULL enum('ä','ö','ü') YES NULL +NULL enum('ä','ö','ü') YES NULL drop table t2; create table t2 select a from t1 union select NULL; show columns from t2; Field Type Null Key Default Extra -a enum('ä','ö','ü') YES NULL +a enum('ä','ö','ü') YES NULL drop table t2; create table t2 select a from t1 union select a from t1; show columns from t2; @@ -1252,3 +1252,22 @@ t2 CREATE TABLE `t2` ( `a` varchar(12) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 ROW_FORMAT=FIXED drop table t1,t2; +create table t1 ( id int not null auto_increment, primary key (id), col1 int); +insert into t1 (col1) values (2),(3),(4),(5),(6); +select 99 union all select id from t1 order by 1; +99 +1 +2 +3 +4 +5 +99 +select id from t1 union all select 99 order by 1; +id +1 +2 +3 +4 +5 +99 +drop table t1; diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test index 4af62fe3b01..7a39fbdf5f6 100644 --- a/mysql-test/t/mysqldump.test +++ b/mysql-test/t/mysqldump.test @@ -554,3 +554,12 @@ create table t1 ( insert into t1 (F_8d3bba7425e7c98c50f52ca1b52d3735) values (1); --exec $MYSQL_DUMP --skip-comments -c test drop table t1; + +# +# Test for --add-drop-database +# + +CREATE TABLE t1 (a int); +INSERT INTO t1 VALUES (1),(2),(3); +--exec $MYSQL_DUMP --add-drop-database --skip-comments --databases test +DROP TABLE t1; diff --git a/mysql-test/t/reserved_win_names.test b/mysql-test/t/reserved_win_names.test deleted file mode 100644 index d9b23935ddf..00000000000 --- a/mysql-test/t/reserved_win_names.test +++ /dev/null @@ -1,12 +0,0 @@ -# -# Test of reserved Windows names -# ---require r/reserved_win_names.require - ---error 1049 -use COM1; ---error 1049 -use LPT1; ---error 1049 -use PRN; - diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test index 84ac8a67b04..b6132d23d02 100644 --- a/mysql-test/t/select.test +++ b/mysql-test/t/select.test @@ -1998,6 +1998,15 @@ select distinct all * from t1; drop table t1; # + +# +# Test for Bug#8009, SELECT failed on bigint unsigned when using HEX +# + +CREATE TABLE t1 (b BIGINT(20) UNSIGNED NOT NULL, PRIMARY KEY (b)); +INSERT INTO t1 VALUES (0x8000000000000000); +SELECT b FROM t1 WHERE b=0x8000000000000000; +DROP TABLE t1; # Test for bug #6474 # diff --git a/mysql-test/t/union.test b/mysql-test/t/union.test index 239a7aaad4b..42cdf54544a 100644 --- a/mysql-test/t/union.test +++ b/mysql-test/t/union.test @@ -740,12 +740,12 @@ select concat('value is: ', @val) union select 'some text'; # Enum merging test # CREATE TABLE t1 ( - a ENUM('ä','ö','ü') character set utf8 not null default 'ü', + a ENUM('ä','ö','ü') character set utf8 not null default 'ü', b ENUM("one", "two") character set utf8, c ENUM("one", "two") ); show create table t1; -insert into t1 values ('ä', 'one', 'one'), ('ö', 'two', 'one'), ('ü', NULL, NULL); +insert into t1 values ('ä', 'one', 'one'), ('ö', 'two', 'one'), ('ü', NULL, NULL); create table t2 select NULL union select a from t1; show columns from t2; drop table t2; @@ -772,3 +772,14 @@ select row_format from information_schema.TABLES where table_schema="test" and t alter table t2 ROW_FORMAT=fixed; show create table t2; drop table t1,t2; + + +# +# Bug #10032 Bug in parsing UNION with ORDER BY when one node does not use FROM +# + +create table t1 ( id int not null auto_increment, primary key (id), col1 int); +insert into t1 (col1) values (2),(3),(4),(5),(6); +select 99 union all select id from t1 order by 1; +select id from t1 union all select 99 order by 1; +drop table t1; |