mirror of
https://github.com/MariaDB/server.git
synced 2025-08-31 22:22:30 +03:00
Merge from mysql-5.5.10-release
This commit is contained in:

committed by
MySQL Build Team
commit
18d2e55c51
@@ -1376,3 +1376,15 @@ NULL 1 NULL
|
||||
SET storage_engine=NULL;
|
||||
ERROR 42000: Variable 'storage_engine' can't be set to the value of 'NULL'
|
||||
#
|
||||
# Bug #59686 crash in String::copy() with time data type
|
||||
#
|
||||
SELECT min(timestampadd(month, 1>'', from_days('%Z')));
|
||||
min(timestampadd(month, 1>'', from_days('%Z')))
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect INTEGER value: '%Z'
|
||||
create table t1(a time);
|
||||
insert into t1 values ('00:00:00'),('00:01:00');
|
||||
select 1 from t1 where 1 < some (select cast(a as datetime) from t1);
|
||||
1
|
||||
drop table t1;
|
||||
|
@@ -4629,3 +4629,35 @@ DROP DATABASE `test-database`;
|
||||
#
|
||||
# End of 5.1 tests
|
||||
#
|
||||
#
|
||||
# Verify that two modes can be given in --compatible;
|
||||
# and are reflected in SET SQL_MODE in the mysqldump output.
|
||||
# Also verify that a prefix of the mode's name is enough.
|
||||
#
|
||||
CREATE TABLE t1 (a INT);
|
||||
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
||||
/*!40103 SET TIME_ZONE='+00:00' */;
|
||||
/*!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,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS' */;
|
||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||
DROP TABLE IF EXISTS `t1`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
);
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
LOCK TABLES `t1` WRITE;
|
||||
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||
|
||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
@@ -245,3 +245,12 @@ x
|
||||
NULL
|
||||
drop procedure p1;
|
||||
drop tables t1,t2,t3;
|
||||
#
|
||||
# Bug#60085 crash in Item::save_in_field() with time data type
|
||||
#
|
||||
CREATE TABLE t1(a date, b int, unique(b), unique(a), key(b)) engine=innodb;
|
||||
INSERT INTO t1 VALUES ('2011-05-13', 0);
|
||||
SELECT * FROM t1 WHERE b < (SELECT CAST(a as date) FROM t1 GROUP BY a);
|
||||
a b
|
||||
2011-05-13 0
|
||||
DROP TABLE t1;
|
||||
|
@@ -296,6 +296,18 @@ the_date the_time the_date the_time
|
||||
2010-01-01 01:01:01 2010-01-01 01:01:01
|
||||
DROP TABLE t1;
|
||||
DROP VIEW v1;
|
||||
#
|
||||
# Bug#59685 crash in String::length with date types
|
||||
#
|
||||
CREATE TABLE t1(a DATE, b YEAR, KEY(a));
|
||||
INSERT INTO t1 VALUES ('2011-01-01',2011);
|
||||
SELECT b = (SELECT CONVERT(a, DATE) FROM t1 GROUP BY a) FROM t1;
|
||||
b = (SELECT CONVERT(a, DATE) FROM t1 GROUP BY a)
|
||||
1
|
||||
SELECT b = CONVERT((SELECT CONVERT(a, DATE) FROM t1 GROUP BY a), DATE) FROM t1;
|
||||
b = CONVERT((SELECT CONVERT(a, DATE) FROM t1 GROUP BY a), DATE)
|
||||
1
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
#
|
||||
# Bug #33629: last_day function can return null, but has 'not null'
|
||||
|
Reference in New Issue
Block a user