I think your new patch looks very good.
I only have a question on the following change:
> @@ -1795,7 +1795,8 @@ int Field::store_time(MYSQL_TIME *ltime,
> ASSERT_COLUMN_MARKED_FOR_WRITE;
> char buff[MAX_DATE_STRING_REP_LENGTH];
> uint length= (uint) my_TIME_to_str(ltime, buff);
> - return store(buff, length, &my_charset_bin);
> + return store(buff, length, (charset()->state & MY_CS_NONASCII) ?
> + &my_charset_latin1 : &my_charset_bin);
> }
Can you explain the reasoning behind this?
If I apply your patch to current mysql-next-mr, I get a few test
failures. Please, take a look at attached file.
--
Øystein
Logging: ./mtr --force --retry-failure=0 main.change_user main.create main.ctype_binary
main.ctype_cp1251 main.ctype_latin1 main.ctype_ucs main.metadata main.variables
main.innodb_bug21704
100118 15:39:56 [Note] Buffered information: Performance schema disabled (reason: start
parameters).
100118 15:39:56 [Note] Plugin 'FEDERATED' is disabled.
MySQL Version 5.5.99
Checking supported features...
- skipping ndbcluster, mysqld not compiled with ndbcluster
- SSL connections supported
- binaries are debug compiled
Collecting tests...
vardir: /home/oysteing/mysql/mysql-next-mr/mysql-test/var
Checking leftover processes...
Removing old var directory...
- WARNING: Using the 'mysql-test/var' symlink
Creating var directory '/home/oysteing/mysql/mysql-next-mr/mysql-test/var'...
Installing system database...
Using server port 34735
worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 13000..13009
==============================================================================
TEST RESULT TIME (ms)
------------------------------------------------------------
main.change_user [ fail ]
Test ended at 2010-01-18 15:39:57
CURRENT_TEST: main.change_user
--- /home/oysteing/mysql/mysql-next-mr/mysql-test/r/change_user.result 2010-01-15
17:52:41.000000000 +0300
+++ /home/oysteing/mysql/mysql-next-mr/mysql-test/r/change_user.reject 2010-01-18
17:39:57.000000000 +0300
@@ -4,14 +4,14 @@
1
SELECT @@global.max_join_size;
@@global.max_join_size
-HA_POS_ERROR
+-1
change_user
SELECT @@session.sql_big_selects;
@@session.sql_big_selects
1
SELECT @@global.max_join_size;
@@global.max_join_size
-HA_POS_ERROR
+-1
SET @@global.max_join_size = 10000;
SET @@session.max_join_size = default;
change_user
mysqltest: Result content mismatch
- saving '/home/oysteing/mysql/mysql-next-mr/mysql-test/var/log/main.change_user/' to
'/home/oysteing/mysql/mysql-next-mr/mysql-test/var/log/main.change_user/'
Test has failed 1 times, no more retries!
main.create [ fail ]
Test ended at 2010-01-18 15:39:58
CURRENT_TEST: main.create
--- /home/oysteing/mysql/mysql-next-mr/mysql-test/r/create.result 2010-01-15
17:52:41.000000000 +0300
+++ /home/oysteing/mysql/mysql-next-mr/mysql-test/r/create.reject 2010-01-18
17:39:58.000000000 +0300
@@ -438,7 +438,7 @@
Field Type Null Key Default Extra
a int(11) YES NULL
b bigint(11) NO 0
-c bigint(11) unsigned NO 0
+c bigint(10) unsigned NO 0
d date YES NULL
e varchar(1) NO
f datetime YES NULL
@@ -457,7 +457,7 @@
t2 CREATE TABLE `t2` (
`ifnull(a,a)` tinyint(4) DEFAULT NULL,
`ifnull(b,b)` smallint(6) DEFAULT NULL,
- `ifnull(c,c)` mediumint(8) DEFAULT NULL,
+ `ifnull(c,c)` mediumint(9) DEFAULT NULL,
`ifnull(d,d)` int(11) DEFAULT NULL,
`ifnull(e,e)` bigint(20) DEFAULT NULL,
`ifnull(f,f)` float(3,2) DEFAULT NULL,
mysqltest: Result content mismatch
- saving '/home/oysteing/mysql/mysql-next-mr/mysql-test/var/log/main.create/' to
'/home/oysteing/mysql/mysql-next-mr/mysql-test/var/log/main.create/'
Test has failed 1 times, no more retries!
main.ctype_binary [ fail ]
Test ended at 2010-01-18 15:39:59
CURRENT_TEST: main.ctype_binary
--- /home/oysteing/mysql/mysql-next-mr/mysql-test/r/ctype_binary.result 2010-01-15
18:58:18.000000000 +0300
+++ /home/oysteing/mysql/mysql-next-mr/mysql-test/r/ctype_binary.reject 2010-01-18
17:39:59.000000000 +0300
@@ -1866,7 +1866,7 @@
update t1 set a= a + 0.1;
select a, hex(a) from t1;
a hex(a)
-1.2 312E32
+1.2000000000000002 312E32303030303030303030303030303032
2.2 322E32
drop table t1;
create table t1 (a tinyint);
mysqltest: Result content mismatch
- saving '/home/oysteing/mysql/mysql-next-mr/mysql-test/var/log/main.ctype_binary/' to
'/home/oysteing/mysql/mysql-next-mr/mysql-test/var/log/main.ctype_binary/'
Test has failed 1 times, no more retries!
main.ctype_cp1251 [ fail ]
Test ended at 2010-01-18 15:39:59
CURRENT_TEST: main.ctype_cp1251
--- /home/oysteing/mysql/mysql-next-mr/mysql-test/r/ctype_cp1251.result 2010-01-15
18:58:18.000000000 +0300
+++ /home/oysteing/mysql/mysql-next-mr/mysql-test/r/ctype_cp1251.reject 2010-01-18
17:39:59.000000000 +0300
@@ -1948,7 +1948,7 @@
update t1 set a= a + 0.1;
select a, hex(a) from t1;
a hex(a)
-1.2 312E32
+1.2000000000000002 312E32303030303030303030303030303032
2.2 322E32
drop table t1;
create table t1 (a tinyint);
mysqltest: Result content mismatch
- saving '/home/oysteing/mysql/mysql-next-mr/mysql-test/var/log/main.ctype_cp1251/' to
'/home/oysteing/mysql/mysql-next-mr/mysql-test/var/log/main.ctype_cp1251/'
Test has failed 1 times, no more retries!
main.ctype_latin1 [ fail ]
Test ended at 2010-01-18 15:40:00
CURRENT_TEST: main.ctype_latin1
--- /home/oysteing/mysql/mysql-next-mr/mysql-test/r/ctype_latin1.result 2010-01-15
18:58:18.000000000 +0300
+++ /home/oysteing/mysql/mysql-next-mr/mysql-test/r/ctype_latin1.reject 2010-01-18
17:40:00.000000000 +0300
@@ -2276,7 +2276,7 @@
update t1 set a= a + 0.1;
select a, hex(a) from t1;
a hex(a)
-1.2 312E32
+1.2000000000000002 312E32303030303030303030303030303032
2.2 322E32
drop table t1;
create table t1 (a tinyint);
mysqltest: Result content mismatch
- saving '/home/oysteing/mysql/mysql-next-mr/mysql-test/var/log/main.ctype_latin1/' to
'/home/oysteing/mysql/mysql-next-mr/mysql-test/var/log/main.ctype_latin1/'
Test has failed 1 times, no more retries!
main.ctype_ucs [ fail ]
Test ended at 2010-01-18 15:40:01
CURRENT_TEST: main.ctype_ucs
--- /home/oysteing/mysql/mysql-next-mr/mysql-test/r/ctype_ucs.result 2010-01-15
18:58:18.000000000 +0300
+++ /home/oysteing/mysql/mysql-next-mr/mysql-test/r/ctype_ucs.reject 2010-01-18
17:40:01.000000000 +0300
@@ -3100,7 +3100,7 @@
update t1 set a= a + 0.1;
select a, hex(a) from t1;
a hex(a)
-1.2 0031002E0032
+1.2000000000000002 0031002E0032003000300030003000300030003000300030003000300030003000300032
2.2 0032002E0032
drop table t1;
create table t1 (a tinyint);
mysqltest: Result content mismatch
- saving '/home/oysteing/mysql/mysql-next-mr/mysql-test/var/log/main.ctype_ucs/' to
'/home/oysteing/mysql/mysql-next-mr/mysql-test/var/log/main.ctype_ucs/'
Test has failed 1 times, no more retries!
main.metadata [ fail ]
Test ended at 2010-01-18 15:40:02
CURRENT_TEST: main.metadata
--- /home/oysteing/mysql/mysql-next-mr/mysql-test/r/metadata.result 2010-01-15
18:58:18.000000000 +0300
+++ /home/oysteing/mysql/mysql-next-mr/mysql-test/r/metadata.reject 2010-01-18
17:40:02.000000000 +0300
@@ -126,7 +126,7 @@
1
select * from v3 where renamed=1 group by renamed;
Catalog Database Table Table_alias Column Column_alias Type Length Max
length Is_null Flags Decimals Charsetnr
-def v3 v3 renamed renamed 8 12 0 Y 32768 0 8
+def v3 v3 renamed renamed 8 11 0 Y 32768 0 8
renamed
drop table t1;
drop view v1,v2,v3;
mysqltest: Result content mismatch
- saving '/home/oysteing/mysql/mysql-next-mr/mysql-test/var/log/main.metadata/' to
'/home/oysteing/mysql/mysql-next-mr/mysql-test/var/log/main.metadata/'
Test has failed 1 times, no more retries!
main.variables [ fail ]
Test ended at 2010-01-18 15:40:03
CURRENT_TEST: main.variables
--- /home/oysteing/mysql/mysql-next-mr/mysql-test/r/variables.result 2010-01-15
17:52:51.000000000 +0300
+++ /home/oysteing/mysql/mysql-next-mr/mysql-test/r/variables.reject 2010-01-18
17:40:03.000000000 +0300
@@ -1048,6 +1048,8 @@
set global max_heap_table_size =@my_max_heap_table_size;
set global max_insert_delayed_threads=@my_max_insert_delayed_threads;
set global max_join_size =@my_max_join_size;
+Warnings:
+Warning 1292 Truncated incorrect max_join_size value: '-1'
set global max_user_connections =default;
set global max_write_lock_count =default;
set global myisam_data_pointer_size =@my_myisam_data_pointer_size;
mysqltest: Result content mismatch
- saving '/home/oysteing/mysql/mysql-next-mr/mysql-test/var/log/main.variables/' to
'/home/oysteing/mysql/mysql-next-mr/mysql-test/var/log/main.variables/'
Test has failed 1 times, no more retries!
main.innodb_bug21704 [ fail ]
Test ended at 2010-01-18 15:40:04
CURRENT_TEST: main.innodb_bug21704
--- /home/oysteing/mysql/mysql-next-mr/mysql-test/r/innodb_bug21704.result 2009-09-23
12:20:34.000000000 +0300
+++ /home/oysteing/mysql/mysql-next-mr/mysql-test/r/innodb_bug21704.reject 2010-01-18
17:40:03.000000000 +0300
@@ -22,7 +22,7 @@
# Test renaming the column in the referenced table.
ALTER TABLE t1 CHANGE a c INT;
-ERROR HY000: Error on rename of '#sql-temporary' to './test/t1' (errno: 150)
+ERROR HY000: Error on rename of './test/#sql-5F6E_2' to './test/t1' (errno: 150)
# Ensure that online column rename works.
ALTER TABLE t1 CHANGE b c INT;
affected rows: 0
@@ -31,7 +31,7 @@
# Test renaming the column in the referencing table
ALTER TABLE t2 CHANGE a c INT;
-ERROR HY000: Error on rename of '#sql-temporary' to './test/t2' (errno: 150)
+ERROR HY000: Error on rename of './test/#sql-5F6E_2' to './test/t2' (errno: 150)
# Ensure that online column rename works.
ALTER TABLE t2 CHANGE b c INT;
affected rows: 0
@@ -40,9 +40,9 @@
# Test with self-referential constraints
ALTER TABLE t3 CHANGE a d INT;
-ERROR HY000: Error on rename of '#sql-temporary' to './test/t3' (errno: 150)
+ERROR HY000: Error on rename of './test/#sql-5F6E_2' to './test/t3' (errno: 150)
ALTER TABLE t3 CHANGE b d INT;
-ERROR HY000: Error on rename of '#sql-temporary' to './test/t3' (errno: 150)
+ERROR HY000: Error on rename of './test/#sql-5F6E_2' to './test/t3' (errno: 150)
# Ensure that online column rename works.
ALTER TABLE t3 CHANGE c d INT;
affected rows: 0
mysqltest: Result content mismatch
- saving '/home/oysteing/mysql/mysql-next-mr/mysql-test/var/log/main.innodb_bug21704/' to
'/home/oysteing/mysql/mysql-next-mr/mysql-test/var/log/main.innodb_bug21704/'
Test has failed 1 times, no more retries!
------------------------------------------------------------
The servers were restarted 8 times
Spent 0.000 of 8 seconds executing testcases
Failed 9/9 tests, 0.00% were successful.
Failing test(s): main.change_user main.create main.ctype_binary main.ctype_cp1251
main.ctype_latin1 main.ctype_ucs main.metadata main.variables main.innodb_bug21704
The log files in var/log may give you some hint of what went wrong.
If you want to report this error, please read first the documentation
at http://dev.mysql.com/doc/mysql/en/mysql-test-suite.html
mysql-test-run: *** ERROR: there were failing test cases