[Commits] bzr commit into MariaDB 5.1, with Maria 1.5:maria branch (monty:2979)

Michael Widenius michael.widenius at gmail.com
Mon Nov 29 11:56:31 EET 2010


#At lp:maria based on revid:sanja at askmonty.org-20101123184334-vat0hpjgjct10jgv

 2979 Michael Widenius	2010-11-29 [merge]
      Automatic merge with 5.1-release
      removed:
        mysql-test/include/percona_query_cache_with_comments.inc
        mysql-test/include/percona_query_cache_with_comments_begin.inc
        mysql-test/include/percona_query_cache_with_comments_clear.inc
        mysql-test/include/percona_query_cache_with_comments_end.inc
        mysql-test/include/percona_query_cache_with_comments_eval.inc
        mysql-test/include/percona_query_cache_with_comments_show.inc
        mysql-test/include/percona_query_response_time_flush.inc
        mysql-test/include/percona_query_response_time_show.inc
        mysql-test/include/percona_query_response_time_sleep.inc
        mysql-test/suite/percona/percona_innodb_buffer_pool_shm-master.opt
        mysql-test/suite/percona/percona_innodb_buffer_pool_shm.result
        mysql-test/suite/percona/percona_innodb_buffer_pool_shm.test
        mysql-test/suite/percona/percona_log_connection_error.result
        mysql-test/suite/percona/percona_log_connection_error.test
        mysql-test/suite/percona/percona_log_slow_slave_statements-and-use_global_long_query_time-master.opt
        mysql-test/suite/percona/percona_log_slow_slave_statements-and-use_global_long_query_time-slave.opt
        mysql-test/suite/percona/percona_log_slow_slave_statements-and-use_global_long_query_time.result
        mysql-test/suite/percona/percona_log_slow_slave_statements-and-use_global_long_query_time.test
        mysql-test/suite/percona/percona_log_slow_slave_statements-master.opt
        mysql-test/suite/percona/percona_log_slow_slave_statements-slave.opt
        mysql-test/suite/percona/percona_log_slow_slave_statements.result
        mysql-test/suite/percona/percona_log_slow_slave_statements.test
        mysql-test/suite/percona/percona_query_cache_with_comments.inc.backup
        mysql-test/suite/percona/percona_query_cache_with_comments.result
        mysql-test/suite/percona/percona_query_cache_with_comments.test
        mysql-test/suite/percona/percona_query_cache_with_comments_crash.result
        mysql-test/suite/percona/percona_query_cache_with_comments_crash.test
        mysql-test/suite/percona/percona_query_cache_with_comments_disable.result
        mysql-test/suite/percona/percona_query_cache_with_comments_disable.test
        mysql-test/suite/percona/percona_query_cache_with_comments_prepared_statements.result
        mysql-test/suite/percona/percona_query_cache_with_comments_prepared_statements.test
        mysql-test/suite/percona/percona_query_response_time-replication.result
        mysql-test/suite/percona/percona_query_response_time-replication.test
        mysql-test/suite/percona/percona_query_response_time-stored.result
        mysql-test/suite/percona/percona_query_response_time-stored.test
        mysql-test/suite/percona/percona_query_response_time.result
        mysql-test/suite/percona/percona_query_response_time.test
        mysql-test/suite/percona/percona_slave_innodb_stats-master.opt
        mysql-test/suite/percona/percona_slave_innodb_stats-slave.opt
        mysql-test/suite/percona/percona_slave_innodb_stats.result
        mysql-test/suite/percona/percona_slave_innodb_stats.test
        mysql-test/suite/percona/percona_slow_query_log-control_global_slow-master.opt
        mysql-test/suite/percona/percona_slow_query_log-control_global_slow.result
        mysql-test/suite/percona/percona_slow_query_log-control_global_slow.test
        mysql-test/suite/percona/percona_slow_query_log-log_slow_filter-master.opt
        mysql-test/suite/percona/percona_slow_query_log-log_slow_filter.result
        mysql-test/suite/percona/percona_slow_query_log-log_slow_filter.test
        mysql-test/suite/percona/percona_slow_query_log-log_slow_verbosity-master.opt
        mysql-test/suite/percona/percona_slow_query_log-log_slow_verbosity.result
        mysql-test/suite/percona/percona_slow_query_log-log_slow_verbosity.test
        mysql-test/suite/percona/percona_slow_query_log-long_query_time-master.opt
        mysql-test/suite/percona/percona_slow_query_log-long_query_time.result
        mysql-test/suite/percona/percona_slow_query_log-long_query_time.test
        mysql-test/suite/percona/percona_slow_query_log-microseconds_in_slow_query_log-master.opt
        mysql-test/suite/percona/percona_slow_query_log-microseconds_in_slow_query_log.result
        mysql-test/suite/percona/percona_slow_query_log-microseconds_in_slow_query_log.test
        mysql-test/suite/percona/percona_slow_query_log-min_examined_row_limit-master.opt
        mysql-test/suite/percona/percona_slow_query_log-min_examined_row_limit.result
        mysql-test/suite/percona/percona_slow_query_log-min_examined_row_limit.test
        mysql-test/suite/percona/percona_slow_query_log-use_global_long_query_time-master.opt
        mysql-test/suite/percona/percona_slow_query_log-use_global_long_query_time.result
        mysql-test/suite/percona/percona_slow_query_log-use_global_long_query_time.test
        mysql-test/suite/percona/percona_sql_no_fcache.result
        mysql-test/suite/percona/percona_sql_no_fcache.test
        mysql-test/suite/percona/percona_status_wait_query_cache_mutex.result
        mysql-test/suite/percona/percona_status_wait_query_cache_mutex.test
        mysql-test/suite/rpl/t/rpl_binlog_max_cache_size-master.opt
      added:
        mysql-test/extra/rpl_tests/rpl_stop_slave.test
        mysql-test/r/lowercase_table4.result
        mysql-test/r/partition_binlog_stmt.result
        mysql-test/suite/innodb/r/innodb_bug56143.result
        mysql-test/suite/innodb/r/innodb_bug56680.result
        mysql-test/suite/innodb/r/innodb_bug56716.result
        mysql-test/suite/innodb/r/innodb_bug57252.result
        mysql-test/suite/innodb/r/innodb_bug57255.result
        mysql-test/suite/innodb/t/innodb_bug56143.test
        mysql-test/suite/innodb/t/innodb_bug56680.test
        mysql-test/suite/innodb/t/innodb_bug56716.test
        mysql-test/suite/innodb/t/innodb_bug57252.test
        mysql-test/suite/innodb/t/innodb_bug57255.test
        mysql-test/suite/innodb_plugin/r/innodb_bug53756.result
        mysql-test/suite/innodb_plugin/r/innodb_bug56143.result
        mysql-test/suite/innodb_plugin/r/innodb_bug56632.result
        mysql-test/suite/innodb_plugin/r/innodb_bug56680.result
        mysql-test/suite/innodb_plugin/r/innodb_bug56716.result
        mysql-test/suite/innodb_plugin/r/innodb_bug56947.result
        mysql-test/suite/innodb_plugin/r/innodb_bug57252.result
        mysql-test/suite/innodb_plugin/r/innodb_bug57255.result
        mysql-test/suite/innodb_plugin/t/innodb_bug53756-master.opt
        mysql-test/suite/innodb_plugin/t/innodb_bug53756.test
        mysql-test/suite/innodb_plugin/t/innodb_bug56143.test
        mysql-test/suite/innodb_plugin/t/innodb_bug56632.test
        mysql-test/suite/innodb_plugin/t/innodb_bug56680.test
        mysql-test/suite/innodb_plugin/t/innodb_bug56716.test
        mysql-test/suite/innodb_plugin/t/innodb_bug56947.test
        mysql-test/suite/innodb_plugin/t/innodb_bug57252.test
        mysql-test/suite/innodb_plugin/t/innodb_bug57255.test
        mysql-test/suite/percona/query_cache_enhance.patch/
        mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments.inc
        mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments.inc.backup
        mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments.result
        mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments.test
        mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments_begin.inc
        mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments_clear.inc
        mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments_crash.result
        mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments_crash.test
        mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments_disable.result
        mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments_disable.test
        mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments_end.inc
        mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments_eval.inc
        mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments_prepared_statements.result
        mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments_prepared_statements.test
        mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments_show.inc
        mysql-test/suite/percona/query_cache_enhance.patch/percona_status_wait_query_cache_mutex.result
        mysql-test/suite/percona/query_cache_enhance.patch/percona_status_wait_query_cache_mutex.test
        mysql-test/suite/percona/slow_extended.patch/
        mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-control_global_slow-master.opt
        mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-control_global_slow.result
        mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-control_global_slow.test
        mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-log_slow_filter-master.opt
        mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-log_slow_filter.result
        mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-log_slow_filter.test
        mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-log_slow_verbosity-master.opt
        mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-log_slow_verbosity.result
        mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-log_slow_verbosity.test
        mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-long_query_time-master.opt
        mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-long_query_time.result
        mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-long_query_time.test
        mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended-master.opt
        mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended.result
        mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended.test
        mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-min_examined_row_limit-master.opt
        mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-min_examined_row_limit.result
        mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-min_examined_row_limit.test
        mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-slave_innodb_stats-master.opt
        mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-slave_innodb_stats-slave.opt
        mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-slave_innodb_stats.result
        mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-slave_innodb_stats.test
        mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time-master.opt
        mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time-slave.opt
        mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.result
        mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.test
        mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-slave_statements-master.opt
        mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-slave_statements-slave.opt
        mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-slave_statements.result
        mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-slave_statements.test
        mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-use_global_long_query_time-master.opt
        mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-use_global_long_query_time.result
        mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-use_global_long_query_time.test
        mysql-test/suite/percona/slow_extended.patch/show_slave_status_nolock.patch/
        mysql-test/suite/percona/slow_extended.patch/show_slave_status_nolock.patch/percona_show_slave_status_nolock.result
        mysql-test/suite/percona/slow_extended.patch/show_slave_status_nolock.patch/percona_show_slave_status_nolock.test
        mysql-test/suite/rpl/r/rpl_stop_slave.result
        mysql-test/suite/rpl/t/rpl_stop_slave.test
        mysql-test/t/lowercase_table4-master.opt
        mysql-test/t/lowercase_table4.test
        mysql-test/t/partition_binlog_stmt.test
      modified:
        BUILD/SETUP.sh
        BUILD/build_mccge.sh
        BUILD/check-cpu
        client/mysql.cc
        client/mysqltest.cc
        client/sql_string.h
        cmd-line-utils/libedit/common.c
        cmd-line-utils/libedit/readline.c
        cmd-line-utils/libedit/vi.c
        cmd-line-utils/readline/Makefile.am
        cmd-line-utils/readline/complete.c
        cmd-line-utils/readline/histfile.c
        cmd-line-utils/readline/isearch.c
        cmd-line-utils/readline/parens.c
        cmd-line-utils/readline/readline.c
        cmd-line-utils/readline/terminal.c
        cmd-line-utils/readline/text.c
        config/ac-macros/maintainer.m4
        configure.in
        dbug/dbug.c
        extra/libevent/epoll.c
        extra/libevent/evbuffer.c
        extra/libevent/event.c
        extra/libevent/evutil.h
        extra/libevent/kqueue.c
        extra/libevent/signal.c
        extra/yassl/Makefile.am
        extra/yassl/src/Makefile.am
        extra/yassl/taocrypt/Makefile.am
        extra/yassl/taocrypt/benchmark/Makefile.am
        extra/yassl/taocrypt/src/Makefile.am
        extra/yassl/taocrypt/test/Makefile.am
        extra/yassl/testsuite/Makefile.am
        include/my_compiler.h
        include/my_dbug.h
        include/my_pthread.h
        include/mysql.h
        include/mysql.h.pp
        include/sha1.h
        libmysql/Makefile.shared
        libmysql/libmysql.c
        libmysqld/examples/Makefile.am
        mysql-test/collections/default.daily
        mysql-test/collections/default.experimental
        mysql-test/extra/rpl_tests/rpl_get_master_version_and_clock.test
        mysql-test/extra/rpl_tests/rpl_loaddata.test
        mysql-test/include/check_concurrent_insert.inc
        mysql-test/include/check_no_concurrent_insert.inc
        mysql-test/include/get_relay_log_pos.inc
        mysql-test/include/have_not_innodb_plugin.inc
        mysql-test/include/index_merge2.inc
        mysql-test/include/index_merge_ror_cpk.inc
        mysql-test/include/kill_query.inc
        mysql-test/include/kill_query_and_diff_master_slave.inc
        mysql-test/include/setup_fake_relay_log.inc
        mysql-test/include/show_binlog_events.inc
        mysql-test/include/show_rpl_debug_info.inc
        mysql-test/include/wait_for_slave_io_error.inc
        mysql-test/include/wait_for_slave_param.inc
        mysql-test/include/wait_for_slave_sql_error.inc
        mysql-test/include/wait_for_status_var.inc
        mysql-test/lib/My/SafeProcess/Makefile.am
        mysql-test/lib/mtr_cases.pm
        mysql-test/mysql-test-run.pl
        mysql-test/r/ctype_utf8.result
        mysql-test/r/explain.result
        mysql-test/r/fulltext.result
        mysql-test/r/func_gconcat.result
        mysql-test/r/func_math.result
        mysql-test/r/func_misc.result
        mysql-test/r/grant.result
        mysql-test/r/grant3.result
        mysql-test/r/group_by.result
        mysql-test/r/index_merge_innodb.result
        mysql-test/r/index_merge_myisam.result
        mysql-test/r/join_outer.result
        mysql-test/r/merge.result
        mysql-test/r/multi_update.result
        mysql-test/r/mysqltest.result
        mysql-test/r/order_by.result
        mysql-test/r/partition.result
        mysql-test/r/partition_error.result
        mysql-test/r/partition_hash.result
        mysql-test/r/partition_innodb.result
        mysql-test/r/partition_pruning.result
        mysql-test/r/partition_range.result
        mysql-test/r/ps.result
        mysql-test/r/ps_2myisam.result
        mysql-test/r/ps_3innodb.result
        mysql-test/r/ps_4heap.result
        mysql-test/r/ps_5merge.result
        mysql-test/r/row.result
        mysql-test/r/subselect.result
        mysql-test/r/subselect4.result
        mysql-test/r/trigger_notembedded.result
        mysql-test/r/type_timestamp.result
        mysql-test/r/variables_debug.result
        mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result
        mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result
        mysql-test/suite/binlog/t/disabled.def
        mysql-test/suite/innodb/r/innodb_mysql.result
        mysql-test/suite/innodb/t/innodb_bug53756.test
        mysql-test/suite/innodb/t/innodb_mysql.test
        mysql-test/suite/innodb_plugin/r/innodb_mysql.result
        mysql-test/suite/innodb_plugin/t/innodb_mysql.test
        mysql-test/suite/maria/r/ps_maria.result
        mysql-test/suite/ndb/r/ps_7ndb.result
        mysql-test/suite/parts/r/partition_alter3_innodb.result
        mysql-test/suite/parts/r/partition_alter3_myisam.result
        mysql-test/suite/pbxt/r/partition_hash.result
        mysql-test/suite/pbxt/r/partition_pruning.result
        mysql-test/suite/pbxt/r/partition_range.result
        mysql-test/suite/pbxt/r/subselect.result
        mysql-test/suite/percona/percona_server_variables.result
        mysql-test/suite/rpl/r/rpl_alter.result
        mysql-test/suite/rpl/r/rpl_begin_commit_rollback.result
        mysql-test/suite/rpl/r/rpl_binlog_max_cache_size.result
        mysql-test/suite/rpl/r/rpl_do_grant.result
        mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result
        mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result
        mysql-test/suite/rpl/t/disabled.def
        mysql-test/suite/rpl/t/rpl_alter.test
        mysql-test/suite/rpl/t/rpl_binlog_max_cache_size.test
        mysql-test/suite/rpl/t/rpl_do_grant.test
        mysql-test/suite/rpl/t/rpl_killed_ddl.test
        mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test
        mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test
        mysql-test/suite/sys_vars/t/secure_file_priv.test
        mysql-test/t/ctype_utf8.test
        mysql-test/t/disabled.def
        mysql-test/t/explain.test
        mysql-test/t/fulltext.test
        mysql-test/t/func_gconcat.test
        mysql-test/t/func_math.test
        mysql-test/t/func_misc.test
        mysql-test/t/grant.test
        mysql-test/t/grant3.test
        mysql-test/t/group_by.test
        mysql-test/t/join_outer.test
        mysql-test/t/merge.test
        mysql-test/t/multi_update.test
        mysql-test/t/mysqltest.test
        mysql-test/t/order_by.test
        mysql-test/t/partition.test
        mysql-test/t/partition_error.test
        mysql-test/t/partition_innodb.test
        mysql-test/t/partition_pruning.test
        mysql-test/t/ps.test
        mysql-test/t/row.test
        mysql-test/t/subselect4.test
        mysql-test/t/trigger_notembedded.test
        mysql-test/t/type_timestamp.test
        mysql-test/t/variables_debug.test
        mysql-test/t/wait_timeout.test
        mysys/my_gethostbyname.c
        mysys/my_gethwaddr.c
        mysys/my_getopt.c
        mysys/my_symlink.c
        mysys/my_sync.c
        mysys/sha1.c
        mysys/thr_mutex.c
        plugin/daemon_example/Makefile.am
        plugin/fulltext/Makefile.am
        pstack/aout/Makefile.am
        server-tools/instance-manager/Makefile.am
        sql/ha_ndbcluster.cc
        sql/ha_partition.cc
        sql/ha_partition.h
        sql/handler.cc
        sql/item.cc
        sql/item.h
        sql/item_cmpfunc.cc
        sql/item_func.cc
        sql/item_func.h
        sql/item_strfunc.cc
        sql/item_subselect.cc
        sql/item_sum.cc
        sql/item_timefunc.cc
        sql/item_timefunc.h
        sql/lock.cc
        sql/log.cc
        sql/log_event.cc
        sql/log_event.h
        sql/my_decimal.h
        sql/mysql_priv.h
        sql/net_serv.cc
        sql/opt_range.cc
        sql/opt_range.h
        sql/rpl_record.cc
        sql/rpl_rli.h
        sql/set_var.cc
        sql/share/Makefile.am
        sql/slave.cc
        sql/sql_acl.cc
        sql/sql_base.cc
        sql/sql_cache.cc
        sql/sql_class.cc
        sql/sql_class.h
        sql/sql_db.cc
        sql/sql_help.cc
        sql/sql_insert.cc
        sql/sql_load.cc
        sql/sql_parse.cc
        sql/sql_partition.cc
        sql/sql_prepare.cc
        sql/sql_select.cc
        sql/sql_string.h
        sql/sql_table.cc
        sql/sql_trigger.cc
        sql/sql_union.cc
        sql/sql_update.cc
        sql/sql_yacc.yy
        sql/table.cc
        sql/table.h
        storage/archive/Makefile.am
        storage/blackhole/Makefile.am
        storage/csv/Makefile.am
        storage/example/Makefile.am
        storage/federated/Makefile.am
        storage/federatedx/Makefile.am
        storage/heap/Makefile.am
        storage/ibmdb2i/Makefile.am
        storage/innobase/Makefile.am
        storage/innobase/btr/btr0btr.c
        storage/innobase/btr/btr0cur.c
        storage/innobase/btr/btr0pcur.c
        storage/innobase/btr/btr0sea.c
        storage/innobase/buf/buf0buf.c
        storage/innobase/buf/buf0flu.c
        storage/innobase/buf/buf0lru.c
        storage/innobase/dict/dict0load.c
        storage/innobase/eval/eval0eval.c
        storage/innobase/handler/ha_innodb.cc
        storage/innobase/handler/ha_innodb.h
        storage/innobase/ibuf/ibuf0ibuf.c
        storage/innobase/include/buf0flu.h
        storage/innobase/include/buf0lru.h
        storage/innobase/include/ibuf0ibuf.h
        storage/innobase/include/rem0rec.h
        storage/innobase/include/rem0rec.ic
        storage/innobase/include/row0mysql.h
        storage/innobase/include/row0upd.h
        storage/innobase/include/ut0dbg.h
        storage/innobase/include/ut0rnd.ic
        storage/innobase/lock/lock0lock.c
        storage/innobase/log/log0recv.c
        storage/innobase/os/os0file.c
        storage/innobase/que/que0que.c
        storage/innobase/row/row0mysql.c
        storage/innobase/row/row0purge.c
        storage/innobase/row/row0sel.c
        storage/innobase/row/row0umod.c
        storage/innobase/row/row0upd.c
        storage/innobase/row/row0vers.c
        storage/innobase/trx/trx0purge.c
        storage/innobase/trx/trx0roll.c
        storage/innobase/trx/trx0sys.c
        storage/innobase/trx/trx0trx.c
        storage/innobase/trx/trx0undo.c
        storage/innodb_plugin/ChangeLog
        storage/innodb_plugin/Makefile.am
        storage/innodb_plugin/btr/btr0btr.c
        storage/innodb_plugin/btr/btr0cur.c
        storage/innodb_plugin/btr/btr0pcur.c
        storage/innodb_plugin/btr/btr0sea.c
        storage/innodb_plugin/buf/buf0buf.c
        storage/innodb_plugin/buf/buf0flu.c
        storage/innodb_plugin/dict/dict0crea.c
        storage/innodb_plugin/dict/dict0dict.c
        storage/innodb_plugin/dict/dict0load.c
        storage/innodb_plugin/eval/eval0eval.c
        storage/innodb_plugin/handler/ha_innodb.cc
        storage/innodb_plugin/handler/ha_innodb.h
        storage/innodb_plugin/handler/i_s.cc
        storage/innodb_plugin/ibuf/ibuf0ibuf.c
        storage/innodb_plugin/include/btr0cur.h
        storage/innodb_plugin/include/buf0flu.h
        storage/innodb_plugin/include/ibuf0ibuf.h
        storage/innodb_plugin/include/os0sync.h
        storage/innodb_plugin/include/row0mysql.h
        storage/innodb_plugin/include/row0upd.h
        storage/innodb_plugin/include/univ.i
        storage/innodb_plugin/include/ut0rnd.ic
        storage/innodb_plugin/log/log0recv.c
        storage/innodb_plugin/os/os0file.c
        storage/innodb_plugin/plug.in
        storage/innodb_plugin/que/que0que.c
        storage/innodb_plugin/row/row0mysql.c
        storage/innodb_plugin/row/row0purge.c
        storage/innodb_plugin/row/row0sel.c
        storage/innodb_plugin/row/row0umod.c
        storage/innodb_plugin/row/row0upd.c
        storage/innodb_plugin/row/row0vers.c
        storage/innodb_plugin/srv/srv0start.c
        storage/innodb_plugin/trx/trx0purge.c
        storage/innodb_plugin/trx/trx0roll.c
        storage/innodb_plugin/trx/trx0sys.c
        storage/innodb_plugin/trx/trx0trx.c
        storage/innodb_plugin/trx/trx0undo.c
        storage/maria/Makefile.am
        storage/maria/unittest/Makefile.am
        storage/myisam/Makefile.am
        storage/myisam/mi_range.c
        storage/myisam/mi_search.c
        storage/myisam/rt_index.c
        storage/myisam/rt_split.c
        storage/myisammrg/Makefile.am
        storage/ndb/Makefile.am
        storage/ndb/docs/Makefile.am
        storage/ndb/include/Makefile.am
        storage/ndb/src/Makefile.am
        storage/ndb/src/common/Makefile.am
        storage/ndb/src/common/debugger/Makefile.am
        storage/ndb/src/common/debugger/signaldata/Makefile.am
        storage/ndb/src/common/logger/Makefile.am
        storage/ndb/src/common/mgmcommon/Makefile.am
        storage/ndb/src/common/portlib/Makefile.am
        storage/ndb/src/common/transporter/Makefile.am
        storage/ndb/src/common/util/Makefile.am
        storage/ndb/src/cw/Makefile.am
        storage/ndb/src/cw/cpcd/Makefile.am
        storage/ndb/src/kernel/Makefile.am
        storage/ndb/src/kernel/blocks/Makefile.am
        storage/ndb/src/kernel/blocks/backup/Makefile.am
        storage/ndb/src/kernel/blocks/dbdict/Makefile.am
        storage/ndb/src/kernel/blocks/dbdih/Makefile.am
        storage/ndb/src/kernel/blocks/dblqh/Makefile.am
        storage/ndb/src/kernel/blocks/dbtup/Makefile.am
        storage/ndb/src/kernel/error/Makefile.am
        storage/ndb/src/kernel/vm/Makefile.am
        storage/ndb/src/mgmapi/Makefile.am
        storage/ndb/src/mgmclient/Makefile.am
        storage/ndb/src/mgmsrv/Makefile.am
        storage/ndb/src/ndbapi/Makefile.am
        storage/ndb/test/Makefile.am
        storage/ndb/test/ndbapi/Makefile.am
        storage/ndb/test/ndbapi/bank/Makefile.am
        storage/ndb/test/run-test/Makefile.am
        storage/ndb/test/src/Makefile.am
        storage/ndb/test/tools/Makefile.am
        storage/ndb/tools/Makefile.am
        storage/pbxt/src/ha_pbxt.cc
        storage/pbxt/src/table_xt.cc
        storage/xtradb/ChangeLog
        storage/xtradb/Makefile.am
        storage/xtradb/btr/btr0btr.c
        storage/xtradb/btr/btr0cur.c
        storage/xtradb/btr/btr0pcur.c
        storage/xtradb/btr/btr0sea.c
        storage/xtradb/buf/buf0buf.c
        storage/xtradb/buf/buf0flu.c
        storage/xtradb/dict/dict0crea.c
        storage/xtradb/dict/dict0dict.c
        storage/xtradb/dict/dict0load.c
        storage/xtradb/eval/eval0eval.c
        storage/xtradb/ha/hash0hash.c
        storage/xtradb/handler/ha_innodb.cc
        storage/xtradb/handler/ha_innodb.h
        storage/xtradb/handler/i_s.cc
        storage/xtradb/handler/innodb_patch_info.h
        storage/xtradb/ibuf/ibuf0ibuf.c
        storage/xtradb/include/btr0cur.h
        storage/xtradb/include/buf0buf.h
        storage/xtradb/include/buf0flu.h
        storage/xtradb/include/hash0hash.h
        storage/xtradb/include/ibuf0ibuf.h
        storage/xtradb/include/os0proc.h
        storage/xtradb/include/os0sync.h
        storage/xtradb/include/row0mysql.h
        storage/xtradb/include/row0upd.h
        storage/xtradb/include/srv0srv.h
        storage/xtradb/include/univ.i
        storage/xtradb/include/ut0lst.h
        storage/xtradb/include/ut0rnd.ic
        storage/xtradb/log/log0recv.c
        storage/xtradb/os/os0file.c
        storage/xtradb/os/os0proc.c
        storage/xtradb/plug.in
        storage/xtradb/que/que0que.c
        storage/xtradb/row/row0mysql.c
        storage/xtradb/row/row0purge.c
        storage/xtradb/row/row0sel.c
        storage/xtradb/row/row0umod.c
        storage/xtradb/row/row0upd.c
        storage/xtradb/row/row0vers.c
        storage/xtradb/srv/srv0srv.c
        storage/xtradb/srv/srv0start.c
        storage/xtradb/sync/sync0rw.c
        storage/xtradb/sync/sync0sync.c
        storage/xtradb/trx/trx0purge.c
        storage/xtradb/trx/trx0roll.c
        storage/xtradb/trx/trx0sys.c
        storage/xtradb/trx/trx0trx.c
        storage/xtradb/trx/trx0undo.c
        support-files/MacOSX/Makefile.am
        support-files/RHEL4-SElinux/Makefile.am
        tests/mysql_client_test.c
        unittest/examples/Makefile.am
        unittest/examples/skip-t.c
        unittest/examples/skip_all-t.c
        unittest/examples/todo-t.c
        unittest/mysys/Makefile.am
        unittest/mytap/Makefile.am
        unittest/mytap/t/Makefile.am
        unittest/mytap/t/basic-t.c
        unittest/mytap/tap.c
        unittest/mytap/tap.h
        unittest/strings/Makefile.am

=== modified file 'BUILD/SETUP.sh'
--- a/BUILD/SETUP.sh	2010-08-27 14:12:44 +0000
+++ b/BUILD/SETUP.sh	2010-11-24 22:57:34 +0000
@@ -108,7 +108,7 @@ if [ "x$warning_mode" != "xpedantic" ];
 # C++ warnings
   cxx_warnings="$warnings -Wno-unused-parameter"
 # cxx_warnings="$cxx_warnings -Woverloaded-virtual -Wsign-promo"
-  cxx_warnings="$cxx_warnings -Wctor-dtor-privacy -Wnon-virtual-dtor"
+  cxx_warnings="$cxx_warnings -Wnon-virtual-dtor"
 # Added unless --with-debug=full
   debug_extra_cflags="-O0 -g3 -gdwarf-2"
 else

=== modified file 'BUILD/build_mccge.sh'
--- a/BUILD/build_mccge.sh	2010-08-02 09:01:24 +0000
+++ b/BUILD/build_mccge.sh	2010-11-23 21:39:59 +0000
@@ -63,41 +63,50 @@ sysadmin_usage()
 cat <<EOF
 
   This script can be used to build MySQL Cluster Carrier Grade Edition
-  based on a source code release you received from MySQL.
+  based on a source code release you received from MySQL. It can also
+  be used to build many variants other variants of MySQL, in particular
+  various performance-optimised versions of MySQL.
 
   It is assumed that you are building on a computer which is of the 
-  same type as that on which you intend to run MySQL Cluster.
+  same type as that on which you intend to run MySQL/MySQL Cluster.
 
   The simplest possible way to run this script is to allow it to use the 
-  built-in defaults everywhere, invoking it simply as:
+  built-in defaults everywhere, invoking it simply as (from top-level
+  MySQL directory):
 
-  shell> ./build_mccge.sh
+  shell> BUILD/build_mccge.sh
 
   This performs the following operations:
     1) Detects the operating system. Currently, Linux, FreeBSD, Solaris 
-      10/11, and Mac OS X are supported by this script.
+      8/9/10/11, and Mac OS X are supported by this script.
     2) Detect the type of CPU being used. Currently supported processors 
       are: x86 for all supported operating systems, Itanium for Linux 
-      with GCC, and SPARC for Solaris using the Forte compiler.
+      with GCC, and x86 + SPARC for Solaris using the Forte compiler and
+      finally x86 on Linux using the Intel compiler.
     3) Invokes the GCC compiler.
-    4) Builds a set of MySQL Cluster Carrier Grade Edition binaries; for
+    4) Builds a set of MySQL/MySQL Cluster binaries; for
       more information about these, see --extended-help.
+    5) Default compiler is always gcc.
   
   The default version assumes that you have a source code tarball from 
   which you are building, and thus autoconf and automake do not need to 
   be run. If you have downloaded a BitKeeper tree then you should read 
   --developer-help.
 
-  If you are building MySQL Cluster Carrier Grade Edition for commercial 
+  If you are building MySQL/MySQL Cluster for commercial 
   use then you need to set the --commercial flag to ensure that the 
   commercial libraries are compiled in, rather than the GPL-only 
   libraries. The default is to build a GPL version of MySQL Cluster 
   Carrier Grade Edition.
 
-  If your building on a Solaris SPARC machine you must set 
+  If your building on a Solaris SPARC machine and you want to compile
+  using SunStudio you must set 
   --compiler=forte; if you want to build using the Intel compiler on 
   Linux, you need to set --compiler=icc.
 
+  A synonym for forte is SunStudio, so one can also use
+  --compiler=SunStudio.
+
   If you want to make sure that a 64-bit version is built then you 
   should add the flag --64. This is always set on Solaris machines and 
   when check-cpu is able to discover that a 64-bit CPU is being used. If 
@@ -120,7 +129,7 @@ cat <<EOF
   information in the binary then use --debug.
 
   If your aim is not to build MySQL Cluster Carrier Grade Edition, you 
-  can also use this script to build MySQL Classic and MySQL Pro 
+  can also use this script to build MySQL Classic and MySQL Enterprise Pro 
   versions; see the --extended-help for descriptions of these packages.
 EOF
 }
@@ -133,13 +142,20 @@ Usage: $0 [options]
   --help                  Show this help message.
   --sysadmin-help         Show help for system administrators wishing 
                           to build MySQL Cluster Carrier Grade Edition
+                          or other MySQL versions.
   --developer-help        Show help for developers trying to build MySQL
   --with-help             Show extended help on --with-xxx options to 
                           configure
   --extended-help         Show extended help message
   --without-debug         Build non-debug version
+  --use-comment           Set the comment in the build
+  --with-fast-mutexes     Use try/retry method of acquiring mutex
   --with-debug            Build debug version
   --with-debug=full       Build with full debug.
+  --with-link-time-optimizer
+                          Link time optimizations enabled (Requires GCC 4.5
+                          if GCC used), available for icc as well. This flag
+                          is only considered if also fast is set.
   --configure-only        Stop after running configure.
   --use-autotools         Start by running autoconf, automake,.. tools
   --no-autotools          Start from configure
@@ -155,10 +171,10 @@ Usage: $0 [options]
                           MySQL use
   --commercial            Use commercial libraries
   --gpl                   Use gpl libraries
-  --compiler=[gcc|icc|forte]                  Select compiler
-  --cpu=[x86|x86_64|sparc]                    Select CPU type
-                          x86 => 32-bit binary
-                          x86_64 => 64 bit binary unless Mac OS X
+  --compiler=[gcc|icc|forte|SunStudio]        Select compiler
+  --cpu=[x86|x86_64|sparc|itanium]            Select CPU type
+                          x86 => x86 and 32-bit binary
+                          x86_64 => x86 and 64 bit binary
   --warning-mode=[extra|pedantic|normal|no]   Set warning mode level
   --warnings              Set warning mode to normal
   --32                    Build a 32-bit binary even if CPU is 64-bit
@@ -170,8 +186,9 @@ Usage: $0 [options]
   --error-inject          Enable error injection into MySQL Server and 
                           data nodes
   --valgrind              Build with valgrind
-  --fast                  Optimise for CPU architecture buildt on
+  --fast                  Optimise for CPU architecture built on
   --static-linking        Statically link system libraries into binaries
+  --use-tcmalloc          Link with tcmalloc instead of standard malloc (Linux only)
   --with-flags *          Pass extra --with-xxx options to configure
 EOF
   if test "x$1" != "x" ; then
@@ -186,13 +203,14 @@ extended_usage()
   Extended help text for this script:
   -----------------------------------
   This script is intended to make it easier for customers using MySQL
-  Cluster Carrier Grade Edition to build the product from source on 
-  these platforms/compilers: Linux/x86 (32-bit and 64-bit),
-  Solaris 10 and 11/x86/gcc, Solaris 9/Sparc/Forte, and MacOSX/x86/gcc. 
-  The script automatically detects CPU type and operating system; in 
-  most cases this also determines which compiler to use, the exception 
-  being Linux/x86 where you can choose between gcc and icc (gcc is the
-  default).
+  Cluster Carrier Grade Edition, customers using performance-optimised
+  MySQL versions and developers to build the product from source on 
+  these platforms/compilers: Linux/x86 (32-bit and 64-bit) (either using
+  gcc or icc), Linux Itanium, Solaris 8,9,10 and 11 x86 and SPARC using
+  gcc or SunStudio and MacOSX/x86/gcc.
+
+  The script automatically detects CPU type and operating system; The
+  default compiler is always gcc.
 
   To build on other platforms you can use the --print-only option on a
   supported platform and edit the output for a proper set of commands on
@@ -213,7 +231,7 @@ extended_usage()
 
   --package=cge
     storage engines:
-      ARCHIVE, BLACKHOLE, CSV, EXAMPLE, FEDERATED, MYISAM, NDB
+      ARCHIVE, BLACKHOLE, CSV, FEDERATED, MYISAM, NDB
       (All storage engines except InnoDB)
     comment: MySQL Cluster Carrier Grade Edition GPL/Commercial version 
              built from source
@@ -221,7 +239,7 @@ extended_usage()
 
   --package=extended
     storage engines:
-      ARCHIVE, BLACKHOLE, CSV, EXAMPLE, FEDERATED, MYISAM, INNODB, NDB
+      ARCHIVE, BLACKHOLE, CSV, FEDERATED, MYISAM, INNODB, NDB
       (All storage engines)
     comment: MySQL Cluster Carrier Grade Extended Edition GPL/Commercial 
              version built from source
@@ -229,7 +247,7 @@ extended_usage()
 
   --package=pro
     storage engines:
-      ARCHIVE, BLACKHOLE, CSV, EXAMPLE, FEDERATED, INNODB, MYISAM
+      ARCHIVE, BLACKHOLE, CSV, FEDERATED, INNODB, MYISAM
       (All storage engines except NDB)
     comment: MySQL Pro GPL/Commercial version built from 
              source
@@ -291,11 +309,16 @@ extended_usage()
     by MySQL (cannot be overridden).
 
   --with-ssl: Enable use of yaSSL library included in the MySQL source
+    if possible (GCC and same CC and CXX).
     (cannot be overridden).
 
   --with-pic: Build all binaries using position independent assembler
     to avoid problems with dynamic linkers (cannot be overridden).
 
+  --without-example-engine: Ensure that the example engine isn't built,
+    it cannot do any useful things, it's merely intended as documentation.
+    (cannot be overridden)
+
   --with-csv-storage-engine: Ensure that the CSV storage engine is
     included in all builds. Since CSV is required for log tables in
     MySQL 5.1, this option cannot be overridden.
@@ -314,10 +337,6 @@ extended_usage()
   In addition there are some configure options that are specific to
   Linux operating systems:
 
-  --with-fast-mutexes
-    Include an alternative implementation of mutexes that is faster on
-    Linux systems
-
   --enable-assembler
     Include assembler code optimisations for a number of mostly string
     methods. Used for x86 processors only.
@@ -364,17 +383,24 @@ extended_usage()
 
   --with-mysqld-libs=-lmtmalloc
     Used on Solaris to ensure that the proper malloc library is used.
+    Investigations have shown mtmalloc to be the best choice on Solaris,
+    also umem has good performance on Solaris but better debugging
+    capabilities.
 
   Compiler options:
   -----------------
 
-  This section describes the compiler options for each of the different
-  platforms supported by thisscript.
+    This section describes the compiler options for each of the different
+    platforms supported by this script.
+
+    The --fast option adds -mtune=cpu_arg to the C/C++ flags (provides
+    support for Nocona, K8, and other processors).
 
-  The --fast option adds -mtune=cpu_arg to the C/C++ flags (provides
-  support for Nocona, K8, and other processors).
+    Use of the --debug option adds -g to the C/C++ flags.
 
-  Use of the --debug option adds -g to the C/C++ flags.
+    In all cases it is possible to override the definition of CC and CXX
+    by calling the script as follows:
+    CC="/usr/local/bin/gcc" CXX="/usr/local/bin/gcc" BUILD/build_mccge.sh
 
   FreeBSD/x86/gcc
   ---------------
@@ -383,8 +409,7 @@ extended_usage()
 
   Linux/x86+Itanium/gcc
   -------------
-    No flags are used. Instead the configure script determines the
-    proper flags to use for both normal and debug builds. Discovery of a
+    For debug builds -O is used and otherwise -O3 is used.Discovery of a
     Nocona or Core 2 Duo CPU causes a 64-bit binary to be built;
     otherwise, the binary is 32-bit. To build a 64-bit binary, -m64 is
     added to the C/C++ flags. (To build a 32-bit binary on a 64-bit CPU,
@@ -393,48 +418,105 @@ extended_usage()
   Linux/x86+Itanium/icc
   -------------
     Flags used:
-    CC  = icc -static-libgcc -static-libcxa -i-static
-    C++ = icpc -static-libgcc -static-libcxa -i-static
+    CC  = icc -static-libgcc -static-intel
+    C++ = icpc -static-libgcc -static-intel
     C/C++ flags = -mp -restrict
 
-    On Itanium we also add -no-ftz and -no-prefetch to CC and C++ flags.
+    On Itanium we also add -no-ftz and to CC and C++ flags.
 
-  The non-debug versions also add the following:
-    C/C++ flags += -O3 unroll2 -ip
+    Note that if the user of this script sets CC or CXX explicitly then
+    also -static-libgcc and -static-intel needs to be set in the CC and
+    CXX.
 
-  The fast version adds:
-    C/C++ flags += -ipo
+    The non-debug versions also add the following:
+      C/C++ flags += -O3 unroll2 -ip
 
-  On discovery of a Core 2 Duo architecture while using icc, -xT is also 
-  added to the C/C++ flags; this provides optimisations specific to Core 
-  2 Duo. This is added only when the --fast flag is set.
+    The fast version adds (if --with-link-time-optimizer is used):
+      C/C++ flags += -ipo
+
+    On discovery of a Core 2 Duo architecture while using icc, -xT is also 
+    added to the C/C++ flags; this provides optimisations specific to Core 
+    2 Duo. This is added only when the --fast flag is set.
 
   Solaris/x86/gcc
   ---------------
-    All builds on Solaris are 64-bit, so -m64 is always used in the
-    C/C++ flags. LDFLAGS is set to -m64 -static-libgcc -O/-O2.
+    All builds on Solaris are by default 64-bit, so -m64 is always used in
+    the C/C++ flags. LDFLAGS is set to -m64 -O/-O2/-O3. If for
+    some reason a 32-bit Solaris is used it is necessary to add the flag
+    --32 to the script invocation. Due to bugs in compiling with -O3 on
+    Solaris only -O2 is used by default, when --fast flag is used -O3 will
+    be used instead.
+
+    Sets -m64 (default) or -m32 (if specifically set) in LDFLAGS and
+    C/C++ flags.
 
   Solaris/Sparc/Forte
   -------------------
-    Uses cc-5.0 as CC
-    Sets ASFLAGS=LDFLAGS=xarch=v9, so that we compile Sparc v9 binaries
-    C flags   = -Xa -strconst -xc99=none
-    C++ flags = -noex
-    C/C++ flags = -mt -D_FORTEC -xarch=v9
+    Uses cc as CC and CC as CXX
+    Note that SunStudio uses different binaries for C and C++ compilers.
 
-    For non-debug builds, the following flags are also used:
+    Set -m64 (default) or -m32 (if specifically set) in ASFLAGS,
+    LDFLAGS and C/C++ flags.
 
-    C/C++ flags = -xO3
+    Sets ASFLAGS=LDFLAGS=compiler flags=xarch=sparc, so that we compile
+    Sparc v9 binaries, also -mt is set in all those since we're always
+    building a multithreaded program.
+
+    C flags   = -xstrconst    This flag is set only on SPARC
+    C++ flags = -noex
+
+    Set the following C/C++ flags:
+    -fsimple=1
+    -ftrap=%none
+    -nofstore          This flag is set only on x86
+    -xbuiltin=%all
+    -xlibmil
+    -xlibmopt
+
+    Set the C++ flag:
+    -noex
+    -features=no%except    This flag is set only on x86
+
+    When compiling with fast we set (-ipo only used if we have
+    set --with-link-time-optimizer):
+    C/C++ flags: -xtarget=native -xunroll=3 -xipo
+    LDFLAGS: -xipo
+
+    When not compiling with fast we always set -xtarget=generic
+
+    When compiling with fast on SPARC we also set:
+    C/C++ flags: -xbinopt=prepare
+    LDFLAGS: -xbinopt=prepare
+
+    When compiling with fast on x86 we also set:
+    C/C++ flags: -xregs=frameptr
+    When not compiling with fast we set on x86
+    C/C++ flags: -xregs=no%frameptr
+
+    On SPARC we set
+    ASFLAGS = LDFLAGS = C/C++ flags = -xarch=sparc
+
+    The optimisation level is
+    -xO         Debug builds
+    -xO2        Production build on SPARC
+    -xO3        Production build on x86
+    -xO4        Fast builds on SPARC/x86
 
   MacOSX/x86/gcc
   --------------
-  C/C++ flags include -fno-common -arch i386.
+    C/C++ flags include -fno-common -arch i386.
+    When 64-bits builds then i386 is replaced by x86_64.
 
-  Non-debug versions also add -Os -felide-constructors, where "-Os"
-  means the build is space-optimised as long as the space optimisations
-  do not negatively affect performance. Debug versions use -O.
+    Non-debug versions also add -Os -felide-constructors, where "-Os"
+    means the build is space-optimised as long as the space optimisations
+    do not negatively affect performance. Debug versions use -O.
+  
+    Mac OS X builds will always be 32-bit by default, when --64 is added
+    the build will be 64 bit instead. Thus the flag --m64 is added only
+    when specifically given as an option.
 EOF
 }
+
 with_usage()
 {
   cat <<EOF
@@ -495,7 +577,7 @@ parse_package()
       package="pro"
       ;;
     extended )
-      package=""
+      package="extended"
       ;;
     cge )
       package="cge"
@@ -537,11 +619,15 @@ parse_cpu_type()
   case "$cpu_type" in
     x86 )
       cpu_type="x86"
-      m32="yes"
+      if test "x$m64" = "x" ; then
+        m64="no"
+      fi
       ;;
     x86_64 )
       cpu_type="x86"
-      m64="yes"
+      if test "x$m64" = "x" ; then
+        m64="yes"
+      fi
       ;;
     itanium )
       cpu_type="itanium"
@@ -569,7 +655,7 @@ parse_compiler()
     icc )
       compiler="icc"
       ;;
-    forte )
+    forte | SunStudio | sunstudio )
       compiler="forte"
       ;;
     *)
@@ -590,6 +676,9 @@ parse_options()
     --datadir=*)
       datadir=`get_key_value "$1"`
       ;;
+    --with-link-time-optimizer)
+      with_link_time_optimizer="yes"
+      ;;
     --with-debug=full)
       full_debug="=full"
       with_debug_flag="yes"
@@ -601,6 +690,15 @@ parse_options()
         fast_flag="generic"
       fi
       ;;
+    --use-comment)
+      without_comment="no"
+      ;;
+    --with-fast-mutexes)
+      with_fast_mutexes="yes"
+      ;;
+    --use-tcmalloc)
+      use_tcmalloc="yes"
+      ;;
     --with-debug)
       with_debug_flag="yes"
       fast_flag="no"
@@ -636,17 +734,19 @@ parse_options()
       warning_mode="normal"
       ;;
     --32)
-      if test "x$m64" != "x" ; then
+      if test "x$explicit_size_set" != "x" ; then
         echo "Cannot set both --32 and --64"
         exit 1
       fi
-      m32="yes"
+      explicit_size_set="yes"
+      m64="no"
       ;;
     --64)
-      if test "x$m32" != "x" ; then
+      if test "x$explicit_size_set" != "x" ; then
         echo "Cannot set both --32 and --64"
         exit 1
       fi
+      explicit_size_set="yes"
       m64="yes"
       ;;
     --package=*)
@@ -750,13 +850,15 @@ set_cpu_base()
   if test "x$cpu_type" = "x" ; then
     if test "x$cpu_arg" = "x" ; then
       usage "CPU type not discovered, cannot proceed"
-      return 1
+      exit 1
     fi
     case "$cpu_arg" in
       core2 | nocona | prescott | pentium* | i*86 )
+        # Intel CPU
         cpu_base_type="x86"
         ;;
-      athlon* | opteron* )
+      athlon* | opteron* | k6 | k8 )
+        # AMD CPU
         cpu_base_type="x86"
         ;;
       sparc )
@@ -775,18 +877,20 @@ set_cpu_base()
     check_cpu_cflags=""
   fi
   if test "x$os" = "xMacOSX" ; then
-    m64="no"
+    if test "x$m64" = "x" ; then
+      m64="no"
+    fi
   elif test "x$os" = "xSolaris" ; then
-    m64="yes"
-  elif test "x$m32" = "x" ; then
+    if test "x$m64" = "x" ; then
+      m64="yes"
+    fi
+  elif test "x$m64" = "x" ; then
     if test "x$cpu_arg" = "xnocona" || test "x$cpu_arg" = "xcore2" || \
        test "x$cpu_arg" = "xathlon64" || test "x$cpu_arg" = "xopteron" ; then
       m64="yes"
-    elif test "x$m64" != "xyes" ; then
+    else
       m64="no"
     fi
-  else
-    m64="no"
   fi
   echo "Discovered CPU of type $cpu_base_type ($cpu_arg) on $os"
   if test "x$m64" = "xyes" ; then
@@ -806,18 +910,15 @@ init_configure_commands()
   cxxflags="$cxx_warnings $base_cxxflags $compiler_flags"
   configure="./configure $base_configs $with_flags"
 
-  commands="$commands
-    CC=\"$CC\" CFLAGS=\"$cflags\" CXX=\"$CXX\" CXXFLAGS=\"$cxxflags\""
+  env_flags="CC=\"$CC\" CFLAGS=\"$cflags\" CXX=\"$CXX\" CXXFLAGS=\"$cxxflags\""
   if test "x$LDFLAGS" != "x" ; then
-    commands="$commands
-      LDFLAGS=\"$LDFLAGS\""
+    env_flags="$env_flags LDFLAGS=\"$LDFLAGS\""
   fi
   if test "x$ASFLAGS" != "x" ; then
-    commands="$commands
-      ASFLAGS=\"$ASFLAGS\""
+    env_flags="$env_flags ASFLAGS=\"$ASFLAGS\""
   fi
   commands="$commands
-    $configure"
+    $env_flags $configure"
 } 
 
 #
@@ -920,7 +1021,7 @@ set_libtoolize_version()
 # We do not use ccache when gcov is used. Also only when
 # gcc is used.
 #
-set_up_ccache()
+set_ccache_usage()
 {
   if test "x$compiler" = "xgcc" ; then
     if ccache -V > /dev/null 2>&1 && test "$USING_GCOV" != "1"
@@ -994,7 +1095,7 @@ set_with_debug_flags()
   if test "x$with_debug_flag" = "xyes" ; then
     if test "x$developer_flag" = "xyes" ; then
       loc_debug_flags="-DUNIV_MUST_NOT_INLINE -DEXTRA_DEBUG -DFORCE_INIT_OF_VARS "
-      loc_debug_flags="$loc_debug_cflags -DSAFEMALLOC -DPEDANTIC_SAFEMALLOC"
+      loc_debug_flags="$loc_debug_flags -DSAFEMALLOC -DPEDANTIC_SAFEMALLOC"
       compiler_flags="$compiler_flags $loc_debug_flags"
     fi
   fi
@@ -1024,6 +1125,18 @@ set_debug_flag()
 }
 
 #
+# We compile in SSL support if we can, this isn't possible if CXX
+# and CC aren't the same and we're not using GCC.
+# 
+set_ssl()
+{
+  if test "x$compiler" = "xgcc" && \
+     test "x$CC" = "x$CXX" ; then
+    base_configs="$base_configs --with-ssl"
+  fi
+}
+
+#
 # Base options used by all packages
 #
 # SSL library to use. --with-ssl selects the bundled yaSSL
@@ -1048,9 +1161,12 @@ set_base_configs()
   base_configs="$base_configs --enable-thread-safe-client"
   base_configs="$base_configs --with-big-tables"
   base_configs="$base_configs --with-extra-charsets=all"
-  base_configs="$base_configs --with-ssl"
+  if test "x$with_fast_mutexes" = "xyes" ; then
+    base_configs="$base_configs --with-fast-mutexes"
+  fi
   base_configs="$base_configs --with-pic"
   base_configs="$base_configs --with-csv-storage-engine"
+  base_configs="$base_configs --with-perfschema"
 }
 
 #
@@ -1060,18 +1176,30 @@ set_base_configs()
 #
 set_base_engines()
 {
-  engine_configs="$engine_configs --with-archive-storage-engine"
+  engine_configs="--with-archive-storage-engine"
   engine_configs="$engine_configs --with-blackhole-storage-engine"
-  engine_configs="$engine_configs --with-example-storage-engine"
+  engine_configs="$engine_configs --without-example-storage-engine"
   engine_configs="$engine_configs --with-federated-storage-engine"
   engine_configs="$engine_configs --with-partition"
+  base_configs="$base_configs $engine_configs"
 }
 
-set_pro_package()
+set_innodb_engine()
 {
-  base_configs="$base_configs $engine_configs"
   base_configs="$base_configs --with-innodb"
-  base_configs="$base_configs --with-comment=\"MySQL Pro $version_text built from source\""
+}
+
+set_ndb_engine()
+{
+  base_configs="$base_configs --with-ndbcluster"
+  base_configs="$base_configs --without-ndb-debug"
+}
+
+set_pro_package()
+{
+  if test "x$without_comment" != "xyes" ; then
+    base_configs="$base_configs --with-comment=\"MySQL Enterprise Pro $version_text built from source\""
+  fi
   if test "x$with_debug_flag" = "xyes" ; then
     base_configs="$base_configs --with-server-suffix=\"-debug\""
   fi
@@ -1079,40 +1207,37 @@ set_pro_package()
 
 set_cge_extended_package()
 {
-  if test "x$gpl" = "xno" ; then
-    echo "Cannot build Extended Carrier Grade Edition as Commercial version"
+  if test "x$without_comment" != "xyes" ; then
+    base_configs="$base_configs --with-comment=\"MySQL Cluster Carrier Grade Extended Edition $version_text built from source\""
   fi
-  base_configs="$base_configs --with-ndbcluster"
-  base_configs="$base_configs --without-ndb-debug"
-  base_configs="$base_configs $engine_configs"
-  base_configs="$base_configs --with-innodb"
-  base_configs="$base_configs --with-comment=\"MySQL Cluster Carrier Grade Extended Edition $version_text built from source\""
   if test "x$with_debug_flag" = "xyes" ; then
     base_configs="$base_configs --with-server-suffix=\"-cge-extended-debug\""
   else
-    base_configs="$base_configs --with-server-suffix=\"-cge-extended"\"
+    base_configs="$base_configs --with-server-suffix=\"-cge-extended\""
   fi
 }
 
 set_cge_package()
 {
-  base_configs="$base_configs --with-ndbcluster"
-  base_configs="$base_configs --without-ndb-debug"
-  base_configs="$base_configs $engine_configs"
-  base_configs="$base_configs --with-comment=\"MySQL Cluster Carrier Grade Edition $version_text built from source\""
+  if test "x$without_comment" != "xyes" ; then
+    base_configs="$base_configs --with-comment=\"MySQL Cluster Carrier Grade Edition $version_text built from source\""
+  fi
   if test "x$with_debug_flag" = "xyes" ; then
     base_configs="$base_configs --with-server-suffix=\"-cge-debug\""
   else
-    base_configs="$base_configs --with-server-suffix=\"-cge"\"
+    base_configs="$base_configs --with-server-suffix=\"-cge\""
   fi
 }
 
 set_classic_package()
 {
-  base_configs="$base_configs --with-comment=\"MySQL Classic $version_text built from source\""
+  if test "x$without_comment" != "xyes" ; then
+    base_configs="$base_configs --with-comment=\"MySQL Classic $version_text built from source\""
+  fi
   if test "x$with_debug_flag" = "xyes" ; then
     base_configs="$base_configs --with-server-suffix=\"-debug\""
   fi
+  base_configs="$base_configs --without-example-storage-engine"
 }
 
 #
@@ -1140,6 +1265,36 @@ set_gcc_special_options()
   fi
 }
 
+set_cc_and_cxx_for_gcc()
+{
+  if test "x$CC" = "x" ; then
+    CC="gcc -static-libgcc -fno-exceptions"
+  fi
+  if test "x$CXX" = "x" ; then
+    CXX="gcc -static-libgcc -fno-exceptions"
+  fi
+}
+
+set_cc_and_cxx_for_icc()
+{
+  if test "x$CC" = "x" ; then
+    CC="icc -static-intel -static-libgcc"
+  fi
+  if test "x$CXX" = "x" ; then
+    CXX="icpc -static-intel -static-libgcc"
+  fi
+}
+
+set_cc_and_cxx_for_forte()
+{
+  if test "x$CC" = "x" ; then
+    CC="cc"
+  fi
+  if test "x$CXX" = "x" ; then
+    CXX="CC"
+  fi
+}
+
 #
 # If we discover a Core 2 Duo architecture and we have enabled the fast
 # flag, we enable a compile especially optimised for Core 2 Duo. This
@@ -1167,42 +1322,116 @@ set_bsd_configs()
     exit 1
   fi
   base_configs="$base_configs --enable-assembler"
-  CC="gcc"
-  CXX="gcc"
+  if test "x$fast_flag" != "xno" ; then
+    compiler_flags="$compiler_flags -O3"
+  else
+    compiler_flags="$compiler_flags -O0"
+  fi
+  set_cc_and_cxx_for_gcc
+}
+
+check_64_bits()
+{
+  echo "Checking for 32/64-bits compilation"
+  echo "int main() { return 0; }" > temp_test.c
+  if test "x$m64" = "xyes" ; then
+    cmd="$CC $compile_flags -m64 temp_test.c"
+    if ! $cmd 2>1 ; then
+      m64="no"
+      echo "Changing to 32-bits since 64-bits didn't work"
+    else
+      echo "Will use 64-bits"
+    fi
+  else
+    cmd="$CC $compile_flags -m32 temp_test.c"
+    if ! $cmd 2>1 ; then
+      m64="yes"
+      echo "Changing to 64-bits since 32-bits didn't work"
+    else
+      echo "Will use 32-bits"
+    fi
+  fi
+  rm temp_test.c
 }
 
 #
+# Get GCC version
+#
+get_gcc_version()
+{
+  # check if compiler is gcc and dump its version
+  cc_verno=`$cc -dumpversion 2>/dev/null`
+  if test "x$?" = "x0" ; then
+    set -- `echo $cc_verno | tr '.' ' '`
+    cc_ver="GCC"
+    cc_major=$1
+    cc_minor=$2
+    cc_patch=$3
+    gcc_version=`expr $cc_major '*' 100 '+' $cc_minor`
+  fi
+}
+
+#
+# Link Time Optimizer in GCC (LTO) uses a parameter -flto
+# which was added to GCC 4.5, if --with-link-time-optimizer
+# is set then use this feature
+#
+check_for_link_time_optimizer()
+{
+  get_gcc_version
+  if test "$gcc_version" -ge 405 && \
+     test "x$with_link_time_optimizer" = "xyes" ; then
+    compiler_flags="$compiler_flags -flto"
+    LDFLAGS="$LDFLAGS -flto"
+  fi
+}
+#
 # Linux Section
 #
 set_linux_configs()
 {
   if test "x$cpu_base_type" != "xx86" && \
      test "x$cpu_base_type" != "xitanium" ; then
-    usage "Only x86 and Itanium CPUs supported for 32-bit Linux"
+    usage "Only x86 and Itanium CPUs supported for Linux"
     exit 1
   fi
-  base_configs="$base_configs --with-fast-mutexes"
+  if test "x$use_tcmalloc" = "xyes" ; then
+    base_configs="$base_configs --with-mysqld-libs=-ltcmalloc_minimal"
+  fi
   if test "x$cpu_base_type" = "xx86" ; then
     base_configs="$base_configs --enable-assembler"
   fi
   if test "x$compiler" = "xgcc" ; then
-    CC="gcc"
-    CXX="gcc"
+    set_cc_and_cxx_for_gcc
+    if test "x$fast_flag" != "xno" ; then
+      if test "x$fast_flag" = "xyes" ; then
+        compiler_flags="$compiler_flags -O3"
+        check_for_link_time_optimizer
+      else
+        compiler_flags="$compiler_flags -O2"
+      fi
+    else
+      compiler_flags="$compiler_flags -O0"
+    fi
+    check_64_bits
     if test "x$m64" = "xyes" ; then
       compiler_flags="$compiler_flags -m64"
+    else
+      compiler_flags="$compiler_flags -m32"
     fi
 # configure will set proper compiler flags for gcc on Linux
   elif test "x$compiler" = "xicc" ; then
     compiler_flags="$compiler_flags -mp -restrict"
-    CC="icc -static-intel"
-    CXX="icpc -static-intel"
+    set_cc_and_cxx_for_icc
     if test "x$cpu_base_type" = "xitanium" ; then
       compiler_flags="$compiler_flags -no-ftz"
     fi
     if test "x$fast_flag" != "xno" ; then
       compiler_flags="$compiler_flags -O3 -unroll2 -ip"
-      if test "x$fast_flag" = "xyes" ; then
+      if test "x$fast_flag" = "xyes" && \
+         test "x$with_link_time_optimizer" = "xyes" ; then
         compiler_flags="$compiler_flags -ipo"
+        LDFLAGS="$LDFLAGS -ipo"
       fi
     fi
   else
@@ -1216,53 +1445,111 @@ set_linux_configs()
 #
 set_solaris_configs()
 {
-  base_configs="$base_configs --with-mysqld-libs=-lmtmalloc"
+# Use mtmalloc as malloc, see Tim Cook blog
+# For information on optimal compiler settings, see article at
+# http://developers.sun.com/solaris/articles/mysql_perf_tune.html
+# by Luojia Chen at Sun.
+  base_configs="$base_configs --with-named-curses=-lcurses"
   case "`uname -a`" in
-    *5.10*|*5.11*)
+    *5.8* | *5.9* )
+      ;;
+
+    *5.10* | *5.11*)
+      base_configs="$base_configs --with-mysqld-libs=-lmtmalloc"
       ;;
     *)
-      die "Only versions 10 and 11 supported for Solaris"
+      usage "Only versions 8,9, 10 and 11 supported for Solaris"
+      exit 1
   esac
   if test "x$cpu_base_type" != "xx86" && \
      test "x$cpu_base_type" != "xsparc" ; then
     usage "Only x86 and Sparc CPUs supported for Solaris"
     exit 1
   fi
+  if test "x$compiler" != "xgcc" && \
+     test "x$compiler" != "xforte" ; then
+    usage "Only gcc and Forte compilers supported for Solaris"
+    exit 1
+  fi
+  if test "x$m64" = "xyes" ; then
+    compiler_flags="$compiler_flags -m64"
+    LDFLAGS="-m64"
+    ASFLAGS="$ASFLAGS -m64"
+  else
+    compiler_flags="$compiler_flags -m32"
+    LDFLAGS="-m32"
+    ASFLAGS="$ASFLAGS -m32"
+  fi
   if test "x$compiler" = "xgcc" ; then
-    CC="gcc"
-    CXX="gcc"
+    set_cc_and_cxx_for_gcc
     if test "x$cpu_base_type" != "xx86" ; then
-      usage "Only gcc supported for Solaris 10/11 on SPARC"
+      usage "gcc currently not supported for Solaris on SPARC"
+      exit 1
     fi
-    compiler_flags="$compiler_flags -m64 -DMY_ATOMIC_MODE_RWLOCKS"
-    LDFLAGS="-m64 -static-libgcc"
-    if test "x$fast_flag" != "xno" ; then
-      LDFLAGS="$LDFLAGS -O2"
-      compiler_flags="$compiler_flags -O2"
+    if test "x$fast_flag" = "xyes" ; then
+      LDFLAGS="$LDFLAGS -O3"
+      compiler_flags="$compiler_flags -O3"
+      check_for_link_time_optimizer
     else
-      LDFLAGS="$LDFLAGS -O"
-      compiler_flags="$compiler_flags -O"
-    fi
-  elif test "x$compiler" = "xforte" ; then
-    if test "x$cpu_base_type" = "xx86" ; then
-      usage "Only gcc supported for Solaris/x86"
+      if test "x$fast_flag" = "xgeneric" ; then
+        LDFLAGS="$LDFLAGS -O2"
+        compiler_flags="$compiler_flags -O2"
+      else
+        LDFLAGS="$LDFLAGS -O0"
+        compiler_flags="$compiler_flags -O0"
+      fi
     fi
-    if test "x$cpu_base_type" != "xsparc" ; then
-      usage "Forte compiler supported for Solaris 9/SPARC only"
+  else
+#Using Forte compiler (SunStudio)
+    set_cc_and_cxx_for_forte
+    compiler_flags="$compiler_flags -mt"
+    LDFLAGS="$LDFLAGS -mt"
+    compiler_flags="$compiler_flags -fsimple=1"
+    compiler_flags="$compiler_flags -ftrap=%none"
+    compiler_flags="$compiler_flags -xbuiltin=%all"
+    compiler_flags="$compiler_flags -xlibmil"
+    compiler_flags="$compiler_flags -xlibmopt"
+    if test "x$fast_flag" = "xyes" ; then
+      compiler_flags="$compiler_flags -xtarget=native"
+      compiler_flags="$compiler_flags -xunroll=3"
+      if test "x$with_link_time_optimizer" = "xyes" ; then
+        compiler_flags="$compiler_flags -xipo"
+        LDFLAGS="$LDFLAGS -xipo"
+      fi
+    else
+      compiler_flags="$compiler_flags -xtarget=generic"
     fi
-    CC="cc-5.0"
-    CXX=CC
-    ASFLAGS="xarch=v9"
-    LDFLAGS="xarch=v9"
-    base_cflags="$base_cflags -Xa -xstrconst -xc99=none"
-    base_cxxflags="$base_cxxflags -noex"
-    compiler_flags="$compiler_flags -mt -D_FORTEC -xarch=v9"
-    if test "x$fast_flag" != "xno" ; then
-      compiler_flags="$compiler_flags -xO3"
+    if test "x$cpu_base_type" = "xx86" ; then
+      compiler_flags="$compiler_flags -nofstore"
+      base_cxx_flags="$base_cxx_flags -features=no%except"
+      if test "x$fast_flag" = "xyes" ; then
+        compiler_flags="$compiler_flags -xregs=frameptr"
+        compiler_flags="$compiler_flags -xO4"
+      else
+        compiler_flags="$compiler_flags -xregs=no%frameptr"
+        if test "x$fast_flag" = "xgeneric" ; then
+          compiler_flags="$compiler_flags -xO2"
+        else
+          compiler_flags="$compiler_flags -xO0"
+        fi
+      fi
+    else
+#Using SPARC cpu with SunStudio (Forte) compiler
+      ASFLAGS="$ASFLAGS -xarch=sparc"
+      LDFLAGS="$LDFLAGS -xarch=sparc"
+      base_cxxflags="$base_cxxflags -noex"
+      base_cflags="$base_cflags -xstrconst"
+      compiler_flags="$compiler_flags -xarch=sparc"
+      if test "x$fast_flag" = "xyes" ; then
+        compiler_flags="$compiler_flags -xbinopt=prepare"
+        LDFLAGS="$LDFLAGS -xbinopt=prepare"
+        compiler_flags="$compiler_flags -xO4"
+      elif test "x$fast_flag" = "xgeneric" ; then
+        compiler_flags="$compiler_flags -xO3"
+      else
+        compiler_flags="$compiler_flags -xO0"
+      fi
     fi
-  else
-    usage "Only gcc and Forte compilers supported for Solaris"
-    exit 1
   fi
 }
 
@@ -1271,10 +1558,7 @@ set_solaris_configs()
 #
 set_macosx_configs()
 {
-  base_cxxflags="$base_cxxflags -fno-common"
-  if test "x$cpu_base_type" = "xx86" && test "x$compiler" = "xgcc" ; then
-    compiler_flags="$compiler_flags -arch i386"
-  else
+  if test "x$cpu_base_type" != "xx86" || test "x$compiler" != "xgcc" ; then
     usage "Only gcc/x86 supported for Mac OS X"
     exit 1
   fi
@@ -1282,14 +1566,21 @@ set_macosx_configs()
 # Optimize for space as long as it doesn't affect performance, use some
 # optimisations also when not in fast mode.
 #
+  base_cxxflags="$base_cxxflags -felide-constructors"
+  compiler_flags="$compiler_flags -fno-common"
+  if test "x$m64" = "xyes" ; then
+    compiler_flags="$compiler_flags -m64"
+    compiler_flags="$compiler_flags -arch x86_64"
+  else
+    compiler_flags="$compiler_flags -m32"
+    compiler_flags="$compiler_flags -arch i386"
+  fi
   if test "x$fast_flag" != "xno" ; then
     compiler_flags="$compiler_flags -Os"
-    base_cxxflags="$base_cxxflags -felide-constructors"
   else
-    compiler_flags="$compiler_flags -O"
+    compiler_flags="$compiler_flags -O0"
   fi
-  CC="gcc"
-  CXX="gcc"
+  set_cc_and_cxx_for_gcc
 }
 
 #
@@ -1370,7 +1661,7 @@ fi
 cpu_type=
 package=
 prefix="/usr/local/mysql"
-parallelism="4"
+parallelism="8"
 fast_flag="generic"
 compiler="gcc"
 gpl="yes"
@@ -1398,11 +1689,19 @@ base_cxxflags=
 base_configs=
 debug_flags=
 cxxflags=
-m32=
 m64=
+explicit_size_set=
 datadir=
 commands=
 use_autotools=
+engine_configs=
+ASFLAGS=
+LDFLAGS=
+use_tcmalloc=
+without_comment="yes"
+with_fast_mutexes=
+with_link_time_optimizer=
+gcc_version="0"
 
 set_defaults_based_on_environment
 
@@ -1419,7 +1718,14 @@ set -e
 # This call sets the cpu_arg and check_cpu_args parameters
 #
 path=`dirname $0`
+if test "x$compiler" = "xgcc" ; then
+  compiler=
+fi
 . "$path/check-cpu"
+if test "x$compiler" = "x" ; then
+  compiler="gcc"
+fi
+check_os
 set_cpu_base
 if test "x$?" = "x1" ; then
   exit 1
@@ -1447,17 +1753,23 @@ set_icc_special_options
 # including all storage engines except InnoDB, and to use GPL libraries.
 #
 set_base_configs
-set_base_engines
 if test "x$gpl" = "xyes" ; then
   version_text="GPL version"
 else
   version_text="Commercial version"
 fi
 if test "x$package" = "xpro" ; then
+  set_base_engines
+  set_innodb_engine
   set_pro_package
 elif test "x$package" = "xextended" ; then
+  set_base_engines
+  set_ndb_engine
+  set_innodb_engine
   set_cge_extended_package
 elif test "x$package" = "xcge" ; then
+  set_base_engines
+  set_ndb_engine
   set_cge_package
 elif test "x$package" = "xclassic" ; then
   set_classic_package
@@ -1473,7 +1785,6 @@ set_error_inject_configs
 # operating systems, and processors.
 #
 
-check_os
 if test "x$os" = "xlinux" ; then
   set_linux_configs
 elif test "x$os" = "xSolaris" ; then
@@ -1485,13 +1796,13 @@ elif test "x$os" = "xbsd" ; then
 else
   die "Operating system not supported by this script"
 fi
-
+set_ssl
 #
 # Final step before setting up commands is to set up proper make and
 # proper libtoolize versions, and to determine whether to use ccache.
 #
 set_make_version
-set_up_ccache
+set_ccache_usage
 
 #
 # Set up commands variable from variables prepared for base 

=== modified file 'BUILD/check-cpu'
--- a/BUILD/check-cpu	2010-07-02 18:30:47 +0000
+++ b/BUILD/check-cpu	2010-09-16 06:53:58 +0000
@@ -16,12 +16,14 @@ check_cpu () {
     # on Linux (and others?) we can get detailed CPU information out of /proc
     cpuinfo="cat $CPUINFO"
 
+    # detect CPU architecture
+    cpu_arch=`$cpuinfo | grep 'arch' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -1`
+
     # detect CPU family
     cpu_family=`$cpuinfo | grep 'family' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -1`
     if test -z "$cpu_family" ; then
       cpu_family=`$cpuinfo | grep 'cpu' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -1`
     fi
-
     # detect CPU vendor and model
     cpu_vendor=`$cpuinfo | grep 'vendor_id' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -1`
     model_name=`$cpuinfo | grep 'model name' | cut -d ':' -f 2 | head -1`
@@ -56,8 +58,8 @@ check_cpu () {
         fi  
         ;;
       *)
-        cpu_family=`uname -m`;
-        model_name=`uname -p`;
+        cpu_family=`uname -p`;
+        model_name=`uname -m`;
         ;;
     esac
   fi
@@ -65,9 +67,10 @@ check_cpu () {
   # detect CPU shortname as used by gcc options 
   # this list is not complete, feel free to add further entries
   cpu_arg=""
-  case "$cpu_family--$model_name" in
+  low_cpu_arg=""
+  case "$cpu_vendor--$cpu_family--$model_name--$cpu_arch" in
     # DEC Alpha
-    Alpha*EV6*)
+    *Alpha*EV6*)
       cpu_arg="ev6";
       ;;
     #Core 2 Duo  
@@ -96,6 +99,13 @@ check_cpu () {
     *Pentium*4*Mobile*)
       cpu_arg="pentium4m"
       ;;
+    *Pentium\(R\)*\ M*)
+      cpu_arg="pentium-m"
+      low_cpu_arg="pentium3"
+      ;;
+    *Pentium\(R\)*\ D*)
+      cpu_arg="prescott"
+      ;;
     *Pentium*4*)
       cpu_arg="pentium4"
       ;;
@@ -120,6 +130,12 @@ check_cpu () {
     *Celeron*)
       cpu_arg="pentium2"
       ;;
+    *Atom*)
+      cpu_arg="prescott"
+      ;;
+    *GenuineIntel*)
+      cpu_arg="pentium"
+      ;;
     *Turion*)
       cpu_arg="athlon64"
       ;;
@@ -129,9 +145,30 @@ check_cpu () {
     *Athlon*)
       cpu_arg="athlon"
       ;;
+    *AMD-K7*)
+      cpu_arg="athlon"
+      ;;
+    *Athlon*XP\ *)
+      cpu_arg="athlon-xp"
+      ;;
+    *AMD*Sempron\(tm\)*)
+      cpu_arg="athlon-mp"
+      ;;
+    *AMD*Athlon\(tm\)\ 64*)
+      cpu_arg="k8"
+      ;;
     *Opteron*)
       cpu_arg="opteron"
       ;;
+    *Phenom*)
+      cpu_arg="k8"
+      ;;
+    *AuthenticAMD*)
+      cpu_arg="k6"
+      ;;
+    *VIA\ *)
+      cpu_arg="i686"
+      ;;
     # MacOSX / Intel  
     *i386*i486*)
       cpu_arg="pentium-m"
@@ -143,8 +180,11 @@ check_cpu () {
     *Itanium*)
       cpu_arg="itanium"
       ;;
+    *IA-64*)
+      cpu_arg="itanium"
+      ;;
     # Solaris Sparc
-    *sparc*sun4u*)
+    *sparc*sun4[uv]*)
       cpu_arg="sparc"
       ;;
     # Power PC
@@ -160,6 +200,10 @@ check_cpu () {
       ;;
   esac
 
+  if test "x$low_cpu_arg" = "x" ; then
+    low_cpu_arg="$cpu_arg"
+  fi
+
   if test -z "$cpu_arg" ; then
     if test "$CPUINFO" != " " ; then
       # fallback to uname if necessary
@@ -198,7 +242,7 @@ check_cpu () {
         case `gcc -dumpmachine` in
           i?86-* | x86_64-*)
 	    if test "$cc_comp" -lt 304 ; then
-              check_cpu_cflags="-mcpu=${cpu_arg}"
+              check_cpu_cflags="-mcpu=${low_cpu_arg}"
             elif test "$cc_comp" -ge 402 ; then
               check_cpu_cflags="-mtune=native"
             else

=== modified file 'client/mysql.cc'
--- a/client/mysql.cc	2010-11-02 15:22:57 +0000
+++ b/client/mysql.cc	2010-11-24 22:57:34 +0000
@@ -3741,7 +3741,8 @@ print_tab_data(MYSQL_RES *result)
 }
 
 static int
-com_tee(String *buffer, char *line __attribute__((unused)))
+com_tee(String *buffer __attribute__((unused)),
+        char *line __attribute__((unused)))
 {
   char file_name[FN_REFLEN], *end, *param;
 
@@ -3800,7 +3801,8 @@ com_notee(String *buffer __attribute__((
 
 #ifdef USE_POPEN
 static int
-com_pager(String *buffer, char *line __attribute__((unused)))
+com_pager(String *buffer __attribute__((unused)),
+          char *line __attribute__((unused)))
 {
   char pager_name[FN_REFLEN], *end, *param;
 
@@ -3932,7 +3934,8 @@ com_rehash(String *buffer __attribute__(
 
 #ifdef USE_POPEN
 static int
-com_shell(String *buffer, char *line __attribute__((unused)))
+com_shell(String *buffer __attribute__((unused)),
+          char *line __attribute__((unused)))
 {
   char *shell_cmd;
 
@@ -4024,7 +4027,8 @@ com_connect(String *buffer, char *line)
 }
 
 
-static int com_source(String *buffer, char *line)
+static int com_source(String *buffer __attribute__((unused)),
+                      char *line)
 {
   char source_name[FN_REFLEN], *end, *param;
   LINE_BUFFER *line_buff;
@@ -4955,7 +4959,8 @@ static void init_username()
   }
 }
 
-static int com_prompt(String *buffer, char *line)
+static int com_prompt(String *buffer __attribute__((unused)),
+                      char *line)
 {
   char *ptr=strchr(line, ' ');
   prompt_counter = 0;

=== modified file 'client/mysqltest.cc'
--- a/client/mysqltest.cc	2010-11-03 21:40:53 +0000
+++ b/client/mysqltest.cc	2010-11-24 22:57:34 +0000
@@ -109,6 +109,7 @@ static my_bool parsing_disabled= 0;
 static my_bool display_result_vertically= FALSE, display_result_lower= FALSE,
   display_metadata= FALSE, display_result_sorted= FALSE;
 static my_bool disable_query_log= 0, disable_result_log= 0;
+static my_bool disable_connect_log= 1;
 static my_bool disable_warnings= 0;
 static my_bool prepare_warnings_enabled= 0;
 static my_bool disable_info= 1;
@@ -255,7 +256,9 @@ struct st_connection
   int cur_query_len;
   pthread_mutex_t mutex;
   pthread_cond_t cond;
+  pthread_t tid;
   int query_done;
+  my_bool has_thread;
 #endif /*EMBEDDED_LIBRARY*/
 };
 
@@ -286,6 +289,7 @@ enum enum_commands {
   Q_DISABLE_RPL_PARSE, Q_EVAL_RESULT,
   Q_ENABLE_QUERY_LOG, Q_DISABLE_QUERY_LOG,
   Q_ENABLE_RESULT_LOG, Q_DISABLE_RESULT_LOG,
+  Q_ENABLE_CONNECT_LOG, Q_DISABLE_CONNECT_LOG,
   Q_WAIT_FOR_SLAVE_TO_STOP,
   Q_ENABLE_WARNINGS, Q_DISABLE_WARNINGS,
   Q_ENABLE_INFO, Q_DISABLE_INFO,
@@ -354,6 +358,8 @@ const char *command_names[]=
   /* Enable/disable that the _result_ from a query is logged to result file */
   "enable_result_log",
   "disable_result_log",
+  "enable_connect_log",
+  "disable_connect_log",
   "wait_for_slave_to_stop",
   "enable_warnings",
   "disable_warnings",
@@ -756,8 +762,6 @@ pthread_handler_t send_one_query(void *a
 static int do_send_query(struct st_connection *cn, const char *q, int q_len,
                          int flags)
 {
-  pthread_t tid;
-
   if (flags & QUERY_REAP_FLAG)
     return mysql_send_query(&cn->mysql, q, q_len);
 
@@ -768,9 +772,10 @@ static int do_send_query(struct st_conne
   cn->cur_query= q;
   cn->cur_query_len= q_len;
   cn->query_done= 0;
-  if (pthread_create(&tid, &cn_thd_attrib, send_one_query, (void*)cn))
+  if (pthread_create(&cn->tid, &cn_thd_attrib, send_one_query, (void*)cn))
     die("Cannot start new thread for query");
 
+  cn->has_thread= TRUE;
   return 0;
 }
 
@@ -783,6 +788,14 @@ static void wait_query_thread_end(struct
       pthread_cond_wait(&con->cond, &con->mutex);
     pthread_mutex_unlock(&con->mutex);
   }
+  if (con->has_thread)
+  {
+#ifndef __WIN__
+    /* May hang on Windows, but the problem it solves is not seen there */
+    pthread_join(con->tid, NULL);
+#endif
+    con->has_thread= FALSE;
+  }
 }
 
 #else /*EMBEDDED_LIBRARY*/
@@ -2222,8 +2235,14 @@ void var_query_set(VAR *var, const char
   DBUG_ENTER("var_query_set");
   LINT_INIT(res);
 
+  /* Only white space or ) allowed past ending ` */
   while (end > query && *end != '`')
+  {
+    if (*end && (*end != ' ' && *end != '\t' && *end != '\n' && *end != ')'))
+      die("Spurious text after `query` expression");
     --end;
+  }
+
   if (query == end)
     die("Syntax error in query, missing '`'");
   ++query;
@@ -3888,7 +3907,18 @@ void do_perl(struct st_command *command)
     if (!error)
       my_delete(temp_file_path, MYF(MY_WME));
 
-    handle_command_error(command, WEXITSTATUS(error), my_errno);
+    /* Check for error code that indicates perl could not be started */
+    int exstat= WEXITSTATUS(error);
+#ifdef __WIN__
+    if (exstat == 1)
+      /* Text must begin 'perl not found' as mtr looks for it */
+      abort_not_supported_test("perl not found in path or did not start");
+#else
+    if (exstat == 127)
+      abort_not_supported_test("perl not found in path");
+#endif
+    else
+      handle_command_error(command, WEXITSTATUS(error), my_errno);
   }
   dynstr_free(&ds_delimiter);
   DBUG_VOID_RETURN;
@@ -4832,6 +4862,16 @@ void select_connection_name(const char *
 
   set_current_connection(con);
 
+  /* Connection logging if enabled */
+  if (!disable_connect_log && !disable_query_log)
+  {
+    DYNAMIC_STRING *ds= &ds_res;
+
+    dynstr_append_mem(ds, "connection ", 11);
+    replace_dynstr_append(ds, name);
+    dynstr_append_mem(ds, ";\n", 2);
+  }
+
   DBUG_VOID_RETURN;
 }
 
@@ -4918,6 +4958,17 @@ void do_close_connection(struct st_comma
     var_set_int("$mysql_get_server_version", 0xFFFFFFFF);
     var_set_string("$CURRENT_CONNECTION", con->name);
   }
+
+  /* Connection logging if enabled */
+  if (!disable_connect_log && !disable_query_log)
+  {
+    DYNAMIC_STRING *ds= &ds_res;
+
+    dynstr_append_mem(ds, "disconnect ", 11);
+    replace_dynstr_append(ds, ds_connection.str);
+    dynstr_append_mem(ds, ";\n", 2);
+  }
+
   dynstr_free(&ds_connection);
   DBUG_VOID_RETURN;
 }
@@ -5053,6 +5104,13 @@ int connect_n_handle_errors(struct st_co
     dynstr_append_mem(ds, delimiter, delimiter_length);
     dynstr_append_mem(ds, "\n", 1);
   }
+  /* Simlified logging if enabled */
+  if (!disable_connect_log && !disable_query_log)
+  {
+    replace_dynstr_append(ds, command->query);
+    dynstr_append_mem(ds, ";\n", 2);
+  }
+  
   while (!mysql_real_connect(con, host, user, pass, db, port, sock ? sock: 0,
                           CLIENT_MULTI_STATEMENTS))
   {
@@ -5243,6 +5301,7 @@ void do_connect(struct st_command *comma
 
 #ifdef EMBEDDED_LIBRARY
   con_slot->query_done= 1;
+  con_slot->has_thread= FALSE;
 #endif
   if (!mysql_init(&con_slot->mysql))
     die("Failed on mysql_init()");
@@ -5259,8 +5318,13 @@ void do_connect(struct st_command *comma
                   &opt_connect_timeout);
 
 #ifdef HAVE_OPENSSL
-  if (opt_use_ssl || con_ssl)
+  if (opt_use_ssl)
+    con_ssl= 1;
+#endif
+
+  if (con_ssl)
   {
+#ifdef HAVE_OPENSSL
     mysql_ssl_set(&con_slot->mysql, opt_ssl_key, opt_ssl_cert, opt_ssl_ca,
 		  opt_ssl_capath, opt_ssl_cipher);
 #if MYSQL_VERSION_ID >= 50000
@@ -5269,15 +5333,15 @@ void do_connect(struct st_command *comma
     mysql_options(&con_slot->mysql, MYSQL_OPT_SSL_VERIFY_SERVER_CERT,
                   &opt_ssl_verify_server_cert);
 #endif
-  }
 #endif
+  }
 
-#ifdef __WIN__
   if (con_pipe)
   {
+#ifdef __WIN__
     opt_protocol= MYSQL_PROTOCOL_PIPE;
-  }
 #endif
+  }
 
   if (opt_protocol)
     mysql_options(&con_slot->mysql, MYSQL_OPT_PROTOCOL, (char*) &opt_protocol);
@@ -5565,6 +5629,8 @@ int read_line(char *buf, int size)
   char c, UNINIT_VAR(last_quote);
   char *p= buf, *buf_end= buf + size - 1;
   int skip_char= 0;
+  my_bool have_slash= FALSE;
+  
   enum {R_NORMAL, R_Q, R_SLASH_IN_Q,
         R_COMMENT, R_LINE_START} state= R_LINE_START;
   DBUG_ENTER("read_line");
@@ -5636,9 +5702,13 @@ int read_line(char *buf, int size)
       }
       else if (c == '\'' || c == '"' || c == '`')
       {
-        last_quote= c;
-	state= R_Q;
+        if (! have_slash) 
+        {
+	  last_quote= c;
+	  state= R_Q;
+	}
       }
+      have_slash= (c == '\\');
       break;
 
     case R_COMMENT:
@@ -5713,7 +5783,7 @@ int read_line(char *buf, int size)
       /* Could be a multibyte character */
       /* This code is based on the code in "sql_load.cc" */
 #ifdef USE_MB
-      int charlen = my_mbcharlen(charset_info, c);
+      int charlen = my_mbcharlen(charset_info, (unsigned char) c);
       /* We give up if multibyte character is started but not */
       /* completed before we pass buf_end */
       if ((charlen > 1) && (p + charlen) <= buf_end)
@@ -5725,16 +5795,16 @@ int read_line(char *buf, int size)
 
 	for (i= 1; i < charlen; i++)
 	{
+	  c= my_getc(cur_file->file);
 	  if (feof(cur_file->file))
 	    goto found_eof;
-	  c= my_getc(cur_file->file);
 	  *p++ = c;
 	}
 	if (! my_ismbchar(charset_info, mb_start, p))
 	{
 	  /* It was not a multiline char, push back the characters */
 	  /* We leave first 'c', i.e. pretend it was a normal char */
-	  while (p > mb_start)
+	  while (p-1 > mb_start)
 	    my_ungetc(*--p);
 	}
       }
@@ -7382,11 +7452,13 @@ void run_query(struct st_connection *cn,
                            (flags & QUERY_REAP_FLAG));
   DBUG_ENTER("run_query");
 
-  init_dynamic_string(&ds_warnings, NULL, 0, 256);
-
   if (cn->pending && (flags & QUERY_SEND_FLAG))
     die ("Cannot run query on connection between send and reap");
 
+  if (!(flags & QUERY_SEND_FLAG) && !cn->pending)
+    die ("Cannot reap on a connection without pending send");
+  
+  init_dynamic_string(&ds_warnings, NULL, 0, 256);
   /*
     Evaluate query if this is an eval command
   */
@@ -8127,6 +8199,8 @@ int main(int argc, char **argv)
       case Q_DISABLE_ABORT_ON_ERROR: abort_on_error=0; break;
       case Q_ENABLE_RESULT_LOG:  disable_result_log=0; break;
       case Q_DISABLE_RESULT_LOG: disable_result_log=1; break;
+      case Q_ENABLE_CONNECT_LOG:   disable_connect_log=0; break;
+      case Q_DISABLE_CONNECT_LOG:  disable_connect_log=1; break;
       case Q_ENABLE_WARNINGS:    disable_warnings=0; break;
       case Q_DISABLE_WARNINGS:   disable_warnings=1; break;
       case Q_ENABLE_PREPARE_WARNINGS:  prepare_warnings_enabled=1; break;
@@ -9793,6 +9867,7 @@ void free_pointer_array(POINTER_ARRAY *p
 void replace_dynstr_append_mem(DYNAMIC_STRING *ds,
                                const char *val, int len)
 {
+  char lower[512];
 #ifdef __WIN__
   fix_win_paths(val, len);
 #endif
@@ -9800,7 +9875,6 @@ void replace_dynstr_append_mem(DYNAMIC_S
   if (display_result_lower) 
   {
     /* Convert to lower case, and do this first */
-    char lower[512];
     char *c= lower;
     for (const char *v= val;  *v;  v++)
       *c++= my_tolower(charset_info, *v);

=== modified file 'client/sql_string.h'
--- a/client/sql_string.h	2007-03-08 03:27:41 +0000
+++ b/client/sql_string.h	2010-10-19 22:36:59 +0000
@@ -70,9 +70,13 @@ public:
   }
   static void *operator new(size_t size, MEM_ROOT *mem_root)
   { return (void*) alloc_root(mem_root, (uint) size); }
-  static void operator delete(void *ptr_arg,size_t size)
-  { TRASH(ptr_arg, size); }
-  static void operator delete(void *ptr_arg, MEM_ROOT *mem_root)
+  static void operator delete(void *ptr_arg, size_t size)
+  {
+    (void) ptr_arg;
+    (void) size;
+    TRASH(ptr_arg, size);
+  }
+  static void operator delete(void *, MEM_ROOT *)
   { /* never called */ }
   ~String() { free(); }
 

=== modified file 'cmd-line-utils/libedit/common.c'
--- a/cmd-line-utils/libedit/common.c	2009-06-11 16:21:32 +0000
+++ b/cmd-line-utils/libedit/common.c	2010-10-19 22:36:59 +0000
@@ -136,7 +136,7 @@ ed_delete_prev_word(EditLine *el, int c
  */
 protected el_action_t
 /*ARGSUSED*/
-ed_delete_next_char(EditLine *el, int c)
+ed_delete_next_char(EditLine *el, int c __attribute__((__unused__)))
 {
 #ifdef notdef			/* XXX */
 #define	EL	el->el_line
@@ -431,7 +431,8 @@ ed_argument_digit(EditLine *el, int c)
  */
 protected el_action_t
 /*ARGSUSED*/
-ed_unassigned(EditLine *el, int c __attribute__((__unused__)))
+ed_unassigned(EditLine *el __attribute__((__unused__)),
+	      int c __attribute__((__unused__)))
 {
 
 	return (CC_ERROR);

=== modified file 'cmd-line-utils/libedit/readline.c'
--- a/cmd-line-utils/libedit/readline.c	2009-06-11 16:21:32 +0000
+++ b/cmd-line-utils/libedit/readline.c	2010-10-19 22:36:59 +0000
@@ -202,7 +202,7 @@ _move_history(int op)
  */
 static int
 /*ARGSUSED*/
-_getc_function(EditLine *el, char *c)
+_getc_function(EditLine *el __attribute__((__unused__)), char *c)
 {
 	int i;
 
@@ -1613,7 +1613,8 @@ rl_insert(int count, int c)
 
 /*ARGSUSED*/
 int
-rl_newline(int count, int c)
+rl_newline(int count __attribute__((__unused__)),
+	   int c __attribute__((__unused__)))
 {
 	/*
 	 * Readline-4.0 appears to ignore the args.
@@ -1623,7 +1624,7 @@ rl_newline(int count, int c)
 
 /*ARGSUSED*/
 static unsigned char
-rl_bind_wrapper(EditLine *el, unsigned char c)
+rl_bind_wrapper(EditLine *el __attribute__((__unused__)), unsigned char c)
 {
 	if (map[c] == NULL)
 	    return CC_ERROR;
@@ -1718,7 +1719,7 @@ rl_get_previous_history(int count, int k
 
 void
 /*ARGSUSED*/
-rl_prep_terminal(int meta_flag)
+rl_prep_terminal(int meta_flag __attribute__((__unused__)))
 {
 	el_set(e, EL_PREP_TERM, 1);
 }
@@ -1922,7 +1923,8 @@ _rl_qsort_string_compare(char **s1, char
 
 int
 /*ARGSUSED*/
-rl_kill_text(int from, int to)
+rl_kill_text(int from __attribute__((__unused__)),
+	     int to __attribute__((__unused__)))
 {
 	return 0;
 }
@@ -1941,20 +1943,25 @@ rl_get_keymap(void)
 
 void
 /*ARGSUSED*/
-rl_set_keymap(Keymap k)
+rl_set_keymap(Keymap k __attribute__((__unused__)))
 {
 }
 
 int
 /*ARGSUSED*/
-rl_generic_bind(int type, const char * keyseq, const char * data, Keymap k)
+rl_generic_bind(int type __attribute__((__unused__)),
+		const char * keyseq __attribute__((__unused__)),
+		const char * data __attribute__((__unused__)),
+		Keymap k __attribute__((__unused__)))
 {
 	return 0;
 }
 
 int
 /*ARGSUSED*/
-rl_bind_key_in_map(int key, Function *fun, Keymap k)
+rl_bind_key_in_map(int key __attribute__((__unused__)),
+		   Function *fun __attribute__((__unused__)),
+		   Keymap k __attribute__((__unused__)))
 {
 	return 0;
 }

=== modified file 'cmd-line-utils/libedit/vi.c'
--- a/cmd-line-utils/libedit/vi.c	2009-06-11 16:21:32 +0000
+++ b/cmd-line-utils/libedit/vi.c	2010-10-19 22:36:59 +0000
@@ -145,7 +145,7 @@ vi_paste_prev(EditLine *el, int c __attr
  */
 protected el_action_t
 /*ARGSUSED*/
-vi_prev_big_word(EditLine *el, int c)
+vi_prev_big_word(EditLine *el, int c __attribute__((__unused__)))
 {
 
 	if (el->el_line.cursor == el->el_line.buffer)
@@ -195,7 +195,7 @@ vi_prev_word(EditLine *el, int c __attri
  */
 protected el_action_t
 /*ARGSUSED*/
-vi_next_big_word(EditLine *el, int c)
+vi_next_big_word(EditLine *el, int c __attribute__((__unused__)))
 {
 
 	if (el->el_line.cursor >= el->el_line.lastchar - 1)
@@ -462,7 +462,7 @@ vi_delete_meta(EditLine *el, int c __att
  */
 protected el_action_t
 /*ARGSUSED*/
-vi_end_big_word(EditLine *el, int c)
+vi_end_big_word(EditLine *el, int c __attribute__((__unused__)))
 {
 
 	if (el->el_line.cursor == el->el_line.lastchar)
@@ -797,7 +797,7 @@ vi_repeat_prev_char(EditLine *el, int c
  */
 protected el_action_t
 /*ARGSUSED*/
-vi_match(EditLine *el, int c)
+vi_match(EditLine *el, int c __attribute__((__unused__)))
 {
 	const char match_chars[] = "()[]{}";
 	char *cp;
@@ -844,7 +844,7 @@ vi_match(EditLine *el, int c)
  */
 protected el_action_t
 /*ARGSUSED*/
-vi_undo_line(EditLine *el, int c)
+vi_undo_line(EditLine *el, int c __attribute__((__unused__)))
 {
 
 	cv_undo(el);
@@ -858,7 +858,7 @@ vi_undo_line(EditLine *el, int c)
  */
 protected el_action_t
 /*ARGSUSED*/
-vi_to_column(EditLine *el, int c)
+vi_to_column(EditLine *el, int c __attribute__((__unused__)))
 {
 
 	el->el_line.cursor = el->el_line.buffer;
@@ -872,7 +872,7 @@ vi_to_column(EditLine *el, int c)
  */
 protected el_action_t
 /*ARGSUSED*/
-vi_yank_end(EditLine *el, int c)
+vi_yank_end(EditLine *el, int c __attribute__((__unused__)))
 {
 
 	cv_yank(el, el->el_line.cursor,
@@ -886,7 +886,7 @@ vi_yank_end(EditLine *el, int c)
  */
 protected el_action_t
 /*ARGSUSED*/
-vi_yank(EditLine *el, int c)
+vi_yank(EditLine *el, int c __attribute__((__unused__)))
 {
 
 	return cv_action(el, YANK);
@@ -898,7 +898,7 @@ vi_yank(EditLine *el, int c)
  */
 protected el_action_t
 /*ARGSUSED*/
-vi_comment_out(EditLine *el, int c)
+vi_comment_out(EditLine *el, int c __attribute__((__unused__)))
 {
 
 	el->el_line.cursor = el->el_line.buffer;
@@ -919,7 +919,8 @@ extern char *get_alias_text(const char *
 #endif
 protected el_action_t
 /*ARGSUSED*/
-vi_alias(EditLine *el, int c)
+vi_alias(EditLine *el __attribute__((__unused__)),
+	 int c __attribute__((__unused__)))
 {
 #if defined(__weak_reference) && !defined(__FreeBSD__)
 	char alias_name[3];
@@ -949,7 +950,7 @@ vi_alias(EditLine *el, int c)
  */
 protected el_action_t
 /*ARGSUSED*/
-vi_to_history_line(EditLine *el, int c)
+vi_to_history_line(EditLine *el, int c __attribute__((__unused__)))
 {
 	int sv_event_no = el->el_history.eventno;
 	el_action_t rval;
@@ -994,7 +995,7 @@ vi_to_history_line(EditLine *el, int c)
  */
 protected el_action_t
 /*ARGSUSED*/
-vi_histedit(EditLine *el, int c)
+vi_histedit(EditLine *el, int c __attribute__((__unused__)))
 {
 	int fd;
 	pid_t pid;
@@ -1050,7 +1051,7 @@ vi_histedit(EditLine *el, int c)
  */
 protected el_action_t
 /*ARGSUSED*/
-vi_history_word(EditLine *el, int c)
+vi_history_word(EditLine *el, int c __attribute__((__unused__)))
 {
 	const char *wp = HIST_FIRST(el);
 	const char *wep, *wsp;
@@ -1099,7 +1100,7 @@ vi_history_word(EditLine *el, int c)
  */
 protected el_action_t
 /*ARGSUSED*/
-vi_redo(EditLine *el, int c)
+vi_redo(EditLine *el, int c __attribute__((__unused__)))
 {
 	c_redo_t *r = &el->el_chared.c_redo;
 

=== modified file 'cmd-line-utils/readline/Makefile.am'
--- a/cmd-line-utils/readline/Makefile.am	2010-07-02 18:30:47 +0000
+++ b/cmd-line-utils/readline/Makefile.am	2010-11-29 09:27:52 +0000
@@ -32,6 +32,3 @@ noinst_HEADERS =	readline.h chardefs.h k
 EXTRA_DIST=		emacs_keymap.c vi_keymap.c
 
 DEFS =			-DMYSQL_CLIENT_NO_THREADS -DHAVE_CONFIG_H -DNO_KILL_INTR -D_GNU_SOURCE=1
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%

=== modified file 'cmd-line-utils/readline/complete.c'
--- a/cmd-line-utils/readline/complete.c	2009-06-29 14:00:47 +0000
+++ b/cmd-line-utils/readline/complete.c	2010-10-20 18:21:40 +0000
@@ -1839,8 +1839,11 @@ rl_username_completion_function (text, s
 #else /* !__WIN32__ && !__OPENNT) */
   static char *username = (char *)NULL;
   static struct passwd *entry;
-  static int namelen, first_char, first_char_loc;
+  static int first_char, first_char_loc;
   char *value;
+#if defined (HAVE_GETPWENT)
+  static int namelen;
+#endif
 
   if (state == 0)
     {
@@ -1850,7 +1853,9 @@ rl_username_completion_function (text, s
       first_char_loc = first_char == '~';
 
       username = savestring (&text[first_char_loc]);
+#if defined (HAVE_GETPWENT)
       namelen = strlen (username);
+#endif
       setpwent ();
     }
 

=== modified file 'cmd-line-utils/readline/histfile.c'
--- a/cmd-line-utils/readline/histfile.c	2009-08-28 16:21:54 +0000
+++ b/cmd-line-utils/readline/histfile.c	2010-10-20 18:21:40 +0000
@@ -402,6 +402,7 @@ history_truncate_file (fname, lines)
   if (bp > buffer && ((file = open (filename, O_WRONLY|O_TRUNC|O_BINARY, 0600)) != -1))
     {
       bytes_written= write (file, bp, chars_read - (bp - buffer));
+      (void) bytes_written;
 
 #if defined (__BEOS__)
       /* BeOS ignores O_TRUNC. */

=== modified file 'cmd-line-utils/readline/isearch.c'
--- a/cmd-line-utils/readline/isearch.c	2009-06-29 13:17:01 +0000
+++ b/cmd-line-utils/readline/isearch.c	2010-10-20 18:21:40 +0000
@@ -617,7 +617,7 @@ rl_search_history (direction, invoking_k
      int direction, invoking_key __attribute__((unused));
 {
   _rl_search_cxt *cxt;		/* local for now, but saved globally */
-  int c, r;
+  int r;
 
   RL_SETSTATE(RL_STATE_ISEARCH);
   cxt = _rl_isearch_init (direction);
@@ -632,7 +632,7 @@ rl_search_history (direction, invoking_k
   r = -1;
   for (;;)
     {
-      c = _rl_search_getchar (cxt);
+      _rl_search_getchar (cxt);
       /* We might want to handle EOF here (c == 0) */
       r = _rl_isearch_dispatch (cxt, cxt->lastc);
       if (r <= 0)
@@ -655,9 +655,9 @@ int
 _rl_isearch_callback (cxt)
      _rl_search_cxt *cxt;
 {
-  int c, r;
+  int r;
 
-  c = _rl_search_getchar (cxt);
+  _rl_search_getchar (cxt);
   /* We might want to handle EOF here */
   r = _rl_isearch_dispatch (cxt, cxt->lastc);
 

=== modified file 'cmd-line-utils/readline/parens.c'
--- a/cmd-line-utils/readline/parens.c	2008-01-03 13:26:41 +0000
+++ b/cmd-line-utils/readline/parens.c	2010-10-20 18:21:40 +0000
@@ -115,7 +115,7 @@ rl_insert_close (count, invoking_key)
   else
     {
 #if defined (HAVE_SELECT)
-      int orig_point, match_point, ready;
+      int orig_point, match_point;
       struct timeval timer;
       fd_set readfds;
 
@@ -136,7 +136,7 @@ rl_insert_close (count, invoking_key)
       orig_point = rl_point;
       rl_point = match_point;
       (*rl_redisplay_function) ();
-      ready = select (1, &readfds, (fd_set *)NULL, (fd_set *)NULL, &timer);
+      select (1, &readfds, (fd_set *)NULL, (fd_set *)NULL, &timer);
       rl_point = orig_point;
 #else /* !HAVE_SELECT */
       _rl_insert_char (count, invoking_key);

=== modified file 'cmd-line-utils/readline/readline.c'
--- a/cmd-line-utils/readline/readline.c	2009-09-07 20:50:10 +0000
+++ b/cmd-line-utils/readline/readline.c	2010-11-24 22:57:34 +0000
@@ -446,11 +446,10 @@ readline_internal_char ()
 readline_internal_charloop ()
 #endif
 {
-  static int lastc, eof_found;
+  static int lastc;
   int c, code, lk;
 
   lastc = -1;
-  eof_found = 0;
 
 #if !defined (READLINE_CALLBACKS)
   while (rl_done == 0)

=== modified file 'cmd-line-utils/readline/terminal.c'
--- a/cmd-line-utils/readline/terminal.c	2009-06-29 13:17:01 +0000
+++ b/cmd-line-utils/readline/terminal.c	2010-10-19 13:49:31 +0000
@@ -268,7 +268,7 @@ _rl_get_screen_size (tty, ignore_env)
 
 #if !defined (__DJGPP__)
       if (_rl_screenwidth <= 0 && term_string_buffer)
-	_rl_screenwidth = tgetnum ("co");
+	_rl_screenwidth = tgetnum ((char *)"co");
 #endif
     }
 
@@ -284,7 +284,7 @@ _rl_get_screen_size (tty, ignore_env)
 
 #if !defined (__DJGPP__)
       if (_rl_screenheight <= 0 && term_string_buffer)
-	_rl_screenheight = tgetnum ("li");
+	_rl_screenheight = tgetnum ((char *)"li");
 #endif
     }
 
@@ -516,7 +516,7 @@ _rl_init_terminal_io (terminal_name)
   if (!_rl_term_cr)
     _rl_term_cr = "\r";
 
-  _rl_term_autowrap = tgetflag ("am") && tgetflag ("xn");
+  _rl_term_autowrap = tgetflag ((char *)"am") && tgetflag ((char *)"xn");
 
   /* Allow calling application to set default height and width, using
      rl_set_screen_size */
@@ -531,7 +531,7 @@ _rl_init_terminal_io (terminal_name)
 
   /* Check to see if this terminal has a meta key and clear the capability
      variables if there is none. */
-  term_has_meta = (tgetflag ("km") || tgetflag ("MT"));
+  term_has_meta = (tgetflag ((char *)"km") || tgetflag ((char *)"MT"));
   if (!term_has_meta)
     _rl_term_mm = _rl_term_mo = (char *)NULL;
 

=== modified file 'cmd-line-utils/readline/text.c'
--- a/cmd-line-utils/readline/text.c	2010-04-28 12:52:24 +0000
+++ b/cmd-line-utils/readline/text.c	2010-11-24 22:57:34 +0000
@@ -811,11 +811,10 @@ _rl_overwrite_char (count, c)
   int i;
 #if defined (HANDLE_MULTIBYTE)
   char mbkey[MB_LEN_MAX];
-  int k;
 
   /* Read an entire multibyte character sequence to insert COUNT times. */
   if (count > 0 && MB_CUR_MAX > 1 && rl_byte_oriented == 0)
-    k = _rl_read_mbstring (c, mbkey, MB_LEN_MAX);
+    _rl_read_mbstring (c, mbkey, MB_LEN_MAX);
 #endif
 
   rl_begin_undo_group ();

=== modified file 'config/ac-macros/maintainer.m4'
--- a/config/ac-macros/maintainer.m4	2010-07-09 12:51:21 +0000
+++ b/config/ac-macros/maintainer.m4	2010-11-29 09:27:52 +0000
@@ -8,7 +8,8 @@ AC_DEFUN([MY_MAINTAINER_MODE], [
     [AS_HELP_STRING([--enable-mysql-maintainer-mode],
                     [Enable a MySQL maintainer-specific development environment])],
     [USE_MYSQL_MAINTAINER_MODE=$enableval],
-    [USE_MYSQL_MAINTAINER_MODE=no])
+    [AS_IF([test "$with_debug" != "no" -a "$with_valgrind" = "no"],
+    [USE_MYSQL_MAINTAINER_MODE=yes], [USE_MYSQL_MAINTAINER_MODE=no])])
   AC_MSG_RESULT([$USE_MYSQL_MAINTAINER_MODE])
 ])
 
@@ -16,7 +17,7 @@ AC_DEFUN([MY_MAINTAINER_MODE], [
 AC_DEFUN([MY_MAINTAINER_MODE_WARNINGS], [
   # Setup GCC warning options.
   AS_IF([test "$GCC" = "yes"], [
-    C_WARNINGS="-Wall -Wextra -Wunused -Wwrite-strings -Werror"
+    C_WARNINGS="-Wall -Wextra -Wunused -Wwrite-strings -Wno-strict-aliasing -Werror -DFORCE_INIT_OF_VARS"
     CXX_WARNINGS="${C_WARNINGS} -Wno-unused-parameter"
   ])
 

=== modified file 'configure.in'
--- a/configure.in	2010-11-17 12:24:20 +0000
+++ b/configure.in	2010-11-29 09:27:52 +0000
@@ -12,7 +12,7 @@ dnl
 dnl When changing the major version number please also check the switch
 dnl statement in mysqlbinlog::check_master_version().  You may also need
 dnl to update version.c in ndb.
-AC_INIT([MariaDB Server], [5.1.51-MariaDB], [], [mysql])
+AC_INIT([MariaDB Server], [5.1.53-MariaDB], [], [mysql])
 
 AC_CONFIG_SRCDIR([sql/mysqld.cc])
 AC_CANONICAL_SYSTEM
@@ -104,6 +104,24 @@ AC_SUBST(SHARED_LIB_MAJOR_VERSION)
 AC_SUBST(SHARED_LIB_VERSION)
 AC_SUBST(AVAILABLE_LANGUAGES)
 
+# Check whether a debug mode should be enabled.
+AC_ARG_WITH([debug],
+    AS_HELP_STRING([--with-debug@<:@=full@:>@],
+      [Enable various amounts of debugging support (full adds a slow memory checker).]),
+    [with_debug=$withval],
+    [with_debug=no])
+
+AC_ARG_WITH([valgrind],
+  [AS_HELP_STRING([--with-valgrind],
+    [Valgrind instrumentation @<:@default=no@:>@])],
+    [], [with_valgrind=no])
+
+if test "$with_valgrind" != "no"
+then
+  AC_CHECK_HEADERS([valgrind/valgrind.h valgrind/memcheck.h],
+    [AC_DEFINE([HAVE_VALGRIND], [1], [Define for Valgrind support])])
+fi
+
 # Whether the maintainer mode should be enabled.
 MY_MAINTAINER_MODE
 
@@ -1699,11 +1717,6 @@ then
   DEBUG_OPTIMIZE_CXX=""
 fi
 
-AC_ARG_WITH(debug,
-    [  --with-debug            Add debug code
-  --with-debug=full       Add debug code (adds memory checker, very slow)],
-    [with_debug=$withval],
-    [with_debug=no])
 if test "$with_debug" = "yes"
 then
   # Medium debug.
@@ -1726,17 +1739,6 @@ else
   CXXFLAGS="$OPTIMIZE_CXXFLAGS $CXXFLAGS"
 fi
 
-AC_ARG_WITH([valgrind],
-  [AS_HELP_STRING([--with-valgrind],
-    [Valgrind instrumentation @<:@default=no@:>@])],
-    [], [with_valgrind=no])
-
-if test "$with_valgrind" != "no"
-then
-  AC_CHECK_HEADERS([valgrind/valgrind.h valgrind/memcheck.h],
-    [AC_DEFINE([HAVE_VALGRIND], [1], [Define for Valgrind support])])
-fi
-
 # Debug Sync Facility. NOTE: depends on 'with_debug'. Must be behind it.
 AC_MSG_CHECKING(if Debug Sync Facility should be enabled.)
 AC_ARG_ENABLE(debug_sync,
@@ -2106,6 +2108,13 @@ MYSQL_TYPE_QSORT
 AC_FUNC_UTIME_NULL
 AC_FUNC_VPRINTF
 
+AC_CHECK_DECLS([fdatasync],,,
+[
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+])
+
 AC_CHECK_FUNCS(alarm bcmp bfill bmove bsearch bzero \
   chsize cuserid fchmod fcntl \
   fconvert fdatasync fesetround finite fpresetsticky fpsetmask fsync ftruncate \

=== modified file 'dbug/dbug.c'
--- a/dbug/dbug.c	2010-11-03 19:02:23 +0000
+++ b/dbug/dbug.c	2010-11-24 22:57:34 +0000
@@ -926,6 +926,7 @@ void _db_set_init_(const char *control)
   CODE_STATE tmp_cs;
   bzero((uchar*) &tmp_cs, sizeof(tmp_cs));
   tmp_cs.stack= &init_settings;
+  tmp_cs.process= db_process ? db_process : "dbug";
   DbugParse(&tmp_cs, control);
 }
 
@@ -1637,8 +1638,8 @@ static void PushState(CODE_STATE *cs)
   struct settings *new_malloc;
 
   new_malloc= (struct settings *) DbugMalloc(sizeof(struct settings));
+  bzero(new_malloc, sizeof(struct settings));
   new_malloc->next= cs->stack;
-  new_malloc->out_file= NULL;
   cs->stack= new_malloc;
 }
 
@@ -2121,7 +2122,7 @@ static FILE *OpenProfile(CODE_STATE *cs,
 
 static void DBUGCloseFile(CODE_STATE *cs, FILE *fp)
 {
-  if (fp != stderr && fp != stdout && fclose(fp) == EOF)
+  if (fp != NULL && fp != stderr && fp != stdout && fclose(fp) == EOF)
   {
     if (!cs->locked)
       pthread_mutex_lock(&THR_LOCK_dbug);

=== modified file 'extra/libevent/epoll.c'
--- a/extra/libevent/epoll.c	2009-03-12 22:27:35 +0000
+++ b/extra/libevent/epoll.c	2010-11-24 22:57:34 +0000
@@ -155,7 +155,8 @@ epoll_init(struct event_base *base)
 }
 
 static int
-epoll_recalc(struct event_base *base, void *arg, int max)
+epoll_recalc(struct event_base *base __attribute__((unused)), void *arg,
+             int max)
 {
 	struct epollop *epollop = arg;
 

=== modified file 'extra/libevent/evbuffer.c'
--- a/extra/libevent/evbuffer.c	2010-01-07 13:00:06 +0000
+++ b/extra/libevent/evbuffer.c	2010-11-24 22:57:34 +0000
@@ -75,8 +75,10 @@ bufferevent_add(struct event *ev, int ti
  */
 
 void
-bufferevent_read_pressure_cb(struct evbuffer *buf, size_t old, size_t now,
-    void *arg) {
+bufferevent_read_pressure_cb(struct evbuffer *buf,
+                             size_t old __attribute__((unused)), size_t now,
+                             void *arg)
+{
 	struct bufferevent *bufev = arg;
 	/* 
 	 * If we are below the watermark then reschedule reading if it's

=== modified file 'extra/libevent/event.c'
--- a/extra/libevent/event.c	2009-03-12 22:27:35 +0000
+++ b/extra/libevent/event.c	2010-11-26 22:37:34 +0000
@@ -394,7 +394,8 @@ event_base_get_method(struct event_base
 }
 
 static void
-event_loopexit_cb(int fd, short what, void *arg)
+event_loopexit_cb(int fd __attribute__((unused)),
+                  short what __attribute__((unused)), void *arg)
 {
 	struct event_base *base = arg;
 	base->event_gotterm = 1;
@@ -404,7 +405,7 @@ event_loopexit_cb(int fd, short what, vo
 int
 event_loopexit(struct timeval *tv)
 {
-	return (event_once(-1, EV_TIMEOUT, event_loopexit_cb,
+	return (event_once(-1, EV_TIMEOUT, &event_loopexit_cb,
 		    current_base, tv));
 }
 

=== modified file 'extra/libevent/evutil.h'
--- a/extra/libevent/evutil.h	2009-03-12 22:27:35 +0000
+++ b/extra/libevent/evutil.h	2010-11-26 22:37:34 +0000
@@ -171,4 +171,21 @@ ev_int64_t evutil_strtoll(const char *s,
 }
 #endif
 
+/* Define __attribute__ for platforms that doesn't suppor it */
+
+#ifndef __attribute__
+# if !defined(__GNUC__)
+#  define __attribute__(A)
+# else
+#  ifndef GCC_VERSION
+#   define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
+#  endif
+#  if GCC_VERSION < 2008
+#   define __attribute__(A)
+#  elif defined(__cplusplus) && GCC_VERSION < 3004
+#   define __attribute__(A)
+#  endif
+# endif
+#endif
+
 #endif /* _EVUTIL_H_ */

=== modified file 'extra/libevent/kqueue.c'
--- a/extra/libevent/kqueue.c	2010-03-30 12:36:49 +0000
+++ b/extra/libevent/kqueue.c	2010-11-26 22:37:34 +0000
@@ -95,7 +95,7 @@ const struct eventop kqops = {
 };
 
 static void *
-kq_init(struct event_base *base)
+kq_init(struct event_base *base __attribute__((unused)))
 {
 	int kq;
 	struct kqop *kqueueop;
@@ -203,13 +203,14 @@ kq_insert(struct kqop *kqop, struct keve
 }
 
 static void
-kq_sighandler(int sig)
+kq_sighandler(int sig __attribute__((unused)))
 {
 	/* Do nothing here */
 }
 
 static int
-kq_dispatch(struct event_base *base, void *arg, struct timeval *tv)
+kq_dispatch(struct event_base *base __attribute__((unused)), void *arg,
+            struct timeval *tv)
 {
 	struct kqop *kqop = arg;
 	struct kevent *changes = kqop->changes;
@@ -408,7 +409,7 @@ kq_del(void *arg, struct event *ev)
 }
 
 static void
-kq_dealloc(struct event_base *base, void *arg)
+kq_dealloc(struct event_base *base __attribute__((unused)), void *arg)
 {
 	struct kqop *kqop = arg;
 

=== modified file 'extra/libevent/signal.c'
--- a/extra/libevent/signal.c	2009-03-12 22:27:35 +0000
+++ b/extra/libevent/signal.c	2010-11-26 22:37:34 +0000
@@ -69,7 +69,8 @@ static void evsignal_handler(int sig);
 
 /* Callback for when the signal handler write a byte to our signaling socket */
 static void
-evsignal_cb(int fd, short what, void *arg)
+evsignal_cb(int fd, short what __attribute__((unused)),
+            void *arg __attribute__((unused)))
 {
 	static char signals[100];
 #ifdef WIN32
@@ -113,7 +114,7 @@ evsignal_init(struct event_base *base)
         evutil_make_socket_nonblocking(base->sig.ev_signal_pair[0]);
 
 	event_set(&base->sig.ev_signal, base->sig.ev_signal_pair[1],
-		EV_READ | EV_PERSIST, evsignal_cb, &base->sig.ev_signal);
+		EV_READ | EV_PERSIST, &evsignal_cb, &base->sig.ev_signal);
 	base->sig.ev_signal.ev_base = base;
 	base->sig.ev_signal.ev_flags |= EVLIST_INTERNAL;
 }

=== modified file 'extra/yassl/Makefile.am'
--- a/extra/yassl/Makefile.am	2008-09-01 21:27:14 +0000
+++ b/extra/yassl/Makefile.am	2010-11-29 09:27:52 +0000
@@ -1,5 +1,2 @@
 SUBDIRS = taocrypt src testsuite
 EXTRA_DIST = CMakeLists.txt
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%

=== modified file 'extra/yassl/src/Makefile.am'
--- a/extra/yassl/src/Makefile.am	2010-06-08 21:14:18 +0000
+++ b/extra/yassl/src/Makefile.am	2010-11-29 09:27:52 +0000
@@ -6,7 +6,3 @@ libyassl_la_SOURCES = buffer.cpp cert_wr
 	template_instnt.cpp timer.cpp yassl_imp.cpp yassl_error.cpp yassl_int.cpp
 EXTRA_DIST = $(wildcard ../include/*.hpp) $(wildcard ../include/openssl/*.h)
 AM_CXXFLAGS = -DYASSL_PURE_C -DYASSL_PREFIX @yassl_thread_cxxflags@
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
-

=== modified file 'extra/yassl/taocrypt/Makefile.am'
--- a/extra/yassl/taocrypt/Makefile.am	2008-09-01 21:27:14 +0000
+++ b/extra/yassl/taocrypt/Makefile.am	2010-11-29 09:27:52 +0000
@@ -1,5 +1,2 @@
 SUBDIRS = src test benchmark
 EXTRA_DIST = CMakeLists.txt $(wildcard mySTL/*.hpp)
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%

=== modified file 'extra/yassl/taocrypt/benchmark/Makefile.am'
--- a/extra/yassl/taocrypt/benchmark/Makefile.am	2010-06-08 21:14:18 +0000
+++ b/extra/yassl/taocrypt/benchmark/Makefile.am	2010-11-29 09:27:52 +0000
@@ -4,6 +4,3 @@ benchmark_SOURCES  = benchmark.cpp
 benchmark_LDADD    = $(top_builddir)/extra/yassl/taocrypt/src/libtaocrypt.la
 benchmark_CXXFLAGS = -DYASSL_PURE_C @yassl_thread_cxxflags@
 EXTRA_DIST = benchmark.dsp rsa1024.der dh1024.der dsa1024.der make.bat
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%

=== modified file 'extra/yassl/taocrypt/src/Makefile.am'
--- a/extra/yassl/taocrypt/src/Makefile.am	2010-06-08 21:14:18 +0000
+++ b/extra/yassl/taocrypt/src/Makefile.am	2010-11-29 09:27:52 +0000
@@ -12,7 +12,3 @@ libtaocrypt_la_CXXFLAGS = @yassl_taocryp
 			  @yassl_thread_cxxflags@
 
 EXTRA_DIST = $(wildcard ../include/*.hpp)
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
-

=== modified file 'extra/yassl/taocrypt/test/Makefile.am'
--- a/extra/yassl/taocrypt/test/Makefile.am	2010-06-08 21:14:18 +0000
+++ b/extra/yassl/taocrypt/test/Makefile.am	2010-11-29 09:27:52 +0000
@@ -4,6 +4,3 @@ test_SOURCES = test.cpp
 test_LDADD    = $(top_builddir)/extra/yassl/taocrypt/src/libtaocrypt.la
 test_CXXFLAGS = -DYASSL_PURE_C @yassl_thread_cxxflags@
 EXTRA_DIST = make.bat
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%

=== modified file 'extra/yassl/testsuite/Makefile.am'
--- a/extra/yassl/testsuite/Makefile.am	2010-06-08 21:14:18 +0000
+++ b/extra/yassl/testsuite/Makefile.am	2010-11-29 09:27:52 +0000
@@ -8,7 +8,3 @@ testsuite_CXXFLAGS = -DYASSL_PURE_C -DYA
 testsuite_LDADD    = $(top_builddir)/extra/yassl/src/libyassl.la \
                      $(top_builddir)/extra/yassl/taocrypt/src/libtaocrypt.la
 EXTRA_DIST = testsuite.dsp test.hpp input quit make.bat
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
-

=== modified file 'include/my_compiler.h'
--- a/include/my_compiler.h	2010-07-14 19:39:40 +0000
+++ b/include/my_compiler.h	2010-10-20 18:21:40 +0000
@@ -32,8 +32,15 @@
 
 /* GNU C/C++ */
 #if defined __GNUC__
+/* Convenience macro to test the minimum required GCC version. */
+# define MY_GNUC_PREREQ(maj, min) \
+    ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
 /* Any after 2.95... */
 # define MY_ALIGN_EXT
+/* Comunicate to the compiler the unreachability of the code. */
+# if MY_GNUC_PREREQ(4,5)
+#   define MY_ASSERT_UNREACHABLE()   __builtin_unreachable()
+# endif
 
 /* Microsoft Visual C++ */
 #elif defined _MSC_VER
@@ -67,7 +74,7 @@
 #endif
 
 /**
-  Generic compiler-dependent features.
+  Generic (compiler-independent) features.
 */
 #ifndef MY_ALIGNOF
 # ifdef __cplusplus
@@ -79,6 +86,10 @@
 # endif
 #endif
 
+#ifndef MY_ASSERT_UNREACHABLE
+# define MY_ASSERT_UNREACHABLE()  do { assert(0); } while (0)
+#endif
+
 /**
   C++ Type Traits
 */

=== modified file 'include/my_dbug.h'
--- a/include/my_dbug.h	2009-12-03 11:19:05 +0000
+++ b/include/my_dbug.h	2010-11-24 22:57:34 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB & 2009 Monty Program Ab
+/* Copyright (C) 2000 MySQL AB & Oracle & 2009 Monty Program Ab
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -13,8 +13,12 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
-#ifndef _dbug_h
-#define _dbug_h
+#ifndef _my_dbug_h
+#define _my_dbug_h
+
+#ifndef __WIN__
+#include <signal.h>
+#endif  /* not __WIN__ */
 
 #if defined(__cplusplus) && !defined(DBUG_OFF)
 class Dbug_violation_helper
@@ -128,8 +132,35 @@ extern  void _db_flush_();
 #define DEBUGGER_OFF                    do { _dbug_on_= 0; } while(0)
 #define DEBUGGER_ON                     do { _dbug_on_= 1; } while(0)
 #define IF_DBUG(A) A
+#ifndef __WIN__
 #define DBUG_ABORT()                    (_db_flush_(), abort())
-#else                                           /* No debugger */
+#else
+/*
+  Avoid popup with abort/retry/ignore buttons. When BUG#31745 is fixed we can
+  call abort() instead of _exit(3) (now it would cause a "test signal" popup).
+*/
+#include <crtdbg.h>
+#define DBUG_ABORT() (_db_flush_(),\
+                     (void)_CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE),\
+                     (void)_CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR),\
+                     _exit(3))
+#endif
+
+/*
+  Make the program fail, without creating a core file.
+  abort() will send SIGABRT which (most likely) generates core.
+  Use SIGKILL instead, which cannot be caught.
+  We also pause the current thread, until the signal is actually delivered.
+  An alternative would be to use _exit(EXIT_FAILURE),
+  but then valgrind would report lots of memory leaks.
+ */
+#ifdef __WIN__
+#define DBUG_SUICIDE() DBUG_ABORT()
+#else
+#define DBUG_SUICIDE() (_db_flush_(), kill(getpid(), SIGKILL), pause())
+#endif
+
+#else						/* No debugger */
 
 #define DBUG_ENTER(a1)
 #define DBUG_VIOLATION_HELPER_LEAVE do { } while(0)
@@ -159,9 +190,12 @@ extern  void _db_flush_();
 #define DEBUGGER_OFF                    do { } while(0)
 #define DEBUGGER_ON                     do { } while(0)
 #define IF_DBUG(A)
-#define DBUG_ABORT()                    abort()
+#define DBUG_ABORT()                    do { } while(0)
+#define DBUG_SUICIDE()                  do { } while(0)
+
 #endif
 #ifdef  __cplusplus
 }
 #endif
-#endif
+
+#endif /* _my_dbug_h */

=== modified file 'include/my_pthread.h'
--- a/include/my_pthread.h	2010-08-27 14:12:44 +0000
+++ b/include/my_pthread.h	2010-11-24 22:57:34 +0000
@@ -515,7 +515,8 @@ int safe_mutex_destroy(safe_mutex_t *mp,
 int safe_cond_wait(pthread_cond_t *cond, safe_mutex_t *mp,const char *file,
 		   uint line);
 int safe_cond_timedwait(pthread_cond_t *cond, safe_mutex_t *mp,
-			struct timespec *abstime, const char *file, uint line);
+                        const struct timespec *abstime,
+                        const char *file, uint line);
 void safe_mutex_global_init(void);
 void safe_mutex_end(FILE *file);
 void safe_mutex_free_deadlock_data(safe_mutex_t *mp);

=== modified file 'include/mysql.h'
--- a/include/mysql.h	2010-08-27 14:12:44 +0000
+++ b/include/mysql.h	2010-11-23 21:39:59 +0000
@@ -224,7 +224,8 @@ struct st_mysql_options {
 
 enum mysql_status 
 {
-  MYSQL_STATUS_READY,MYSQL_STATUS_GET_RESULT,MYSQL_STATUS_USE_RESULT
+  MYSQL_STATUS_READY, MYSQL_STATUS_GET_RESULT, MYSQL_STATUS_USE_RESULT,
+  MYSQL_STATUS_STATEMENT_GET_RESULT
 };
 
 enum mysql_protocol_type 

=== modified file 'include/mysql.h.pp'
--- a/include/mysql.h.pp	2010-08-27 14:12:44 +0000
+++ b/include/mysql.h.pp	2010-11-23 21:39:59 +0000
@@ -292,7 +292,8 @@ struct st_mysql_options {
 };
 enum mysql_status
 {
-  MYSQL_STATUS_READY,MYSQL_STATUS_GET_RESULT,MYSQL_STATUS_USE_RESULT
+  MYSQL_STATUS_READY, MYSQL_STATUS_GET_RESULT, MYSQL_STATUS_USE_RESULT,
+  MYSQL_STATUS_STATEMENT_GET_RESULT
 };
 enum mysql_protocol_type
 {

=== modified file 'include/sha1.h'
--- a/include/sha1.h	2006-12-31 00:02:27 +0000
+++ b/include/sha1.h	2010-10-05 14:05:37 +0000
@@ -6,12 +6,13 @@
 
  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  GNU General Public License for more details.
 
  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+*/
 
 /*
  This is the header file for code which implements the Secure
@@ -25,6 +26,38 @@
  Please read the file sha1.c for more information.
 
  Modified 2002 by Peter Zaitsev to better follow MySQL standards
+
+  Original Source from: http://www.faqs.org/rfcs/rfc3174.html
+
+  Copyright (C) The Internet Society (2001).  All Rights Reserved.
+
+  This document and translations of it may be copied and furnished to
+  others, and derivative works that comment on or otherwise explain it
+  or assist in its implementation may be prepared, copied, published
+  and distributed, in whole or in part, without restriction of any
+  kind, provided that the above copyright notice and this paragraph are
+  included on all such copies and derivative works.  However, this
+  document itself may not be modified in any way, such as by removing
+  the copyright notice or references to the Internet Society or other
+  Internet organizations, except as needed for the purpose of
+  developing Internet standards in which case the procedures for
+  copyrights defined in the Internet Standards process must be
+  followed, or as required to translate it into languages other than
+  English.
+
+  The limited permissions granted above are perpetual and will not be
+  revoked by the Internet Society or its successors or assigns.
+
+  This document and the information contained herein is provided on an
+  "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
+  TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
+  BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
+  HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
+  MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+
+  Acknowledgement 
+  Funding for the RFC Editor function is currently provided by the 
+  Internet Society. 
 */
 
 

=== modified file 'libmysql/Makefile.shared'
--- a/libmysql/Makefile.shared	2010-08-27 14:12:44 +0000
+++ b/libmysql/Makefile.shared	2010-11-29 09:27:52 +0000
@@ -115,6 +115,3 @@ conf_to_src_LDADD=
 #force static linking of conf_to_src - essential when linking against
 #custom installation of libc
 conf_to_src_LDFLAGS=@NOINST_LDFLAGS@
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%

=== modified file 'libmysql/libmysql.c'
--- a/libmysql/libmysql.c	2010-08-27 14:12:44 +0000
+++ b/libmysql/libmysql.c	2010-11-23 21:39:59 +0000
@@ -2516,6 +2516,8 @@ static my_bool execute(MYSQL_STMT *stmt,
       set_stmt_errmsg(stmt, net);
     DBUG_RETURN(1);
   }
+  else if (mysql->status == MYSQL_STATUS_GET_RESULT)
+    stmt->mysql->status= MYSQL_STATUS_STATEMENT_GET_RESULT;
   DBUG_RETURN(0);
 }
 
@@ -2654,7 +2656,7 @@ static int stmt_read_row_unbuffered(MYSQ
     set_stmt_error(stmt, CR_SERVER_LOST, unknown_sqlstate, NULL);
     return 1;
   }
-  if (mysql->status != MYSQL_STATUS_GET_RESULT)
+  if (mysql->status != MYSQL_STATUS_STATEMENT_GET_RESULT)
   {
     set_stmt_error(stmt, stmt->unbuffered_fetch_cancelled ?
                    CR_FETCH_CANCELED : CR_COMMANDS_OUT_OF_SYNC,
@@ -4860,7 +4862,7 @@ int STDCALL mysql_stmt_store_result(MYSQ
       DBUG_RETURN(1);
     }
   }
-  else if (mysql->status != MYSQL_STATUS_GET_RESULT)
+  else if (mysql->status != MYSQL_STATUS_STATEMENT_GET_RESULT)
   {
     set_stmt_error(stmt, CR_COMMANDS_OUT_OF_SYNC, unknown_sqlstate, NULL);
     DBUG_RETURN(1);

=== modified file 'libmysqld/examples/Makefile.am'
--- a/libmysqld/examples/Makefile.am	2010-11-17 12:24:20 +0000
+++ b/libmysqld/examples/Makefile.am	2010-11-29 09:27:52 +0000
@@ -52,6 +52,3 @@ mysql_LDADD = @readline_link@ @TERMCAP_L
 
 mysql_client_test_embedded_LINK = $(CXXLINK)
 nodist_mysql_client_test_embedded_SOURCES = mysql_client_test.c
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%

=== modified file 'mysql-test/collections/default.daily'
--- a/mysql-test/collections/default.daily	2010-03-02 12:43:21 +0000
+++ b/mysql-test/collections/default.daily	2010-10-05 08:47:03 +0000
@@ -1,5 +1,3 @@
-perl mysql-test-run.pl --timer --force --comment=rpl_ndb_row --vardir=var-rpl_ndb_row --suite=rpl_ndb,ndb --mysqld=--binlog-format=row --experimental=collections/default.experimental
-
 perl mysql-test-run.pl --timer --force --parallel=auto --comment=n_mix --vardir=var-n_mix --mysqld=--binlog-format=mixed --experimental=collections/default.experimental
 perl mysql-test-run.pl --timer --force --parallel=auto --comment=ps_row --vardir=var-ps_row --ps-protocol --mysqld=--binlog-format=row --experimental=collections/default.experimental
 perl mysql-test-run.pl --timer --force --parallel=auto --comment=embedded --vardir=var-emebbed  --embedded --experimental=collections/default.experimental

=== modified file 'mysql-test/collections/default.experimental'
--- a/mysql-test/collections/default.experimental	2010-09-07 20:16:10 +0000
+++ b/mysql-test/collections/default.experimental	2010-10-27 04:24:04 +0000
@@ -43,8 +43,6 @@ parts.partition_mgm_lc1_ndb
 parts.partition_mgm_lc2_ndb              # joro : NDB tests marked as experimental as agreed with bochklin
 parts.partition_syntax_ndb               # joro : NDB tests marked as experimental as agreed with bochklin
 parts.partition_value_ndb                # joro : NDB tests marked as experimental as agreed with bochklin
-main.mysqlhotcopy_myisam                 # horst: due to bug#54129
-main.mysqlhotcopy_archive                # horst: due to bug#54129
 main.gis-rtree                           # svoj: due to BUG#38965
 main.type_float                          # svoj: due to BUG#38965
 main.type_newdecimal                     # svoj: due to BUG#38965

=== modified file 'mysql-test/extra/rpl_tests/rpl_get_master_version_and_clock.test'
--- a/mysql-test/extra/rpl_tests/rpl_get_master_version_and_clock.test	2010-08-02 09:01:24 +0000
+++ b/mysql-test/extra/rpl_tests/rpl_get_master_version_and_clock.test	2010-11-24 22:57:34 +0000
@@ -34,7 +34,7 @@
 #
 
 connection slave;
-if (`SELECT $debug_sync_action = ''`)
+if (!$debug_sync_action)
 {
     --die Cannot continue. Please set value for debug_sync_action.
 }

=== modified file 'mysql-test/extra/rpl_tests/rpl_loaddata.test'
--- a/mysql-test/extra/rpl_tests/rpl_loaddata.test	2010-08-03 02:22:19 +0000
+++ b/mysql-test/extra/rpl_tests/rpl_loaddata.test	2010-10-25 13:48:41 +0000
@@ -24,7 +24,7 @@ connection master;
 # MTR is not case-sensitive.
 let $lower_stmt_head= load data;
 let $UPPER_STMT_HEAD= LOAD DATA;
-if (`SELECT '$lock_option' <> ''`)
+if ($lock_option)
 {
   #if $lock_option is null, an extra blank is added into the statement,
   #this will change the result of rpl_loaddata test case. so $lock_option

=== added file 'mysql-test/extra/rpl_tests/rpl_stop_slave.test'
--- a/mysql-test/extra/rpl_tests/rpl_stop_slave.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/extra/rpl_tests/rpl_stop_slave.test	2010-10-16 12:03:44 +0000
@@ -0,0 +1,61 @@
+#
+# Auxiliary file which is used to test BUG#56118 
+#
+# Slave should apply all statements in the transaction before stop if any
+# temporary table is created or dropped.
+#
+# USEAGE: 
+# --let $tmp_table_stm= a SQL statement 
+# --source extra/rpl_tests/rpl_stop_slave.test
+#
+
+if (`SELECT "$tmp_table_stm" = ''`)
+{
+  --echo \$tmp_table_stm is NULL
+  --die $tmp_table_stm is NULL
+}
+
+--echo
+--echo [ On Master ]
+connection master;
+BEGIN;
+DELETE FROM t1;
+eval $tmp_table_stm;
+INSERT INTO t1 VALUES (1);
+DROP TEMPORARY TABLE tt1;
+COMMIT;
+
+--echo
+--echo [ On Slave ]
+connection slave;
+
+# To check if slave SQL thread is applying INSERT statement
+let $show_statement= SHOW PROCESSLIST;
+let $field= Info;
+let $condition= LIKE 'INSERT%';
+source include/wait_show_condition.inc;
+
+send STOP SLAVE SQL_THREAD;
+
+--echo
+--echo [ On Slave1 ]
+connection slave1;
+--echo # To resume slave SQL thread
+SET DEBUG_SYNC= 'now SIGNAL signal.continue';
+SET DEBUG_SYNC= 'RESET';
+
+--echo
+--echo [ On Slave ]
+connection slave;
+reap;
+source include/wait_for_slave_sql_to_stop.inc;
+
+--echo # Slave should stop after the transaction has committed.
+--echo # So t1 on master is same to t1 on slave.
+let diff_table_1=master:test.t1;
+let diff_table_2=slave:test.t1;
+source include/diff_tables.inc;
+
+connection slave;
+START SLAVE SQL_THREAD;
+source include/wait_for_slave_sql_to_start.inc;

=== modified file 'mysql-test/include/check_concurrent_insert.inc'
--- a/mysql-test/include/check_concurrent_insert.inc	2010-05-27 20:07:40 +0000
+++ b/mysql-test/include/check_concurrent_insert.inc	2010-10-21 13:20:50 +0000
@@ -23,7 +23,7 @@
 # Reset DEBUG_SYNC facility for safety.
 set debug_sync= "RESET";
 
-if (`SELECT '$restore_table' <> ''`)
+if ($restore_table)
 {
 --eval create temporary table t_backup select * from $restore_table;
 }
@@ -82,7 +82,7 @@ connection default;
 
 --eval delete from $table where i = 0;
 
-if (`SELECT '$restore_table' <> ''`)
+if ($restore_table)
 {
 --eval truncate table $restore_table;
 --eval insert into $restore_table select * from t_backup;

=== modified file 'mysql-test/include/check_no_concurrent_insert.inc'
--- a/mysql-test/include/check_no_concurrent_insert.inc	2010-05-27 20:07:40 +0000
+++ b/mysql-test/include/check_no_concurrent_insert.inc	2010-10-21 13:20:50 +0000
@@ -23,7 +23,7 @@
 # Reset DEBUG_SYNC facility for safety.
 set debug_sync= "RESET";
 
-if (`SELECT '$restore_table' <> ''`)
+if ($restore_table)
 {
 --eval create temporary table t_backup select * from $restore_table;
 }
@@ -67,7 +67,7 @@ if (!$success)
 
 --eval delete from $table where i = 0;
 
-if (`SELECT '$restore_table' <> ''`)
+if ($restore_table)
 {
 --eval truncate table $restore_table;
 --eval insert into $restore_table select * from t_backup;

=== modified file 'mysql-test/include/get_relay_log_pos.inc'
--- a/mysql-test/include/get_relay_log_pos.inc	2010-05-24 13:54:08 +0000
+++ b/mysql-test/include/get_relay_log_pos.inc	2010-10-21 13:20:50 +0000
@@ -10,12 +10,12 @@
 #   # at this point, get_relay_log_pos.inc sets $relay_log_pos. echo position
 #   # in $relay_log_file: $relay_log_pos. 
 
-if (`SELECT '$relay_log_file' = ''`)
+if (!$relay_log_file)
 {
   --die 'variable $relay_log_file is null'
 }
 
-if (`SELECT '$master_log_pos' = ''`)
+if (!$master_log_pos)
 {
   --die 'variable $master_log_pos is null'
 }

=== modified file 'mysql-test/include/have_not_innodb_plugin.inc'
--- a/mysql-test/include/have_not_innodb_plugin.inc	2009-09-25 09:26:49 +0000
+++ b/mysql-test/include/have_not_innodb_plugin.inc	2010-11-25 18:55:52 +0000
@@ -1,4 +1,4 @@
 disable_query_log;
 --require r/not_true.require
-select (PLUGIN_LIBRARY LIKE 'ha_innodb_plugin%') as `TRUE` from information_schema.plugins where PLUGIN_NAME='InnoDB';
+select (PLUGIN_LIBRARY LIKE 'ha_innodb_plugin%' OR PLUGIN_DESCRIPTION LIKE '%xtradb%') as `TRUE` from information_schema.plugins where PLUGIN_NAME='InnoDB';
 enable_query_log;

=== modified file 'mysql-test/include/index_merge2.inc'
--- a/mysql-test/include/index_merge2.inc	2009-11-14 01:15:03 +0000
+++ b/mysql-test/include/index_merge2.inc	2010-11-24 22:57:34 +0000
@@ -345,3 +345,55 @@ explain select * from t1 where (key3 > 3
 select * from t1 where (key3 > 30 and key3<35) or (key2 >32 and key2 < 40);
 drop table t1;
 
+--echo #
+--echo # Bug#56423: Different count with SELECT and CREATE SELECT queries
+--echo #
+
+CREATE TABLE t1 (
+  a INT,
+  b INT,
+  c INT,
+  d INT,
+  PRIMARY KEY (a),
+  KEY (c),
+  KEY bd (b,d)
+);
+
+INSERT INTO t1 VALUES
+(1, 0, 1, 0),
+(2, 1, 1, 1),
+(3, 1, 1, 1),
+(4, 0, 1, 1);
+
+EXPLAIN
+SELECT a
+FROM t1
+WHERE c = 1 AND b = 1 AND d = 1;
+
+CREATE TABLE t2 ( a INT )
+SELECT a
+FROM t1
+WHERE c = 1 AND b = 1 AND d = 1;
+
+SELECT * FROM t2;
+
+DROP TABLE t1, t2;
+
+CREATE TABLE t1( a INT, b INT, KEY(a), KEY(b) );
+INSERT INTO t1 VALUES (1, 2), (1, 2), (1, 2), (1, 2);
+SELECT * FROM t1 FORCE INDEX(a, b) WHERE a = 1 AND b = 2;
+
+DROP TABLE t1;
+
+--echo # Code coverage of fix.
+CREATE TABLE t1 ( a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b INT);
+INSERT INTO t1 (b) VALUES (1);
+UPDATE t1 SET b = 2 WHERE a = 1;
+SELECT * FROM t1;
+
+CREATE TABLE t2 ( a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b VARCHAR(1) );
+INSERT INTO t2 (b) VALUES ('a');
+UPDATE t2 SET b = 'b' WHERE a = 1;
+SELECT * FROM t2;
+
+DROP TABLE t1, t2;

=== modified file 'mysql-test/include/index_merge_ror_cpk.inc'
--- a/mysql-test/include/index_merge_ror_cpk.inc	2006-08-16 12:58:49 +0000
+++ b/mysql-test/include/index_merge_ror_cpk.inc	2010-09-16 12:13:53 +0000
@@ -126,3 +126,19 @@ WHERE
 
 drop table t1;
 
+--echo #
+--echo # Bug#50402 Optimizer producing wrong results when using Index Merge on InnoDB
+--echo #
+CREATE TABLE t1 (f1 INT, PRIMARY KEY (f1));
+INSERT INTO t1 VALUES (2);
+CREATE TABLE t2 (f1 INT, f2 INT, f3 char(1),
+                 PRIMARY KEY (f1), KEY (f2), KEY (f3) );
+INSERT INTO t2 VALUES (1, 1, 'h'), (2, 3, 'h'), (3, 2, ''), (4, 2, '');
+
+SELECT t1.f1 FROM t1
+WHERE (SELECT COUNT(*) FROM t2 WHERE t2.f3 = 'h' AND t2.f2 = t1.f1) = 0 AND t1.f1 = 2;
+
+EXPLAIN SELECT t1.f1 FROM t1
+WHERE (SELECT COUNT(*) FROM t2 WHERE t2.f3 = 'h' AND t2.f2 = t1.f1) = 0 AND t1.f1 = 2;
+
+DROP TABLE t1,t2;

=== modified file 'mysql-test/include/kill_query.inc'
--- a/mysql-test/include/kill_query.inc	2009-12-10 03:44:19 +0000
+++ b/mysql-test/include/kill_query.inc	2010-10-21 13:20:50 +0000
@@ -44,7 +44,7 @@ connection master;
 # kill the query that is waiting
 eval kill query $connection_id;
 
-if (`SELECT '$debug_lock' != ''`)
+if ($debug_lock)
 {
   # release the lock to allow binlog continue
   eval SELECT RELEASE_LOCK($debug_lock);
@@ -57,7 +57,7 @@ reap;
 
 connection master;
 
-if (`SELECT '$debug_lock' != ''`)
+if ($debug_lock)
 {
   # get lock again to make the next query wait
   eval SELECT GET_LOCK($debug_lock, 10);

=== modified file 'mysql-test/include/kill_query_and_diff_master_slave.inc'
--- a/mysql-test/include/kill_query_and_diff_master_slave.inc	2009-03-27 05:19:50 +0000
+++ b/mysql-test/include/kill_query_and_diff_master_slave.inc	2010-10-21 13:20:50 +0000
@@ -25,7 +25,7 @@ source include/kill_query.inc;
 connection master;
 disable_query_log;
 disable_result_log;
-if (`SELECT '$debug_lock' != ''`)
+if ($debug_lock)
 {
   eval SELECT RELEASE_LOCK($debug_lock);
 }
@@ -36,8 +36,8 @@ source include/diff_master_slave.inc;
 
 # Acquire the debug lock again if used
 connection master;
-disable_query_log; disable_result_log; if (`SELECT '$debug_lock' !=
-''`) { eval SELECT GET_LOCK($debug_lock, 10); } enable_result_log;
-enable_query_log;
+disable_query_log; disable_result_log;
+if ($debug_lock) { eval SELECT GET_LOCK($debug_lock, 10); }
+enable_result_log; enable_query_log;
 
 connection $connection_name;

=== removed file 'mysql-test/include/percona_query_cache_with_comments.inc'
--- a/mysql-test/include/percona_query_cache_with_comments.inc	2010-08-04 08:39:53 +0000
+++ b/mysql-test/include/percona_query_cache_with_comments.inc	1970-01-01 00:00:00 +0000
@@ -1,95 +0,0 @@
---source include/percona_query_cache_with_comments_clear.inc
-let $query=/* with comment first */select * from t1;
-eval $query;
---source include/percona_query_cache_with_comments_eval.inc
-
-let $query=# with comment first
-select * from t1;
---source include/percona_query_cache_with_comments_eval.inc
-
-let $query=-- with comment first
-select * from t1;
---source include/percona_query_cache_with_comments_eval.inc
-
-let $query=/* with comment first and "quote" */select * from t1;
---source include/percona_query_cache_with_comments_eval.inc
-
-let $query=# with comment first and "quote"
-select * from t1;
---source include/percona_query_cache_with_comments_eval.inc
-
-let $query=-- with comment first and "quote" 
-select * from t1;
---source include/percona_query_cache_with_comments_eval.inc
-
-let $query=
-    /* with comment and whitespaces first */select * from t1;
---source include/percona_query_cache_with_comments_eval.inc
-
-let $query= 
-    # with comment and whitespaces first
-select * from t1;
---source include/percona_query_cache_with_comments_eval.inc
-
-let $query=
-    -- with comment and whitespaces first
-select * from t1;
---source include/percona_query_cache_with_comments_eval.inc
-
-let $internal=* internal comment *;
-
-let $query=select * /$internal/ from t1;
---source include/percona_query_cache_with_comments_eval.inc
-let $query=select */$internal/ from t1;
---source include/percona_query_cache_with_comments_eval.inc
-let $query=select */$internal/from t1;
---source include/percona_query_cache_with_comments_eval.inc
-
-let $internal=* internal comment with "quote" *;
-
-let $query=select * /$internal/ from t1;
---source include/percona_query_cache_with_comments_eval.inc
-let $query=select */$internal/ from t1;
---source include/percona_query_cache_with_comments_eval.inc
-let $query=select */$internal/from t1;
---source include/percona_query_cache_with_comments_eval.inc
-
-let $query=select * from t1
-;
---source include/percona_query_cache_with_comments_eval.inc
-
-let $query=select * from t1 ;
---source include/percona_query_cache_with_comments_eval.inc
-
-let $query=select * from t1	;
---source include/percona_query_cache_with_comments_eval.inc
-
-let $query=select * from t1
-/* comment in the end */;
---source include/percona_query_cache_with_comments_eval.inc
-
-let $query=select * from t1
-/* *\/ */;
---source include/percona_query_cache_with_comments_eval.inc
-
-let $query=select * from t1
-/* comment in the end */
-;
---source include/percona_query_cache_with_comments_eval.inc
-
-let $query=select * from t1 #comment in the end;
---source include/percona_query_cache_with_comments_eval.inc
-
-let $query=select * from t1 #comment in the end
-;
---source include/percona_query_cache_with_comments_eval.inc
-
-let $query=select * from t1 -- comment in the end;
---source include/percona_query_cache_with_comments_eval.inc
-
-let $query=select * from t1 -- comment in the end
-;
---source include/percona_query_cache_with_comments_eval.inc
-
-let $query=select ' \'  ' from t1;
---source include/percona_query_cache_with_comments_eval.inc

=== removed file 'mysql-test/include/percona_query_cache_with_comments_begin.inc'
--- a/mysql-test/include/percona_query_cache_with_comments_begin.inc	2010-08-04 08:39:53 +0000
+++ b/mysql-test/include/percona_query_cache_with_comments_begin.inc	1970-01-01 00:00:00 +0000
@@ -1,12 +0,0 @@
--- source include/have_query_cache.inc
-
-set GLOBAL query_cache_size=1355776;
-
---disable_warnings
-drop table if exists t1;
---enable_warnings
-
-create table t1 (a int not null);
-insert into t1 values (1),(2),(3);
-
---source include/percona_query_cache_with_comments_clear.inc

=== removed file 'mysql-test/include/percona_query_cache_with_comments_clear.inc'
--- a/mysql-test/include/percona_query_cache_with_comments_clear.inc	2010-08-04 08:39:53 +0000
+++ b/mysql-test/include/percona_query_cache_with_comments_clear.inc	1970-01-01 00:00:00 +0000
@@ -1,5 +0,0 @@
-# Reset query cache variables.
-flush query cache; # This crashed in some versions
-flush query cache; # This crashed in some versions
-reset query cache;
-flush status;

=== removed file 'mysql-test/include/percona_query_cache_with_comments_end.inc'
--- a/mysql-test/include/percona_query_cache_with_comments_end.inc	2010-08-04 08:39:53 +0000
+++ b/mysql-test/include/percona_query_cache_with_comments_end.inc	1970-01-01 00:00:00 +0000
@@ -1,3 +0,0 @@
-DROP TABLE t1;
-SET GLOBAL query_cache_size=default;
-set global query_cache_strip_comments=OFF;

=== removed file 'mysql-test/include/percona_query_cache_with_comments_eval.inc'
--- a/mysql-test/include/percona_query_cache_with_comments_eval.inc	2010-08-04 08:39:53 +0000
+++ b/mysql-test/include/percona_query_cache_with_comments_eval.inc	1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-echo -----------------------------------------------------;
-echo $query;
-echo -----------------------------------------------------;
---source include/percona_query_cache_with_comments_show.inc
-eval $query;
-eval $query;
---source include/percona_query_cache_with_comments_show.inc

=== removed file 'mysql-test/include/percona_query_cache_with_comments_show.inc'
--- a/mysql-test/include/percona_query_cache_with_comments_show.inc	2010-08-04 08:39:53 +0000
+++ b/mysql-test/include/percona_query_cache_with_comments_show.inc	1970-01-01 00:00:00 +0000
@@ -1,8 +0,0 @@
-let $show=show status like "Qcache_queries_in_cache";
-eval $show;
-let $show=show status like "Qcache_inserts";
-eval $show;
-let $show=show status like "Qcache_hits";
-eval $show;
-
-

=== removed file 'mysql-test/include/percona_query_response_time_flush.inc'
--- a/mysql-test/include/percona_query_response_time_flush.inc	2010-09-03 17:42:54 +0000
+++ b/mysql-test/include/percona_query_response_time_flush.inc	1970-01-01 00:00:00 +0000
@@ -1 +0,0 @@
-FLUSH QUERY_RESPONSE_TIME;

=== removed file 'mysql-test/include/percona_query_response_time_show.inc'
--- a/mysql-test/include/percona_query_response_time_show.inc	2010-10-19 12:16:15 +0000
+++ b/mysql-test/include/percona_query_response_time_show.inc	1970-01-01 00:00:00 +0000
@@ -1,8 +0,0 @@
-SELECT d.count,
-(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
-(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total,
-(SELECT COUNT(*)     FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count,
-(SELECT COUNT(*)     FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
-FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0;
-SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
-SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;

=== removed file 'mysql-test/include/percona_query_response_time_sleep.inc'
--- a/mysql-test/include/percona_query_response_time_sleep.inc	2010-09-03 17:42:54 +0000
+++ b/mysql-test/include/percona_query_response_time_sleep.inc	1970-01-01 00:00:00 +0000
@@ -1,19 +0,0 @@
-SELECT SLEEP(0.31);
-SELECT SLEEP(0.32);
-SELECT SLEEP(0.33);
-SELECT SLEEP(0.34);
-SELECT SLEEP(0.35);
-SELECT SLEEP(0.36);
-SELECT SLEEP(0.37);
-SELECT SLEEP(0.38);
-SELECT SLEEP(0.39);
-SELECT SLEEP(0.40);
-SELECT SLEEP(1.1);
-SELECT SLEEP(1.2);
-SELECT SLEEP(1.3);
-SELECT SLEEP(1.5);
-SELECT SLEEP(1.4);
-SELECT SLEEP(0.5);
-SELECT SLEEP(2.1);
-SELECT SLEEP(2.3);
-SELECT SLEEP(2.5);

=== modified file 'mysql-test/include/setup_fake_relay_log.inc'
--- a/mysql-test/include/setup_fake_relay_log.inc	2010-02-02 15:16:47 +0000
+++ b/mysql-test/include/setup_fake_relay_log.inc	2010-10-21 13:20:50 +0000
@@ -56,7 +56,7 @@ if (`SELECT "$_sql_running" = "Yes" OR "
 # Read server variables.
 let $MYSQLD_DATADIR= `SELECT @@datadir`;
 let $_fake_filename= query_get_value(SHOW VARIABLES LIKE 'relay_log', Value, 1);
-if (`SELECT '$_fake_filename' = ''`) {
+if (!$_fake_filename) {
   --echo Badly written test case: relay_log variable is empty. Please use the
   --echo server option --relay-log=FILE.
 }
@@ -72,7 +72,7 @@ copy_file $fake_relay_log $_fake_relay_l
 
 if (`SELECT LENGTH(@@secure_file_priv) > 0`)
 {
-  -- let $_file_priv_dir= `SELECT @@secure_file_priv`;
+  -- let $_file_priv_dir= `SELECT @@secure_file_priv`
   -- let $_suffix= `SELECT UUID()`
   -- let $_tmp_file= $_file_priv_dir/fake-index.$_suffix
 

=== modified file 'mysql-test/include/show_binlog_events.inc'
--- a/mysql-test/include/show_binlog_events.inc	2010-05-24 13:54:08 +0000
+++ b/mysql-test/include/show_binlog_events.inc	2010-10-21 13:20:50 +0000
@@ -27,14 +27,14 @@ if (!$binlog_start)
 }
 
 --let $_statement=show binlog events
-if (`SELECT '$binlog_file' <> ''`)
+if ($binlog_file)
 {
   --let $_statement= $_statement in '$binlog_file'
 }
 
 --let $_statement= $_statement from $binlog_start
 
-if (`SELECT '$binlog_limit' <> ''`)
+if ($binlog_limit)
 {
   --let $_statement= $_statement limit $binlog_limit
 }

=== modified file 'mysql-test/include/show_rpl_debug_info.inc'
--- a/mysql-test/include/show_rpl_debug_info.inc	2010-05-24 13:54:08 +0000
+++ b/mysql-test/include/show_rpl_debug_info.inc	2010-10-21 13:20:50 +0000
@@ -48,13 +48,13 @@ let $binlog_name= query_get_value("SHOW
 eval SHOW BINLOG EVENTS IN '$binlog_name';
 
 let $_master_con= $master_connection;
-if (`SELECT '$_master_con' = ''`)
+if (!$_master_con)
 {
   if (`SELECT '$_con' = 'slave'`)
   {
     let $_master_con= master;
   }
-  if (`SELECT '$_master_con' = ''`)
+  if (!$_master_con)
   {
     --echo Unable to determine master connection. No debug info printed for master.
     --echo Please fix the test case by setting $master_connection before sourcing
@@ -62,7 +62,7 @@ if (`SELECT '$_master_con' = ''`)
   }
 }
 
-if (`SELECT '$_master_con' != ''`)
+if ($_master_con)
 {
 
   let $master_binlog_name_io= query_get_value("SHOW SLAVE STATUS", Master_Log_File, 1);

=== modified file 'mysql-test/include/wait_for_slave_io_error.inc'
--- a/mysql-test/include/wait_for_slave_io_error.inc	2010-05-28 02:57:45 +0000
+++ b/mysql-test/include/wait_for_slave_io_error.inc	2010-10-21 13:20:50 +0000
@@ -31,7 +31,7 @@
 # $master_connection
 #   See wait_for_slave_param.inc for description.
 
-if (`SELECT '$slave_io_errno' = ''`) {
+if (!$slave_io_errno) {
   --die !!!ERROR IN TEST: you must set \$slave_io_errno before sourcing wait_for_slave_io_error.inc
 }
 

=== modified file 'mysql-test/include/wait_for_slave_param.inc'
--- a/mysql-test/include/wait_for_slave_param.inc	2010-05-24 13:54:08 +0000
+++ b/mysql-test/include/wait_for_slave_param.inc	2010-10-21 13:20:50 +0000
@@ -51,7 +51,7 @@ if (!$_slave_timeout_counter)
 }
 
 let $_slave_param_comparison= $slave_param_comparison;
-if (`SELECT '$_slave_param_comparison' = ''`)
+if (!$_slave_param_comparison)
 {
   let $_slave_param_comparison= =;
 }
@@ -71,7 +71,7 @@ while (`SELECT NOT('$_show_slave_status_
 if (!$_slave_timeout_counter)
 {
   --echo **** ERROR: timeout after $slave_timeout seconds while waiting for slave parameter $slave_param $_slave_param_comparison $slave_param_value ****
-  if (`SELECT '$slave_error_message' != ''`)
+  if ($slave_error_message)
   {
     --echo Message: $slave_error_message
   }

=== modified file 'mysql-test/include/wait_for_slave_sql_error.inc'
--- a/mysql-test/include/wait_for_slave_sql_error.inc	2010-05-24 13:54:08 +0000
+++ b/mysql-test/include/wait_for_slave_sql_error.inc	2010-10-21 13:20:50 +0000
@@ -24,7 +24,7 @@
 # $master_connection
 #   See wait_for_slave_param.inc for description.
 
-if (`SELECT '$slave_sql_errno' = ''`) {
+if (!$slave_sql_errno) {
   --die !!!ERROR IN TEST: you must set \$slave_sql_errno before sourcing wait_for_slave_sql_error.inc
 }
 

=== modified file 'mysql-test/include/wait_for_status_var.inc'
--- a/mysql-test/include/wait_for_status_var.inc	2010-08-02 09:01:24 +0000
+++ b/mysql-test/include/wait_for_status_var.inc	2010-11-24 22:57:34 +0000
@@ -45,7 +45,7 @@ if (!$_status_timeout_counter)
 }
 
 let $_status_var_comparsion= $status_var_comparsion;
-if (`SELECT '$_status_var_comparsion' = ''`)
+if (!$_status_var_comparsion)
 {
   let $_status_var_comparsion= =;
 }

=== modified file 'mysql-test/lib/My/SafeProcess/Makefile.am'
--- a/mysql-test/lib/My/SafeProcess/Makefile.am	2009-10-13 18:21:42 +0000
+++ b/mysql-test/lib/My/SafeProcess/Makefile.am	2010-11-29 09:27:52 +0000
@@ -23,7 +23,3 @@ my_safe_process_SOURCES = safe_process.c
 EXTRA_DIST = 	safe_kill_win.cc \
 		safe_process_win.cc \
 		CMakeLists.txt
-
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%

=== modified file 'mysql-test/lib/mtr_cases.pm'
--- a/mysql-test/lib/mtr_cases.pm	2010-10-19 13:58:35 +0000
+++ b/mysql-test/lib/mtr_cases.pm	2010-11-23 21:39:59 +0000
@@ -678,6 +678,13 @@ sub process_opts {
       next;
     }
 
+    $value= mtr_match_prefix($opt, "--testcase-timeout=");
+    if ( defined $value ) {
+      # Overrides test case timeout for this test
+      $tinfo->{'case-timeout'}= $value;
+      next;
+    }
+
     # Ok, this was a real option, add it
     push(@{$tinfo->{$opt_name}}, $opt);
   }
@@ -688,6 +695,7 @@ sub process_opts {
   }
 }
 
+
 ##############################################################################
 #
 #  Collect information about a single test case
@@ -900,7 +908,7 @@ sub collect_one_test_case {
     {
       # Ndb is not supported, skip it
       $tinfo->{'skip'}= 1;
-      $tinfo->{'comment'}= "No ndbcluster support";
+      $tinfo->{'comment'}= "No ndbcluster support or ndb tests not enabled";
       return $tinfo;
     }
     elsif ( $::opt_skip_ndbcluster )

=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl	2010-11-02 15:22:57 +0000
+++ b/mysql-test/mysql-test-run.pl	2010-11-24 22:57:34 +0000
@@ -111,12 +111,24 @@ my $path_vardir_trace;          # unix f
 my $opt_tmpdir;                 # Path to use for tmp/ dir
 my $opt_tmpdir_pid;
 
+my $opt_start;
+my $opt_start_dirty;
+my $opt_start_exit;
+my $start_only;
+
 END {
   if ( defined $opt_tmpdir_pid and $opt_tmpdir_pid == $$ )
   {
-    # Remove the tempdir this process has created
-    mtr_verbose("Removing tmpdir '$opt_tmpdir");
-    rmtree($opt_tmpdir);
+    if (!$opt_start_exit)
+    {
+      # Remove the tempdir this process has created
+      mtr_verbose("Removing tmpdir $opt_tmpdir");
+      rmtree($opt_tmpdir);
+    }
+    else
+    {
+      mtr_warning("tmpdir $opt_tmpdir should be removed after the server has finished");
+    }
   }
 }
 
@@ -216,20 +228,16 @@ my $opt_suite_timeout   = $ENV{MTR_SUITE
 my $opt_shutdown_timeout= $ENV{MTR_SHUTDOWN_TIMEOUT} ||  10; # seconds
 my $opt_start_timeout   = $ENV{MTR_START_TIMEOUT}    || 180; # seconds
 
-sub testcase_timeout { return $opt_testcase_timeout * 60; };
 sub suite_timeout { return $opt_suite_timeout * 60; };
 sub check_timeout { return $opt_testcase_timeout * 6; };
 
-my $opt_start;
-my $opt_start_dirty;
-my $opt_start_exit;
-my $start_only;
 my $opt_wait_all;
 my $opt_user_args;
 my $opt_repeat= 1;
 my $opt_retry= 1;
 my $opt_retry_failure= env_or_val(MTR_RETRY_FAILURE => 2);
 my $opt_reorder= 1;
+my $opt_force_restart= 0;
 
 my $opt_strace_client;
 
@@ -247,9 +255,21 @@ my $opt_callgrind;
 my %mysqld_logs;
 my $opt_debug_sync_timeout= 300; # Default timeout for WAIT_FOR actions.
 
+sub testcase_timeout ($) {
+  my ($tinfo)= @_;
+  if (exists $tinfo->{'case-timeout'}) {
+    # Return test specific timeout if *longer* that the general timeout
+    my $test_to= $tinfo->{'case-timeout'};
+    $test_to*= 10 if $opt_valgrind;
+    return $test_to * 60 if $test_to > $opt_testcase_timeout;
+  }
+  return $opt_testcase_timeout * 60;
+}
+
 our $opt_warnings= 1;
 
-our $opt_skip_ndbcluster= 0;
+our $opt_include_ndbcluster= 0;
+our $opt_skip_ndbcluster= 1;
 
 my $exe_ndbd;
 my $exe_ndb_mgmd;
@@ -611,13 +631,15 @@ sub run_test_server ($$$) {
 	  if ($test_has_failed and $retries <= $opt_retry){
 	    # Test should be run one more time unless it has failed
 	    # too many times already
+	    my $tname= $result->{name};
 	    my $failures= $result->{failures};
 	    if ($opt_retry > 1 and $failures >= $opt_retry_failure){
-	      mtr_report("\nTest has failed $failures times,",
+	      mtr_report("\nTest $tname has failed $failures times,",
 			 "no more retries!\n");
 	    }
 	    else {
-	      mtr_report("\nRetrying test, attempt($retries/$opt_retry)...\n");
+	      mtr_report("\nRetrying test $tname, ".
+			 "attempt($retries/$opt_retry)...\n");
 	      delete($result->{result});
 	      $result->{retries}= $retries+1;
 	      $result->write_test($sock, 'TESTCASE');
@@ -903,6 +925,7 @@ sub command_line_setup {
              # Control what test suites or cases to run
              'force'                    => \$opt_force,
              'with-ndbcluster-only'     => \&collect_option,
+             'include-ndbcluster'       => \$opt_include_ndbcluster,
              'skip-ndbcluster|skip-ndb' => \$opt_skip_ndbcluster,
              'suite|suites=s'           => \$opt_suites,
              'skip-rpl'                 => \&collect_option,
@@ -986,6 +1009,7 @@ sub command_line_setup {
              'report-features'          => \$opt_report_features,
              'comment=s'                => \$opt_comment,
              'fast'                     => \$opt_fast,
+	     'force-restart'            => \$opt_force_restart,
              'reorder!'                 => \$opt_reorder,
              'enable-disabled'          => \&collect_option,
              'verbose+'                 => \$opt_verbose,
@@ -2181,6 +2205,12 @@ sub environment_setup {
   # Create an environment variable to make it possible
   # to detect that valgrind is being used from test cases
   $ENV{'VALGRIND_TEST'}= $opt_valgrind;
+
+  # Add dir of this perl to aid mysqltest in finding perl
+  my $perldir= dirname($^X);
+  my $pathsep= ":";
+  $pathsep= ";" if IS_WINDOWS && ! IS_CYGWIN;
+  $ENV{'PATH'}= "$ENV{'PATH'}".$pathsep.$perldir;
 }
 
 
@@ -2505,6 +2535,11 @@ sub fix_vs_config_dir () {
 sub check_ndbcluster_support ($) {
   my $mysqld_variables= shift;
 
+  if ($opt_include_ndbcluster)
+  {
+    $opt_skip_ndbcluster= 0;
+  }
+
   if ($opt_skip_ndbcluster)
   {
     mtr_report(" - skipping ndbcluster");
@@ -3344,7 +3379,8 @@ sub check_testcase($$)
 	    "\nMTR's internal check of the test case '$tname' failed.
 This means that the test case does not preserve the state that existed
 before the test case was executed.  Most likely the test case did not
-do a proper clean-up.
+do a proper clean-up. It could also be caused by the previous test run
+by this thread, if the server wasn't restarted.
 This is the diff of the states of the servers before and after the
 test case was executed:\n";
 	  $tinfo->{check}.= $report;
@@ -3390,6 +3426,10 @@ test case was executed:\n";
     # Kill any check processes still running
     map($_->kill(), values(%started));
 
+    mtr_warning("Check-testcase failed, this could also be caused by the" .
+		" previous test run by this worker thread")
+      if $result > 1 && $mode eq "before";
+
     return $result;
   }
 
@@ -3844,7 +3884,7 @@ sub run_testcase ($$) {
     }
   }
 
-  my $test_timeout= start_timer(testcase_timeout());
+  my $test_timeout= start_timer(testcase_timeout($tinfo));
 
   do_before_run_mysqltest($tinfo);
 
@@ -3949,6 +3989,9 @@ sub run_testcase ($$) {
 	# Try to get reason from test log file
 	find_testcase_skipped_reason($tinfo);
 	mtr_report_test_skipped($tinfo);
+	# Restart if skipped due to missing perl, it may have had side effects
+	stop_all_servers($opt_shutdown_timeout)
+	  if ($tinfo->{'comment'} =~ /^perl not found/);
       }
       elsif ( $res == 65 )
       {
@@ -4055,7 +4098,7 @@ sub run_testcase ($$) {
     {
       my $log_file_name= $opt_vardir."/log/".$tinfo->{shortname}.".log";
       $tinfo->{comment}=
-        "Test case timeout after ".testcase_timeout().
+        "Test case timeout after ".testcase_timeout($tinfo).
 	  " seconds\n\n";
       # Add 20 last executed commands from test case log file
       if  (-e $log_file_name)
@@ -4064,7 +4107,7 @@ sub run_testcase ($$) {
 	   "== $log_file_name == \n".
 	     mtr_lastlinesfromfile($log_file_name, 20)."\n";
       }
-      $tinfo->{'timeout'}= testcase_timeout(); # Mark as timeout
+      $tinfo->{'timeout'}= testcase_timeout($tinfo); # Mark as timeout
       run_on_all($tinfo, 'analyze-timeout');
 
       report_failure_and_restart($tinfo);
@@ -4189,7 +4232,9 @@ sub get_log_from_proc ($$) {
   foreach my $mysqld (all_servers()) {
     if ($mysqld->{proc} eq $proc) {
       my @srv_lines= extract_server_log($mysqld->if_exist('#log-error'), $name);
-      $srv_log= "\nServer log from this test:\n" . join ("", @srv_lines);
+      $srv_log= "\nServer log from this test:\n" .
+	"----------SERVER LOG START-----------\n". join ("", @srv_lines) .
+	"----------SERVER LOG END-------------\n";
       last;
     }
   }
@@ -5020,6 +5065,11 @@ sub server_need_restart {
     return 1;
   }
 
+  if ( $opt_force_restart ) {
+    mtr_verbose_restart($server, "forced restart turned on");
+    return 1;
+  }
+
   if ( $tinfo->{template_path} ne $current_config_name)
   {
     mtr_verbose_restart($server, "using different config file");
@@ -5726,7 +5776,8 @@ Options to control what test suites or c
 
   force                 Continue to run the suite after failure
   with-ndbcluster-only  Run only tests that include "ndb" in the filename
-  skip-ndb[cluster]     Skip all tests that need cluster
+  skip-ndb[cluster]     Skip all tests that need cluster. Default.
+  include-ndb[cluster]  Enable all tests that need cluster
   do-test=PREFIX or REGEX
                         Run test cases which name are prefixed with PREFIX
                         or fulfills REGEX
@@ -5850,7 +5901,8 @@ Misc options
                         servers to exit before finishing the process
   fast                  Run as fast as possible, dont't wait for servers
                         to shutdown etc.
-  parallel=N            Run tests in N parallel threads (default 1)
+  force-restart         Always restart servers between tests
+  parallel=N            Run tests in N parallel threads (default=1)
                         Use parallel=auto for auto-setting of N
   repeat=N              Run each test N number of times
   retry=N               Retry tests that fail up to N times (default $opt_retry).

=== modified file 'mysql-test/r/ctype_utf8.result'
--- a/mysql-test/r/ctype_utf8.result	2010-03-04 08:03:07 +0000
+++ b/mysql-test/r/ctype_utf8.result	2010-11-24 22:57:34 +0000
@@ -1900,3 +1900,34 @@ CONVERT(a, CHAR)	CONVERT(b, CHAR)
 70000	1092
 DROP TABLE t1;
 End of 5.0 tests
+SELECT LENGTH(RPAD(0.0115E88, 61297, _utf8'��������'));
+LENGTH(RPAD(0.0115E88, 61297, _utf8'��������'))
+61297
+SELECT LENGTH(RPAD(0.0115E88, 61297, _utf8'��������'));
+LENGTH(RPAD(0.0115E88, 61297, _utf8'��������'))
+61297
+SELECT HEX(RPAD(0x20, 2, _utf8 0xD18F));
+HEX(RPAD(0x20, 2, _utf8 0xD18F))
+20D1
+SELECT HEX(RPAD(0x20, 4, _utf8 0xD18F));
+HEX(RPAD(0x20, 4, _utf8 0xD18F))
+20D18FD1
+SELECT HEX(LPAD(0x20, 2, _utf8 0xD18F));
+HEX(LPAD(0x20, 2, _utf8 0xD18F))
+D120
+SELECT HEX(LPAD(0x20, 4, _utf8 0xD18F));
+HEX(LPAD(0x20, 4, _utf8 0xD18F))
+D18FD120
+SELECT HEX(RPAD(_utf8 0xD18F, 3, 0x20));
+HEX(RPAD(_utf8 0xD18F, 3, 0x20))
+D18F20
+SELECT HEX(LPAD(_utf8 0xD18F, 3, 0x20));
+HEX(LPAD(_utf8 0xD18F, 3, 0x20))
+20D18F
+SELECT HEX(INSERT(_utf8 0xD18F, 2, 1, 0x20));
+HEX(INSERT(_utf8 0xD18F, 2, 1, 0x20))
+D120
+SELECT HEX(INSERT(_utf8 0xD18FD18E, 2, 1, 0x20));
+HEX(INSERT(_utf8 0xD18FD18E, 2, 1, 0x20))
+D120D18E
+End of 5.1 tests

=== modified file 'mysql-test/r/explain.result'
--- a/mysql-test/r/explain.result	2010-07-19 14:30:34 +0000
+++ b/mysql-test/r/explain.result	2010-10-18 12:12:27 +0000
@@ -251,4 +251,50 @@ EXPLAIN SELECT c1 FROM t1 WHERE c2 = 1 A
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	ref	c2,c2_2	c2	10	const,const	3	Using where
 DROP TABLE t1;
+#
+# Bug#56814 Explain + subselect + fulltext crashes server
+#
+CREATE TABLE t1(f1 VARCHAR(6) NOT NULL,
+FULLTEXT KEY(f1),UNIQUE(f1));
+INSERT INTO t1 VALUES ('test');
+EXPLAIN SELECT 1 FROM t1
+WHERE 1 > ALL((SELECT 1 FROM t1 JOIN t1 a ON (MATCH(t1.f1) AGAINST (""))
+WHERE t1.f1 GROUP BY t1.f1));
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	t1	system	NULL	NULL	NULL	NULL	1	
+2	SUBQUERY	a	system	NULL	NULL	NULL	NULL	1	Using filesort
+2	SUBQUERY	t1	fulltext	f1	f1	0		1	Using where
+PREPARE stmt FROM
+'EXPLAIN SELECT 1 FROM t1
+ WHERE 1 > ALL((SELECT 1 FROM t1 RIGHT OUTER JOIN t1 a
+ ON (MATCH(t1.f1) AGAINST (""))
+ WHERE t1.f1 GROUP BY t1.f1))';
+EXECUTE stmt;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	t1	system	NULL	NULL	NULL	NULL	1	
+2	SUBQUERY	a	system	NULL	NULL	NULL	NULL	1	Using filesort
+2	SUBQUERY	t1	fulltext	f1	f1	0		1	Using where
+EXECUTE stmt;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	t1	system	NULL	NULL	NULL	NULL	1	
+2	SUBQUERY	a	system	NULL	NULL	NULL	NULL	1	Using filesort
+2	SUBQUERY	t1	fulltext	f1	f1	0		1	Using where
+DEALLOCATE PREPARE stmt;
+PREPARE stmt FROM
+'EXPLAIN SELECT 1 FROM t1
+ WHERE 1 > ALL((SELECT 1 FROM t1 JOIN t1 a
+ ON (MATCH(t1.f1) AGAINST (""))
+ WHERE t1.f1 GROUP BY t1.f1))';
+EXECUTE stmt;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	t1	system	NULL	NULL	NULL	NULL	1	
+2	SUBQUERY	a	system	NULL	NULL	NULL	NULL	1	Using filesort
+2	SUBQUERY	t1	fulltext	f1	f1	0		1	Using where
+EXECUTE stmt;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	t1	system	NULL	NULL	NULL	NULL	1	
+2	SUBQUERY	a	system	NULL	NULL	NULL	NULL	1	Using filesort
+2	SUBQUERY	t1	fulltext	f1	f1	0		1	Using where
+DEALLOCATE PREPARE stmt;
+DROP TABLE t1;
 End of 5.1 tests.

=== modified file 'mysql-test/r/fulltext.result'
--- a/mysql-test/r/fulltext.result	2010-04-28 12:52:24 +0000
+++ b/mysql-test/r/fulltext.result	2010-11-24 22:57:34 +0000
@@ -652,4 +652,40 @@ Table	Op	Msg_type	Msg_text
 test.t1	repair	status	OK
 SET myisam_sort_buffer_size=@@global.myisam_sort_buffer_size;
 DROP TABLE t1;
+#
+# Bug#54484 explain + prepared statement: crash and Got error -1 from storage engine
+#
+CREATE TABLE t1(f1 VARCHAR(6) NOT NULL, FULLTEXT KEY(f1), UNIQUE(f1));
+INSERT INTO t1 VALUES ('test');
+SELECT 1 FROM t1 WHERE 1 >
+ALL((SELECT 1 FROM t1 JOIN t1 a
+ON (MATCH(t1.f1) against (""))
+WHERE t1.f1 GROUP BY t1.f1)) xor f1;
+1
+1
+PREPARE stmt FROM
+'SELECT 1 FROM t1 WHERE 1 >
+ ALL((SELECT 1 FROM t1 RIGHT OUTER JOIN t1 a
+ ON (MATCH(t1.f1) against (""))
+ WHERE t1.f1 GROUP BY t1.f1)) xor f1';
+EXECUTE stmt;
+1
+1
+EXECUTE stmt;
+1
+1
+DEALLOCATE PREPARE stmt;
+PREPARE stmt FROM
+'SELECT 1 FROM t1 WHERE 1 >
+ ALL((SELECT 1 FROM t1 JOIN t1 a
+ ON (MATCH(t1.f1) against (""))
+ WHERE t1.f1 GROUP BY t1.f1))';
+EXECUTE stmt;
+1
+1
+EXECUTE stmt;
+1
+1
+DEALLOCATE PREPARE stmt;
+DROP TABLE t1;
 End of 5.1 tests

=== modified file 'mysql-test/r/func_gconcat.result'
--- a/mysql-test/r/func_gconcat.result	2010-07-23 11:52:54 +0000
+++ b/mysql-test/r/func_gconcat.result	2010-10-29 07:44:32 +0000
@@ -1029,4 +1029,12 @@ GROUP_CONCAT(t1.a ORDER BY t1.a)
 1,1,2,2
 DEALLOCATE PREPARE stmt;
 DROP TABLE t1;
+#
+# Bug#57194 group_concat cause crash and/or invalid memory reads with type errors
+#
+CREATE TABLE t1(f1 int);
+INSERT INTO t1 values (0),(0);
+SELECT POLYGON((SELECT 1 FROM (SELECT 1 IN (GROUP_CONCAT(t1.f1)) FROM t1, t1 t GROUP BY t.f1 ) d));
+ERROR 22007: Illegal non geometric '(select 1 from (select (1 = group_concat(`test`.`t1`.`f1` separator ',')) AS `1 IN (GROUP_CONCAT(t1.f1))` from `test`.`t1` join `test`.`t1` `t` group by `t`.`f1`) `d`)' value found during parsing
+DROP TABLE t1;
 End of 5.1 tests

=== modified file 'mysql-test/r/func_math.result'
--- a/mysql-test/r/func_math.result	2009-08-31 14:09:09 +0000
+++ b/mysql-test/r/func_math.result	2010-10-27 14:12:10 +0000
@@ -482,4 +482,20 @@ RAND(i)
 0.155220427694936
 DROP TABLE t1;
 #
+# Bug#57477 SIGFPE when dividing a huge number a negative number
+#
+SELECT -9999999999999999991 DIV -1;
+-9999999999999999991 DIV -1
+-9223372036854775808
+Warnings:
+Error	1292	Truncated incorrect DECIMAL value: ''
+SELECT -9223372036854775808 DIV -1;
+-9223372036854775808 DIV -1
+-9223372036854775808
+SELECT -9223372036854775808 MOD -1;
+-9223372036854775808 MOD -1
+0
+SELECT -9223372036854775808999 MOD -1;
+-9223372036854775808999 MOD -1
+0
 End of 5.1 tests

=== modified file 'mysql-test/r/func_misc.result'
--- a/mysql-test/r/func_misc.result	2010-08-27 14:12:44 +0000
+++ b/mysql-test/r/func_misc.result	2010-11-24 22:57:34 +0000
@@ -258,4 +258,10 @@ GREATEST(a, (SELECT b FROM t1 LIMIT 1))
 3
 1
 DROP TABLE t1;
+SELECT INET_NTOA(0);
+INET_NTOA(0)
+0.0.0.0
+SELECT '1' IN ('1', INET_NTOA(0));
+'1' IN ('1', INET_NTOA(0))
+1
 End of tests

=== modified file 'mysql-test/r/grant.result'
--- a/mysql-test/r/grant.result	2010-09-03 16:20:30 +0000
+++ b/mysql-test/r/grant.result	2010-11-24 22:57:34 +0000
@@ -1429,3 +1429,14 @@ DROP USER 'testbug'@localhost;
 DROP TABLE db2.t1;
 DROP DATABASE db1;
 DROP DATABASE db2;
+#
+# Bug #36742
+#
+grant usage on Foo.* to myuser at Localhost identified by 'foo';
+grant select on Foo.* to myuser at localhost;
+select host,user from mysql.user where User='myuser';
+host	user
+localhost	myuser
+revoke select on Foo.* from myuser at localhost;
+delete from mysql.user where User='myuser';
+flush privileges;

=== modified file 'mysql-test/r/grant3.result'
--- a/mysql-test/r/grant3.result	2009-10-20 06:17:57 +0000
+++ b/mysql-test/r/grant3.result	2010-10-18 14:03:53 +0000
@@ -21,123 +21,108 @@ grant select on test.* to CUser at LOCALHOS
 flush privileges;
 SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
 user	host
-CUser	LOCALHOST
 CUser	localhost
 SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser' order by 1,2;
 user	host	db	select_priv
-CUser	LOCALHOST	test	Y
 CUser	localhost	test	Y
 REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'LOCALHOST';
 flush privileges;
 SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
 user	host
-CUser	LOCALHOST
 CUser	localhost
 SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser' order by 1,2;
 user	host	db	select_priv
-CUser	localhost	test	Y
 REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'localhost';
 flush privileges;
 SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
 user	host
-CUser	LOCALHOST
 CUser	localhost
 SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser' order by 1,2;
 user	host	db	select_priv
 DROP USER CUser at localhost;
 DROP USER CUser at LOCALHOST;
+ERROR HY000: Operation DROP USER failed for 'CUser'@'localhost'
 create table t1 (a int);
 grant select on test.t1 to CUser at localhost;
 grant select on test.t1 to CUser at LOCALHOST;
 flush privileges;
 SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
 user	host
-CUser	LOCALHOST
 CUser	localhost
 SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
 user	host	db	Table_name	Table_priv	Column_priv
-CUser	LOCALHOST	test	t1	Select	
 CUser	localhost	test	t1	Select	
 REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'LOCALHOST';
 flush privileges;
 SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
 user	host
-CUser	LOCALHOST
 CUser	localhost
 SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
 user	host	db	Table_name	Table_priv	Column_priv
-CUser	localhost	test	t1	Select	
 REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'localhost';
 flush privileges;
 SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
 user	host
-CUser	LOCALHOST
 CUser	localhost
 SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
 user	host	db	Table_name	Table_priv	Column_priv
 DROP USER CUser at localhost;
 DROP USER CUser at LOCALHOST;
+ERROR HY000: Operation DROP USER failed for 'CUser'@'localhost'
 grant select(a) on test.t1 to CUser at localhost;
 grant select(a) on test.t1 to CUser at LOCALHOST;
 flush privileges;
 SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
 user	host
-CUser	LOCALHOST
 CUser	localhost
 SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
 user	host	db	Table_name	Table_priv	Column_priv
-CUser	LOCALHOST	test	t1		Select
 CUser	localhost	test	t1		Select
 REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'LOCALHOST';
 flush privileges;
 SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
 user	host
-CUser	LOCALHOST
 CUser	localhost
 SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
 user	host	db	Table_name	Table_priv	Column_priv
-CUser	localhost	test	t1		Select
 REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'localhost';
 flush privileges;
 SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
 user	host
-CUser	LOCALHOST
 CUser	localhost
 SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
 user	host	db	Table_name	Table_priv	Column_priv
 DROP USER CUser at localhost;
 DROP USER CUser at LOCALHOST;
+ERROR HY000: Operation DROP USER failed for 'CUser'@'localhost'
 drop table t1;
 grant select on test.* to CUser2 at localhost;
 grant select on test.* to CUser2 at LOCALHOST;
 flush privileges;
 SELECT user, host FROM mysql.user where user = 'CUser2' order by 1,2;
 user	host
-CUser2	LOCALHOST
 CUser2	localhost
 SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser2' order by 1,2;
 user	host	db	select_priv
-CUser2	LOCALHOST	test	Y
 CUser2	localhost	test	Y
 REVOKE SELECT ON test.* FROM 'CUser2'@'LOCALHOST';
 flush privileges;
 SELECT user, host FROM mysql.user where user = 'CUser2' order by 1,2;
 user	host
-CUser2	LOCALHOST
 CUser2	localhost
 SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser2' order by 1,2;
 user	host	db	select_priv
-CUser2	localhost	test	Y
 REVOKE SELECT ON test.* FROM 'CUser2'@'localhost';
+ERROR 42000: There is no such grant defined for user 'CUser2' on host 'localhost'
 flush privileges;
 SELECT user, host FROM mysql.user where user = 'CUser2' order by 1,2;
 user	host
-CUser2	LOCALHOST
 CUser2	localhost
 SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser2' order by 1,2;
 user	host	db	select_priv
 DROP USER CUser2 at localhost;
 DROP USER CUser2 at LOCALHOST;
+ERROR HY000: Operation DROP USER failed for 'CUser2'@'localhost'
 CREATE DATABASE mysqltest_1;
 CREATE TABLE mysqltest_1.t1 (a INT);
 CREATE USER 'mysqltest1'@'%';

=== modified file 'mysql-test/r/group_by.result'
--- a/mysql-test/r/group_by.result	2010-08-27 14:12:44 +0000
+++ b/mysql-test/r/group_by.result	2010-11-24 22:57:34 +0000
@@ -1862,4 +1862,14 @@ SELECT SUBSTRING(a,1,10), LENGTH(a) FROM
 SUBSTRING(a,1,10)	LENGTH(a)
 1111111111	1300
 DROP TABLE t1;
+#
+# Bug#57688 Assertion `!table || (!table->write_set || bitmap_is_set(table->write_set, field
+#
+CREATE TABLE t1(f1 INT NOT NULL);
+INSERT INTO t1 VALUES (16777214),(0);
+SELECT COUNT(*) FROM t1 LEFT JOIN t1 t2
+ON 1 WHERE t2.f1 > 1 GROUP BY t2.f1;
+COUNT(*)
+2
+DROP TABLE t1;
 # End of 5.1 tests

=== modified file 'mysql-test/r/index_merge_innodb.result'
--- a/mysql-test/r/index_merge_innodb.result	2010-09-20 01:46:39 +0000
+++ b/mysql-test/r/index_merge_innodb.result	2010-11-24 22:57:34 +0000
@@ -324,6 +324,61 @@ key1	key2	key3
 38	38	38
 39	39	39
 drop table t1;
+#
+# Bug#56423: Different count with SELECT and CREATE SELECT queries
+#
+CREATE TABLE t1 (
+a INT,
+b INT,
+c INT,
+d INT,
+PRIMARY KEY (a),
+KEY (c),
+KEY bd (b,d)
+);
+INSERT INTO t1 VALUES
+(1, 0, 1, 0),
+(2, 1, 1, 1),
+(3, 1, 1, 1),
+(4, 0, 1, 1);
+EXPLAIN
+SELECT a
+FROM t1
+WHERE c = 1 AND b = 1 AND d = 1;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	index_merge	c,bd	c,bd	5,10	NULL	1	Using intersect(c,bd); Using where; Using index
+CREATE TABLE t2 ( a INT )
+SELECT a
+FROM t1
+WHERE c = 1 AND b = 1 AND d = 1;
+SELECT * FROM t2;
+a
+2
+3
+DROP TABLE t1, t2;
+CREATE TABLE t1( a INT, b INT, KEY(a), KEY(b) );
+INSERT INTO t1 VALUES (1, 2), (1, 2), (1, 2), (1, 2);
+SELECT * FROM t1 FORCE INDEX(a, b) WHERE a = 1 AND b = 2;
+a	b
+1	2
+1	2
+1	2
+1	2
+DROP TABLE t1;
+# Code coverage of fix.
+CREATE TABLE t1 ( a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b INT);
+INSERT INTO t1 (b) VALUES (1);
+UPDATE t1 SET b = 2 WHERE a = 1;
+SELECT * FROM t1;
+a	b
+1	2
+CREATE TABLE t2 ( a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b VARCHAR(1) );
+INSERT INTO t2 (b) VALUES ('a');
+UPDATE t2 SET b = 'b' WHERE a = 1;
+SELECT * FROM t2;
+a	b
+1	b
+DROP TABLE t1, t2;
 #---------------- 2-sweeps read Index merge test 2 -------------------------------
 SET SESSION STORAGE_ENGINE = InnoDB;
 drop table if exists t1;
@@ -581,6 +636,24 @@ WHERE
 `RUNID`= '' AND `SUBMITNR`= '' AND `ORDERNR`='' AND `PROGRAMM`='' AND
 `TESTID`='' AND `UCCHECK`='';
 drop table t1;
+#
+# Bug#50402 Optimizer producing wrong results when using Index Merge on InnoDB
+#
+CREATE TABLE t1 (f1 INT, PRIMARY KEY (f1));
+INSERT INTO t1 VALUES (2);
+CREATE TABLE t2 (f1 INT, f2 INT, f3 char(1),
+PRIMARY KEY (f1), KEY (f2), KEY (f3) );
+INSERT INTO t2 VALUES (1, 1, 'h'), (2, 3, 'h'), (3, 2, ''), (4, 2, '');
+SELECT t1.f1 FROM t1
+WHERE (SELECT COUNT(*) FROM t2 WHERE t2.f3 = 'h' AND t2.f2 = t1.f1) = 0 AND t1.f1 = 2;
+f1
+2
+EXPLAIN SELECT t1.f1 FROM t1
+WHERE (SELECT COUNT(*) FROM t2 WHERE t2.f3 = 'h' AND t2.f2 = t1.f1) = 0 AND t1.f1 = 2;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	t1	const	PRIMARY	PRIMARY	4	const	1	Using index
+2	DEPENDENT SUBQUERY	t2	index_merge	f2,f3	f3,f2	2,5	NULL	1	Using intersect(f3,f2); Using where; Using index
+DROP TABLE t1,t2;
 # 
 # BUG#56862/640419: Wrong result with sort_union index merge when one
 #                   of the merged index scans is the primary key scan

=== modified file 'mysql-test/r/index_merge_myisam.result'
--- a/mysql-test/r/index_merge_myisam.result	2010-05-13 11:00:53 +0000
+++ b/mysql-test/r/index_merge_myisam.result	2010-11-24 22:57:34 +0000
@@ -1158,6 +1158,61 @@ key1	key2	key3
 38	38	38
 39	39	39
 drop table t1;
+#
+# Bug#56423: Different count with SELECT and CREATE SELECT queries
+#
+CREATE TABLE t1 (
+a INT,
+b INT,
+c INT,
+d INT,
+PRIMARY KEY (a),
+KEY (c),
+KEY bd (b,d)
+);
+INSERT INTO t1 VALUES
+(1, 0, 1, 0),
+(2, 1, 1, 1),
+(3, 1, 1, 1),
+(4, 0, 1, 1);
+EXPLAIN
+SELECT a
+FROM t1
+WHERE c = 1 AND b = 1 AND d = 1;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	ref	c,bd	bd	10	const,const	2	Using where
+CREATE TABLE t2 ( a INT )
+SELECT a
+FROM t1
+WHERE c = 1 AND b = 1 AND d = 1;
+SELECT * FROM t2;
+a
+2
+3
+DROP TABLE t1, t2;
+CREATE TABLE t1( a INT, b INT, KEY(a), KEY(b) );
+INSERT INTO t1 VALUES (1, 2), (1, 2), (1, 2), (1, 2);
+SELECT * FROM t1 FORCE INDEX(a, b) WHERE a = 1 AND b = 2;
+a	b
+1	2
+1	2
+1	2
+1	2
+DROP TABLE t1;
+# Code coverage of fix.
+CREATE TABLE t1 ( a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b INT);
+INSERT INTO t1 (b) VALUES (1);
+UPDATE t1 SET b = 2 WHERE a = 1;
+SELECT * FROM t1;
+a	b
+1	2
+CREATE TABLE t2 ( a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b VARCHAR(1) );
+INSERT INTO t2 (b) VALUES ('a');
+UPDATE t2 SET b = 'b' WHERE a = 1;
+SELECT * FROM t2;
+a	b
+1	b
+DROP TABLE t1, t2;
 #---------------- 2-sweeps read Index merge test 2 -------------------------------
 SET SESSION STORAGE_ENGINE = MyISAM;
 drop table if exists t1;
@@ -1416,6 +1471,24 @@ WHERE
 `TESTID`='' AND `UCCHECK`='';
 drop table t1;
 #
+# Bug#50402 Optimizer producing wrong results when using Index Merge on InnoDB
+#
+CREATE TABLE t1 (f1 INT, PRIMARY KEY (f1));
+INSERT INTO t1 VALUES (2);
+CREATE TABLE t2 (f1 INT, f2 INT, f3 char(1),
+PRIMARY KEY (f1), KEY (f2), KEY (f3) );
+INSERT INTO t2 VALUES (1, 1, 'h'), (2, 3, 'h'), (3, 2, ''), (4, 2, '');
+SELECT t1.f1 FROM t1
+WHERE (SELECT COUNT(*) FROM t2 WHERE t2.f3 = 'h' AND t2.f2 = t1.f1) = 0 AND t1.f1 = 2;
+f1
+2
+EXPLAIN SELECT t1.f1 FROM t1
+WHERE (SELECT COUNT(*) FROM t2 WHERE t2.f3 = 'h' AND t2.f2 = t1.f1) = 0 AND t1.f1 = 2;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	t1	system	PRIMARY	NULL	NULL	NULL	1	
+2	DEPENDENT SUBQUERY	t2	ref	f2,f3	f2	5		1	Using where
+DROP TABLE t1,t2;
+#
 # Generic @@optimizer_switch tests (move those into a separate file if
 #  we get another @@optimizer_switch user)
 #

=== modified file 'mysql-test/r/join_outer.result'
--- a/mysql-test/r/join_outer.result	2010-09-26 16:12:34 +0000
+++ b/mysql-test/r/join_outer.result	2010-11-24 22:57:34 +0000
@@ -1508,4 +1508,33 @@ Handler_read_prev	0
 Handler_read_rnd	0
 Handler_read_rnd_next	1048581
 drop table t1,t2,t3;
+# Bug#57688 Assertion `!table || (!table->write_set || bitmap_is_set(table->write_set, field
+#
+CREATE TABLE t1 (f1 INT NOT NULL, PRIMARY KEY (f1));
+CREATE TABLE t2 (f1 INT NOT NULL, f2 INT NOT NULL, PRIMARY KEY (f1, f2));
+INSERT INTO t1 VALUES (4);
+INSERT INTO t2 VALUES (3, 3);
+INSERT INTO t2 VALUES (7, 7);
+EXPLAIN SELECT * FROM t1 LEFT JOIN t2 ON t2.f1 = t1.f1
+WHERE t1.f1 = 4
+GROUP BY t2.f1, t2.f2;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	system	PRIMARY	NULL	NULL	NULL	1	Using temporary; Using filesort
+1	SIMPLE	t2	ref	PRIMARY	PRIMARY	4	const	1	Using index
+SELECT * FROM t1 LEFT JOIN t2 ON t2.f1 = t1.f1
+WHERE t1.f1 = 4
+GROUP BY t2.f1, t2.f2;
+f1	f1	f2
+4	NULL	NULL
+EXPLAIN SELECT * FROM t1 LEFT JOIN t2 ON t2.f1 = t1.f1
+WHERE t1.f1 = 4 AND t2.f1 IS NOT NULL AND t2.f2 IS NOT NULL
+GROUP BY t2.f1, t2.f2;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	system	PRIMARY	NULL	NULL	NULL	1	Using filesort
+1	SIMPLE	t2	ref	PRIMARY	PRIMARY	4	const	1	Using where; Using index
+SELECT * FROM t1 LEFT JOIN t2 ON t2.f1 = t1.f1
+WHERE t1.f1 = 4 AND t2.f1 IS NOT NULL AND t2.f2 IS NOT NULL
+GROUP BY t2.f1, t2.f2;
+f1	f1	f2
+DROP TABLE t1,t2;
 End of 5.1 tests

=== added file 'mysql-test/r/lowercase_table4.result'
--- a/mysql-test/r/lowercase_table4.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/r/lowercase_table4.result	2010-10-19 10:27:09 +0000
@@ -0,0 +1,7 @@
+#
+# Bug#46941 crash with lower_case_table_names=2 and
+#           foreign data dictionary confusion
+#
+CREATE DATABASE XY;
+USE XY;
+DROP DATABASE XY;

=== modified file 'mysql-test/r/merge.result'
--- a/mysql-test/r/merge.result	2010-11-02 15:22:57 +0000
+++ b/mysql-test/r/merge.result	2010-11-23 21:39:59 +0000
@@ -2296,4 +2296,45 @@ t2 WHERE b SOUNDS LIKE e AND d = 1;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Impossible WHERE noticed after reading const tables
 DROP TABLE t2, t1;
+#
+# Bug#46339 - crash on REPAIR TABLE merge table USE_FRM
+#
+DROP TABLE IF EXISTS m1, t1;
+CREATE TABLE t1 (c1 INT) ENGINE=MYISAM;
+CREATE TABLE m1 (c1 INT) ENGINE=MRG_MyISAM UNION=(t1) INSERT_METHOD=LAST;
+LOCK TABLE m1 READ;
+REPAIR TABLE m1 USE_FRM;
+Table	Op	Msg_type	Msg_text
+test.m1	repair	note	The storage engine for the table doesn't support repair
+UNLOCK TABLES;
+REPAIR TABLE m1 USE_FRM;
+Table	Op	Msg_type	Msg_text
+test.m1	repair	note	The storage engine for the table doesn't support repair
+DROP TABLE m1,t1;
+CREATE TABLE m1 (f1 BIGINT) ENGINE=MRG_MyISAM UNION(t1);
+REPAIR TABLE m1 USE_FRM;
+Table	Op	Msg_type	Msg_text
+test.m1	repair	Error	Can't open table
+test.m1	repair	error	Corrupt
+CREATE TABLE t1 (f1 BIGINT) ENGINE = MyISAM;
+REPAIR TABLE m1 USE_FRM;
+Table	Op	Msg_type	Msg_text
+test.m1	repair	note	The storage engine for the table doesn't support repair
+REPAIR TABLE m1;
+Table	Op	Msg_type	Msg_text
+test.m1	repair	note	The storage engine for the table doesn't support repair
+DROP TABLE m1, t1;
+CREATE TEMPORARY TABLE m1 (f1 BIGINT) ENGINE=MRG_MyISAM UNION(t1);
+REPAIR TABLE m1 USE_FRM;
+Table	Op	Msg_type	Msg_text
+test.m1	repair	Error	Table 'test.m1' doesn't exist
+test.m1	repair	error	Corrupt
+CREATE TEMPORARY TABLE t1 (f1 BIGINT) ENGINE=MyISAM;
+REPAIR TABLE m1 USE_FRM;
+Table	Op	Msg_type	Msg_text
+m1	repair	error	Cannot repair temporary table from .frm file
+REPAIR TABLE m1;
+Table	Op	Msg_type	Msg_text
+test.m1	repair	note	The storage engine for the table doesn't support repair
+DROP TABLE m1, t1;
 End of 5.1 tests

=== modified file 'mysql-test/r/multi_update.result'
--- a/mysql-test/r/multi_update.result	2010-05-24 13:54:08 +0000
+++ b/mysql-test/r/multi_update.result	2010-09-07 07:58:05 +0000
@@ -639,4 +639,24 @@ SET SESSION sql_safe_updates = 1;
 UPDATE IGNORE t1, t1 t1a SET t1.a = 1 WHERE t1a.a = 1;
 ERROR HY000: You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column
 DROP TABLE t1;
+#
+# Bug#54543: update ignore with incorrect subquery leads to assertion
+# failure: inited==INDEX
+#
+SET SESSION sql_safe_updates = 0;
+CREATE TABLE t1 ( a INT );
+INSERT INTO t1 VALUES (1), (2);
+CREATE TABLE t2 ( a INT );
+INSERT INTO t2 VALUES (1), (2);
+CREATE TABLE t3 ( a INT );
+INSERT INTO t3 VALUES (1), (2);
+# Should not crash
+UPDATE IGNORE
+( SELECT ( SELECT COUNT(*) FROM t1 GROUP BY a, @v ) a FROM t2 ) x, t3
+SET t3.a = 0;
+Warnings:
+Error	1242	Subquery returns more than 1 row
+Error	1242	Subquery returns more than 1 row
+DROP TABLE t1, t2, t3;
+SET SESSION sql_safe_updates = DEFAULT;
 end of tests

=== modified file 'mysql-test/r/mysqltest.result'
--- a/mysql-test/r/mysqltest.result	2010-10-19 13:58:35 +0000
+++ b/mysql-test/r/mysqltest.result	2010-11-23 21:39:59 +0000
@@ -178,6 +178,9 @@ mysqltest: At line 1: End of line junk d
 "
 mysqltest: At line 1: Extra delimiter ";" found
 mysqltest: At line 1: Extra delimiter ";" found
+mysqltest: At line 1: Spurious text after `query` expression
+mysqltest: At line 1: Spurious text after `query` expression
+mysqltest: At line 2: Spurious text after `query` expression
 mysqltest: At line 1: Missing argument(s) to 'error'
 mysqltest: At line 1: Missing argument(s) to 'error'
 mysqltest: At line 1: The sqlstate definition must start with an uppercase S
@@ -263,6 +266,9 @@ a long \$where variable content
 
 banana = banana
 Not a banana: ba\$cat\$cat
+with\`some"escaped\'quotes
+with\`some"escaped\'quotes
+single'tick`backtick
 mysqltest: At line 1: Missing arguments to let
 mysqltest: At line 1: Missing variable name in let
 mysqltest: At line 1: Missing assignment operator in let
@@ -447,12 +453,16 @@ mysqltest: At line 1: Missing required a
 mysqltest: At line 1: query 'connect  con2,localhost,root,,illegal_db' failed: 1049: Unknown database 'illegal_db'
 mysqltest: At line 1: Illegal argument for port: 'illegal_port'
 mysqltest: At line 1: Illegal option to connect: SMTP
-OK
-mysqltest: The test didn't produce any output
+200 connects succeeded
 mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest.sql": At line 3: connection 'test_con1' not found in connection pool
 mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest.sql": At line 2: Connection test_con1 already exists
 show tables;
 ERROR 3D000: No database selected
+connect  con1,localhost,root,,;
+connection default;
+connection con1;
+disconnect con1;
+connection default;
 Output from mysqltest-x.inc
 Output from mysqltest-x.inc
 Output from mysqltest-x.inc

=== modified file 'mysql-test/r/order_by.result'
--- a/mysql-test/r/order_by.result	2009-12-10 15:38:01 +0000
+++ b/mysql-test/r/order_by.result	2010-09-13 11:33:19 +0000
@@ -1617,4 +1617,25 @@ id	select_type	table	type	possible_keys
 1	SIMPLE	t1	range	a	a	5	NULL	2	Using where; Using temporary; Using filesort
 1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	10	Using join buffer
 DROP TABLE t1, t2;
+#
+# Bug #50394: Regression in EXPLAIN with index scan, LIMIT, GROUP BY and
+# ORDER BY computed col
+#
+CREATE TABLE t1 ( a INT NOT NULL, b INT NOT NULL, KEY( a, b ) );
+INSERT INTO t1 VALUES (1, 1), (2, 2), (3, 3), (4, 4), (5, 5);
+INSERT INTO t1 SELECT a + 5, b + 5 FROM t1;
+CREATE TABLE t2( a INT PRIMARY KEY, b INT );
+INSERT INTO t2 VALUES (1, 1), (2, 2), (3, 3), (4, 4), (5, 5);
+INSERT INTO t2 SELECT a + 5, b + 5 FROM t2;
+EXPLAIN
+SELECT count(*) AS c, t1.a
+FROM t1 JOIN t2 ON t1.b = t2.a
+WHERE t2.b = 1
+GROUP BY t1.a
+ORDER by c
+LIMIT 2;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	index	NULL	a	8	NULL	10	Using index; Using temporary; Using filesort
+1	SIMPLE	t2	eq_ref	PRIMARY	PRIMARY	4	test.t1.b	1	Using where
+DROP TABLE t1, t2;
 End of 5.1 tests

=== modified file 'mysql-test/r/partition.result'
--- a/mysql-test/r/partition.result	2010-04-28 12:52:24 +0000
+++ b/mysql-test/r/partition.result	2010-11-23 21:39:59 +0000
@@ -1,4 +1,44 @@
 drop table if exists t1, t2;
+#
+# Bug#57113: ha_partition::extra(ha_extra_function):
+#            Assertion `m_extra_cache' failed
+CREATE TABLE t1
+(id INT NOT NULL PRIMARY KEY,
+name VARCHAR(16) NOT NULL,
+year YEAR,
+INDEX name (name(8))
+)
+PARTITION BY HASH(id) PARTITIONS 2;
+INSERT INTO t1 VALUES ( 1, 'FooBar', '1924' );
+CREATE TABLE t2 (id INT);
+INSERT INTO t2 VALUES (1),(2);
+UPDATE t1, t2 SET t1.year = '1955' WHERE t1.name = 'FooBar';
+DROP TABLE t1, t2;
+#
+# Bug#55458: Partitioned MyISAM table gets crashed by multi-table update 
+#
+CREATE TABLE t1 (
+`id` int NOT NULL,
+`user_num` int DEFAULT NULL,
+PRIMARY KEY (`id`)
+) ENGINE=MyISAM CHARSET=latin1;
+INSERT INTO t1 VALUES (1,8601);
+INSERT INTO t1 VALUES (2,8601);
+INSERT INTO t1 VALUES (3,8601);
+INSERT INTO t1 VALUES (4,8601);
+CREATE TABLE t2 (
+`id` int(11) NOT NULL,
+`user_num` int DEFAULT NULL,
+`name` varchar(64) NOT NULL,
+PRIMARY KEY (`id`)
+) ENGINE=MyISAM CHARSET=latin1
+PARTITION BY HASH (id)
+PARTITIONS 2;
+INSERT INTO t2 VALUES (1,8601,'John');
+INSERT INTO t2 VALUES (2,8601,'JS');
+INSERT INTO t2 VALUES (3,8601,'John S');
+UPDATE t1, t2 SET t2.name = 'John Smith' WHERE t1.user_num = t2.user_num;
+DROP TABLE t1, t2;
 CREATE TABLE t1 (a INT, b INT)
 PARTITION BY LIST (a)
 SUBPARTITION BY HASH (b)
@@ -1382,7 +1422,7 @@ NULL
 2
 explain partitions select * from t1 where a is null or a < 0 or a > 1;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	pn,p2	ALL	NULL	NULL	NULL	NULL	4	Using where
+1	SIMPLE	t1	pn,p2	ALL	NULL	NULL	NULL	NULL	2	Using where
 drop table t1;
 CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY, name VARCHAR(20)) 
 ENGINE=MyISAM DEFAULT CHARSET=latin1

=== added file 'mysql-test/r/partition_binlog_stmt.result'
--- a/mysql-test/r/partition_binlog_stmt.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/r/partition_binlog_stmt.result	2010-11-24 17:51:31 +0000
@@ -0,0 +1,13 @@
+DROP TABLE IF EXISTS t1;
+#
+# Bug#51851: Server with SBR locks mutex twice on LOAD DATA into
+#            partitioned MyISAM table
+CREATE TABLE t1
+(id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
+name TINYBLOB NOT NULL,
+modified TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+INDEX namelocs (name(255))) ENGINE = MyISAM
+PARTITION BY HASH(id) PARTITIONS 2;
+LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/init_file.txt'
+INTO TABLE t1 (name);
+DROP TABLE t1;

=== modified file 'mysql-test/r/partition_error.result'
--- a/mysql-test/r/partition_error.result	2010-05-25 13:41:00 +0000
+++ b/mysql-test/r/partition_error.result	2010-09-22 19:33:18 +0000
@@ -1008,4 +1008,14 @@ PARTITION p VALUES LESS THAN (1219089600
 PARTITION pmax VALUES LESS THAN MAXVALUE);
 ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
 DROP TABLE old;
+#
+# Bug #56709: Memory leaks at running the 5.1 test suite
+# 
+CREATE TABLE t1 (a TIMESTAMP NOT NULL PRIMARY KEY);
+ALTER TABLE t1
+PARTITION BY RANGE (EXTRACT(DAY FROM a)) (
+PARTITION p VALUES LESS THAN (18),
+PARTITION pmax VALUES LESS THAN MAXVALUE);
+ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
+DROP TABLE t1;
 End of 5.1 tests

=== modified file 'mysql-test/r/partition_hash.result'
--- a/mysql-test/r/partition_hash.result	2008-07-07 20:42:19 +0000
+++ b/mysql-test/r/partition_hash.result	2010-08-27 08:43:51 +0000
@@ -69,25 +69,25 @@ id	select_type	table	partitions	type	pos
 1	SIMPLE	t1	p0,p1,p2,p3	ALL	NULL	NULL	NULL	NULL	9	Using where
 explain partitions select * from t1 where a is null or (a >= 5 and a <= 7);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0,p2,p3	ALL	NULL	NULL	NULL	NULL	9	Using where
+1	SIMPLE	t1	p0,p2,p3	ALL	NULL	NULL	NULL	NULL	7	Using where
 explain partitions select * from t1 where a is null;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0	ALL	NULL	NULL	NULL	NULL	9	Using where
+1	SIMPLE	t1	p0	ALL	NULL	NULL	NULL	NULL	3	Using where
 explain partitions select * from t1 where a is not null;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	p0,p1,p2,p3	ALL	NULL	NULL	NULL	NULL	9	Using where
 explain partitions select * from t1 where a >= 1 and a < 3;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0,p1	ALL	NULL	NULL	NULL	NULL	9	Using where
+1	SIMPLE	t1	p0,p1	ALL	NULL	NULL	NULL	NULL	5	Using where
 explain partitions select * from t1 where a >= 3 and a <= 5;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p1,p2	ALL	NULL	NULL	NULL	NULL	9	Using where
+1	SIMPLE	t1	p1,p2	ALL	NULL	NULL	NULL	NULL	4	Using where
 explain partitions select * from t1 where a > 2 and a < 4;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p1	ALL	NULL	NULL	NULL	NULL	9	Using where
+1	SIMPLE	t1	p1	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t1 where a > 3 and a <= 6;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p2,p3	ALL	NULL	NULL	NULL	NULL	9	Using where
+1	SIMPLE	t1	p2,p3	ALL	NULL	NULL	NULL	NULL	4	Using where
 explain partitions select * from t1 where a > 5;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	p0,p1,p2,p3	ALL	NULL	NULL	NULL	NULL	9	Using where

=== modified file 'mysql-test/r/partition_innodb.result'
--- a/mysql-test/r/partition_innodb.result	2010-04-12 10:12:20 +0000
+++ b/mysql-test/r/partition_innodb.result	2010-10-15 15:13:35 +0000
@@ -1,5 +1,31 @@
 drop table if exists t1, t2;
 #
+# Bug#56287: crash when using Partition datetime in sub in query
+#
+CREATE TABLE t1
+(c1 bigint(20) unsigned NOT NULL AUTO_INCREMENT,
+c2 varchar(40) not null default '',
+c3 datetime not  NULL,
+PRIMARY KEY (c1,c3),
+KEY partidx(c3))
+ENGINE=InnoDB
+PARTITION BY RANGE (TO_DAYS(c3))
+(PARTITION p200912 VALUES LESS THAN (to_days('2010-01-01')),
+PARTITION p201103 VALUES LESS THAN (to_days('2011-04-01')),
+PARTITION p201912 VALUES LESS THAN MAXVALUE);
+insert into t1(c2,c3) values ("Test row",'2010-01-01 00:00:00');
+SELECT PARTITION_NAME, TABLE_ROWS FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME = 't1' AND TABLE_SCHEMA = 'test';
+PARTITION_NAME	TABLE_ROWS
+p200912	0
+p201103	1
+p201912	0
+SELECT count(*) FROM t1 p where c3 in
+(select c3 from t1 t where t.c3 < date '2011-04-26 19:19:44'
+ and t.c3 > date '2011-04-26 19:18:44') ;
+count(*)
+0
+DROP TABLE t1;
+#
 # Bug#51830: Incorrect partition pruning on range partition (regression)
 #
 CREATE TABLE t1 (a INT NOT NULL)
@@ -22,31 +48,31 @@ insert INTO t1 VALUES (110);
 ERROR HY000: Table has no partition for value 110
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 90;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1		ALL	NULL	NULL	NULL	NULL	5	Using where
+1	SIMPLE	t1		ALL	NULL	NULL	NULL	NULL	0	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 90;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1		ALL	NULL	NULL	NULL	NULL	5	Using where
+1	SIMPLE	t1		ALL	NULL	NULL	NULL	NULL	0	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 90;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1		ALL	NULL	NULL	NULL	NULL	5	Using where
+1	SIMPLE	t1		ALL	NULL	NULL	NULL	NULL	0	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 89;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p90	ALL	NULL	NULL	NULL	NULL	7	Using where
+1	SIMPLE	t1	p90	ALL	NULL	NULL	NULL	NULL	3	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 89;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p90	ALL	NULL	NULL	NULL	NULL	7	Using where
+1	SIMPLE	t1	p90	ALL	NULL	NULL	NULL	NULL	3	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 89;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1		ALL	NULL	NULL	NULL	NULL	7	Using where
+1	SIMPLE	t1		ALL	NULL	NULL	NULL	NULL	0	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 100;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1		ALL	NULL	NULL	NULL	NULL	7	Using where
+1	SIMPLE	t1		ALL	NULL	NULL	NULL	NULL	0	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 100;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1		ALL	NULL	NULL	NULL	NULL	7	Using where
+1	SIMPLE	t1		ALL	NULL	NULL	NULL	NULL	0	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 100;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1		ALL	NULL	NULL	NULL	NULL	7	Using where
+1	SIMPLE	t1		ALL	NULL	NULL	NULL	NULL	0	Using where
 DROP TABLE t1;
 #
 # Bug#50104: Partitioned table with just 1 partion works with fk
@@ -387,3 +413,9 @@ a	b
 3	2003-03-03
 COMMIT;
 DROP TABLE t1;
+CREATE TABLE t1 (i1 int NOT NULL primary key, f1 int) ENGINE = InnoDB
+PARTITION BY HASH(i1) PARTITIONS 2;
+INSERT INTO t1 VALUES (1,1), (2,2);
+SELECT * FROM t1 WHERE i1 = ( SELECT i1 FROM t1 WHERE f1=0 LIMIT 1 );
+i1	f1
+DROP TABLE t1;

=== modified file 'mysql-test/r/partition_pruning.result'
--- a/mysql-test/r/partition_pruning.result	2010-03-12 10:52:38 +0000
+++ b/mysql-test/r/partition_pruning.result	2010-08-26 15:14:18 +0000
@@ -1,5 +1,29 @@
 drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 #
+# Bug#53806: Wrong estimates for range query in partitioned MyISAM table
+# Bug#46754: 'rows' field doesn't reflect partition pruning
+#
+CREATE TABLE t1 (a INT PRIMARY KEY)
+PARTITION BY RANGE (a) (
+PARTITION p0 VALUES LESS THAN (1),
+PARTITION p1 VALUES LESS THAN (2),
+PARTITION p2 VALUES LESS THAN (3),
+PARTITION p3 VALUES LESS THAN (4),
+PARTITION p4 VALUES LESS THAN (5),
+PARTITION p5 VALUES LESS THAN (6),
+PARTITION max VALUES LESS THAN MAXVALUE);
+INSERT INTO t1 VALUES (-1),(0),(1),(2),(3),(4),(5),(6),(7),(8);
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 1;
+id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
+#	#	#	#	#	#	#	#	#	3	#
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 7;
+id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
+#	#	#	#	#	#	#	#	#	9	#
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 1;
+id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
+#	#	#	#	#	#	#	#	#	3	#
+DROP TABLE t1;
+#
 # Bug#49742: Partition Pruning not working correctly for RANGE
 #
 CREATE TABLE t1 (a INT PRIMARY KEY)
@@ -89,7 +113,7 @@ a
 1
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 1;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0,p1	index	PRIMARY	PRIMARY	4	NULL	10	Using where; Using index
+1	SIMPLE	t1	p0,p1	index	PRIMARY	PRIMARY	4	NULL	3	Using where; Using index
 SELECT * FROM t1 WHERE a <= 2;
 a
 -1
@@ -98,7 +122,7 @@ a
 2
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 2;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0,p1,p2	index	PRIMARY	PRIMARY	4	NULL	10	Using where; Using index
+1	SIMPLE	t1	p0,p1,p2	index	PRIMARY	PRIMARY	4	NULL	4	Using where; Using index
 SELECT * FROM t1 WHERE a <= 3;
 a
 -1
@@ -108,7 +132,7 @@ a
 3
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 3;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0,p1,p2,p3	index	PRIMARY	PRIMARY	4	NULL	10	Using where; Using index
+1	SIMPLE	t1	p0,p1,p2,p3	index	PRIMARY	PRIMARY	4	NULL	5	Using where; Using index
 SELECT * FROM t1 WHERE a <= 4;
 a
 -1
@@ -119,7 +143,7 @@ a
 4
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 4;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0,p1,p2,p3,p4	index	PRIMARY	PRIMARY	4	NULL	10	Using where; Using index
+1	SIMPLE	t1	p0,p1,p2,p3,p4	index	PRIMARY	PRIMARY	4	NULL	6	Using where; Using index
 SELECT * FROM t1 WHERE a <= 5;
 a
 -1
@@ -131,7 +155,7 @@ a
 5
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 5;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0,p1,p2,p3,p4,p5	index	PRIMARY	PRIMARY	4	NULL	10	Using where; Using index
+1	SIMPLE	t1	p0,p1,p2,p3,p4,p5	index	PRIMARY	PRIMARY	4	NULL	7	Using where; Using index
 SELECT * FROM t1 WHERE a <= 6;
 a
 -1
@@ -213,7 +237,7 @@ a
 8
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 1;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p1,p2,p3,p4,p5,max	index	PRIMARY	PRIMARY	4	NULL	10	Using where; Using index
+1	SIMPLE	t1	p1,p2,p3,p4,p5,max	index	PRIMARY	PRIMARY	4	NULL	8	Using where; Using index
 SELECT * FROM t1 WHERE a >= 2;
 a
 2
@@ -225,7 +249,7 @@ a
 8
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 2;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p2,p3,p4,p5,max	index	PRIMARY	PRIMARY	4	NULL	10	Using where; Using index
+1	SIMPLE	t1	p2,p3,p4,p5,max	index	PRIMARY	PRIMARY	4	NULL	7	Using where; Using index
 SELECT * FROM t1 WHERE a >= 3;
 a
 3
@@ -236,7 +260,7 @@ a
 8
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 3;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p3,p4,p5,max	index	PRIMARY	PRIMARY	4	NULL	10	Using where; Using index
+1	SIMPLE	t1	p3,p4,p5,max	index	PRIMARY	PRIMARY	4	NULL	6	Using where; Using index
 SELECT * FROM t1 WHERE a >= 4;
 a
 4
@@ -246,7 +270,7 @@ a
 8
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 4;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p4,p5,max	index	PRIMARY	PRIMARY	4	NULL	10	Using where; Using index
+1	SIMPLE	t1	p4,p5,max	index	PRIMARY	PRIMARY	4	NULL	5	Using where; Using index
 SELECT * FROM t1 WHERE a >= 5;
 a
 5
@@ -255,7 +279,7 @@ a
 8
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 5;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p5,max	index	PRIMARY	PRIMARY	4	NULL	10	Using where; Using index
+1	SIMPLE	t1	p5,max	index	PRIMARY	PRIMARY	4	NULL	4	Using where; Using index
 SELECT * FROM t1 WHERE a >= 6;
 a
 6
@@ -263,14 +287,14 @@ a
 8
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 6;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	max	index	PRIMARY	PRIMARY	4	NULL	10	Using where; Using index
+1	SIMPLE	t1	max	index	PRIMARY	PRIMARY	4	NULL	3	Using where; Using index
 SELECT * FROM t1 WHERE a >= 7;
 a
 7
 8
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 7;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	max	index	PRIMARY	PRIMARY	4	NULL	10	Using where; Using index
+1	SIMPLE	t1	max	index	PRIMARY	PRIMARY	4	NULL	3	Using where; Using index
 SELECT * FROM t1 WHERE a > 1;
 a
 2
@@ -282,7 +306,7 @@ a
 8
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 1;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p2,p3,p4,p5,max	index	PRIMARY	PRIMARY	4	NULL	10	Using where; Using index
+1	SIMPLE	t1	p2,p3,p4,p5,max	index	PRIMARY	PRIMARY	4	NULL	7	Using where; Using index
 SELECT * FROM t1 WHERE a > 2;
 a
 3
@@ -293,7 +317,7 @@ a
 8
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 2;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p3,p4,p5,max	index	PRIMARY	PRIMARY	4	NULL	10	Using where; Using index
+1	SIMPLE	t1	p3,p4,p5,max	index	PRIMARY	PRIMARY	4	NULL	6	Using where; Using index
 SELECT * FROM t1 WHERE a > 3;
 a
 4
@@ -303,7 +327,7 @@ a
 8
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 3;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p4,p5,max	index	PRIMARY	PRIMARY	4	NULL	10	Using where; Using index
+1	SIMPLE	t1	p4,p5,max	index	PRIMARY	PRIMARY	4	NULL	5	Using where; Using index
 SELECT * FROM t1 WHERE a > 4;
 a
 5
@@ -312,7 +336,7 @@ a
 8
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 4;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p5,max	index	PRIMARY	PRIMARY	4	NULL	10	Using where; Using index
+1	SIMPLE	t1	p5,max	index	PRIMARY	PRIMARY	4	NULL	4	Using where; Using index
 SELECT * FROM t1 WHERE a > 5;
 a
 6
@@ -320,20 +344,20 @@ a
 8
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 5;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	max	index	PRIMARY	PRIMARY	4	NULL	10	Using where; Using index
+1	SIMPLE	t1	max	index	PRIMARY	PRIMARY	4	NULL	3	Using where; Using index
 SELECT * FROM t1 WHERE a > 6;
 a
 7
 8
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 6;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	max	index	PRIMARY	PRIMARY	4	NULL	10	Using where; Using index
+1	SIMPLE	t1	max	index	PRIMARY	PRIMARY	4	NULL	3	Using where; Using index
 SELECT * FROM t1 WHERE a > 7;
 a
 8
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 7;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	max	index	PRIMARY	PRIMARY	4	NULL	10	Using where; Using index
+1	SIMPLE	t1	max	index	PRIMARY	PRIMARY	4	NULL	3	Using where; Using index
 DROP TABLE t1;
 CREATE TABLE t1 (a INT PRIMARY KEY)
 PARTITION BY RANGE (a) (
@@ -408,7 +432,7 @@ a
 1
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 1;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0,p1	index	PRIMARY	PRIMARY	4	NULL	9	Using where; Using index
+1	SIMPLE	t1	p0,p1	index	PRIMARY	PRIMARY	4	NULL	3	Using where; Using index
 SELECT * FROM t1 WHERE a <= 2;
 a
 -1
@@ -417,7 +441,7 @@ a
 2
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 2;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0,p1,p2	index	PRIMARY	PRIMARY	4	NULL	9	Using where; Using index
+1	SIMPLE	t1	p0,p1,p2	index	PRIMARY	PRIMARY	4	NULL	4	Using where; Using index
 SELECT * FROM t1 WHERE a <= 3;
 a
 -1
@@ -427,7 +451,7 @@ a
 3
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 3;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0,p1,p2,p3	index	PRIMARY	PRIMARY	4	NULL	9	Using where; Using index
+1	SIMPLE	t1	p0,p1,p2,p3	index	PRIMARY	PRIMARY	4	NULL	5	Using where; Using index
 SELECT * FROM t1 WHERE a <= 4;
 a
 -1
@@ -438,7 +462,7 @@ a
 4
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 4;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0,p1,p2,p3,p4	index	PRIMARY	PRIMARY	4	NULL	9	Using where; Using index
+1	SIMPLE	t1	p0,p1,p2,p3,p4	index	PRIMARY	PRIMARY	4	NULL	6	Using where; Using index
 SELECT * FROM t1 WHERE a <= 5;
 a
 -1
@@ -511,7 +535,7 @@ a
 7
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 1;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p1,p2,p3,p4,max	index	PRIMARY	PRIMARY	4	NULL	9	Using where; Using index
+1	SIMPLE	t1	p1,p2,p3,p4,max	index	PRIMARY	PRIMARY	4	NULL	7	Using where; Using index
 SELECT * FROM t1 WHERE a >= 2;
 a
 2
@@ -522,7 +546,7 @@ a
 7
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 2;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p2,p3,p4,max	index	PRIMARY	PRIMARY	4	NULL	9	Using where; Using index
+1	SIMPLE	t1	p2,p3,p4,max	index	PRIMARY	PRIMARY	4	NULL	6	Using where; Using index
 SELECT * FROM t1 WHERE a >= 3;
 a
 3
@@ -532,7 +556,7 @@ a
 7
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 3;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p3,p4,max	index	PRIMARY	PRIMARY	4	NULL	9	Using where; Using index
+1	SIMPLE	t1	p3,p4,max	index	PRIMARY	PRIMARY	4	NULL	5	Using where; Using index
 SELECT * FROM t1 WHERE a >= 4;
 a
 4
@@ -541,7 +565,7 @@ a
 7
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 4;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p4,max	index	PRIMARY	PRIMARY	4	NULL	9	Using where; Using index
+1	SIMPLE	t1	p4,max	index	PRIMARY	PRIMARY	4	NULL	4	Using where; Using index
 SELECT * FROM t1 WHERE a >= 5;
 a
 5
@@ -549,14 +573,14 @@ a
 7
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 5;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	max	index	PRIMARY	PRIMARY	4	NULL	9	Using where; Using index
+1	SIMPLE	t1	max	index	PRIMARY	PRIMARY	4	NULL	3	Using where; Using index
 SELECT * FROM t1 WHERE a >= 6;
 a
 6
 7
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 6;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	max	index	PRIMARY	PRIMARY	4	NULL	9	Using where; Using index
+1	SIMPLE	t1	max	index	PRIMARY	PRIMARY	4	NULL	3	Using where; Using index
 SELECT * FROM t1 WHERE a > 1;
 a
 2
@@ -567,7 +591,7 @@ a
 7
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 1;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p2,p3,p4,max	index	PRIMARY	PRIMARY	4	NULL	9	Using where; Using index
+1	SIMPLE	t1	p2,p3,p4,max	index	PRIMARY	PRIMARY	4	NULL	6	Using where; Using index
 SELECT * FROM t1 WHERE a > 2;
 a
 3
@@ -577,7 +601,7 @@ a
 7
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 2;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p3,p4,max	index	PRIMARY	PRIMARY	4	NULL	9	Using where; Using index
+1	SIMPLE	t1	p3,p4,max	index	PRIMARY	PRIMARY	4	NULL	5	Using where; Using index
 SELECT * FROM t1 WHERE a > 3;
 a
 4
@@ -586,7 +610,7 @@ a
 7
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 3;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p4,max	index	PRIMARY	PRIMARY	4	NULL	9	Using where; Using index
+1	SIMPLE	t1	p4,max	index	PRIMARY	PRIMARY	4	NULL	4	Using where; Using index
 SELECT * FROM t1 WHERE a > 4;
 a
 5
@@ -594,20 +618,20 @@ a
 7
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 4;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	max	index	PRIMARY	PRIMARY	4	NULL	9	Using where; Using index
+1	SIMPLE	t1	max	index	PRIMARY	PRIMARY	4	NULL	3	Using where; Using index
 SELECT * FROM t1 WHERE a > 5;
 a
 6
 7
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 5;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	max	index	PRIMARY	PRIMARY	4	NULL	9	Using where; Using index
+1	SIMPLE	t1	max	index	PRIMARY	PRIMARY	4	NULL	3	Using where; Using index
 SELECT * FROM t1 WHERE a > 6;
 a
 7
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 6;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	max	index	PRIMARY	PRIMARY	4	NULL	9	Using where; Using index
+1	SIMPLE	t1	max	index	PRIMARY	PRIMARY	4	NULL	3	Using where; Using index
 DROP TABLE t1;
 # test of RANGE and index
 CREATE TABLE t1 (a DATE, KEY(a))
@@ -757,10 +781,10 @@ id	select_type	table	partitions	type	pos
 1	SIMPLE	t1	pNULL,p0001-01-01,p1001-01-01,p2001-01-01	range	a	a	4	NULL	5	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1999-02-31';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	pNULL,p2001-01-01	index	a	a	4	NULL	7	Using where; Using index
+1	SIMPLE	t1	pNULL,p2001-01-01	index	a	a	4	NULL	4	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1999-02-31';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	pNULL,p2001-01-01	index	a	a	4	NULL	7	Using where; Using index
+1	SIMPLE	t1	pNULL,p2001-01-01	index	a	a	4	NULL	4	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1999-02-31';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	pNULL	ref	a	a	4	const	1	Using where; Using index
@@ -880,34 +904,34 @@ a
 1001-01-01
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1001-01-01';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	pNULL,p0001-01-01,p1001-01-01	ALL	NULL	NULL	NULL	NULL	7	Using where
+1	SIMPLE	t1	pNULL,p0001-01-01,p1001-01-01	ALL	NULL	NULL	NULL	NULL	6	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1001-01-01';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	pNULL,p0001-01-01,p1001-01-01	ALL	NULL	NULL	NULL	NULL	7	Using where
+1	SIMPLE	t1	pNULL,p0001-01-01,p1001-01-01	ALL	NULL	NULL	NULL	NULL	6	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1001-01-01';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	pNULL,p1001-01-01,p2001-01-01	ALL	NULL	NULL	NULL	NULL	7	Using where
+1	SIMPLE	t1	pNULL,p1001-01-01,p2001-01-01	ALL	NULL	NULL	NULL	NULL	5	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1001-01-01';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	pNULL,p2001-01-01	ALL	NULL	NULL	NULL	NULL	7	Using where
+1	SIMPLE	t1	pNULL,p2001-01-01	ALL	NULL	NULL	NULL	NULL	4	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1001-01-01';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	p1001-01-01	system	NULL	NULL	NULL	NULL	1	
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1001-00-00';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	pNULL,p0001-01-01,p1001-01-01	ALL	NULL	NULL	NULL	NULL	7	Using where
+1	SIMPLE	t1	pNULL,p0001-01-01,p1001-01-01	ALL	NULL	NULL	NULL	NULL	6	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1001-00-00';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	pNULL,p0001-01-01,p1001-01-01	ALL	NULL	NULL	NULL	NULL	7	Using where
+1	SIMPLE	t1	pNULL,p0001-01-01,p1001-01-01	ALL	NULL	NULL	NULL	NULL	6	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1001-00-00';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	pNULL,p1001-01-01,p2001-01-01	ALL	NULL	NULL	NULL	NULL	7	Using where
+1	SIMPLE	t1	pNULL,p1001-01-01,p2001-01-01	ALL	NULL	NULL	NULL	NULL	5	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1001-00-00';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	pNULL,p1001-01-01,p2001-01-01	ALL	NULL	NULL	NULL	NULL	7	Using where
+1	SIMPLE	t1	pNULL,p1001-01-01,p2001-01-01	ALL	NULL	NULL	NULL	NULL	5	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1001-00-00';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	pNULL	ALL	NULL	NULL	NULL	NULL	7	Using where
+1	SIMPLE	t1	pNULL	ALL	NULL	NULL	NULL	NULL	3	Using where
 # Disabling warnings for the invalid date
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1999-02-31';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
@@ -917,25 +941,25 @@ id	select_type	table	partitions	type	pos
 1	SIMPLE	t1	pNULL,p0001-01-01,p1001-01-01,p2001-01-01	ALL	NULL	NULL	NULL	NULL	7	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1999-02-31';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	pNULL,p2001-01-01	ALL	NULL	NULL	NULL	NULL	7	Using where
+1	SIMPLE	t1	pNULL,p2001-01-01	ALL	NULL	NULL	NULL	NULL	4	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1999-02-31';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	pNULL,p2001-01-01	ALL	NULL	NULL	NULL	NULL	7	Using where
+1	SIMPLE	t1	pNULL,p2001-01-01	ALL	NULL	NULL	NULL	NULL	4	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1999-02-31';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	pNULL	ALL	NULL	NULL	NULL	NULL	7	Using where
+1	SIMPLE	t1	pNULL	ALL	NULL	NULL	NULL	NULL	3	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1002-00-00';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	pNULL,p0001-01-01,p1001-01-01,p2001-01-01	ALL	NULL	NULL	NULL	NULL	7	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1001-01-01';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	pNULL,p0001-01-01,p1001-01-01	ALL	NULL	NULL	NULL	NULL	7	Using where
+1	SIMPLE	t1	pNULL,p0001-01-01,p1001-01-01	ALL	NULL	NULL	NULL	NULL	6	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0001-01-02' AND '1002-00-00';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	pNULL,p1001-01-01,p2001-01-01	ALL	NULL	NULL	NULL	NULL	7	Using where
+1	SIMPLE	t1	pNULL,p1001-01-01,p2001-01-01	ALL	NULL	NULL	NULL	NULL	5	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0001-01-01' AND '1001-01-01';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	pNULL,p0001-01-01,p1001-01-01	ALL	NULL	NULL	NULL	NULL	7	Using where
+1	SIMPLE	t1	pNULL,p0001-01-01,p1001-01-01	ALL	NULL	NULL	NULL	NULL	6	Using where
 DROP TABLE t1;
 # test of LIST and index
 CREATE TABLE t1 (a DATE, KEY(a))
@@ -1086,10 +1110,10 @@ id	select_type	table	partitions	type	pos
 1	SIMPLE	t1	p0001-01-01,pNULL,p0000-01-02,p1001-01-01	range	a	a	4	NULL	5	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1999-02-31';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p2001-01-01,pNULL	index	a	a	4	NULL	7	Using where; Using index
+1	SIMPLE	t1	p2001-01-01,pNULL	index	a	a	4	NULL	4	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1999-02-31';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p2001-01-01,pNULL	index	a	a	4	NULL	7	Using where; Using index
+1	SIMPLE	t1	p2001-01-01,pNULL	index	a	a	4	NULL	4	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1999-02-31';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	pNULL	ref	a	a	4	const	1	Using where; Using index
@@ -1101,7 +1125,7 @@ id	select_type	table	partitions	type	pos
 1	SIMPLE	t1	p0001-01-01,pNULL,p0000-01-02,p1001-01-01	range	a	a	4	NULL	4	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0001-01-02' AND '1002-00-00';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	pNULL,p1001-01-01	index	a	a	4	NULL	7	Using where; Using index
+1	SIMPLE	t1	pNULL,p1001-01-01	index	a	a	4	NULL	4	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0001-01-01' AND '1001-01-01';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	p0001-01-01,pNULL,p1001-01-01	range	a	a	4	NULL	3	Using where; Using index
@@ -1209,62 +1233,62 @@ a
 1001-01-01
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1001-01-01';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0001-01-01,pNULL,p0000-01-02	ALL	NULL	NULL	NULL	NULL	7	Using where
+1	SIMPLE	t1	p0001-01-01,pNULL,p0000-01-02	ALL	NULL	NULL	NULL	NULL	5	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1001-01-01';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0001-01-01,pNULL,p0000-01-02,p1001-01-01	ALL	NULL	NULL	NULL	NULL	7	Using where
+1	SIMPLE	t1	p0001-01-01,pNULL,p0000-01-02,p1001-01-01	ALL	NULL	NULL	NULL	NULL	6	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1001-01-01';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p2001-01-01,pNULL,p1001-01-01	ALL	NULL	NULL	NULL	NULL	7	Using where
+1	SIMPLE	t1	p2001-01-01,pNULL,p1001-01-01	ALL	NULL	NULL	NULL	NULL	5	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1001-01-01';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p2001-01-01,pNULL	ALL	NULL	NULL	NULL	NULL	7	Using where
+1	SIMPLE	t1	p2001-01-01,pNULL	ALL	NULL	NULL	NULL	NULL	4	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1001-01-01';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	p1001-01-01	system	NULL	NULL	NULL	NULL	1	
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1001-00-00';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0001-01-01,pNULL,p0000-01-02	ALL	NULL	NULL	NULL	NULL	7	Using where
+1	SIMPLE	t1	p0001-01-01,pNULL,p0000-01-02	ALL	NULL	NULL	NULL	NULL	5	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1001-00-00';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0001-01-01,pNULL,p0000-01-02	ALL	NULL	NULL	NULL	NULL	7	Using where
+1	SIMPLE	t1	p0001-01-01,pNULL,p0000-01-02	ALL	NULL	NULL	NULL	NULL	5	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1001-00-00';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p2001-01-01,pNULL,p1001-01-01	ALL	NULL	NULL	NULL	NULL	7	Using where
+1	SIMPLE	t1	p2001-01-01,pNULL,p1001-01-01	ALL	NULL	NULL	NULL	NULL	5	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1001-00-00';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p2001-01-01,pNULL,p1001-01-01	ALL	NULL	NULL	NULL	NULL	7	Using where
+1	SIMPLE	t1	p2001-01-01,pNULL,p1001-01-01	ALL	NULL	NULL	NULL	NULL	5	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1001-00-00';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	pNULL	ALL	NULL	NULL	NULL	NULL	7	Using where
+1	SIMPLE	t1	pNULL	ALL	NULL	NULL	NULL	NULL	3	Using where
 # Disabling warnings for the invalid date
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1999-02-31';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0001-01-01,pNULL,p0000-01-02,p1001-01-01	ALL	NULL	NULL	NULL	NULL	7	Using where
+1	SIMPLE	t1	p0001-01-01,pNULL,p0000-01-02,p1001-01-01	ALL	NULL	NULL	NULL	NULL	6	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1999-02-31';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0001-01-01,pNULL,p0000-01-02,p1001-01-01	ALL	NULL	NULL	NULL	NULL	7	Using where
+1	SIMPLE	t1	p0001-01-01,pNULL,p0000-01-02,p1001-01-01	ALL	NULL	NULL	NULL	NULL	6	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1999-02-31';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p2001-01-01,pNULL	ALL	NULL	NULL	NULL	NULL	7	Using where
+1	SIMPLE	t1	p2001-01-01,pNULL	ALL	NULL	NULL	NULL	NULL	4	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1999-02-31';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p2001-01-01,pNULL	ALL	NULL	NULL	NULL	NULL	7	Using where
+1	SIMPLE	t1	p2001-01-01,pNULL	ALL	NULL	NULL	NULL	NULL	4	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1999-02-31';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	pNULL	ALL	NULL	NULL	NULL	NULL	7	Using where
+1	SIMPLE	t1	pNULL	ALL	NULL	NULL	NULL	NULL	3	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1002-00-00';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0001-01-01,pNULL,p0000-01-02,p1001-01-01	ALL	NULL	NULL	NULL	NULL	7	Using where
+1	SIMPLE	t1	p0001-01-01,pNULL,p0000-01-02,p1001-01-01	ALL	NULL	NULL	NULL	NULL	6	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1001-01-01';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0001-01-01,pNULL,p0000-01-02,p1001-01-01	ALL	NULL	NULL	NULL	NULL	7	Using where
+1	SIMPLE	t1	p0001-01-01,pNULL,p0000-01-02,p1001-01-01	ALL	NULL	NULL	NULL	NULL	6	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0001-01-02' AND '1002-00-00';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	pNULL,p1001-01-01	ALL	NULL	NULL	NULL	NULL	7	Using where
+1	SIMPLE	t1	pNULL,p1001-01-01	ALL	NULL	NULL	NULL	NULL	4	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0001-01-01' AND '1001-01-01';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0001-01-01,pNULL,p1001-01-01	ALL	NULL	NULL	NULL	NULL	7	Using where
+1	SIMPLE	t1	p0001-01-01,pNULL,p1001-01-01	ALL	NULL	NULL	NULL	NULL	5	Using where
 DROP TABLE t1;
 # Test with DATETIME column NOT NULL
 CREATE TABLE t1 (
@@ -1289,25 +1313,25 @@ id	select_type	table	partitions	type	pos
 1	SIMPLE	t1	p20090401,p20090402,p20090403	index	NULL	PRIMARY	12	NULL	8	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090403	index	NULL	PRIMARY	12	NULL	8	Using where; Using index
+1	SIMPLE	t1	p20090403	index	NULL	PRIMARY	12	NULL	2	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	12	NULL	13	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	12	NULL	10	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	12	NULL	13	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	12	NULL	10	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b < CAST('2009-04-02 23:59:59' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	12	NULL	13	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	12	NULL	6	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b <= CAST('2009-04-02 23:59:59' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	12	NULL	13	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	12	NULL	6	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b = CAST('2009-04-02 23:59:59' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090402	index	NULL	PRIMARY	12	NULL	13	Using where; Using index
+1	SIMPLE	t1	p20090402	index	NULL	PRIMARY	12	NULL	3	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b >= CAST('2009-04-02 23:59:59' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
@@ -1315,99 +1339,99 @@ id	select_type	table	partitions	type	pos
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b > CAST('2009-04-02 23:59:59' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	12	NULL	13	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	12	NULL	10	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATE);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	12	NULL	13	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	12	NULL	6	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATE);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402,p20090403	index	NULL	PRIMARY	12	NULL	13	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090402,p20090403	index	NULL	PRIMARY	12	NULL	8	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATE);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090403	index	NULL	PRIMARY	12	NULL	13	Using where; Using index
+1	SIMPLE	t1	p20090403	index	NULL	PRIMARY	12	NULL	2	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATE);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	12	NULL	13	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	12	NULL	10	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATE);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	12	NULL	13	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	12	NULL	10	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-03 00:00:00';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	12	NULL	13	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	12	NULL	6	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-03 00:00:00';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402,p20090403	index	NULL	PRIMARY	12	NULL	13	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090402,p20090403	index	NULL	PRIMARY	12	NULL	8	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-03 00:00:00';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090403	index	NULL	PRIMARY	12	NULL	13	Using where; Using index
+1	SIMPLE	t1	p20090403	index	NULL	PRIMARY	12	NULL	2	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-03 00:00:00';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	12	NULL	13	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	12	NULL	10	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-03 00:00:00';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	12	NULL	13	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	12	NULL	10	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-02 23:59:59';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	12	NULL	13	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	12	NULL	6	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-02 23:59:59';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	12	NULL	13	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	12	NULL	6	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-02 23:59:59';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090402	index	NULL	PRIMARY	12	NULL	13	Using where; Using index
+1	SIMPLE	t1	p20090402	index	NULL	PRIMARY	12	NULL	3	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-02 23:59:59';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	p20090401,p20090402,p20090403,p20090404,p20090405	index	NULL	PRIMARY	12	NULL	13	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-02 23:59:59';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	12	NULL	13	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	12	NULL	10	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-03';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	12	NULL	13	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	12	NULL	6	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-03';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402,p20090403	index	NULL	PRIMARY	12	NULL	13	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090402,p20090403	index	NULL	PRIMARY	12	NULL	8	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-03';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090403	index	NULL	PRIMARY	12	NULL	13	Using where; Using index
+1	SIMPLE	t1	p20090403	index	NULL	PRIMARY	12	NULL	2	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-03';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	12	NULL	13	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	12	NULL	10	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-03';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	12	NULL	13	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	12	NULL	10	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b < CAST('2009-04-03 00:00:01' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402,p20090403	index	NULL	PRIMARY	12	NULL	13	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090402,p20090403	index	NULL	PRIMARY	12	NULL	8	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b <= CAST('2009-04-03 00:00:01' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402,p20090403	index	NULL	PRIMARY	12	NULL	13	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090402,p20090403	index	NULL	PRIMARY	12	NULL	8	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b = CAST('2009-04-03 00:00:01' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090403	index	NULL	PRIMARY	12	NULL	13	Using where; Using index
+1	SIMPLE	t1	p20090403	index	NULL	PRIMARY	12	NULL	2	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b >= CAST('2009-04-03 00:00:01' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	12	NULL	13	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	12	NULL	10	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b > CAST('2009-04-03 00:00:01' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	12	NULL	13	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	12	NULL	10	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b < CAST('2009-04-02 23:59:58' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	12	NULL	13	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	12	NULL	6	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b <= CAST('2009-04-02 23:59:58' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	12	NULL	13	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	12	NULL	6	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b = CAST('2009-04-02 23:59:58' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090402	index	NULL	PRIMARY	12	NULL	13	Using where; Using index
+1	SIMPLE	t1	p20090402	index	NULL	PRIMARY	12	NULL	3	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b >= CAST('2009-04-02 23:59:58' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
@@ -1440,21 +1464,21 @@ id	select_type	table	partitions	type	pos
 1	SIMPLE	t1	p20090401,p20090402,p20090403	index	NULL	PRIMARY	7	NULL	7	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090403	index	NULL	PRIMARY	7	NULL	7	Using where; Using index
+1	SIMPLE	t1	p20090403	index	NULL	PRIMARY	7	NULL	2	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	7	NULL	12	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	7	NULL	10	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090404,p20090405	index	NULL	PRIMARY	7	NULL	12	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090404,p20090405	index	NULL	PRIMARY	7	NULL	8	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b < CAST('2009-04-02 23:59:59' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	7	NULL	12	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	7	NULL	5	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b <= CAST('2009-04-02 23:59:59' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	7	NULL	12	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	7	NULL	5	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b = CAST('2009-04-02 23:59:59' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
@@ -1462,79 +1486,79 @@ id	select_type	table	partitions	type	pos
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b >= CAST('2009-04-02 23:59:59' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	7	NULL	12	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	7	NULL	10	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b > CAST('2009-04-02 23:59:59' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	7	NULL	12	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	7	NULL	10	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATE);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	7	NULL	12	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	7	NULL	5	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATE);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402,p20090403	index	NULL	PRIMARY	7	NULL	12	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090402,p20090403	index	NULL	PRIMARY	7	NULL	7	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATE);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090403	index	NULL	PRIMARY	7	NULL	12	Using where; Using index
+1	SIMPLE	t1	p20090403	index	NULL	PRIMARY	7	NULL	2	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATE);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	7	NULL	12	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	7	NULL	10	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATE);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090404,p20090405	index	NULL	PRIMARY	7	NULL	12	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090404,p20090405	index	NULL	PRIMARY	7	NULL	8	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-03 00:00:00';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	7	NULL	12	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	7	NULL	5	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-03 00:00:00';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402,p20090403	index	NULL	PRIMARY	7	NULL	12	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090402,p20090403	index	NULL	PRIMARY	7	NULL	7	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-03 00:00:00';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090403	index	NULL	PRIMARY	7	NULL	12	Using where; Using index
+1	SIMPLE	t1	p20090403	index	NULL	PRIMARY	7	NULL	2	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-03 00:00:00';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	7	NULL	12	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	7	NULL	10	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-03 00:00:00';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090404,p20090405	index	NULL	PRIMARY	7	NULL	12	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090404,p20090405	index	NULL	PRIMARY	7	NULL	8	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-02 23:59:59';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	7	NULL	12	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	7	NULL	5	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-02 23:59:59';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	7	NULL	12	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	7	NULL	5	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-02 23:59:59';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Impossible WHERE noticed after reading const tables
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-02 23:59:59';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	7	NULL	12	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	7	NULL	10	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-02 23:59:59';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	7	NULL	12	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	7	NULL	10	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-03';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	7	NULL	12	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	7	NULL	5	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-03';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402,p20090403	index	NULL	PRIMARY	7	NULL	12	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090402,p20090403	index	NULL	PRIMARY	7	NULL	7	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-03';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090403	index	NULL	PRIMARY	7	NULL	12	Using where; Using index
+1	SIMPLE	t1	p20090403	index	NULL	PRIMARY	7	NULL	2	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-03';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	7	NULL	12	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	7	NULL	10	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-03';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090404,p20090405	index	NULL	PRIMARY	7	NULL	12	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090404,p20090405	index	NULL	PRIMARY	7	NULL	8	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b < CAST('2009-04-03 00:00:01' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402,p20090403	index	NULL	PRIMARY	7	NULL	12	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090402,p20090403	index	NULL	PRIMARY	7	NULL	7	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b <= CAST('2009-04-03 00:00:01' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402,p20090403	index	NULL	PRIMARY	7	NULL	12	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090402,p20090403	index	NULL	PRIMARY	7	NULL	7	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b = CAST('2009-04-03 00:00:01' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
@@ -1542,19 +1566,19 @@ id	select_type	table	partitions	type	pos
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b >= CAST('2009-04-03 00:00:01' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090404,p20090405	index	NULL	PRIMARY	7	NULL	12	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090404,p20090405	index	NULL	PRIMARY	7	NULL	8	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b > CAST('2009-04-03 00:00:01' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090404,p20090405	index	NULL	PRIMARY	7	NULL	12	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090404,p20090405	index	NULL	PRIMARY	7	NULL	8	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b < CAST('2009-04-02 23:59:58' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	7	NULL	12	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	7	NULL	5	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b <= CAST('2009-04-02 23:59:58' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	7	NULL	12	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	7	NULL	5	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b = CAST('2009-04-02 23:59:58' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
@@ -1562,11 +1586,11 @@ id	select_type	table	partitions	type	pos
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b >= CAST('2009-04-02 23:59:58' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	7	NULL	12	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	7	NULL	10	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b > CAST('2009-04-02 23:59:58' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	7	NULL	12	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	7	NULL	10	Using where; Using index
 DROP TABLE t1;
 # Test with DATETIME column NULL
 CREATE TABLE t1 (
@@ -1590,25 +1614,25 @@ id	select_type	table	partitions	type	pos
 1	SIMPLE	t1	p20090401,p20090402,p20090403	ALL	NULL	NULL	NULL	NULL	8	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090403	ALL	NULL	NULL	NULL	NULL	8	Using where
+1	SIMPLE	t1	p20090403	ALL	NULL	NULL	NULL	NULL	2	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	13	Using where
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	10	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	13	Using where
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	10	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b < CAST('2009-04-02 23:59:59' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402	ALL	NULL	NULL	NULL	NULL	13	Using where
+1	SIMPLE	t1	p20090401,p20090402	ALL	NULL	NULL	NULL	NULL	6	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b <= CAST('2009-04-02 23:59:59' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402	ALL	NULL	NULL	NULL	NULL	13	Using where
+1	SIMPLE	t1	p20090401,p20090402	ALL	NULL	NULL	NULL	NULL	6	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b = CAST('2009-04-02 23:59:59' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090402	ALL	NULL	NULL	NULL	NULL	13	Using where
+1	SIMPLE	t1	p20090402	ALL	NULL	NULL	NULL	NULL	3	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b >= CAST('2009-04-02 23:59:59' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
@@ -1616,99 +1640,99 @@ id	select_type	table	partitions	type	pos
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b > CAST('2009-04-02 23:59:59' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	13	Using where
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	10	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATE);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402	ALL	NULL	NULL	NULL	NULL	13	Using where
+1	SIMPLE	t1	p20090401,p20090402	ALL	NULL	NULL	NULL	NULL	6	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATE);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402,p20090403	ALL	NULL	NULL	NULL	NULL	13	Using where
+1	SIMPLE	t1	p20090401,p20090402,p20090403	ALL	NULL	NULL	NULL	NULL	8	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATE);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090403	ALL	NULL	NULL	NULL	NULL	13	Using where
+1	SIMPLE	t1	p20090403	ALL	NULL	NULL	NULL	NULL	2	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATE);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	13	Using where
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	10	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATE);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	13	Using where
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	10	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-03 00:00:00';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402	ALL	NULL	NULL	NULL	NULL	13	Using where
+1	SIMPLE	t1	p20090401,p20090402	ALL	NULL	NULL	NULL	NULL	6	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-03 00:00:00';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402,p20090403	ALL	NULL	NULL	NULL	NULL	13	Using where
+1	SIMPLE	t1	p20090401,p20090402,p20090403	ALL	NULL	NULL	NULL	NULL	8	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-03 00:00:00';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090403	ALL	NULL	NULL	NULL	NULL	13	Using where
+1	SIMPLE	t1	p20090403	ALL	NULL	NULL	NULL	NULL	2	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-03 00:00:00';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	13	Using where
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	10	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-03 00:00:00';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	13	Using where
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	10	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-02 23:59:59';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402	ALL	NULL	NULL	NULL	NULL	13	Using where
+1	SIMPLE	t1	p20090401,p20090402	ALL	NULL	NULL	NULL	NULL	6	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-02 23:59:59';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402	ALL	NULL	NULL	NULL	NULL	13	Using where
+1	SIMPLE	t1	p20090401,p20090402	ALL	NULL	NULL	NULL	NULL	6	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-02 23:59:59';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090402	ALL	NULL	NULL	NULL	NULL	13	Using where
+1	SIMPLE	t1	p20090402	ALL	NULL	NULL	NULL	NULL	3	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-02 23:59:59';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	p20090401,p20090402,p20090403,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	13	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-02 23:59:59';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	13	Using where
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	10	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-03';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402	ALL	NULL	NULL	NULL	NULL	13	Using where
+1	SIMPLE	t1	p20090401,p20090402	ALL	NULL	NULL	NULL	NULL	6	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-03';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402,p20090403	ALL	NULL	NULL	NULL	NULL	13	Using where
+1	SIMPLE	t1	p20090401,p20090402,p20090403	ALL	NULL	NULL	NULL	NULL	8	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-03';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090403	ALL	NULL	NULL	NULL	NULL	13	Using where
+1	SIMPLE	t1	p20090403	ALL	NULL	NULL	NULL	NULL	2	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-03';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	13	Using where
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	10	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-03';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	13	Using where
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	10	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b < CAST('2009-04-03 00:00:01' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402,p20090403	ALL	NULL	NULL	NULL	NULL	13	Using where
+1	SIMPLE	t1	p20090401,p20090402,p20090403	ALL	NULL	NULL	NULL	NULL	8	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b <= CAST('2009-04-03 00:00:01' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402,p20090403	ALL	NULL	NULL	NULL	NULL	13	Using where
+1	SIMPLE	t1	p20090401,p20090402,p20090403	ALL	NULL	NULL	NULL	NULL	8	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b = CAST('2009-04-03 00:00:01' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090403	ALL	NULL	NULL	NULL	NULL	13	Using where
+1	SIMPLE	t1	p20090403	ALL	NULL	NULL	NULL	NULL	2	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b >= CAST('2009-04-03 00:00:01' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	13	Using where
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	10	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b > CAST('2009-04-03 00:00:01' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	13	Using where
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	10	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b < CAST('2009-04-02 23:59:58' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402	ALL	NULL	NULL	NULL	NULL	13	Using where
+1	SIMPLE	t1	p20090401,p20090402	ALL	NULL	NULL	NULL	NULL	6	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b <= CAST('2009-04-02 23:59:58' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402	ALL	NULL	NULL	NULL	NULL	13	Using where
+1	SIMPLE	t1	p20090401,p20090402	ALL	NULL	NULL	NULL	NULL	6	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b = CAST('2009-04-02 23:59:58' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090402	ALL	NULL	NULL	NULL	NULL	13	Using where
+1	SIMPLE	t1	p20090402	ALL	NULL	NULL	NULL	NULL	3	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b >= CAST('2009-04-02 23:59:58' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
@@ -1740,21 +1764,21 @@ id	select_type	table	partitions	type	pos
 1	SIMPLE	t1	p20090401,p20090402,p20090403	ALL	NULL	NULL	NULL	NULL	7	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090403	ALL	NULL	NULL	NULL	NULL	7	Using where
+1	SIMPLE	t1	p20090403	ALL	NULL	NULL	NULL	NULL	2	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	12	Using where
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	10	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	12	Using where
+1	SIMPLE	t1	p20090401,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	8	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b < CAST('2009-04-02 23:59:59' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402	ALL	NULL	NULL	NULL	NULL	12	Using where
+1	SIMPLE	t1	p20090401,p20090402	ALL	NULL	NULL	NULL	NULL	5	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b <= CAST('2009-04-02 23:59:59' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402	ALL	NULL	NULL	NULL	NULL	12	Using where
+1	SIMPLE	t1	p20090401,p20090402	ALL	NULL	NULL	NULL	NULL	5	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b = CAST('2009-04-02 23:59:59' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
@@ -1762,79 +1786,79 @@ id	select_type	table	partitions	type	pos
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b >= CAST('2009-04-02 23:59:59' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	12	Using where
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	10	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b > CAST('2009-04-02 23:59:59' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	12	Using where
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	10	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATE);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402	ALL	NULL	NULL	NULL	NULL	12	Using where
+1	SIMPLE	t1	p20090401,p20090402	ALL	NULL	NULL	NULL	NULL	5	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATE);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402,p20090403	ALL	NULL	NULL	NULL	NULL	12	Using where
+1	SIMPLE	t1	p20090401,p20090402,p20090403	ALL	NULL	NULL	NULL	NULL	7	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATE);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090403	ALL	NULL	NULL	NULL	NULL	12	Using where
+1	SIMPLE	t1	p20090403	ALL	NULL	NULL	NULL	NULL	2	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATE);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	12	Using where
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	10	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATE);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	12	Using where
+1	SIMPLE	t1	p20090401,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	8	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-03 00:00:00';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402	ALL	NULL	NULL	NULL	NULL	12	Using where
+1	SIMPLE	t1	p20090401,p20090402	ALL	NULL	NULL	NULL	NULL	5	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-03 00:00:00';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402,p20090403	ALL	NULL	NULL	NULL	NULL	12	Using where
+1	SIMPLE	t1	p20090401,p20090402,p20090403	ALL	NULL	NULL	NULL	NULL	7	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-03 00:00:00';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090403	ALL	NULL	NULL	NULL	NULL	12	Using where
+1	SIMPLE	t1	p20090403	ALL	NULL	NULL	NULL	NULL	2	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-03 00:00:00';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	12	Using where
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	10	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-03 00:00:00';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	12	Using where
+1	SIMPLE	t1	p20090401,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	8	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-02 23:59:59';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402	ALL	NULL	NULL	NULL	NULL	12	Using where
+1	SIMPLE	t1	p20090401,p20090402	ALL	NULL	NULL	NULL	NULL	5	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-02 23:59:59';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402	ALL	NULL	NULL	NULL	NULL	12	Using where
+1	SIMPLE	t1	p20090401,p20090402	ALL	NULL	NULL	NULL	NULL	5	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-02 23:59:59';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Impossible WHERE noticed after reading const tables
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-02 23:59:59';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	12	Using where
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	10	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-02 23:59:59';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	12	Using where
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	10	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-03';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402	ALL	NULL	NULL	NULL	NULL	12	Using where
+1	SIMPLE	t1	p20090401,p20090402	ALL	NULL	NULL	NULL	NULL	5	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-03';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402,p20090403	ALL	NULL	NULL	NULL	NULL	12	Using where
+1	SIMPLE	t1	p20090401,p20090402,p20090403	ALL	NULL	NULL	NULL	NULL	7	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-03';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090403	ALL	NULL	NULL	NULL	NULL	12	Using where
+1	SIMPLE	t1	p20090403	ALL	NULL	NULL	NULL	NULL	2	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-03';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	12	Using where
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	10	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-03';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	12	Using where
+1	SIMPLE	t1	p20090401,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	8	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b < CAST('2009-04-03 00:00:01' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402,p20090403	ALL	NULL	NULL	NULL	NULL	12	Using where
+1	SIMPLE	t1	p20090401,p20090402,p20090403	ALL	NULL	NULL	NULL	NULL	7	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b <= CAST('2009-04-03 00:00:01' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402,p20090403	ALL	NULL	NULL	NULL	NULL	12	Using where
+1	SIMPLE	t1	p20090401,p20090402,p20090403	ALL	NULL	NULL	NULL	NULL	7	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b = CAST('2009-04-03 00:00:01' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
@@ -1842,19 +1866,19 @@ id	select_type	table	partitions	type	pos
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b >= CAST('2009-04-03 00:00:01' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	12	Using where
+1	SIMPLE	t1	p20090401,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	8	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b > CAST('2009-04-03 00:00:01' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	12	Using where
+1	SIMPLE	t1	p20090401,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	8	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b < CAST('2009-04-02 23:59:58' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402	ALL	NULL	NULL	NULL	NULL	12	Using where
+1	SIMPLE	t1	p20090401,p20090402	ALL	NULL	NULL	NULL	NULL	5	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b <= CAST('2009-04-02 23:59:58' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402	ALL	NULL	NULL	NULL	NULL	12	Using where
+1	SIMPLE	t1	p20090401,p20090402	ALL	NULL	NULL	NULL	NULL	5	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b = CAST('2009-04-02 23:59:58' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
@@ -1862,11 +1886,11 @@ id	select_type	table	partitions	type	pos
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b >= CAST('2009-04-02 23:59:58' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	12	Using where
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	10	Using where
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b > CAST('2009-04-02 23:59:58' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	12	Using where
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	ALL	NULL	NULL	NULL	NULL	10	Using where
 DROP TABLE t1;
 # For better code coverage of the patch
 CREATE TABLE t1 (
@@ -1930,7 +1954,7 @@ id	select_type	table	partitions	type	pos
 1	SIMPLE	t2	p0,p1	ALL	NULL	NULL	NULL	NULL	3	Using where
 explain partitions select * from t2 where a=1 and b=1;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t2	p0	ALL	NULL	NULL	NULL	NULL	3	Using where
+1	SIMPLE	t2	p0	ALL	NULL	NULL	NULL	NULL	2	Using where
 create table t3 (
 a int
 )
@@ -1988,25 +2012,25 @@ id	select_type	table	partitions	type	pos
 explain partitions select * from t5
 where (a=10 and b=1) or (a=10 and b=2) or (a=10 and b = 3);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t5	p0_p0sp0,p0_p0sp1	ALL	NULL	NULL	NULL	NULL	4	Using where
+1	SIMPLE	t5	p0_p0sp0,p0_p0sp1	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t5 where (a=10 and b=2) or (a=10 and b=3)
 or (a=10 and b = 4);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t5	p0_p0sp0,p0_p0sp1,p1_p1sp0,p1_p1sp1	ALL	NULL	NULL	NULL	NULL	4	Using where
 explain partitions select * from t5 where (c=1 and d=1);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t5	p0_p0sp0,p1_p1sp0	ALL	NULL	NULL	NULL	NULL	4	Using where
+1	SIMPLE	t5	p0_p0sp0,p1_p1sp0	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t5 where (c=2 and d=1);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t5	p0_p0sp1,p1_p1sp1	ALL	NULL	NULL	NULL	NULL	4	Using where
+1	SIMPLE	t5	p0_p0sp1,p1_p1sp1	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t5 where (a=10 and b=2 and c=1 and d=1) or 
 (c=2 and d=1);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t5	p0_p0sp0,p0_p0sp1,p1_p1sp1	ALL	NULL	NULL	NULL	NULL	4	Using where
+1	SIMPLE	t5	p0_p0sp0,p0_p0sp1,p1_p1sp1	ALL	NULL	NULL	NULL	NULL	3	Using where
 explain partitions select * from t5 where (a=10 and b=2 and c=1 and d=1) or 
 (b=2 and c=2 and d=1);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t5	p0_p0sp0,p0_p0sp1,p1_p1sp1	ALL	NULL	NULL	NULL	NULL	4	Using where
+1	SIMPLE	t5	p0_p0sp0,p0_p0sp1,p1_p1sp1	ALL	NULL	NULL	NULL	NULL	3	Using where
 create table t6 (a int not null) partition by LIST(a) (
 partition p1 values in (1),
 partition p3 values in (3),
@@ -2044,7 +2068,7 @@ id	select_type	table	partitions	type	pos
 1	SIMPLE	t6	p5,p7,p9	system	NULL	NULL	NULL	NULL	1	
 explain partitions select * from t6 where a >= 3 and a <= 8;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t6	p3,p5,p7	ALL	NULL	NULL	NULL	NULL	3	Using where
+1	SIMPLE	t6	p3,p5,p7	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t6 where a > 3 and a < 5;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Impossible WHERE noticed after reading const tables
@@ -2086,7 +2110,7 @@ id	select_type	table	partitions	type	pos
 1	SIMPLE	t6	p5,p7,p9	system	NULL	NULL	NULL	NULL	1	
 explain partitions select * from t6 where a >= 3 and a <= 8;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t6	p3,p5,p7	ALL	NULL	NULL	NULL	NULL	3	Using where
+1	SIMPLE	t6	p3,p5,p7	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t6 where a > 3 and a < 5;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Impossible WHERE noticed after reading const tables
@@ -2325,7 +2349,7 @@ id	select_type	table	partitions	type	pos
 explain partitions
 select * from t1 X, t1 Y where X.a = Y.a and (X.a=1 or X.a=2);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	X	p1,p2	ALL	a	NULL	NULL	NULL	4	Using where
+1	SIMPLE	X	p1,p2	ALL	a	NULL	NULL	NULL	2	Using where
 1	SIMPLE	Y	p1,p2	ref	a	a	4	test.X.a	2	
 drop table t1;
 create table t1 (a int) partition by hash(a) partitions 20;
@@ -2338,7 +2362,7 @@ id	select_type	table	partitions	type	pos
 1	SIMPLE	t1	p1,p2	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t1 where a >  1 and a <= 3;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p2,p3	ALL	NULL	NULL	NULL	NULL	3	Using where
+1	SIMPLE	t1	p2,p3	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t1 where a >= 1 and a <= 3;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	p1,p2,p3	ALL	NULL	NULL	NULL	NULL	3	Using where
@@ -2428,22 +2452,22 @@ id	select_type	table	partitions	type	pos
 1	SIMPLE	t2	p0,p1,p2,p3,p4	ALL	NULL	NULL	NULL	NULL	1010	
 explain partitions select * from t2 where a < 801 and a > 200;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t2	p1,p2,p3,p4	ALL	NULL	NULL	NULL	NULL	1010	Using where
+1	SIMPLE	t2	p1,p2,p3,p4	ALL	NULL	NULL	NULL	NULL	800	Using where
 explain partitions select * from t2 where a < 801 and a > 800;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t2	p4	ALL	NULL	NULL	NULL	NULL	1010	Using where
+1	SIMPLE	t2	p4	ALL	NULL	NULL	NULL	NULL	200	Using where
 explain partitions select * from t2 where a > 600;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t2	p3,p4	ALL	NULL	NULL	NULL	NULL	1010	Using where
+1	SIMPLE	t2	p3,p4	ALL	NULL	NULL	NULL	NULL	400	Using where
 explain partitions select * from t2 where a > 600 and b = 1;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t2	p3,p4	ALL	NULL	NULL	NULL	NULL	1010	Using where
+1	SIMPLE	t2	p3,p4	ALL	NULL	NULL	NULL	NULL	400	Using where
 explain partitions select * from t2 where a > 600 and b = 4;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t2	p3,p4	ALL	NULL	NULL	NULL	NULL	1010	Using where
+1	SIMPLE	t2	p3,p4	ALL	NULL	NULL	NULL	NULL	400	Using where
 explain partitions select * from t2 where a > 600 and b = 5;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t2	p3,p4	ALL	NULL	NULL	NULL	NULL	1010	Using where
+1	SIMPLE	t2	p3,p4	ALL	NULL	NULL	NULL	NULL	400	Using where
 explain partitions select * from t2 where b = 5;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t2	p0,p1,p2,p3,p4	ALL	NULL	NULL	NULL	NULL	1010	Using where
@@ -2498,19 +2522,19 @@ id	select_type	table	partitions	type	pos
 1	SIMPLE	t2	p0,p1,p2,p3,p4	ALL	NULL	NULL	NULL	NULL	910	
 explain partitions select * from t2 where a = 101;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t2	p0	ALL	NULL	NULL	NULL	NULL	910	Using where
+1	SIMPLE	t2	p0	ALL	NULL	NULL	NULL	NULL	110	Using where
 explain partitions select * from t2 where a = 550;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t2	p2	ALL	NULL	NULL	NULL	NULL	910	Using where
+1	SIMPLE	t2	p2	ALL	NULL	NULL	NULL	NULL	200	Using where
 explain partitions select * from t2 where a = 833;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t2	p4	ALL	NULL	NULL	NULL	NULL	910	Using where
+1	SIMPLE	t2	p4	ALL	NULL	NULL	NULL	NULL	200	Using where
 explain partitions select * from t2 where (a = 100 OR a = 900);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t2	p0,p4	ALL	NULL	NULL	NULL	NULL	910	Using where
+1	SIMPLE	t2	p0,p4	ALL	NULL	NULL	NULL	NULL	310	Using where
 explain partitions select * from t2 where (a > 100 AND a < 600);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t2	p0,p1,p2	ALL	NULL	NULL	NULL	NULL	910	Using where
+1	SIMPLE	t2	p0,p1,p2	ALL	NULL	NULL	NULL	NULL	510	Using where
 explain partitions select * from t2 where b = 4;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t2	p0,p1,p2,p3,p4	ref	b	b	5	const	76	Using where
@@ -2796,17 +2820,17 @@ id	select_type	table	partitions	type	pos
 explain partitions select * from t1 
 where a >= 18446744073709551000-1 and a <= 18446744073709551000+1;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p3,p4	ALL	NULL	NULL	NULL	NULL	4	Using where
+1	SIMPLE	t1	p3,p4	ALL	NULL	NULL	NULL	NULL	3	Using where
 explain partitions select * from t1 
 where a between 18446744073709551001 and 18446744073709551002;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p4	ALL	NULL	NULL	NULL	NULL	4	Using where
+1	SIMPLE	t1	p4	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t1 where a = 18446744073709551000;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p4	ALL	NULL	NULL	NULL	NULL	4	Using where
+1	SIMPLE	t1	p4	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t1 where a = 18446744073709551613;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p4	ALL	NULL	NULL	NULL	NULL	4	Using where
+1	SIMPLE	t1	p4	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t1 where a = 18446744073709551614;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Impossible WHERE noticed after reading const tables
@@ -2833,10 +2857,10 @@ id	select_type	table	partitions	type	pos
 1	SIMPLE	t2	p0	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t1 where a=0xFE;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p2	ALL	NULL	NULL	NULL	NULL	4	Using where
+1	SIMPLE	t1	p2	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t2 where a=0xFE;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t2	p2	ALL	NULL	NULL	NULL	NULL	4	Using where
+1	SIMPLE	t2	p2	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t1 where a > 0xFE AND a <= 0xFF;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Impossible WHERE noticed after reading const tables
@@ -2845,22 +2869,22 @@ id	select_type	table	partitions	type	pos
 1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Impossible WHERE noticed after reading const tables
 explain partitions select * from t1 where a >= 0xFE AND a <= 0xFF;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p2	ALL	NULL	NULL	NULL	NULL	4	Using where
+1	SIMPLE	t1	p2	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t2 where a >= 0xFE AND a <= 0xFF;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t2	p2	ALL	NULL	NULL	NULL	NULL	4	Using where
+1	SIMPLE	t2	p2	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t1 where a < 64 AND a >= 63;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0	ALL	NULL	NULL	NULL	NULL	4	Using where
+1	SIMPLE	t1	p0	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t2 where a < 64 AND a >= 63;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t2	p0	ALL	NULL	NULL	NULL	NULL	4	Using where
+1	SIMPLE	t2	p0	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t1 where a <= 64 AND a >= 63;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0,p1	ALL	NULL	NULL	NULL	NULL	6	Using where
+1	SIMPLE	t1	p0,p1	ALL	NULL	NULL	NULL	NULL	4	Using where
 explain partitions select * from t2 where a <= 64 AND a >= 63;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t2	p0,p1	ALL	NULL	NULL	NULL	NULL	6	Using where
+1	SIMPLE	t2	p0,p1	ALL	NULL	NULL	NULL	NULL	4	Using where
 drop table t1;
 drop table t2;
 create table t1(a bigint unsigned not null) partition by range(a+0) (

=== modified file 'mysql-test/r/partition_range.result'
--- a/mysql-test/r/partition_range.result	2010-08-11 12:13:59 +0000
+++ b/mysql-test/r/partition_range.result	2010-08-27 08:43:51 +0000
@@ -73,13 +73,13 @@ id	select_type	table	partitions	type	pos
 1	SIMPLE	t1	pnull	system	NULL	NULL	NULL	NULL	1	
 explain partitions select * from t1 where a >= 0;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0,p1	ALL	NULL	NULL	NULL	NULL	3	Using where
+1	SIMPLE	t1	p0,p1	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t1 where a < 0;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Impossible WHERE noticed after reading const tables
 explain partitions select * from t1 where a <= 0;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	pnull,p0	ALL	NULL	NULL	NULL	NULL	3	Using where
+1	SIMPLE	t1	pnull,p0	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t1 where a > 1;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Impossible WHERE noticed after reading const tables
@@ -112,16 +112,16 @@ select * from t1 where a > 1;
 a	b
 explain partitions select * from t1 where a is null;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	pnull_pnullsp0,pnull_pnullsp1	ALL	NULL	NULL	NULL	NULL	6	Using where
+1	SIMPLE	t1	pnull_pnullsp0,pnull_pnullsp1	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t1 where a >= 0;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0_p0sp0,p0_p0sp1,p1_p1sp0,p1_p1sp1	ALL	NULL	NULL	NULL	NULL	6	Using where
+1	SIMPLE	t1	p0_p0sp0,p0_p0sp1,p1_p1sp0,p1_p1sp1	ALL	NULL	NULL	NULL	NULL	4	Using where
 explain partitions select * from t1 where a < 0;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	pnull_pnullsp0,pnull_pnullsp1	ALL	NULL	NULL	NULL	NULL	6	Using where
+1	SIMPLE	t1	pnull_pnullsp0,pnull_pnullsp1	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t1 where a <= 0;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	pnull_pnullsp0,pnull_pnullsp1,p0_p0sp0,p0_p0sp1	ALL	NULL	NULL	NULL	NULL	6	Using where
+1	SIMPLE	t1	pnull_pnullsp0,pnull_pnullsp1,p0_p0sp0,p0_p0sp1	ALL	NULL	NULL	NULL	NULL	4	Using where
 explain partitions select * from t1 where a > 1;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Impossible WHERE noticed after reading const tables

=== modified file 'mysql-test/r/ps.result'
--- a/mysql-test/r/ps.result	2010-07-08 18:46:26 +0000
+++ b/mysql-test/r/ps.result	2010-10-04 08:51:26 +0000
@@ -3001,4 +3001,42 @@ EXECUTE stmt;
 1
 DEALLOCATE PREPARE stmt;
 DROP TABLE t1;
+#
+# Bug#54494 crash with explain extended and prepared statements
+#
+CREATE TABLE t1(a INT);
+INSERT INTO t1 VALUES (1),(2);
+PREPARE stmt FROM 'EXPLAIN EXTENDED SELECT 1 FROM t1 RIGHT JOIN t1 t2 ON 1';
+EXECUTE stmt;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
+1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	2	100.00	
+1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	2	100.00	
+Warnings:
+Note	1003	select 1 AS `1` from `test`.`t1` `t2` left join `test`.`t1` on(1) where 1
+EXECUTE stmt;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
+1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	2	100.00	
+1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	2	100.00	
+Warnings:
+Note	1003	select 1 AS `1` from `test`.`t1` `t2` left join `test`.`t1` on(1) where 1
+DEALLOCATE PREPARE stmt;
+DROP TABLE t1;
+#
+# Bug#54488 crash when using explain and prepared statements with subqueries
+#
+CREATE TABLE t1(f1 INT);
+INSERT INTO t1 VALUES (1),(1);
+PREPARE stmt FROM 'EXPLAIN SELECT 1 FROM t1 WHERE (SELECT (SELECT 1 FROM t1 GROUP BY f1))';
+EXECUTE stmt;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	t1	ALL	NULL	NULL	NULL	NULL	2	
+2	SUBQUERY	NULL	NULL	NULL	NULL	NULL	NULL	NULL	No tables used
+3	SUBQUERY	t1	ALL	NULL	NULL	NULL	NULL	2	Using temporary; Using filesort
+EXECUTE stmt;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	t1	ALL	NULL	NULL	NULL	NULL	2	
+2	SUBQUERY	NULL	NULL	NULL	NULL	NULL	NULL	NULL	No tables used
+3	SUBQUERY	t1	ALL	NULL	NULL	NULL	NULL	2	Using temporary; Using filesort
+DEALLOCATE PREPARE stmt;
+DROP TABLE t1;
 End of 5.1 tests.

=== modified file 'mysql-test/r/ps_2myisam.result'
--- a/mysql-test/r/ps_2myisam.result	2009-06-29 21:03:30 +0000
+++ b/mysql-test/r/ps_2myisam.result	2010-11-23 21:39:59 +0000
@@ -1929,26 +1929,26 @@ def					@arg09	5	23	1	Y	32896	31	63
 def					@arg10	5	23	1	Y	32896	31	63
 def					@arg11	246	83	6	Y	128	30	63
 def					@arg12	246	83	6	Y	128	30	63
-def					@arg13	251	16777216	10	Y	128	31	63
-def					@arg14	251	16777216	19	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	8	Y	128	31	63
+def					@arg13	250	16777215	10	Y	128	31	63
+def					@arg14	250	16777215	19	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	8	Y	128	31	63
 def					@arg17	8	20	4	Y	32928	0	63
 def					@arg18	8	20	1	Y	32896	0	63
 def					@arg19	8	20	1	Y	32896	0	63
-def					@arg20	251	16777216	1	Y	0	31	8
-def					@arg21	251	16777216	10	Y	0	31	8
-def					@arg22	251	16777216	30	Y	0	31	8
-def					@arg23	251	16777216	8	Y	128	31	63
-def					@arg24	251	16777216	8	Y	0	31	8
-def					@arg25	251	16777216	4	Y	128	31	63
-def					@arg26	251	16777216	4	Y	0	31	8
-def					@arg27	251	16777216	10	Y	128	31	63
-def					@arg28	251	16777216	10	Y	0	31	8
-def					@arg29	251	16777216	8	Y	128	31	63
-def					@arg30	251	16777216	8	Y	0	31	8
-def					@arg31	251	16777216	3	Y	0	31	8
-def					@arg32	251	16777216	6	Y	0	31	8
+def					@arg20	250	16777215	1	Y	0	31	8
+def					@arg21	250	16777215	10	Y	0	31	8
+def					@arg22	250	16777215	30	Y	0	31	8
+def					@arg23	250	16777215	8	Y	128	31	63
+def					@arg24	250	16777215	8	Y	0	31	8
+def					@arg25	250	16777215	4	Y	128	31	63
+def					@arg26	250	16777215	4	Y	0	31	8
+def					@arg27	250	16777215	10	Y	128	31	63
+def					@arg28	250	16777215	10	Y	0	31	8
+def					@arg29	250	16777215	8	Y	128	31	63
+def					@arg30	250	16777215	8	Y	0	31	8
+def					@arg31	250	16777215	3	Y	0	31	8
+def					@arg32	250	16777215	6	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 1	1	1	1	1	1	1	1	1	1	1.0000	1.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29 11:11:11	11:11:11	2004	1	1	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	one	monday
 select @arg01:=  c1, @arg02:=  c2, @arg03:=  c3, @arg04:=  c4,
@@ -1976,26 +1976,26 @@ def					@arg09	5	23	0	Y	32896	31	63
 def					@arg10	5	23	0	Y	32896	31	63
 def					@arg11	246	83	0	Y	128	30	63
 def					@arg12	246	83	0	Y	128	30	63
-def					@arg13	251	16777216	0	Y	128	31	63
-def					@arg14	251	16777216	0	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	0	Y	128	31	63
+def					@arg13	250	16777215	0	Y	128	31	63
+def					@arg14	250	16777215	0	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	0	Y	128	31	63
 def					@arg17	8	20	0	Y	32928	0	63
 def					@arg18	8	20	0	Y	32896	0	63
 def					@arg19	8	20	0	Y	32896	0	63
-def					@arg20	251	16777216	0	Y	0	31	8
-def					@arg21	251	16777216	0	Y	0	31	8
-def					@arg22	251	16777216	0	Y	0	31	8
-def					@arg23	251	16777216	0	Y	128	31	63
-def					@arg24	251	16777216	0	Y	0	31	8
-def					@arg25	251	16777216	0	Y	128	31	63
-def					@arg26	251	16777216	0	Y	0	31	8
-def					@arg27	251	16777216	0	Y	128	31	63
-def					@arg28	251	16777216	0	Y	0	31	8
-def					@arg29	251	16777216	0	Y	128	31	63
-def					@arg30	251	16777216	0	Y	0	31	8
-def					@arg31	251	16777216	0	Y	0	31	8
-def					@arg32	251	16777216	0	Y	0	31	8
+def					@arg20	250	16777215	0	Y	0	31	8
+def					@arg21	250	16777215	0	Y	0	31	8
+def					@arg22	250	16777215	0	Y	0	31	8
+def					@arg23	250	16777215	0	Y	128	31	63
+def					@arg24	250	16777215	0	Y	0	31	8
+def					@arg25	250	16777215	0	Y	128	31	63
+def					@arg26	250	16777215	0	Y	0	31	8
+def					@arg27	250	16777215	0	Y	128	31	63
+def					@arg28	250	16777215	0	Y	0	31	8
+def					@arg29	250	16777215	0	Y	128	31	63
+def					@arg30	250	16777215	0	Y	0	31	8
+def					@arg31	250	16777215	0	Y	0	31	8
+def					@arg32	250	16777215	0	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	1991-01-01 01:01:01	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
 prepare stmt1 from "select 
@@ -2026,26 +2026,26 @@ def					@arg09	5	23	1	Y	32896	31	63
 def					@arg10	5	23	1	Y	32896	31	63
 def					@arg11	246	83	6	Y	128	30	63
 def					@arg12	246	83	6	Y	128	30	63
-def					@arg13	251	16777216	10	Y	128	31	63
-def					@arg14	251	16777216	19	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	8	Y	128	31	63
+def					@arg13	250	16777215	10	Y	128	31	63
+def					@arg14	250	16777215	19	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	8	Y	128	31	63
 def					@arg17	8	20	4	Y	32928	0	63
 def					@arg18	8	20	1	Y	32896	0	63
 def					@arg19	8	20	1	Y	32896	0	63
-def					@arg20	251	16777216	1	Y	0	31	8
-def					@arg21	251	16777216	10	Y	0	31	8
-def					@arg22	251	16777216	30	Y	0	31	8
-def					@arg23	251	16777216	8	Y	128	31	63
-def					@arg24	251	16777216	8	Y	0	31	8
-def					@arg25	251	16777216	4	Y	128	31	63
-def					@arg26	251	16777216	4	Y	0	31	8
-def					@arg27	251	16777216	10	Y	128	31	63
-def					@arg28	251	16777216	10	Y	0	31	8
-def					@arg29	251	16777216	8	Y	128	31	63
-def					@arg30	251	16777216	8	Y	0	31	8
-def					@arg31	251	16777216	3	Y	0	31	8
-def					@arg32	251	16777216	6	Y	0	31	8
+def					@arg20	250	16777215	1	Y	0	31	8
+def					@arg21	250	16777215	10	Y	0	31	8
+def					@arg22	250	16777215	30	Y	0	31	8
+def					@arg23	250	16777215	8	Y	128	31	63
+def					@arg24	250	16777215	8	Y	0	31	8
+def					@arg25	250	16777215	4	Y	128	31	63
+def					@arg26	250	16777215	4	Y	0	31	8
+def					@arg27	250	16777215	10	Y	128	31	63
+def					@arg28	250	16777215	10	Y	0	31	8
+def					@arg29	250	16777215	8	Y	128	31	63
+def					@arg30	250	16777215	8	Y	0	31	8
+def					@arg31	250	16777215	3	Y	0	31	8
+def					@arg32	250	16777215	6	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 1	1	1	1	1	1	1	1	1	1	1.0000	1.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29 11:11:11	11:11:11	2004	1	1	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	one	monday
 set @my_key= 0 ;
@@ -2066,26 +2066,26 @@ def					@arg09	5	23	0	Y	32896	31	63
 def					@arg10	5	23	0	Y	32896	31	63
 def					@arg11	246	83	0	Y	128	30	63
 def					@arg12	246	83	0	Y	128	30	63
-def					@arg13	251	16777216	0	Y	128	31	63
-def					@arg14	251	16777216	0	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	0	Y	128	31	63
+def					@arg13	250	16777215	0	Y	128	31	63
+def					@arg14	250	16777215	0	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	0	Y	128	31	63
 def					@arg17	8	20	0	Y	32928	0	63
 def					@arg18	8	20	0	Y	32896	0	63
 def					@arg19	8	20	0	Y	32896	0	63
-def					@arg20	251	16777216	0	Y	0	31	8
-def					@arg21	251	16777216	0	Y	0	31	8
-def					@arg22	251	16777216	0	Y	0	31	8
-def					@arg23	251	16777216	0	Y	128	31	63
-def					@arg24	251	16777216	0	Y	0	31	8
-def					@arg25	251	16777216	0	Y	128	31	63
-def					@arg26	251	16777216	0	Y	0	31	8
-def					@arg27	251	16777216	0	Y	128	31	63
-def					@arg28	251	16777216	0	Y	0	31	8
-def					@arg29	251	16777216	0	Y	128	31	63
-def					@arg30	251	16777216	0	Y	0	31	8
-def					@arg31	251	16777216	0	Y	0	31	8
-def					@arg32	251	16777216	0	Y	0	31	8
+def					@arg20	250	16777215	0	Y	0	31	8
+def					@arg21	250	16777215	0	Y	0	31	8
+def					@arg22	250	16777215	0	Y	0	31	8
+def					@arg23	250	16777215	0	Y	128	31	63
+def					@arg24	250	16777215	0	Y	0	31	8
+def					@arg25	250	16777215	0	Y	128	31	63
+def					@arg26	250	16777215	0	Y	0	31	8
+def					@arg27	250	16777215	0	Y	128	31	63
+def					@arg28	250	16777215	0	Y	0	31	8
+def					@arg29	250	16777215	0	Y	128	31	63
+def					@arg30	250	16777215	0	Y	0	31	8
+def					@arg31	250	16777215	0	Y	0	31	8
+def					@arg32	250	16777215	0	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	1991-01-01 01:01:01	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
 prepare stmt1 from "select ? := c1 from t9 where c1= 1" ;
@@ -2114,26 +2114,26 @@ def					@arg09	5	23	1	Y	32896	31	63
 def					@arg10	5	23	1	Y	32896	31	63
 def					@arg11	246	83	6	Y	128	30	63
 def					@arg12	246	83	6	Y	128	30	63
-def					@arg13	251	16777216	10	Y	128	31	63
-def					@arg14	251	16777216	19	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	8	Y	128	31	63
+def					@arg13	250	16777215	10	Y	128	31	63
+def					@arg14	250	16777215	19	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	8	Y	128	31	63
 def					@arg17	8	20	4	Y	32928	0	63
 def					@arg18	8	20	1	Y	32896	0	63
 def					@arg19	8	20	1	Y	32896	0	63
-def					@arg20	251	16777216	1	Y	0	31	8
-def					@arg21	251	16777216	10	Y	0	31	8
-def					@arg22	251	16777216	30	Y	0	31	8
-def					@arg23	251	16777216	8	Y	128	31	63
-def					@arg24	251	16777216	8	Y	0	31	8
-def					@arg25	251	16777216	4	Y	128	31	63
-def					@arg26	251	16777216	4	Y	0	31	8
-def					@arg27	251	16777216	10	Y	128	31	63
-def					@arg28	251	16777216	10	Y	0	31	8
-def					@arg29	251	16777216	8	Y	128	31	63
-def					@arg30	251	16777216	8	Y	0	31	8
-def					@arg31	251	16777216	3	Y	0	31	8
-def					@arg32	251	16777216	6	Y	0	31	8
+def					@arg20	250	16777215	1	Y	0	31	8
+def					@arg21	250	16777215	10	Y	0	31	8
+def					@arg22	250	16777215	30	Y	0	31	8
+def					@arg23	250	16777215	8	Y	128	31	63
+def					@arg24	250	16777215	8	Y	0	31	8
+def					@arg25	250	16777215	4	Y	128	31	63
+def					@arg26	250	16777215	4	Y	0	31	8
+def					@arg27	250	16777215	10	Y	128	31	63
+def					@arg28	250	16777215	10	Y	0	31	8
+def					@arg29	250	16777215	8	Y	128	31	63
+def					@arg30	250	16777215	8	Y	0	31	8
+def					@arg31	250	16777215	3	Y	0	31	8
+def					@arg32	250	16777215	6	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 1	1	1	1	1	1	1	1	1	1	1.0000	1.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29 11:11:11	11:11:11	2004	1	1	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	one	monday
 select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
@@ -2158,26 +2158,26 @@ def					@arg09	5	23	0	Y	32896	31	63
 def					@arg10	5	23	0	Y	32896	31	63
 def					@arg11	246	83	0	Y	128	30	63
 def					@arg12	246	83	0	Y	128	30	63
-def					@arg13	251	16777216	0	Y	128	31	63
-def					@arg14	251	16777216	0	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	0	Y	128	31	63
+def					@arg13	250	16777215	0	Y	128	31	63
+def					@arg14	250	16777215	0	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	0	Y	128	31	63
 def					@arg17	8	20	0	Y	32928	0	63
 def					@arg18	8	20	0	Y	32896	0	63
 def					@arg19	8	20	0	Y	32896	0	63
-def					@arg20	251	16777216	0	Y	0	31	8
-def					@arg21	251	16777216	0	Y	0	31	8
-def					@arg22	251	16777216	0	Y	0	31	8
-def					@arg23	251	16777216	0	Y	128	31	63
-def					@arg24	251	16777216	0	Y	0	31	8
-def					@arg25	251	16777216	0	Y	128	31	63
-def					@arg26	251	16777216	0	Y	0	31	8
-def					@arg27	251	16777216	0	Y	128	31	63
-def					@arg28	251	16777216	0	Y	0	31	8
-def					@arg29	251	16777216	0	Y	128	31	63
-def					@arg30	251	16777216	0	Y	0	31	8
-def					@arg31	251	16777216	0	Y	0	31	8
-def					@arg32	251	16777216	0	Y	0	31	8
+def					@arg20	250	16777215	0	Y	0	31	8
+def					@arg21	250	16777215	0	Y	0	31	8
+def					@arg22	250	16777215	0	Y	0	31	8
+def					@arg23	250	16777215	0	Y	128	31	63
+def					@arg24	250	16777215	0	Y	0	31	8
+def					@arg25	250	16777215	0	Y	128	31	63
+def					@arg26	250	16777215	0	Y	0	31	8
+def					@arg27	250	16777215	0	Y	128	31	63
+def					@arg28	250	16777215	0	Y	0	31	8
+def					@arg29	250	16777215	0	Y	128	31	63
+def					@arg30	250	16777215	0	Y	0	31	8
+def					@arg31	250	16777215	0	Y	0	31	8
+def					@arg32	250	16777215	0	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	1991-01-01 01:01:01	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
 prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
@@ -2204,26 +2204,26 @@ def					@arg09	5	23	1	Y	32896	31	63
 def					@arg10	5	23	1	Y	32896	31	63
 def					@arg11	246	83	6	Y	128	30	63
 def					@arg12	246	83	6	Y	128	30	63
-def					@arg13	251	16777216	10	Y	128	31	63
-def					@arg14	251	16777216	19	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	8	Y	128	31	63
+def					@arg13	250	16777215	10	Y	128	31	63
+def					@arg14	250	16777215	19	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	8	Y	128	31	63
 def					@arg17	8	20	4	Y	32928	0	63
 def					@arg18	8	20	1	Y	32896	0	63
 def					@arg19	8	20	1	Y	32896	0	63
-def					@arg20	251	16777216	1	Y	0	31	8
-def					@arg21	251	16777216	10	Y	0	31	8
-def					@arg22	251	16777216	30	Y	0	31	8
-def					@arg23	251	16777216	8	Y	128	31	63
-def					@arg24	251	16777216	8	Y	0	31	8
-def					@arg25	251	16777216	4	Y	128	31	63
-def					@arg26	251	16777216	4	Y	0	31	8
-def					@arg27	251	16777216	10	Y	128	31	63
-def					@arg28	251	16777216	10	Y	0	31	8
-def					@arg29	251	16777216	8	Y	128	31	63
-def					@arg30	251	16777216	8	Y	0	31	8
-def					@arg31	251	16777216	3	Y	0	31	8
-def					@arg32	251	16777216	6	Y	0	31	8
+def					@arg20	250	16777215	1	Y	0	31	8
+def					@arg21	250	16777215	10	Y	0	31	8
+def					@arg22	250	16777215	30	Y	0	31	8
+def					@arg23	250	16777215	8	Y	128	31	63
+def					@arg24	250	16777215	8	Y	0	31	8
+def					@arg25	250	16777215	4	Y	128	31	63
+def					@arg26	250	16777215	4	Y	0	31	8
+def					@arg27	250	16777215	10	Y	128	31	63
+def					@arg28	250	16777215	10	Y	0	31	8
+def					@arg29	250	16777215	8	Y	128	31	63
+def					@arg30	250	16777215	8	Y	0	31	8
+def					@arg31	250	16777215	3	Y	0	31	8
+def					@arg32	250	16777215	6	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 1	1	1	1	1	1	1	1	1	1	1.0000	1.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29 11:11:11	11:11:11	2004	1	1	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	one	monday
 set @my_key= 0 ;
@@ -2242,26 +2242,26 @@ def					@arg09	5	23	0	Y	32896	31	63
 def					@arg10	5	23	0	Y	32896	31	63
 def					@arg11	246	83	0	Y	128	30	63
 def					@arg12	246	83	0	Y	128	30	63
-def					@arg13	251	16777216	0	Y	128	31	63
-def					@arg14	251	16777216	0	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	0	Y	128	31	63
+def					@arg13	250	16777215	0	Y	128	31	63
+def					@arg14	250	16777215	0	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	0	Y	128	31	63
 def					@arg17	8	20	0	Y	32928	0	63
 def					@arg18	8	20	0	Y	32896	0	63
 def					@arg19	8	20	0	Y	32896	0	63
-def					@arg20	251	16777216	0	Y	0	31	8
-def					@arg21	251	16777216	0	Y	0	31	8
-def					@arg22	251	16777216	0	Y	0	31	8
-def					@arg23	251	16777216	0	Y	128	31	63
-def					@arg24	251	16777216	0	Y	0	31	8
-def					@arg25	251	16777216	0	Y	128	31	63
-def					@arg26	251	16777216	0	Y	0	31	8
-def					@arg27	251	16777216	0	Y	128	31	63
-def					@arg28	251	16777216	0	Y	0	31	8
-def					@arg29	251	16777216	0	Y	128	31	63
-def					@arg30	251	16777216	0	Y	0	31	8
-def					@arg31	251	16777216	0	Y	0	31	8
-def					@arg32	251	16777216	0	Y	0	31	8
+def					@arg20	250	16777215	0	Y	0	31	8
+def					@arg21	250	16777215	0	Y	0	31	8
+def					@arg22	250	16777215	0	Y	0	31	8
+def					@arg23	250	16777215	0	Y	128	31	63
+def					@arg24	250	16777215	0	Y	0	31	8
+def					@arg25	250	16777215	0	Y	128	31	63
+def					@arg26	250	16777215	0	Y	0	31	8
+def					@arg27	250	16777215	0	Y	128	31	63
+def					@arg28	250	16777215	0	Y	0	31	8
+def					@arg29	250	16777215	0	Y	128	31	63
+def					@arg30	250	16777215	0	Y	0	31	8
+def					@arg31	250	16777215	0	Y	0	31	8
+def					@arg32	250	16777215	0	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	1991-01-01 01:01:01	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
 prepare stmt1 from "select c1 into ? from t9 where c1= 1" ;

=== modified file 'mysql-test/r/ps_3innodb.result'
--- a/mysql-test/r/ps_3innodb.result	2009-06-29 21:03:30 +0000
+++ b/mysql-test/r/ps_3innodb.result	2010-11-23 21:39:59 +0000
@@ -1912,26 +1912,26 @@ def					@arg09	5	23	1	Y	32896	31	63
 def					@arg10	5	23	1	Y	32896	31	63
 def					@arg11	246	83	6	Y	128	30	63
 def					@arg12	246	83	6	Y	128	30	63
-def					@arg13	251	16777216	10	Y	128	31	63
-def					@arg14	251	16777216	19	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	8	Y	128	31	63
+def					@arg13	250	16777215	10	Y	128	31	63
+def					@arg14	250	16777215	19	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	8	Y	128	31	63
 def					@arg17	8	20	4	Y	32928	0	63
 def					@arg18	8	20	1	Y	32896	0	63
 def					@arg19	8	20	1	Y	32896	0	63
-def					@arg20	251	16777216	1	Y	0	31	8
-def					@arg21	251	16777216	10	Y	0	31	8
-def					@arg22	251	16777216	30	Y	0	31	8
-def					@arg23	251	16777216	8	Y	128	31	63
-def					@arg24	251	16777216	8	Y	0	31	8
-def					@arg25	251	16777216	4	Y	128	31	63
-def					@arg26	251	16777216	4	Y	0	31	8
-def					@arg27	251	16777216	10	Y	128	31	63
-def					@arg28	251	16777216	10	Y	0	31	8
-def					@arg29	251	16777216	8	Y	128	31	63
-def					@arg30	251	16777216	8	Y	0	31	8
-def					@arg31	251	16777216	3	Y	0	31	8
-def					@arg32	251	16777216	6	Y	0	31	8
+def					@arg20	250	16777215	1	Y	0	31	8
+def					@arg21	250	16777215	10	Y	0	31	8
+def					@arg22	250	16777215	30	Y	0	31	8
+def					@arg23	250	16777215	8	Y	128	31	63
+def					@arg24	250	16777215	8	Y	0	31	8
+def					@arg25	250	16777215	4	Y	128	31	63
+def					@arg26	250	16777215	4	Y	0	31	8
+def					@arg27	250	16777215	10	Y	128	31	63
+def					@arg28	250	16777215	10	Y	0	31	8
+def					@arg29	250	16777215	8	Y	128	31	63
+def					@arg30	250	16777215	8	Y	0	31	8
+def					@arg31	250	16777215	3	Y	0	31	8
+def					@arg32	250	16777215	6	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 1	1	1	1	1	1	1	1	1	1	1.0000	1.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29 11:11:11	11:11:11	2004	1	1	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	one	monday
 select @arg01:=  c1, @arg02:=  c2, @arg03:=  c3, @arg04:=  c4,
@@ -1959,26 +1959,26 @@ def					@arg09	5	23	0	Y	32896	31	63
 def					@arg10	5	23	0	Y	32896	31	63
 def					@arg11	246	83	0	Y	128	30	63
 def					@arg12	246	83	0	Y	128	30	63
-def					@arg13	251	16777216	0	Y	128	31	63
-def					@arg14	251	16777216	0	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	0	Y	128	31	63
+def					@arg13	250	16777215	0	Y	128	31	63
+def					@arg14	250	16777215	0	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	0	Y	128	31	63
 def					@arg17	8	20	0	Y	32928	0	63
 def					@arg18	8	20	0	Y	32896	0	63
 def					@arg19	8	20	0	Y	32896	0	63
-def					@arg20	251	16777216	0	Y	0	31	8
-def					@arg21	251	16777216	0	Y	0	31	8
-def					@arg22	251	16777216	0	Y	0	31	8
-def					@arg23	251	16777216	0	Y	128	31	63
-def					@arg24	251	16777216	0	Y	0	31	8
-def					@arg25	251	16777216	0	Y	128	31	63
-def					@arg26	251	16777216	0	Y	0	31	8
-def					@arg27	251	16777216	0	Y	128	31	63
-def					@arg28	251	16777216	0	Y	0	31	8
-def					@arg29	251	16777216	0	Y	128	31	63
-def					@arg30	251	16777216	0	Y	0	31	8
-def					@arg31	251	16777216	0	Y	0	31	8
-def					@arg32	251	16777216	0	Y	0	31	8
+def					@arg20	250	16777215	0	Y	0	31	8
+def					@arg21	250	16777215	0	Y	0	31	8
+def					@arg22	250	16777215	0	Y	0	31	8
+def					@arg23	250	16777215	0	Y	128	31	63
+def					@arg24	250	16777215	0	Y	0	31	8
+def					@arg25	250	16777215	0	Y	128	31	63
+def					@arg26	250	16777215	0	Y	0	31	8
+def					@arg27	250	16777215	0	Y	128	31	63
+def					@arg28	250	16777215	0	Y	0	31	8
+def					@arg29	250	16777215	0	Y	128	31	63
+def					@arg30	250	16777215	0	Y	0	31	8
+def					@arg31	250	16777215	0	Y	0	31	8
+def					@arg32	250	16777215	0	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	1991-01-01 01:01:01	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
 prepare stmt1 from "select 
@@ -2009,26 +2009,26 @@ def					@arg09	5	23	1	Y	32896	31	63
 def					@arg10	5	23	1	Y	32896	31	63
 def					@arg11	246	83	6	Y	128	30	63
 def					@arg12	246	83	6	Y	128	30	63
-def					@arg13	251	16777216	10	Y	128	31	63
-def					@arg14	251	16777216	19	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	8	Y	128	31	63
+def					@arg13	250	16777215	10	Y	128	31	63
+def					@arg14	250	16777215	19	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	8	Y	128	31	63
 def					@arg17	8	20	4	Y	32928	0	63
 def					@arg18	8	20	1	Y	32896	0	63
 def					@arg19	8	20	1	Y	32896	0	63
-def					@arg20	251	16777216	1	Y	0	31	8
-def					@arg21	251	16777216	10	Y	0	31	8
-def					@arg22	251	16777216	30	Y	0	31	8
-def					@arg23	251	16777216	8	Y	128	31	63
-def					@arg24	251	16777216	8	Y	0	31	8
-def					@arg25	251	16777216	4	Y	128	31	63
-def					@arg26	251	16777216	4	Y	0	31	8
-def					@arg27	251	16777216	10	Y	128	31	63
-def					@arg28	251	16777216	10	Y	0	31	8
-def					@arg29	251	16777216	8	Y	128	31	63
-def					@arg30	251	16777216	8	Y	0	31	8
-def					@arg31	251	16777216	3	Y	0	31	8
-def					@arg32	251	16777216	6	Y	0	31	8
+def					@arg20	250	16777215	1	Y	0	31	8
+def					@arg21	250	16777215	10	Y	0	31	8
+def					@arg22	250	16777215	30	Y	0	31	8
+def					@arg23	250	16777215	8	Y	128	31	63
+def					@arg24	250	16777215	8	Y	0	31	8
+def					@arg25	250	16777215	4	Y	128	31	63
+def					@arg26	250	16777215	4	Y	0	31	8
+def					@arg27	250	16777215	10	Y	128	31	63
+def					@arg28	250	16777215	10	Y	0	31	8
+def					@arg29	250	16777215	8	Y	128	31	63
+def					@arg30	250	16777215	8	Y	0	31	8
+def					@arg31	250	16777215	3	Y	0	31	8
+def					@arg32	250	16777215	6	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 1	1	1	1	1	1	1	1	1	1	1.0000	1.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29 11:11:11	11:11:11	2004	1	1	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	one	monday
 set @my_key= 0 ;
@@ -2049,26 +2049,26 @@ def					@arg09	5	23	0	Y	32896	31	63
 def					@arg10	5	23	0	Y	32896	31	63
 def					@arg11	246	83	0	Y	128	30	63
 def					@arg12	246	83	0	Y	128	30	63
-def					@arg13	251	16777216	0	Y	128	31	63
-def					@arg14	251	16777216	0	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	0	Y	128	31	63
+def					@arg13	250	16777215	0	Y	128	31	63
+def					@arg14	250	16777215	0	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	0	Y	128	31	63
 def					@arg17	8	20	0	Y	32928	0	63
 def					@arg18	8	20	0	Y	32896	0	63
 def					@arg19	8	20	0	Y	32896	0	63
-def					@arg20	251	16777216	0	Y	0	31	8
-def					@arg21	251	16777216	0	Y	0	31	8
-def					@arg22	251	16777216	0	Y	0	31	8
-def					@arg23	251	16777216	0	Y	128	31	63
-def					@arg24	251	16777216	0	Y	0	31	8
-def					@arg25	251	16777216	0	Y	128	31	63
-def					@arg26	251	16777216	0	Y	0	31	8
-def					@arg27	251	16777216	0	Y	128	31	63
-def					@arg28	251	16777216	0	Y	0	31	8
-def					@arg29	251	16777216	0	Y	128	31	63
-def					@arg30	251	16777216	0	Y	0	31	8
-def					@arg31	251	16777216	0	Y	0	31	8
-def					@arg32	251	16777216	0	Y	0	31	8
+def					@arg20	250	16777215	0	Y	0	31	8
+def					@arg21	250	16777215	0	Y	0	31	8
+def					@arg22	250	16777215	0	Y	0	31	8
+def					@arg23	250	16777215	0	Y	128	31	63
+def					@arg24	250	16777215	0	Y	0	31	8
+def					@arg25	250	16777215	0	Y	128	31	63
+def					@arg26	250	16777215	0	Y	0	31	8
+def					@arg27	250	16777215	0	Y	128	31	63
+def					@arg28	250	16777215	0	Y	0	31	8
+def					@arg29	250	16777215	0	Y	128	31	63
+def					@arg30	250	16777215	0	Y	0	31	8
+def					@arg31	250	16777215	0	Y	0	31	8
+def					@arg32	250	16777215	0	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	1991-01-01 01:01:01	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
 prepare stmt1 from "select ? := c1 from t9 where c1= 1" ;
@@ -2097,26 +2097,26 @@ def					@arg09	5	23	1	Y	32896	31	63
 def					@arg10	5	23	1	Y	32896	31	63
 def					@arg11	246	83	6	Y	128	30	63
 def					@arg12	246	83	6	Y	128	30	63
-def					@arg13	251	16777216	10	Y	128	31	63
-def					@arg14	251	16777216	19	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	8	Y	128	31	63
+def					@arg13	250	16777215	10	Y	128	31	63
+def					@arg14	250	16777215	19	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	8	Y	128	31	63
 def					@arg17	8	20	4	Y	32928	0	63
 def					@arg18	8	20	1	Y	32896	0	63
 def					@arg19	8	20	1	Y	32896	0	63
-def					@arg20	251	16777216	1	Y	0	31	8
-def					@arg21	251	16777216	10	Y	0	31	8
-def					@arg22	251	16777216	30	Y	0	31	8
-def					@arg23	251	16777216	8	Y	128	31	63
-def					@arg24	251	16777216	8	Y	0	31	8
-def					@arg25	251	16777216	4	Y	128	31	63
-def					@arg26	251	16777216	4	Y	0	31	8
-def					@arg27	251	16777216	10	Y	128	31	63
-def					@arg28	251	16777216	10	Y	0	31	8
-def					@arg29	251	16777216	8	Y	128	31	63
-def					@arg30	251	16777216	8	Y	0	31	8
-def					@arg31	251	16777216	3	Y	0	31	8
-def					@arg32	251	16777216	6	Y	0	31	8
+def					@arg20	250	16777215	1	Y	0	31	8
+def					@arg21	250	16777215	10	Y	0	31	8
+def					@arg22	250	16777215	30	Y	0	31	8
+def					@arg23	250	16777215	8	Y	128	31	63
+def					@arg24	250	16777215	8	Y	0	31	8
+def					@arg25	250	16777215	4	Y	128	31	63
+def					@arg26	250	16777215	4	Y	0	31	8
+def					@arg27	250	16777215	10	Y	128	31	63
+def					@arg28	250	16777215	10	Y	0	31	8
+def					@arg29	250	16777215	8	Y	128	31	63
+def					@arg30	250	16777215	8	Y	0	31	8
+def					@arg31	250	16777215	3	Y	0	31	8
+def					@arg32	250	16777215	6	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 1	1	1	1	1	1	1	1	1	1	1.0000	1.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29 11:11:11	11:11:11	2004	1	1	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	one	monday
 select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
@@ -2141,26 +2141,26 @@ def					@arg09	5	23	0	Y	32896	31	63
 def					@arg10	5	23	0	Y	32896	31	63
 def					@arg11	246	83	0	Y	128	30	63
 def					@arg12	246	83	0	Y	128	30	63
-def					@arg13	251	16777216	0	Y	128	31	63
-def					@arg14	251	16777216	0	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	0	Y	128	31	63
+def					@arg13	250	16777215	0	Y	128	31	63
+def					@arg14	250	16777215	0	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	0	Y	128	31	63
 def					@arg17	8	20	0	Y	32928	0	63
 def					@arg18	8	20	0	Y	32896	0	63
 def					@arg19	8	20	0	Y	32896	0	63
-def					@arg20	251	16777216	0	Y	0	31	8
-def					@arg21	251	16777216	0	Y	0	31	8
-def					@arg22	251	16777216	0	Y	0	31	8
-def					@arg23	251	16777216	0	Y	128	31	63
-def					@arg24	251	16777216	0	Y	0	31	8
-def					@arg25	251	16777216	0	Y	128	31	63
-def					@arg26	251	16777216	0	Y	0	31	8
-def					@arg27	251	16777216	0	Y	128	31	63
-def					@arg28	251	16777216	0	Y	0	31	8
-def					@arg29	251	16777216	0	Y	128	31	63
-def					@arg30	251	16777216	0	Y	0	31	8
-def					@arg31	251	16777216	0	Y	0	31	8
-def					@arg32	251	16777216	0	Y	0	31	8
+def					@arg20	250	16777215	0	Y	0	31	8
+def					@arg21	250	16777215	0	Y	0	31	8
+def					@arg22	250	16777215	0	Y	0	31	8
+def					@arg23	250	16777215	0	Y	128	31	63
+def					@arg24	250	16777215	0	Y	0	31	8
+def					@arg25	250	16777215	0	Y	128	31	63
+def					@arg26	250	16777215	0	Y	0	31	8
+def					@arg27	250	16777215	0	Y	128	31	63
+def					@arg28	250	16777215	0	Y	0	31	8
+def					@arg29	250	16777215	0	Y	128	31	63
+def					@arg30	250	16777215	0	Y	0	31	8
+def					@arg31	250	16777215	0	Y	0	31	8
+def					@arg32	250	16777215	0	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	1991-01-01 01:01:01	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
 prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
@@ -2187,26 +2187,26 @@ def					@arg09	5	23	1	Y	32896	31	63
 def					@arg10	5	23	1	Y	32896	31	63
 def					@arg11	246	83	6	Y	128	30	63
 def					@arg12	246	83	6	Y	128	30	63
-def					@arg13	251	16777216	10	Y	128	31	63
-def					@arg14	251	16777216	19	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	8	Y	128	31	63
+def					@arg13	250	16777215	10	Y	128	31	63
+def					@arg14	250	16777215	19	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	8	Y	128	31	63
 def					@arg17	8	20	4	Y	32928	0	63
 def					@arg18	8	20	1	Y	32896	0	63
 def					@arg19	8	20	1	Y	32896	0	63
-def					@arg20	251	16777216	1	Y	0	31	8
-def					@arg21	251	16777216	10	Y	0	31	8
-def					@arg22	251	16777216	30	Y	0	31	8
-def					@arg23	251	16777216	8	Y	128	31	63
-def					@arg24	251	16777216	8	Y	0	31	8
-def					@arg25	251	16777216	4	Y	128	31	63
-def					@arg26	251	16777216	4	Y	0	31	8
-def					@arg27	251	16777216	10	Y	128	31	63
-def					@arg28	251	16777216	10	Y	0	31	8
-def					@arg29	251	16777216	8	Y	128	31	63
-def					@arg30	251	16777216	8	Y	0	31	8
-def					@arg31	251	16777216	3	Y	0	31	8
-def					@arg32	251	16777216	6	Y	0	31	8
+def					@arg20	250	16777215	1	Y	0	31	8
+def					@arg21	250	16777215	10	Y	0	31	8
+def					@arg22	250	16777215	30	Y	0	31	8
+def					@arg23	250	16777215	8	Y	128	31	63
+def					@arg24	250	16777215	8	Y	0	31	8
+def					@arg25	250	16777215	4	Y	128	31	63
+def					@arg26	250	16777215	4	Y	0	31	8
+def					@arg27	250	16777215	10	Y	128	31	63
+def					@arg28	250	16777215	10	Y	0	31	8
+def					@arg29	250	16777215	8	Y	128	31	63
+def					@arg30	250	16777215	8	Y	0	31	8
+def					@arg31	250	16777215	3	Y	0	31	8
+def					@arg32	250	16777215	6	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 1	1	1	1	1	1	1	1	1	1	1.0000	1.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29 11:11:11	11:11:11	2004	1	1	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	one	monday
 set @my_key= 0 ;
@@ -2225,26 +2225,26 @@ def					@arg09	5	23	0	Y	32896	31	63
 def					@arg10	5	23	0	Y	32896	31	63
 def					@arg11	246	83	0	Y	128	30	63
 def					@arg12	246	83	0	Y	128	30	63
-def					@arg13	251	16777216	0	Y	128	31	63
-def					@arg14	251	16777216	0	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	0	Y	128	31	63
+def					@arg13	250	16777215	0	Y	128	31	63
+def					@arg14	250	16777215	0	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	0	Y	128	31	63
 def					@arg17	8	20	0	Y	32928	0	63
 def					@arg18	8	20	0	Y	32896	0	63
 def					@arg19	8	20	0	Y	32896	0	63
-def					@arg20	251	16777216	0	Y	0	31	8
-def					@arg21	251	16777216	0	Y	0	31	8
-def					@arg22	251	16777216	0	Y	0	31	8
-def					@arg23	251	16777216	0	Y	128	31	63
-def					@arg24	251	16777216	0	Y	0	31	8
-def					@arg25	251	16777216	0	Y	128	31	63
-def					@arg26	251	16777216	0	Y	0	31	8
-def					@arg27	251	16777216	0	Y	128	31	63
-def					@arg28	251	16777216	0	Y	0	31	8
-def					@arg29	251	16777216	0	Y	128	31	63
-def					@arg30	251	16777216	0	Y	0	31	8
-def					@arg31	251	16777216	0	Y	0	31	8
-def					@arg32	251	16777216	0	Y	0	31	8
+def					@arg20	250	16777215	0	Y	0	31	8
+def					@arg21	250	16777215	0	Y	0	31	8
+def					@arg22	250	16777215	0	Y	0	31	8
+def					@arg23	250	16777215	0	Y	128	31	63
+def					@arg24	250	16777215	0	Y	0	31	8
+def					@arg25	250	16777215	0	Y	128	31	63
+def					@arg26	250	16777215	0	Y	0	31	8
+def					@arg27	250	16777215	0	Y	128	31	63
+def					@arg28	250	16777215	0	Y	0	31	8
+def					@arg29	250	16777215	0	Y	128	31	63
+def					@arg30	250	16777215	0	Y	0	31	8
+def					@arg31	250	16777215	0	Y	0	31	8
+def					@arg32	250	16777215	0	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	1991-01-01 01:01:01	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
 prepare stmt1 from "select c1 into ? from t9 where c1= 1" ;

=== modified file 'mysql-test/r/ps_4heap.result'
--- a/mysql-test/r/ps_4heap.result	2009-06-29 21:03:30 +0000
+++ b/mysql-test/r/ps_4heap.result	2010-11-23 21:39:59 +0000
@@ -1913,26 +1913,26 @@ def					@arg09	5	23	1	Y	32896	31	63
 def					@arg10	5	23	1	Y	32896	31	63
 def					@arg11	246	83	6	Y	128	30	63
 def					@arg12	246	83	6	Y	128	30	63
-def					@arg13	251	16777216	10	Y	128	31	63
-def					@arg14	251	16777216	19	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	8	Y	128	31	63
+def					@arg13	250	16777215	10	Y	128	31	63
+def					@arg14	250	16777215	19	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	8	Y	128	31	63
 def					@arg17	8	20	4	Y	32928	0	63
 def					@arg18	8	20	1	Y	32896	0	63
 def					@arg19	8	20	1	Y	32896	0	63
-def					@arg20	251	16777216	1	Y	0	31	8
-def					@arg21	251	16777216	10	Y	0	31	8
-def					@arg22	251	16777216	30	Y	0	31	8
-def					@arg23	251	16777216	8	Y	0	31	8
-def					@arg24	251	16777216	8	Y	0	31	8
-def					@arg25	251	16777216	4	Y	0	31	8
-def					@arg26	251	16777216	4	Y	0	31	8
-def					@arg27	251	16777216	10	Y	0	31	8
-def					@arg28	251	16777216	10	Y	0	31	8
-def					@arg29	251	16777216	8	Y	0	31	8
-def					@arg30	251	16777216	8	Y	0	31	8
-def					@arg31	251	16777216	3	Y	0	31	8
-def					@arg32	251	16777216	6	Y	0	31	8
+def					@arg20	250	16777215	1	Y	0	31	8
+def					@arg21	250	16777215	10	Y	0	31	8
+def					@arg22	250	16777215	30	Y	0	31	8
+def					@arg23	250	16777215	8	Y	0	31	8
+def					@arg24	250	16777215	8	Y	0	31	8
+def					@arg25	250	16777215	4	Y	0	31	8
+def					@arg26	250	16777215	4	Y	0	31	8
+def					@arg27	250	16777215	10	Y	0	31	8
+def					@arg28	250	16777215	10	Y	0	31	8
+def					@arg29	250	16777215	8	Y	0	31	8
+def					@arg30	250	16777215	8	Y	0	31	8
+def					@arg31	250	16777215	3	Y	0	31	8
+def					@arg32	250	16777215	6	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 1	1	1	1	1	1	1	1	1	1	1.0000	1.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29 11:11:11	11:11:11	2004	1	1	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	one	monday
 select @arg01:=  c1, @arg02:=  c2, @arg03:=  c3, @arg04:=  c4,
@@ -1960,26 +1960,26 @@ def					@arg09	5	23	0	Y	32896	31	63
 def					@arg10	5	23	0	Y	32896	31	63
 def					@arg11	246	83	0	Y	128	30	63
 def					@arg12	246	83	0	Y	128	30	63
-def					@arg13	251	16777216	0	Y	128	31	63
-def					@arg14	251	16777216	0	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	0	Y	128	31	63
+def					@arg13	250	16777215	0	Y	128	31	63
+def					@arg14	250	16777215	0	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	0	Y	128	31	63
 def					@arg17	8	20	0	Y	32928	0	63
 def					@arg18	8	20	0	Y	32896	0	63
 def					@arg19	8	20	0	Y	32896	0	63
-def					@arg20	251	16777216	0	Y	0	31	8
-def					@arg21	251	16777216	0	Y	0	31	8
-def					@arg22	251	16777216	0	Y	0	31	8
-def					@arg23	251	16777216	0	Y	0	31	8
-def					@arg24	251	16777216	0	Y	0	31	8
-def					@arg25	251	16777216	0	Y	0	31	8
-def					@arg26	251	16777216	0	Y	0	31	8
-def					@arg27	251	16777216	0	Y	0	31	8
-def					@arg28	251	16777216	0	Y	0	31	8
-def					@arg29	251	16777216	0	Y	0	31	8
-def					@arg30	251	16777216	0	Y	0	31	8
-def					@arg31	251	16777216	0	Y	0	31	8
-def					@arg32	251	16777216	0	Y	0	31	8
+def					@arg20	250	16777215	0	Y	0	31	8
+def					@arg21	250	16777215	0	Y	0	31	8
+def					@arg22	250	16777215	0	Y	0	31	8
+def					@arg23	250	16777215	0	Y	0	31	8
+def					@arg24	250	16777215	0	Y	0	31	8
+def					@arg25	250	16777215	0	Y	0	31	8
+def					@arg26	250	16777215	0	Y	0	31	8
+def					@arg27	250	16777215	0	Y	0	31	8
+def					@arg28	250	16777215	0	Y	0	31	8
+def					@arg29	250	16777215	0	Y	0	31	8
+def					@arg30	250	16777215	0	Y	0	31	8
+def					@arg31	250	16777215	0	Y	0	31	8
+def					@arg32	250	16777215	0	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	1991-01-01 01:01:01	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
 prepare stmt1 from "select 
@@ -2010,26 +2010,26 @@ def					@arg09	5	23	1	Y	32896	31	63
 def					@arg10	5	23	1	Y	32896	31	63
 def					@arg11	246	83	6	Y	128	30	63
 def					@arg12	246	83	6	Y	128	30	63
-def					@arg13	251	16777216	10	Y	128	31	63
-def					@arg14	251	16777216	19	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	8	Y	128	31	63
+def					@arg13	250	16777215	10	Y	128	31	63
+def					@arg14	250	16777215	19	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	8	Y	128	31	63
 def					@arg17	8	20	4	Y	32928	0	63
 def					@arg18	8	20	1	Y	32896	0	63
 def					@arg19	8	20	1	Y	32896	0	63
-def					@arg20	251	16777216	1	Y	0	31	8
-def					@arg21	251	16777216	10	Y	0	31	8
-def					@arg22	251	16777216	30	Y	0	31	8
-def					@arg23	251	16777216	8	Y	0	31	8
-def					@arg24	251	16777216	8	Y	0	31	8
-def					@arg25	251	16777216	4	Y	0	31	8
-def					@arg26	251	16777216	4	Y	0	31	8
-def					@arg27	251	16777216	10	Y	0	31	8
-def					@arg28	251	16777216	10	Y	0	31	8
-def					@arg29	251	16777216	8	Y	0	31	8
-def					@arg30	251	16777216	8	Y	0	31	8
-def					@arg31	251	16777216	3	Y	0	31	8
-def					@arg32	251	16777216	6	Y	0	31	8
+def					@arg20	250	16777215	1	Y	0	31	8
+def					@arg21	250	16777215	10	Y	0	31	8
+def					@arg22	250	16777215	30	Y	0	31	8
+def					@arg23	250	16777215	8	Y	0	31	8
+def					@arg24	250	16777215	8	Y	0	31	8
+def					@arg25	250	16777215	4	Y	0	31	8
+def					@arg26	250	16777215	4	Y	0	31	8
+def					@arg27	250	16777215	10	Y	0	31	8
+def					@arg28	250	16777215	10	Y	0	31	8
+def					@arg29	250	16777215	8	Y	0	31	8
+def					@arg30	250	16777215	8	Y	0	31	8
+def					@arg31	250	16777215	3	Y	0	31	8
+def					@arg32	250	16777215	6	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 1	1	1	1	1	1	1	1	1	1	1.0000	1.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29 11:11:11	11:11:11	2004	1	1	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	one	monday
 set @my_key= 0 ;
@@ -2050,26 +2050,26 @@ def					@arg09	5	23	0	Y	32896	31	63
 def					@arg10	5	23	0	Y	32896	31	63
 def					@arg11	246	83	0	Y	128	30	63
 def					@arg12	246	83	0	Y	128	30	63
-def					@arg13	251	16777216	0	Y	128	31	63
-def					@arg14	251	16777216	0	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	0	Y	128	31	63
+def					@arg13	250	16777215	0	Y	128	31	63
+def					@arg14	250	16777215	0	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	0	Y	128	31	63
 def					@arg17	8	20	0	Y	32928	0	63
 def					@arg18	8	20	0	Y	32896	0	63
 def					@arg19	8	20	0	Y	32896	0	63
-def					@arg20	251	16777216	0	Y	0	31	8
-def					@arg21	251	16777216	0	Y	0	31	8
-def					@arg22	251	16777216	0	Y	0	31	8
-def					@arg23	251	16777216	0	Y	0	31	8
-def					@arg24	251	16777216	0	Y	0	31	8
-def					@arg25	251	16777216	0	Y	0	31	8
-def					@arg26	251	16777216	0	Y	0	31	8
-def					@arg27	251	16777216	0	Y	0	31	8
-def					@arg28	251	16777216	0	Y	0	31	8
-def					@arg29	251	16777216	0	Y	0	31	8
-def					@arg30	251	16777216	0	Y	0	31	8
-def					@arg31	251	16777216	0	Y	0	31	8
-def					@arg32	251	16777216	0	Y	0	31	8
+def					@arg20	250	16777215	0	Y	0	31	8
+def					@arg21	250	16777215	0	Y	0	31	8
+def					@arg22	250	16777215	0	Y	0	31	8
+def					@arg23	250	16777215	0	Y	0	31	8
+def					@arg24	250	16777215	0	Y	0	31	8
+def					@arg25	250	16777215	0	Y	0	31	8
+def					@arg26	250	16777215	0	Y	0	31	8
+def					@arg27	250	16777215	0	Y	0	31	8
+def					@arg28	250	16777215	0	Y	0	31	8
+def					@arg29	250	16777215	0	Y	0	31	8
+def					@arg30	250	16777215	0	Y	0	31	8
+def					@arg31	250	16777215	0	Y	0	31	8
+def					@arg32	250	16777215	0	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	1991-01-01 01:01:01	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
 prepare stmt1 from "select ? := c1 from t9 where c1= 1" ;
@@ -2098,26 +2098,26 @@ def					@arg09	5	23	1	Y	32896	31	63
 def					@arg10	5	23	1	Y	32896	31	63
 def					@arg11	246	83	6	Y	128	30	63
 def					@arg12	246	83	6	Y	128	30	63
-def					@arg13	251	16777216	10	Y	128	31	63
-def					@arg14	251	16777216	19	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	8	Y	128	31	63
+def					@arg13	250	16777215	10	Y	128	31	63
+def					@arg14	250	16777215	19	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	8	Y	128	31	63
 def					@arg17	8	20	4	Y	32928	0	63
 def					@arg18	8	20	1	Y	32896	0	63
 def					@arg19	8	20	1	Y	32896	0	63
-def					@arg20	251	16777216	1	Y	0	31	8
-def					@arg21	251	16777216	10	Y	0	31	8
-def					@arg22	251	16777216	30	Y	0	31	8
-def					@arg23	251	16777216	8	Y	0	31	8
-def					@arg24	251	16777216	8	Y	0	31	8
-def					@arg25	251	16777216	4	Y	0	31	8
-def					@arg26	251	16777216	4	Y	0	31	8
-def					@arg27	251	16777216	10	Y	0	31	8
-def					@arg28	251	16777216	10	Y	0	31	8
-def					@arg29	251	16777216	8	Y	0	31	8
-def					@arg30	251	16777216	8	Y	0	31	8
-def					@arg31	251	16777216	3	Y	0	31	8
-def					@arg32	251	16777216	6	Y	0	31	8
+def					@arg20	250	16777215	1	Y	0	31	8
+def					@arg21	250	16777215	10	Y	0	31	8
+def					@arg22	250	16777215	30	Y	0	31	8
+def					@arg23	250	16777215	8	Y	0	31	8
+def					@arg24	250	16777215	8	Y	0	31	8
+def					@arg25	250	16777215	4	Y	0	31	8
+def					@arg26	250	16777215	4	Y	0	31	8
+def					@arg27	250	16777215	10	Y	0	31	8
+def					@arg28	250	16777215	10	Y	0	31	8
+def					@arg29	250	16777215	8	Y	0	31	8
+def					@arg30	250	16777215	8	Y	0	31	8
+def					@arg31	250	16777215	3	Y	0	31	8
+def					@arg32	250	16777215	6	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 1	1	1	1	1	1	1	1	1	1	1.0000	1.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29 11:11:11	11:11:11	2004	1	1	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	one	monday
 select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
@@ -2142,26 +2142,26 @@ def					@arg09	5	23	0	Y	32896	31	63
 def					@arg10	5	23	0	Y	32896	31	63
 def					@arg11	246	83	0	Y	128	30	63
 def					@arg12	246	83	0	Y	128	30	63
-def					@arg13	251	16777216	0	Y	128	31	63
-def					@arg14	251	16777216	0	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	0	Y	128	31	63
+def					@arg13	250	16777215	0	Y	128	31	63
+def					@arg14	250	16777215	0	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	0	Y	128	31	63
 def					@arg17	8	20	0	Y	32928	0	63
 def					@arg18	8	20	0	Y	32896	0	63
 def					@arg19	8	20	0	Y	32896	0	63
-def					@arg20	251	16777216	0	Y	0	31	8
-def					@arg21	251	16777216	0	Y	0	31	8
-def					@arg22	251	16777216	0	Y	0	31	8
-def					@arg23	251	16777216	0	Y	0	31	8
-def					@arg24	251	16777216	0	Y	0	31	8
-def					@arg25	251	16777216	0	Y	0	31	8
-def					@arg26	251	16777216	0	Y	0	31	8
-def					@arg27	251	16777216	0	Y	0	31	8
-def					@arg28	251	16777216	0	Y	0	31	8
-def					@arg29	251	16777216	0	Y	0	31	8
-def					@arg30	251	16777216	0	Y	0	31	8
-def					@arg31	251	16777216	0	Y	0	31	8
-def					@arg32	251	16777216	0	Y	0	31	8
+def					@arg20	250	16777215	0	Y	0	31	8
+def					@arg21	250	16777215	0	Y	0	31	8
+def					@arg22	250	16777215	0	Y	0	31	8
+def					@arg23	250	16777215	0	Y	0	31	8
+def					@arg24	250	16777215	0	Y	0	31	8
+def					@arg25	250	16777215	0	Y	0	31	8
+def					@arg26	250	16777215	0	Y	0	31	8
+def					@arg27	250	16777215	0	Y	0	31	8
+def					@arg28	250	16777215	0	Y	0	31	8
+def					@arg29	250	16777215	0	Y	0	31	8
+def					@arg30	250	16777215	0	Y	0	31	8
+def					@arg31	250	16777215	0	Y	0	31	8
+def					@arg32	250	16777215	0	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	1991-01-01 01:01:01	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
 prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
@@ -2188,26 +2188,26 @@ def					@arg09	5	23	1	Y	32896	31	63
 def					@arg10	5	23	1	Y	32896	31	63
 def					@arg11	246	83	6	Y	128	30	63
 def					@arg12	246	83	6	Y	128	30	63
-def					@arg13	251	16777216	10	Y	128	31	63
-def					@arg14	251	16777216	19	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	8	Y	128	31	63
+def					@arg13	250	16777215	10	Y	128	31	63
+def					@arg14	250	16777215	19	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	8	Y	128	31	63
 def					@arg17	8	20	4	Y	32928	0	63
 def					@arg18	8	20	1	Y	32896	0	63
 def					@arg19	8	20	1	Y	32896	0	63
-def					@arg20	251	16777216	1	Y	0	31	8
-def					@arg21	251	16777216	10	Y	0	31	8
-def					@arg22	251	16777216	30	Y	0	31	8
-def					@arg23	251	16777216	8	Y	0	31	8
-def					@arg24	251	16777216	8	Y	0	31	8
-def					@arg25	251	16777216	4	Y	0	31	8
-def					@arg26	251	16777216	4	Y	0	31	8
-def					@arg27	251	16777216	10	Y	0	31	8
-def					@arg28	251	16777216	10	Y	0	31	8
-def					@arg29	251	16777216	8	Y	0	31	8
-def					@arg30	251	16777216	8	Y	0	31	8
-def					@arg31	251	16777216	3	Y	0	31	8
-def					@arg32	251	16777216	6	Y	0	31	8
+def					@arg20	250	16777215	1	Y	0	31	8
+def					@arg21	250	16777215	10	Y	0	31	8
+def					@arg22	250	16777215	30	Y	0	31	8
+def					@arg23	250	16777215	8	Y	0	31	8
+def					@arg24	250	16777215	8	Y	0	31	8
+def					@arg25	250	16777215	4	Y	0	31	8
+def					@arg26	250	16777215	4	Y	0	31	8
+def					@arg27	250	16777215	10	Y	0	31	8
+def					@arg28	250	16777215	10	Y	0	31	8
+def					@arg29	250	16777215	8	Y	0	31	8
+def					@arg30	250	16777215	8	Y	0	31	8
+def					@arg31	250	16777215	3	Y	0	31	8
+def					@arg32	250	16777215	6	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 1	1	1	1	1	1	1	1	1	1	1.0000	1.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29 11:11:11	11:11:11	2004	1	1	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	one	monday
 set @my_key= 0 ;
@@ -2226,26 +2226,26 @@ def					@arg09	5	23	0	Y	32896	31	63
 def					@arg10	5	23	0	Y	32896	31	63
 def					@arg11	246	83	0	Y	128	30	63
 def					@arg12	246	83	0	Y	128	30	63
-def					@arg13	251	16777216	0	Y	128	31	63
-def					@arg14	251	16777216	0	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	0	Y	128	31	63
+def					@arg13	250	16777215	0	Y	128	31	63
+def					@arg14	250	16777215	0	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	0	Y	128	31	63
 def					@arg17	8	20	0	Y	32928	0	63
 def					@arg18	8	20	0	Y	32896	0	63
 def					@arg19	8	20	0	Y	32896	0	63
-def					@arg20	251	16777216	0	Y	0	31	8
-def					@arg21	251	16777216	0	Y	0	31	8
-def					@arg22	251	16777216	0	Y	0	31	8
-def					@arg23	251	16777216	0	Y	0	31	8
-def					@arg24	251	16777216	0	Y	0	31	8
-def					@arg25	251	16777216	0	Y	0	31	8
-def					@arg26	251	16777216	0	Y	0	31	8
-def					@arg27	251	16777216	0	Y	0	31	8
-def					@arg28	251	16777216	0	Y	0	31	8
-def					@arg29	251	16777216	0	Y	0	31	8
-def					@arg30	251	16777216	0	Y	0	31	8
-def					@arg31	251	16777216	0	Y	0	31	8
-def					@arg32	251	16777216	0	Y	0	31	8
+def					@arg20	250	16777215	0	Y	0	31	8
+def					@arg21	250	16777215	0	Y	0	31	8
+def					@arg22	250	16777215	0	Y	0	31	8
+def					@arg23	250	16777215	0	Y	0	31	8
+def					@arg24	250	16777215	0	Y	0	31	8
+def					@arg25	250	16777215	0	Y	0	31	8
+def					@arg26	250	16777215	0	Y	0	31	8
+def					@arg27	250	16777215	0	Y	0	31	8
+def					@arg28	250	16777215	0	Y	0	31	8
+def					@arg29	250	16777215	0	Y	0	31	8
+def					@arg30	250	16777215	0	Y	0	31	8
+def					@arg31	250	16777215	0	Y	0	31	8
+def					@arg32	250	16777215	0	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	1991-01-01 01:01:01	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
 prepare stmt1 from "select c1 into ? from t9 where c1= 1" ;

=== modified file 'mysql-test/r/ps_5merge.result'
--- a/mysql-test/r/ps_5merge.result	2009-06-29 21:03:30 +0000
+++ b/mysql-test/r/ps_5merge.result	2010-11-23 21:39:59 +0000
@@ -1849,26 +1849,26 @@ def					@arg09	5	23	1	Y	32896	31	63
 def					@arg10	5	23	1	Y	32896	31	63
 def					@arg11	246	83	6	Y	128	30	63
 def					@arg12	246	83	6	Y	128	30	63
-def					@arg13	251	16777216	10	Y	128	31	63
-def					@arg14	251	16777216	19	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	8	Y	128	31	63
+def					@arg13	250	16777215	10	Y	128	31	63
+def					@arg14	250	16777215	19	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	8	Y	128	31	63
 def					@arg17	8	20	4	Y	32928	0	63
 def					@arg18	8	20	1	Y	32896	0	63
 def					@arg19	8	20	1	Y	32896	0	63
-def					@arg20	251	16777216	1	Y	0	31	8
-def					@arg21	251	16777216	10	Y	0	31	8
-def					@arg22	251	16777216	30	Y	0	31	8
-def					@arg23	251	16777216	8	Y	128	31	63
-def					@arg24	251	16777216	8	Y	0	31	8
-def					@arg25	251	16777216	4	Y	128	31	63
-def					@arg26	251	16777216	4	Y	0	31	8
-def					@arg27	251	16777216	10	Y	128	31	63
-def					@arg28	251	16777216	10	Y	0	31	8
-def					@arg29	251	16777216	8	Y	128	31	63
-def					@arg30	251	16777216	8	Y	0	31	8
-def					@arg31	251	16777216	3	Y	0	31	8
-def					@arg32	251	16777216	6	Y	0	31	8
+def					@arg20	250	16777215	1	Y	0	31	8
+def					@arg21	250	16777215	10	Y	0	31	8
+def					@arg22	250	16777215	30	Y	0	31	8
+def					@arg23	250	16777215	8	Y	128	31	63
+def					@arg24	250	16777215	8	Y	0	31	8
+def					@arg25	250	16777215	4	Y	128	31	63
+def					@arg26	250	16777215	4	Y	0	31	8
+def					@arg27	250	16777215	10	Y	128	31	63
+def					@arg28	250	16777215	10	Y	0	31	8
+def					@arg29	250	16777215	8	Y	128	31	63
+def					@arg30	250	16777215	8	Y	0	31	8
+def					@arg31	250	16777215	3	Y	0	31	8
+def					@arg32	250	16777215	6	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 1	1	1	1	1	1	1	1	1	1	1.0000	1.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29 11:11:11	11:11:11	2004	1	1	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	one	monday
 select @arg01:=  c1, @arg02:=  c2, @arg03:=  c3, @arg04:=  c4,
@@ -1896,26 +1896,26 @@ def					@arg09	5	23	0	Y	32896	31	63
 def					@arg10	5	23	0	Y	32896	31	63
 def					@arg11	246	83	0	Y	128	30	63
 def					@arg12	246	83	0	Y	128	30	63
-def					@arg13	251	16777216	0	Y	128	31	63
-def					@arg14	251	16777216	0	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	0	Y	128	31	63
+def					@arg13	250	16777215	0	Y	128	31	63
+def					@arg14	250	16777215	0	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	0	Y	128	31	63
 def					@arg17	8	20	0	Y	32928	0	63
 def					@arg18	8	20	0	Y	32896	0	63
 def					@arg19	8	20	0	Y	32896	0	63
-def					@arg20	251	16777216	0	Y	0	31	8
-def					@arg21	251	16777216	0	Y	0	31	8
-def					@arg22	251	16777216	0	Y	0	31	8
-def					@arg23	251	16777216	0	Y	128	31	63
-def					@arg24	251	16777216	0	Y	0	31	8
-def					@arg25	251	16777216	0	Y	128	31	63
-def					@arg26	251	16777216	0	Y	0	31	8
-def					@arg27	251	16777216	0	Y	128	31	63
-def					@arg28	251	16777216	0	Y	0	31	8
-def					@arg29	251	16777216	0	Y	128	31	63
-def					@arg30	251	16777216	0	Y	0	31	8
-def					@arg31	251	16777216	0	Y	0	31	8
-def					@arg32	251	16777216	0	Y	0	31	8
+def					@arg20	250	16777215	0	Y	0	31	8
+def					@arg21	250	16777215	0	Y	0	31	8
+def					@arg22	250	16777215	0	Y	0	31	8
+def					@arg23	250	16777215	0	Y	128	31	63
+def					@arg24	250	16777215	0	Y	0	31	8
+def					@arg25	250	16777215	0	Y	128	31	63
+def					@arg26	250	16777215	0	Y	0	31	8
+def					@arg27	250	16777215	0	Y	128	31	63
+def					@arg28	250	16777215	0	Y	0	31	8
+def					@arg29	250	16777215	0	Y	128	31	63
+def					@arg30	250	16777215	0	Y	0	31	8
+def					@arg31	250	16777215	0	Y	0	31	8
+def					@arg32	250	16777215	0	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	1991-01-01 01:01:01	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
 prepare stmt1 from "select 
@@ -1946,26 +1946,26 @@ def					@arg09	5	23	1	Y	32896	31	63
 def					@arg10	5	23	1	Y	32896	31	63
 def					@arg11	246	83	6	Y	128	30	63
 def					@arg12	246	83	6	Y	128	30	63
-def					@arg13	251	16777216	10	Y	128	31	63
-def					@arg14	251	16777216	19	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	8	Y	128	31	63
+def					@arg13	250	16777215	10	Y	128	31	63
+def					@arg14	250	16777215	19	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	8	Y	128	31	63
 def					@arg17	8	20	4	Y	32928	0	63
 def					@arg18	8	20	1	Y	32896	0	63
 def					@arg19	8	20	1	Y	32896	0	63
-def					@arg20	251	16777216	1	Y	0	31	8
-def					@arg21	251	16777216	10	Y	0	31	8
-def					@arg22	251	16777216	30	Y	0	31	8
-def					@arg23	251	16777216	8	Y	128	31	63
-def					@arg24	251	16777216	8	Y	0	31	8
-def					@arg25	251	16777216	4	Y	128	31	63
-def					@arg26	251	16777216	4	Y	0	31	8
-def					@arg27	251	16777216	10	Y	128	31	63
-def					@arg28	251	16777216	10	Y	0	31	8
-def					@arg29	251	16777216	8	Y	128	31	63
-def					@arg30	251	16777216	8	Y	0	31	8
-def					@arg31	251	16777216	3	Y	0	31	8
-def					@arg32	251	16777216	6	Y	0	31	8
+def					@arg20	250	16777215	1	Y	0	31	8
+def					@arg21	250	16777215	10	Y	0	31	8
+def					@arg22	250	16777215	30	Y	0	31	8
+def					@arg23	250	16777215	8	Y	128	31	63
+def					@arg24	250	16777215	8	Y	0	31	8
+def					@arg25	250	16777215	4	Y	128	31	63
+def					@arg26	250	16777215	4	Y	0	31	8
+def					@arg27	250	16777215	10	Y	128	31	63
+def					@arg28	250	16777215	10	Y	0	31	8
+def					@arg29	250	16777215	8	Y	128	31	63
+def					@arg30	250	16777215	8	Y	0	31	8
+def					@arg31	250	16777215	3	Y	0	31	8
+def					@arg32	250	16777215	6	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 1	1	1	1	1	1	1	1	1	1	1.0000	1.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29 11:11:11	11:11:11	2004	1	1	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	one	monday
 set @my_key= 0 ;
@@ -1986,26 +1986,26 @@ def					@arg09	5	23	0	Y	32896	31	63
 def					@arg10	5	23	0	Y	32896	31	63
 def					@arg11	246	83	0	Y	128	30	63
 def					@arg12	246	83	0	Y	128	30	63
-def					@arg13	251	16777216	0	Y	128	31	63
-def					@arg14	251	16777216	0	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	0	Y	128	31	63
+def					@arg13	250	16777215	0	Y	128	31	63
+def					@arg14	250	16777215	0	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	0	Y	128	31	63
 def					@arg17	8	20	0	Y	32928	0	63
 def					@arg18	8	20	0	Y	32896	0	63
 def					@arg19	8	20	0	Y	32896	0	63
-def					@arg20	251	16777216	0	Y	0	31	8
-def					@arg21	251	16777216	0	Y	0	31	8
-def					@arg22	251	16777216	0	Y	0	31	8
-def					@arg23	251	16777216	0	Y	128	31	63
-def					@arg24	251	16777216	0	Y	0	31	8
-def					@arg25	251	16777216	0	Y	128	31	63
-def					@arg26	251	16777216	0	Y	0	31	8
-def					@arg27	251	16777216	0	Y	128	31	63
-def					@arg28	251	16777216	0	Y	0	31	8
-def					@arg29	251	16777216	0	Y	128	31	63
-def					@arg30	251	16777216	0	Y	0	31	8
-def					@arg31	251	16777216	0	Y	0	31	8
-def					@arg32	251	16777216	0	Y	0	31	8
+def					@arg20	250	16777215	0	Y	0	31	8
+def					@arg21	250	16777215	0	Y	0	31	8
+def					@arg22	250	16777215	0	Y	0	31	8
+def					@arg23	250	16777215	0	Y	128	31	63
+def					@arg24	250	16777215	0	Y	0	31	8
+def					@arg25	250	16777215	0	Y	128	31	63
+def					@arg26	250	16777215	0	Y	0	31	8
+def					@arg27	250	16777215	0	Y	128	31	63
+def					@arg28	250	16777215	0	Y	0	31	8
+def					@arg29	250	16777215	0	Y	128	31	63
+def					@arg30	250	16777215	0	Y	0	31	8
+def					@arg31	250	16777215	0	Y	0	31	8
+def					@arg32	250	16777215	0	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	1991-01-01 01:01:01	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
 prepare stmt1 from "select ? := c1 from t9 where c1= 1" ;
@@ -2034,26 +2034,26 @@ def					@arg09	5	23	1	Y	32896	31	63
 def					@arg10	5	23	1	Y	32896	31	63
 def					@arg11	246	83	6	Y	128	30	63
 def					@arg12	246	83	6	Y	128	30	63
-def					@arg13	251	16777216	10	Y	128	31	63
-def					@arg14	251	16777216	19	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	8	Y	128	31	63
+def					@arg13	250	16777215	10	Y	128	31	63
+def					@arg14	250	16777215	19	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	8	Y	128	31	63
 def					@arg17	8	20	4	Y	32928	0	63
 def					@arg18	8	20	1	Y	32896	0	63
 def					@arg19	8	20	1	Y	32896	0	63
-def					@arg20	251	16777216	1	Y	0	31	8
-def					@arg21	251	16777216	10	Y	0	31	8
-def					@arg22	251	16777216	30	Y	0	31	8
-def					@arg23	251	16777216	8	Y	128	31	63
-def					@arg24	251	16777216	8	Y	0	31	8
-def					@arg25	251	16777216	4	Y	128	31	63
-def					@arg26	251	16777216	4	Y	0	31	8
-def					@arg27	251	16777216	10	Y	128	31	63
-def					@arg28	251	16777216	10	Y	0	31	8
-def					@arg29	251	16777216	8	Y	128	31	63
-def					@arg30	251	16777216	8	Y	0	31	8
-def					@arg31	251	16777216	3	Y	0	31	8
-def					@arg32	251	16777216	6	Y	0	31	8
+def					@arg20	250	16777215	1	Y	0	31	8
+def					@arg21	250	16777215	10	Y	0	31	8
+def					@arg22	250	16777215	30	Y	0	31	8
+def					@arg23	250	16777215	8	Y	128	31	63
+def					@arg24	250	16777215	8	Y	0	31	8
+def					@arg25	250	16777215	4	Y	128	31	63
+def					@arg26	250	16777215	4	Y	0	31	8
+def					@arg27	250	16777215	10	Y	128	31	63
+def					@arg28	250	16777215	10	Y	0	31	8
+def					@arg29	250	16777215	8	Y	128	31	63
+def					@arg30	250	16777215	8	Y	0	31	8
+def					@arg31	250	16777215	3	Y	0	31	8
+def					@arg32	250	16777215	6	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 1	1	1	1	1	1	1	1	1	1	1.0000	1.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29 11:11:11	11:11:11	2004	1	1	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	one	monday
 select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
@@ -2078,26 +2078,26 @@ def					@arg09	5	23	0	Y	32896	31	63
 def					@arg10	5	23	0	Y	32896	31	63
 def					@arg11	246	83	0	Y	128	30	63
 def					@arg12	246	83	0	Y	128	30	63
-def					@arg13	251	16777216	0	Y	128	31	63
-def					@arg14	251	16777216	0	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	0	Y	128	31	63
+def					@arg13	250	16777215	0	Y	128	31	63
+def					@arg14	250	16777215	0	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	0	Y	128	31	63
 def					@arg17	8	20	0	Y	32928	0	63
 def					@arg18	8	20	0	Y	32896	0	63
 def					@arg19	8	20	0	Y	32896	0	63
-def					@arg20	251	16777216	0	Y	0	31	8
-def					@arg21	251	16777216	0	Y	0	31	8
-def					@arg22	251	16777216	0	Y	0	31	8
-def					@arg23	251	16777216	0	Y	128	31	63
-def					@arg24	251	16777216	0	Y	0	31	8
-def					@arg25	251	16777216	0	Y	128	31	63
-def					@arg26	251	16777216	0	Y	0	31	8
-def					@arg27	251	16777216	0	Y	128	31	63
-def					@arg28	251	16777216	0	Y	0	31	8
-def					@arg29	251	16777216	0	Y	128	31	63
-def					@arg30	251	16777216	0	Y	0	31	8
-def					@arg31	251	16777216	0	Y	0	31	8
-def					@arg32	251	16777216	0	Y	0	31	8
+def					@arg20	250	16777215	0	Y	0	31	8
+def					@arg21	250	16777215	0	Y	0	31	8
+def					@arg22	250	16777215	0	Y	0	31	8
+def					@arg23	250	16777215	0	Y	128	31	63
+def					@arg24	250	16777215	0	Y	0	31	8
+def					@arg25	250	16777215	0	Y	128	31	63
+def					@arg26	250	16777215	0	Y	0	31	8
+def					@arg27	250	16777215	0	Y	128	31	63
+def					@arg28	250	16777215	0	Y	0	31	8
+def					@arg29	250	16777215	0	Y	128	31	63
+def					@arg30	250	16777215	0	Y	0	31	8
+def					@arg31	250	16777215	0	Y	0	31	8
+def					@arg32	250	16777215	0	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	1991-01-01 01:01:01	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
 prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
@@ -2124,26 +2124,26 @@ def					@arg09	5	23	1	Y	32896	31	63
 def					@arg10	5	23	1	Y	32896	31	63
 def					@arg11	246	83	6	Y	128	30	63
 def					@arg12	246	83	6	Y	128	30	63
-def					@arg13	251	16777216	10	Y	128	31	63
-def					@arg14	251	16777216	19	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	8	Y	128	31	63
+def					@arg13	250	16777215	10	Y	128	31	63
+def					@arg14	250	16777215	19	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	8	Y	128	31	63
 def					@arg17	8	20	4	Y	32928	0	63
 def					@arg18	8	20	1	Y	32896	0	63
 def					@arg19	8	20	1	Y	32896	0	63
-def					@arg20	251	16777216	1	Y	0	31	8
-def					@arg21	251	16777216	10	Y	0	31	8
-def					@arg22	251	16777216	30	Y	0	31	8
-def					@arg23	251	16777216	8	Y	128	31	63
-def					@arg24	251	16777216	8	Y	0	31	8
-def					@arg25	251	16777216	4	Y	128	31	63
-def					@arg26	251	16777216	4	Y	0	31	8
-def					@arg27	251	16777216	10	Y	128	31	63
-def					@arg28	251	16777216	10	Y	0	31	8
-def					@arg29	251	16777216	8	Y	128	31	63
-def					@arg30	251	16777216	8	Y	0	31	8
-def					@arg31	251	16777216	3	Y	0	31	8
-def					@arg32	251	16777216	6	Y	0	31	8
+def					@arg20	250	16777215	1	Y	0	31	8
+def					@arg21	250	16777215	10	Y	0	31	8
+def					@arg22	250	16777215	30	Y	0	31	8
+def					@arg23	250	16777215	8	Y	128	31	63
+def					@arg24	250	16777215	8	Y	0	31	8
+def					@arg25	250	16777215	4	Y	128	31	63
+def					@arg26	250	16777215	4	Y	0	31	8
+def					@arg27	250	16777215	10	Y	128	31	63
+def					@arg28	250	16777215	10	Y	0	31	8
+def					@arg29	250	16777215	8	Y	128	31	63
+def					@arg30	250	16777215	8	Y	0	31	8
+def					@arg31	250	16777215	3	Y	0	31	8
+def					@arg32	250	16777215	6	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 1	1	1	1	1	1	1	1	1	1	1.0000	1.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29 11:11:11	11:11:11	2004	1	1	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	one	monday
 set @my_key= 0 ;
@@ -2162,26 +2162,26 @@ def					@arg09	5	23	0	Y	32896	31	63
 def					@arg10	5	23	0	Y	32896	31	63
 def					@arg11	246	83	0	Y	128	30	63
 def					@arg12	246	83	0	Y	128	30	63
-def					@arg13	251	16777216	0	Y	128	31	63
-def					@arg14	251	16777216	0	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	0	Y	128	31	63
+def					@arg13	250	16777215	0	Y	128	31	63
+def					@arg14	250	16777215	0	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	0	Y	128	31	63
 def					@arg17	8	20	0	Y	32928	0	63
 def					@arg18	8	20	0	Y	32896	0	63
 def					@arg19	8	20	0	Y	32896	0	63
-def					@arg20	251	16777216	0	Y	0	31	8
-def					@arg21	251	16777216	0	Y	0	31	8
-def					@arg22	251	16777216	0	Y	0	31	8
-def					@arg23	251	16777216	0	Y	128	31	63
-def					@arg24	251	16777216	0	Y	0	31	8
-def					@arg25	251	16777216	0	Y	128	31	63
-def					@arg26	251	16777216	0	Y	0	31	8
-def					@arg27	251	16777216	0	Y	128	31	63
-def					@arg28	251	16777216	0	Y	0	31	8
-def					@arg29	251	16777216	0	Y	128	31	63
-def					@arg30	251	16777216	0	Y	0	31	8
-def					@arg31	251	16777216	0	Y	0	31	8
-def					@arg32	251	16777216	0	Y	0	31	8
+def					@arg20	250	16777215	0	Y	0	31	8
+def					@arg21	250	16777215	0	Y	0	31	8
+def					@arg22	250	16777215	0	Y	0	31	8
+def					@arg23	250	16777215	0	Y	128	31	63
+def					@arg24	250	16777215	0	Y	0	31	8
+def					@arg25	250	16777215	0	Y	128	31	63
+def					@arg26	250	16777215	0	Y	0	31	8
+def					@arg27	250	16777215	0	Y	128	31	63
+def					@arg28	250	16777215	0	Y	0	31	8
+def					@arg29	250	16777215	0	Y	128	31	63
+def					@arg30	250	16777215	0	Y	0	31	8
+def					@arg31	250	16777215	0	Y	0	31	8
+def					@arg32	250	16777215	0	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	1991-01-01 01:01:01	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
 prepare stmt1 from "select c1 into ? from t9 where c1= 1" ;
@@ -4871,26 +4871,26 @@ def					@arg09	5	23	1	Y	32896	31	63
 def					@arg10	5	23	1	Y	32896	31	63
 def					@arg11	246	83	6	Y	128	30	63
 def					@arg12	246	83	6	Y	128	30	63
-def					@arg13	251	16777216	10	Y	128	31	63
-def					@arg14	251	16777216	19	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	8	Y	128	31	63
+def					@arg13	250	16777215	10	Y	128	31	63
+def					@arg14	250	16777215	19	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	8	Y	128	31	63
 def					@arg17	8	20	4	Y	32928	0	63
 def					@arg18	8	20	1	Y	32896	0	63
 def					@arg19	8	20	1	Y	32896	0	63
-def					@arg20	251	16777216	1	Y	0	31	8
-def					@arg21	251	16777216	10	Y	0	31	8
-def					@arg22	251	16777216	30	Y	0	31	8
-def					@arg23	251	16777216	8	Y	128	31	63
-def					@arg24	251	16777216	8	Y	0	31	8
-def					@arg25	251	16777216	4	Y	128	31	63
-def					@arg26	251	16777216	4	Y	0	31	8
-def					@arg27	251	16777216	10	Y	128	31	63
-def					@arg28	251	16777216	10	Y	0	31	8
-def					@arg29	251	16777216	8	Y	128	31	63
-def					@arg30	251	16777216	8	Y	0	31	8
-def					@arg31	251	16777216	3	Y	0	31	8
-def					@arg32	251	16777216	6	Y	0	31	8
+def					@arg20	250	16777215	1	Y	0	31	8
+def					@arg21	250	16777215	10	Y	0	31	8
+def					@arg22	250	16777215	30	Y	0	31	8
+def					@arg23	250	16777215	8	Y	128	31	63
+def					@arg24	250	16777215	8	Y	0	31	8
+def					@arg25	250	16777215	4	Y	128	31	63
+def					@arg26	250	16777215	4	Y	0	31	8
+def					@arg27	250	16777215	10	Y	128	31	63
+def					@arg28	250	16777215	10	Y	0	31	8
+def					@arg29	250	16777215	8	Y	128	31	63
+def					@arg30	250	16777215	8	Y	0	31	8
+def					@arg31	250	16777215	3	Y	0	31	8
+def					@arg32	250	16777215	6	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 1	1	1	1	1	1	1	1	1	1	1.0000	1.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29 11:11:11	11:11:11	2004	1	1	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	one	monday
 select @arg01:=  c1, @arg02:=  c2, @arg03:=  c3, @arg04:=  c4,
@@ -4918,26 +4918,26 @@ def					@arg09	5	23	0	Y	32896	31	63
 def					@arg10	5	23	0	Y	32896	31	63
 def					@arg11	246	83	0	Y	128	30	63
 def					@arg12	246	83	0	Y	128	30	63
-def					@arg13	251	16777216	0	Y	128	31	63
-def					@arg14	251	16777216	0	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	0	Y	128	31	63
+def					@arg13	250	16777215	0	Y	128	31	63
+def					@arg14	250	16777215	0	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	0	Y	128	31	63
 def					@arg17	8	20	0	Y	32928	0	63
 def					@arg18	8	20	0	Y	32896	0	63
 def					@arg19	8	20	0	Y	32896	0	63
-def					@arg20	251	16777216	0	Y	0	31	8
-def					@arg21	251	16777216	0	Y	0	31	8
-def					@arg22	251	16777216	0	Y	0	31	8
-def					@arg23	251	16777216	0	Y	128	31	63
-def					@arg24	251	16777216	0	Y	0	31	8
-def					@arg25	251	16777216	0	Y	128	31	63
-def					@arg26	251	16777216	0	Y	0	31	8
-def					@arg27	251	16777216	0	Y	128	31	63
-def					@arg28	251	16777216	0	Y	0	31	8
-def					@arg29	251	16777216	0	Y	128	31	63
-def					@arg30	251	16777216	0	Y	0	31	8
-def					@arg31	251	16777216	0	Y	0	31	8
-def					@arg32	251	16777216	0	Y	0	31	8
+def					@arg20	250	16777215	0	Y	0	31	8
+def					@arg21	250	16777215	0	Y	0	31	8
+def					@arg22	250	16777215	0	Y	0	31	8
+def					@arg23	250	16777215	0	Y	128	31	63
+def					@arg24	250	16777215	0	Y	0	31	8
+def					@arg25	250	16777215	0	Y	128	31	63
+def					@arg26	250	16777215	0	Y	0	31	8
+def					@arg27	250	16777215	0	Y	128	31	63
+def					@arg28	250	16777215	0	Y	0	31	8
+def					@arg29	250	16777215	0	Y	128	31	63
+def					@arg30	250	16777215	0	Y	0	31	8
+def					@arg31	250	16777215	0	Y	0	31	8
+def					@arg32	250	16777215	0	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	1991-01-01 01:01:01	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
 prepare stmt1 from "select 
@@ -4968,26 +4968,26 @@ def					@arg09	5	23	1	Y	32896	31	63
 def					@arg10	5	23	1	Y	32896	31	63
 def					@arg11	246	83	6	Y	128	30	63
 def					@arg12	246	83	6	Y	128	30	63
-def					@arg13	251	16777216	10	Y	128	31	63
-def					@arg14	251	16777216	19	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	8	Y	128	31	63
+def					@arg13	250	16777215	10	Y	128	31	63
+def					@arg14	250	16777215	19	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	8	Y	128	31	63
 def					@arg17	8	20	4	Y	32928	0	63
 def					@arg18	8	20	1	Y	32896	0	63
 def					@arg19	8	20	1	Y	32896	0	63
-def					@arg20	251	16777216	1	Y	0	31	8
-def					@arg21	251	16777216	10	Y	0	31	8
-def					@arg22	251	16777216	30	Y	0	31	8
-def					@arg23	251	16777216	8	Y	128	31	63
-def					@arg24	251	16777216	8	Y	0	31	8
-def					@arg25	251	16777216	4	Y	128	31	63
-def					@arg26	251	16777216	4	Y	0	31	8
-def					@arg27	251	16777216	10	Y	128	31	63
-def					@arg28	251	16777216	10	Y	0	31	8
-def					@arg29	251	16777216	8	Y	128	31	63
-def					@arg30	251	16777216	8	Y	0	31	8
-def					@arg31	251	16777216	3	Y	0	31	8
-def					@arg32	251	16777216	6	Y	0	31	8
+def					@arg20	250	16777215	1	Y	0	31	8
+def					@arg21	250	16777215	10	Y	0	31	8
+def					@arg22	250	16777215	30	Y	0	31	8
+def					@arg23	250	16777215	8	Y	128	31	63
+def					@arg24	250	16777215	8	Y	0	31	8
+def					@arg25	250	16777215	4	Y	128	31	63
+def					@arg26	250	16777215	4	Y	0	31	8
+def					@arg27	250	16777215	10	Y	128	31	63
+def					@arg28	250	16777215	10	Y	0	31	8
+def					@arg29	250	16777215	8	Y	128	31	63
+def					@arg30	250	16777215	8	Y	0	31	8
+def					@arg31	250	16777215	3	Y	0	31	8
+def					@arg32	250	16777215	6	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 1	1	1	1	1	1	1	1	1	1	1.0000	1.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29 11:11:11	11:11:11	2004	1	1	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	one	monday
 set @my_key= 0 ;
@@ -5008,26 +5008,26 @@ def					@arg09	5	23	0	Y	32896	31	63
 def					@arg10	5	23	0	Y	32896	31	63
 def					@arg11	246	83	0	Y	128	30	63
 def					@arg12	246	83	0	Y	128	30	63
-def					@arg13	251	16777216	0	Y	128	31	63
-def					@arg14	251	16777216	0	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	0	Y	128	31	63
+def					@arg13	250	16777215	0	Y	128	31	63
+def					@arg14	250	16777215	0	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	0	Y	128	31	63
 def					@arg17	8	20	0	Y	32928	0	63
 def					@arg18	8	20	0	Y	32896	0	63
 def					@arg19	8	20	0	Y	32896	0	63
-def					@arg20	251	16777216	0	Y	0	31	8
-def					@arg21	251	16777216	0	Y	0	31	8
-def					@arg22	251	16777216	0	Y	0	31	8
-def					@arg23	251	16777216	0	Y	128	31	63
-def					@arg24	251	16777216	0	Y	0	31	8
-def					@arg25	251	16777216	0	Y	128	31	63
-def					@arg26	251	16777216	0	Y	0	31	8
-def					@arg27	251	16777216	0	Y	128	31	63
-def					@arg28	251	16777216	0	Y	0	31	8
-def					@arg29	251	16777216	0	Y	128	31	63
-def					@arg30	251	16777216	0	Y	0	31	8
-def					@arg31	251	16777216	0	Y	0	31	8
-def					@arg32	251	16777216	0	Y	0	31	8
+def					@arg20	250	16777215	0	Y	0	31	8
+def					@arg21	250	16777215	0	Y	0	31	8
+def					@arg22	250	16777215	0	Y	0	31	8
+def					@arg23	250	16777215	0	Y	128	31	63
+def					@arg24	250	16777215	0	Y	0	31	8
+def					@arg25	250	16777215	0	Y	128	31	63
+def					@arg26	250	16777215	0	Y	0	31	8
+def					@arg27	250	16777215	0	Y	128	31	63
+def					@arg28	250	16777215	0	Y	0	31	8
+def					@arg29	250	16777215	0	Y	128	31	63
+def					@arg30	250	16777215	0	Y	0	31	8
+def					@arg31	250	16777215	0	Y	0	31	8
+def					@arg32	250	16777215	0	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	1991-01-01 01:01:01	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
 prepare stmt1 from "select ? := c1 from t9 where c1= 1" ;
@@ -5056,26 +5056,26 @@ def					@arg09	5	23	1	Y	32896	31	63
 def					@arg10	5	23	1	Y	32896	31	63
 def					@arg11	246	83	6	Y	128	30	63
 def					@arg12	246	83	6	Y	128	30	63
-def					@arg13	251	16777216	10	Y	128	31	63
-def					@arg14	251	16777216	19	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	8	Y	128	31	63
+def					@arg13	250	16777215	10	Y	128	31	63
+def					@arg14	250	16777215	19	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	8	Y	128	31	63
 def					@arg17	8	20	4	Y	32928	0	63
 def					@arg18	8	20	1	Y	32896	0	63
 def					@arg19	8	20	1	Y	32896	0	63
-def					@arg20	251	16777216	1	Y	0	31	8
-def					@arg21	251	16777216	10	Y	0	31	8
-def					@arg22	251	16777216	30	Y	0	31	8
-def					@arg23	251	16777216	8	Y	128	31	63
-def					@arg24	251	16777216	8	Y	0	31	8
-def					@arg25	251	16777216	4	Y	128	31	63
-def					@arg26	251	16777216	4	Y	0	31	8
-def					@arg27	251	16777216	10	Y	128	31	63
-def					@arg28	251	16777216	10	Y	0	31	8
-def					@arg29	251	16777216	8	Y	128	31	63
-def					@arg30	251	16777216	8	Y	0	31	8
-def					@arg31	251	16777216	3	Y	0	31	8
-def					@arg32	251	16777216	6	Y	0	31	8
+def					@arg20	250	16777215	1	Y	0	31	8
+def					@arg21	250	16777215	10	Y	0	31	8
+def					@arg22	250	16777215	30	Y	0	31	8
+def					@arg23	250	16777215	8	Y	128	31	63
+def					@arg24	250	16777215	8	Y	0	31	8
+def					@arg25	250	16777215	4	Y	128	31	63
+def					@arg26	250	16777215	4	Y	0	31	8
+def					@arg27	250	16777215	10	Y	128	31	63
+def					@arg28	250	16777215	10	Y	0	31	8
+def					@arg29	250	16777215	8	Y	128	31	63
+def					@arg30	250	16777215	8	Y	0	31	8
+def					@arg31	250	16777215	3	Y	0	31	8
+def					@arg32	250	16777215	6	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 1	1	1	1	1	1	1	1	1	1	1.0000	1.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29 11:11:11	11:11:11	2004	1	1	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	one	monday
 select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
@@ -5100,26 +5100,26 @@ def					@arg09	5	23	0	Y	32896	31	63
 def					@arg10	5	23	0	Y	32896	31	63
 def					@arg11	246	83	0	Y	128	30	63
 def					@arg12	246	83	0	Y	128	30	63
-def					@arg13	251	16777216	0	Y	128	31	63
-def					@arg14	251	16777216	0	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	0	Y	128	31	63
+def					@arg13	250	16777215	0	Y	128	31	63
+def					@arg14	250	16777215	0	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	0	Y	128	31	63
 def					@arg17	8	20	0	Y	32928	0	63
 def					@arg18	8	20	0	Y	32896	0	63
 def					@arg19	8	20	0	Y	32896	0	63
-def					@arg20	251	16777216	0	Y	0	31	8
-def					@arg21	251	16777216	0	Y	0	31	8
-def					@arg22	251	16777216	0	Y	0	31	8
-def					@arg23	251	16777216	0	Y	128	31	63
-def					@arg24	251	16777216	0	Y	0	31	8
-def					@arg25	251	16777216	0	Y	128	31	63
-def					@arg26	251	16777216	0	Y	0	31	8
-def					@arg27	251	16777216	0	Y	128	31	63
-def					@arg28	251	16777216	0	Y	0	31	8
-def					@arg29	251	16777216	0	Y	128	31	63
-def					@arg30	251	16777216	0	Y	0	31	8
-def					@arg31	251	16777216	0	Y	0	31	8
-def					@arg32	251	16777216	0	Y	0	31	8
+def					@arg20	250	16777215	0	Y	0	31	8
+def					@arg21	250	16777215	0	Y	0	31	8
+def					@arg22	250	16777215	0	Y	0	31	8
+def					@arg23	250	16777215	0	Y	128	31	63
+def					@arg24	250	16777215	0	Y	0	31	8
+def					@arg25	250	16777215	0	Y	128	31	63
+def					@arg26	250	16777215	0	Y	0	31	8
+def					@arg27	250	16777215	0	Y	128	31	63
+def					@arg28	250	16777215	0	Y	0	31	8
+def					@arg29	250	16777215	0	Y	128	31	63
+def					@arg30	250	16777215	0	Y	0	31	8
+def					@arg31	250	16777215	0	Y	0	31	8
+def					@arg32	250	16777215	0	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	1991-01-01 01:01:01	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
 prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
@@ -5146,26 +5146,26 @@ def					@arg09	5	23	1	Y	32896	31	63
 def					@arg10	5	23	1	Y	32896	31	63
 def					@arg11	246	83	6	Y	128	30	63
 def					@arg12	246	83	6	Y	128	30	63
-def					@arg13	251	16777216	10	Y	128	31	63
-def					@arg14	251	16777216	19	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	8	Y	128	31	63
+def					@arg13	250	16777215	10	Y	128	31	63
+def					@arg14	250	16777215	19	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	8	Y	128	31	63
 def					@arg17	8	20	4	Y	32928	0	63
 def					@arg18	8	20	1	Y	32896	0	63
 def					@arg19	8	20	1	Y	32896	0	63
-def					@arg20	251	16777216	1	Y	0	31	8
-def					@arg21	251	16777216	10	Y	0	31	8
-def					@arg22	251	16777216	30	Y	0	31	8
-def					@arg23	251	16777216	8	Y	128	31	63
-def					@arg24	251	16777216	8	Y	0	31	8
-def					@arg25	251	16777216	4	Y	128	31	63
-def					@arg26	251	16777216	4	Y	0	31	8
-def					@arg27	251	16777216	10	Y	128	31	63
-def					@arg28	251	16777216	10	Y	0	31	8
-def					@arg29	251	16777216	8	Y	128	31	63
-def					@arg30	251	16777216	8	Y	0	31	8
-def					@arg31	251	16777216	3	Y	0	31	8
-def					@arg32	251	16777216	6	Y	0	31	8
+def					@arg20	250	16777215	1	Y	0	31	8
+def					@arg21	250	16777215	10	Y	0	31	8
+def					@arg22	250	16777215	30	Y	0	31	8
+def					@arg23	250	16777215	8	Y	128	31	63
+def					@arg24	250	16777215	8	Y	0	31	8
+def					@arg25	250	16777215	4	Y	128	31	63
+def					@arg26	250	16777215	4	Y	0	31	8
+def					@arg27	250	16777215	10	Y	128	31	63
+def					@arg28	250	16777215	10	Y	0	31	8
+def					@arg29	250	16777215	8	Y	128	31	63
+def					@arg30	250	16777215	8	Y	0	31	8
+def					@arg31	250	16777215	3	Y	0	31	8
+def					@arg32	250	16777215	6	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 1	1	1	1	1	1	1	1	1	1	1.0000	1.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29 11:11:11	11:11:11	2004	1	1	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	one	monday
 set @my_key= 0 ;
@@ -5184,26 +5184,26 @@ def					@arg09	5	23	0	Y	32896	31	63
 def					@arg10	5	23	0	Y	32896	31	63
 def					@arg11	246	83	0	Y	128	30	63
 def					@arg12	246	83	0	Y	128	30	63
-def					@arg13	251	16777216	0	Y	128	31	63
-def					@arg14	251	16777216	0	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	0	Y	128	31	63
+def					@arg13	250	16777215	0	Y	128	31	63
+def					@arg14	250	16777215	0	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	0	Y	128	31	63
 def					@arg17	8	20	0	Y	32928	0	63
 def					@arg18	8	20	0	Y	32896	0	63
 def					@arg19	8	20	0	Y	32896	0	63
-def					@arg20	251	16777216	0	Y	0	31	8
-def					@arg21	251	16777216	0	Y	0	31	8
-def					@arg22	251	16777216	0	Y	0	31	8
-def					@arg23	251	16777216	0	Y	128	31	63
-def					@arg24	251	16777216	0	Y	0	31	8
-def					@arg25	251	16777216	0	Y	128	31	63
-def					@arg26	251	16777216	0	Y	0	31	8
-def					@arg27	251	16777216	0	Y	128	31	63
-def					@arg28	251	16777216	0	Y	0	31	8
-def					@arg29	251	16777216	0	Y	128	31	63
-def					@arg30	251	16777216	0	Y	0	31	8
-def					@arg31	251	16777216	0	Y	0	31	8
-def					@arg32	251	16777216	0	Y	0	31	8
+def					@arg20	250	16777215	0	Y	0	31	8
+def					@arg21	250	16777215	0	Y	0	31	8
+def					@arg22	250	16777215	0	Y	0	31	8
+def					@arg23	250	16777215	0	Y	128	31	63
+def					@arg24	250	16777215	0	Y	0	31	8
+def					@arg25	250	16777215	0	Y	128	31	63
+def					@arg26	250	16777215	0	Y	0	31	8
+def					@arg27	250	16777215	0	Y	128	31	63
+def					@arg28	250	16777215	0	Y	0	31	8
+def					@arg29	250	16777215	0	Y	128	31	63
+def					@arg30	250	16777215	0	Y	0	31	8
+def					@arg31	250	16777215	0	Y	0	31	8
+def					@arg32	250	16777215	0	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	1991-01-01 01:01:01	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
 prepare stmt1 from "select c1 into ? from t9 where c1= 1" ;

=== modified file 'mysql-test/r/row.result'
--- a/mysql-test/r/row.result	2010-04-16 11:42:34 +0000
+++ b/mysql-test/r/row.result	2010-09-09 12:46:13 +0000
@@ -466,3 +466,26 @@ SELECT 1 FROM t1 WHERE ROW(a, b) >=
 ROW('1', (SELECT 1 FROM t1 WHERE a > 1234));
 1
 DROP TABLE t1;
+#
+# Bug #54190: Comparison to row subquery produces incorrect result
+# 
+SELECT ROW(1,2) = (SELECT 1,2 FROM DUAL WHERE 1 = 0);
+ROW(1,2) = (SELECT 1,2 FROM DUAL WHERE 1 = 0)
+NULL
+SELECT ROW(1,2) = (SELECT 1,3 FROM DUAL WHERE 1 = 0);
+ROW(1,2) = (SELECT 1,3 FROM DUAL WHERE 1 = 0)
+NULL
+CREATE TABLE t1 (i INT);
+INSERT INTO t1 () VALUES (1), (2), (3);
+SELECT ROW(1,2) = (SELECT 1,2 FROM t1 WHERE 1 = 0);
+ROW(1,2) = (SELECT 1,2 FROM t1 WHERE 1 = 0)
+NULL
+SELECT ROW(1,2) = (SELECT 1,3 FROM t1 WHERE 1 = 0);
+ROW(1,2) = (SELECT 1,3 FROM t1 WHERE 1 = 0)
+NULL
+SELECT i FROM t1 WHERE ROW(1,2) = (SELECT 1,2 FROM DUAL WHERE 1 = 0);
+i
+SELECT i FROM t1 WHERE ROW(1,2) = (SELECT 1,3 FROM DUAL WHERE 1 = 0);
+i
+DROP TABLE t1;
+End of 5.1 tests

=== modified file 'mysql-test/r/subselect.result'
--- a/mysql-test/r/subselect.result	2010-11-23 18:43:34 +0000
+++ b/mysql-test/r/subselect.result	2010-11-25 20:41:38 +0000
@@ -922,7 +922,7 @@ select a, (select a,b,c from t1 where t1
 a	(select a,b,c from t1 where t1.a=t2.a) = ROW(a,2,'a')	(select c from t1 where a=t2.a)
 1	1	a
 2	0	b
-NULL	0	NULL
+NULL	NULL	NULL
 select a, (select a,b,c from t1 where t1.a=t2.a) = ROW(a,3,'b'),(select c from t1 where a=t2.a) from t2;
 a	(select a,b,c from t1 where t1.a=t2.a) = ROW(a,3,'b')	(select c from t1 where a=t2.a)
 1	0	a
@@ -932,7 +932,7 @@ select a, (select a,b,c from t1 where t1
 a	(select a,b,c from t1 where t1.a=t2.a) = ROW(a,4,'c')	(select c from t1 where a=t2.a)
 1	0	a
 2	0	b
-NULL	0	NULL
+NULL	NULL	NULL
 drop table t1,t2;
 create table t1 (a int, b real, c varchar(10));
 insert into t1 values (1, 1, 'a'), (2,2,'b'), (NULL, 2, 'b');

=== modified file 'mysql-test/r/subselect4.result'
--- a/mysql-test/r/subselect4.result	2010-10-19 13:58:35 +0000
+++ b/mysql-test/r/subselect4.result	2010-11-23 21:39:59 +0000
@@ -99,6 +99,92 @@ Note	1249	Select 2 was reduced during op
 CREATE VIEW v1 AS SELECT 1 LIKE ( 1 IN ( SELECT 1 ) );
 CREATE VIEW v2 AS SELECT 1 LIKE '%' ESCAPE ( 1 IN ( SELECT 1 ) );
 DROP VIEW v1, v2;
+# 
+# Bug#51070: Query with a NOT IN subquery predicate returns a wrong
+# result set
+# 
+CREATE TABLE t1 ( a INT, b INT );
+INSERT INTO t1 VALUES ( 1, NULL ), ( 2, NULL );
+CREATE TABLE t2 ( c INT, d INT );
+INSERT INTO t2 VALUES ( NULL, 3 ), ( NULL, 4 );
+CREATE TABLE t3 ( e INT, f INT );
+INSERT INTO t3 VALUES ( NULL, NULL ), ( NULL, NULL );
+CREATE TABLE t4 ( a INT );
+INSERT INTO t4 VALUES (1), (2), (3);
+CREATE TABLE t5 ( a INT );
+INSERT INTO t5 VALUES (NULL), (2);
+EXPLAIN
+SELECT * FROM t1 WHERE ( a, b ) NOT IN ( SELECT c, d FROM t2 );
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+x	PRIMARY	x	x	x	x	x	x	x	x
+x	DEPENDENT SUBQUERY	x	x	x	x	x	x	x	x
+SELECT * FROM t1 WHERE ( a, b ) NOT IN ( SELECT c, d FROM t2 );
+a	b
+EXPLAIN
+SELECT * FROM t1 WHERE ( a, b ) NOT IN ( SELECT c, d FROM t2 ) IS NULL;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	t1	ALL	NULL	NULL	NULL	NULL	2	Using where
+2	DEPENDENT SUBQUERY	t2	ALL	NULL	NULL	NULL	NULL	2	Using where
+SELECT * FROM t1 WHERE ( a, b ) NOT IN ( SELECT c, d FROM t2 ) IS NULL;
+a	b
+1	NULL
+2	NULL
+SELECT * FROM t1 WHERE ( a, b ) IN ( SELECT c, d FROM t2 ) IS NULL;
+a	b
+1	NULL
+2	NULL
+SELECT * FROM t1 WHERE ( a, b ) NOT IN ( SELECT c, d FROM t2 ) IS UNKNOWN;
+a	b
+1	NULL
+2	NULL
+SELECT * FROM t1 WHERE (( a, b ) NOT IN ( SELECT c, d FROM t2 )) IS UNKNOWN;
+a	b
+1	NULL
+2	NULL
+SELECT * FROM t1 WHERE 1 = 1 AND ( a, b ) NOT IN ( SELECT c, d FROM t2 );
+a	b
+EXPLAIN
+SELECT * FROM t1 WHERE ( a, b ) NOT IN ( SELECT e, f FROM t3 );
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+x	PRIMARY	x	x	x	x	x	x	x	x
+x	DEPENDENT SUBQUERY	x	x	x	x	x	x	x	x
+SELECT * FROM t1 WHERE ( a, b ) NOT IN ( SELECT e, f FROM t3 );
+a	b
+EXPLAIN
+SELECT * FROM t2 WHERE ( c, d ) NOT IN ( SELECT a, b FROM t1 );
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+x	PRIMARY	x	x	x	x	x	x	x	x
+x	DEPENDENT SUBQUERY	x	x	x	x	x	x	x	x
+SELECT * FROM t2 WHERE ( c, d ) NOT IN ( SELECT a, b FROM t1 );
+c	d
+EXPLAIN
+SELECT * FROM t3 WHERE ( e, f ) NOT IN ( SELECT c, d FROM t2 );
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+x	PRIMARY	x	x	x	x	x	x	x	x
+x	DEPENDENT SUBQUERY	x	x	x	x	x	x	x	x
+SELECT * FROM t3 WHERE ( e, f ) NOT IN ( SELECT c, d FROM t2 );
+e	f
+EXPLAIN
+SELECT * FROM t2 WHERE ( c, d ) NOT IN ( SELECT e, f FROM t3 );
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+x	PRIMARY	x	x	x	x	x	x	x	x
+x	DEPENDENT SUBQUERY	x	x	x	x	x	x	x	x
+SELECT * FROM t2 WHERE ( c, d ) NOT IN ( SELECT e, f FROM t3 );
+c	d
+SELECT * FROM t1 WHERE ( a, b ) NOT IN 
+( SELECT c, d FROM t2 WHERE c = 1 AND c <> 1 );
+a	b
+1	NULL
+2	NULL
+SELECT * FROM t1 WHERE b NOT IN ( SELECT c FROM t2 WHERE c = 1 );
+a	b
+1	NULL
+2	NULL
+SELECT * FROM t1 WHERE NULL NOT IN ( SELECT c FROM t2 WHERE c = 1 AND c <> 1 );
+a	b
+1	NULL
+2	NULL
+DROP TABLE t1, t2, t3, t4, t5;
 #
 # End of 5.1 tests.
 #

=== modified file 'mysql-test/r/trigger_notembedded.result'
--- a/mysql-test/r/trigger_notembedded.result	2010-01-12 08:19:48 +0000
+++ b/mysql-test/r/trigger_notembedded.result	2010-11-23 21:39:59 +0000
@@ -501,4 +501,25 @@ SHOW CREATE TRIGGER db1.trg;
 ERROR 42000: Access denied; you need the TRIGGER privilege for this operation
 DROP USER 'no_rights'@'localhost';
 DROP DATABASE db1;
+DROP DATABASE IF EXISTS mysqltest_db1;
+CREATE DATABASE mysqltest_db1;
+USE mysqltest_db1;
+GRANT ALL ON mysqltest_db1.* TO mysqltest_u1 at localhost;
+CREATE TABLE t1 (
+a1 int,
+a2 int
+);
+INSERT INTO t1 VALUES (1, 20);
+CREATE TRIGGER mysqltest_db1.upd_t1
+BEFORE UPDATE ON t1 FOR EACH ROW SET new.a2 = 200;
+CREATE TABLE t2 (
+a1 int
+);
+INSERT INTO t2 VALUES (2);
+REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_u1 at localhost;
+UPDATE IGNORE t1, t2 SET t1.a1 = 2, t2.a1 = 3 WHERE t1.a1 = 1 AND t2.a1 = 2;
+ERROR 42000: TRIGGER command denied to user 'mysqltest_u1'@'localhost' for table 't1'
+DROP DATABASE mysqltest_db1;
+DROP USER mysqltest_u1 at localhost;
+USE test;
 End of 5.1 tests.

=== modified file 'mysql-test/r/type_timestamp.result'
--- a/mysql-test/r/type_timestamp.result	2010-02-09 10:30:50 +0000
+++ b/mysql-test/r/type_timestamp.result	2010-09-13 07:18:35 +0000
@@ -527,3 +527,24 @@ f1	f2-f3
 5	0
 DROP TABLE t1;
 End of 5.0 tests
+#
+# Bug #55779: select does not work properly in mysql server
+#             Version "5.1.42 SUSE MySQL RPM"
+#
+CREATE TABLE t1 (a TIMESTAMP, KEY (a));
+INSERT INTO t1 VALUES ('2000-01-01 00:00:00'), ('2000-01-01 00:00:00'),
+('2000-01-01 00:00:01'), ('2000-01-01 00:00:01');
+SELECT a FROM t1 WHERE a >=  20000101000000;
+a
+2000-01-01 00:00:00
+2000-01-01 00:00:00
+2000-01-01 00:00:01
+2000-01-01 00:00:01
+SELECT a FROM t1 WHERE a >= '20000101000000';
+a
+2000-01-01 00:00:00
+2000-01-01 00:00:00
+2000-01-01 00:00:01
+2000-01-01 00:00:01
+DROP TABLE t1;
+End of 5.1 tests

=== modified file 'mysql-test/r/variables_debug.result'
--- a/mysql-test/r/variables_debug.result	2010-08-02 09:01:24 +0000
+++ b/mysql-test/r/variables_debug.result	2010-11-23 21:39:59 +0000
@@ -24,4 +24,17 @@ SELECT @@global.debug;
 @@global.debug
 
 SET GLOBAL debug=@old_debug;
+#
+# Bug #56709: Memory leaks at running the 5.1 test suite
+# 
+SET @old_local_debug = @@debug;
+SET @@debug='d,foo';
+SELECT @@debug;
+@@debug
+d,foo
+SET @@debug='';
+SELECT @@debug;
+@@debug
+
+SET @@debug = @old_local_debug;
 End of 5.1 tests

=== modified file 'mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result'
--- a/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result	2010-05-04 19:31:49 +0000
+++ b/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result	2010-09-02 13:05:06 +0000
@@ -48,12 +48,12 @@ Log_name	Pos	Event_type	Server_id	End_lo
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
 master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Query	#	#	SAVEPOINT my_savepoint
+master-bin.000001	#	Query	#	#	SAVEPOINT `my_savepoint`
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
 master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
 master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Query	#	#	ROLLBACK TO my_savepoint
+master-bin.000001	#	Query	#	#	ROLLBACK TO `my_savepoint`
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 delete from t1;
 delete from t2;
@@ -77,12 +77,12 @@ Log_name	Pos	Event_type	Server_id	End_lo
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
 master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Query	#	#	SAVEPOINT my_savepoint
+master-bin.000001	#	Query	#	#	SAVEPOINT `my_savepoint`
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
 master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t2)
 master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Query	#	#	ROLLBACK TO my_savepoint
+master-bin.000001	#	Query	#	#	ROLLBACK TO `my_savepoint`
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
 master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */

=== modified file 'mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result'
--- a/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result	2010-05-19 17:01:12 +0000
+++ b/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result	2010-09-02 13:05:06 +0000
@@ -44,10 +44,10 @@ show binlog events from <binlog_start>;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(3)
-master-bin.000001	#	Query	#	#	SAVEPOINT my_savepoint
+master-bin.000001	#	Query	#	#	SAVEPOINT `my_savepoint`
 master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(4)
 master-bin.000001	#	Query	#	#	use `test`; insert into t2 select * from t1
-master-bin.000001	#	Query	#	#	ROLLBACK TO my_savepoint
+master-bin.000001	#	Query	#	#	ROLLBACK TO `my_savepoint`
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 delete from t1;
 delete from t2;
@@ -70,10 +70,10 @@ show binlog events from <binlog_start>;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(5)
-master-bin.000001	#	Query	#	#	SAVEPOINT my_savepoint
+master-bin.000001	#	Query	#	#	SAVEPOINT `my_savepoint`
 master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(6)
 master-bin.000001	#	Query	#	#	use `test`; insert into t2 select * from t1
-master-bin.000001	#	Query	#	#	ROLLBACK TO my_savepoint
+master-bin.000001	#	Query	#	#	ROLLBACK TO `my_savepoint`
 master-bin.000001	#	Query	#	#	use `test`; insert into t1 values(7)
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 delete from t1;

=== modified file 'mysql-test/suite/binlog/t/disabled.def'
--- a/mysql-test/suite/binlog/t/disabled.def	2009-02-06 16:06:41 +0000
+++ b/mysql-test/suite/binlog/t/disabled.def	2010-10-27 04:24:04 +0000
@@ -9,5 +9,6 @@
 #  Do not use any TAB characters for whitespace.
 #
 ##############################################################################
-binlog_truncate_innodb	: BUG#42643 2009-02-06 mats Changes to InnoDB requires to complete fix for BUG#36763
+binlog_truncate_innodb	: BUG#57291 2010-10-20 anitha Originally disabled due to BUG#42643. Product bug fixed, but test changes needed
+
 

=== added file 'mysql-test/suite/innodb/r/innodb_bug56143.result'
--- a/mysql-test/suite/innodb/r/innodb_bug56143.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/innodb/r/innodb_bug56143.result	2010-10-13 17:18:59 +0000
@@ -0,0 +1,560 @@
+SHOW CREATE TABLE bug56143;
+Table	Create Table
+bug56143	CREATE TABLE `bug56143` (
+  `a` int(11) DEFAULT NULL,
+  `b` int(11) DEFAULT NULL,
+  `c` int(11) DEFAULT NULL,
+  KEY `a` (`a`),
+  KEY `b` (`b`),
+  KEY `c` (`c`),
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa10` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa100` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa101` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa102` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa103` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa104` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa105` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa106` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa107` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa108` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa109` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa11` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa110` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa111` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa112` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa113` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa114` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa115` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa116` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa117` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa118` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa119` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa12` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa120` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa121` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa122` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa123` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa124` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa125` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa126` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa127` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa128` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa129` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa13` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa130` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa131` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa132` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa133` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa134` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa135` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa136` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa137` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa138` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa139` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa14` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa140` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa141` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa142` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa143` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa144` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa145` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa146` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa147` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa148` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa149` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa15` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa150` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa151` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa152` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa153` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa154` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa155` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa156` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa157` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa158` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa159` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa16` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa160` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa161` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa162` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa163` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa164` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa165` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa166` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa167` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa168` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa169` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa17` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa170` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa171` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa172` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa173` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa174` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa175` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa176` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa177` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa178` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa179` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa18` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa180` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa181` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa182` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa183` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa184` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa185` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa186` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa187` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa188` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa189` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa19` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa190` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa191` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa192` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa193` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa194` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa195` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa196` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa197` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa198` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa199` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa2` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa20` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa200` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa201` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa202` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa203` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa204` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa205` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa206` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa207` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa208` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa209` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa21` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa210` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa211` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa212` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa213` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa214` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa215` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa216` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa217` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa218` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa219` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa22` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa220` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa221` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa222` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa223` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa224` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa225` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa226` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa227` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa228` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa229` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa23` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa230` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa231` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa232` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa233` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa234` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa235` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa236` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa237` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa238` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa239` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa24` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa240` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa241` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa242` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa243` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa244` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa245` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa246` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa247` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa248` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa249` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa25` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa250` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa251` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa252` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa253` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa254` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa255` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa256` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa257` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa258` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa259` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa26` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa260` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa261` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa262` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa263` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa264` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa265` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa266` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa267` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa268` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa269` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa27` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa270` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa271` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa272` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa273` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa274` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa275` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa276` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa277` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa278` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa279` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa28` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa280` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa281` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa282` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa283` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa284` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa285` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa286` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa287` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa288` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa289` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa29` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa290` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa291` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa292` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa293` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa294` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa295` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa296` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa297` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa298` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa299` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa3` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa30` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa300` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa301` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa302` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa303` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa304` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa305` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa306` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa307` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa308` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa309` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa31` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa310` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa311` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa312` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa313` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa314` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa315` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa316` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa317` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa318` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa319` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa32` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa320` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa321` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa322` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa323` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa324` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa325` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa326` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa327` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa328` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa329` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa33` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa330` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa331` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa332` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa333` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa334` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa335` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa336` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa337` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa338` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa339` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa34` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa340` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa341` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa342` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa343` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa344` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa345` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa346` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa347` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa348` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa349` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa35` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa350` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa351` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa352` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa353` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa354` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa355` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa356` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa357` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa358` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa359` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa36` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa360` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa361` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa362` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa363` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa364` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa365` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa366` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa367` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa368` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa369` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa37` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa370` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa371` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa372` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa373` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa374` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa375` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa376` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa377` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa378` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa379` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa38` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa380` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa381` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa382` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa383` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa384` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa385` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa386` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa387` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa388` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa389` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa39` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa390` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa391` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa392` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa393` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa394` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa395` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa396` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa397` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa398` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa399` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa40` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa400` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa401` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa402` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa403` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa404` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa405` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa406` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa407` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa408` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa409` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa41` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa410` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa411` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa412` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa413` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa414` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa415` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa416` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa417` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa418` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa419` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa42` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa420` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa421` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa422` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa423` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa424` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa425` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa426` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa427` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa428` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa429` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa43` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa430` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa431` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa432` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa433` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa434` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa435` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa436` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa437` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa438` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa439` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa44` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa440` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa441` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa442` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa443` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa444` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa445` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa446` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa447` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa448` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa449` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa45` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa450` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa451` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa452` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa453` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa454` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa455` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa456` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa457` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa458` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa459` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa46` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa460` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa461` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa462` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa463` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa464` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa465` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa466` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa467` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa468` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa469` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa47` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa470` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa471` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa472` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa473` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa474` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa475` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa476` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa477` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa478` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa479` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa48` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa480` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa481` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa482` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa483` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa484` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa485` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa486` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa487` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa488` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa489` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa49` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa490` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa491` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa492` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa493` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa494` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa495` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa496` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa497` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa498` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa499` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa5` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa50` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa500` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa501` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa502` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa503` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa504` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa505` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa506` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa507` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa508` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa509` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa51` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa510` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa511` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa512` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa513` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa514` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa515` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa516` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa517` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa518` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa519` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa52` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa520` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa521` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa522` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa523` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa524` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa525` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa526` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa527` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa528` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa529` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa53` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa530` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa531` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa532` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa533` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa534` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa535` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa536` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa537` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa538` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa539` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa54` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa540` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa541` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa542` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa543` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa544` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa545` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa546` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa547` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa548` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa549` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa55` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa550` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa56` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa57` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa58` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa59` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa6` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa60` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa61` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa62` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa63` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa64` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa65` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa66` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa67` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa68` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa69` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa7` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa70` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa71` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa72` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa73` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa74` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa75` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa76` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa77` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa78` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa79` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa8` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa80` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa81` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa82` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa83` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa84` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa85` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa86` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa87` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa88` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa89` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa9` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa90` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa91` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa92` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa93` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa94` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa95` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa96` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa97` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa98` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa99` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1

=== added file 'mysql-test/suite/innodb/r/innodb_bug56680.result'
--- a/mysql-test/suite/innodb/r/innodb_bug56680.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/innodb/r/innodb_bug56680.result	2010-10-19 05:58:53 +0000
@@ -0,0 +1,102 @@
+SET GLOBAL tx_isolation='REPEATABLE-READ';
+CREATE TABLE bug56680(
+a INT AUTO_INCREMENT PRIMARY KEY,
+b CHAR(1),
+c INT,
+INDEX(b))
+ENGINE=InnoDB;
+INSERT INTO bug56680 VALUES(0,'x',1);
+BEGIN;
+SELECT b FROM bug56680;
+b
+x
+BEGIN;
+UPDATE bug56680 SET b='X';
+SELECT b FROM bug56680;
+b
+x
+SELECT * FROM bug56680;
+a	b	c
+1	x	1
+ROLLBACK;
+SELECT b FROM bug56680;
+b
+x
+SET GLOBAL tx_isolation='READ-UNCOMMITTED';
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+BEGIN;
+SELECT b FROM bug56680 LIMIT 2;
+b
+x
+x
+BEGIN;
+DELETE FROM bug56680 WHERE a=1;
+INSERT INTO bug56680 VALUES(1,'X',1);
+SELECT b FROM bug56680 LIMIT 3;
+b
+X
+x
+x
+SELECT b FROM bug56680 LIMIT 2;
+b
+x
+x
+CHECK TABLE bug56680;
+Table	Op	Msg_type	Msg_text
+test.bug56680	check	status	OK
+ROLLBACK;
+SELECT b FROM bug56680 LIMIT 2;
+b
+x
+x
+CHECK TABLE bug56680;
+Table	Op	Msg_type	Msg_text
+test.bug56680	check	status	OK
+SELECT b FROM bug56680 LIMIT 2;
+b
+x
+x
+CREATE TABLE bug56680_2(
+a INT AUTO_INCREMENT PRIMARY KEY,
+b VARCHAR(2) CHARSET latin1 COLLATE latin1_german2_ci,
+c INT,
+INDEX(b))
+ENGINE=InnoDB;
+INSERT INTO bug56680_2 SELECT 0,_latin1 0xdf,c FROM bug56680;
+BEGIN;
+SELECT HEX(b) FROM bug56680_2 LIMIT 2;
+HEX(b)
+DF
+DF
+DELETE FROM bug56680_2 WHERE a=1;
+INSERT INTO bug56680_2 VALUES(1,'SS',1);
+SELECT HEX(b) FROM bug56680_2 LIMIT 3;
+HEX(b)
+5353
+DF
+DF
+CHECK TABLE bug56680_2;
+Table	Op	Msg_type	Msg_text
+test.bug56680_2	check	status	OK
+DELETE FROM bug56680_2 WHERE a=1;
+INSERT INTO bug56680_2 VALUES(1,_latin1 0xdf,1);
+SELECT HEX(b) FROM bug56680_2 LIMIT 3;
+HEX(b)
+DF
+DF
+DF
+CHECK TABLE bug56680_2;
+Table	Op	Msg_type	Msg_text
+test.bug56680_2	check	status	OK
+DROP TABLE bug56680_2;
+DROP TABLE bug56680;

=== added file 'mysql-test/suite/innodb/r/innodb_bug56716.result'
--- a/mysql-test/suite/innodb/r/innodb_bug56716.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/innodb/r/innodb_bug56716.result	2010-10-04 10:05:21 +0000
@@ -0,0 +1,4 @@
+CREATE TABLE bug56716 (a INT PRIMARY KEY,b INT,c INT,INDEX(b)) ENGINE=InnoDB;
+SELECT * FROM bug56716 WHERE b<=42 ORDER BY b DESC FOR UPDATE;
+a	b	c
+DROP TABLE bug56716;

=== added file 'mysql-test/suite/innodb/r/innodb_bug57252.result'
--- a/mysql-test/suite/innodb/r/innodb_bug57252.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/innodb/r/innodb_bug57252.result	2010-10-18 10:48:11 +0000
@@ -0,0 +1,6 @@
+cardinality
+10
+Table	Op	Msg_type	Msg_text
+test.bug57252	analyze	status	OK
+cardinality
+10

=== added file 'mysql-test/suite/innodb/r/innodb_bug57255.result'
--- a/mysql-test/suite/innodb/r/innodb_bug57255.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/innodb/r/innodb_bug57255.result	2010-10-06 10:41:26 +0000
@@ -0,0 +1,10 @@
+create table A(id int not null primary key) engine=innodb;
+create table B(id int not null auto_increment primary key, f1 int not null, foreign key(f1) references A(id) on delete cascade) engine=innodb;
+create table C(id int not null auto_increment primary key, f1 int not null, foreign key(f1) references B(id) on delete cascade) engine=innodb;
+insert into A values(1), (2);
+DELETE FROM A where id = 1;
+DELETE FROM C where f1 = 2;
+DELETE FROM A where id = 1;
+DROP TABLE C;
+DROP TABLE B;
+DROP TABLE A;

=== modified file 'mysql-test/suite/innodb/r/innodb_mysql.result'
--- a/mysql-test/suite/innodb/r/innodb_mysql.result	2010-10-19 13:58:35 +0000
+++ b/mysql-test/suite/innodb/r/innodb_mysql.result	2010-11-23 21:39:59 +0000
@@ -2608,3 +2608,23 @@ Extra	Using index
 DROP TABLE t1;
 #
 End of 5.1 tests
+#
+# Test for bug #39932 "create table fails if column for FK is in different
+#                      case than in corr index".
+#
+drop tables if exists t1, t2;
+create table t1 (pk int primary key) engine=InnoDB;
+# Even although the below statement uses uppercased field names in
+# foreign key definition it still should be able to find explicitly
+# created supporting index. So it should succeed and should not
+# create any additional supporting indexes.
+create table t2 (fk int, key x (fk),
+constraint x foreign key (FK) references t1 (PK)) engine=InnoDB;
+show create table t2;
+Table	Create Table
+t2	CREATE TABLE `t2` (
+  `fk` int(11) DEFAULT NULL,
+  KEY `x` (`fk`),
+  CONSTRAINT `x` FOREIGN KEY (`fk`) REFERENCES `t1` (`pk`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+drop table t2, t1;

=== modified file 'mysql-test/suite/innodb/t/innodb_bug53756.test'
--- a/mysql-test/suite/innodb/t/innodb_bug53756.test	2010-07-06 02:26:38 +0000
+++ b/mysql-test/suite/innodb/t/innodb_bug53756.test	2010-09-30 08:28:22 +0000
@@ -34,8 +34,8 @@ INSERT INTO bug_53756 VALUES(1, 11), (2,
 --echo
 --echo # Select a less restrictive isolation level.
 # Don't use user variables. They won't survive server crash.
---let $global_isolation= `SELECT @@global.tx_isolation`;
---let $session_isolation= `SELECT @@session.tx_isolation`;
+--let $global_isolation= `SELECT @@global.tx_isolation`
+--let $session_isolation= `SELECT @@session.tx_isolation`
 SET GLOBAL TRANSACTION ISOLATION LEVEL READ COMMITTED;
 SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
 COMMIT;

=== added file 'mysql-test/suite/innodb/t/innodb_bug56143.test'
--- a/mysql-test/suite/innodb/t/innodb_bug56143.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/innodb/t/innodb_bug56143.test	2010-11-25 18:55:52 +0000
@@ -0,0 +1,580 @@
+#
+# Bug#56143 too many foreign keys causes output of show create table to become invalid
+# http://bugs.mysql.com/56143
+#
+
+-- source include/have_innodb.inc
+-- source include/have_not_innodb_plugin.inc
+
+-- disable_query_log
+-- disable_result_log
+
+SET foreign_key_checks=0;
+DROP TABLE IF EXISTS bug56143;
+CREATE TABLE `bug56143` (
+  `a` int(11) DEFAULT NULL,
+  `b` int(11) DEFAULT NULL,
+  `c` int(11) DEFAULT NULL,
+  KEY `a` (`a`),
+  KEY `b` (`b`),
+  KEY `c` (`c`),
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa10` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa100` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa101` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa102` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa103` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa104` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa105` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa106` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa107` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa108` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa109` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa11` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa110` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa111` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa112` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa113` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa114` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa115` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa116` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa117` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa118` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa119` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa12` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa120` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa121` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa122` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa123` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa124` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa125` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa126` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa127` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa128` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa129` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa13` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa130` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa131` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa132` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa133` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa134` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa135` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa136` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa137` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa138` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa139` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa14` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa140` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa141` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa142` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa143` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa144` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa145` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa146` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa147` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa148` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa149` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa15` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa150` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa151` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa152` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa153` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa154` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa155` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa156` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa157` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa158` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa159` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa16` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa160` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa161` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa162` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa163` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa164` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa165` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa166` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa167` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa168` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa169` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa17` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa170` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa171` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa172` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa173` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa174` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa175` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa176` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa177` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa178` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa179` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa18` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa180` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa181` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa182` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa183` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa184` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa185` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa186` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa187` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa188` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa189` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa19` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa190` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa191` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa192` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa193` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa194` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa195` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa196` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa197` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa198` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa199` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa2` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa20` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa200` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa201` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa202` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa203` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa204` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa205` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa206` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa207` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa208` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa209` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa21` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa210` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa211` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa212` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa213` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa214` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa215` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa216` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa217` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa218` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa219` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa22` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa220` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa221` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa222` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa223` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa224` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa225` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa226` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa227` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa228` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa229` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa23` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa230` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa231` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa232` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa233` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa234` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa235` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa236` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa237` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa238` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa239` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa24` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa240` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa241` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa242` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa243` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa244` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa245` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa246` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa247` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa248` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa249` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa25` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa250` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa251` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa252` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa253` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa254` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa255` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa256` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa257` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa258` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa259` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa26` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa260` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa261` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa262` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa263` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa264` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa265` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa266` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa267` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa268` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa269` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa27` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa270` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa271` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa272` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa273` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa274` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa275` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa276` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa277` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa278` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa279` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa28` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa280` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa281` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa282` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa283` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa284` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa285` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa286` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa287` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa288` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa289` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa29` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa290` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa291` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa292` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa293` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa294` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa295` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa296` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa297` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa298` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa299` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa3` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa30` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa300` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa301` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa302` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa303` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa304` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa305` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa306` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa307` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa308` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa309` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa31` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa310` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa311` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa312` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa313` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa314` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa315` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa316` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa317` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa318` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa319` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa32` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa320` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa321` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa322` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa323` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa324` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa325` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa326` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa327` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa328` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa329` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa33` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa330` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa331` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa332` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa333` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa334` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa335` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa336` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa337` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa338` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa339` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa34` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa340` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa341` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa342` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa343` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa344` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa345` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa346` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa347` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa348` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa349` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa35` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa350` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa351` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa352` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa353` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa354` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa355` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa356` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa357` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa358` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa359` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa36` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa360` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa361` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa362` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa363` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa364` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa365` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa366` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa367` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa368` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa369` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa37` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa370` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa371` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa372` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa373` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa374` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa375` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa376` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa377` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa378` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa379` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa38` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa380` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa381` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa382` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa383` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa384` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa385` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa386` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa387` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa388` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa389` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa39` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa390` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa391` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa392` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa393` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa394` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa395` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa396` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa397` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa398` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa399` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa40` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa400` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa401` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa402` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa403` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa404` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa405` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa406` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa407` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa408` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa409` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa41` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa410` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa411` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa412` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa413` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa414` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa415` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa416` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa417` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa418` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa419` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa42` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa420` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa421` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa422` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa423` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa424` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa425` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa426` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa427` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa428` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa429` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa43` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa430` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa431` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa432` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa433` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa434` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa435` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa436` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa437` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa438` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa439` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa44` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa440` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa441` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa442` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa443` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa444` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa445` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa446` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa447` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa448` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa449` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa45` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa450` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa451` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa452` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa453` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa454` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa455` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa456` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa457` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa458` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa459` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa46` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa460` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa461` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa462` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa463` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa464` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa465` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa466` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa467` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa468` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa469` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa47` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa470` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa471` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa472` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa473` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa474` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa475` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa476` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa477` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa478` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa479` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa48` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa480` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa481` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa482` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa483` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa484` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa485` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa486` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa487` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa488` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa489` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa49` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa490` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa491` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa492` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa493` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa494` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa495` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa496` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa497` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa498` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa499` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa5` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa50` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa500` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa501` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa502` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa503` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa504` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa505` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa506` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa507` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa508` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa509` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa51` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa510` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa511` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa512` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa513` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa514` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa515` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa516` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa517` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa518` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa519` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa52` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa520` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa521` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa522` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa523` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa524` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa525` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa526` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa527` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa528` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa529` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa53` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa530` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa531` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa532` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa533` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa534` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa535` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa536` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa537` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa538` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa539` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa54` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa540` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa541` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa542` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa543` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa544` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa545` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa546` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa547` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa548` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa549` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa55` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa550` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa56` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa57` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa58` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa59` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa6` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa60` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa61` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa62` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa63` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa64` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa65` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa66` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa67` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa68` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa69` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa7` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa70` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa71` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa72` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa73` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa74` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa75` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa76` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa77` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa78` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa79` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa8` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa80` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa81` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa82` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa83` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa84` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa85` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa86` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa87` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa88` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa89` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa9` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa90` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa91` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa92` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa93` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa94` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa95` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa96` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa97` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa98` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa99` FOREIGN KEY (`b`) REFERENCES `bug56143` (`b`) ON UPDATE SET NULL
+) ENGINE=InnoDB;
+
+-- enable_query_log
+-- enable_result_log
+
+SHOW CREATE TABLE bug56143;
+
+-- disable_query_log
+-- disable_result_log
+DROP TABLE bug56143;

=== added file 'mysql-test/suite/innodb/t/innodb_bug56680.test'
--- a/mysql-test/suite/innodb/t/innodb_bug56680.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/innodb/t/innodb_bug56680.test	2010-10-19 05:58:53 +0000
@@ -0,0 +1,130 @@
+#
+# Bug #56680 InnoDB may return wrong results from a case-insensitive index
+#
+-- source include/have_innodb.inc
+
+-- disable_query_log
+SET @tx_isolation_orig = @@tx_isolation;
+# The flag innodb_change_buffering_debug is only available in debug builds.
+# It instructs InnoDB to try to evict pages from the buffer pool when
+# change buffering is possible, so that the change buffer will be used
+# whenever possible.
+-- error 0,ER_UNKNOWN_SYSTEM_VARIABLE
+SET @innodb_change_buffering_debug_orig = @@innodb_change_buffering_debug;
+-- error 0,ER_UNKNOWN_SYSTEM_VARIABLE
+SET GLOBAL innodb_change_buffering_debug = 1;
+-- enable_query_log
+SET GLOBAL tx_isolation='REPEATABLE-READ';
+
+CREATE TABLE bug56680(
+       a INT AUTO_INCREMENT PRIMARY KEY,
+       b CHAR(1),
+       c INT,
+       INDEX(b))
+ENGINE=InnoDB;
+
+INSERT INTO bug56680 VALUES(0,'x',1);
+BEGIN;
+SELECT b FROM bug56680;
+
+connect (con1,localhost,root,,);
+connection con1;
+BEGIN;
+UPDATE bug56680 SET b='X';
+
+connection default;
+# This should return the last committed value 'x', but would return 'X'
+# due to a bug in row_search_for_mysql().
+SELECT b FROM bug56680;
+# This would always return the last committed value 'x'.
+SELECT * FROM bug56680;
+
+connection con1;
+ROLLBACK;
+disconnect con1;
+
+connection default;
+
+SELECT b FROM bug56680;
+
+# For the rest of this test, use the READ UNCOMMITTED isolation level
+# to see what exists in the secondary index.
+SET GLOBAL tx_isolation='READ-UNCOMMITTED';
+
+# Create enough rows for the table, so that the insert buffer will be
+# used for modifying the secondary index page. There must be multiple
+# index pages, because changes to the root page are never buffered.
+
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+
+BEGIN;
+SELECT b FROM bug56680 LIMIT 2;
+
+connect (con1,localhost,root,,);
+connection con1;
+BEGIN;
+DELETE FROM bug56680 WHERE a=1;
+# This should be buffered, if innodb_change_buffering_debug = 1 is in effect.
+INSERT INTO bug56680 VALUES(1,'X',1);
+
+# This should force an insert buffer merge, and return 'X' in the first row.
+SELECT b FROM bug56680 LIMIT 3;
+
+connection default;
+SELECT b FROM bug56680 LIMIT 2;
+CHECK TABLE bug56680;
+
+connection con1;
+ROLLBACK;
+SELECT b FROM bug56680 LIMIT 2;
+CHECK TABLE bug56680;
+
+connection default;
+disconnect con1;
+
+SELECT b FROM bug56680 LIMIT 2;
+
+CREATE TABLE bug56680_2(
+       a INT AUTO_INCREMENT PRIMARY KEY,
+       b VARCHAR(2) CHARSET latin1 COLLATE latin1_german2_ci,
+       c INT,
+       INDEX(b))
+ENGINE=InnoDB;
+
+INSERT INTO bug56680_2 SELECT 0,_latin1 0xdf,c FROM bug56680;
+
+BEGIN;
+SELECT HEX(b) FROM bug56680_2 LIMIT 2;
+DELETE FROM bug56680_2 WHERE a=1;
+# This should be buffered, if innodb_change_buffering_debug = 1 is in effect.
+INSERT INTO bug56680_2 VALUES(1,'SS',1);
+
+# This should force an insert buffer merge, and return 'SS' in the first row.
+SELECT HEX(b) FROM bug56680_2 LIMIT 3;
+CHECK TABLE bug56680_2;
+
+DELETE FROM bug56680_2 WHERE a=1;
+# This should be buffered, if innodb_change_buffering_debug = 1 is in effect.
+INSERT INTO bug56680_2 VALUES(1,_latin1 0xdf,1);
+
+# This should force an insert buffer merge, and return 0xdf in the first row.
+SELECT HEX(b) FROM bug56680_2 LIMIT 3;
+CHECK TABLE bug56680_2;
+
+DROP TABLE bug56680_2;
+DROP TABLE bug56680;
+
+-- disable_query_log
+SET GLOBAL tx_isolation = @tx_isolation_orig;
+-- error 0, ER_UNKNOWN_SYSTEM_VARIABLE
+SET GLOBAL innodb_change_buffering_debug = @innodb_change_buffering_debug_orig;

=== added file 'mysql-test/suite/innodb/t/innodb_bug56716.test'
--- a/mysql-test/suite/innodb/t/innodb_bug56716.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/innodb/t/innodb_bug56716.test	2010-10-04 10:05:21 +0000
@@ -0,0 +1,10 @@
+#
+# Bug #56716 InnoDB locks a record gap without locking the table
+#
+-- source include/have_innodb.inc
+
+CREATE TABLE bug56716 (a INT PRIMARY KEY,b INT,c INT,INDEX(b)) ENGINE=InnoDB;
+
+SELECT * FROM bug56716 WHERE b<=42 ORDER BY b DESC FOR UPDATE;
+
+DROP TABLE bug56716;

=== added file 'mysql-test/suite/innodb/t/innodb_bug57252.test'
--- a/mysql-test/suite/innodb/t/innodb_bug57252.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/innodb/t/innodb_bug57252.test	2010-10-18 10:48:11 +0000
@@ -0,0 +1,46 @@
+#
+# Bug#57252 disabling innobase_stats_on_metadata disables ANALYZE
+# http://bugs.mysql.com/57252
+#
+
+-- source include/have_innodb.inc
+
+-- disable_query_log
+-- disable_result_log
+
+SET @innodb_stats_on_metadata_orig = @@innodb_stats_on_metadata;
+
+CREATE TABLE bug57252 (a INT, KEY akey (a)) ENGINE=INNODB;
+
+BEGIN;
+let $i = 10;
+while ($i) {
+	eval INSERT INTO bug57252 VALUES ($i);
+	dec $i;
+}
+COMMIT;
+
+-- enable_result_log
+
+SET GLOBAL innodb_stats_on_metadata=0;
+
+# this calls ::info() without HA_STATUS_CONST and so
+# index->stat_n_diff_key_vals[] is not copied to the mysql-visible
+# rec_per_key
+SELECT cardinality FROM information_schema.statistics
+WHERE table_name='bug57252' AND index_name='akey';
+
+# this calls ::info() with HA_STATUS_CONST and so
+# index->stat_n_diff_key_vals[] is copied to the mysql-visible
+# rec_per_key at the end; when the bug is present dict_update_statistics()
+# is not called beforehand and so index->stat_n_diff_key_vals[] contains
+# an outdated data and thus we get an outdated data in the result when the
+# bug is present
+ANALYZE TABLE bug57252;
+
+SELECT cardinality FROM information_schema.statistics
+WHERE table_name='bug57252' AND index_name='akey';
+
+DROP TABLE bug57252;
+
+SET GLOBAL innodb_stats_on_metadata = @innodb_stats_on_metadata_orig;

=== added file 'mysql-test/suite/innodb/t/innodb_bug57255.test'
--- a/mysql-test/suite/innodb/t/innodb_bug57255.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/innodb/t/innodb_bug57255.test	2010-10-06 10:41:26 +0000
@@ -0,0 +1,36 @@
+# Test Bug #57255. Cascade deletes that affect different rows should not
+# result in DB_FOREIGN_EXCEED_MAX_CASCADE error
+
+--source include/have_innodb.inc
+
+create table A(id int not null primary key) engine=innodb;
+
+create table B(id int not null auto_increment primary key, f1 int not null, foreign key(f1) references A(id) on delete cascade) engine=innodb;
+
+create table C(id int not null auto_increment primary key, f1 int not null, foreign key(f1) references B(id) on delete cascade) engine=innodb;
+
+insert into A values(1), (2);
+
+--disable_query_log
+let $i=257;
+while ($i)
+{
+insert into B(f1) values(1);
+dec $i;
+}
+let $i=486;
+while ($i)
+{
+insert into C(f1) values(2);
+dec $i;
+}
+--enable_query_log
+
+# Following Deletes should not report error
+DELETE FROM A where id = 1;
+DELETE FROM C where f1 = 2;
+DELETE FROM A where id = 1;
+
+DROP TABLE C;
+DROP TABLE B;
+DROP TABLE A;

=== modified file 'mysql-test/suite/innodb/t/innodb_mysql.test'
--- a/mysql-test/suite/innodb/t/innodb_mysql.test	2010-10-19 13:58:35 +0000
+++ b/mysql-test/suite/innodb/t/innodb_mysql.test	2010-11-23 21:39:59 +0000
@@ -844,3 +844,21 @@ DROP TABLE t1;
 
 
 --echo End of 5.1 tests
+
+
+--echo #
+--echo # Test for bug #39932 "create table fails if column for FK is in different
+--echo #                      case than in corr index".
+--echo #
+--disable_warnings
+drop tables if exists t1, t2;
+--enable_warnings
+create table t1 (pk int primary key) engine=InnoDB;
+--echo # Even although the below statement uses uppercased field names in
+--echo # foreign key definition it still should be able to find explicitly
+--echo # created supporting index. So it should succeed and should not
+--echo # create any additional supporting indexes.
+create table t2 (fk int, key x (fk),
+                 constraint x foreign key (FK) references t1 (PK)) engine=InnoDB;
+show create table t2;
+drop table t2, t1;

=== added file 'mysql-test/suite/innodb_plugin/r/innodb_bug53756.result'
--- a/mysql-test/suite/innodb_plugin/r/innodb_bug53756.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/innodb_plugin/r/innodb_bug53756.result	2010-09-07 05:41:37 +0000
@@ -0,0 +1,118 @@
+DROP TABLE IF EXISTS bug_53756 ;
+CREATE TABLE bug_53756 (pk INT, c1 INT) ENGINE=InnoDB;
+ALTER TABLE bug_53756 ADD PRIMARY KEY (pk);
+INSERT INTO bug_53756 VALUES(1, 11), (2, 22), (3, 33), (4, 44);
+
+# Select a less restrictive isolation level.
+SET GLOBAL TRANSACTION ISOLATION LEVEL READ COMMITTED;
+SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
+COMMIT;
+
+# Start a transaction in the default connection for isolation.
+START TRANSACTION;
+SELECT @@tx_isolation;
+@@tx_isolation
+READ-COMMITTED
+SELECT * FROM bug_53756;
+pk	c1
+1	11
+2	22
+3	33
+4	44
+
+# connection con1 deletes row 1
+START TRANSACTION;
+SELECT @@tx_isolation;
+@@tx_isolation
+READ-COMMITTED
+DELETE FROM bug_53756 WHERE pk=1;
+
+# connection con2 deletes row 2
+START TRANSACTION;
+SELECT @@tx_isolation;
+@@tx_isolation
+READ-COMMITTED
+DELETE FROM bug_53756 WHERE pk=2;
+
+# connection con3 updates row 3
+START TRANSACTION;
+SELECT @@tx_isolation;
+@@tx_isolation
+READ-COMMITTED
+UPDATE bug_53756 SET c1=77 WHERE pk=3;
+
+# connection con4 updates row 4
+START TRANSACTION;
+SELECT @@tx_isolation;
+@@tx_isolation
+READ-COMMITTED
+UPDATE bug_53756 SET c1=88 WHERE pk=4;
+
+# connection con5 inserts row 5
+START TRANSACTION;
+SELECT @@tx_isolation;
+@@tx_isolation
+READ-COMMITTED
+INSERT INTO bug_53756 VALUES(5, 55);
+
+# connection con6 inserts row 6
+START TRANSACTION;
+SELECT @@tx_isolation;
+@@tx_isolation
+READ-COMMITTED
+INSERT INTO bug_53756 VALUES(6, 66);
+
+# connection con1 commits.
+COMMIT;
+
+# connection con3 commits.
+COMMIT;
+
+# connection con4 rolls back.
+ROLLBACK;
+
+# connection con6 rolls back.
+ROLLBACK;
+
+# The connections 2 and 5 stay open.
+
+# connection default selects resulting data.
+# Delete of row 1 was committed.
+# Update of row 3 was committed.
+# Due to isolation level read committed, these should be included.
+# All other changes should not be included.
+SELECT * FROM bug_53756;
+pk	c1
+2	22
+3	77
+4	44
+
+# connection default
+#
+# Crash server.
+START TRANSACTION;
+INSERT INTO bug_53756 VALUES (666,666);
+SET SESSION debug="+d,crash_commit_before";
+COMMIT;
+ERROR HY000: Lost connection to MySQL server during query
+
+#
+# disconnect con1, con2, con3, con4, con5, con6.
+#
+# Restart server.
+
+#
+# Select recovered data.
+# Delete of row 1 was committed.
+# Update of row 3 was committed.
+# These should be included.
+# All other changes should not be included.
+# Delete of row 2 and insert of row 5 should be rolled back
+SELECT * FROM bug_53756;
+pk	c1
+2	22
+3	77
+4	44
+
+# Clean up.
+DROP TABLE bug_53756;

=== added file 'mysql-test/suite/innodb_plugin/r/innodb_bug56143.result'
--- a/mysql-test/suite/innodb_plugin/r/innodb_bug56143.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/innodb_plugin/r/innodb_bug56143.result	2010-10-14 09:28:25 +0000
@@ -0,0 +1,556 @@
+SHOW CREATE TABLE bug56143_2;
+Table	Create Table
+bug56143_2	CREATE TABLE `bug56143_2` (
+  `a` int(11) DEFAULT NULL,
+  KEY `a` (`a`),
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa10` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa100` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa101` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa102` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa103` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa104` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa105` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa106` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa107` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa108` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa109` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa11` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa110` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa111` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa112` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa113` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa114` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa115` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa116` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa117` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa118` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa119` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa12` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa120` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa121` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa122` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa123` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa124` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa125` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa126` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa127` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa128` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa129` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa13` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa130` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa131` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa132` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa133` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa134` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa135` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa136` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa137` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa138` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa139` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa14` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa140` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa141` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa142` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa143` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa144` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa145` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa146` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa147` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa148` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa149` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa15` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa150` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa151` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa152` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa153` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa154` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa155` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa156` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa157` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa158` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa159` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa16` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa160` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa161` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa162` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa163` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa164` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa165` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa166` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa167` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa168` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa169` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa17` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa170` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa171` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa172` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa173` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa174` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa175` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa176` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa177` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa178` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa179` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa18` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa180` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa181` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa182` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa183` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa184` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa185` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa186` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa187` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa188` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa189` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa19` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa190` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa191` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa192` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa193` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa194` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa195` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa196` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa197` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa198` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa199` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa2` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa20` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa200` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa201` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa202` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa203` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa204` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa205` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa206` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa207` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa208` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa209` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa21` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa210` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa211` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa212` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa213` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa214` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa215` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa216` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa217` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa218` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa219` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa22` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa220` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa221` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa222` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa223` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa224` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa225` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa226` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa227` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa228` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa229` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa23` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa230` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa231` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa232` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa233` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa234` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa235` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa236` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa237` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa238` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa239` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa24` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa240` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa241` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa242` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa243` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa244` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa245` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa246` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa247` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa248` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa249` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa25` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa250` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa251` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa252` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa253` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa254` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa255` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa256` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa257` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa258` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa259` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa26` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa260` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa261` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa262` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa263` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa264` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa265` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa266` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa267` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa268` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa269` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa27` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa270` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa271` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa272` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa273` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa274` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa275` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa276` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa277` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa278` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa279` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa28` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa280` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa281` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa282` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa283` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa284` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa285` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa286` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa287` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa288` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa289` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa29` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa290` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa291` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa292` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa293` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa294` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa295` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa296` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa297` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa298` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa299` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa3` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa30` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa300` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa301` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa302` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa303` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa304` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa305` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa306` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa307` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa308` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa309` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa31` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa310` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa311` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa312` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa313` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa314` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa315` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa316` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa317` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa318` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa319` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa32` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa320` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa321` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa322` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa323` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa324` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa325` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa326` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa327` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa328` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa329` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa33` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa330` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa331` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa332` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa333` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa334` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa335` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa336` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa337` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa338` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa339` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa34` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa340` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa341` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa342` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa343` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa344` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa345` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa346` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa347` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa348` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa349` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa35` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa350` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa351` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa352` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa353` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa354` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa355` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa356` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa357` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa358` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa359` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa36` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa360` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa361` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa362` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa363` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa364` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa365` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa366` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa367` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa368` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa369` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa37` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa370` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa371` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa372` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa373` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa374` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa375` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa376` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa377` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa378` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa379` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa38` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa380` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa381` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa382` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa383` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa384` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa385` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa386` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa387` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa388` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa389` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa39` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa390` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa391` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa392` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa393` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa394` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa395` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa396` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa397` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa398` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa399` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa40` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa400` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa401` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa402` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa403` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa404` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa405` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa406` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa407` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa408` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa409` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa41` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa410` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa411` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa412` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa413` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa414` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa415` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa416` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa417` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa418` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa419` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa42` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa420` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa421` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa422` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa423` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa424` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa425` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa426` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa427` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa428` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa429` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa43` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa430` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa431` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa432` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa433` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa434` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa435` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa436` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa437` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa438` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa439` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa44` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa440` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa441` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa442` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa443` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa444` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa445` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa446` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa447` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa448` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa449` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa45` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa450` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa451` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa452` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa453` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa454` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa455` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa456` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa457` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa458` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa459` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa46` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa460` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa461` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa462` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa463` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa464` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa465` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa466` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa467` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa468` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa469` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa47` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa470` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa471` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa472` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa473` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa474` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa475` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa476` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa477` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa478` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa479` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa48` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa480` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa481` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa482` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa483` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa484` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa485` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa486` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa487` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa488` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa489` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa49` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa490` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa491` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa492` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa493` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa494` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa495` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa496` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa497` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa498` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa499` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa5` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa50` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa500` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa501` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa502` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa503` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa504` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa505` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa506` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa507` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa508` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa509` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa51` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa510` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa511` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa512` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa513` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa514` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa515` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa516` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa517` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa518` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa519` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa52` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa520` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa521` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa522` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa523` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa524` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa525` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa526` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa527` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa528` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa529` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa53` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa530` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa531` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa532` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa533` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa534` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa535` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa536` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa537` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa538` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa539` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa54` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa540` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa541` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa542` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa543` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa544` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa545` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa546` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa547` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa548` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa549` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa55` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa550` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa56` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa57` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa58` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa59` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa6` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa60` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa61` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa62` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa63` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa64` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa65` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa66` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa67` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa68` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa69` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa7` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa70` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa71` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa72` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa73` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa74` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa75` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa76` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa77` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa78` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa79` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa8` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa80` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa81` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa82` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa83` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa84` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa85` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa86` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa87` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa88` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa89` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa9` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa90` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa91` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa92` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa93` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa94` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa95` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa96` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa97` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa98` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa99` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1

=== added file 'mysql-test/suite/innodb_plugin/r/innodb_bug56632.result'
--- a/mysql-test/suite/innodb_plugin/r/innodb_bug56632.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/innodb_plugin/r/innodb_bug56632.result	2010-11-25 18:55:52 +0000
@@ -0,0 +1,294 @@
+SET storage_engine=InnoDB;
+SET GLOBAL innodb_file_format=`Barracuda`;
+SET GLOBAL innodb_file_per_table=ON;
+SET SESSION innodb_strict_mode = ON;
+# Test 1) CREATE with ROW_FORMAT & KEY_BLOCK_SIZE, ALTER with neither
+DROP TABLE IF EXISTS bug56632;
+Warnings:
+Note	1051	Unknown table 'bug56632'
+CREATE TABLE bug56632 ( i INT ) ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1;
+ERROR HY000: Can't create table 'test.bug56632' (errno: 1478)
+SHOW WARNINGS;
+Level	Code	Message
+Warning	1478	InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE.
+Error	1005	Can't create table 'test.bug56632' (errno: 1478)
+# Test 2) CREATE with ROW_FORMAT, ALTER with KEY_BLOCK_SIZE
+DROP TABLE IF EXISTS bug56632;
+Warnings:
+Note	1051	Unknown table 'bug56632'
+CREATE TABLE bug56632 ( i INT ) ROW_FORMAT=COMPACT;
+SHOW WARNINGS;
+Level	Code	Message
+SHOW CREATE TABLE bug56632;
+Table	Create Table
+bug56632	CREATE TABLE `bug56632` (
+  `i` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
+TABLE_NAME	ROW_FORMAT	CREATE_OPTIONS
+bug56632	Compact	row_format=COMPACT
+ALTER TABLE bug56632 KEY_BLOCK_SIZE=1;
+SHOW WARNINGS;
+Level	Code	Message
+SHOW CREATE TABLE bug56632;
+Table	Create Table
+bug56632	CREATE TABLE `bug56632` (
+  `i` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
+TABLE_NAME	ROW_FORMAT	CREATE_OPTIONS
+bug56632	Compressed	row_format=COMPACT key_block_size=1
+# Test 3) CREATE with KEY_BLOCK_SIZE, ALTER with ROW_FORMAT
+DROP TABLE IF EXISTS bug56632;
+CREATE TABLE bug56632 ( i INT ) KEY_BLOCK_SIZE=1;
+SHOW WARNINGS;
+Level	Code	Message
+SHOW CREATE TABLE bug56632;
+Table	Create Table
+bug56632	CREATE TABLE `bug56632` (
+  `i` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=1
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
+TABLE_NAME	ROW_FORMAT	CREATE_OPTIONS
+bug56632	Compressed	key_block_size=1
+ALTER TABLE bug56632 ROW_FORMAT=COMPACT;
+SHOW CREATE TABLE bug56632;
+Table	Create Table
+bug56632	CREATE TABLE `bug56632` (
+  `i` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=1
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
+TABLE_NAME	ROW_FORMAT	CREATE_OPTIONS
+bug56632	Compressed	key_block_size=1
+# Test 4) CREATE with neither, ALTER with ROW_FORMAT & KEY_BLOCK_SIZE
+DROP TABLE IF EXISTS bug56632;
+CREATE TABLE bug56632 ( i INT );
+SHOW WARNINGS;
+Level	Code	Message
+SHOW CREATE TABLE bug56632;
+Table	Create Table
+bug56632	CREATE TABLE `bug56632` (
+  `i` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
+TABLE_NAME	ROW_FORMAT	CREATE_OPTIONS
+bug56632	Compact	
+ALTER TABLE bug56632 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1;
+SHOW CREATE TABLE bug56632;
+Table	Create Table
+bug56632	CREATE TABLE `bug56632` (
+  `i` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
+TABLE_NAME	ROW_FORMAT	CREATE_OPTIONS
+bug56632	Compact	
+# Test 5) CREATE with KEY_BLOCK_SIZE=3 (invalid).
+DROP TABLE IF EXISTS bug56632;
+CREATE TABLE bug56632 ( i INT ) KEY_BLOCK_SIZE=3;
+ERROR HY000: Can't create table 'test.bug56632' (errno: 1478)
+SHOW WARNINGS;
+Level	Code	Message
+Warning	1478	InnoDB: invalid KEY_BLOCK_SIZE = 3. Valid values are [1, 2, 4, 8, 16]
+Error	1005	Can't create table 'test.bug56632' (errno: 1478)
+SET SESSION innodb_strict_mode = OFF;
+# Test 6) CREATE with ROW_FORMAT & KEY_BLOCK_SIZE, ALTER with neither
+DROP TABLE IF EXISTS bug56632;
+Warnings:
+Note	1051	Unknown table 'bug56632'
+CREATE TABLE bug56632 ( i INT ) ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1;
+Warnings:
+Warning	1478	InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
+SHOW WARNINGS;
+Level	Code	Message
+Warning	1478	InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
+SHOW CREATE TABLE bug56632;
+Table	Create Table
+bug56632	CREATE TABLE `bug56632` (
+  `i` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
+TABLE_NAME	ROW_FORMAT	CREATE_OPTIONS
+bug56632	Compact	row_format=COMPACT key_block_size=1
+ALTER TABLE bug56632 ADD COLUMN f1 INT;
+Warnings:
+Warning	1478	InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
+SHOW WARNINGS;
+Level	Code	Message
+Warning	1478	InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
+SHOW CREATE TABLE bug56632;
+Table	Create Table
+bug56632	CREATE TABLE `bug56632` (
+  `i` int(11) DEFAULT NULL,
+  `f1` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
+TABLE_NAME	ROW_FORMAT	CREATE_OPTIONS
+bug56632	Compact	row_format=COMPACT key_block_size=1
+# Test 7) CREATE with ROW_FORMAT, ALTER with KEY_BLOCK_SIZE
+DROP TABLE IF EXISTS bug56632;
+CREATE TABLE bug56632 ( i INT ) ROW_FORMAT=COMPACT;
+SHOW WARNINGS;
+Level	Code	Message
+SHOW CREATE TABLE bug56632;
+Table	Create Table
+bug56632	CREATE TABLE `bug56632` (
+  `i` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
+TABLE_NAME	ROW_FORMAT	CREATE_OPTIONS
+bug56632	Compact	row_format=COMPACT
+ALTER TABLE bug56632 KEY_BLOCK_SIZE=1;
+SHOW WARNINGS;
+Level	Code	Message
+SHOW CREATE TABLE bug56632;
+Table	Create Table
+bug56632	CREATE TABLE `bug56632` (
+  `i` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
+TABLE_NAME	ROW_FORMAT	CREATE_OPTIONS
+bug56632	Compressed	row_format=COMPACT key_block_size=1
+# Test 8) CREATE with KEY_BLOCK_SIZE, ALTER with ROW_FORMAT
+DROP TABLE IF EXISTS bug56632;
+CREATE TABLE bug56632 ( i INT ) KEY_BLOCK_SIZE=1;
+SHOW WARNINGS;
+Level	Code	Message
+SHOW CREATE TABLE bug56632;
+Table	Create Table
+bug56632	CREATE TABLE `bug56632` (
+  `i` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=1
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
+TABLE_NAME	ROW_FORMAT	CREATE_OPTIONS
+bug56632	Compressed	key_block_size=1
+ALTER TABLE bug56632 ROW_FORMAT=COMPACT;
+Warnings:
+Warning	1478	InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
+SHOW WARNINGS;
+Level	Code	Message
+Warning	1478	InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
+SHOW CREATE TABLE bug56632;
+Table	Create Table
+bug56632	CREATE TABLE `bug56632` (
+  `i` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
+TABLE_NAME	ROW_FORMAT	CREATE_OPTIONS
+bug56632	Compact	row_format=COMPACT key_block_size=1
+# Test 9) CREATE with neither, ALTER with ROW_FORMAT & KEY_BLOCK_SIZE
+DROP TABLE IF EXISTS bug56632;
+CREATE TABLE bug56632 ( i INT );
+SHOW WARNINGS;
+Level	Code	Message
+SHOW CREATE TABLE bug56632;
+Table	Create Table
+bug56632	CREATE TABLE `bug56632` (
+  `i` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
+TABLE_NAME	ROW_FORMAT	CREATE_OPTIONS
+bug56632	Compact	
+ALTER TABLE bug56632 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1;
+Warnings:
+Warning	1478	InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
+SHOW WARNINGS;
+Level	Code	Message
+Warning	1478	InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
+SHOW CREATE TABLE bug56632;
+Table	Create Table
+bug56632	CREATE TABLE `bug56632` (
+  `i` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
+TABLE_NAME	ROW_FORMAT	CREATE_OPTIONS
+bug56632	Compact	row_format=COMPACT key_block_size=1
+# Test 10) CREATE with KEY_BLOCK_SIZE=3 (invalid), ALTER with neither.
+DROP TABLE IF EXISTS bug56632;
+CREATE TABLE bug56632 ( i INT ) KEY_BLOCK_SIZE=3;
+Warnings:
+Warning	1478	InnoDB: ignoring KEY_BLOCK_SIZE=3.
+SHOW WARNINGS;
+Level	Code	Message
+Warning	1478	InnoDB: ignoring KEY_BLOCK_SIZE=3.
+SHOW CREATE TABLE bug56632;
+Table	Create Table
+bug56632	CREATE TABLE `bug56632` (
+  `i` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=3
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
+TABLE_NAME	ROW_FORMAT	CREATE_OPTIONS
+bug56632	Compact	key_block_size=3
+ALTER TABLE bug56632 ADD COLUMN f1 INT;
+Warnings:
+Warning	1478	InnoDB: ignoring KEY_BLOCK_SIZE=3.
+SHOW WARNINGS;
+Level	Code	Message
+Warning	1478	InnoDB: ignoring KEY_BLOCK_SIZE=3.
+SHOW CREATE TABLE bug56632;
+Table	Create Table
+bug56632	CREATE TABLE `bug56632` (
+  `i` int(11) DEFAULT NULL,
+  `f1` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=3
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
+TABLE_NAME	ROW_FORMAT	CREATE_OPTIONS
+bug56632	Compact	key_block_size=3
+# Test 11) CREATE with KEY_BLOCK_SIZE=3 (invalid), ALTER with ROW_FORMAT=COMPACT.
+DROP TABLE IF EXISTS bug56632;
+CREATE TABLE bug56632 ( i INT ) KEY_BLOCK_SIZE=3;
+Warnings:
+Warning	1478	InnoDB: ignoring KEY_BLOCK_SIZE=3.
+SHOW WARNINGS;
+Level	Code	Message
+Warning	1478	InnoDB: ignoring KEY_BLOCK_SIZE=3.
+SHOW CREATE TABLE bug56632;
+Table	Create Table
+bug56632	CREATE TABLE `bug56632` (
+  `i` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=3
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
+TABLE_NAME	ROW_FORMAT	CREATE_OPTIONS
+bug56632	Compact	key_block_size=3
+ALTER TABLE bug56632 ROW_FORMAT=COMPACT;
+Warnings:
+Warning	1478	InnoDB: ignoring KEY_BLOCK_SIZE=3.
+SHOW WARNINGS;
+Level	Code	Message
+Warning	1478	InnoDB: ignoring KEY_BLOCK_SIZE=3.
+SHOW CREATE TABLE bug56632;
+Table	Create Table
+bug56632	CREATE TABLE `bug56632` (
+  `i` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=3
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
+TABLE_NAME	ROW_FORMAT	CREATE_OPTIONS
+bug56632	Compact	row_format=COMPACT key_block_size=3
+# Test 12) CREATE with KEY_BLOCK_SIZE=3 (invalid), ALTER with KEY_BLOCK_SIZE=1.
+DROP TABLE IF EXISTS bug56632;
+CREATE TABLE bug56632 ( i INT ) KEY_BLOCK_SIZE=3;
+Warnings:
+Warning	1478	InnoDB: ignoring KEY_BLOCK_SIZE=3.
+SHOW WARNINGS;
+Level	Code	Message
+Warning	1478	InnoDB: ignoring KEY_BLOCK_SIZE=3.
+SHOW CREATE TABLE bug56632;
+Table	Create Table
+bug56632	CREATE TABLE `bug56632` (
+  `i` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=3
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
+TABLE_NAME	ROW_FORMAT	CREATE_OPTIONS
+bug56632	Compact	key_block_size=3
+ALTER TABLE bug56632 KEY_BLOCK_SIZE=1;
+SHOW WARNINGS;
+Level	Code	Message
+SHOW CREATE TABLE bug56632;
+Table	Create Table
+bug56632	CREATE TABLE `bug56632` (
+  `i` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=1
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
+TABLE_NAME	ROW_FORMAT	CREATE_OPTIONS
+bug56632	Compressed	key_block_size=1
+# Cleanup
+DROP TABLE IF EXISTS bug56632;

=== added file 'mysql-test/suite/innodb_plugin/r/innodb_bug56680.result'
--- a/mysql-test/suite/innodb_plugin/r/innodb_bug56680.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/innodb_plugin/r/innodb_bug56680.result	2010-10-19 06:04:15 +0000
@@ -0,0 +1,109 @@
+SET GLOBAL tx_isolation='REPEATABLE-READ';
+SET GLOBAL innodb_file_format=Barracuda;
+SET GLOBAL innodb_file_per_table=on;
+CREATE TABLE bug56680(
+a INT AUTO_INCREMENT PRIMARY KEY,
+b CHAR(1),
+c INT,
+INDEX(b))
+ENGINE=InnoDB;
+INSERT INTO bug56680 VALUES(0,'x',1);
+BEGIN;
+SELECT b FROM bug56680;
+b
+x
+BEGIN;
+UPDATE bug56680 SET b='X';
+SELECT b FROM bug56680;
+b
+x
+SELECT * FROM bug56680;
+a	b	c
+1	x	1
+ROLLBACK;
+SELECT b FROM bug56680;
+b
+x
+SET GLOBAL tx_isolation='READ-UNCOMMITTED';
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+BEGIN;
+SELECT b FROM bug56680 LIMIT 2;
+b
+x
+x
+BEGIN;
+DELETE FROM bug56680 WHERE a=1;
+INSERT INTO bug56680 VALUES(1,'X',1);
+SELECT b FROM bug56680 LIMIT 3;
+b
+X
+x
+x
+SELECT b FROM bug56680 LIMIT 2;
+b
+x
+x
+CHECK TABLE bug56680;
+Table	Op	Msg_type	Msg_text
+test.bug56680	check	status	OK
+ROLLBACK;
+SELECT b FROM bug56680 LIMIT 2;
+b
+x
+x
+CHECK TABLE bug56680;
+Table	Op	Msg_type	Msg_text
+test.bug56680	check	status	OK
+SELECT b FROM bug56680 LIMIT 2;
+b
+x
+x
+CREATE TABLE bug56680_2(
+a INT AUTO_INCREMENT PRIMARY KEY,
+b VARCHAR(2) CHARSET latin1 COLLATE latin1_german2_ci,
+c INT,
+INDEX(b))
+ENGINE=InnoDB;
+INSERT INTO bug56680_2 SELECT 0,_latin1 0xdf,c FROM bug56680;
+BEGIN;
+SELECT HEX(b) FROM bug56680_2 LIMIT 2;
+HEX(b)
+DF
+DF
+DELETE FROM bug56680_2 WHERE a=1;
+INSERT INTO bug56680_2 VALUES(1,'SS',1);
+SELECT HEX(b) FROM bug56680_2 LIMIT 3;
+HEX(b)
+5353
+DF
+DF
+CHECK TABLE bug56680_2;
+Table	Op	Msg_type	Msg_text
+test.bug56680_2	check	status	OK
+ALTER TABLE bug56680_2 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+SELECT HEX(b) FROM bug56680_2 LIMIT 2;
+HEX(b)
+5353
+DF
+DELETE FROM bug56680_2 WHERE a=1;
+INSERT INTO bug56680_2 VALUES(1,_latin1 0xdf,1);
+SELECT HEX(b) FROM bug56680_2 LIMIT 3;
+HEX(b)
+DF
+DF
+DF
+CHECK TABLE bug56680_2;
+Table	Op	Msg_type	Msg_text
+test.bug56680_2	check	status	OK
+DROP TABLE bug56680_2;
+DROP TABLE bug56680;

=== added file 'mysql-test/suite/innodb_plugin/r/innodb_bug56716.result'
--- a/mysql-test/suite/innodb_plugin/r/innodb_bug56716.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/innodb_plugin/r/innodb_bug56716.result	2010-10-04 10:06:41 +0000
@@ -0,0 +1,4 @@
+CREATE TABLE bug56716 (a INT PRIMARY KEY,b INT,c INT,INDEX(b)) ENGINE=InnoDB;
+SELECT * FROM bug56716 WHERE b<=42 ORDER BY b DESC FOR UPDATE;
+a	b	c
+DROP TABLE bug56716;

=== added file 'mysql-test/suite/innodb_plugin/r/innodb_bug56947.result'
--- a/mysql-test/suite/innodb_plugin/r/innodb_bug56947.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/innodb_plugin/r/innodb_bug56947.result	2010-10-11 08:18:00 +0000
@@ -0,0 +1,6 @@
+create table bug56947(a int not null) engine = innodb;
+CREATE TABLE `bug56947#1`(a int) ENGINE=InnoDB;
+alter table bug56947 add unique index (a);
+ERROR HY000: Table 'test.bug56947#1' already exists
+drop table `bug56947#1`;
+drop table bug56947;

=== added file 'mysql-test/suite/innodb_plugin/r/innodb_bug57252.result'
--- a/mysql-test/suite/innodb_plugin/r/innodb_bug57252.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/innodb_plugin/r/innodb_bug57252.result	2010-10-18 11:20:16 +0000
@@ -0,0 +1,6 @@
+cardinality
+10
+Table	Op	Msg_type	Msg_text
+test.bug57252	analyze	status	OK
+cardinality
+10

=== added file 'mysql-test/suite/innodb_plugin/r/innodb_bug57255.result'
--- a/mysql-test/suite/innodb_plugin/r/innodb_bug57255.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/innodb_plugin/r/innodb_bug57255.result	2010-10-06 10:41:26 +0000
@@ -0,0 +1,10 @@
+create table A(id int not null primary key) engine=innodb;
+create table B(id int not null auto_increment primary key, f1 int not null, foreign key(f1) references A(id) on delete cascade) engine=innodb;
+create table C(id int not null auto_increment primary key, f1 int not null, foreign key(f1) references B(id) on delete cascade) engine=innodb;
+insert into A values(1), (2);
+DELETE FROM A where id = 1;
+DELETE FROM C where f1 = 2;
+DELETE FROM A where id = 1;
+DROP TABLE C;
+DROP TABLE B;
+DROP TABLE A;

=== modified file 'mysql-test/suite/innodb_plugin/r/innodb_mysql.result'
--- a/mysql-test/suite/innodb_plugin/r/innodb_mysql.result	2010-08-03 21:26:17 +0000
+++ b/mysql-test/suite/innodb_plugin/r/innodb_mysql.result	2010-11-23 21:39:59 +0000
@@ -2390,4 +2390,14 @@ a
 2
 UPDATE t1,t2 SET t1.a = t1.a + 100 WHERE t1.a = 1;
 DROP TABLE t1,t2;
+#
+# Bug#54606 innodb fast alter table + pack_keys=0 
+#           prevents adding new indexes
+#
+CREATE TABLE t1 (a INT, b CHAR(9), c INT, key(b)) 
+ENGINE=InnoDB 
+PACK_KEYS=0;
+CREATE INDEX a ON t1 (a);
+CREATE INDEX c on t1 (c);
+DROP TABLE t1;
 End of 5.1 tests

=== added file 'mysql-test/suite/innodb_plugin/t/innodb_bug53756-master.opt'
--- a/mysql-test/suite/innodb_plugin/t/innodb_bug53756-master.opt	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/innodb_plugin/t/innodb_bug53756-master.opt	2010-09-07 05:41:37 +0000
@@ -0,0 +1 @@
+--skip-stack-trace --skip-core-file

=== added file 'mysql-test/suite/innodb_plugin/t/innodb_bug53756.test'
--- a/mysql-test/suite/innodb_plugin/t/innodb_bug53756.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/innodb_plugin/t/innodb_bug53756.test	2010-10-03 17:39:28 +0000
@@ -0,0 +1,184 @@
+# This is the test case for bug #53756. Alter table operation could
+# leave a deleted record for the temp table (later renamed to the altered
+# table) in the SYS_TABLES secondary index, we should ignore this row and
+# find the first non-deleted row for the specified table_id when load table
+# metadata in the function dict_load_table_on_id() during crash recovery.
+
+#
+# innobackup needs to connect to the server. Not supported in embedded.
+--source include/not_embedded.inc
+#
+# This test case needs to crash the server. Needs a debug server.
+--source include/have_debug.inc
+#
+# Don't test this under valgrind, memory leaks will occur.
+--source include/not_valgrind.inc
+#
+# This test case needs InnoDB.
+-- source include/have_innodb_plugin.inc
+
+#
+# Precautionary clean up.
+#
+--disable_warnings
+DROP TABLE IF EXISTS bug_53756 ;
+--enable_warnings
+
+#
+# Create test data.
+#
+CREATE TABLE bug_53756 (pk INT, c1 INT) ENGINE=InnoDB;
+ALTER TABLE bug_53756 ADD PRIMARY KEY (pk);
+INSERT INTO bug_53756 VALUES(1, 11), (2, 22), (3, 33), (4, 44);
+
+--echo
+--echo # Select a less restrictive isolation level.
+# Don't use user variables. They won't survive server crash.
+--let $global_isolation= `SELECT @@global.tx_isolation`
+--let $session_isolation= `SELECT @@session.tx_isolation`
+SET GLOBAL TRANSACTION ISOLATION LEVEL READ COMMITTED;
+SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
+COMMIT;
+
+--echo
+--echo # Start a transaction in the default connection for isolation.
+START TRANSACTION;
+SELECT @@tx_isolation;
+SELECT * FROM bug_53756;
+
+--echo
+--echo # connection con1 deletes row 1
+--connect (con1,localhost,root,,)
+START TRANSACTION;
+SELECT @@tx_isolation;
+DELETE FROM bug_53756 WHERE pk=1;
+
+--echo
+--echo # connection con2 deletes row 2
+--connect (con2,localhost,root,,)
+START TRANSACTION;
+SELECT @@tx_isolation;
+DELETE FROM bug_53756 WHERE pk=2;
+
+--echo
+--echo # connection con3 updates row 3
+--connect (con3,localhost,root,,)
+START TRANSACTION;
+SELECT @@tx_isolation;
+UPDATE bug_53756 SET c1=77 WHERE pk=3;
+
+--echo
+--echo # connection con4 updates row 4
+--connect (con4,localhost,root,,)
+START TRANSACTION;
+SELECT @@tx_isolation;
+UPDATE bug_53756 SET c1=88 WHERE pk=4;
+
+--echo
+--echo # connection con5 inserts row 5
+--connect (con5,localhost,root,,)
+START TRANSACTION;
+SELECT @@tx_isolation;
+INSERT INTO bug_53756 VALUES(5, 55);
+
+--echo
+--echo # connection con6 inserts row 6
+--connect (con6,localhost,root,,)
+START TRANSACTION;
+SELECT @@tx_isolation;
+INSERT INTO bug_53756 VALUES(6, 66);
+
+--echo
+--echo # connection con1 commits.
+--connection con1
+COMMIT;
+
+--echo
+--echo # connection con3 commits.
+--connection con3
+COMMIT;
+
+--echo
+--echo # connection con4 rolls back.
+--connection con4
+ROLLBACK;
+
+--echo
+--echo # connection con6 rolls back.
+--connection con6
+ROLLBACK;
+
+--echo
+--echo # The connections 2 and 5 stay open.
+
+--echo
+--echo # connection default selects resulting data.
+--echo # Delete of row 1 was committed.
+--echo # Update of row 3 was committed.
+--echo # Due to isolation level read committed, these should be included.
+--echo # All other changes should not be included.
+--connection default
+SELECT * FROM bug_53756;
+
+--echo
+--echo # connection default
+--connection default
+--echo #
+--echo # Crash server.
+#
+# Write file to make mysql-test-run.pl expect the "crash", but don't start
+# it until it's told to
+--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+#
+START TRANSACTION;
+INSERT INTO bug_53756 VALUES (666,666);
+#
+# Request a crash on next execution of commit.
+SET SESSION debug="+d,crash_commit_before";
+#
+# Execute the statement that causes the crash.
+--error 2013
+COMMIT;
+--echo
+--echo #
+--echo # disconnect con1, con2, con3, con4, con5, con6.
+--disconnect con1
+--disconnect con2
+--disconnect con3
+--disconnect con4
+--disconnect con5
+--disconnect con6
+--echo #
+--echo # Restart server.
+#
+# Write file to make mysql-test-run.pl start up the server again
+--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+#
+# Turn on reconnect
+--enable_reconnect
+#
+# Call script that will poll the server waiting for it to be back online again
+--source include/wait_until_connected_again.inc
+#
+# Turn off reconnect again
+--disable_reconnect
+--echo
+
+--echo #
+--echo # Select recovered data.
+--echo # Delete of row 1 was committed.
+--echo # Update of row 3 was committed.
+--echo # These should be included.
+--echo # All other changes should not be included.
+--echo # Delete of row 2 and insert of row 5 should be rolled back
+SELECT * FROM bug_53756;
+
+--echo
+--echo # Clean up.
+DROP TABLE bug_53756;
+
+--disable_query_log
+eval SET GLOBAL tx_isolation= '$global_isolation';
+eval SET SESSION tx_isolation= '$session_isolation';
+--enable_query_log
+

=== added file 'mysql-test/suite/innodb_plugin/t/innodb_bug56143.test'
--- a/mysql-test/suite/innodb_plugin/t/innodb_bug56143.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/innodb_plugin/t/innodb_bug56143.test	2010-10-14 09:28:25 +0000
@@ -0,0 +1,581 @@
+#
+# Bug#56143 too many foreign keys causes output of show create table to become invalid
+# http://bugs.mysql.com/56143
+#
+
+-- source include/have_innodb_plugin.inc
+
+-- disable_query_log
+-- disable_result_log
+
+SET foreign_key_checks=0;
+
+DROP TABLE IF EXISTS bug56143_1;
+DROP TABLE IF EXISTS bug56143_2;
+
+CREATE TABLE bug56143_1 (a INT, KEY(a)) ENGINE=INNODB;
+
+CREATE TABLE `bug56143_2` (
+  `a` int(11) DEFAULT NULL,
+  KEY `a` (`a`),
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa10` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa100` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa101` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa102` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa103` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa104` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa105` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa106` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa107` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa108` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa109` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa11` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa110` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa111` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa112` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa113` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa114` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa115` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa116` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa117` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa118` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa119` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa12` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa120` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa121` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa122` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa123` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa124` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa125` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa126` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa127` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa128` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa129` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa13` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa130` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa131` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa132` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa133` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa134` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa135` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa136` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa137` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa138` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa139` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa14` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa140` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa141` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa142` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa143` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa144` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa145` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa146` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa147` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa148` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa149` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa15` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa150` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa151` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa152` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa153` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa154` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa155` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa156` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa157` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa158` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa159` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa16` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa160` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa161` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa162` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa163` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa164` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa165` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa166` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa167` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa168` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa169` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa17` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa170` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa171` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa172` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa173` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa174` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa175` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa176` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa177` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa178` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa179` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa18` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa180` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa181` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa182` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa183` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa184` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa185` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa186` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa187` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa188` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa189` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa19` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa190` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa191` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa192` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa193` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa194` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa195` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa196` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa197` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa198` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa199` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa2` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa20` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa200` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa201` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa202` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa203` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa204` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa205` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa206` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa207` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa208` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa209` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa21` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa210` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa211` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa212` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa213` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa214` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa215` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa216` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa217` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa218` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa219` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa22` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa220` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa221` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa222` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa223` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa224` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa225` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa226` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa227` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa228` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa229` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa23` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa230` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa231` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa232` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa233` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa234` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa235` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa236` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa237` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa238` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa239` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa24` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa240` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa241` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa242` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa243` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa244` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa245` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa246` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa247` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa248` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa249` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa25` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa250` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa251` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa252` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa253` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa254` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa255` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa256` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa257` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa258` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa259` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa26` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa260` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa261` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa262` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa263` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa264` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa265` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa266` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa267` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa268` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa269` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa27` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa270` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa271` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa272` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa273` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa274` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa275` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa276` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa277` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa278` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa279` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa28` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa280` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa281` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa282` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa283` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa284` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa285` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa286` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa287` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa288` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa289` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa29` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa290` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa291` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa292` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa293` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa294` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa295` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa296` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa297` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa298` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa299` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa3` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa30` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa300` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa301` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa302` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa303` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa304` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa305` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa306` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa307` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa308` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa309` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa31` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa310` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa311` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa312` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa313` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa314` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa315` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa316` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa317` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa318` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa319` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa32` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa320` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa321` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa322` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa323` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa324` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa325` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa326` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa327` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa328` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa329` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa33` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa330` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa331` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa332` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa333` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa334` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa335` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa336` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa337` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa338` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa339` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa34` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa340` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa341` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa342` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa343` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa344` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa345` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa346` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa347` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa348` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa349` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa35` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa350` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa351` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa352` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa353` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa354` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa355` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa356` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa357` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa358` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa359` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa36` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa360` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa361` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa362` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa363` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa364` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa365` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa366` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa367` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa368` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa369` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa37` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa370` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa371` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa372` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa373` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa374` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa375` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa376` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa377` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa378` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa379` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa38` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa380` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa381` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa382` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa383` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa384` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa385` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa386` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa387` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa388` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa389` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa39` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa390` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa391` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa392` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa393` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa394` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa395` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa396` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa397` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa398` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa399` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa40` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa400` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa401` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa402` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa403` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa404` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa405` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa406` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa407` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa408` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa409` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa41` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa410` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa411` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa412` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa413` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa414` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa415` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa416` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa417` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa418` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa419` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa42` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa420` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa421` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa422` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa423` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa424` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa425` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa426` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa427` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa428` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa429` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa43` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa430` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa431` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa432` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa433` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa434` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa435` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa436` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa437` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa438` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa439` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa44` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa440` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa441` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa442` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa443` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa444` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa445` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa446` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa447` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa448` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa449` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa45` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa450` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa451` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa452` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa453` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa454` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa455` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa456` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa457` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa458` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa459` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa46` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa460` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa461` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa462` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa463` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa464` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa465` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa466` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa467` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa468` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa469` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa47` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa470` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa471` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa472` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa473` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa474` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa475` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa476` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa477` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa478` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa479` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa48` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa480` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa481` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa482` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa483` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa484` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa485` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa486` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa487` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa488` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa489` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa49` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa490` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa491` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa492` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa493` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa494` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa495` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa496` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa497` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa498` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa499` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa5` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa50` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa500` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa501` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa502` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa503` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa504` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa505` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa506` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa507` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa508` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa509` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa51` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa510` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa511` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa512` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa513` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa514` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa515` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa516` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa517` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa518` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa519` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa52` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa520` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa521` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa522` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa523` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa524` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa525` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa526` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa527` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa528` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa529` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa53` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa530` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa531` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa532` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa533` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa534` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa535` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa536` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa537` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa538` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa539` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa54` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa540` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa541` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa542` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa543` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa544` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa545` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa546` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa547` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa548` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa549` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa55` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa550` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa56` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa57` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa58` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa59` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa6` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa60` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa61` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa62` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa63` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa64` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa65` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa66` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa67` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa68` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa69` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa7` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa70` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa71` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa72` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa73` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa74` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa75` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa76` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa77` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa78` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa79` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa8` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa80` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa81` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa82` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa83` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa84` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa85` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa86` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa87` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa88` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa89` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa9` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa90` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa91` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa92` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa93` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa94` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa95` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa96` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa97` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa98` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL,
+  CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa99` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL
+) ENGINE=InnoDB;
+
+-- enable_query_log
+-- enable_result_log
+
+SHOW CREATE TABLE bug56143_2;
+
+-- disable_query_log
+-- disable_result_log
+DROP TABLE bug56143_1;
+DROP TABLE bug56143_2;

=== added file 'mysql-test/suite/innodb_plugin/t/innodb_bug56632.test'
--- a/mysql-test/suite/innodb_plugin/t/innodb_bug56632.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/innodb_plugin/t/innodb_bug56632.test	2010-10-13 18:32:10 +0000
@@ -0,0 +1,216 @@
+#
+# Bug#56632: ALTER TABLE implicitly changes ROW_FORMAT to COMPRESSED
+# http://bugs.mysql.com/56632
+#
+# Innodb automatically uses compressed mode when the KEY_BLOCK_SIZE
+# parameter is used, except if the ROW_FORMAT is also specified, in
+# which case the KEY_BLOCK_SIZE is ignored and a warning is shown.
+# But Innodb was getting confused when neither of those parameters
+# was used on the ALTER statement after they were both used on the
+# CREATE.
+#
+# This will test the results of all 4 combinations of these two
+# parameters of the CREATE and ALTER.
+#
+#    Tests 1-5 use INNODB_STRICT_MODE=1 which returns an error
+#    if there is anything wrong with the statement.
+#
+# 1) CREATE with ROW_FORMAT=COMPACT & KEY_BLOCK_SIZE=1, ALTER with neither.
+#    Result; CREATE; fails with error ER_CANT_CREATE_TABLE
+# 2) CREATE with ROW_FORMAT=COMPACT, ALTER with KEY_BLOCK_SIZE=1
+#    Result; CREATE succeeds,
+#            ALTER quietly converts ROW_FORMAT to compressed.
+# 3) CREATE with KEY_BLOCK_SIZE=1, ALTER with ROW_FORMAT=COMPACT
+#    Result; CREATE quietly converts ROW_FORMAT to compressed,
+#            ALTER fails with error ER_CANT_CREATE_TABLE.
+# 4) CREATE with neither, ALTER with ROW_FORMAT=COMPACT & KEY_BLOCK_SIZE=1
+#    Result; CREATE succeeds,
+#            ALTER; fails with error ER_CANT_CREATE_TABLE
+# 5) CREATE with KEY_BLOCK_SIZE=3 (invalid), ALTER with neither.
+#    Result; CREATE; fails with error ER_CANT_CREATE_TABLE
+#
+#    Tests 6-11 use INNODB_STRICT_MODE=0 which automatically makes
+#    adjustments if the prameters are incompatible.
+#
+# 6) CREATE with ROW_FORMAT=COMPACT & KEY_BLOCK_SIZE=1, ALTER with neither.
+#    Result; CREATE succeeds, warns that KEY_BLOCK_SIZE is ignored.
+#            ALTER succeeds, no warnings.
+# 7) CREATE with ROW_FORMAT=COMPACT, ALTER with KEY_BLOCK_SIZE=1
+#    Result; CREATE succeeds,
+#            ALTER quietly converts ROW_FORMAT to compressed.
+# 8) CREATE with KEY_BLOCK_SIZE=1, ALTER with ROW_FORMAT=COMPACT
+#    Result; CREATE quietly converts ROW_FORMAT to compressed,
+#            ALTER succeeds, warns that KEY_BLOCK_SIZE is ignored.
+# 9) CREATE with neither, ALTER with ROW_FORMAT=COMPACT & KEY_BLOCK_SIZE=1
+#    Result; CREATE succeeds,
+#            ALTER succeeds, warns that KEY_BLOCK_SIZE is ignored.
+# 10) CREATE with KEY_BLOCK_SIZE=3 (invalid), ALTER with neither.
+#    Result; CREATE succeeds, warns that KEY_BLOCK_SIZE=3 is ignored.
+#            ALTER succeeds, warns that KEY_BLOCK_SIZE=3 is ignored.
+# 11) CREATE with KEY_BLOCK_SIZE=3 (invalid), ALTER with ROW_FORMAT=COMPACT.
+#    Result; CREATE succeeds, warns that KEY_BLOCK_SIZE=3 is ignored.
+#            ALTER succeeds, warns that KEY_BLOCK_SIZE=3 is ignored.
+# 12) CREATE with KEY_BLOCK_SIZE=3 (invalid), ALTER with KEY_BLOCK_SIZE=1.
+#    Result; CREATE succeeds, warns that KEY_BLOCK_SIZE=3 is ignored.
+#            ALTER succeeds, quietly converts ROW_FORMAT to compressed.
+
+-- source include/have_innodb_plugin.inc
+
+SET storage_engine=InnoDB;
+
+--disable_query_log
+# These values can change during the test
+LET $innodb_file_format_orig=`select @@innodb_file_format`;
+LET $innodb_file_format_check_orig=`select @@innodb_file_format_check`;
+LET $innodb_file_per_table_orig=`select @@innodb_file_per_table`;
+LET $innodb_strict_mode_orig=`select @@session.innodb_strict_mode`;
+--enable_query_log
+
+SET GLOBAL innodb_file_format=`Barracuda`;
+SET GLOBAL innodb_file_per_table=ON;
+
+# Innodb strict mode will cause an error on the CREATE or ALTER when;
+# 1. both ROW_FORMAT=COMPACT and KEY_BLOCK_SIZE=1,
+# 2. KEY_BLOCK_SIZE is not a valid number (0,1,2,4,8,16).
+# With innodb_strict_mode = OFF, These errors are corrected
+# and just a warning is returned.
+SET SESSION innodb_strict_mode = ON;
+
+--echo # Test 1) CREATE with ROW_FORMAT & KEY_BLOCK_SIZE, ALTER with neither
+DROP TABLE IF EXISTS bug56632;
+--error ER_CANT_CREATE_TABLE
+CREATE TABLE bug56632 ( i INT ) ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1;
+SHOW WARNINGS;
+
+--echo # Test 2) CREATE with ROW_FORMAT, ALTER with KEY_BLOCK_SIZE
+DROP TABLE IF EXISTS bug56632;
+CREATE TABLE bug56632 ( i INT ) ROW_FORMAT=COMPACT;
+SHOW WARNINGS;
+SHOW CREATE TABLE bug56632;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
+ALTER TABLE bug56632 KEY_BLOCK_SIZE=1;
+SHOW WARNINGS;
+SHOW CREATE TABLE bug56632;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
+
+--echo # Test 3) CREATE with KEY_BLOCK_SIZE, ALTER with ROW_FORMAT
+DROP TABLE IF EXISTS bug56632;
+CREATE TABLE bug56632 ( i INT ) KEY_BLOCK_SIZE=1;
+SHOW WARNINGS;
+SHOW CREATE TABLE bug56632;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
+--disable_result_log
+--error ER_CANT_CREATE_TABLE
+ALTER TABLE bug56632 ROW_FORMAT=COMPACT;
+--enable_result_log
+SHOW CREATE TABLE bug56632;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
+
+--echo # Test 4) CREATE with neither, ALTER with ROW_FORMAT & KEY_BLOCK_SIZE
+DROP TABLE IF EXISTS bug56632;
+CREATE TABLE bug56632 ( i INT );
+SHOW WARNINGS;
+SHOW CREATE TABLE bug56632;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
+--disable_result_log
+--error ER_CANT_CREATE_TABLE
+ALTER TABLE bug56632 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1;
+--enable_result_log
+SHOW CREATE TABLE bug56632;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
+
+--echo # Test 5) CREATE with KEY_BLOCK_SIZE=3 (invalid).
+DROP TABLE IF EXISTS bug56632;
+--error ER_CANT_CREATE_TABLE
+CREATE TABLE bug56632 ( i INT ) KEY_BLOCK_SIZE=3;
+SHOW WARNINGS;
+
+SET SESSION innodb_strict_mode = OFF;
+
+--echo # Test 6) CREATE with ROW_FORMAT & KEY_BLOCK_SIZE, ALTER with neither
+DROP TABLE IF EXISTS bug56632;
+CREATE TABLE bug56632 ( i INT ) ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1;
+SHOW WARNINGS;
+SHOW CREATE TABLE bug56632;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
+ALTER TABLE bug56632 ADD COLUMN f1 INT;
+SHOW WARNINGS;
+SHOW CREATE TABLE bug56632;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
+
+--echo # Test 7) CREATE with ROW_FORMAT, ALTER with KEY_BLOCK_SIZE
+DROP TABLE IF EXISTS bug56632;
+CREATE TABLE bug56632 ( i INT ) ROW_FORMAT=COMPACT;
+SHOW WARNINGS;
+SHOW CREATE TABLE bug56632;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
+ALTER TABLE bug56632 KEY_BLOCK_SIZE=1;
+SHOW WARNINGS;
+SHOW CREATE TABLE bug56632;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
+
+--echo # Test 8) CREATE with KEY_BLOCK_SIZE, ALTER with ROW_FORMAT
+DROP TABLE IF EXISTS bug56632;
+CREATE TABLE bug56632 ( i INT ) KEY_BLOCK_SIZE=1;
+SHOW WARNINGS;
+SHOW CREATE TABLE bug56632;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
+ALTER TABLE bug56632 ROW_FORMAT=COMPACT;
+SHOW WARNINGS;
+SHOW CREATE TABLE bug56632;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
+
+--echo # Test 9) CREATE with neither, ALTER with ROW_FORMAT & KEY_BLOCK_SIZE
+DROP TABLE IF EXISTS bug56632;
+CREATE TABLE bug56632 ( i INT );
+SHOW WARNINGS;
+SHOW CREATE TABLE bug56632;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
+ALTER TABLE bug56632 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1;
+SHOW WARNINGS;
+SHOW CREATE TABLE bug56632;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
+
+--echo # Test 10) CREATE with KEY_BLOCK_SIZE=3 (invalid), ALTER with neither.
+DROP TABLE IF EXISTS bug56632;
+CREATE TABLE bug56632 ( i INT ) KEY_BLOCK_SIZE=3;
+SHOW WARNINGS;
+SHOW CREATE TABLE bug56632;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
+ALTER TABLE bug56632 ADD COLUMN f1 INT;
+SHOW WARNINGS;
+SHOW CREATE TABLE bug56632;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
+
+--echo # Test 11) CREATE with KEY_BLOCK_SIZE=3 (invalid), ALTER with ROW_FORMAT=COMPACT.
+DROP TABLE IF EXISTS bug56632;
+CREATE TABLE bug56632 ( i INT ) KEY_BLOCK_SIZE=3;
+SHOW WARNINGS;
+SHOW CREATE TABLE bug56632;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
+ALTER TABLE bug56632 ROW_FORMAT=COMPACT;
+SHOW WARNINGS;
+SHOW CREATE TABLE bug56632;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
+
+--echo # Test 12) CREATE with KEY_BLOCK_SIZE=3 (invalid), ALTER with KEY_BLOCK_SIZE=1.
+DROP TABLE IF EXISTS bug56632;
+CREATE TABLE bug56632 ( i INT ) KEY_BLOCK_SIZE=3;
+SHOW WARNINGS;
+SHOW CREATE TABLE bug56632;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
+ALTER TABLE bug56632 KEY_BLOCK_SIZE=1;
+SHOW WARNINGS;
+SHOW CREATE TABLE bug56632;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
+
+--echo # Cleanup
+DROP TABLE IF EXISTS bug56632;
+
+--disable_query_log
+EVAL SET GLOBAL innodb_file_per_table=$innodb_file_per_table_orig;
+EVAL SET GLOBAL innodb_file_format=$innodb_file_format_orig;
+EVAL SET GLOBAL innodb_file_format_check=$innodb_file_format_check_orig;
+EVAL SET SESSION innodb_strict_mode=$innodb_strict_mode_orig;
+--enable_query_log
+

=== added file 'mysql-test/suite/innodb_plugin/t/innodb_bug56680.test'
--- a/mysql-test/suite/innodb_plugin/t/innodb_bug56680.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/innodb_plugin/t/innodb_bug56680.test	2010-10-19 06:04:15 +0000
@@ -0,0 +1,142 @@
+#
+# Bug #56680 InnoDB may return wrong results from a case-insensitive index
+#
+-- source include/have_innodb_plugin.inc
+
+-- disable_query_log
+SET @tx_isolation_orig = @@tx_isolation;
+SET @innodb_file_per_table_orig = @@innodb_file_per_table;
+SET @innodb_file_format_orig = @@innodb_file_format;
+SET @innodb_file_format_check_orig = @@innodb_file_format_check;
+# The flag innodb_change_buffering_debug is only available in debug builds.
+# It instructs InnoDB to try to evict pages from the buffer pool when
+# change buffering is possible, so that the change buffer will be used
+# whenever possible.
+-- error 0,ER_UNKNOWN_SYSTEM_VARIABLE
+SET @innodb_change_buffering_debug_orig = @@innodb_change_buffering_debug;
+-- error 0,ER_UNKNOWN_SYSTEM_VARIABLE
+SET GLOBAL innodb_change_buffering_debug = 1;
+-- enable_query_log
+SET GLOBAL tx_isolation='REPEATABLE-READ';
+SET GLOBAL innodb_file_format=Barracuda;
+SET GLOBAL innodb_file_per_table=on;
+
+CREATE TABLE bug56680(
+       a INT AUTO_INCREMENT PRIMARY KEY,
+       b CHAR(1),
+       c INT,
+       INDEX(b))
+ENGINE=InnoDB;
+
+INSERT INTO bug56680 VALUES(0,'x',1);
+BEGIN;
+SELECT b FROM bug56680;
+
+connect (con1,localhost,root,,);
+connection con1;
+BEGIN;
+UPDATE bug56680 SET b='X';
+
+connection default;
+# This should return the last committed value 'x', but would return 'X'
+# due to a bug in row_search_for_mysql().
+SELECT b FROM bug56680;
+# This would always return the last committed value 'x'.
+SELECT * FROM bug56680;
+
+connection con1;
+ROLLBACK;
+disconnect con1;
+
+connection default;
+
+SELECT b FROM bug56680;
+
+# For the rest of this test, use the READ UNCOMMITTED isolation level
+# to see what exists in the secondary index.
+SET GLOBAL tx_isolation='READ-UNCOMMITTED';
+
+# Create enough rows for the table, so that the insert buffer will be
+# used for modifying the secondary index page. There must be multiple
+# index pages, because changes to the root page are never buffered.
+
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+
+BEGIN;
+SELECT b FROM bug56680 LIMIT 2;
+
+connect (con1,localhost,root,,);
+connection con1;
+BEGIN;
+DELETE FROM bug56680 WHERE a=1;
+# This should be buffered, if innodb_change_buffering_debug = 1 is in effect.
+INSERT INTO bug56680 VALUES(1,'X',1);
+
+# This should force an insert buffer merge, and return 'X' in the first row.
+SELECT b FROM bug56680 LIMIT 3;
+
+connection default;
+SELECT b FROM bug56680 LIMIT 2;
+CHECK TABLE bug56680;
+
+connection con1;
+ROLLBACK;
+SELECT b FROM bug56680 LIMIT 2;
+CHECK TABLE bug56680;
+
+connection default;
+disconnect con1;
+
+SELECT b FROM bug56680 LIMIT 2;
+
+CREATE TABLE bug56680_2(
+       a INT AUTO_INCREMENT PRIMARY KEY,
+       b VARCHAR(2) CHARSET latin1 COLLATE latin1_german2_ci,
+       c INT,
+       INDEX(b))
+ENGINE=InnoDB;
+
+INSERT INTO bug56680_2 SELECT 0,_latin1 0xdf,c FROM bug56680;
+
+BEGIN;
+SELECT HEX(b) FROM bug56680_2 LIMIT 2;
+DELETE FROM bug56680_2 WHERE a=1;
+# This should be buffered, if innodb_change_buffering_debug = 1 is in effect.
+INSERT INTO bug56680_2 VALUES(1,'SS',1);
+
+# This should force an insert buffer merge, and return 'SS' in the first row.
+SELECT HEX(b) FROM bug56680_2 LIMIT 3;
+CHECK TABLE bug56680_2;
+
+# Test this with compressed tables.
+ALTER TABLE bug56680_2 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+
+SELECT HEX(b) FROM bug56680_2 LIMIT 2;
+DELETE FROM bug56680_2 WHERE a=1;
+# This should be buffered, if innodb_change_buffering_debug = 1 is in effect.
+INSERT INTO bug56680_2 VALUES(1,_latin1 0xdf,1);
+
+# This should force an insert buffer merge, and return 0xdf in the first row.
+SELECT HEX(b) FROM bug56680_2 LIMIT 3;
+CHECK TABLE bug56680_2;
+
+DROP TABLE bug56680_2;
+DROP TABLE bug56680;
+
+-- disable_query_log
+SET GLOBAL tx_isolation = @tx_isolation_orig;
+SET GLOBAL innodb_file_per_table = @innodb_file_per_table_orig;
+SET GLOBAL innodb_file_format = @innodb_file_format_orig;
+SET GLOBAL innodb_file_format_check = @innodb_file_format_check_orig;
+-- error 0, ER_UNKNOWN_SYSTEM_VARIABLE
+SET GLOBAL innodb_change_buffering_debug = @innodb_change_buffering_debug_orig;

=== added file 'mysql-test/suite/innodb_plugin/t/innodb_bug56716.test'
--- a/mysql-test/suite/innodb_plugin/t/innodb_bug56716.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/innodb_plugin/t/innodb_bug56716.test	2010-10-04 10:06:41 +0000
@@ -0,0 +1,10 @@
+#
+# Bug #56716 InnoDB locks a record gap without locking the table
+#
+-- source include/have_innodb_plugin.inc
+
+CREATE TABLE bug56716 (a INT PRIMARY KEY,b INT,c INT,INDEX(b)) ENGINE=InnoDB;
+
+SELECT * FROM bug56716 WHERE b<=42 ORDER BY b DESC FOR UPDATE;
+
+DROP TABLE bug56716;

=== added file 'mysql-test/suite/innodb_plugin/t/innodb_bug56947.test'
--- a/mysql-test/suite/innodb_plugin/t/innodb_bug56947.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/innodb_plugin/t/innodb_bug56947.test	2010-10-11 08:18:00 +0000
@@ -0,0 +1,11 @@
+#
+# Bug #56947 valgrind reports a memory leak in innodb-plugin.innodb-index
+#
+-- source include/have_innodb_plugin.inc
+
+create table bug56947(a int not null) engine = innodb;
+CREATE TABLE `bug56947#1`(a int) ENGINE=InnoDB;
+--error 156
+alter table bug56947 add unique index (a);
+drop table `bug56947#1`;
+drop table bug56947;

=== added file 'mysql-test/suite/innodb_plugin/t/innodb_bug57252.test'
--- a/mysql-test/suite/innodb_plugin/t/innodb_bug57252.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/innodb_plugin/t/innodb_bug57252.test	2010-10-18 11:20:16 +0000
@@ -0,0 +1,46 @@
+#
+# Bug#57252 disabling innobase_stats_on_metadata disables ANALYZE
+# http://bugs.mysql.com/57252
+#
+
+-- source include/have_innodb_plugin.inc
+
+-- disable_query_log
+-- disable_result_log
+
+SET @innodb_stats_on_metadata_orig = @@innodb_stats_on_metadata;
+
+CREATE TABLE bug57252 (a INT, KEY akey (a)) ENGINE=INNODB;
+
+BEGIN;
+let $i = 10;
+while ($i) {
+	eval INSERT INTO bug57252 VALUES ($i);
+	dec $i;
+}
+COMMIT;
+
+-- enable_result_log
+
+SET GLOBAL innodb_stats_on_metadata=0;
+
+# this calls ::info() without HA_STATUS_CONST and so
+# index->stat_n_diff_key_vals[] is not copied to the mysql-visible
+# rec_per_key
+SELECT cardinality FROM information_schema.statistics
+WHERE table_name='bug57252' AND index_name='akey';
+
+# this calls ::info() with HA_STATUS_CONST and so
+# index->stat_n_diff_key_vals[] is copied to the mysql-visible
+# rec_per_key at the end; when the bug is present dict_update_statistics()
+# is not called beforehand and so index->stat_n_diff_key_vals[] contains
+# an outdated data and thus we get an outdated data in the result when the
+# bug is present
+ANALYZE TABLE bug57252;
+
+SELECT cardinality FROM information_schema.statistics
+WHERE table_name='bug57252' AND index_name='akey';
+
+DROP TABLE bug57252;
+
+SET GLOBAL innodb_stats_on_metadata = @innodb_stats_on_metadata_orig;

=== added file 'mysql-test/suite/innodb_plugin/t/innodb_bug57255.test'
--- a/mysql-test/suite/innodb_plugin/t/innodb_bug57255.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/innodb_plugin/t/innodb_bug57255.test	2010-10-06 10:41:26 +0000
@@ -0,0 +1,36 @@
+# Test Bug #57255. Cascade deletes that affect different rows should not
+# result in DB_FOREIGN_EXCEED_MAX_CASCADE error
+
+--source include/have_innodb_plugin.inc
+
+create table A(id int not null primary key) engine=innodb;
+
+create table B(id int not null auto_increment primary key, f1 int not null, foreign key(f1) references A(id) on delete cascade) engine=innodb;
+
+create table C(id int not null auto_increment primary key, f1 int not null, foreign key(f1) references B(id) on delete cascade) engine=innodb;
+
+insert into A values(1), (2);
+
+--disable_query_log
+let $i=257;
+while ($i)
+{
+insert into B(f1) values(1);
+dec $i;
+}
+let $i=486;
+while ($i)
+{
+insert into C(f1) values(2);
+dec $i;
+}
+--enable_query_log
+
+# Following Deletes should not report error
+DELETE FROM A where id = 1;
+DELETE FROM C where f1 = 2;
+DELETE FROM A where id = 1;
+
+DROP TABLE C;
+DROP TABLE B;
+DROP TABLE A;

=== modified file 'mysql-test/suite/innodb_plugin/t/innodb_mysql.test'
--- a/mysql-test/suite/innodb_plugin/t/innodb_mysql.test	2010-08-04 10:19:18 +0000
+++ b/mysql-test/suite/innodb_plugin/t/innodb_mysql.test	2010-11-23 21:39:59 +0000
@@ -634,4 +634,18 @@ UPDATE t1,t2 SET t1.a = t1.a + 100 WHERE
 
 DROP TABLE t1,t2;
 
+--echo #
+--echo # Bug#54606 innodb fast alter table + pack_keys=0 
+--echo #           prevents adding new indexes
+--echo #
+
+CREATE TABLE t1 (a INT, b CHAR(9), c INT, key(b)) 
+  ENGINE=InnoDB 
+  PACK_KEYS=0;
+CREATE INDEX a ON t1 (a);
+CREATE INDEX c on t1 (c);
+
+DROP TABLE t1;
+
+
 --echo End of 5.1 tests

=== modified file 'mysql-test/suite/maria/r/ps_maria.result'
--- a/mysql-test/suite/maria/r/ps_maria.result	2009-06-29 21:03:30 +0000
+++ b/mysql-test/suite/maria/r/ps_maria.result	2010-11-23 21:39:59 +0000
@@ -1929,26 +1929,26 @@ def					@arg09	5	23	1	Y	32896	31	63
 def					@arg10	5	23	1	Y	32896	31	63
 def					@arg11	246	83	6	Y	128	30	63
 def					@arg12	246	83	6	Y	128	30	63
-def					@arg13	251	16777216	10	Y	128	31	63
-def					@arg14	251	16777216	19	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	8	Y	128	31	63
+def					@arg13	250	16777215	10	Y	128	31	63
+def					@arg14	250	16777215	19	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	8	Y	128	31	63
 def					@arg17	8	20	4	Y	32928	0	63
 def					@arg18	8	20	1	Y	32896	0	63
 def					@arg19	8	20	1	Y	32896	0	63
-def					@arg20	251	16777216	1	Y	0	31	8
-def					@arg21	251	16777216	10	Y	0	31	8
-def					@arg22	251	16777216	30	Y	0	31	8
-def					@arg23	251	16777216	8	Y	128	31	63
-def					@arg24	251	16777216	8	Y	0	31	8
-def					@arg25	251	16777216	4	Y	128	31	63
-def					@arg26	251	16777216	4	Y	0	31	8
-def					@arg27	251	16777216	10	Y	128	31	63
-def					@arg28	251	16777216	10	Y	0	31	8
-def					@arg29	251	16777216	8	Y	128	31	63
-def					@arg30	251	16777216	8	Y	0	31	8
-def					@arg31	251	16777216	3	Y	0	31	8
-def					@arg32	251	16777216	6	Y	0	31	8
+def					@arg20	250	16777215	1	Y	0	31	8
+def					@arg21	250	16777215	10	Y	0	31	8
+def					@arg22	250	16777215	30	Y	0	31	8
+def					@arg23	250	16777215	8	Y	128	31	63
+def					@arg24	250	16777215	8	Y	0	31	8
+def					@arg25	250	16777215	4	Y	128	31	63
+def					@arg26	250	16777215	4	Y	0	31	8
+def					@arg27	250	16777215	10	Y	128	31	63
+def					@arg28	250	16777215	10	Y	0	31	8
+def					@arg29	250	16777215	8	Y	128	31	63
+def					@arg30	250	16777215	8	Y	0	31	8
+def					@arg31	250	16777215	3	Y	0	31	8
+def					@arg32	250	16777215	6	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 1	1	1	1	1	1	1	1	1	1	1.0000	1.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29 11:11:11	11:11:11	2004	1	1	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	one	monday
 select @arg01:=  c1, @arg02:=  c2, @arg03:=  c3, @arg04:=  c4,
@@ -1976,26 +1976,26 @@ def					@arg09	5	23	0	Y	32896	31	63
 def					@arg10	5	23	0	Y	32896	31	63
 def					@arg11	246	83	0	Y	128	30	63
 def					@arg12	246	83	0	Y	128	30	63
-def					@arg13	251	16777216	0	Y	128	31	63
-def					@arg14	251	16777216	0	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	0	Y	128	31	63
+def					@arg13	250	16777215	0	Y	128	31	63
+def					@arg14	250	16777215	0	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	0	Y	128	31	63
 def					@arg17	8	20	0	Y	32928	0	63
 def					@arg18	8	20	0	Y	32896	0	63
 def					@arg19	8	20	0	Y	32896	0	63
-def					@arg20	251	16777216	0	Y	0	31	8
-def					@arg21	251	16777216	0	Y	0	31	8
-def					@arg22	251	16777216	0	Y	0	31	8
-def					@arg23	251	16777216	0	Y	128	31	63
-def					@arg24	251	16777216	0	Y	0	31	8
-def					@arg25	251	16777216	0	Y	128	31	63
-def					@arg26	251	16777216	0	Y	0	31	8
-def					@arg27	251	16777216	0	Y	128	31	63
-def					@arg28	251	16777216	0	Y	0	31	8
-def					@arg29	251	16777216	0	Y	128	31	63
-def					@arg30	251	16777216	0	Y	0	31	8
-def					@arg31	251	16777216	0	Y	0	31	8
-def					@arg32	251	16777216	0	Y	0	31	8
+def					@arg20	250	16777215	0	Y	0	31	8
+def					@arg21	250	16777215	0	Y	0	31	8
+def					@arg22	250	16777215	0	Y	0	31	8
+def					@arg23	250	16777215	0	Y	128	31	63
+def					@arg24	250	16777215	0	Y	0	31	8
+def					@arg25	250	16777215	0	Y	128	31	63
+def					@arg26	250	16777215	0	Y	0	31	8
+def					@arg27	250	16777215	0	Y	128	31	63
+def					@arg28	250	16777215	0	Y	0	31	8
+def					@arg29	250	16777215	0	Y	128	31	63
+def					@arg30	250	16777215	0	Y	0	31	8
+def					@arg31	250	16777215	0	Y	0	31	8
+def					@arg32	250	16777215	0	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	1991-01-01 01:01:01	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
 prepare stmt1 from "select 
@@ -2026,26 +2026,26 @@ def					@arg09	5	23	1	Y	32896	31	63
 def					@arg10	5	23	1	Y	32896	31	63
 def					@arg11	246	83	6	Y	128	30	63
 def					@arg12	246	83	6	Y	128	30	63
-def					@arg13	251	16777216	10	Y	128	31	63
-def					@arg14	251	16777216	19	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	8	Y	128	31	63
+def					@arg13	250	16777215	10	Y	128	31	63
+def					@arg14	250	16777215	19	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	8	Y	128	31	63
 def					@arg17	8	20	4	Y	32928	0	63
 def					@arg18	8	20	1	Y	32896	0	63
 def					@arg19	8	20	1	Y	32896	0	63
-def					@arg20	251	16777216	1	Y	0	31	8
-def					@arg21	251	16777216	10	Y	0	31	8
-def					@arg22	251	16777216	30	Y	0	31	8
-def					@arg23	251	16777216	8	Y	128	31	63
-def					@arg24	251	16777216	8	Y	0	31	8
-def					@arg25	251	16777216	4	Y	128	31	63
-def					@arg26	251	16777216	4	Y	0	31	8
-def					@arg27	251	16777216	10	Y	128	31	63
-def					@arg28	251	16777216	10	Y	0	31	8
-def					@arg29	251	16777216	8	Y	128	31	63
-def					@arg30	251	16777216	8	Y	0	31	8
-def					@arg31	251	16777216	3	Y	0	31	8
-def					@arg32	251	16777216	6	Y	0	31	8
+def					@arg20	250	16777215	1	Y	0	31	8
+def					@arg21	250	16777215	10	Y	0	31	8
+def					@arg22	250	16777215	30	Y	0	31	8
+def					@arg23	250	16777215	8	Y	128	31	63
+def					@arg24	250	16777215	8	Y	0	31	8
+def					@arg25	250	16777215	4	Y	128	31	63
+def					@arg26	250	16777215	4	Y	0	31	8
+def					@arg27	250	16777215	10	Y	128	31	63
+def					@arg28	250	16777215	10	Y	0	31	8
+def					@arg29	250	16777215	8	Y	128	31	63
+def					@arg30	250	16777215	8	Y	0	31	8
+def					@arg31	250	16777215	3	Y	0	31	8
+def					@arg32	250	16777215	6	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 1	1	1	1	1	1	1	1	1	1	1.0000	1.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29 11:11:11	11:11:11	2004	1	1	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	one	monday
 set @my_key= 0 ;
@@ -2066,26 +2066,26 @@ def					@arg09	5	23	0	Y	32896	31	63
 def					@arg10	5	23	0	Y	32896	31	63
 def					@arg11	246	83	0	Y	128	30	63
 def					@arg12	246	83	0	Y	128	30	63
-def					@arg13	251	16777216	0	Y	128	31	63
-def					@arg14	251	16777216	0	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	0	Y	128	31	63
+def					@arg13	250	16777215	0	Y	128	31	63
+def					@arg14	250	16777215	0	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	0	Y	128	31	63
 def					@arg17	8	20	0	Y	32928	0	63
 def					@arg18	8	20	0	Y	32896	0	63
 def					@arg19	8	20	0	Y	32896	0	63
-def					@arg20	251	16777216	0	Y	0	31	8
-def					@arg21	251	16777216	0	Y	0	31	8
-def					@arg22	251	16777216	0	Y	0	31	8
-def					@arg23	251	16777216	0	Y	128	31	63
-def					@arg24	251	16777216	0	Y	0	31	8
-def					@arg25	251	16777216	0	Y	128	31	63
-def					@arg26	251	16777216	0	Y	0	31	8
-def					@arg27	251	16777216	0	Y	128	31	63
-def					@arg28	251	16777216	0	Y	0	31	8
-def					@arg29	251	16777216	0	Y	128	31	63
-def					@arg30	251	16777216	0	Y	0	31	8
-def					@arg31	251	16777216	0	Y	0	31	8
-def					@arg32	251	16777216	0	Y	0	31	8
+def					@arg20	250	16777215	0	Y	0	31	8
+def					@arg21	250	16777215	0	Y	0	31	8
+def					@arg22	250	16777215	0	Y	0	31	8
+def					@arg23	250	16777215	0	Y	128	31	63
+def					@arg24	250	16777215	0	Y	0	31	8
+def					@arg25	250	16777215	0	Y	128	31	63
+def					@arg26	250	16777215	0	Y	0	31	8
+def					@arg27	250	16777215	0	Y	128	31	63
+def					@arg28	250	16777215	0	Y	0	31	8
+def					@arg29	250	16777215	0	Y	128	31	63
+def					@arg30	250	16777215	0	Y	0	31	8
+def					@arg31	250	16777215	0	Y	0	31	8
+def					@arg32	250	16777215	0	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	1991-01-01 01:01:01	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
 prepare stmt1 from "select ? := c1 from t9 where c1= 1" ;
@@ -2114,26 +2114,26 @@ def					@arg09	5	23	1	Y	32896	31	63
 def					@arg10	5	23	1	Y	32896	31	63
 def					@arg11	246	83	6	Y	128	30	63
 def					@arg12	246	83	6	Y	128	30	63
-def					@arg13	251	16777216	10	Y	128	31	63
-def					@arg14	251	16777216	19	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	8	Y	128	31	63
+def					@arg13	250	16777215	10	Y	128	31	63
+def					@arg14	250	16777215	19	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	8	Y	128	31	63
 def					@arg17	8	20	4	Y	32928	0	63
 def					@arg18	8	20	1	Y	32896	0	63
 def					@arg19	8	20	1	Y	32896	0	63
-def					@arg20	251	16777216	1	Y	0	31	8
-def					@arg21	251	16777216	10	Y	0	31	8
-def					@arg22	251	16777216	30	Y	0	31	8
-def					@arg23	251	16777216	8	Y	128	31	63
-def					@arg24	251	16777216	8	Y	0	31	8
-def					@arg25	251	16777216	4	Y	128	31	63
-def					@arg26	251	16777216	4	Y	0	31	8
-def					@arg27	251	16777216	10	Y	128	31	63
-def					@arg28	251	16777216	10	Y	0	31	8
-def					@arg29	251	16777216	8	Y	128	31	63
-def					@arg30	251	16777216	8	Y	0	31	8
-def					@arg31	251	16777216	3	Y	0	31	8
-def					@arg32	251	16777216	6	Y	0	31	8
+def					@arg20	250	16777215	1	Y	0	31	8
+def					@arg21	250	16777215	10	Y	0	31	8
+def					@arg22	250	16777215	30	Y	0	31	8
+def					@arg23	250	16777215	8	Y	128	31	63
+def					@arg24	250	16777215	8	Y	0	31	8
+def					@arg25	250	16777215	4	Y	128	31	63
+def					@arg26	250	16777215	4	Y	0	31	8
+def					@arg27	250	16777215	10	Y	128	31	63
+def					@arg28	250	16777215	10	Y	0	31	8
+def					@arg29	250	16777215	8	Y	128	31	63
+def					@arg30	250	16777215	8	Y	0	31	8
+def					@arg31	250	16777215	3	Y	0	31	8
+def					@arg32	250	16777215	6	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 1	1	1	1	1	1	1	1	1	1	1.0000	1.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29 11:11:11	11:11:11	2004	1	1	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	one	monday
 select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
@@ -2158,26 +2158,26 @@ def					@arg09	5	23	0	Y	32896	31	63
 def					@arg10	5	23	0	Y	32896	31	63
 def					@arg11	246	83	0	Y	128	30	63
 def					@arg12	246	83	0	Y	128	30	63
-def					@arg13	251	16777216	0	Y	128	31	63
-def					@arg14	251	16777216	0	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	0	Y	128	31	63
+def					@arg13	250	16777215	0	Y	128	31	63
+def					@arg14	250	16777215	0	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	0	Y	128	31	63
 def					@arg17	8	20	0	Y	32928	0	63
 def					@arg18	8	20	0	Y	32896	0	63
 def					@arg19	8	20	0	Y	32896	0	63
-def					@arg20	251	16777216	0	Y	0	31	8
-def					@arg21	251	16777216	0	Y	0	31	8
-def					@arg22	251	16777216	0	Y	0	31	8
-def					@arg23	251	16777216	0	Y	128	31	63
-def					@arg24	251	16777216	0	Y	0	31	8
-def					@arg25	251	16777216	0	Y	128	31	63
-def					@arg26	251	16777216	0	Y	0	31	8
-def					@arg27	251	16777216	0	Y	128	31	63
-def					@arg28	251	16777216	0	Y	0	31	8
-def					@arg29	251	16777216	0	Y	128	31	63
-def					@arg30	251	16777216	0	Y	0	31	8
-def					@arg31	251	16777216	0	Y	0	31	8
-def					@arg32	251	16777216	0	Y	0	31	8
+def					@arg20	250	16777215	0	Y	0	31	8
+def					@arg21	250	16777215	0	Y	0	31	8
+def					@arg22	250	16777215	0	Y	0	31	8
+def					@arg23	250	16777215	0	Y	128	31	63
+def					@arg24	250	16777215	0	Y	0	31	8
+def					@arg25	250	16777215	0	Y	128	31	63
+def					@arg26	250	16777215	0	Y	0	31	8
+def					@arg27	250	16777215	0	Y	128	31	63
+def					@arg28	250	16777215	0	Y	0	31	8
+def					@arg29	250	16777215	0	Y	128	31	63
+def					@arg30	250	16777215	0	Y	0	31	8
+def					@arg31	250	16777215	0	Y	0	31	8
+def					@arg32	250	16777215	0	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	1991-01-01 01:01:01	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
 prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
@@ -2204,26 +2204,26 @@ def					@arg09	5	23	1	Y	32896	31	63
 def					@arg10	5	23	1	Y	32896	31	63
 def					@arg11	246	83	6	Y	128	30	63
 def					@arg12	246	83	6	Y	128	30	63
-def					@arg13	251	16777216	10	Y	128	31	63
-def					@arg14	251	16777216	19	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	8	Y	128	31	63
+def					@arg13	250	16777215	10	Y	128	31	63
+def					@arg14	250	16777215	19	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	8	Y	128	31	63
 def					@arg17	8	20	4	Y	32928	0	63
 def					@arg18	8	20	1	Y	32896	0	63
 def					@arg19	8	20	1	Y	32896	0	63
-def					@arg20	251	16777216	1	Y	0	31	8
-def					@arg21	251	16777216	10	Y	0	31	8
-def					@arg22	251	16777216	30	Y	0	31	8
-def					@arg23	251	16777216	8	Y	128	31	63
-def					@arg24	251	16777216	8	Y	0	31	8
-def					@arg25	251	16777216	4	Y	128	31	63
-def					@arg26	251	16777216	4	Y	0	31	8
-def					@arg27	251	16777216	10	Y	128	31	63
-def					@arg28	251	16777216	10	Y	0	31	8
-def					@arg29	251	16777216	8	Y	128	31	63
-def					@arg30	251	16777216	8	Y	0	31	8
-def					@arg31	251	16777216	3	Y	0	31	8
-def					@arg32	251	16777216	6	Y	0	31	8
+def					@arg20	250	16777215	1	Y	0	31	8
+def					@arg21	250	16777215	10	Y	0	31	8
+def					@arg22	250	16777215	30	Y	0	31	8
+def					@arg23	250	16777215	8	Y	128	31	63
+def					@arg24	250	16777215	8	Y	0	31	8
+def					@arg25	250	16777215	4	Y	128	31	63
+def					@arg26	250	16777215	4	Y	0	31	8
+def					@arg27	250	16777215	10	Y	128	31	63
+def					@arg28	250	16777215	10	Y	0	31	8
+def					@arg29	250	16777215	8	Y	128	31	63
+def					@arg30	250	16777215	8	Y	0	31	8
+def					@arg31	250	16777215	3	Y	0	31	8
+def					@arg32	250	16777215	6	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 1	1	1	1	1	1	1	1	1	1	1.0000	1.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29 11:11:11	11:11:11	2004	1	1	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	one	monday
 set @my_key= 0 ;
@@ -2242,26 +2242,26 @@ def					@arg09	5	23	0	Y	32896	31	63
 def					@arg10	5	23	0	Y	32896	31	63
 def					@arg11	246	83	0	Y	128	30	63
 def					@arg12	246	83	0	Y	128	30	63
-def					@arg13	251	16777216	0	Y	128	31	63
-def					@arg14	251	16777216	0	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	0	Y	128	31	63
+def					@arg13	250	16777215	0	Y	128	31	63
+def					@arg14	250	16777215	0	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	0	Y	128	31	63
 def					@arg17	8	20	0	Y	32928	0	63
 def					@arg18	8	20	0	Y	32896	0	63
 def					@arg19	8	20	0	Y	32896	0	63
-def					@arg20	251	16777216	0	Y	0	31	8
-def					@arg21	251	16777216	0	Y	0	31	8
-def					@arg22	251	16777216	0	Y	0	31	8
-def					@arg23	251	16777216	0	Y	128	31	63
-def					@arg24	251	16777216	0	Y	0	31	8
-def					@arg25	251	16777216	0	Y	128	31	63
-def					@arg26	251	16777216	0	Y	0	31	8
-def					@arg27	251	16777216	0	Y	128	31	63
-def					@arg28	251	16777216	0	Y	0	31	8
-def					@arg29	251	16777216	0	Y	128	31	63
-def					@arg30	251	16777216	0	Y	0	31	8
-def					@arg31	251	16777216	0	Y	0	31	8
-def					@arg32	251	16777216	0	Y	0	31	8
+def					@arg20	250	16777215	0	Y	0	31	8
+def					@arg21	250	16777215	0	Y	0	31	8
+def					@arg22	250	16777215	0	Y	0	31	8
+def					@arg23	250	16777215	0	Y	128	31	63
+def					@arg24	250	16777215	0	Y	0	31	8
+def					@arg25	250	16777215	0	Y	128	31	63
+def					@arg26	250	16777215	0	Y	0	31	8
+def					@arg27	250	16777215	0	Y	128	31	63
+def					@arg28	250	16777215	0	Y	0	31	8
+def					@arg29	250	16777215	0	Y	128	31	63
+def					@arg30	250	16777215	0	Y	0	31	8
+def					@arg31	250	16777215	0	Y	0	31	8
+def					@arg32	250	16777215	0	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	1991-01-01 01:01:01	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
 prepare stmt1 from "select c1 into ? from t9 where c1= 1" ;

=== modified file 'mysql-test/suite/ndb/r/ps_7ndb.result'
--- a/mysql-test/suite/ndb/r/ps_7ndb.result	2009-03-11 15:32:42 +0000
+++ b/mysql-test/suite/ndb/r/ps_7ndb.result	2010-11-23 21:39:59 +0000
@@ -1912,26 +1912,26 @@ def					@arg09	5	23	1	Y	32896	31	63
 def					@arg10	5	23	1	Y	32896	31	63
 def					@arg11	246	83	6	Y	128	30	63
 def					@arg12	246	83	6	Y	128	30	63
-def					@arg13	251	16777216	10	Y	128	31	63
-def					@arg14	251	16777216	19	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	8	Y	128	31	63
+def					@arg13	250	16777215	10	Y	128	31	63
+def					@arg14	250	16777215	19	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	8	Y	128	31	63
 def					@arg17	8	20	4	Y	32928	0	63
 def					@arg18	8	20	1	Y	32896	0	63
 def					@arg19	8	20	1	Y	32896	0	63
-def					@arg20	251	16777216	1	Y	0	31	8
-def					@arg21	251	16777216	10	Y	0	31	8
-def					@arg22	251	16777216	30	Y	0	31	8
-def					@arg23	251	16777216	8	Y	128	31	63
-def					@arg24	251	16777216	8	Y	0	31	8
-def					@arg25	251	16777216	4	Y	128	31	63
-def					@arg26	251	16777216	4	Y	0	31	8
-def					@arg27	251	16777216	10	Y	128	31	63
-def					@arg28	251	16777216	10	Y	0	31	8
-def					@arg29	251	16777216	8	Y	128	31	63
-def					@arg30	251	16777216	8	Y	0	31	8
-def					@arg31	251	16777216	3	Y	0	31	8
-def					@arg32	251	16777216	6	Y	0	31	8
+def					@arg20	250	16777215	1	Y	0	31	8
+def					@arg21	250	16777215	10	Y	0	31	8
+def					@arg22	250	16777215	30	Y	0	31	8
+def					@arg23	250	16777215	8	Y	128	31	63
+def					@arg24	250	16777215	8	Y	0	31	8
+def					@arg25	250	16777215	4	Y	128	31	63
+def					@arg26	250	16777215	4	Y	0	31	8
+def					@arg27	250	16777215	10	Y	128	31	63
+def					@arg28	250	16777215	10	Y	0	31	8
+def					@arg29	250	16777215	8	Y	128	31	63
+def					@arg30	250	16777215	8	Y	0	31	8
+def					@arg31	250	16777215	3	Y	0	31	8
+def					@arg32	250	16777215	6	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 1	1	1	1	1	1	1	1	1	1	1.0000	1.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29 11:11:11	11:11:11	2004	1	1	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	one	monday
 select @arg01:=  c1, @arg02:=  c2, @arg03:=  c3, @arg04:=  c4,
@@ -1959,26 +1959,26 @@ def					@arg09	5	23	0	Y	32896	31	63
 def					@arg10	5	23	0	Y	32896	31	63
 def					@arg11	246	83	0	Y	128	30	63
 def					@arg12	246	83	0	Y	128	30	63
-def					@arg13	251	16777216	0	Y	128	31	63
-def					@arg14	251	16777216	0	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	0	Y	128	31	63
+def					@arg13	250	16777215	0	Y	128	31	63
+def					@arg14	250	16777215	0	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	0	Y	128	31	63
 def					@arg17	8	20	0	Y	32928	0	63
 def					@arg18	8	20	0	Y	32896	0	63
 def					@arg19	8	20	0	Y	32896	0	63
-def					@arg20	251	16777216	0	Y	0	31	8
-def					@arg21	251	16777216	0	Y	0	31	8
-def					@arg22	251	16777216	0	Y	0	31	8
-def					@arg23	251	16777216	0	Y	128	31	63
-def					@arg24	251	16777216	0	Y	0	31	8
-def					@arg25	251	16777216	0	Y	128	31	63
-def					@arg26	251	16777216	0	Y	0	31	8
-def					@arg27	251	16777216	0	Y	128	31	63
-def					@arg28	251	16777216	0	Y	0	31	8
-def					@arg29	251	16777216	0	Y	128	31	63
-def					@arg30	251	16777216	0	Y	0	31	8
-def					@arg31	251	16777216	0	Y	0	31	8
-def					@arg32	251	16777216	0	Y	0	31	8
+def					@arg20	250	16777215	0	Y	0	31	8
+def					@arg21	250	16777215	0	Y	0	31	8
+def					@arg22	250	16777215	0	Y	0	31	8
+def					@arg23	250	16777215	0	Y	128	31	63
+def					@arg24	250	16777215	0	Y	0	31	8
+def					@arg25	250	16777215	0	Y	128	31	63
+def					@arg26	250	16777215	0	Y	0	31	8
+def					@arg27	250	16777215	0	Y	128	31	63
+def					@arg28	250	16777215	0	Y	0	31	8
+def					@arg29	250	16777215	0	Y	128	31	63
+def					@arg30	250	16777215	0	Y	0	31	8
+def					@arg31	250	16777215	0	Y	0	31	8
+def					@arg32	250	16777215	0	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	1991-01-01 01:01:01	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
 prepare stmt1 from "select 
@@ -2009,26 +2009,26 @@ def					@arg09	5	23	1	Y	32896	31	63
 def					@arg10	5	23	1	Y	32896	31	63
 def					@arg11	246	83	6	Y	128	30	63
 def					@arg12	246	83	6	Y	128	30	63
-def					@arg13	251	16777216	10	Y	128	31	63
-def					@arg14	251	16777216	19	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	8	Y	128	31	63
+def					@arg13	250	16777215	10	Y	128	31	63
+def					@arg14	250	16777215	19	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	8	Y	128	31	63
 def					@arg17	8	20	4	Y	32928	0	63
 def					@arg18	8	20	1	Y	32896	0	63
 def					@arg19	8	20	1	Y	32896	0	63
-def					@arg20	251	16777216	1	Y	0	31	8
-def					@arg21	251	16777216	10	Y	0	31	8
-def					@arg22	251	16777216	30	Y	0	31	8
-def					@arg23	251	16777216	8	Y	128	31	63
-def					@arg24	251	16777216	8	Y	0	31	8
-def					@arg25	251	16777216	4	Y	128	31	63
-def					@arg26	251	16777216	4	Y	0	31	8
-def					@arg27	251	16777216	10	Y	128	31	63
-def					@arg28	251	16777216	10	Y	0	31	8
-def					@arg29	251	16777216	8	Y	128	31	63
-def					@arg30	251	16777216	8	Y	0	31	8
-def					@arg31	251	16777216	3	Y	0	31	8
-def					@arg32	251	16777216	6	Y	0	31	8
+def					@arg20	250	16777215	1	Y	0	31	8
+def					@arg21	250	16777215	10	Y	0	31	8
+def					@arg22	250	16777215	30	Y	0	31	8
+def					@arg23	250	16777215	8	Y	128	31	63
+def					@arg24	250	16777215	8	Y	0	31	8
+def					@arg25	250	16777215	4	Y	128	31	63
+def					@arg26	250	16777215	4	Y	0	31	8
+def					@arg27	250	16777215	10	Y	128	31	63
+def					@arg28	250	16777215	10	Y	0	31	8
+def					@arg29	250	16777215	8	Y	128	31	63
+def					@arg30	250	16777215	8	Y	0	31	8
+def					@arg31	250	16777215	3	Y	0	31	8
+def					@arg32	250	16777215	6	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 1	1	1	1	1	1	1	1	1	1	1.0000	1.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29 11:11:11	11:11:11	2004	1	1	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	one	monday
 set @my_key= 0 ;
@@ -2049,26 +2049,26 @@ def					@arg09	5	23	0	Y	32896	31	63
 def					@arg10	5	23	0	Y	32896	31	63
 def					@arg11	246	83	0	Y	128	30	63
 def					@arg12	246	83	0	Y	128	30	63
-def					@arg13	251	16777216	0	Y	128	31	63
-def					@arg14	251	16777216	0	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	0	Y	128	31	63
+def					@arg13	250	16777215	0	Y	128	31	63
+def					@arg14	250	16777215	0	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	0	Y	128	31	63
 def					@arg17	8	20	0	Y	32928	0	63
 def					@arg18	8	20	0	Y	32896	0	63
 def					@arg19	8	20	0	Y	32896	0	63
-def					@arg20	251	16777216	0	Y	0	31	8
-def					@arg21	251	16777216	0	Y	0	31	8
-def					@arg22	251	16777216	0	Y	0	31	8
-def					@arg23	251	16777216	0	Y	128	31	63
-def					@arg24	251	16777216	0	Y	0	31	8
-def					@arg25	251	16777216	0	Y	128	31	63
-def					@arg26	251	16777216	0	Y	0	31	8
-def					@arg27	251	16777216	0	Y	128	31	63
-def					@arg28	251	16777216	0	Y	0	31	8
-def					@arg29	251	16777216	0	Y	128	31	63
-def					@arg30	251	16777216	0	Y	0	31	8
-def					@arg31	251	16777216	0	Y	0	31	8
-def					@arg32	251	16777216	0	Y	0	31	8
+def					@arg20	250	16777215	0	Y	0	31	8
+def					@arg21	250	16777215	0	Y	0	31	8
+def					@arg22	250	16777215	0	Y	0	31	8
+def					@arg23	250	16777215	0	Y	128	31	63
+def					@arg24	250	16777215	0	Y	0	31	8
+def					@arg25	250	16777215	0	Y	128	31	63
+def					@arg26	250	16777215	0	Y	0	31	8
+def					@arg27	250	16777215	0	Y	128	31	63
+def					@arg28	250	16777215	0	Y	0	31	8
+def					@arg29	250	16777215	0	Y	128	31	63
+def					@arg30	250	16777215	0	Y	0	31	8
+def					@arg31	250	16777215	0	Y	0	31	8
+def					@arg32	250	16777215	0	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	1991-01-01 01:01:01	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
 prepare stmt1 from "select ? := c1 from t9 where c1= 1" ;
@@ -2097,26 +2097,26 @@ def					@arg09	5	23	1	Y	32896	31	63
 def					@arg10	5	23	1	Y	32896	31	63
 def					@arg11	246	83	6	Y	128	30	63
 def					@arg12	246	83	6	Y	128	30	63
-def					@arg13	251	16777216	10	Y	128	31	63
-def					@arg14	251	16777216	19	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	8	Y	128	31	63
+def					@arg13	250	16777215	10	Y	128	31	63
+def					@arg14	250	16777215	19	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	8	Y	128	31	63
 def					@arg17	8	20	4	Y	32928	0	63
 def					@arg18	8	20	1	Y	32896	0	63
 def					@arg19	8	20	1	Y	32896	0	63
-def					@arg20	251	16777216	1	Y	0	31	8
-def					@arg21	251	16777216	10	Y	0	31	8
-def					@arg22	251	16777216	30	Y	0	31	8
-def					@arg23	251	16777216	8	Y	128	31	63
-def					@arg24	251	16777216	8	Y	0	31	8
-def					@arg25	251	16777216	4	Y	128	31	63
-def					@arg26	251	16777216	4	Y	0	31	8
-def					@arg27	251	16777216	10	Y	128	31	63
-def					@arg28	251	16777216	10	Y	0	31	8
-def					@arg29	251	16777216	8	Y	128	31	63
-def					@arg30	251	16777216	8	Y	0	31	8
-def					@arg31	251	16777216	3	Y	0	31	8
-def					@arg32	251	16777216	6	Y	0	31	8
+def					@arg20	250	16777215	1	Y	0	31	8
+def					@arg21	250	16777215	10	Y	0	31	8
+def					@arg22	250	16777215	30	Y	0	31	8
+def					@arg23	250	16777215	8	Y	128	31	63
+def					@arg24	250	16777215	8	Y	0	31	8
+def					@arg25	250	16777215	4	Y	128	31	63
+def					@arg26	250	16777215	4	Y	0	31	8
+def					@arg27	250	16777215	10	Y	128	31	63
+def					@arg28	250	16777215	10	Y	0	31	8
+def					@arg29	250	16777215	8	Y	128	31	63
+def					@arg30	250	16777215	8	Y	0	31	8
+def					@arg31	250	16777215	3	Y	0	31	8
+def					@arg32	250	16777215	6	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 1	1	1	1	1	1	1	1	1	1	1.0000	1.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29 11:11:11	11:11:11	2004	1	1	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	one	monday
 select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
@@ -2141,26 +2141,26 @@ def					@arg09	5	23	0	Y	32896	31	63
 def					@arg10	5	23	0	Y	32896	31	63
 def					@arg11	246	83	0	Y	128	30	63
 def					@arg12	246	83	0	Y	128	30	63
-def					@arg13	251	16777216	0	Y	128	31	63
-def					@arg14	251	16777216	0	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	0	Y	128	31	63
+def					@arg13	250	16777215	0	Y	128	31	63
+def					@arg14	250	16777215	0	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	0	Y	128	31	63
 def					@arg17	8	20	0	Y	32928	0	63
 def					@arg18	8	20	0	Y	32896	0	63
 def					@arg19	8	20	0	Y	32896	0	63
-def					@arg20	251	16777216	0	Y	0	31	8
-def					@arg21	251	16777216	0	Y	0	31	8
-def					@arg22	251	16777216	0	Y	0	31	8
-def					@arg23	251	16777216	0	Y	128	31	63
-def					@arg24	251	16777216	0	Y	0	31	8
-def					@arg25	251	16777216	0	Y	128	31	63
-def					@arg26	251	16777216	0	Y	0	31	8
-def					@arg27	251	16777216	0	Y	128	31	63
-def					@arg28	251	16777216	0	Y	0	31	8
-def					@arg29	251	16777216	0	Y	128	31	63
-def					@arg30	251	16777216	0	Y	0	31	8
-def					@arg31	251	16777216	0	Y	0	31	8
-def					@arg32	251	16777216	0	Y	0	31	8
+def					@arg20	250	16777215	0	Y	0	31	8
+def					@arg21	250	16777215	0	Y	0	31	8
+def					@arg22	250	16777215	0	Y	0	31	8
+def					@arg23	250	16777215	0	Y	128	31	63
+def					@arg24	250	16777215	0	Y	0	31	8
+def					@arg25	250	16777215	0	Y	128	31	63
+def					@arg26	250	16777215	0	Y	0	31	8
+def					@arg27	250	16777215	0	Y	128	31	63
+def					@arg28	250	16777215	0	Y	0	31	8
+def					@arg29	250	16777215	0	Y	128	31	63
+def					@arg30	250	16777215	0	Y	0	31	8
+def					@arg31	250	16777215	0	Y	0	31	8
+def					@arg32	250	16777215	0	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	1991-01-01 01:01:01	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
 prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
@@ -2187,26 +2187,26 @@ def					@arg09	5	23	1	Y	32896	31	63
 def					@arg10	5	23	1	Y	32896	31	63
 def					@arg11	246	83	6	Y	128	30	63
 def					@arg12	246	83	6	Y	128	30	63
-def					@arg13	251	16777216	10	Y	128	31	63
-def					@arg14	251	16777216	19	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	8	Y	128	31	63
+def					@arg13	250	16777215	10	Y	128	31	63
+def					@arg14	250	16777215	19	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	8	Y	128	31	63
 def					@arg17	8	20	4	Y	32928	0	63
 def					@arg18	8	20	1	Y	32896	0	63
 def					@arg19	8	20	1	Y	32896	0	63
-def					@arg20	251	16777216	1	Y	0	31	8
-def					@arg21	251	16777216	10	Y	0	31	8
-def					@arg22	251	16777216	30	Y	0	31	8
-def					@arg23	251	16777216	8	Y	128	31	63
-def					@arg24	251	16777216	8	Y	0	31	8
-def					@arg25	251	16777216	4	Y	128	31	63
-def					@arg26	251	16777216	4	Y	0	31	8
-def					@arg27	251	16777216	10	Y	128	31	63
-def					@arg28	251	16777216	10	Y	0	31	8
-def					@arg29	251	16777216	8	Y	128	31	63
-def					@arg30	251	16777216	8	Y	0	31	8
-def					@arg31	251	16777216	3	Y	0	31	8
-def					@arg32	251	16777216	6	Y	0	31	8
+def					@arg20	250	16777215	1	Y	0	31	8
+def					@arg21	250	16777215	10	Y	0	31	8
+def					@arg22	250	16777215	30	Y	0	31	8
+def					@arg23	250	16777215	8	Y	128	31	63
+def					@arg24	250	16777215	8	Y	0	31	8
+def					@arg25	250	16777215	4	Y	128	31	63
+def					@arg26	250	16777215	4	Y	0	31	8
+def					@arg27	250	16777215	10	Y	128	31	63
+def					@arg28	250	16777215	10	Y	0	31	8
+def					@arg29	250	16777215	8	Y	128	31	63
+def					@arg30	250	16777215	8	Y	0	31	8
+def					@arg31	250	16777215	3	Y	0	31	8
+def					@arg32	250	16777215	6	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 1	1	1	1	1	1	1	1	1	1	1.0000	1.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29 11:11:11	11:11:11	2004	1	1	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	one	monday
 set @my_key= 0 ;
@@ -2225,26 +2225,26 @@ def					@arg09	5	23	0	Y	32896	31	63
 def					@arg10	5	23	0	Y	32896	31	63
 def					@arg11	246	83	0	Y	128	30	63
 def					@arg12	246	83	0	Y	128	30	63
-def					@arg13	251	16777216	0	Y	128	31	63
-def					@arg14	251	16777216	0	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	0	Y	128	31	63
+def					@arg13	250	16777215	0	Y	128	31	63
+def					@arg14	250	16777215	0	Y	128	31	63
+def					@arg15	250	16777215	19	Y	128	31	63
+def					@arg16	250	16777215	0	Y	128	31	63
 def					@arg17	8	20	0	Y	32928	0	63
 def					@arg18	8	20	0	Y	32896	0	63
 def					@arg19	8	20	0	Y	32896	0	63
-def					@arg20	251	16777216	0	Y	0	31	8
-def					@arg21	251	16777216	0	Y	0	31	8
-def					@arg22	251	16777216	0	Y	0	31	8
-def					@arg23	251	16777216	0	Y	128	31	63
-def					@arg24	251	16777216	0	Y	0	31	8
-def					@arg25	251	16777216	0	Y	128	31	63
-def					@arg26	251	16777216	0	Y	0	31	8
-def					@arg27	251	16777216	0	Y	128	31	63
-def					@arg28	251	16777216	0	Y	0	31	8
-def					@arg29	251	16777216	0	Y	128	31	63
-def					@arg30	251	16777216	0	Y	0	31	8
-def					@arg31	251	16777216	0	Y	0	31	8
-def					@arg32	251	16777216	0	Y	0	31	8
+def					@arg20	250	16777215	0	Y	0	31	8
+def					@arg21	250	16777215	0	Y	0	31	8
+def					@arg22	250	16777215	0	Y	0	31	8
+def					@arg23	250	16777215	0	Y	128	31	63
+def					@arg24	250	16777215	0	Y	0	31	8
+def					@arg25	250	16777215	0	Y	128	31	63
+def					@arg26	250	16777215	0	Y	0	31	8
+def					@arg27	250	16777215	0	Y	128	31	63
+def					@arg28	250	16777215	0	Y	0	31	8
+def					@arg29	250	16777215	0	Y	128	31	63
+def					@arg30	250	16777215	0	Y	0	31	8
+def					@arg31	250	16777215	0	Y	0	31	8
+def					@arg32	250	16777215	0	Y	0	31	8
 @arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
 0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	1991-01-01 01:01:01	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
 prepare stmt1 from "select c1 into ? from t9 where c1= 1" ;

=== modified file 'mysql-test/suite/parts/r/partition_alter3_innodb.result'
--- a/mysql-test/suite/parts/r/partition_alter3_innodb.result	2008-11-12 17:51:47 +0000
+++ b/mysql-test/suite/parts/r/partition_alter3_innodb.result	2010-08-27 08:43:51 +0000
@@ -141,7 +141,7 @@ t1.frm
 t1.par
 EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	part1	ALL	NULL	NULL	NULL	NULL	20	Using where
+1	SIMPLE	t1	part1	ALL	NULL	NULL	NULL	NULL	7	Using where
 # check read single success: 1
 # check read all success: 1
 # check read row by row success: 1
@@ -165,7 +165,7 @@ t1.frm
 t1.par
 EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0	ALL	NULL	NULL	NULL	NULL	20	Using where
+1	SIMPLE	t1	p0	ALL	NULL	NULL	NULL	NULL	5	Using where
 # check read single success: 1
 # check read all success: 1
 # check read row by row success: 1
@@ -190,7 +190,7 @@ t1.frm
 t1.par
 EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0	ALL	NULL	NULL	NULL	NULL	20	Using where
+1	SIMPLE	t1	p0	ALL	NULL	NULL	NULL	NULL	3	Using where
 # check read single success: 1
 # check read all success: 1
 # check read row by row success: 1
@@ -226,7 +226,7 @@ t1.frm
 t1.par
 EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p6	ALL	NULL	NULL	NULL	NULL	20	Using where
+1	SIMPLE	t1	p6	ALL	NULL	NULL	NULL	NULL	3	Using where
 # check read single success: 1
 # check read all success: 1
 # check read row by row success: 1
@@ -248,7 +248,7 @@ t1.frm
 t1.par
 EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p4	ALL	NULL	NULL	NULL	NULL	20	Using where
+1	SIMPLE	t1	p4	ALL	NULL	NULL	NULL	NULL	4	Using where
 # check read single success: 1
 # check read all success: 1
 # check read row by row success: 1
@@ -269,7 +269,7 @@ t1.frm
 t1.par
 EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0	ALL	NULL	NULL	NULL	NULL	20	Using where
+1	SIMPLE	t1	p0	ALL	NULL	NULL	NULL	NULL	4	Using where
 # check read single success: 1
 # check read all success: 1
 # check read row by row success: 1
@@ -289,7 +289,7 @@ t1.frm
 t1.par
 EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0	ALL	NULL	NULL	NULL	NULL	20	Using where
+1	SIMPLE	t1	p0	ALL	NULL	NULL	NULL	NULL	5	Using where
 # check read single success: 1
 # check read all success: 1
 # check read row by row success: 1
@@ -308,7 +308,7 @@ t1.frm
 t1.par
 EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	part1	ALL	NULL	NULL	NULL	NULL	20	Using where
+1	SIMPLE	t1	part1	ALL	NULL	NULL	NULL	NULL	7	Using where
 # check read single success: 1
 # check read all success: 1
 # check read row by row success: 1
@@ -326,7 +326,7 @@ t1.frm
 t1.par
 EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0	ALL	NULL	NULL	NULL	NULL	20	Using where
+1	SIMPLE	t1	p0	ALL	NULL	NULL	NULL	NULL	10	Using where
 # check read single success: 1
 # check read all success: 1
 # check read row by row success: 1
@@ -452,7 +452,7 @@ t1.frm
 t1.par
 EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	part7	ALL	NULL	NULL	NULL	NULL	20	Using where
+1	SIMPLE	t1	part7	ALL	NULL	NULL	NULL	NULL	7	Using where
 # check read single success: 1
 # check read all success: 1
 # check read row by row success: 1
@@ -476,7 +476,7 @@ t1.frm
 t1.par
 EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	part7	ALL	NULL	NULL	NULL	NULL	20	Using where
+1	SIMPLE	t1	part7	ALL	NULL	NULL	NULL	NULL	5	Using where
 # check read single success: 1
 # check read all success: 1
 # check read row by row success: 1
@@ -504,7 +504,7 @@ t1.frm
 t1.par
 EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p6	ALL	NULL	NULL	NULL	NULL	20	Using where
+1	SIMPLE	t1	p6	ALL	NULL	NULL	NULL	NULL	3	Using where
 # check read single success: 1
 # check read all success: 1
 # check read row by row success: 1
@@ -538,7 +538,7 @@ t1.frm
 t1.par
 EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0	ALL	NULL	NULL	NULL	NULL	20	Using where
+1	SIMPLE	t1	p0	ALL	NULL	NULL	NULL	NULL	4	Using where
 # check read single success: 1
 # check read all success: 1
 # check read row by row success: 1
@@ -563,7 +563,7 @@ t1.frm
 t1.par
 EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	part7	ALL	NULL	NULL	NULL	NULL	20	Using where
+1	SIMPLE	t1	part7	ALL	NULL	NULL	NULL	NULL	3	Using where
 # check read single success: 1
 # check read all success: 1
 # check read row by row success: 1
@@ -587,7 +587,7 @@ t1.frm
 t1.par
 EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p4	ALL	NULL	NULL	NULL	NULL	23	Using where
+1	SIMPLE	t1	p4	ALL	NULL	NULL	NULL	NULL	10	Using where
 # check read single success: 1
 # check read all success: 1
 # check read row by row success: 1
@@ -610,7 +610,7 @@ t1.frm
 t1.par
 EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	part7	ALL	NULL	NULL	NULL	NULL	20	Using where
+1	SIMPLE	t1	part7	ALL	NULL	NULL	NULL	NULL	5	Using where
 # check read single success: 1
 # check read all success: 1
 # check read row by row success: 1
@@ -632,7 +632,7 @@ t1.frm
 t1.par
 EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	part7	ALL	NULL	NULL	NULL	NULL	20	Using where
+1	SIMPLE	t1	part7	ALL	NULL	NULL	NULL	NULL	7	Using where
 # check read single success: 1
 # check read all success: 1
 # check read row by row success: 1
@@ -653,7 +653,7 @@ t1.frm
 t1.par
 EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0	ALL	NULL	NULL	NULL	NULL	20	Using where
+1	SIMPLE	t1	p0	ALL	NULL	NULL	NULL	NULL	10	Using where
 # check read single success: 1
 # check read all success: 1
 # check read row by row success: 1

=== modified file 'mysql-test/suite/parts/r/partition_alter3_myisam.result'
--- a/mysql-test/suite/parts/r/partition_alter3_myisam.result	2008-11-12 17:51:47 +0000
+++ b/mysql-test/suite/parts/r/partition_alter3_myisam.result	2010-08-27 08:43:51 +0000
@@ -155,7 +155,7 @@ t1.frm
 t1.par
 EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	part1	ALL	NULL	NULL	NULL	NULL	20	Using where
+1	SIMPLE	t1	part1	ALL	NULL	NULL	NULL	NULL	7	Using where
 # check read single success: 1
 # check read all success: 1
 # check read row by row success: 1
@@ -187,7 +187,7 @@ t1.frm
 t1.par
 EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0	ALL	NULL	NULL	NULL	NULL	20	Using where
+1	SIMPLE	t1	p0	ALL	NULL	NULL	NULL	NULL	5	Using where
 # check read single success: 1
 # check read all success: 1
 # check read row by row success: 1
@@ -228,7 +228,7 @@ t1.frm
 t1.par
 EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0	ALL	NULL	NULL	NULL	NULL	20	Using where
+1	SIMPLE	t1	p0	ALL	NULL	NULL	NULL	NULL	3	Using where
 # check read single success: 1
 # check read all success: 1
 # check read row by row success: 1
@@ -278,7 +278,7 @@ t1.frm
 t1.par
 EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p6	ALL	NULL	NULL	NULL	NULL	20	Using where
+1	SIMPLE	t1	p6	ALL	NULL	NULL	NULL	NULL	3	Using where
 # check read single success: 1
 # check read all success: 1
 # check read row by row success: 1
@@ -312,7 +312,7 @@ t1.frm
 t1.par
 EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p4	ALL	NULL	NULL	NULL	NULL	20	Using where
+1	SIMPLE	t1	p4	ALL	NULL	NULL	NULL	NULL	4	Using where
 # check read single success: 1
 # check read all success: 1
 # check read row by row success: 1
@@ -343,7 +343,7 @@ t1.frm
 t1.par
 EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0	ALL	NULL	NULL	NULL	NULL	20	Using where
+1	SIMPLE	t1	p0	ALL	NULL	NULL	NULL	NULL	4	Using where
 # check read single success: 1
 # check read all success: 1
 # check read row by row success: 1
@@ -371,7 +371,7 @@ t1.frm
 t1.par
 EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0	ALL	NULL	NULL	NULL	NULL	20	Using where
+1	SIMPLE	t1	p0	ALL	NULL	NULL	NULL	NULL	5	Using where
 # check read single success: 1
 # check read all success: 1
 # check read row by row success: 1
@@ -396,7 +396,7 @@ t1.frm
 t1.par
 EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	part1	ALL	NULL	NULL	NULL	NULL	20	Using where
+1	SIMPLE	t1	part1	ALL	NULL	NULL	NULL	NULL	7	Using where
 # check read single success: 1
 # check read all success: 1
 # check read row by row success: 1
@@ -418,7 +418,7 @@ t1.frm
 t1.par
 EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0	ALL	NULL	NULL	NULL	NULL	20	Using where
+1	SIMPLE	t1	p0	ALL	NULL	NULL	NULL	NULL	10	Using where
 # check read single success: 1
 # check read all success: 1
 # check read row by row success: 1
@@ -552,7 +552,7 @@ t1.frm
 t1.par
 EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	part7	ALL	NULL	NULL	NULL	NULL	20	Using where
+1	SIMPLE	t1	part7	ALL	NULL	NULL	NULL	NULL	7	Using where
 # check read single success: 1
 # check read all success: 1
 # check read row by row success: 1
@@ -584,7 +584,7 @@ t1.frm
 t1.par
 EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	part7	ALL	NULL	NULL	NULL	NULL	20	Using where
+1	SIMPLE	t1	part7	ALL	NULL	NULL	NULL	NULL	5	Using where
 # check read single success: 1
 # check read all success: 1
 # check read row by row success: 1
@@ -628,7 +628,7 @@ t1.frm
 t1.par
 EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p6	ALL	NULL	NULL	NULL	NULL	20	Using where
+1	SIMPLE	t1	p6	ALL	NULL	NULL	NULL	NULL	3	Using where
 # check read single success: 1
 # check read all success: 1
 # check read row by row success: 1
@@ -676,7 +676,7 @@ t1.frm
 t1.par
 EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0	ALL	NULL	NULL	NULL	NULL	20	Using where
+1	SIMPLE	t1	p0	ALL	NULL	NULL	NULL	NULL	4	Using where
 # check read single success: 1
 # check read all success: 1
 # check read row by row success: 1
@@ -713,7 +713,7 @@ t1.frm
 t1.par
 EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	part7	ALL	NULL	NULL	NULL	NULL	20	Using where
+1	SIMPLE	t1	part7	ALL	NULL	NULL	NULL	NULL	3	Using where
 # check read single success: 1
 # check read all success: 1
 # check read row by row success: 1
@@ -747,7 +747,7 @@ t1.frm
 t1.par
 EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p4	ALL	NULL	NULL	NULL	NULL	20	Using where
+1	SIMPLE	t1	p4	ALL	NULL	NULL	NULL	NULL	10	Using where
 # check read single success: 1
 # check read all success: 1
 # check read row by row success: 1
@@ -778,7 +778,7 @@ t1.frm
 t1.par
 EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	part7	ALL	NULL	NULL	NULL	NULL	20	Using where
+1	SIMPLE	t1	part7	ALL	NULL	NULL	NULL	NULL	5	Using where
 # check read single success: 1
 # check read all success: 1
 # check read row by row success: 1
@@ -806,7 +806,7 @@ t1.frm
 t1.par
 EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	part7	ALL	NULL	NULL	NULL	NULL	20	Using where
+1	SIMPLE	t1	part7	ALL	NULL	NULL	NULL	NULL	7	Using where
 # check read single success: 1
 # check read all success: 1
 # check read row by row success: 1
@@ -831,7 +831,7 @@ t1.frm
 t1.par
 EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0	ALL	NULL	NULL	NULL	NULL	20	Using where
+1	SIMPLE	t1	p0	ALL	NULL	NULL	NULL	NULL	10	Using where
 # check read single success: 1
 # check read all success: 1
 # check read row by row success: 1

=== modified file 'mysql-test/suite/pbxt/r/partition_hash.result'
--- a/mysql-test/suite/pbxt/r/partition_hash.result	2009-04-02 10:03:14 +0000
+++ b/mysql-test/suite/pbxt/r/partition_hash.result	2010-11-25 18:55:52 +0000
@@ -57,25 +57,25 @@ id	select_type	table	partitions	type	pos
 1	SIMPLE	t1	p0,p1,p2,p3	ALL	NULL	NULL	NULL	NULL	9	Using where
 explain partitions select * from t1 where a is null or (a >= 5 and a <= 7);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0,p2,p3	ALL	NULL	NULL	NULL	NULL	9	Using where
+1	SIMPLE	t1	p0,p2,p3	ALL	NULL	NULL	NULL	NULL	7	Using where
 explain partitions select * from t1 where a is null;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0	ALL	NULL	NULL	NULL	NULL	9	Using where
+1	SIMPLE	t1	p0	ALL	NULL	NULL	NULL	NULL	3	Using where
 explain partitions select * from t1 where a is not null;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	p0,p1,p2,p3	ALL	NULL	NULL	NULL	NULL	9	Using where
 explain partitions select * from t1 where a >= 1 and a < 3;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0,p1	ALL	NULL	NULL	NULL	NULL	9	Using where
+1	SIMPLE	t1	p0,p1	ALL	NULL	NULL	NULL	NULL	5	Using where
 explain partitions select * from t1 where a >= 3 and a <= 5;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p1,p2	ALL	NULL	NULL	NULL	NULL	9	Using where
+1	SIMPLE	t1	p1,p2	ALL	NULL	NULL	NULL	NULL	4	Using where
 explain partitions select * from t1 where a > 2 and a < 4;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p1	ALL	NULL	NULL	NULL	NULL	9	Using where
+1	SIMPLE	t1	p1	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t1 where a > 3 and a <= 6;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p2,p3	ALL	NULL	NULL	NULL	NULL	9	Using where
+1	SIMPLE	t1	p2,p3	ALL	NULL	NULL	NULL	NULL	4	Using where
 explain partitions select * from t1 where a > 5;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	p0,p1,p2,p3	ALL	NULL	NULL	NULL	NULL	9	Using where

=== modified file 'mysql-test/suite/pbxt/r/partition_pruning.result'
--- a/mysql-test/suite/pbxt/r/partition_pruning.result	2010-03-09 15:03:54 +0000
+++ b/mysql-test/suite/pbxt/r/partition_pruning.result	2010-11-25 18:55:52 +0000
@@ -14,7 +14,7 @@ id	select_type	table	partitions	type	pos
 1	SIMPLE	t1	p1	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t1 where a=2;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0	ALL	NULL	NULL	NULL	NULL	3	Using where
+1	SIMPLE	t1	p0	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t1 where a=1 or a=2;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	p0,p1	ALL	NULL	NULL	NULL	NULL	3	Using where
@@ -31,7 +31,7 @@ id	select_type	table	partitions	type	pos
 1	SIMPLE	t2	p0,p1	ALL	NULL	NULL	NULL	NULL	3	Using where
 explain partitions select * from t2 where a=1 and b=1;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t2	p0	ALL	NULL	NULL	NULL	NULL	3	Using where
+1	SIMPLE	t2	p0	ALL	NULL	NULL	NULL	NULL	2	Using where
 create table t3 (
 a int
 )
@@ -42,16 +42,16 @@ partition p1 values less than (20)
 insert into t3 values (5),(15);
 explain partitions select * from t3 where a=11;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t3	p1	ALL	NULL	NULL	NULL	NULL	1	Using where
+1	SIMPLE	t3	p1	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t3 where a=10;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t3	p1	ALL	NULL	NULL	NULL	NULL	1	Using where
+1	SIMPLE	t3	p1	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t3 where a=20;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t3		ALL	NULL	NULL	NULL	NULL	1	Using where
+1	SIMPLE	t3		ALL	NULL	NULL	NULL	NULL	0	Using where
 explain partitions select * from t3 where a=30;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t3		ALL	NULL	NULL	NULL	NULL	1	Using where
+1	SIMPLE	t3		ALL	NULL	NULL	NULL	NULL	0	Using where
 create table t4 (a int not null, b int not null) partition by LIST (a+b) (
 partition p0 values in (12),
 partition p1 values in (14)
@@ -59,11 +59,11 @@ partition p1 values in (14)
 insert into t4 values (10,2), (10,4);
 explain partitions select * from t4 where (a=10 and b=1) or (a=10 and b=2);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t4	p0	ALL	NULL	NULL	NULL	NULL	1	Using where
+1	SIMPLE	t4	p0	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t4 
 where (a=10 and b=1) or (a=10 and b=2) or (a=10 and b = 3);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t4	p0	ALL	NULL	NULL	NULL	NULL	1	Using where
+1	SIMPLE	t4	p0	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t4 where (a=10 and b=2) or (a=10 and b=3)
 or (a=10 and b = 4);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
@@ -89,25 +89,25 @@ id	select_type	table	partitions	type	pos
 explain partitions select * from t5
 where (a=10 and b=1) or (a=10 and b=2) or (a=10 and b = 3);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t5	p0_p0sp0,p0_p0sp1	ALL	NULL	NULL	NULL	NULL	4	Using where
+1	SIMPLE	t5	p0_p0sp0,p0_p0sp1	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t5 where (a=10 and b=2) or (a=10 and b=3)
 or (a=10 and b = 4);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t5	p0_p0sp0,p0_p0sp1,p1_p1sp0,p1_p1sp1	ALL	NULL	NULL	NULL	NULL	4	Using where
 explain partitions select * from t5 where (c=1 and d=1);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t5	p0_p0sp0,p1_p1sp0	ALL	NULL	NULL	NULL	NULL	4	Using where
+1	SIMPLE	t5	p0_p0sp0,p1_p1sp0	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t5 where (c=2 and d=1);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t5	p0_p0sp1,p1_p1sp1	ALL	NULL	NULL	NULL	NULL	4	Using where
+1	SIMPLE	t5	p0_p0sp1,p1_p1sp1	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t5 where (a=10 and b=2 and c=1 and d=1) or 
 (c=2 and d=1);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t5	p0_p0sp0,p0_p0sp1,p1_p1sp1	ALL	NULL	NULL	NULL	NULL	4	Using where
+1	SIMPLE	t5	p0_p0sp0,p0_p0sp1,p1_p1sp1	ALL	NULL	NULL	NULL	NULL	3	Using where
 explain partitions select * from t5 where (a=10 and b=2 and c=1 and d=1) or 
 (b=2 and c=2 and d=1);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t5	p0_p0sp0,p0_p0sp1,p1_p1sp1	ALL	NULL	NULL	NULL	NULL	4	Using where
+1	SIMPLE	t5	p0_p0sp0,p0_p0sp1,p1_p1sp1	ALL	NULL	NULL	NULL	NULL	3	Using where
 create table t6 (a int not null) partition by LIST(a) (
 partition p1 values in (1),
 partition p3 values in (3),
@@ -121,34 +121,34 @@ id	select_type	table	partitions	type	pos
 1	SIMPLE	t6		ALL	NULL	NULL	NULL	NULL	0	Using where
 explain partitions select * from t6 where a <= 1;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t6	p1	ALL	NULL	NULL	NULL	NULL	1	Using where
+1	SIMPLE	t6	p1	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t6 where a >  9;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t6		ALL	NULL	NULL	NULL	NULL	1	Using where
+1	SIMPLE	t6		ALL	NULL	NULL	NULL	NULL	0	Using where
 explain partitions select * from t6 where a >= 9;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t6	p9	ALL	NULL	NULL	NULL	NULL	1	Using where
+1	SIMPLE	t6	p9	ALL	NULL	NULL	NULL	NULL	0	Using where
 explain partitions select * from t6 where a > 0 and a < 5;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t6	p1,p3	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t6 where a > 5 and a < 12;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t6	p7,p9	ALL	NULL	NULL	NULL	NULL	2	Using where
+1	SIMPLE	t6	p7,p9	ALL	NULL	NULL	NULL	NULL	0	Using where
 explain partitions select * from t6 where a > 3 and a < 8 ;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t6	p5,p7	ALL	NULL	NULL	NULL	NULL	3	Using where
+1	SIMPLE	t6	p5,p7	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t6 where a >= 0 and a <= 5;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t6	p1,p3,p5	ALL	NULL	NULL	NULL	NULL	3	Using where
 explain partitions select * from t6 where a >= 5 and a <= 12;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t6	p5,p7,p9	ALL	NULL	NULL	NULL	NULL	3	Using where
+1	SIMPLE	t6	p5,p7,p9	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t6 where a >= 3 and a <= 8;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t6	p3,p5,p7	ALL	NULL	NULL	NULL	NULL	3	Using where
+1	SIMPLE	t6	p3,p5,p7	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t6 where a > 3 and a < 5;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t6		ALL	NULL	NULL	NULL	NULL	3	Using where
+1	SIMPLE	t6		ALL	NULL	NULL	NULL	NULL	0	Using where
 drop table t6;
 create table t6 (a int unsigned not null) partition by LIST(a) (
 partition p1 values in (1),
@@ -163,34 +163,34 @@ id	select_type	table	partitions	type	pos
 1	SIMPLE	t6		ALL	NULL	NULL	NULL	NULL	0	Using where
 explain partitions select * from t6 where a <= 1;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t6	p1	ALL	NULL	NULL	NULL	NULL	1	Using where
+1	SIMPLE	t6	p1	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t6 where a >  9;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t6		ALL	NULL	NULL	NULL	NULL	1	Using where
+1	SIMPLE	t6		ALL	NULL	NULL	NULL	NULL	0	Using where
 explain partitions select * from t6 where a >= 9;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t6	p9	ALL	NULL	NULL	NULL	NULL	1	Using where
+1	SIMPLE	t6	p9	ALL	NULL	NULL	NULL	NULL	0	Using where
 explain partitions select * from t6 where a > 0 and a < 5;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t6	p1,p3	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t6 where a > 5 and a < 12;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t6	p7,p9	ALL	NULL	NULL	NULL	NULL	2	Using where
+1	SIMPLE	t6	p7,p9	ALL	NULL	NULL	NULL	NULL	0	Using where
 explain partitions select * from t6 where a > 3 and a < 8 ;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t6	p5,p7	ALL	NULL	NULL	NULL	NULL	3	Using where
+1	SIMPLE	t6	p5,p7	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t6 where a >= 0 and a <= 5;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t6	p1,p3,p5	ALL	NULL	NULL	NULL	NULL	3	Using where
 explain partitions select * from t6 where a >= 5 and a <= 12;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t6	p5,p7,p9	ALL	NULL	NULL	NULL	NULL	3	Using where
+1	SIMPLE	t6	p5,p7,p9	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t6 where a >= 3 and a <= 8;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t6	p3,p5,p7	ALL	NULL	NULL	NULL	NULL	3	Using where
+1	SIMPLE	t6	p3,p5,p7	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t6 where a > 3 and a < 5;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t6		ALL	NULL	NULL	NULL	NULL	3	Using where
+1	SIMPLE	t6		ALL	NULL	NULL	NULL	NULL	0	Using where
 create table t7 (a int not null) partition by RANGE(a) (
 partition p10 values less than (10),
 partition p30 values less than (30),
@@ -207,25 +207,25 @@ id	select_type	table	partitions	type	pos
 1	SIMPLE	t7	p10	ALL	NULL	NULL	NULL	NULL	0	Using where
 explain partitions select * from t7 where a <= 10;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t7	p10,p30	ALL	NULL	NULL	NULL	NULL	1	Using where
+1	SIMPLE	t7	p10,p30	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t7 where a = 10;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t7	p30	ALL	NULL	NULL	NULL	NULL	1	Using where
+1	SIMPLE	t7	p30	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t7 where a < 90;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t7	p10,p30,p50,p70,p90	ALL	NULL	NULL	NULL	NULL	3	Using where
 explain partitions select * from t7 where a = 90;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t7		ALL	NULL	NULL	NULL	NULL	3	Using where
+1	SIMPLE	t7		ALL	NULL	NULL	NULL	NULL	0	Using where
 explain partitions select * from t7 where a > 90;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t7		ALL	NULL	NULL	NULL	NULL	3	Using where
+1	SIMPLE	t7		ALL	NULL	NULL	NULL	NULL	0	Using where
 explain partitions select * from t7 where a >= 90;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t7		ALL	NULL	NULL	NULL	NULL	3	Using where
+1	SIMPLE	t7		ALL	NULL	NULL	NULL	NULL	0	Using where
 explain partitions select * from t7 where a > 11 and a < 29;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t7	p30	ALL	NULL	NULL	NULL	NULL	3	Using where
+1	SIMPLE	t7	p30	ALL	NULL	NULL	NULL	NULL	2	Using where
 drop table t7;
 create table t7 (a int unsigned not null) partition by RANGE(a) (
 partition p10 values less than (10),
@@ -243,25 +243,25 @@ id	select_type	table	partitions	type	pos
 1	SIMPLE	t7	p10	ALL	NULL	NULL	NULL	NULL	0	Using where
 explain partitions select * from t7 where a <= 10;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t7	p10,p30	ALL	NULL	NULL	NULL	NULL	1	Using where
+1	SIMPLE	t7	p10,p30	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t7 where a = 10;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t7	p30	ALL	NULL	NULL	NULL	NULL	1	Using where
+1	SIMPLE	t7	p30	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t7 where a < 90;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t7	p10,p30,p50,p70,p90	ALL	NULL	NULL	NULL	NULL	3	Using where
 explain partitions select * from t7 where a = 90;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t7		ALL	NULL	NULL	NULL	NULL	3	Using where
+1	SIMPLE	t7		ALL	NULL	NULL	NULL	NULL	0	Using where
 explain partitions select * from t7 where a > 90;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t7		ALL	NULL	NULL	NULL	NULL	3	Using where
+1	SIMPLE	t7		ALL	NULL	NULL	NULL	NULL	0	Using where
 explain partitions select * from t7 where a >= 90;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t7		ALL	NULL	NULL	NULL	NULL	3	Using where
+1	SIMPLE	t7		ALL	NULL	NULL	NULL	NULL	0	Using where
 explain partitions select * from t7 where a > 11 and a < 29;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t7	p30	ALL	NULL	NULL	NULL	NULL	3	Using where
+1	SIMPLE	t7	p30	ALL	NULL	NULL	NULL	NULL	2	Using where
 create table t8 (a date not null) partition by RANGE(YEAR(a)) (
 partition p0 values less than (1980),
 partition p1 values less than (1990),
@@ -270,7 +270,7 @@ partition p2 values less than (2000)
 insert into t8 values ('1985-05-05'),('1995-05-05');
 explain partitions select * from t8 where a < '1980-02-02';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t8	p0,p1	ALL	NULL	NULL	NULL	NULL	1	Using where
+1	SIMPLE	t8	p0,p1	ALL	NULL	NULL	NULL	NULL	2	Using where
 create table t9 (a date not null) partition by RANGE(TO_DAYS(a)) (
 partition p0 values less than (732299), -- 2004-12-19
 partition p1 values less than (732468), -- 2005-06-06
@@ -295,13 +295,13 @@ partition p2 values less than (9)
 insert into t1 values (1),(2),(3);
 explain partitions select * from t1 where a1 > 3;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p1,p2	ALL	NULL	NULL	NULL	NULL	1	Using where
+1	SIMPLE	t1	p1,p2	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t1 where a1 >= 3;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p1,p2	ALL	NULL	NULL	NULL	NULL	1	Using where
+1	SIMPLE	t1	p1,p2	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t1 where a1 < 3 and a1 > 3;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1		ALL	NULL	NULL	NULL	NULL	1	Using where
+1	SIMPLE	t1		ALL	NULL	NULL	NULL	NULL	0	Using where
 drop table t1;
 create table t3 (a int, b int) 
 partition by list(a) subpartition by hash(b) subpartitions 4 (
@@ -325,7 +325,7 @@ create table t1 (a int) partition by has
 insert into t1 values (1),(2);
 explain partitions select * from t1 where a is null;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0	ALL	NULL	NULL	NULL	NULL	1	Using where
+1	SIMPLE	t1	p0	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t1 where a is not null;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	p0,p1	ALL	NULL	NULL	NULL	NULL	2	Using where
@@ -342,20 +342,20 @@ id	select_type	table	partitions	type	pos
 explain partitions
 select * from t1 X, t1 Y where X.a = Y.a and (X.a=1 or X.a=2);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	X	p1,p2	ALL	a	NULL	NULL	NULL	4	Using where
+1	SIMPLE	X	p1,p2	ALL	a	NULL	NULL	NULL	2	Using where
 1	SIMPLE	Y	p1,p2	ref	a	a	4	test.X.a	1	
 drop table t1;
 create table t1 (a int) partition by hash(a) partitions 20;
 insert into t1 values (1),(2),(3);
 explain partitions select * from t1 where a >  1 and a < 3;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p2	ALL	NULL	NULL	NULL	NULL	1	Using where
+1	SIMPLE	t1	p2	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t1 where a >= 1 and a < 3;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	p1,p2	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t1 where a >  1 and a <= 3;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p2,p3	ALL	NULL	NULL	NULL	NULL	3	Using where
+1	SIMPLE	t1	p2,p3	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t1 where a >= 1 and a <= 3;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	p1,p2,p3	ALL	NULL	NULL	NULL	NULL	3	Using where
@@ -371,10 +371,10 @@ partition p3 values in (3)
 insert into t1 values (1,1),(2,2),(3,3);
 explain partitions select * from t1 where b >  1 and b < 3;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0_p0sp2,p1_p1sp2,p2_p2sp2,p3_p3sp2	ALL	NULL	NULL	NULL	NULL	1	Using where
+1	SIMPLE	t1	p0_p0sp2,p1_p1sp2,p2_p2sp2,p3_p3sp2	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t1 where b >  1 and b < 3 and (a =1 or a =2);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p1_p1sp2,p2_p2sp2	ALL	NULL	NULL	NULL	NULL	1	Using where
+1	SIMPLE	t1	p1_p1sp2,p2_p2sp2	ALL	NULL	NULL	NULL	NULL	2	Using where
 drop table t1;
 create table t1 (a int) partition by list(a) (
 partition p0 values in (1,2),
@@ -445,22 +445,22 @@ id	select_type	table	partitions	type	pos
 1	SIMPLE	t2	p0,p1,p2,p3,p4	ALL	NULL	NULL	NULL	NULL	1010	
 explain partitions select * from t2 where a < 801 and a > 200;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t2	p1,p2,p3,p4	ALL	NULL	NULL	NULL	NULL	1010	Using where
+1	SIMPLE	t2	p1,p2,p3,p4	ALL	NULL	NULL	NULL	NULL	800	Using where
 explain partitions select * from t2 where a < 801 and a > 800;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t2	p4	ALL	NULL	NULL	NULL	NULL	1010	Using where
+1	SIMPLE	t2	p4	ALL	NULL	NULL	NULL	NULL	200	Using where
 explain partitions select * from t2 where a > 600;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t2	p3,p4	ALL	NULL	NULL	NULL	NULL	1010	Using where
+1	SIMPLE	t2	p3,p4	ALL	NULL	NULL	NULL	NULL	400	Using where
 explain partitions select * from t2 where a > 600 and b = 1;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t2	p3,p4	ALL	NULL	NULL	NULL	NULL	1010	Using where
+1	SIMPLE	t2	p3,p4	ALL	NULL	NULL	NULL	NULL	400	Using where
 explain partitions select * from t2 where a > 600 and b = 4;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t2	p3,p4	ALL	NULL	NULL	NULL	NULL	1010	Using where
+1	SIMPLE	t2	p3,p4	ALL	NULL	NULL	NULL	NULL	400	Using where
 explain partitions select * from t2 where a > 600 and b = 5;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t2	p3,p4	ALL	NULL	NULL	NULL	NULL	1010	Using where
+1	SIMPLE	t2	p3,p4	ALL	NULL	NULL	NULL	NULL	400	Using where
 explain partitions select * from t2 where b = 5;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t2	p0,p1,p2,p3,p4	ALL	NULL	NULL	NULL	NULL	1010	Using where
@@ -515,19 +515,19 @@ id	select_type	table	partitions	type	pos
 1	SIMPLE	t2	p0,p1,p2,p3,p4	ALL	NULL	NULL	NULL	NULL	910	
 explain partitions select * from t2 where a = 101;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t2	p0	ALL	NULL	NULL	NULL	NULL	910	Using where
+1	SIMPLE	t2	p0	ALL	NULL	NULL	NULL	NULL	110	Using where
 explain partitions select * from t2 where a = 550;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t2	p2	ALL	NULL	NULL	NULL	NULL	910	Using where
+1	SIMPLE	t2	p2	ALL	NULL	NULL	NULL	NULL	200	Using where
 explain partitions select * from t2 where a = 833;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t2	p4	ALL	NULL	NULL	NULL	NULL	910	Using where
+1	SIMPLE	t2	p4	ALL	NULL	NULL	NULL	NULL	200	Using where
 explain partitions select * from t2 where (a = 100 OR a = 900);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t2	p0,p4	ALL	NULL	NULL	NULL	NULL	910	Using where
+1	SIMPLE	t2	p0,p4	ALL	NULL	NULL	NULL	NULL	310	Using where
 explain partitions select * from t2 where (a > 100 AND a < 600);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t2	p0,p1,p2	ALL	NULL	NULL	NULL	NULL	910	Using where
+1	SIMPLE	t2	p0,p1,p2	ALL	NULL	NULL	NULL	NULL	510	Using where
 analyze table t2;
 Table	Op	Msg_type	Msg_text
 test.t2	analyze	status	OK
@@ -692,7 +692,7 @@ f_int1
 NULL
 explain partitions select * from t1 where f_int1 is null;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	part4_part4sp0	ALL	NULL	NULL	NULL	NULL	1	Using where
+1	SIMPLE	t1	part4_part4sp0	ALL	NULL	NULL	NULL	NULL	2	Using where
 drop table t1;
 create table t1 (a int not null, b int not null)
 partition by list(a) 
@@ -721,10 +721,10 @@ insert into t1 values (1,1),(1,2),(1,3),
 (2,1),(2,2),(2,3),(2,4), (NULL,1);
 explain partitions select * from t1 where a IS NULL AND (b=1 OR b=2);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	pn_pnsp0,pn_pnsp1	ALL	NULL	NULL	NULL	NULL	1	Using where
+1	SIMPLE	t1	pn_pnsp0,pn_pnsp1	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t1 where (a IS NULL or a < 1) AND (b=1 OR b=2);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	pn_pnsp0,pn_pnsp1	ALL	NULL	NULL	NULL	NULL	1	Using where
+1	SIMPLE	t1	pn_pnsp0,pn_pnsp1	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t1 where (a IS NULL or a < 2) AND (b=1 OR b=2);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	p0_p0sp0,p0_p0sp1,pn_pnsp0,pn_pnsp1	ALL	NULL	NULL	NULL	NULL	5	Using where
@@ -753,7 +753,7 @@ count(*)
 1
 explain partitions select count(*) from t1 where s1 < 0 or s1 is null;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p3	ALL	NULL	NULL	NULL	NULL	1	Using where
+1	SIMPLE	t1	p3	ALL	NULL	NULL	NULL	NULL	2	Using where
 drop table t1;
 create table t1 (a char(32) primary key)
 partition by key()
@@ -812,24 +812,24 @@ insert into t1 values (18446744073709551
 insert into t1 values (18446744073709551614-1);
 explain partitions select * from t1 where a < 10;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0	ALL	NULL	NULL	NULL	NULL	1	Using where
+1	SIMPLE	t1	p0	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t1 
 where a >= 18446744073709551000-1 and a <= 18446744073709551000+1;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p3,p4	ALL	NULL	NULL	NULL	NULL	4	Using where
+1	SIMPLE	t1	p3,p4	ALL	NULL	NULL	NULL	NULL	3	Using where
 explain partitions select * from t1 
 where a between 18446744073709551001 and 18446744073709551002;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p4	ALL	NULL	NULL	NULL	NULL	4	Using where
+1	SIMPLE	t1	p4	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t1 where a = 18446744073709551000;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p4	ALL	NULL	NULL	NULL	NULL	4	Using where
+1	SIMPLE	t1	p4	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t1 where a = 18446744073709551613;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p4	ALL	NULL	NULL	NULL	NULL	4	Using where
+1	SIMPLE	t1	p4	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t1 where a = 18446744073709551614;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1		ALL	NULL	NULL	NULL	NULL	4	Using where
+1	SIMPLE	t1		ALL	NULL	NULL	NULL	NULL	0	Using where
 drop table t1;
 create table t1 (a int)
 partition by range(a) (
@@ -853,34 +853,34 @@ id	select_type	table	partitions	type	pos
 1	SIMPLE	t2	p0	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t1 where a=0xFE;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p2	ALL	NULL	NULL	NULL	NULL	4	Using where
+1	SIMPLE	t1	p2	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t2 where a=0xFE;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t2	p2	ALL	NULL	NULL	NULL	NULL	4	Using where
+1	SIMPLE	t2	p2	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t1 where a > 0xFE AND a <= 0xFF;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1		ALL	NULL	NULL	NULL	NULL	4	Using where
+1	SIMPLE	t1		ALL	NULL	NULL	NULL	NULL	0	Using where
 explain partitions select * from t2 where a > 0xFE AND a <= 0xFF;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t2		ALL	NULL	NULL	NULL	NULL	4	Using where
+1	SIMPLE	t2		ALL	NULL	NULL	NULL	NULL	0	Using where
 explain partitions select * from t1 where a >= 0xFE AND a <= 0xFF;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p2	ALL	NULL	NULL	NULL	NULL	4	Using where
+1	SIMPLE	t1	p2	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t2 where a >= 0xFE AND a <= 0xFF;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t2	p2	ALL	NULL	NULL	NULL	NULL	4	Using where
+1	SIMPLE	t2	p2	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t1 where a < 64 AND a >= 63;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0	ALL	NULL	NULL	NULL	NULL	4	Using where
+1	SIMPLE	t1	p0	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t2 where a < 64 AND a >= 63;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t2	p0	ALL	NULL	NULL	NULL	NULL	4	Using where
+1	SIMPLE	t2	p0	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t1 where a <= 64 AND a >= 63;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0,p1	ALL	NULL	NULL	NULL	NULL	6	Using where
+1	SIMPLE	t1	p0,p1	ALL	NULL	NULL	NULL	NULL	4	Using where
 explain partitions select * from t2 where a <= 64 AND a >= 63;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t2	p0,p1	ALL	NULL	NULL	NULL	NULL	6	Using where
+1	SIMPLE	t2	p0,p1	ALL	NULL	NULL	NULL	NULL	4	Using where
 drop table t1;
 drop table t2;
 create table t1(a bigint unsigned not null) partition by range(a+0) (
@@ -898,7 +898,7 @@ id	select_type	table	partitions	type	pos
 explain partitions select * from t1 where 
 a > 0xFFFFFFFFFFFFFFEC and a < 0xFFFFFFFFFFFFFFEE;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1		ALL	NULL	NULL	NULL	NULL	4	Using where
+1	SIMPLE	t1		ALL	NULL	NULL	NULL	NULL	0	Using where
 explain partitions select * from t1 where a>=0 and a <= 0xFFFFFFFFFFFFFFFF;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	p1,p2,p3,p4	ALL	NULL	NULL	NULL	NULL	8	Using where

=== modified file 'mysql-test/suite/pbxt/r/partition_range.result'
--- a/mysql-test/suite/pbxt/r/partition_range.result	2009-10-16 12:45:42 +0000
+++ b/mysql-test/suite/pbxt/r/partition_range.result	2010-11-25 18:55:52 +0000
@@ -21,19 +21,19 @@ select * from t1 where a > 1;
 a
 explain partitions select * from t1 where a is null;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	pnull	ALL	NULL	NULL	NULL	NULL	3	Using where
+1	SIMPLE	t1	pnull	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t1 where a >= 0;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0,p1	ALL	NULL	NULL	NULL	NULL	3	Using where
+1	SIMPLE	t1	p0,p1	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t1 where a < 0;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	pnull	ALL	NULL	NULL	NULL	NULL	3	Using where
+1	SIMPLE	t1	pnull	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t1 where a <= 0;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	pnull,p0	ALL	NULL	NULL	NULL	NULL	3	Using where
+1	SIMPLE	t1	pnull,p0	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t1 where a > 1;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1		ALL	NULL	NULL	NULL	NULL	3	Using where
+1	SIMPLE	t1		ALL	NULL	NULL	NULL	NULL	0	Using where
 drop table t1;
 create table t1 (a int unsigned, b int unsigned)
 partition by range (a)
@@ -63,19 +63,19 @@ select * from t1 where a > 1;
 a	b
 explain partitions select * from t1 where a is null;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	pnull_pnullsp0,pnull_pnullsp1	ALL	NULL	NULL	NULL	NULL	6	Using where
+1	SIMPLE	t1	pnull_pnullsp0,pnull_pnullsp1	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t1 where a >= 0;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p0_p0sp0,p0_p0sp1,p1_p1sp0,p1_p1sp1	ALL	NULL	NULL	NULL	NULL	6	Using where
+1	SIMPLE	t1	p0_p0sp0,p0_p0sp1,p1_p1sp0,p1_p1sp1	ALL	NULL	NULL	NULL	NULL	4	Using where
 explain partitions select * from t1 where a < 0;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	pnull_pnullsp0,pnull_pnullsp1	ALL	NULL	NULL	NULL	NULL	6	Using where
+1	SIMPLE	t1	pnull_pnullsp0,pnull_pnullsp1	ALL	NULL	NULL	NULL	NULL	2	Using where
 explain partitions select * from t1 where a <= 0;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	pnull_pnullsp0,pnull_pnullsp1,p0_p0sp0,p0_p0sp1	ALL	NULL	NULL	NULL	NULL	6	Using where
+1	SIMPLE	t1	pnull_pnullsp0,pnull_pnullsp1,p0_p0sp0,p0_p0sp1	ALL	NULL	NULL	NULL	NULL	4	Using where
 explain partitions select * from t1 where a > 1;
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1		ALL	NULL	NULL	NULL	NULL	6	Using where
+1	SIMPLE	t1		ALL	NULL	NULL	NULL	NULL	0	Using where
 drop table t1;
 CREATE TABLE t1 (
 a int not null,

=== modified file 'mysql-test/suite/pbxt/r/subselect.result'
--- a/mysql-test/suite/pbxt/r/subselect.result	2010-04-28 19:29:45 +0000
+++ b/mysql-test/suite/pbxt/r/subselect.result	2010-11-25 18:55:52 +0000
@@ -922,7 +922,7 @@ select a, (select a,b,c from t1 where t1
 a	(select a,b,c from t1 where t1.a=t2.a) = ROW(a,2,'a')	(select c from t1 where a=t2.a)
 1	1	a
 2	0	b
-NULL	0	NULL
+NULL	NULL	NULL
 select a, (select a,b,c from t1 where t1.a=t2.a) = ROW(a,3,'b'),(select c from t1 where a=t2.a) from t2;
 a	(select a,b,c from t1 where t1.a=t2.a) = ROW(a,3,'b')	(select c from t1 where a=t2.a)
 1	0	a
@@ -932,7 +932,7 @@ select a, (select a,b,c from t1 where t1
 a	(select a,b,c from t1 where t1.a=t2.a) = ROW(a,4,'c')	(select c from t1 where a=t2.a)
 1	0	a
 2	0	b
-NULL	0	NULL
+NULL	NULL	NULL
 drop table t1,t2;
 create table t1 (a int, b real, c varchar(10));
 insert into t1 values (1, 1, 'a'), (2,2,'b'), (NULL, 2, 'b');

=== removed file 'mysql-test/suite/percona/percona_innodb_buffer_pool_shm-master.opt'
--- a/mysql-test/suite/percona/percona_innodb_buffer_pool_shm-master.opt	2010-09-03 15:41:57 +0000
+++ b/mysql-test/suite/percona/percona_innodb_buffer_pool_shm-master.opt	1970-01-01 00:00:00 +0000
@@ -1 +0,0 @@
---innodb_buffer_pool_shm_key=123456

=== removed file 'mysql-test/suite/percona/percona_innodb_buffer_pool_shm.result'
--- a/mysql-test/suite/percona/percona_innodb_buffer_pool_shm.result	2010-09-03 15:41:57 +0000
+++ b/mysql-test/suite/percona/percona_innodb_buffer_pool_shm.result	1970-01-01 00:00:00 +0000
@@ -1,6 +0,0 @@
-show variables like 'innodb_buffer_pool_shm%';
-Variable_name	Value
-innodb_buffer_pool_shm_key	123456
-show variables like 'innodb_buffer_pool_shm%';
-Variable_name	Value
-innodb_buffer_pool_shm_key	123456

=== removed file 'mysql-test/suite/percona/percona_innodb_buffer_pool_shm.test'
--- a/mysql-test/suite/percona/percona_innodb_buffer_pool_shm.test	2010-09-03 15:41:57 +0000
+++ b/mysql-test/suite/percona/percona_innodb_buffer_pool_shm.test	1970-01-01 00:00:00 +0000
@@ -1,18 +0,0 @@
---source include/have_innodb.inc
-show variables like 'innodb_buffer_pool_shm%';
-
-#clean shutdown (restart_mysqld.inc is not clean if over 10 sec...)
---write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
-wait
-EOF
-shutdown_server 120;
---append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
-restart
-EOF
---enable_reconnect
---source include/wait_until_connected_again.inc
---disable_reconnect
-
-show variables like 'innodb_buffer_pool_shm%';
---sleep 1
---system ipcrm -M 123456

=== removed file 'mysql-test/suite/percona/percona_log_connection_error.result'
--- a/mysql-test/suite/percona/percona_log_connection_error.result	2010-09-03 15:41:57 +0000
+++ b/mysql-test/suite/percona/percona_log_connection_error.result	1970-01-01 00:00:00 +0000
@@ -1,15 +0,0 @@
-SET @old_max_connections = @@max_connections;
-SET @old_log_warnings = @@log_warnings;
-SET GLOBAL max_connections=2;
-SET GLOBAL LOG_WARNINGS = 0;
-connect(localhost,root,,test,port,socket);
-ERROR HY000: Too many connections
-SET GLOBAL LOG_WARNINGS = 1;
-connect(localhost,root,,test,port,socket);
-ERROR HY000: Too many connections
-SET GLOBAL LOG_WARNINGS = 0;
-connect(localhost,root,,test,port,socket);
-ERROR HY000: Too many connections
-SET GLOBAL max_connections = @old_max_connections;
-SET GLOBAL log_warnings = @old_log_warnings;
-1

=== removed file 'mysql-test/suite/percona/percona_log_connection_error.test'
--- a/mysql-test/suite/percona/percona_log_connection_error.test	2010-09-03 15:41:57 +0000
+++ b/mysql-test/suite/percona/percona_log_connection_error.test	1970-01-01 00:00:00 +0000
@@ -1,52 +0,0 @@
---source include/not_embedded.inc
-
-connect (main,localhost,root,,);
-connection main;
-SET @old_max_connections = @@max_connections;
-SET @old_log_warnings = @@log_warnings;
-SET GLOBAL max_connections=2;
-let $port=`SELECT Variable_value FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE Variable_name LIKE 'port'`;
-let $socket=`SELECT Variable_value FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE Variable_name LIKE 'socket'`;
-
-SET GLOBAL LOG_WARNINGS = 0;
---connect (conn0,localhost,root,,)
-connection conn0;
-replace_result $port port $socket socket;
---error 1040
---connect(conn1,localhost,root,,)
-disconnect conn0;
-SLEEP 0.1; # tsarev: hack, but i don't know (and didn't find) how right
-
-connection main;
-SET GLOBAL LOG_WARNINGS = 1;
---connect (conn1,localhost,root,,)
-replace_result $port port $socket socket;
---error 1040
---connect (conn0,localhost,root,,)
-disconnect conn1;
-SLEEP 0.1; # tsarev: hack, but i don't know (and didn't find) how right
-
-connection main;
-SET GLOBAL LOG_WARNINGS = 0;
---connect (conn0,localhost,root,,)
-replace_result $port port $socket socket;
---error 1040
---connect(conn1,localhost,root,,)
-disconnect conn0;
-SLEEP 0.1; # tsarev: hack, but i don't know (and didn't find) how right
-
-connection main;
-SET GLOBAL max_connections = @old_max_connections;
-SET GLOBAL log_warnings = @old_log_warnings;
-let $log_error_= `SELECT @@GLOBAL.log_error`;
-if(!`select LENGTH('$log_error_')`)
-{
-  # MySQL Server on windows is started with --console and thus
-  # does not know the location of its .err log, use default location
-  let $log_error_ = $MYSQLTEST_VARDIR/log/mysqld.1.err;
-}
-# Assign env variable LOG_ERROR
-let LOG_ERROR=$log_error_;
-
-let cmd=cat $log_error | grep "Too many connections" | wc -l;
-exec $cmd;

=== removed file 'mysql-test/suite/percona/percona_log_slow_slave_statements-and-use_global_long_query_time-master.opt'
--- a/mysql-test/suite/percona/percona_log_slow_slave_statements-and-use_global_long_query_time-master.opt	2010-08-03 10:54:05 +0000
+++ b/mysql-test/suite/percona/percona_log_slow_slave_statements-and-use_global_long_query_time-master.opt	1970-01-01 00:00:00 +0000
@@ -1 +0,0 @@
---slow-query-log-file=percona_log_slow_slave_statements-master.log --long-query-time=1
\ No newline at end of file

=== removed file 'mysql-test/suite/percona/percona_log_slow_slave_statements-and-use_global_long_query_time-slave.opt'
--- a/mysql-test/suite/percona/percona_log_slow_slave_statements-and-use_global_long_query_time-slave.opt	2010-08-03 10:54:05 +0000
+++ b/mysql-test/suite/percona/percona_log_slow_slave_statements-and-use_global_long_query_time-slave.opt	1970-01-01 00:00:00 +0000
@@ -1 +0,0 @@
---slow-query-log-file=percona_log_slow_slave_statements-slave.log --long-query-time=1
\ No newline at end of file

=== removed file 'mysql-test/suite/percona/percona_log_slow_slave_statements-and-use_global_long_query_time.result'
--- a/mysql-test/suite/percona/percona_log_slow_slave_statements-and-use_global_long_query_time.result	2010-08-03 10:54:05 +0000
+++ b/mysql-test/suite/percona/percona_log_slow_slave_statements-and-use_global_long_query_time.result	1970-01-01 00:00:00 +0000
@@ -1,103 +0,0 @@
-# Activate master-slave replication
-stop slave;
-drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
-reset master;
-reset slave;
-drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
-start slave;
-# Make table t for test
-DROP TABLE IF EXISTS t;
-CREATE TABLE t(id INT);
-# Start slave replication
-START SLAVE;
-INSERT INTO t VALUES (1);
-# Read information about master binlog
-# Sync(1) slave thread
-# Read and change log_slow_slave_statements to ON on slave
-show variables like 'log_slow_slave_statements';
-Variable_name	Value
-log_slow_slave_statements	OFF
-set global log_slow_slave_statements=ON;
-show variables like 'log_slow_slave_statements';
-Variable_name	Value
-log_slow_slave_statements	ON
-INSERT INTO t VALUES (2);
-# Read information about master binlog
-# Sync slave(2) thread
-# Restart slave
-STOP SLAVE;
-START SLAVE;
-INSERT INTO t VALUES (3);
-# Read information about master binlog
-# Sync(3) slave thread
-show        variables like 'long_query_time';
-Variable_name	Value
-long_query_time	1.000000
-show global variables like 'long_query_time';
-Variable_name	Value
-long_query_time	1.000000
-show global variables like 'use_global_long_query_time';
-Variable_name	Value
-use_global_long_query_time	OFF
-set global long_query_time=0;
-show        variables like 'long_query_time';
-Variable_name	Value
-long_query_time	1.000000
-show global variables like 'long_query_time';
-Variable_name	Value
-long_query_time	0.000000
-show global variables like 'use_global_long_query_time';
-Variable_name	Value
-use_global_long_query_time	OFF
-INSERT INTO t VALUES (4);
-# Read information about master binlog
-# Sync slave(4) thread
-show        variables like 'long_query_time';
-Variable_name	Value
-long_query_time	1.000000
-show global variables like 'long_query_time';
-Variable_name	Value
-long_query_time	0.000000
-show global variables like 'use_global_long_query_time';
-Variable_name	Value
-use_global_long_query_time	OFF
-set global  use_global_long_query_time=1;
-show        variables like 'long_query_time';
-Variable_name	Value
-long_query_time	0.000000
-show global variables like 'long_query_time';
-Variable_name	Value
-long_query_time	0.000000
-show global variables like 'use_global_long_query_time';
-Variable_name	Value
-use_global_long_query_time	ON
-INSERT INTO t VALUES (5);
-# Read information about master binlog
-# Sync slave(5) thread
-show        variables like 'long_query_time';
-Variable_name	Value
-long_query_time	0.000000
-show global variables like 'long_query_time';
-Variable_name	Value
-long_query_time	0.000000
-show global variables like 'use_global_long_query_time';
-Variable_name	Value
-use_global_long_query_time	ON
-set global long_query_time=1;
-set global use_global_long_query_time=0;
-# Analyse master slow_query_log
-0
-0
-0
-0
-0
-# Analyse slave slow_query_log
-0
-0
-0
-0
-1
-set global log_slow_slave_statements=OFF;
-DROP TABLE t;
-# Read information about master binlog
-# Sync slave(6) thread

=== removed file 'mysql-test/suite/percona/percona_log_slow_slave_statements-and-use_global_long_query_time.test'
--- a/mysql-test/suite/percona/percona_log_slow_slave_statements-and-use_global_long_query_time.test	2010-08-07 14:42:30 +0000
+++ b/mysql-test/suite/percona/percona_log_slow_slave_statements-and-use_global_long_query_time.test	1970-01-01 00:00:00 +0000
@@ -1,141 +0,0 @@
--- source include/not_windows.inc
-
--- echo # Activate master-slave replication
--- source include/master-slave.inc
-
-connection master;
--- echo # Make table t for test
--- disable_warnings
-DROP TABLE IF EXISTS t;
--- enable_warnings
-CREATE TABLE t(id INT);
-
-
--- echo # Start slave replication
--- disable_warnings
-connection slave;
-START SLAVE;
--- source include/wait_for_slave_to_start.inc
--- enable_warnings
-
-#-- echo # Make insert(1) on master
-connection master;
-INSERT INTO t VALUES (1);
--- echo # Read information about master binlog
-let $binlog_file     = query_get_value(SHOW MASTER STATUS,File,1);
-let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1);
-
--- echo # Sync(1) slave thread
-connection slave;
-let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`;
-
--- echo # Read and change log_slow_slave_statements to ON on slave
-show variables like 'log_slow_slave_statements';
-set global log_slow_slave_statements=ON;
-show variables like 'log_slow_slave_statements';
-
-#-- echo # Make insert(2) on master
-connection master;
-INSERT INTO t VALUES (2);
--- echo # Read information about master binlog
-let $binlog_file     = query_get_value(SHOW MASTER STATUS,File,1);
-let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1);
-
--- echo # Sync slave(2) thread
-connection slave;
-let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`;
--- echo # Restart slave
-STOP SLAVE;
--- source include/wait_for_slave_to_stop.inc
-START SLAVE;
--- source include/wait_for_slave_to_start.inc
-
-#-- echo # Make insert(3) on master
-connection master;
-INSERT INTO t VALUES (3);
--- echo # Read information about master binlog
-let $binlog_file     = query_get_value(SHOW MASTER STATUS,File,1);
-let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1);
-
--- echo # Sync(3) slave thread
-connection slave;
-let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`;
-show        variables like 'long_query_time';
-show global variables like 'long_query_time';
-show global variables like 'use_global_long_query_time';
-set global long_query_time=0;
-show        variables like 'long_query_time';
-show global variables like 'long_query_time';
-show global variables like 'use_global_long_query_time';
-
-#-- echo # Make insert(4) on master
-connection master;
-INSERT INTO t VALUES (4);
--- echo # Read information about master binlog
-let $binlog_file     = query_get_value(SHOW MASTER STATUS,File,1);
-let  $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1);
-
--- echo # Sync slave(4) thread
-connection slave;
-let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`;
-show        variables like 'long_query_time';
-show global variables like 'long_query_time';
-show global variables like 'use_global_long_query_time';
-set global  use_global_long_query_time=1;
-show        variables like 'long_query_time';
-show global variables like 'long_query_time';
-show global variables like 'use_global_long_query_time';
-
-#-- echo # Make insert(5) on master
-connection master;
-let $MASTER_DATADIR= `select @@datadir`;
-INSERT INTO t VALUES (5);
--- echo # Read information about master binlog
-let $binlog_file     = query_get_value(SHOW MASTER STATUS,File,1);
-let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1);
-
--- echo # Sync slave(5) thread
-connection slave;
-let $SLAVE_DATADIR= `select @@datadir`;
-let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`;
-show        variables like 'long_query_time';
-show global variables like 'long_query_time';
-show global variables like 'use_global_long_query_time';
-set global long_query_time=1;
-set global use_global_long_query_time=0;
-
--- echo # Analyse master slow_query_log
-let $i=5;
-let $k=1;
-let $cmd=cat ./$MASTER_DATADIR/percona_log_slow_slave_statements-master.log | grep;
-while($i)
-{
-    let $current_cmd = $cmd "INSERT INTO t VALUES ($k)" | wc -l;
-    exec $current_cmd;
-    dec $i;
-    inc $k;
-}
-
--- echo # Analyse slave slow_query_log
-let $i=5;
-let $k=1;
-let $cmd=cat $SLAVE_DATADIR/percona_log_slow_slave_statements-slave.log | grep;
-while($i)
-{
-    let $current_cmd = $cmd "INSERT INTO t VALUES ($k)" | wc -l;
-    exec $current_cmd;
-    dec $i;
-    inc $k;
-}
-set global log_slow_slave_statements=OFF;
-
-connection master;
-DROP TABLE t;
-
--- echo # Read information about master binlog
-let $binlog_file     = query_get_value(SHOW MASTER STATUS,File,1);
-let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1);
-
--- echo # Sync slave(6) thread
-connection slave;
-let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`;

=== removed file 'mysql-test/suite/percona/percona_log_slow_slave_statements-master.opt'
--- a/mysql-test/suite/percona/percona_log_slow_slave_statements-master.opt	2010-08-03 10:54:05 +0000
+++ b/mysql-test/suite/percona/percona_log_slow_slave_statements-master.opt	1970-01-01 00:00:00 +0000
@@ -1 +0,0 @@
---slow-query-log-file=percona_log_slow_slave_statements-master.log --long-query-time=0
\ No newline at end of file

=== removed file 'mysql-test/suite/percona/percona_log_slow_slave_statements-slave.opt'
--- a/mysql-test/suite/percona/percona_log_slow_slave_statements-slave.opt	2010-08-03 10:54:05 +0000
+++ b/mysql-test/suite/percona/percona_log_slow_slave_statements-slave.opt	1970-01-01 00:00:00 +0000
@@ -1 +0,0 @@
---slow-query-log-file=percona_log_slow_slave_statements-slave.log --long-query-time=0
\ No newline at end of file

=== removed file 'mysql-test/suite/percona/percona_log_slow_slave_statements.result'
--- a/mysql-test/suite/percona/percona_log_slow_slave_statements.result	2010-08-03 10:54:05 +0000
+++ b/mysql-test/suite/percona/percona_log_slow_slave_statements.result	1970-01-01 00:00:00 +0000
@@ -1,86 +0,0 @@
-# Activate master-slave replication
-stop slave;
-drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
-reset master;
-reset slave;
-drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
-start slave;
-# Make table t for test
-DROP TABLE IF EXISTS t;
-CREATE TABLE t(id INT);
-# Start slave replication
-START SLAVE;
-INSERT INTO t VALUES (1);
-# Read information about master binlog
-# Sync(1) slave thread
-# Read and change log_slow_slave_statements to ON on slave
-show variables like 'log_slow_slave_statements';
-Variable_name	Value
-log_slow_slave_statements	OFF
-set global log_slow_slave_statements=ON;
-show variables like 'log_slow_slave_statements';
-Variable_name	Value
-log_slow_slave_statements	ON
-INSERT INTO t VALUES (2);
-# Read information about master binlog
-# Sync slave(2) thread
-# Restart slave
-STOP SLAVE;
-START SLAVE;
-INSERT INTO t VALUES (3);
-# Read information about master binlog
-# Sync(3) slave thread
-# Read and change log_slow_slave_statements to OFF on slave
-show variables like 'log_slow_slave_statements';
-Variable_name	Value
-log_slow_slave_statements	ON
-set global log_slow_slave_statements=OFF;
-show variables like 'log_slow_slave_statements';
-Variable_name	Value
-log_slow_slave_statements	OFF
-INSERT INTO t VALUES (4);
-# Read information about master binlog
-# Sync slave(4) thread
-# Restart slave
-STOP SLAVE;
-START SLAVE;
-INSERT INTO t VALUES (5);
-# Read information about master binlog
-# Sync slave(5) thread
-# Read and change log_slow_slave_statements to ON on slave
-show variables like 'log_slow_slave_statements';
-Variable_name	Value
-log_slow_slave_statements	OFF
-set global log_slow_slave_statements=ON;
-show variables like 'log_slow_slave_statements';
-Variable_name	Value
-log_slow_slave_statements	ON
-INSERT INTO t VALUES (6);
-# Read information about master binlog
-# Sync slave(6) thread
-# Restart slave
-STOP SLAVE;
-START SLAVE;
-INSERT INTO t VALUES (7);
-# Read information about master binlog
-# Sync slave(7) thread
-# Analyse master slow_query_log
-1
-1
-1
-1
-1
-1
-1
-# Analyse slave slow_query_log
-0
-0
-1
-0
-0
-0
-1
-set global log_slow_slave_statements=OFF;
-DROP TABLE t;
-# Read information about master binlog
-# Sync slave(8) thread

=== removed file 'mysql-test/suite/percona/percona_log_slow_slave_statements.test'
--- a/mysql-test/suite/percona/percona_log_slow_slave_statements.test	2010-08-07 14:42:30 +0000
+++ b/mysql-test/suite/percona/percona_log_slow_slave_statements.test	1970-01-01 00:00:00 +0000
@@ -1,162 +0,0 @@
--- source include/not_windows.inc
-
--- echo # Activate master-slave replication
--- source include/master-slave.inc
-
-connection master;
--- echo # Make table t for test
--- disable_warnings
-DROP TABLE IF EXISTS t;
--- enable_warnings
-CREATE TABLE t(id INT);
-
-
--- echo # Start slave replication
--- disable_warnings
-connection slave;
-START SLAVE;
--- source include/wait_for_slave_to_start.inc
--- enable_warnings
-
-#-- echo # Make insert(1) on master
-connection master;
-INSERT INTO t VALUES (1);
--- echo # Read information about master binlog
-let $binlog_file     = query_get_value(SHOW MASTER STATUS,File,1);
-let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1);
-
--- echo # Sync(1) slave thread
-connection slave;
-let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`;
-
--- echo # Read and change log_slow_slave_statements to ON on slave
-show variables like 'log_slow_slave_statements';
-set global log_slow_slave_statements=ON;
-show variables like 'log_slow_slave_statements';
-
-#-- echo # Make insert(2) on master
-connection master;
-INSERT INTO t VALUES (2);
--- echo # Read information about master binlog
-let $binlog_file     = query_get_value(SHOW MASTER STATUS,File,1);
-let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1);
-
--- echo # Sync slave(2) thread
-connection slave;
-let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`;
--- echo # Restart slave
-STOP SLAVE;
--- source include/wait_for_slave_to_stop.inc
-START SLAVE;
--- source include/wait_for_slave_to_start.inc
-
-#-- echo # Make insert(3) on master
-connection master;
-INSERT INTO t VALUES (3);
--- echo # Read information about master binlog
-let $binlog_file     = query_get_value(SHOW MASTER STATUS,File,1);
-let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1);
-
--- echo # Sync(3) slave thread
-connection slave;
-let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`;
--- echo # Read and change log_slow_slave_statements to OFF on slave
-show variables like 'log_slow_slave_statements';
-set global log_slow_slave_statements=OFF;
-show variables like 'log_slow_slave_statements';
-
-#-- echo # Make insert(4) on master
-connection master;
-INSERT INTO t VALUES (4);
--- echo # Read information about master binlog
-let $binlog_file     = query_get_value(SHOW MASTER STATUS,File,1);
-let  $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1);
-
--- echo # Sync slave(4) thread
-connection slave;
-let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`;
--- echo # Restart slave
-STOP SLAVE;
--- source include/wait_for_slave_to_stop.inc
-START SLAVE;
--- source include/wait_for_slave_to_start.inc
-
-#-- echo # Make insert(5) on master
-connection master;
-INSERT INTO t VALUES (5);
--- echo # Read information about master binlog
-let $binlog_file     = query_get_value(SHOW MASTER STATUS,File,1);
-let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1);
-
--- echo # Sync slave(5) thread
-connection slave;
-let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`;
--- echo # Read and change log_slow_slave_statements to ON on slave
-show variables like 'log_slow_slave_statements';
-set global log_slow_slave_statements=ON;
-show variables like 'log_slow_slave_statements';
-
-#-- echo # Make insert(6) on master
-connection master;
-INSERT INTO t VALUES (6);
--- echo # Read information about master binlog
-let $binlog_file     = query_get_value(SHOW MASTER STATUS,File,1);
-let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1);
-
--- echo # Sync slave(6) thread
-connection slave;
-let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`;
--- echo # Restart slave
-STOP SLAVE;
--- source include/wait_for_slave_to_stop.inc
-START SLAVE;
--- source include/wait_for_slave_to_start.inc
-
-#-- echo # Make insert(7) on master
-connection master;
-let $MASTER_DATADIR= `select @@datadir`;
-INSERT INTO t VALUES (7);
--- echo # Read information about master binlog
-let $binlog_file     = query_get_value(SHOW MASTER STATUS,File,1);
-let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1);
-
--- echo # Sync slave(7) thread
-connection slave;
-let $SLAVE_DATADIR= `select @@datadir`;
-let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`;
-
--- echo # Analyse master slow_query_log
-let $i=7;
-let $k=1;
-let $cmd=cat $MASTER_DATADIR/percona_log_slow_slave_statements-master.log | grep -c;
-while($i)
-{
-    let $current_cmd = $cmd "INSERT INTO t VALUES ($k)";
-    exec $current_cmd;
-    dec $i;
-    inc $k;
-}
-
--- echo # Analyse slave slow_query_log
-let $i=7;
-let $k=1;
-let $cmd=cat $SLAVE_DATADIR/percona_log_slow_slave_statements-slave.log | grep -c;
-while($i)
-{
-    let $current_cmd = $cmd "INSERT INTO t VALUES ($k)";
-    exec $current_cmd;
-    dec $i;
-    inc $k;
-}
-set global log_slow_slave_statements=OFF;
-
-connection master;
-DROP TABLE t;
-
--- echo # Read information about master binlog
-let $binlog_file     = query_get_value(SHOW MASTER STATUS,File,1);
-let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1);
-
--- echo # Sync slave(8) thread
-connection slave;
-let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`;

=== removed file 'mysql-test/suite/percona/percona_query_cache_with_comments.inc.backup'
--- a/mysql-test/suite/percona/percona_query_cache_with_comments.inc.backup	2010-08-03 10:54:05 +0000
+++ b/mysql-test/suite/percona/percona_query_cache_with_comments.inc.backup	1970-01-01 00:00:00 +0000
@@ -1,88 +0,0 @@
---source include/percona_query_cache_with_comments_clear.inc
-let $query=/* with comment first */select * from t1;
-eval $query;
---source include/percona_query_cache_with_comments_eval.inc
-
-let $query=# with comment first
-select * from t1;
---source include/percona_query_cache_with_comments_eval.inc
-
-let $query=-- with comment first
-select * from t1;
---source include/percona_query_cache_with_comments_eval.inc
-
-let $query=/* with comment first and "quote" */select * from t1;
---source include/percona_query_cache_with_comments_eval.inc
-
-let $query=# with comment first and "quote"
-select * from t1;
---source include/percona_query_cache_with_comments_eval.inc
-
-let $query=-- with comment first and "quote" 
-select * from t1;
---source include/percona_query_cache_with_comments_eval.inc
-
-let $query=
-    /* with comment and whitespaces first */select * from t1;
---source include/percona_query_cache_with_comments_eval.inc
-
-let $query= 
-    # with comment and whitespaces first
-select * from t1;
---source include/percona_query_cache_with_comments_eval.inc
-
-let $query=
-    -- with comment and whitespaces first
-select * from t1;
---source include/percona_query_cache_with_comments_eval.inc
-
-let $internal=* internal comment *;
-
-let $query=select * /$internal/ from t1;
---source include/percona_query_cache_with_comments_eval.inc
-let $query=select */$internal/ from t1;
---source include/percona_query_cache_with_comments_eval.inc
-let $query=select */$internal/from t1;
---source include/percona_query_cache_with_comments_eval.inc
-
-let $internal=* internal comment with "quote" *;
-
-let $query=select * /$internal/ from t1;
---source include/percona_query_cache_with_comments_eval.inc
-let $query=select */$internal/ from t1;
---source include/percona_query_cache_with_comments_eval.inc
-let $query=select */$internal/from t1;
---source include/percona_query_cache_with_comments_eval.inc
-
-let $query=select * from t1
-;
---source include/percona_query_cache_with_comments_eval.inc
-
-let $query=select * from t1 ;
---source include/percona_query_cache_with_comments_eval.inc
-
-let $query=select * from t1	;
---source include/percona_query_cache_with_comments_eval.inc
-
-let $query=select * from t1
-/* comment in the end */;
---source include/percona_query_cache_with_comments_eval.inc
-
-let $query=select * from t1
-/* comment in the end */
-;
---source include/percona_query_cache_with_comments_eval.inc
-
-let $query=select * from t1 #comment in the end;
---source include/percona_query_cache_with_comments_eval.inc
-
-let $query=select * from t1 #comment in the end
-;
---source include/percona_query_cache_with_comments_eval.inc
-
-let $query=select * from t1 -- comment in the end;
---source include/percona_query_cache_with_comments_eval.inc
-
-let $query=select * from t1 -- comment in the end
-;
---source include/percona_query_cache_with_comments_eval.inc

=== removed file 'mysql-test/suite/percona/percona_query_cache_with_comments.result'
--- a/mysql-test/suite/percona/percona_query_cache_with_comments.result	2010-08-03 10:54:05 +0000
+++ b/mysql-test/suite/percona/percona_query_cache_with_comments.result	1970-01-01 00:00:00 +0000
@@ -1,866 +0,0 @@
-set global query_cache_strip_comments=ON;
-set GLOBAL query_cache_size=1355776;
-drop table if exists t1;
-create table t1 (a int not null);
-insert into t1 values (1),(2),(3);
-flush query cache;
-flush query cache;
-reset query cache;
-flush status;
-flush query cache;
-flush query cache;
-reset query cache;
-flush status;
-/* with comment first */select * from t1;
-a
-1
-2
-3
------------------------------------------------------
-/* with comment first */select * from t1
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	0
-/* with comment first */select * from t1;
-a
-1
-2
-3
-/* with comment first */select * from t1;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	2
------------------------------------------------------
-# with comment first
-select * from t1
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	2
-# with comment first
-select * from t1;
-a
-1
-2
-3
-# with comment first
-select * from t1;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	4
------------------------------------------------------
--- with comment first
-select * from t1
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	4
--- with comment first
-select * from t1;
-a
-1
-2
-3
--- with comment first
-select * from t1;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	6
------------------------------------------------------
-/* with comment first and "quote" */select * from t1
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	6
-/* with comment first and "quote" */select * from t1;
-a
-1
-2
-3
-/* with comment first and "quote" */select * from t1;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	8
------------------------------------------------------
-# with comment first and "quote"
-select * from t1
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	8
-# with comment first and "quote"
-select * from t1;
-a
-1
-2
-3
-# with comment first and "quote"
-select * from t1;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	10
------------------------------------------------------
--- with comment first and "quote" 
-select * from t1
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	10
--- with comment first and "quote" 
-select * from t1;
-a
-1
-2
-3
--- with comment first and "quote" 
-select * from t1;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	12
------------------------------------------------------
-/* with comment and whitespaces first */select * from t1
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	12
-/* with comment and whitespaces first */select * from t1;
-a
-1
-2
-3
-/* with comment and whitespaces first */select * from t1;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	14
------------------------------------------------------
-# with comment and whitespaces first
-select * from t1
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	14
-# with comment and whitespaces first
-select * from t1;
-a
-1
-2
-3
-# with comment and whitespaces first
-select * from t1;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	16
------------------------------------------------------
--- with comment and whitespaces first
-select * from t1
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	16
--- with comment and whitespaces first
-select * from t1;
-a
-1
-2
-3
--- with comment and whitespaces first
-select * from t1;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	18
------------------------------------------------------
-select * /* internal comment */ from t1
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	18
-select * /* internal comment */ from t1;
-a
-1
-2
-3
-select * /* internal comment */ from t1;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	20
------------------------------------------------------
-select */* internal comment */ from t1
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	20
-select */* internal comment */ from t1;
-a
-1
-2
-3
-select */* internal comment */ from t1;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	22
------------------------------------------------------
-select */* internal comment */from t1
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	22
-select */* internal comment */from t1;
-a
-1
-2
-3
-select */* internal comment */from t1;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	24
------------------------------------------------------
-select * /* internal comment with "quote" */ from t1
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	24
-select * /* internal comment with "quote" */ from t1;
-a
-1
-2
-3
-select * /* internal comment with "quote" */ from t1;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	26
------------------------------------------------------
-select */* internal comment with "quote" */ from t1
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	26
-select */* internal comment with "quote" */ from t1;
-a
-1
-2
-3
-select */* internal comment with "quote" */ from t1;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	28
------------------------------------------------------
-select */* internal comment with "quote" */from t1
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	28
-select */* internal comment with "quote" */from t1;
-a
-1
-2
-3
-select */* internal comment with "quote" */from t1;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	30
------------------------------------------------------
-select * from t1
-
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	30
-select * from t1
-;
-a
-1
-2
-3
-select * from t1
-;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	32
------------------------------------------------------
-select * from t1 
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	32
-select * from t1 ;
-a
-1
-2
-3
-select * from t1 ;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	34
------------------------------------------------------
-select * from t1	
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	34
-select * from t1	;
-a
-1
-2
-3
-select * from t1	;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	36
------------------------------------------------------
-select * from t1
-/* comment in the end */
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	36
-select * from t1
-/* comment in the end */;
-a
-1
-2
-3
-select * from t1
-/* comment in the end */;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	38
------------------------------------------------------
-select * from t1
-/* *\/ */
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	38
-select * from t1
-/* *\/ */;
-a
-1
-2
-3
-select * from t1
-/* *\/ */;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	40
------------------------------------------------------
-select * from t1
-/* comment in the end */
-
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	40
-select * from t1
-/* comment in the end */
-;
-a
-1
-2
-3
-select * from t1
-/* comment in the end */
-;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	42
------------------------------------------------------
-select * from t1 #comment in the end
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	42
-select * from t1 #comment in the end;
-a
-1
-2
-3
-select * from t1 #comment in the end;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	44
------------------------------------------------------
-select * from t1 #comment in the end
-
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	44
-select * from t1 #comment in the end
-;
-a
-1
-2
-3
-select * from t1 #comment in the end
-;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	46
------------------------------------------------------
-select * from t1 -- comment in the end
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	46
-select * from t1 -- comment in the end;
-a
-1
-2
-3
-select * from t1 -- comment in the end;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	48
------------------------------------------------------
-select * from t1 -- comment in the end
-
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	48
-select * from t1 -- comment in the end
-;
-a
-1
-2
-3
-select * from t1 -- comment in the end
-;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	50
------------------------------------------------------
-select ' \'  ' from t1
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	50
-select ' \'  ' from t1;
-'  
- '  
- '  
- '  
-select ' \'  ' from t1;
-'  
- '  
- '  
- '  
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	2
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	2
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	51
-DROP TABLE t1;
-SET GLOBAL query_cache_size=default;
-set global query_cache_strip_comments=OFF;

=== removed file 'mysql-test/suite/percona/percona_query_cache_with_comments.test'
--- a/mysql-test/suite/percona/percona_query_cache_with_comments.test	2010-08-03 10:54:05 +0000
+++ b/mysql-test/suite/percona/percona_query_cache_with_comments.test	1970-01-01 00:00:00 +0000
@@ -1,4 +0,0 @@
-set global query_cache_strip_comments=ON;
--- source include/percona_query_cache_with_comments_begin.inc
--- source include/percona_query_cache_with_comments.inc
--- source include/percona_query_cache_with_comments_end.inc

=== removed file 'mysql-test/suite/percona/percona_query_cache_with_comments_crash.result'
--- a/mysql-test/suite/percona/percona_query_cache_with_comments_crash.result	2010-08-03 10:54:05 +0000
+++ b/mysql-test/suite/percona/percona_query_cache_with_comments_crash.result	1970-01-01 00:00:00 +0000
@@ -1,21 +0,0 @@
-set GLOBAL query_cache_size=1355776;
-drop table if exists t1;
-create table t1 (a int not null);
-insert into t1 values (1),(2),(3);
-flush query cache;
-flush query cache;
-reset query cache;
-flush status;
-( select * from t1 );
-a
-1
-2
-3
-/*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := REPLACE(REPLACE(@@SQL_MODE, 'ANSI_QUOTES', ''), ',,', ','), @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */;
-/* only comment */;
-# only comment
-;
--- only comment
-;
-DROP TABLE t1;
-SET GLOBAL query_cache_size= default;

=== removed file 'mysql-test/suite/percona/percona_query_cache_with_comments_crash.test'
--- a/mysql-test/suite/percona/percona_query_cache_with_comments_crash.test	2010-08-03 10:54:05 +0000
+++ b/mysql-test/suite/percona/percona_query_cache_with_comments_crash.test	1970-01-01 00:00:00 +0000
@@ -1,22 +0,0 @@
--- source include/have_query_cache.inc
-set GLOBAL query_cache_size=1355776;
---disable_warnings
-drop table if exists t1;
---enable_warnings
-create table t1 (a int not null);
-insert into t1 values (1),(2),(3);
-flush query cache; # This crashed in some versions
-flush query cache; # This crashed in some versions
-reset query cache;
-flush status;
-( select * from t1 );
-/*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := REPLACE(REPLACE(@@SQL_MODE, 'ANSI_QUOTES', ''), ',,', ','), @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */;
-/* only comment */;
-let query=# only comment
-;
-eval $query;
-let query=-- only comment
-;
-eval $query;
-DROP TABLE t1;
-SET GLOBAL query_cache_size= default;

=== removed file 'mysql-test/suite/percona/percona_query_cache_with_comments_disable.result'
--- a/mysql-test/suite/percona/percona_query_cache_with_comments_disable.result	2010-08-03 10:54:05 +0000
+++ b/mysql-test/suite/percona/percona_query_cache_with_comments_disable.result	1970-01-01 00:00:00 +0000
@@ -1,865 +0,0 @@
-set GLOBAL query_cache_size=1355776;
-drop table if exists t1;
-create table t1 (a int not null);
-insert into t1 values (1),(2),(3);
-flush query cache;
-flush query cache;
-reset query cache;
-flush status;
-flush query cache;
-flush query cache;
-reset query cache;
-flush status;
-/* with comment first */select * from t1;
-a
-1
-2
-3
------------------------------------------------------
-/* with comment first */select * from t1
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	0
-/* with comment first */select * from t1;
-a
-1
-2
-3
-/* with comment first */select * from t1;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	2
------------------------------------------------------
-# with comment first
-select * from t1
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	2
-# with comment first
-select * from t1;
-a
-1
-2
-3
-# with comment first
-select * from t1;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	2
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	2
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	2
------------------------------------------------------
--- with comment first
-select * from t1
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	2
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	2
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	2
--- with comment first
-select * from t1;
-a
-1
-2
-3
--- with comment first
-select * from t1;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	3
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	3
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	2
------------------------------------------------------
-/* with comment first and "quote" */select * from t1
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	3
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	3
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	2
-/* with comment first and "quote" */select * from t1;
-a
-1
-2
-3
-/* with comment first and "quote" */select * from t1;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	4
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	4
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	3
------------------------------------------------------
-# with comment first and "quote"
-select * from t1
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	4
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	4
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	3
-# with comment first and "quote"
-select * from t1;
-a
-1
-2
-3
-# with comment first and "quote"
-select * from t1;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	5
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	5
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	3
------------------------------------------------------
--- with comment first and "quote" 
-select * from t1
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	5
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	5
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	3
--- with comment first and "quote" 
-select * from t1;
-a
-1
-2
-3
--- with comment first and "quote" 
-select * from t1;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	6
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	6
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	3
------------------------------------------------------
-/* with comment and whitespaces first */select * from t1
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	6
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	6
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	3
-/* with comment and whitespaces first */select * from t1;
-a
-1
-2
-3
-/* with comment and whitespaces first */select * from t1;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	7
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	7
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	4
------------------------------------------------------
-# with comment and whitespaces first
-select * from t1
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	7
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	7
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	4
-# with comment and whitespaces first
-select * from t1;
-a
-1
-2
-3
-# with comment and whitespaces first
-select * from t1;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	8
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	8
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	4
------------------------------------------------------
--- with comment and whitespaces first
-select * from t1
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	8
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	8
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	4
--- with comment and whitespaces first
-select * from t1;
-a
-1
-2
-3
--- with comment and whitespaces first
-select * from t1;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	9
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	9
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	4
------------------------------------------------------
-select * /* internal comment */ from t1
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	9
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	9
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	4
-select * /* internal comment */ from t1;
-a
-1
-2
-3
-select * /* internal comment */ from t1;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	10
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	10
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	5
------------------------------------------------------
-select */* internal comment */ from t1
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	10
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	10
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	5
-select */* internal comment */ from t1;
-a
-1
-2
-3
-select */* internal comment */ from t1;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	11
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	11
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	6
------------------------------------------------------
-select */* internal comment */from t1
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	11
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	11
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	6
-select */* internal comment */from t1;
-a
-1
-2
-3
-select */* internal comment */from t1;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	12
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	12
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	7
------------------------------------------------------
-select * /* internal comment with "quote" */ from t1
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	12
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	12
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	7
-select * /* internal comment with "quote" */ from t1;
-a
-1
-2
-3
-select * /* internal comment with "quote" */ from t1;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	13
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	13
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	8
------------------------------------------------------
-select */* internal comment with "quote" */ from t1
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	13
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	13
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	8
-select */* internal comment with "quote" */ from t1;
-a
-1
-2
-3
-select */* internal comment with "quote" */ from t1;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	14
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	14
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	9
------------------------------------------------------
-select */* internal comment with "quote" */from t1
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	14
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	14
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	9
-select */* internal comment with "quote" */from t1;
-a
-1
-2
-3
-select */* internal comment with "quote" */from t1;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	15
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	15
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	10
------------------------------------------------------
-select * from t1
-
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	15
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	15
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	10
-select * from t1
-;
-a
-1
-2
-3
-select * from t1
-;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	16
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	16
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	11
------------------------------------------------------
-select * from t1 
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	16
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	16
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	11
-select * from t1 ;
-a
-1
-2
-3
-select * from t1 ;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	16
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	16
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	13
------------------------------------------------------
-select * from t1	
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	16
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	16
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	13
-select * from t1	;
-a
-1
-2
-3
-select * from t1	;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	16
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	16
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	15
------------------------------------------------------
-select * from t1
-/* comment in the end */
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	16
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	16
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	15
-select * from t1
-/* comment in the end */;
-a
-1
-2
-3
-select * from t1
-/* comment in the end */;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	17
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	17
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	16
------------------------------------------------------
-select * from t1
-/* *\/ */
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	17
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	17
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	16
-select * from t1
-/* *\/ */;
-a
-1
-2
-3
-select * from t1
-/* *\/ */;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	18
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	18
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	17
------------------------------------------------------
-select * from t1
-/* comment in the end */
-
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	18
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	18
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	17
-select * from t1
-/* comment in the end */
-;
-a
-1
-2
-3
-select * from t1
-/* comment in the end */
-;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	18
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	18
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	19
------------------------------------------------------
-select * from t1 #comment in the end
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	18
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	18
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	19
-select * from t1 #comment in the end;
-a
-1
-2
-3
-select * from t1 #comment in the end;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	19
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	19
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	20
------------------------------------------------------
-select * from t1 #comment in the end
-
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	19
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	19
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	20
-select * from t1 #comment in the end
-;
-a
-1
-2
-3
-select * from t1 #comment in the end
-;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	19
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	19
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	22
------------------------------------------------------
-select * from t1 -- comment in the end
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	19
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	19
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	22
-select * from t1 -- comment in the end;
-a
-1
-2
-3
-select * from t1 -- comment in the end;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	20
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	20
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	23
------------------------------------------------------
-select * from t1 -- comment in the end
-
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	20
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	20
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	23
-select * from t1 -- comment in the end
-;
-a
-1
-2
-3
-select * from t1 -- comment in the end
-;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	20
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	20
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	25
------------------------------------------------------
-select ' \'  ' from t1
------------------------------------------------------
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	20
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	20
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	25
-select ' \'  ' from t1;
-'  
- '  
- '  
- '  
-select ' \'  ' from t1;
-'  
- '  
- '  
- '  
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	21
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	21
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	26
-DROP TABLE t1;
-SET GLOBAL query_cache_size=default;
-set global query_cache_strip_comments=OFF;

=== removed file 'mysql-test/suite/percona/percona_query_cache_with_comments_disable.test'
--- a/mysql-test/suite/percona/percona_query_cache_with_comments_disable.test	2010-08-03 10:54:05 +0000
+++ b/mysql-test/suite/percona/percona_query_cache_with_comments_disable.test	1970-01-01 00:00:00 +0000
@@ -1,3 +0,0 @@
--- source include/percona_query_cache_with_comments_begin.inc
--- source include/percona_query_cache_with_comments.inc
--- source include/percona_query_cache_with_comments_end.inc

=== removed file 'mysql-test/suite/percona/percona_query_cache_with_comments_prepared_statements.result'
--- a/mysql-test/suite/percona/percona_query_cache_with_comments_prepared_statements.result	2010-08-03 10:54:05 +0000
+++ b/mysql-test/suite/percona/percona_query_cache_with_comments_prepared_statements.result	1970-01-01 00:00:00 +0000
@@ -1,396 +0,0 @@
-set GLOBAL query_cache_size=1355776;
-flush query cache;
-flush query cache;
-reset query cache;
-flush status;
-drop table if exists t1;
-create table t1 (a int not null);
-insert into t1 values (1),(2),(3);
-set global query_cache_strip_comments=ON;
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	0
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	0
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	0
-prepare stmt from '/* with comment */ select * from t1';
-execute stmt;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	0
-execute stmt;
-a
-1
-2
-3
-execute stmt;
-a
-1
-2
-3
-execute stmt;
-a
-1
-2
-3
-execute stmt;
-a
-1
-2
-3
-execute stmt;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	5
-prepare stmt from 'select * from t1';
-execute stmt;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	6
-prepare stmt from 'select * /*internal comment*/from t1';
-execute stmt;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	7
-prepare stmt from 'select * /*internal comment*/ from t1';
-execute stmt;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	8
-prepare stmt from 'select * from t1 /* at the end */';
-execute stmt;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	9
-prepare stmt from 'select * from t1 /* with "quote" */';
-execute stmt;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	10
-prepare stmt from 'select * from t1 /* with \'quote\' */';
-execute stmt;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	11
-prepare stmt from 'select * from t1 # 123
-';
-execute stmt;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	12
-prepare stmt from 'select * from t1 # 123 with "quote"
-';
-execute stmt;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	13
-prepare stmt from 'select * from t1 # 123 with \'quote\'
-';
-execute stmt;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	14
-prepare stmt from 'select * from t1
-# 123
-';
-execute stmt;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	15
-prepare stmt from '#456
-select * from t1
-# 123
-';
-execute stmt;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	16
-prepare stmt from 'select * from t1 -- 123
-';
-execute stmt;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	17
-prepare stmt from 'select * from t1
--- 123
-';
-execute stmt;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	18
-prepare stmt from '-- comment in first
-select * from t1
-# 123
-';
-execute stmt;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	1
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	1
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	19
-prepare stmt from '(#456(
-select * from t1
-# 123(
-)';
-execute stmt;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	2
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	2
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	19
-prepare stmt from '/*test*/(-- comment in first(
-select * from t1
--- 123 asdasd
-/* test */)';
-execute stmt;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	2
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	2
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	20
-prepare stmt from 'select "test",a from t1';
-execute stmt;
-test	a
-test	1
-test	2
-test	3
-execute stmt;
-test	a
-test	1
-test	2
-test	3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	3
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	3
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	21
-prepare stmt from 'select "test /* internal \'comment\' */",a from t1';
-execute stmt;
-test /* internal 'comment' */	a
-test /* internal 'comment' */	1
-test /* internal 'comment' */	2
-test /* internal 'comment' */	3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	4
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	4
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	21
-prepare stmt from 'select "test #internal comment" ,a from t1';
-execute stmt;
-test #internal comment	a
-test #internal comment	1
-test #internal comment	2
-test #internal comment	3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	5
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	5
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	21
-prepare stmt from 'select "test #internal comment" #external comment
-,a from t1';
-execute stmt;
-test #internal comment	a
-test #internal comment	1
-test #internal comment	2
-test #internal comment	3
-show status like "Qcache_queries_in_cache";
-Variable_name	Value
-Qcache_queries_in_cache	5
-show status like "Qcache_inserts";
-Variable_name	Value
-Qcache_inserts	5
-show status like "Qcache_hits";
-Variable_name	Value
-Qcache_hits	22
-DROP TABLE t1;
-SET GLOBAL query_cache_size= default;
-set global query_cache_strip_comments=OFF;

=== removed file 'mysql-test/suite/percona/percona_query_cache_with_comments_prepared_statements.test'
--- a/mysql-test/suite/percona/percona_query_cache_with_comments_prepared_statements.test	2010-08-03 10:54:05 +0000
+++ b/mysql-test/suite/percona/percona_query_cache_with_comments_prepared_statements.test	1970-01-01 00:00:00 +0000
@@ -1,208 +0,0 @@
--- source include/have_query_cache.inc
-
-set GLOBAL query_cache_size=1355776;
-
-# Reset query cache variables.
-flush query cache; # This crashed in some versions
-flush query cache; # This crashed in some versions
-reset query cache;
-flush status;
---disable_warnings
-drop table if exists t1;
---enable_warnings
-
-#
-# First simple test
-#
-
-create table t1 (a int not null);
-insert into t1 values (1),(2),(3);
-
-set global query_cache_strip_comments=ON;
-
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-
-prepare stmt from '/* with comment */ select * from t1';
-execute stmt;
-
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-
-execute stmt;
-execute stmt;
-execute stmt;
-execute stmt;
-execute stmt;
-
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-
-prepare stmt from 'select * from t1';
-execute stmt;
-
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-
-prepare stmt from 'select * /*internal comment*/from t1';
-execute stmt;
-
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-
-prepare stmt from 'select * /*internal comment*/ from t1';
-execute stmt;
-
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-
-prepare stmt from 'select * from t1 /* at the end */';
-execute stmt;
-
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-
-prepare stmt from 'select * from t1 /* with "quote" */';
-execute stmt;
-
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-
-prepare stmt from 'select * from t1 /* with \'quote\' */';
-execute stmt;
-
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-
-prepare stmt from 'select * from t1 # 123
-';
-execute stmt;
-
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-
-prepare stmt from 'select * from t1 # 123 with "quote"
-';
-execute stmt;
-
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-
-prepare stmt from 'select * from t1 # 123 with \'quote\'
-';
-execute stmt;
-
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-
-prepare stmt from 'select * from t1
-# 123
-';
-execute stmt;
-
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-
-prepare stmt from '#456
-select * from t1
-# 123
-';
-execute stmt;
-
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-
-prepare stmt from 'select * from t1 -- 123
-';
-execute stmt;
-
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-
-prepare stmt from 'select * from t1
--- 123
-';
-execute stmt;
-
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-
-prepare stmt from '-- comment in first
-select * from t1
-# 123
-';
-execute stmt;
-
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-
-prepare stmt from '(#456(
-select * from t1
-# 123(
-)';
-execute stmt;
-
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-
-prepare stmt from '/*test*/(-- comment in first(
-select * from t1
--- 123 asdasd
-/* test */)';
-execute stmt;
-
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-
-prepare stmt from 'select "test",a from t1';
-execute stmt;
-execute stmt;
-
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-
-prepare stmt from 'select "test /* internal \'comment\' */",a from t1';
-execute stmt;
-
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-
-prepare stmt from 'select "test #internal comment" ,a from t1';
-execute stmt;
-
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-
-prepare stmt from 'select "test #internal comment" #external comment
-,a from t1';
-execute stmt;
-
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-
-DROP TABLE t1;
-SET GLOBAL query_cache_size= default;
-set global query_cache_strip_comments=OFF;

=== removed file 'mysql-test/suite/percona/percona_query_response_time-replication.result'
--- a/mysql-test/suite/percona/percona_query_response_time-replication.result	2010-09-03 15:41:57 +0000
+++ b/mysql-test/suite/percona/percona_query_response_time-replication.result	1970-01-01 00:00:00 +0000
@@ -1,60 +0,0 @@
-stop slave;
-drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
-reset master;
-reset slave;
-drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
-start slave;
-DROP TABLE IF EXISTS t;
-CREATE TABLE t(id INT);
-SELECT * from t;
-id
-SELECT * from t;
-id
-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1;
-Warnings:
-Warning	1292	Truncated incorrect query_response_time_range_base value: '1'
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-Variable_name	Value
-query_response_time_range_base	2
-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10;
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-Variable_name	Value
-query_response_time_range_base	10
-FLUSH QUERY_RESPONSE_TIME;
-SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=ON;
-INSERT INTO t VALUES(0);
-SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
-SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count)
-0
-INSERT INTO t VALUES(1);
-SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
-SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count)
-0
-SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
-SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count)
-2
-SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
-SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count)
-3
-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 2;
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-Variable_name	Value
-query_response_time_range_base	2
-FLUSH QUERY_RESPONSE_TIME;
-INSERT INTO t VALUES(0);
-SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
-SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count)
-0
-INSERT INTO t VALUES(1);
-SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
-SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count)
-0
-SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
-SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count)
-2
-SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
-SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count)
-3
-DROP TABLE IF EXISTS t;
-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10;
-SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=OFF;

=== removed file 'mysql-test/suite/percona/percona_query_response_time-replication.test'
--- a/mysql-test/suite/percona/percona_query_response_time-replication.test	2010-09-03 15:41:57 +0000
+++ b/mysql-test/suite/percona/percona_query_response_time-replication.test	1970-01-01 00:00:00 +0000
@@ -1,52 +0,0 @@
---source include/master-slave.inc
-
-connection master;
--- disable_warnings
-DROP TABLE IF EXISTS t;
--- enable_warnings
-CREATE TABLE t(id INT);
-SELECT * from t;
-
-sync_slave_with_master;
-
-connection slave;
-SELECT * from t;
-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1;
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10;
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-source include/percona_query_response_time_flush.inc;
-SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=ON;
-
-connection master;
-INSERT INTO t VALUES(0);
-SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
-INSERT INTO t VALUES(1);
-SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
-sync_slave_with_master;
-
-connection slave;
-SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
-SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
-
-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 2;
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-source include/percona_query_response_time_flush.inc;
-
-connection master;
-INSERT INTO t VALUES(0);
-SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
-INSERT INTO t VALUES(1);
-SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
-sync_slave_with_master;
-
-connection slave;
-SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
-SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
-
-connection master;
-DROP TABLE IF EXISTS t;
-sync_slave_with_master;
-connection slave;
-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10;
-SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=OFF;

=== removed file 'mysql-test/suite/percona/percona_query_response_time-stored.result'
--- a/mysql-test/suite/percona/percona_query_response_time-stored.result	2010-10-19 10:27:31 +0000
+++ b/mysql-test/suite/percona/percona_query_response_time-stored.result	1970-01-01 00:00:00 +0000
@@ -1,316 +0,0 @@
-CREATE FUNCTION test_f()
-RETURNS CHAR(30) DETERMINISTIC
-BEGIN
-DECLARE first  VARCHAR(5);
-DECLARE second VARCHAR(5);
-DECLARE result VARCHAR(20);
-SELECT SLEEP(1.11) INTO first;
-SET first= 'Hello';
-SET second=', ';
-SET result= CONCAT(first,second);
-SET result= CONCAT(result,'world!');
-RETURN result;
-END/
-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1;
-Warnings:
-Warning	1292	Truncated incorrect query_response_time_range_base value: '1'
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-Variable_name	Value
-query_response_time_range_base	2
-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 2;
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-Variable_name	Value
-query_response_time_range_base	2
-FLUSH QUERY_RESPONSE_TIME;
-SELECT d.count,
-(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
-(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total,
-(SELECT COUNT(*)     FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count,
-(SELECT COUNT(*)     FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
-FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0;
-count	query_count	query_total	not_zero_region_count	region_count
-SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
-region_count
-44
-SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
-time
-      0.000001
-      0.000003
-      0.000007
-      0.000015
-      0.000030
-      0.000061
-      0.000122
-      0.000244
-      0.000488
-      0.000976
-      0.001953
-      0.003906
-      0.007812
-      0.015625
-      0.031250
-      0.062500
-      0.125000
-      0.250000
-      0.500000
-      1.000000
-      2.000000
-      4.000000
-      8.000000
-     16.000000
-     32.000000
-     64.000000
-    128.000000
-    256.000000
-    512.000000
-   1024.000000
-   2048.000000
-   4096.000000
-   8192.000000
-  16384.000000
-  32768.000000
-  65536.000000
- 131072.000000
- 262144.000000
- 524288.000000
- 1048576.00000
- 2097152.00000
- 4194304.00000
- 8388608.00000
-TOO LONG
-SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1;
-SELECT test_f();
-test_f()
-Hello, world!
-SELECT test_f();
-test_f()
-Hello, world!
-SELECT test_f();
-test_f()
-Hello, world!
-SELECT test_f();
-test_f()
-Hello, world!
-SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
-SELECT d.count,
-(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
-(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total,
-(SELECT COUNT(*)     FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count,
-(SELECT COUNT(*)     FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
-FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0;
-count	query_count	query_total	not_zero_region_count	region_count
-1	5	4	2	44
-4	5	4	2	44
-SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
-region_count
-44
-SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
-time
-      0.000001
-      0.000003
-      0.000007
-      0.000015
-      0.000030
-      0.000061
-      0.000122
-      0.000244
-      0.000488
-      0.000976
-      0.001953
-      0.003906
-      0.007812
-      0.015625
-      0.031250
-      0.062500
-      0.125000
-      0.250000
-      0.500000
-      1.000000
-      2.000000
-      4.000000
-      8.000000
-     16.000000
-     32.000000
-     64.000000
-    128.000000
-    256.000000
-    512.000000
-   1024.000000
-   2048.000000
-   4096.000000
-   8192.000000
-  16384.000000
-  32768.000000
-  65536.000000
- 131072.000000
- 262144.000000
- 524288.000000
- 1048576.00000
- 2097152.00000
- 4194304.00000
- 8388608.00000
-TOO LONG
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-Variable_name	Value
-query_response_time_range_base	2
-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10;
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-Variable_name	Value
-query_response_time_range_base	10
-FLUSH QUERY_RESPONSE_TIME;
-SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1;
-SELECT test_f();
-test_f()
-Hello, world!
-SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
-SELECT d.count,
-(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
-(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total,
-(SELECT COUNT(*)     FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count,
-(SELECT COUNT(*)     FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
-FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0;
-count	query_count	query_total	not_zero_region_count	region_count
-1	2	1	2	14
-1	2	1	2	14
-SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
-region_count
-14
-SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
-time
-      0.000001
-      0.000010
-      0.000100
-      0.001000
-      0.010000
-      0.100000
-      1.000000
-     10.000000
-    100.000000
-   1000.000000
-  10000.000000
- 100000.000000
- 1000000.00000
-TOO LONG
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-Variable_name	Value
-query_response_time_range_base	10
-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 7;
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-Variable_name	Value
-query_response_time_range_base	7
-FLUSH QUERY_RESPONSE_TIME;
-SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1;
-SELECT test_f();
-test_f()
-Hello, world!
-SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
-SELECT d.count,
-(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
-(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total,
-(SELECT COUNT(*)     FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count,
-(SELECT COUNT(*)     FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
-FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0;
-count	query_count	query_total	not_zero_region_count	region_count
-1	2	1	2	17
-1	2	1	2	17
-SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
-region_count
-17
-SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
-time
-      0.000001
-      0.000008
-      0.000059
-      0.000416
-      0.002915
-      0.020408
-      0.142857
-      1.000000
-      7.000000
-     49.000000
-    343.000000
-   2401.000000
-  16807.000000
- 117649.000000
- 823543.000000
- 5764801.00000
-TOO LONG
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-Variable_name	Value
-query_response_time_range_base	7
-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 156;
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-Variable_name	Value
-query_response_time_range_base	156
-FLUSH QUERY_RESPONSE_TIME;
-SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1;
-SELECT test_f();
-test_f()
-Hello, world!
-SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
-SELECT d.count,
-(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
-(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total,
-(SELECT COUNT(*)     FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count,
-(SELECT COUNT(*)     FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
-FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0;
-count	query_count	query_total	not_zero_region_count	region_count
-1	2	1	2	7
-1	2	1	2	7
-SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
-region_count
-7
-SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
-time
-      0.000041
-      0.006410
-      1.000000
-    156.000000
-  24336.000000
- 3796416.00000
-TOO LONG
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-Variable_name	Value
-query_response_time_range_base	156
-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1000;
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-Variable_name	Value
-query_response_time_range_base	1000
-FLUSH QUERY_RESPONSE_TIME;
-SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1;
-SELECT test_f();
-test_f()
-Hello, world!
-SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
-SELECT d.count,
-(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
-(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total,
-(SELECT COUNT(*)     FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count,
-(SELECT COUNT(*)     FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
-FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0;
-count	query_count	query_total	not_zero_region_count	region_count
-1	2	1	2	6
-1	2	1	2	6
-SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
-region_count
-6
-SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
-time
-      0.000001
-      0.001000
-      1.000000
-   1000.000000
- 1000000.00000
-TOO LONG
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-Variable_name	Value
-query_response_time_range_base	1000
-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1001;
-Warnings:
-Warning	1292	Truncated incorrect query_response_time_range_base value: '1001'
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-Variable_name	Value
-query_response_time_range_base	1000
-SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE  =10;
-DROP FUNCTION test_f;

=== removed file 'mysql-test/suite/percona/percona_query_response_time-stored.test'
--- a/mysql-test/suite/percona/percona_query_response_time-stored.test	2010-09-03 15:41:57 +0000
+++ b/mysql-test/suite/percona/percona_query_response_time-stored.test	1970-01-01 00:00:00 +0000
@@ -1,87 +0,0 @@
-source include/have_innodb.inc;
-
-delimiter /;
-CREATE FUNCTION test_f()
-RETURNS CHAR(30) DETERMINISTIC
-BEGIN
-	DECLARE first  VARCHAR(5);
-	DECLARE second VARCHAR(5);
-	DECLARE result VARCHAR(20);
-	SELECT SLEEP(1.11) INTO first;
-	SET first= 'Hello';
-	SET second=', ';
-	SET result= CONCAT(first,second);
-	SET result= CONCAT(result,'world!');
-	RETURN result;
-END/
-delimiter ;/
-
-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1;
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 2;
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-
-source include/percona_query_response_time_flush.inc;
-source include/percona_query_response_time_show.inc;
-
-SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1;
-SELECT test_f();
-SELECT test_f();
-SELECT test_f();
-SELECT test_f();
-SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
-
-source include/percona_query_response_time_show.inc;
-
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10;
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-
-source include/percona_query_response_time_flush.inc;
-SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1;
-SELECT test_f();
-SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
-
-source include/percona_query_response_time_show.inc;
-
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 7;
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-
-source include/percona_query_response_time_flush.inc;
-SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1;
-SELECT test_f();
-SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
-
-source include/percona_query_response_time_show.inc;
-
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 156;
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-
-source include/percona_query_response_time_flush.inc;
-SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1;
-SELECT test_f();
-SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
-
-source include/percona_query_response_time_show.inc;
-
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1000;
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-
-source include/percona_query_response_time_flush.inc;
-SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1;
-SELECT test_f();
-SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
-
-source include/percona_query_response_time_show.inc;
-
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1001;
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-
-SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE  =10;
-
-DROP FUNCTION test_f;
\ No newline at end of file

=== removed file 'mysql-test/suite/percona/percona_query_response_time.result'
--- a/mysql-test/suite/percona/percona_query_response_time.result	2010-10-19 10:27:31 +0000
+++ b/mysql-test/suite/percona/percona_query_response_time.result	1970-01-01 00:00:00 +0000
@@ -1,570 +0,0 @@
-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1;
-Warnings:
-Warning	1292	Truncated incorrect query_response_time_range_base value: '1'
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-Variable_name	Value
-query_response_time_range_base	2
-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 2;
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-Variable_name	Value
-query_response_time_range_base	2
-FLUSH QUERY_RESPONSE_TIME;
-SELECT d.count,
-(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
-(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total,
-(SELECT COUNT(*)     FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count,
-(SELECT COUNT(*)     FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
-FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0;
-count	query_count	query_total	not_zero_region_count	region_count
-SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
-region_count
-44
-SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
-time
-      0.000001
-      0.000003
-      0.000007
-      0.000015
-      0.000030
-      0.000061
-      0.000122
-      0.000244
-      0.000488
-      0.000976
-      0.001953
-      0.003906
-      0.007812
-      0.015625
-      0.031250
-      0.062500
-      0.125000
-      0.250000
-      0.500000
-      1.000000
-      2.000000
-      4.000000
-      8.000000
-     16.000000
-     32.000000
-     64.000000
-    128.000000
-    256.000000
-    512.000000
-   1024.000000
-   2048.000000
-   4096.000000
-   8192.000000
-  16384.000000
-  32768.000000
-  65536.000000
- 131072.000000
- 262144.000000
- 524288.000000
- 1048576.00000
- 2097152.00000
- 4194304.00000
- 8388608.00000
-TOO LONG
-SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1;
-SELECT SLEEP(0.31);
-SLEEP(0.31)
-0
-SELECT SLEEP(0.32);
-SLEEP(0.32)
-0
-SELECT SLEEP(0.33);
-SLEEP(0.33)
-0
-SELECT SLEEP(0.34);
-SLEEP(0.34)
-0
-SELECT SLEEP(0.35);
-SLEEP(0.35)
-0
-SELECT SLEEP(0.36);
-SLEEP(0.36)
-0
-SELECT SLEEP(0.37);
-SLEEP(0.37)
-0
-SELECT SLEEP(0.38);
-SLEEP(0.38)
-0
-SELECT SLEEP(0.39);
-SLEEP(0.39)
-0
-SELECT SLEEP(0.40);
-SLEEP(0.40)
-0
-SELECT SLEEP(1.1);
-SLEEP(1.1)
-0
-SELECT SLEEP(1.2);
-SLEEP(1.2)
-0
-SELECT SLEEP(1.3);
-SLEEP(1.3)
-0
-SELECT SLEEP(1.5);
-SLEEP(1.5)
-0
-SELECT SLEEP(1.4);
-SLEEP(1.4)
-0
-SELECT SLEEP(0.5);
-SLEEP(0.5)
-0
-SELECT SLEEP(2.1);
-SLEEP(2.1)
-0
-SELECT SLEEP(2.3);
-SLEEP(2.3)
-0
-SELECT SLEEP(2.5);
-SLEEP(2.5)
-0
-SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
-SELECT d.count,
-(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
-(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total,
-(SELECT COUNT(*)     FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count,
-(SELECT COUNT(*)     FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
-FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0;
-count	query_count	query_total	not_zero_region_count	region_count
-1	20	15	5	44
-10	20	15	5	44
-1	20	15	5	44
-5	20	15	5	44
-3	20	15	5	44
-SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
-region_count
-44
-SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
-time
-      0.000001
-      0.000003
-      0.000007
-      0.000015
-      0.000030
-      0.000061
-      0.000122
-      0.000244
-      0.000488
-      0.000976
-      0.001953
-      0.003906
-      0.007812
-      0.015625
-      0.031250
-      0.062500
-      0.125000
-      0.250000
-      0.500000
-      1.000000
-      2.000000
-      4.000000
-      8.000000
-     16.000000
-     32.000000
-     64.000000
-    128.000000
-    256.000000
-    512.000000
-   1024.000000
-   2048.000000
-   4096.000000
-   8192.000000
-  16384.000000
-  32768.000000
-  65536.000000
- 131072.000000
- 262144.000000
- 524288.000000
- 1048576.00000
- 2097152.00000
- 4194304.00000
- 8388608.00000
-TOO LONG
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-Variable_name	Value
-query_response_time_range_base	2
-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10;
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-Variable_name	Value
-query_response_time_range_base	10
-FLUSH QUERY_RESPONSE_TIME;
-SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1;
-SELECT SLEEP(0.31);
-SLEEP(0.31)
-0
-SELECT SLEEP(0.32);
-SLEEP(0.32)
-0
-SELECT SLEEP(0.33);
-SLEEP(0.33)
-0
-SELECT SLEEP(0.34);
-SLEEP(0.34)
-0
-SELECT SLEEP(0.35);
-SLEEP(0.35)
-0
-SELECT SLEEP(0.36);
-SLEEP(0.36)
-0
-SELECT SLEEP(0.37);
-SLEEP(0.37)
-0
-SELECT SLEEP(0.38);
-SLEEP(0.38)
-0
-SELECT SLEEP(0.39);
-SLEEP(0.39)
-0
-SELECT SLEEP(0.40);
-SLEEP(0.40)
-0
-SELECT SLEEP(1.1);
-SLEEP(1.1)
-0
-SELECT SLEEP(1.2);
-SLEEP(1.2)
-0
-SELECT SLEEP(1.3);
-SLEEP(1.3)
-0
-SELECT SLEEP(1.5);
-SLEEP(1.5)
-0
-SELECT SLEEP(1.4);
-SLEEP(1.4)
-0
-SELECT SLEEP(0.5);
-SLEEP(0.5)
-0
-SELECT SLEEP(2.1);
-SLEEP(2.1)
-0
-SELECT SLEEP(2.3);
-SLEEP(2.3)
-0
-SELECT SLEEP(2.5);
-SLEEP(2.5)
-0
-SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
-SELECT d.count,
-(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
-(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total,
-(SELECT COUNT(*)     FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count,
-(SELECT COUNT(*)     FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
-FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0;
-count	query_count	query_total	not_zero_region_count	region_count
-1	20	17	3	14
-11	20	17	3	14
-8	20	17	3	14
-SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
-region_count
-14
-SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
-time
-      0.000001
-      0.000010
-      0.000100
-      0.001000
-      0.010000
-      0.100000
-      1.000000
-     10.000000
-    100.000000
-   1000.000000
-  10000.000000
- 100000.000000
- 1000000.00000
-TOO LONG
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-Variable_name	Value
-query_response_time_range_base	10
-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 7;
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-Variable_name	Value
-query_response_time_range_base	7
-FLUSH QUERY_RESPONSE_TIME;
-SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1;
-SELECT SLEEP(0.31);
-SLEEP(0.31)
-0
-SELECT SLEEP(0.32);
-SLEEP(0.32)
-0
-SELECT SLEEP(0.33);
-SLEEP(0.33)
-0
-SELECT SLEEP(0.34);
-SLEEP(0.34)
-0
-SELECT SLEEP(0.35);
-SLEEP(0.35)
-0
-SELECT SLEEP(0.36);
-SLEEP(0.36)
-0
-SELECT SLEEP(0.37);
-SLEEP(0.37)
-0
-SELECT SLEEP(0.38);
-SLEEP(0.38)
-0
-SELECT SLEEP(0.39);
-SLEEP(0.39)
-0
-SELECT SLEEP(0.40);
-SLEEP(0.40)
-0
-SELECT SLEEP(1.1);
-SLEEP(1.1)
-0
-SELECT SLEEP(1.2);
-SLEEP(1.2)
-0
-SELECT SLEEP(1.3);
-SLEEP(1.3)
-0
-SELECT SLEEP(1.5);
-SLEEP(1.5)
-0
-SELECT SLEEP(1.4);
-SLEEP(1.4)
-0
-SELECT SLEEP(0.5);
-SLEEP(0.5)
-0
-SELECT SLEEP(2.1);
-SLEEP(2.1)
-0
-SELECT SLEEP(2.3);
-SLEEP(2.3)
-0
-SELECT SLEEP(2.5);
-SLEEP(2.5)
-0
-SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
-SELECT d.count,
-(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
-(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total,
-(SELECT COUNT(*)     FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count,
-(SELECT COUNT(*)     FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
-FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0;
-count	query_count	query_total	not_zero_region_count	region_count
-1	20	17	3	17
-11	20	17	3	17
-8	20	17	3	17
-SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
-region_count
-17
-SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
-time
-      0.000001
-      0.000008
-      0.000059
-      0.000416
-      0.002915
-      0.020408
-      0.142857
-      1.000000
-      7.000000
-     49.000000
-    343.000000
-   2401.000000
-  16807.000000
- 117649.000000
- 823543.000000
- 5764801.00000
-TOO LONG
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-Variable_name	Value
-query_response_time_range_base	7
-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 156;
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-Variable_name	Value
-query_response_time_range_base	156
-FLUSH QUERY_RESPONSE_TIME;
-SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1;
-SELECT SLEEP(0.31);
-SLEEP(0.31)
-0
-SELECT SLEEP(0.32);
-SLEEP(0.32)
-0
-SELECT SLEEP(0.33);
-SLEEP(0.33)
-0
-SELECT SLEEP(0.34);
-SLEEP(0.34)
-0
-SELECT SLEEP(0.35);
-SLEEP(0.35)
-0
-SELECT SLEEP(0.36);
-SLEEP(0.36)
-0
-SELECT SLEEP(0.37);
-SLEEP(0.37)
-0
-SELECT SLEEP(0.38);
-SLEEP(0.38)
-0
-SELECT SLEEP(0.39);
-SLEEP(0.39)
-0
-SELECT SLEEP(0.40);
-SLEEP(0.40)
-0
-SELECT SLEEP(1.1);
-SLEEP(1.1)
-0
-SELECT SLEEP(1.2);
-SLEEP(1.2)
-0
-SELECT SLEEP(1.3);
-SLEEP(1.3)
-0
-SELECT SLEEP(1.5);
-SLEEP(1.5)
-0
-SELECT SLEEP(1.4);
-SLEEP(1.4)
-0
-SELECT SLEEP(0.5);
-SLEEP(0.5)
-0
-SELECT SLEEP(2.1);
-SLEEP(2.1)
-0
-SELECT SLEEP(2.3);
-SLEEP(2.3)
-0
-SELECT SLEEP(2.5);
-SLEEP(2.5)
-0
-SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
-SELECT d.count,
-(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
-(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total,
-(SELECT COUNT(*)     FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count,
-(SELECT COUNT(*)     FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
-FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0;
-count	query_count	query_total	not_zero_region_count	region_count
-1	20	17	3	7
-11	20	17	3	7
-8	20	17	3	7
-SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
-region_count
-7
-SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
-time
-      0.000041
-      0.006410
-      1.000000
-    156.000000
-  24336.000000
- 3796416.00000
-TOO LONG
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-Variable_name	Value
-query_response_time_range_base	156
-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1000;
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-Variable_name	Value
-query_response_time_range_base	1000
-FLUSH QUERY_RESPONSE_TIME;
-SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1;
-SELECT SLEEP(0.31);
-SLEEP(0.31)
-0
-SELECT SLEEP(0.32);
-SLEEP(0.32)
-0
-SELECT SLEEP(0.33);
-SLEEP(0.33)
-0
-SELECT SLEEP(0.34);
-SLEEP(0.34)
-0
-SELECT SLEEP(0.35);
-SLEEP(0.35)
-0
-SELECT SLEEP(0.36);
-SLEEP(0.36)
-0
-SELECT SLEEP(0.37);
-SLEEP(0.37)
-0
-SELECT SLEEP(0.38);
-SLEEP(0.38)
-0
-SELECT SLEEP(0.39);
-SLEEP(0.39)
-0
-SELECT SLEEP(0.40);
-SLEEP(0.40)
-0
-SELECT SLEEP(1.1);
-SLEEP(1.1)
-0
-SELECT SLEEP(1.2);
-SLEEP(1.2)
-0
-SELECT SLEEP(1.3);
-SLEEP(1.3)
-0
-SELECT SLEEP(1.5);
-SLEEP(1.5)
-0
-SELECT SLEEP(1.4);
-SLEEP(1.4)
-0
-SELECT SLEEP(0.5);
-SLEEP(0.5)
-0
-SELECT SLEEP(2.1);
-SLEEP(2.1)
-0
-SELECT SLEEP(2.3);
-SLEEP(2.3)
-0
-SELECT SLEEP(2.5);
-SLEEP(2.5)
-0
-SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
-SELECT d.count,
-(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
-(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total,
-(SELECT COUNT(*)     FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count,
-(SELECT COUNT(*)     FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
-FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0;
-count	query_count	query_total	not_zero_region_count	region_count
-1	20	17	3	6
-11	20	17	3	6
-8	20	17	3	6
-SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
-region_count
-6
-SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
-time
-      0.000001
-      0.001000
-      1.000000
-   1000.000000
- 1000000.00000
-TOO LONG
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-Variable_name	Value
-query_response_time_range_base	1000
-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1001;
-Warnings:
-Warning	1292	Truncated incorrect query_response_time_range_base value: '1001'
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-Variable_name	Value
-query_response_time_range_base	1000
-SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE  =10;

=== removed file 'mysql-test/suite/percona/percona_query_response_time.test'
--- a/mysql-test/suite/percona/percona_query_response_time.test	2010-09-03 15:41:57 +0000
+++ b/mysql-test/suite/percona/percona_query_response_time.test	1970-01-01 00:00:00 +0000
@@ -1,65 +0,0 @@
-source include/have_innodb.inc;
-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1;
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 2;
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-
-source include/percona_query_response_time_flush.inc;
-source include/percona_query_response_time_show.inc;
-
-SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1;
-source include/percona_query_response_time_sleep.inc;
-SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
-
-source include/percona_query_response_time_show.inc;
-
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10;
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-
-source include/percona_query_response_time_flush.inc;
-SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1;
-source include/percona_query_response_time_sleep.inc;
-SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
-
-source include/percona_query_response_time_show.inc;
-
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 7;
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-
-source include/percona_query_response_time_flush.inc;
-SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1;
-source include/percona_query_response_time_sleep.inc;
-SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
-
-source include/percona_query_response_time_show.inc;
-
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 156;
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-
-source include/percona_query_response_time_flush.inc;
-SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1;
-source include/percona_query_response_time_sleep.inc;
-SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
-
-source include/percona_query_response_time_show.inc;
-
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1000;
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-
-source include/percona_query_response_time_flush.inc;
-SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1;
-source include/percona_query_response_time_sleep.inc;
-SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
-
-source include/percona_query_response_time_show.inc;
-
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1001;
-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
-
-SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE  =10;

=== modified file 'mysql-test/suite/percona/percona_server_variables.result'
--- a/mysql-test/suite/percona/percona_server_variables.result	2010-10-19 10:27:31 +0000
+++ b/mysql-test/suite/percona/percona_server_variables.result	2010-11-24 12:04:12 +0000
@@ -36,12 +36,10 @@ delayed_insert_limit	Value
 delayed_insert_timeout	Value
 delayed_queue_size	Value
 div_precision_increment	Value
-enable_query_response_time_stats	Value
 engine_condition_pushdown	Value
 error_count	Value
 event_scheduler	Value
 expire_logs_days	Value
-fast_index_creation	Value
 flush	Value
 flush_time	Value
 foreign_key_checks	Value
@@ -80,8 +78,6 @@ innodb_additional_mem_pool_size	Value
 innodb_auto_lru_dump	Value
 innodb_autoextend_increment	Value
 innodb_autoinc_lock_mode	Value
-innodb_buffer_pool_shm_checksum	Value
-innodb_buffer_pool_shm_key	Value
 innodb_buffer_pool_size	Value
 innodb_change_buffering	Value
 innodb_checkpoint_age_target	Value
@@ -250,7 +246,6 @@ query_cache_strip_comments	Value
 query_cache_type	Value
 query_cache_wlock_invalidate	Value
 query_prealloc_size	Value
-query_response_time_range_base	Value
 rand_seed1	Value
 rand_seed2	Value
 range_alloc_block_size	Value

=== removed file 'mysql-test/suite/percona/percona_slave_innodb_stats-master.opt'
--- a/mysql-test/suite/percona/percona_slave_innodb_stats-master.opt	2010-09-03 15:41:57 +0000
+++ b/mysql-test/suite/percona/percona_slave_innodb_stats-master.opt	1970-01-01 00:00:00 +0000
@@ -1 +0,0 @@
---long_query_time=0 --log_slow_verbosity=innodb --log_slow_slave_statements

=== removed file 'mysql-test/suite/percona/percona_slave_innodb_stats-slave.opt'
--- a/mysql-test/suite/percona/percona_slave_innodb_stats-slave.opt	2010-09-03 15:41:57 +0000
+++ b/mysql-test/suite/percona/percona_slave_innodb_stats-slave.opt	1970-01-01 00:00:00 +0000
@@ -1 +0,0 @@
---long_query_time=0 --log_slow_verbosity=innodb --log_slow_slave_statements

=== removed file 'mysql-test/suite/percona/percona_slave_innodb_stats.result'
--- a/mysql-test/suite/percona/percona_slave_innodb_stats.result	2010-09-03 15:41:57 +0000
+++ b/mysql-test/suite/percona/percona_slave_innodb_stats.result	1970-01-01 00:00:00 +0000
@@ -1,21 +0,0 @@
-stop slave;
-drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
-reset master;
-reset slave;
-drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
-start slave;
-DROP TABLE IF EXISTS t;
-CREATE TABLE t(id INT,data CHAR(30)) ENGINE=InnoDB;
-INSERT INTO t VALUES
-(1,"aaaaabbbbbcccccdddddeeeeefffff"),
-(2,"aaaaabbbbbcccccdddddeeeeefffff"),
-(3,"aaaaabbbbbcccccdddddeeeeefffff"),
-(4,"aaaaabbbbbcccccdddddeeeeefffff"),
-(5,"aaaaabbbbbcccccdddddeeeeefffff");
-INSERT INTO t SELECT t2.id,t2.data from t as t1, t as t2;
-INSERT INTO t SELECT t2.id,t2.data from t as t1, t as t2;
-STOP SLAVE;
-START SLAVE;
-INSERT INTO t SELECT t.id,t.data from t;
-DROP TABLE IF EXISTS t;
-4

=== removed file 'mysql-test/suite/percona/percona_slave_innodb_stats.test'
--- a/mysql-test/suite/percona/percona_slave_innodb_stats.test	2010-09-03 15:41:57 +0000
+++ b/mysql-test/suite/percona/percona_slave_innodb_stats.test	1970-01-01 00:00:00 +0000
@@ -1,43 +0,0 @@
-source include/have_innodb.inc;
-source include/master-slave.inc;
-
-connection master;
--- disable_warnings
-DROP TABLE IF EXISTS t;
--- enable_warnings
-CREATE TABLE t(id INT,data CHAR(30)) ENGINE=InnoDB;
-INSERT INTO t VALUES
-(1,"aaaaabbbbbcccccdddddeeeeefffff"),
-(2,"aaaaabbbbbcccccdddddeeeeefffff"),
-(3,"aaaaabbbbbcccccdddddeeeeefffff"),
-(4,"aaaaabbbbbcccccdddddeeeeefffff"),
-(5,"aaaaabbbbbcccccdddddeeeeefffff");
-INSERT INTO t SELECT t2.id,t2.data from t as t1, t as t2;
-INSERT INTO t SELECT t2.id,t2.data from t as t1, t as t2;
-sync_slave_with_master;
-
-connection slave;
-STOP SLAVE;
--- source include/wait_for_slave_to_stop.inc
---write_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
-wait
-EOF
---shutdown_server 10
---source include/wait_until_disconnected.inc
---append_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
-restart
-EOF
---enable_reconnect
---source include/wait_until_connected_again.inc
-START SLAVE;
--- source include/wait_for_slave_to_start.inc
-
-connection master;
-INSERT INTO t SELECT t.id,t.data from t;
-sync_slave_with_master;
-
-connection master;
-DROP TABLE IF EXISTS t;
-sync_slave_with_master;
-
-exec cat var/mysqld.2/mysqld-slow.log | grep InnoDB_IO_r_ops | wc -l;

=== removed file 'mysql-test/suite/percona/percona_slow_query_log-control_global_slow-master.opt'
--- a/mysql-test/suite/percona/percona_slow_query_log-control_global_slow-master.opt	2010-08-03 10:54:05 +0000
+++ b/mysql-test/suite/percona/percona_slow_query_log-control_global_slow-master.opt	1970-01-01 00:00:00 +0000
@@ -1 +0,0 @@
---slow-query-log-file=percona_slow_query_log-control_global_slow.log --long-query-time=1
\ No newline at end of file

=== removed file 'mysql-test/suite/percona/percona_slow_query_log-control_global_slow.result'
--- a/mysql-test/suite/percona/percona_slow_query_log-control_global_slow.result	2010-08-05 09:28:19 +0000
+++ b/mysql-test/suite/percona/percona_slow_query_log-control_global_slow.result	1970-01-01 00:00:00 +0000
@@ -1,12 +0,0 @@
-SELECT sleep(2);
-sleep(2)
-0
-set global log_slow_verbosity=innodb;
-set global use_global_log_slow_control="log_slow_verbosity,long_query_time";
-SELECT sleep(2);
-sleep(2)
-0
-set global use_global_log_slow_control=none;
-set global log_slow_verbosity=microtime;
-cat MYSQLD_DATADIR/percona_slow_query_log-control_global_slow.log | grep -c "No InnoDB statistics available for this query"
-1

=== removed file 'mysql-test/suite/percona/percona_slow_query_log-control_global_slow.test'
--- a/mysql-test/suite/percona/percona_slow_query_log-control_global_slow.test	2010-08-07 14:42:30 +0000
+++ b/mysql-test/suite/percona/percona_slow_query_log-control_global_slow.test	1970-01-01 00:00:00 +0000
@@ -1,14 +0,0 @@
---source include/not_windows.inc
-
-source include/have_innodb.inc;
-SELECT sleep(2);
-set global log_slow_verbosity=innodb;
-set global use_global_log_slow_control="log_slow_verbosity,long_query_time";
-SELECT sleep(2);
-set global use_global_log_slow_control=none;
-set global log_slow_verbosity=microtime;
-let $MYSQLD_DATADIR= `select @@datadir`;
-let $cmd = cat $MYSQLD_DATADIR/percona_slow_query_log-control_global_slow.log | grep -c "No InnoDB statistics available for this query";
---replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
-exec echo '$cmd';
-exec $cmd;

=== removed file 'mysql-test/suite/percona/percona_slow_query_log-log_slow_filter-master.opt'
--- a/mysql-test/suite/percona/percona_slow_query_log-log_slow_filter-master.opt	2010-08-03 10:54:05 +0000
+++ b/mysql-test/suite/percona/percona_slow_query_log-log_slow_filter-master.opt	1970-01-01 00:00:00 +0000
@@ -1 +0,0 @@
---slow-query-log-file=percona_slow_query_log-log_slow_filter.log --long-query-time=1
\ No newline at end of file

=== removed file 'mysql-test/suite/percona/percona_slow_query_log-log_slow_filter.result'
--- a/mysql-test/suite/percona/percona_slow_query_log-log_slow_filter.result	2010-08-05 09:28:19 +0000
+++ b/mysql-test/suite/percona/percona_slow_query_log-log_slow_filter.result	1970-01-01 00:00:00 +0000
@@ -1,25 +0,0 @@
-SET GLOBAL SLOW_QUERY_LOG=OFF;
-drop table if exists t;
-# Create test table
-create table t(id INT PRIMARY KEY) engine=InnoDB;
-# Insert two rows to test table
-insert into t values(1);
-insert into t values(2);
-insert into t values(3);
-SET GLOBAL SLOW_QUERY_LOG=ON;
-SELECT sleep(2);
-sleep(2)
-0
-set log_slow_filter=full_join;
-SELECT sleep(2) union select t2.id from t as t1,t as t2;
-sleep(2)
-0
-1
-2
-3
-SELECT sleep(2);
-sleep(2)
-0
-drop table if exists t;
-cat MYSQLD_DATADIR/percona_slow_query_log-log_slow_filter.log | grep -c Query_time
-2

=== removed file 'mysql-test/suite/percona/percona_slow_query_log-log_slow_filter.test'
--- a/mysql-test/suite/percona/percona_slow_query_log-log_slow_filter.test	2010-08-07 14:42:30 +0000
+++ b/mysql-test/suite/percona/percona_slow_query_log-log_slow_filter.test	1970-01-01 00:00:00 +0000
@@ -1,35 +0,0 @@
--- source include/not_windows.inc
-
-source include/have_innodb.inc;
-
-SET GLOBAL SLOW_QUERY_LOG=OFF;
-
---disable_warnings
-drop table if exists t;
---enable_warnings
-
---echo # Create test table
-create table t(id INT PRIMARY KEY) engine=InnoDB;
---echo # Insert two rows to test table
-insert into t values(1);
-insert into t values(2);
-insert into t values(3);
-
-SET GLOBAL SLOW_QUERY_LOG=ON;
-
-SELECT sleep(2);
-
-set log_slow_filter=full_join;
-
-SELECT sleep(2) union select t2.id from t as t1,t as t2;
-SELECT sleep(2);
-
---disable_warnings
-drop table if exists t;
---enable_warnings
-
-let $MYSQLD_DATADIR= `select @@datadir`;
-let $cmd = cat $MYSQLD_DATADIR/percona_slow_query_log-log_slow_filter.log | grep -c Query_time;
---replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
-exec echo '$cmd';
-exec $cmd;

=== removed file 'mysql-test/suite/percona/percona_slow_query_log-log_slow_verbosity-master.opt'
--- a/mysql-test/suite/percona/percona_slow_query_log-log_slow_verbosity-master.opt	2010-08-03 10:54:05 +0000
+++ b/mysql-test/suite/percona/percona_slow_query_log-log_slow_verbosity-master.opt	1970-01-01 00:00:00 +0000
@@ -1 +0,0 @@
---slow-query-log-file=percona_slow_query_log-log_slow_verbosity.log --long-query-time=1
\ No newline at end of file

=== removed file 'mysql-test/suite/percona/percona_slow_query_log-log_slow_verbosity.result'
--- a/mysql-test/suite/percona/percona_slow_query_log-log_slow_verbosity.result	2010-08-05 09:28:19 +0000
+++ b/mysql-test/suite/percona/percona_slow_query_log-log_slow_verbosity.result	1970-01-01 00:00:00 +0000
@@ -1,9 +0,0 @@
-SELECT sleep(2);
-sleep(2)
-0
-set log_slow_verbosity=innodb;
-SELECT sleep(2);
-sleep(2)
-0
-cat MYSQLD_DATADIR/percona_slow_query_log-log_slow_verbosity.log | grep -c "No InnoDB statistics available for this query"
-1

=== removed file 'mysql-test/suite/percona/percona_slow_query_log-log_slow_verbosity.test'
--- a/mysql-test/suite/percona/percona_slow_query_log-log_slow_verbosity.test	2010-08-07 14:42:30 +0000
+++ b/mysql-test/suite/percona/percona_slow_query_log-log_slow_verbosity.test	1970-01-01 00:00:00 +0000
@@ -1,15 +0,0 @@
--- source include/not_windows.inc
-
-source include/have_innodb.inc;
-
-SELECT sleep(2);
-
-set log_slow_verbosity=innodb;
-
-SELECT sleep(2);
-
-let $MYSQLD_DATADIR= `select @@datadir`;
-let $cmd = cat $MYSQLD_DATADIR/percona_slow_query_log-log_slow_verbosity.log | grep -c "No InnoDB statistics available for this query";
---replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
-exec echo '$cmd';
-exec $cmd;

=== removed file 'mysql-test/suite/percona/percona_slow_query_log-long_query_time-master.opt'
--- a/mysql-test/suite/percona/percona_slow_query_log-long_query_time-master.opt	2010-08-06 07:46:51 +0000
+++ b/mysql-test/suite/percona/percona_slow_query_log-long_query_time-master.opt	1970-01-01 00:00:00 +0000
@@ -1 +0,0 @@
---slow-query-log-file=percona_slow_query_log-long_query_time.log --long-query-time=3

=== removed file 'mysql-test/suite/percona/percona_slow_query_log-long_query_time.result'
--- a/mysql-test/suite/percona/percona_slow_query_log-long_query_time.result	2010-08-06 07:46:51 +0000
+++ b/mysql-test/suite/percona/percona_slow_query_log-long_query_time.result	1970-01-01 00:00:00 +0000
@@ -1,21 +0,0 @@
-SELECT sleep(1);
-sleep(1)
-0
-SELECT sleep(6);
-sleep(6)
-0
-SELECT sleep(10);
-sleep(10)
-0
-set long_query_time=8;
-SELECT sleep(1);
-sleep(1)
-0
-SELECT sleep(6);
-sleep(6)
-0
-SELECT sleep(12);
-sleep(12)
-0
-cat MYSQLD_DATADIR/percona_slow_query_log-long_query_time.log | grep -c Query_time
-3

=== removed file 'mysql-test/suite/percona/percona_slow_query_log-long_query_time.test'
--- a/mysql-test/suite/percona/percona_slow_query_log-long_query_time.test	2010-08-07 14:42:30 +0000
+++ b/mysql-test/suite/percona/percona_slow_query_log-long_query_time.test	1970-01-01 00:00:00 +0000
@@ -1,18 +0,0 @@
-source include/not_windows.inc;
-source include/have_innodb.inc;
-
-SELECT sleep(1);
-SELECT sleep(6);
-SELECT sleep(10);
-
-set long_query_time=8;
-
-SELECT sleep(1);
-SELECT sleep(6);
-SELECT sleep(12);
-
-let $MYSQLD_DATADIR= `select @@datadir`;
-let $cmd = cat $MYSQLD_DATADIR/percona_slow_query_log-long_query_time.log | grep -c Query_time;
---replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
-exec echo '$cmd';
-exec $cmd;

=== removed file 'mysql-test/suite/percona/percona_slow_query_log-microseconds_in_slow_query_log-master.opt'
--- a/mysql-test/suite/percona/percona_slow_query_log-microseconds_in_slow_query_log-master.opt	2010-08-03 10:54:05 +0000
+++ b/mysql-test/suite/percona/percona_slow_query_log-microseconds_in_slow_query_log-master.opt	1970-01-01 00:00:00 +0000
@@ -1 +0,0 @@
---slow-query-log-file=percona_slow_query_log-microseconds_in_slow_query_log.log --long-query-time=1
\ No newline at end of file

=== removed file 'mysql-test/suite/percona/percona_slow_query_log-microseconds_in_slow_query_log.result'
--- a/mysql-test/suite/percona/percona_slow_query_log-microseconds_in_slow_query_log.result	2010-08-05 09:28:19 +0000
+++ b/mysql-test/suite/percona/percona_slow_query_log-microseconds_in_slow_query_log.result	1970-01-01 00:00:00 +0000
@@ -1,12 +0,0 @@
-SELECT sleep(2);
-sleep(2)
-0
-set global slow_query_log_microseconds_timestamp=ON;
-SELECT sleep(2);
-sleep(2)
-0
-set global slow_query_log_microseconds_timestamp=OFF;
-cat MYSQLD_DATADIR/percona_slow_query_log-microseconds_in_slow_query_log.log | grep -E -c '# Time: [0-9]+[ ]+[0-9]+:[0-\9]+:[0-9]+.[0-9]+'
-1
-cat MYSQLD_DATADIR/percona_slow_query_log-microseconds_in_slow_query_log.log | grep -E -c '# Time: [0-9]+[ ]+[0-9]+:[0-\9]+:[0-9]+'
-2

=== removed file 'mysql-test/suite/percona/percona_slow_query_log-microseconds_in_slow_query_log.test'
--- a/mysql-test/suite/percona/percona_slow_query_log-microseconds_in_slow_query_log.test	2010-08-07 14:42:30 +0000
+++ b/mysql-test/suite/percona/percona_slow_query_log-microseconds_in_slow_query_log.test	1970-01-01 00:00:00 +0000
@@ -1,21 +0,0 @@
-source include/not_windows.inc;
-source include/have_innodb.inc;
-
-SELECT sleep(2);
-
-set global slow_query_log_microseconds_timestamp=ON;
-
-SELECT sleep(2);
-
-set global slow_query_log_microseconds_timestamp=OFF;
-
-let $MYSQLD_DATADIR= `select @@datadir`;
-let $cmd = cat $MYSQLD_DATADIR/percona_slow_query_log-microseconds_in_slow_query_log.log | grep -E -c '# Time: [0-9]+[ ]+[0-9]+:[0-\9]+:[0-9]+.[0-9]+';
---replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
-exec echo "$cmd";
-exec $cmd;
-
-let $cmd = cat $MYSQLD_DATADIR/percona_slow_query_log-microseconds_in_slow_query_log.log | grep -E -c '# Time: [0-9]+[ ]+[0-9]+:[0-\9]+:[0-9]+';
---replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
-exec echo "$cmd";
-exec $cmd;

=== removed file 'mysql-test/suite/percona/percona_slow_query_log-min_examined_row_limit-master.opt'
--- a/mysql-test/suite/percona/percona_slow_query_log-min_examined_row_limit-master.opt	2010-08-03 10:54:05 +0000
+++ b/mysql-test/suite/percona/percona_slow_query_log-min_examined_row_limit-master.opt	1970-01-01 00:00:00 +0000
@@ -1 +0,0 @@
---slow-query-log-file=percona_slow_query_log-min_examined_row_limit.log --long-query-time=1
\ No newline at end of file

=== removed file 'mysql-test/suite/percona/percona_slow_query_log-min_examined_row_limit.result'
--- a/mysql-test/suite/percona/percona_slow_query_log-min_examined_row_limit.result	2010-08-05 09:28:19 +0000
+++ b/mysql-test/suite/percona/percona_slow_query_log-min_examined_row_limit.result	1970-01-01 00:00:00 +0000
@@ -1,25 +0,0 @@
-SET GLOBAL SLOW_QUERY_LOG=OFF;
-drop table if exists t;
-# Create test table
-create table t(id INT PRIMARY KEY) engine=InnoDB;
-# Insert two rows to test table
-insert into t values(1);
-insert into t values(2);
-insert into t values(3);
-SET GLOBAL SLOW_QUERY_LOG=ON;
-SELECT sleep(2);
-sleep(2)
-0
-set min_examined_row_limit=5;
-SELECT sleep(2) union select t2.id from t as t1,t as t2;
-sleep(2)
-0
-1
-2
-3
-SELECT sleep(2);
-sleep(2)
-0
-drop table if exists t;
-cat MYSQLD_DATADIR/percona_slow_query_log-min_examined_row_limit.log | grep -c Query_time
-2

=== removed file 'mysql-test/suite/percona/percona_slow_query_log-min_examined_row_limit.test'
--- a/mysql-test/suite/percona/percona_slow_query_log-min_examined_row_limit.test	2010-08-07 14:42:30 +0000
+++ b/mysql-test/suite/percona/percona_slow_query_log-min_examined_row_limit.test	1970-01-01 00:00:00 +0000
@@ -1,34 +0,0 @@
-source include/not_windows.inc;
-source include/have_innodb.inc;
-
-SET GLOBAL SLOW_QUERY_LOG=OFF;
-
---disable_warnings
-drop table if exists t;
---enable_warnings
-
---echo # Create test table
-create table t(id INT PRIMARY KEY) engine=InnoDB;
---echo # Insert two rows to test table
-insert into t values(1);
-insert into t values(2);
-insert into t values(3);
-
-SET GLOBAL SLOW_QUERY_LOG=ON;
-
-SELECT sleep(2);
-
-set min_examined_row_limit=5;
-
-SELECT sleep(2) union select t2.id from t as t1,t as t2;
-SELECT sleep(2);
-
---disable_warnings
-drop table if exists t;
---enable_warnings
-
-let $MYSQLD_DATADIR= `select @@datadir`;
-let $cmd = cat $MYSQLD_DATADIR/percona_slow_query_log-min_examined_row_limit.log | grep -c Query_time;
---replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
-exec echo '$cmd';
-exec $cmd;

=== removed file 'mysql-test/suite/percona/percona_slow_query_log-use_global_long_query_time-master.opt'
--- a/mysql-test/suite/percona/percona_slow_query_log-use_global_long_query_time-master.opt	2010-08-03 10:54:05 +0000
+++ b/mysql-test/suite/percona/percona_slow_query_log-use_global_long_query_time-master.opt	1970-01-01 00:00:00 +0000
@@ -1 +0,0 @@
---slow-query-log-file=percona_slow_query_log-use_global_long_query_time.log --long-query-time=2
\ No newline at end of file

=== removed file 'mysql-test/suite/percona/percona_slow_query_log-use_global_long_query_time.result'
--- a/mysql-test/suite/percona/percona_slow_query_log-use_global_long_query_time.result	2010-09-03 17:42:54 +0000
+++ b/mysql-test/suite/percona/percona_slow_query_log-use_global_long_query_time.result	1970-01-01 00:00:00 +0000
@@ -1,59 +0,0 @@
-SELECT sleep(1);
-sleep(1)
-0
-SELECT sleep(3);
-sleep(3)
-0
-SELECT sleep(5);
-sleep(5)
-0
-set global long_query_time=4;
-set global use_global_long_query_time=1;
-SELECT sleep(1);
-sleep(1)
-0
-SELECT sleep(3);
-sleep(3)
-0
-SELECT sleep(5);
-sleep(5)
-0
-set global long_query_time=2;
-set global use_global_long_query_time=0;
-cat MYSQLD_DATADIR/percona_slow_query_log-use_global_long_query_time.log | grep -c Query_time
-3
-show global variables like 'use_global_log_slow_control';
-Variable_name	Value
-use_global_log_slow_control	none
-show global variables like 'use_global_long_query_time';
-Variable_name	Value
-use_global_long_query_time	OFF
-set global use_global_log_slow_control = long_query_time;
-show global variables like 'use_global_log_slow_control';
-Variable_name	Value
-use_global_log_slow_control	long_query_time
-show global variables like 'use_global_long_query_time';
-Variable_name	Value
-use_global_long_query_time	ON
-set global use_global_log_slow_control = log_slow_filter;
-show global variables like 'use_global_log_slow_control';
-Variable_name	Value
-use_global_log_slow_control	log_slow_filter
-show global variables like 'use_global_long_query_time';
-Variable_name	Value
-use_global_long_query_time	OFF
-set global use_global_long_query_time = ON;
-show global variables like 'use_global_log_slow_control';
-Variable_name	Value
-use_global_log_slow_control	log_slow_filter,long_query_time
-show global variables like 'use_global_long_query_time';
-Variable_name	Value
-use_global_long_query_time	ON
-set global use_global_long_query_time = OFF;
-show global variables like 'use_global_log_slow_control';
-Variable_name	Value
-use_global_log_slow_control	log_slow_filter
-show global variables like 'use_global_long_query_time';
-Variable_name	Value
-use_global_long_query_time	OFF
-set global use_global_log_slow_control = none;

=== removed file 'mysql-test/suite/percona/percona_slow_query_log-use_global_long_query_time.test'
--- a/mysql-test/suite/percona/percona_slow_query_log-use_global_long_query_time.test	2010-09-03 17:42:54 +0000
+++ b/mysql-test/suite/percona/percona_slow_query_log-use_global_long_query_time.test	1970-01-01 00:00:00 +0000
@@ -1,43 +0,0 @@
-source include/not_windows.inc;
-source include/have_innodb.inc;
-
-SELECT sleep(1);
-SELECT sleep(3);
-SELECT sleep(5);
-
-set global long_query_time=4;
-set global use_global_long_query_time=1;
-
-SELECT sleep(1);
-SELECT sleep(3);
-SELECT sleep(5);
-
-set global long_query_time=2;
-set global use_global_long_query_time=0;
-
-let $MYSQLD_DATADIR= `select @@datadir`;
-let $cmd = cat $MYSQLD_DATADIR/percona_slow_query_log-use_global_long_query_time.log | grep -c Query_time;
---replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
-exec echo '$cmd';
-exec $cmd;
-
-show global variables like 'use_global_log_slow_control';
-show global variables like 'use_global_long_query_time';
-
-set global use_global_log_slow_control = long_query_time;
-show global variables like 'use_global_log_slow_control';
-show global variables like 'use_global_long_query_time';
-
-set global use_global_log_slow_control = log_slow_filter;
-show global variables like 'use_global_log_slow_control';
-show global variables like 'use_global_long_query_time';
-
-set global use_global_long_query_time = ON;
-show global variables like 'use_global_log_slow_control';
-show global variables like 'use_global_long_query_time';
-
-set global use_global_long_query_time = OFF;
-show global variables like 'use_global_log_slow_control';
-show global variables like 'use_global_long_query_time';
-
-set global use_global_log_slow_control = none;

=== removed file 'mysql-test/suite/percona/percona_sql_no_fcache.result'
--- a/mysql-test/suite/percona/percona_sql_no_fcache.result	2010-09-03 15:41:57 +0000
+++ b/mysql-test/suite/percona/percona_sql_no_fcache.result	1970-01-01 00:00:00 +0000
@@ -1,12 +0,0 @@
-drop table if exists t1;
-create table t (a int not null);
-insert into t values (1),(2),(3);
-SELECT SQL_NO_FCACHE SLEEP(0);
-SLEEP(0)
-0
-SELECT /*!40001 SQL_NO_CACHE */ /*!50084 SQL_NO_FCACHE */ * FROM t;
-a
-1
-2
-3
-DROP TABLE t;

=== removed file 'mysql-test/suite/percona/percona_sql_no_fcache.test'
--- a/mysql-test/suite/percona/percona_sql_no_fcache.test	2010-09-03 15:41:57 +0000
+++ b/mysql-test/suite/percona/percona_sql_no_fcache.test	1970-01-01 00:00:00 +0000
@@ -1,11 +0,0 @@
---disable_warnings
-drop table if exists t1;
---enable_warnings
-
-create table t (a int not null);
-insert into t values (1),(2),(3);
-
-SELECT SQL_NO_FCACHE SLEEP(0);
-SELECT /*!40001 SQL_NO_CACHE */ /*!50084 SQL_NO_FCACHE */ * FROM t;
-
-DROP TABLE t;
\ No newline at end of file

=== removed file 'mysql-test/suite/percona/percona_status_wait_query_cache_mutex.result'
--- a/mysql-test/suite/percona/percona_status_wait_query_cache_mutex.result	2010-09-03 15:41:57 +0000
+++ b/mysql-test/suite/percona/percona_status_wait_query_cache_mutex.result	1970-01-01 00:00:00 +0000
@@ -1,27 +0,0 @@
-set GLOBAL query_cache_size=1355776;
-flush query cache;
-flush query cache;
-reset query cache;
-flush status;
-DROP TABLE IF EXISTS t;
-CREATE TABLE t(id INT, number INT);
-INSERT INTO t VALUES (0,1);
-INSERT INTO t VALUES (1,2);
-INSERT INTO t VALUES (2,3);
-SELECT number from t where id > 0;
-number
-2
-3
-SET SESSION debug="+d,status_wait_query_cache_mutex_sleep";
-SELECT number from t where id > 0;
-SET SESSION debug="+d,status_wait_query_cache_mutex_sleep";
-SELECT number from t where id > 0;
-SET SESSION debug="+d,status_wait_query_cache_mutex_sleep";
-SHOW PROCESSLIST;
-Id	User	Host	db	Command	Time	State	Info
-Id	root	localhost	test	Sleep	Time		NULL
-Id	root	localhost	test	Query	Time	Waiting on query cache mutex	SELECT number from t where id > 0
-Id	root	localhost	test	Query	Time	Waiting on query cache mutex	SELECT number from t where id > 0
-Id	root	localhost	test	Query	Time	NULL	SHOW PROCESSLIST
-DROP TABLE t;
-set GLOBAL query_cache_size=0;

=== removed file 'mysql-test/suite/percona/percona_status_wait_query_cache_mutex.test'
--- a/mysql-test/suite/percona/percona_status_wait_query_cache_mutex.test	2010-09-03 15:41:57 +0000
+++ b/mysql-test/suite/percona/percona_status_wait_query_cache_mutex.test	1970-01-01 00:00:00 +0000
@@ -1,37 +0,0 @@
---source include/have_query_cache.inc
---source include/have_debug.inc
-set GLOBAL query_cache_size=1355776;
---source include/percona_query_cache_with_comments_clear.inc
-
--- disable_warnings
-DROP TABLE IF EXISTS t;
--- enable_warnings
-CREATE TABLE t(id INT, number INT);
-INSERT INTO t VALUES (0,1);
-INSERT INTO t VALUES (1,2);
-INSERT INTO t VALUES (2,3);
-SELECT number from t where id > 0;
---connect (conn0,localhost,root,,)
---connect (conn1,localhost,root,,)
---connect (conn2,localhost,root,,)
-
---connection conn0
---error 0, ER_UNKNOWN_SYSTEM_VARIABLE
-SET SESSION debug="+d,status_wait_query_cache_mutex_sleep";
-SEND SELECT number from t where id > 0;
-SLEEP 1.0;
-
---connection conn1
---error 0, ER_UNKNOWN_SYSTEM_VARIABLE
-SET SESSION debug="+d,status_wait_query_cache_mutex_sleep";
-SEND SELECT number from t where id > 0;
-SLEEP 1.0;
-
---connection conn2
---error 0, ER_UNKNOWN_SYSTEM_VARIABLE
-SET SESSION debug="+d,status_wait_query_cache_mutex_sleep";
---replace_column 1 Id 6 Time
-SHOW PROCESSLIST;
-
-DROP TABLE t;
-set GLOBAL query_cache_size=0;
\ No newline at end of file

=== added directory 'mysql-test/suite/percona/query_cache_enhance.patch'
=== added file 'mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments.inc'
--- a/mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments.inc	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments.inc	2010-11-24 12:04:12 +0000
@@ -0,0 +1,95 @@
+--source include/percona_query_cache_with_comments_clear.inc
+let $query=/* with comment first */select * from t1;
+eval $query;
+--source include/percona_query_cache_with_comments_eval.inc
+
+let $query=# with comment first
+select * from t1;
+--source include/percona_query_cache_with_comments_eval.inc
+
+let $query=-- with comment first
+select * from t1;
+--source include/percona_query_cache_with_comments_eval.inc
+
+let $query=/* with comment first and "quote" */select * from t1;
+--source include/percona_query_cache_with_comments_eval.inc
+
+let $query=# with comment first and "quote"
+select * from t1;
+--source include/percona_query_cache_with_comments_eval.inc
+
+let $query=-- with comment first and "quote" 
+select * from t1;
+--source include/percona_query_cache_with_comments_eval.inc
+
+let $query=
+    /* with comment and whitespaces first */select * from t1;
+--source include/percona_query_cache_with_comments_eval.inc
+
+let $query= 
+    # with comment and whitespaces first
+select * from t1;
+--source include/percona_query_cache_with_comments_eval.inc
+
+let $query=
+    -- with comment and whitespaces first
+select * from t1;
+--source include/percona_query_cache_with_comments_eval.inc
+
+let $internal=* internal comment *;
+
+let $query=select * /$internal/ from t1;
+--source include/percona_query_cache_with_comments_eval.inc
+let $query=select */$internal/ from t1;
+--source include/percona_query_cache_with_comments_eval.inc
+let $query=select */$internal/from t1;
+--source include/percona_query_cache_with_comments_eval.inc
+
+let $internal=* internal comment with "quote" *;
+
+let $query=select * /$internal/ from t1;
+--source include/percona_query_cache_with_comments_eval.inc
+let $query=select */$internal/ from t1;
+--source include/percona_query_cache_with_comments_eval.inc
+let $query=select */$internal/from t1;
+--source include/percona_query_cache_with_comments_eval.inc
+
+let $query=select * from t1
+;
+--source include/percona_query_cache_with_comments_eval.inc
+
+let $query=select * from t1 ;
+--source include/percona_query_cache_with_comments_eval.inc
+
+let $query=select * from t1	;
+--source include/percona_query_cache_with_comments_eval.inc
+
+let $query=select * from t1
+/* comment in the end */;
+--source include/percona_query_cache_with_comments_eval.inc
+
+let $query=select * from t1
+/* *\/ */;
+--source include/percona_query_cache_with_comments_eval.inc
+
+let $query=select * from t1
+/* comment in the end */
+;
+--source include/percona_query_cache_with_comments_eval.inc
+
+let $query=select * from t1 #comment in the end;
+--source include/percona_query_cache_with_comments_eval.inc
+
+let $query=select * from t1 #comment in the end
+;
+--source include/percona_query_cache_with_comments_eval.inc
+
+let $query=select * from t1 -- comment in the end;
+--source include/percona_query_cache_with_comments_eval.inc
+
+let $query=select * from t1 -- comment in the end
+;
+--source include/percona_query_cache_with_comments_eval.inc
+
+let $query=select ' \'  ' from t1;
+--source include/percona_query_cache_with_comments_eval.inc

=== added file 'mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments.inc.backup'
--- a/mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments.inc.backup	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments.inc.backup	2010-11-24 12:04:12 +0000
@@ -0,0 +1,88 @@
+--source include/percona_query_cache_with_comments_clear.inc
+let $query=/* with comment first */select * from t1;
+eval $query;
+--source include/percona_query_cache_with_comments_eval.inc
+
+let $query=# with comment first
+select * from t1;
+--source include/percona_query_cache_with_comments_eval.inc
+
+let $query=-- with comment first
+select * from t1;
+--source include/percona_query_cache_with_comments_eval.inc
+
+let $query=/* with comment first and "quote" */select * from t1;
+--source include/percona_query_cache_with_comments_eval.inc
+
+let $query=# with comment first and "quote"
+select * from t1;
+--source include/percona_query_cache_with_comments_eval.inc
+
+let $query=-- with comment first and "quote" 
+select * from t1;
+--source include/percona_query_cache_with_comments_eval.inc
+
+let $query=
+    /* with comment and whitespaces first */select * from t1;
+--source include/percona_query_cache_with_comments_eval.inc
+
+let $query= 
+    # with comment and whitespaces first
+select * from t1;
+--source include/percona_query_cache_with_comments_eval.inc
+
+let $query=
+    -- with comment and whitespaces first
+select * from t1;
+--source include/percona_query_cache_with_comments_eval.inc
+
+let $internal=* internal comment *;
+
+let $query=select * /$internal/ from t1;
+--source include/percona_query_cache_with_comments_eval.inc
+let $query=select */$internal/ from t1;
+--source include/percona_query_cache_with_comments_eval.inc
+let $query=select */$internal/from t1;
+--source include/percona_query_cache_with_comments_eval.inc
+
+let $internal=* internal comment with "quote" *;
+
+let $query=select * /$internal/ from t1;
+--source include/percona_query_cache_with_comments_eval.inc
+let $query=select */$internal/ from t1;
+--source include/percona_query_cache_with_comments_eval.inc
+let $query=select */$internal/from t1;
+--source include/percona_query_cache_with_comments_eval.inc
+
+let $query=select * from t1
+;
+--source include/percona_query_cache_with_comments_eval.inc
+
+let $query=select * from t1 ;
+--source include/percona_query_cache_with_comments_eval.inc
+
+let $query=select * from t1	;
+--source include/percona_query_cache_with_comments_eval.inc
+
+let $query=select * from t1
+/* comment in the end */;
+--source include/percona_query_cache_with_comments_eval.inc
+
+let $query=select * from t1
+/* comment in the end */
+;
+--source include/percona_query_cache_with_comments_eval.inc
+
+let $query=select * from t1 #comment in the end;
+--source include/percona_query_cache_with_comments_eval.inc
+
+let $query=select * from t1 #comment in the end
+;
+--source include/percona_query_cache_with_comments_eval.inc
+
+let $query=select * from t1 -- comment in the end;
+--source include/percona_query_cache_with_comments_eval.inc
+
+let $query=select * from t1 -- comment in the end
+;
+--source include/percona_query_cache_with_comments_eval.inc

=== added file 'mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments.result'
--- a/mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments.result	2010-11-24 12:04:12 +0000
@@ -0,0 +1,866 @@
+set global query_cache_strip_comments=ON;
+set GLOBAL query_cache_size=1355776;
+drop table if exists t1;
+create table t1 (a int not null);
+insert into t1 values (1),(2),(3);
+flush query cache;
+flush query cache;
+reset query cache;
+flush status;
+flush query cache;
+flush query cache;
+reset query cache;
+flush status;
+/* with comment first */select * from t1;
+a
+1
+2
+3
+-----------------------------------------------------
+/* with comment first */select * from t1
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	0
+/* with comment first */select * from t1;
+a
+1
+2
+3
+/* with comment first */select * from t1;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	2
+-----------------------------------------------------
+# with comment first
+select * from t1
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	2
+# with comment first
+select * from t1;
+a
+1
+2
+3
+# with comment first
+select * from t1;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	4
+-----------------------------------------------------
+-- with comment first
+select * from t1
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	4
+-- with comment first
+select * from t1;
+a
+1
+2
+3
+-- with comment first
+select * from t1;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	6
+-----------------------------------------------------
+/* with comment first and "quote" */select * from t1
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	6
+/* with comment first and "quote" */select * from t1;
+a
+1
+2
+3
+/* with comment first and "quote" */select * from t1;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	8
+-----------------------------------------------------
+# with comment first and "quote"
+select * from t1
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	8
+# with comment first and "quote"
+select * from t1;
+a
+1
+2
+3
+# with comment first and "quote"
+select * from t1;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	10
+-----------------------------------------------------
+-- with comment first and "quote" 
+select * from t1
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	10
+-- with comment first and "quote" 
+select * from t1;
+a
+1
+2
+3
+-- with comment first and "quote" 
+select * from t1;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	12
+-----------------------------------------------------
+/* with comment and whitespaces first */select * from t1
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	12
+/* with comment and whitespaces first */select * from t1;
+a
+1
+2
+3
+/* with comment and whitespaces first */select * from t1;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	14
+-----------------------------------------------------
+# with comment and whitespaces first
+select * from t1
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	14
+# with comment and whitespaces first
+select * from t1;
+a
+1
+2
+3
+# with comment and whitespaces first
+select * from t1;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	16
+-----------------------------------------------------
+-- with comment and whitespaces first
+select * from t1
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	16
+-- with comment and whitespaces first
+select * from t1;
+a
+1
+2
+3
+-- with comment and whitespaces first
+select * from t1;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	18
+-----------------------------------------------------
+select * /* internal comment */ from t1
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	18
+select * /* internal comment */ from t1;
+a
+1
+2
+3
+select * /* internal comment */ from t1;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	20
+-----------------------------------------------------
+select */* internal comment */ from t1
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	20
+select */* internal comment */ from t1;
+a
+1
+2
+3
+select */* internal comment */ from t1;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	22
+-----------------------------------------------------
+select */* internal comment */from t1
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	22
+select */* internal comment */from t1;
+a
+1
+2
+3
+select */* internal comment */from t1;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	24
+-----------------------------------------------------
+select * /* internal comment with "quote" */ from t1
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	24
+select * /* internal comment with "quote" */ from t1;
+a
+1
+2
+3
+select * /* internal comment with "quote" */ from t1;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	26
+-----------------------------------------------------
+select */* internal comment with "quote" */ from t1
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	26
+select */* internal comment with "quote" */ from t1;
+a
+1
+2
+3
+select */* internal comment with "quote" */ from t1;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	28
+-----------------------------------------------------
+select */* internal comment with "quote" */from t1
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	28
+select */* internal comment with "quote" */from t1;
+a
+1
+2
+3
+select */* internal comment with "quote" */from t1;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	30
+-----------------------------------------------------
+select * from t1
+
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	30
+select * from t1
+;
+a
+1
+2
+3
+select * from t1
+;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	32
+-----------------------------------------------------
+select * from t1 
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	32
+select * from t1 ;
+a
+1
+2
+3
+select * from t1 ;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	34
+-----------------------------------------------------
+select * from t1	
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	34
+select * from t1	;
+a
+1
+2
+3
+select * from t1	;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	36
+-----------------------------------------------------
+select * from t1
+/* comment in the end */
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	36
+select * from t1
+/* comment in the end */;
+a
+1
+2
+3
+select * from t1
+/* comment in the end */;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	38
+-----------------------------------------------------
+select * from t1
+/* *\/ */
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	38
+select * from t1
+/* *\/ */;
+a
+1
+2
+3
+select * from t1
+/* *\/ */;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	40
+-----------------------------------------------------
+select * from t1
+/* comment in the end */
+
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	40
+select * from t1
+/* comment in the end */
+;
+a
+1
+2
+3
+select * from t1
+/* comment in the end */
+;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	42
+-----------------------------------------------------
+select * from t1 #comment in the end
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	42
+select * from t1 #comment in the end;
+a
+1
+2
+3
+select * from t1 #comment in the end;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	44
+-----------------------------------------------------
+select * from t1 #comment in the end
+
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	44
+select * from t1 #comment in the end
+;
+a
+1
+2
+3
+select * from t1 #comment in the end
+;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	46
+-----------------------------------------------------
+select * from t1 -- comment in the end
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	46
+select * from t1 -- comment in the end;
+a
+1
+2
+3
+select * from t1 -- comment in the end;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	48
+-----------------------------------------------------
+select * from t1 -- comment in the end
+
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	48
+select * from t1 -- comment in the end
+;
+a
+1
+2
+3
+select * from t1 -- comment in the end
+;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	50
+-----------------------------------------------------
+select ' \'  ' from t1
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	50
+select ' \'  ' from t1;
+'  
+ '  
+ '  
+ '  
+select ' \'  ' from t1;
+'  
+ '  
+ '  
+ '  
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	2
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	2
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	51
+DROP TABLE t1;
+SET GLOBAL query_cache_size=default;
+set global query_cache_strip_comments=OFF;

=== added file 'mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments.test'
--- a/mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments.test	2010-11-24 12:04:12 +0000
@@ -0,0 +1,5 @@
+--disable_ps_protocol
+set global query_cache_strip_comments=ON;
+-- source include/percona_query_cache_with_comments_begin.inc
+-- source include/percona_query_cache_with_comments.inc
+-- source include/percona_query_cache_with_comments_end.inc

=== added file 'mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments_begin.inc'
--- a/mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments_begin.inc	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments_begin.inc	2010-11-24 12:04:12 +0000
@@ -0,0 +1,12 @@
+-- source include/have_query_cache.inc
+
+set GLOBAL query_cache_size=1355776;
+
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+
+create table t1 (a int not null);
+insert into t1 values (1),(2),(3);
+
+--source include/percona_query_cache_with_comments_clear.inc

=== added file 'mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments_clear.inc'
--- a/mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments_clear.inc	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments_clear.inc	2010-11-24 12:04:12 +0000
@@ -0,0 +1,5 @@
+# Reset query cache variables.
+flush query cache; # This crashed in some versions
+flush query cache; # This crashed in some versions
+reset query cache;
+flush status;

=== added file 'mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments_crash.result'
--- a/mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments_crash.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments_crash.result	2010-11-24 12:04:12 +0000
@@ -0,0 +1,21 @@
+set GLOBAL query_cache_size=1355776;
+drop table if exists t1;
+create table t1 (a int not null);
+insert into t1 values (1),(2),(3);
+flush query cache;
+flush query cache;
+reset query cache;
+flush status;
+( select * from t1 );
+a
+1
+2
+3
+/*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := REPLACE(REPLACE(@@SQL_MODE, 'ANSI_QUOTES', ''), ',,', ','), @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */;
+/* only comment */;
+# only comment
+;
+-- only comment
+;
+DROP TABLE t1;
+SET GLOBAL query_cache_size= default;

=== added file 'mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments_crash.test'
--- a/mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments_crash.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments_crash.test	2010-11-24 12:04:12 +0000
@@ -0,0 +1,22 @@
+-- source include/have_query_cache.inc
+set GLOBAL query_cache_size=1355776;
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+create table t1 (a int not null);
+insert into t1 values (1),(2),(3);
+flush query cache; # This crashed in some versions
+flush query cache; # This crashed in some versions
+reset query cache;
+flush status;
+( select * from t1 );
+/*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := REPLACE(REPLACE(@@SQL_MODE, 'ANSI_QUOTES', ''), ',,', ','), @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */;
+/* only comment */;
+let query=# only comment
+;
+eval $query;
+let query=-- only comment
+;
+eval $query;
+DROP TABLE t1;
+SET GLOBAL query_cache_size= default;

=== added file 'mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments_disable.result'
--- a/mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments_disable.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments_disable.result	2010-11-24 12:04:12 +0000
@@ -0,0 +1,865 @@
+set GLOBAL query_cache_size=1355776;
+drop table if exists t1;
+create table t1 (a int not null);
+insert into t1 values (1),(2),(3);
+flush query cache;
+flush query cache;
+reset query cache;
+flush status;
+flush query cache;
+flush query cache;
+reset query cache;
+flush status;
+/* with comment first */select * from t1;
+a
+1
+2
+3
+-----------------------------------------------------
+/* with comment first */select * from t1
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	0
+/* with comment first */select * from t1;
+a
+1
+2
+3
+/* with comment first */select * from t1;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	2
+-----------------------------------------------------
+# with comment first
+select * from t1
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	2
+# with comment first
+select * from t1;
+a
+1
+2
+3
+# with comment first
+select * from t1;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	2
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	2
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	2
+-----------------------------------------------------
+-- with comment first
+select * from t1
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	2
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	2
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	2
+-- with comment first
+select * from t1;
+a
+1
+2
+3
+-- with comment first
+select * from t1;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	3
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	3
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	2
+-----------------------------------------------------
+/* with comment first and "quote" */select * from t1
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	3
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	3
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	2
+/* with comment first and "quote" */select * from t1;
+a
+1
+2
+3
+/* with comment first and "quote" */select * from t1;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	4
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	4
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	3
+-----------------------------------------------------
+# with comment first and "quote"
+select * from t1
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	4
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	4
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	3
+# with comment first and "quote"
+select * from t1;
+a
+1
+2
+3
+# with comment first and "quote"
+select * from t1;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	5
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	5
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	3
+-----------------------------------------------------
+-- with comment first and "quote" 
+select * from t1
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	5
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	5
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	3
+-- with comment first and "quote" 
+select * from t1;
+a
+1
+2
+3
+-- with comment first and "quote" 
+select * from t1;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	6
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	6
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	3
+-----------------------------------------------------
+/* with comment and whitespaces first */select * from t1
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	6
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	6
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	3
+/* with comment and whitespaces first */select * from t1;
+a
+1
+2
+3
+/* with comment and whitespaces first */select * from t1;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	7
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	7
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	4
+-----------------------------------------------------
+# with comment and whitespaces first
+select * from t1
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	7
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	7
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	4
+# with comment and whitespaces first
+select * from t1;
+a
+1
+2
+3
+# with comment and whitespaces first
+select * from t1;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	8
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	8
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	4
+-----------------------------------------------------
+-- with comment and whitespaces first
+select * from t1
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	8
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	8
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	4
+-- with comment and whitespaces first
+select * from t1;
+a
+1
+2
+3
+-- with comment and whitespaces first
+select * from t1;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	9
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	9
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	4
+-----------------------------------------------------
+select * /* internal comment */ from t1
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	9
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	9
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	4
+select * /* internal comment */ from t1;
+a
+1
+2
+3
+select * /* internal comment */ from t1;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	10
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	10
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	5
+-----------------------------------------------------
+select */* internal comment */ from t1
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	10
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	10
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	5
+select */* internal comment */ from t1;
+a
+1
+2
+3
+select */* internal comment */ from t1;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	11
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	11
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	6
+-----------------------------------------------------
+select */* internal comment */from t1
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	11
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	11
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	6
+select */* internal comment */from t1;
+a
+1
+2
+3
+select */* internal comment */from t1;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	12
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	12
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	7
+-----------------------------------------------------
+select * /* internal comment with "quote" */ from t1
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	12
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	12
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	7
+select * /* internal comment with "quote" */ from t1;
+a
+1
+2
+3
+select * /* internal comment with "quote" */ from t1;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	13
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	13
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	8
+-----------------------------------------------------
+select */* internal comment with "quote" */ from t1
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	13
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	13
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	8
+select */* internal comment with "quote" */ from t1;
+a
+1
+2
+3
+select */* internal comment with "quote" */ from t1;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	14
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	14
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	9
+-----------------------------------------------------
+select */* internal comment with "quote" */from t1
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	14
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	14
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	9
+select */* internal comment with "quote" */from t1;
+a
+1
+2
+3
+select */* internal comment with "quote" */from t1;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	15
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	15
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	10
+-----------------------------------------------------
+select * from t1
+
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	15
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	15
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	10
+select * from t1
+;
+a
+1
+2
+3
+select * from t1
+;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	16
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	16
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	11
+-----------------------------------------------------
+select * from t1 
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	16
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	16
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	11
+select * from t1 ;
+a
+1
+2
+3
+select * from t1 ;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	16
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	16
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	13
+-----------------------------------------------------
+select * from t1	
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	16
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	16
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	13
+select * from t1	;
+a
+1
+2
+3
+select * from t1	;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	16
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	16
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	15
+-----------------------------------------------------
+select * from t1
+/* comment in the end */
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	16
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	16
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	15
+select * from t1
+/* comment in the end */;
+a
+1
+2
+3
+select * from t1
+/* comment in the end */;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	17
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	17
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	16
+-----------------------------------------------------
+select * from t1
+/* *\/ */
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	17
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	17
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	16
+select * from t1
+/* *\/ */;
+a
+1
+2
+3
+select * from t1
+/* *\/ */;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	18
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	18
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	17
+-----------------------------------------------------
+select * from t1
+/* comment in the end */
+
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	18
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	18
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	17
+select * from t1
+/* comment in the end */
+;
+a
+1
+2
+3
+select * from t1
+/* comment in the end */
+;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	18
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	18
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	19
+-----------------------------------------------------
+select * from t1 #comment in the end
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	18
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	18
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	19
+select * from t1 #comment in the end;
+a
+1
+2
+3
+select * from t1 #comment in the end;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	19
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	19
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	20
+-----------------------------------------------------
+select * from t1 #comment in the end
+
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	19
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	19
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	20
+select * from t1 #comment in the end
+;
+a
+1
+2
+3
+select * from t1 #comment in the end
+;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	19
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	19
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	22
+-----------------------------------------------------
+select * from t1 -- comment in the end
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	19
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	19
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	22
+select * from t1 -- comment in the end;
+a
+1
+2
+3
+select * from t1 -- comment in the end;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	20
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	20
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	23
+-----------------------------------------------------
+select * from t1 -- comment in the end
+
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	20
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	20
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	23
+select * from t1 -- comment in the end
+;
+a
+1
+2
+3
+select * from t1 -- comment in the end
+;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	20
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	20
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	25
+-----------------------------------------------------
+select ' \'  ' from t1
+-----------------------------------------------------
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	20
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	20
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	25
+select ' \'  ' from t1;
+'  
+ '  
+ '  
+ '  
+select ' \'  ' from t1;
+'  
+ '  
+ '  
+ '  
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	21
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	21
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	26
+DROP TABLE t1;
+SET GLOBAL query_cache_size=default;
+set global query_cache_strip_comments=OFF;

=== added file 'mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments_disable.test'
--- a/mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments_disable.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments_disable.test	2010-11-24 12:04:12 +0000
@@ -0,0 +1,3 @@
+-- source include/percona_query_cache_with_comments_begin.inc
+-- source include/percona_query_cache_with_comments.inc
+-- source include/percona_query_cache_with_comments_end.inc

=== added file 'mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments_end.inc'
--- a/mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments_end.inc	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments_end.inc	2010-11-24 12:04:12 +0000
@@ -0,0 +1,3 @@
+DROP TABLE t1;
+SET GLOBAL query_cache_size=default;
+set global query_cache_strip_comments=OFF;

=== added file 'mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments_eval.inc'
--- a/mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments_eval.inc	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments_eval.inc	2010-11-24 12:04:12 +0000
@@ -0,0 +1,7 @@
+echo -----------------------------------------------------;
+echo $query;
+echo -----------------------------------------------------;
+--source include/percona_query_cache_with_comments_show.inc
+eval $query;
+eval $query;
+--source include/percona_query_cache_with_comments_show.inc

=== added file 'mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments_prepared_statements.result'
--- a/mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments_prepared_statements.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/percona/query_cache_enhance.patch/percona_query_cache_with_comments_prepared_statements.result	2010-11-24 12:04:12 +0000
@@ -0,0 +1,396 @@
+set GLOBAL query_cache_size=1355776;
+flush query cache;
+flush query cache;
+reset query cache;
+flush status;
+drop table if exists t1;
+create table t1 (a int not null);
+insert into t1 values (1),(2),(3);
+set global query_cache_strip_comments=ON;
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	0
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	0
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	0
+prepare stmt from '/* with comment */ select * from t1';
+execute stmt;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	0
+execute stmt;
+a
+1
+2
+3
+execute stmt;
+a
+1
+2
+3
+execute stmt;
+a
+1
+2
+3
+execute stmt;
+a
+1
+2
+3
+execute stmt;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	5
+prepare stmt from 'select * from t1';
+execute stmt;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	6
+prepare stmt from 'select * /*internal comment*/from t1';
+execute stmt;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	7
+prepare stmt from 'select * /*internal comment*/ from t1';
+execute stmt;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	8
+prepare stmt from 'select * from t1 /* at the end */';
+execute stmt;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	9
+prepare stmt from 'select * from t1 /* with "quote" */';
+execute stmt;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	10
+prepare stmt from 'select * from t1 /* with \'quote\' */';
+execute stmt;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	11
+prepare stmt from 'select * from t1 # 123
+';
+execute stmt;
+a
+1
+2
+3
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qc