2690 Georgi Kodinov 2008-10-01
fixed a wrong directory in distinct.test
modified:
mysql-test/t/distinct.test
2689 Georgi Kodinov 2008-10-01 [merge]
merged 5.0-main -> 5.0-bugteam
modified:
configure.in
2688 Georgi Kodinov 2008-10-01 [merge]
merged 5.0-5.1.29-rc into 5.0-bugteam
modified:
client/mysqldump.c
mysql-test/r/compare.result
mysql-test/r/mysqldump.result
mysql-test/t/compare.test
sql/item.cc
2687 Patrick Crews 2008-09-30
Bug#38311 Some tests use 'rm' which is not portable
Repush of change to fix tests on Pushbuild.
modified:
mysql-test/t/distinct.test
=== modified file 'client/mysqldump.c'
--- a/client/mysqldump.c 2008-03-14 13:32:01 +0000
+++ b/client/mysqldump.c 2008-09-11 05:46:43 +0000
@@ -1836,7 +1836,13 @@ static uint get_table_structure(char *ta
fprintf(sql_file, ",\n %s %s",
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);
}
}
=== modified file 'configure.in'
--- a/configure.in 2008-08-27 14:25:24 +0000
+++ b/configure.in 2008-10-01 09:42:45 +0000
@@ -7,7 +7,7 @@ AC_INIT(sql/mysqld.cc)
AC_CANONICAL_SYSTEM
# The Docs Makefile.am parses this line!
# remember to also change ndb version below and update version.c in ndb
-AM_INIT_AUTOMAKE(mysql, 5.0.70)
+AM_INIT_AUTOMAKE(mysql, 5.0.72)
AM_CONFIG_HEADER([include/config.h:config.h.in])
PROTOCOL_VERSION=10
@@ -23,7 +23,7 @@ NDB_SHARED_LIB_VERSION=$NDB_SHARED_LIB_M
# ndb version
NDB_VERSION_MAJOR=5
NDB_VERSION_MINOR=0
-NDB_VERSION_BUILD=70
+NDB_VERSION_BUILD=72
NDB_VERSION_STATUS=""
# Set all version vars based on $VERSION. How do we do this more elegant ?
=== modified file 'mysql-test/r/compare.result'
--- a/mysql-test/r/compare.result 2008-02-15 13:47:32 +0000
+++ b/mysql-test/r/compare.result 2008-09-18 12:55:36 +0000
@@ -90,4 +90,9 @@ Note 1276 Field or reference 'test.t2.a'
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`
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
=== modified file 'mysql-test/r/mysqldump.result'
--- a/mysql-test/r/mysqldump.result 2008-09-15 19:34:39 +0000
+++ b/mysql-test/r/mysqldump.result 2008-10-01 09:41:13 +0000
@@ -2001,7 +2001,7 @@ DROP TABLE IF EXISTS `v2`;
/*!50001 DROP VIEW IF EXISTS `v2`*/;
/*!50001 CREATE TABLE `v2` (
`a` varchar(30)
-) */;
+) ENGINE=MyISAM */;
/*!50001 DROP TABLE `v2`*/;
/*!50001 DROP VIEW IF EXISTS `v2`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
@@ -2083,7 +2083,7 @@ DROP TABLE IF EXISTS `v1`;
/*!50001 DROP VIEW IF EXISTS `v1`*/;
/*!50001 CREATE TABLE `v1` (
`a` int(11)
-) */;
+) ENGINE=MyISAM */;
/*!50001 DROP TABLE `v1`*/;
/*!50001 DROP VIEW IF EXISTS `v1`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
@@ -2145,7 +2145,7 @@ DROP TABLE IF EXISTS `v2`;
/*!50001 DROP VIEW IF EXISTS `v2`*/;
/*!50001 CREATE TABLE `v2` (
`a` varchar(30)
-) */;
+) ENGINE=MyISAM */;
/*!50001 DROP TABLE `v2`*/;
/*!50001 DROP VIEW IF EXISTS `v2`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
@@ -2249,19 +2249,19 @@ DROP TABLE IF EXISTS `v1`;
`a` int(11),
`b` int(11),
`c` varchar(30)
-) */;
+) ENGINE=MyISAM */;
DROP TABLE IF EXISTS `v2`;
/*!50001 DROP VIEW IF EXISTS `v2`*/;
/*!50001 CREATE TABLE `v2` (
`a` int(11)
-) */;
+) ENGINE=MyISAM */;
DROP TABLE IF EXISTS `v3`;
/*!50001 DROP VIEW IF EXISTS `v3`*/;
/*!50001 CREATE TABLE `v3` (
`a` int(11),
`b` int(11),
`c` varchar(30)
-) */;
+) ENGINE=MyISAM */;
/*!50001 DROP TABLE `v1`*/;
/*!50001 DROP VIEW IF EXISTS `v1`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
@@ -2865,21 +2865,21 @@ DROP TABLE IF EXISTS `v0`;
`a` int(11),
`b` varchar(32),
`c` varchar(32)
-) */;
+) ENGINE=MyISAM */;
DROP TABLE IF EXISTS `v1`;
/*!50001 DROP VIEW IF EXISTS `v1`*/;
/*!50001 CREATE TABLE `v1` (
`a` int(11),
`b` varchar(32),
`c` varchar(32)
-) */;
+) ENGINE=MyISAM */;
DROP TABLE IF EXISTS `v2`;
/*!50001 DROP VIEW IF EXISTS `v2`*/;
/*!50001 CREATE TABLE `v2` (
`a` int(11),
`b` varchar(32),
`c` varchar(32)
-) */;
+) ENGINE=MyISAM */;
USE `test`;
/*!50001 DROP TABLE `v0`*/;
@@ -3203,7 +3203,7 @@ DROP TABLE IF EXISTS `v1`;
/*!50001 DROP VIEW IF EXISTS `v1`*/;
/*!50001 CREATE TABLE `v1` (
`id` int(11)
-) */;
+) ENGINE=MyISAM */;
USE `mysqldump_test_db`;
/*!50001 DROP TABLE `v1`*/;
@@ -3251,7 +3251,7 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/
USE `mysqldump_views`;
/*!50001 CREATE TABLE `nasishnasifu` (
`id` bigint(20) unsigned
-) */;
+) ENGINE=MyISAM */;
USE `mysqldump_tables`;
=== modified file 'mysql-test/t/compare.test'
--- a/mysql-test/t/compare.test 2008-02-15 13:47:32 +0000
+++ b/mysql-test/t/compare.test 2008-09-18 12:55:36 +0000
@@ -76,4 +76,13 @@ FROM t2 ORDER BY a;
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
=== modified file 'mysql-test/t/distinct.test'
--- a/mysql-test/t/distinct.test 2008-10-01 00:54:06 +0000
+++ b/mysql-test/t/distinct.test 2008-10-01 09:45:02 +0000
@@ -491,12 +491,12 @@ SELECT DISTINCT fruit_id, fruit_name INT
'../tmp/data1.tmp' FROM t1 WHERE fruit_name = 'APPLE';
LOAD DATA INFILE '../tmp/data1.tmp' INTO TABLE t2;
--error 0,1
---remove_file $MYSQL_TEST_DIR/var/tmp/data1.tmp
+--remove_file $MYSQLTEST_VARDIR/tmp/data1.tmp
SELECT DISTINCT @v19:= fruit_id, @v20:= fruit_name INTO OUTFILE
'../tmp/data2.tmp' FROM t1 WHERE fruit_name = 'APPLE';
LOAD DATA INFILE '../tmp/data2.tmp' INTO TABLE t2;
---remove_file $MYSQL_TEST_DIR/var/tmp/data2.tmp
+--remove_file $MYSQLTEST_VARDIR/tmp/data2.tmp
SELECT @v19, @v20;
SELECT * FROM t2;
=== modified file 'sql/item.cc'
--- a/sql/item.cc 2008-09-03 07:59:48 +0000
+++ b/sql/item.cc 2008-09-18 12:55:36 +0000
@@ -4220,7 +4220,12 @@ Item *Item_field::equal_fields_propagato
item= this;
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);
else
item= this;
| Thread |
|---|
| • bzr push into mysql-5.0-bugteam branch (kgeorge:2687 to 2690) | Georgi Kodinov | 1 Oct |