mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
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
This commit is contained in:
@ -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;
|
||||
|
@ -1,2 +0,0 @@
|
||||
Variable_name Value
|
||||
lower_case_table_names 1
|
@ -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'
|
||||
|
@ -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',
|
||||
|
@ -1201,27 +1201,27 @@ concat('value is: ', @val)
|
||||
value is: 6
|
||||
some text
|
||||
CREATE TABLE t1 (
|
||||
a ENUM('<EFBFBD>','<EFBFBD>','<EFBFBD>') character set utf8 not null default '<EFBFBD>',
|
||||
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('<EFBFBD>','<EFBFBD>','<EFBFBD>') character set utf8 NOT NULL default '<EFBFBD>',
|
||||
`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 ('<EFBFBD>', 'one', 'one'), ('<EFBFBD>', 'two', 'one'), ('<EFBFBD>', 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('<EFBFBD>','<EFBFBD>','<EFBFBD>') 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('<EFBFBD>','<EFBFBD>','<EFBFBD>') 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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
#
|
||||
|
||||
|
@ -740,12 +740,12 @@ select concat('value is: ', @val) union select 'some text';
|
||||
# Enum merging test
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
a ENUM('<EFBFBD>','<EFBFBD>','<EFBFBD>') character set utf8 not null default '<EFBFBD>',
|
||||
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 ('<EFBFBD>', 'one', 'one'), ('<EFBFBD>', 'two', 'one'), ('<EFBFBD>', 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;
|
||||
|
Reference in New Issue
Block a user