mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
merged 5.0-5.1.29-rc into 5.0-bugteam
This commit is contained in:
@ -1836,7 +1836,13 @@ static uint get_table_structure(char *table, char *db, char *table_type,
|
|||||||
fprintf(sql_file, ",\n %s %s",
|
fprintf(sql_file, ",\n %s %s",
|
||||||
quote_name(row[0], name_buff, 0), row[1]);
|
quote_name(row[0], name_buff, 0), row[1]);
|
||||||
}
|
}
|
||||||
fprintf(sql_file, "\n) */;\n");
|
/*
|
||||||
|
Stand-in tables are always MyISAM tables as the default
|
||||||
|
engine might have a column-limit that's lower than the
|
||||||
|
number of columns in the view, and MyISAM support is
|
||||||
|
guaranteed to be in the server anyway.
|
||||||
|
*/
|
||||||
|
fprintf(sql_file, "\n) ENGINE=MyISAM */;\n");
|
||||||
check_io(sql_file);
|
check_io(sql_file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -90,4 +90,9 @@ Note 1276 Field or reference 'test.t2.a' of SELECT #2 was resolved in SELECT #1
|
|||||||
Note 1276 Field or reference 'test.t2.a' of SELECT #2 was resolved in SELECT #1
|
Note 1276 Field or reference 'test.t2.a' of SELECT #2 was resolved in SELECT #1
|
||||||
Note 1003 select `test`.`t2`.`a` AS `a`,(select count(0) AS `COUNT(*)` from `test`.`t1` where ((`test`.`t1`.`b` = `test`.`t2`.`a`) and (concat(`test`.`t1`.`b`,`test`.`t1`.`c`) = concat(_latin1'0',`test`.`t2`.`a`,_latin1'01')))) AS `x` from `test`.`t2` order by `test`.`t2`.`a`
|
Note 1003 select `test`.`t2`.`a` AS `a`,(select count(0) AS `COUNT(*)` from `test`.`t1` where ((`test`.`t1`.`b` = `test`.`t2`.`a`) and (concat(`test`.`t1`.`b`,`test`.`t1`.`c`) = concat(_latin1'0',`test`.`t2`.`a`,_latin1'01')))) AS `x` from `test`.`t2` order by `test`.`t2`.`a`
|
||||||
DROP TABLE t1,t2;
|
DROP TABLE t1,t2;
|
||||||
|
CREATE TABLE t1 (a TIMESTAMP);
|
||||||
|
INSERT INTO t1 VALUES (NOW()),(NOW()),(NOW());
|
||||||
|
SELECT * FROM t1 WHERE a > '2008-01-01' AND a = '0000-00-00';
|
||||||
|
a
|
||||||
|
DROP TABLE t1;
|
||||||
End of 5.0 tests
|
End of 5.0 tests
|
||||||
|
@ -2001,7 +2001,7 @@ DROP TABLE IF EXISTS `v2`;
|
|||||||
/*!50001 DROP VIEW IF EXISTS `v2`*/;
|
/*!50001 DROP VIEW IF EXISTS `v2`*/;
|
||||||
/*!50001 CREATE TABLE `v2` (
|
/*!50001 CREATE TABLE `v2` (
|
||||||
`a` varchar(30)
|
`a` varchar(30)
|
||||||
) */;
|
) ENGINE=MyISAM */;
|
||||||
/*!50001 DROP TABLE `v2`*/;
|
/*!50001 DROP TABLE `v2`*/;
|
||||||
/*!50001 DROP VIEW IF EXISTS `v2`*/;
|
/*!50001 DROP VIEW IF EXISTS `v2`*/;
|
||||||
/*!50001 CREATE ALGORITHM=UNDEFINED */
|
/*!50001 CREATE ALGORITHM=UNDEFINED */
|
||||||
@ -2083,7 +2083,7 @@ DROP TABLE IF EXISTS `v1`;
|
|||||||
/*!50001 DROP VIEW IF EXISTS `v1`*/;
|
/*!50001 DROP VIEW IF EXISTS `v1`*/;
|
||||||
/*!50001 CREATE TABLE `v1` (
|
/*!50001 CREATE TABLE `v1` (
|
||||||
`a` int(11)
|
`a` int(11)
|
||||||
) */;
|
) ENGINE=MyISAM */;
|
||||||
/*!50001 DROP TABLE `v1`*/;
|
/*!50001 DROP TABLE `v1`*/;
|
||||||
/*!50001 DROP VIEW IF EXISTS `v1`*/;
|
/*!50001 DROP VIEW IF EXISTS `v1`*/;
|
||||||
/*!50001 CREATE ALGORITHM=UNDEFINED */
|
/*!50001 CREATE ALGORITHM=UNDEFINED */
|
||||||
@ -2145,7 +2145,7 @@ DROP TABLE IF EXISTS `v2`;
|
|||||||
/*!50001 DROP VIEW IF EXISTS `v2`*/;
|
/*!50001 DROP VIEW IF EXISTS `v2`*/;
|
||||||
/*!50001 CREATE TABLE `v2` (
|
/*!50001 CREATE TABLE `v2` (
|
||||||
`a` varchar(30)
|
`a` varchar(30)
|
||||||
) */;
|
) ENGINE=MyISAM */;
|
||||||
/*!50001 DROP TABLE `v2`*/;
|
/*!50001 DROP TABLE `v2`*/;
|
||||||
/*!50001 DROP VIEW IF EXISTS `v2`*/;
|
/*!50001 DROP VIEW IF EXISTS `v2`*/;
|
||||||
/*!50001 CREATE ALGORITHM=UNDEFINED */
|
/*!50001 CREATE ALGORITHM=UNDEFINED */
|
||||||
@ -2249,19 +2249,19 @@ DROP TABLE IF EXISTS `v1`;
|
|||||||
`a` int(11),
|
`a` int(11),
|
||||||
`b` int(11),
|
`b` int(11),
|
||||||
`c` varchar(30)
|
`c` varchar(30)
|
||||||
) */;
|
) ENGINE=MyISAM */;
|
||||||
DROP TABLE IF EXISTS `v2`;
|
DROP TABLE IF EXISTS `v2`;
|
||||||
/*!50001 DROP VIEW IF EXISTS `v2`*/;
|
/*!50001 DROP VIEW IF EXISTS `v2`*/;
|
||||||
/*!50001 CREATE TABLE `v2` (
|
/*!50001 CREATE TABLE `v2` (
|
||||||
`a` int(11)
|
`a` int(11)
|
||||||
) */;
|
) ENGINE=MyISAM */;
|
||||||
DROP TABLE IF EXISTS `v3`;
|
DROP TABLE IF EXISTS `v3`;
|
||||||
/*!50001 DROP VIEW IF EXISTS `v3`*/;
|
/*!50001 DROP VIEW IF EXISTS `v3`*/;
|
||||||
/*!50001 CREATE TABLE `v3` (
|
/*!50001 CREATE TABLE `v3` (
|
||||||
`a` int(11),
|
`a` int(11),
|
||||||
`b` int(11),
|
`b` int(11),
|
||||||
`c` varchar(30)
|
`c` varchar(30)
|
||||||
) */;
|
) ENGINE=MyISAM */;
|
||||||
/*!50001 DROP TABLE `v1`*/;
|
/*!50001 DROP TABLE `v1`*/;
|
||||||
/*!50001 DROP VIEW IF EXISTS `v1`*/;
|
/*!50001 DROP VIEW IF EXISTS `v1`*/;
|
||||||
/*!50001 CREATE ALGORITHM=UNDEFINED */
|
/*!50001 CREATE ALGORITHM=UNDEFINED */
|
||||||
@ -2865,21 +2865,21 @@ DROP TABLE IF EXISTS `v0`;
|
|||||||
`a` int(11),
|
`a` int(11),
|
||||||
`b` varchar(32),
|
`b` varchar(32),
|
||||||
`c` varchar(32)
|
`c` varchar(32)
|
||||||
) */;
|
) ENGINE=MyISAM */;
|
||||||
DROP TABLE IF EXISTS `v1`;
|
DROP TABLE IF EXISTS `v1`;
|
||||||
/*!50001 DROP VIEW IF EXISTS `v1`*/;
|
/*!50001 DROP VIEW IF EXISTS `v1`*/;
|
||||||
/*!50001 CREATE TABLE `v1` (
|
/*!50001 CREATE TABLE `v1` (
|
||||||
`a` int(11),
|
`a` int(11),
|
||||||
`b` varchar(32),
|
`b` varchar(32),
|
||||||
`c` varchar(32)
|
`c` varchar(32)
|
||||||
) */;
|
) ENGINE=MyISAM */;
|
||||||
DROP TABLE IF EXISTS `v2`;
|
DROP TABLE IF EXISTS `v2`;
|
||||||
/*!50001 DROP VIEW IF EXISTS `v2`*/;
|
/*!50001 DROP VIEW IF EXISTS `v2`*/;
|
||||||
/*!50001 CREATE TABLE `v2` (
|
/*!50001 CREATE TABLE `v2` (
|
||||||
`a` int(11),
|
`a` int(11),
|
||||||
`b` varchar(32),
|
`b` varchar(32),
|
||||||
`c` varchar(32)
|
`c` varchar(32)
|
||||||
) */;
|
) ENGINE=MyISAM */;
|
||||||
|
|
||||||
USE `test`;
|
USE `test`;
|
||||||
/*!50001 DROP TABLE `v0`*/;
|
/*!50001 DROP TABLE `v0`*/;
|
||||||
@ -3203,7 +3203,7 @@ DROP TABLE IF EXISTS `v1`;
|
|||||||
/*!50001 DROP VIEW IF EXISTS `v1`*/;
|
/*!50001 DROP VIEW IF EXISTS `v1`*/;
|
||||||
/*!50001 CREATE TABLE `v1` (
|
/*!50001 CREATE TABLE `v1` (
|
||||||
`id` int(11)
|
`id` int(11)
|
||||||
) */;
|
) ENGINE=MyISAM */;
|
||||||
|
|
||||||
USE `mysqldump_test_db`;
|
USE `mysqldump_test_db`;
|
||||||
/*!50001 DROP TABLE `v1`*/;
|
/*!50001 DROP TABLE `v1`*/;
|
||||||
@ -3251,7 +3251,7 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqldump_views` /*!40100 DEFAULT CHAR
|
|||||||
USE `mysqldump_views`;
|
USE `mysqldump_views`;
|
||||||
/*!50001 CREATE TABLE `nasishnasifu` (
|
/*!50001 CREATE TABLE `nasishnasifu` (
|
||||||
`id` bigint(20) unsigned
|
`id` bigint(20) unsigned
|
||||||
) */;
|
) ENGINE=MyISAM */;
|
||||||
|
|
||||||
USE `mysqldump_tables`;
|
USE `mysqldump_tables`;
|
||||||
|
|
||||||
|
@ -76,4 +76,13 @@ FROM t2 ORDER BY a;
|
|||||||
|
|
||||||
DROP TABLE t1,t2;
|
DROP TABLE t1,t2;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug #39353: Multiple conditions on timestamp column crashes server
|
||||||
|
#
|
||||||
|
|
||||||
|
CREATE TABLE t1 (a TIMESTAMP);
|
||||||
|
INSERT INTO t1 VALUES (NOW()),(NOW()),(NOW());
|
||||||
|
SELECT * FROM t1 WHERE a > '2008-01-01' AND a = '0000-00-00';
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
--echo End of 5.0 tests
|
--echo End of 5.0 tests
|
||||||
|
@ -4220,7 +4220,12 @@ Item *Item_field::equal_fields_propagator(byte *arg)
|
|||||||
item= this;
|
item= this;
|
||||||
else if (field && (field->flags & ZEROFILL_FLAG) && IS_NUM(field->type()))
|
else if (field && (field->flags & ZEROFILL_FLAG) && IS_NUM(field->type()))
|
||||||
{
|
{
|
||||||
if (item && cmp_context != INT_RESULT)
|
/*
|
||||||
|
We don't need to zero-fill timestamp columns here because they will be
|
||||||
|
first converted to a string (in date/time format) and compared as such if
|
||||||
|
compared with another string.
|
||||||
|
*/
|
||||||
|
if (item && field->type() != FIELD_TYPE_TIMESTAMP && cmp_context != INT_RESULT)
|
||||||
convert_zerofill_number_to_string(&item, (Field_num *)field);
|
convert_zerofill_number_to_string(&item, (Field_num *)field);
|
||||||
else
|
else
|
||||||
item= this;
|
item= this;
|
||||||
|
Reference in New Issue
Block a user