List:Commits« Previous MessageNext Message »
From:Rohit Kalhans Date:March 30 2012 1:37pm
Subject:bzr push into mysql-trunk branch (rohit.kalhans:3824 to 3825)
View as plain text  
 3825 Rohit Kalhans	2012-03-30 [merge]
      upmerge from mysql-5.5 branch to mysql-trunk branch

    modified:
      mysql-test/r/explain.result
      mysql-test/r/get_diagnostics.result
      mysql-test/r/innodb_explain_json_non_select_all.result
      mysql-test/r/innodb_explain_json_non_select_none.result
      mysql-test/r/innodb_explain_non_select_all.result
      mysql-test/r/innodb_explain_non_select_none.result
      mysql-test/r/myisam_explain_json_non_select_all.result
      mysql-test/r/myisam_explain_json_non_select_none.result
      mysql-test/r/myisam_explain_non_select_all.result
      mysql-test/r/myisam_explain_non_select_none.result
      mysql-test/r/partition_error.result
      mysql-test/r/partition_exchange.result
      mysql-test/r/read_only_innodb.result
      mysql-test/r/sp-destruct.result
      mysql-test/r/type_time.result
      mysql-test/r/variables.result
      mysql-test/suite/binlog/r/binlog_rewrite.result
      mysql-test/suite/binlog/r/binlog_unsafe.result
      mysql-test/suite/binlog/t/binlog_unsafe.test
      mysql-test/suite/rpl/r/rpl_alter_repository.result
      mysql-test/suite/rpl/r/rpl_known_bugs_detection.result
      mysql-test/suite/rpl/r/rpl_mixed_binlog_max_cache_size.result
      mysql-test/suite/rpl/r/rpl_parallel_start_stop.result
      mysql-test/suite/rpl/r/rpl_row_binlog_max_cache_size.result
      mysql-test/suite/rpl/r/rpl_stm_binlog_max_cache_size.result
      mysql-test/suite/rpl/t/rpl_alter_repository.test
      mysql-test/suite/rpl/t/rpl_parallel_start_stop.test
      mysql-test/suite/sys_vars/r/max_binlog_cache_size_basic.result
      mysql-test/suite/sys_vars/r/max_binlog_stmt_cache_size_basic.result
      sql/share/errmsg-utf8.txt
      sql/sql_base.cc
      sql/sql_lex.cc
      sql/sql_lex.h
 3824 Joerg Bruehe	2012-03-30 [merge]
      Null upmerge of a version number change from 5.5 to 5.6

=== modified file 'mysql-test/r/explain.result'
--- a/mysql-test/r/explain.result	2012-03-15 09:55:15 +0000
+++ b/mysql-test/r/explain.result	2012-03-30 13:35:00 +0000
@@ -414,8 +414,8 @@ EXPLAIN EXTENDED SELECT * FROM t1 WHERE
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t1	index	PRIMARY	PRIMARY	1	NULL	5	100.00	Using where; Using index
 Warnings:
-Warning	1736	Cannot use ref access on index 'PRIMARY' due to type or collation conversion on field 'url'
-Warning	1736	Cannot use range access on index 'PRIMARY' due to type or collation conversion on field 'url'
+Warning	1737	Cannot use ref access on index 'PRIMARY' due to type or collation conversion on field 'url'
+Warning	1737	Cannot use range access on index 'PRIMARY' due to type or collation conversion on field 'url'
 Note	1003	/* select#1 */ select `test`.`t1`.`url` AS `url` from `test`.`t1` where (`test`.`t1`.`url` = 1)
 
 # Test that index can't be used for lookup due to collation mismatch
@@ -426,8 +426,8 @@ EXPLAIN EXTENDED SELECT * FROM t1 WHERE
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t1	index	PRIMARY	PRIMARY	1	NULL	5	100.00	Using where; Using index
 Warnings:
-Warning	1736	Cannot use ref access on index 'PRIMARY' due to type or collation conversion on field 'url'
-Warning	1736	Cannot use range access on index 'PRIMARY' due to type or collation conversion on field 'url'
+Warning	1737	Cannot use ref access on index 'PRIMARY' due to type or collation conversion on field 'url'
+Warning	1737	Cannot use range access on index 'PRIMARY' due to type or collation conversion on field 'url'
 Note	1003	/* select#1 */ select `test`.`t1`.`url` AS `url` from `test`.`t1` where (`test`.`t1`.`url` = <cache>(('1' collate latin1_german2_ci)))
 
 # Normally, range access on primary key is done
@@ -447,7 +447,7 @@ EXPLAIN EXTENDED SELECT * FROM t1 WHERE
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t1	index	PRIMARY	PRIMARY	1	NULL	5	100.00	Using where; Using index
 Warnings:
-Warning	1736	Cannot use range access on index 'PRIMARY' due to type or collation conversion on field 'url'
+Warning	1737	Cannot use range access on index 'PRIMARY' due to type or collation conversion on field 'url'
 Note	1003	/* select#1 */ select `test`.`t1`.`url` AS `url` from `test`.`t1` where (`test`.`t1`.`url` > 3)
 
 # Test that range access on index can't be done due to collation mismatch
@@ -459,7 +459,7 @@ EXPLAIN EXTENDED SELECT * FROM t1 WHERE
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t1	index	PRIMARY	PRIMARY	1	NULL	5	100.00	Using where; Using index
 Warnings:
-Warning	1736	Cannot use range access on index 'PRIMARY' due to type or collation conversion on field 'url'
+Warning	1737	Cannot use range access on index 'PRIMARY' due to type or collation conversion on field 'url'
 Note	1003	/* select#1 */ select `test`.`t1`.`url` AS `url` from `test`.`t1` where (`test`.`t1`.`url` > <cache>(('3' collate latin1_german2_ci)))
 
 DROP TABLE t1;

=== modified file 'mysql-test/r/get_diagnostics.result'
--- a/mysql-test/r/get_diagnostics.result	2012-03-15 09:55:15 +0000
+++ b/mysql-test/r/get_diagnostics.result	2012-03-30 13:35:00 +0000
@@ -232,26 +232,26 @@ GET DIAGNOSTICS CONDITION "1" @var = CLA
 SELECT COUNT(max_questions) INTO @var FROM mysql.user;
 GET DIAGNOSTICS CONDITION 9999 @var = CLASS_ORIGIN;
 Warnings:
-Error	1755	Invalid condition number
+Error	1756	Invalid condition number
 GET DIAGNOSTICS CONDITION NULL @var = CLASS_ORIGIN;
 Warnings:
-Error	1755	Invalid condition number
-Error	1755	Invalid condition number
+Error	1756	Invalid condition number
+Error	1756	Invalid condition number
 GET DIAGNOSTICS CONDITION a @var = CLASS_ORIGIN;
 Warnings:
-Error	1755	Invalid condition number
-Error	1755	Invalid condition number
+Error	1756	Invalid condition number
+Error	1756	Invalid condition number
 Error	1054	Unknown column 'a' in 'field list'
 SELECT COUNT(max_questions) INTO @var FROM mysql.user;
 SET @cond = 1;
 GET DIAGNOSTICS CONDITION @cond @var1 = CLASS_ORIGIN;
 Warnings:
-Error	1755	Invalid condition number
+Error	1756	Invalid condition number
 SET @cond = "invalid";
 GET DIAGNOSTICS CONDITION @cond @var1 = CLASS_ORIGIN;
 Warnings:
-Error	1755	Invalid condition number
-Error	1755	Invalid condition number
+Error	1756	Invalid condition number
+Error	1756	Invalid condition number
 SELECT COUNT(max_questions) INTO @var FROM mysql.user;
 CREATE PROCEDURE p1()
 BEGIN
@@ -301,11 +301,11 @@ Warning	1292	Truncated incorrect DECIMAL
 GET DIAGNOSTICS CONDITION 99999 @var = CLASS_ORIGIN;
 Warnings:
 Warning	1292	Truncated incorrect DECIMAL value: ''
-Error	1755	Invalid condition number
+Error	1756	Invalid condition number
 SHOW WARNINGS;
 Level	Code	Message
 Warning	1292	Truncated incorrect DECIMAL value: ''
-Error	1755	Invalid condition number
+Error	1756	Invalid condition number
 
 # Statement information runtime
 
@@ -488,14 +488,14 @@ CALL p1();
 CAST(-19999999999999999999 AS SIGNED)	-9223372036854775808
 errno1	1292
 msg1	Truncated incorrect DECIMAL value: ''
-errno2	1755
+errno2	1756
 msg2	Invalid condition number
 Warnings:
 Level	Warning
 Code	1292
 Message	Truncated incorrect DECIMAL value: ''
 Level	Error
-Code	1755
+Code	1756
 Message	Invalid condition number
 DROP PROCEDURE p1;
 

=== modified file 'mysql-test/r/innodb_explain_json_non_select_all.result'
--- a/mysql-test/r/innodb_explain_json_non_select_all.result	2012-03-15 09:55:15 +0000
+++ b/mysql-test/r/innodb_explain_json_non_select_all.result	2012-03-30 13:35:00 +0000
@@ -2852,8 +2852,8 @@ EXPLAIN EXTENDED DELETE   FROM t1 WHERE
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t1	ALL	i	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
 EXPLAIN FORMAT=JSON DELETE   FROM t1 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5;;
@@ -2878,18 +2878,18 @@ EXPLAIN
   } /* query_block */
 }
 Warnings:
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
 FLUSH STATUS;
 FLUSH TABLES;
 EXPLAIN EXTENDED SELECT * FROM t1 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t1	ALL	i	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
 Note	1003	/* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`i` AS `i` from `test`.`t1` where ((`test`.`t1`.`i` > 10) and (`test`.`t1`.`i` <= 18)) order by `test`.`t1`.`i` limit 5
 # Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
 Variable_name	Value
@@ -2914,10 +2914,10 @@ EXPLAIN
   } /* query_block */
 }
 Warnings:
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
 Note	1003	/* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`i` AS `i` from `test`.`t1` where ((`test`.`t1`.`i` > 10) and (`test`.`t1`.`i` <= 18)) order by `test`.`t1`.`i` limit 5
 # Status of "equivalent" SELECT query execution:
 Variable_name	Value
@@ -3133,7 +3133,7 @@ EXPLAIN EXTENDED DELETE   FROM t2 WHERE
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t2	ALL	a	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
+Warning	1737	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
 EXPLAIN FORMAT=JSON DELETE   FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;;
@@ -3158,7 +3158,7 @@ EXPLAIN
   } /* query_block */
 }
 Warnings:
-Warning	1736	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
+Warning	1737	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
 FLUSH STATUS;
 FLUSH TABLES;
 EXPLAIN EXTENDED SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
@@ -3226,7 +3226,7 @@ EXPLAIN EXTENDED DELETE   FROM t2 WHERE
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t2	ALL	a	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
+Warning	1737	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
 EXPLAIN FORMAT=JSON DELETE   FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;;
@@ -3251,7 +3251,7 @@ EXPLAIN
   } /* query_block */
 }
 Warnings:
-Warning	1736	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
+Warning	1737	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
 FLUSH STATUS;
 FLUSH TABLES;
 EXPLAIN EXTENDED SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
@@ -3758,8 +3758,8 @@ EXPLAIN EXTENDED UPDATE t2 SET a = 10 WH
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t2	ALL	i	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
 EXPLAIN FORMAT=JSON UPDATE t2 SET a = 10 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5;;
@@ -3784,18 +3784,18 @@ EXPLAIN
   } /* query_block */
 }
 Warnings:
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
 FLUSH STATUS;
 FLUSH TABLES;
 EXPLAIN EXTENDED SELECT * FROM t2     WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t2	ALL	i	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
 Note	1003	/* select#1 */ select `test`.`t2`.`a` AS `a`,`test`.`t2`.`i` AS `i` from `test`.`t2` where ((`test`.`t2`.`i` > 10) and (`test`.`t2`.`i` <= 18)) order by `test`.`t2`.`i` limit 5
 # Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
 Variable_name	Value
@@ -3820,10 +3820,10 @@ EXPLAIN
   } /* query_block */
 }
 Warnings:
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
 Note	1003	/* select#1 */ select `test`.`t2`.`a` AS `a`,`test`.`t2`.`i` AS `i` from `test`.`t2` where ((`test`.`t2`.`i` > 10) and (`test`.`t2`.`i` <= 18)) order by `test`.`t2`.`i` limit 5
 # Status of "equivalent" SELECT query execution:
 Variable_name	Value
@@ -4041,7 +4041,7 @@ EXPLAIN EXTENDED UPDATE t2 SET d = 10 WH
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t2	ALL	a	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
+Warning	1737	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
 EXPLAIN FORMAT=JSON UPDATE t2 SET d = 10 WHERE b = 10 ORDER BY a, c LIMIT 5;;
@@ -4066,7 +4066,7 @@ EXPLAIN
   } /* query_block */
 }
 Warnings:
-Warning	1736	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
+Warning	1737	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
 FLUSH STATUS;
 FLUSH TABLES;
 EXPLAIN EXTENDED SELECT * FROM t2     WHERE b = 10 ORDER BY a, c LIMIT 5;
@@ -4134,7 +4134,7 @@ EXPLAIN EXTENDED UPDATE t2 SET d = 10 WH
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t2	ALL	a	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
+Warning	1737	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
 EXPLAIN FORMAT=JSON UPDATE t2 SET d = 10 WHERE b = 10 ORDER BY a, c LIMIT 5;;
@@ -4159,7 +4159,7 @@ EXPLAIN
   } /* query_block */
 }
 Warnings:
-Warning	1736	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
+Warning	1737	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
 FLUSH STATUS;
 FLUSH TABLES;
 EXPLAIN EXTENDED SELECT * FROM t2     WHERE b = 10 ORDER BY a, c LIMIT 5;

=== modified file 'mysql-test/r/innodb_explain_json_non_select_none.result'
--- a/mysql-test/r/innodb_explain_json_non_select_none.result	2012-03-15 09:55:15 +0000
+++ b/mysql-test/r/innodb_explain_json_non_select_none.result	2012-03-30 13:35:00 +0000
@@ -2869,8 +2869,8 @@ EXPLAIN EXTENDED DELETE   FROM t1 WHERE
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t1	ALL	i	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
 EXPLAIN FORMAT=JSON DELETE   FROM t1 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5;;
@@ -2895,18 +2895,18 @@ EXPLAIN
   } /* query_block */
 }
 Warnings:
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
 FLUSH STATUS;
 FLUSH TABLES;
 EXPLAIN EXTENDED SELECT * FROM t1 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t1	ALL	i	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
 Note	1003	/* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`i` AS `i` from `test`.`t1` where ((`test`.`t1`.`i` > 10) and (`test`.`t1`.`i` <= 18)) order by `test`.`t1`.`i` limit 5
 # Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
 Variable_name	Value
@@ -2931,10 +2931,10 @@ EXPLAIN
   } /* query_block */
 }
 Warnings:
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
 Note	1003	/* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`i` AS `i` from `test`.`t1` where ((`test`.`t1`.`i` > 10) and (`test`.`t1`.`i` <= 18)) order by `test`.`t1`.`i` limit 5
 # Status of "equivalent" SELECT query execution:
 Variable_name	Value
@@ -3150,7 +3150,7 @@ EXPLAIN EXTENDED DELETE   FROM t2 WHERE
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t2	ALL	a	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
+Warning	1737	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
 EXPLAIN FORMAT=JSON DELETE   FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;;
@@ -3175,7 +3175,7 @@ EXPLAIN
   } /* query_block */
 }
 Warnings:
-Warning	1736	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
+Warning	1737	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
 FLUSH STATUS;
 FLUSH TABLES;
 EXPLAIN EXTENDED SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
@@ -3243,7 +3243,7 @@ EXPLAIN EXTENDED DELETE   FROM t2 WHERE
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t2	ALL	a	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
+Warning	1737	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
 EXPLAIN FORMAT=JSON DELETE   FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;;
@@ -3268,7 +3268,7 @@ EXPLAIN
   } /* query_block */
 }
 Warnings:
-Warning	1736	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
+Warning	1737	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
 FLUSH STATUS;
 FLUSH TABLES;
 EXPLAIN EXTENDED SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
@@ -3775,8 +3775,8 @@ EXPLAIN EXTENDED UPDATE t2 SET a = 10 WH
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t2	ALL	i	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
 EXPLAIN FORMAT=JSON UPDATE t2 SET a = 10 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5;;
@@ -3801,18 +3801,18 @@ EXPLAIN
   } /* query_block */
 }
 Warnings:
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
 FLUSH STATUS;
 FLUSH TABLES;
 EXPLAIN EXTENDED SELECT * FROM t2     WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t2	ALL	i	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
 Note	1003	/* select#1 */ select `test`.`t2`.`a` AS `a`,`test`.`t2`.`i` AS `i` from `test`.`t2` where ((`test`.`t2`.`i` > 10) and (`test`.`t2`.`i` <= 18)) order by `test`.`t2`.`i` limit 5
 # Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
 Variable_name	Value
@@ -3837,10 +3837,10 @@ EXPLAIN
   } /* query_block */
 }
 Warnings:
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
 Note	1003	/* select#1 */ select `test`.`t2`.`a` AS `a`,`test`.`t2`.`i` AS `i` from `test`.`t2` where ((`test`.`t2`.`i` > 10) and (`test`.`t2`.`i` <= 18)) order by `test`.`t2`.`i` limit 5
 # Status of "equivalent" SELECT query execution:
 Variable_name	Value
@@ -4058,7 +4058,7 @@ EXPLAIN EXTENDED UPDATE t2 SET d = 10 WH
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t2	ALL	a	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
+Warning	1737	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
 EXPLAIN FORMAT=JSON UPDATE t2 SET d = 10 WHERE b = 10 ORDER BY a, c LIMIT 5;;
@@ -4083,7 +4083,7 @@ EXPLAIN
   } /* query_block */
 }
 Warnings:
-Warning	1736	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
+Warning	1737	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
 FLUSH STATUS;
 FLUSH TABLES;
 EXPLAIN EXTENDED SELECT * FROM t2     WHERE b = 10 ORDER BY a, c LIMIT 5;
@@ -4151,7 +4151,7 @@ EXPLAIN EXTENDED UPDATE t2 SET d = 10 WH
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t2	ALL	a	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
+Warning	1737	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
 EXPLAIN FORMAT=JSON UPDATE t2 SET d = 10 WHERE b = 10 ORDER BY a, c LIMIT 5;;
@@ -4176,7 +4176,7 @@ EXPLAIN
   } /* query_block */
 }
 Warnings:
-Warning	1736	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
+Warning	1737	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
 FLUSH STATUS;
 FLUSH TABLES;
 EXPLAIN EXTENDED SELECT * FROM t2     WHERE b = 10 ORDER BY a, c LIMIT 5;

=== modified file 'mysql-test/r/innodb_explain_non_select_all.result'
--- a/mysql-test/r/innodb_explain_non_select_all.result	2012-03-15 09:55:15 +0000
+++ b/mysql-test/r/innodb_explain_non_select_all.result	2012-03-30 13:35:00 +0000
@@ -1312,8 +1312,8 @@ EXPLAIN EXTENDED DELETE   FROM t1 WHERE
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t1	ALL	i	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
 FLUSH STATUS;
@@ -1322,10 +1322,10 @@ EXPLAIN EXTENDED SELECT * FROM t1 WHERE
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t1	ALL	i	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
 Note	1003	/* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`i` AS `i` from `test`.`t1` where ((`test`.`t1`.`i` > 10) and (`test`.`t1`.`i` <= 18)) order by `test`.`t1`.`i` limit 5
 # Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
 Variable_name	Value
@@ -1459,7 +1459,7 @@ EXPLAIN EXTENDED DELETE   FROM t2 WHERE
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t2	ALL	a	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
+Warning	1737	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
 FLUSH STATUS;
@@ -1510,7 +1510,7 @@ EXPLAIN EXTENDED DELETE   FROM t2 WHERE
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t2	ALL	a	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
+Warning	1737	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
 FLUSH STATUS;
@@ -1780,8 +1780,8 @@ EXPLAIN EXTENDED UPDATE t2 SET a = 10 WH
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t2	ALL	i	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
 FLUSH STATUS;
@@ -1790,10 +1790,10 @@ EXPLAIN EXTENDED SELECT * FROM t2     WH
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t2	ALL	i	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
 Note	1003	/* select#1 */ select `test`.`t2`.`a` AS `a`,`test`.`t2`.`i` AS `i` from `test`.`t2` where ((`test`.`t2`.`i` > 10) and (`test`.`t2`.`i` <= 18)) order by `test`.`t2`.`i` limit 5
 # Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
 Variable_name	Value
@@ -1928,7 +1928,7 @@ EXPLAIN EXTENDED UPDATE t2 SET d = 10 WH
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t2	ALL	a	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
+Warning	1737	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
 FLUSH STATUS;
@@ -1979,7 +1979,7 @@ EXPLAIN EXTENDED UPDATE t2 SET d = 10 WH
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t2	ALL	a	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
+Warning	1737	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
 FLUSH STATUS;

=== modified file 'mysql-test/r/innodb_explain_non_select_none.result'
--- a/mysql-test/r/innodb_explain_non_select_none.result	2012-03-15 09:55:15 +0000
+++ b/mysql-test/r/innodb_explain_non_select_none.result	2012-03-30 13:35:00 +0000
@@ -1314,8 +1314,8 @@ EXPLAIN EXTENDED DELETE   FROM t1 WHERE
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t1	ALL	i	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
 FLUSH STATUS;
@@ -1324,10 +1324,10 @@ EXPLAIN EXTENDED SELECT * FROM t1 WHERE
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t1	ALL	i	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
 Note	1003	/* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`i` AS `i` from `test`.`t1` where ((`test`.`t1`.`i` > 10) and (`test`.`t1`.`i` <= 18)) order by `test`.`t1`.`i` limit 5
 # Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
 Variable_name	Value
@@ -1461,7 +1461,7 @@ EXPLAIN EXTENDED DELETE   FROM t2 WHERE
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t2	ALL	a	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
+Warning	1737	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
 FLUSH STATUS;
@@ -1512,7 +1512,7 @@ EXPLAIN EXTENDED DELETE   FROM t2 WHERE
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t2	ALL	a	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
+Warning	1737	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
 FLUSH STATUS;
@@ -1782,8 +1782,8 @@ EXPLAIN EXTENDED UPDATE t2 SET a = 10 WH
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t2	ALL	i	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
 FLUSH STATUS;
@@ -1792,10 +1792,10 @@ EXPLAIN EXTENDED SELECT * FROM t2     WH
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t2	ALL	i	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
 Note	1003	/* select#1 */ select `test`.`t2`.`a` AS `a`,`test`.`t2`.`i` AS `i` from `test`.`t2` where ((`test`.`t2`.`i` > 10) and (`test`.`t2`.`i` <= 18)) order by `test`.`t2`.`i` limit 5
 # Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
 Variable_name	Value
@@ -1930,7 +1930,7 @@ EXPLAIN EXTENDED UPDATE t2 SET d = 10 WH
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t2	ALL	a	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
+Warning	1737	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
 FLUSH STATUS;
@@ -1981,7 +1981,7 @@ EXPLAIN EXTENDED UPDATE t2 SET d = 10 WH
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t2	ALL	a	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
+Warning	1737	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
 FLUSH STATUS;

=== modified file 'mysql-test/r/myisam_explain_json_non_select_all.result'
--- a/mysql-test/r/myisam_explain_json_non_select_all.result	2012-03-15 09:55:15 +0000
+++ b/mysql-test/r/myisam_explain_json_non_select_all.result	2012-03-30 13:35:00 +0000
@@ -2754,8 +2754,8 @@ EXPLAIN EXTENDED DELETE   FROM t1 WHERE
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t1	ALL	i	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
 EXPLAIN FORMAT=JSON DELETE   FROM t1 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5;;
@@ -2780,18 +2780,18 @@ EXPLAIN
   } /* query_block */
 }
 Warnings:
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
 FLUSH STATUS;
 FLUSH TABLES;
 EXPLAIN EXTENDED SELECT * FROM t1 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t1	ALL	i	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
 Note	1003	/* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`i` AS `i` from `test`.`t1` where ((`test`.`t1`.`i` > 10) and (`test`.`t1`.`i` <= 18)) order by `test`.`t1`.`i` limit 5
 # Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
 Variable_name	Value
@@ -2816,10 +2816,10 @@ EXPLAIN
   } /* query_block */
 }
 Warnings:
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
 Note	1003	/* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`i` AS `i` from `test`.`t1` where ((`test`.`t1`.`i` > 10) and (`test`.`t1`.`i` <= 18)) order by `test`.`t1`.`i` limit 5
 # Status of "equivalent" SELECT query execution:
 Variable_name	Value
@@ -3025,7 +3025,7 @@ EXPLAIN EXTENDED DELETE   FROM t2 WHERE
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t2	ALL	a	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
+Warning	1737	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
 EXPLAIN FORMAT=JSON DELETE   FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;;
@@ -3050,7 +3050,7 @@ EXPLAIN
   } /* query_block */
 }
 Warnings:
-Warning	1736	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
+Warning	1737	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
 FLUSH STATUS;
 FLUSH TABLES;
 EXPLAIN EXTENDED SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
@@ -3114,7 +3114,7 @@ EXPLAIN EXTENDED DELETE   FROM t2 WHERE
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t2	ALL	a	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
+Warning	1737	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
 EXPLAIN FORMAT=JSON DELETE   FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;;
@@ -3139,7 +3139,7 @@ EXPLAIN
   } /* query_block */
 }
 Warnings:
-Warning	1736	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
+Warning	1737	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
 FLUSH STATUS;
 FLUSH TABLES;
 EXPLAIN EXTENDED SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
@@ -3643,8 +3643,8 @@ EXPLAIN EXTENDED UPDATE t2 SET a = 10 WH
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t2	ALL	i	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
 EXPLAIN FORMAT=JSON UPDATE t2 SET a = 10 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5;;
@@ -3669,18 +3669,18 @@ EXPLAIN
   } /* query_block */
 }
 Warnings:
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
 FLUSH STATUS;
 FLUSH TABLES;
 EXPLAIN EXTENDED SELECT * FROM t2     WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t2	ALL	i	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
 Note	1003	/* select#1 */ select `test`.`t2`.`a` AS `a`,`test`.`t2`.`i` AS `i` from `test`.`t2` where ((`test`.`t2`.`i` > 10) and (`test`.`t2`.`i` <= 18)) order by `test`.`t2`.`i` limit 5
 # Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
 Variable_name	Value
@@ -3705,10 +3705,10 @@ EXPLAIN
   } /* query_block */
 }
 Warnings:
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
 Note	1003	/* select#1 */ select `test`.`t2`.`a` AS `a`,`test`.`t2`.`i` AS `i` from `test`.`t2` where ((`test`.`t2`.`i` > 10) and (`test`.`t2`.`i` <= 18)) order by `test`.`t2`.`i` limit 5
 # Status of "equivalent" SELECT query execution:
 Variable_name	Value
@@ -3916,7 +3916,7 @@ EXPLAIN EXTENDED UPDATE t2 SET d = 10 WH
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t2	ALL	a	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
+Warning	1737	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
 EXPLAIN FORMAT=JSON UPDATE t2 SET d = 10 WHERE b = 10 ORDER BY a, c LIMIT 5;;
@@ -3941,7 +3941,7 @@ EXPLAIN
   } /* query_block */
 }
 Warnings:
-Warning	1736	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
+Warning	1737	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
 FLUSH STATUS;
 FLUSH TABLES;
 EXPLAIN EXTENDED SELECT * FROM t2     WHERE b = 10 ORDER BY a, c LIMIT 5;
@@ -4004,7 +4004,7 @@ EXPLAIN EXTENDED UPDATE t2 SET d = 10 WH
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t2	ALL	a	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
+Warning	1737	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
 EXPLAIN FORMAT=JSON UPDATE t2 SET d = 10 WHERE b = 10 ORDER BY a, c LIMIT 5;;
@@ -4029,7 +4029,7 @@ EXPLAIN
   } /* query_block */
 }
 Warnings:
-Warning	1736	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
+Warning	1737	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
 FLUSH STATUS;
 FLUSH TABLES;
 EXPLAIN EXTENDED SELECT * FROM t2     WHERE b = 10 ORDER BY a, c LIMIT 5;

=== modified file 'mysql-test/r/myisam_explain_json_non_select_none.result'
--- a/mysql-test/r/myisam_explain_json_non_select_none.result	2012-03-15 09:55:15 +0000
+++ b/mysql-test/r/myisam_explain_json_non_select_none.result	2012-03-30 13:35:00 +0000
@@ -2769,8 +2769,8 @@ EXPLAIN EXTENDED DELETE   FROM t1 WHERE
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t1	ALL	i	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
 EXPLAIN FORMAT=JSON DELETE   FROM t1 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5;;
@@ -2795,18 +2795,18 @@ EXPLAIN
   } /* query_block */
 }
 Warnings:
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
 FLUSH STATUS;
 FLUSH TABLES;
 EXPLAIN EXTENDED SELECT * FROM t1 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t1	ALL	i	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
 Note	1003	/* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`i` AS `i` from `test`.`t1` where ((`test`.`t1`.`i` > 10) and (`test`.`t1`.`i` <= 18)) order by `test`.`t1`.`i` limit 5
 # Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
 Variable_name	Value
@@ -2831,10 +2831,10 @@ EXPLAIN
   } /* query_block */
 }
 Warnings:
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
 Note	1003	/* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`i` AS `i` from `test`.`t1` where ((`test`.`t1`.`i` > 10) and (`test`.`t1`.`i` <= 18)) order by `test`.`t1`.`i` limit 5
 # Status of "equivalent" SELECT query execution:
 Variable_name	Value
@@ -3040,7 +3040,7 @@ EXPLAIN EXTENDED DELETE   FROM t2 WHERE
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t2	ALL	a	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
+Warning	1737	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
 EXPLAIN FORMAT=JSON DELETE   FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;;
@@ -3065,7 +3065,7 @@ EXPLAIN
   } /* query_block */
 }
 Warnings:
-Warning	1736	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
+Warning	1737	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
 FLUSH STATUS;
 FLUSH TABLES;
 EXPLAIN EXTENDED SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
@@ -3129,7 +3129,7 @@ EXPLAIN EXTENDED DELETE   FROM t2 WHERE
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t2	ALL	a	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
+Warning	1737	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
 EXPLAIN FORMAT=JSON DELETE   FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;;
@@ -3154,7 +3154,7 @@ EXPLAIN
   } /* query_block */
 }
 Warnings:
-Warning	1736	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
+Warning	1737	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
 FLUSH STATUS;
 FLUSH TABLES;
 EXPLAIN EXTENDED SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
@@ -3658,8 +3658,8 @@ EXPLAIN EXTENDED UPDATE t2 SET a = 10 WH
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t2	ALL	i	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
 EXPLAIN FORMAT=JSON UPDATE t2 SET a = 10 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5;;
@@ -3684,18 +3684,18 @@ EXPLAIN
   } /* query_block */
 }
 Warnings:
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
 FLUSH STATUS;
 FLUSH TABLES;
 EXPLAIN EXTENDED SELECT * FROM t2     WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t2	ALL	i	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
 Note	1003	/* select#1 */ select `test`.`t2`.`a` AS `a`,`test`.`t2`.`i` AS `i` from `test`.`t2` where ((`test`.`t2`.`i` > 10) and (`test`.`t2`.`i` <= 18)) order by `test`.`t2`.`i` limit 5
 # Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
 Variable_name	Value
@@ -3720,10 +3720,10 @@ EXPLAIN
   } /* query_block */
 }
 Warnings:
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
 Note	1003	/* select#1 */ select `test`.`t2`.`a` AS `a`,`test`.`t2`.`i` AS `i` from `test`.`t2` where ((`test`.`t2`.`i` > 10) and (`test`.`t2`.`i` <= 18)) order by `test`.`t2`.`i` limit 5
 # Status of "equivalent" SELECT query execution:
 Variable_name	Value
@@ -3931,7 +3931,7 @@ EXPLAIN EXTENDED UPDATE t2 SET d = 10 WH
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t2	ALL	a	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
+Warning	1737	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
 EXPLAIN FORMAT=JSON UPDATE t2 SET d = 10 WHERE b = 10 ORDER BY a, c LIMIT 5;;
@@ -3956,7 +3956,7 @@ EXPLAIN
   } /* query_block */
 }
 Warnings:
-Warning	1736	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
+Warning	1737	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
 FLUSH STATUS;
 FLUSH TABLES;
 EXPLAIN EXTENDED SELECT * FROM t2     WHERE b = 10 ORDER BY a, c LIMIT 5;
@@ -4019,7 +4019,7 @@ EXPLAIN EXTENDED UPDATE t2 SET d = 10 WH
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t2	ALL	a	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
+Warning	1737	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
 EXPLAIN FORMAT=JSON UPDATE t2 SET d = 10 WHERE b = 10 ORDER BY a, c LIMIT 5;;
@@ -4044,7 +4044,7 @@ EXPLAIN
   } /* query_block */
 }
 Warnings:
-Warning	1736	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
+Warning	1737	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
 FLUSH STATUS;
 FLUSH TABLES;
 EXPLAIN EXTENDED SELECT * FROM t2     WHERE b = 10 ORDER BY a, c LIMIT 5;

=== modified file 'mysql-test/r/myisam_explain_non_select_all.result'
--- a/mysql-test/r/myisam_explain_non_select_all.result	2012-03-15 09:55:15 +0000
+++ b/mysql-test/r/myisam_explain_non_select_all.result	2012-03-30 13:35:00 +0000
@@ -1227,8 +1227,8 @@ EXPLAIN EXTENDED DELETE   FROM t1 WHERE
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t1	ALL	i	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
 FLUSH STATUS;
@@ -1237,10 +1237,10 @@ EXPLAIN EXTENDED SELECT * FROM t1 WHERE
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t1	ALL	i	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
 Note	1003	/* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`i` AS `i` from `test`.`t1` where ((`test`.`t1`.`i` > 10) and (`test`.`t1`.`i` <= 18)) order by `test`.`t1`.`i` limit 5
 # Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
 Variable_name	Value
@@ -1364,7 +1364,7 @@ EXPLAIN EXTENDED DELETE   FROM t2 WHERE
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t2	ALL	a	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
+Warning	1737	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
 FLUSH STATUS;
@@ -1411,7 +1411,7 @@ EXPLAIN EXTENDED DELETE   FROM t2 WHERE
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t2	ALL	a	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
+Warning	1737	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
 FLUSH STATUS;
@@ -1674,8 +1674,8 @@ EXPLAIN EXTENDED UPDATE t2 SET a = 10 WH
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t2	ALL	i	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
 FLUSH STATUS;
@@ -1684,10 +1684,10 @@ EXPLAIN EXTENDED SELECT * FROM t2     WH
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t2	ALL	i	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
 Note	1003	/* select#1 */ select `test`.`t2`.`a` AS `a`,`test`.`t2`.`i` AS `i` from `test`.`t2` where ((`test`.`t2`.`i` > 10) and (`test`.`t2`.`i` <= 18)) order by `test`.`t2`.`i` limit 5
 # Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
 Variable_name	Value
@@ -1812,7 +1812,7 @@ EXPLAIN EXTENDED UPDATE t2 SET d = 10 WH
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t2	ALL	a	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
+Warning	1737	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
 FLUSH STATUS;
@@ -1858,7 +1858,7 @@ EXPLAIN EXTENDED UPDATE t2 SET d = 10 WH
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t2	ALL	a	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
+Warning	1737	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
 FLUSH STATUS;

=== modified file 'mysql-test/r/myisam_explain_non_select_none.result'
--- a/mysql-test/r/myisam_explain_non_select_none.result	2012-03-15 09:55:15 +0000
+++ b/mysql-test/r/myisam_explain_non_select_none.result	2012-03-30 13:35:00 +0000
@@ -1227,8 +1227,8 @@ EXPLAIN EXTENDED DELETE   FROM t1 WHERE
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t1	ALL	i	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
 FLUSH STATUS;
@@ -1237,10 +1237,10 @@ EXPLAIN EXTENDED SELECT * FROM t1 WHERE
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t1	ALL	i	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
 Note	1003	/* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`i` AS `i` from `test`.`t1` where ((`test`.`t1`.`i` > 10) and (`test`.`t1`.`i` <= 18)) order by `test`.`t1`.`i` limit 5
 # Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
 Variable_name	Value
@@ -1364,7 +1364,7 @@ EXPLAIN EXTENDED DELETE   FROM t2 WHERE
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t2	ALL	a	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
+Warning	1737	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
 FLUSH STATUS;
@@ -1411,7 +1411,7 @@ EXPLAIN EXTENDED DELETE   FROM t2 WHERE
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t2	ALL	a	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
+Warning	1737	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
 FLUSH STATUS;
@@ -1674,8 +1674,8 @@ EXPLAIN EXTENDED UPDATE t2 SET a = 10 WH
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t2	ALL	i	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
 FLUSH STATUS;
@@ -1684,10 +1684,10 @@ EXPLAIN EXTENDED SELECT * FROM t2     WH
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t2	ALL	i	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
-Warning	1736	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
+Warning	1737	Cannot use range access on index 'i' due to type or collation conversion on field 'i'
 Note	1003	/* select#1 */ select `test`.`t2`.`a` AS `a`,`test`.`t2`.`i` AS `i` from `test`.`t2` where ((`test`.`t2`.`i` > 10) and (`test`.`t2`.`i` <= 18)) order by `test`.`t2`.`i` limit 5
 # Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
 Variable_name	Value
@@ -1812,7 +1812,7 @@ EXPLAIN EXTENDED UPDATE t2 SET d = 10 WH
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t2	ALL	a	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
+Warning	1737	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
 FLUSH STATUS;
@@ -1858,7 +1858,7 @@ EXPLAIN EXTENDED UPDATE t2 SET d = 10 WH
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t2	ALL	a	NULL	NULL	NULL	26	100.00	Using where; Using filesort
 Warnings:
-Warning	1736	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
+Warning	1737	Cannot use range access on index 'a' due to type or collation conversion on field 'b'
 # Status of EXPLAIN EXTENDED query
 Variable_name	Value
 FLUSH STATUS;

=== modified file 'mysql-test/r/partition_error.result'
--- a/mysql-test/r/partition_error.result	2012-03-21 14:27:34 +0000
+++ b/mysql-test/r/partition_error.result	2012-03-30 13:35:00 +0000
@@ -1823,8 +1823,8 @@ PARTITION pMax VALUES LESS THAN MAXVALUE
 "This is a long comment (2050 ascii characters)   50 pMax partition comment .80-!.................. 100 ................................................................................................ 200....................................................................................................................................................................................................................................................................................................... 500 ....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................!
 ........... 1000 ..............1024-|.......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 1500 .......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................!
 ....................... 2000 ......................................204
8-|++"
  (SUBPARTITION `pMaxsp0` ,SUBPARTITION `pMaxsp1` ));
 Warnings:
-Warning	1790	Comment for table partition 'pUpTo10' is too long (max = 1024)
-Warning	1790	Comment for table partition 'pMax' is too long (max = 1024)
+Warning	1791	Comment for table partition 'pUpTo10' is too long (max = 1024)
+Warning	1791	Comment for table partition 'pMax' is too long (max = 1024)
 SHOW CREATE TABLE t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (

=== modified file 'mysql-test/r/partition_exchange.result'
--- a/mysql-test/r/partition_exchange.result	2012-03-15 09:55:15 +0000
+++ b/mysql-test/r/partition_exchange.result	2012-03-30 13:35:00 +0000
@@ -533,8 +533,8 @@ ALTER TABLE tp EXCHANGE PARTITION p0 WIT
 ERROR HY000: Non matching attribute 'MAX_ROWS' between partition and table
 SHOW WARNINGS;
 Level	Code	Message
-Error	1728	Non matching attribute 'MAX_ROWS' between partition and table
-Error	1728	Non matching attribute 'MIN_ROWS' between partition and table
+Error	1729	Non matching attribute 'MAX_ROWS' between partition and table
+Error	1729	Non matching attribute 'MIN_ROWS' between partition and table
 DROP TABLE t;
 RENAME TABLE tmp2 TO t;
 ALTER TABLE t ADD KEY ba_key (b, a);

=== modified file 'mysql-test/r/read_only_innodb.result'
--- a/mysql-test/r/read_only_innodb.result	2012-03-15 09:55:15 +0000
+++ b/mysql-test/r/read_only_innodb.result	2012-03-30 13:35:00 +0000
@@ -97,7 +97,7 @@ a
 2
 ROLLBACK;
 Warnings:
-Warning	1748	The creation of some temporary tables could not be rolled back.
+Warning	1749	The creation of some temporary tables could not be rolled back.
 SELECT * FROM temp;
 a
 DROP TABLE temp;

=== modified file 'mysql-test/r/sp-destruct.result'
--- a/mysql-test/r/sp-destruct.result	2012-03-15 09:55:15 +0000
+++ b/mysql-test/r/sp-destruct.result	2012-03-30 13:35:00 +0000
@@ -148,7 +148,7 @@ alter table mysql.proc drop column type;
 # The below statement should not cause assertion failure.
 drop database mysqltest;
 Warnings:
-Error	1724	Column count of mysql.proc is wrong. Expected 20, found 19. The table is probably corrupted
+Error	1725	Column count of mysql.proc is wrong. Expected 20, found 19. The table is probably corrupted
 # Restore mysql.proc.
 drop table mysql.proc;
 #
@@ -165,7 +165,7 @@ CREATE PROCEDURE db1.p1() SET @foo = 10;
 ALTER TABLE mysql.proc MODIFY comment CHAR (32);
 DROP DATABASE db1;
 Warnings:
-Error	1725	Cannot load from mysql.proc. The table is probably corrupted
+Error	1726	Cannot load from mysql.proc. The table is probably corrupted
 # Restore mysql.proc
 DROP TABLE mysql.proc;
 RENAME TABLE proc_backup TO mysql.proc;

=== modified file 'mysql-test/r/type_time.result'
--- a/mysql-test/r/type_time.result	2012-03-15 09:55:15 +0000
+++ b/mysql-test/r/type_time.result	2012-03-30 13:35:00 +0000
@@ -534,7 +534,7 @@ id	select_type	table	type	possible_keys
 1	SIMPLE	t1	index	col_time_key	col_time_key	4	NULL	5	100.00	Using index
 1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	5	100.00	Using where; Using join buffer (Block Nested Loop)
 Warnings:
-Warning	1736	Cannot use ref access on index 'col_time_key' due to type or collation conversion on field 'col_time_key'
+Warning	1737	Cannot use ref access on index 'col_time_key' due to type or collation conversion on field 'col_time_key'
 Note	1003	/* select#1 */ select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` FORCE INDEX (`col_time_key`) straight_join `test`.`t2` IGNORE INDEX (`col_datetime_key`) where (`test`.`t1`.`col_time_key` = `test`.`t2`.`col_datetime_key`)
 SELECT * FROM
 t1 force INDEX (col_time_key)
@@ -556,7 +556,7 @@ id	select_type	table	type	possible_keys
 1	SIMPLE	t1	index	col_time_key	col_time_key	4	NULL	5	100.00	Using index
 1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	5	100.00	Using where; Using join buffer (Block Nested Loop)
 Warnings:
-Warning	1736	Cannot use ref access on index 'col_time_key' due to type or collation conversion on field 'col_time_key'
+Warning	1737	Cannot use ref access on index 'col_time_key' due to type or collation conversion on field 'col_time_key'
 Note	1003	/* select#1 */ select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` FORCE INDEX (`col_time_key`) straight_join `test`.`t2` IGNORE INDEX (`col_datetime_key`) where (`test`.`t2`.`col_datetime_key` = `test`.`t1`.`col_time_key`)
 SELECT * FROM
 t1 force INDEX (col_time_key)
@@ -578,7 +578,7 @@ id	select_type	table	type	possible_keys
 1	SIMPLE	t1	index	col_time_key	col_time_key	4	NULL	5	100.00	Using where; Using index
 1	SIMPLE	t2	ref	col_datetime_key	col_datetime_key	6	test.t1.col_time_key	1	100.00	Using where; Using index
 Warnings:
-Warning	1736	Cannot use ref access on index 'col_time_key' due to type or collation conversion on field 'col_time_key'
+Warning	1737	Cannot use ref access on index 'col_time_key' due to type or collation conversion on field 'col_time_key'
 Note	1003	/* select#1 */ select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` FORCE INDEX (`col_time_key`) straight_join `test`.`t2` FORCE INDEX (`col_datetime_key`) where (`test`.`t1`.`col_time_key` = `test`.`t2`.`col_datetime_key`)
 SELECT * FROM
 t1 force INDEX (col_time_key)
@@ -600,7 +600,7 @@ id	select_type	table	type	possible_keys
 1	SIMPLE	t1	index	col_time_key	col_time_key	4	NULL	5	100.00	Using where; Using index
 1	SIMPLE	t2	ref	col_datetime_key	col_datetime_key	6	test.t1.col_time_key	1	100.00	Using where; Using index
 Warnings:
-Warning	1736	Cannot use ref access on index 'col_time_key' due to type or collation conversion on field 'col_time_key'
+Warning	1737	Cannot use ref access on index 'col_time_key' due to type or collation conversion on field 'col_time_key'
 Note	1003	/* select#1 */ select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` FORCE INDEX (`col_time_key`) straight_join `test`.`t2` FORCE INDEX (`col_datetime_key`) where (`test`.`t2`.`col_datetime_key` = `test`.`t1`.`col_time_key`)
 SELECT * FROM
 t1 force INDEX (col_time_key)
@@ -664,7 +664,7 @@ id	select_type	table	type	possible_keys
 1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	5	100.00	NULL
 1	SIMPLE	t1	ALL	col_time_key	NULL	NULL	NULL	5	100.00	Range checked for each record (index map: 0x1)
 Warnings:
-Warning	1736	Cannot use ref access on index 'col_time_key' due to type or collation conversion on field 'col_time_key'
+Warning	1737	Cannot use ref access on index 'col_time_key' due to type or collation conversion on field 'col_time_key'
 Note	1003	/* select#1 */ select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` IGNORE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` = `test`.`t2`.`col_datetime_key`)
 SELECT * FROM
 t2 ignore INDEX (col_datetime_key)
@@ -686,7 +686,7 @@ id	select_type	table	type	possible_keys
 1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	5	100.00	NULL
 1	SIMPLE	t1	ALL	col_time_key	NULL	NULL	NULL	5	100.00	Range checked for each record (index map: 0x1)
 Warnings:
-Warning	1736	Cannot use ref access on index 'col_time_key' due to type or collation conversion on field 'col_time_key'
+Warning	1737	Cannot use ref access on index 'col_time_key' due to type or collation conversion on field 'col_time_key'
 Note	1003	/* select#1 */ select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` IGNORE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` = `test`.`t1`.`col_time_key`)
 SELECT * FROM
 t2 ignore INDEX (col_datetime_key)
@@ -750,7 +750,7 @@ id	select_type	table	type	possible_keys
 1	SIMPLE	t2	index	col_datetime_key	col_datetime_key	6	NULL	5	100.00	Using index
 1	SIMPLE	t1	ALL	col_time_key	NULL	NULL	NULL	5	100.00	Range checked for each record (index map: 0x1)
 Warnings:
-Warning	1736	Cannot use ref access on index 'col_time_key' due to type or collation conversion on field 'col_time_key'
+Warning	1737	Cannot use ref access on index 'col_time_key' due to type or collation conversion on field 'col_time_key'
 Note	1003	/* select#1 */ select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` = `test`.`t2`.`col_datetime_key`)
 SELECT * FROM
 t2 force INDEX (col_datetime_key)
@@ -772,7 +772,7 @@ id	select_type	table	type	possible_keys
 1	SIMPLE	t2	index	col_datetime_key	col_datetime_key	6	NULL	5	100.00	Using index
 1	SIMPLE	t1	ALL	col_time_key	NULL	NULL	NULL	5	100.00	Range checked for each record (index map: 0x1)
 Warnings:
-Warning	1736	Cannot use ref access on index 'col_time_key' due to type or collation conversion on field 'col_time_key'
+Warning	1737	Cannot use ref access on index 'col_time_key' due to type or collation conversion on field 'col_time_key'
 Note	1003	/* select#1 */ select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` = `test`.`t1`.`col_time_key`)
 SELECT * FROM
 t2 force INDEX (col_datetime_key)

=== modified file 'mysql-test/r/variables.result'
--- a/mysql-test/r/variables.result	2012-03-15 09:55:15 +0000
+++ b/mysql-test/r/variables.result	2012-03-30 13:35:00 +0000
@@ -1526,7 +1526,7 @@ SET SQL_MODE=DEFAULT;
 SET @@global.max_binlog_cache_size=-1;
 Warnings:
 Warning	1292	Truncated incorrect max_binlog_cache_size value: '-1'
-Warning	1735	Option binlog_cache_size (32768) is greater than max_binlog_cache_size (4096); setting binlog_cache_size equal to max_binlog_cache_size.
+Warning	1736	Option binlog_cache_size (32768) is greater than max_binlog_cache_size (4096); setting binlog_cache_size equal to max_binlog_cache_size.
 SET @@global.max_join_size=0;
 Warnings:
 Warning	1292	Truncated incorrect max_join_size value: '0'

=== modified file 'mysql-test/suite/binlog/r/binlog_rewrite.result'
--- a/mysql-test/suite/binlog/r/binlog_rewrite.result	2012-02-08 13:28:38 +0000
+++ b/mysql-test/suite/binlog/r/binlog_rewrite.result	2012-03-30 13:35:00 +0000
@@ -28,8 +28,8 @@ GRANT ALL on *.* TO test_user1 IDENTIFIE
 CREATE USER test_user2 IDENTIFIED BY 'azundris2';
 CHANGE MASTER TO MASTER_PASSWORD='azundris3';
 Warnings:
-Note	1756	Sending passwords in plain text without SSL/TLS is extremely insecure.
-Note	1757	Storing MySQL user name or password information in the master.info repository is not secure and is therefore not recommended. Please see the MySQL Manual for more about this issue and possible alternatives.
+Note	1757	Sending passwords in plain text without SSL/TLS is extremely insecure.
+Note	1758	Storing MySQL user name or password information in the master.info repository is not secure and is therefore not recommended. Please see the MySQL Manual for more about this issue and possible alternatives.
 CREATE USER 'test_user4'@'localhost';
 SET PASSWORD FOR 'test_user4'@'localhost' = PASSWORD('azundris4');
 include/show_binlog_events.inc

=== modified file 'mysql-test/suite/binlog/r/binlog_unsafe.result'
--- a/mysql-test/suite/binlog/r/binlog_unsafe.result	2012-02-16 23:25:47 +0000
+++ b/mysql-test/suite/binlog/r/binlog_unsafe.result	2012-03-30 13:35:00 +0000
@@ -2679,6 +2679,8 @@ CREATE TABLE replace_table (a INT, b INT
 INSERT INTO replace_table values (1,1),(2,2);
 CREATE TABLE update_table (a INT, b INT, PRIMARY KEY(a));
 INSERT INTO update_table values (1,1),(2,2);
+CREATE TABLE insert_2_keys (a INT UNIQUE KEY, b INT UNIQUE KEY) ENGINE = InnoDB;
+INSERT INTO insert_2_keys values (1, 1);
 INSERT IGNORE INTO insert_table SELECT * FROM filler_table;
 Warnings:
 Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. INSERT IGNORE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are ignored. This order cannot be predicted and may differ on master and the slave.
@@ -2702,10 +2704,15 @@ Note	1592	Unsafe statement written to th
 CREATE TEMPORARY TABLE temp1 (a INT, b INT, PRIMARY KEY(b)) REPLACE SELECT * FROM filler_table;
 Warnings:
 Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. CREATE... REPLACE SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
+INSERT INTO insert_2_keys VALUES (1, 2) 
+ON DUPLICATE KEY UPDATE a=VALUES(a)+10, b=VALUES(b)+10;
+Warnings:
+Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. INSERT... ON DUPLICATE KEY UPDATE  on a table with more than one UNIQUE KEY is unsafe
 DROP TABLE filler_table;
 DROP TABLE insert_table;
 DROP TABLE update_table;
 DROP TABLE replace_table;
 DROP TABLE create_ignore_test;
 DROP TABLE create_replace_test;
+DROP TABLE insert_2_keys;
 "End of tests"

=== modified file 'mysql-test/suite/binlog/t/binlog_unsafe.test'
--- a/mysql-test/suite/binlog/t/binlog_unsafe.test	2012-02-16 23:25:47 +0000
+++ b/mysql-test/suite/binlog/t/binlog_unsafe.test	2012-03-30 13:35:00 +0000
@@ -17,6 +17,7 @@
 #  - CREATE TABLE [IGNORE/REPLACE] SELECT
 #  - INSERT IGNORE...SELECT
 #  - UPDATE IGNORE
+#  - INSERT... ON DUPLICATE KEY UPDATE on a table with two UNIQUE KEYS
 #
 # Note that statements that use stored functions, stored procedures,
 # triggers, views, or prepared statements that invoke unsafe
@@ -715,6 +716,9 @@ DROP TABLE t1;
 #UPDATE IGNORE 
 #CREATE TABLE... IGNORE SELECT 
 #CREATE TABLE... REPLACE SELECT
+#
+###BUG 11765650 - 58637: MARK UPDATES THAT DEPEND ON ORDER OF TWO KEYS UNSAFE 
+#INSERT.... ON DUP KEY UPDATE on a table with more than one UNIQUE KEY
 
 #setup tables
 CREATE TABLE filler_table (a INT, b INT);
@@ -724,6 +728,8 @@ CREATE TABLE replace_table (a INT, b INT
 INSERT INTO replace_table values (1,1),(2,2);
 CREATE TABLE update_table (a INT, b INT, PRIMARY KEY(a));
 INSERT INTO update_table values (1,1),(2,2);
+CREATE TABLE insert_2_keys (a INT UNIQUE KEY, b INT UNIQUE KEY) ENGINE = InnoDB;
+INSERT INTO insert_2_keys values (1, 1);
 
 #INSERT IGNORE... SELECT
 INSERT IGNORE INTO insert_table SELECT * FROM filler_table;
@@ -741,6 +747,10 @@ CREATE TABLE create_replace_test (a INT,
 #temporary tables should not throw the warning.
 CREATE TEMPORARY TABLE temp1 (a INT, b INT, PRIMARY KEY(b)) REPLACE SELECT * FROM filler_table;
 
+#INSERT.... ON DUP KEY UPDATE on a table with more than one UNIQUE KEY
+INSERT INTO insert_2_keys VALUES (1, 2) 
+       ON DUPLICATE KEY UPDATE a=VALUES(a)+10, b=VALUES(b)+10;
+
 ###clean up
 DROP TABLE filler_table;
 DROP TABLE insert_table;
@@ -748,5 +758,6 @@ DROP TABLE update_table;
 DROP TABLE replace_table;
 DROP TABLE create_ignore_test;
 DROP TABLE create_replace_test;
+DROP TABLE insert_2_keys;
 
 --echo "End of tests"

=== modified file 'mysql-test/suite/rpl/r/rpl_alter_repository.result'
--- a/mysql-test/suite/rpl/r/rpl_alter_repository.result	2012-03-29 17:53:11 +0000
+++ b/mysql-test/suite/rpl/r/rpl_alter_repository.result	2012-03-30 13:35:00 +0000
@@ -46,7 +46,7 @@ call mtr.add_suppression(" Error while c
 INSERT INTO t_innodb VALUES (1), (2), (3);
 ALTER TABLE mysql.slave_relay_log_info DROP COLUMN Number_of_workers;
 INSERT INTO t_innodb VALUES (1), (2), (3);
-include/wait_for_slave_sql_error.inc [errno=1724]
+include/wait_for_slave_sql_error.inc [errno=1725]
 Last_SQL_Error = 'Column count of mysql.slave_relay_log_info is wrong. Expected 8, found 7. The table is probably corrupted'
 include/stop_slave_io.inc
 include/rpl_restart_server.inc [server_number=2 parameters: --relay-log-info-repository=FILE --skip-slave-start]
@@ -57,7 +57,7 @@ include/start_slave.inc
 INSERT INTO t_innodb VALUES (1), (2), (3);
 ALTER TABLE mysql.slave_relay_log_info DROP COLUMN Number_of_workers;
 INSERT INTO t_innodb VALUES (1), (2), (3);
-include/wait_for_slave_sql_error.inc [errno=1724]
+include/wait_for_slave_sql_error.inc [errno=1725]
 Last_SQL_Error = 'Column count of mysql.slave_relay_log_info is wrong. Expected 8, found 7. The table is probably corrupted'
 include/stop_slave_io.inc
 START SLAVE SQL_THREAD;

=== modified file 'mysql-test/suite/rpl/r/rpl_known_bugs_detection.result'
--- a/mysql-test/suite/rpl/r/rpl_known_bugs_detection.result	2012-03-23 20:11:19 +0000
+++ b/mysql-test/suite/rpl/r/rpl_known_bugs_detection.result	2012-03-30 13:35:00 +0000
@@ -7,6 +7,8 @@ call mtr.add_suppression("Unsafe stateme
 CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY AUTO_INCREMENT, b INT,
 UNIQUE(b));
 INSERT INTO t1(b) VALUES(1),(1),(2) ON DUPLICATE KEY UPDATE t1.b=10;
+Warnings:
+Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. INSERT... ON DUPLICATE KEY UPDATE  on a table with more than one UNIQUE KEY is unsafe
 SELECT * FROM t1;
 a	b
 1	10

=== modified file 'mysql-test/suite/rpl/r/rpl_mixed_binlog_max_cache_size.result'
--- a/mysql-test/suite/rpl/r/rpl_mixed_binlog_max_cache_size.result	2012-03-23 20:11:19 +0000
+++ b/mysql-test/suite/rpl/r/rpl_mixed_binlog_max_cache_size.result	2012-03-30 13:35:00 +0000
@@ -7,11 +7,11 @@ call mtr.add_suppression("Unsafe stateme
 call mtr.add_suppression("Option binlog_cache_size ");
 SET GLOBAL max_binlog_cache_size = 4096;
 Warnings:
-Warning	1735	Option binlog_cache_size (32768) is greater than max_binlog_cache_size (4096); setting binlog_cache_size equal to max_binlog_cache_size.
+Warning	1736	Option binlog_cache_size (32768) is greater than max_binlog_cache_size (4096); setting binlog_cache_size equal to max_binlog_cache_size.
 SET GLOBAL binlog_cache_size = 4096;
 SET GLOBAL max_binlog_stmt_cache_size = 4096;
 Warnings:
-Warning	1742	Option binlog_stmt_cache_size (32768) is greater than max_binlog_stmt_cache_size (4096); setting binlog_stmt_cache_size equal to max_binlog_stmt_cache_size.
+Warning	1743	Option binlog_stmt_cache_size (32768) is greater than max_binlog_stmt_cache_size (4096); setting binlog_stmt_cache_size equal to max_binlog_stmt_cache_size.
 SET GLOBAL binlog_stmt_cache_size = 4096;
 CREATE TABLE t1(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=Innodb;
 CREATE TABLE t2(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=MyIsam;
@@ -116,11 +116,11 @@ include/diff_tables.inc [master:t1,slave
 # [ On Slave ]
 SET GLOBAL max_binlog_cache_size = 4096;
 Warnings:
-Warning	1735	Option binlog_cache_size (32768) is greater than max_binlog_cache_size (4096); setting binlog_cache_size equal to max_binlog_cache_size.
+Warning	1736	Option binlog_cache_size (32768) is greater than max_binlog_cache_size (4096); setting binlog_cache_size equal to max_binlog_cache_size.
 SET GLOBAL binlog_cache_size = 4096;
 SET GLOBAL max_binlog_stmt_cache_size = 4096;
 Warnings:
-Warning	1742	Option binlog_stmt_cache_size (32768) is greater than max_binlog_stmt_cache_size (4096); setting binlog_stmt_cache_size equal to max_binlog_stmt_cache_size.
+Warning	1743	Option binlog_stmt_cache_size (32768) is greater than max_binlog_stmt_cache_size (4096); setting binlog_stmt_cache_size equal to max_binlog_stmt_cache_size.
 SET GLOBAL binlog_stmt_cache_size = 4096;
 include/stop_slave.inc
 include/start_slave.inc
@@ -154,7 +154,7 @@ count(*)
 ######## CHECK MAX_BINLOG_CACHE_SIZE and BINLOG_CACHE_SIZE #########
 SET @@GLOBAL.MAX_BINLOG_CACHE_SIZE= 8192;
 Warnings:
-Warning	1735	Option binlog_cache_size (32768) is greater than max_binlog_cache_size (8192); setting binlog_cache_size equal to max_binlog_cache_size.
+Warning	1736	Option binlog_cache_size (32768) is greater than max_binlog_cache_size (8192); setting binlog_cache_size equal to max_binlog_cache_size.
 SHOW VARIABLES LIKE 'MAX_BINLOG_CACHE_SIZE';
 Variable_name	Value
 max_binlog_cache_size	8192
@@ -163,7 +163,7 @@ Variable_name	Value
 binlog_cache_size	8192
 SET @@GLOBAL.BINLOG_CACHE_SIZE= 16384;
 Warnings:
-Warning	1735	Option binlog_cache_size (16384) is greater than max_binlog_cache_size (8192); setting binlog_cache_size equal to max_binlog_cache_size.
+Warning	1736	Option binlog_cache_size (16384) is greater than max_binlog_cache_size (8192); setting binlog_cache_size equal to max_binlog_cache_size.
 SHOW VARIABLES LIKE 'MAX_BINLOG_CACHE_SIZE';
 Variable_name	Value
 max_binlog_cache_size	8192
@@ -172,7 +172,7 @@ Variable_name	Value
 binlog_cache_size	8192
 SET @@GLOBAL.MAX_BINLOG_CACHE_SIZE= 4096;
 Warnings:
-Warning	1735	Option binlog_cache_size (8192) is greater than max_binlog_cache_size (4096); setting binlog_cache_size equal to max_binlog_cache_size.
+Warning	1736	Option binlog_cache_size (8192) is greater than max_binlog_cache_size (4096); setting binlog_cache_size equal to max_binlog_cache_size.
 SHOW VARIABLES LIKE 'MAX_BINLOG_CACHE_SIZE';
 Variable_name	Value
 max_binlog_cache_size	4096

=== modified file 'mysql-test/suite/rpl/r/rpl_parallel_start_stop.result'
--- a/mysql-test/suite/rpl/r/rpl_parallel_start_stop.result	2012-03-23 20:11:19 +0000
+++ b/mysql-test/suite/rpl/r/rpl_parallel_start_stop.result	2012-03-30 13:35:00 +0000
@@ -19,7 +19,7 @@ include/wait_for_slave_sql_to_stop.inc
 include/start_slave.inc
 select id from coord_proc_list into @c_id;
 kill query @c_id;
-include/wait_for_slave_sql_error.inc [errno=1753]
+include/wait_for_slave_sql_error.inc [errno=1754]
 include/start_slave.inc
 CREATE TABLE t1 (a int primary key) engine=innodb;
 insert into t1 values (1),(2);
@@ -62,17 +62,17 @@ set @save.slave_transaction_retries= @@g
 set @@global.slave_transaction_retries= 1;
 start slave sql_thread;
 Warnings:
-Note	1750	slave_transaction_retries is not supported in multi-threaded slave mode. In the event of a transient failure, the slave will not retry the transaction and will stop.
+Note	1751	slave_transaction_retries is not supported in multi-threaded slave mode. In the event of a transient failure, the slave will not retry the transaction and will stop.
 include/stop_slave.inc
 create table t2 (a int);
 insert into t2 values (1);
 start slave until master_log_file='master-bin.000001', master_log_pos=MASTER_LOG_POS;
 Warnings:
-Note	1750	UNTIL condtion is not supported in multi-threaded slave mode. Slave is started in the sequential execution mode.
+Note	1751	UNTIL condtion is not supported in multi-threaded slave mode. Slave is started in the sequential execution mode.
 include/wait_for_slave_sql_to_stop.inc
 include/start_slave.inc
 Warnings:
-Note	1750	slave_transaction_retries is not supported in multi-threaded slave mode. In the event of a transient failure, the slave will not retry the transaction and will stop.
+Note	1751	slave_transaction_retries is not supported in multi-threaded slave mode. In the event of a transient failure, the slave will not retry the transaction and will stop.
 drop table t1;
 drop table t2m;
 drop table t2;

=== modified file 'mysql-test/suite/rpl/r/rpl_row_binlog_max_cache_size.result'
--- a/mysql-test/suite/rpl/r/rpl_row_binlog_max_cache_size.result	2012-03-23 20:11:19 +0000
+++ b/mysql-test/suite/rpl/r/rpl_row_binlog_max_cache_size.result	2012-03-30 13:35:00 +0000
@@ -7,11 +7,11 @@ call mtr.add_suppression("Unsafe stateme
 call mtr.add_suppression("Option binlog_cache_size ");
 SET GLOBAL max_binlog_cache_size = 4096;
 Warnings:
-Warning	1735	Option binlog_cache_size (32768) is greater than max_binlog_cache_size (4096); setting binlog_cache_size equal to max_binlog_cache_size.
+Warning	1736	Option binlog_cache_size (32768) is greater than max_binlog_cache_size (4096); setting binlog_cache_size equal to max_binlog_cache_size.
 SET GLOBAL binlog_cache_size = 4096;
 SET GLOBAL max_binlog_stmt_cache_size = 4096;
 Warnings:
-Warning	1742	Option binlog_stmt_cache_size (32768) is greater than max_binlog_stmt_cache_size (4096); setting binlog_stmt_cache_size equal to max_binlog_stmt_cache_size.
+Warning	1743	Option binlog_stmt_cache_size (32768) is greater than max_binlog_stmt_cache_size (4096); setting binlog_stmt_cache_size equal to max_binlog_stmt_cache_size.
 SET GLOBAL binlog_stmt_cache_size = 4096;
 CREATE TABLE t1(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=Innodb;
 CREATE TABLE t2(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=MyIsam;
@@ -117,11 +117,11 @@ include/diff_tables.inc [master:t1,slave
 # [ On Slave ]
 SET GLOBAL max_binlog_cache_size = 4096;
 Warnings:
-Warning	1735	Option binlog_cache_size (32768) is greater than max_binlog_cache_size (4096); setting binlog_cache_size equal to max_binlog_cache_size.
+Warning	1736	Option binlog_cache_size (32768) is greater than max_binlog_cache_size (4096); setting binlog_cache_size equal to max_binlog_cache_size.
 SET GLOBAL binlog_cache_size = 4096;
 SET GLOBAL max_binlog_stmt_cache_size = 4096;
 Warnings:
-Warning	1742	Option binlog_stmt_cache_size (32768) is greater than max_binlog_stmt_cache_size (4096); setting binlog_stmt_cache_size equal to max_binlog_stmt_cache_size.
+Warning	1743	Option binlog_stmt_cache_size (32768) is greater than max_binlog_stmt_cache_size (4096); setting binlog_stmt_cache_size equal to max_binlog_stmt_cache_size.
 SET GLOBAL binlog_stmt_cache_size = 4096;
 include/stop_slave.inc
 include/start_slave.inc
@@ -155,7 +155,7 @@ count(*)
 ######## CHECK MAX_BINLOG_CACHE_SIZE and BINLOG_CACHE_SIZE #########
 SET @@GLOBAL.MAX_BINLOG_CACHE_SIZE= 8192;
 Warnings:
-Warning	1735	Option binlog_cache_size (32768) is greater than max_binlog_cache_size (8192); setting binlog_cache_size equal to max_binlog_cache_size.
+Warning	1736	Option binlog_cache_size (32768) is greater than max_binlog_cache_size (8192); setting binlog_cache_size equal to max_binlog_cache_size.
 SHOW VARIABLES LIKE 'MAX_BINLOG_CACHE_SIZE';
 Variable_name	Value
 max_binlog_cache_size	8192
@@ -164,7 +164,7 @@ Variable_name	Value
 binlog_cache_size	8192
 SET @@GLOBAL.BINLOG_CACHE_SIZE= 16384;
 Warnings:
-Warning	1735	Option binlog_cache_size (16384) is greater than max_binlog_cache_size (8192); setting binlog_cache_size equal to max_binlog_cache_size.
+Warning	1736	Option binlog_cache_size (16384) is greater than max_binlog_cache_size (8192); setting binlog_cache_size equal to max_binlog_cache_size.
 SHOW VARIABLES LIKE 'MAX_BINLOG_CACHE_SIZE';
 Variable_name	Value
 max_binlog_cache_size	8192
@@ -173,7 +173,7 @@ Variable_name	Value
 binlog_cache_size	8192
 SET @@GLOBAL.MAX_BINLOG_CACHE_SIZE= 4096;
 Warnings:
-Warning	1735	Option binlog_cache_size (8192) is greater than max_binlog_cache_size (4096); setting binlog_cache_size equal to max_binlog_cache_size.
+Warning	1736	Option binlog_cache_size (8192) is greater than max_binlog_cache_size (4096); setting binlog_cache_size equal to max_binlog_cache_size.
 SHOW VARIABLES LIKE 'MAX_BINLOG_CACHE_SIZE';
 Variable_name	Value
 max_binlog_cache_size	4096

=== modified file 'mysql-test/suite/rpl/r/rpl_stm_binlog_max_cache_size.result'
--- a/mysql-test/suite/rpl/r/rpl_stm_binlog_max_cache_size.result	2012-03-23 20:11:19 +0000
+++ b/mysql-test/suite/rpl/r/rpl_stm_binlog_max_cache_size.result	2012-03-30 13:35:00 +0000
@@ -7,11 +7,11 @@ call mtr.add_suppression("Unsafe stateme
 call mtr.add_suppression("Option binlog_cache_size ");
 SET GLOBAL max_binlog_cache_size = 4096;
 Warnings:
-Warning	1735	Option binlog_cache_size (32768) is greater than max_binlog_cache_size (4096); setting binlog_cache_size equal to max_binlog_cache_size.
+Warning	1736	Option binlog_cache_size (32768) is greater than max_binlog_cache_size (4096); setting binlog_cache_size equal to max_binlog_cache_size.
 SET GLOBAL binlog_cache_size = 4096;
 SET GLOBAL max_binlog_stmt_cache_size = 4096;
 Warnings:
-Warning	1742	Option binlog_stmt_cache_size (32768) is greater than max_binlog_stmt_cache_size (4096); setting binlog_stmt_cache_size equal to max_binlog_stmt_cache_size.
+Warning	1743	Option binlog_stmt_cache_size (32768) is greater than max_binlog_stmt_cache_size (4096); setting binlog_stmt_cache_size equal to max_binlog_stmt_cache_size.
 SET GLOBAL binlog_stmt_cache_size = 4096;
 CREATE TABLE t1(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=Innodb;
 CREATE TABLE t2(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=MyIsam;
@@ -116,11 +116,11 @@ include/diff_tables.inc [master:t1,slave
 # [ On Slave ]
 SET GLOBAL max_binlog_cache_size = 4096;
 Warnings:
-Warning	1735	Option binlog_cache_size (32768) is greater than max_binlog_cache_size (4096); setting binlog_cache_size equal to max_binlog_cache_size.
+Warning	1736	Option binlog_cache_size (32768) is greater than max_binlog_cache_size (4096); setting binlog_cache_size equal to max_binlog_cache_size.
 SET GLOBAL binlog_cache_size = 4096;
 SET GLOBAL max_binlog_stmt_cache_size = 4096;
 Warnings:
-Warning	1742	Option binlog_stmt_cache_size (32768) is greater than max_binlog_stmt_cache_size (4096); setting binlog_stmt_cache_size equal to max_binlog_stmt_cache_size.
+Warning	1743	Option binlog_stmt_cache_size (32768) is greater than max_binlog_stmt_cache_size (4096); setting binlog_stmt_cache_size equal to max_binlog_stmt_cache_size.
 SET GLOBAL binlog_stmt_cache_size = 4096;
 include/stop_slave.inc
 include/start_slave.inc
@@ -154,7 +154,7 @@ count(*)
 ######## CHECK MAX_BINLOG_CACHE_SIZE and BINLOG_CACHE_SIZE #########
 SET @@GLOBAL.MAX_BINLOG_CACHE_SIZE= 8192;
 Warnings:
-Warning	1735	Option binlog_cache_size (32768) is greater than max_binlog_cache_size (8192); setting binlog_cache_size equal to max_binlog_cache_size.
+Warning	1736	Option binlog_cache_size (32768) is greater than max_binlog_cache_size (8192); setting binlog_cache_size equal to max_binlog_cache_size.
 SHOW VARIABLES LIKE 'MAX_BINLOG_CACHE_SIZE';
 Variable_name	Value
 max_binlog_cache_size	8192
@@ -163,7 +163,7 @@ Variable_name	Value
 binlog_cache_size	8192
 SET @@GLOBAL.BINLOG_CACHE_SIZE= 16384;
 Warnings:
-Warning	1735	Option binlog_cache_size (16384) is greater than max_binlog_cache_size (8192); setting binlog_cache_size equal to max_binlog_cache_size.
+Warning	1736	Option binlog_cache_size (16384) is greater than max_binlog_cache_size (8192); setting binlog_cache_size equal to max_binlog_cache_size.
 SHOW VARIABLES LIKE 'MAX_BINLOG_CACHE_SIZE';
 Variable_name	Value
 max_binlog_cache_size	8192
@@ -172,7 +172,7 @@ Variable_name	Value
 binlog_cache_size	8192
 SET @@GLOBAL.MAX_BINLOG_CACHE_SIZE= 4096;
 Warnings:
-Warning	1735	Option binlog_cache_size (8192) is greater than max_binlog_cache_size (4096); setting binlog_cache_size equal to max_binlog_cache_size.
+Warning	1736	Option binlog_cache_size (8192) is greater than max_binlog_cache_size (4096); setting binlog_cache_size equal to max_binlog_cache_size.
 SHOW VARIABLES LIKE 'MAX_BINLOG_CACHE_SIZE';
 Variable_name	Value
 max_binlog_cache_size	4096

=== modified file 'mysql-test/suite/rpl/t/rpl_alter_repository.test'
--- a/mysql-test/suite/rpl/t/rpl_alter_repository.test	2012-03-29 17:53:11 +0000
+++ b/mysql-test/suite/rpl/t/rpl_alter_repository.test	2012-03-30 13:35:00 +0000
@@ -59,7 +59,7 @@ ALTER TABLE mysql.slave_relay_log_info D
 --connection master
 INSERT INTO t_innodb VALUES (1), (2), (3);
 --connection slave
---let $slave_sql_errno= 1724
+--let $slave_sql_errno= 1725
 --let $show_slave_sql_error= 1
 --source include/wait_for_slave_sql_error.inc
 --source include/stop_slave_io.inc
@@ -96,7 +96,7 @@ ALTER TABLE mysql.slave_relay_log_info D
 --connection master
 INSERT INTO t_innodb VALUES (1), (2), (3);
 --connection slave
---let $slave_sql_errno= 1724
+--let $slave_sql_errno= 1725
 --let $show_slave_sql_error= 1
 --source include/wait_for_slave_sql_error.inc
 --source include/stop_slave_io.inc

=== modified file 'mysql-test/suite/rpl/t/rpl_parallel_start_stop.test'
--- a/mysql-test/suite/rpl/t/rpl_parallel_start_stop.test	2012-03-15 09:55:15 +0000
+++ b/mysql-test/suite/rpl/t/rpl_parallel_start_stop.test	2012-03-30 13:35:00 +0000
@@ -68,7 +68,7 @@ let $count= 0;
 let $table= worker_proc_list;
 source include/wait_until_rows_count.inc;
 
-let $slave_sql_errno= 1753; # ER_MTS_PARALLEL_INCONSISTENT_DATA
+let $slave_sql_errno= 1754; # ER_MTS_PARALLEL_INCONSISTENT_DATA
 source include/wait_for_slave_sql_error.inc;
 
 source include/start_slave.inc;

=== modified file 'mysql-test/suite/sys_vars/r/max_binlog_cache_size_basic.result'
--- a/mysql-test/suite/sys_vars/r/max_binlog_cache_size_basic.result	2012-03-15 09:55:15 +0000
+++ b/mysql-test/suite/sys_vars/r/max_binlog_cache_size_basic.result	2012-03-30 13:35:00 +0000
@@ -10,7 +10,7 @@ SELECT @start_binlog_cache_size;
 SET @@global.max_binlog_cache_size = 5000;
 Warnings:
 Warning	1292	Truncated incorrect max_binlog_cache_size value: '5000'
-Warning	1735	Option binlog_cache_size (32768) is greater than max_binlog_cache_size (4096); setting binlog_cache_size equal to max_binlog_cache_size.
+Warning	1736	Option binlog_cache_size (32768) is greater than max_binlog_cache_size (4096); setting binlog_cache_size equal to max_binlog_cache_size.
 SET @@global.max_binlog_cache_size = DEFAULT;
 SELECT @@global.max_binlog_cache_size;
 @@global.max_binlog_cache_size

=== modified file 'mysql-test/suite/sys_vars/r/max_binlog_stmt_cache_size_basic.result'
--- a/mysql-test/suite/sys_vars/r/max_binlog_stmt_cache_size_basic.result	2012-03-15 09:55:15 +0000
+++ b/mysql-test/suite/sys_vars/r/max_binlog_stmt_cache_size_basic.result	2012-03-30 13:35:00 +0000
@@ -10,7 +10,7 @@ SELECT @start_binlog_stmt_cache_size;
 SET @@global.max_binlog_stmt_cache_size = 5000;
 Warnings:
 Warning	1292	Truncated incorrect max_binlog_stmt_cache_size value: '5000'
-Warning	1742	Option binlog_stmt_cache_size (32768) is greater than max_binlog_stmt_cache_size (4096); setting binlog_stmt_cache_size equal to max_binlog_stmt_cache_size.
+Warning	1743	Option binlog_stmt_cache_size (32768) is greater than max_binlog_stmt_cache_size (4096); setting binlog_stmt_cache_size equal to max_binlog_stmt_cache_size.
 SET @@global.max_binlog_stmt_cache_size = DEFAULT;
 SELECT @@global.max_binlog_stmt_cache_size;
 @@global.max_binlog_stmt_cache_size

=== modified file 'sql/share/errmsg-utf8.txt'
--- a/sql/share/errmsg-utf8.txt	2012-03-28 15:24:17 +0000
+++ b/sql/share/errmsg-utf8.txt	2012-03-30 13:35:00 +0000
@@ -6496,6 +6496,9 @@ ER_BINLOG_UNSAFE_WRITE_AUTOINC_SELECT
 ER_BINLOG_UNSAFE_CREATE_SELECT_AUTOINC
   eng "CREATE TABLE... SELECT...  on a table with an auto-increment column is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are inserted. This order cannot be predicted and may differ on master and the slave."
 
+ER_BINLOG_UNSAFE_INSERT_TWO_KEYS
+  eng "INSERT... ON DUPLICATE KEY UPDATE  on a table with more than one UNIQUE KEY is unsafe"
+
 #
 #  End of 5.5 error messages.
 #

=== modified file 'sql/sql_base.cc'
--- a/sql/sql_base.cc	2012-03-08 14:22:07 +0000
+++ b/sql/sql_base.cc	2012-03-30 13:35:00 +0000
@@ -5880,6 +5880,31 @@ bool lock_tables(THD *thd, TABLE_LIST *t
         has_write_table_with_auto_increment_and_select(tables))
       thd->lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_WRITE_AUTOINC_SELECT);
 
+    /* 
+     INSERT...ON DUPLICATE KEY UPDATE on a table with more than one unique keys
+     can be unsafe.
+     */
+    uint unique_keys= 0;
+    for (TABLE_LIST *query_table= tables; query_table && unique_keys <= 1;
+         query_table= query_table->next_global)
+      if(query_table->table)
+      {
+        uint keys= query_table->table->s->keys, i= 0;
+        unique_keys= 0;
+        for (KEY* keyinfo= query_table->table->s->key_info;
+             i < keys && unique_keys <= 1; i++, keyinfo++)
+        {
+          if (keyinfo->flags & HA_NOSAME)
+            unique_keys++;
+        }
+        if (!query_table->placeholder() &&
+            query_table->lock_type >= TL_WRITE_ALLOW_WRITE &&
+            unique_keys > 1 && thd->lex->sql_command == SQLCOM_INSERT &&
+            thd->lex->duplicates == DUP_UPDATE)
+          thd->lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_INSERT_TWO_KEYS);
+      }
+ 
+ 
     /* We have to emulate LOCK TABLES if we are statement needs prelocking. */
     if (thd->lex->requires_prelocking())
     {

=== modified file 'sql/sql_lex.cc'
--- a/sql/sql_lex.cc	2012-03-29 13:23:06 +0000
+++ b/sql/sql_lex.cc	2012-03-30 13:35:00 +0000
@@ -71,7 +71,8 @@ Query_tables_list::binlog_stmt_unsafe_er
   ER_BINLOG_UNSAFE_CREATE_IGNORE_SELECT,
   ER_BINLOG_UNSAFE_CREATE_REPLACE_SELECT,
   ER_BINLOG_UNSAFE_CREATE_SELECT_AUTOINC,
-  ER_BINLOG_UNSAFE_UPDATE_IGNORE
+  ER_BINLOG_UNSAFE_UPDATE_IGNORE,
+  ER_BINLOG_UNSAFE_INSERT_TWO_KEYS
 };
 
 

=== modified file 'sql/sql_lex.h'
--- a/sql/sql_lex.h	2012-03-29 13:23:06 +0000
+++ b/sql/sql_lex.h	2012-03-30 13:35:00 +0000
@@ -1249,6 +1249,12 @@ public:
     */
     BINLOG_STMT_UNSAFE_UPDATE_IGNORE,
 
+    /**
+      INSERT... ON DUPLICATE KEY UPDATE on a table with more than one
+      UNIQUE KEYS  is unsafe.
+    */
+    BINLOG_STMT_UNSAFE_INSERT_TWO_KEYS,
+
     /* The last element of this enumeration type. */
     BINLOG_STMT_UNSAFE_COUNT
   };

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (rohit.kalhans:3824 to 3825) Rohit Kalhans31 Mar