List:Commits« Previous MessageNext Message »
From:Georgi Kodinov Date:November 26 2010 3:46pm
Subject:bzr commit into mysql-trunk-bugfixing branch (Georgi.Kodinov:3398)
View as plain text  
#At file:///home/kgeorge/mysql/work/merge-trunk-bugfixing/ based on revid:georgi.kodinov@stripped-1madqlxmrbkt14f5

 3398 Georgi Kodinov	2010-11-26 [merge]
      merge

    removed:
      mysql-test/suite/optimizer_unfixed_bugs/
      mysql-test/suite/optimizer_unfixed_bugs/README.txt
      mysql-test/suite/optimizer_unfixed_bugs/r/
      mysql-test/suite/optimizer_unfixed_bugs/r/bug42991.result
      mysql-test/suite/optimizer_unfixed_bugs/r/bug49129.result
      mysql-test/suite/optimizer_unfixed_bugs/t/
      mysql-test/suite/optimizer_unfixed_bugs/t/bug42991.test
      mysql-test/suite/optimizer_unfixed_bugs/t/bug49129.test
    added:
      mysql-test/include/ctype_8bit.inc
      mysql-test/include/ctype_czech.inc
      mysql-test/include/ctype_like_ignorable.inc
      mysql-test/r/ctype_like_range.result
      mysql-test/t/ctype_like_range.test
    modified:
      client/mysql.cc
      client/mysqlbinlog.cc
      client/mysqlcheck.c
      client/mysqltest.cc
      extra/comp_err.c
      extra/resolve_stack_dump.c
      include/m_ctype.h
      include/my_sys.h
      mysql-test/extra/rpl_tests/rpl_change_master_bind.inc
      mysql-test/include/icp_tests.inc
      mysql-test/r/create.result
      mysql-test/r/ctype_binary.result
      mysql-test/r/ctype_collate.result
      mysql-test/r/ctype_cp1251.result
      mysql-test/r/ctype_latin1.result
      mysql-test/r/ctype_uca.result
      mysql-test/r/ctype_utf16_uca.result
      mysql-test/r/ctype_utf32_uca.result
      mysql-test/r/ctype_utf8.result
      mysql-test/r/ctype_utf8mb4_uca.result
      mysql-test/r/explain.result
      mysql-test/r/index_merge_innodb.result
      mysql-test/r/index_merge_myisam.result
      mysql-test/r/innodb_icp.result
      mysql-test/r/innodb_icp_all.result
      mysql-test/r/innodb_icp_none.result
      mysql-test/r/innodb_mrr_none.result
      mysql-test/r/join_cache_jcl1.result
      mysql-test/r/join_nested.result
      mysql-test/r/join_optimizer.result
      mysql-test/r/merge.result
      mysql-test/r/mix2_myisam.result
      mysql-test/r/myisam.result
      mysql-test/r/myisam_icp.result
      mysql-test/r/myisam_icp_all.result
      mysql-test/r/myisam_icp_none.result
      mysql-test/r/mysql.result
      mysql-test/r/mysqld--help-notwin.result
      mysql-test/r/mysqld--help-win.result
      mysql-test/r/null.result
      mysql-test/r/optimizer_switch.result
      mysql-test/r/ps_1general.result
      mysql-test/r/subquery_all.result
      mysql-test/r/subquery_all_jcl6.result
      mysql-test/r/subquery_nomat_nosj.result
      mysql-test/r/subquery_nomat_nosj_jcl6.result
      mysql-test/r/subquery_none_jcl6.result
      mysql-test/suite/innodb/r/innodb.result
      mysql-test/suite/innodb/r/innodb_lock_wait_timeout_1.result
      mysql-test/suite/innodb/r/innodb_mysql.result
      mysql-test/suite/rpl/r/rpl_change_master.result
      mysql-test/suite/rpl/r/rpl_change_master_crash_safe.result
      mysql-test/suite/sys_vars/r/optimizer_switch_basic.result
      mysql-test/t/ctype_cp1251.test
      mysql-test/t/ctype_uca.test
      mysql-test/t/ctype_utf16_uca.test
      mysql-test/t/ctype_utf32_uca.test
      mysql-test/t/ctype_utf8mb4_uca.test
      mysql-test/t/mysql.test
      mysys/array.c
      mysys/default.c
      mysys/mf_tempdir.c
      sql-common/client.c
      sql/item_create.cc
      sql/item_func.cc
      sql/item_strfunc.cc
      sql/item_strfunc.h
      sql/mysqld.cc
      sql/opt_range.cc
      sql/rpl_filter.cc
      sql/rpl_handler.cc
      sql/rpl_mi.cc
      sql/rpl_slave.cc
      sql/set_var.h
      sql/share/charsets/cp1251.xml
      sql/sp_head.cc
      sql/sp_pcontext.cc
      sql/sp_pcontext.h
      sql/sql_array.h
      sql/sql_audit.cc
      sql/sql_plugin.cc
      sql/sql_priv.h
      sql/sql_select.cc
      sql/sql_select.h
      sql/sql_show.cc
      sql/sql_test.cc
      sql/sys_vars.cc
      sql/uniques.cc
      storage/federated/ha_federated.cc
      strings/ctype-extra.c
      strings/ctype-mb.c
      strings/ctype-uca.c
      strings/ctype-ucs2.c
=== modified file 'client/mysql.cc'
--- a/client/mysql.cc	2010-10-25 13:49:55 +0000
+++ b/client/mysql.cc	2010-11-26 14:37:59 +0000
@@ -1460,8 +1460,8 @@ static struct my_option my_long_options[
    &opt_sigint_ignore,  &opt_sigint_ignore, 0, GET_BOOL,
    NO_ARG, 0, 0, 0, 0, 0, 0},
   {"one-database", 'o',
-   "Only update the default database. This is useful for skipping updates "
-   "to other database in the update log.",
+   "Ignore statements except those that occur while the default "
+   "database is the one named at the command line.",
    0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
 #ifdef USE_POPEN
   {"pager", OPT_PAGER,
@@ -2696,6 +2696,10 @@ static void get_current_db()
 {
   MYSQL_RES *res;
 
+  /* If one_database is set, current_db is not supposed to change. */
+  if (one_database)
+    return;
+
   my_free(current_db);
   current_db= NULL;
   /* In case of error below current_db will be NULL */

=== modified file 'client/mysqlbinlog.cc'
--- a/client/mysqlbinlog.cc	2010-11-18 04:37:26 +0000
+++ b/client/mysqlbinlog.cc	2010-11-26 13:46:21 +0000
@@ -463,7 +463,7 @@ Exit_status Load_log_processor::process_
      after Execute_load_query_log_event or Execute_load_log_event
      will have been processed, otherwise in Load_log_processor::destroy()
   */
-  if (set_dynamic(&file_names, (uchar*)&rec, file_id))
+  if (set_dynamic(&file_names, &rec, file_id))
   {
     error("Out of memory.");
     my_free(fname);

=== modified file 'client/mysqlcheck.c'
--- a/client/mysqlcheck.c	2010-10-25 13:49:55 +0000
+++ b/client/mysqlcheck.c	2010-11-05 22:14:29 +0000
@@ -754,7 +754,7 @@ static void print_result()
       */
       if (found_error && opt_auto_repair && what_to_do != DO_REPAIR &&
 	  strcmp(row[3],"OK"))
-	insert_dynamic(&tables4repair, (uchar*) prev);
+	insert_dynamic(&tables4repair, prev);
       found_error=0;
       if (opt_silent)
 	continue;
@@ -774,7 +774,7 @@ static void print_result()
   }
   /* add the last table to be repaired to the list */
   if (found_error && opt_auto_repair && what_to_do != DO_REPAIR)
-    insert_dynamic(&tables4repair, (uchar*) prev);
+    insert_dynamic(&tables4repair, prev);
   mysql_free_result(res);
 }
 

=== modified file 'client/mysqltest.cc'
--- a/client/mysqltest.cc	2010-11-19 11:37:11 +0000
+++ b/client/mysqltest.cc	2010-11-26 13:46:21 +0000
@@ -6214,7 +6214,7 @@ int read_command(struct st_command** com
   if (!(*command_ptr= command=
         (struct st_command*) my_malloc(sizeof(*command),
                                        MYF(MY_WME|MY_ZEROFILL))) ||
-      insert_dynamic(&q_lines, (uchar*) &command))
+      insert_dynamic(&q_lines, &command))
     die("Out of memory");
   command->type= Q_UNKNOWN;
 
@@ -6713,7 +6713,7 @@ void init_win_path_patterns()
       continue;
     }
 
-    if (insert_dynamic(&patterns, (uchar*) &p))
+    if (insert_dynamic(&patterns, &p))
       die("Out of memory");
 
     DBUG_PRINT("info", ("p: %s", p));
@@ -9225,7 +9225,7 @@ struct st_replace_regex* init_replace_re
       reg.icase= 1;
 
     /* done parsing the statement, now place it in regex_arr */
-    if (insert_dynamic(&res->regex_arr,(uchar*) &reg))
+    if (insert_dynamic(&res->regex_arr, &reg))
       die("Out of memory");
   }
   res->odd_buf_len= res->even_buf_len= 8192;
@@ -10241,7 +10241,7 @@ void dynstr_append_sorted(DYNAMIC_STRING
     *line_end= 0;
 
     /* Insert pointer to the line in array */
-    if (insert_dynamic(&lines, (uchar*) &start))
+    if (insert_dynamic(&lines, &start))
       die("Out of memory inserting lines to sort");
 
     start= line_end+1;

=== modified file 'extra/comp_err.c'
--- a/extra/comp_err.c	2010-07-20 19:30:10 +0000
+++ b/extra/comp_err.c	2010-11-05 22:14:29 +0000
@@ -496,7 +496,7 @@ static int parse_input_file(const char *
 		current_error->er_name, current_message.lang_short_name);
 	DBUG_RETURN(0);
       }
-      if (insert_dynamic(&current_error->msg, (uchar *) & current_message))
+      if (insert_dynamic(&current_error->msg, &current_message))
 	DBUG_RETURN(0);
       continue;
     }

=== modified file 'extra/resolve_stack_dump.c'
--- a/extra/resolve_stack_dump.c	2010-07-23 20:15:07 +0000
+++ b/extra/resolve_stack_dump.c	2010-11-05 22:14:29 +0000
@@ -230,7 +230,7 @@ static void init_sym_table()
     SYM_ENTRY se;
     if (init_sym_entry(&se, buf))
       continue;
-    if (insert_dynamic(&sym_table, (uchar*)&se))
+    if (insert_dynamic(&sym_table, &se))
       die("insert_dynamic() failed - looks like we are out of memory");
   }
 

=== modified file 'include/m_ctype.h'
--- a/include/m_ctype.h	2010-10-13 23:16:09 +0000
+++ b/include/m_ctype.h	2010-11-26 11:36:39 +0000
@@ -517,6 +517,7 @@ ulonglong my_strntoull10rnd_ucs2(CHARSET
 
 void my_fill_8bit(CHARSET_INFO *cs, char* to, size_t l, int fill);
 
+/* For 8-bit character set */
 my_bool  my_like_range_simple(CHARSET_INFO *cs,
 			      const char *ptr, size_t ptr_length,
 			      pbool escape, pbool w_one, pbool w_many,
@@ -524,6 +525,7 @@ my_bool  my_like_range_simple(CHARSET_IN
 			      char *min_str, char *max_str,
 			      size_t *min_length, size_t *max_length);
 
+/* For ASCII-based multi-byte character sets with mbminlen=1 */
 my_bool  my_like_range_mb(CHARSET_INFO *cs,
 			  const char *ptr, size_t ptr_length,
 			  pbool escape, pbool w_one, pbool w_many,
@@ -531,26 +533,13 @@ my_bool  my_like_range_mb(CHARSET_INFO *
 			  char *min_str, char *max_str,
 			  size_t *min_length, size_t *max_length);
 
-my_bool  my_like_range_ucs2(CHARSET_INFO *cs,
-			    const char *ptr, size_t ptr_length,
-			    pbool escape, pbool w_one, pbool w_many,
-			    size_t res_length,
-			    char *min_str, char *max_str,
-			    size_t *min_length, size_t *max_length);
-
-my_bool  my_like_range_utf16(CHARSET_INFO *cs,
-			     const char *ptr, size_t ptr_length,
-			     pbool escape, pbool w_one, pbool w_many,
-			     size_t res_length,
-			     char *min_str, char *max_str,
-			     size_t *min_length, size_t *max_length);
-
-my_bool  my_like_range_utf32(CHARSET_INFO *cs,
-			     const char *ptr, size_t ptr_length,
-			     pbool escape, pbool w_one, pbool w_many,
-			     size_t res_length,
-			     char *min_str, char *max_str,
-			     size_t *min_length, size_t *max_length);
+/* For other character sets, with arbitrary mbminlen and mbmaxlen numbers */
+my_bool  my_like_range_generic(CHARSET_INFO *cs,
+                               const char *ptr, size_t ptr_length,
+                               pbool escape, pbool w_one, pbool w_many,
+                               size_t res_length,
+                               char *min_str, char *max_str,
+                               size_t *min_length, size_t *max_length);
 
 int my_wildcmp_8bit(CHARSET_INFO *,
 		    const char *str,const char *str_end,

=== modified file 'include/my_sys.h'
--- a/include/my_sys.h	2010-11-08 14:35:45 +0000
+++ b/include/my_sys.h	2010-11-26 13:14:37 +0000
@@ -778,10 +778,11 @@ extern my_bool init_dynamic_array2(DYNAM
 /* init_dynamic_array() function is deprecated */
 extern my_bool init_dynamic_array(DYNAMIC_ARRAY *array, uint element_size,
                                   uint init_alloc, uint alloc_increment);
-extern my_bool insert_dynamic(DYNAMIC_ARRAY *array,uchar * element);
+extern my_bool insert_dynamic(DYNAMIC_ARRAY *array, const void *element);
 extern uchar *alloc_dynamic(DYNAMIC_ARRAY *array);
 extern uchar *pop_dynamic(DYNAMIC_ARRAY*);
-extern my_bool set_dynamic(DYNAMIC_ARRAY *array,uchar * element,uint array_index);
+extern my_bool set_dynamic(DYNAMIC_ARRAY *array, const void *element,
+                           uint array_index);
 extern my_bool allocate_dynamic(DYNAMIC_ARRAY *array, uint max_elements);
 extern void get_dynamic(DYNAMIC_ARRAY *array,uchar * element,uint array_index);
 extern void delete_dynamic(DYNAMIC_ARRAY *array);

=== modified file 'mysql-test/extra/rpl_tests/rpl_change_master_bind.inc'
--- a/mysql-test/extra/rpl_tests/rpl_change_master_bind.inc	2010-11-25 11:20:16 +0000
+++ b/mysql-test/extra/rpl_tests/rpl_change_master_bind.inc	2010-11-26 14:02:14 +0000
@@ -18,10 +18,20 @@ create table t1(n int, b varchar(256));
 --replace_result $master_bind <master_bind>
 eval insert into t1 values(1, $master_bind);
 
-# Configure slave to connect to master with then give bind address
+# Configure slave to connect to master with the give bind address
+# for master_bind and master_host unless it's an invalid address
 connection slave;
+let $_master_host=;
+if (!$master_bind_error_expected)
+{
+  if ($master_bind != '')
+  {
+    let $_master_host=master_host=$master_bind,;
+  }
+}
+
 --replace_result $master_bind <master_bind>
-eval change master to master_bind=$master_bind;
+eval change master to $_master_host master_bind=$master_bind;
 start slave;
 
 # Check that SHOW SLAVE STATUS has Master_bind column set to $master_bind
@@ -42,7 +52,7 @@ if ($master_bind_error_expected)
   echo got expected error $master_bind_error_expected;
   source include/stop_slave.inc;
 
-  # Reset the master_bind to that cleanup can run
+  # Reset the master_bind so that cleanup can run
   eval change master to master_bind='';
   start slave;
 

=== added file 'mysql-test/include/ctype_8bit.inc'
--- a/mysql-test/include/ctype_8bit.inc	1970-01-01 00:00:00 +0000
+++ b/mysql-test/include/ctype_8bit.inc	2010-11-26 13:58:54 +0000
@@ -0,0 +1,46 @@
+#
+# Test Unicode conversion, upper, lower
+#
+SELECT @@collation_connection;
+CREATE TABLE t1 AS SELECT ' ' AS a LIMIT 0;
+INSERT INTO t1 VALUES (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07);
+INSERT INTO t1 VALUES (0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F);
+INSERT INTO t1 VALUES (0x10),(0x11),(0x12),(0x13),(0x14),(0x15),(0x16),(0x17);
+INSERT INTO t1 VALUES (0x18),(0x19),(0x1A),(0x1B),(0x1C),(0x1D),(0x1E),(0x1F);
+INSERT INTO t1 VALUES (0x20),(0x21),(0x22),(0x23),(0x24),(0x25),(0x26),(0x27);
+INSERT INTO t1 VALUES (0x28),(0x29),(0x2A),(0x2B),(0x2C),(0x2D),(0x2E),(0x2F);
+INSERT INTO t1 VALUES (0x30),(0x31),(0x32),(0x33),(0x34),(0x35),(0x36),(0x37);
+INSERT INTO t1 VALUES (0x38),(0x39),(0x3A),(0x3B),(0x3C),(0x3D),(0x3E),(0x3F);
+INSERT INTO t1 VALUES (0x40),(0x41),(0x42),(0x43),(0x44),(0x45),(0x46),(0x47);
+INSERT INTO t1 VALUES (0x48),(0x49),(0x4A),(0x4B),(0x4C),(0x4D),(0x4E),(0x4F);
+INSERT INTO t1 VALUES (0x50),(0x51),(0x52),(0x53),(0x54),(0x55),(0x56),(0x57);
+INSERT INTO t1 VALUES (0x58),(0x59),(0x5A),(0x5B),(0x5C),(0x5D),(0x5E),(0x5F);
+INSERT INTO t1 VALUES (0x60),(0x61),(0x62),(0x63),(0x64),(0x65),(0x66),(0x67);
+INSERT INTO t1 VALUES (0x68),(0x69),(0x6A),(0x6B),(0x6C),(0x6D),(0x6E),(0x6F);
+INSERT INTO t1 VALUES (0x70),(0x71),(0x72),(0x73),(0x74),(0x75),(0x76),(0x77);
+INSERT INTO t1 VALUES (0x78),(0x79),(0x7A),(0x7B),(0x7C),(0x7D),(0x7E),(0x7F);
+INSERT INTO t1 VALUES (0x80),(0x81),(0x82),(0x83),(0x84),(0x85),(0x86),(0x87);
+INSERT INTO t1 VALUES (0x88),(0x89),(0x8A),(0x8B),(0x8C),(0x8D),(0x8E),(0x8F);
+INSERT INTO t1 VALUES (0x90),(0x91),(0x92),(0x93),(0x94),(0x95),(0x96),(0x97);
+INSERT INTO t1 VALUES (0x98),(0x99),(0x9A),(0x9B),(0x9C),(0x9D),(0x9E),(0x9F);
+INSERT INTO t1 VALUES (0xA0),(0xA1),(0xA2),(0xA3),(0xA4),(0xA5),(0xA6),(0xA7);
+INSERT INTO t1 VALUES (0xA8),(0xA9),(0xAA),(0xAB),(0xAC),(0xAD),(0xAE),(0xAF);
+INSERT INTO t1 VALUES (0xB0),(0xB1),(0xB2),(0xB3),(0xB4),(0xB5),(0xB6),(0xB7);
+INSERT INTO t1 VALUES (0xB8),(0xB9),(0xBA),(0xBB),(0xBC),(0xBD),(0xBE),(0xBF);
+INSERT INTO t1 VALUES (0xC0),(0xC1),(0xC2),(0xC3),(0xC4),(0xC5),(0xC6),(0xC7);
+INSERT INTO t1 VALUES (0xC8),(0xC9),(0xCA),(0xCB),(0xCC),(0xCD),(0xCE),(0xCF);
+INSERT INTO t1 VALUES (0xD0),(0xD1),(0xD2),(0xD3),(0xD4),(0xD5),(0xD6),(0xD7);
+INSERT INTO t1 VALUES (0xD8),(0xD9),(0xDA),(0xDB),(0xDC),(0xDD),(0xDE),(0xDF);
+INSERT INTO t1 VALUES (0xE0),(0xE1),(0xE2),(0xE3),(0xE4),(0xE5),(0xE6),(0xE7);
+INSERT INTO t1 VALUES (0xE8),(0xE9),(0xEA),(0xEB),(0xEC),(0xED),(0xEE),(0xEF);
+INSERT INTO t1 VALUES (0xF0),(0xF1),(0xF2),(0xF3),(0xF4),(0xF5),(0xF6),(0xF7);
+INSERT INTO t1 VALUES (0xF8),(0xF9),(0xFA),(0xFB),(0xFC),(0xFD),(0xFE),(0xFF);
+SELECT
+  HEX(a) AS chr,
+  HEX(LOWER(a)) AS upper,
+  HEX(LOWER(a)) AS lower,
+  HEX(@utf8:=CONVERT(a USING utf8)) AS utf8,
+  HEX(@roundtrip:=CAST(@utf8 AS CHAR)) AS roundtrip,
+  if(a=BINARY @roundtrip,'','Round trip unsafe') AS issafe
+FROM t1 ORDER BY chr;
+DROP TABLE t1;

=== added file 'mysql-test/include/ctype_czech.inc'
--- a/mysql-test/include/ctype_czech.inc	1970-01-01 00:00:00 +0000
+++ b/mysql-test/include/ctype_czech.inc	2010-11-26 10:44:39 +0000
@@ -0,0 +1,12 @@
+SELECT @@collation_connection;
+--echo #
+--echo # Bug#57737 Character sets: search fails with like, contraction, index
+--echo #
+CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS s1 LIMIT 0;
+INSERT INTO t1 VALUES ('c'),('ce'),('cé'),('ch');
+SELECT * FROM t1 WHERE s1 LIKE 'c%';
+ALTER TABLE t1 ADD KEY s1 (s1);
+SELECT * FROM t1 WHERE s1 LIKE 'c%';
+ALTER TABLE t1 DROP KEY s1, ADD KEY(s1(1));
+SELECT * FROM t1 WHERE s1 LIKE 'ch';
+DROP TABLE t1;

=== added file 'mysql-test/include/ctype_like_ignorable.inc'
--- a/mysql-test/include/ctype_like_ignorable.inc	1970-01-01 00:00:00 +0000
+++ b/mysql-test/include/ctype_like_ignorable.inc	2010-11-26 10:44:39 +0000
@@ -0,0 +1,11 @@
+SELECT @@collation_connection;
+--echo #
+--echo # Bug#57737 Character sets: search fails with like, contraction, index
+--echo # Part#2 - ignorable characters
+--echo #
+CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS s1 LIMIT 0;
+INSERT INTO t1 VALUES ('a\0\0\0\0\0\t'),('a'),('b'),('c'),('d'),('e');
+SELECT HEX(s1) FROM t1 WHERE s1 LIKE 'a%';
+ALTER TABLE t1 ADD KEY s1 (s1);
+SELECT HEX(s1) FROM t1 WHERE s1 LIKE 'a%';
+DROP TABLE t1;

=== modified file 'mysql-test/include/icp_tests.inc'
--- a/mysql-test/include/icp_tests.inc	2010-11-02 18:47:47 +0000
+++ b/mysql-test/include/icp_tests.inc	2010-11-24 22:20:27 +0000
@@ -491,3 +491,155 @@ ORDER BY c1
 LIMIT 1;
 
 DROP TABLE t1;
+
+--echo #
+--echo # Bug#42991 "invalid memory access and/or crash when using
+--echo #            index condition pushdown + InnoDB"
+--echo #
+
+# Note that you need to run with --valgrind to see the warnings
+# about invalid memory accesses.
+
+CREATE TABLE t1 (
+  c1 TINYTEXT NOT NULL,
+  c2 INT NOT NULL,
+  PRIMARY KEY (c2),
+  KEY id1 (c1(4))
+);
+
+INSERT INTO t1 VALUES ('Anastasia', 5);
+INSERT INTO t1 VALUES ('Karianne', 4);
+
+SELECT * FROM t1 WHERE (c1 <= '6566-06-15' AND c2 <> 3);
+
+EXPLAIN SELECT * FROM t1 WHERE (c1 <= '6566-06-15' AND c2 <> 3);
+
+DROP TABLE t1;
+
+--echo #
+--echo # Bug#56529 - "Crash due to long semaphore wait in InnoDB 
+--echo #              with ICP and subqueries"
+--echo #
+
+CREATE TABLE t1 (
+  col_int_nokey INTEGER,
+  col_int_key INTEGER,
+  col_varchar_key VARCHAR(1),
+
+  KEY (col_int_key),
+  KEY (col_varchar_key, col_int_key)
+);
+
+INSERT INTO t1 VALUES (NULL,2,'w');
+INSERT INTO t1 VALUES (7,9,'m');
+INSERT INTO t1 VALUES (9,3,'m');
+INSERT INTO t1 VALUES (7,9,'k');
+INSERT INTO t1 VALUES (4,NULL,'r');
+INSERT INTO t1 VALUES (2,9,'t');
+INSERT INTO t1 VALUES (6,3,'j');
+INSERT INTO t1 VALUES (8,8,'u');
+INSERT INTO t1 VALUES (NULL,8,'h');
+INSERT INTO t1 VALUES (5,53,'o');
+INSERT INTO t1 VALUES (NULL,0,NULL);
+INSERT INTO t1 VALUES (6,5,'k');
+INSERT INTO t1 VALUES (188,166,'e');
+INSERT INTO t1 VALUES (2,3,'n');
+INSERT INTO t1 VALUES (1,0,'t');
+INSERT INTO t1 VALUES (1,1,'c');
+INSERT INTO t1 VALUES (0,9,'m');
+INSERT INTO t1 VALUES (9,5,'y');
+INSERT INTO t1 VALUES (NULL,6,'f');
+
+CREATE TABLE t2 (
+  c1 INTEGER NOT NULL
+);
+
+let query=
+SELECT table1.col_int_nokey
+FROM t1 AS table1 STRAIGHT_JOIN (
+                  t1 AS table2 INNER JOIN t1 AS table3
+                  ON table3.col_varchar_key = table2.col_varchar_key)
+     ON table3.col_int_nokey = table1.col_int_key
+WHERE table3.col_int_key != SOME ( SELECT c1 FROM t2 );
+
+eval EXPLAIN $query;
+eval $query;
+
+DROP TABLE t1, t2;
+
+--echo #
+--echo # Bug#58243 "RQG test optimizer_subquery causes server crash
+--echo #            when running with ICP"
+--echo #
+
+# Test case 1: This test case makes item->const_item() return true
+#              in uses_index_fields_only() for an item tree
+#              containing a subquery. This triggered the subquery
+#              to be pushed down to InnoDB.
+
+CREATE TABLE t1 (
+  pk INTEGER NOT NULL,
+  c1 INTEGER NOT NULL,
+  c2 INTEGER NOT NULL,
+
+  PRIMARY KEY (pk)
+);
+
+INSERT INTO t1 VALUES (1,6,7);
+
+CREATE TABLE t2 (
+  c1 INTEGER NOT NULL
+);
+
+let query=
+SELECT t1.c1
+FROM t1
+WHERE t1.pk < 317 AND 2 IN (SELECT COUNT(t2.c1)
+                            FROM t2)
+ORDER BY t1.c2;
+
+eval EXPLAIN $query;
+eval $query;
+
+DROP TABLE t1, t2;
+
+# Test case 2: This test case makes item->used_tables() return 0
+#              in uses_index_fields_only() for an item tree
+#              containg a subquery. This triggered the subquery
+#              to be pushed down to InnoDB.
+
+CREATE TABLE t1 (
+  i1 INTEGER NOT NULL,
+  c1 VARCHAR(1) NOT NULL
+);
+
+INSERT INTO t1 VALUES (2,'w');
+
+CREATE TABLE t2 (
+  i1 INTEGER NOT NULL,
+  c1 VARCHAR(1) NOT NULL,
+  c2 VARCHAR(1) NOT NULL,
+  KEY (c1, i1)
+);
+
+INSERT INTO t2 VALUES (8,'d','d');
+INSERT INTO t2 VALUES (4,'v','v');
+
+CREATE TABLE t3 (
+  c1 VARCHAR(1) NOT NULL
+);
+
+INSERT INTO t3 VALUES ('v');
+
+let query=
+SELECT i1
+FROM t1
+WHERE EXISTS (SELECT t2.c1
+              FROM (t2 INNER JOIN t3 ON (t3.c1 = t2.c1)) 
+              WHERE t2.c2 != t1.c1 AND t2.c2 = (SELECT MIN(t3.c1)
+                                                FROM t3)); 
+
+eval EXPLAIN $query;
+eval $query;
+
+DROP TABLE t1,t2,t3;

=== modified file 'mysql-test/r/create.result'
--- a/mysql-test/r/create.result	2010-11-05 16:23:32 +0000
+++ b/mysql-test/r/create.result	2010-11-17 15:23:17 +0000
@@ -113,7 +113,7 @@ insert into t1 (b) values ("hello"),("my
 create table t2 (key (b)) select * from t1;
 explain select * from t2 where b="world";
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t2	ref	B	B	21	const	1	Using where
+1	SIMPLE	t2	ref	B	B	21	const	1	Using index condition
 select * from t2 where b="world";
 a	B
 3	world

=== modified file 'mysql-test/r/ctype_binary.result'
--- a/mysql-test/r/ctype_binary.result	2010-11-19 19:27:31 +0000
+++ b/mysql-test/r/ctype_binary.result	2010-11-26 13:46:21 +0000
@@ -2760,11 +2760,11 @@ KEY(date_column));
 INSERT INTO t1 VALUES (1,'2010-09-01'),(2,'2010-10-01');
 EXPLAIN SELECT * FROM t1 WHERE date_column BETWEEN '2010-09-01' AND '2010-10-01';
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	range	date_column	date_column	4	NULL	1	Using where
+1	SIMPLE	t1	range	date_column	date_column	4	NULL	1	Using index condition
 ALTER TABLE t1 MODIFY date_column DATETIME DEFAULT NULL;
 EXPLAIN SELECT * FROM t1 WHERE date_column BETWEEN '2010-09-01' AND '2010-10-01';
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	range	date_column	date_column	9	NULL	1	Using where
+1	SIMPLE	t1	range	date_column	date_column	9	NULL	1	Using index condition
 DROP TABLE t1;
 #
 # Bug#52159 returning time type from function and empty left join causes debug assertion

=== modified file 'mysql-test/r/ctype_collate.result'
--- a/mysql-test/r/ctype_collate.result	2010-11-05 14:19:52 +0000
+++ b/mysql-test/r/ctype_collate.result	2010-11-17 15:23:17 +0000
@@ -596,31 +596,31 @@ INSERT INTO t1 VALUES ('i','i');
 INSERT INTO t1 VALUES ('j','j');
 EXPLAIN SELECT * FROM t1 WHERE s1='a';
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	ref	s1	s1	11	const	1	Using where
+1	SIMPLE	t1	ref	s1	s1	11	const	1	Using index condition
 EXPLAIN SELECT * FROM t1 WHERE s2='a';
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	ref	s2	s2	11	const	1	Using where
+1	SIMPLE	t1	ref	s2	s2	11	const	1	Using index condition
 EXPLAIN SELECT * FROM t1 WHERE s1='a' COLLATE latin1_german1_ci;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	ref	s1	s1	11	const	1	Using where
+1	SIMPLE	t1	ref	s1	s1	11	const	1	Using index condition
 EXPLAIN SELECT * FROM t1 WHERE s2='a' COLLATE latin1_german1_ci;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	ALL	s2	NULL	NULL	NULL	10	Using where
 EXPLAIN SELECT * FROM t1 WHERE s1 BETWEEN 'a' AND 'b' COLLATE latin1_german1_ci;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	range	s1	s1	11	NULL	2	Using where
+1	SIMPLE	t1	range	s1	s1	11	NULL	2	Using index condition
 EXPLAIN SELECT * FROM t1 WHERE s2 BETWEEN 'a' AND 'b' COLLATE latin1_german1_ci;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	ALL	s2	NULL	NULL	NULL	10	Using where
 EXPLAIN SELECT * FROM t1 WHERE s1 IN  ('a','b' COLLATE latin1_german1_ci);
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	range	s1	s1	11	NULL	2	Using where
+1	SIMPLE	t1	range	s1	s1	11	NULL	2	Using index condition
 EXPLAIN SELECT * FROM t1 WHERE s2 IN  ('a','b' COLLATE latin1_german1_ci);
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	ALL	s2	NULL	NULL	NULL	10	Using where
 EXPLAIN SELECT * FROM t1 WHERE s1 LIKE 'a' COLLATE latin1_german1_ci;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	range	s1	s1	11	NULL	1	Using where
+1	SIMPLE	t1	range	s1	s1	11	NULL	1	Using index condition
 EXPLAIN SELECT * FROM t1 WHERE s2 LIKE 'a' COLLATE latin1_german1_ci;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	ALL	s2	NULL	NULL	NULL	10	Using where

=== modified file 'mysql-test/r/ctype_cp1251.result'
--- a/mysql-test/r/ctype_cp1251.result	2010-11-19 19:27:31 +0000
+++ b/mysql-test/r/ctype_cp1251.result	2010-11-26 14:37:59 +0000
@@ -82,6 +82,314 @@ t1	CREATE TABLE `t1` (
 ) ENGINE=MyISAM DEFAULT CHARSET=cp1251
 DROP TABLE t1;
 #
+# Start of 5.1 tests
+#
+SELECT @@collation_connection;
+@@collation_connection
+cp1251_general_ci
+CREATE TABLE t1 AS SELECT ' ' AS a LIMIT 0;
+INSERT INTO t1 VALUES (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07);
+INSERT INTO t1 VALUES (0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F);
+INSERT INTO t1 VALUES (0x10),(0x11),(0x12),(0x13),(0x14),(0x15),(0x16),(0x17);
+INSERT INTO t1 VALUES (0x18),(0x19),(0x1A),(0x1B),(0x1C),(0x1D),(0x1E),(0x1F);
+INSERT INTO t1 VALUES (0x20),(0x21),(0x22),(0x23),(0x24),(0x25),(0x26),(0x27);
+INSERT INTO t1 VALUES (0x28),(0x29),(0x2A),(0x2B),(0x2C),(0x2D),(0x2E),(0x2F);
+INSERT INTO t1 VALUES (0x30),(0x31),(0x32),(0x33),(0x34),(0x35),(0x36),(0x37);
+INSERT INTO t1 VALUES (0x38),(0x39),(0x3A),(0x3B),(0x3C),(0x3D),(0x3E),(0x3F);
+INSERT INTO t1 VALUES (0x40),(0x41),(0x42),(0x43),(0x44),(0x45),(0x46),(0x47);
+INSERT INTO t1 VALUES (0x48),(0x49),(0x4A),(0x4B),(0x4C),(0x4D),(0x4E),(0x4F);
+INSERT INTO t1 VALUES (0x50),(0x51),(0x52),(0x53),(0x54),(0x55),(0x56),(0x57);
+INSERT INTO t1 VALUES (0x58),(0x59),(0x5A),(0x5B),(0x5C),(0x5D),(0x5E),(0x5F);
+INSERT INTO t1 VALUES (0x60),(0x61),(0x62),(0x63),(0x64),(0x65),(0x66),(0x67);
+INSERT INTO t1 VALUES (0x68),(0x69),(0x6A),(0x6B),(0x6C),(0x6D),(0x6E),(0x6F);
+INSERT INTO t1 VALUES (0x70),(0x71),(0x72),(0x73),(0x74),(0x75),(0x76),(0x77);
+INSERT INTO t1 VALUES (0x78),(0x79),(0x7A),(0x7B),(0x7C),(0x7D),(0x7E),(0x7F);
+INSERT INTO t1 VALUES (0x80),(0x81),(0x82),(0x83),(0x84),(0x85),(0x86),(0x87);
+INSERT INTO t1 VALUES (0x88),(0x89),(0x8A),(0x8B),(0x8C),(0x8D),(0x8E),(0x8F);
+INSERT INTO t1 VALUES (0x90),(0x91),(0x92),(0x93),(0x94),(0x95),(0x96),(0x97);
+INSERT INTO t1 VALUES (0x98),(0x99),(0x9A),(0x9B),(0x9C),(0x9D),(0x9E),(0x9F);
+INSERT INTO t1 VALUES (0xA0),(0xA1),(0xA2),(0xA3),(0xA4),(0xA5),(0xA6),(0xA7);
+INSERT INTO t1 VALUES (0xA8),(0xA9),(0xAA),(0xAB),(0xAC),(0xAD),(0xAE),(0xAF);
+INSERT INTO t1 VALUES (0xB0),(0xB1),(0xB2),(0xB3),(0xB4),(0xB5),(0xB6),(0xB7);
+INSERT INTO t1 VALUES (0xB8),(0xB9),(0xBA),(0xBB),(0xBC),(0xBD),(0xBE),(0xBF);
+INSERT INTO t1 VALUES (0xC0),(0xC1),(0xC2),(0xC3),(0xC4),(0xC5),(0xC6),(0xC7);
+INSERT INTO t1 VALUES (0xC8),(0xC9),(0xCA),(0xCB),(0xCC),(0xCD),(0xCE),(0xCF);
+INSERT INTO t1 VALUES (0xD0),(0xD1),(0xD2),(0xD3),(0xD4),(0xD5),(0xD6),(0xD7);
+INSERT INTO t1 VALUES (0xD8),(0xD9),(0xDA),(0xDB),(0xDC),(0xDD),(0xDE),(0xDF);
+INSERT INTO t1 VALUES (0xE0),(0xE1),(0xE2),(0xE3),(0xE4),(0xE5),(0xE6),(0xE7);
+INSERT INTO t1 VALUES (0xE8),(0xE9),(0xEA),(0xEB),(0xEC),(0xED),(0xEE),(0xEF);
+INSERT INTO t1 VALUES (0xF0),(0xF1),(0xF2),(0xF3),(0xF4),(0xF5),(0xF6),(0xF7);
+INSERT INTO t1 VALUES (0xF8),(0xF9),(0xFA),(0xFB),(0xFC),(0xFD),(0xFE),(0xFF);
+SELECT
+HEX(a) AS chr,
+HEX(LOWER(a)) AS upper,
+HEX(LOWER(a)) AS lower,
+HEX(@utf8:=CONVERT(a USING utf8)) AS utf8,
+HEX(@roundtrip:=CAST(@utf8 AS CHAR)) AS roundtrip,
+if(a=BINARY @roundtrip,'','Round trip unsafe') AS issafe
+FROM t1 ORDER BY chr;
+chr	upper	lower	utf8	roundtrip	issafe
+00	00	00	00	00	
+01	01	01	01	01	
+02	02	02	02	02	
+03	03	03	03	03	
+04	04	04	04	04	
+05	05	05	05	05	
+06	06	06	06	06	
+07	07	07	07	07	
+08	08	08	08	08	
+09	09	09	09	09	
+0A	0A	0A	0A	0A	
+0B	0B	0B	0B	0B	
+0C	0C	0C	0C	0C	
+0D	0D	0D	0D	0D	
+0E	0E	0E	0E	0E	
+0F	0F	0F	0F	0F	
+10	10	10	10	10	
+11	11	11	11	11	
+12	12	12	12	12	
+13	13	13	13	13	
+14	14	14	14	14	
+15	15	15	15	15	
+16	16	16	16	16	
+17	17	17	17	17	
+18	18	18	18	18	
+19	19	19	19	19	
+1A	1A	1A	1A	1A	
+1B	1B	1B	1B	1B	
+1C	1C	1C	1C	1C	
+1D	1D	1D	1D	1D	
+1E	1E	1E	1E	1E	
+1F	1F	1F	1F	1F	
+20	20	20	20	20	
+21	21	21	21	21	
+22	22	22	22	22	
+23	23	23	23	23	
+24	24	24	24	24	
+25	25	25	25	25	
+26	26	26	26	26	
+27	27	27	27	27	
+28	28	28	28	28	
+29	29	29	29	29	
+2A	2A	2A	2A	2A	
+2B	2B	2B	2B	2B	
+2C	2C	2C	2C	2C	
+2D	2D	2D	2D	2D	
+2E	2E	2E	2E	2E	
+2F	2F	2F	2F	2F	
+30	30	30	30	30	
+31	31	31	31	31	
+32	32	32	32	32	
+33	33	33	33	33	
+34	34	34	34	34	
+35	35	35	35	35	
+36	36	36	36	36	
+37	37	37	37	37	
+38	38	38	38	38	
+39	39	39	39	39	
+3A	3A	3A	3A	3A	
+3B	3B	3B	3B	3B	
+3C	3C	3C	3C	3C	
+3D	3D	3D	3D	3D	
+3E	3E	3E	3E	3E	
+3F	3F	3F	3F	3F	
+40	40	40	40	40	
+41	61	61	41	41	
+42	62	62	42	42	
+43	63	63	43	43	
+44	64	64	44	44	
+45	65	65	45	45	
+46	66	66	46	46	
+47	67	67	47	47	
+48	68	68	48	48	
+49	69	69	49	49	
+4A	6A	6A	4A	4A	
+4B	6B	6B	4B	4B	
+4C	6C	6C	4C	4C	
+4D	6D	6D	4D	4D	
+4E	6E	6E	4E	4E	
+4F	6F	6F	4F	4F	
+50	70	70	50	50	
+51	71	71	51	51	
+52	72	72	52	52	
+53	73	73	53	53	
+54	74	74	54	54	
+55	75	75	55	55	
+56	76	76	56	56	
+57	77	77	57	57	
+58	78	78	58	58	
+59	79	79	59	59	
+5A	7A	7A	5A	5A	
+5B	5B	5B	5B	5B	
+5C	5C	5C	5C	5C	
+5D	5D	5D	5D	5D	
+5E	5E	5E	5E	5E	
+5F	5F	5F	5F	5F	
+60	60	60	60	60	
+61	61	61	61	61	
+62	62	62	62	62	
+63	63	63	63	63	
+64	64	64	64	64	
+65	65	65	65	65	
+66	66	66	66	66	
+67	67	67	67	67	
+68	68	68	68	68	
+69	69	69	69	69	
+6A	6A	6A	6A	6A	
+6B	6B	6B	6B	6B	
+6C	6C	6C	6C	6C	
+6D	6D	6D	6D	6D	
+6E	6E	6E	6E	6E	
+6F	6F	6F	6F	6F	
+70	70	70	70	70	
+71	71	71	71	71	
+72	72	72	72	72	
+73	73	73	73	73	
+74	74	74	74	74	
+75	75	75	75	75	
+76	76	76	76	76	
+77	77	77	77	77	
+78	78	78	78	78	
+79	79	79	79	79	
+7A	7A	7A	7A	7A	
+7B	7B	7B	7B	7B	
+7C	7C	7C	7C	7C	
+7D	7D	7D	7D	7D	
+7E	7E	7E	7E	7E	
+7F	7F	7F	7F	7F	
+80	90	90	D082	80	
+81	83	83	D083	81	
+82	82	82	E2809A	82	
+83	83	83	D193	83	
+84	84	84	E2809E	84	
+85	85	85	E280A6	85	
+86	86	86	E280A0	86	
+87	87	87	E280A1	87	
+88	88	88	E282AC	88	
+89	89	89	E280B0	89	
+8A	9A	9A	D089	8A	
+8B	8B	8B	E280B9	8B	
+8C	9C	9C	D08A	8C	
+8D	9D	9D	D08C	8D	
+8E	9E	9E	D08B	8E	
+8F	9F	9F	D08F	8F	
+90	90	90	D192	90	
+91	91	91	E28098	91	
+92	92	92	E28099	92	
+93	93	93	E2809C	93	
+94	94	94	E2809D	94	
+95	95	95	E280A2	95	
+96	96	96	E28093	96	
+97	97	97	E28094	97	
+98	98	98	3F	3F	Round trip unsafe
+99	99	99	E284A2	99	
+9A	9A	9A	D199	9A	
+9B	9B	9B	E280BA	9B	
+9C	9C	9C	D19A	9C	
+9D	9D	9D	D19C	9D	
+9E	9E	9E	D19B	9E	
+9F	9F	9F	D19F	9F	
+A0	A0	A0	C2A0	A0	
+A1	A2	A2	D08E	A1	
+A2	A2	A2	D19E	A2	
+A3	BC	BC	D088	A3	
+A4	A4	A4	C2A4	A4	
+A5	B4	B4	D290	A5	
+A6	A6	A6	C2A6	A6	
+A7	A7	A7	C2A7	A7	
+A8	B8	B8	D081	A8	
+A9	A9	A9	C2A9	A9	
+AA	BA	BA	D084	AA	
+AB	AB	AB	C2AB	AB	
+AC	AC	AC	C2AC	AC	
+AD	AD	AD	C2AD	AD	
+AE	AE	AE	C2AE	AE	
+AF	BF	BF	D087	AF	
+B0	B0	B0	C2B0	B0	
+B1	B1	B1	C2B1	B1	
+B2	B3	B3	D086	B2	
+B3	B3	B3	D196	B3	
+B4	B4	B4	D291	B4	
+B5	B5	B5	C2B5	B5	
+B6	B6	B6	C2B6	B6	
+B7	B7	B7	C2B7	B7	
+B8	B8	B8	D191	B8	
+B9	B9	B9	E28496	B9	
+BA	BA	BA	D194	BA	
+BB	BB	BB	C2BB	BB	
+BC	BC	BC	D198	BC	
+BD	BE	BE	D085	BD	
+BE	BE	BE	D195	BE	
+BF	BF	BF	D197	BF	
+C0	E0	E0	D090	C0	
+C1	E1	E1	D091	C1	
+C2	E2	E2	D092	C2	
+C3	E3	E3	D093	C3	
+C4	E4	E4	D094	C4	
+C5	E5	E5	D095	C5	
+C6	E6	E6	D096	C6	
+C7	E7	E7	D097	C7	
+C8	E8	E8	D098	C8	
+C9	E9	E9	D099	C9	
+CA	EA	EA	D09A	CA	
+CB	EB	EB	D09B	CB	
+CC	EC	EC	D09C	CC	
+CD	ED	ED	D09D	CD	
+CE	EE	EE	D09E	CE	
+CF	EF	EF	D09F	CF	
+D0	F0	F0	D0A0	D0	
+D1	F1	F1	D0A1	D1	
+D2	F2	F2	D0A2	D2	
+D3	F3	F3	D0A3	D3	
+D4	F4	F4	D0A4	D4	
+D5	F5	F5	D0A5	D5	
+D6	F6	F6	D0A6	D6	
+D7	F7	F7	D0A7	D7	
+D8	F8	F8	D0A8	D8	
+D9	F9	F9	D0A9	D9	
+DA	FA	FA	D0AA	DA	
+DB	FB	FB	D0AB	DB	
+DC	FC	FC	D0AC	DC	
+DD	FD	FD	D0AD	DD	
+DE	FE	FE	D0AE	DE	
+DF	FF	FF	D0AF	DF	
+E0	E0	E0	D0B0	E0	
+E1	E1	E1	D0B1	E1	
+E2	E2	E2	D0B2	E2	
+E3	E3	E3	D0B3	E3	
+E4	E4	E4	D0B4	E4	
+E5	E5	E5	D0B5	E5	
+E6	E6	E6	D0B6	E6	
+E7	E7	E7	D0B7	E7	
+E8	E8	E8	D0B8	E8	
+E9	E9	E9	D0B9	E9	
+EA	EA	EA	D0BA	EA	
+EB	EB	EB	D0BB	EB	
+EC	EC	EC	D0BC	EC	
+ED	ED	ED	D0BD	ED	
+EE	EE	EE	D0BE	EE	
+EF	EF	EF	D0BF	EF	
+F0	F0	F0	D180	F0	
+F1	F1	F1	D181	F1	
+F2	F2	F2	D182	F2	
+F3	F3	F3	D183	F3	
+F4	F4	F4	D184	F4	
+F5	F5	F5	D185	F5	
+F6	F6	F6	D186	F6	
+F7	F7	F7	D187	F7	
+F8	F8	F8	D188	F8	
+F9	F9	F9	D189	F9	
+FA	FA	FA	D18A	FA	
+FB	FB	FB	D18B	FB	
+FC	FC	FC	D18C	FC	
+FD	FD	FD	D18D	FD	
+FE	FE	FE	D18E	FE	
+FF	FF	FF	D18F	FF	
+DROP TABLE t1;
+#
+# End of 5.1 tests
+#
+#
 # Start of 5.5 tests
 #
 #
@@ -2842,11 +3150,11 @@ KEY(date_column));
 INSERT INTO t1 VALUES (1,'2010-09-01'),(2,'2010-10-01');
 EXPLAIN SELECT * FROM t1 WHERE date_column BETWEEN '2010-09-01' AND '2010-10-01';
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	range	date_column	date_column	4	NULL	1	Using where
+1	SIMPLE	t1	range	date_column	date_column	4	NULL	1	Using index condition
 ALTER TABLE t1 MODIFY date_column DATETIME DEFAULT NULL;
 EXPLAIN SELECT * FROM t1 WHERE date_column BETWEEN '2010-09-01' AND '2010-10-01';
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	range	date_column	date_column	9	NULL	1	Using where
+1	SIMPLE	t1	range	date_column	date_column	9	NULL	1	Using index condition
 DROP TABLE t1;
 #
 # Bug#52159 returning time type from function and empty left join causes debug assertion

=== modified file 'mysql-test/r/ctype_latin1.result'
--- a/mysql-test/r/ctype_latin1.result	2010-11-19 19:27:31 +0000
+++ b/mysql-test/r/ctype_latin1.result	2010-11-26 13:46:21 +0000
@@ -3170,11 +3170,11 @@ KEY(date_column));
 INSERT INTO t1 VALUES (1,'2010-09-01'),(2,'2010-10-01');
 EXPLAIN SELECT * FROM t1 WHERE date_column BETWEEN '2010-09-01' AND '2010-10-01';
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	range	date_column	date_column	4	NULL	1	Using where
+1	SIMPLE	t1	range	date_column	date_column	4	NULL	1	Using index condition
 ALTER TABLE t1 MODIFY date_column DATETIME DEFAULT NULL;
 EXPLAIN SELECT * FROM t1 WHERE date_column BETWEEN '2010-09-01' AND '2010-10-01';
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	range	date_column	date_column	9	NULL	1	Using where
+1	SIMPLE	t1	range	date_column	date_column	9	NULL	1	Using index condition
 DROP TABLE t1;
 #
 # Bug#52159 returning time type from function and empty left join causes debug assertion

=== added file 'mysql-test/r/ctype_like_range.result'
--- a/mysql-test/r/ctype_like_range.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/r/ctype_like_range.result	2010-11-26 13:29:18 +0000
@@ -0,0 +1,3300 @@
+DROP TABLE IF EXISTS t1;
+DROP VIEW IF EXISTS v1;
+CREATE TABLE t1 (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, a VARBINARY(32));
+INSERT INTO t1 (a) VALUES (''),('_'),('%'),('\_'),('\%'),('\\');
+INSERT INTO t1 (a) VALUES ('a'),('c');
+INSERT INTO t1 (a) VALUES ('a_'),('c_');
+INSERT INTO t1 (a) VALUES ('a%'),('c%');
+INSERT INTO t1 (a) VALUES ('aa'),('cc'),('ch');
+INSERT INTO t1 (a) VALUES ('aa_'),('cc_'),('ch_');
+INSERT INTO t1 (a) VALUES ('aa%'),('cc%'),('ch%');
+INSERT INTO t1 (a) VALUES ('aaa'),('ccc'),('cch');
+INSERT INTO t1 (a) VALUES ('aaa_'),('ccc_'),('cch_');
+INSERT INTO t1 (a) VALUES ('aaa%'),('ccc%'),('cch%');
+INSERT INTO t1 (a) VALUES ('aaaaaaaaaaaaaaaaaaaa');
+INSERT INTO t1 (a) VALUES ('caaaaaaaaaaaaaaaaaaa');
+CREATE VIEW v1 AS
+SELECT id, 'a' AS name, a AS val FROM t1
+UNION
+SELECT id, 'mn', HEX(LIKE_RANGE_MIN(a, 16)) AS min FROM t1
+UNION
+SELECT id, 'mx', HEX(LIKE_RANGE_MAX(a, 16)) AS max FROM t1
+UNION
+SELECT id, 'sp', REPEAT('-', 32) AS sep FROM t1
+ORDER BY id, name;
+SELECT * FROM v1;
+id	name	val
+1	a	
+1	mn	
+1	mx	
+1	sp	--------------------------------
+2	a	_
+2	mn	00
+2	mx	FF
+2	sp	--------------------------------
+3	a	%
+3	mn	
+3	mx	FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+3	sp	--------------------------------
+4	a	\_
+4	mn	5F
+4	mx	5F
+4	sp	--------------------------------
+5	a	\%
+5	mn	25
+5	mx	25
+5	sp	--------------------------------
+6	a	\
+6	mn	5C
+6	mx	5C
+6	sp	--------------------------------
+7	a	a
+7	mn	61
+7	mx	61
+7	sp	--------------------------------
+8	a	c
+8	mn	63
+8	mx	63
+8	sp	--------------------------------
+9	a	a_
+9	mn	6100
+9	mx	61FF
+9	sp	--------------------------------
+10	a	c_
+10	mn	6300
+10	mx	63FF
+10	sp	--------------------------------
+11	a	a%
+11	mn	61
+11	mx	61FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+11	sp	--------------------------------
+12	a	c%
+12	mn	63
+12	mx	63FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+12	sp	--------------------------------
+13	a	aa
+13	mn	6161
+13	mx	6161
+13	sp	--------------------------------
+14	a	cc
+14	mn	6363
+14	mx	6363
+14	sp	--------------------------------
+15	a	ch
+15	mn	6368
+15	mx	6368
+15	sp	--------------------------------
+16	a	aa_
+16	mn	616100
+16	mx	6161FF
+16	sp	--------------------------------
+17	a	cc_
+17	mn	636300
+17	mx	6363FF
+17	sp	--------------------------------
+18	a	ch_
+18	mn	636800
+18	mx	6368FF
+18	sp	--------------------------------
+19	a	aa%
+19	mn	6161
+19	mx	6161FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+19	sp	--------------------------------
+20	a	cc%
+20	mn	6363
+20	mx	6363FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+20	sp	--------------------------------
+21	a	ch%
+21	mn	6368
+21	mx	6368FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+21	sp	--------------------------------
+22	a	aaa
+22	mn	616161
+22	mx	616161
+22	sp	--------------------------------
+23	a	ccc
+23	mn	636363
+23	mx	636363
+23	sp	--------------------------------
+24	a	cch
+24	mn	636368
+24	mx	636368
+24	sp	--------------------------------
+25	a	aaa_
+25	mn	61616100
+25	mx	616161FF
+25	sp	--------------------------------
+26	a	ccc_
+26	mn	63636300
+26	mx	636363FF
+26	sp	--------------------------------
+27	a	cch_
+27	mn	63636800
+27	mx	636368FF
+27	sp	--------------------------------
+28	a	aaa%
+28	mn	616161
+28	mx	616161FFFFFFFFFFFFFFFFFFFFFFFFFF
+28	sp	--------------------------------
+29	a	ccc%
+29	mn	636363
+29	mx	636363FFFFFFFFFFFFFFFFFFFFFFFFFF
+29	sp	--------------------------------
+30	a	cch%
+30	mn	636368
+30	mx	636368FFFFFFFFFFFFFFFFFFFFFFFFFF
+30	sp	--------------------------------
+31	a	aaaaaaaaaaaaaaaaaaaa
+31	mn	61616161616161616161616161616161
+31	mx	61616161616161616161616161616161
+31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	63616161616161616161616161616161
+32	mx	63616161616161616161616161616161
+32	sp	--------------------------------
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET latin1;
+SELECT * FROM v1;
+id	name	val
+1	a	
+1	mn	
+1	mx	
+1	sp	--------------------------------
+2	a	_
+2	mn	00
+2	mx	FF
+2	sp	--------------------------------
+3	a	%
+3	mn	00000000000000000000000000000000
+3	mx	FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+3	sp	--------------------------------
+4	a	\_
+4	mn	5F
+4	mx	5F
+4	sp	--------------------------------
+5	a	\%
+5	mn	25
+5	mx	25
+5	sp	--------------------------------
+6	a	\
+6	mn	5C
+6	mx	5C
+6	sp	--------------------------------
+7	a	a
+7	mn	61
+7	mx	61
+7	sp	--------------------------------
+8	a	c
+8	mn	63
+8	mx	63
+8	sp	--------------------------------
+9	a	a_
+9	mn	6100
+9	mx	61FF
+9	sp	--------------------------------
+10	a	c_
+10	mn	6300
+10	mx	63FF
+10	sp	--------------------------------
+11	a	a%
+11	mn	61000000000000000000000000000000
+11	mx	61FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+11	sp	--------------------------------
+12	a	c%
+12	mn	63000000000000000000000000000000
+12	mx	63FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+12	sp	--------------------------------
+13	a	aa
+13	mn	6161
+13	mx	6161
+13	sp	--------------------------------
+14	a	cc
+14	mn	6363
+14	mx	6363
+14	sp	--------------------------------
+15	a	ch
+15	mn	6368
+15	mx	6368
+15	sp	--------------------------------
+16	a	aa_
+16	mn	616100
+16	mx	6161FF
+16	sp	--------------------------------
+17	a	cc_
+17	mn	636300
+17	mx	6363FF
+17	sp	--------------------------------
+18	a	ch_
+18	mn	636800
+18	mx	6368FF
+18	sp	--------------------------------
+19	a	aa%
+19	mn	61610000000000000000000000000000
+19	mx	6161FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+19	sp	--------------------------------
+20	a	cc%
+20	mn	63630000000000000000000000000000
+20	mx	6363FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+20	sp	--------------------------------
+21	a	ch%
+21	mn	63680000000000000000000000000000
+21	mx	6368FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+21	sp	--------------------------------
+22	a	aaa
+22	mn	616161
+22	mx	616161
+22	sp	--------------------------------
+23	a	ccc
+23	mn	636363
+23	mx	636363
+23	sp	--------------------------------
+24	a	cch
+24	mn	636368
+24	mx	636368
+24	sp	--------------------------------
+25	a	aaa_
+25	mn	61616100
+25	mx	616161FF
+25	sp	--------------------------------
+26	a	ccc_
+26	mn	63636300
+26	mx	636363FF
+26	sp	--------------------------------
+27	a	cch_
+27	mn	63636800
+27	mx	636368FF
+27	sp	--------------------------------
+28	a	aaa%
+28	mn	61616100000000000000000000000000
+28	mx	616161FFFFFFFFFFFFFFFFFFFFFFFFFF
+28	sp	--------------------------------
+29	a	ccc%
+29	mn	63636300000000000000000000000000
+29	mx	636363FFFFFFFFFFFFFFFFFFFFFFFFFF
+29	sp	--------------------------------
+30	a	cch%
+30	mn	63636800000000000000000000000000
+30	mx	636368FFFFFFFFFFFFFFFFFFFFFFFFFF
+30	sp	--------------------------------
+31	a	aaaaaaaaaaaaaaaaaaaa
+31	mn	61616161616161616161616161616161
+31	mx	61616161616161616161616161616161
+31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	63616161616161616161616161616161
+32	mx	63616161616161616161616161616161
+32	sp	--------------------------------
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8;
+SELECT * FROM v1;
+id	name	val
+1	a	
+1	mn	
+1	mx	
+1	sp	--------------------------------
+2	a	_
+2	mn	00000000000000000000000000000000
+2	mx	EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20
+2	sp	--------------------------------
+3	a	%
+3	mn	00000000000000000000000000000000
+3	mx	EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20
+3	sp	--------------------------------
+4	a	\_
+4	mn	5F
+4	mx	5F
+4	sp	--------------------------------
+5	a	\%
+5	mn	25
+5	mx	25
+5	sp	--------------------------------
+6	a	\
+6	mn	5C
+6	mx	5C
+6	sp	--------------------------------
+7	a	a
+7	mn	61
+7	mx	61
+7	sp	--------------------------------
+8	a	c
+8	mn	63
+8	mx	63
+8	sp	--------------------------------
+9	a	a_
+9	mn	61000000000000000000000000000000
+9	mx	61EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF
+9	sp	--------------------------------
+10	a	c_
+10	mn	63000000000000000000000000000000
+10	mx	63EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF
+10	sp	--------------------------------
+11	a	a%
+11	mn	61000000000000000000000000000000
+11	mx	61EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF
+11	sp	--------------------------------
+12	a	c%
+12	mn	63000000000000000000000000000000
+12	mx	63EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF
+12	sp	--------------------------------
+13	a	aa
+13	mn	6161
+13	mx	6161
+13	sp	--------------------------------
+14	a	cc
+14	mn	6363
+14	mx	6363
+14	sp	--------------------------------
+15	a	ch
+15	mn	6368
+15	mx	6368
+15	sp	--------------------------------
+16	a	aa_
+16	mn	61610000000000000000000000000000
+16	mx	6161EFBFBFEFBFBFEFBFBFEFBFBF2020
+16	sp	--------------------------------
+17	a	cc_
+17	mn	63630000000000000000000000000000
+17	mx	6363EFBFBFEFBFBFEFBFBFEFBFBF2020
+17	sp	--------------------------------
+18	a	ch_
+18	mn	63680000000000000000000000000000
+18	mx	6368EFBFBFEFBFBFEFBFBFEFBFBF2020
+18	sp	--------------------------------
+19	a	aa%
+19	mn	61610000000000000000000000000000
+19	mx	6161EFBFBFEFBFBFEFBFBFEFBFBF2020
+19	sp	--------------------------------
+20	a	cc%
+20	mn	63630000000000000000000000000000
+20	mx	6363EFBFBFEFBFBFEFBFBFEFBFBF2020
+20	sp	--------------------------------
+21	a	ch%
+21	mn	63680000000000000000000000000000
+21	mx	6368EFBFBFEFBFBFEFBFBFEFBFBF2020
+21	sp	--------------------------------
+22	a	aaa
+22	mn	616161
+22	mx	616161
+22	sp	--------------------------------
+23	a	ccc
+23	mn	636363
+23	mx	636363
+23	sp	--------------------------------
+24	a	cch
+24	mn	636368
+24	mx	636368
+24	sp	--------------------------------
+25	a	aaa_
+25	mn	61616100000000000000000000000000
+25	mx	616161EFBFBFEFBFBFEFBFBFEFBFBF20
+25	sp	--------------------------------
+26	a	ccc_
+26	mn	63636300000000000000000000000000
+26	mx	636363EFBFBFEFBFBFEFBFBFEFBFBF20
+26	sp	--------------------------------
+27	a	cch_
+27	mn	63636800000000000000000000000000
+27	mx	636368EFBFBFEFBFBFEFBFBFEFBFBF20
+27	sp	--------------------------------
+28	a	aaa%
+28	mn	61616100000000000000000000000000
+28	mx	616161EFBFBFEFBFBFEFBFBFEFBFBF20
+28	sp	--------------------------------
+29	a	ccc%
+29	mn	63636300000000000000000000000000
+29	mx	636363EFBFBFEFBFBFEFBFBFEFBFBF20
+29	sp	--------------------------------
+30	a	cch%
+30	mn	63636800000000000000000000000000
+30	mx	636368EFBFBFEFBFBFEFBFBFEFBFBF20
+30	sp	--------------------------------
+31	a	aaaaaaaaaaaaaaaaaaaa
+31	mn	6161616161
+31	mx	6161616161
+31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	6361616161
+32	mx	6361616161
+32	sp	--------------------------------
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
+SELECT * FROM v1;
+id	name	val
+1	a	
+1	mn	
+1	mx	
+1	sp	--------------------------------
+2	a	_
+2	mn	09090909090909090909090909090909
+2	mx	EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20
+2	sp	--------------------------------
+3	a	%
+3	mn	09090909090909090909090909090909
+3	mx	EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20
+3	sp	--------------------------------
+4	a	\_
+4	mn	5F
+4	mx	5F
+4	sp	--------------------------------
+5	a	\%
+5	mn	25
+5	mx	25
+5	sp	--------------------------------
+6	a	\
+6	mn	5C
+6	mx	5C
+6	sp	--------------------------------
+7	a	a
+7	mn	61
+7	mx	61
+7	sp	--------------------------------
+8	a	c
+8	mn	63
+8	mx	63
+8	sp	--------------------------------
+9	a	a_
+9	mn	61090909090909090909090909090909
+9	mx	61EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF
+9	sp	--------------------------------
+10	a	c_
+10	mn	63090909090909090909090909090909
+10	mx	63EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF
+10	sp	--------------------------------
+11	a	a%
+11	mn	61090909090909090909090909090909
+11	mx	61EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF
+11	sp	--------------------------------
+12	a	c%
+12	mn	63090909090909090909090909090909
+12	mx	63EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF
+12	sp	--------------------------------
+13	a	aa
+13	mn	6161
+13	mx	6161
+13	sp	--------------------------------
+14	a	cc
+14	mn	6363
+14	mx	6363
+14	sp	--------------------------------
+15	a	ch
+15	mn	6368
+15	mx	6368
+15	sp	--------------------------------
+16	a	aa_
+16	mn	61610909090909090909090909090909
+16	mx	6161EFBFBFEFBFBFEFBFBFEFBFBF2020
+16	sp	--------------------------------
+17	a	cc_
+17	mn	63630909090909090909090909090909
+17	mx	6363EFBFBFEFBFBFEFBFBFEFBFBF2020
+17	sp	--------------------------------
+18	a	ch_
+18	mn	63680909090909090909090909090909
+18	mx	6368EFBFBFEFBFBFEFBFBFEFBFBF2020
+18	sp	--------------------------------
+19	a	aa%
+19	mn	61610909090909090909090909090909
+19	mx	6161EFBFBFEFBFBFEFBFBFEFBFBF2020
+19	sp	--------------------------------
+20	a	cc%
+20	mn	63630909090909090909090909090909
+20	mx	6363EFBFBFEFBFBFEFBFBFEFBFBF2020
+20	sp	--------------------------------
+21	a	ch%
+21	mn	63680909090909090909090909090909
+21	mx	6368EFBFBFEFBFBFEFBFBFEFBFBF2020
+21	sp	--------------------------------
+22	a	aaa
+22	mn	616161
+22	mx	616161
+22	sp	--------------------------------
+23	a	ccc
+23	mn	636363
+23	mx	636363
+23	sp	--------------------------------
+24	a	cch
+24	mn	636368
+24	mx	636368
+24	sp	--------------------------------
+25	a	aaa_
+25	mn	61616109090909090909090909090909
+25	mx	616161EFBFBFEFBFBFEFBFBFEFBFBF20
+25	sp	--------------------------------
+26	a	ccc_
+26	mn	63636309090909090909090909090909
+26	mx	636363EFBFBFEFBFBFEFBFBFEFBFBF20
+26	sp	--------------------------------
+27	a	cch_
+27	mn	63636809090909090909090909090909
+27	mx	636368EFBFBFEFBFBFEFBFBFEFBFBF20
+27	sp	--------------------------------
+28	a	aaa%
+28	mn	61616109090909090909090909090909
+28	mx	616161EFBFBFEFBFBFEFBFBFEFBFBF20
+28	sp	--------------------------------
+29	a	ccc%
+29	mn	63636309090909090909090909090909
+29	mx	636363EFBFBFEFBFBFEFBFBFEFBFBF20
+29	sp	--------------------------------
+30	a	cch%
+30	mn	63636809090909090909090909090909
+30	mx	636368EFBFBFEFBFBFEFBFBFEFBFBF20
+30	sp	--------------------------------
+31	a	aaaaaaaaaaaaaaaaaaaa
+31	mn	6161616161
+31	mx	6161616161
+31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	6361616161
+32	mx	6361616161
+32	sp	--------------------------------
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_czech_ci;
+SELECT * FROM v1;
+id	name	val
+1	a	
+1	mn	
+1	mx	
+1	sp	--------------------------------
+2	a	_
+2	mn	09090909090909090909090909090909
+2	mx	EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20
+2	sp	--------------------------------
+3	a	%
+3	mn	09090909090909090909090909090909
+3	mx	EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20
+3	sp	--------------------------------
+4	a	\_
+4	mn	5F
+4	mx	5F
+4	sp	--------------------------------
+5	a	\%
+5	mn	25
+5	mx	25
+5	sp	--------------------------------
+6	a	\
+6	mn	5C
+6	mx	5C
+6	sp	--------------------------------
+7	a	a
+7	mn	61
+7	mx	61
+7	sp	--------------------------------
+8	a	c
+8	mn	63
+8	mx	63
+8	sp	--------------------------------
+9	a	a_
+9	mn	61090909090909090909090909090909
+9	mx	61EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF
+9	sp	--------------------------------
+10	a	c_
+10	mn	09090909090909090909090909090909
+10	mx	EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20
+10	sp	--------------------------------
+11	a	a%
+11	mn	61090909090909090909090909090909
+11	mx	61EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF
+11	sp	--------------------------------
+12	a	c%
+12	mn	09090909090909090909090909090909
+12	mx	EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20
+12	sp	--------------------------------
+13	a	aa
+13	mn	6161
+13	mx	6161
+13	sp	--------------------------------
+14	a	cc
+14	mn	6363
+14	mx	6363
+14	sp	--------------------------------
+15	a	ch
+15	mn	6368
+15	mx	6368
+15	sp	--------------------------------
+16	a	aa_
+16	mn	61610909090909090909090909090909
+16	mx	6161EFBFBFEFBFBFEFBFBFEFBFBF2020
+16	sp	--------------------------------
+17	a	cc_
+17	mn	63090909090909090909090909090909
+17	mx	63EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF
+17	sp	--------------------------------
+18	a	ch_
+18	mn	63680909090909090909090909090909
+18	mx	6368EFBFBFEFBFBFEFBFBFEFBFBF2020
+18	sp	--------------------------------
+19	a	aa%
+19	mn	61610909090909090909090909090909
+19	mx	6161EFBFBFEFBFBFEFBFBFEFBFBF2020
+19	sp	--------------------------------
+20	a	cc%
+20	mn	63090909090909090909090909090909
+20	mx	63EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF
+20	sp	--------------------------------
+21	a	ch%
+21	mn	63680909090909090909090909090909
+21	mx	6368EFBFBFEFBFBFEFBFBFEFBFBF2020
+21	sp	--------------------------------
+22	a	aaa
+22	mn	616161
+22	mx	616161
+22	sp	--------------------------------
+23	a	ccc
+23	mn	636363
+23	mx	636363
+23	sp	--------------------------------
+24	a	cch
+24	mn	636368
+24	mx	636368
+24	sp	--------------------------------
+25	a	aaa_
+25	mn	61616109090909090909090909090909
+25	mx	616161EFBFBFEFBFBFEFBFBFEFBFBF20
+25	sp	--------------------------------
+26	a	ccc_
+26	mn	63630909090909090909090909090909
+26	mx	6363EFBFBFEFBFBFEFBFBFEFBFBF2020
+26	sp	--------------------------------
+27	a	cch_
+27	mn	63636809090909090909090909090909
+27	mx	636368EFBFBFEFBFBFEFBFBFEFBFBF20
+27	sp	--------------------------------
+28	a	aaa%
+28	mn	61616109090909090909090909090909
+28	mx	616161EFBFBFEFBFBFEFBFBFEFBFBF20
+28	sp	--------------------------------
+29	a	ccc%
+29	mn	63630909090909090909090909090909
+29	mx	6363EFBFBFEFBFBFEFBFBFEFBFBF2020
+29	sp	--------------------------------
+30	a	cch%
+30	mn	63636809090909090909090909090909
+30	mx	636368EFBFBFEFBFBFEFBFBFEFBFBF20
+30	sp	--------------------------------
+31	a	aaaaaaaaaaaaaaaaaaaa
+31	mn	6161616161
+31	mx	6161616161
+31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	6361616161
+32	mx	6361616161
+32	sp	--------------------------------
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_danish_ci;
+SELECT * FROM v1;
+id	name	val
+1	a	
+1	mn	
+1	mx	
+1	sp	--------------------------------
+2	a	_
+2	mn	09090909090909090909090909090909
+2	mx	EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20
+2	sp	--------------------------------
+3	a	%
+3	mn	09090909090909090909090909090909
+3	mx	EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20
+3	sp	--------------------------------
+4	a	\_
+4	mn	5F
+4	mx	5F
+4	sp	--------------------------------
+5	a	\%
+5	mn	25
+5	mx	25
+5	sp	--------------------------------
+6	a	\
+6	mn	5C
+6	mx	5C
+6	sp	--------------------------------
+7	a	a
+7	mn	61
+7	mx	61
+7	sp	--------------------------------
+8	a	c
+8	mn	63
+8	mx	63
+8	sp	--------------------------------
+9	a	a_
+9	mn	09090909090909090909090909090909
+9	mx	EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20
+9	sp	--------------------------------
+10	a	c_
+10	mn	63090909090909090909090909090909
+10	mx	63EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF
+10	sp	--------------------------------
+11	a	a%
+11	mn	09090909090909090909090909090909
+11	mx	EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20
+11	sp	--------------------------------
+12	a	c%
+12	mn	63090909090909090909090909090909
+12	mx	63EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF
+12	sp	--------------------------------
+13	a	aa
+13	mn	6161
+13	mx	6161
+13	sp	--------------------------------
+14	a	cc
+14	mn	6363
+14	mx	6363
+14	sp	--------------------------------
+15	a	ch
+15	mn	6368
+15	mx	6368
+15	sp	--------------------------------
+16	a	aa_
+16	mn	61610909090909090909090909090909
+16	mx	6161EFBFBFEFBFBFEFBFBFEFBFBF2020
+16	sp	--------------------------------
+17	a	cc_
+17	mn	63630909090909090909090909090909
+17	mx	6363EFBFBFEFBFBFEFBFBFEFBFBF2020
+17	sp	--------------------------------
+18	a	ch_
+18	mn	63680909090909090909090909090909
+18	mx	6368EFBFBFEFBFBFEFBFBFEFBFBF2020
+18	sp	--------------------------------
+19	a	aa%
+19	mn	61610909090909090909090909090909
+19	mx	6161EFBFBFEFBFBFEFBFBFEFBFBF2020
+19	sp	--------------------------------
+20	a	cc%
+20	mn	63630909090909090909090909090909
+20	mx	6363EFBFBFEFBFBFEFBFBFEFBFBF2020
+20	sp	--------------------------------
+21	a	ch%
+21	mn	63680909090909090909090909090909
+21	mx	6368EFBFBFEFBFBFEFBFBFEFBFBF2020
+21	sp	--------------------------------
+22	a	aaa
+22	mn	616161
+22	mx	616161
+22	sp	--------------------------------
+23	a	ccc
+23	mn	636363
+23	mx	636363
+23	sp	--------------------------------
+24	a	cch
+24	mn	636368
+24	mx	636368
+24	sp	--------------------------------
+25	a	aaa_
+25	mn	61610909090909090909090909090909
+25	mx	6161EFBFBFEFBFBFEFBFBFEFBFBF2020
+25	sp	--------------------------------
+26	a	ccc_
+26	mn	63636309090909090909090909090909
+26	mx	636363EFBFBFEFBFBFEFBFBFEFBFBF20
+26	sp	--------------------------------
+27	a	cch_
+27	mn	63636809090909090909090909090909
+27	mx	636368EFBFBFEFBFBFEFBFBFEFBFBF20
+27	sp	--------------------------------
+28	a	aaa%
+28	mn	61610909090909090909090909090909
+28	mx	6161EFBFBFEFBFBFEFBFBFEFBFBF2020
+28	sp	--------------------------------
+29	a	ccc%
+29	mn	63636309090909090909090909090909
+29	mx	636363EFBFBFEFBFBFEFBFBFEFBFBF20
+29	sp	--------------------------------
+30	a	cch%
+30	mn	63636809090909090909090909090909
+30	mx	636368EFBFBFEFBFBFEFBFBFEFBFBF20
+30	sp	--------------------------------
+31	a	aaaaaaaaaaaaaaaaaaaa
+31	mn	61616161090909090909090909090909
+31	mx	61616161EFBFBFEFBFBFEFBFBFEFBFBF
+31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	6361616161
+32	mx	6361616161
+32	sp	--------------------------------
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8mb4;
+SELECT * FROM v1;
+id	name	val
+1	a	
+1	mn	
+1	mx	
+1	sp	--------------------------------
+2	a	_
+2	mn	00000000000000000000000000000000
+2	mx	EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20
+2	sp	--------------------------------
+3	a	%
+3	mn	00000000000000000000000000000000
+3	mx	EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20
+3	sp	--------------------------------
+4	a	\_
+4	mn	5F
+4	mx	5F
+4	sp	--------------------------------
+5	a	\%
+5	mn	25
+5	mx	25
+5	sp	--------------------------------
+6	a	\
+6	mn	5C
+6	mx	5C
+6	sp	--------------------------------
+7	a	a
+7	mn	61
+7	mx	61
+7	sp	--------------------------------
+8	a	c
+8	mn	63
+8	mx	63
+8	sp	--------------------------------
+9	a	a_
+9	mn	61000000000000000000000000000000
+9	mx	61EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF
+9	sp	--------------------------------
+10	a	c_
+10	mn	63000000000000000000000000000000
+10	mx	63EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF
+10	sp	--------------------------------
+11	a	a%
+11	mn	61000000000000000000000000000000
+11	mx	61EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF
+11	sp	--------------------------------
+12	a	c%
+12	mn	63000000000000000000000000000000
+12	mx	63EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF
+12	sp	--------------------------------
+13	a	aa
+13	mn	6161
+13	mx	6161
+13	sp	--------------------------------
+14	a	cc
+14	mn	6363
+14	mx	6363
+14	sp	--------------------------------
+15	a	ch
+15	mn	6368
+15	mx	6368
+15	sp	--------------------------------
+16	a	aa_
+16	mn	61610000000000000000000000000000
+16	mx	6161EFBFBFEFBFBFEFBFBFEFBFBF2020
+16	sp	--------------------------------
+17	a	cc_
+17	mn	63630000000000000000000000000000
+17	mx	6363EFBFBFEFBFBFEFBFBFEFBFBF2020
+17	sp	--------------------------------
+18	a	ch_
+18	mn	63680000000000000000000000000000
+18	mx	6368EFBFBFEFBFBFEFBFBFEFBFBF2020
+18	sp	--------------------------------
+19	a	aa%
+19	mn	61610000000000000000000000000000
+19	mx	6161EFBFBFEFBFBFEFBFBFEFBFBF2020
+19	sp	--------------------------------
+20	a	cc%
+20	mn	63630000000000000000000000000000
+20	mx	6363EFBFBFEFBFBFEFBFBFEFBFBF2020
+20	sp	--------------------------------
+21	a	ch%
+21	mn	63680000000000000000000000000000
+21	mx	6368EFBFBFEFBFBFEFBFBFEFBFBF2020
+21	sp	--------------------------------
+22	a	aaa
+22	mn	616161
+22	mx	616161
+22	sp	--------------------------------
+23	a	ccc
+23	mn	636363
+23	mx	636363
+23	sp	--------------------------------
+24	a	cch
+24	mn	636368
+24	mx	636368
+24	sp	--------------------------------
+25	a	aaa_
+25	mn	61616100000000000000000000000000
+25	mx	616161EFBFBFEFBFBFEFBFBFEFBFBF20
+25	sp	--------------------------------
+26	a	ccc_
+26	mn	63636300000000000000000000000000
+26	mx	636363EFBFBFEFBFBFEFBFBFEFBFBF20
+26	sp	--------------------------------
+27	a	cch_
+27	mn	63636800000000000000000000000000
+27	mx	636368EFBFBFEFBFBFEFBFBFEFBFBF20
+27	sp	--------------------------------
+28	a	aaa%
+28	mn	61616100000000000000000000000000
+28	mx	616161EFBFBFEFBFBFEFBFBFEFBFBF20
+28	sp	--------------------------------
+29	a	ccc%
+29	mn	63636300000000000000000000000000
+29	mx	636363EFBFBFEFBFBFEFBFBFEFBFBF20
+29	sp	--------------------------------
+30	a	cch%
+30	mn	63636800000000000000000000000000
+30	mx	636368EFBFBFEFBFBFEFBFBFEFBFBF20
+30	sp	--------------------------------
+31	a	aaaaaaaaaaaaaaaaaaaa
+31	mn	61616161
+31	mx	61616161
+31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	63616161
+32	mx	63616161
+32	sp	--------------------------------
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+SELECT * FROM v1;
+id	name	val
+1	a	
+1	mn	
+1	mx	
+1	sp	--------------------------------
+2	a	_
+2	mn	09090909090909090909090909090909
+2	mx	EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20
+2	sp	--------------------------------
+3	a	%
+3	mn	09090909090909090909090909090909
+3	mx	EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20
+3	sp	--------------------------------
+4	a	\_
+4	mn	5F
+4	mx	5F
+4	sp	--------------------------------
+5	a	\%
+5	mn	25
+5	mx	25
+5	sp	--------------------------------
+6	a	\
+6	mn	5C
+6	mx	5C
+6	sp	--------------------------------
+7	a	a
+7	mn	61
+7	mx	61
+7	sp	--------------------------------
+8	a	c
+8	mn	63
+8	mx	63
+8	sp	--------------------------------
+9	a	a_
+9	mn	61090909090909090909090909090909
+9	mx	61EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF
+9	sp	--------------------------------
+10	a	c_
+10	mn	63090909090909090909090909090909
+10	mx	63EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF
+10	sp	--------------------------------
+11	a	a%
+11	mn	61090909090909090909090909090909
+11	mx	61EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF
+11	sp	--------------------------------
+12	a	c%
+12	mn	63090909090909090909090909090909
+12	mx	63EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF
+12	sp	--------------------------------
+13	a	aa
+13	mn	6161
+13	mx	6161
+13	sp	--------------------------------
+14	a	cc
+14	mn	6363
+14	mx	6363
+14	sp	--------------------------------
+15	a	ch
+15	mn	6368
+15	mx	6368
+15	sp	--------------------------------
+16	a	aa_
+16	mn	61610909090909090909090909090909
+16	mx	6161EFBFBFEFBFBFEFBFBFEFBFBF2020
+16	sp	--------------------------------
+17	a	cc_
+17	mn	63630909090909090909090909090909
+17	mx	6363EFBFBFEFBFBFEFBFBFEFBFBF2020
+17	sp	--------------------------------
+18	a	ch_
+18	mn	63680909090909090909090909090909
+18	mx	6368EFBFBFEFBFBFEFBFBFEFBFBF2020
+18	sp	--------------------------------
+19	a	aa%
+19	mn	61610909090909090909090909090909
+19	mx	6161EFBFBFEFBFBFEFBFBFEFBFBF2020
+19	sp	--------------------------------
+20	a	cc%
+20	mn	63630909090909090909090909090909
+20	mx	6363EFBFBFEFBFBFEFBFBFEFBFBF2020
+20	sp	--------------------------------
+21	a	ch%
+21	mn	63680909090909090909090909090909
+21	mx	6368EFBFBFEFBFBFEFBFBFEFBFBF2020
+21	sp	--------------------------------
+22	a	aaa
+22	mn	616161
+22	mx	616161
+22	sp	--------------------------------
+23	a	ccc
+23	mn	636363
+23	mx	636363
+23	sp	--------------------------------
+24	a	cch
+24	mn	636368
+24	mx	636368
+24	sp	--------------------------------
+25	a	aaa_
+25	mn	61616109090909090909090909090909
+25	mx	616161EFBFBFEFBFBFEFBFBFEFBFBF20
+25	sp	--------------------------------
+26	a	ccc_
+26	mn	63636309090909090909090909090909
+26	mx	636363EFBFBFEFBFBFEFBFBFEFBFBF20
+26	sp	--------------------------------
+27	a	cch_
+27	mn	63636809090909090909090909090909
+27	mx	636368EFBFBFEFBFBFEFBFBFEFBFBF20
+27	sp	--------------------------------
+28	a	aaa%
+28	mn	61616109090909090909090909090909
+28	mx	616161EFBFBFEFBFBFEFBFBFEFBFBF20
+28	sp	--------------------------------
+29	a	ccc%
+29	mn	63636309090909090909090909090909
+29	mx	636363EFBFBFEFBFBFEFBFBFEFBFBF20
+29	sp	--------------------------------
+30	a	cch%
+30	mn	63636809090909090909090909090909
+30	mx	636368EFBFBFEFBFBFEFBFBFEFBFBF20
+30	sp	--------------------------------
+31	a	aaaaaaaaaaaaaaaaaaaa
+31	mn	61616161
+31	mx	61616161
+31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	63616161
+32	mx	63616161
+32	sp	--------------------------------
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_czech_ci;
+SELECT * FROM v1;
+id	name	val
+1	a	
+1	mn	
+1	mx	
+1	sp	--------------------------------
+2	a	_
+2	mn	09090909090909090909090909090909
+2	mx	EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20
+2	sp	--------------------------------
+3	a	%
+3	mn	09090909090909090909090909090909
+3	mx	EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20
+3	sp	--------------------------------
+4	a	\_
+4	mn	5F
+4	mx	5F
+4	sp	--------------------------------
+5	a	\%
+5	mn	25
+5	mx	25
+5	sp	--------------------------------
+6	a	\
+6	mn	5C
+6	mx	5C
+6	sp	--------------------------------
+7	a	a
+7	mn	61
+7	mx	61
+7	sp	--------------------------------
+8	a	c
+8	mn	63
+8	mx	63
+8	sp	--------------------------------
+9	a	a_
+9	mn	61090909090909090909090909090909
+9	mx	61EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF
+9	sp	--------------------------------
+10	a	c_
+10	mn	09090909090909090909090909090909
+10	mx	EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20
+10	sp	--------------------------------
+11	a	a%
+11	mn	61090909090909090909090909090909
+11	mx	61EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF
+11	sp	--------------------------------
+12	a	c%
+12	mn	09090909090909090909090909090909
+12	mx	EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20
+12	sp	--------------------------------
+13	a	aa
+13	mn	6161
+13	mx	6161
+13	sp	--------------------------------
+14	a	cc
+14	mn	6363
+14	mx	6363
+14	sp	--------------------------------
+15	a	ch
+15	mn	6368
+15	mx	6368
+15	sp	--------------------------------
+16	a	aa_
+16	mn	61610909090909090909090909090909
+16	mx	6161EFBFBFEFBFBFEFBFBFEFBFBF2020
+16	sp	--------------------------------
+17	a	cc_
+17	mn	63090909090909090909090909090909
+17	mx	63EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF
+17	sp	--------------------------------
+18	a	ch_
+18	mn	63680909090909090909090909090909
+18	mx	6368EFBFBFEFBFBFEFBFBFEFBFBF2020
+18	sp	--------------------------------
+19	a	aa%
+19	mn	61610909090909090909090909090909
+19	mx	6161EFBFBFEFBFBFEFBFBFEFBFBF2020
+19	sp	--------------------------------
+20	a	cc%
+20	mn	63090909090909090909090909090909
+20	mx	63EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF
+20	sp	--------------------------------
+21	a	ch%
+21	mn	63680909090909090909090909090909
+21	mx	6368EFBFBFEFBFBFEFBFBFEFBFBF2020
+21	sp	--------------------------------
+22	a	aaa
+22	mn	616161
+22	mx	616161
+22	sp	--------------------------------
+23	a	ccc
+23	mn	636363
+23	mx	636363
+23	sp	--------------------------------
+24	a	cch
+24	mn	636368
+24	mx	636368
+24	sp	--------------------------------
+25	a	aaa_
+25	mn	61616109090909090909090909090909
+25	mx	616161EFBFBFEFBFBFEFBFBFEFBFBF20
+25	sp	--------------------------------
+26	a	ccc_
+26	mn	63630909090909090909090909090909
+26	mx	6363EFBFBFEFBFBFEFBFBFEFBFBF2020
+26	sp	--------------------------------
+27	a	cch_
+27	mn	63636809090909090909090909090909
+27	mx	636368EFBFBFEFBFBFEFBFBFEFBFBF20
+27	sp	--------------------------------
+28	a	aaa%
+28	mn	61616109090909090909090909090909
+28	mx	616161EFBFBFEFBFBFEFBFBFEFBFBF20
+28	sp	--------------------------------
+29	a	ccc%
+29	mn	63630909090909090909090909090909
+29	mx	6363EFBFBFEFBFBFEFBFBFEFBFBF2020
+29	sp	--------------------------------
+30	a	cch%
+30	mn	63636809090909090909090909090909
+30	mx	636368EFBFBFEFBFBFEFBFBFEFBFBF20
+30	sp	--------------------------------
+31	a	aaaaaaaaaaaaaaaaaaaa
+31	mn	61616161
+31	mx	61616161
+31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	63616161
+32	mx	63616161
+32	sp	--------------------------------
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_danish_ci;
+SELECT * FROM v1;
+id	name	val
+1	a	
+1	mn	
+1	mx	
+1	sp	--------------------------------
+2	a	_
+2	mn	09090909090909090909090909090909
+2	mx	EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20
+2	sp	--------------------------------
+3	a	%
+3	mn	09090909090909090909090909090909
+3	mx	EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20
+3	sp	--------------------------------
+4	a	\_
+4	mn	5F
+4	mx	5F
+4	sp	--------------------------------
+5	a	\%
+5	mn	25
+5	mx	25
+5	sp	--------------------------------
+6	a	\
+6	mn	5C
+6	mx	5C
+6	sp	--------------------------------
+7	a	a
+7	mn	61
+7	mx	61
+7	sp	--------------------------------
+8	a	c
+8	mn	63
+8	mx	63
+8	sp	--------------------------------
+9	a	a_
+9	mn	09090909090909090909090909090909
+9	mx	EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20
+9	sp	--------------------------------
+10	a	c_
+10	mn	63090909090909090909090909090909
+10	mx	63EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF
+10	sp	--------------------------------
+11	a	a%
+11	mn	09090909090909090909090909090909
+11	mx	EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20
+11	sp	--------------------------------
+12	a	c%
+12	mn	63090909090909090909090909090909
+12	mx	63EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF
+12	sp	--------------------------------
+13	a	aa
+13	mn	6161
+13	mx	6161
+13	sp	--------------------------------
+14	a	cc
+14	mn	6363
+14	mx	6363
+14	sp	--------------------------------
+15	a	ch
+15	mn	6368
+15	mx	6368
+15	sp	--------------------------------
+16	a	aa_
+16	mn	61610909090909090909090909090909
+16	mx	6161EFBFBFEFBFBFEFBFBFEFBFBF2020
+16	sp	--------------------------------
+17	a	cc_
+17	mn	63630909090909090909090909090909
+17	mx	6363EFBFBFEFBFBFEFBFBFEFBFBF2020
+17	sp	--------------------------------
+18	a	ch_
+18	mn	63680909090909090909090909090909
+18	mx	6368EFBFBFEFBFBFEFBFBFEFBFBF2020
+18	sp	--------------------------------
+19	a	aa%
+19	mn	61610909090909090909090909090909
+19	mx	6161EFBFBFEFBFBFEFBFBFEFBFBF2020
+19	sp	--------------------------------
+20	a	cc%
+20	mn	63630909090909090909090909090909
+20	mx	6363EFBFBFEFBFBFEFBFBFEFBFBF2020
+20	sp	--------------------------------
+21	a	ch%
+21	mn	63680909090909090909090909090909
+21	mx	6368EFBFBFEFBFBFEFBFBFEFBFBF2020
+21	sp	--------------------------------
+22	a	aaa
+22	mn	616161
+22	mx	616161
+22	sp	--------------------------------
+23	a	ccc
+23	mn	636363
+23	mx	636363
+23	sp	--------------------------------
+24	a	cch
+24	mn	636368
+24	mx	636368
+24	sp	--------------------------------
+25	a	aaa_
+25	mn	61610909090909090909090909090909
+25	mx	6161EFBFBFEFBFBFEFBFBFEFBFBF2020
+25	sp	--------------------------------
+26	a	ccc_
+26	mn	63636309090909090909090909090909
+26	mx	636363EFBFBFEFBFBFEFBFBFEFBFBF20
+26	sp	--------------------------------
+27	a	cch_
+27	mn	63636809090909090909090909090909
+27	mx	636368EFBFBFEFBFBFEFBFBFEFBFBF20
+27	sp	--------------------------------
+28	a	aaa%
+28	mn	61610909090909090909090909090909
+28	mx	6161EFBFBFEFBFBFEFBFBFEFBFBF2020
+28	sp	--------------------------------
+29	a	ccc%
+29	mn	63636309090909090909090909090909
+29	mx	636363EFBFBFEFBFBFEFBFBFEFBFBF20
+29	sp	--------------------------------
+30	a	cch%
+30	mn	63636809090909090909090909090909
+30	mx	636368EFBFBFEFBFBFEFBFBFEFBFBF20
+30	sp	--------------------------------
+31	a	aaaaaaaaaaaaaaaaaaaa
+31	mn	61616161
+31	mx	61616161
+31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	63616109090909090909090909090909
+32	mx	636161EFBFBFEFBFBFEFBFBFEFBFBF20
+32	sp	--------------------------------
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci;
+SELECT * FROM v1;
+id	name	val
+1	a	
+1	mn	
+1	mx	
+1	sp	--------------------------------
+2	a	_
+2	mn	09090909090909090909090909090909
+2	mx	F48FBFBFF48FBFBFF48FBFBFF48FBFBF
+2	sp	--------------------------------
+3	a	%
+3	mn	09090909090909090909090909090909
+3	mx	F48FBFBFF48FBFBFF48FBFBFF48FBFBF
+3	sp	--------------------------------
+4	a	\_
+4	mn	5F
+4	mx	5F
+4	sp	--------------------------------
+5	a	\%
+5	mn	25
+5	mx	25
+5	sp	--------------------------------
+6	a	\
+6	mn	5C
+6	mx	5C
+6	sp	--------------------------------
+7	a	a
+7	mn	61
+7	mx	61
+7	sp	--------------------------------
+8	a	c
+8	mn	63
+8	mx	63
+8	sp	--------------------------------
+9	a	a_
+9	mn	61090909090909090909090909090909
+9	mx	61F48FBFBFF48FBFBFF48FBFBF202020
+9	sp	--------------------------------
+10	a	c_
+10	mn	63090909090909090909090909090909
+10	mx	63F48FBFBFF48FBFBFF48FBFBF202020
+10	sp	--------------------------------
+11	a	a%
+11	mn	61090909090909090909090909090909
+11	mx	61F48FBFBFF48FBFBFF48FBFBF202020
+11	sp	--------------------------------
+12	a	c%
+12	mn	63090909090909090909090909090909
+12	mx	63F48FBFBFF48FBFBFF48FBFBF202020
+12	sp	--------------------------------
+13	a	aa
+13	mn	6161
+13	mx	6161
+13	sp	--------------------------------
+14	a	cc
+14	mn	6363
+14	mx	6363
+14	sp	--------------------------------
+15	a	ch
+15	mn	6368
+15	mx	6368
+15	sp	--------------------------------
+16	a	aa_
+16	mn	61610909090909090909090909090909
+16	mx	6161F48FBFBFF48FBFBFF48FBFBF2020
+16	sp	--------------------------------
+17	a	cc_
+17	mn	63630909090909090909090909090909
+17	mx	6363F48FBFBFF48FBFBFF48FBFBF2020
+17	sp	--------------------------------
+18	a	ch_
+18	mn	63680909090909090909090909090909
+18	mx	6368F48FBFBFF48FBFBFF48FBFBF2020
+18	sp	--------------------------------
+19	a	aa%
+19	mn	61610909090909090909090909090909
+19	mx	6161F48FBFBFF48FBFBFF48FBFBF2020
+19	sp	--------------------------------
+20	a	cc%
+20	mn	63630909090909090909090909090909
+20	mx	6363F48FBFBFF48FBFBFF48FBFBF2020
+20	sp	--------------------------------
+21	a	ch%
+21	mn	63680909090909090909090909090909
+21	mx	6368F48FBFBFF48FBFBFF48FBFBF2020
+21	sp	--------------------------------
+22	a	aaa
+22	mn	616161
+22	mx	616161
+22	sp	--------------------------------
+23	a	ccc
+23	mn	636363
+23	mx	636363
+23	sp	--------------------------------
+24	a	cch
+24	mn	636368
+24	mx	636368
+24	sp	--------------------------------
+25	a	aaa_
+25	mn	61616109090909090909090909090909
+25	mx	616161F48FBFBFF48FBFBFF48FBFBF20
+25	sp	--------------------------------
+26	a	ccc_
+26	mn	63636309090909090909090909090909
+26	mx	636363F48FBFBFF48FBFBFF48FBFBF20
+26	sp	--------------------------------
+27	a	cch_
+27	mn	63636809090909090909090909090909
+27	mx	636368F48FBFBFF48FBFBFF48FBFBF20
+27	sp	--------------------------------
+28	a	aaa%
+28	mn	61616109090909090909090909090909
+28	mx	616161F48FBFBFF48FBFBFF48FBFBF20
+28	sp	--------------------------------
+29	a	ccc%
+29	mn	63636309090909090909090909090909
+29	mx	636363F48FBFBFF48FBFBFF48FBFBF20
+29	sp	--------------------------------
+30	a	cch%
+30	mn	63636809090909090909090909090909
+30	mx	636368F48FBFBFF48FBFBFF48FBFBF20
+30	sp	--------------------------------
+31	a	aaaaaaaaaaaaaaaaaaaa
+31	mn	61616161
+31	mx	61616161
+31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	63616161
+32	mx	63616161
+32	sp	--------------------------------
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET ucs2;
+SELECT * FROM v1;
+id	name	val
+1	a	
+1	mn	
+1	mx	
+1	sp	--------------------------------
+2	a	_
+2	mn	0000
+2	mx	FFFF
+2	sp	--------------------------------
+3	a	%
+3	mn	00000000000000000000000000000000
+3	mx	FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+3	sp	--------------------------------
+4	a	\_
+4	mn	005F
+4	mx	005F
+4	sp	--------------------------------
+5	a	\%
+5	mn	0025
+5	mx	0025
+5	sp	--------------------------------
+6	a	\
+6	mn	005C
+6	mx	005C
+6	sp	--------------------------------
+7	a	a
+7	mn	0061
+7	mx	0061
+7	sp	--------------------------------
+8	a	c
+8	mn	0063
+8	mx	0063
+8	sp	--------------------------------
+9	a	a_
+9	mn	00610000
+9	mx	0061FFFF
+9	sp	--------------------------------
+10	a	c_
+10	mn	00630000
+10	mx	0063FFFF
+10	sp	--------------------------------
+11	a	a%
+11	mn	00610000000000000000000000000000
+11	mx	0061FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+11	sp	--------------------------------
+12	a	c%
+12	mn	00630000000000000000000000000000
+12	mx	0063FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+12	sp	--------------------------------
+13	a	aa
+13	mn	00610061
+13	mx	00610061
+13	sp	--------------------------------
+14	a	cc
+14	mn	00630063
+14	mx	00630063
+14	sp	--------------------------------
+15	a	ch
+15	mn	00630068
+15	mx	00630068
+15	sp	--------------------------------
+16	a	aa_
+16	mn	006100610000
+16	mx	00610061FFFF
+16	sp	--------------------------------
+17	a	cc_
+17	mn	006300630000
+17	mx	00630063FFFF
+17	sp	--------------------------------
+18	a	ch_
+18	mn	006300680000
+18	mx	00630068FFFF
+18	sp	--------------------------------
+19	a	aa%
+19	mn	00610061000000000000000000000000
+19	mx	00610061FFFFFFFFFFFFFFFFFFFFFFFF
+19	sp	--------------------------------
+20	a	cc%
+20	mn	00630063000000000000000000000000
+20	mx	00630063FFFFFFFFFFFFFFFFFFFFFFFF
+20	sp	--------------------------------
+21	a	ch%
+21	mn	00630068000000000000000000000000
+21	mx	00630068FFFFFFFFFFFFFFFFFFFFFFFF
+21	sp	--------------------------------
+22	a	aaa
+22	mn	006100610061
+22	mx	006100610061
+22	sp	--------------------------------
+23	a	ccc
+23	mn	006300630063
+23	mx	006300630063
+23	sp	--------------------------------
+24	a	cch
+24	mn	006300630068
+24	mx	006300630068
+24	sp	--------------------------------
+25	a	aaa_
+25	mn	0061006100610000
+25	mx	006100610061FFFF
+25	sp	--------------------------------
+26	a	ccc_
+26	mn	0063006300630000
+26	mx	006300630063FFFF
+26	sp	--------------------------------
+27	a	cch_
+27	mn	0063006300680000
+27	mx	006300630068FFFF
+27	sp	--------------------------------
+28	a	aaa%
+28	mn	00610061006100000000000000000000
+28	mx	006100610061FFFFFFFFFFFFFFFFFFFF
+28	sp	--------------------------------
+29	a	ccc%
+29	mn	00630063006300000000000000000000
+29	mx	006300630063FFFFFFFFFFFFFFFFFFFF
+29	sp	--------------------------------
+30	a	cch%
+30	mn	00630063006800000000000000000000
+30	mx	006300630068FFFFFFFFFFFFFFFFFFFF
+30	sp	--------------------------------
+31	a	aaaaaaaaaaaaaaaaaaaa
+31	mn	00610061006100610061006100610061
+31	mx	00610061006100610061006100610061
+31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	00630061006100610061006100610061
+32	mx	00630061006100610061006100610061
+32	sp	--------------------------------
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET ucs2 COLLATE ucs2_unicode_ci;
+SELECT * FROM v1;
+id	name	val
+1	a	
+1	mn	
+1	mx	
+1	sp	--------------------------------
+2	a	_
+2	mn	0009
+2	mx	FFFF
+2	sp	--------------------------------
+3	a	%
+3	mn	00090009000900090009000900090009
+3	mx	FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+3	sp	--------------------------------
+4	a	\_
+4	mn	005F
+4	mx	005F
+4	sp	--------------------------------
+5	a	\%
+5	mn	0025
+5	mx	0025
+5	sp	--------------------------------
+6	a	\
+6	mn	005C
+6	mx	005C
+6	sp	--------------------------------
+7	a	a
+7	mn	0061
+7	mx	0061
+7	sp	--------------------------------
+8	a	c
+8	mn	0063
+8	mx	0063
+8	sp	--------------------------------
+9	a	a_
+9	mn	00610009
+9	mx	0061FFFF
+9	sp	--------------------------------
+10	a	c_
+10	mn	00630009
+10	mx	0063FFFF
+10	sp	--------------------------------
+11	a	a%
+11	mn	00610009000900090009000900090009
+11	mx	0061FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+11	sp	--------------------------------
+12	a	c%
+12	mn	00630009000900090009000900090009
+12	mx	0063FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+12	sp	--------------------------------
+13	a	aa
+13	mn	00610061
+13	mx	00610061
+13	sp	--------------------------------
+14	a	cc
+14	mn	00630063
+14	mx	00630063
+14	sp	--------------------------------
+15	a	ch
+15	mn	00630068
+15	mx	00630068
+15	sp	--------------------------------
+16	a	aa_
+16	mn	006100610009
+16	mx	00610061FFFF
+16	sp	--------------------------------
+17	a	cc_
+17	mn	006300630009
+17	mx	00630063FFFF
+17	sp	--------------------------------
+18	a	ch_
+18	mn	006300680009
+18	mx	00630068FFFF
+18	sp	--------------------------------
+19	a	aa%
+19	mn	00610061000900090009000900090009
+19	mx	00610061FFFFFFFFFFFFFFFFFFFFFFFF
+19	sp	--------------------------------
+20	a	cc%
+20	mn	00630063000900090009000900090009
+20	mx	00630063FFFFFFFFFFFFFFFFFFFFFFFF
+20	sp	--------------------------------
+21	a	ch%
+21	mn	00630068000900090009000900090009
+21	mx	00630068FFFFFFFFFFFFFFFFFFFFFFFF
+21	sp	--------------------------------
+22	a	aaa
+22	mn	006100610061
+22	mx	006100610061
+22	sp	--------------------------------
+23	a	ccc
+23	mn	006300630063
+23	mx	006300630063
+23	sp	--------------------------------
+24	a	cch
+24	mn	006300630068
+24	mx	006300630068
+24	sp	--------------------------------
+25	a	aaa_
+25	mn	0061006100610009
+25	mx	006100610061FFFF
+25	sp	--------------------------------
+26	a	ccc_
+26	mn	0063006300630009
+26	mx	006300630063FFFF
+26	sp	--------------------------------
+27	a	cch_
+27	mn	0063006300680009
+27	mx	006300630068FFFF
+27	sp	--------------------------------
+28	a	aaa%
+28	mn	00610061006100090009000900090009
+28	mx	006100610061FFFFFFFFFFFFFFFFFFFF
+28	sp	--------------------------------
+29	a	ccc%
+29	mn	00630063006300090009000900090009
+29	mx	006300630063FFFFFFFFFFFFFFFFFFFF
+29	sp	--------------------------------
+30	a	cch%
+30	mn	00630063006800090009000900090009
+30	mx	006300630068FFFFFFFFFFFFFFFFFFFF
+30	sp	--------------------------------
+31	a	aaaaaaaaaaaaaaaaaaaa
+31	mn	00610061006100610061006100610061
+31	mx	00610061006100610061006100610061
+31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	00630061006100610061006100610061
+32	mx	00630061006100610061006100610061
+32	sp	--------------------------------
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET ucs2 COLLATE ucs2_czech_ci;
+SELECT * FROM v1;
+id	name	val
+1	a	
+1	mn	
+1	mx	
+1	sp	--------------------------------
+2	a	_
+2	mn	0009
+2	mx	FFFF
+2	sp	--------------------------------
+3	a	%
+3	mn	00090009000900090009000900090009
+3	mx	FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+3	sp	--------------------------------
+4	a	\_
+4	mn	005F
+4	mx	005F
+4	sp	--------------------------------
+5	a	\%
+5	mn	0025
+5	mx	0025
+5	sp	--------------------------------
+6	a	\
+6	mn	005C
+6	mx	005C
+6	sp	--------------------------------
+7	a	a
+7	mn	0061
+7	mx	0061
+7	sp	--------------------------------
+8	a	c
+8	mn	0063
+8	mx	0063
+8	sp	--------------------------------
+9	a	a_
+9	mn	00610009
+9	mx	0061FFFF
+9	sp	--------------------------------
+10	a	c_
+10	mn	00090009000900090009000900090009
+10	mx	FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+10	sp	--------------------------------
+11	a	a%
+11	mn	00610009000900090009000900090009
+11	mx	0061FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+11	sp	--------------------------------
+12	a	c%
+12	mn	00090009000900090009000900090009
+12	mx	FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+12	sp	--------------------------------
+13	a	aa
+13	mn	00610061
+13	mx	00610061
+13	sp	--------------------------------
+14	a	cc
+14	mn	00630063
+14	mx	00630063
+14	sp	--------------------------------
+15	a	ch
+15	mn	00630068
+15	mx	00630068
+15	sp	--------------------------------
+16	a	aa_
+16	mn	006100610009
+16	mx	00610061FFFF
+16	sp	--------------------------------
+17	a	cc_
+17	mn	00630009000900090009000900090009
+17	mx	0063FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+17	sp	--------------------------------
+18	a	ch_
+18	mn	006300680009
+18	mx	00630068FFFF
+18	sp	--------------------------------
+19	a	aa%
+19	mn	00610061000900090009000900090009
+19	mx	00610061FFFFFFFFFFFFFFFFFFFFFFFF
+19	sp	--------------------------------
+20	a	cc%
+20	mn	00630009000900090009000900090009
+20	mx	0063FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+20	sp	--------------------------------
+21	a	ch%
+21	mn	00630068000900090009000900090009
+21	mx	00630068FFFFFFFFFFFFFFFFFFFFFFFF
+21	sp	--------------------------------
+22	a	aaa
+22	mn	006100610061
+22	mx	006100610061
+22	sp	--------------------------------
+23	a	ccc
+23	mn	006300630063
+23	mx	006300630063
+23	sp	--------------------------------
+24	a	cch
+24	mn	006300630068
+24	mx	006300630068
+24	sp	--------------------------------
+25	a	aaa_
+25	mn	0061006100610009
+25	mx	006100610061FFFF
+25	sp	--------------------------------
+26	a	ccc_
+26	mn	00630063000900090009000900090009
+26	mx	00630063FFFFFFFFFFFFFFFFFFFFFFFF
+26	sp	--------------------------------
+27	a	cch_
+27	mn	0063006300680009
+27	mx	006300630068FFFF
+27	sp	--------------------------------
+28	a	aaa%
+28	mn	00610061006100090009000900090009
+28	mx	006100610061FFFFFFFFFFFFFFFFFFFF
+28	sp	--------------------------------
+29	a	ccc%
+29	mn	00630063000900090009000900090009
+29	mx	00630063FFFFFFFFFFFFFFFFFFFFFFFF
+29	sp	--------------------------------
+30	a	cch%
+30	mn	00630063006800090009000900090009
+30	mx	006300630068FFFFFFFFFFFFFFFFFFFF
+30	sp	--------------------------------
+31	a	aaaaaaaaaaaaaaaaaaaa
+31	mn	00610061006100610061006100610061
+31	mx	00610061006100610061006100610061
+31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	00630061006100610061006100610061
+32	mx	00630061006100610061006100610061
+32	sp	--------------------------------
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET ucs2 COLLATE ucs2_danish_ci;
+SELECT * FROM v1;
+id	name	val
+1	a	
+1	mn	
+1	mx	
+1	sp	--------------------------------
+2	a	_
+2	mn	0009
+2	mx	FFFF
+2	sp	--------------------------------
+3	a	%
+3	mn	00090009000900090009000900090009
+3	mx	FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+3	sp	--------------------------------
+4	a	\_
+4	mn	005F
+4	mx	005F
+4	sp	--------------------------------
+5	a	\%
+5	mn	0025
+5	mx	0025
+5	sp	--------------------------------
+6	a	\
+6	mn	005C
+6	mx	005C
+6	sp	--------------------------------
+7	a	a
+7	mn	0061
+7	mx	0061
+7	sp	--------------------------------
+8	a	c
+8	mn	0063
+8	mx	0063
+8	sp	--------------------------------
+9	a	a_
+9	mn	00090009000900090009000900090009
+9	mx	FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+9	sp	--------------------------------
+10	a	c_
+10	mn	00630009
+10	mx	0063FFFF
+10	sp	--------------------------------
+11	a	a%
+11	mn	00090009000900090009000900090009
+11	mx	FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+11	sp	--------------------------------
+12	a	c%
+12	mn	00630009000900090009000900090009
+12	mx	0063FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+12	sp	--------------------------------
+13	a	aa
+13	mn	00610061
+13	mx	00610061
+13	sp	--------------------------------
+14	a	cc
+14	mn	00630063
+14	mx	00630063
+14	sp	--------------------------------
+15	a	ch
+15	mn	00630068
+15	mx	00630068
+15	sp	--------------------------------
+16	a	aa_
+16	mn	006100610009
+16	mx	00610061FFFF
+16	sp	--------------------------------
+17	a	cc_
+17	mn	006300630009
+17	mx	00630063FFFF
+17	sp	--------------------------------
+18	a	ch_
+18	mn	006300680009
+18	mx	00630068FFFF
+18	sp	--------------------------------
+19	a	aa%
+19	mn	00610061000900090009000900090009
+19	mx	00610061FFFFFFFFFFFFFFFFFFFFFFFF
+19	sp	--------------------------------
+20	a	cc%
+20	mn	00630063000900090009000900090009
+20	mx	00630063FFFFFFFFFFFFFFFFFFFFFFFF
+20	sp	--------------------------------
+21	a	ch%
+21	mn	00630068000900090009000900090009
+21	mx	00630068FFFFFFFFFFFFFFFFFFFFFFFF
+21	sp	--------------------------------
+22	a	aaa
+22	mn	006100610061
+22	mx	006100610061
+22	sp	--------------------------------
+23	a	ccc
+23	mn	006300630063
+23	mx	006300630063
+23	sp	--------------------------------
+24	a	cch
+24	mn	006300630068
+24	mx	006300630068
+24	sp	--------------------------------
+25	a	aaa_
+25	mn	00610061000900090009000900090009
+25	mx	00610061FFFFFFFFFFFFFFFFFFFFFFFF
+25	sp	--------------------------------
+26	a	ccc_
+26	mn	0063006300630009
+26	mx	006300630063FFFF
+26	sp	--------------------------------
+27	a	cch_
+27	mn	0063006300680009
+27	mx	006300630068FFFF
+27	sp	--------------------------------
+28	a	aaa%
+28	mn	00610061000900090009000900090009
+28	mx	00610061FFFFFFFFFFFFFFFFFFFFFFFF
+28	sp	--------------------------------
+29	a	ccc%
+29	mn	00630063006300090009000900090009
+29	mx	006300630063FFFFFFFFFFFFFFFFFFFF
+29	sp	--------------------------------
+30	a	cch%
+30	mn	00630063006800090009000900090009
+30	mx	006300630068FFFFFFFFFFFFFFFFFFFF
+30	sp	--------------------------------
+31	a	aaaaaaaaaaaaaaaaaaaa
+31	mn	00610061006100610061006100610061
+31	mx	00610061006100610061006100610061
+31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	00630061006100610061006100610009
+32	mx	0063006100610061006100610061FFFF
+32	sp	--------------------------------
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf16;
+SELECT * FROM v1;
+id	name	val
+1	a	
+1	mn	
+1	mx	
+1	sp	--------------------------------
+2	a	_
+2	mn	0000
+2	mx	FFFF
+2	sp	--------------------------------
+3	a	%
+3	mn	00000000000000000000000000000000
+3	mx	FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+3	sp	--------------------------------
+4	a	\_
+4	mn	005F
+4	mx	005F
+4	sp	--------------------------------
+5	a	\%
+5	mn	0025
+5	mx	0025
+5	sp	--------------------------------
+6	a	\
+6	mn	005C
+6	mx	005C
+6	sp	--------------------------------
+7	a	a
+7	mn	0061
+7	mx	0061
+7	sp	--------------------------------
+8	a	c
+8	mn	0063
+8	mx	0063
+8	sp	--------------------------------
+9	a	a_
+9	mn	00610000
+9	mx	0061FFFF
+9	sp	--------------------------------
+10	a	c_
+10	mn	00630000
+10	mx	0063FFFF
+10	sp	--------------------------------
+11	a	a%
+11	mn	00610000000000000000000000000000
+11	mx	0061FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+11	sp	--------------------------------
+12	a	c%
+12	mn	00630000000000000000000000000000
+12	mx	0063FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+12	sp	--------------------------------
+13	a	aa
+13	mn	00610061
+13	mx	00610061
+13	sp	--------------------------------
+14	a	cc
+14	mn	00630063
+14	mx	00630063
+14	sp	--------------------------------
+15	a	ch
+15	mn	00630068
+15	mx	00630068
+15	sp	--------------------------------
+16	a	aa_
+16	mn	006100610000
+16	mx	00610061FFFF
+16	sp	--------------------------------
+17	a	cc_
+17	mn	006300630000
+17	mx	00630063FFFF
+17	sp	--------------------------------
+18	a	ch_
+18	mn	006300680000
+18	mx	00630068FFFF
+18	sp	--------------------------------
+19	a	aa%
+19	mn	00610061000000000000000000000000
+19	mx	00610061FFFFFFFFFFFFFFFFFFFFFFFF
+19	sp	--------------------------------
+20	a	cc%
+20	mn	00630063000000000000000000000000
+20	mx	00630063FFFFFFFFFFFFFFFFFFFFFFFF
+20	sp	--------------------------------
+21	a	ch%
+21	mn	00630068000000000000000000000000
+21	mx	00630068FFFFFFFFFFFFFFFFFFFFFFFF
+21	sp	--------------------------------
+22	a	aaa
+22	mn	006100610061
+22	mx	006100610061
+22	sp	--------------------------------
+23	a	ccc
+23	mn	006300630063
+23	mx	006300630063
+23	sp	--------------------------------
+24	a	cch
+24	mn	006300630068
+24	mx	006300630068
+24	sp	--------------------------------
+25	a	aaa_
+25	mn	0061006100610000
+25	mx	006100610061FFFF
+25	sp	--------------------------------
+26	a	ccc_
+26	mn	0063006300630000
+26	mx	006300630063FFFF
+26	sp	--------------------------------
+27	a	cch_
+27	mn	0063006300680000
+27	mx	006300630068FFFF
+27	sp	--------------------------------
+28	a	aaa%
+28	mn	00610061006100000000000000000000
+28	mx	006100610061FFFFFFFFFFFFFFFFFFFF
+28	sp	--------------------------------
+29	a	ccc%
+29	mn	00630063006300000000000000000000
+29	mx	006300630063FFFFFFFFFFFFFFFFFFFF
+29	sp	--------------------------------
+30	a	cch%
+30	mn	00630063006800000000000000000000
+30	mx	006300630068FFFFFFFFFFFFFFFFFFFF
+30	sp	--------------------------------
+31	a	aaaaaaaaaaaaaaaaaaaa
+31	mn	0061006100610061
+31	mx	0061006100610061
+31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	0063006100610061
+32	mx	0063006100610061
+32	sp	--------------------------------
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf16 COLLATE utf16_unicode_ci;
+SELECT * FROM v1;
+id	name	val
+1	a	
+1	mn	
+1	mx	
+1	sp	--------------------------------
+2	a	_
+2	mn	0009
+2	mx	FFFF
+2	sp	--------------------------------
+3	a	%
+3	mn	00090009000900090009000900090009
+3	mx	FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+3	sp	--------------------------------
+4	a	\_
+4	mn	005F
+4	mx	005F
+4	sp	--------------------------------
+5	a	\%
+5	mn	0025
+5	mx	0025
+5	sp	--------------------------------
+6	a	\
+6	mn	005C
+6	mx	005C
+6	sp	--------------------------------
+7	a	a
+7	mn	0061
+7	mx	0061
+7	sp	--------------------------------
+8	a	c
+8	mn	0063
+8	mx	0063
+8	sp	--------------------------------
+9	a	a_
+9	mn	00610009
+9	mx	0061FFFF
+9	sp	--------------------------------
+10	a	c_
+10	mn	00630009
+10	mx	0063FFFF
+10	sp	--------------------------------
+11	a	a%
+11	mn	00610009000900090009000900090009
+11	mx	0061FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+11	sp	--------------------------------
+12	a	c%
+12	mn	00630009000900090009000900090009
+12	mx	0063FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+12	sp	--------------------------------
+13	a	aa
+13	mn	00610061
+13	mx	00610061
+13	sp	--------------------------------
+14	a	cc
+14	mn	00630063
+14	mx	00630063
+14	sp	--------------------------------
+15	a	ch
+15	mn	00630068
+15	mx	00630068
+15	sp	--------------------------------
+16	a	aa_
+16	mn	006100610009
+16	mx	00610061FFFF
+16	sp	--------------------------------
+17	a	cc_
+17	mn	006300630009
+17	mx	00630063FFFF
+17	sp	--------------------------------
+18	a	ch_
+18	mn	006300680009
+18	mx	00630068FFFF
+18	sp	--------------------------------
+19	a	aa%
+19	mn	00610061000900090009000900090009
+19	mx	00610061FFFFFFFFFFFFFFFFFFFFFFFF
+19	sp	--------------------------------
+20	a	cc%
+20	mn	00630063000900090009000900090009
+20	mx	00630063FFFFFFFFFFFFFFFFFFFFFFFF
+20	sp	--------------------------------
+21	a	ch%
+21	mn	00630068000900090009000900090009
+21	mx	00630068FFFFFFFFFFFFFFFFFFFFFFFF
+21	sp	--------------------------------
+22	a	aaa
+22	mn	006100610061
+22	mx	006100610061
+22	sp	--------------------------------
+23	a	ccc
+23	mn	006300630063
+23	mx	006300630063
+23	sp	--------------------------------
+24	a	cch
+24	mn	006300630068
+24	mx	006300630068
+24	sp	--------------------------------
+25	a	aaa_
+25	mn	0061006100610009
+25	mx	006100610061FFFF
+25	sp	--------------------------------
+26	a	ccc_
+26	mn	0063006300630009
+26	mx	006300630063FFFF
+26	sp	--------------------------------
+27	a	cch_
+27	mn	0063006300680009
+27	mx	006300630068FFFF
+27	sp	--------------------------------
+28	a	aaa%
+28	mn	00610061006100090009000900090009
+28	mx	006100610061FFFFFFFFFFFFFFFFFFFF
+28	sp	--------------------------------
+29	a	ccc%
+29	mn	00630063006300090009000900090009
+29	mx	006300630063FFFFFFFFFFFFFFFFFFFF
+29	sp	--------------------------------
+30	a	cch%
+30	mn	00630063006800090009000900090009
+30	mx	006300630068FFFFFFFFFFFFFFFFFFFF
+30	sp	--------------------------------
+31	a	aaaaaaaaaaaaaaaaaaaa
+31	mn	0061006100610061
+31	mx	0061006100610061
+31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	0063006100610061
+32	mx	0063006100610061
+32	sp	--------------------------------
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf16 COLLATE utf16_czech_ci;
+SELECT * FROM v1;
+id	name	val
+1	a	
+1	mn	
+1	mx	
+1	sp	--------------------------------
+2	a	_
+2	mn	0009
+2	mx	FFFF
+2	sp	--------------------------------
+3	a	%
+3	mn	00090009000900090009000900090009
+3	mx	FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+3	sp	--------------------------------
+4	a	\_
+4	mn	005F
+4	mx	005F
+4	sp	--------------------------------
+5	a	\%
+5	mn	0025
+5	mx	0025
+5	sp	--------------------------------
+6	a	\
+6	mn	005C
+6	mx	005C
+6	sp	--------------------------------
+7	a	a
+7	mn	0061
+7	mx	0061
+7	sp	--------------------------------
+8	a	c
+8	mn	0063
+8	mx	0063
+8	sp	--------------------------------
+9	a	a_
+9	mn	00610009
+9	mx	0061FFFF
+9	sp	--------------------------------
+10	a	c_
+10	mn	00090009000900090009000900090009
+10	mx	FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+10	sp	--------------------------------
+11	a	a%
+11	mn	00610009000900090009000900090009
+11	mx	0061FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+11	sp	--------------------------------
+12	a	c%
+12	mn	00090009000900090009000900090009
+12	mx	FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+12	sp	--------------------------------
+13	a	aa
+13	mn	00610061
+13	mx	00610061
+13	sp	--------------------------------
+14	a	cc
+14	mn	00630063
+14	mx	00630063
+14	sp	--------------------------------
+15	a	ch
+15	mn	00630068
+15	mx	00630068
+15	sp	--------------------------------
+16	a	aa_
+16	mn	006100610009
+16	mx	00610061FFFF
+16	sp	--------------------------------
+17	a	cc_
+17	mn	00630009000900090009000900090009
+17	mx	0063FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+17	sp	--------------------------------
+18	a	ch_
+18	mn	006300680009
+18	mx	00630068FFFF
+18	sp	--------------------------------
+19	a	aa%
+19	mn	00610061000900090009000900090009
+19	mx	00610061FFFFFFFFFFFFFFFFFFFFFFFF
+19	sp	--------------------------------
+20	a	cc%
+20	mn	00630009000900090009000900090009
+20	mx	0063FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+20	sp	--------------------------------
+21	a	ch%
+21	mn	00630068000900090009000900090009
+21	mx	00630068FFFFFFFFFFFFFFFFFFFFFFFF
+21	sp	--------------------------------
+22	a	aaa
+22	mn	006100610061
+22	mx	006100610061
+22	sp	--------------------------------
+23	a	ccc
+23	mn	006300630063
+23	mx	006300630063
+23	sp	--------------------------------
+24	a	cch
+24	mn	006300630068
+24	mx	006300630068
+24	sp	--------------------------------
+25	a	aaa_
+25	mn	0061006100610009
+25	mx	006100610061FFFF
+25	sp	--------------------------------
+26	a	ccc_
+26	mn	00630063000900090009000900090009
+26	mx	00630063FFFFFFFFFFFFFFFFFFFFFFFF
+26	sp	--------------------------------
+27	a	cch_
+27	mn	0063006300680009
+27	mx	006300630068FFFF
+27	sp	--------------------------------
+28	a	aaa%
+28	mn	00610061006100090009000900090009
+28	mx	006100610061FFFFFFFFFFFFFFFFFFFF
+28	sp	--------------------------------
+29	a	ccc%
+29	mn	00630063000900090009000900090009
+29	mx	00630063FFFFFFFFFFFFFFFFFFFFFFFF
+29	sp	--------------------------------
+30	a	cch%
+30	mn	00630063006800090009000900090009
+30	mx	006300630068FFFFFFFFFFFFFFFFFFFF
+30	sp	--------------------------------
+31	a	aaaaaaaaaaaaaaaaaaaa
+31	mn	0061006100610061
+31	mx	0061006100610061
+31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	0063006100610061
+32	mx	0063006100610061
+32	sp	--------------------------------
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf16 COLLATE utf16_danish_ci;
+SELECT * FROM v1;
+id	name	val
+1	a	
+1	mn	
+1	mx	
+1	sp	--------------------------------
+2	a	_
+2	mn	0009
+2	mx	FFFF
+2	sp	--------------------------------
+3	a	%
+3	mn	00090009000900090009000900090009
+3	mx	FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+3	sp	--------------------------------
+4	a	\_
+4	mn	005F
+4	mx	005F
+4	sp	--------------------------------
+5	a	\%
+5	mn	0025
+5	mx	0025
+5	sp	--------------------------------
+6	a	\
+6	mn	005C
+6	mx	005C
+6	sp	--------------------------------
+7	a	a
+7	mn	0061
+7	mx	0061
+7	sp	--------------------------------
+8	a	c
+8	mn	0063
+8	mx	0063
+8	sp	--------------------------------
+9	a	a_
+9	mn	00090009000900090009000900090009
+9	mx	FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+9	sp	--------------------------------
+10	a	c_
+10	mn	00630009
+10	mx	0063FFFF
+10	sp	--------------------------------
+11	a	a%
+11	mn	00090009000900090009000900090009
+11	mx	FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+11	sp	--------------------------------
+12	a	c%
+12	mn	00630009000900090009000900090009
+12	mx	0063FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+12	sp	--------------------------------
+13	a	aa
+13	mn	00610061
+13	mx	00610061
+13	sp	--------------------------------
+14	a	cc
+14	mn	00630063
+14	mx	00630063
+14	sp	--------------------------------
+15	a	ch
+15	mn	00630068
+15	mx	00630068
+15	sp	--------------------------------
+16	a	aa_
+16	mn	006100610009
+16	mx	00610061FFFF
+16	sp	--------------------------------
+17	a	cc_
+17	mn	006300630009
+17	mx	00630063FFFF
+17	sp	--------------------------------
+18	a	ch_
+18	mn	006300680009
+18	mx	00630068FFFF
+18	sp	--------------------------------
+19	a	aa%
+19	mn	00610061000900090009000900090009
+19	mx	00610061FFFFFFFFFFFFFFFFFFFFFFFF
+19	sp	--------------------------------
+20	a	cc%
+20	mn	00630063000900090009000900090009
+20	mx	00630063FFFFFFFFFFFFFFFFFFFFFFFF
+20	sp	--------------------------------
+21	a	ch%
+21	mn	00630068000900090009000900090009
+21	mx	00630068FFFFFFFFFFFFFFFFFFFFFFFF
+21	sp	--------------------------------
+22	a	aaa
+22	mn	006100610061
+22	mx	006100610061
+22	sp	--------------------------------
+23	a	ccc
+23	mn	006300630063
+23	mx	006300630063
+23	sp	--------------------------------
+24	a	cch
+24	mn	006300630068
+24	mx	006300630068
+24	sp	--------------------------------
+25	a	aaa_
+25	mn	00610061000900090009000900090009
+25	mx	00610061FFFFFFFFFFFFFFFFFFFFFFFF
+25	sp	--------------------------------
+26	a	ccc_
+26	mn	0063006300630009
+26	mx	006300630063FFFF
+26	sp	--------------------------------
+27	a	cch_
+27	mn	0063006300680009
+27	mx	006300630068FFFF
+27	sp	--------------------------------
+28	a	aaa%
+28	mn	00610061000900090009000900090009
+28	mx	00610061FFFFFFFFFFFFFFFFFFFFFFFF
+28	sp	--------------------------------
+29	a	ccc%
+29	mn	00630063006300090009000900090009
+29	mx	006300630063FFFFFFFFFFFFFFFFFFFF
+29	sp	--------------------------------
+30	a	cch%
+30	mn	00630063006800090009000900090009
+30	mx	006300630068FFFFFFFFFFFFFFFFFFFF
+30	sp	--------------------------------
+31	a	aaaaaaaaaaaaaaaaaaaa
+31	mn	0061006100610061
+31	mx	0061006100610061
+31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	00630061006100090009000900090009
+32	mx	006300610061FFFFFFFFFFFFFFFFFFFF
+32	sp	--------------------------------
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf16 COLLATE utf16_unicode_520_ci;
+SELECT * FROM v1;
+id	name	val
+1	a	
+1	mn	
+1	mx	
+1	sp	--------------------------------
+2	a	_
+2	mn	0009
+2	mx	DBFFDFFF
+2	sp	--------------------------------
+3	a	%
+3	mn	00090009000900090009000900090009
+3	mx	DBFFDFFFDBFFDFFFDBFFDFFFDBFFDFFF
+3	sp	--------------------------------
+4	a	\_
+4	mn	005F
+4	mx	005F
+4	sp	--------------------------------
+5	a	\%
+5	mn	0025
+5	mx	0025
+5	sp	--------------------------------
+6	a	\
+6	mn	005C
+6	mx	005C
+6	sp	--------------------------------
+7	a	a
+7	mn	0061
+7	mx	0061
+7	sp	--------------------------------
+8	a	c
+8	mn	0063
+8	mx	0063
+8	sp	--------------------------------
+9	a	a_
+9	mn	00610009
+9	mx	0061DBFFDFFF
+9	sp	--------------------------------
+10	a	c_
+10	mn	00630009
+10	mx	0063DBFFDFFF
+10	sp	--------------------------------
+11	a	a%
+11	mn	00610009000900090009000900090009
+11	mx	0061DBFFDFFFDBFFDFFFDBFFDFFF0000
+11	sp	--------------------------------
+12	a	c%
+12	mn	00630009000900090009000900090009
+12	mx	0063DBFFDFFFDBFFDFFFDBFFDFFF0000
+12	sp	--------------------------------
+13	a	aa
+13	mn	00610061
+13	mx	00610061
+13	sp	--------------------------------
+14	a	cc
+14	mn	00630063
+14	mx	00630063
+14	sp	--------------------------------
+15	a	ch
+15	mn	00630068
+15	mx	00630068
+15	sp	--------------------------------
+16	a	aa_
+16	mn	006100610009
+16	mx	00610061DBFFDFFF
+16	sp	--------------------------------
+17	a	cc_
+17	mn	006300630009
+17	mx	00630063DBFFDFFF
+17	sp	--------------------------------
+18	a	ch_
+18	mn	006300680009
+18	mx	00630068DBFFDFFF
+18	sp	--------------------------------
+19	a	aa%
+19	mn	00610061000900090009000900090009
+19	mx	00610061DBFFDFFFDBFFDFFFDBFFDFFF
+19	sp	--------------------------------
+20	a	cc%
+20	mn	00630063000900090009000900090009
+20	mx	00630063DBFFDFFFDBFFDFFFDBFFDFFF
+20	sp	--------------------------------
+21	a	ch%
+21	mn	00630068000900090009000900090009
+21	mx	00630068DBFFDFFFDBFFDFFFDBFFDFFF
+21	sp	--------------------------------
+22	a	aaa
+22	mn	006100610061
+22	mx	006100610061
+22	sp	--------------------------------
+23	a	ccc
+23	mn	006300630063
+23	mx	006300630063
+23	sp	--------------------------------
+24	a	cch
+24	mn	006300630068
+24	mx	006300630068
+24	sp	--------------------------------
+25	a	aaa_
+25	mn	0061006100610009
+25	mx	006100610061DBFFDFFF
+25	sp	--------------------------------
+26	a	ccc_
+26	mn	0063006300630009
+26	mx	006300630063DBFFDFFF
+26	sp	--------------------------------
+27	a	cch_
+27	mn	0063006300680009
+27	mx	006300630068DBFFDFFF
+27	sp	--------------------------------
+28	a	aaa%
+28	mn	00610061006100090009000900090009
+28	mx	006100610061DBFFDFFFDBFFDFFF0000
+28	sp	--------------------------------
+29	a	ccc%
+29	mn	00630063006300090009000900090009
+29	mx	006300630063DBFFDFFFDBFFDFFF0000
+29	sp	--------------------------------
+30	a	cch%
+30	mn	00630063006800090009000900090009
+30	mx	006300630068DBFFDFFFDBFFDFFF0000
+30	sp	--------------------------------
+31	a	aaaaaaaaaaaaaaaaaaaa
+31	mn	0061006100610061
+31	mx	0061006100610061
+31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	0063006100610061
+32	mx	0063006100610061
+32	sp	--------------------------------
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf32;
+SELECT * FROM v1;
+id	name	val
+1	a	
+1	mn	
+1	mx	
+1	sp	--------------------------------
+2	a	_
+2	mn	00000000
+2	mx	0000FFFF
+2	sp	--------------------------------
+3	a	%
+3	mn	00000000000000000000000000000000
+3	mx	0000FFFF0000FFFF0000FFFF0000FFFF
+3	sp	--------------------------------
+4	a	\_
+4	mn	0000005F
+4	mx	0000005F
+4	sp	--------------------------------
+5	a	\%
+5	mn	00000025
+5	mx	00000025
+5	sp	--------------------------------
+6	a	\
+6	mn	0000005C
+6	mx	0000005C
+6	sp	--------------------------------
+7	a	a
+7	mn	00000061
+7	mx	00000061
+7	sp	--------------------------------
+8	a	c
+8	mn	00000063
+8	mx	00000063
+8	sp	--------------------------------
+9	a	a_
+9	mn	0000006100000000
+9	mx	000000610000FFFF
+9	sp	--------------------------------
+10	a	c_
+10	mn	0000006300000000
+10	mx	000000630000FFFF
+10	sp	--------------------------------
+11	a	a%
+11	mn	00000061000000000000000000000000
+11	mx	000000610000FFFF0000FFFF0000FFFF
+11	sp	--------------------------------
+12	a	c%
+12	mn	00000063000000000000000000000000
+12	mx	000000630000FFFF0000FFFF0000FFFF
+12	sp	--------------------------------
+13	a	aa
+13	mn	0000006100000061
+13	mx	0000006100000061
+13	sp	--------------------------------
+14	a	cc
+14	mn	0000006300000063
+14	mx	0000006300000063
+14	sp	--------------------------------
+15	a	ch
+15	mn	0000006300000068
+15	mx	0000006300000068
+15	sp	--------------------------------
+16	a	aa_
+16	mn	000000610000006100000000
+16	mx	00000061000000610000FFFF
+16	sp	--------------------------------
+17	a	cc_
+17	mn	000000630000006300000000
+17	mx	00000063000000630000FFFF
+17	sp	--------------------------------
+18	a	ch_
+18	mn	000000630000006800000000
+18	mx	00000063000000680000FFFF
+18	sp	--------------------------------
+19	a	aa%
+19	mn	00000061000000610000000000000000
+19	mx	00000061000000610000FFFF0000FFFF
+19	sp	--------------------------------
+20	a	cc%
+20	mn	00000063000000630000000000000000
+20	mx	00000063000000630000FFFF0000FFFF
+20	sp	--------------------------------
+21	a	ch%
+21	mn	00000063000000680000000000000000
+21	mx	00000063000000680000FFFF0000FFFF
+21	sp	--------------------------------
+22	a	aaa
+22	mn	000000610000006100000061
+22	mx	000000610000006100000061
+22	sp	--------------------------------
+23	a	ccc
+23	mn	000000630000006300000063
+23	mx	000000630000006300000063
+23	sp	--------------------------------
+24	a	cch
+24	mn	000000630000006300000068
+24	mx	000000630000006300000068
+24	sp	--------------------------------
+25	a	aaa_
+25	mn	00000061000000610000006100000000
+25	mx	0000006100000061000000610000FFFF
+25	sp	--------------------------------
+26	a	ccc_
+26	mn	00000063000000630000006300000000
+26	mx	0000006300000063000000630000FFFF
+26	sp	--------------------------------
+27	a	cch_
+27	mn	00000063000000630000006800000000
+27	mx	0000006300000063000000680000FFFF
+27	sp	--------------------------------
+28	a	aaa%
+28	mn	00000061000000610000006100000000
+28	mx	0000006100000061000000610000FFFF
+28	sp	--------------------------------
+29	a	ccc%
+29	mn	00000063000000630000006300000000
+29	mx	0000006300000063000000630000FFFF
+29	sp	--------------------------------
+30	a	cch%
+30	mn	00000063000000630000006800000000
+30	mx	0000006300000063000000680000FFFF
+30	sp	--------------------------------
+31	a	aaaaaaaaaaaaaaaaaaaa
+31	mn	00000061000000610000006100000061
+31	mx	00000061000000610000006100000061
+31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	00000063000000610000006100000061
+32	mx	00000063000000610000006100000061
+32	sp	--------------------------------
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf32 COLLATE utf32_unicode_ci;
+SELECT * FROM v1;
+id	name	val
+1	a	
+1	mn	
+1	mx	
+1	sp	--------------------------------
+2	a	_
+2	mn	00000009
+2	mx	0000FFFF
+2	sp	--------------------------------
+3	a	%
+3	mn	00000009000000090000000900000009
+3	mx	0000FFFF0000FFFF0000FFFF0000FFFF
+3	sp	--------------------------------
+4	a	\_
+4	mn	0000005F
+4	mx	0000005F
+4	sp	--------------------------------
+5	a	\%
+5	mn	00000025
+5	mx	00000025
+5	sp	--------------------------------
+6	a	\
+6	mn	0000005C
+6	mx	0000005C
+6	sp	--------------------------------
+7	a	a
+7	mn	00000061
+7	mx	00000061
+7	sp	--------------------------------
+8	a	c
+8	mn	00000063
+8	mx	00000063
+8	sp	--------------------------------
+9	a	a_
+9	mn	0000006100000009
+9	mx	000000610000FFFF
+9	sp	--------------------------------
+10	a	c_
+10	mn	0000006300000009
+10	mx	000000630000FFFF
+10	sp	--------------------------------
+11	a	a%
+11	mn	00000061000000090000000900000009
+11	mx	000000610000FFFF0000FFFF0000FFFF
+11	sp	--------------------------------
+12	a	c%
+12	mn	00000063000000090000000900000009
+12	mx	000000630000FFFF0000FFFF0000FFFF
+12	sp	--------------------------------
+13	a	aa
+13	mn	0000006100000061
+13	mx	0000006100000061
+13	sp	--------------------------------
+14	a	cc
+14	mn	0000006300000063
+14	mx	0000006300000063
+14	sp	--------------------------------
+15	a	ch
+15	mn	0000006300000068
+15	mx	0000006300000068
+15	sp	--------------------------------
+16	a	aa_
+16	mn	000000610000006100000009
+16	mx	00000061000000610000FFFF
+16	sp	--------------------------------
+17	a	cc_
+17	mn	000000630000006300000009
+17	mx	00000063000000630000FFFF
+17	sp	--------------------------------
+18	a	ch_
+18	mn	000000630000006800000009
+18	mx	00000063000000680000FFFF
+18	sp	--------------------------------
+19	a	aa%
+19	mn	00000061000000610000000900000009
+19	mx	00000061000000610000FFFF0000FFFF
+19	sp	--------------------------------
+20	a	cc%
+20	mn	00000063000000630000000900000009
+20	mx	00000063000000630000FFFF0000FFFF
+20	sp	--------------------------------
+21	a	ch%
+21	mn	00000063000000680000000900000009
+21	mx	00000063000000680000FFFF0000FFFF
+21	sp	--------------------------------
+22	a	aaa
+22	mn	000000610000006100000061
+22	mx	000000610000006100000061
+22	sp	--------------------------------
+23	a	ccc
+23	mn	000000630000006300000063
+23	mx	000000630000006300000063
+23	sp	--------------------------------
+24	a	cch
+24	mn	000000630000006300000068
+24	mx	000000630000006300000068
+24	sp	--------------------------------
+25	a	aaa_
+25	mn	00000061000000610000006100000009
+25	mx	0000006100000061000000610000FFFF
+25	sp	--------------------------------
+26	a	ccc_
+26	mn	00000063000000630000006300000009
+26	mx	0000006300000063000000630000FFFF
+26	sp	--------------------------------
+27	a	cch_
+27	mn	00000063000000630000006800000009
+27	mx	0000006300000063000000680000FFFF
+27	sp	--------------------------------
+28	a	aaa%
+28	mn	00000061000000610000006100000009
+28	mx	0000006100000061000000610000FFFF
+28	sp	--------------------------------
+29	a	ccc%
+29	mn	00000063000000630000006300000009
+29	mx	0000006300000063000000630000FFFF
+29	sp	--------------------------------
+30	a	cch%
+30	mn	00000063000000630000006800000009
+30	mx	0000006300000063000000680000FFFF
+30	sp	--------------------------------
+31	a	aaaaaaaaaaaaaaaaaaaa
+31	mn	00000061000000610000006100000061
+31	mx	00000061000000610000006100000061
+31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	00000063000000610000006100000061
+32	mx	00000063000000610000006100000061
+32	sp	--------------------------------
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf32 COLLATE utf32_czech_ci;
+SELECT * FROM v1;
+id	name	val
+1	a	
+1	mn	
+1	mx	
+1	sp	--------------------------------
+2	a	_
+2	mn	00000009
+2	mx	0000FFFF
+2	sp	--------------------------------
+3	a	%
+3	mn	00000009000000090000000900000009
+3	mx	0000FFFF0000FFFF0000FFFF0000FFFF
+3	sp	--------------------------------
+4	a	\_
+4	mn	0000005F
+4	mx	0000005F
+4	sp	--------------------------------
+5	a	\%
+5	mn	00000025
+5	mx	00000025
+5	sp	--------------------------------
+6	a	\
+6	mn	0000005C
+6	mx	0000005C
+6	sp	--------------------------------
+7	a	a
+7	mn	00000061
+7	mx	00000061
+7	sp	--------------------------------
+8	a	c
+8	mn	00000063
+8	mx	00000063
+8	sp	--------------------------------
+9	a	a_
+9	mn	0000006100000009
+9	mx	000000610000FFFF
+9	sp	--------------------------------
+10	a	c_
+10	mn	00000009000000090000000900000009
+10	mx	0000FFFF0000FFFF0000FFFF0000FFFF
+10	sp	--------------------------------
+11	a	a%
+11	mn	00000061000000090000000900000009
+11	mx	000000610000FFFF0000FFFF0000FFFF
+11	sp	--------------------------------
+12	a	c%
+12	mn	00000009000000090000000900000009
+12	mx	0000FFFF0000FFFF0000FFFF0000FFFF
+12	sp	--------------------------------
+13	a	aa
+13	mn	0000006100000061
+13	mx	0000006100000061
+13	sp	--------------------------------
+14	a	cc
+14	mn	0000006300000063
+14	mx	0000006300000063
+14	sp	--------------------------------
+15	a	ch
+15	mn	0000006300000068
+15	mx	0000006300000068
+15	sp	--------------------------------
+16	a	aa_
+16	mn	000000610000006100000009
+16	mx	00000061000000610000FFFF
+16	sp	--------------------------------
+17	a	cc_
+17	mn	00000063000000090000000900000009
+17	mx	000000630000FFFF0000FFFF0000FFFF
+17	sp	--------------------------------
+18	a	ch_
+18	mn	000000630000006800000009
+18	mx	00000063000000680000FFFF
+18	sp	--------------------------------
+19	a	aa%
+19	mn	00000061000000610000000900000009
+19	mx	00000061000000610000FFFF0000FFFF
+19	sp	--------------------------------
+20	a	cc%
+20	mn	00000063000000090000000900000009
+20	mx	000000630000FFFF0000FFFF0000FFFF
+20	sp	--------------------------------
+21	a	ch%
+21	mn	00000063000000680000000900000009
+21	mx	00000063000000680000FFFF0000FFFF
+21	sp	--------------------------------
+22	a	aaa
+22	mn	000000610000006100000061
+22	mx	000000610000006100000061
+22	sp	--------------------------------
+23	a	ccc
+23	mn	000000630000006300000063
+23	mx	000000630000006300000063
+23	sp	--------------------------------
+24	a	cch
+24	mn	000000630000006300000068
+24	mx	000000630000006300000068
+24	sp	--------------------------------
+25	a	aaa_
+25	mn	00000061000000610000006100000009
+25	mx	0000006100000061000000610000FFFF
+25	sp	--------------------------------
+26	a	ccc_
+26	mn	00000063000000630000000900000009
+26	mx	00000063000000630000FFFF0000FFFF
+26	sp	--------------------------------
+27	a	cch_
+27	mn	00000063000000630000006800000009
+27	mx	0000006300000063000000680000FFFF
+27	sp	--------------------------------
+28	a	aaa%
+28	mn	00000061000000610000006100000009
+28	mx	0000006100000061000000610000FFFF
+28	sp	--------------------------------
+29	a	ccc%
+29	mn	00000063000000630000000900000009
+29	mx	00000063000000630000FFFF0000FFFF
+29	sp	--------------------------------
+30	a	cch%
+30	mn	00000063000000630000006800000009
+30	mx	0000006300000063000000680000FFFF
+30	sp	--------------------------------
+31	a	aaaaaaaaaaaaaaaaaaaa
+31	mn	00000061000000610000006100000061
+31	mx	00000061000000610000006100000061
+31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	00000063000000610000006100000061
+32	mx	00000063000000610000006100000061
+32	sp	--------------------------------
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf32 COLLATE utf32_danish_ci;
+SELECT * FROM v1;
+id	name	val
+1	a	
+1	mn	
+1	mx	
+1	sp	--------------------------------
+2	a	_
+2	mn	00000009
+2	mx	0000FFFF
+2	sp	--------------------------------
+3	a	%
+3	mn	00000009000000090000000900000009
+3	mx	0000FFFF0000FFFF0000FFFF0000FFFF
+3	sp	--------------------------------
+4	a	\_
+4	mn	0000005F
+4	mx	0000005F
+4	sp	--------------------------------
+5	a	\%
+5	mn	00000025
+5	mx	00000025
+5	sp	--------------------------------
+6	a	\
+6	mn	0000005C
+6	mx	0000005C
+6	sp	--------------------------------
+7	a	a
+7	mn	00000061
+7	mx	00000061
+7	sp	--------------------------------
+8	a	c
+8	mn	00000063
+8	mx	00000063
+8	sp	--------------------------------
+9	a	a_
+9	mn	00000009000000090000000900000009
+9	mx	0000FFFF0000FFFF0000FFFF0000FFFF
+9	sp	--------------------------------
+10	a	c_
+10	mn	0000006300000009
+10	mx	000000630000FFFF
+10	sp	--------------------------------
+11	a	a%
+11	mn	00000009000000090000000900000009
+11	mx	0000FFFF0000FFFF0000FFFF0000FFFF
+11	sp	--------------------------------
+12	a	c%
+12	mn	00000063000000090000000900000009
+12	mx	000000630000FFFF0000FFFF0000FFFF
+12	sp	--------------------------------
+13	a	aa
+13	mn	0000006100000061
+13	mx	0000006100000061
+13	sp	--------------------------------
+14	a	cc
+14	mn	0000006300000063
+14	mx	0000006300000063
+14	sp	--------------------------------
+15	a	ch
+15	mn	0000006300000068
+15	mx	0000006300000068
+15	sp	--------------------------------
+16	a	aa_
+16	mn	000000610000006100000009
+16	mx	00000061000000610000FFFF
+16	sp	--------------------------------
+17	a	cc_
+17	mn	000000630000006300000009
+17	mx	00000063000000630000FFFF
+17	sp	--------------------------------
+18	a	ch_
+18	mn	000000630000006800000009
+18	mx	00000063000000680000FFFF
+18	sp	--------------------------------
+19	a	aa%
+19	mn	00000061000000610000000900000009
+19	mx	00000061000000610000FFFF0000FFFF
+19	sp	--------------------------------
+20	a	cc%
+20	mn	00000063000000630000000900000009
+20	mx	00000063000000630000FFFF0000FFFF
+20	sp	--------------------------------
+21	a	ch%
+21	mn	00000063000000680000000900000009
+21	mx	00000063000000680000FFFF0000FFFF
+21	sp	--------------------------------
+22	a	aaa
+22	mn	000000610000006100000061
+22	mx	000000610000006100000061
+22	sp	--------------------------------
+23	a	ccc
+23	mn	000000630000006300000063
+23	mx	000000630000006300000063
+23	sp	--------------------------------
+24	a	cch
+24	mn	000000630000006300000068
+24	mx	000000630000006300000068
+24	sp	--------------------------------
+25	a	aaa_
+25	mn	00000061000000610000000900000009
+25	mx	00000061000000610000FFFF0000FFFF
+25	sp	--------------------------------
+26	a	ccc_
+26	mn	00000063000000630000006300000009
+26	mx	0000006300000063000000630000FFFF
+26	sp	--------------------------------
+27	a	cch_
+27	mn	00000063000000630000006800000009
+27	mx	0000006300000063000000680000FFFF
+27	sp	--------------------------------
+28	a	aaa%
+28	mn	00000061000000610000000900000009
+28	mx	00000061000000610000FFFF0000FFFF
+28	sp	--------------------------------
+29	a	ccc%
+29	mn	00000063000000630000006300000009
+29	mx	0000006300000063000000630000FFFF
+29	sp	--------------------------------
+30	a	cch%
+30	mn	00000063000000630000006800000009
+30	mx	0000006300000063000000680000FFFF
+30	sp	--------------------------------
+31	a	aaaaaaaaaaaaaaaaaaaa
+31	mn	00000061000000610000006100000061
+31	mx	00000061000000610000006100000061
+31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	00000063000000610000006100000009
+32	mx	0000006300000061000000610000FFFF
+32	sp	--------------------------------
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf32 COLLATE utf32_unicode_520_ci;
+SELECT * FROM v1;
+id	name	val
+1	a	
+1	mn	
+1	mx	
+1	sp	--------------------------------
+2	a	_
+2	mn	00000009
+2	mx	0010FFFF
+2	sp	--------------------------------
+3	a	%
+3	mn	00000009000000090000000900000009
+3	mx	0010FFFF0010FFFF0010FFFF0010FFFF
+3	sp	--------------------------------
+4	a	\_
+4	mn	0000005F
+4	mx	0000005F
+4	sp	--------------------------------
+5	a	\%
+5	mn	00000025
+5	mx	00000025
+5	sp	--------------------------------
+6	a	\
+6	mn	0000005C
+6	mx	0000005C
+6	sp	--------------------------------
+7	a	a
+7	mn	00000061
+7	mx	00000061
+7	sp	--------------------------------
+8	a	c
+8	mn	00000063
+8	mx	00000063
+8	sp	--------------------------------
+9	a	a_
+9	mn	0000006100000009
+9	mx	000000610010FFFF
+9	sp	--------------------------------
+10	a	c_
+10	mn	0000006300000009
+10	mx	000000630010FFFF
+10	sp	--------------------------------
+11	a	a%
+11	mn	00000061000000090000000900000009
+11	mx	000000610010FFFF0010FFFF0010FFFF
+11	sp	--------------------------------
+12	a	c%
+12	mn	00000063000000090000000900000009
+12	mx	000000630010FFFF0010FFFF0010FFFF
+12	sp	--------------------------------
+13	a	aa
+13	mn	0000006100000061
+13	mx	0000006100000061
+13	sp	--------------------------------
+14	a	cc
+14	mn	0000006300000063
+14	mx	0000006300000063
+14	sp	--------------------------------
+15	a	ch
+15	mn	0000006300000068
+15	mx	0000006300000068
+15	sp	--------------------------------
+16	a	aa_
+16	mn	000000610000006100000009
+16	mx	00000061000000610010FFFF
+16	sp	--------------------------------
+17	a	cc_
+17	mn	000000630000006300000009
+17	mx	00000063000000630010FFFF
+17	sp	--------------------------------
+18	a	ch_
+18	mn	000000630000006800000009
+18	mx	00000063000000680010FFFF
+18	sp	--------------------------------
+19	a	aa%
+19	mn	00000061000000610000000900000009
+19	mx	00000061000000610010FFFF0010FFFF
+19	sp	--------------------------------
+20	a	cc%
+20	mn	00000063000000630000000900000009
+20	mx	00000063000000630010FFFF0010FFFF
+20	sp	--------------------------------
+21	a	ch%
+21	mn	00000063000000680000000900000009
+21	mx	00000063000000680010FFFF0010FFFF
+21	sp	--------------------------------
+22	a	aaa
+22	mn	000000610000006100000061
+22	mx	000000610000006100000061
+22	sp	--------------------------------
+23	a	ccc
+23	mn	000000630000006300000063
+23	mx	000000630000006300000063
+23	sp	--------------------------------
+24	a	cch
+24	mn	000000630000006300000068
+24	mx	000000630000006300000068
+24	sp	--------------------------------
+25	a	aaa_
+25	mn	00000061000000610000006100000009
+25	mx	0000006100000061000000610010FFFF
+25	sp	--------------------------------
+26	a	ccc_
+26	mn	00000063000000630000006300000009
+26	mx	0000006300000063000000630010FFFF
+26	sp	--------------------------------
+27	a	cch_
+27	mn	00000063000000630000006800000009
+27	mx	0000006300000063000000680010FFFF
+27	sp	--------------------------------
+28	a	aaa%
+28	mn	00000061000000610000006100000009
+28	mx	0000006100000061000000610010FFFF
+28	sp	--------------------------------
+29	a	ccc%
+29	mn	00000063000000630000006300000009
+29	mx	0000006300000063000000630010FFFF
+29	sp	--------------------------------
+30	a	cch%
+30	mn	00000063000000630000006800000009
+30	mx	0000006300000063000000680010FFFF
+30	sp	--------------------------------
+31	a	aaaaaaaaaaaaaaaaaaaa
+31	mn	00000061000000610000006100000061
+31	mx	00000061000000610000006100000061
+31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	00000063000000610000006100000061
+32	mx	00000063000000610000006100000061
+32	sp	--------------------------------
+DROP VIEW v1;
+DROP TABLE t1;

=== modified file 'mysql-test/r/ctype_uca.result'
--- a/mysql-test/r/ctype_uca.result	2010-11-11 10:40:41 +0000
+++ b/mysql-test/r/ctype_uca.result	2010-11-26 11:36:39 +0000
@@ -5954,6 +5954,104 @@ set names utf8;
 End for 5.0 tests
 End of 5.1 tests
 #
+# Start of 5.5 tests
+#
+SET collation_connection=utf8_czech_ci;
+SELECT @@collation_connection;
+@@collation_connection
+utf8_czech_ci
+#
+# Bug#57737 Character sets: search fails with like, contraction, index
+#
+CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS s1 LIMIT 0;
+INSERT INTO t1 VALUES ('c'),('ce'),('cé'),('ch');
+SELECT * FROM t1 WHERE s1 LIKE 'c%';
+s1
+c
+ce
+cé
+ch
+ALTER TABLE t1 ADD KEY s1 (s1);
+SELECT * FROM t1 WHERE s1 LIKE 'c%';
+s1
+c
+ce
+cé
+ch
+ALTER TABLE t1 DROP KEY s1, ADD KEY(s1(1));
+SELECT * FROM t1 WHERE s1 LIKE 'ch';
+s1
+ch
+DROP TABLE t1;
+SELECT @@collation_connection;
+@@collation_connection
+utf8_czech_ci
+#
+# Bug#57737 Character sets: search fails with like, contraction, index
+# Part#2 - ignorable characters
+#
+CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS s1 LIMIT 0;
+INSERT INTO t1 VALUES ('a\0\0\0\0\0\t'),('a'),('b'),('c'),('d'),('e');
+SELECT HEX(s1) FROM t1 WHERE s1 LIKE 'a%';
+HEX(s1)
+61000000000009
+61
+ALTER TABLE t1 ADD KEY s1 (s1);
+SELECT HEX(s1) FROM t1 WHERE s1 LIKE 'a%';
+HEX(s1)
+61000000000009
+61
+DROP TABLE t1;
+SET collation_connection=ucs2_czech_ci;
+SELECT @@collation_connection;
+@@collation_connection
+ucs2_czech_ci
+#
+# Bug#57737 Character sets: search fails with like, contraction, index
+#
+CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS s1 LIMIT 0;
+INSERT INTO t1 VALUES ('c'),('ce'),('cé'),('ch');
+SELECT * FROM t1 WHERE s1 LIKE 'c%';
+s1
+c
+ce
+cé
+ch
+ALTER TABLE t1 ADD KEY s1 (s1);
+SELECT * FROM t1 WHERE s1 LIKE 'c%';
+s1
+c
+ce
+cé
+ch
+ALTER TABLE t1 DROP KEY s1, ADD KEY(s1(1));
+SELECT * FROM t1 WHERE s1 LIKE 'ch';
+s1
+ch
+DROP TABLE t1;
+SELECT @@collation_connection;
+@@collation_connection
+ucs2_czech_ci
+#
+# Bug#57737 Character sets: search fails with like, contraction, index
+# Part#2 - ignorable characters
+#
+CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS s1 LIMIT 0;
+INSERT INTO t1 VALUES ('a\0\0\0\0\0\t'),('a'),('b'),('c'),('d'),('e');
+SELECT HEX(s1) FROM t1 WHERE s1 LIKE 'a%';
+HEX(s1)
+0061000000000000000000000009
+0061
+ALTER TABLE t1 ADD KEY s1 (s1);
+SELECT HEX(s1) FROM t1 WHERE s1 LIKE 'a%';
+HEX(s1)
+0061000000000000000000000009
+0061
+DROP TABLE t1;
+#
+# End of 5.5 tests
+#
+#
 # Start of 5.6 tests
 #
 #

=== modified file 'mysql-test/r/ctype_utf16_uca.result'
--- a/mysql-test/r/ctype_utf16_uca.result	2010-11-11 10:40:41 +0000
+++ b/mysql-test/r/ctype_utf16_uca.result	2010-11-26 11:36:39 +0000
@@ -2840,6 +2840,52 @@ NULL
 NULL
 NULL
 drop table t1;
+SET collation_connection=utf16_czech_ci;
+SELECT @@collation_connection;
+@@collation_connection
+utf16_czech_ci
+#
+# Bug#57737 Character sets: search fails with like, contraction, index
+#
+CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS s1 LIMIT 0;
+INSERT INTO t1 VALUES ('c'),('ce'),('cé'),('ch');
+SELECT * FROM t1 WHERE s1 LIKE 'c%';
+s1
+c
+ce
+cé
+ch
+ALTER TABLE t1 ADD KEY s1 (s1);
+SELECT * FROM t1 WHERE s1 LIKE 'c%';
+s1
+c
+ce
+cé
+ch
+ALTER TABLE t1 DROP KEY s1, ADD KEY(s1(1));
+SELECT * FROM t1 WHERE s1 LIKE 'ch';
+s1
+ch
+DROP TABLE t1;
+SELECT @@collation_connection;
+@@collation_connection
+utf16_czech_ci
+#
+# Bug#57737 Character sets: search fails with like, contraction, index
+# Part#2 - ignorable characters
+#
+CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS s1 LIMIT 0;
+INSERT INTO t1 VALUES ('a\0\0\0\0\0\t'),('a'),('b'),('c'),('d'),('e');
+SELECT HEX(s1) FROM t1 WHERE s1 LIKE 'a%';
+HEX(s1)
+0061000000000000000000000009
+0061
+ALTER TABLE t1 ADD KEY s1 (s1);
+SELECT HEX(s1) FROM t1 WHERE s1 LIKE 'a%';
+HEX(s1)
+0061000000000000000000000009
+0061
+DROP TABLE t1;
 #
 # End of 5.5 tests
 #

=== modified file 'mysql-test/r/ctype_utf32_uca.result'
--- a/mysql-test/r/ctype_utf32_uca.result	2010-11-11 10:40:41 +0000
+++ b/mysql-test/r/ctype_utf32_uca.result	2010-11-26 11:36:39 +0000
@@ -2840,6 +2840,52 @@ NULL
 NULL
 NULL
 drop table t1;
+SET collation_connection=utf32_czech_ci;
+SELECT @@collation_connection;
+@@collation_connection
+utf32_czech_ci
+#
+# Bug#57737 Character sets: search fails with like, contraction, index
+#
+CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS s1 LIMIT 0;
+INSERT INTO t1 VALUES ('c'),('ce'),('cé'),('ch');
+SELECT * FROM t1 WHERE s1 LIKE 'c%';
+s1
+c
+ce
+cé
+ch
+ALTER TABLE t1 ADD KEY s1 (s1);
+SELECT * FROM t1 WHERE s1 LIKE 'c%';
+s1
+c
+ce
+cé
+ch
+ALTER TABLE t1 DROP KEY s1, ADD KEY(s1(1));
+SELECT * FROM t1 WHERE s1 LIKE 'ch';
+s1
+ch
+DROP TABLE t1;
+SELECT @@collation_connection;
+@@collation_connection
+utf32_czech_ci
+#
+# Bug#57737 Character sets: search fails with like, contraction, index
+# Part#2 - ignorable characters
+#
+CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS s1 LIMIT 0;
+INSERT INTO t1 VALUES ('a\0\0\0\0\0\t'),('a'),('b'),('c'),('d'),('e');
+SELECT HEX(s1) FROM t1 WHERE s1 LIKE 'a%';
+HEX(s1)
+00000061000000000000000000000000000000000000000000000009
+00000061
+ALTER TABLE t1 ADD KEY s1 (s1);
+SELECT HEX(s1) FROM t1 WHERE s1 LIKE 'a%';
+HEX(s1)
+00000061000000000000000000000000000000000000000000000009
+00000061
+DROP TABLE t1;
 #
 # End of 5.5 tests
 #

=== modified file 'mysql-test/r/ctype_utf8.result'
--- a/mysql-test/r/ctype_utf8.result	2010-11-26 15:20:05 +0000
+++ b/mysql-test/r/ctype_utf8.result	2010-11-26 15:45:26 +0000
@@ -4982,11 +4982,11 @@ KEY(date_column));
 INSERT INTO t1 VALUES (1,'2010-09-01'),(2,'2010-10-01');
 EXPLAIN SELECT * FROM t1 WHERE date_column BETWEEN '2010-09-01' AND '2010-10-01';
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	range	date_column	date_column	4	NULL	1	Using where
+1	SIMPLE	t1	range	date_column	date_column	4	NULL	1	Using index condition
 ALTER TABLE t1 MODIFY date_column DATETIME DEFAULT NULL;
 EXPLAIN SELECT * FROM t1 WHERE date_column BETWEEN '2010-09-01' AND '2010-10-01';
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	range	date_column	date_column	9	NULL	1	Using where
+1	SIMPLE	t1	range	date_column	date_column	9	NULL	1	Using index condition
 DROP TABLE t1;
 #
 # Bug#52159 returning time type from function and empty left join causes debug assertion

=== modified file 'mysql-test/r/ctype_utf8mb4_uca.result'
--- a/mysql-test/r/ctype_utf8mb4_uca.result	2010-11-03 12:20:14 +0000
+++ b/mysql-test/r/ctype_utf8mb4_uca.result	2010-11-26 13:52:41 +0000
@@ -2565,5 +2565,54 @@ ZzŹźŻżŽž
 ǃ
 DROP TABLE t1;
 #
+# Start of 5.5 tests
+#
+SET collation_connection=utf8mb4_czech_ci;
+SELECT @@collation_connection;
+@@collation_connection
+utf8mb4_czech_ci
+#
+# Bug#57737 Character sets: search fails with like, contraction, index
+#
+CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS s1 LIMIT 0;
+INSERT INTO t1 VALUES ('c'),('ce'),('cé'),('ch');
+SELECT * FROM t1 WHERE s1 LIKE 'c%';
+s1
+c
+ce
+cé
+ch
+ALTER TABLE t1 ADD KEY s1 (s1);
+SELECT * FROM t1 WHERE s1 LIKE 'c%';
+s1
+c
+ce
+cé
+ch
+ALTER TABLE t1 DROP KEY s1, ADD KEY(s1(1));
+SELECT * FROM t1 WHERE s1 LIKE 'ch';
+s1
+ch
+DROP TABLE t1;
+SELECT @@collation_connection;
+@@collation_connection
+utf8mb4_czech_ci
+#
+# Bug#57737 Character sets: search fails with like, contraction, index
+# Part#2 - ignorable characters
+#
+CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS s1 LIMIT 0;
+INSERT INTO t1 VALUES ('a\0\0\0\0\0\t'),('a'),('b'),('c'),('d'),('e');
+SELECT HEX(s1) FROM t1 WHERE s1 LIKE 'a%';
+HEX(s1)
+61000000000009
+61
+ALTER TABLE t1 ADD KEY s1 (s1);
+SELECT HEX(s1) FROM t1 WHERE s1 LIKE 'a%';
+HEX(s1)
+61000000000009
+61
+DROP TABLE t1;
+#
 # End of 5.5 tests
 #

=== modified file 'mysql-test/r/explain.result'
--- a/mysql-test/r/explain.result	2010-11-26 15:20:05 +0000
+++ b/mysql-test/r/explain.result	2010-11-26 15:45:26 +0000
@@ -13,7 +13,7 @@ id	str
 3	foo
 explain select * from t1 where str is null;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	ref	str	str	11	const	1	Using where
+1	SIMPLE	t1	ref	str	str	11	const	1	Using index condition
 explain select * from t1 where str="foo";
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	const	str	str	11	const	1	

=== modified file 'mysql-test/r/index_merge_innodb.result'
--- a/mysql-test/r/index_merge_innodb.result	2010-11-05 16:23:32 +0000
+++ b/mysql-test/r/index_merge_innodb.result	2010-11-17 15:23:17 +0000
@@ -166,7 +166,7 @@ primary key (pk1, pk2)
 );
 explain select * from t1 where pk1 = 1 and pk2 < 80  and key1=0;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	range	PRIMARY,key1	PRIMARY	8	NULL	9	Using where
+1	SIMPLE	t1	range	PRIMARY,key1	PRIMARY	8	NULL	9	Using index condition; Using where
 select * from t1 where pk1 = 1 and pk2 < 80  and key1=0;
 pk1	pk2	key1	key2	pktail1ok	pktail2ok	pktail3bad	pktail4bad	pktail5bad	pk2copy	badkey	filler1	filler2
 1	10	0	0	0	0	0	0	0	10	0	filler-data-10	filler2

=== modified file 'mysql-test/r/index_merge_myisam.result'
--- a/mysql-test/r/index_merge_myisam.result	2010-11-05 16:23:32 +0000
+++ b/mysql-test/r/index_merge_myisam.result	2010-11-17 15:23:17 +0000
@@ -19,7 +19,7 @@ Table	Op	Msg_type	Msg_text
 test.t0	analyze	status	OK
 explain select * from t0 where key1 < 3 or key1 > 1020;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t0	range	i1	i1	4	NULL	78	Using where
+1	SIMPLE	t0	range	i1	i1	4	NULL	78	Using index condition
 explain
 select * from t0 where key1 < 3 or key2 > 1020;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
@@ -115,7 +115,7 @@ id	select_type	table	type	possible_keys	
 explain select * from t0 where
 (key1 < 3 or key2 < 3) and (key3 < 100);
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t0	range	i1,i2,i3	i3	4	NULL	95	Using where
+1	SIMPLE	t0	range	i1,i2,i3	i3	4	NULL	95	Using index condition; Using where
 explain select * from t0 where
 (key1 < 3 or key2 < 3) and (key3 < 1000);
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
@@ -275,7 +275,7 @@ id	select_type	table	type	possible_keys	
 explain select * from t0,t1 where t0.key1 < 3 and
 (t1.key1 = t0.key1 or t1.key8 = t0.key1);
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t0	range	i1	i1	4	NULL	3	Using where
+1	SIMPLE	t0	range	i1	i1	4	NULL	3	Using index condition
 1	SIMPLE	t1	ALL	i1,i8	NULL	NULL	NULL	1024	Range checked for each record (index map: 0x81)
 explain select * from t1 where key1=3 or key2=4
 union select * from t1 where key1<4 or key3=5;
@@ -1379,7 +1379,7 @@ primary key (pk1, pk2)
 );
 explain select * from t1 where pk1 = 1 and pk2 < 80  and key1=0;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	range	PRIMARY,key1	PRIMARY	8	NULL	7	Using where
+1	SIMPLE	t1	range	PRIMARY,key1	PRIMARY	8	NULL	7	Using index condition; Using where
 select * from t1 where pk1 = 1 and pk2 < 80  and key1=0;
 pk1	pk2	key1	key2	pktail1ok	pktail2ok	pktail3bad	pktail4bad	pktail5bad	pk2copy	badkey	filler1	filler2
 1	10	0	0	0	0	0	0	0	10	0	filler-data-10	filler2
@@ -1492,19 +1492,19 @@ DROP TABLE t1,t2;
 #
 select @@optimizer_switch;
 @@optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on
 set optimizer_switch='index_merge=off,index_merge_union=off';
 select @@optimizer_switch;
 @@optimizer_switch
-index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
+index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on
 set optimizer_switch='index_merge_union=on';
 select @@optimizer_switch;
 @@optimizer_switch
-index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
+index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on
 set optimizer_switch='default,index_merge_sort_union=off';
 select @@optimizer_switch;
 @@optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=off,index_merge_intersection=on,engine_condition_pushdown=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=off,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on
 set optimizer_switch=4;
 set optimizer_switch=NULL;
 ERROR 42000: Variable 'optimizer_switch' can't be set to the value of 'NULL'
@@ -1530,21 +1530,21 @@ set optimizer_switch=default;
 set optimizer_switch='index_merge=off,index_merge_union=off,default';
 select @@optimizer_switch;
 @@optimizer_switch
-index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
+index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on
 set optimizer_switch=default;
 select @@global.optimizer_switch;
 @@global.optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on
 set @@global.optimizer_switch=default;
 select @@global.optimizer_switch;
 @@global.optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on
 #
 # Check index_merge's @@optimizer_switch flags
 #
 select @@optimizer_switch;
 @@optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on
 create table t0 (a int);
 insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
 create table t1 (a int, b int, c int, filler char(100), 
@@ -1654,5 +1654,5 @@ id	select_type	table	type	possible_keys	
 set optimizer_switch=default;
 show variables like 'optimizer_switch';
 Variable_name	Value
-optimizer_switch	index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
+optimizer_switch	index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on
 drop table t0, t1;

=== modified file 'mysql-test/r/innodb_icp.result'
--- a/mysql-test/r/innodb_icp.result	2010-11-05 08:30:31 +0000
+++ b/mysql-test/r/innodb_icp.result	2010-11-24 22:20:27 +0000
@@ -453,5 +453,141 @@ LIMIT 1;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	range	PRIMARY,k1	k1	5	NULL	3	Using where; Using index
 DROP TABLE t1;
+#
+# Bug#42991 "invalid memory access and/or crash when using
+#            index condition pushdown + InnoDB"
+#
+CREATE TABLE t1 (
+c1 TINYTEXT NOT NULL,
+c2 INT NOT NULL,
+PRIMARY KEY (c2),
+KEY id1 (c1(4))
+);
+INSERT INTO t1 VALUES ('Anastasia', 5);
+INSERT INTO t1 VALUES ('Karianne', 4);
+SELECT * FROM t1 WHERE (c1 <= '6566-06-15' AND c2 <> 3);
+c1	c2
+EXPLAIN SELECT * FROM t1 WHERE (c1 <= '6566-06-15' AND c2 <> 3);
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	range	PRIMARY,id1	id1	6	NULL	1	Using index condition; Using where
+DROP TABLE t1;
+#
+# Bug#56529 - "Crash due to long semaphore wait in InnoDB 
+#              with ICP and subqueries"
+#
+CREATE TABLE t1 (
+col_int_nokey INTEGER,
+col_int_key INTEGER,
+col_varchar_key VARCHAR(1),
+KEY (col_int_key),
+KEY (col_varchar_key, col_int_key)
+);
+INSERT INTO t1 VALUES (NULL,2,'w');
+INSERT INTO t1 VALUES (7,9,'m');
+INSERT INTO t1 VALUES (9,3,'m');
+INSERT INTO t1 VALUES (7,9,'k');
+INSERT INTO t1 VALUES (4,NULL,'r');
+INSERT INTO t1 VALUES (2,9,'t');
+INSERT INTO t1 VALUES (6,3,'j');
+INSERT INTO t1 VALUES (8,8,'u');
+INSERT INTO t1 VALUES (NULL,8,'h');
+INSERT INTO t1 VALUES (5,53,'o');
+INSERT INTO t1 VALUES (NULL,0,NULL);
+INSERT INTO t1 VALUES (6,5,'k');
+INSERT INTO t1 VALUES (188,166,'e');
+INSERT INTO t1 VALUES (2,3,'n');
+INSERT INTO t1 VALUES (1,0,'t');
+INSERT INTO t1 VALUES (1,1,'c');
+INSERT INTO t1 VALUES (0,9,'m');
+INSERT INTO t1 VALUES (9,5,'y');
+INSERT INTO t1 VALUES (NULL,6,'f');
+CREATE TABLE t2 (
+c1 INTEGER NOT NULL
+);
+EXPLAIN SELECT table1.col_int_nokey
+FROM t1 AS table1 STRAIGHT_JOIN (
+t1 AS table2 INNER JOIN t1 AS table3
+ON table3.col_varchar_key = table2.col_varchar_key)
+ON table3.col_int_nokey = table1.col_int_key
+WHERE table3.col_int_key != SOME ( SELECT c1 FROM t2 );
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	table2	index	col_varchar_key	col_varchar_key	9	NULL	19	Using where; Using index
+1	PRIMARY	table3	ref	col_varchar_key	col_varchar_key	4	test.table2.col_varchar_key	1	Using where
+1	PRIMARY	table1	ref	col_int_key	col_int_key	5	test.table3.col_int_nokey	1	
+2	DEPENDENT SUBQUERY	t2	ALL	NULL	NULL	NULL	NULL	1	Using where
+SELECT table1.col_int_nokey
+FROM t1 AS table1 STRAIGHT_JOIN (
+t1 AS table2 INNER JOIN t1 AS table3
+ON table3.col_varchar_key = table2.col_varchar_key)
+ON table3.col_int_nokey = table1.col_int_key
+WHERE table3.col_int_key != SOME ( SELECT c1 FROM t2 );
+col_int_nokey
+DROP TABLE t1, t2;
+#
+# Bug#58243 "RQG test optimizer_subquery causes server crash
+#            when running with ICP"
+#
+CREATE TABLE t1 (
+pk INTEGER NOT NULL,
+c1 INTEGER NOT NULL,
+c2 INTEGER NOT NULL,
+PRIMARY KEY (pk)
+);
+INSERT INTO t1 VALUES (1,6,7);
+CREATE TABLE t2 (
+c1 INTEGER NOT NULL
+);
+EXPLAIN SELECT t1.c1
+FROM t1
+WHERE t1.pk < 317 AND 2 IN (SELECT COUNT(t2.c1)
+FROM t2)
+ORDER BY t1.c2;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Impossible WHERE noticed after reading const tables
+2	DEPENDENT SUBQUERY	t2	ALL	NULL	NULL	NULL	NULL	1	
+SELECT t1.c1
+FROM t1
+WHERE t1.pk < 317 AND 2 IN (SELECT COUNT(t2.c1)
+FROM t2)
+ORDER BY t1.c2;
+c1
+DROP TABLE t1, t2;
+CREATE TABLE t1 (
+i1 INTEGER NOT NULL,
+c1 VARCHAR(1) NOT NULL
+);
+INSERT INTO t1 VALUES (2,'w');
+CREATE TABLE t2 (
+i1 INTEGER NOT NULL,
+c1 VARCHAR(1) NOT NULL,
+c2 VARCHAR(1) NOT NULL,
+KEY (c1, i1)
+);
+INSERT INTO t2 VALUES (8,'d','d');
+INSERT INTO t2 VALUES (4,'v','v');
+CREATE TABLE t3 (
+c1 VARCHAR(1) NOT NULL
+);
+INSERT INTO t3 VALUES ('v');
+EXPLAIN SELECT i1
+FROM t1
+WHERE EXISTS (SELECT t2.c1
+FROM (t2 INNER JOIN t3 ON (t3.c1 = t2.c1)) 
+WHERE t2.c2 != t1.c1 AND t2.c2 = (SELECT MIN(t3.c1)
+FROM t3));
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	t1	ALL	NULL	NULL	NULL	NULL	1	Using where
+2	DEPENDENT SUBQUERY	t3	ALL	NULL	NULL	NULL	NULL	1	
+2	DEPENDENT SUBQUERY	t2	ref	c1	c1	3	test.t3.c1	1	Using where
+3	SUBQUERY	t3	ALL	NULL	NULL	NULL	NULL	1	
+SELECT i1
+FROM t1
+WHERE EXISTS (SELECT t2.c1
+FROM (t2 INNER JOIN t3 ON (t3.c1 = t2.c1)) 
+WHERE t2.c2 != t1.c1 AND t2.c2 = (SELECT MIN(t3.c1)
+FROM t3));
+i1
+2
+DROP TABLE t1,t2,t3;
 set default_storage_engine= @save_storage_engine;
 set optimizer_switch=default;

=== modified file 'mysql-test/r/innodb_icp_all.result'
--- a/mysql-test/r/innodb_icp_all.result	2010-11-05 08:30:31 +0000
+++ b/mysql-test/r/innodb_icp_all.result	2010-11-24 22:20:27 +0000
@@ -453,5 +453,141 @@ LIMIT 1;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	range	PRIMARY,k1	k1	5	NULL	3	Using where; Using index
 DROP TABLE t1;
+#
+# Bug#42991 "invalid memory access and/or crash when using
+#            index condition pushdown + InnoDB"
+#
+CREATE TABLE t1 (
+c1 TINYTEXT NOT NULL,
+c2 INT NOT NULL,
+PRIMARY KEY (c2),
+KEY id1 (c1(4))
+);
+INSERT INTO t1 VALUES ('Anastasia', 5);
+INSERT INTO t1 VALUES ('Karianne', 4);
+SELECT * FROM t1 WHERE (c1 <= '6566-06-15' AND c2 <> 3);
+c1	c2
+EXPLAIN SELECT * FROM t1 WHERE (c1 <= '6566-06-15' AND c2 <> 3);
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	range	PRIMARY,id1	id1	6	NULL	1	Using index condition; Using where
+DROP TABLE t1;
+#
+# Bug#56529 - "Crash due to long semaphore wait in InnoDB 
+#              with ICP and subqueries"
+#
+CREATE TABLE t1 (
+col_int_nokey INTEGER,
+col_int_key INTEGER,
+col_varchar_key VARCHAR(1),
+KEY (col_int_key),
+KEY (col_varchar_key, col_int_key)
+);
+INSERT INTO t1 VALUES (NULL,2,'w');
+INSERT INTO t1 VALUES (7,9,'m');
+INSERT INTO t1 VALUES (9,3,'m');
+INSERT INTO t1 VALUES (7,9,'k');
+INSERT INTO t1 VALUES (4,NULL,'r');
+INSERT INTO t1 VALUES (2,9,'t');
+INSERT INTO t1 VALUES (6,3,'j');
+INSERT INTO t1 VALUES (8,8,'u');
+INSERT INTO t1 VALUES (NULL,8,'h');
+INSERT INTO t1 VALUES (5,53,'o');
+INSERT INTO t1 VALUES (NULL,0,NULL);
+INSERT INTO t1 VALUES (6,5,'k');
+INSERT INTO t1 VALUES (188,166,'e');
+INSERT INTO t1 VALUES (2,3,'n');
+INSERT INTO t1 VALUES (1,0,'t');
+INSERT INTO t1 VALUES (1,1,'c');
+INSERT INTO t1 VALUES (0,9,'m');
+INSERT INTO t1 VALUES (9,5,'y');
+INSERT INTO t1 VALUES (NULL,6,'f');
+CREATE TABLE t2 (
+c1 INTEGER NOT NULL
+);
+EXPLAIN SELECT table1.col_int_nokey
+FROM t1 AS table1 STRAIGHT_JOIN (
+t1 AS table2 INNER JOIN t1 AS table3
+ON table3.col_varchar_key = table2.col_varchar_key)
+ON table3.col_int_nokey = table1.col_int_key
+WHERE table3.col_int_key != SOME ( SELECT c1 FROM t2 );
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	table2	index	col_varchar_key	col_varchar_key	9	NULL	19	Using where; Using index
+1	PRIMARY	table3	ref	col_varchar_key	col_varchar_key	4	test.table2.col_varchar_key	1	Using where
+1	PRIMARY	table1	ref	col_int_key	col_int_key	5	test.table3.col_int_nokey	1	
+2	DEPENDENT SUBQUERY	t2	ALL	NULL	NULL	NULL	NULL	1	Using where
+SELECT table1.col_int_nokey
+FROM t1 AS table1 STRAIGHT_JOIN (
+t1 AS table2 INNER JOIN t1 AS table3
+ON table3.col_varchar_key = table2.col_varchar_key)
+ON table3.col_int_nokey = table1.col_int_key
+WHERE table3.col_int_key != SOME ( SELECT c1 FROM t2 );
+col_int_nokey
+DROP TABLE t1, t2;
+#
+# Bug#58243 "RQG test optimizer_subquery causes server crash
+#            when running with ICP"
+#
+CREATE TABLE t1 (
+pk INTEGER NOT NULL,
+c1 INTEGER NOT NULL,
+c2 INTEGER NOT NULL,
+PRIMARY KEY (pk)
+);
+INSERT INTO t1 VALUES (1,6,7);
+CREATE TABLE t2 (
+c1 INTEGER NOT NULL
+);
+EXPLAIN SELECT t1.c1
+FROM t1
+WHERE t1.pk < 317 AND 2 IN (SELECT COUNT(t2.c1)
+FROM t2)
+ORDER BY t1.c2;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	t1	range	PRIMARY	PRIMARY	4	NULL	1	Using index condition; Using where; Using filesort
+2	SUBQUERY	t2	ALL	NULL	NULL	NULL	NULL	1	
+SELECT t1.c1
+FROM t1
+WHERE t1.pk < 317 AND 2 IN (SELECT COUNT(t2.c1)
+FROM t2)
+ORDER BY t1.c2;
+c1
+DROP TABLE t1, t2;
+CREATE TABLE t1 (
+i1 INTEGER NOT NULL,
+c1 VARCHAR(1) NOT NULL
+);
+INSERT INTO t1 VALUES (2,'w');
+CREATE TABLE t2 (
+i1 INTEGER NOT NULL,
+c1 VARCHAR(1) NOT NULL,
+c2 VARCHAR(1) NOT NULL,
+KEY (c1, i1)
+);
+INSERT INTO t2 VALUES (8,'d','d');
+INSERT INTO t2 VALUES (4,'v','v');
+CREATE TABLE t3 (
+c1 VARCHAR(1) NOT NULL
+);
+INSERT INTO t3 VALUES ('v');
+EXPLAIN SELECT i1
+FROM t1
+WHERE EXISTS (SELECT t2.c1
+FROM (t2 INNER JOIN t3 ON (t3.c1 = t2.c1)) 
+WHERE t2.c2 != t1.c1 AND t2.c2 = (SELECT MIN(t3.c1)
+FROM t3));
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	t1	ALL	NULL	NULL	NULL	NULL	1	Using where
+2	DEPENDENT SUBQUERY	t3	ALL	NULL	NULL	NULL	NULL	1	
+2	DEPENDENT SUBQUERY	t2	ref	c1	c1	3	test.t3.c1	1	Using where
+3	SUBQUERY	t3	ALL	NULL	NULL	NULL	NULL	1	
+SELECT i1
+FROM t1
+WHERE EXISTS (SELECT t2.c1
+FROM (t2 INNER JOIN t3 ON (t3.c1 = t2.c1)) 
+WHERE t2.c2 != t1.c1 AND t2.c2 = (SELECT MIN(t3.c1)
+FROM t3));
+i1
+2
+DROP TABLE t1,t2,t3;
 set default_storage_engine= @save_storage_engine;
 set optimizer_switch=default;

=== modified file 'mysql-test/r/innodb_icp_none.result'
--- a/mysql-test/r/innodb_icp_none.result	2010-11-05 16:23:32 +0000
+++ b/mysql-test/r/innodb_icp_none.result	2010-11-25 08:03:16 +0000
@@ -452,5 +452,141 @@ LIMIT 1;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	range	PRIMARY,k1	k1	5	NULL	3	Using where; Using index
 DROP TABLE t1;
+#
+# Bug#42991 "invalid memory access and/or crash when using
+#            index condition pushdown + InnoDB"
+#
+CREATE TABLE t1 (
+c1 TINYTEXT NOT NULL,
+c2 INT NOT NULL,
+PRIMARY KEY (c2),
+KEY id1 (c1(4))
+);
+INSERT INTO t1 VALUES ('Anastasia', 5);
+INSERT INTO t1 VALUES ('Karianne', 4);
+SELECT * FROM t1 WHERE (c1 <= '6566-06-15' AND c2 <> 3);
+c1	c2
+EXPLAIN SELECT * FROM t1 WHERE (c1 <= '6566-06-15' AND c2 <> 3);
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	range	PRIMARY,id1	id1	6	NULL	1	Using where
+DROP TABLE t1;
+#
+# Bug#56529 - "Crash due to long semaphore wait in InnoDB 
+#              with ICP and subqueries"
+#
+CREATE TABLE t1 (
+col_int_nokey INTEGER,
+col_int_key INTEGER,
+col_varchar_key VARCHAR(1),
+KEY (col_int_key),
+KEY (col_varchar_key, col_int_key)
+);
+INSERT INTO t1 VALUES (NULL,2,'w');
+INSERT INTO t1 VALUES (7,9,'m');
+INSERT INTO t1 VALUES (9,3,'m');
+INSERT INTO t1 VALUES (7,9,'k');
+INSERT INTO t1 VALUES (4,NULL,'r');
+INSERT INTO t1 VALUES (2,9,'t');
+INSERT INTO t1 VALUES (6,3,'j');
+INSERT INTO t1 VALUES (8,8,'u');
+INSERT INTO t1 VALUES (NULL,8,'h');
+INSERT INTO t1 VALUES (5,53,'o');
+INSERT INTO t1 VALUES (NULL,0,NULL);
+INSERT INTO t1 VALUES (6,5,'k');
+INSERT INTO t1 VALUES (188,166,'e');
+INSERT INTO t1 VALUES (2,3,'n');
+INSERT INTO t1 VALUES (1,0,'t');
+INSERT INTO t1 VALUES (1,1,'c');
+INSERT INTO t1 VALUES (0,9,'m');
+INSERT INTO t1 VALUES (9,5,'y');
+INSERT INTO t1 VALUES (NULL,6,'f');
+CREATE TABLE t2 (
+c1 INTEGER NOT NULL
+);
+EXPLAIN SELECT table1.col_int_nokey
+FROM t1 AS table1 STRAIGHT_JOIN (
+t1 AS table2 INNER JOIN t1 AS table3
+ON table3.col_varchar_key = table2.col_varchar_key)
+ON table3.col_int_nokey = table1.col_int_key
+WHERE table3.col_int_key != SOME ( SELECT c1 FROM t2 );
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	table2	index	col_varchar_key	col_varchar_key	9	NULL	19	Using where; Using index
+1	PRIMARY	table3	ref	col_varchar_key	col_varchar_key	4	test.table2.col_varchar_key	1	Using where
+1	PRIMARY	table1	ref	col_int_key	col_int_key	5	test.table3.col_int_nokey	1	
+2	DEPENDENT SUBQUERY	t2	ALL	NULL	NULL	NULL	NULL	1	Using where
+SELECT table1.col_int_nokey
+FROM t1 AS table1 STRAIGHT_JOIN (
+t1 AS table2 INNER JOIN t1 AS table3
+ON table3.col_varchar_key = table2.col_varchar_key)
+ON table3.col_int_nokey = table1.col_int_key
+WHERE table3.col_int_key != SOME ( SELECT c1 FROM t2 );
+col_int_nokey
+DROP TABLE t1, t2;
+#
+# Bug#58243 "RQG test optimizer_subquery causes server crash
+#            when running with ICP"
+#
+CREATE TABLE t1 (
+pk INTEGER NOT NULL,
+c1 INTEGER NOT NULL,
+c2 INTEGER NOT NULL,
+PRIMARY KEY (pk)
+);
+INSERT INTO t1 VALUES (1,6,7);
+CREATE TABLE t2 (
+c1 INTEGER NOT NULL
+);
+EXPLAIN SELECT t1.c1
+FROM t1
+WHERE t1.pk < 317 AND 2 IN (SELECT COUNT(t2.c1)
+FROM t2)
+ORDER BY t1.c2;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Impossible WHERE noticed after reading const tables
+2	DEPENDENT SUBQUERY	t2	ALL	NULL	NULL	NULL	NULL	1	
+SELECT t1.c1
+FROM t1
+WHERE t1.pk < 317 AND 2 IN (SELECT COUNT(t2.c1)
+FROM t2)
+ORDER BY t1.c2;
+c1
+DROP TABLE t1, t2;
+CREATE TABLE t1 (
+i1 INTEGER NOT NULL,
+c1 VARCHAR(1) NOT NULL
+);
+INSERT INTO t1 VALUES (2,'w');
+CREATE TABLE t2 (
+i1 INTEGER NOT NULL,
+c1 VARCHAR(1) NOT NULL,
+c2 VARCHAR(1) NOT NULL,
+KEY (c1, i1)
+);
+INSERT INTO t2 VALUES (8,'d','d');
+INSERT INTO t2 VALUES (4,'v','v');
+CREATE TABLE t3 (
+c1 VARCHAR(1) NOT NULL
+);
+INSERT INTO t3 VALUES ('v');
+EXPLAIN SELECT i1
+FROM t1
+WHERE EXISTS (SELECT t2.c1
+FROM (t2 INNER JOIN t3 ON (t3.c1 = t2.c1)) 
+WHERE t2.c2 != t1.c1 AND t2.c2 = (SELECT MIN(t3.c1)
+FROM t3));
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	t1	ALL	NULL	NULL	NULL	NULL	1	Using where
+2	DEPENDENT SUBQUERY	t3	ALL	NULL	NULL	NULL	NULL	1	
+2	DEPENDENT SUBQUERY	t2	ref	c1	c1	3	test.t3.c1	1	Using where
+3	SUBQUERY	t3	ALL	NULL	NULL	NULL	NULL	1	
+SELECT i1
+FROM t1
+WHERE EXISTS (SELECT t2.c1
+FROM (t2 INNER JOIN t3 ON (t3.c1 = t2.c1)) 
+WHERE t2.c2 != t1.c1 AND t2.c2 = (SELECT MIN(t3.c1)
+FROM t3));
+i1
+2
+DROP TABLE t1,t2,t3;
 set default_storage_engine= @save_storage_engine;
 set optimizer_switch=default;

=== modified file 'mysql-test/r/innodb_mrr_none.result'
--- a/mysql-test/r/innodb_mrr_none.result	2010-11-05 16:23:32 +0000
+++ b/mysql-test/r/innodb_mrr_none.result	2010-11-17 15:23:17 +0000
@@ -527,7 +527,7 @@ REPEATABLE-READ
 START TRANSACTION;
 EXPLAIN SELECT * FROM t1 WHERE a > 2 FOR UPDATE;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	range	a	a	5	NULL	2	Using where
+1	SIMPLE	t1	range	a	a	5	NULL	2	Using index condition
 SELECT * FROM t1 WHERE a > 2 FOR UPDATE;
 dummy	a	b
 3	3	3

=== modified file 'mysql-test/r/join_cache_jcl1.result'
--- a/mysql-test/r/join_cache_jcl1.result	2010-11-05 14:19:52 +0000
+++ b/mysql-test/r/join_cache_jcl1.result	2010-11-17 15:23:17 +0000
@@ -449,7 +449,7 @@ SELECT City.Name, Country.Name FROM City
 WHERE City.Country=Country.Code AND 
 Country.Name LIKE 'L%' AND City.Population > 100000;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	Country	range	PRIMARY,Name	Name	52	NULL	10	Using where
+1	SIMPLE	Country	range	PRIMARY,Name	Name	52	NULL	10	Using index condition
 1	SIMPLE	City	ref	Population,Country	Country	3	world.Country.Code	18	Using where
 SELECT City.Name, Country.Name FROM City,Country
 WHERE City.Country=Country.Code AND 
@@ -480,7 +480,7 @@ CountryLanguage.Percentage > 50;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	CountryLanguage	ALL	PRIMARY,Percentage	NULL	NULL	NULL	984	Using where
 1	SIMPLE	Country	eq_ref	PRIMARY	PRIMARY	3	world.CountryLanguage.Country	1	Using where
-1	SIMPLE	City	ref	Country	Country	3	world.Country.Code	18	Using where
+1	SIMPLE	City	ref	Country	Country	3	world.Country.Code	18	Using index condition; Using where
 SELECT City.Name, Country.Name, CountryLanguage.Language
 FROM City,Country,CountryLanguage
 WHERE City.Country=Country.Code AND
@@ -756,7 +756,7 @@ SELECT City.Name, Country.Name FROM City
 WHERE City.Country=Country.Code AND 
 Country.Name LIKE 'L%' AND City.Population > 100000;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	Country	range	PRIMARY,Name	Name	52	NULL	10	Using where
+1	SIMPLE	Country	range	PRIMARY,Name	Name	52	NULL	10	Using index condition
 1	SIMPLE	City	ref	Population,Country	Country	3	world.Country.Code	18	Using where
 SELECT City.Name, Country.Name FROM City,Country
 WHERE City.Country=Country.Code AND 
@@ -787,7 +787,7 @@ CountryLanguage.Percentage > 50;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	CountryLanguage	ALL	PRIMARY,Percentage	NULL	NULL	NULL	984	Using where
 1	SIMPLE	Country	eq_ref	PRIMARY	PRIMARY	3	world.CountryLanguage.Country	1	Using where
-1	SIMPLE	City	ref	Country	Country	3	world.Country.Code	18	Using where
+1	SIMPLE	City	ref	Country	Country	3	world.Country.Code	18	Using index condition; Using where
 SELECT City.Name, Country.Name, CountryLanguage.Language
 FROM City,Country,CountryLanguage
 WHERE City.Country=Country.Code AND
@@ -1019,7 +1019,7 @@ EXPLAIN
 SELECT City.Name, Country.Name FROM City,Country
 WHERE City.Country=Country.Code AND City.Population > 3000000;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	City	range	Population,Country	Population	4	NULL	#	Using where
+1	SIMPLE	City	range	Population,Country	Population	4	NULL	#	Using index condition
 1	SIMPLE	Country	eq_ref	PRIMARY	PRIMARY	3	world.City.Country	#	
 SELECT City.Name, Country.Name FROM City,Country
 WHERE City.Country=Country.Code AND City.Population > 3000000;
@@ -1306,7 +1306,7 @@ t1.metaid = t2.metaid AND t1.affiliateid
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t6	system	PRIMARY	NULL	NULL	NULL	1	
 1	SIMPLE	t1	ref	t1_affiliateid,t1_metaid	t1_affiliateid	4	const	1	
-1	SIMPLE	t4	ref	PRIMARY,t4_formatclassid,t4_formats_idx	t4_formats_idx	1	const	1	Using where
+1	SIMPLE	t4	ref	PRIMARY,t4_formatclassid,t4_formats_idx	t4_formats_idx	1	const	1	Using index condition; Using where
 1	SIMPLE	t5	eq_ref	PRIMARY,t5_formattypeid	PRIMARY	4	test.t4.formatclassid	1	Using where
 1	SIMPLE	t2	eq_ref	PRIMARY	PRIMARY	4	test.t1.metaid	1	
 1	SIMPLE	t7	ref	PRIMARY	PRIMARY	4	test.t1.metaid	1	Using index
@@ -1743,7 +1743,7 @@ explain select t2.f1, t2.f2, t2.f3 from 
 where t1.f1=t2.f1 and t2.f2 between t1.f1 and t2.f2;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	3	Using where
-1	SIMPLE	t2	ref	f1	f1	4	test.t1.f1	3	Using where
+1	SIMPLE	t2	ref	f1	f1	4	test.t1.f1	3	Using index condition
 drop table t1,t2;
 #
 # Bug #42955: join with GROUP BY/ORDER BY and when BKA is enabled 
@@ -2184,7 +2184,7 @@ where table3 .`pk` and table3 .`col_int_
 and table3 .`col_varchar_key`  = table2 .`col_varchar_nokey`;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	table2	ALL	NULL	NULL	NULL	NULL	2	Using where
-1	SIMPLE	table3	ref	col_varchar_key	col_varchar_key	4	test.table2.col_varchar_nokey	1	Using where
+1	SIMPLE	table3	ref	col_varchar_key	col_varchar_key	4	test.table2.col_varchar_nokey	1	Using index condition; Using where
 SELECT table2 .`col_int_key` FROM t1 table2,
 t1 table3 force index (`col_varchar_key`)
 where table3 .`pk` and table3 .`col_int_key`  >= table2 .`pk`  

=== modified file 'mysql-test/r/join_nested.result'
--- a/mysql-test/r/join_nested.result	2010-11-05 14:19:52 +0000
+++ b/mysql-test/r/join_nested.result	2010-11-17 15:23:17 +0000
@@ -1447,12 +1447,12 @@ id	select_type	table	type	possible_keys	
 1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	X	
 1	SIMPLE	t3	ref	a	a	5	test.t2.b	X	
 1	SIMPLE	t5	ref	a	a	5	test.t3.b	X	
-1	SIMPLE	t4	ref	a	a	5	test.t3.b	X	Using where
+1	SIMPLE	t4	ref	a	a	5	test.t3.b	X	Using index condition
 explain select * from (t4 join t6 on t6.a=t4.b) right join t3 on t4.a=t3.b
 join t2 left join (t5 join t7 on t7.a=t5.b) on t5.a=t2.b where t3.a<=>t2.b;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	X	
-1	SIMPLE	t3	ref	a	a	5	test.t2.b	X	Using where
+1	SIMPLE	t3	ref	a	a	5	test.t2.b	X	Using index condition
 1	SIMPLE	t4	ref	a	a	5	test.t3.b	X	
 1	SIMPLE	t6	ref	a	a	5	test.t4.b	X	
 1	SIMPLE	t5	ref	a	a	5	test.t2.b	X	

=== modified file 'mysql-test/r/join_optimizer.result'
--- a/mysql-test/r/join_optimizer.result	2010-11-05 14:19:52 +0000
+++ b/mysql-test/r/join_optimizer.result	2010-11-17 15:23:17 +0000
@@ -33,7 +33,7 @@ SELECT STRAIGHT_JOIN g.id FROM t2 a, t3 
 WHERE g.domain = 'queue' AND g.type = a.type;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	a	ALL	NULL	NULL	NULL	NULL	2	Using where
-1	SIMPLE	g	ref	groups_dt	groups_dt	70	const,test.a.type	13	Using where
+1	SIMPLE	g	ref	groups_dt	groups_dt	70	const,test.a.type	13	Using index condition
 drop table t0,t1,t2,t3;
 #
 # BUG#47217 Lost optimization caused slowdown & wrong result.
@@ -61,7 +61,7 @@ Variable_name	Value
 Handler_read_first	0
 Handler_read_key	1
 Handler_read_last	0
-Handler_read_next	2
+Handler_read_next	0
 Handler_read_prev	0
 Handler_read_rnd	0
 Handler_read_rnd_next	1

=== modified file 'mysql-test/r/merge.result'
--- a/mysql-test/r/merge.result	2010-11-05 16:23:32 +0000
+++ b/mysql-test/r/merge.result	2010-11-17 15:23:17 +0000
@@ -677,7 +677,7 @@ id	select_type	table	type	possible_keys	
 EXPLAIN SELECT * FROM t1 WHERE fileset_id = 2
 AND file_code BETWEEN '0000000115' AND '0000000120' LIMIT 1;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	range	PRIMARY,files	PRIMARY	35	NULL	5	Using where
+1	SIMPLE	t1	range	PRIMARY,files	PRIMARY	35	NULL	5	Using index condition
 EXPLAIN SELECT * FROM t2 WHERE fileset_id = 2
 AND file_code = '0000000115' LIMIT 1;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra

=== modified file 'mysql-test/r/mix2_myisam.result'
--- a/mysql-test/r/mix2_myisam.result	2010-11-05 16:23:32 +0000
+++ b/mysql-test/r/mix2_myisam.result	2010-11-17 15:23:17 +0000
@@ -1114,11 +1114,11 @@ count(*)
 29267
 explain select * from t1 where c between 1 and 2500;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	range	c	c	5	NULL	#	Using where
+1	SIMPLE	t1	range	c	c	5	NULL	#	Using index condition
 update t1 set c=a;
 explain select * from t1 where c between 1 and 2500;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	range	c	c	5	NULL	#	Using where
+1	SIMPLE	t1	range	c	c	5	NULL	#	Using index condition
 drop table t1,t2;
 create table t1 (id int primary key auto_increment, fk int, index index_fk (fk)) engine=MyISAM;
 insert into t1 (id) values (null),(null),(null),(null),(null);
@@ -1559,7 +1559,7 @@ qq
 *a         *a*a         *
 explain select * from t1 where v='a';
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	ref	v,v_2	#	13	const	#	Using where
+1	SIMPLE	t1	ref	v,v_2	#	13	const	#	Using index condition
 select v,count(*) from t1 group by v limit 10;
 v	count(*)
 a	1
@@ -1735,7 +1735,7 @@ id	select_type	table	type	possible_keys	
 1	SIMPLE	t1	ref	v	v	303	const	#	Using where; Using index
 explain select * from t1 where v='a';
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	ref	v	v	303	const	#	Using where
+1	SIMPLE	t1	ref	v	v	303	const	#	Using index condition
 select v,count(*) from t1 group by v limit 10;
 v	count(*)
 a	1

=== modified file 'mysql-test/r/myisam.result'
--- a/mysql-test/r/myisam.result	2010-11-05 16:23:32 +0000
+++ b/mysql-test/r/myisam.result	2010-11-17 15:23:17 +0000
@@ -368,7 +368,7 @@ id	select_type	table	type	possible_keys	
 1	SIMPLE	t1	ALL	a	NULL	NULL	NULL	5	Using where
 explain select * from t1 force index (a) where a=0 or a=2;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	range	a	a	4	NULL	4	Using where
+1	SIMPLE	t1	range	a	a	4	NULL	4	Using index condition
 explain select * from t1 where c=1;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	ref	c,c_2	c	5	const	1	
@@ -1234,7 +1234,7 @@ qq
 *a         *a*a         *
 explain select * from t1 where v='a';
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	ref	v,v_2	#	13	const	#	Using where
+1	SIMPLE	t1	ref	v,v_2	#	13	const	#	Using index condition
 select v,count(*) from t1 group by v limit 10;
 v	count(*)
 a	1
@@ -1410,7 +1410,7 @@ id	select_type	table	type	possible_keys	
 1	SIMPLE	t1	ref	v	v	303	const	#	Using where; Using index
 explain select * from t1 where v='a';
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	ref	v	v	303	const	#	Using where
+1	SIMPLE	t1	ref	v	v	303	const	#	Using index condition
 select v,count(*) from t1 group by v limit 10;
 v	count(*)
 a	1
@@ -2436,7 +2436,7 @@ insert into t2 select A.a + 10 *B.a, 1, 
 explain select * from t1, t2 where t2.a=t1.a and t2.b + 1;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	5	
-1	SIMPLE	t2	ref	a	a	4	test.t1.a	1	Using where
+1	SIMPLE	t2	ref	a	a	4	test.t1.a	1	Using index condition
 select * from t1, t2 where t2.a=t1.a and t2.b + 1;
 a	a	b	filler
 0	0	1	filler

=== modified file 'mysql-test/r/myisam_icp.result'
--- a/mysql-test/r/myisam_icp.result	2010-11-02 18:47:47 +0000
+++ b/mysql-test/r/myisam_icp.result	2010-11-24 22:20:27 +0000
@@ -451,4 +451,140 @@ LIMIT 1;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	range	PRIMARY,k1	k1	5	NULL	4	Using where
 DROP TABLE t1;
+#
+# Bug#42991 "invalid memory access and/or crash when using
+#            index condition pushdown + InnoDB"
+#
+CREATE TABLE t1 (
+c1 TINYTEXT NOT NULL,
+c2 INT NOT NULL,
+PRIMARY KEY (c2),
+KEY id1 (c1(4))
+);
+INSERT INTO t1 VALUES ('Anastasia', 5);
+INSERT INTO t1 VALUES ('Karianne', 4);
+SELECT * FROM t1 WHERE (c1 <= '6566-06-15' AND c2 <> 3);
+c1	c2
+EXPLAIN SELECT * FROM t1 WHERE (c1 <= '6566-06-15' AND c2 <> 3);
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	range	PRIMARY,id1	id1	6	NULL	1	Using where
+DROP TABLE t1;
+#
+# Bug#56529 - "Crash due to long semaphore wait in InnoDB 
+#              with ICP and subqueries"
+#
+CREATE TABLE t1 (
+col_int_nokey INTEGER,
+col_int_key INTEGER,
+col_varchar_key VARCHAR(1),
+KEY (col_int_key),
+KEY (col_varchar_key, col_int_key)
+);
+INSERT INTO t1 VALUES (NULL,2,'w');
+INSERT INTO t1 VALUES (7,9,'m');
+INSERT INTO t1 VALUES (9,3,'m');
+INSERT INTO t1 VALUES (7,9,'k');
+INSERT INTO t1 VALUES (4,NULL,'r');
+INSERT INTO t1 VALUES (2,9,'t');
+INSERT INTO t1 VALUES (6,3,'j');
+INSERT INTO t1 VALUES (8,8,'u');
+INSERT INTO t1 VALUES (NULL,8,'h');
+INSERT INTO t1 VALUES (5,53,'o');
+INSERT INTO t1 VALUES (NULL,0,NULL);
+INSERT INTO t1 VALUES (6,5,'k');
+INSERT INTO t1 VALUES (188,166,'e');
+INSERT INTO t1 VALUES (2,3,'n');
+INSERT INTO t1 VALUES (1,0,'t');
+INSERT INTO t1 VALUES (1,1,'c');
+INSERT INTO t1 VALUES (0,9,'m');
+INSERT INTO t1 VALUES (9,5,'y');
+INSERT INTO t1 VALUES (NULL,6,'f');
+CREATE TABLE t2 (
+c1 INTEGER NOT NULL
+);
+EXPLAIN SELECT table1.col_int_nokey
+FROM t1 AS table1 STRAIGHT_JOIN (
+t1 AS table2 INNER JOIN t1 AS table3
+ON table3.col_varchar_key = table2.col_varchar_key)
+ON table3.col_int_nokey = table1.col_int_key
+WHERE table3.col_int_key != SOME ( SELECT c1 FROM t2 );
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	table3	ALL	col_varchar_key	NULL	NULL	NULL	19	Using where
+1	PRIMARY	table2	ref	col_varchar_key	col_varchar_key	4	test.table3.col_varchar_key	2	Using index
+1	PRIMARY	table1	ref	col_int_key	col_int_key	5	test.table3.col_int_nokey	2	
+2	DEPENDENT SUBQUERY	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Impossible WHERE noticed after reading const tables
+SELECT table1.col_int_nokey
+FROM t1 AS table1 STRAIGHT_JOIN (
+t1 AS table2 INNER JOIN t1 AS table3
+ON table3.col_varchar_key = table2.col_varchar_key)
+ON table3.col_int_nokey = table1.col_int_key
+WHERE table3.col_int_key != SOME ( SELECT c1 FROM t2 );
+col_int_nokey
+DROP TABLE t1, t2;
+#
+# Bug#58243 "RQG test optimizer_subquery causes server crash
+#            when running with ICP"
+#
+CREATE TABLE t1 (
+pk INTEGER NOT NULL,
+c1 INTEGER NOT NULL,
+c2 INTEGER NOT NULL,
+PRIMARY KEY (pk)
+);
+INSERT INTO t1 VALUES (1,6,7);
+CREATE TABLE t2 (
+c1 INTEGER NOT NULL
+);
+EXPLAIN SELECT t1.c1
+FROM t1
+WHERE t1.pk < 317 AND 2 IN (SELECT COUNT(t2.c1)
+FROM t2)
+ORDER BY t1.c2;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Impossible WHERE noticed after reading const tables
+2	DEPENDENT SUBQUERY	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Select tables optimized away
+SELECT t1.c1
+FROM t1
+WHERE t1.pk < 317 AND 2 IN (SELECT COUNT(t2.c1)
+FROM t2)
+ORDER BY t1.c2;
+c1
+DROP TABLE t1, t2;
+CREATE TABLE t1 (
+i1 INTEGER NOT NULL,
+c1 VARCHAR(1) NOT NULL
+);
+INSERT INTO t1 VALUES (2,'w');
+CREATE TABLE t2 (
+i1 INTEGER NOT NULL,
+c1 VARCHAR(1) NOT NULL,
+c2 VARCHAR(1) NOT NULL,
+KEY (c1, i1)
+);
+INSERT INTO t2 VALUES (8,'d','d');
+INSERT INTO t2 VALUES (4,'v','v');
+CREATE TABLE t3 (
+c1 VARCHAR(1) NOT NULL
+);
+INSERT INTO t3 VALUES ('v');
+EXPLAIN SELECT i1
+FROM t1
+WHERE EXISTS (SELECT t2.c1
+FROM (t2 INNER JOIN t3 ON (t3.c1 = t2.c1)) 
+WHERE t2.c2 != t1.c1 AND t2.c2 = (SELECT MIN(t3.c1)
+FROM t3));
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	t1	system	NULL	NULL	NULL	NULL	1	
+2	DEPENDENT SUBQUERY	t3	system	NULL	NULL	NULL	NULL	1	
+2	DEPENDENT SUBQUERY	t2	ref	c1	c1	3	const	1	Using where
+3	SUBQUERY	t3	system	NULL	NULL	NULL	NULL	1	
+SELECT i1
+FROM t1
+WHERE EXISTS (SELECT t2.c1
+FROM (t2 INNER JOIN t3 ON (t3.c1 = t2.c1)) 
+WHERE t2.c2 != t1.c1 AND t2.c2 = (SELECT MIN(t3.c1)
+FROM t3));
+i1
+2
+DROP TABLE t1,t2,t3;
 set optimizer_switch=default;

=== modified file 'mysql-test/r/myisam_icp_all.result'
--- a/mysql-test/r/myisam_icp_all.result	2010-11-02 18:47:47 +0000
+++ b/mysql-test/r/myisam_icp_all.result	2010-11-24 22:20:27 +0000
@@ -451,4 +451,140 @@ LIMIT 1;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	range	PRIMARY,k1	k1	5	NULL	4	Using where
 DROP TABLE t1;
+#
+# Bug#42991 "invalid memory access and/or crash when using
+#            index condition pushdown + InnoDB"
+#
+CREATE TABLE t1 (
+c1 TINYTEXT NOT NULL,
+c2 INT NOT NULL,
+PRIMARY KEY (c2),
+KEY id1 (c1(4))
+);
+INSERT INTO t1 VALUES ('Anastasia', 5);
+INSERT INTO t1 VALUES ('Karianne', 4);
+SELECT * FROM t1 WHERE (c1 <= '6566-06-15' AND c2 <> 3);
+c1	c2
+EXPLAIN SELECT * FROM t1 WHERE (c1 <= '6566-06-15' AND c2 <> 3);
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	range	PRIMARY,id1	id1	6	NULL	1	Using where
+DROP TABLE t1;
+#
+# Bug#56529 - "Crash due to long semaphore wait in InnoDB 
+#              with ICP and subqueries"
+#
+CREATE TABLE t1 (
+col_int_nokey INTEGER,
+col_int_key INTEGER,
+col_varchar_key VARCHAR(1),
+KEY (col_int_key),
+KEY (col_varchar_key, col_int_key)
+);
+INSERT INTO t1 VALUES (NULL,2,'w');
+INSERT INTO t1 VALUES (7,9,'m');
+INSERT INTO t1 VALUES (9,3,'m');
+INSERT INTO t1 VALUES (7,9,'k');
+INSERT INTO t1 VALUES (4,NULL,'r');
+INSERT INTO t1 VALUES (2,9,'t');
+INSERT INTO t1 VALUES (6,3,'j');
+INSERT INTO t1 VALUES (8,8,'u');
+INSERT INTO t1 VALUES (NULL,8,'h');
+INSERT INTO t1 VALUES (5,53,'o');
+INSERT INTO t1 VALUES (NULL,0,NULL);
+INSERT INTO t1 VALUES (6,5,'k');
+INSERT INTO t1 VALUES (188,166,'e');
+INSERT INTO t1 VALUES (2,3,'n');
+INSERT INTO t1 VALUES (1,0,'t');
+INSERT INTO t1 VALUES (1,1,'c');
+INSERT INTO t1 VALUES (0,9,'m');
+INSERT INTO t1 VALUES (9,5,'y');
+INSERT INTO t1 VALUES (NULL,6,'f');
+CREATE TABLE t2 (
+c1 INTEGER NOT NULL
+);
+EXPLAIN SELECT table1.col_int_nokey
+FROM t1 AS table1 STRAIGHT_JOIN (
+t1 AS table2 INNER JOIN t1 AS table3
+ON table3.col_varchar_key = table2.col_varchar_key)
+ON table3.col_int_nokey = table1.col_int_key
+WHERE table3.col_int_key != SOME ( SELECT c1 FROM t2 );
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	table3	ALL	col_varchar_key	NULL	NULL	NULL	19	Using where
+1	PRIMARY	table2	ref	col_varchar_key	col_varchar_key	4	test.table3.col_varchar_key	2	Using index
+1	PRIMARY	table1	ref	col_int_key	col_int_key	5	test.table3.col_int_nokey	2	
+2	DEPENDENT SUBQUERY	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Impossible WHERE noticed after reading const tables
+SELECT table1.col_int_nokey
+FROM t1 AS table1 STRAIGHT_JOIN (
+t1 AS table2 INNER JOIN t1 AS table3
+ON table3.col_varchar_key = table2.col_varchar_key)
+ON table3.col_int_nokey = table1.col_int_key
+WHERE table3.col_int_key != SOME ( SELECT c1 FROM t2 );
+col_int_nokey
+DROP TABLE t1, t2;
+#
+# Bug#58243 "RQG test optimizer_subquery causes server crash
+#            when running with ICP"
+#
+CREATE TABLE t1 (
+pk INTEGER NOT NULL,
+c1 INTEGER NOT NULL,
+c2 INTEGER NOT NULL,
+PRIMARY KEY (pk)
+);
+INSERT INTO t1 VALUES (1,6,7);
+CREATE TABLE t2 (
+c1 INTEGER NOT NULL
+);
+EXPLAIN SELECT t1.c1
+FROM t1
+WHERE t1.pk < 317 AND 2 IN (SELECT COUNT(t2.c1)
+FROM t2)
+ORDER BY t1.c2;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	t1	system	PRIMARY	NULL	NULL	NULL	1	
+2	SUBQUERY	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Select tables optimized away
+SELECT t1.c1
+FROM t1
+WHERE t1.pk < 317 AND 2 IN (SELECT COUNT(t2.c1)
+FROM t2)
+ORDER BY t1.c2;
+c1
+DROP TABLE t1, t2;
+CREATE TABLE t1 (
+i1 INTEGER NOT NULL,
+c1 VARCHAR(1) NOT NULL
+);
+INSERT INTO t1 VALUES (2,'w');
+CREATE TABLE t2 (
+i1 INTEGER NOT NULL,
+c1 VARCHAR(1) NOT NULL,
+c2 VARCHAR(1) NOT NULL,
+KEY (c1, i1)
+);
+INSERT INTO t2 VALUES (8,'d','d');
+INSERT INTO t2 VALUES (4,'v','v');
+CREATE TABLE t3 (
+c1 VARCHAR(1) NOT NULL
+);
+INSERT INTO t3 VALUES ('v');
+EXPLAIN SELECT i1
+FROM t1
+WHERE EXISTS (SELECT t2.c1
+FROM (t2 INNER JOIN t3 ON (t3.c1 = t2.c1)) 
+WHERE t2.c2 != t1.c1 AND t2.c2 = (SELECT MIN(t3.c1)
+FROM t3));
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	t1	system	NULL	NULL	NULL	NULL	1	
+2	DEPENDENT SUBQUERY	t3	system	NULL	NULL	NULL	NULL	1	
+2	DEPENDENT SUBQUERY	t2	ref	c1	c1	3	const	1	Using where
+3	SUBQUERY	t3	system	NULL	NULL	NULL	NULL	1	
+SELECT i1
+FROM t1
+WHERE EXISTS (SELECT t2.c1
+FROM (t2 INNER JOIN t3 ON (t3.c1 = t2.c1)) 
+WHERE t2.c2 != t1.c1 AND t2.c2 = (SELECT MIN(t3.c1)
+FROM t3));
+i1
+2
+DROP TABLE t1,t2,t3;
 set optimizer_switch=default;

=== modified file 'mysql-test/r/myisam_icp_none.result'
--- a/mysql-test/r/myisam_icp_none.result	2010-11-02 18:47:47 +0000
+++ b/mysql-test/r/myisam_icp_none.result	2010-11-24 22:20:27 +0000
@@ -450,4 +450,140 @@ LIMIT 1;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	range	PRIMARY,k1	k1	5	NULL	4	Using where
 DROP TABLE t1;
+#
+# Bug#42991 "invalid memory access and/or crash when using
+#            index condition pushdown + InnoDB"
+#
+CREATE TABLE t1 (
+c1 TINYTEXT NOT NULL,
+c2 INT NOT NULL,
+PRIMARY KEY (c2),
+KEY id1 (c1(4))
+);
+INSERT INTO t1 VALUES ('Anastasia', 5);
+INSERT INTO t1 VALUES ('Karianne', 4);
+SELECT * FROM t1 WHERE (c1 <= '6566-06-15' AND c2 <> 3);
+c1	c2
+EXPLAIN SELECT * FROM t1 WHERE (c1 <= '6566-06-15' AND c2 <> 3);
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	range	PRIMARY,id1	id1	6	NULL	1	Using where
+DROP TABLE t1;
+#
+# Bug#56529 - "Crash due to long semaphore wait in InnoDB 
+#              with ICP and subqueries"
+#
+CREATE TABLE t1 (
+col_int_nokey INTEGER,
+col_int_key INTEGER,
+col_varchar_key VARCHAR(1),
+KEY (col_int_key),
+KEY (col_varchar_key, col_int_key)
+);
+INSERT INTO t1 VALUES (NULL,2,'w');
+INSERT INTO t1 VALUES (7,9,'m');
+INSERT INTO t1 VALUES (9,3,'m');
+INSERT INTO t1 VALUES (7,9,'k');
+INSERT INTO t1 VALUES (4,NULL,'r');
+INSERT INTO t1 VALUES (2,9,'t');
+INSERT INTO t1 VALUES (6,3,'j');
+INSERT INTO t1 VALUES (8,8,'u');
+INSERT INTO t1 VALUES (NULL,8,'h');
+INSERT INTO t1 VALUES (5,53,'o');
+INSERT INTO t1 VALUES (NULL,0,NULL);
+INSERT INTO t1 VALUES (6,5,'k');
+INSERT INTO t1 VALUES (188,166,'e');
+INSERT INTO t1 VALUES (2,3,'n');
+INSERT INTO t1 VALUES (1,0,'t');
+INSERT INTO t1 VALUES (1,1,'c');
+INSERT INTO t1 VALUES (0,9,'m');
+INSERT INTO t1 VALUES (9,5,'y');
+INSERT INTO t1 VALUES (NULL,6,'f');
+CREATE TABLE t2 (
+c1 INTEGER NOT NULL
+);
+EXPLAIN SELECT table1.col_int_nokey
+FROM t1 AS table1 STRAIGHT_JOIN (
+t1 AS table2 INNER JOIN t1 AS table3
+ON table3.col_varchar_key = table2.col_varchar_key)
+ON table3.col_int_nokey = table1.col_int_key
+WHERE table3.col_int_key != SOME ( SELECT c1 FROM t2 );
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	table3	ALL	col_varchar_key	NULL	NULL	NULL	19	Using where
+1	PRIMARY	table2	ref	col_varchar_key	col_varchar_key	4	test.table3.col_varchar_key	2	Using index
+1	PRIMARY	table1	ref	col_int_key	col_int_key	5	test.table3.col_int_nokey	2	
+2	DEPENDENT SUBQUERY	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Impossible WHERE noticed after reading const tables
+SELECT table1.col_int_nokey
+FROM t1 AS table1 STRAIGHT_JOIN (
+t1 AS table2 INNER JOIN t1 AS table3
+ON table3.col_varchar_key = table2.col_varchar_key)
+ON table3.col_int_nokey = table1.col_int_key
+WHERE table3.col_int_key != SOME ( SELECT c1 FROM t2 );
+col_int_nokey
+DROP TABLE t1, t2;
+#
+# Bug#58243 "RQG test optimizer_subquery causes server crash
+#            when running with ICP"
+#
+CREATE TABLE t1 (
+pk INTEGER NOT NULL,
+c1 INTEGER NOT NULL,
+c2 INTEGER NOT NULL,
+PRIMARY KEY (pk)
+);
+INSERT INTO t1 VALUES (1,6,7);
+CREATE TABLE t2 (
+c1 INTEGER NOT NULL
+);
+EXPLAIN SELECT t1.c1
+FROM t1
+WHERE t1.pk < 317 AND 2 IN (SELECT COUNT(t2.c1)
+FROM t2)
+ORDER BY t1.c2;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Impossible WHERE noticed after reading const tables
+2	DEPENDENT SUBQUERY	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Select tables optimized away
+SELECT t1.c1
+FROM t1
+WHERE t1.pk < 317 AND 2 IN (SELECT COUNT(t2.c1)
+FROM t2)
+ORDER BY t1.c2;
+c1
+DROP TABLE t1, t2;
+CREATE TABLE t1 (
+i1 INTEGER NOT NULL,
+c1 VARCHAR(1) NOT NULL
+);
+INSERT INTO t1 VALUES (2,'w');
+CREATE TABLE t2 (
+i1 INTEGER NOT NULL,
+c1 VARCHAR(1) NOT NULL,
+c2 VARCHAR(1) NOT NULL,
+KEY (c1, i1)
+);
+INSERT INTO t2 VALUES (8,'d','d');
+INSERT INTO t2 VALUES (4,'v','v');
+CREATE TABLE t3 (
+c1 VARCHAR(1) NOT NULL
+);
+INSERT INTO t3 VALUES ('v');
+EXPLAIN SELECT i1
+FROM t1
+WHERE EXISTS (SELECT t2.c1
+FROM (t2 INNER JOIN t3 ON (t3.c1 = t2.c1)) 
+WHERE t2.c2 != t1.c1 AND t2.c2 = (SELECT MIN(t3.c1)
+FROM t3));
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	t1	system	NULL	NULL	NULL	NULL	1	
+2	DEPENDENT SUBQUERY	t3	system	NULL	NULL	NULL	NULL	1	
+2	DEPENDENT SUBQUERY	t2	ref	c1	c1	3	const	1	Using where
+3	SUBQUERY	t3	system	NULL	NULL	NULL	NULL	1	
+SELECT i1
+FROM t1
+WHERE EXISTS (SELECT t2.c1
+FROM (t2 INNER JOIN t3 ON (t3.c1 = t2.c1)) 
+WHERE t2.c2 != t1.c1 AND t2.c2 = (SELECT MIN(t3.c1)
+FROM t3));
+i1
+2
+DROP TABLE t1,t2,t3;
 set optimizer_switch=default;

=== modified file 'mysql-test/r/mysql.result'
--- a/mysql-test/r/mysql.result	2010-10-20 10:50:50 +0000
+++ b/mysql-test/r/mysql.result	2010-11-26 14:37:59 +0000
@@ -433,6 +433,77 @@ Bug #47147: mysql client option --skip-c
 *************************** 1. row ***************************
 1
 
+#
+# Bug #54899: --one-database option cannot handle DROP/CREATE DATABASE 
+#             commands.
+#
+CREATE DATABASE connected_db;
+USE connected_db;
+SHOW TABLES;
+Tables_in_connected_db
+table_in_connected_db
+DROP DATABASE connected_db;
+
+#
+# Testing --one-database option
+#
+CREATE DATABASE connected_db;
+SHOW TABLES IN connected_db;
+Tables_in_connected_db
+t1
+SHOW TABLES IN test;
+Tables_in_test
+t1
+USE test;
+DROP TABLE t1;
+DROP DATABASE connected_db;
+
+SHOW TABLES IN test;
+Tables_in_test
+SHOW TABLES IN test1;
+Tables_in_test1
+DROP DATABASE test1;
+
+#
+# Checking --one-database option followed by the execution of 
+# connect command.
+#
+CREATE DATABASE connected_db;
+SHOW TABLES IN connected_db;
+Tables_in_connected_db
+t1
+t2
+SHOW TABLES IN test;
+Tables_in_test
+t1
+t2
+DROP TABLE test.t1;
+DROP TABLE test.t2;
+DROP DATABASE connected_db;
+
+#
+# Checking --one-database option with no database specified
+# at command-line.
+#
+SHOW TABLES IN test;
+Tables_in_test
+
+#
+# Checking --one-database option with non_existent_db 
+# specified with USE command
+#
+SHOW TABLES IN test;
+Tables_in_test
+table_in_test
+DROP DATABASE test;
+
+CREATE DATABASE test;
+SHOW TABLES IN test;
+Tables_in_test
+table_in_test
+DROP DATABASE test;
+CREATE DATABASE test;
+
 End of tests
 Connected
 1

=== modified file 'mysql-test/r/mysqld--help-notwin.result'
--- a/mysql-test/r/mysqld--help-notwin.result	2010-11-16 09:38:43 +0000
+++ b/mysql-test/r/mysqld--help-notwin.result	2010-11-26 13:46:21 +0000
@@ -407,8 +407,8 @@ The following options may be given as th
  optimizer_switch=option=val[,option=val...], where option
  is one of {index_merge, index_merge_union,
  index_merge_sort_union, index_merge_intersection,
- engine_condition_pushdown} and val is one of {on, off,
- default}
+ engine_condition_pushdown, index_condition_pushdown} and
+ val is one of {on, off, default}
  --performance-schema 
  Enable the performance schema.
  --performance-schema-events-waits-history-long-size=# 
@@ -853,7 +853,7 @@ old-style-user-limits FALSE
 optimizer-join-cache-level 1
 optimizer-prune-level 1
 optimizer-search-depth 62
-optimizer-switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
+optimizer-switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on
 performance-schema FALSE
 performance-schema-events-waits-history-long-size 10000
 performance-schema-events-waits-history-size 10

=== modified file 'mysql-test/r/mysqld--help-win.result'
--- a/mysql-test/r/mysqld--help-win.result	2010-11-16 09:38:43 +0000
+++ b/mysql-test/r/mysqld--help-win.result	2010-11-26 13:46:21 +0000
@@ -407,8 +407,8 @@ The following options may be given as th
  optimizer_switch=option=val[,option=val...], where option
  is one of {index_merge, index_merge_union,
  index_merge_sort_union, index_merge_intersection,
- engine_condition_pushdown} and val is one of {on, off,
- default}
+ engine_condition_pushdown, index_condition_pushdown} and
+ val is one of {on, off, default}
  --performance-schema 
  Enable the performance schema.
  --performance-schema-events-waits-history-long-size=# 
@@ -857,7 +857,7 @@ old-style-user-limits FALSE
 optimizer-join-cache-level 1
 optimizer-prune-level 1
 optimizer-search-depth 62
-optimizer-switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
+optimizer-switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on
 performance-schema FALSE
 performance-schema-events-waits-history-long-size 10000
 performance-schema-events-waits-history-size 10

=== modified file 'mysql-test/r/null.result'
--- a/mysql-test/r/null.result	2010-11-05 14:19:52 +0000
+++ b/mysql-test/r/null.result	2010-11-17 15:23:17 +0000
@@ -148,10 +148,10 @@ insert into t1 values
 (7,7), (8,8), (9,9), (10,10), (11,11), (12,12);
 explain select * from t1 where a between 2 and 3;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	range	idx	idx	4	NULL	2	Using where
+1	SIMPLE	t1	range	idx	idx	4	NULL	2	Using index condition
 explain select * from t1 where a between 2 and 3 or b is null;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	range	idx	idx	4	NULL	2	Using where
+1	SIMPLE	t1	range	idx	idx	4	NULL	2	Using index condition
 drop table t1;
 select cast(NULL as signed);
 cast(NULL as signed)

=== modified file 'mysql-test/r/optimizer_switch.result'
--- a/mysql-test/r/optimizer_switch.result	2010-10-15 10:32:50 +0000
+++ b/mysql-test/r/optimizer_switch.result	2010-11-08 14:51:09 +0000
@@ -3,47 +3,47 @@ BUG#37120 optimizer_switch allowable val
 
 select @@optimizer_switch;
 @@optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,materialization=on,semijoin=on,loosescan=on,firstmatch=on,mrr=on,mrr_cost_based=off,index_condition_pushdown=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,materialization=on,semijoin=on,loosescan=on,firstmatch=on,mrr=on,mrr_cost_based=off
 set optimizer_switch='default';
 set optimizer_switch='materialization=off';
 select @@optimizer_switch;
 @@optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,materialization=off,semijoin=on,loosescan=on,firstmatch=on,mrr=on,mrr_cost_based=off,index_condition_pushdown=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,materialization=off,semijoin=on,loosescan=on,firstmatch=on,mrr=on,mrr_cost_based=off
 set optimizer_switch='default';
 set optimizer_switch='semijoin=off';
 select @@optimizer_switch;
 @@optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,materialization=on,semijoin=off,loosescan=on,firstmatch=on,mrr=on,mrr_cost_based=off,index_condition_pushdown=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,materialization=on,semijoin=off,loosescan=on,firstmatch=on,mrr=on,mrr_cost_based=off
 set optimizer_switch='default';
 set optimizer_switch='loosescan=off';
 select @@optimizer_switch;
 @@optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,materialization=on,semijoin=on,loosescan=off,firstmatch=on,mrr=on,mrr_cost_based=off,index_condition_pushdown=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,materialization=on,semijoin=on,loosescan=off,firstmatch=on,mrr=on,mrr_cost_based=off
 set optimizer_switch='default';
 set optimizer_switch='semijoin=off,materialization=off';
 select @@optimizer_switch;
 @@optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,materialization=off,semijoin=off,loosescan=on,firstmatch=on,mrr=on,mrr_cost_based=off,index_condition_pushdown=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,materialization=off,semijoin=off,loosescan=on,firstmatch=on,mrr=on,mrr_cost_based=off
 set optimizer_switch='default';
 set optimizer_switch='materialization=off,semijoin=off';
 select @@optimizer_switch;
 @@optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,materialization=off,semijoin=off,loosescan=on,firstmatch=on,mrr=on,mrr_cost_based=off,index_condition_pushdown=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,materialization=off,semijoin=off,loosescan=on,firstmatch=on,mrr=on,mrr_cost_based=off
 set optimizer_switch='default';
 set optimizer_switch='semijoin=off,materialization=off,loosescan=off';
 select @@optimizer_switch;
 @@optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,materialization=off,semijoin=off,loosescan=off,firstmatch=on,mrr=on,mrr_cost_based=off,index_condition_pushdown=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,materialization=off,semijoin=off,loosescan=off,firstmatch=on,mrr=on,mrr_cost_based=off
 set optimizer_switch='default';
 set optimizer_switch='semijoin=off,loosescan=off';
 select @@optimizer_switch;
 @@optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,materialization=on,semijoin=off,loosescan=off,firstmatch=on,mrr=on,mrr_cost_based=off,index_condition_pushdown=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,materialization=on,semijoin=off,loosescan=off,firstmatch=on,mrr=on,mrr_cost_based=off
 set optimizer_switch='default';
 set optimizer_switch='materialization=off,loosescan=off';
 select @@optimizer_switch;
 @@optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,materialization=off,semijoin=on,loosescan=off,firstmatch=on,mrr=on,mrr_cost_based=off,index_condition_pushdown=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,materialization=off,semijoin=on,loosescan=off,firstmatch=on,mrr=on,mrr_cost_based=off
 set optimizer_switch='default';
 create table t1 (a1 char(8), a2 char(8));
 create table t2 (b1 char(8), b2 char(8));

=== modified file 'mysql-test/r/ps_1general.result'
--- a/mysql-test/r/ps_1general.result	2010-11-05 14:19:52 +0000
+++ b/mysql-test/r/ps_1general.result	2010-11-17 15:23:17 +0000
@@ -467,9 +467,9 @@ def					key	253	64	7	Y	0	31	8
 def					key_len	253	4096	1	Y	0	31	8
 def					ref	253	1024	0	Y	0	31	8
 def					rows	8	10	1	Y	32928	0	63
-def					Extra	253	255	27	N	1	31	8
+def					Extra	253	255	37	N	1	31	8
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	range	PRIMARY	PRIMARY	4	NULL	3	Using where; Using filesort
+1	SIMPLE	t1	range	PRIMARY	PRIMARY	4	NULL	3	Using index condition; Using filesort
 drop table if exists t2;
 create table t2 (id smallint, name varchar(20)) ;
 prepare stmt1 from ' insert into t2 values(?, ?) ' ;

=== modified file 'mysql-test/r/subquery_all.result'
--- a/mysql-test/r/subquery_all.result	2010-11-11 09:40:06 +0000
+++ b/mysql-test/r/subquery_all.result	2010-11-24 22:20:27 +0000
@@ -1232,7 +1232,7 @@ create table t1 (id int not null auto_in
 insert into t1 (salary) values (100),(1000),(10000),(10),(500),(5000),(50000);
 explain extended SELECT id FROM t1 where salary = (SELECT MAX(salary) FROM t1);
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
-1	PRIMARY	t1	ref	salary	salary	5	const	1	100.00	Using index condition
+1	PRIMARY	t1	ref	salary	salary	5	const	1	100.00	Using where
 2	SUBQUERY	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Select tables optimized away
 Warnings:
 Note	1003	select `test`.`t1`.`id` AS `id` from `test`.`t1` where (`test`.`t1`.`salary` = (select max(`test`.`t1`.`salary`) from `test`.`t1`))
@@ -6134,6 +6134,18 @@ id	select_type	table	type	possible_keys	
 2	DEPENDENT SUBQUERY	t2	index_subquery	k	k	5	const	2	Using index
 DROP TABLE t2;
 DROP TABLE t1;
+#
+# Bug #57704: Cleanup code dies with void TABLE::set_keyread(bool): 
+#             Assertion `file' failed.
+#
+CREATE TABLE t1 (a INT);
+SELECT 1 FROM 
+(SELECT ROW(
+(SELECT 1 FROM t1 RIGHT JOIN 
+(SELECT 1 FROM t1, t1 t2) AS d ON 1),
+1) FROM t1) AS e;
+ERROR 21000: Operand should contain 1 column(s)
+DROP TABLE t1;
 End of 5.5 tests.
 #
 # BUG#48920: COUNT DISTINCT returns 1 for NULL values when in a subquery 

=== modified file 'mysql-test/r/subquery_all_jcl6.result'
--- a/mysql-test/r/subquery_all_jcl6.result	2010-09-30 15:08:22 +0000
+++ b/mysql-test/r/subquery_all_jcl6.result	2010-11-24 22:20:27 +0000
@@ -1236,7 +1236,7 @@ create table t1 (id int not null auto_in
 insert into t1 (salary) values (100),(1000),(10000),(10),(500),(5000),(50000);
 explain extended SELECT id FROM t1 where salary = (SELECT MAX(salary) FROM t1);
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
-1	PRIMARY	t1	ref	salary	salary	5	const	1	100.00	Using index condition
+1	PRIMARY	t1	ref	salary	salary	5	const	1	100.00	Using where
 2	SUBQUERY	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Select tables optimized away
 Warnings:
 Note	1003	select `test`.`t1`.`id` AS `id` from `test`.`t1` where (`test`.`t1`.`salary` = (select max(`test`.`t1`.`salary`) from `test`.`t1`))
@@ -6138,6 +6138,18 @@ id	select_type	table	type	possible_keys	
 2	DEPENDENT SUBQUERY	t2	index_subquery	k	k	5	const	2	Using index
 DROP TABLE t2;
 DROP TABLE t1;
+#
+# Bug #57704: Cleanup code dies with void TABLE::set_keyread(bool): 
+#             Assertion `file' failed.
+#
+CREATE TABLE t1 (a INT);
+SELECT 1 FROM 
+(SELECT ROW(
+(SELECT 1 FROM t1 RIGHT JOIN 
+(SELECT 1 FROM t1, t1 t2) AS d ON 1),
+1) FROM t1) AS e;
+ERROR 21000: Operand should contain 1 column(s)
+DROP TABLE t1;
 End of 5.5 tests.
 #
 # BUG#48920: COUNT DISTINCT returns 1 for NULL values when in a subquery 

=== modified file 'mysql-test/r/subquery_nomat_nosj.result'
--- a/mysql-test/r/subquery_nomat_nosj.result	2010-09-30 15:08:22 +0000
+++ b/mysql-test/r/subquery_nomat_nosj.result	2010-11-24 22:20:27 +0000
@@ -1232,7 +1232,7 @@ create table t1 (id int not null auto_in
 insert into t1 (salary) values (100),(1000),(10000),(10),(500),(5000),(50000);
 explain extended SELECT id FROM t1 where salary = (SELECT MAX(salary) FROM t1);
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
-1	PRIMARY	t1	ref	salary	salary	5	const	1	100.00	Using index condition
+1	PRIMARY	t1	ref	salary	salary	5	const	1	100.00	Using where
 2	SUBQUERY	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Select tables optimized away
 Warnings:
 Note	1003	select `test`.`t1`.`id` AS `id` from `test`.`t1` where (`test`.`t1`.`salary` = (select max(`test`.`t1`.`salary`) from `test`.`t1`))
@@ -6134,6 +6134,18 @@ id	select_type	table	type	possible_keys	
 2	DEPENDENT SUBQUERY	t2	index_subquery	k	k	5	const	2	Using index
 DROP TABLE t2;
 DROP TABLE t1;
+#
+# Bug #57704: Cleanup code dies with void TABLE::set_keyread(bool): 
+#             Assertion `file' failed.
+#
+CREATE TABLE t1 (a INT);
+SELECT 1 FROM 
+(SELECT ROW(
+(SELECT 1 FROM t1 RIGHT JOIN 
+(SELECT 1 FROM t1, t1 t2) AS d ON 1),
+1) FROM t1) AS e;
+ERROR 21000: Operand should contain 1 column(s)
+DROP TABLE t1;
 End of 5.5 tests.
 #
 # BUG#48920: COUNT DISTINCT returns 1 for NULL values when in a subquery 

=== modified file 'mysql-test/r/subquery_nomat_nosj_jcl6.result'
--- a/mysql-test/r/subquery_nomat_nosj_jcl6.result	2010-09-30 15:08:22 +0000
+++ b/mysql-test/r/subquery_nomat_nosj_jcl6.result	2010-11-24 22:20:27 +0000
@@ -1236,7 +1236,7 @@ create table t1 (id int not null auto_in
 insert into t1 (salary) values (100),(1000),(10000),(10),(500),(5000),(50000);
 explain extended SELECT id FROM t1 where salary = (SELECT MAX(salary) FROM t1);
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
-1	PRIMARY	t1	ref	salary	salary	5	const	1	100.00	Using index condition
+1	PRIMARY	t1	ref	salary	salary	5	const	1	100.00	Using where
 2	SUBQUERY	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Select tables optimized away
 Warnings:
 Note	1003	select `test`.`t1`.`id` AS `id` from `test`.`t1` where (`test`.`t1`.`salary` = (select max(`test`.`t1`.`salary`) from `test`.`t1`))
@@ -6138,6 +6138,18 @@ id	select_type	table	type	possible_keys	
 2	DEPENDENT SUBQUERY	t2	index_subquery	k	k	5	const	2	Using index
 DROP TABLE t2;
 DROP TABLE t1;
+#
+# Bug #57704: Cleanup code dies with void TABLE::set_keyread(bool): 
+#             Assertion `file' failed.
+#
+CREATE TABLE t1 (a INT);
+SELECT 1 FROM 
+(SELECT ROW(
+(SELECT 1 FROM t1 RIGHT JOIN 
+(SELECT 1 FROM t1, t1 t2) AS d ON 1),
+1) FROM t1) AS e;
+ERROR 21000: Operand should contain 1 column(s)
+DROP TABLE t1;
 End of 5.5 tests.
 #
 # BUG#48920: COUNT DISTINCT returns 1 for NULL values when in a subquery 

=== modified file 'mysql-test/r/subquery_none_jcl6.result'
--- a/mysql-test/r/subquery_none_jcl6.result	2010-09-30 15:08:22 +0000
+++ b/mysql-test/r/subquery_none_jcl6.result	2010-11-16 16:02:57 +0000
@@ -6137,6 +6137,18 @@ id	select_type	table	type	possible_keys	
 2	DEPENDENT SUBQUERY	t2	index_subquery	k	k	5	const	2	Using index
 DROP TABLE t2;
 DROP TABLE t1;
+#
+# Bug #57704: Cleanup code dies with void TABLE::set_keyread(bool): 
+#             Assertion `file' failed.
+#
+CREATE TABLE t1 (a INT);
+SELECT 1 FROM 
+(SELECT ROW(
+(SELECT 1 FROM t1 RIGHT JOIN 
+(SELECT 1 FROM t1, t1 t2) AS d ON 1),
+1) FROM t1) AS e;
+ERROR 21000: Operand should contain 1 column(s)
+DROP TABLE t1;
 End of 5.5 tests.
 #
 # BUG#48920: COUNT DISTINCT returns 1 for NULL values when in a subquery 

=== modified file 'mysql-test/suite/innodb/r/innodb.result'
--- a/mysql-test/suite/innodb/r/innodb.result	2010-11-05 16:23:32 +0000
+++ b/mysql-test/suite/innodb/r/innodb.result	2010-11-17 15:23:17 +0000
@@ -781,7 +781,7 @@ create table t1 (a int  primary key,b in
 insert into t1 values (1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1);
 explain select * from t1 where a > 0 and a < 50;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	range	PRIMARY	PRIMARY	4	NULL	#	Using where
+1	SIMPLE	t1	range	PRIMARY	PRIMARY	4	NULL	#	Using index condition
 drop table t1;
 create table t1 (id int NOT NULL,id2 int NOT NULL,id3 int NOT NULL,dummy1 char(30),primary key (id,id2),index index_id3 (id3)) engine=innodb;
 insert into t1 values (0,0,0,'ABCDEFGHIJ'),(2,2,2,'BCDEFGHIJK'),(1,1,1,'CDEFGHIJKL');
@@ -1222,7 +1222,7 @@ count(*)
 623
 explain select * from t1 where c between 1 and 2500;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	range	c	c	5	NULL	#	Using where
+1	SIMPLE	t1	range	c	c	5	NULL	#	Using index condition
 update t1 set c=a;
 explain select * from t1 where c between 1 and 2500;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
@@ -1910,7 +1910,7 @@ qq
 *a         *a*a         *
 explain select * from t1 where v='a';
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	ref	v,v_2	#	13	const	#	Using where
+1	SIMPLE	t1	ref	v,v_2	#	13	const	#	Using index condition
 select v,count(*) from t1 group by v limit 10;
 v	count(*)
 a	1
@@ -2086,7 +2086,7 @@ id	select_type	table	type	possible_keys	
 1	SIMPLE	t1	ref	v	v	303	const	#	Using where; Using index
 explain select * from t1 where v='a';
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	ref	v	v	303	const	#	Using where
+1	SIMPLE	t1	ref	v	v	303	const	#	Using index condition
 select v,count(*) from t1 group by v limit 10;
 v	count(*)
 a	1

=== modified file 'mysql-test/suite/innodb/r/innodb_lock_wait_timeout_1.result'
--- a/mysql-test/suite/innodb/r/innodb_lock_wait_timeout_1.result	2010-11-05 16:23:32 +0000
+++ b/mysql-test/suite/innodb/r/innodb_lock_wait_timeout_1.result	2010-11-17 15:23:17 +0000
@@ -119,7 +119,7 @@ key	PRIMARY
 key_len	4
 ref	t2.a
 rows	1
-Extra	Using where
+Extra	Using index condition; Using where
 id	2
 select_type	DERIVED
 table	NULL
@@ -323,7 +323,7 @@ key	PRIMARY
 key_len	4
 ref	t2.a
 rows	1
-Extra	Using where
+Extra	Using index condition; Using where
 id	2
 select_type	DERIVED
 table	NULL

=== modified file 'mysql-test/suite/innodb/r/innodb_mysql.result'
--- a/mysql-test/suite/innodb/r/innodb_mysql.result	2010-11-23 11:04:47 +0000
+++ b/mysql-test/suite/innodb/r/innodb_mysql.result	2010-11-26 13:46:21 +0000
@@ -1375,7 +1375,7 @@ INSERT INTO t1 (a,b,c) VALUES (1,1,1), (
 INSERT INTO t1 (a,b,c) SELECT a+4,b,c FROM t1;
 EXPLAIN SELECT a, b, c FROM t1 WHERE b = 1 ORDER BY a DESC LIMIT 5;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	range	t1_b	t1_b	5	NULL	8	Using where
+1	SIMPLE	t1	range	t1_b	t1_b	5	NULL	8	Using index condition
 SELECT a, b, c FROM t1 WHERE b = 1 ORDER BY a DESC LIMIT 5;
 a	b	c
 8	1	1
@@ -1787,7 +1787,7 @@ insert into t2 select A.a + 10 *B.a, 1, 
 explain select * from t1, t2 where t2.a=t1.a and t2.b + 1;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	5	
-1	SIMPLE	t2	ref	a	a	4	test.t1.a	1	Using where
+1	SIMPLE	t2	ref	a	a	4	test.t1.a	1	Using index condition
 select * from t1, t2 where t2.a=t1.a and t2.b + 1;
 a	a	b	filler
 0	0	1	filler

=== removed directory 'mysql-test/suite/optimizer_unfixed_bugs'
=== removed file 'mysql-test/suite/optimizer_unfixed_bugs/README.txt'
--- a/mysql-test/suite/optimizer_unfixed_bugs/README.txt	2010-05-19 13:01:22 +0000
+++ b/mysql-test/suite/optimizer_unfixed_bugs/README.txt	1970-01-01 00:00:00 +0000
@@ -1,29 +0,0 @@
-Putting testcases here
-~~~~~~~~~~~~~~~~~~~~~~
-
-When you work on re-verifying or re-classifying a bug (not fixing it),
-it's a good idea to put the mtr-parsable '.test' testcase here.
-Benefits:
-1) tests downloaded from the bugs db are sometimes close to
-mtr-parsable but not completely (for example if they contain
-/* comment */); when you re-verify or re-classify you run the test so
-may have to make it mtr-parsable; if you then put it in this suite,
-the developer who will work on this bug in a few weeks or months will
-not have to re-do the same download&fix, she/he can instead reuse your
-work.
-2) Others can see how their own work influences many unsolved
-bugs, by running this suite. If they find that they fix a bug in this
-suite, we won't later wonder "how come this bug doesn't happen
-anymore, what fixed it?".
-3) One can also run this suite with certain switches to see how they
-influence unsolved bugs:
-./mtr --suite=optimizer_unfixed_bugs \
---mysqld=--optimizer_switch="firstmatch=off"
-
-Adding tests to this suite
-~~~~~~~~~~~~~~~~~~~~~~~~~~
-One test file per bug, named bugNNNNN.test.
-Put the correct (not current and buggy) result file in r/, so that "[ pass ]"
-in mtr will mean that a bug looks like fixed.
-When you have fixed a bug, remove files from this suite.
-t/bug45219.test is an example.

=== removed directory 'mysql-test/suite/optimizer_unfixed_bugs/r'
=== removed file 'mysql-test/suite/optimizer_unfixed_bugs/r/bug42991.result'
--- a/mysql-test/suite/optimizer_unfixed_bugs/r/bug42991.result	2010-05-19 13:01:22 +0000
+++ b/mysql-test/suite/optimizer_unfixed_bugs/r/bug42991.result	1970-01-01 00:00:00 +0000
@@ -1,253 +0,0 @@
-set session debug="+d,optimizer_innodb_icp";
-/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
-/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
-/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
-/*!40101 SET NAMES utf8 */;
-/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
-/*!40103 SET TIME_ZONE='+00:00' */;
-/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
-/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
-/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
-/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
-DROP TABLE IF EXISTS `table5`;
-SET @saved_cs_client     = @@character_set_client;
-SET character_set_client = utf8;
-CREATE TABLE `table5` (
-`col0` mediumtext,
-`col1` varchar(90) DEFAULT NULL,
-`col2` tinytext,
-`col3` time DEFAULT NULL,
-`col4` tinyint(1) DEFAULT NULL,
-`col5` tinytext,
-`col6` tinyint(1) DEFAULT NULL,
-`col7` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
-`col8` tinyblob,
-`col9` tinyint(4) DEFAULT NULL,
-`col10` year(4) DEFAULT NULL,
-`col11` set('test1','test2','test3') DEFAULT NULL,
-`col12` text,
-`col13` char(248) DEFAULT NULL,
-`col14` bigint(20) DEFAULT NULL,
-`col15` text,
-`col16` tinyint(4) DEFAULT NULL,
-`col17` decimal(10,0) DEFAULT NULL,
-`col18` set('test1','test2','test3') DEFAULT NULL,
-`col19` varchar(255) DEFAULT NULL,
-`col20` float DEFAULT NULL,
-`col21` int(11) DEFAULT NULL,
-`col22` text,
-`col23` tinyint(1) DEFAULT NULL,
-`col24` decimal(10,0) NOT NULL DEFAULT '0',
-`col25` double DEFAULT NULL,
-`col26` float DEFAULT NULL,
-`col27` tinyblob,
-`col28` decimal(10,0) DEFAULT NULL,
-`col29` mediumblob,
-`col30` date DEFAULT NULL,
-`col31` longtext,
-`col32` date DEFAULT NULL,
-`col33` float DEFAULT NULL,
-`col34` bigint(20) DEFAULT NULL,
-`col35` tinytext,
-`col36` mediumtext,
-`col37` time DEFAULT NULL,
-`col38` int(11) DEFAULT NULL,
-`col39` tinyint(4) DEFAULT NULL,
-`col40` set('test1','test2','test3') DEFAULT NULL,
-`col41` char(130) DEFAULT NULL,
-`col42` smallint(6) DEFAULT NULL,
-`col43` int(11) DEFAULT NULL,
-`col44` mediumtext,
-`col45` varchar(126) DEFAULT NULL,
-`col46` int(11) DEFAULT NULL,
-`col47` double DEFAULT NULL,
-`col48` bigint(20) DEFAULT NULL,
-`col49` mediumtext,
-`col50` tinyblob,
-`col51` mediumint(9) DEFAULT NULL,
-`col52` text,
-`col53` varchar(208) DEFAULT NULL,
-`col54` varchar(207) DEFAULT NULL,
-`col55` decimal(10,0) DEFAULT NULL,
-`col56` datetime DEFAULT NULL,
-`col57` enum('test1','test2','test3') DEFAULT NULL,
-`col58` decimal(10,0) DEFAULT NULL,
-`col59` tinyblob,
-`col60` varchar(73) DEFAULT NULL,
-`col61` mediumtext,
-`col62` tinyblob,
-`col63` datetime DEFAULT NULL,
-`col64` decimal(10,0) DEFAULT NULL,
-`col65` mediumint(9) DEFAULT NULL,
-`col66` datetime DEFAULT NULL,
-`col67` decimal(10,0) DEFAULT NULL,
-`col68` tinyint(4) DEFAULT NULL,
-`col69` varchar(58) DEFAULT NULL,
-`col70` decimal(10,0) DEFAULT NULL,
-`col71` mediumtext,
-`col72` date DEFAULT NULL,
-`col73` time DEFAULT NULL,
-`col74` double DEFAULT NULL,
-`col75` decimal(10,0) DEFAULT NULL,
-`col76` mediumblob,
-`col77` double DEFAULT NULL,
-`col78` year(4) DEFAULT NULL,
-`col79` year(4) DEFAULT NULL,
-`col80` varchar(255) DEFAULT NULL,
-`col81` blob,
-`col82` bigint(20) DEFAULT NULL,
-`col83` enum('test1','test2','test3') DEFAULT NULL,
-`col84` decimal(10,0) DEFAULT NULL,
-`col85` set('test1','test2','test3') DEFAULT NULL,
-`col86` mediumtext,
-`col87` varchar(255) DEFAULT NULL,
-`col88` time DEFAULT NULL,
-`col89` enum('test1','test2','test3') DEFAULT NULL,
-`col90` decimal(10,0) DEFAULT NULL,
-`col91` float DEFAULT NULL,
-`col92` datetime DEFAULT NULL,
-`col93` tinytext,
-`col94` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
-`col95` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
-`col96` text,
-`col97` double DEFAULT NULL,
-`col98` varchar(198) DEFAULT NULL,
-`col99` time DEFAULT NULL,
-`col100` tinyint(4) DEFAULT NULL,
-`col101` bigint(20) DEFAULT NULL,
-`col102` varchar(255) DEFAULT NULL,
-`col103` varchar(255) DEFAULT NULL,
-`col104` mediumint(9) DEFAULT NULL,
-`col105` mediumtext,
-`col106` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
-`col107` smallint(6) DEFAULT NULL,
-`col108` decimal(10,0) DEFAULT NULL,
-`col109` decimal(10,0) DEFAULT NULL,
-`col110` float DEFAULT NULL,
-`col111` decimal(10,0) DEFAULT NULL,
-`col112` double DEFAULT NULL,
-`col113` tinytext,
-`col114` float DEFAULT NULL,
-`col115` varchar(7) DEFAULT NULL,
-`col116` longtext,
-`col117` date DEFAULT NULL,
-`col118` bigint(20) DEFAULT NULL,
-`col119` text,
-`col120` bigint(20) DEFAULT NULL,
-`col121` blob,
-`col122` char(110) DEFAULT NULL,
-`col123` decimal(10,0) DEFAULT NULL,
-`col124` mediumblob,
-`col125` decimal(10,0) DEFAULT NULL,
-`col126` decimal(10,0) DEFAULT NULL,
-`col127` tinyint(1) DEFAULT NULL,
-`col128` time DEFAULT NULL,
-`col129` tinyblob,
-`col130` tinyblob,
-`col131` date DEFAULT NULL,
-`col132` int(11) DEFAULT NULL,
-`col133` varchar(123) DEFAULT NULL,
-`col134` char(238) DEFAULT NULL,
-`col135` varchar(225) DEFAULT NULL,
-`col136` longtext,
-`col137` varchar(255) DEFAULT NULL,
-`col138` double DEFAULT NULL,
-`col139` tinyblob,
-`col140` datetime DEFAULT NULL,
-`col141` tinytext,
-`col142` varchar(255) DEFAULT NULL,
-`col143` bigint(20) DEFAULT NULL,
-`col144` varchar(236) DEFAULT NULL,
-`col145` text,
-`col146` year(4) DEFAULT NULL,
-`col147` decimal(10,0) DEFAULT NULL,
-`col148` text,
-`col149` mediumblob,
-`col150` tinyint(4) DEFAULT NULL,
-`col151` tinyint(1) DEFAULT NULL,
-`col152` varchar(72) DEFAULT NULL,
-`col153` int(11) DEFAULT NULL,
-`col154` varchar(165) DEFAULT NULL,
-`col155` tinyint(4) DEFAULT NULL,
-`col156` mediumtext,
-`col157` double DEFAULT NULL,
-`col158` time DEFAULT NULL,
-`col159` mediumblob,
-`col160` varchar(255) DEFAULT NULL,
-`col161` datetime DEFAULT NULL,
-`col162` double DEFAULT NULL,
-`col163` blob,
-`col164` enum('test1','test2','test3') DEFAULT NULL,
-`col165` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
-`col166` date DEFAULT NULL,
-`col167` tinyblob,
-`col168` tinyblob,
-`col169` varchar(255) DEFAULT NULL,
-`col170` datetime DEFAULT NULL,
-`col171` bigint(20) DEFAULT NULL,
-`col172` varchar(30) DEFAULT NULL,
-`col173` longtext,
-`col174` time DEFAULT NULL,
-`col175` float DEFAULT NULL,
-PRIMARY KEY (`col24`),
-KEY `idx0` (`col16`,`col156`(139),`col97`,`col120`),
-KEY `idx1` (`col24`,`col0`(108)),
-KEY `idx2` (`col117`,`col173`(34),`col132`,`col82`),
-KEY `idx3` (`col2`(86)),
-KEY `idx4` (`col2`(43)),
-KEY `idx5` (`col83`,`col35`(87),`col111`),
-KEY `idx6` (`col6`,`col134`,`col92`),
-KEY `idx7` (`col56`),
-KEY `idx8` (`col30`,`col53`,`col129`(66)),
-KEY `idx9` (`col53`,`col113`(211),`col32`,`col15`(75)),
-KEY `idx10` (`col34`),
-KEY `idx11` (`col126`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-SET character_set_client = @saved_cs_client;
-LOCK TABLES `table5` WRITE;
-/*!40000 ALTER TABLE `table5` DISABLE KEYS */;
-INSERT INTO `table5` VALUES ('referenda','hermaphroditism','superable','00:00:00',-128,NULL,-128,'0000-00-00 00:00:00',NULL,-128,1901,NULL,'blandly',NULL,6541,'unsuspectingly',NULL,'7250','',NULL,-31358,26248,'Kilmarnock\'s',127,'-27305',28987,NULL,NULL,'-30388','utilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitarians','0000-00-00','Agincourt','0000-00-00',-28063,27242,'readies',NULL,'00:00:00',NULL,-128,'',NULL,NULL,18719,NULL,NULL,14038,17275,NULL,'gait\'s','honeymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'sho',8860,NULL,'demigod','outpulling',NULL,'1904-01-17 09:51:06','test1','-18008','grotesqueness\'sgrotesqueness\'sgrotesqueness\'sgrotesqueness\'sgrotesqueness\'sgrotesqueness\'sgrotesqueness\'s','Oakleil\'s','Shostakovich','indiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscre','2076-10-05 02:05:43','29914',-18885,'2088-05-25 13:36:33','25',-128,'Bob','-14559','ammeter','0000-00-00','00:00:00',-29756,NULL,'digressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigression',-23894,1963,1915,'SadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadye',NULL,NULL,'','17512','','anaphylaxis\'s','chiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schise','50:11:25','test1','-13685',-18328,'2020-01-19 22:04:54',NULL,'1988-05-10 10:30:56','0000-00-00 00:00:00','Birdie\'s',-27746,NULL,'179:19:25',-128,24141,'radiotransparentradiotransparentradiotransparentradiotransparentradiotransparentradiotransparentradiotransparentradiotransparentradiotransparentradiotransparentradiotransparentradiotransparentradiotransparentradiotransparentradiotransparentradiotransparen','ingroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'sing',18950,'Beaulieu','0000-00-00 00:00:00',-23421,'-2865',NULL,NULL,NULL,NULL,'vandalizes',-24683,'interop','Apis\'s','0000-00-00',19745,'Volgograd\'s',-15194,NULL,'Binni','4540','phylumphylumphylumphylum','-25781',NULL,-128,'406:37:03','posthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthastepos','manneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristman','0000-00-00',19774,'shariah',NULL,'aquarelle','homographic',NULL,-18959,'thoroughfarethoroughfarethoroughfarethoroughfarethoroughfarethoroughfare','2000-09-05 03:33:50','Baptlsta','Witt\'sWitt\'sWitt\'sWitt\'sWitt\'sWitt\'sWitt\'sWitt\'s',4727,NULL,'posting',2119,'32416',NULL,'charredcharredcharredcharredcharredcharredcharredcharredcharredcharred',-128,NULL,'Rollin\'s',NULL,NULL,127,'waviness\'s',11164,'424:28:18','FaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucher','stalactite\'sstalactite\'sstalactite\'sstalactite\'sstalactite\'sstalactite\'sstalactite\'sstalactite\'sstalactite\'sstalactite\'sstalactite\'s','1901-01-29 13:48:34',-31988,'Dyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'s','','2022-01-01 21:14:30','0000-00-00','conventionalistconventionalistconventionalistconventionalistconventionalistconventionalistconventionalistconventionalist','mirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnesses','tessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stes','2028-05-21 04:56:16',NULL,'Hasid','Hardecanute','00:00:00',-3782);
-Warnings:
-Warning	1265	Data truncated for column 'col83' at row 1
-Warning	1265	Data truncated for column 'col164' at row 1
-INSERT INTO `table5` VALUES ('hemoglobin\'s','Toffey\'s','Juvenal','00:00:00',-128,'harmonicon',-128,'2004-02-13 09:45:46',NULL,NULL,1911,'','Tananarive\'s',NULL,30666,'spiniferous',127,'30675','','Frederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFr',30388,4769,'Erymanthus\'s',127,'-20972',NULL,-17111,'explosivenessexplosivenessexplosivenessexplosivenessexplosivenessexplosivenessexplosivenessexplosivenessexplosivenessexplosivenessexplosivenessexplosivenessexplosiveness','-28154','magnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'s','0000-00-00','removes','0000-00-00',16859,NULL,NULL,'Moishe\'s','00:00:00',NULL,NULL,NULL,'hyperform\'s',30540,-26603,'soporific',NULL,NULL,19264,-14618,NULL,'zootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszo',5654,'intermezzi','Atkins\'s','hieroglyphically','15885','2068-10-19 12:22:30','','4972','apatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapa','severeness','pleaders',NULL,'2070-09-15 17:21:46','15245',-18313,'1934-01-01 01:20:15','-3488',127,'Delawarian','14952','foregathers','0000-00-00','00:00:00',-27837,'7143','madhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'s',-17163,1951,2054,'raffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraf','REMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMs',3607,'','-17633','',NULL,NULL,'806:59:31','test1','-29600',20301,'1985-10-09 17:57:25',NULL,'0000-00-00 00:00:00','0000-00-00 00:00:00','Perseid',-32117,'constructer\'s','612:19:03',127,NULL,'overdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingove','Carlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCa',24868,'preamble','0000-00-00 00:00:00',-7582,'-865','-14488',6884,'-24713',NULL,'topknot\'s',18469,NULL,'histrionism\'s','0000-00-00',31715,'Dag',14543,'wooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'s','tightest',NULL,'aquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'s','15603',NULL,-128,'640:34:17','acetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumaceta','torridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridl','9323-05-13',-28292,'Barnaul\'s',NULL,'slanginesses','supernova',NULL,20804,NULL,'2020-10-05 12:00:38','rive',NULL,-31498,'considerateness\'s','nevus\'s',1901,'-12956','fashioner\'s','unfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'s',-128,127,'nephralgia\'s',13881,'sciatically',NULL,'Tuesday',21227,'00:00:00','halocarbons','duvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduv','2075-01-21 10:49:44',-19735,'snubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubs','test1','0000-00-00 00:00:00','0000-00-00','kiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkib',NULL,'connoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseurscon','1953-01-23 17:36:00',NULL,'Principal',NULL,'316:28:48',NULL);
-Warnings:
-Warning	1265	Data truncated for column 'col57' at row 1
-Warning	1265	Data truncated for column 'col83' at row 1
-INSERT INTO `table5` VALUES (NULL,'Annmarie','intangibleness\'s','00:00:00',-128,'transmogrify',127,'0000-00-00 00:00:00',NULL,127,2093,'','enamored','refired',-21296,'neglectful',127,'-9992','',NULL,NULL,3583,'Lockheed\'s',127,'-15717',-29743,-16280,'embouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembou','-24875',NULL,'0000-00-00',NULL,'0000-00-00',30124,20356,'drinkable','obscenity','00:00:00',NULL,127,'',NULL,-16664,NULL,'unmoor','Vaughan\'s',30457,-16509,-10049,'squeamishness','encirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencir',-16460,'abatement\'s',NULL,'expatriate','-28670','1925-05-15 11:44:20','','-3762','DelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDel','Skerl\'s','unmatched',NULL,'1980-01-11 16:02:04','25917',18187,'2001-07-26 13:48:08','-28706',127,'gimme','8807',NULL,'0000-00-00','00:00:00',7666,'21762','drawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacks',16131,2031,2077,'subjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysub','Argenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'s',NULL,'','-17090','','fobs','humiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliat','221:02:40','','-1107',4624,'1926-05-11 03:35:52',NULL,'2037-05-13 05:02:44','0000-00-00 00:00:00','Heddie\'s',-6554,NULL,'00:00:00',127,NULL,'lxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlx','RawleyRawleyRawleyRawleyRawleyRawleyRawleyRawleyRawleyRawleyRawleyRawleyRawleyRawleyRawleyRawleyRawley',6613,'Beaufort','0000-00-00 00:00:00',12214,NULL,'25469',-26474,'12062',NULL,'physiographer',26382,'cosmogo','deportment\'s','0000-00-00',17492,'propretor\'s',NULL,'zingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzing','Suzetta','25513','tearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkers','21613',NULL,-128,'108:58:18','sporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallyspo','Monera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'','0000-00-00',18776,'diffractometer',NULL,'crawls','Inglebert','unguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableun',18112,'melanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanis','1940-05-18 13:21:00','artlessly','blotsblotsblotsblotsblotsblotsblotsblotsblotsblotsblotsblotsblotsblotsblotsblotsblots',6476,NULL,'Bartlett',2143,NULL,'thaumaturge\'s','Hazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'s',127,127,'Winthorpe',-29765,'idiocrasy\'s',NULL,'sandcastles',-9852,'281:41:52','Volny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'s','protagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagon','2076-01-04 15:01:57',NULL,'auscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultations','','0000-00-00 00:00:00','0000-00-00','limenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimen','accommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatingly',NULL,'2018-01-01 05:48:54',17404,NULL,NULL,'195:36:50',24658);
-Warnings:
-Warning	1265	Data truncated for column 'col57' at row 1
-Warning	1265	Data truncated for column 'col83' at row 1
-Warning	1265	Data truncated for column 'col89' at row 1
-Warning	1265	Data truncated for column 'col164' at row 1
-INSERT INTO `table5` VALUES ('caddishly',NULL,'Kotah','00:00:00',-128,'tailoring',127,'0000-00-00 00:00:00','trustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustie',-128,1967,NULL,NULL,'parallelisms',NULL,NULL,127,NULL,'',NULL,NULL,-513,NULL,NULL,'-14518',NULL,-22393,'AngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAng','32257','regalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregaling','0000-00-00','newspaperwoman','0000-00-00',24845,-17741,'impassiveness','Antillean','00:00:00',-13615,-128,'','gantries',-27983,-6070,'Benetton','aridest',NULL,21574,-25634,'McWilliams\'s','burrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowe',18947,NULL,NULL,'surrealistic',NULL,'1954-07-07 08:58:49','test1','-11714','ExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExEx','administrants','Oxycontin','interpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterper','1914-05-28 05:15:03','3942',NULL,'2046-09-07 18:16:36','3220',127,'arising','18472','anacolutha','0000-00-00','613:15:45',NULL,'-23969',NULL,18979,2031,1975,'AlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcesti','septicitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticities',-25058,'',NULL,'','Kulturkampf','pollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpol','00:00:00','','12283',2881,'1926-12-10 09:24:42','Darken\'s','2034-12-21 15:59:00','0000-00-00 00:00:00',NULL,NULL,NULL,'305:05:06',127,NULL,'feudalityfeudality','Merrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMer',-25733,'borak','0000-00-00 00:00:00',-11465,'877',NULL,-1029,'5107',NULL,'Balaton\'s',NULL,'Martian','miserliness','0000-00-00',14689,'catchment',18457,'billet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'s','humerus\'s','24741',NULL,NULL,'-19233',-128,'00:00:00','fashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfas','judiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjud','0000-00-00',15972,'Letrice\'s','hydrographer',NULL,'Federica','evidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevi',4115,'pshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspsh','1924-10-15 16:31:18','Hamlet','trowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'',-3485,'galvanized',NULL,1924,'-22877','unfired','inchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'s',-128,-128,'VHF',-5304,NULL,127,'glossator',16348,'213:10:59','',NULL,'1946-01-11 17:25:16',262,'DoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDouty','test1','0000-00-00 00:00:00','0000-00-00',NULL,'feasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasibl','contortionisticcontortionisticcontortionisticcontortionisticcontortionisticcontortionisticcontortionistic','2027-06-09 07:56:16',6909,'tessitura','indefensible','00:00:00',-6628);
-Warnings:
-Warning	1265	Data truncated for column 'col83' at row 1
-Warning	1265	Data truncated for column 'col89' at row 1
-INSERT INTO `table5` VALUES ('bassoonist\'s',NULL,'refastens','114:27:50',127,'unrestricted',127,'2032-01-13 11:11:22','abstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'s',NULL,1955,'','Hodosh','allocates',-5067,'Cenac\'s',-128,'31546',NULL,'impassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassab',-30347,292,'Sandi\'s',NULL,'-12402',8206,NULL,'encircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircl','6346','ArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentinians','0000-00-00','Riehl\'s','0000-00-00',NULL,5580,'planets',NULL,'58:35:07',317,127,'','gender',-19514,7112,'Pissaro','relevantly',28777,-21818,-17111,'shoddiness\'s',NULL,NULL,'flee','Boatwright\'s','restrict','12537','2096-04-25 08:45:21','test1','-4613','quagga','masterstroke\'s','overcheck\'s',NULL,'1981-10-14 18:30:02','21097',-26481,'2065-07-11 02:13:44',NULL,NULL,'bathroom','-29833','gracelessness\'s','0000-00-00','09:44:40',-7368,NULL,'applecart\'sapplecart\'sapplecart\'sapplecart\'sapplecart\'sapplecart\'sapplecart\'sapplecart\'s',-21077,2015,2039,'cascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scas','nervingnervingnervingnervingnervingnervingnervingnervingnervingnerving',22043,'','5740','','mustached','actin\'sactin\'sactin\'sactin\'sactin\'sactin\'sactin\'sactin\'sactin\'sactin\'sactin\'s','00:00:00','test1','13871',-22276,'1956-01-05 15:08:47','slimline','0000-00-00 00:00:00','0000-00-00 00:00:00','royally',NULL,'mako','51:54:53',NULL,NULL,'deliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'s','DOADOADOADOADOADOADOADOADOADOADOADOADOA',-16244,'Fayette\'s','2020-06-21 05:34:18',-24353,'24097','-28819',12278,'-2365',21322,'stumps',-61,NULL,'subpoena\'s','0000-00-00',31242,'knicker',23567,NULL,'Cathar','29557','thallusthallusthallusthallusthallusthallusthallusthallusthallusthallus','26114',NULL,-128,'00:00:00','salmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsal','shiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshive','0000-00-00',-3152,'syndesis','misbrands','Smiga','stagnation\'s','nonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricno',NULL,NULL,'1988-09-11 14:33:03',NULL,'provokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglypr',25510,'thunderpeal\'s','hierology',1932,'7729','Fahrenheit','metathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'s',NULL,-128,'sinfonia\'s',-6293,'proactive',127,NULL,-24751,'00:00:00','woodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopper','Constantinople\'sConstantinople\'sConstantinople\'sConstantinople\'sConstantinople\'sConstantinople\'sConstantinople\'sConstantinople\'sConstantinople\'sConstantinople\'sConstantinople\'sConstantinople\'sConstantinople\'sConstantinople\'sConstantinople\'sConstantinople\'','1997-01-01 22:40:48',NULL,'MatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlick','test1','2000-12-17 11:19:08','0000-00-00',NULL,'cosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmica','Loesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesc','2078-07-25 04:56:08',10472,NULL,NULL,'345:12:02',-13120);
-Warnings:
-Warning	1265	Data truncated for column 'col83' at row 1
-INSERT INTO `table5` VALUES ('segmentation\'s','shapelessness\'s','coagulators','127:46:24',-128,NULL,127,'0000-00-00 00:00:00','seekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingsee',NULL,2085,'','indent','flyblown',NULL,'Alegre',-128,'-27917','','DesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDes',2473,NULL,'screwball\'s',NULL,'-4861',-7088,-30734,'tambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintam',NULL,NULL,'0000-00-00','Dorcia','0000-00-00',-25745,-1237,'Shoifet\'s','sarsaparillas','21:11:41',31612,-128,'','subway\'s',-5032,-30369,'preventives','lyre',7995,21283,13197,'chippies','rubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubig',19050,'orch','semiliterates','Gerome',NULL,'2058-12-26 21:29:19','',NULL,'dyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdya','Dukas\'s','Christiania','polyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvale','1920-05-23 14:07:00','672',NULL,'1956-06-27 12:15:00','-22658',NULL,'holograph\'s',NULL,'gutsy','0000-00-00','00:00:00',-9558,'1148','fainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfains',NULL,2023,2132,'Balmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBal','overdooverdooverdooverdooverdooverdooverdooverdooverdooverdooverdooverdooverdooverdooverdooverdo',-24707,'test1','-13970','','tensility','BuddieBuddieBuddieBuddieBuddieBuddieBuddieBuddieBuddieBuddie','00:00:00','','580',25115,'2000-07-01 09:01:36','apprentice','1992-01-01 08:55:38','0000-00-00 00:00:00','premunire',24664,NULL,'821:21:05',NULL,-29284,'rapidestrapidestrapidestrapidestrapidestrapidestrapidest','convectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorcon',-3808,'intuitively','0000-00-00 00:00:00',-22296,NULL,'2802',28786,NULL,NULL,'loanword',-12107,'deodori','strophe','0000-00-00',-11013,'undeclared',-8513,'sinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'s','peloria\'s','14940','blushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblush','30550','11566',127,'00:00:00','worktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'swo','looker\'slooker\'slooker\'slooker\'slooker\'slooker\'slooker\'slooker\'slooker\'slooker\'s','5657-05-11',23094,'onerousness','bearer','censured','Shoemaker','mulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomul',5930,'ZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoust','1953-04-28 11:55:44','consulted','invalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinv',-27798,'carnauba\'s','Wilson',1963,NULL,'On\'s','leisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurely',NULL,-128,NULL,17674,'Queenstown\'s',-128,'convertors',1776,'576:20:59',NULL,'allegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriall','2097-10-02 08:41:26',31057,'AfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikaners','test1','0000-00-00 00:00:00','0000-00-00','backwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbac',NULL,NULL,'1932-10-01 18:49:04',12985,NULL,'leukocytes','603:54:26',-22488);
-Warnings:
-Warning	1265	Data truncated for column 'col57' at row 1
-Warning	1265	Data truncated for column 'col89' at row 1
-INSERT INTO `table5` VALUES ('Frasquito\'s','unsatisfactory','jetted','00:00:00',NULL,'Merlin\'s',127,'0000-00-00 00:00:00',NULL,NULL,1998,'','decomposer','Commons',-14813,'oversimplification\'s',NULL,'-5368','','engirdengirdengirdengirdengirdengirdengirdengirdengird',-13627,14305,'frontally',127,'18421',-32295,NULL,NULL,'21841',NULL,'0000-00-00','cytology','2424-00-17',-30542,-17621,'octarchy\'s','outfoxed','00:00:00',27469,-128,'','Kamat\'s',-24130,-5948,'riband','Betsy',NULL,-18769,NULL,NULL,'Serafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSeraf',NULL,'disconcerting',NULL,'whirly','-20343','2020-07-01 12:09:36','','-26975','antiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticant',NULL,'ecumenically','utilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilize','1952-08-01 17:53:28','7903',-5633,'2024-03-17 13:46:59','-5474',127,'Malmö\'s',NULL,NULL,'0000-00-00','571:58:00',17287,'26711','alphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetize',-15158,2001,1997,'hobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithob','Campinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'s',-5693,'test1','3741','','Audrye\'s','monstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymo','00:00:00','test1','-21023',4693,'1998-01-06 04:41:40','Silastic\'s','0000-00-00 00:00:00','0000-00-00 00:00:00','Hedelman\'s',-30080,'normalization\'s','00:00:00',NULL,8197,NULL,NULL,NULL,'nudism\'s','2005-04-13 00:31:55',29046,'8992','11992',NULL,'-1685',-11453,'mythology\'s',26185,'Pyrenea','Pedrick\'s','0000-00-00',27436,'shots',NULL,'discordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscords','bayonet','-7217','scriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscripts',NULL,'17182',NULL,'628:49:55','nunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenuncle',NULL,'0000-00-00',-17444,'celestite\'s','Adars','Hispaniola','Mesopotamians','agglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutin',31998,'electrochemistrieselectrochemistrieselectrochemistrieselectrochemistrieselectrochemistrieselectrochemistrieselectrochemistrieselectrochemistrieselectrochemistrieselectrochemistrieselectrochemistrieselectrochemistrieselectrochemistrieselectrochemistriesele','2005-09-09 23:41:06','bastinaded',NULL,-10763,'impetuosity\'s','xenogenesis\'s',1947,'-29913',NULL,'taxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomies',NULL,NULL,'internees',28697,'Kharkov\'s',NULL,'Swabia',18366,'00:00:00','delayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayer','circusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycir','2066-02-13 14:27:00',-28405,NULL,'test1','0000-00-00 00:00:00','0000-00-00','heterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotr','enchondromaenchondromaenchondromaenchondromaenchondromaenchondromaenchondromaenchondroma','AryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAry','2090-10-13 10:03:05',NULL,NULL,'Yucatan','285:37:51',7627);
-Warnings:
-Warning	1265	Data truncated for column 'col57' at row 1
-/*!40000 ALTER TABLE `table5` ENABLE KEYS */;
-UNLOCK TABLES;
-/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
-/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
-/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
-/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
-/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
-/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
-/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
-/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-select * from `table5` where  (col2 <= '6566-06-15' AND col24 <> 'd')  group by `col83` order by `col83` desc  ;
-col0	col1	col2	col3	col4	col5	col6	col7	col8	col9	col10	col11	col12	col13	col14	col15	col16	col17	col18	col19	col20	col21	col22	col23	col24	col25	col26	col27	col28	col29	col30	col31	col32	col33	col34	col35	col36	col37	col38	col39	col40	col41	col42	col43	col44	col45	col46	col47	col48	col49	col50	col51	col52	col53	col54	col55	col56	col57	col58	col59	col60	col61	col62	col63	col64	col65	col66	col67	col68	col69	col70	col71	col72	col73	col74	col75	col76	col77	col78	col79	col80	col81	col82	col83	col84	col85	col86	col87	col88	col89	col90	col91	col92	col93	col94	col95	col96	col97	col98	col99	col100	col101	col102	col103	col104	col105	col106	col107	col108	col109	col110	col111	col112	col113	col114	col115	col116	col117	col118	col119	col120	col121	col122	col123	col124	col125	col126	col127	col128	col129	col130	col131	col132	col133	col134	col135	col136	col137	col138	col139	col140	col141	col142	col143	col144	col145	col146	col147	col148	col149	col150	col151	col152	col153	col154	col155	col156	col157	col158	col159	col160	col161	col162	col163	col164	col165	col166	col167	col168	col169	col170	col171	col172	col173	col174	col175
-Warnings:
-Warning	1366	Incorrect decimal value: 'd' for column 'col24' at row 1
-Warning	1366	Incorrect decimal value: 'd' for column 'col24' at row 1
-Warning	1292	Truncated incorrect DOUBLE value: 'd'
-drop table `table5`;

=== removed file 'mysql-test/suite/optimizer_unfixed_bugs/r/bug49129.result'
--- a/mysql-test/suite/optimizer_unfixed_bugs/r/bug49129.result	2010-05-19 13:24:14 +0000
+++ b/mysql-test/suite/optimizer_unfixed_bugs/r/bug49129.result	1970-01-01 00:00:00 +0000
@@ -1,39 +0,0 @@
-SET SESSION optimizer_switch = 'firstmatch=off,index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,loosescan=on,materialization=on,semijoin=on';
-CREATE TABLE t0 (a INT);
-INSERT INTO t0 VALUES (0),(1),(2),(3),(4);
-CREATE TABLE t1 (a INT, b INT, KEY(a));
-INSERT INTO t1 SELECT a, a from t0;
-CREATE TABLE t2 (a INT, b INT, PRIMARY KEY(a));
-INSERT INTO t2 SELECT * FROM t1;
-UPDATE t1 SET a=3, b=11 WHERE a=4;
-UPDATE t2 SET b=11 WHERE a=3;
-
-# This result is wrong, but will be fixed by Bug#46556
-SELECT * FROM t0 WHERE t0.a IN 
-(SELECT t1.a FROM t1, t2 WHERE t2.a=t0.a AND t1.b=t2.b);
-a
-0
-1
-2
-3
-SET optimizer_join_cache_level = 6;
-
-# This result is even more wrong ;-)
-SELECT * FROM t0 WHERE t0.a IN 
-(SELECT t1.a FROM t1, t2 WHERE t2.a=t0.a AND t1.b=t2.b);
-a
-0
-1
-2
-3
-SET SESSION optimizer_switch = 'semijoin=off';
-
-# This result is correct
-SELECT * FROM t0 WHERE t0.a IN 
-(SELECT t1.a FROM t1, t2 WHERE t2.a=t0.a AND t1.b=t2.b);
-a
-0
-1
-2
-3
-DROP TABLE t0, t1, t2;

=== removed directory 'mysql-test/suite/optimizer_unfixed_bugs/t'
=== removed file 'mysql-test/suite/optimizer_unfixed_bugs/t/bug42991.test'
--- a/mysql-test/suite/optimizer_unfixed_bugs/t/bug42991.test	2010-05-19 13:01:22 +0000
+++ b/mysql-test/suite/optimizer_unfixed_bugs/t/bug42991.test	1970-01-01 00:00:00 +0000
@@ -1,247 +0,0 @@
---source include/have_debug.inc
-# Test for BUG#42991 "invalid memory access and/or crash when using
-# index condition pushdown + InnoDB"
-# Note that you need to run with --valgrind to see the warnings
-# about invalid memory accesses.
-
---source include/have_innodb.inc
-
-# Valgrind errors happen only with this:
-set session debug="+d,optimizer_innodb_icp";
-
-
-/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
-/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
-/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
-/*!40101 SET NAMES utf8 */;
-/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
-/*!40103 SET TIME_ZONE='+00:00' */;
-/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
-/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
-/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
-/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
-
-
-DROP TABLE IF EXISTS `table5`;
-SET @saved_cs_client     = @@character_set_client;
-SET character_set_client = utf8;
-CREATE TABLE `table5` (
-  `col0` mediumtext,
-  `col1` varchar(90) DEFAULT NULL,
-  `col2` tinytext,
-  `col3` time DEFAULT NULL,
-  `col4` tinyint(1) DEFAULT NULL,
-  `col5` tinytext,
-  `col6` tinyint(1) DEFAULT NULL,
-  `col7` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
-  `col8` tinyblob,
-  `col9` tinyint(4) DEFAULT NULL,
-  `col10` year(4) DEFAULT NULL,
-  `col11` set('test1','test2','test3') DEFAULT NULL,
-  `col12` text,
-  `col13` char(248) DEFAULT NULL,
-  `col14` bigint(20) DEFAULT NULL,
-  `col15` text,
-  `col16` tinyint(4) DEFAULT NULL,
-  `col17` decimal(10,0) DEFAULT NULL,
-  `col18` set('test1','test2','test3') DEFAULT NULL,
-  `col19` varchar(255) DEFAULT NULL,
-  `col20` float DEFAULT NULL,
-  `col21` int(11) DEFAULT NULL,
-  `col22` text,
-  `col23` tinyint(1) DEFAULT NULL,
-  `col24` decimal(10,0) NOT NULL DEFAULT '0',
-  `col25` double DEFAULT NULL,
-  `col26` float DEFAULT NULL,
-  `col27` tinyblob,
-  `col28` decimal(10,0) DEFAULT NULL,
-  `col29` mediumblob,
-  `col30` date DEFAULT NULL,
-  `col31` longtext,
-  `col32` date DEFAULT NULL,
-  `col33` float DEFAULT NULL,
-  `col34` bigint(20) DEFAULT NULL,
-  `col35` tinytext,
-  `col36` mediumtext,
-  `col37` time DEFAULT NULL,
-  `col38` int(11) DEFAULT NULL,
-  `col39` tinyint(4) DEFAULT NULL,
-  `col40` set('test1','test2','test3') DEFAULT NULL,
-  `col41` char(130) DEFAULT NULL,
-  `col42` smallint(6) DEFAULT NULL,
-  `col43` int(11) DEFAULT NULL,
-  `col44` mediumtext,
-  `col45` varchar(126) DEFAULT NULL,
-  `col46` int(11) DEFAULT NULL,
-  `col47` double DEFAULT NULL,
-  `col48` bigint(20) DEFAULT NULL,
-  `col49` mediumtext,
-  `col50` tinyblob,
-  `col51` mediumint(9) DEFAULT NULL,
-  `col52` text,
-  `col53` varchar(208) DEFAULT NULL,
-  `col54` varchar(207) DEFAULT NULL,
-  `col55` decimal(10,0) DEFAULT NULL,
-  `col56` datetime DEFAULT NULL,
-  `col57` enum('test1','test2','test3') DEFAULT NULL,
-  `col58` decimal(10,0) DEFAULT NULL,
-  `col59` tinyblob,
-  `col60` varchar(73) DEFAULT NULL,
-  `col61` mediumtext,
-  `col62` tinyblob,
-  `col63` datetime DEFAULT NULL,
-  `col64` decimal(10,0) DEFAULT NULL,
-  `col65` mediumint(9) DEFAULT NULL,
-  `col66` datetime DEFAULT NULL,
-  `col67` decimal(10,0) DEFAULT NULL,
-  `col68` tinyint(4) DEFAULT NULL,
-  `col69` varchar(58) DEFAULT NULL,
-  `col70` decimal(10,0) DEFAULT NULL,
-  `col71` mediumtext,
-  `col72` date DEFAULT NULL,
-  `col73` time DEFAULT NULL,
-  `col74` double DEFAULT NULL,
-  `col75` decimal(10,0) DEFAULT NULL,
-  `col76` mediumblob,
-  `col77` double DEFAULT NULL,
-  `col78` year(4) DEFAULT NULL,
-  `col79` year(4) DEFAULT NULL,
-  `col80` varchar(255) DEFAULT NULL,
-  `col81` blob,
-  `col82` bigint(20) DEFAULT NULL,
-  `col83` enum('test1','test2','test3') DEFAULT NULL,
-  `col84` decimal(10,0) DEFAULT NULL,
-  `col85` set('test1','test2','test3') DEFAULT NULL,
-  `col86` mediumtext,
-  `col87` varchar(255) DEFAULT NULL,
-  `col88` time DEFAULT NULL,
-  `col89` enum('test1','test2','test3') DEFAULT NULL,
-  `col90` decimal(10,0) DEFAULT NULL,
-  `col91` float DEFAULT NULL,
-  `col92` datetime DEFAULT NULL,
-  `col93` tinytext,
-  `col94` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
-  `col95` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
-  `col96` text,
-  `col97` double DEFAULT NULL,
-  `col98` varchar(198) DEFAULT NULL,
-  `col99` time DEFAULT NULL,
-  `col100` tinyint(4) DEFAULT NULL,
-  `col101` bigint(20) DEFAULT NULL,
-  `col102` varchar(255) DEFAULT NULL,
-  `col103` varchar(255) DEFAULT NULL,
-  `col104` mediumint(9) DEFAULT NULL,
-  `col105` mediumtext,
-  `col106` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
-  `col107` smallint(6) DEFAULT NULL,
-  `col108` decimal(10,0) DEFAULT NULL,
-  `col109` decimal(10,0) DEFAULT NULL,
-  `col110` float DEFAULT NULL,
-  `col111` decimal(10,0) DEFAULT NULL,
-  `col112` double DEFAULT NULL,
-  `col113` tinytext,
-  `col114` float DEFAULT NULL,
-  `col115` varchar(7) DEFAULT NULL,
-  `col116` longtext,
-  `col117` date DEFAULT NULL,
-  `col118` bigint(20) DEFAULT NULL,
-  `col119` text,
-  `col120` bigint(20) DEFAULT NULL,
-  `col121` blob,
-  `col122` char(110) DEFAULT NULL,
-  `col123` decimal(10,0) DEFAULT NULL,
-  `col124` mediumblob,
-  `col125` decimal(10,0) DEFAULT NULL,
-  `col126` decimal(10,0) DEFAULT NULL,
-  `col127` tinyint(1) DEFAULT NULL,
-  `col128` time DEFAULT NULL,
-  `col129` tinyblob,
-  `col130` tinyblob,
-  `col131` date DEFAULT NULL,
-  `col132` int(11) DEFAULT NULL,
-  `col133` varchar(123) DEFAULT NULL,
-  `col134` char(238) DEFAULT NULL,
-  `col135` varchar(225) DEFAULT NULL,
-  `col136` longtext,
-  `col137` varchar(255) DEFAULT NULL,
-  `col138` double DEFAULT NULL,
-  `col139` tinyblob,
-  `col140` datetime DEFAULT NULL,
-  `col141` tinytext,
-  `col142` varchar(255) DEFAULT NULL,
-  `col143` bigint(20) DEFAULT NULL,
-  `col144` varchar(236) DEFAULT NULL,
-  `col145` text,
-  `col146` year(4) DEFAULT NULL,
-  `col147` decimal(10,0) DEFAULT NULL,
-  `col148` text,
-  `col149` mediumblob,
-  `col150` tinyint(4) DEFAULT NULL,
-  `col151` tinyint(1) DEFAULT NULL,
-  `col152` varchar(72) DEFAULT NULL,
-  `col153` int(11) DEFAULT NULL,
-  `col154` varchar(165) DEFAULT NULL,
-  `col155` tinyint(4) DEFAULT NULL,
-  `col156` mediumtext,
-  `col157` double DEFAULT NULL,
-  `col158` time DEFAULT NULL,
-  `col159` mediumblob,
-  `col160` varchar(255) DEFAULT NULL,
-  `col161` datetime DEFAULT NULL,
-  `col162` double DEFAULT NULL,
-  `col163` blob,
-  `col164` enum('test1','test2','test3') DEFAULT NULL,
-  `col165` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
-  `col166` date DEFAULT NULL,
-  `col167` tinyblob,
-  `col168` tinyblob,
-  `col169` varchar(255) DEFAULT NULL,
-  `col170` datetime DEFAULT NULL,
-  `col171` bigint(20) DEFAULT NULL,
-  `col172` varchar(30) DEFAULT NULL,
-  `col173` longtext,
-  `col174` time DEFAULT NULL,
-  `col175` float DEFAULT NULL,
-  PRIMARY KEY (`col24`),
-  KEY `idx0` (`col16`,`col156`(139),`col97`,`col120`),
-  KEY `idx1` (`col24`,`col0`(108)),
-  KEY `idx2` (`col117`,`col173`(34),`col132`,`col82`),
-  KEY `idx3` (`col2`(86)),
-  KEY `idx4` (`col2`(43)),
-  KEY `idx5` (`col83`,`col35`(87),`col111`),
-  KEY `idx6` (`col6`,`col134`,`col92`),
-  KEY `idx7` (`col56`),
-  KEY `idx8` (`col30`,`col53`,`col129`(66)),
-  KEY `idx9` (`col53`,`col113`(211),`col32`,`col15`(75)),
-  KEY `idx10` (`col34`),
-  KEY `idx11` (`col126`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-SET character_set_client = @saved_cs_client;
-
-
-LOCK TABLES `table5` WRITE;
-/*!40000 ALTER TABLE `table5` DISABLE KEYS */;
-INSERT INTO `table5` VALUES ('referenda','hermaphroditism','superable','00:00:00',-128,NULL,-128,'0000-00-00 00:00:00',NULL,-128,1901,NULL,'blandly',NULL,6541,'unsuspectingly',NULL,'7250','',NULL,-31358,26248,'Kilmarnock\'s',127,'-27305',28987,NULL,NULL,'-30388','utilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitariansutilitarians','0000-00-00','Agincourt','0000-00-00',-28063,27242,'readies',NULL,'00:00:00',NULL,-128,'',NULL,NULL,18719,NULL,NULL,14038,17275,NULL,'gait\'s','honeymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'shoneymoon\'sho',8860,NULL,'demigod','outpulling',NULL,'1904-01-17 09:51:06','test1','-18008','grotesqueness\'sgrotesqueness\'sgrotesqueness\'sgrotesqueness\'sgrotesqueness\'sgrotesqueness\'sgrotesqueness\'s','Oakleil\'s','Shostakovich','indiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscretionsindiscre','2076-10-05 02:05:43','29914',-18885,'2088-05-25 13:36:33','25',-128,'Bob','-14559','ammeter','0000-00-00','00:00:00',-29756,NULL,'digressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigressiondigression',-23894,1963,1915,'SadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadyeSadye',NULL,NULL,'','17512','','anaphylaxis\'s','chiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schiseler\'schise','50:11:25','test1','-13685',-18328,'2020-01-19 22:04:54',NULL,'1988-05-10 10:30:56','0000-00-00 00:00:00','Birdie\'s',-27746,NULL,'179:19:25',-128,24141,'radiotransparentradiotransparentradiotransparentradiotransparentradiotransparentradiotransparentradiotransparentradiotransparentradiotransparentradiotransparentradiotransparentradiotransparentradiotransparentradiotransparentradiotransparentradiotransparen','ingroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'singroup\'sing',18950,'Beaulieu','0000-00-00 00:00:00',-23421,'-2865',NULL,NULL,NULL,NULL,'vandalizes',-24683,'interop','Apis\'s','0000-00-00',19745,'Volgograd\'s',-15194,NULL,'Binni','4540','phylumphylumphylumphylum','-25781',NULL,-128,'406:37:03','posthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthasteposthastepos','manneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristmanneristman','0000-00-00',19774,'shariah',NULL,'aquarelle','homographic',NULL,-18959,'thoroughfarethoroughfarethoroughfarethoroughfarethoroughfarethoroughfare','2000-09-05 03:33:50','Baptlsta','Witt\'sWitt\'sWitt\'sWitt\'sWitt\'sWitt\'sWitt\'sWitt\'s',4727,NULL,'posting',2119,'32416',NULL,'charredcharredcharredcharredcharredcharredcharredcharredcharredcharred',-128,NULL,'Rollin\'s',NULL,NULL,127,'waviness\'s',11164,'424:28:18','FaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucherFaucher','stalactite\'sstalactite\'sstalactite\'sstalactite\'sstalactite\'sstalactite\'sstalactite\'sstalactite\'sstalactite\'sstalactite\'sstalactite\'s','1901-01-29 13:48:34',-31988,'Dyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'sDyan\'s','','2022-01-01 21:14:30','0000-00-00','conventionalistconventionalistconventionalistconventionalistconventionalistconventionalistconventionalistconventionalist','mirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnessesmirthlessnesses','tessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stessellation\'stes','2028-05-21 04:56:16',NULL,'Hasid','Hardecanute','00:00:00',-3782);
-INSERT INTO `table5` VALUES ('hemoglobin\'s','Toffey\'s','Juvenal','00:00:00',-128,'harmonicon',-128,'2004-02-13 09:45:46',NULL,NULL,1911,'','Tananarive\'s',NULL,30666,'spiniferous',127,'30675','','Frederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFrederick\'sFr',30388,4769,'Erymanthus\'s',127,'-20972',NULL,-17111,'explosivenessexplosivenessexplosivenessexplosivenessexplosivenessexplosivenessexplosivenessexplosivenessexplosivenessexplosivenessexplosivenessexplosivenessexplosiveness','-28154','magnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'smagnitude\'s','0000-00-00','removes','0000-00-00',16859,NULL,NULL,'Moishe\'s','00:00:00',NULL,NULL,NULL,'hyperform\'s',30540,-26603,'soporific',NULL,NULL,19264,-14618,NULL,'zootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszootechnicszo',5654,'intermezzi','Atkins\'s','hieroglyphically','15885','2068-10-19 12:22:30','','4972','apatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapatosaurapa','severeness','pleaders',NULL,'2070-09-15 17:21:46','15245',-18313,'1934-01-01 01:20:15','-3488',127,'Delawarian','14952','foregathers','0000-00-00','00:00:00',-27837,'7143','madhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'smadhouse\'s',-17163,1951,2054,'raffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraffiaraf','REMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMsREMs',3607,'','-17633','',NULL,NULL,'806:59:31','test1','-29600',20301,'1985-10-09 17:57:25',NULL,'0000-00-00 00:00:00','0000-00-00 00:00:00','Perseid',-32117,'constructer\'s','612:19:03',127,NULL,'overdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingoverdressingove','Carlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCarlstrom\'sCa',24868,'preamble','0000-00-00 00:00:00',-7582,'-865','-14488',6884,'-24713',NULL,'topknot\'s',18469,NULL,'histrionism\'s','0000-00-00',31715,'Dag',14543,'wooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'swooziness\'s','tightest',NULL,'aquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'saquiculture\'s','15603',NULL,-128,'640:34:17','acetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumacetabulumaceta','torridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridlytorridl','9323-05-13',-28292,'Barnaul\'s',NULL,'slanginesses','supernova',NULL,20804,NULL,'2020-10-05 12:00:38','rive',NULL,-31498,'considerateness\'s','nevus\'s',1901,'-12956','fashioner\'s','unfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'sunfitness\'s',-128,127,'nephralgia\'s',13881,'sciatically',NULL,'Tuesday',21227,'00:00:00','halocarbons','duvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduvetynduv','2075-01-21 10:49:44',-19735,'snubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubssnubs','test1','0000-00-00 00:00:00','0000-00-00','kiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkiblahkib',NULL,'connoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseursconnoisseurscon','1953-01-23 17:36:00',NULL,'Principal',NULL,'316:28:48',NULL);
-INSERT INTO `table5` VALUES (NULL,'Annmarie','intangibleness\'s','00:00:00',-128,'transmogrify',127,'0000-00-00 00:00:00',NULL,127,2093,'','enamored','refired',-21296,'neglectful',127,'-9992','',NULL,NULL,3583,'Lockheed\'s',127,'-15717',-29743,-16280,'embouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembouchureembou','-24875',NULL,'0000-00-00',NULL,'0000-00-00',30124,20356,'drinkable','obscenity','00:00:00',NULL,127,'',NULL,-16664,NULL,'unmoor','Vaughan\'s',30457,-16509,-10049,'squeamishness','encirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencirclingencir',-16460,'abatement\'s',NULL,'expatriate','-28670','1925-05-15 11:44:20','','-3762','DelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDelwynDel','Skerl\'s','unmatched',NULL,'1980-01-11 16:02:04','25917',18187,'2001-07-26 13:48:08','-28706',127,'gimme','8807',NULL,'0000-00-00','00:00:00',7666,'21762','drawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacksdrawbacks',16131,2031,2077,'subjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysubjectivitysub','Argenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'sArgenteuil\'s',NULL,'','-17090','','fobs','humiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliatinglyhumiliat','221:02:40','','-1107',4624,'1926-05-11 03:35:52',NULL,'2037-05-13 05:02:44','0000-00-00 00:00:00','Heddie\'s',-6554,NULL,'00:00:00',127,NULL,'lxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlxlx','RawleyRawleyRawleyRawleyRawleyRawleyRawleyRawleyRawleyRawleyRawleyRawleyRawleyRawleyRawleyRawleyRawley',6613,'Beaufort','0000-00-00 00:00:00',12214,NULL,'25469',-26474,'12062',NULL,'physiographer',26382,'cosmogo','deportment\'s','0000-00-00',17492,'propretor\'s',NULL,'zingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzingzing','Suzetta','25513','tearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkerstearjerkers','21613',NULL,-128,'108:58:18','sporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallysporadicallyspo','Monera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'sMonera\'','0000-00-00',18776,'diffractometer',NULL,'crawls','Inglebert','unguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableunguessableun',18112,'melanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanismmelanis','1940-05-18 13:21:00','artlessly','blotsblotsblotsblotsblotsblotsblotsblotsblotsblotsblotsblotsblotsblotsblotsblotsblots',6476,NULL,'Bartlett',2143,NULL,'thaumaturge\'s','Hazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'sHazelton\'s',127,127,'Winthorpe',-29765,'idiocrasy\'s',NULL,'sandcastles',-9852,'281:41:52','Volny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'sVolny\'s','protagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagonist\'sprotagon','2076-01-04 15:01:57',NULL,'auscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultationsauscultations','','0000-00-00 00:00:00','0000-00-00','limenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimenlimen','accommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatinglyaccommodatingly',NULL,'2018-01-01 05:48:54',17404,NULL,NULL,'195:36:50',24658);
-INSERT INTO `table5` VALUES ('caddishly',NULL,'Kotah','00:00:00',-128,'tailoring',127,'0000-00-00 00:00:00','trustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustiestrustie',-128,1967,NULL,NULL,'parallelisms',NULL,NULL,127,NULL,'',NULL,NULL,-513,NULL,NULL,'-14518',NULL,-22393,'AngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAngeliAng','32257','regalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregalingregaling','0000-00-00','newspaperwoman','0000-00-00',24845,-17741,'impassiveness','Antillean','00:00:00',-13615,-128,'','gantries',-27983,-6070,'Benetton','aridest',NULL,21574,-25634,'McWilliams\'s','burrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowedburrowe',18947,NULL,NULL,'surrealistic',NULL,'1954-07-07 08:58:49','test1','-11714','ExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExExEx','administrants','Oxycontin','interpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterpersonalinterper','1914-05-28 05:15:03','3942',NULL,'2046-09-07 18:16:36','3220',127,'arising','18472','anacolutha','0000-00-00','613:15:45',NULL,'-23969',NULL,18979,2031,1975,'AlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcestisAlcesti','septicitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticitiessepticities',-25058,'',NULL,'','Kulturkampf','pollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpollutantpol','00:00:00','','12283',2881,'1926-12-10 09:24:42','Darken\'s','2034-12-21 15:59:00','0000-00-00 00:00:00',NULL,NULL,NULL,'305:05:06',127,NULL,'feudalityfeudality','Merrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMerrili\'sMer',-25733,'borak','0000-00-00 00:00:00',-11465,'877',NULL,-1029,'5107',NULL,'Balaton\'s',NULL,'Martian','miserliness','0000-00-00',14689,'catchment',18457,'billet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'sbillet\'s','humerus\'s','24741',NULL,NULL,'-19233',-128,'00:00:00','fashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfashfas','judiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjudiciaryjud','0000-00-00',15972,'Letrice\'s','hydrographer',NULL,'Federica','evidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevidentlyevi',4115,'pshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspshawspsh','1924-10-15 16:31:18','Hamlet','trowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'strowel\'',-3485,'galvanized',NULL,1924,'-22877','unfired','inchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'sinchworm\'s',-128,-128,'VHF',-5304,NULL,127,'glossator',16348,'213:10:59','',NULL,'1946-01-11 17:25:16',262,'DoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDoutyDouty','test1','0000-00-00 00:00:00','0000-00-00',NULL,'feasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasiblefeasibl','contortionisticcontortionisticcontortionisticcontortionisticcontortionisticcontortionisticcontortionistic','2027-06-09 07:56:16',6909,'tessitura','indefensible','00:00:00',-6628);
-INSERT INTO `table5` VALUES ('bassoonist\'s',NULL,'refastens','114:27:50',127,'unrestricted',127,'2032-01-13 11:11:22','abstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'sabstainer\'s',NULL,1955,'','Hodosh','allocates',-5067,'Cenac\'s',-128,'31546',NULL,'impassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassabilityimpassab',-30347,292,'Sandi\'s',NULL,'-12402',8206,NULL,'encircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircleencircl','6346','ArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentiniansArgentinians','0000-00-00','Riehl\'s','0000-00-00',NULL,5580,'planets',NULL,'58:35:07',317,127,'','gender',-19514,7112,'Pissaro','relevantly',28777,-21818,-17111,'shoddiness\'s',NULL,NULL,'flee','Boatwright\'s','restrict','12537','2096-04-25 08:45:21','test1','-4613','quagga','masterstroke\'s','overcheck\'s',NULL,'1981-10-14 18:30:02','21097',-26481,'2065-07-11 02:13:44',NULL,NULL,'bathroom','-29833','gracelessness\'s','0000-00-00','09:44:40',-7368,NULL,'applecart\'sapplecart\'sapplecart\'sapplecart\'sapplecart\'sapplecart\'sapplecart\'sapplecart\'s',-21077,2015,2039,'cascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scascara\'scas','nervingnervingnervingnervingnervingnervingnervingnervingnervingnerving',22043,'','5740','','mustached','actin\'sactin\'sactin\'sactin\'sactin\'sactin\'sactin\'sactin\'sactin\'sactin\'sactin\'s','00:00:00','test1','13871',-22276,'1956-01-05 15:08:47','slimline','0000-00-00 00:00:00','0000-00-00 00:00:00','royally',NULL,'mako','51:54:53',NULL,NULL,'deliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'sdeliquescence\'s','DOADOADOADOADOADOADOADOADOADOADOADOADOA',-16244,'Fayette\'s','2020-06-21 05:34:18',-24353,'24097','-28819',12278,'-2365',21322,'stumps',-61,NULL,'subpoena\'s','0000-00-00',31242,'knicker',23567,NULL,'Cathar','29557','thallusthallusthallusthallusthallusthallusthallusthallusthallusthallus','26114',NULL,-128,'00:00:00','salmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsalmonoidsal','shiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshiveshive','0000-00-00',-3152,'syndesis','misbrands','Smiga','stagnation\'s','nonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricnonelectricno',NULL,NULL,'1988-09-11 14:33:03',NULL,'provokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglyprovokinglypr',25510,'thunderpeal\'s','hierology',1932,'7729','Fahrenheit','metathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'smetathesis\'s',NULL,-128,'sinfonia\'s',-6293,'proactive',127,NULL,-24751,'00:00:00','woodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopperwoodchopper','Constantinople\'sConstantinople\'sConstantinople\'sConstantinople\'sConstantinople\'sConstantinople\'sConstantinople\'sConstantinople\'sConstantinople\'sConstantinople\'sConstantinople\'sConstantinople\'sConstantinople\'sConstantinople\'sConstantinople\'sConstantinople\'','1997-01-01 22:40:48',NULL,'MatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlickMatlick','test1','2000-12-17 11:19:08','0000-00-00',NULL,'cosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmicalcosmica','Loesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesceke\'sLoesc','2078-07-25 04:56:08',10472,NULL,NULL,'345:12:02',-13120);
-INSERT INTO `table5` VALUES ('segmentation\'s','shapelessness\'s','coagulators','127:46:24',-128,NULL,127,'0000-00-00 00:00:00','seekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingseekingsee',NULL,2085,'','indent','flyblown',NULL,'Alegre',-128,'-27917','','DesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDesiraeDes',2473,NULL,'screwball\'s',NULL,'-4861',-7088,-30734,'tambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintambourintam',NULL,NULL,'0000-00-00','Dorcia','0000-00-00',-25745,-1237,'Shoifet\'s','sarsaparillas','21:11:41',31612,-128,'','subway\'s',-5032,-30369,'preventives','lyre',7995,21283,13197,'chippies','rubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubiginousrubig',19050,'orch','semiliterates','Gerome',NULL,'2058-12-26 21:29:19','',NULL,'dyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdyad\'sdya','Dukas\'s','Christiania','polyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvalenciespolyvale','1920-05-23 14:07:00','672',NULL,'1956-06-27 12:15:00','-22658',NULL,'holograph\'s',NULL,'gutsy','0000-00-00','00:00:00',-9558,'1148','fainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfainsfains',NULL,2023,2132,'Balmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBalmung\'sBal','overdooverdooverdooverdooverdooverdooverdooverdooverdooverdooverdooverdooverdooverdooverdooverdo',-24707,'test1','-13970','','tensility','BuddieBuddieBuddieBuddieBuddieBuddieBuddieBuddieBuddieBuddie','00:00:00','','580',25115,'2000-07-01 09:01:36','apprentice','1992-01-01 08:55:38','0000-00-00 00:00:00','premunire',24664,NULL,'821:21:05',NULL,-29284,'rapidestrapidestrapidestrapidestrapidestrapidestrapidest','convectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorconvectorcon',-3808,'intuitively','0000-00-00 00:00:00',-22296,NULL,'2802',28786,NULL,NULL,'loanword',-12107,'deodori','strophe','0000-00-00',-11013,'undeclared',-8513,'sinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'ssinuosity\'s','peloria\'s','14940','blushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblushblush','30550','11566',127,'00:00:00','worktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'sworktable\'swo','looker\'slooker\'slooker\'slooker\'slooker\'slooker\'slooker\'slooker\'slooker\'slooker\'s','5657-05-11',23094,'onerousness','bearer','censured','Shoemaker','mulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomulattomul',5930,'ZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoustZlatoust','1953-04-28 11:55:44','consulted','invalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinvalidity\'sinv',-27798,'carnauba\'s','Wilson',1963,NULL,'On\'s','leisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurelyleisurely',NULL,-128,NULL,17674,'Queenstown\'s',-128,'convertors',1776,'576:20:59',NULL,'allegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriallegriall','2097-10-02 08:41:26',31057,'AfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikanersAfrikaners','test1','0000-00-00 00:00:00','0000-00-00','backwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbackwardsbac',NULL,NULL,'1932-10-01 18:49:04',12985,NULL,'leukocytes','603:54:26',-22488);
-INSERT INTO `table5` VALUES ('Frasquito\'s','unsatisfactory','jetted','00:00:00',NULL,'Merlin\'s',127,'0000-00-00 00:00:00',NULL,NULL,1998,'','decomposer','Commons',-14813,'oversimplification\'s',NULL,'-5368','','engirdengirdengirdengirdengirdengirdengirdengirdengird',-13627,14305,'frontally',127,'18421',-32295,NULL,NULL,'21841',NULL,'0000-00-00','cytology','2424-00-17',-30542,-17621,'octarchy\'s','outfoxed','00:00:00',27469,-128,'','Kamat\'s',-24130,-5948,'riband','Betsy',NULL,-18769,NULL,NULL,'Serafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSerafina\'sSeraf',NULL,'disconcerting',NULL,'whirly','-20343','2020-07-01 12:09:36','','-26975','antiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticantiphlogisticant',NULL,'ecumenically','utilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilizerutilize','1952-08-01 17:53:28','7903',-5633,'2024-03-17 13:46:59','-5474',127,'Malmö\'s',NULL,NULL,'0000-00-00','571:58:00',17287,'26711','alphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetizealphabetize',-15158,2001,1997,'hobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithobbithob','Campinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'sCampinas\'s',-5693,'test1','3741','','Audrye\'s','monstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymonstrouslymo','00:00:00','test1','-21023',4693,'1998-01-06 04:41:40','Silastic\'s','0000-00-00 00:00:00','0000-00-00 00:00:00','Hedelman\'s',-30080,'normalization\'s','00:00:00',NULL,8197,NULL,NULL,NULL,'nudism\'s','2005-04-13 00:31:55',29046,'8992','11992',NULL,'-1685',-11453,'mythology\'s',26185,'Pyrenea','Pedrick\'s','0000-00-00',27436,'shots',NULL,'discordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscordsdiscords','bayonet','-7217','scriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscriptsscripts',NULL,'17182',NULL,'628:49:55','nunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenunclenuncle',NULL,'0000-00-00',-17444,'celestite\'s','Adars','Hispaniola','Mesopotamians','agglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutinativeagglutin',31998,'electrochemistrieselectrochemistrieselectrochemistrieselectrochemistrieselectrochemistrieselectrochemistrieselectrochemistrieselectrochemistrieselectrochemistrieselectrochemistrieselectrochemistrieselectrochemistrieselectrochemistrieselectrochemistriesele','2005-09-09 23:41:06','bastinaded',NULL,-10763,'impetuosity\'s','xenogenesis\'s',1947,'-29913',NULL,'taxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomiestaxonomies',NULL,NULL,'internees',28697,'Kharkov\'s',NULL,'Swabia',18366,'00:00:00','delayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayerdelayer','circusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycircusycir','2066-02-13 14:27:00',-28405,NULL,'test1','0000-00-00 00:00:00','0000-00-00','heterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotrophicheterotr','enchondromaenchondromaenchondromaenchondromaenchondromaenchondromaenchondromaenchondroma','AryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAryAry','2090-10-13 10:03:05',NULL,NULL,'Yucatan','285:37:51',7627);
-/*!40000 ALTER TABLE `table5` ENABLE KEYS */;
-UNLOCK TABLES;
-/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
-
-/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
-/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
-/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
-/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
-/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
-/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
-/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-
-
-
-select * from `table5` where  (col2 <= '6566-06-15' AND col24 <> 'd')  group by `col83` order by `col83` desc  ;
-
-drop table `table5`;
\ No newline at end of file

=== removed file 'mysql-test/suite/optimizer_unfixed_bugs/t/bug49129.test'
--- a/mysql-test/suite/optimizer_unfixed_bugs/t/bug49129.test	2010-05-19 13:01:22 +0000
+++ b/mysql-test/suite/optimizer_unfixed_bugs/t/bug49129.test	1970-01-01 00:00:00 +0000
@@ -1,34 +0,0 @@
-SET SESSION optimizer_switch = 'firstmatch=off,index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,loosescan=on,materialization=on,semijoin=on';
-
-CREATE TABLE t0 (a INT);
-INSERT INTO t0 VALUES (0),(1),(2),(3),(4);
-
-CREATE TABLE t1 (a INT, b INT, KEY(a));
-INSERT INTO t1 SELECT a, a from t0;
-
-CREATE TABLE t2 (a INT, b INT, PRIMARY KEY(a));
-INSERT INTO t2 SELECT * FROM t1;
-
-UPDATE t1 SET a=3, b=11 WHERE a=4;
-UPDATE t2 SET b=11 WHERE a=3;
-
---echo
---echo # This result is wrong, but will be fixed by Bug#46556
-SELECT * FROM t0 WHERE t0.a IN 
-  (SELECT t1.a FROM t1, t2 WHERE t2.a=t0.a AND t1.b=t2.b);
-
-SET optimizer_join_cache_level = 6;
-
---echo
---echo # This result is even more wrong ;-)
-SELECT * FROM t0 WHERE t0.a IN 
-  (SELECT t1.a FROM t1, t2 WHERE t2.a=t0.a AND t1.b=t2.b);
-
-SET SESSION optimizer_switch = 'semijoin=off';
-
---echo
---echo # This result is correct
-SELECT * FROM t0 WHERE t0.a IN 
-  (SELECT t1.a FROM t1, t2 WHERE t2.a=t0.a AND t1.b=t2.b);
-
-DROP TABLE t0, t1, t2;

=== modified file 'mysql-test/suite/rpl/r/rpl_change_master.result'
--- a/mysql-test/suite/rpl/r/rpl_change_master.result	2010-11-25 11:20:16 +0000
+++ b/mysql-test/suite/rpl/r/rpl_change_master.result	2010-11-26 14:02:14 +0000
@@ -80,13 +80,13 @@ Eexpected values: "100, 200, 300, 400, 5
 include/stop_slave.inc
 create table t1(n int, b varchar(256));
 insert into t1 values(1, <master_bind>);
-change master to master_bind=<master_bind>;
+change master to master_host=<master_bind>, master_bind=<master_bind>;
 start slave;
 drop table t1;
 include/stop_slave.inc
 create table t1(n int, b varchar(256));
 insert into t1 values(1, <master_bind>);
-change master to master_bind=<master_bind>;
+change master to  master_bind=<master_bind>;
 start slave;
 got expected error 2003
 include/stop_slave.inc
@@ -96,13 +96,13 @@ drop table t1;
 include/stop_slave.inc
 create table t1(n int, b varchar(256));
 insert into t1 values(1, <master_bind>);
-change master to master_bind=<master_bind>;
+change master to master_host=<master_bind>, master_bind=<master_bind>;
 start slave;
 drop table t1;
 include/stop_slave.inc
 create table t1(n int, b varchar(256));
 insert into t1 values(1, <master_bind>);
-change master to master_bind=<master_bind>;
+change master to  master_bind=<master_bind>;
 start slave;
 drop table t1;
 stop slave;

=== modified file 'mysql-test/suite/rpl/r/rpl_change_master_crash_safe.result'
--- a/mysql-test/suite/rpl/r/rpl_change_master_crash_safe.result	2010-11-25 11:20:16 +0000
+++ b/mysql-test/suite/rpl/r/rpl_change_master_crash_safe.result	2010-11-26 14:02:14 +0000
@@ -80,13 +80,13 @@ Eexpected values: "100, 200, 300, 400, 5
 include/stop_slave.inc
 create table t1(n int, b varchar(256));
 insert into t1 values(1, <master_bind>);
-change master to master_bind=<master_bind>;
+change master to master_host=<master_bind>, master_bind=<master_bind>;
 start slave;
 drop table t1;
 include/stop_slave.inc
 create table t1(n int, b varchar(256));
 insert into t1 values(1, <master_bind>);
-change master to master_bind=<master_bind>;
+change master to  master_bind=<master_bind>;
 start slave;
 got expected error 2003
 include/stop_slave.inc
@@ -96,13 +96,13 @@ drop table t1;
 include/stop_slave.inc
 create table t1(n int, b varchar(256));
 insert into t1 values(1, <master_bind>);
-change master to master_bind=<master_bind>;
+change master to master_host=<master_bind>, master_bind=<master_bind>;
 start slave;
 drop table t1;
 include/stop_slave.inc
 create table t1(n int, b varchar(256));
 insert into t1 values(1, <master_bind>);
-change master to master_bind=<master_bind>;
+change master to  master_bind=<master_bind>;
 start slave;
 drop table t1;
 stop slave;

=== modified file 'mysql-test/suite/sys_vars/r/optimizer_switch_basic.result'
--- a/mysql-test/suite/sys_vars/r/optimizer_switch_basic.result	2010-11-05 14:19:52 +0000
+++ b/mysql-test/suite/sys_vars/r/optimizer_switch_basic.result	2010-11-17 15:23:17 +0000
@@ -1,57 +1,57 @@
 SET @start_global_value = @@global.optimizer_switch;
 SELECT @start_global_value;
 @start_global_value
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on
 select @@global.optimizer_switch;
 @@global.optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on
 select @@session.optimizer_switch;
 @@session.optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on
 show global variables like 'optimizer_switch';
 Variable_name	Value
-optimizer_switch	index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
+optimizer_switch	index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on
 show session variables like 'optimizer_switch';
 Variable_name	Value
-optimizer_switch	index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
+optimizer_switch	index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on
 select * from information_schema.global_variables where variable_name='optimizer_switch';
 VARIABLE_NAME	VARIABLE_VALUE
-OPTIMIZER_SWITCH	index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
+OPTIMIZER_SWITCH	index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on
 select * from information_schema.session_variables where variable_name='optimizer_switch';
 VARIABLE_NAME	VARIABLE_VALUE
-OPTIMIZER_SWITCH	index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
+OPTIMIZER_SWITCH	index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on
 set global optimizer_switch=10;
 set session optimizer_switch=5;
 select @@global.optimizer_switch;
 @@global.optimizer_switch
-index_merge=off,index_merge_union=on,index_merge_sort_union=off,index_merge_intersection=on,engine_condition_pushdown=off
+index_merge=off,index_merge_union=on,index_merge_sort_union=off,index_merge_intersection=on,engine_condition_pushdown=off,index_condition_pushdown=off
 select @@session.optimizer_switch;
 @@session.optimizer_switch
-index_merge=on,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,engine_condition_pushdown=off
+index_merge=on,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off
 set global optimizer_switch="index_merge_sort_union=on";
 set session optimizer_switch="index_merge=off";
 select @@global.optimizer_switch;
 @@global.optimizer_switch
-index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off
+index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off,index_condition_pushdown=off
 select @@session.optimizer_switch;
 @@session.optimizer_switch
-index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,engine_condition_pushdown=off
+index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off
 show global variables like 'optimizer_switch';
 Variable_name	Value
-optimizer_switch	index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off
+optimizer_switch	index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off,index_condition_pushdown=off
 show session variables like 'optimizer_switch';
 Variable_name	Value
-optimizer_switch	index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,engine_condition_pushdown=off
+optimizer_switch	index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off
 select * from information_schema.global_variables where variable_name='optimizer_switch';
 VARIABLE_NAME	VARIABLE_VALUE
-OPTIMIZER_SWITCH	index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off
+OPTIMIZER_SWITCH	index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off,index_condition_pushdown=off
 select * from information_schema.session_variables where variable_name='optimizer_switch';
 VARIABLE_NAME	VARIABLE_VALUE
-OPTIMIZER_SWITCH	index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,engine_condition_pushdown=off
+OPTIMIZER_SWITCH	index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off
 set session optimizer_switch="default";
 select @@session.optimizer_switch;
 @@session.optimizer_switch
-index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off
+index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off,index_condition_pushdown=off
 set global optimizer_switch=1.1;
 ERROR 42000: Incorrect argument type to variable 'optimizer_switch'
 set global optimizer_switch=1e1;
@@ -63,4 +63,4 @@ ERROR 42000: Variable 'optimizer_switch'
 SET @@global.optimizer_switch = @start_global_value;
 SELECT @@global.optimizer_switch;
 @@global.optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on

=== modified file 'mysql-test/t/ctype_cp1251.test'
--- a/mysql-test/t/ctype_cp1251.test	2010-06-25 11:42:42 +0000
+++ b/mysql-test/t/ctype_cp1251.test	2010-11-26 14:37:59 +0000
@@ -60,6 +60,16 @@ DROP TABLE t1;
 # End of 4.1 tests
 
 --echo #
+--echo # Start of 5.1 tests
+--echo #
+
+--source include/ctype_8bit.inc
+
+--echo #
+--echo # End of 5.1 tests
+--echo #
+
+--echo #
 --echo # Start of 5.5 tests
 --echo #
 

=== added file 'mysql-test/t/ctype_like_range.test'
--- a/mysql-test/t/ctype_like_range.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/ctype_like_range.test	2010-11-26 13:29:18 +0000
@@ -0,0 +1,119 @@
+--source include/have_debug.inc
+--source include/have_ucs2.inc
+--source include/have_utf16.inc
+--source include/have_utf32.inc
+--source include/have_utf8mb4.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+DROP VIEW IF EXISTS v1;
+--enable_warnings
+
+CREATE TABLE t1 (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, a VARBINARY(32));
+INSERT INTO t1 (a) VALUES (''),('_'),('%'),('\_'),('\%'),('\\');
+INSERT INTO t1 (a) VALUES ('a'),('c');
+INSERT INTO t1 (a) VALUES ('a_'),('c_');
+INSERT INTO t1 (a) VALUES ('a%'),('c%');
+INSERT INTO t1 (a) VALUES ('aa'),('cc'),('ch');
+INSERT INTO t1 (a) VALUES ('aa_'),('cc_'),('ch_');
+INSERT INTO t1 (a) VALUES ('aa%'),('cc%'),('ch%');
+INSERT INTO t1 (a) VALUES ('aaa'),('ccc'),('cch');
+INSERT INTO t1 (a) VALUES ('aaa_'),('ccc_'),('cch_');
+INSERT INTO t1 (a) VALUES ('aaa%'),('ccc%'),('cch%');
+INSERT INTO t1 (a) VALUES ('aaaaaaaaaaaaaaaaaaaa');
+INSERT INTO t1 (a) VALUES ('caaaaaaaaaaaaaaaaaaa');
+
+CREATE VIEW v1 AS
+  SELECT id, 'a' AS name, a AS val FROM t1
+UNION
+  SELECT id, 'mn', HEX(LIKE_RANGE_MIN(a, 16)) AS min FROM t1
+UNION
+  SELECT id, 'mx', HEX(LIKE_RANGE_MAX(a, 16)) AS max FROM t1
+UNION
+  SELECT id, 'sp', REPEAT('-', 32) AS sep FROM t1
+ORDER BY id, name;
+SELECT * FROM v1;
+
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET latin1;
+SELECT * FROM v1;
+
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8;
+SELECT * FROM v1;
+
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
+SELECT * FROM v1;
+
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_czech_ci;
+SELECT * FROM v1;
+
+# Note, 16 bytes is enough for 16/3= 5 characters
+# For the 'aaaaaaaa' value contraction breaks apart
+# For the 'caaaaaaa' value contraction does not break apart
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_danish_ci;
+SELECT * FROM v1;
+
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8mb4;
+SELECT * FROM v1;
+
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+SELECT * FROM v1;
+
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_czech_ci;
+SELECT * FROM v1;
+
+# Note, 16 bytes is enough for 16/4= 4 characters
+# For the 'aaaaaaaa' value contraction does not break apart
+# For the 'caaaaaaa' value contraction breaks apart
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_danish_ci;
+SELECT * FROM v1;
+
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci;
+SELECT * FROM v1;
+
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET ucs2;
+SELECT * FROM v1;
+
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET ucs2 COLLATE ucs2_unicode_ci;
+SELECT * FROM v1;
+
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET ucs2 COLLATE ucs2_czech_ci;
+SELECT * FROM v1;
+
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET ucs2 COLLATE ucs2_danish_ci;
+SELECT * FROM v1;
+
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf16;
+SELECT * FROM v1;
+
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf16 COLLATE utf16_unicode_ci;
+SELECT * FROM v1;
+
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf16 COLLATE utf16_czech_ci;
+SELECT * FROM v1;
+
+# Note, 16 bytes is enough for 16/3= 5 characters
+# For the 'aaaaaaaa' value contraction does not break apart
+# For the 'caaaaaaa' value contraction breaks apart
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf16 COLLATE utf16_danish_ci;
+SELECT * FROM v1;
+
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf16 COLLATE utf16_unicode_520_ci;
+SELECT * FROM v1;
+
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf32;
+SELECT * FROM v1;
+
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf32 COLLATE utf32_unicode_ci;
+SELECT * FROM v1;
+
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf32 COLLATE utf32_czech_ci;
+SELECT * FROM v1;
+
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf32 COLLATE utf32_danish_ci;
+SELECT * FROM v1;
+
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf32 COLLATE utf32_unicode_520_ci;
+SELECT * FROM v1;
+
+DROP VIEW v1;
+DROP TABLE t1;

=== modified file 'mysql-test/t/ctype_uca.test'
--- a/mysql-test/t/ctype_uca.test	2010-11-11 10:40:41 +0000
+++ b/mysql-test/t/ctype_uca.test	2010-11-26 11:36:39 +0000
@@ -477,6 +477,23 @@ set names utf8;
 --echo End of 5.1 tests
 
 --echo #
+--echo # Start of 5.5 tests
+--echo #
+#
+# Test my_like_range and contractions
+#
+SET collation_connection=utf8_czech_ci;
+--source include/ctype_czech.inc
+--source include/ctype_like_ignorable.inc
+SET collation_connection=ucs2_czech_ci;
+--source include/ctype_czech.inc
+--source include/ctype_like_ignorable.inc
+--echo #
+--echo # End of 5.5 tests
+--echo #
+
+
+--echo #
 --echo # Start of 5.6 tests
 --echo #
 

=== modified file 'mysql-test/t/ctype_utf16_uca.test'
--- a/mysql-test/t/ctype_utf16_uca.test	2010-11-11 10:40:41 +0000
+++ b/mysql-test/t/ctype_utf16_uca.test	2010-11-26 11:36:39 +0000
@@ -139,6 +139,13 @@ DROP TABLE IF EXISTS t1;
 set collation_connection=utf16_unicode_ci;
 --source include/ctype_regex.inc
 
+#
+# Test my_like_range and contractions
+#
+SET collation_connection=utf16_czech_ci;
+--source include/ctype_czech.inc
+--source include/ctype_like_ignorable.inc
+
 
 --echo #
 --echo # End of 5.5 tests

=== modified file 'mysql-test/t/ctype_utf32_uca.test'
--- a/mysql-test/t/ctype_utf32_uca.test	2010-11-11 10:40:41 +0000
+++ b/mysql-test/t/ctype_utf32_uca.test	2010-11-26 11:36:39 +0000
@@ -141,6 +141,14 @@ set collation_connection=utf32_unicode_c
 --source include/ctype_regex.inc
 
 
+#
+# Test my_like_range and contractions
+#
+SET collation_connection=utf32_czech_ci;
+--source include/ctype_czech.inc
+--source include/ctype_like_ignorable.inc
+
+
 --echo #
 --echo # End of 5.5 tests
 --echo #

=== modified file 'mysql-test/t/ctype_utf8mb4_uca.test'
--- a/mysql-test/t/ctype_utf8mb4_uca.test	2010-11-03 12:20:14 +0000
+++ b/mysql-test/t/ctype_utf8mb4_uca.test	2010-11-26 13:52:41 +0000
@@ -39,6 +39,16 @@ SELECT GROUP_CONCAT(c1 ORDER BY c1 SEPAR
 
 DROP TABLE t1;
 
+--echo #
+--echo # Start of 5.5 tests
+--echo #
+#
+# Bug#57737 Character sets: search fails with like, contraction, index
+# Test my_like_range and contractions
+#
+SET collation_connection=utf8mb4_czech_ci;
+--source include/ctype_czech.inc
+--source include/ctype_like_ignorable.inc
 
 --echo #
 --echo # End of 5.5 tests

=== modified file 'mysql-test/t/mysql.test'
--- a/mysql-test/t/mysql.test	2010-10-20 10:50:50 +0000
+++ b/mysql-test/t/mysql.test	2010-11-26 14:37:59 +0000
@@ -426,6 +426,150 @@ drop table t1;
 --exec $MYSQL --skip-column-names --vertical test -e "select 1 as a"
 
 --echo
+
+--echo #
+--echo # Bug #54899: --one-database option cannot handle DROP/CREATE DATABASE 
+--echo #             commands.
+--echo #
+--write_file $MYSQLTEST_VARDIR/tmp/bug54899.sql
+DROP DATABASE connected_db;
+CREATE DATABASE connected_db;
+USE connected_db;
+CREATE TABLE `table_in_connected_db`(a INT);
+EOF
+
+CREATE DATABASE connected_db;
+--exec $MYSQL --one-database connected_db < $MYSQLTEST_VARDIR/tmp/bug54899.sql
+USE connected_db;
+SHOW TABLES;
+DROP DATABASE connected_db;
+--remove_file $MYSQLTEST_VARDIR/tmp/bug54899.sql
+
+--echo
+
+--echo #
+--echo # Testing --one-database option
+--echo #
+--write_file $MYSQLTEST_VARDIR/tmp/one_db.sql
+CREATE TABLE t1 (i INT);
+CREATE TABLE test.t1 (i INT);
+USE test;
+# Following statements should be filtered.
+CREATE TABLE connected_db.t2 (i INT);
+CREATE TABLE t2 (i INT);
+EOF
+
+CREATE DATABASE connected_db;
+--exec $MYSQL --one-database connected_db < $MYSQLTEST_VARDIR/tmp/one_db.sql
+SHOW TABLES IN connected_db;
+SHOW TABLES IN test;
+USE test;
+DROP TABLE t1;
+DROP DATABASE connected_db;
+--remove_file $MYSQLTEST_VARDIR/tmp/one_db.sql
+
+--echo
+--write_file $MYSQLTEST_VARDIR/tmp/one_db.sql
+CREATE DATABASE test1;
+USE test1;
+USE test1;
+# Following statements should be filtered.
+CREATE TABLE connected_db.t1 (i INT);
+EOF
+
+--exec $MYSQL --one-database test < $MYSQLTEST_VARDIR/tmp/one_db.sql
+SHOW TABLES IN test;
+SHOW TABLES IN test1;
+DROP DATABASE test1;
+--remove_file $MYSQLTEST_VARDIR/tmp/one_db.sql
+
+--echo
+
+--echo #
+--echo # Checking --one-database option followed by the execution of 
+--echo # connect command.
+--echo #
+--write_file $MYSQLTEST_VARDIR/tmp/one_db.sql
+CREATE TABLE t1 (i INT);
+CREATE TABLE test.t1 (i INT);
+CONNECT test;
+CREATE TABLE connected_db.t2 (i INT);
+CREATE TABLE t2 (i INT);
+USE connected_db;
+# Following statements should be filtered.
+CREATE TABLE connected_db.t3 (i INT);
+CREATE TABLE t3 (i INT);
+EOF
+
+CREATE DATABASE connected_db;
+--exec $MYSQL --one-database connected_db < $MYSQLTEST_VARDIR/tmp/one_db.sql
+SHOW TABLES IN connected_db;
+SHOW TABLES IN test;
+DROP TABLE test.t1;
+DROP TABLE test.t2;
+DROP DATABASE connected_db;
+--remove_file $MYSQLTEST_VARDIR/tmp/one_db.sql
+
+--echo
+
+--echo #
+--echo # Checking --one-database option with no database specified
+--echo # at command-line.
+--echo #
+--write_file $MYSQLTEST_VARDIR/tmp/one_db.sql
+# All following statements should be filtered.
+CREATE TABLE t1 (i INT);
+CREATE TABLE test.t1 (i INT);
+USE test;
+CREATE TABLE test.t2 (i INT);
+CREATE TABLE t2 (i INT);
+EOF
+
+--exec $MYSQL --one-database < $MYSQLTEST_VARDIR/tmp/one_db.sql
+SHOW TABLES IN test;
+--remove_file $MYSQLTEST_VARDIR/tmp/one_db.sql
+
+--echo
+
+--echo #
+--echo # Checking --one-database option with non_existent_db 
+--echo # specified with USE command
+--echo #
+
+# CASE 1 : When 'test' database exists and passed at commandline.
+--write_file $MYSQLTEST_VARDIR/tmp/one_db_1.sql
+CREATE TABLE `table_in_test`(i INT);
+USE non_existent_db;
+# Following statement should be filtered out.
+CREATE TABLE `table_in_non_existent_db`(i INT);
+EOF
+
+# CASE 2 : When 'test' database exists but dropped and recreated in load file.
+--write_file $MYSQLTEST_VARDIR/tmp/one_db_2.sql
+DROP DATABASE test;
+CREATE DATABASE test;
+USE non_existent_db;
+# Following statements should be filtered out.
+CREATE TABLE `table_in_non_existent_db`(i INT);
+USE test;
+# Following statements should not be filtered out.
+CREATE TABLE `table_in_test`(i INT);
+EOF
+
+--exec $MYSQL --one-database test < $MYSQLTEST_VARDIR/tmp/one_db_1.sql
+SHOW TABLES IN test;
+DROP DATABASE test;
+--echo
+CREATE DATABASE test;
+--exec $MYSQL --one-database test < $MYSQLTEST_VARDIR/tmp/one_db_2.sql
+SHOW TABLES IN test;
+DROP DATABASE test;
+CREATE DATABASE test;
+
+--remove_file $MYSQLTEST_VARDIR/tmp/one_db_1.sql
+--remove_file $MYSQLTEST_VARDIR/tmp/one_db_2.sql
+
+--echo
 --echo End of tests
 
 

=== modified file 'mysys/array.c'
--- a/mysys/array.c	2010-07-08 21:20:08 +0000
+++ b/mysys/array.c	2010-11-05 22:14:29 +0000
@@ -92,7 +92,7 @@ my_bool init_dynamic_array(DYNAMIC_ARRAY
     FALSE	Ok
 */
 
-my_bool insert_dynamic(DYNAMIC_ARRAY *array, uchar* element)
+my_bool insert_dynamic(DYNAMIC_ARRAY *array, const void *element)
 {
   uchar* buffer;
   if (array->elements == array->max_element)
@@ -196,7 +196,7 @@ uchar *pop_dynamic(DYNAMIC_ARRAY *array)
     FALSE	Ok
 */
 
-my_bool set_dynamic(DYNAMIC_ARRAY *array, uchar* element, uint idx)
+my_bool set_dynamic(DYNAMIC_ARRAY *array, const void *element, uint idx)
 {
   if (idx >= array->elements)
   {

=== modified file 'mysys/default.c'
--- a/mysys/default.c	2010-11-16 11:07:17 +0000
+++ b/mysys/default.c	2010-11-26 13:46:21 +0000
@@ -368,7 +368,7 @@ static int handle_default_option(void *i
   {
     if (!(tmp= alloc_root(ctx->alloc, strlen(option) + 1)))
       return 1;
-    if (insert_dynamic(ctx->args, (uchar*) &tmp))
+    if (insert_dynamic(ctx->args, &tmp))
       return 1;
     strmov(tmp, option);
   }

=== modified file 'mysys/mf_tempdir.c'
--- a/mysys/mf_tempdir.c	2010-07-15 11:13:30 +0000
+++ b/mysys/mf_tempdir.c	2010-11-05 22:14:29 +0000
@@ -52,7 +52,7 @@ my_bool init_tmpdir(MY_TMPDIR *tmpdir, c
     strmake(buff, pathlist, (uint) (end-pathlist));
     length= cleanup_dirname(buff, buff);
     if (!(copy= my_strndup(buff, length, MYF(MY_WME))) ||
-        insert_dynamic(&tmpdir->full_list, (uchar*) &copy))
+        insert_dynamic(&tmpdir->full_list, &copy))
       DBUG_RETURN(TRUE);
     pathlist=end+1;
   }

=== modified file 'sql-common/client.c'
--- a/sql-common/client.c	2010-11-11 09:40:06 +0000
+++ b/sql-common/client.c	2010-11-26 13:14:37 +0000
@@ -1186,7 +1186,7 @@ static int add_init_command(struct st_my
   }
 
   if (!(tmp= my_strdup(cmd,MYF(MY_WME))) ||
-      insert_dynamic(options->init_commands, (uchar*)&tmp))
+      insert_dynamic(options->init_commands, &tmp))
   {
     my_free(tmp);
     return 1;

=== modified file 'sql/item_create.cc'
--- a/sql/item_create.cc	2010-10-28 09:54:31 +0000
+++ b/sql/item_create.cc	2010-11-26 11:36:39 +0000
@@ -1460,6 +1460,34 @@ protected:
 };
 
 
+#ifndef DBUG_OFF
+class Create_func_like_range_min : public Create_func_arg2
+{
+public:
+  virtual Item *create(THD *thd, Item *arg1, Item *arg2);
+
+  static Create_func_like_range_min s_singleton;
+
+protected:
+  Create_func_like_range_min() {}
+  virtual ~Create_func_like_range_min() {}
+};
+
+
+class Create_func_like_range_max : public Create_func_arg2
+{
+public:
+  virtual Item *create(THD *thd, Item *arg1, Item *arg2);
+
+  static Create_func_like_range_max s_singleton;
+
+protected:
+  Create_func_like_range_max() {}
+  virtual ~Create_func_like_range_max() {}
+};
+#endif
+
+
 class Create_func_ln : public Create_func_arg1
 {
 public:
@@ -4090,6 +4118,26 @@ Create_func_length::create(THD *thd, Ite
 }
 
 
+#ifndef DBUG_OFF
+Create_func_like_range_min Create_func_like_range_min::s_singleton;
+
+Item*
+Create_func_like_range_min::create(THD *thd, Item *arg1, Item *arg2)
+{
+  return new (thd->mem_root) Item_func_like_range_min(arg1, arg2);
+}
+
+
+Create_func_like_range_max Create_func_like_range_max::s_singleton;
+
+Item*
+Create_func_like_range_max::create(THD *thd, Item *arg1, Item *arg2)
+{
+  return new (thd->mem_root) Item_func_like_range_max(arg1, arg2);
+}
+#endif
+
+
 Create_func_ln Create_func_ln::s_singleton;
 
 Item*
@@ -5199,6 +5247,10 @@ static Native_func_registry func_array[]
   { { C_STRING_WITH_LEN("LCASE") }, BUILDER(Create_func_lcase)},
   { { C_STRING_WITH_LEN("LEAST") }, BUILDER(Create_func_least)},
   { { C_STRING_WITH_LEN("LENGTH") }, BUILDER(Create_func_length)},
+#ifndef DBUG_OFF
+  { { C_STRING_WITH_LEN("LIKE_RANGE_MIN") }, BUILDER(Create_func_like_range_min)},
+  { { C_STRING_WITH_LEN("LIKE_RANGE_MAX") }, BUILDER(Create_func_like_range_max)},
+#endif
   { { C_STRING_WITH_LEN("LINEFROMTEXT") }, GEOM_BUILDER(Create_func_geometry_from_text)},
   { { C_STRING_WITH_LEN("LINEFROMWKB") }, GEOM_BUILDER(Create_func_geometry_from_wkb)},
   { { C_STRING_WITH_LEN("LINESTRINGFROMTEXT") }, GEOM_BUILDER(Create_func_geometry_from_text)},

=== modified file 'sql/item_func.cc'
--- a/sql/item_func.cc	2010-11-26 15:20:05 +0000
+++ b/sql/item_func.cc	2010-11-26 15:45:26 +0000
@@ -5058,7 +5058,7 @@ int get_var_with_binlog(THD *thd, enum_s
   }
   /* Mark that this variable has been used by this query */
   var_entry->used_query_id= thd->query_id;
-  if (insert_dynamic(&thd->user_var_events, (uchar*) &user_var_event))
+  if (insert_dynamic(&thd->user_var_events, &user_var_event))
     goto err;
 
   *out_entry= var_entry;

=== modified file 'sql/item_strfunc.cc'
--- a/sql/item_strfunc.cc	2010-11-26 15:20:05 +0000
+++ b/sql/item_strfunc.cc	2010-11-26 15:45:26 +0000
@@ -3225,6 +3225,41 @@ String *Item_func_unhex::val_str(String 
 }
 
 
+#ifndef DBUG_OFF
+String *Item_func_like_range::val_str(String *str)
+{
+  DBUG_ASSERT(fixed == 1);
+  longlong nbytes= args[1]->val_int();
+  String *res= args[0]->val_str(str);
+  size_t min_len, max_len;
+  CHARSET_INFO *cs= collation.collation;
+
+  if (!res || args[0]->null_value || args[1]->null_value ||
+      nbytes < 0 || nbytes > MAX_BLOB_WIDTH ||
+      min_str.alloc(nbytes) || max_str.alloc(nbytes))
+    goto err;
+  null_value=0;
+
+  if (cs->coll->like_range(cs, res->ptr(), res->length(),
+                           '\\', '_', '%', nbytes,
+                           (char*) min_str.ptr(), (char*) max_str.ptr(),
+                           &min_len, &max_len))
+    goto err;
+
+  min_str.set_charset(collation.collation);
+  max_str.set_charset(collation.collation);
+  min_str.length(min_len);
+  max_str.length(max_len);
+
+  return is_min ? &min_str : &max_str;
+
+err:
+  null_value= 1;
+  return 0;
+}
+#endif
+
+
 void Item_func_binary::print(String *str, enum_query_type query_type)
 {
   str->append(STRING_WITH_LEN("cast("));

=== modified file 'sql/item_strfunc.h'
--- a/sql/item_strfunc.h	2010-08-20 11:52:40 +0000
+++ b/sql/item_strfunc.h	2010-11-26 11:36:39 +0000
@@ -657,6 +657,46 @@ public:
 };
 
 
+#ifndef DBUG_OFF
+class Item_func_like_range :public Item_str_func
+{
+protected:
+  String min_str;
+  String max_str;
+  const bool is_min;
+public:
+  Item_func_like_range(Item *a, Item *b, bool is_min_arg)
+    :Item_str_func(a, b), is_min(is_min_arg)
+  { maybe_null= 1; }
+  String *val_str(String *);
+  void fix_length_and_dec()
+  {
+    collation.set(args[0]->collation);
+    decimals=0;
+    max_length= MAX_BLOB_WIDTH;
+  }
+};
+
+
+class Item_func_like_range_min :public Item_func_like_range
+{
+public:
+  Item_func_like_range_min(Item *a, Item *b) 
+    :Item_func_like_range(a, b, true) { }
+  const char *func_name() const { return "like_range_min"; }
+};
+
+
+class Item_func_like_range_max :public Item_func_like_range
+{
+public:
+  Item_func_like_range_max(Item *a, Item *b)
+    :Item_func_like_range(a, b, false) { }
+  const char *func_name() const { return "like_range_max"; }
+};
+#endif
+
+
 class Item_func_binary :public Item_str_func
 {
 public:

=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc	2010-11-25 04:41:58 +0000
+++ b/sql/mysqld.cc	2010-11-26 13:46:21 +0000
@@ -6741,7 +6741,7 @@ SHOW_VAR status_vars[]= {
 bool add_terminator(DYNAMIC_ARRAY *options)
 {
   my_option empty_element= {0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0};
-  return insert_dynamic(options, (uchar *)&empty_element);
+  return insert_dynamic(options, &empty_element);
 }
 
 #ifndef EMBEDDED_LIBRARY
@@ -7402,7 +7402,7 @@ static int get_options(int *argc_ptr, ch
   for (my_option *opt= my_long_options;
        opt < my_long_options + array_elements(my_long_options) - 1;
        opt++)
-    insert_dynamic(&all_options, (uchar*) opt);
+    insert_dynamic(&all_options, opt);
   sys_var_add_options(&all_options, sys_var::PARSE_NORMAL);
   add_terminator(&all_options);
 

=== modified file 'sql/opt_range.cc'
--- a/sql/opt_range.cc	2010-11-19 19:27:31 +0000
+++ b/sql/opt_range.cc	2010-11-26 13:46:21 +0000
@@ -8133,7 +8133,7 @@ get_quick_keys(PARAM *param,QUICK_RANGE_
   set_if_bigger(quick->max_used_key_length, range->min_length);
   set_if_bigger(quick->max_used_key_length, range->max_length);
   set_if_bigger(quick->used_key_parts, (uint) key_tree->part+1);
-  if (insert_dynamic(&quick->ranges, (uchar*) &range))
+  if (insert_dynamic(&quick->ranges, &range))
     return 1;
 
  end:
@@ -8337,7 +8337,7 @@ QUICK_RANGE_SELECT *get_quick_select_for
     key_part->null_bit=     key_info->key_part[part].null_bit;
     key_part->flag=         (uint8) key_info->key_part[part].key_part_flag;
   }
-  if (insert_dynamic(&quick->ranges,(uchar*)&range))
+  if (insert_dynamic(&quick->ranges, &range))
     goto err;
 
   /*
@@ -8358,7 +8358,7 @@ QUICK_RANGE_SELECT *get_quick_select_for
                       make_prev_keypart_map(ref->key_parts), EQ_RANGE)))
       goto err;
     *ref->null_ref_key= 0;		// Clear null byte
-    if (insert_dynamic(&quick->ranges,(uchar*)&null_range))
+    if (insert_dynamic(&quick->ranges, &null_range))
       goto err;
   }
 
@@ -10847,7 +10847,7 @@ bool QUICK_GROUP_MIN_MAX_SELECT::add_ran
                          range_flag);
   if (!range)
     return TRUE;
-  if (insert_dynamic(&min_max_ranges, (uchar*)&range))
+  if (insert_dynamic(&min_max_ranges, &range))
     return TRUE;
   return FALSE;
 }

=== modified file 'sql/rpl_filter.cc'
--- a/sql/rpl_filter.cc	2010-10-26 09:10:59 +0000
+++ b/sql/rpl_filter.cc	2010-11-05 22:14:29 +0000
@@ -466,7 +466,7 @@ Rpl_filter::add_table_rule_to_array(DYNA
   e->key_len= len;
   memcpy(e->db, table_spec, len);
 
-  if (insert_dynamic(a, (uchar*)&e))
+  if (insert_dynamic(a, &e))
   {
     my_free(e);
     return 1;

=== modified file 'sql/rpl_handler.cc'
--- a/sql/rpl_handler.cc	2010-11-04 13:02:10 +0000
+++ b/sql/rpl_handler.cc	2010-11-05 22:14:29 +0000
@@ -202,7 +202,7 @@ void delegates_destroy()
       r= 0;                                                             \
       break;                                                            \
     }                                                                   \
-    insert_dynamic(plugins, (uchar *)&plugin);                          \
+    insert_dynamic(plugins, &plugin);                                   \
     if (((Observer *)info->observer)->f                                 \
         && ((Observer *)info->observer)->f args)                        \
     {                                                                   \

=== modified file 'sql/rpl_mi.cc'
--- a/sql/rpl_mi.cc	2010-11-25 11:20:16 +0000
+++ b/sql/rpl_mi.cc	2010-11-26 13:59:07 +0000
@@ -281,6 +281,7 @@ bool Master_info::read_info(Rpl_info_han
   char *first_non_digit= NULL;
   ulong temp_master_log_pos= 0;
   int temp_ssl= 0;
+  int temp_ssl_verify_server_cert= 0;
 
   DBUG_ENTER("Master_info::read_info");
 
@@ -337,7 +338,7 @@ bool Master_info::read_info(Rpl_info_han
   */
   if (lines >= LINES_IN_MASTER_INFO_WITH_SSL)
   {
-    if (from->get_info((int *) &temp_ssl, 0) ||
+    if (from->get_info(&temp_ssl, 0) ||
         from->get_info(ssl_ca, sizeof(ssl_ca), 0) ||
         from->get_info(ssl_capath, sizeof(ssl_capath), 0) ||
         from->get_info(ssl_cert, sizeof(ssl_cert), 0) ||
@@ -352,7 +353,7 @@ bool Master_info::read_info(Rpl_info_han
   */
   if (lines >= LINE_FOR_MASTER_SSL_VERIFY_SERVER_CERT)
   { 
-    if (from->get_info((int *) &ssl_verify_server_cert, 0))
+    if (from->get_info(&temp_ssl_verify_server_cert, 0))
       DBUG_RETURN(TRUE);
   }
 
@@ -400,7 +401,8 @@ bool Master_info::read_info(Rpl_info_han
       DBUG_RETURN(TRUE);
   }
 
-  ssl= (my_bool) temp_ssl;
+  ssl= (my_bool) test(temp_ssl);
+  ssl_verify_server_cert= (my_bool) test(temp_ssl_verify_server_cert);
   master_log_pos= (my_off_t) temp_master_log_pos;
 #ifndef HAVE_OPENSSL
   if (ssl)

=== modified file 'sql/rpl_slave.cc'
--- a/sql/rpl_slave.cc	2010-11-25 11:20:16 +0000
+++ b/sql/rpl_slave.cc	2010-11-26 13:46:21 +0000
@@ -5661,7 +5661,7 @@ bool change_master(THD* thd, Master_info
                   mi->ignore_server_ids->server_ids.elements, sizeof(ulong),
                   (int (*) (const void*, const void*))
                   change_master_server_id_cmp) == NULL)
-        insert_dynamic(&mi->ignore_server_ids->server_ids, (uchar*) &s_id);
+        insert_dynamic(&mi->ignore_server_ids->server_ids, &s_id);
     }
   }
   sort_dynamic(&mi->ignore_server_ids->server_ids, (qsort_cmp) change_master_server_id_cmp);
@@ -5868,7 +5868,7 @@ bool Server_ids::unpack_server_ids(char 
     else
     {
       ulong val= atol(token);
-      insert_dynamic(&server_ids, (uchar *) &val);
+      insert_dynamic(&server_ids, &val);
     }
   }
   DBUG_RETURN(FALSE);

=== modified file 'sql/set_var.h'
--- a/sql/set_var.h	2010-11-25 04:41:58 +0000
+++ b/sql/set_var.h	2010-11-26 11:22:26 +0000
@@ -134,7 +134,7 @@ public:
   bool register_option(DYNAMIC_ARRAY *array, int parse_flags)
   {
     return (option.id != -1) && (m_parse_flag & parse_flags) &&
-           insert_dynamic(array, (uchar*)&option);
+           insert_dynamic(array, &option);
   }
 
 private:

=== modified file 'sql/share/charsets/cp1251.xml'
--- a/sql/share/charsets/cp1251.xml	2006-12-23 19:17:15 +0000
+++ b/sql/share/charsets/cp1251.xml	2010-11-26 13:58:54 +0000
@@ -98,7 +98,7 @@
  0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 005A 005B 005C 005D 005E 005F
  0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 006A 006B 006C 006D 006E 006F
  0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 007A 007B 007C 007D 007E 007F
- 0402 0403 201A 0453 201E 2026 2020 2021 0000 2030 0409 2039 040A 040C 040B 040F
+ 0402 0403 201A 0453 201E 2026 2020 2021 20AC 2030 0409 2039 040A 040C 040B 040F
  0452 2018 2019 201C 201D 2022 2013 2014 0000 2122 0459 203A 045A 045C 045B 045F
  00A0 040E 045E 0408 00A4 0490 00A6 00A7 0401 00A9 0404 00AB 00AC 00AD 00AE 0407
  00B0 00B1 0406 0456 0491 00B5 00B6 00B7 0451 2116 0454 00BB 0458 0405 0455 0457

=== modified file 'sql/sp_head.cc'
--- a/sql/sp_head.cc	2010-11-18 16:34:56 +0000
+++ b/sql/sp_head.cc	2010-11-26 13:46:21 +0000
@@ -2705,7 +2705,7 @@ int sp_head::add_instr(sp_instr *instr)
     entire stored procedure, as their life span is equal.
   */
   instr->mem_root= &main_mem_root;
-  return insert_dynamic(&m_instr, (uchar*)&instr);
+  return insert_dynamic(&m_instr, &instr);
 }
 
 

=== modified file 'sql/sp_pcontext.cc'
--- a/sql/sp_pcontext.cc	2010-07-08 21:42:23 +0000
+++ b/sql/sp_pcontext.cc	2010-11-05 22:14:29 +0000
@@ -263,7 +263,7 @@ sp_pcontext::push_variable(LEX_STRING *n
   p->mode= mode;
   p->offset= current_var_count();
   p->dflt= NULL;
-  if (insert_dynamic(&m_vars, (uchar*)&p))
+  if (insert_dynamic(&m_vars, &p))
     return NULL;
   return p;
 }
@@ -318,7 +318,7 @@ sp_pcontext::push_cond(LEX_STRING *name,
   p->name.str= name->str;
   p->name.length= name->length;
   p->val= val;
-  return insert_dynamic(&m_conds, (uchar *)&p);
+  return insert_dynamic(&m_conds, &p);
 }
 
 /*
@@ -390,7 +390,7 @@ sp_pcontext::push_cursor(LEX_STRING *nam
     m_max_cursor_index+= 1;
   n.str= name->str;
   n.length= name->length;
-  return insert_dynamic(&m_cursors, (uchar *)&n);
+  return insert_dynamic(&m_cursors, &n);
 }
 
 /*

=== modified file 'sql/sp_pcontext.h'
--- a/sql/sp_pcontext.h	2010-07-30 15:30:30 +0000
+++ b/sql/sp_pcontext.h	2010-11-05 22:14:29 +0000
@@ -279,7 +279,7 @@ public:
   inline bool
   push_case_expr_id(int case_expr_id)
   {
-    return insert_dynamic(&m_case_expr_id_lst, (uchar*) &case_expr_id);
+    return insert_dynamic(&m_case_expr_id_lst, &case_expr_id);
   }
 
   inline void
@@ -342,7 +342,7 @@ public:
   inline void
   push_handler(sp_cond_type_t *cond)
   {
-    insert_dynamic(&m_handlers, (uchar*)&cond);
+    insert_dynamic(&m_handlers, &cond);
   }
 
   bool

=== modified file 'sql/sql_array.h'
--- a/sql/sql_array.h	2010-07-13 17:29:44 +0000
+++ b/sql/sql_array.h	2010-11-05 22:14:29 +0000
@@ -53,7 +53,7 @@ public:
 
   bool append(Elem &el)
   {
-    return (insert_dynamic(&array, (uchar*)&el));
+    return (insert_dynamic(&array, &el));
   }
 
   int elements()

=== modified file 'sql/sql_audit.cc'
--- a/sql/sql_audit.cc	2010-08-23 17:02:22 +0000
+++ b/sql/sql_audit.cc	2010-11-05 22:14:29 +0000
@@ -131,7 +131,7 @@ static my_bool acquire_plugins(THD *thd,
   
   /* lock the plugin and add it to the list */
   plugin= my_plugin_lock(NULL, &plugin);
-  insert_dynamic(&thd->audit_class_plugins, (uchar*) &plugin);
+  insert_dynamic(&thd->audit_class_plugins, &plugin);
 
   return 0;
 }

=== modified file 'sql/sql_plugin.cc'
--- a/sql/sql_plugin.cc	2010-11-08 14:35:45 +0000
+++ b/sql/sql_plugin.cc	2010-11-26 13:14:37 +0000
@@ -377,7 +377,7 @@ static st_plugin_dl *plugin_dl_insert_or
       DBUG_RETURN(tmp);
     }
   }
-  if (insert_dynamic(&plugin_dl_array, (uchar*)&plugin_dl))
+  if (insert_dynamic(&plugin_dl_array, &plugin_dl))
     DBUG_RETURN(0);
   tmp= *dynamic_element(&plugin_dl_array, plugin_dl_array.elements - 1,
                         struct st_plugin_dl **)=
@@ -694,7 +694,7 @@ static plugin_ref intern_plugin_lock(LEX
                        (long) current_thd, pi->name.str, pi->ref_count));
 
     if (lex)
-      insert_dynamic(&lex->plugins, (uchar*)&plugin);
+      insert_dynamic(&lex->plugins, &plugin);
     DBUG_RETURN(plugin);
   }
   DBUG_RETURN(NULL);
@@ -741,7 +741,7 @@ static st_plugin_int *plugin_insert_or_r
       DBUG_RETURN(tmp);
     }
   }
-  if (insert_dynamic(&plugin_array, (uchar*)&plugin))
+  if (insert_dynamic(&plugin_array, &plugin))
     DBUG_RETURN(0);
   tmp= *dynamic_element(&plugin_array, plugin_array.elements - 1,
                         struct st_plugin_int **)=
@@ -1367,7 +1367,7 @@ static bool register_builtin(struct st_m
   tmp->ref_count= 0;
   tmp->plugin_dl= 0;
 
-  if (insert_dynamic(&plugin_array, (uchar*)&tmp))
+  if (insert_dynamic(&plugin_array, &tmp))
     DBUG_RETURN(1);
 
   *ptr= *dynamic_element(&plugin_array, plugin_array.elements - 1,
@@ -3477,7 +3477,7 @@ void add_plugin_options(DYNAMIC_ARRAY *o
     /* Only options with a non-NULL comment are displayed in help text */
     for (;opt->name; opt++)
       if (opt->comment)
-        insert_dynamic(options, (uchar*) opt);
+        insert_dynamic(options, opt);
   }
 }
 

=== modified file 'sql/sql_priv.h'
--- a/sql/sql_priv.h	2010-11-24 11:13:20 +0000
+++ b/sql/sql_priv.h	2010-11-26 13:46:21 +0000
@@ -156,47 +156,51 @@
 #define OPTIMIZER_SWITCH_INDEX_MERGE_SORT_UNION    (1ULL << 2)
 #define OPTIMIZER_SWITCH_INDEX_MERGE_INTERSECT     (1ULL << 3)
 #define OPTIMIZER_SWITCH_ENGINE_CONDITION_PUSHDOWN (1ULL << 4)
-#define OPTIMIZER_SWITCH_MATERIALIZATION           (1ULL << 5)
-#define OPTIMIZER_SWITCH_SEMIJOIN                  (1ULL << 6)
-#define OPTIMIZER_SWITCH_LOOSE_SCAN                (1ULL << 7)
-#define OPTIMIZER_SWITCH_FIRSTMATCH                (1ULL << 8)
+#define OPTIMIZER_SWITCH_INDEX_CONDITION_PUSHDOWN  (1ULL << 5)
+#define OPTIMIZER_SWITCH_MATERIALIZATION           (1ULL << 6)
+#define OPTIMIZER_SWITCH_SEMIJOIN                  (1ULL << 7)
+#define OPTIMIZER_SWITCH_LOOSE_SCAN                (1ULL << 8)
+#define OPTIMIZER_SWITCH_FIRSTMATCH                (1ULL << 9)
 /** If this is off, MRR is never used. */
-#define OPTIMIZER_SWITCH_MRR                       (1ULL << 9)
+#define OPTIMIZER_SWITCH_MRR                       (1ULL << 10)
 /**
    If OPTIMIZER_SWITCH_MRR is on and this is on, MRR is used depending on a
    cost-based choice ("automatic"). If OPTIMIZER_SWITCH_MRR is on and this is
    off, MRR is "forced" (i.e. used as long as the storage engine is capable of
    doing it).
 */
-#define OPTIMIZER_SWITCH_MRR_COST_BASED            (1ULL << 10)
-#define OPTIMIZER_SWITCH_INDEX_CONDITION_PUSHDOWN  (1ULL << 11)
+#define OPTIMIZER_SWITCH_MRR_COST_BASED            (1ULL << 11)
 #define OPTIMIZER_SWITCH_LAST                      (1ULL << 12)
 
 /**
    If OPTIMIZER_SWITCH_ALL is defined, optimizer_switch flags for newer 
-   optimizer features (semijoin, MRR, ICP) will be available.
+   optimizer features (semijoin, MRR) will be available.
  */
 #undef OPTIMIZER_SWITCH_ALL
 
-/* The following must be kept in sync with optimizer_switch_str in mysqld.cc */
+/* 
+  The following must be kept in sync with optimizer_switch string in 
+  sys_vars.cc.
+*/
 #ifdef OPTIMIZER_SWITCH_ALL
 #define OPTIMIZER_SWITCH_DEFAULT (OPTIMIZER_SWITCH_INDEX_MERGE | \
                                   OPTIMIZER_SWITCH_INDEX_MERGE_UNION | \
                                   OPTIMIZER_SWITCH_INDEX_MERGE_SORT_UNION | \
                                   OPTIMIZER_SWITCH_INDEX_MERGE_INTERSECT | \
                                   OPTIMIZER_SWITCH_ENGINE_CONDITION_PUSHDOWN |\
+                                  OPTIMIZER_SWITCH_INDEX_CONDITION_PUSHDOWN | \
                                   OPTIMIZER_SWITCH_MATERIALIZATION | \
                                   OPTIMIZER_SWITCH_SEMIJOIN | \
                                   OPTIMIZER_SWITCH_LOOSE_SCAN | \
                                   OPTIMIZER_SWITCH_FIRSTMATCH | \
-                                  OPTIMIZER_SWITCH_MRR | \
-                                  OPTIMIZER_SWITCH_INDEX_CONDITION_PUSHDOWN)
+                                  OPTIMIZER_SWITCH_MRR)
 #else
 #define OPTIMIZER_SWITCH_DEFAULT (OPTIMIZER_SWITCH_INDEX_MERGE | \
                                   OPTIMIZER_SWITCH_INDEX_MERGE_UNION | \
                                   OPTIMIZER_SWITCH_INDEX_MERGE_SORT_UNION | \
                                   OPTIMIZER_SWITCH_INDEX_MERGE_INTERSECT | \
-                                  OPTIMIZER_SWITCH_ENGINE_CONDITION_PUSHDOWN)
+                                  OPTIMIZER_SWITCH_ENGINE_CONDITION_PUSHDOWN |\
+                                  OPTIMIZER_SWITCH_INDEX_CONDITION_PUSHDOWN)
 #endif
 /*
   Replication uses 8 bytes to store SQL_MODE in the binary log. The day you

=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc	2010-11-26 15:20:05 +0000
+++ b/sql/sql_select.cc	2010-11-26 15:45:26 +0000
@@ -73,9 +73,9 @@ static bool update_ref_and_keys(THD *thd
                                 COND_EQUAL *cond_equal,
                                 table_map table_map, SELECT_LEX *select_lex,
                                 st_sargable_param **sargables);
-static int sort_keyuse(KEYUSE *a,KEYUSE *b);
-static void set_position(JOIN *join,uint index,JOIN_TAB *table,KEYUSE *key);
-static bool create_ref_for_key(JOIN *join, JOIN_TAB *j, KEYUSE *org_keyuse,
+static int sort_keyuse(Key_use *a, Key_use *b);
+static void set_position(JOIN *join, uint index, JOIN_TAB *table, Key_use *key);
+static bool create_ref_for_key(JOIN *join, JOIN_TAB *j, Key_use *org_keyuse,
 			       table_map used_tables);
 static bool choose_plan(JOIN *join, table_map join_tables);
 static void best_access_path(JOIN  *join, JOIN_TAB *s, 
@@ -100,7 +100,7 @@ static uint cache_record_length(JOIN *jo
 static double prev_record_reads(JOIN *join, uint idx, table_map found_ref);
 static bool get_best_combination(JOIN *join);
 static store_key *get_store_key(THD *thd,
-				KEYUSE *keyuse, table_map used_tables,
+				Key_use *keyuse, table_map used_tables,
 				KEY_PART_INFO *key_part, uchar *key_buff,
 				uint maybe_null);
 static void make_outerjoin_info(JOIN *join);
@@ -4157,7 +4157,7 @@ bool JOIN::setup_subquery_materializatio
 
 
 /*
-  Check if table's KEYUSE elements have an eq_ref(outer_tables) candidate
+  Check if table's Key_use elements have an eq_ref(outer_tables) candidate
 
   SYNOPSIS
     find_eq_ref_candidate()
@@ -4166,7 +4166,7 @@ bool JOIN::setup_subquery_materializatio
                         count.
 
   DESCRIPTION
-    Check if table's KEYUSE elements have an eq_ref(outer_tables) candidate
+    Check if table's Key_use elements have an eq_ref(outer_tables) candidate
 
   TODO
     Check again if it is feasible to factor common parts with constant table
@@ -4179,7 +4179,7 @@ bool JOIN::setup_subquery_materializatio
 
 bool find_eq_ref_candidate(TABLE *table, table_map sj_inner_tables)
 {
-  KEYUSE *keyuse= table->reginfo.join_tab->keyuse;
+  Key_use *keyuse= table->reginfo.join_tab->keyuse;
   uint key;
 
   if (keyuse)
@@ -4511,7 +4511,7 @@ make_join_statistics(JOIN *join, TABLE_L
   table_map found_const_table_map, all_table_map, found_ref, refs;
   TABLE **table_vector;
   JOIN_TAB *stat,*stat_end,*s,**stat_ref;
-  KEYUSE *keyuse,*start_keyuse;
+  Key_use *keyuse, *start_keyuse;
   table_map outer_join=0;
   SARGABLE_PARAM *sargables= 0;
   JOIN_TAB *stat_vector[MAX_TABLES+1];
@@ -4575,7 +4575,7 @@ make_join_statistics(JOIN *join, TABLE_L
 #endif
       {						// Empty table
         s->dependent= 0;                        // Ignore LEFT JOIN depend.
-	set_position(join,const_count++,s,(KEYUSE*) 0);
+	set_position(join, const_count++, s, NULL);
 	continue;
       }
       outer_join|= table->map;
@@ -4612,7 +4612,7 @@ make_join_statistics(JOIN *join, TABLE_L
 	(table->file->ha_table_flags() & HA_STATS_RECORDS_IS_EXACT) &&
         !table->fulltext_searched && !join->no_const_tables)
     {
-      set_position(join,const_count++,s,(KEYUSE*) 0);
+      set_position(join, const_count++, s, NULL);
     }
   }
   stat_vector[i]=0;
@@ -4746,7 +4746,7 @@ make_join_statistics(JOIN *join, TABLE_L
             mark_as_null_row(table);
             found_const_table_map|= table->map;
 	    join->const_table_map|= table->map;
-	    set_position(join,const_count++,s,(KEYUSE*) 0);
+	    set_position(join, const_count++, s, NULL);
             goto more_const_tables_found;
            }
 	  keyuse++;
@@ -4765,7 +4765,7 @@ make_join_statistics(JOIN *join, TABLE_L
 	  int tmp= 0;
 	  s->type=JT_SYSTEM;
 	  join->const_table_map|=table->map;
-	  set_position(join,const_count++,s,(KEYUSE*) 0);
+	  set_position(join, const_count++, s, NULL);
 	  if ((tmp= join_read_const_table(s, join->positions+const_count-1)))
 	  {
 	    if (tmp > 0)
@@ -4926,7 +4926,7 @@ make_join_statistics(JOIN *join, TABLE_L
 	  caller to abort with a zero row result.
 	*/
 	join->const_table_map|= s->table->map;
-	set_position(join,const_count++,s,(KEYUSE*) 0);
+	set_position(join, const_count++, s, NULL);
 	s->type= JT_CONST;
 	if (*s->on_expr_ref)
 	{
@@ -5180,10 +5180,11 @@ typedef struct key_field_t {
   /**
     If true, the condition this struct represents will not be satisfied
     when val IS NULL.
+    @sa Key_use::null_rejecting .
   */
-  bool          null_rejecting; 
-  bool          *cond_guard; /* See KEYUSE::cond_guard */
-  uint          sj_pred_no; /* See KEYUSE::sj_pred_no */
+  bool          null_rejecting;
+  bool          *cond_guard;                    ///< @sa Key_use::cond_guard
+  uint          sj_pred_no;                     ///< @sa Key_use::sj_pred_no
 } KEY_FIELD;
 
 /* Values in optimize */
@@ -5697,7 +5698,7 @@ add_key_fields(JOIN *join, KEY_FIELD **k
   /* 
     Subquery optimization: Conditions that are pushed down into subqueries
     are wrapped into Item_func_trig_cond. We process the wrapped condition
-    but need to set cond_guard for KEYUSE elements generated from it.
+    but need to set cond_guard for Key_use elements generated from it.
   */
   {
     if (cond->type() == Item::FUNC_ITEM &&
@@ -5885,20 +5886,18 @@ add_key_part(DYNAMIC_ARRAY *keyuse_array
       {
 	if (field->eq(form->key_info[key].key_part[part].field))
 	{
-          KEYUSE keyuse;
-          keyuse.table=          field->table;
-          keyuse.val=            key_field->val;
-          keyuse.used_tables=    key_field->val->used_tables();
-          keyuse.key=            key;
-          keyuse.keypart=        part;
-          keyuse.optimize=       key_field->optimize & KEY_OPTIMIZE_REF_OR_NULL;
-          keyuse.keypart_map=    (key_part_map) 1 << part;
-          /* This will be set accordingly in optimize_keyuse */
-          keyuse.ref_table_rows= ~(ha_rows) 0;
-          keyuse.null_rejecting= key_field->null_rejecting;
-          keyuse.cond_guard=     key_field->cond_guard;
-          keyuse.sj_pred_no=     key_field->sj_pred_no;
-          if (insert_dynamic(keyuse_array, (uchar*) &keyuse))
+          const Key_use keyuse(field->table,
+                               key_field->val,
+                               key_field->val->used_tables(),
+                               key,
+                               part,
+                               key_field->optimize & KEY_OPTIMIZE_REF_OR_NULL,
+                               (key_part_map) 1 << part,
+                               ~(ha_rows) 0, // will be set in optimize_keyuse
+                               key_field->null_rejecting,
+                               key_field->cond_guard,
+                               key_field->sj_pred_no);
+          if (insert_dynamic(keyuse_array, &keyuse))
             return TRUE;
 	}
       }
@@ -5962,21 +5961,22 @@ add_ft_keys(DYNAMIC_ARRAY *keyuse_array,
       !(usable_tables & cond_func->table->map))
     return FALSE;
 
-  KEYUSE keyuse;
-  keyuse.table= cond_func->table;
-  keyuse.val =  cond_func;
-  keyuse.key =  cond_func->key;
-  keyuse.keypart= FT_KEYPART;
-  keyuse.used_tables=cond_func->key_item()->used_tables();
-  keyuse.optimize= 0;
-  keyuse.keypart_map= 0;
-  keyuse.sj_pred_no= UINT_MAX;
-  return insert_dynamic(keyuse_array,(uchar*) &keyuse);
+  const Key_use keyuse(cond_func->table,
+                       cond_func,
+                       cond_func->key_item()->used_tables(),
+                       cond_func->key,
+                       FT_KEYPART,
+                       0,             // optimize
+                       0,             // keypart_map
+                       ~(ha_rows)0,   // ref_table_rows
+                       false,         // null_rejecting
+                       NULL,          // cond_guard
+                       UINT_MAX);     // sj_pred_no
+  return insert_dynamic(keyuse_array, &keyuse);
 }
 
 
-static int
-sort_keyuse(KEYUSE *a,KEYUSE *b)
+static int sort_keyuse(Key_use *a, Key_use *b)
 {
   int res;
   if (a->table->tablenr != b->table->tablenr)
@@ -6070,7 +6070,7 @@ static void add_key_fields_for_nj(JOIN *
   Update keyuse array with all possible keys we can use to fetch rows.
   
   @param       thd 
-  @param[out]  keyuse         Put here ordered array of KEYUSE structures
+  @param[out]  keyuse         Put here ordered array of Key_use structures
   @param       join_tab       Array in tablenr_order
   @param       tables         Number of tables in join
   @param       cond           WHERE condition (note that the function analyzes
@@ -6131,7 +6131,7 @@ update_ref_and_keys(THD *thd, DYNAMIC_AR
   /* set a barrier for the array of SARGABLE_PARAM */
   (*sargables)[0].field= 0; 
 
-  if (my_init_dynamic_array(keyuse,sizeof(KEYUSE),20,64))
+  if (my_init_dynamic_array(keyuse, sizeof(Key_use), 20, 64))
     return TRUE;
   if (cond)
   {
@@ -6208,17 +6208,17 @@ update_ref_and_keys(THD *thd, DYNAMIC_AR
   */
   if (keyuse->elements)
   {
-    KEYUSE key_end,*prev,*save_pos,*use;
+    Key_use *save_pos, *use;
 
-    my_qsort(keyuse->buffer,keyuse->elements,sizeof(KEYUSE),
-	  (qsort_cmp) sort_keyuse);
+    my_qsort(keyuse->buffer, keyuse->elements, sizeof(Key_use),
+             reinterpret_cast<qsort_cmp>(sort_keyuse));
 
-    bzero((char*) &key_end,sizeof(key_end));    /* Add for easy testing */
-    if (insert_dynamic(keyuse,(uchar*) &key_end))
+    const Key_use key_end(NULL, NULL, 0, 0, 0, 0, 0, 0, false, NULL, 0);
+    if (insert_dynamic(keyuse, &key_end)) // added for easy testing
       return TRUE;
 
-    use=save_pos=dynamic_element(keyuse,0,KEYUSE*);
-    prev= &key_end;
+    use= save_pos= dynamic_element(keyuse, 0, Key_use *);
+    const Key_use *prev= &key_end;
     found_eq_constant=0;
     for (i=0 ; i < keyuse->elements-1 ; i++,use++)
     {
@@ -6253,8 +6253,8 @@ update_ref_and_keys(THD *thd, DYNAMIC_AR
       use->table->reginfo.join_tab->checked_keys.set_bit(use->key);
       save_pos++;
     }
-    i=(uint) (save_pos-(KEYUSE*) keyuse->buffer);
-    (void) set_dynamic(keyuse,(uchar*) &key_end,i);
+    i= (uint) (save_pos - (Key_use *)keyuse->buffer);
+    (void) set_dynamic(keyuse, &key_end, i);
     keyuse->elements=i;
   }
   DBUG_EXECUTE("opt", print_keyuse_array(keyuse););
@@ -6267,7 +6267,7 @@ update_ref_and_keys(THD *thd, DYNAMIC_AR
 
 static void optimize_keyuse(JOIN *join, DYNAMIC_ARRAY *keyuse_array)
 {
-  KEYUSE *end,*keyuse= dynamic_element(keyuse_array, 0, KEYUSE*);
+  Key_use *end, *keyuse= dynamic_element(keyuse_array, 0, Key_use *);
 
   for (end= keyuse+ keyuse_array->elements ; keyuse < end ; keyuse++)
   {
@@ -6452,7 +6452,7 @@ add_group_and_distinct_keys(JOIN *join, 
 /** Save const tables first as used tables. */
 
 static void
-set_position(JOIN *join,uint idx,JOIN_TAB *table,KEYUSE *key)
+set_position(JOIN *join, uint idx, JOIN_TAB *table, Key_use *key)
 {
   join->positions[idx].table= table;
   join->positions[idx].key=key;
@@ -6569,7 +6569,7 @@ private:
   uint   best_loose_scan_key;
   double best_loose_scan_cost;
   double best_loose_scan_records;
-  KEYUSE *best_loose_scan_start_key;
+  Key_use *best_loose_scan_start_key;
 
   uint best_max_loose_keypart;
 
@@ -6635,7 +6635,7 @@ public:
     part1_conds_met= FALSE;
   }
   
-  void add_keyuse(table_map remaining_tables, KEYUSE *keyuse)
+  void add_keyuse(table_map remaining_tables, Key_use *keyuse)
   {
     if (try_loosescan && keyuse->sj_pred_no != UINT_MAX)
     {
@@ -6658,7 +6658,7 @@ public:
 
   bool have_a_case() { return test(handled_sj_equalities); }
 
-  void check_ref_access_part1(JOIN_TAB *s, uint key, KEYUSE *start_key, 
+  void check_ref_access_part1(JOIN_TAB *s, uint key, Key_use *start_key,
                               table_map found_part)
   {
     /*
@@ -6736,7 +6736,7 @@ public:
     }
   }
   
-  void check_ref_access_part2(uint key, KEYUSE *start_key, double records, 
+  void check_ref_access_part2(uint key, Key_use *start_key, double records,
                               double read_time)
   {
     if (part1_conds_met && read_time < best_loose_scan_cost)
@@ -6825,7 +6825,7 @@ best_access_path(JOIN      *join,
                  POSITION *loose_scan_pos)
 {
   THD *thd= join->thd;
-  KEYUSE *best_key=         0;
+  Key_use *best_key=        NULL;
   uint best_max_key_part=   0;
   my_bool found_constraint= 0;
   double best=              DBL_MAX;
@@ -6854,7 +6854,7 @@ best_access_path(JOIN      *join,
   if (unlikely(s->keyuse != NULL))
   {                                            /* Use key if possible */
     TABLE *table= s->table;
-    KEYUSE *keyuse;
+    Key_use *keyuse;
     double best_records= DBL_MAX;
     uint max_key_part=0;
 
@@ -6874,7 +6874,7 @@ best_access_path(JOIN      *join,
       key_part_map ref_or_null_part= 0;
 
       /* Calculate how many key segments of the current key we can use */
-      KEYUSE *start_key= keyuse;
+      Key_use *start_key= keyuse;
 
       loose_scan_opt.next_ref_key();
       DBUG_PRINT("info", ("Considering ref access on key %s",
@@ -8677,7 +8677,7 @@ static bool fix_semijoin_strategies_for_
 static bool get_best_combination(JOIN *join)
 {
   table_map used_tables;
-  KEYUSE *keyuse;
+  Key_use *keyuse;
   const uint table_count= join->tables;
   THD *thd=join->thd;
   DBUG_ENTER("get_best_combination");
@@ -8777,10 +8777,10 @@ static bool get_best_combination(JOIN *j
 }
 
 
-static bool create_ref_for_key(JOIN *join, JOIN_TAB *j, KEYUSE *org_keyuse,
+static bool create_ref_for_key(JOIN *join, JOIN_TAB *j, Key_use *org_keyuse,
 			       table_map used_tables)
 {
-  KEYUSE *keyuse=org_keyuse;
+  Key_use *keyuse= org_keyuse;
   bool ftkey=(keyuse->keypart == FT_KEYPART);
   THD  *thd= join->thd;
   uint keyparts,length,key;
@@ -8941,7 +8941,7 @@ static bool create_ref_for_key(JOIN *joi
 
 
 static store_key *
-get_store_key(THD *thd, KEYUSE *keyuse, table_map used_tables,
+get_store_key(THD *thd, Key_use *keyuse, table_map used_tables,
 	      KEY_PART_INFO *key_part, uchar *key_buff, uint maybe_null)
 {
   if (!((~used_tables) & keyuse->used_tables))		// if const item
@@ -9126,7 +9126,7 @@ inline void add_cond_and_fix(Item **e1, 
     Implementation overview
       1. update_ref_and_keys() accumulates info about null-rejecting
          predicates in in KEY_FIELD::null_rejecting
-      1.1 add_key_part saves these to KEYUSE.
+      1.1 add_key_part saves these to Key_use.
       2. create_ref_for_key copies them to TABLE_REF.
       3. add_not_null_conds adds "x IS NOT NULL" to join_tab->select_cond of
          appropiate JOIN_TAB members.
@@ -9830,11 +9830,20 @@ static bool make_join_select(JOIN *join,
     FALSE  No
 */
 
-bool uses_index_fields_only(Item *item, TABLE *tbl, uint keyno, 
-                            bool other_tbls_ok)
+static bool uses_index_fields_only(Item *item, TABLE *tbl, uint keyno, 
+                                   bool other_tbls_ok)
 {
   if (item->const_item())
-    return TRUE;
+  {
+    /*
+      const_item() might not return correct value if the item tree
+      contains a subquery. If this is the case we do not include this
+      part of the condition.
+    */
+    return !item->with_subselect;
+  }
+
+  const Item::Type item_type= item->type();
 
   /* 
     Don't push down the triggered conditions. Nested outer joins execution 
@@ -9845,14 +9854,10 @@ bool uses_index_fields_only(Item *item, 
          possible
       2. Put the second copy into tab->select_cond. 
   */
-  if (item->type() == Item::FUNC_ITEM && 
+  if (item_type == Item::FUNC_ITEM && 
       ((Item_func*)item)->functype() == Item_func::TRIG_COND_FUNC)
     return FALSE;
 
-  if (!(item->used_tables() & tbl->map))
-    return other_tbls_ok;
-
-  Item::Type item_type= item->type();
   switch (item_type) {
   case Item::FUNC_ITEM:
     {
@@ -9888,7 +9893,7 @@ bool uses_index_fields_only(Item *item, 
     {
       Item_field *item_field= (Item_field*)item;
       if (item_field->field->table != tbl) 
-        return TRUE;
+        return other_tbls_ok;
       /*
         The below is probably a repetition - the first part checks the
         other two, but let's play it safe:
@@ -12884,7 +12889,7 @@ static void update_const_equal_items(Ite
         if (!possible_keys.is_clear_all())
         {
           TABLE *tab= field->table;
-          KEYUSE *use;
+          Key_use *use;
           for (use= stat->keyuse; use && use->table == tab; use++)
             if (possible_keys.is_set(use->key) && 
                 tab->key_info[use->key].key_part[use->keypart].field ==
@@ -19807,7 +19812,7 @@ test_if_skip_sort_order(JOIN_TAB *tab,OR
             "part1 = const1 AND part2=const2". 
             So we build tab->ref from scratch here.
           */
-          KEYUSE *keyuse= tab->keyuse;
+          Key_use *keyuse= tab->keyuse;
           while (keyuse->key != new_ref_key && keyuse->table == tab->table)
             keyuse++;
 

=== modified file 'sql/sql_select.h'
--- a/sql/sql_select.h	2010-10-27 14:46:44 +0000
+++ b/sql/sql_select.h	2010-11-05 22:19:41 +0000
@@ -39,36 +39,63 @@
 #define KEY_OPTIMIZE_EXISTS		1
 #define KEY_OPTIMIZE_REF_OR_NULL	2
 
-typedef struct keyuse_t {
-  TABLE *table;
-  Item	*val;				/**< or value if no field */
-  table_map used_tables;
-  uint	key, keypart;
-  uint optimize; // 0, or KEY_OPTIMIZE_*
-  key_part_map keypart_map;
-  ha_rows      ref_table_rows;
+/**
+  Information about usage of an index to satisfy an equality condition.
+
+  @note such objects are stored in DYNAMIC_ARRAY which uses sizeof(), so keep
+  this class as POD as possible.
+*/
+class Key_use {
+public:
+  Key_use(TABLE *table_arg, Item *val_arg, table_map used_tables_arg,
+          uint key_arg, uint keypart_arg, uint optimize_arg,
+          key_part_map keypart_map_arg, ha_rows ref_table_rows_arg,
+          bool null_rejecting_arg, bool *cond_guard_arg,
+          uint sj_pred_no_arg) :
+  table(table_arg), val(val_arg), used_tables(used_tables_arg),
+  key(key_arg), keypart(keypart_arg), optimize(optimize_arg),
+  keypart_map(keypart_map_arg), ref_table_rows(ref_table_rows_arg),
+  null_rejecting(null_rejecting_arg), cond_guard(cond_guard_arg),
+  sj_pred_no(sj_pred_no_arg)
+  {}
+  TABLE *table;            ///< table owning the index
+  Item	*val;              ///< other side of the equality, or value if no field
+  table_map used_tables;   ///< tables used on other side of equality
+  uint key;                ///< number of index
+  uint keypart;            ///< used part of the index
+  uint optimize;           ///< 0, or KEY_OPTIMIZE_*
+  key_part_map keypart_map;       ///< like keypart, but as a bitmap
+  ha_rows      ref_table_rows;    ///< Estimate of how many rows for a key value
   /**
     If true, the comparison this value was created from will not be
     satisfied if val has NULL 'value'.
+    Not used if the index is fulltext (such index cannot be used for
+    equalities).
   */
   bool null_rejecting;
-  /*
-    !NULL - This KEYUSE was created from an equality that was wrapped into
-            an Item_func_trig_cond. This means the equality (and validity of 
-            this KEYUSE element) can be turned on and off. The on/off state 
+  /**
+    !NULL - This Key_use was created from an equality that was wrapped into
+            an Item_func_trig_cond. This means the equality (and validity of
+            this Key_use element) can be turned on and off. The on/off state
             is indicted by the pointed value:
               *cond_guard == TRUE <=> equality condition is on
               *cond_guard == FALSE <=> equality condition is off
 
     NULL  - Otherwise (the source equality can't be turned off)
+
+    Not used if the index is fulltext (such index cannot be used for
+    equalities).
   */
   bool *cond_guard;
-  /*
+  /**
      0..64    <=> This was created from semi-join IN-equality # sj_pred_no.
      MAX_UINT  Otherwise
+
+     Not used if the index is fulltext (such index cannot be used for
+     semijoin).
   */
   uint         sj_pred_no;
-} KEYUSE;
+};
 
 class store_key;
 
@@ -208,7 +235,7 @@ typedef struct st_join_table : public Sq
   st_join_table();
 
   TABLE		*table;
-  KEYUSE	*keyuse;			/**< pointer to first used key */
+  Key_use	*keyuse;			/**< pointer to first used key */
   SQL_SELECT	*select;
   Item		*select_cond;
   QUICK_SELECT_I *quick;
@@ -1409,7 +1436,7 @@ typedef struct st_position : public Sql_
     NULL  -  'index' or 'range' or 'index_merge' or 'ALL' access is used.
     Other - [eq_]ref[_or_null] access is used. Pointer to {t.keypart1 = expr}
   */
-  KEYUSE *key;
+  Key_use *key;
 
   /* If ref-based access is used: bitmap of tables this table depends on  */
   table_map ref_depend_map;

=== modified file 'sql/sql_show.cc'
--- a/sql/sql_show.cc	2010-11-22 16:13:35 +0000
+++ b/sql/sql_show.cc	2010-11-26 13:46:21 +0000
@@ -2039,8 +2039,8 @@ int add_status_vars(SHOW_VAR *list)
     goto err;
   }
   while (list->name)
-    res|= insert_dynamic(&all_status_vars, (uchar*)list++);
-  res|= insert_dynamic(&all_status_vars, (uchar*)list); // appending NULL-element
+    res|= insert_dynamic(&all_status_vars, list++);
+  res|= insert_dynamic(&all_status_vars, list); // appending NULL-element
   all_status_vars.elements--; // but next insert_dynamic should overwite it
   if (status_vars_inited)
     sort_dynamic(&all_status_vars, show_var_cmp);

=== modified file 'sql/sql_test.cc'
--- a/sql/sql_test.cc	2010-09-02 07:34:10 +0000
+++ b/sql/sql_test.cc	2010-11-05 22:19:41 +0000
@@ -239,7 +239,7 @@ TEST_join(JOIN *join)
 
 #define FT_KEYPART   (MAX_REF_PARTS+10)
 
-void print_keyuse(KEYUSE *keyuse)
+void print_keyuse(Key_use *keyuse)
 {
   char buff[256];
   char buf2[64]; 
@@ -255,7 +255,7 @@ void print_keyuse(KEYUSE *keyuse)
     fieldname= keyuse->table->key_info[keyuse->key].key_part[keyuse->keypart].field->field_name;
   longlong2str(keyuse->used_tables, buf2, 16); 
   DBUG_LOCK_FILE;
-  fprintf(DBUG_FILE, "KEYUSE: %s.%s=%s  optimize= %d used_tables=%s "
+  fprintf(DBUG_FILE, "Key_use: %s.%s=%s  optimize= %d used_tables=%s "
           "ref_table_rows= %lu keypart_map= %0lx\n",
           keyuse->table->alias, fieldname, str.ptr(),
           keyuse->optimize, buf2, (ulong)keyuse->ref_table_rows, 
@@ -269,10 +269,11 @@ void print_keyuse(KEYUSE *keyuse)
 void print_keyuse_array(DYNAMIC_ARRAY *keyuse_array)
 {
   DBUG_LOCK_FILE;
-  fprintf(DBUG_FILE, "KEYUSE array (%d elements)\n", keyuse_array->elements);
+  fprintf(DBUG_FILE, "Key_use array (%d elements)\n", keyuse_array->elements);
   DBUG_UNLOCK_FILE;
   for(uint i=0; i < keyuse_array->elements; i++)
-    print_keyuse((KEYUSE*)dynamic_array_ptr(keyuse_array, i));
+    print_keyuse(reinterpret_cast<Key_use *>
+                 (dynamic_array_ptr(keyuse_array, i)));
 }
 
 

=== modified file 'sql/sys_vars.cc'
--- a/sql/sys_vars.cc	2010-11-23 22:37:59 +0000
+++ b/sql/sys_vars.cc	2010-11-26 13:46:21 +0000
@@ -1412,9 +1412,10 @@ static const char *optimizer_switch_name
 {
   "index_merge", "index_merge_union", "index_merge_sort_union",
   "index_merge_intersection", "engine_condition_pushdown",
+  "index_condition_pushdown",
 #ifdef OPTIMIZER_SWITCH_ALL
   "materialization", "semijoin", "loosescan", "firstmatch",
-  "mrr", "mrr_cost_based", "index_condition_pushdown",
+  "mrr", "mrr_cost_based",
 #endif
   "default", NullS
 };
@@ -1431,11 +1432,11 @@ static Sys_var_flagset Sys_optimizer_swi
        "optimizer_switch",
        "optimizer_switch=option=val[,option=val...], where option is one of "
        "{index_merge, index_merge_union, index_merge_sort_union, "
-       "index_merge_intersection, engine_condition_pushdown"
+       "index_merge_intersection, engine_condition_pushdown, "
+       "index_condition_pushdown"
 #ifdef OPTIMIZER_SWITCH_ALL
        ", materialization, "
-       "semijoin, loosescan, firstmatch, mrr, mrr_cost_based, "
-       "index_condition_pushdown"
+       "semijoin, loosescan, firstmatch, mrr, mrr_cost_based"
 #endif
        "} and val is one of {on, off, default}",
        SESSION_VAR(optimizer_switch), CMD_LINE(REQUIRED_ARG),

=== modified file 'sql/uniques.cc'
--- a/sql/uniques.cc	2010-07-08 21:42:23 +0000
+++ b/sql/uniques.cc	2010-11-05 22:14:29 +0000
@@ -332,7 +332,7 @@ bool Unique::flush()
 
   if (tree_walk(&tree, (tree_walk_action) unique_write_to_file,
 		(void*) this, left_root_right) ||
-      insert_dynamic(&file_ptrs, (uchar*) &file_ptr))
+      insert_dynamic(&file_ptrs, &file_ptr))
     return 1;
   delete_tree(&tree);
   return 0;

=== modified file 'storage/federated/ha_federated.cc'
--- a/storage/federated/ha_federated.cc	2010-10-06 14:34:28 +0000
+++ b/storage/federated/ha_federated.cc	2010-11-05 22:14:29 +0000
@@ -3290,7 +3290,7 @@ MYSQL_RES *ha_federated::store_result(MY
   DBUG_ENTER("ha_federated::store_result");
   if (result)
   {
-    (void) insert_dynamic(&results, (uchar*) &result);
+    (void) insert_dynamic(&results, &result);
   }
   position_called= FALSE;
   DBUG_RETURN(result);

=== modified file 'strings/ctype-extra.c'
--- a/strings/ctype-extra.c	2010-06-25 12:00:49 +0000
+++ b/strings/ctype-extra.c	2010-11-26 14:37:59 +0000
@@ -1040,7 +1040,7 @@ uint16 to_uni_cp1251_bulgarian_ci[] = {
 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
 0x0402,0x0403,0x201A,0x0453,0x201E,0x2026,0x2020,0x2021,
-0x0000,0x2030,0x0409,0x2039,0x040A,0x040C,0x040B,0x040F,
+0x20AC,0x2030,0x0409,0x2039,0x040A,0x040C,0x040B,0x040F,
 0x0452,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014,
 0x0000,0x2122,0x0459,0x203A,0x045A,0x045C,0x045B,0x045F,
 0x00A0,0x040E,0x045E,0x0408,0x00A4,0x0490,0x00A6,0x00A7,
@@ -1730,7 +1730,7 @@ uint16 to_uni_cp1251_ukrainian_ci[] = {
 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
 0x0402,0x0403,0x201A,0x0453,0x201E,0x2026,0x2020,0x2021,
-0x0000,0x2030,0x0409,0x2039,0x040A,0x040C,0x040B,0x040F,
+0x20AC,0x2030,0x0409,0x2039,0x040A,0x040C,0x040B,0x040F,
 0x0452,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014,
 0x0000,0x2122,0x0459,0x203A,0x045A,0x045C,0x045B,0x045F,
 0x00A0,0x040E,0x045E,0x0408,0x00A4,0x0490,0x00A6,0x00A7,
@@ -3762,7 +3762,7 @@ uint16 to_uni_cp1251_bin[] = {
 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
 0x0402,0x0403,0x201A,0x0453,0x201E,0x2026,0x2020,0x2021,
-0x0000,0x2030,0x0409,0x2039,0x040A,0x040C,0x040B,0x040F,
+0x20AC,0x2030,0x0409,0x2039,0x040A,0x040C,0x040B,0x040F,
 0x0452,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014,
 0x0000,0x2122,0x0459,0x203A,0x045A,0x045C,0x045B,0x045F,
 0x00A0,0x040E,0x045E,0x0408,0x00A4,0x0490,0x00A6,0x00A7,
@@ -3877,7 +3877,7 @@ uint16 to_uni_cp1251_general_ci[] = {
 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
 0x0402,0x0403,0x201A,0x0453,0x201E,0x2026,0x2020,0x2021,
-0x0000,0x2030,0x0409,0x2039,0x040A,0x040C,0x040B,0x040F,
+0x20AC,0x2030,0x0409,0x2039,0x040A,0x040C,0x040B,0x040F,
 0x0452,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014,
 0x0000,0x2122,0x0459,0x203A,0x045A,0x045C,0x045B,0x045F,
 0x00A0,0x040E,0x045E,0x0408,0x00A4,0x0490,0x00A6,0x00A7,
@@ -3992,7 +3992,7 @@ uint16 to_uni_cp1251_general_cs[] = {
 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
 0x0402,0x0403,0x201A,0x0453,0x201E,0x2026,0x2020,0x2021,
-0x0000,0x2030,0x0409,0x2039,0x040A,0x040C,0x040B,0x040F,
+0x20AC,0x2030,0x0409,0x2039,0x040A,0x040C,0x040B,0x040F,
 0x0452,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014,
 0x0000,0x2122,0x0459,0x203A,0x045A,0x045C,0x045B,0x045F,
 0x00A0,0x040E,0x045E,0x0408,0x00A4,0x0490,0x00A6,0x00A7,

=== modified file 'strings/ctype-mb.c'
--- a/strings/ctype-mb.c	2010-07-26 09:01:42 +0000
+++ b/strings/ctype-mb.c	2010-11-26 11:36:39 +0000
@@ -727,7 +727,7 @@ static void pad_max_char(CHARSET_INFO *c
   DBUG_ASSERT(buflen > 0);
   do
   {
-    if ((str + buflen) < end)
+    if ((str + buflen) <= end)
     {
       /* Enough space for the characer */
       memcpy(str, buf, buflen);
@@ -893,6 +893,192 @@ fill_max_and_min:
 }
 
 
+/**
+   Calculate min_str and max_str that ranges a LIKE string.
+   Generic function, currently used for ucs2, utf16, utf32,
+   but should be suitable for any other character sets with
+   cs->min_sort_char and cs->max_sort_char represented in
+   Unicode code points.
+
+   @param cs           Character set and collation pointer
+   @param ptr          Pointer to LIKE pattern.
+   @param ptr_length   Length of LIKE pattern.
+   @param escape       Escape character pattern,  typically '\'.
+   @param w_one        'One character' pattern,   typically '_'.
+   @param w_many       'Many characters' pattern, typically '%'.
+   @param res_length   Length of min_str and max_str.
+
+   @param[out] min_str Smallest string that ranges LIKE.
+   @param[out] max_str Largest string that ranges LIKE.
+   @param[out] min_len Length of min_str
+   @param[out] max_len Length of max_str
+
+   @return Optimization status.
+   @retval FALSE if LIKE pattern can be optimized
+   @rerval TRUE if LIKE can't be optimized.
+*/
+my_bool
+my_like_range_generic(CHARSET_INFO *cs,
+                      const char *ptr, size_t ptr_length,
+                      pbool escape, pbool w_one, pbool w_many,
+                      size_t res_length,
+                      char *min_str,char *max_str,
+                      size_t *min_length,size_t *max_length)
+{
+  const char *end= ptr + ptr_length;
+  const char *min_org= min_str;
+  const char *max_org= max_str;
+  char *min_end= min_str + res_length;
+  char *max_end= max_str + res_length;
+  size_t charlen= res_length / cs->mbmaxlen;
+  size_t res_length_diff;
+  my_bool have_contractions= cs->uca ? my_uca_have_contractions(cs->uca) : 0;
+
+  for ( ; charlen > 0; charlen--)
+  {
+    my_wc_t wc, wc2;
+    int res;
+    if ((res= cs->cset->mb_wc(cs, &wc, (uchar*) ptr, (uchar*) end)) <= 0)
+    {
+      if (res == MY_CS_ILSEQ) /* Bad sequence */
+        return TRUE; /* min_length and max_length are not important */
+      break; /* End of the string */
+    }
+    ptr+= res;
+
+    if (wc == (my_wc_t) escape)
+    {
+      if ((res= cs->cset->mb_wc(cs, &wc, (uchar*) ptr, (uchar*) end)) <= 0)
+      {
+        if (res == MY_CS_ILSEQ)
+          return TRUE; /* min_length and max_length are not important */
+        /*
+           End of the string: Escape is the last character.
+           Put escape as a normal character.
+           We'll will leave the loop on the next iteration.
+        */
+      }
+      else
+        ptr+= res;
+
+      /* Put escape character to min_str and max_str  */
+      if ((res= cs->cset->wc_mb(cs, wc,
+                                (uchar*) min_str, (uchar*) min_end)) <= 0)
+        goto pad_set_lengths; /* No space */
+      min_str+= res;
+
+      if ((res= cs->cset->wc_mb(cs, wc,
+                                (uchar*) max_str, (uchar*) max_end)) <= 0)
+        goto pad_set_lengths; /* No space */
+      max_str+= res;
+      continue;
+    }
+    else if (wc == (my_wc_t) w_one)
+    {
+      if ((res= cs->cset->wc_mb(cs, cs->min_sort_char,
+                                (uchar*) min_str, (uchar*) min_end)) <= 0)
+        goto pad_set_lengths;
+      min_str+= res;
+
+      if ((res= cs->cset->wc_mb(cs, cs->max_sort_char,
+                                (uchar*) max_str, (uchar*) max_end)) <= 0)
+        goto pad_set_lengths;
+      max_str+= res;
+      continue;
+    }
+    else if (wc == (my_wc_t) w_many)
+    {
+      /*
+        Calculate length of keys:
+        a\min\min... is the smallest possible string
+        a\max\max... is the biggest possible string
+      */
+      *min_length= ((cs->state & MY_CS_BINSORT) ?
+                    (size_t) (min_str - min_org) :
+                    res_length);
+      *max_length= res_length;
+      goto pad_min_max;
+    }
+
+    if (have_contractions &&
+        my_uca_can_be_contraction_head(cs->uca, wc) &&
+        (res= cs->cset->mb_wc(cs, &wc2, (uchar*) ptr, (uchar*) end)) > 0)
+    {
+      uint16 *weight;
+      if ((wc2 == (my_wc_t) w_one || wc2 == (my_wc_t) w_many))
+      {
+        /* Contraction head followed by a wildcard */
+        *min_length= *max_length= res_length;
+        goto pad_min_max;
+      }
+
+      if (my_uca_can_be_contraction_tail(cs->uca, wc2) &&
+          (weight= my_uca_contraction2_weight(cs->uca, wc, wc2)) && weight[0])
+      {
+        /* Contraction found */
+        if (charlen == 1)
+        {
+          /* contraction does not fit to result */
+          *min_length= *max_length= res_length;
+          goto pad_min_max;
+        }
+
+        ptr+= res;
+        charlen--;
+
+        /* Put contraction head */
+        if ((res= cs->cset->wc_mb(cs, wc,
+                                  (uchar*) min_str, (uchar*) min_end)) <= 0)
+          goto pad_set_lengths;
+        min_str+= res;
+
+        if ((res= cs->cset->wc_mb(cs, wc,
+                                  (uchar*) max_str, (uchar*) max_end)) <= 0)
+          goto pad_set_lengths;
+        max_str+= res;
+        wc= wc2; /* Prepare to put contraction tail */
+      }
+    }
+
+    /* Normal character, or contraction tail */
+    if ((res= cs->cset->wc_mb(cs, wc,
+                              (uchar*) min_str, (uchar*) min_end)) <= 0)
+      goto pad_set_lengths;
+    min_str+= res;
+    if ((res= cs->cset->wc_mb(cs, wc,
+                              (uchar*) max_str, (uchar*) max_end)) <= 0)
+      goto pad_set_lengths;
+    max_str+= res;
+  }
+
+pad_set_lengths:
+  *min_length= (size_t) (min_str - min_org);
+  *max_length= (size_t) (max_str - max_org);
+
+pad_min_max:
+  /*
+    Fill up max_str and min_str to res_length.
+    fill() cannot set incomplete characters and
+    requires that "length" argument is divisible to mbminlen.
+    Make sure to call fill() with proper "length" argument.
+  */
+  res_length_diff= res_length % cs->mbminlen;
+  cs->cset->fill(cs, min_str, min_end - min_str - res_length_diff,
+                 cs->min_sort_char);
+  cs->cset->fill(cs, max_str, max_end - max_str - res_length_diff,
+                 cs->max_sort_char);
+
+  /* In case of incomplete characters set the remainder to 0x00's */
+  if (res_length_diff)
+  {
+    /* Example: odd res_length for ucs2 */
+    memset(min_end - res_length_diff, 0, res_length_diff);
+    memset(max_end - res_length_diff, 0, res_length_diff);
+  }
+  return FALSE;
+}
+
+
 int
 my_wildcmp_mb_bin(CHARSET_INFO *cs,
                   const char *str,const char *str_end,

=== modified file 'strings/ctype-uca.c'
--- a/strings/ctype-uca.c	2010-11-11 10:40:41 +0000
+++ b/strings/ctype-uca.c	2010-11-26 11:36:39 +0000
@@ -21122,7 +21122,7 @@ MY_COLLATION_HANDLER my_collation_ucs2_u
   my_strnncollsp_ucs2_uca,
   my_strnxfrm_ucs2_uca,
   my_strnxfrmlen_simple,
-  my_like_range_ucs2,
+  my_like_range_generic,
   my_wildcmp_uca,
   NULL,
   my_instr_mb,
@@ -23598,7 +23598,7 @@ MY_COLLATION_HANDLER my_collation_utf32_
     my_strnncollsp_any_uca,
     my_strnxfrm_any_uca,
     my_strnxfrmlen_simple,
-    my_like_range_utf32,
+    my_like_range_generic,
     my_wildcmp_uca,
     NULL,
     my_instr_mb,
@@ -24419,7 +24419,7 @@ MY_COLLATION_HANDLER my_collation_utf16_
     my_strnncollsp_any_uca,
     my_strnxfrm_any_uca,
     my_strnxfrmlen_simple,
-    my_like_range_utf16,
+    my_like_range_generic,
     my_wildcmp_uca,
     NULL,
     my_instr_mb,

=== modified file 'strings/ctype-ucs2.c'
--- a/strings/ctype-ucs2.c	2010-10-20 21:34:37 +0000
+++ b/strings/ctype-ucs2.c	2010-11-26 13:29:18 +0000
@@ -900,10 +900,34 @@ my_scan_mb2(CHARSET_INFO *cs __attribute
 
 
 static void
-my_fill_mb2(CHARSET_INFO *cs __attribute__((unused)),
-            char *s, size_t l, int fill)
+my_fill_mb2(CHARSET_INFO *cs, char *s, size_t slen, int fill)
 {
-  for ( ; l >= 2; s[0]= 0, s[1]= fill, s+= 2, l-= 2);
+  char buf[10];
+  int buflen;
+
+  DBUG_ASSERT((slen % 2) == 0);
+
+  buflen= cs->cset->wc_mb(cs, (my_wc_t) fill, (uchar*) buf,
+                          (uchar*) buf + sizeof(buf));
+
+  DBUG_ASSERT(buflen > 0);
+
+  while (slen >= (size_t) buflen)
+  {
+    /* Enough space for the characer */
+    memcpy(s, buf, (size_t) buflen);
+    s+= buflen;
+    slen-= buflen;
+  }
+
+  /* 
+    If there are some more space which is not enough
+    for the whole multibyte character, then add trailing zeros.
+  */
+  for ( ; slen; slen--)
+  {
+    *s++= 0x00;
+  }  
 }
 
 
@@ -1564,108 +1588,6 @@ my_hash_sort_utf16_bin(CHARSET_INFO *cs 
 }
 
 
-/**
-   Calculate min_str and max_str that ranges a LIKE string.
-
-   @param ptr        Pointer to LIKE pattern.
-   @param ptr_length Length of LIKE pattern.
-   @param escape     Escape character in LIKE.  (Normally '\').
-                     All escape characters should be removed
-                     from min_str and max_str.
-   @param res_length Length of min_str and max_str.
-   @param min_str    Smallest case sensitive string that ranges LIKE.
-                     Should be space padded to res_length.
-   @param max_str    Largest case sensitive string that ranges LIKE.
-                     Normally padded with the biggest character sort value.
-
-   @return Optimization status.
-     @retval FALSE if LIKE pattern can be optimized
-     @rerval TRUE if LIKE can't be optimized.
-*/
-
-my_bool
-my_like_range_utf16(CHARSET_INFO *cs,
-                    const char *ptr, size_t ptr_length,
-                    pbool escape, pbool w_one, pbool w_many,
-                    size_t res_length,
-                    char *min_str,char *max_str,
-                    size_t *min_length,size_t *max_length)
-{
-  const char *end=ptr+ptr_length;
-  char *min_org= min_str;
-  char *min_end= min_str + res_length;
-  char *max_end= max_str + res_length;
-  size_t charlen= res_length / cs->mbmaxlen;
-  
-  for ( ; ptr + 1 < end && min_str + 1 < min_end && charlen > 0
-        ; ptr+=2, charlen--)
-  {
-    if (ptr[0] == '\0' && ptr[1] == escape && ptr + 1 < end)
-    {
-      ptr+=2;                                        /* Skip escape */
-      *min_str++= *max_str++ = ptr[0];
-      *min_str++= *max_str++ = ptr[1];
-      continue;
-    }
-    if (ptr[0] == '\0' && ptr[1] == w_one)        /* '_' in SQL */
-    {
-      int chlen;
-      *min_str++= (char) (cs->min_sort_char >> 8);
-      *min_str++= (char) (cs->min_sort_char & 255);
-      chlen= my_uni_utf16(cs, cs->max_sort_char, (uchar *) max_str,
-                          (uchar *) max_end);
-      if (chlen <= 0)
-        goto end;
-      max_str+= chlen;
-      continue;
-    }
-    if (ptr[0] == '\0' && ptr[1] == w_many)        /* '%' in SQL */
-    {
-      /*
-        Calculate length of keys:
-        'a\0\0... is the smallest possible string when we have space expand
-        a\ff\ff... is the biggest possible string
-      */
-      *min_length= ((cs->state & MY_CS_BINSORT) ? (size_t) (min_str - min_org) :
-                    res_length);
-      *max_length= res_length;
-      do {
-        int chlen;
-        *min_str++ = (char) (cs->min_sort_char >> 8);
-        *min_str++ = (char) (cs->min_sort_char & 255);
-        chlen= my_uni_utf16(cs, cs->max_sort_char, (uchar *) max_str,
-                            (uchar *) max_end);
-        if (chlen <= 0)
-          break;
-        max_str+= chlen;
-      } while (min_str + 1 < min_end);
-      return FALSE;
-    }
-    *min_str++= *max_str++ = ptr[0];
-    *min_str++= *max_str++ = ptr[1];
-  }
-
-  /* Temporary fix for handling w_one at end of string (key compression) */
-  {
-    char *tmp;
-    for (tmp= min_str ; tmp-1 > min_org && tmp[-1] == '\0' && tmp[-2]=='\0';)
-    {
-      *--tmp=' ';
-      *--tmp='\0';
-    }
-  }
-  
-end:
-  *min_length= *max_length = (size_t) (min_str - min_org);
-  while (min_str + 1 < min_end)
-  {
-    *min_str++ = *max_str++ = '\0';
-    *min_str++ = *max_str++ = ' ';      /* Because if key compression */
-  }
-  return FALSE;
-}
-
-
 static MY_COLLATION_HANDLER my_collation_utf16_general_ci_handler =
 {
   NULL,                /* init */
@@ -1673,7 +1595,7 @@ static MY_COLLATION_HANDLER my_collation
   my_strnncollsp_utf16,
   my_strnxfrm_unicode,
   my_strnxfrmlen_simple,
-  my_like_range_utf16,
+  my_like_range_generic,
   my_wildcmp_utf16_ci,
   my_strcasecmp_mb2_or_mb4,
   my_instr_mb,
@@ -1689,7 +1611,7 @@ static MY_COLLATION_HANDLER my_collation
   my_strnncollsp_utf16_bin,
   my_strnxfrm_unicode_full_bin,
   my_strnxfrmlen_unicode_full_bin,
-  my_like_range_utf16,
+  my_like_range_generic,
   my_wildcmp_utf16_bin,
   my_strcasecmp_mb2_or_mb4,
   my_instr_mb,
@@ -2564,113 +2486,6 @@ my_strnncollsp_utf32_bin(CHARSET_INFO *c
 }
 
 
-/**
-   Calculate min_str and max_str that ranges a LIKE string.
-
-   @param ptr        Pointer to LIKE pattern.
-   @param ptr_length Length of LIKE pattern.
-   @param escape     Escape character in LIKE.  (Normally '\').
-                     All escape characters should be removed
-                     from min_str and max_str.
-   @param res_length Length of min_str and max_str.
-   @param min_str    Smallest case sensitive string that ranges LIKE.
-                     Should be space padded to res_length.
-   @param max_str    Largest case sensitive string that ranges LIKE.
-                     Normally padded with the biggest character sort value.
-
-   @return Optimization status.
-     @retval FALSE if LIKE pattern can be optimized
-     @rerval TRUE if LIKE can't be optimized.
-*/
-
-my_bool
-my_like_range_utf32(CHARSET_INFO *cs,
-                    const char *ptr, size_t ptr_length,
-                    pbool escape, pbool w_one, pbool w_many,
-                    size_t res_length,
-                    char *min_str,char *max_str,
-                    size_t *min_length,size_t *max_length)
-{
-  const char *end= ptr + ptr_length;
-  char *min_org= min_str;
-  char *min_end= min_str + res_length;
-  char *max_end= max_str + res_length;
-  size_t charlen= res_length / cs->mbmaxlen;
-  
-  DBUG_ASSERT((res_length % 4) == 0);
-  
-  for ( ; charlen > 0; ptr+= 4, charlen--)
-  {
-    my_wc_t wc;
-    int res;
-    if ((res= my_utf32_uni(cs, &wc, (uchar*) ptr, (uchar*) end)) < 0)
-    {
-      my_fill_utf32(cs, min_str, min_end - min_str, cs->min_sort_char);
-      my_fill_utf32(cs, max_str, min_end - min_str, cs->max_sort_char);
-      /* min_length and max_legnth are not important */
-      return TRUE;
-    }
-    
-    if (wc == (my_wc_t) escape)
-    {
-      ptr+= 4;                                  /* Skip escape */
-      if ((res= my_utf32_uni(cs, &wc, (uchar*) ptr, (uchar*) end)) < 0)
-      {
-        my_fill_utf32(cs, min_str, min_end - min_str, cs->min_sort_char);
-        my_fill_utf32(cs, max_str, max_end - min_str, cs->max_sort_char);
-        /* min_length and max_length are not important */
-        return TRUE;
-      }
-      if (my_uni_utf32(cs, wc, (uchar*) min_str, (uchar*) min_end) != 4 ||
-          my_uni_utf32(cs, wc, (uchar*) max_str, (uchar*) max_end) != 4)
-        goto pad_set_lengths;
-      *min_str++= 4;
-      *max_str++= 4;
-      continue;
-    }
-    
-    if (wc == (my_wc_t) w_one)
-    {
-      if (my_uni_utf32(cs, cs->min_sort_char, (uchar*) min_str, (uchar*) min_end) != 4 ||
-          my_uni_utf32(cs, cs->max_sort_char, (uchar*) max_str, (uchar*) max_end) != 4)
-        goto pad_set_lengths;
-      min_str+= 4;
-      max_str+= 4;
-      continue;
-    }
-    
-    if (wc == (my_wc_t) w_many)
-    {
-      /*
-        Calculate length of keys:
-        'a\0\0... is the smallest possible string when we have space expand
-        a\ff\ff... is the biggest possible string
-      */
-      *min_length= ((cs->state & MY_CS_BINSORT) ?
-                    (size_t) (min_str - min_org) :
-                    res_length);
-      *max_length= res_length;
-      goto pad_min_max;
-    }
-    
-    /* Normal character */
-    if (my_uni_utf32(cs, wc, (uchar*) min_str, (uchar*) min_end) != 4 ||
-        my_uni_utf32(cs, wc, (uchar*) max_str, (uchar*) max_end) != 4)
-      goto pad_set_lengths;
-    min_str+= 4;
-    max_str+= 4;
-  }
-
-pad_set_lengths:
-  *min_length= *max_length= (size_t) (min_str - min_org);
-
-pad_min_max:
-  my_fill_utf32(cs, min_str, min_end - min_str, cs->min_sort_char);
-  my_fill_utf32(cs, max_str, max_end - max_str, cs->max_sort_char);
-  return FALSE;
-}
-
-
 static size_t
 my_scan_utf32(CHARSET_INFO *cs,
               const char *str, const char *end, int sequence_type)
@@ -2702,7 +2517,7 @@ static MY_COLLATION_HANDLER my_collation
   my_strnncollsp_utf32,
   my_strnxfrm_unicode,
   my_strnxfrmlen_utf32,
-  my_like_range_utf32,
+  my_like_range_generic,
   my_wildcmp_utf32_ci,
   my_strcasecmp_mb2_or_mb4,
   my_instr_mb,
@@ -2718,7 +2533,7 @@ static MY_COLLATION_HANDLER my_collation
   my_strnncollsp_utf32_bin,
   my_strnxfrm_unicode_full_bin,
   my_strnxfrmlen_unicode_full_bin,
-  my_like_range_utf32,
+  my_like_range_generic,
   my_wildcmp_utf32_bin,
   my_strcasecmp_mb2_or_mb4,
   my_instr_mb,
@@ -3007,6 +2822,15 @@ static size_t my_casedn_ucs2(CHARSET_INF
 }
 
 
+static void
+my_fill_ucs2(CHARSET_INFO *cs __attribute__((unused)), 
+             char *s, size_t l, int fill)
+{
+  DBUG_ASSERT(fill <= 0xFFFF);
+  for ( ; l >= 2; s[0]= (fill >> 8), s[1]= (fill & 0xFF), s+= 2, l-= 2);
+}
+
+
 static int my_strnncoll_ucs2(CHARSET_INFO *cs, 
 			     const uchar *s, size_t slen, 
                              const uchar *t, size_t tlen,
@@ -3289,122 +3113,6 @@ void my_hash_sort_ucs2_bin(CHARSET_INFO 
   }
 }
 
-/*
-** Calculate min_str and max_str that ranges a LIKE string.
-** Arguments:
-** ptr		Pointer to LIKE string.
-** ptr_length	Length of LIKE string.
-** escape	Escape character in LIKE.  (Normally '\').
-**		All escape characters should be removed from min_str and max_str
-** res_length	Length of min_str and max_str.
-** min_str	Smallest case sensitive string that ranges LIKE.
-**		Should be space padded to res_length.
-** max_str	Largest case sensitive string that ranges LIKE.
-**		Normally padded with the biggest character sort value.
-**
-** The function should return 0 if ok and 1 if the LIKE string can't be
-** optimized !
-*/
-
-my_bool my_like_range_ucs2(CHARSET_INFO *cs,
-			   const char *ptr, size_t ptr_length,
-			   pbool escape, pbool w_one, pbool w_many,
-			   size_t res_length,
-			   char *min_str,char *max_str,
-			   size_t *min_length,size_t *max_length)
-{
-  const char *end=ptr+ptr_length;
-  char *min_org=min_str;
-  char *min_end=min_str+res_length;
-  size_t charlen= res_length / cs->mbmaxlen;
-  my_bool have_contractions= my_uca_have_contractions(cs->uca);
-  
-  for ( ; ptr + 1 < end && min_str + 1 < min_end && charlen > 0
-        ; ptr+=2, charlen--)
-  {
-    if (ptr[0] == '\0' && ptr[1] == escape && ptr + 1 < end)
-    {
-      ptr+=2;					/* Skip escape */
-      *min_str++= *max_str++ = ptr[0];
-      *min_str++= *max_str++ = ptr[1];
-      continue;
-    }
-    if (ptr[0] == '\0' && ptr[1] == w_one)	/* '_' in SQL */
-    {
-      *min_str++= (char) (cs->min_sort_char >> 8);
-      *min_str++= (char) (cs->min_sort_char & 255);
-      *max_str++= (char) (cs->max_sort_char >> 8);
-      *max_str++= (char) (cs->max_sort_char & 255);
-      continue;
-    }
-    if (ptr[0] == '\0' && ptr[1] == w_many)	/* '%' in SQL */
-    {
-fill_max_and_min:
-      /*
-        Calculate length of keys:
-        'a\0\0... is the smallest possible string when we have space expand
-        a\ff\ff... is the biggest possible string
-      */
-      *min_length= ((cs->state & MY_CS_BINSORT) ? (size_t) (min_str - min_org) :
-                    res_length);
-      *max_length= res_length;
-      do {
-        *min_str++ = 0;
-	*min_str++ = 0;
-	*max_str++ = (char) (cs->max_sort_char >> 8);
-	*max_str++ = (char) (cs->max_sort_char & 255);
-      } while (min_str + 1 < min_end);
-      return 0;
-    }
-
-    if (have_contractions && ptr + 3 < end &&
-        ptr[0] == '\0' &&
-        my_uca_can_be_contraction_head(cs->uca, (uchar) ptr[1]))
-    {
-      /* Contraction head found */
-      if (ptr[2] == '\0' && (ptr[3] == w_one || ptr[3] == w_many))
-      {
-        /* Contraction head followed by a wildcard, quit */
-        goto fill_max_and_min;
-      }
-      
-      /*
-        Check if the second letter can be contraction part,
-        and if two letters really produce a contraction.
-      */
-      if (ptr[2] == '\0' &&
-          my_uca_can_be_contraction_tail(cs->uca, (uchar) ptr[3]) &&
-          my_uca_contraction2_weight(cs->uca,
-                                     (uchar) ptr[1], (uchar) ptr[3]))
-      {
-        /* Contraction found */
-        if (charlen == 1 || min_str + 2 >= min_end)
-        {
-          /* Full contraction doesn't fit, quit */
-          goto fill_max_and_min;
-        }
-        
-        /* Put contraction head */
-        *min_str++= *max_str++= *ptr++;
-        *min_str++= *max_str++= *ptr++;
-        charlen--;
-      }
-    }
-    /* Put contraction tail, or a single character */
-    *min_str++= *max_str++ = ptr[0];
-    *min_str++= *max_str++ = ptr[1];
-  }
-
-  *min_length= *max_length = (size_t) (min_str - min_org);
-  while (min_str + 1 < min_end)
-  {
-    *min_str++ = *max_str++ = '\0';
-    *min_str++ = *max_str++ = ' ';      /* Because if key compression */
-  }
-  return 0;
-}
-
-
 
 static MY_COLLATION_HANDLER my_collation_ucs2_general_ci_handler =
 {
@@ -3413,7 +3121,7 @@ static MY_COLLATION_HANDLER my_collation
     my_strnncollsp_ucs2,
     my_strnxfrm_unicode,
     my_strnxfrmlen_simple,
-    my_like_range_ucs2,
+    my_like_range_generic,
     my_wildcmp_ucs2_ci,
     my_strcasecmp_mb2_or_mb4,
     my_instr_mb,
@@ -3429,7 +3137,7 @@ static MY_COLLATION_HANDLER my_collation
     my_strnncollsp_ucs2_bin,
     my_strnxfrm_unicode,
     my_strnxfrmlen_simple,
-    my_like_range_ucs2,
+    my_like_range_generic,
     my_wildcmp_ucs2_bin,
     my_strcasecmp_mb2_or_mb4,
     my_instr_mb,
@@ -3458,7 +3166,7 @@ MY_CHARSET_HANDLER my_charset_ucs2_handl
     my_snprintf_mb2,
     my_l10tostr_mb2_or_mb4,
     my_ll10tostr_mb2_or_mb4,
-    my_fill_mb2,
+    my_fill_ucs2,
     my_strntol_mb2_or_mb4,
     my_strntoul_mb2_or_mb4,
     my_strntoll_mb2_or_mb4,

No bundle (reason: revision is a merge).
Thread
bzr commit into mysql-trunk-bugfixing branch (Georgi.Kodinov:3398) Georgi Kodinov26 Nov