[Commits] Rev 3021: Merge in file:///home/igor/maria/maria-5.2-wl21/

Igor Babaev igor at askmonty.org
Sun Jan 23 09:24:04 EET 2011


At file:///home/igor/maria/maria-5.2-wl21/

------------------------------------------------------------
revno: 3021 [merge]
revision-id: igor at askmonty.org-20110123072347-k9i6bd2ndpzshxou
parent: igor at askmonty.org-20110122041413-zi58jua52yuwuo20
parent: sergii at pisem.net-20110120120046-b2s0ijw06f1ztn2f
committer: Igor Babaev <igor at askmonty.org>
branch nick: maria-5.2-wl21
timestamp: Sat 2011-01-22 23:23:47 -0800
message:
  Merge
removed:
  include/mysql/plugin.h.pp      plugin.h.pp-20080613094359-py8jez90546shnqt-1
added:
  include/mysql/client_plugin.h  client_plugin.h-20100213233913-bw6tz443e7373atl-1
  include/mysql/client_plugin.h.pp client_plugin.h.pp-20100315105648-8gu0fn0vw5e9gz6n-1
  include/mysql/plugin_auth.h    plugin_auth.h-20100213165619-pv7t1199lx8tch62-1
  include/mysql/plugin_auth.h.pp plugin_auth.h.pp-20100315105654-2p7642luicsf2xxk-1
  include/mysql/plugin_auth_common.h plugin_auth_common.h-20100215120602-qetbhftj9i7ehamm-1
  include/mysql/service_my_snprintf.h service_my_snprintf.-20100228160908-qfuxjw8mp0bdlmzs-3
  include/mysql/service_thd_alloc.h service_thd_alloc.h-20100228160908-qfuxjw8mp0bdlmzs-4
  include/mysql/services.h       services.h-20100228160908-qfuxjw8mp0bdlmzs-5
  include/service_versions.h     service_versions.h-20100228160908-qfuxjw8mp0bdlmzs-2
  libservices/                   libservices-20100228160908-qfuxjw8mp0bdlmzs-1
  libservices/CMakeLists.txt     cmakelists.txt-20100228160908-qfuxjw8mp0bdlmzs-8
  libservices/HOWTO              howto-20100228160908-qfuxjw8mp0bdlmzs-9
  libservices/Makefile.am        makefile.am-20100228160908-qfuxjw8mp0bdlmzs-10
  libservices/my_snprintf_service.c my_snprintf_service.-20100228160908-qfuxjw8mp0bdlmzs-11
  libservices/thd_alloc_service.c thd_alloc_service.c-20100228160908-qfuxjw8mp0bdlmzs-12
  mysql-test/include/have_xtradb.opt have_xtradb.opt-20101231091121-mqb91xvsy225jnaj-1
  mysql-test/r/mysqlbinlog-innodb.result mysqlbinloginnodb.re-20110113122817-3ronhbvs2cc6pf64-1
  mysql-test/r/partition_example.result partition_example.re-20100511130403-d59u46g1g830mxmx-1
  mysql-test/r/plugin_maturity.result plugin_maturity.resu-20100616140807-mtquscncoyp8pmsa-1
  mysql-test/r/select_pkeycache.result select_pkeycache.res-20100216163255-sd54514jjhw0yi81-3
  mysql-test/r/status_user.result status_user.result-20091019051724-x1vmdm6cvmjlps1n-1
  mysql-test/r/table_options.result create_options.resul-20100408115745-s7sely6ivm7kfn40-1
  mysql-test/std_data/loaddata7.dat loaddata7.dat-20091016142045-b5fpf9tpydkmwy0i-1
  mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result binlog_row_mysqlbinl-20091016142045-b5fpf9tpydkmwy0i-2
  mysql-test/suite/binlog/t/binlog_row_mysqlbinlog_options-master.opt binlog_row_mysqlbinl-20100201185634-3gvrp49sr2zc4z92-1
  mysql-test/suite/binlog/t/binlog_row_mysqlbinlog_options.test binlog_row_mysqlbinl-20091016142045-b5fpf9tpydkmwy0i-3
  mysql-test/suite/maria/r/compat_aliases.result compat_aliases.resul-20100913130816-c7x3ogvq64zx9vpj-1
  mysql-test/suite/maria/r/group_commit.result group_commit.result-20100212130139-9we3v7ru70ruix5k-1
  mysql-test/suite/maria/suite.pm suite.pm-20100914093524-vi8ai3e88vx7t08a-1
  mysql-test/suite/maria/t/compat_aliases-master.opt compat_aliasesmaster-20100913130816-c7x3ogvq64zx9vpj-2
  mysql-test/suite/maria/t/compat_aliases.test compat_aliases.test-20100913130816-c7x3ogvq64zx9vpj-3
  mysql-test/suite/maria/t/group_commit.test group_commit.test-20100212130125-57z0du2gotniu91w-1
  mysql-test/suite/oqgraph/      oqgraph-20091109115104-71puatd0zei2v6vf-1
  mysql-test/suite/oqgraph/r/    r-20091109115104-71puatd0zei2v6vf-3
  mysql-test/suite/oqgraph/r/basic.result basic.result-20091109115104-71puatd0zei2v6vf-6
  mysql-test/suite/oqgraph/r/binlog.result binlog.result-20100412232032-g6i1vxkufbge6t83-1
  mysql-test/suite/oqgraph/suite.opt suite.opt-20100412232042-krigdxpl8d8u3m19-1
  mysql-test/suite/oqgraph/suite.pm suite.pm-20100824124950-a6ymvab6maub7tuq-2
  mysql-test/suite/oqgraph/t/    t-20091109115104-71puatd0zei2v6vf-4
  mysql-test/suite/oqgraph/t/basic.test basic.test-20091109115104-71puatd0zei2v6vf-7
  mysql-test/suite/oqgraph/t/binlog.test binlog.test-20100412232025-s88pvv452d1xgzy9-1
  mysql-test/suite/rpl/r/rpl_table_options.result rpl_table_options.re-20100512175431-8asu569jadr5t4qn-1
  mysql-test/suite/rpl/t/rpl_table_options.test rpl_table_options.te-20100512175431-8asu569jadr5t4qn-3
  mysql-test/suite/sphinx/       sphinx-20100824124950-a6ymvab6maub7tuq-1
  mysql-test/suite/sphinx/my.cnf my.cnf-20100824124950-a6ymvab6maub7tuq-3
  mysql-test/suite/sphinx/sphinx.result sphinx.result-20100824124950-a6ymvab6maub7tuq-4
  mysql-test/suite/sphinx/sphinx.test sphinx.test-20100824124950-a6ymvab6maub7tuq-5
  mysql-test/suite/sphinx/suite.opt suite.opt-20100921152824-45g1tsi4yx04xjic-1
  mysql-test/suite/sphinx/suite.pm suite.pm-20100824124950-a6ymvab6maub7tuq-6
  mysql-test/suite/sphinx/testdata.xml testdata.xml-20100824124950-a6ymvab6maub7tuq-7
  mysql-test/suite/vcol/         vcol-20091016212105-1lx2muao9vwbl1c1-1
  mysql-test/suite/vcol/inc/     inc-20091016212105-1lx2muao9vwbl1c1-2
  mysql-test/suite/vcol/inc/vcol_blocked_sql_funcs_main.inc vcol_blocked_sql_fun-20091016212105-1lx2muao9vwbl1c1-5
  mysql-test/suite/vcol/inc/vcol_cleanup.inc vcol_cleanup.inc-20091016212105-1lx2muao9vwbl1c1-6
  mysql-test/suite/vcol/inc/vcol_column_def_options.inc vcol_column_def_opti-20091016212105-1lx2muao9vwbl1c1-7
  mysql-test/suite/vcol/inc/vcol_dependancies_on_vcol.inc vcol_dependancies_on-20091016212105-1lx2muao9vwbl1c1-8
  mysql-test/suite/vcol/inc/vcol_handler.inc vcol_handler.inc-20091016212105-1lx2muao9vwbl1c1-9
  mysql-test/suite/vcol/inc/vcol_init_vars.pre vcol_init_vars.pre-20091016212105-1lx2muao9vwbl1c1-10
  mysql-test/suite/vcol/inc/vcol_ins_upd.inc vcol_ins_upd.inc-20091016212105-1lx2muao9vwbl1c1-11
  mysql-test/suite/vcol/inc/vcol_keys.inc vcol_keys.inc-20091016212105-1lx2muao9vwbl1c1-12
  mysql-test/suite/vcol/inc/vcol_non_stored_columns.inc vcol_non_stored_colu-20091016212105-1lx2muao9vwbl1c1-13
  mysql-test/suite/vcol/inc/vcol_partition.inc vcol_partition.inc-20091016212105-1lx2muao9vwbl1c1-14
  mysql-test/suite/vcol/inc/vcol_select.inc vcol_select.inc-20091016212105-1lx2muao9vwbl1c1-15
  mysql-test/suite/vcol/inc/vcol_supported_sql_funcs.inc vcol_supported_sql_f-20091016212105-1lx2muao9vwbl1c1-16
  mysql-test/suite/vcol/inc/vcol_supported_sql_funcs_main.inc vcol_supported_sql_f-20091016212105-1lx2muao9vwbl1c1-17
  mysql-test/suite/vcol/inc/vcol_trigger_sp.inc vcol_trigger_sp.inc-20091016212105-1lx2muao9vwbl1c1-18
  mysql-test/suite/vcol/inc/vcol_unsupported_storage_engines.inc vcol_unsupported_sto-20091016212105-1lx2muao9vwbl1c1-19
  mysql-test/suite/vcol/inc/vcol_view.inc vcol_view.inc-20091016212105-1lx2muao9vwbl1c1-20
  mysql-test/suite/vcol/r/       r-20091016212105-1lx2muao9vwbl1c1-3
  mysql-test/suite/vcol/r/rpl_vcol.result rpl_vcol.result-20091016212105-1lx2muao9vwbl1c1-21
  mysql-test/suite/vcol/r/vcol_archive.result vcol_archive.result-20091016212105-1lx2muao9vwbl1c1-22
  mysql-test/suite/vcol/r/vcol_blackhole.result vcol_blackhole.resul-20091016212105-1lx2muao9vwbl1c1-23
  mysql-test/suite/vcol/r/vcol_blocked_sql_funcs_innodb.result vcol_blocked_sql_fun-20091016212105-1lx2muao9vwbl1c1-24
  mysql-test/suite/vcol/r/vcol_blocked_sql_funcs_myisam.result vcol_blocked_sql_fun-20091016212105-1lx2muao9vwbl1c1-25
  mysql-test/suite/vcol/r/vcol_column_def_options_innodb.result vcol_column_def_opti-20091016212105-1lx2muao9vwbl1c1-26
  mysql-test/suite/vcol/r/vcol_column_def_options_myisam.result vcol_column_def_opti-20091016212105-1lx2muao9vwbl1c1-27
  mysql-test/suite/vcol/r/vcol_csv.result vcol_csv.result-20091016212105-1lx2muao9vwbl1c1-28
  mysql-test/suite/vcol/r/vcol_handler_innodb.result vcol_handler_innodb.-20091016212105-1lx2muao9vwbl1c1-29
  mysql-test/suite/vcol/r/vcol_handler_maria.result vcol_handler_maria.r-20100803094746-n6wpop9dm0qg09mt-1
  mysql-test/suite/vcol/r/vcol_handler_myisam.result vcol_handler_myisam.-20091016212105-1lx2muao9vwbl1c1-30
  mysql-test/suite/vcol/r/vcol_ins_upd_innodb.result vcol_ins_upd_innodb.-20091016212105-1lx2muao9vwbl1c1-31
  mysql-test/suite/vcol/r/vcol_ins_upd_myisam.result vcol_ins_upd_myisam.-20091016212105-1lx2muao9vwbl1c1-32
  mysql-test/suite/vcol/r/vcol_keys_innodb.result vcol_keys_innodb.res-20091016212105-1lx2muao9vwbl1c1-33
  mysql-test/suite/vcol/r/vcol_keys_myisam.result vcol_keys_myisam.res-20091016212105-1lx2muao9vwbl1c1-34
  mysql-test/suite/vcol/r/vcol_memory.result vcol_memory.result-20091016212105-1lx2muao9vwbl1c1-35
  mysql-test/suite/vcol/r/vcol_merge.result vcol_merge.result-20091016212105-1lx2muao9vwbl1c1-36
  mysql-test/suite/vcol/r/vcol_misc.result vcol_misc.result-20100703032010-vsczyu8ezoekgraf-1
  mysql-test/suite/vcol/r/vcol_non_stored_columns_innodb.result vcol_non_stored_colu-20091016212105-1lx2muao9vwbl1c1-37
  mysql-test/suite/vcol/r/vcol_non_stored_columns_myisam.result vcol_non_stored_colu-20091016212105-1lx2muao9vwbl1c1-38
  mysql-test/suite/vcol/r/vcol_partition_innodb.result vcol_partition_innod-20091016212105-1lx2muao9vwbl1c1-39
  mysql-test/suite/vcol/r/vcol_partition_myisam.result vcol_partition_myisa-20091016212105-1lx2muao9vwbl1c1-40
  mysql-test/suite/vcol/r/vcol_select_innodb.result vcol_select_innodb.r-20091016212105-1lx2muao9vwbl1c1-41
  mysql-test/suite/vcol/r/vcol_select_myisam.result vcol_select_myisam.r-20091016212105-1lx2muao9vwbl1c1-42
  mysql-test/suite/vcol/r/vcol_supported_sql_funcs_innodb.result vcol_supported_sql_f-20091016212105-1lx2muao9vwbl1c1-43
  mysql-test/suite/vcol/r/vcol_supported_sql_funcs_myisam.result vcol_supported_sql_f-20091016212105-1lx2muao9vwbl1c1-44
  mysql-test/suite/vcol/r/vcol_syntax.result vcol_syntax.result-20091016212105-1lx2muao9vwbl1c1-45
  mysql-test/suite/vcol/r/vcol_trigger_sp_innodb.result vcol_trigger_sp_inno-20091016212105-1lx2muao9vwbl1c1-46
  mysql-test/suite/vcol/r/vcol_trigger_sp_myisam.result vcol_trigger_sp_myis-20091016212105-1lx2muao9vwbl1c1-47
  mysql-test/suite/vcol/r/vcol_view_innodb.result vcol_view_innodb.res-20091016212105-1lx2muao9vwbl1c1-48
  mysql-test/suite/vcol/r/vcol_view_myisam.result vcol_view_myisam.res-20091016212105-1lx2muao9vwbl1c1-49
  mysql-test/suite/vcol/t/       t-20091016212105-1lx2muao9vwbl1c1-4
  mysql-test/suite/vcol/t/rpl_vcol.test rpl_vcol.test-20091016212105-1lx2muao9vwbl1c1-50
  mysql-test/suite/vcol/t/vcol_archive.test vcol_archive.test-20091016212105-1lx2muao9vwbl1c1-51
  mysql-test/suite/vcol/t/vcol_blackhole.test vcol_blackhole.test-20091016212105-1lx2muao9vwbl1c1-52
  mysql-test/suite/vcol/t/vcol_blocked_sql_funcs_innodb.test vcol_blocked_sql_fun-20091016212105-1lx2muao9vwbl1c1-53
  mysql-test/suite/vcol/t/vcol_blocked_sql_funcs_myisam.test vcol_blocked_sql_fun-20091016212105-1lx2muao9vwbl1c1-54
  mysql-test/suite/vcol/t/vcol_column_def_options_innodb.test vcol_column_def_opti-20091016212105-1lx2muao9vwbl1c1-55
  mysql-test/suite/vcol/t/vcol_column_def_options_myisam.test vcol_column_def_opti-20091016212105-1lx2muao9vwbl1c1-56
  mysql-test/suite/vcol/t/vcol_csv.test vcol_csv.test-20091016212105-1lx2muao9vwbl1c1-57
  mysql-test/suite/vcol/t/vcol_handler_innodb.test vcol_handler_innodb.-20091016212105-1lx2muao9vwbl1c1-58
  mysql-test/suite/vcol/t/vcol_handler_maria.test vcol_handler_maria.t-20100803094746-n6wpop9dm0qg09mt-2
  mysql-test/suite/vcol/t/vcol_handler_myisam.test vcol_handler_myisam.-20091016212105-1lx2muao9vwbl1c1-59
  mysql-test/suite/vcol/t/vcol_ins_upd_innodb.test vcol_ins_upd_innodb.-20091016212105-1lx2muao9vwbl1c1-60
  mysql-test/suite/vcol/t/vcol_ins_upd_myisam.test vcol_ins_upd_myisam.-20091016212105-1lx2muao9vwbl1c1-61
  mysql-test/suite/vcol/t/vcol_keys_innodb.test vcol_keys_innodb.tes-20091016212105-1lx2muao9vwbl1c1-62
  mysql-test/suite/vcol/t/vcol_keys_myisam.test vcol_keys_myisam.tes-20091016212105-1lx2muao9vwbl1c1-63
  mysql-test/suite/vcol/t/vcol_memory.test vcol_memory.test-20091016212105-1lx2muao9vwbl1c1-64
  mysql-test/suite/vcol/t/vcol_merge.test vcol_merge.test-20091016212105-1lx2muao9vwbl1c1-65
  mysql-test/suite/vcol/t/vcol_misc.test vcol_misc.test-20100703031956-dahu2qm6h9xlm1t9-1
  mysql-test/suite/vcol/t/vcol_non_stored_columns_innodb.test vcol_non_stored_colu-20091016212105-1lx2muao9vwbl1c1-66
  mysql-test/suite/vcol/t/vcol_non_stored_columns_myisam.test vcol_non_stored_colu-20091016212105-1lx2muao9vwbl1c1-67
  mysql-test/suite/vcol/t/vcol_partition_innodb.test vcol_partition_innod-20091016212105-1lx2muao9vwbl1c1-68
  mysql-test/suite/vcol/t/vcol_partition_myisam.test vcol_partition_myisa-20091016212105-1lx2muao9vwbl1c1-69
  mysql-test/suite/vcol/t/vcol_select_innodb.test vcol_select_innodb.t-20091016212105-1lx2muao9vwbl1c1-70
  mysql-test/suite/vcol/t/vcol_select_myisam.test vcol_select_myisam.t-20091016212105-1lx2muao9vwbl1c1-71
  mysql-test/suite/vcol/t/vcol_supported_sql_funcs_innodb.test vcol_supported_sql_f-20091016212105-1lx2muao9vwbl1c1-72
  mysql-test/suite/vcol/t/vcol_supported_sql_funcs_myisam.test vcol_supported_sql_f-20091016212105-1lx2muao9vwbl1c1-73
  mysql-test/suite/vcol/t/vcol_syntax.test vcol_syntax.test-20091016212105-1lx2muao9vwbl1c1-74
  mysql-test/suite/vcol/t/vcol_trigger_sp_innodb.test vcol_trigger_sp_inno-20091016212105-1lx2muao9vwbl1c1-75
  mysql-test/suite/vcol/t/vcol_trigger_sp_myisam.test vcol_trigger_sp_myis-20091016212105-1lx2muao9vwbl1c1-76
  mysql-test/suite/vcol/t/vcol_view_innodb.test vcol_view_innodb.tes-20091016212105-1lx2muao9vwbl1c1-77
  mysql-test/suite/vcol/t/vcol_view_myisam.test vcol_view_myisam.tes-20091016212105-1lx2muao9vwbl1c1-78
  mysql-test/t/mysqlbinlog-innodb.test mysqlbinloginnodb.te-20110113122817-3ronhbvs2cc6pf64-2
  mysql-test/t/partition_example.test partition_example.te-20100511130403-d59u46g1g830mxmx-3
  mysql-test/t/plugin_maturity-master.opt plugin_maturitymaste-20100616140807-mtquscncoyp8pmsa-2
  mysql-test/t/plugin_maturity.test plugin_maturity.test-20100616140807-mtquscncoyp8pmsa-3
  mysql-test/t/select_pkeycache-master.opt select_pkeycachemast-20100216163255-sd54514jjhw0yi81-2
  mysql-test/t/select_pkeycache.test select_pkeycache.tes-20100216163255-sd54514jjhw0yi81-1
  mysql-test/t/status_user-master.opt status_usermaster.op-20091019051724-x1vmdm6cvmjlps1n-2
  mysql-test/t/status_user.test  status_user.test-20091019051724-x1vmdm6cvmjlps1n-3
  mysql-test/t/table_options.test create_options.test-20100408115745-s7sely6ivm7kfn40-2
  plugin/auth/                   auth-20100213233925-2o1gpjsv01qognaq-1
  plugin/auth/Makefile.am        makefile.am-20100213233925-2o1gpjsv01qognaq-2
  plugin/auth/auth_socket.c      auth_socket.c-20100213233925-2o1gpjsv01qognaq-3
  plugin/auth/dialog.c           dialog.c-20100213233925-2o1gpjsv01qognaq-4
  plugin/auth/plug.in            plug.in-20100213233925-2o1gpjsv01qognaq-5
  randgen/                       randgen-20100212130043-p9e1fp04f2z82fo0-1
  randgen/conf/                  conf-20100212130043-p9e1fp04f2z82fo0-2
  randgen/conf/maria_group_commit.yy maria_group_commit.y-20100212130043-p9e1fp04f2z82fo0-3
  sql-common/client_plugin.c     client_plugin.c-20100213115856-ly45979t7c2voue1-1
  sql/create_options.cc          create_options.cc-20100408115745-s7sely6ivm7kfn40-3
  sql/create_options.h           create_options.h-20100408115745-s7sely6ivm7kfn40-4
  sql/sql_plugin_services.h      sql_plugin_services.-20100228160908-qfuxjw8mp0bdlmzs-6
  storage/maria/compat_aliases.cc compat_aliases.cc-20100913130847-ztpv41uczxc4olga-1
  storage/maria/compat_aliases.h compat_aliases.h-20100913130847-ztpv41uczxc4olga-2
  storage/maria/ma_servicethread.c ma_servicethread.c-20090112123038-xgiqw8z1tqqpz03z-1
  storage/maria/ma_servicethread.h ma_servicethread.h-20090112123045-ft39he0qj95949u6-1
  storage/oqgraph/               oqgraph-20091109115125-39rbuqeoqlrz4bux-1
  storage/oqgraph/CMakeLists.txt cmakefiles.txt-20091109115125-39rbuqeoqlrz4bux-2
  storage/oqgraph/Makefile.am    makefile.am-20091109115125-39rbuqeoqlrz4bux-3
  storage/oqgraph/README         readme-20100330073303-6dxhwhr88zl32w1r-1
  storage/oqgraph/graphcore-graph.h graphcoregraph.h-20091109115125-39rbuqeoqlrz4bux-5
  storage/oqgraph/graphcore-types.h graphcoretypes.h-20091109115125-39rbuqeoqlrz4bux-6
  storage/oqgraph/graphcore.cc   graphcore.cc-20091109115125-39rbuqeoqlrz4bux-7
  storage/oqgraph/graphcore.h    graphcore.h-20091109115125-39rbuqeoqlrz4bux-8
  storage/oqgraph/graphstore.c   graphstore.c-20091109115125-39rbuqeoqlrz4bux-9
  storage/oqgraph/graphstore.h   graphstore.h-20091109115125-39rbuqeoqlrz4bux-10
  storage/oqgraph/ha_oqgraph.cc  ha_oqgraph.cc-20091109115125-39rbuqeoqlrz4bux-11
  storage/oqgraph/ha_oqgraph.h   ha_oqgraph.h-20091109115125-39rbuqeoqlrz4bux-12
  storage/oqgraph/oqgraph_config.h.in oqgraph_config.h.in-20091109115125-39rbuqeoqlrz4bux-13
  storage/oqgraph/oqgraph_probes.d oqgraph_probes.d-20091109132144-wh16qz4lhhhh1hc3-1
  storage/oqgraph/plug.in        plug.in-20091109115125-39rbuqeoqlrz4bux-15
  storage/sphinx/                sphinx-20100709115352-b84ypltib7085egy-1
  storage/sphinx/CMakeLists.txt  cmakelists.txt-20100709115352-b84ypltib7085egy-2
  storage/sphinx/Makefile.am     makefile.am-20100709115352-b84ypltib7085egy-3
  storage/sphinx/gen_data.php    gen_data.php-20100709115352-b84ypltib7085egy-4
  storage/sphinx/ha_sphinx.cc    ha_sphinx.cc-20100709115352-b84ypltib7085egy-5
  storage/sphinx/ha_sphinx.h     ha_sphinx.h-20100709115352-b84ypltib7085egy-6
  storage/sphinx/make-patch.sh   makepatch.sh-20100709115352-b84ypltib7085egy-7
  storage/sphinx/plug.in         plug.in-20100709115352-b84ypltib7085egy-8
  storage/sphinx/snippets_udf.cc snippets_udf.cc-20100709115352-b84ypltib7085egy-9
  storage/sphinx/sphinx.5.0.22.diff sphinx.5.0.22.diff-20100709115352-b84ypltib7085egy-10
  storage/sphinx/sphinx.5.0.27.diff sphinx.5.0.27.diff-20100709115352-b84ypltib7085egy-11
  storage/sphinx/sphinx.5.0.37.diff sphinx.5.0.37.diff-20100709115352-b84ypltib7085egy-12
  unittest/mysys/my_vsnprintf-t.c my_vsnprintft.c-20100228160908-qfuxjw8mp0bdlmzs-7
  win/build-vs10.bat             buildvs10.bat-20100623142224-sa1jpsayatcxcylv-1
  win/build-vs10_x64.bat         buildvs10_x64.bat-20100623142224-sa1jpsayatcxcylv-2
modified:
  .bzr-mysql/default.conf        default.conf-20080521211852-kry0hytlir1epmpv-2
  .bzrignore                     sp1f-ignore-20001018235455-q4gxfbritt5f42nwix354ufpsvrf5ebj
  BUILD/SETUP.sh                 sp1f-setup.sh-20001218212418-itvzddls4bsqffggcsjklbawdmaxdhde
  BUILD/compile-bintar           compilebintar-20100107101810-lelof47hh40zljzw-1
  CMakeLists.txt                 sp1f-cmakelists.txt-20060831175236-433hkm7nrqfjbwios4ancgytabw354nr
  Docs/sp-imp-spec.txt           sp1f-spimpspec.txt-20030202164941-cm47byoggfqjr73hhqr24vos7luqh36q
  Makefile.am                    sp1f-makefile.am-19700101030959-jbbpiygwpgybyqknlavdxxupbrjonu7h
  client/CMakeLists.txt          sp1f-cmakelists.txt-20060831175236-tdyayhfqw2zme3vhwbn6l2lno4em3u3t
  client/Makefile.am             sp1f-makefile.am-19700101030959-zpaig4zjwqhmsob3ypilmrcrkq7pu6gf
  client/client_priv.h           sp1f-client_priv.h-20010912205330-fzvv7eg77ywdut64ojoihwu3lhbabphc
  client/mysql.cc                sp1f-mysql.cc-19700101030959-5sipizk7ehvbsi3tywrkdords5qy5zdl
  client/mysqladmin.cc           sp1f-mysqladmin.c-19700101030959-ud6encjcx2oypzvp7ptmojbi3xdos2fs
  client/mysqlbinlog.cc          sp1f-mysqlbinlog.cc-19700101030959-b3vgyo47ljent5mhbyj6ik33bi4bukad
  client/mysqltest.cc            sp1f-mysqltest.c-20001010065317-ix4zw26srlev7yugcz455ux22zwyynyf
  client/sql_string.cc           sp1f-sql_string.cc-19700101030959-72h4johdz5mgcc6z2xceguohasr3pkrx
  client/sql_string.h            sp1f-sql_string.h-19700101030959-oscd4vjvtuwjf22oosfpfmvc2f3km2dx
  config/ac-macros/plugins.m4    sp1f-plugins.m4-20060413204924-cltp6uagmyygsgdno6od3mamfizdhk3m
  configure.in                   sp1f-configure.in-19700101030959-mgdpoxtnh2ewmvusvfpkreuhwvffkcjw
  extra/libevent/CMakeLists.txt  cmakelists.txt-20090312215838-41pxaswf0zgarxu3-47
  extra/libevent/event.h         event.h-20090312215838-41pxaswf0zgarxu3-19
  extra/libevent/evutil.h        evutil.h-20090312215838-41pxaswf0zgarxu3-24
  include/Makefile.am            sp1f-makefile.am-19700101030959-42ptynoryou25hajenjryzqyuvicbucw
  include/errmsg.h               sp1f-errmsg.h-19700101030959-44ijemeizug43venmrod52pfo6k5sxiz
  include/keycache.h             sp1f-keycache.h-20031120200620-epdbaok2tbq7pk52iejznbrk32ulro77
  include/m_ctype.h              sp1f-m_ctype.h-19700101030959-dsoy764fhlrdbb6tsjldsk3e5fohfai6
  include/m_string.h             sp1f-m_string.h-19700101030959-rraattbvw5ffkokv4sixxf3s7brqqaga
  include/maria.h                sp1f-maria.h-20060411134400-ylx7cem3pcdf2jg6it2tuutxyzoljzvv
  include/my_attribute.h         sp1f-my_attribute.h-20070411224324-wngmw2lp4nzz722zsga4eujdnuq7sh2n
  include/my_base.h              sp1f-my_base.h-19700101030959-3yhq5cta6tatwfxpqmoukzvevlehtxoz
  include/my_global.h            sp1f-my_global.h-20010915021246-4vawdgfw4vg3tuxq6mejt7lrchcnceha
  include/my_no_pthread.h        sp1f-my_no_pthread.h-19700101030959-ssl6ztub7u5hhlgqmx5jnoc6dzemclbd
  include/my_pthread.h           sp1f-my_pthread.h-19700101030959-z4yp3kljwx5fgmhlyvumtwxuw73xgrjn
  include/my_sys.h               sp1f-my_sys.h-19700101030959-lyllvna5vzqfcjnmlcrutgqocylhtb54
  include/mysql.h                sp1f-mysql.h-19700101030959-soi7hu6ji273nui3fm25jjf4m4362pcw
  include/mysql.h.pp             mysql.h.pp-20080613094407-2m1760u4zdzt4dc7-1
  include/mysql/plugin.h         sp1f-plugin.h-20051105112032-xacmvx22ghtcgtqhu6v56b4bneqtx7l5
  include/mysql_com.h            sp1f-mysql_com.h-19700101030959-a255cet4ojn7jbd4gb4wadueimhj57r7
  include/sql_common.h           sp1f-sql_common.h-20030531101544-dabah337q4ukx5hqkafmeplarmyqe4n4
  libmysql/CMakeLists.txt        sp1f-cmakelists.txt-20060831175237-3bbprkzqdl3gopcnlt3evmaikau67bcq
  libmysql/Makefile.shared       sp1f-makefile.shared-20000818182429-m3kdhxi23vorlqjct2y2hl3yw357jtxt
  libmysql/client_settings.h     sp1f-client_settings.h-20030531101544-okmiu3y2nwc6oho7o5jd2upiijkxam3j
  libmysql/errmsg.c              sp1f-errmsg.c-19700101030959-fjm737sxlztiozvjun2g5h3k5q57qppf
  libmysql/libmysql.c            sp1f-libmysql.c-19700101030959-ba4gwsjdmik5puh2qyrfpvoflwer257l
  libmysqld/CMakeLists.txt       sp1f-cmakelists.txt-20060403082523-x3vxka3k56u2wpzwcrlpykznlz2akpxd
  libmysqld/Makefile.am          sp1f-makefile.am-20010411110351-26htpk3ynkyh7pkfvnshztqrxx3few4g
  libmysqld/embedded_priv.h      sp1f-embedded_priv.h-20011002025259-xzqsqkpvekfwp24q66ynkjqgtz4bq2pj
  libmysqld/lib_sql.cc           sp1f-lib_sql.cc-20010411110351-gt5febleap73tqvapkesopvqtuht5sf5
  libmysqld/libmysqld.c          sp1f-libmysqld.c-20010411110351-4556sgf6vpnoounnscj2q6zw56ccl332
  mysql-test/Makefile.am         sp1f-makefile.am-20001206082022-36vvdlhec52v4kcxab5ees7yomxvj4dl
  mysql-test/include/have_maria.inc sp1f-have_maria.inc-20060411134401-74cvqkcqz54vxrbgmumocerfs6qss242
  mysql-test/include/have_xtradb.inc have_xtradb.inc-20100803210901-rs1f342hr3r004e4-2
  mysql-test/include/maria_empty_logs.inc sp1f-maria_empty_logs.inc-20071113161227-ndxpipzwp33lgtq7hd2ztaenz7talfmb
  mysql-test/include/maria_make_snapshot_for_feeding_recovery.inc sp1f-maria_make_snapshot_-20071113161227-bujsdhnn6d3wcrd5zqsjgyx3oh7x734x
  mysql-test/include/maria_verify_recovery.inc sp1f-maria_verify_recover-20071113161227-axcijvanncncolqrc433no2u5pjiq5wi
  mysql-test/lib/mtr_cases.pm    sp1f-mtr_cases.pl-20050203205008-rrteoawyobvgq6u7zeyce4tmuu334ayg
  mysql-test/lib/v1/mysql-test-run.pl mtrv1.pl-20081114074002-vy3rb5dcxdfqqvah-1
  mysql-test/mysql-test-run.pl   sp1f-mysqltestrun.pl-20041230152716-xjnn5ndv4rr4by6ijmj5a4ysubxc7qh3
  mysql-test/r/change_user.result sp1f-change_user.result-20071016152919-zbapref5o6xc64evacihf7rkq5pxezed
  mysql-test/r/connect.result    sp1f-connect.result-20021205110110-stxwtj2vtbhl6fx3xr6zans2byprrfhc
  mysql-test/r/events_bugs.result sp1f-events_bugs.result-20060220225211-jzbz6uk6vlho4vlbzbfymaub54fll3ou
  mysql-test/r/grant.result      sp1f-grant.result-20020905131705-2gfwpyej777fcllxzcvadzd6tqdxfho3
  mysql-test/r/grant2.result     sp1f-grant2.result-20030722200047-flh2uaxcbwah7yfj5uohcoxndutgaced
  mysql-test/r/information_schema.result sp1f-information_schema.r-20041113105544-waoxa2fjjsicturpothmjmi6jc3yrovn
  mysql-test/r/information_schema_all_engines.result information_schema_a-20090408133348-au36idguotknighe-2
  mysql-test/r/information_schema_db.result sp1f-information_schema_d-20050506190605-i2emmavt52skkx7n6b5jklprebhrdrxo
  mysql-test/r/key_cache.result  sp1f-key_cache.result-20030706160952-w2k4i7umxfnkjp2xhhkmacoikxgxrpw5
  mysql-test/r/log_slow.result   log_slow.result-20090903130213-g4uekoxftd69o7cr-1
  mysql-test/r/log_tables.result sp1f-log_tables.result-20060119025601-mp6o7xc6ybvlt3zc6j5kvlfvs6upl7aj
  mysql-test/r/plugin.result     sp1f-plugin.result-20061214230953-dljmjo3wuacc3eox3gwroufqmk3hlne7
  mysql-test/r/ps.result         sp1f-ps.result-20040405154119-efxzt5onloys45nfjak4gt44kr4awkdi
  mysql-test/r/sp.result         sp1f-sp.result-20030117133802-duandg3yzagzyv7zhhbbt2kcomcegpc7
  mysql-test/r/sp_notembedded.result sp1f-sp_notembedded.resul-20060224163410-okgh2uh6w7jxcoszw5y4sk6pq3ngt5n6
  mysql-test/r/system_mysql_db.result sp1f-system_mysql_db.resu-20040310185404-f7br5g4442iqwxireltudlyu5ppbkijo
  mysql-test/suite/binlog/r/binlog_index.result sp1f-binlog_index.result-20080317181903-axnmkwnuuu6l3mwrtun7rig7lcfcsg7r
  mysql-test/suite/binlog/t/binlog_index.test sp1f-binlog_index.test-20080317181903-dbjxnu4iciqjlbq6m3a26wpp4kir4km3
  mysql-test/suite/funcs_1/datadict/is_routines.inc is_routines.inc-20080616173239-ix495ppzuvfztxtp-1
  mysql-test/suite/funcs_1/datadict/is_triggers.inc is_triggers.inc-20080616173844-eisfa6g47d5u2dyu-1
  mysql-test/suite/funcs_1/datadict/is_views.inc is_views.inc-20080616173951-t1vpprqbs4bxzxyh-1
  mysql-test/suite/funcs_1/datadict/processlist_priv.inc sp1f-processlist_priv.inc-20070815194641-da67ub26jjvt6hw6xorwk7twwxj6wofg
  mysql-test/suite/funcs_1/datadict/processlist_val.inc sp1f-processlist_val.inc-20070815194641-3hfsmyh3jr2gjhvgms52iydpkamdbnoz
  mysql-test/suite/funcs_1/datadict/tables2.inc sp1f-tables2.inc-20080307163305-ao7hz2ott2tj4o2kkqjc2gc24niwcd5u
  mysql-test/suite/funcs_1/r/is_columns_is.result sp1f-is_columns_is.result-20080307163304-7bd6seaxklddmff6f3bb54inlyw6unpw
  mysql-test/suite/funcs_1/r/is_columns_is_embedded.result is_columns_is_embedd-20080616171935-sl04j972o55obadv-5
  mysql-test/suite/funcs_1/r/is_columns_mysql.result sp1f-is_columns_mysql.res-20080307163304-a2ymkif2vzliwqqqzr22cglbaf75tthe
  mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result is_columns_mysql_emb-20080616171935-sl04j972o55obadv-7
  mysql-test/suite/funcs_1/r/is_engines_innodb.result sp1f-is_engines_innodb.re-20080307191812-ibbouhmgdzl7mgzxwq4mgx7scaxz6r5q
  mysql-test/suite/funcs_1/r/is_tables_is.result sp1f-is_tables_is.result-20080307163304-6xl5vbegso6wet3dzoehxb645vntxpig
  mysql-test/suite/funcs_1/r/is_user_privileges.result sp1f-is_user_privileges.r-20080307163304-pazl4cp4zueveyfp4jg5cdopgvhkegup
  mysql-test/suite/funcs_1/t/is_columns.test sp1f-is_columns.test-20080307163303-oc6d2ty4yotleyggin56cmja47omykqf
  mysql-test/suite/funcs_1/t/is_events.test sp1f-is_events.test-20080307191812-ff6ss7aktfqpbhycwnpfx43mlepsxpjv
  mysql-test/suite/funcs_1/t/is_tables_is.test sp1f-is_tables_is.test-20080307163304-fqbudydo3v4l2g23kbb2sdjkuxoa4zwl
  mysql-test/suite/innodb/t/innodb_bug57255.test innodb_bug57255.test-20101006082321-u0shwcs81hk0xzxd-1
  mysql-test/suite/innodb_plugin/t/innodb_bug57255.test innodb_bug57255.test-20101006043254-dm9pznoef31uunxi-1
  mysql-test/suite/maria/r/maria-autozerofill.result mariaautozerofill.re-20080707195605-a7q25y7nbr4vfpjx-1
  mysql-test/suite/maria/r/maria-big.result sp1f-mariabig.result-20070619140102-6bfmnediygmwvz2gwfuoiz6hdphnawbh
  mysql-test/suite/maria/r/maria-big2.result mariabig2.result-20080709121120-xosi6sq42tvv54ud-1
  mysql-test/suite/maria/r/maria-connect.result sp1f-mariaconnect.result-20070701132047-4gbzg7krnsfmlzli3uyishrxexlaev22
  mysql-test/suite/maria/r/maria-gis-rtree-dynamic.result sp1f-mariagisrtreedynamic-20080424152247-mm2xo5yxdfll4qk3gsowpoofwzl3btku
  mysql-test/suite/maria/r/maria-gis-rtree-trans.result sp1f-mariagisrtreetrans.r-20080424152247-fskt76jxermjkzy5actrdgxmmaj5tss4
  mysql-test/suite/maria/r/maria-gis-rtree.result sp1f-mariagisrtree.result-20080317213148-anc53ckrfvqobwbpppedtol3d2vw22le
  mysql-test/suite/maria/r/maria-mvcc.result sp1f-mariamvcc.result-20080410022634-implvnpt6vhmzd7mznsbds2aow2gak24
  mysql-test/suite/maria/r/maria-no-logging.result marianologging.resul-20080606091220-anqi2lfysyiw7im5-1
  mysql-test/suite/maria/r/maria-page-checksum.result sp1f-mariapagechecksum.re-20080320150519-o5vg3sy5qhmumde6rjd2yjckfwzmvg72
  mysql-test/suite/maria/r/maria-partitioning.result mariapartitioning.re-20081222001844-sows5sdx3gsfucse-1
  mysql-test/suite/maria/r/maria-preload.result sp1f-mariapreload.result-20080304114700-5uurscio7g7lodoyp2zmzo27up5vsjsc
  mysql-test/suite/maria/r/maria-purge.result sp1f-mariapurge.result-20071209173548-phbruaslf2zsvwoq3drvomaqp65ukhyc
  mysql-test/suite/maria/r/maria-recover.result mariarecover.result-20080602174048-lgw3ipowzkym118b-1
  mysql-test/suite/maria/r/maria-recovery-big.result sp1f-mariarecoverybig.res-20080129212056-e2nqif4o4vlbpjquw4ju6yyko4lr2355
  mysql-test/suite/maria/r/maria-recovery-bitmap.result sp1f-mariarecoverybitmap.-20071214151408-ow2vctoxjipvj7arhi26hwia46if3mo5
  mysql-test/suite/maria/r/maria-recovery-rtree-ft.result sp1f-mariarecoveryrtreeft-20080424152247-lrcc6d2vew2pui4jxioq56ygawfdbbov
  mysql-test/suite/maria/r/maria-recovery.result sp1f-mariarecovery.result-20071113161226-4ikhajwthzydx72yv7zg6ma62ul7qf6i
  mysql-test/suite/maria/r/maria-recovery2.result mariarecovery2.resul-20080630093411-1pwfhsjq1fv1w1gc-1
  mysql-test/suite/maria/r/maria-recovery3.result mariarecovery3.resul-20081205205908-rmzqlwpooitktflk-1
  mysql-test/suite/maria/r/maria.result sp1f-maria.result-20060411134403-xrrw2657ctr6et4vhmohpoev5ze42pti
  mysql-test/suite/maria/r/maria2.result maria2.result-20080610144221-ymf04pu1fuu7grwu-1
  mysql-test/suite/maria/r/maria3.result maria3.result-20080701120735-95p69v855sl5nh1m-1
  mysql-test/suite/maria/r/maria_notembedded.result sp1f-maria_notembedded.re-20080215172951-s2lcvra4f7i7xsk52wrlbcrxxw5nj76u
  mysql-test/suite/maria/r/maria_partition.result maria_partition.resu-20081015091527-zr8qltd2hkb5x37r-1
  mysql-test/suite/maria/r/maria_showlog_error.result maria_showlog_error.-20081201125505-0n1ck3tbq37gaapp-1
  mysql-test/suite/maria/r/ps_maria.result sp1f-ps_maria.result-20060411134403-dmqfdnvwryhqidpvozasc6ref3gwm72a
  mysql-test/suite/maria/t/maria-autozerofill.test mariaautozerofill.te-20080707195601-x71s8bvwzcns888r-1
  mysql-test/suite/maria/t/maria-big.test sp1f-mariabig.test-20070619140102-xqtr3tuarbp7i6jw7klz2pg3q372m5zc
  mysql-test/suite/maria/t/maria-big2.test mariabig2.test-20080709121115-2nzan35ku90c7gjg-1
  mysql-test/suite/maria/t/maria-connect.test sp1f-mariaconnect.test-20070701132047-bhh5koqtfaxhl4ossujqnovyb4djcgcb
  mysql-test/suite/maria/t/maria-gis-rtree-dynamic.test sp1f-mariagisrtreedynamic-20080424152247-akspe7dd5esoc3zy7b67dfrts6jisdf6
  mysql-test/suite/maria/t/maria-gis-rtree-trans.test sp1f-mariagisrtreetrans.t-20080424152247-6obmkz22dy5b4vd5mvn2uhnulyzlsln3
  mysql-test/suite/maria/t/maria-gis-rtree.test sp1f-mariagisrtree.test-20080317213148-mfmiqq3nkydy3eb2wr6jwumoovvdebpc
  mysql-test/suite/maria/t/maria-mvcc.test sp1f-mariamvcc.test-20080410022634-hltnmseqewkd2ftywdb5lpdazrqjx6oi
  mysql-test/suite/maria/t/maria-no-logging.test marianologging.test-20080606091226-n0a8nhb20sn0fprk-1
  mysql-test/suite/maria/t/maria-page-checksum.test sp1f-mariapagechecksum.te-20080320150519-s4szccqrqlbqv53yzwus7bf6rx5vh7rg
  mysql-test/suite/maria/t/maria-partitioning.test mariapartitioning.te-20081222001844-sows5sdx3gsfucse-2
  mysql-test/suite/maria/t/maria-preload.test sp1f-mariapreload.test-20080304114700-4g7kk5s33imgoqijhx4s72tapr2wwnmv
  mysql-test/suite/maria/t/maria-purge.test sp1f-mariapurge.test-20071209173548-jdphsopvezzv36ey422swm3al4jysgxn
  mysql-test/suite/maria/t/maria-recover-master.opt mariarecovermaster.o-20080602174100-yjeycsu923kmyqdo-1
  mysql-test/suite/maria/t/maria-recover.test mariarecover.test-20080602174033-rnr5wg8wn2bqarwk-1
  mysql-test/suite/maria/t/maria-recovery-big.test sp1f-mariarecoverybig.tes-20080129212056-ujba6c33frexkbb6tejsekbzw3ndfoda
  mysql-test/suite/maria/t/maria-recovery-bitmap.test sp1f-mariarecoverybitmap.-20071214151408-hepriqx6lrf3yi7ziu3iv2pols7as7kw
  mysql-test/suite/maria/t/maria-recovery-master.opt sp1f-mariarecoverymaster.-20071113161226-e6dfp7zn6brzbdpjekqe4325qkgp5zdo
  mysql-test/suite/maria/t/maria-recovery-rtree-ft.test sp1f-mariarecoveryrtreeft-20080424152247-kenhqndeoiwuzg35ndwmgx3zhd3wguil
  mysql-test/suite/maria/t/maria-recovery.test sp1f-mariarecovery.test-20071113161226-uhzol2qx5pyvpyswdcgzjdhokcddc64q
  mysql-test/suite/maria/t/maria-recovery2-master.opt mariarecovery2master-20080630093401-xzvz0rumgt352cnt-1
  mysql-test/suite/maria/t/maria-recovery2.test mariarecovery2.test-20080630093404-pegh19k54jubpybe-1
  mysql-test/suite/maria/t/maria-recovery3-master.opt mariarecovery3master-20081205205903-317gbchmn7ps9xh6-1
  mysql-test/suite/maria/t/maria-recovery3.test mariarecovery3.test-20081205205903-317gbchmn7ps9xh6-2
  mysql-test/suite/maria/t/maria.test sp1f-maria.test-20060411134404-s3la6iju5f4ypzjqoye6y5fnapridjtq
  mysql-test/suite/maria/t/maria2.test maria2.test-20080610144217-8qes7apelsbv7too-1
  mysql-test/suite/maria/t/maria3.test maria3.test-20080701120729-b8g279bfeomagayo-1
  mysql-test/suite/maria/t/maria_notembedded.test sp1f-maria_notembedded.te-20080215172951-5hidvc2urne42um2fd2qrxjfopbap3y4
  mysql-test/suite/maria/t/maria_partition.test maria_partition.test-20081015091533-w490os33vyls61qe-1
  mysql-test/suite/maria/t/maria_showlog_error.test maria_showlog_error.-20081201125447-31bi2hcm97tvnnqx-1
  mysql-test/suite/maria/t/optimize.test optimize.test-20100716103457-55syz5lg805122w3-1
  mysql-test/suite/maria/t/ps_maria.test sp1f-ps_maria.test-20060411134404-7perzmgaapryfdoppb6vdo4x2bjtuyzt
  mysql-test/suite/parts/r/partition_alter2_1_maria.result partition_alter2_1_m-20081121141947-lh5ecnr2v4dkwli4-1
  mysql-test/suite/parts/r/partition_alter2_2_maria.result partition_alter2_2_m-20081121141947-lh5ecnr2v4dkwli4-2
  mysql-test/suite/parts/r/partition_auto_increment_maria.result partition_auto_incre-20081121141947-lh5ecnr2v4dkwli4-3
  mysql-test/suite/parts/t/partition_alter2_1_maria.test partition_alter2_1_m-20081121141924-3a12t18v91jq9g3g-1
  mysql-test/suite/parts/t/partition_alter2_2_maria.test partition_alter2_2_m-20081121141924-3a12t18v91jq9g3g-2
  mysql-test/suite/parts/t/partition_auto_increment_maria.test partition_auto_incre-20081121141924-3a12t18v91jq9g3g-3
  mysql-test/suite/pbxt/r/grant.result grant.result-20090402100035-4ilk9i91sh65vjcb-65
  mysql-test/suite/pbxt/r/group_min_max.result group_min_max.result-20090402100035-4ilk9i91sh65vjcb-69
  mysql-test/suite/pbxt/r/mysqlshow.result mysqlshow.result-20090402100035-4ilk9i91sh65vjcb-101
  mysql-test/suite/pbxt/r/null_key.result null_key.result-20090402100035-4ilk9i91sh65vjcb-105
  mysql-test/suite/pbxt/r/partition_pruning.result partition_pruning.re-20090402100035-4ilk9i91sh65vjcb-117
  mysql-test/suite/pbxt/r/update.result update.result-20090402100035-4ilk9i91sh65vjcb-167
  mysql-test/suite/pbxt/t/multi_update.test multi_update.test-20090402100035-4ilk9i91sh65vjcb-266
  mysql-test/suite/rpl/r/rpl_do_grant.result sp1f-rpl_do_grant.result-20030802214618-dy6h6p3wwcdlud4mk6ivfxsgu5celg5t
  mysql-test/suite/rpl/r/rpl_ignore_table.result sp1f-rpl_ignore_table.res-20060126104952-svpxglcsyoqy5jrw3x37qupityffbq6w
  mysql-test/suite/rpl/r/rpl_stm_000001.result sp1f-rpl000001.result-20010116163624-seoa5zygxq5ibscm6kld7cneoimbmer4
  mysql-test/suite/rpl/t/rpl_do_grant.test sp1f-rpl_do_grant.test-20030802214619-wincvjltx3w7wntnmnquss36fcszy2wa
  mysql-test/t/bug46080-master.opt bug46080master.opt-20090710115544-bi718vttwzhdrezd-2
  mysql-test/t/change_user.test  sp1f-change_user.test-20071016152919-siao4lhgis4if5tewqdwjralhztzsdjm
  mysql-test/t/connect.test      sp1f-connect.test-20021205110110-v67xayqogvmtfmfyqvhxpazso6arr3b3
  mysql-test/t/create.test       sp1f-create.test-20001228015635-grq5cruh7q3juapcegeza6mshjkzsxzo
  mysql-test/t/events_bugs.test  sp1f-events_bugs.test-20060220225212-ji5acdijogityb45kk4msvs7h5gn4ld3
  mysql-test/t/information_schema_all_engines.test information_schema_a-20090408133348-au36idguotknighe-3
  mysql-test/t/key_cache.test    sp1f-key_cache.test-20030706160953-6x2j5dylosddn4u4trvxucynzlthvyjw
  mysql-test/t/log_slow.test     log_slow.test-20090903130444-i0i8h0k5qt9xatcx-2
  mysql-test/t/plugin.test       sp1f-plugin.test-20061214230953-rdqkovjzpupoeypjzzvefseahkmrdz4f
  mysql-test/t/sp.test           sp1f-sp.test-20030117133803-b6pcfv2yscbqkur5fszep7acmdg7nf5k
  mysql-test/valgrind.supp       sp1f-valgrind.supp-20050406142216-yg7xhezklqhgqlc3inx36vbghodhbovy
  mysys/Makefile.am              sp1f-makefile.am-19700101030959-36zaboyabq4ooqfc2jpion3pic7yhpgb
  mysys/charset-def.c            sp1f-charsetdef.c-20031006195631-2zdalecmihnwhbxa6t6z67yy7avh5zgj
  mysys/charset.c                sp1f-charset.c-19700101030959-5zcsgxug5xkrzzvqsq6sm2nyc6has42i
  mysys/mf_keycache.c            sp1f-mf_keycache.c-19700101030959-wtigyxt4n6zscc6ezr56wziqguyc5bds
  mysys/mf_soundex.c             sp1f-mf_soundex.c-19700101030959-oimgkehn4ys6vzuykc3grfz3lcbtjsav
  mysys/my_getopt.c              sp1f-my_getopt.c-20020125212008-5ppwsdqmfhny46gxkjxph22zh3phetir
  mysys/my_getsystime.c          sp1f-my_getsystime.c-20040302212107-h5blakn74xewolernjfpc23tn623kllm
  plugin/daemon_example/Makefile.am sp1f-makefile.am-20061111012154-qsjmuxl7tumesqnmmnvrlpe523w362jw
  plugin/daemon_example/daemon_example.cc sp1f-daemon_example.c-20061111012154-pap3nupaza2ssvtmjkw5lq7l2yvwcdcv
  plugin/fulltext/plugin_example.c sp1f-plugin_example.c-20051228120521-okmw6cytrbhx3kpxsuswy6v7agqdiaik
  scripts/make_binary_distribution.sh sp1f-make_binary_distribu-19700101030959-efrhw236bzgbhabfsq3ygx5pkfitz7wy
  scripts/make_win_bin_dist      sp1f-make_win_bin_dist-20060901123056-xnusgszvkfrrcxkqidb7zszax2ezpyto
  scripts/mysql_system_tables.sql sp1f-mysql_system_tables.-20070226104923-4n5a67fuifobcyhhicfbacpsv5npohgv
  scripts/mysql_system_tables_data.sql sp1f-mysql_system_tables_-20070228132657-d5rhtq2llskgbamckkhqbq2rj3v6m7db
  scripts/mysql_system_tables_fix.sql sp1f-mysql_fix_privilege_-20030604152848-cz6lnrig5srcrvkt7d5m35bk3wsz4bdc
  server-tools/CMakeLists.txt    sp1f-cmakelists.txt-20060831175237-aqis5eg2uwsmjtfysusmi4yslihjjkmy
  server-tools/instance-manager/CMakeLists.txt sp1f-cmakelists.txt-20060831175237-odaylgvbqfabopzjlssuey6qon5k7v62
  server-tools/instance-manager/Makefile.am sp1f-makefile.am-20030816174359-42ckvxo73cq2m2yodlivbjpelrknslyi
  server-tools/instance-manager/user_map.cc sp1f-user_map.cc-20041023073155-hsq3vemyam75rv6ejrax7idczyxqkybc
  sql-common/Makefile.am         sp1f-makefile.am-20030618210733-e7fa37urwjfllebdjcn76asb7ynhj4hi
  sql-common/client.c            sp1f-client.c-20030502160736-oraaciqy6jkfwygs6tqfoaxgjbi65yo7
  sql/CMakeLists.txt             sp1f-cmakelists.txt-20060831175237-esoeu5kpdtwjvehkghwy6fzbleniq2wy
  sql/Makefile.am                sp1f-makefile.am-19700101030959-xsjdiakci3nqcdd4xl4yomwdl5eo2f3q
  sql/authors.h                  sp1f-authors.h-20051110174234-367jrukegwdqmqdvrbm5qolzbxm5lfb2
  sql/client_settings.h          sp1f-client_settings.h-20030531101544-rb7ykljjpb7sa6qz7mw6b7tknqpxgrds
  sql/event_data_objects.cc      sp1f-event_timed.cc-20051205104456-ckd2gzuwhr4u5umqbncmt43nvv45pxmf
  sql/event_data_objects.h       sp1f-event_timed.h-20060620150533-lr25djmuizh5be5nbkd5g2hfysngecpn
  sql/event_db_repository.cc     sp1f-event_db_repository.-20060627064838-k6rpjg72omnihtxhbubu6ht7wjvxggb7
  sql/event_db_repository.h      sp1f-event_db_repository.-20060627064839-ckucodefgivl3ypogwzecknmh6sftsdl
  sql/event_parse_data.h         sp1f-event_parse_data.h-20080509074300-mje33maqnolptb74qo3ineka5mgwavhy
  sql/events.cc                  sp1f-event.cc-20051202122200-as66hughd4bhrhu2uqbb6mpogou2yihk
  sql/events.h                   sp1f-event.h-20051202122201-5zk35gz7st76sbull4634hwsro2wrq5d
  sql/field.cc                   sp1f-field.cc-19700101030959-f4imaofclsea3n4fj4ow5m7havmyxa2r
  sql/field.h                    sp1f-field.h-19700101030959-3n6smzxcwkjl7bikm3wg4hfkjn66uvvp
  sql/filesort.cc                sp1f-filesort.cc-19700101030959-mfm2vmdgqqru7emm2meeecleb2q3zdso
  sql/ha_ndbcluster.cc           sp1f-ha_ndbcluster.cc-20040414175836-rvqnoxrkqexyhfu3d62s4t345ip7rez2
  sql/ha_ndbcluster_binlog.cc    sp1f-ha_ndbcluster_binlog-20060112185048-3hthowbxyrrly3srxavlrufjf5mmgqm6
  sql/ha_partition.cc            sp1f-ha_partition.cc-20050718113037-eoky4qluumb5dmdyg5z6n2fvdkgutxms
  sql/ha_partition.h             sp1f-ha_partition.h-20050718113038-4xxwqkuu2xgxqtrwfbc43zgfyfcwzjsq
  sql/handler.cc                 sp1f-handler.cc-19700101030959-ta6zfrlbxzucylciyro3musjsdpocrdh
  sql/handler.h                  sp1f-handler.h-19700101030959-mumq2hpilkpgxuf22ftyv5kbilysnzvn
  sql/hash_filo.h                sp1f-hash_filo.h-19700101030959-nit3b7zi6fgcugapfgolp3olyyft7nzo
  sql/item.cc                    sp1f-item.cc-19700101030959-u7hxqopwpfly4kf5ctlyk2dvrq4l3dhn
  sql/item.h                     sp1f-item.h-19700101030959-rrkb43htudd62batmoteashkebcwykpa
  sql/item_cmpfunc.cc            sp1f-item_cmpfunc.cc-19700101030959-hrk7pi2n6qpwxauufnkizirsoucdcx2e
  sql/item_cmpfunc.h             sp1f-item_cmpfunc.h-19700101030959-pcvbjplo4e4ng7ibynfhcd6pjyem57gr
  sql/item_func.cc               sp1f-item_func.cc-19700101030959-3wmsx76yvc25sroqpfrx2n77kqdxxn3y
  sql/item_func.h                sp1f-item_func.h-19700101030959-fbjcbwkg66qubbzptqwh5w5evhnpukze
  sql/item_row.h                 sp1f-item_row.h-20021115183204-x25ouues4bddw4mt6qqjchrgmtmn4kit
  sql/item_strfunc.cc            sp1f-item_strfunc.cc-19700101030959-yl2pwnrngmla3nmlgiuiwrztx3iu4ffl
  sql/item_strfunc.h             sp1f-item_strfunc.h-19700101030959-x4djohef3q433aqvcrybhjmclafdu4sx
  sql/item_subselect.cc          sp1f-item_subselect.cc-20020512204640-qep43aqhsfrwkqmrobni6czc3fqj36oo
  sql/item_subselect.h           sp1f-item_subselect.h-20020512204640-qdg77wil56cxyhtc2bjjdrppxq3wqgh3
  sql/item_sum.cc                sp1f-item_sum.cc-19700101030959-4woo23bi3am2t2zvsddqbpxk7xbttdkm
  sql/item_sum.h                 sp1f-item_sum.h-19700101030959-ecgohlekwm355wxl5fv4zzq3alalbwyl
  sql/item_timefunc.h            sp1f-item_timefunc.h-19700101030959-o34ypz6ggolzqmhgsjnqh6inkvgugi46
  sql/item_xmlfunc.cc            sp1f-item_xmlfunc.cc-20051221130500-wo5dgojvjjm6mmra7fay3ri7ud5ow3yl
  sql/item_xmlfunc.h             sp1f-item_xmlfunc.h-20051221130500-4iwttnw4seleagi5wa2whs6uxkuunprm
  sql/key.cc                     sp1f-key.cc-19700101030959-are4n4gcbltuapzes3nqirfwlls4w3p3
  sql/lex.h                      sp1f-lex.h-19700101030959-kgskvzpk2ukijkq7j5hh5qfokeacy6qf
  sql/log.cc                     sp1f-log.cc-19700101030959-r3hdfovek4kl6nd64ovoaknmirota6bq
  sql/log.h                      sp1f-log.h-20051222053446-ggv6hdi5fnxggnjemezvv7n2bcbkx45e
  sql/log_event.cc               sp1f-log_event.cc-19700101030959-msmqlflsngxosswid2hpzxly5vfqdddc
  sql/log_event.h                sp1f-log_event.h-19700101030959-clq6ett55tcqbpys2i4cpfrdccq7j4om
  sql/log_event_old.cc           sp1f-log_event_old.cc-20070412135046-uu5xq4cnpwslzif6fbmj3g65x4vdkzxu
  sql/mysql_priv.h               sp1f-mysql_priv.h-19700101030959-4fl65tqpop5zfgxaxkqotu2fa2ree5ci
  sql/mysqld.cc                  sp1f-mysqld.cc-19700101030959-zpswdvekpvixxzxf7gdtofzel7nywtfj
  sql/opt_range.cc               sp1f-opt_range.cc-19700101030959-afe3wtevb7zwrg4xyibt35uamov5r7ds
  sql/opt_range.h                sp1f-opt_range.h-19700101030959-c2qbh5kplyvzfgawblxt4md4ubdpxfdy
  sql/opt_sum.cc                 sp1f-opt_sum.cc-19700101030959-ygmsylwaxwx3wf77i2nv2hdupycvexro
  sql/opt_table_elimination.cc   opt_table_eliminatio-20090625095316-7ka9w3zr7n5114iv-1
  sql/parse_file.h               sp1f-parse_file.h-20040511202306-r7sjfgdtjpiwx5vhwalc4kygekd3m6po
  sql/partition_info.cc          sp1f-partition_info.cpp-20060216163637-eco35bnz46tcywduzmpjofzudmzlgyog
  sql/password.c                 sp1f-password.c-19700101030959-hyqrqz6vp4g26qbqvd4fq6z2ecdiqerx
  sql/procedure.h                sp1f-procedure.h-19700101030959-s7v5ehgygi5xckgtoaiof5gvrty4i3w4
  sql/protocol.cc                sp1f-net_pkg.cc-19700101030959-7izj6xxqwgfgxuikg6t24dhcwdedbl6i
  sql/protocol.h                 sp1f-protocol.h-20021211071747-atezjtpiyby4so64hlg3lnnrbpmdi73x
  sql/records.cc                 sp1f-records.cc-19700101030959-xg6elqzdqhvrmobazxrjajmiyqxf7lx7
  sql/rpl_filter.cc              sp1f-table_filter.cc-20050308201116-4anzb26smj76r56ihkpxzbtnzlzatr2k
  sql/rpl_filter.h               sp1f-table_filter.h-20050308201116-ynbrrxlqijcoxfwgnipwjhgfw7vhdytw
  sql/rpl_mi.h                   sp1f-rpl_mi.h-20061031155149-ty2i7rlwssgopgfuvbkilxy4c5miasqn
  sql/set_var.cc                 sp1f-set_var.cc-20020723153119-nwbpg2pwpz55pfw7yfzaxt7hsszzy7y3
  sql/set_var.h                  sp1f-set_var.h-20020723153119-2yomygq3s4xjbqvuue3cdlpbjtj3kwmk
  sql/share/errmsg.txt           sp1f-errmsg.txt-20041213212820-do5w642w224ja7ctyqhyl6iihdmpkzv5
  sql/slave.cc                   sp1f-slave.cc-19700101030959-a636aj3mjxgu7fnznrg5kt77p3u2bvhh
  sql/sp.cc                      sp1f-sp.cc-20021212121421-6xwuvxq5bku2b4yv655kp2e5gsvautd5
  sql/sp_head.cc                 sp1f-sp_head.cc-20021208185920-jtgc5wvyqdnu2gvcdus3gazrfhxbofxd
  sql/sp_rcontext.h              sp1f-sp_rcontext.h-20021208185920-frvp5kzpvbihtj2nqj2wbppthxpz4ycg
  sql/sql_acl.cc                 sp1f-sql_acl.cc-19700101030959-c4hku3uqxzujthqnndeprbrhamqy6a4i
  sql/sql_acl.h                  sp1f-sql_acl.h-19700101030959-byf4bn7yfbxu6wa6z76kqcuspjl67msj
  sql/sql_analyse.h              sp1f-sql_analyse.h-19700101030959-q7hc7yhemp5ubjwghlvcodex67tx55rr
  sql/sql_base.cc                sp1f-sql_base.cc-19700101030959-w7tul2gb2n4jzayjwlslj3ybmf3uhk6a
  sql/sql_bitmap.h               sp1f-sql_bitmap.h-20031024204444-g4eiad7vopzqxe2trxmt3fn3xsvnomvj
  sql/sql_builtin.cc.in          sp1f-sql_builtin.cc.in-20060413204924-2uqxqmqkyuh3wtmodadlo23ag3lchfp6
  sql/sql_cache.cc               sp1f-sql_cache.cc-19700101030959-74bsqwcnhboovijsogcenqana5inu6wo
  sql/sql_cache.h                sp1f-sql_cache.h-20011202123401-gegktsz2a3er7fqwpmpoejydzpkeadeo
  sql/sql_class.cc               sp1f-sql_class.cc-19700101030959-rpotnweaff2pikkozh3butrf7mv3oero
  sql/sql_class.h                sp1f-sql_class.h-19700101030959-jnqnbrjyqsvgncsibnumsmg3lyi7pa5s
  sql/sql_connect.cc             sp1f-sql_connect.cc-20070223111352-fhh5znxdfvzxuca7da3uu4olnwgkrm4n
  sql/sql_cursor.cc              sp1f-sql_cursor.cc-20050921221059-bbaoove6aneee3jlqberlbdxsq7k3qrl
  sql/sql_delete.cc              sp1f-sql_delete.cc-19700101030959-ch2a6r6ushvc2vfwxt7ehcjuplelwthr
  sql/sql_handler.cc             sp1f-sql_handler.cc-20010406221833-l4tsiortoyipmoyajcoz2tcdppvyeltl
  sql/sql_help.cc                sp1f-sql_help.cc-20021028134345-scihcmde54rtp5lyeqjt5ez6tgs2wvzb
  sql/sql_insert.cc              sp1f-sql_insert.cc-19700101030959-xgwqe5svnimxudzdcuitauljzz2zjk5g
  sql/sql_lex.cc                 sp1f-sql_lex.cc-19700101030959-4pizwlu5rqkti27gcwsvxkawq6bc2kph
  sql/sql_lex.h                  sp1f-sql_lex.h-19700101030959-sgldb2sooc7twtw5q7pgjx7qzqiaa3sn
  sql/sql_parse.cc               sp1f-sql_parse.cc-19700101030959-ehcre3rwhv5l3mlxqhaxg36ujenxnrcd
  sql/sql_partition.cc           sp1f-sql_partition.cc-20050718113038-57h5bzswps6cel2y7k7qideue3ghbg3u
  sql/sql_plugin.cc              sp1f-sql_plugin.cc-20051105112032-hrm64p6xfjq33ud6zy3uivpo7azm75a2
  sql/sql_plugin.h               sp1f-sql_plugin.h-20051105112032-zbh53e3gtkwr4zcntlb42fx3w6cr7ilm
  sql/sql_prepare.cc             sp1f-sql_prepare.cc-20020612210720-gtqjjiu7vpmfxb5xct2qke7urmqcabli
  sql/sql_select.cc              sp1f-sql_select.cc-19700101030959-egb7whpkh76zzvikycs5nsnuviu4fdlb
  sql/sql_servers.cc             sp1f-sql_servers.cc-20061202004728-casoctfc22ftno7vvvcsjbokkttngpwa
  sql/sql_show.cc                sp1f-sql_show.cc-19700101030959-umlljfnpplg452h7reeyqr4xnbmlkvfj
  sql/sql_string.cc              sp1f-sql_string.cc-19700101030959-yg6a37s5vnlpgxanuou6h2vbdmwbdxdx
  sql/sql_string.h               sp1f-sql_string.h-19700101030959-nogsoxwv222e4vm4toic7cabeb4swajz
  sql/sql_table.cc               sp1f-sql_table.cc-19700101030959-tzdkvgigezpuaxnldqh3fx2h7h2ggslu
  sql/sql_test.cc                sp1f-sql_test.cc-19700101030959-7fpt436b3qzk75qpy7rqpho7nkesvwuz
  sql/sql_udf.cc                 sp1f-sql_udf.cc-19700101030959-tk7ysmv4dpwkfhtdovfbqe5i6uvq67ft
  sql/sql_update.cc              sp1f-sql_update.cc-19700101030959-edlgskfuer2ylczbw2znrr5gzfefiyw7
  sql/sql_view.cc                sp1f-sql_view.cc-20040715221517-nw4p4mja6nzzlvwwhzfgfqb4umxqobe4
  sql/sql_yacc.yy                sp1f-sql_yacc.yy-19700101030959-wvn4qyy2drpmge7kaq3dysprbhlrv27j
  sql/structs.h                  sp1f-structs.h-19700101030959-dqulhwijezc2pwv2x4g32qdggnybj2nc
  sql/table.cc                   sp1f-table.cc-19700101030959-nsxtem2adyqzwe6nz4cgrpcmts3o54v7
  sql/table.h                    sp1f-table.h-19700101030959-dv72bajftxj5fbdjuajquappanuv2ija
  sql/thr_malloc.cc              sp1f-thr_malloc.cc-19700101030959-sg5hfbdswjtjtdjtmvppuc2eedch3p3s
  sql/tztime.cc                  sp1f-tztime.cc-20040618061123-vlkxaelz3hkrjh7hep3f7jl7frjhlr4l
  sql/unireg.cc                  sp1f-unireg.cc-19700101030959-6a4wymwak6cmvk25gch56ctjvadrhu3v
  sql/unireg.h                   sp1f-unireg.h-19700101030959-6vhptb2vfyo4mcjkgdm3n5uw6u64czfo
  storage/archive/ha_archive.cc  sp1f-ha_archive.cc-20040521001938-uy57z43drkjeirpjafdzdpvfxruqho4q
  storage/blackhole/ha_blackhole.cc sp1f-ha_blackhole.cc-20050323001036-ikllt6ts2equ6w4aru2q3rhdbrn64twz
  storage/csv/ha_tina.cc         sp1f-ha_tina.cc-20040813035429-5pwcme2ehkkuei6gu6ueo4tfldeeyw7l
  storage/example/Makefile.am    sp1f-makefile.am-20051221181830-qhpudfvq7qccif4djsijfcwl2l4igz4a
  storage/example/ha_example.cc  sp1f-ha_example.cc-20040331231732-d55r4dr2e7cf5dutte3f74z6h6yxdywb
  storage/example/ha_example.h   sp1f-ha_example.h-20040331231733-ssl4zmhqjrevhtqixivtivdmlwiau2x5
  storage/federated/Makefile.am  sp1f-makefile.am-20060819041916-ilwys7ffnla6e6h5gtccrx6efgfjprox
  storage/federated/ha_federated.cc sp1f-ha_federated.cc-20041211200120-gu52ex5sicbua5vtoocuki3ltllsvm2c
  storage/federatedx/Makefile.am makefile.am-20091029224633-m824ql737a2j6q5a-9
  storage/federatedx/ha_federatedx.cc ha_federatedx.cc-20091029224633-m824ql737a2j6q5a-6
  storage/heap/ha_heap.cc        sp1f-ha_heap.cc-19700101030959-7nfwz5i2vivul35jawfikfe2qio3rp5n
  storage/heap/hp_create.c       sp1f-hp_create.c-19700101030959-r3lpfh6ord53o3mlewvy4ig2gikmerwl
  storage/heap/hp_rkey.c         sp1f-hp_rkey.c-19700101030959-szy7hbhzbyuotjfx5onpm4uzpngveoa7
  storage/ibmdb2i/db2i_ioBuffers.h db2i_iobuffers.h-20090215021022-15ov21fvravqaicb-21
  storage/ibmdb2i/ha_ibmdb2i.cc  ha_ibmdb2i.cc-20090215021022-15ov21fvravqaicb-30
  storage/innodb_plugin/Makefile.am 2 at 16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2FMakefile.am
  storage/innodb_plugin/handler/ha_innodb.cc 2 at 16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Fhandler%2Fha_innodb.cc
  storage/innodb_plugin/trx/trx0sys.c 2 at 16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Ftrx%2Ftrx0sys.c
  storage/maria/CMakeLists.txt   sp1f-cmakelists.txt-20060904145307-qtvi5bxnxyt7nzs4gtpsyte5vv3fwm2i
  storage/maria/Makefile.am      sp1f-makefile.am-20060411134406-6db4z5hflzf4umyeq7uyzqqoresj2gtb
  storage/maria/ha_maria.cc      sp1f-ha_maria.cc-20060411134405-dmngb4v5x5fxlxhff527ud3etiutxuxk
  storage/maria/ha_maria.h       sp1f-ha_maria.h-20060411134405-vvsjodaugfqw4mekr3sxxnj26gukxxuo
  storage/maria/ma_blockrec.c    sp1f-ma_blockrec.c-20070118193810-5wtbfa4irhu4voa3diiuus5km2j6jvlv
  storage/maria/ma_check.c       sp1f-ma_check.c-20060411134408-m5d5jao4sr32xsjjkig2uhdndqm5cgba
  storage/maria/ma_check_standalone.h sp1f-ma_check_standalone.-20071003161031-zy6jbpaapkfiopgjilyz6crfhjcyqqwq
  storage/maria/ma_checkpoint.c  sp1f-checkpoint.c-20060427140633-z5k7dhnv74atvtq2eap4jgh5qpwetatp
  storage/maria/ma_checkpoint.h  sp1f-checkpoint.h-20060427140634-abwig3q2lgzi6flmtnzpxpjdcgp52e4g
  storage/maria/ma_control_file.c sp1f-control_file.c-20060427140635-onofhvv54akzes4e3tlezmy54d3n4e6i
  storage/maria/ma_control_file.h sp1f-control_file.h-20060427140635-g7uda45xkyn7up2a35hhvvdtqpkid7bb
  storage/maria/ma_create.c      sp1f-ma_create.c-20060411134410-ozzigempkjj2kdgxfbasiwfjzwjejevd
  storage/maria/ma_dbug.c        sp1f-ma_dbug.c-20060411134411-mzxhjrro6hk7ipf3fmcttjwdfqqfpux3
  storage/maria/ma_ft_boolean_search.c sp1f-ma_ft_boolean_search-20060411134414-l4bscelblvehls4cor5iwq3lbxkj4zwx
  storage/maria/ma_ft_parser.c   sp1f-ma_ft_parser.c-20060411134416-kws2xhd3kaxxjif2sauw4k5gztutzjye
  storage/maria/ma_init.c        sp1f-ma_init.c-20060411134421-xondjvbbgljl5sotsqcyuevjzsskvtkl
  storage/maria/ma_loghandler.c  sp1f-ma_loghandler.c-20070202074129-utpzp3km4lrxldm2tdhejae2zy6zlmhq
  storage/maria/ma_loghandler.h  sp1f-ma_loghandler.h-20070202074129-s3537sryeljtck6bbguozuod72mp2gd4
  storage/maria/ma_pagecache.c   sp1f-mf_pagecache.c-20060706081022-sq6xnd367a2snwk4dup6yokn4paw7b5e
  storage/maria/ma_pagecache.h   sp1f-pagecache.h-20060706081022-qkrqzcpklayjj5pf4xbv25i3fdarqo7p
  storage/maria/ma_recovery.c    sp1f-recovery.c-20060427140636-kkuwrxyvjp42wmupdfbxuaro456oprrg
  storage/maria/ma_rt_split.c    sp1f-ma_rt_split.c-20060411134440-xypsc7ylenw3pgtqn4clmmx5yng4g6n5
  storage/maria/ma_search.c      sp1f-ma_search.c-20060411134442-haqjkc7jzp7zkt3fejfz4bdvhobo734v
  storage/maria/ma_sort.c        sp1f-ma_sort.c-20060411134442-cgxklkm2tqazbdc57w5xhs3qxbdcjpmh
  storage/maria/ma_test_force_start.pl ma_test_force_start.-20080602174518-bvsbjpz4t2q7tsmt-1
  storage/maria/maria_chk.c      sp1f-maria_chk.c-20060411134451-6qsrwbln6zdm4nv27ftocrv6iqdyhlti
  storage/maria/maria_dump_log.c maria_dump_log.c-20101117122222-ik4mpxpw0aunkvnv-1
  storage/maria/maria_ftdump.c   sp1f-maria_ftdump.c-20060411134454-xw7hmkx3ryphoh7mqirrxbrnvcewp5yj
  storage/maria/maria_pack.c     sp1f-maria_pack.c-20060411134456-sgjojyjckwwdkgj4uds4zj6wxmiyerel
  storage/maria/maria_read_log.c sp1f-maria_read_log.c-20070626144920-3n32phkjk3xrsid3ksgnuicghunwwfzt
  storage/maria/plug.in          sp1f-plug.in-20060907150715-znaalnem4ft2ccmqjfjw6ddw7ogugezm
  storage/maria/unittest/Makefile.am sp1f-makefile.am-20060912135157-tda5bz77zlj4smu5deodkujswx6vgs3r
  storage/maria/unittest/ma_control_file-t.c sp1f-ma_control_file_test-20060901155307-ygcnd6udkoym2q3ca3kbam2lpei6i6ac
  storage/maria/unittest/ma_maria_log_cleanup.c sp1f-ma_maria_log_cleanup-20070221135405-3rqsbgxu3pn3vdxxxg2behnig2q4gngg
  storage/maria/unittest/ma_test_all-t sp1f-ma_test_allt-20071224053312-okcahonrjjf2d6ynwg4ff4vs6kaxrm22
  storage/maria/unittest/ma_test_loghandler_pagecache-t.c sp1f-ma_test_loghandler_p-20070202074129-2wgklkoi6myfoevx5vmhr53iocs26pcm
  storage/maria/unittest/ma_test_recovery.expected sp1f-ma_test_recovery.exp-20070906140433-qr4734smlg7tzjx3geshzcb2fx6bkyr6
  storage/maria/unittest/ma_test_recovery.pl sp1f-ma_test_recovery.pl-20080201230126-degzj2q4z77yok2vcjahseyrxla2h4vl
  storage/myisam/ft_boolean_search.c sp1f-ft_boolean_search.c-20010411110351-pu6lfsyiumvnnewko2oqbyjz6g3q4xm3
  storage/myisam/ft_parser.c     sp1f-ft_parser.c-19700101030959-goim35zn24ujo7rbznobwhhw5r3lemab
  storage/myisam/ha_myisam.cc    sp1f-ha_myisam.cc-19700101030959-7xzssylbn7zfz3nupnsw43wws6xlltsu
  storage/myisam/ha_myisam.h     sp1f-ha_myisam.h-19700101030959-6vqsvuthz3pkfqplhfwzqrdryoixszpn
  storage/myisam/mi_check.c      sp1f-mi_check.c-19700101030959-yzbhnjgzcmqdyj4zz5codhkkw5eedp6f
  storage/myisam/mi_close.c      sp1f-mi_close.c-19700101030959-vfzd6ivgjccwix7o2yyzgyxbqeuk6zz7
  storage/myisam/mi_dbug.c       sp1f-mi_dbug.c-19700101030959-wxv67bmby4u6kbtrekymncjbvltxmzev
  storage/myisam/mi_delete_all.c sp1f-mi_delete_all.c-19700101030959-w6l5ekoerbik6w3n5bmfhkfgzup436un
  storage/myisam/mi_extra.c      sp1f-mi_extra.c-19700101030959-y5yhfph7parv3zdbew22zss3ho57dgvr
  storage/myisam/mi_keycache.c   sp1f-mi_keycache.c-20030716190226-hiqssou2iom7yxgrh2qftybrwgavz57w
  storage/myisam/mi_locking.c    sp1f-mi_locking.c-19700101030959-27f7n7juexzv4qrhkiwcoylzh4yfibbl
  storage/myisam/mi_page.c       sp1f-mi_page.c-19700101030959-dqdc7c7mejqr2rnsh2hkotch2b6lrrig
  storage/myisam/mi_panic.c      sp1f-mi_panic.c-19700101030959-zrlzy4pxteyissyvx75ngb4v7nr4gcqk
  storage/myisam/mi_preload.c    sp1f-mi_preload.c-20030611165600-rxps6kg3kstoy3ctzurhnvi6czu6yqnx
  storage/myisam/mi_search.c     sp1f-mi_search.c-19700101030959-kdl3zf7h3booyy7xyrnnoejouhznu4cs
  storage/myisam/mi_test1.c      sp1f-mi_test1.c-19700101030959-isaeyxrspgvgjg3k67sd3cyzdmrmktbi
  storage/myisam/mi_test2.c      sp1f-mi_test2.c-19700101030959-34mdjpexgbjcbyn6x5ofspj4t2edh3nw
  storage/myisam/mi_test3.c      sp1f-mi_test3.c-19700101030959-3yn4wc53noyuhc4nphffr4hxesodgfyf
  storage/myisam/myisam_ftdump.c sp1f-ft_dump.c-20010411110351-jbiwe2tgwwoql6m5wgmorbnd5fydlehw
  storage/myisam/myisamchk.c     sp1f-myisamchk.c-19700101030959-hdnrqowbdb3ujo3qgjtzs6lgogwckvgc
  storage/myisam/myisamdef.h     sp1f-myisamdef.h-19700101030959-fzrxvpmzhzqfn5w2clasmcw7af4kanoa
  storage/myisam/myisamlog.c     sp1f-myisamlog.c-19700101030959-curz5f2h5crvlm6bfj5a5el6y4pad2ul
  storage/myisammrg/ha_myisammrg.cc sp1f-ha_myisammrg.cc-19700101030959-7fis6yttnmseasvj7uuicb6o6kghtqxf
  storage/mysql_storage_engine.cmake mysql_storage_engine-20090610083740-kj4pwd9fzdgs1ocd-1
  storage/ndb/include/ndbapi/NdbError.hpp sp1f-ndberror.hpp-20040414082357-ytnshjqhcfdetdtvkzeet5yuvu676ep5
  storage/ndb/include/util/File.hpp sp1f-file.hpp-20040414082357-imtd7kue6bgiujjd6fmsrnx63u3pgu7p
  storage/pbxt/CMakeLists.txt    cmakelists.txt-20090326121724-x683v32twzr3fi0y-11
  storage/xtradb/Makefile.am     makefile.am-20081201061010-zymrrwrczns2vrex-4
  storage/xtradb/fil/fil0fil.c   fil0fil.c-20081201061010-zymrrwrczns2vrex-63
  storage/xtradb/handler/ha_innodb.cc ha_innodb.cc-20081201061010-zymrrwrczns2vrex-70
  storage/xtradb/handler/i_s.cc  i_s.cc-20081201061010-zymrrwrczns2vrex-73
  storage/xtradb/handler/i_s.h   i_s.h-20081201061010-zymrrwrczns2vrex-74
  storage/xtradb/trx/trx0sys.c   trx0sys.c-20081201061010-zymrrwrczns2vrex-358
  strings/conf_to_src.c          sp1f-conf_to_src.c-19700101030959-nvuvqe3jufdn2xi2v44sqkqtdpbbntah
  strings/ctype-big5.c           sp1f-ctypebig5.c-19700101030959-6cf5cz2yuk2totfrhn4wkbdnv2h7dq4b
  strings/ctype-bin.c            sp1f-ctypebin.c-20021023103022-yp52ewkogsbee4owkmbsigoo2qmhxsyw
  strings/ctype-cp932.c          sp1f-ctypecp932.c-20050112013139-evve6ejkfqxb5witjvxcnsrxp526tcuf
  strings/ctype-czech.c          sp1f-ctypeczech.c-19700101030959-fwxewpxo3ku6me4wnqcyhhbimr7pgbao
  strings/ctype-euc_kr.c         sp1f-ctypeeuc_kr.c-19700101030959-xtlkmcyvuckg2nfe6bxqxknimnib2ede
  strings/ctype-eucjpms.c        sp1f-ctypeeucjp_ms.c-20050112013139-g6o6gsnc6mipg6fk6gcn6hf5q54uvjc6
  strings/ctype-extra.c          sp1f-ctypeextra.c-20030129110807-75c3aglmos72axutct436sid7rpl7dpe
  strings/ctype-gb2312.c         sp1f-ctypegb2312.c-19700101030959-dxdbnfhbjfnuhqvk7r4oqdmzmxoy5cau
  strings/ctype-gbk.c            sp1f-ctypegbk.c-19700101030959-glit55deurqcrnqzs26kctev6hwtvk3f
  strings/ctype-latin1.c         sp1f-ctypelatin1.c-20030129133118-5vxg5x3t3iaskywfqp4xpe6xm63wpybx
  strings/ctype-mb.c             sp1f-ctypemb.c-20020312173754-rtl7oemmrocifpvc2z4og7rvep3jrhkh
  strings/ctype-simple.c         sp1f-ctypesimple.c-20020312173754-2nnl6235owml5myqwzsl3uzlhz72bwho
  strings/ctype-sjis.c           sp1f-ctypesjis.c-19700101030959-wee5mqv7qwhcc4x7jwhrmnyvzq3xfa5d
  strings/ctype-tis620.c         sp1f-ctypetis620.c-19700101030959-qphk64jej3b56zx33ubermglkaoasplq
  strings/ctype-uca.c            sp1f-ctypeuca.c-20040324121604-kwaskdasqzdrufymlf27j4gl3gwdy5fq
  strings/ctype-ucs2.c           sp1f-ctypeucs2.c-20030521102942-3fr4x6ti6jw6vqwdh7byhlxpu6oivdnn
  strings/ctype-ujis.c           sp1f-ctypeujis.c-19700101030959-qf5fzrgee4i2xz7tlr2qtzveandfhlpo
  strings/ctype-utf8.c           sp1f-ctypeutf8.c-20020328133143-7ldgrkcon3ejrongwc7hy4m63qddjsal
  strings/ctype-win1250ch.c      sp1f-ctypewin1250ch.c-20020417105712-fnmrblvlgis3o5sq3rxkqentnz2rkc2r
  strings/ctype.c                sp1f-ctype.c-19700101030959-kcyj7oyype5kohlxym7bzzw5go5qcmh4
  strings/decimal.c              sp1f-decimal.c-20041018120639-qqm4oeadwhbdhuxgwlc657il4tu44n6m
  strings/int2str.c              sp1f-int2str.c-19700101030959-n4dtundq6ky54wd4qh3hkfjabt73ajhf
  strings/longlong2str.c         sp1f-longlong2str.c-19700101030959-xijvpbcw2gqgjbxwbh3nguas75cjjkpo
  strings/longlong2str_asm.c     sp1f-longlong2str_asm.c-20050808101812-edpi6zdv2medqoihhwdkq37xu6kf5zxa
  strings/my_vsnprintf.c         sp1f-my_vsnprintf.c-19700101030959-tpt7gim7wclzegsmsqqysncmxhlmjrhp
  support-files/compiler_warnings.supp sp1f-disabled_compiler_wa-20070110170439-wzgdkamsch2nrkgvcp2hytmquqeorohi
  tests/mysql_client_test.c      sp1f-client_test.c-20020614002636-eqy2zzksgelocknwbbogfuwxfwqy7q5x
  unittest/mysys/Makefile.am     sp1f-makefile.am-20060404161610-vihzdr4qjuef3o5tlkhxxs3o74qy7bln
  win/Makefile.am                sp1f-makefile.am-20060324215048-nfows6kg5gqazyzq4qztdyzddvzjmrfm
  win/configure-mariadb.sh       configuremariadb.sh-20091008190333-1t6vp376gcf6dk1x-1
  win/configure.js               sp1f-configure.js-20060131135210-xvfnytwaxztc3ytr6pmdtutht4i26rdu
-------------- next part --------------
=== modified file '.bzr-mysql/default.conf'
--- a/.bzr-mysql/default.conf	2010-11-24 22:57:34 +0000
+++ b/.bzr-mysql/default.conf	2010-11-30 21:11:03 +0000
@@ -1,6 +1,6 @@
 [MYSQL]
-tree_location = lp:maria
+tree_location = lp:maria/5.2
 post_commit_to = commits at mariadb.org
-post_commit_url = lp:maria
-tree_name = maria
-project_name = "MariaDB 5.1, with Maria 1.5"
+post_commit_url = lp:maria/5.2
+tree_name = maria/5.2
+project_name = "Mariadb 5.2, with Maria 2.0"

=== modified file '.bzrignore'
--- a/.bzrignore	2010-08-18 07:52:57 +0000
+++ b/.bzrignore	2010-09-12 16:40:01 +0000
@@ -1470,15 +1470,15 @@
 storage/maria/ma_test2
 storage/maria/ma_test3
 storage/maria/ma_test_all
-storage/maria/maria.log
-storage/maria/maria_chk
-storage/maria/maria_control
-storage/maria/maria_dump_log
-storage/maria/maria_ftdump
-storage/maria/maria_log
-storage/maria/maria_log.*
-storage/maria/maria_pack
-storage/maria/maria_read_log
+storage/maria/aria.log
+storage/maria/aria_chk
+storage/maria/aria_control
+storage/maria/aria_dump_log
+storage/maria/aria_ftdump
+storage/maria/aria_log
+storage/maria/aria_log.*
+storage/maria/aria_pack
+storage/maria/aria_read_log
 storage/maria/tmp
 storage/maria/tmp/*
 storage/maria/unittest/ma_pagecache_consist_1k-t-big
@@ -1927,6 +1927,14 @@
 libmysqld/ha_federatedx.cc
 tmp
 libmysqld/debug_sync.cc
+client/rpl_filter.cc
+client/rpl_filter.h
+client/sql_list.cc
+client/sql_list.h
+libmysqld/client_plugin.c
+sql/client_plugin.c
+*.dgcov
+libmysqld/create_options.cc
 storage/pbxt/bin/xtstat
 mysql-test/mtr_command
 scripts/convert-debug-for-diff

=== modified file 'BUILD/SETUP.sh'
--- a/BUILD/SETUP.sh	2010-11-24 22:57:34 +0000
+++ b/BUILD/SETUP.sh	2010-11-30 21:11:03 +0000
@@ -163,7 +163,7 @@
 base_configs="$base_configs --with-extra-charsets=complex "
 base_configs="$base_configs --enable-thread-safe-client "
 base_configs="$base_configs --with-big-tables"
-base_configs="$base_configs --with-plugin-maria --with-maria-tmp-tables --without-plugin-innodb_plugin"
+base_configs="$base_configs --with-plugin-aria --with-aria-tmp-tables --without-plugin-innodb_plugin"
 # Compile our client programs with static libraries to allow them to be moved
 base_configs="$base_configs --with-mysqld-ldflags=-static --with-client-ldflags=-static"
 
@@ -179,7 +179,7 @@
 max_no_qc_configs="$SSL_LIBRARY --with-plugins=max --without-query-cache"
 max_no_ndb_configs="$SSL_LIBRARY --with-plugins=max-no-ndb --with-embedded-server --with-libevent"
 max_configs="$SSL_LIBRARY --with-plugins=max --with-embedded-server --with-libevent"
-all_configs="$SSL_LIBRARY --with-plugins=max --with-plugin-ndbcluster --with-embedded-server --with-libevent"
+all_configs="$SSL_LIBRARY --with-plugins=max --with-plugin-ndbcluster --with-embedded-server --with-innodb_plugin --with-libevent"
 
 #
 # CPU and platform specific compilation flags.
@@ -204,7 +204,7 @@
 fi
 
 if test -z "$CXX" ; then
-  CXX=gcc
+  CXX=g++
 fi
 
 # If ccache (a compiler cache which reduces build time)

=== modified file 'BUILD/compile-bintar'
--- a/BUILD/compile-bintar	2010-01-07 12:02:18 +0000
+++ b/BUILD/compile-bintar	2010-03-31 08:17:03 +0000
@@ -32,8 +32,7 @@
 # .so files at runtime (either system stuff like NSS, or server
 # plugins).
 #
-# We link libgcc statically (and avoid linking libstdc++ at all by
-# CXX=gcc), to avoid reduce nasty library version dependencies.
+# We link libgcc statically to avoid reduce nasty library version dependencies.
 
 test -f Makefile && make distclean
 
@@ -52,13 +51,12 @@
 get_make_parallel_flag
 
 # Use gcc rather than g++ to avoid linking libstdc++.so (which we don't need).
-COMP="gcc -static-libgcc"
 FLAGS="-O2 -fno-omit-frame-pointer -g -pipe -Wall $CPUOPT"
 
 # Don't press on in case of error.
 set -e
 
-CC="$COMP" CXX="$COMP" CFLAGS="$FLAGS" CXXFLAGS="$FLAGS" \
+CC="gcc -static-libgcc" CXX="g++ -static-libgcc" CFLAGS="$FLAGS" CXXFLAGS="$FLAGS" \
 	./configure \
 	--prefix=/usr/local/mysql \
 	--exec-prefix=/usr/local/mysql \

=== modified file 'CMakeLists.txt'
--- a/CMakeLists.txt	2010-12-06 11:52:06 +0000
+++ b/CMakeLists.txt	2010-12-06 12:16:49 +0000
@@ -38,6 +38,7 @@
 ADD_DEFINITIONS(-DDEFAULT_CHARSET_HOME="c:/Program Files/MySQL/MySQL Server ${MYSQL_BASE_VERSION}/")
 ADD_DEFINITIONS(-DPACKAGE=mysql)
 ADD_DEFINITIONS(-DSHAREDIR="share")
+ADD_DEFINITIONS(-DPLUGINDIR="lib/plugin")
 
 # Set debug options
 SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DFORCE_INIT_OF_VARS")
@@ -268,7 +269,7 @@
         ENDIF(WITH_${ENGINE}_STORAGE_ENGINE AND MYSQL_PLUGIN_STATIC)
 
         IF (ENGINE_BUILD_TYPE STREQUAL "STATIC") 
-          SET (mysql_plugin_defs  "${mysql_plugin_defs},builtin_${PLUGIN_NAME}_plugin")
+          SET (maria_plugin_defs  "${maria_plugin_defs},builtin_maria_${PLUGIN_NAME}_plugin")
           SET (MYSQLD_STATIC_ENGINE_LIBS ${MYSQLD_STATIC_ENGINE_LIBS} ${PLUGIN_NAME})
           SET (STORAGE_ENGINE_DEFS "${STORAGE_ENGINE_DEFS} -DWITH_${ENGINE}_STORAGE_ENGINE")
           SET (WITH_${ENGINE}_STORAGE_ENGINE TRUE)
@@ -287,16 +288,16 @@
 # Special handling for partition(not really pluggable)
 IF(NOT WITHOUT_PARTITION_STORAGE_ENGINE)
   SET (STORAGE_ENGINE_DEFS "${STORAGE_ENGINE_DEFS} -DWITH_PARTITION_STORAGE_ENGINE")
-  SET (mysql_plugin_defs  "${mysql_plugin_defs},builtin_partition_plugin")
+  SET (maria_plugin_defs  "${maria_plugin_defs},builtin_maria_partition_plugin")
 ENDIF(NOT WITHOUT_PARTITION_STORAGE_ENGINE)
 
-# Special handling for tmp tables with the maria engine
-IF(WITH_MARIA_STORAGE_ENGINE)
-  ADD_DEFINITIONS(-DWITH_MARIA_STORAGE_ENGINE)
+# Special handling for tmp tables with the Aria engine
+IF(WITH_ARIA_STORAGE_ENGINE)
+  ADD_DEFINITIONS(-DWITH_ARIA_STORAGE_ENGINE)
   IF(WITH_MARIA_TMP_TABLES)
     ADD_DEFINITIONS(-DUSE_MARIA_FOR_TMP_TABLES)
   ENDIF(WITH_MARIA_TMP_TABLES)
-ENDIF(WITH_MARIA_STORAGE_ENGINE)
+ENDIF(WITH_ARIA_STORAGE_ENGINE)
 
 ADD_DEFINITIONS(${STORAGE_ENGINE_DEFS}) 
 
@@ -333,6 +334,7 @@
 ADD_SUBDIRECTORY(sql)
 ADD_SUBDIRECTORY(server-tools/instance-manager)
 ADD_SUBDIRECTORY(libmysql)
+ADD_SUBDIRECTORY(libservices)
 ADD_SUBDIRECTORY(tests)
 ADD_SUBDIRECTORY(unittest/mytap)
 ADD_SUBDIRECTORY(unittest/mysys)
@@ -402,7 +404,7 @@
 # Handle the database files
 FILE(GLOB datafiles "${CMAKE_CURRENT_SOURCE_DIR}/win/data/mysql/*")
 INSTALL(FILES ${datafiles} DESTINATION data/clean/mysql)
-INSTALL(FILES win/data/maria_log.00000001 win/data/maria_log_control DESTINATION data/clean)
+INSTALL(FILES win/data/aria_log.00000001 win/data/aria_log_control DESTINATION data/clean)
 INSTALL(DIRECTORY win/data/test DESTINATION data/clean)
 SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}
   IfFileExists '$INSTDIR\\\\data\\\\mysql\\\\db.frm' 0 CopyDatabaseFiles

=== modified file 'Docs/sp-imp-spec.txt'
--- a/Docs/sp-imp-spec.txt	2004-03-23 11:04:40 +0000
+++ b/Docs/sp-imp-spec.txt	2010-04-08 12:10:05 +0000
@@ -1075,7 +1075,7 @@
                             'PIPES_AS_CONCAT',
                             'ANSI_QUOTES',
                             'IGNORE_SPACE',
-                            'NOT_USED',
+                            'IGNORE_BAD_TABLE_OPTIONS',
                             'ONLY_FULL_GROUP_BY',
                             'NO_UNSIGNED_SUBTRACTION',
                             'NO_DIR_IN_CREATE',
@@ -1097,4 +1097,4 @@
     ) comment='Stored Procedures';
         
  --
- 
\ No newline at end of file
+ 

=== modified file 'Makefile.am'
--- a/Makefile.am	2010-08-27 14:12:44 +0000
+++ b/Makefile.am	2010-09-11 18:43:48 +0000
@@ -25,7 +25,7 @@
 
 SUBDIRS =		. include @docs_dirs@ @zlib_dir@ \
 			@readline_topdir@ sql-common scripts \
-			@pstack_dir@ \
+ 			@pstack_dir@ libservices \
 			@sql_union_dirs@ storage \
 			@sql_server@ @man_dirs@ tests \
 			netware @libmysqld_dirs@ \
@@ -34,7 +34,7 @@
 
 DIST_SUBDIRS =		. include Docs zlib \
 			cmd-line-utils sql-common scripts \
-			pstack \
+			pstack libservices \
 			strings mysys dbug extra regex libmysql libmysql_r client unittest storage plugin \
 			vio sql man tests \
 			netware libmysqld \
@@ -140,14 +140,14 @@
 test-full:	test test-nr test-ps
 
 test-force:
-	$(MAKE) force=--force test
+	$(MAKE) -k force=--force test
 
 test-force-full:
-	$(MAKE) force=--force test-full
+	$(MAKE) -k force=--force test-full
 
 #used by autopush.pl to run memory based tests
 test-force-mem:
-	$(MAKE) force=--force mem=--mem test
+	$(MAKE) -k force=--force mem=--mem test
 
 test-bt:
 	-cd mysql-test ; MTR_BUILD_THREAD=auto \
@@ -261,7 +261,7 @@
 	$(MAKE) subset=--ps-protocol test-fast
 
 test-full-qa:
-	$(MAKE) force=--force test-pr \
+	$(MAKE) -k force=--force test-pr \
 	    test-binlog-statement test-ext test-fast-view \
 	        test-fast-cursor test-unit
 
@@ -271,12 +271,13 @@
 # after which TEST_PREPROCESSOR_HEADER will be used.
 #
 
-API_PREPROCESSOR_HEADER = $(top_srcdir)/include/mysql/plugin.h \
-                           $(top_srcdir)/include/mysql.h
+API_PREPROCESSOR_HEADER = $(top_srcdir)/include/mysql.h \
+			  $(top_srcdir)/include/mysql/client_plugin.h \
+			  $(top_srcdir)/include/mysql/plugin_auth.h
 
-TEST_PREPROCESSOR_HEADER = $(top_srcdir)/include/mysql/plugin.h \
-                            $(top_srcdir)/sql/mysql_priv.h \
-                            $(top_srcdir)/include/mysql.h
+TEST_PREPROCESSOR_HEADER = $(API_PREPROCESSOR_HEADER) \
+                           $(top_srcdir)/sql/mysql_priv.h
+                            
 
 #
 # Rules for checking that the abi/api has not changed.

=== modified file 'client/CMakeLists.txt'
--- a/client/CMakeLists.txt	2010-12-06 11:52:06 +0000
+++ b/client/CMakeLists.txt	2010-12-06 12:16:49 +0000
@@ -81,5 +81,7 @@
   MYSQL_EMBED_MANIFEST("echo" "asInvoker")
 ENDIF(EMBED_MANIFESTS)
 
+ADD_DEFINITIONS(-DHAVE_DLOPEN)
+
 INSTALL(TARGETS mysql mysqltest mysqlcheck mysqldump mysqlimport mysql_upgrade mysqlshow
 	mysqlbinlog mysqladmin mysqlslap echo DESTINATION bin COMPONENT runtime)

=== modified file 'client/Makefile.am'
--- a/client/Makefile.am	2010-11-17 12:24:20 +0000
+++ b/client/Makefile.am	2010-11-19 21:33:47 +0000
@@ -98,14 +98,15 @@
 
 # Fix for mit-threads
 DEFS =			-DMYSQL_CLIENT_NO_THREADS \
-			-DDEFAULT_MYSQL_HOME="\"$(prefix)\"" \
-			-DMYSQL_DATADIR="\"$(localstatedir)\""
+			-DDEFAULT_MYSQL_HOME='"$(prefix)"' \
+			-DMYSQL_DATADIR='"$(localstatedir)"'
 
 sql_src=log_event.h mysql_priv.h rpl_constants.h \
 	rpl_utility.h rpl_tblmap.h rpl_tblmap.cc \
 	log_event.cc my_decimal.h my_decimal.cc \
 	log_event_old.h log_event_old.cc \
-	rpl_record_old.h rpl_record_old.cc
+	rpl_record_old.h rpl_record_old.cc \
+        sql_list.h rpl_filter.h sql_list.cc rpl_filter.cc
 strings_src=decimal.c
 
 link_sources:

=== modified file 'client/client_priv.h'
--- a/client/client_priv.h	2010-03-04 08:03:07 +0000
+++ b/client/client_priv.h	2010-03-29 15:13:53 +0000
@@ -92,5 +92,8 @@
   OPT_ABORT_SOURCE_ON_ERROR,
   OPT_FIRST_SLAVE,
   OPT_ALL,
-  OPT_MAX_CLIENT_OPTION
+  OPT_REWRITE_DB,
+  OPT_PLUGIN_DIR,
+  OPT_DEFAULT_PLUGIN,
+  OPT_MAX_CLIENT_OPTION /* should be always the last */
 };

=== modified file 'client/mysql.cc'
--- a/client/mysql.cc	2010-11-24 22:57:34 +0000
+++ b/client/mysql.cc	2010-11-30 21:11:03 +0000
@@ -151,7 +151,7 @@
 	       tty_password= 0, opt_nobeep=0, opt_reconnect=1,
 	       default_charset_used= 0, opt_secure_auth= 0,
                default_pager_set= 0, opt_sigint_ignore= 0,
-               show_warnings= 0, executing_query= 0, interrupted_query= 0,
+               show_warnings= 0, executing_query= 0,
                ignore_spaces= 0;
 static my_bool debug_info_flag, debug_check_flag, batch_abort_on_error;
 static my_bool column_types_flag;
@@ -162,6 +162,7 @@
 static uint my_end_arg;
 static char * opt_mysql_unix_port=0;
 static int connect_flag=CLIENT_INTERACTIVE;
+static int interrupted_query= 0;
 static char *current_host,*current_db,*current_user=0,*opt_password=0,
             *current_prompt=0, *delimiter_str= 0,
             *default_charset= (char*) MYSQL_DEFAULT_CHARSET_NAME;
@@ -174,6 +175,7 @@
 static STATUS status;
 static ulong select_limit,max_join_size,opt_connect_timeout=0;
 static char mysql_charsets_dir[FN_REFLEN+1];
+static char *opt_plugin_dir= 0, *opt_default_auth;
 static const char *xmlmeta[] = {
   "&", "&amp;",
   "<", "&lt;",
@@ -1574,6 +1576,13 @@
   {"show-warnings", OPT_SHOW_WARNINGS, "Show warnings after every statement.",
     &show_warnings, &show_warnings, 0, GET_BOOL, NO_ARG,
     0, 0, 0, 0, 0, 0},
+  {"plugin_dir", OPT_PLUGIN_DIR, "Directory for client-side plugins.",
+   (uchar**) &opt_plugin_dir, (uchar**) &opt_plugin_dir, 0,
+   GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+  {"default_auth", OPT_PLUGIN_DIR,
+    "Default authentication client-side plugin to use.",
+   (uchar**) &opt_default_auth, (uchar**) &opt_default_auth, 0,
+   GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
   { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
 };
 
@@ -3612,7 +3621,7 @@
   mysql_store_result_for_lazy(&result);
 
   /* Bail out when no warnings */
-  if (!(num_rows= mysql_num_rows(result)))
+  if (!result || !(num_rows= mysql_num_rows(result)))
     goto end;
 
   cur= mysql_fetch_row(result);
@@ -3977,7 +3986,7 @@
 com_connect(String *buffer, char *line)
 {
   char *tmp, buff[256];
-  bool save_rehash= opt_rehash;
+  my_bool save_rehash= opt_rehash;
   int error;
 
   bzero(buff, sizeof(buff));
@@ -4276,6 +4285,57 @@
 }
 
 
+/**
+  An example of mysql_authentication_dialog_ask callback.
+
+  The C function with the name "mysql_authentication_dialog_ask", if exists,
+  will be used by the "dialog" client authentication plugin when user
+  input is needed. This function should be of mysql_authentication_dialog_ask_t
+  type. If the function does not exists, a built-in implementation will be
+  used.
+
+  @param mysql          mysql
+  @param type           type of the input
+                        1 - normal string input
+                        2 - password string
+  @param prompt         prompt
+  @param buf            a buffer to store the use input
+  @param buf_len        the length of the buffer
+
+  @retval               a pointer to the user input string.
+                        It may be equal to 'buf' or to 'mysql->password'.
+                        In all other cases it is assumed to be an allocated
+                        string, and the "dialog" plugin will free() it.
+*/
+
+extern "C" char *mysql_authentication_dialog_ask(MYSQL *mysql, int type,
+                                                 const char *prompt,
+                                                 char *buf, int buf_len)
+{
+  char *s=buf;
+
+  fputs("[mariadb] ", stdout);
+  fputs(prompt, stdout);
+  fputs(" ", stdout);
+
+  if (type == 2) /* password */
+  {
+    s= get_tty_password("");
+    strnmov(buf, s, buf_len);
+    buf[buf_len-1]= 0;
+    my_free(s, MYF(0));
+  }
+  else
+  {
+    if (!fgets(buf, buf_len-1, stdin))
+      buf[0]= 0;
+    else if (buf[0] && (s= strend(buf))[-1] == '\n')
+      s[-1]= 0;
+  }
+
+  return buf;
+}
+
 static int
 sql_real_connect(char *host,char *database,char *user,char *password,
 		 uint silent)
@@ -4321,6 +4381,13 @@
   }
   if (default_charset_used)
     mysql_options(&mysql, MYSQL_SET_CHARSET_NAME, default_charset);
+
+  if (opt_plugin_dir && *opt_plugin_dir)
+    mysql_options(&mysql, MYSQL_PLUGIN_DIR, opt_plugin_dir);
+
+  if (opt_default_auth && *opt_default_auth)
+    mysql_options(&mysql, MYSQL_DEFAULT_AUTH, opt_default_auth);
+
   if (!mysql_real_connect(&mysql, host, user, password,
 			  database, opt_mysql_port, opt_mysql_unix_port,
 			  connect_flag | CLIENT_MULTI_STATEMENTS))

=== modified file 'client/mysqladmin.cc'
--- a/client/mysqladmin.cc	2010-08-02 09:01:24 +0000
+++ b/client/mysqladmin.cc	2010-09-23 22:00:32 +0000
@@ -24,7 +24,7 @@
 #include <mysql.h>
 #include <sql_common.h>
 
-#define ADMIN_VERSION "8.42"
+#define ADMIN_VERSION "9.0"
 #define MAX_MYSQL_VAR 512
 #define SHUTDOWN_DEF_TIMEOUT 3600		/* Wait for shutdown */
 #define MAX_TRUNC_LENGTH 3
@@ -97,7 +97,10 @@
   ADMIN_FLUSH_HOSTS,      ADMIN_FLUSH_TABLES,    ADMIN_PASSWORD,
   ADMIN_PING,             ADMIN_EXTENDED_STATUS, ADMIN_FLUSH_STATUS,
   ADMIN_FLUSH_PRIVILEGES, ADMIN_START_SLAVE,     ADMIN_STOP_SLAVE,
-  ADMIN_FLUSH_THREADS,    ADMIN_OLD_PASSWORD
+  ADMIN_FLUSH_THREADS,    ADMIN_OLD_PASSWORD,    ADMIN_FLUSH_SLOW_LOG,
+  ADMIN_FLUSH_TABLE_STATISTICS, ADMIN_FLUSH_INDEX_STATISTICS,
+  ADMIN_FLUSH_USER_STATISTICS, ADMIN_FLUSH_CLIENT_STATISTICS,
+  ADMIN_FLUSH_ALL_STATUS, ADMIN_FLUSH_ALL_STATISTICS
 };
 static const char *command_names[]= {
   "create",               "drop",                "shutdown",
@@ -107,7 +110,10 @@
   "flush-hosts",          "flush-tables",        "password",
   "ping",                 "extended-status",     "flush-status",
   "flush-privileges",     "start-slave",         "stop-slave",
-  "flush-threads","old-password",
+  "flush-threads", "old-password", "flush-slow-log",
+  "flush-table-statistics", "flush-index-statistics",
+  "flush-user-statistics", "flush-client-statistics",
+  "flush-all-status", "flush-all-statistics",
   NullS
 };
 
@@ -592,7 +598,8 @@
 
   for (; argc > 0 ; argv++,argc--)
   {
-    switch (find_type(argv[0],&command_typelib,2)) {
+    int command;
+    switch ((command= find_type(argv[0],&command_typelib,2))) {
     case ADMIN_CREATE:
     {
       char buff[FN_REFLEN+20];
@@ -669,7 +676,11 @@
       if (mysql_refresh(mysql,
 			(uint) ~(REFRESH_GRANT | REFRESH_STATUS |
 				 REFRESH_READ_LOCK | REFRESH_SLAVE |
-				 REFRESH_MASTER)))
+				 REFRESH_MASTER | REFRESH_TABLE_STATS |
+                                 REFRESH_INDEX_STATS |
+                                 REFRESH_USER_STATS |
+                                 REFRESH_SLOW_QUERY_LOG |
+                                 REFRESH_CLIENT_STATS)))
       {
 	my_printf_error(0, "refresh failed; error: '%s'", error_flags,
 			mysql_error(mysql));
@@ -687,7 +698,8 @@
     case ADMIN_VER:
       new_line=1;
       print_version();
-      puts("Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.");
+      puts("Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc,\n"
+           "2009 Monty Program Ab");
       puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n");
       printf("Server version\t\t%s\n", mysql_get_server_info(mysql));
       printf("Protocol version\t%d\n", mysql_get_proto_info(mysql));
@@ -863,9 +875,19 @@
     }
     case ADMIN_FLUSH_LOGS:
     {
-      if (mysql_refresh(mysql,REFRESH_LOG))
-      {
-	my_printf_error(0, "refresh failed; error: '%s'", error_flags,
+      if (mysql_query(mysql,"flush logs"))
+      {
+	my_printf_error(0, "flush failed; error: '%s'", error_flags,
+			mysql_error(mysql));
+	return -1;
+      }
+      break;
+    }
+    case ADMIN_FLUSH_SLOW_LOG:
+    {
+      if (mysql_query(mysql,"flush slow query logs"))
+      {
+	my_printf_error(0, "flush failed; error: '%s'", error_flags,
 			mysql_error(mysql));
 	return -1;
       }
@@ -875,7 +897,7 @@
     {
       if (mysql_query(mysql,"flush hosts"))
       {
-	my_printf_error(0, "refresh failed; error: '%s'", error_flags,
+	my_printf_error(0, "flush failed; error: '%s'", error_flags,
 			mysql_error(mysql));
 	return -1;
       }
@@ -885,7 +907,7 @@
     {
       if (mysql_query(mysql,"flush tables"))
       {
-	my_printf_error(0, "refresh failed; error: '%s'", error_flags,
+	my_printf_error(0, "flush failed; error: '%s'", error_flags,
 			mysql_error(mysql));
 	return -1;
       }
@@ -895,7 +917,71 @@
     {
       if (mysql_query(mysql,"flush status"))
       {
-	my_printf_error(0, "refresh failed; error: '%s'", error_flags,
+	my_printf_error(0, "flush failed; error: '%s'", error_flags,
+			mysql_error(mysql));
+	return -1;
+      }
+      break;
+    }
+    case ADMIN_FLUSH_TABLE_STATISTICS:
+    {
+      if (mysql_query(mysql,"flush table_statistics"))
+      {
+	my_printf_error(0, "flush failed; error: '%s'", error_flags,
+			mysql_error(mysql));
+	return -1;
+      }
+      break;
+    }
+    case ADMIN_FLUSH_INDEX_STATISTICS:
+    {
+      if (mysql_query(mysql,"flush index_statistics"))
+      {
+	my_printf_error(0, "flush failed; error: '%s'", error_flags,
+			mysql_error(mysql));
+	return -1;
+      }
+      break;
+    }
+    case ADMIN_FLUSH_USER_STATISTICS:
+    {
+      if (mysql_query(mysql,"flush user_statistics"))
+      {
+	my_printf_error(0, "flush failed; error: '%s'", error_flags,
+			mysql_error(mysql));
+	return -1;
+      }
+      break;
+    }
+    case ADMIN_FLUSH_CLIENT_STATISTICS:
+    {
+      if (mysql_query(mysql,"flush client_statistics"))
+      {
+	my_printf_error(0, "flush failed; error: '%s'", error_flags,
+			mysql_error(mysql));
+	return -1;
+      }
+      break;
+    }
+    case ADMIN_FLUSH_ALL_STATISTICS:
+    {
+      if (mysql_query(mysql,
+                      "flush table_statistics,index_statistics,"
+                      "user_statistics,client_statistics"))
+      {
+	my_printf_error(0, "flush failed; error: '%s'", error_flags,
+			mysql_error(mysql));
+	return -1;
+      }
+      break;
+    }
+    case ADMIN_FLUSH_ALL_STATUS:
+    {
+      if (mysql_query(mysql,
+                      "flush status,table_statistics,index_statistics,"
+                      "user_statistics,client_statistics"))
+      {
+	my_printf_error(0, "flush failed; error: '%s'", error_flags,
 			mysql_error(mysql));
 	return -1;
       }
@@ -1067,7 +1153,8 @@
 static void usage(void)
 {
   print_version();
-  puts("Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.");
+  puts("Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc,\n"
+       "2009 Monty Program Ab");
   puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n");
   puts("Administration program for the mysqld daemon.");
   printf("Usage: %s [OPTIONS] command command....\n", my_progname);
@@ -1075,16 +1162,23 @@
   my_print_variables(my_long_options);
   print_defaults("my",load_default_groups);
   puts("\nWhere command is a one or more of: (Commands may be shortened)\n\
-  create databasename	Create a new database\n\
-  debug			Instruct server to write debug information to log\n\
-  drop databasename	Delete a database and all its tables\n\
-  extended-status       Gives an extended status message from the server\n\
-  flush-hosts           Flush all cached hosts\n\
-  flush-logs            Flush all logs\n\
-  flush-status		Clear status variables\n\
-  flush-tables          Flush all tables\n\
-  flush-threads         Flush the thread cache\n\
-  flush-privileges      Reload grant tables (same as reload)\n\
+  create databasename	  Create a new database\n\
+  debug			  Instruct server to write debug information to log\n\
+  drop databasename	  Delete a database and all its tables\n\
+  extended-status         Gives an extended status message from the server\n\
+  flush-all-statistics    Flush all statistics tables\n\
+  flush-all-status        Flush status and statistics\n\
+  flush-client-statistics Flush client statistics\n\
+  flush-hosts             Flush all cached hosts\n\
+  flush-index-statistics  Flush index statistics\n\
+  flush-logs              Flush all logs\n\
+  flush-privileges        Reload grant tables (same as reload)\n\
+  flush-slow-log          Flush slow query log\n\
+  flush-status		  Clear status variables\n\
+  flush-table-statistics  Clear table statistics\n\
+  flush-tables            Flush all tables\n\
+  flush-threads           Flush the thread cache\n\
+  flush-user-statistics   Flush user statistics\n\
   kill id,id,...	Kill mysql threads");
 #if MYSQL_VERSION_ID >= 32200
   puts("\
@@ -1375,7 +1469,7 @@
 			    struct stat *pidfile_status)
 {
   char buff[FN_REFLEN];
-  int error= 1;
+  my_bool error= 1;
   uint count= 0;
   DBUG_ENTER("wait_pidfile");
 

=== modified file 'client/mysqlbinlog.cc'
--- a/client/mysqlbinlog.cc	2010-08-27 14:12:44 +0000
+++ b/client/mysqlbinlog.cc	2011-01-13 12:28:36 +0000
@@ -35,6 +35,15 @@
 #include "log_event.h"
 #include "sql_common.h"
 
+/* Needed for Rpl_filter */
+CHARSET_INFO* system_charset_info= &my_charset_utf8_general_ci;
+
+#include "sql_string.h"   // needed for Rpl_filter
+#include "sql_list.h"     // needed for Rpl_filter
+#include "rpl_filter.h"
+
+Rpl_filter *binlog_filter;
+
 #define BIN_LOG_HEADER_SIZE	4
 #define PROBE_HEADER_LEN	(EVENT_LEN_OFFSET+4)
 
@@ -620,6 +629,47 @@
 
 
 /**
+  Print "use <db>" statement when current db is to be changed.
+
+  We have to control emiting USE statements according to rewrite-db options.
+  We have to do it here (see process_event() below) and to suppress
+  producing USE statements by corresponding log event print-functions.
+*/
+
+static void
+print_use_stmt(PRINT_EVENT_INFO* pinfo, const Query_log_event *ev)
+{
+  const char* db= ev->db;
+  const size_t db_len= ev->db_len;
+
+  // pinfo->db is the current db.
+  // If current db is the same as required db, do nothing.
+  if ((ev->flags & LOG_EVENT_SUPPRESS_USE_F) || !db ||
+      !memcmp(pinfo->db, db, db_len + 1))
+    return;
+
+  // Current db and required db are different.
+  // Check for rewrite rule for required db. (Note that in a rewrite rule
+  // neither db_from nor db_to part can be empty).
+  size_t len_to= 0;
+  const char *db_to= binlog_filter->get_rewrite_db(db, &len_to);
+
+  // If there is no rewrite rule for db (in this case len_to is left = 0),
+  // printing of the corresponding USE statement is left for log event
+  // print-function.
+  if (!len_to)
+    return;
+
+  // In case of rewrite rule print USE statement for db_to
+  fprintf(result_file, "use %s%s\n", db_to, pinfo->delimiter);
+
+  // Copy the *original* db to pinfo to suppress emiting
+  // of USE stmts by log_event print-functions.
+  memcpy(pinfo->db, db, db_len + 1);
+}
+
+
+/**
   Prints the given event in base64 format.
 
   The header is printed to the head cache and the body is printed to
@@ -730,9 +780,11 @@
 
     switch (ev_type) {
     case QUERY_EVENT:
-      if (!((Query_log_event*)ev)->is_trans_keyword() &&
-          shall_skip_database(((Query_log_event*)ev)->db))
+    {
+      Query_log_event *qe= (Query_log_event*)ev;
+      if (!qe->is_trans_keyword() && shall_skip_database(qe->db))
         goto end;
+      print_use_stmt(print_event_info, qe);
       if (opt_base64_output_mode == BASE64_OUTPUT_ALWAYS)
       {
         if ((retval= write_event_header_and_base64(ev, result_file,
@@ -743,6 +795,7 @@
       else
         ev->print(result_file, print_event_info);
       break;
+    }
 
     case CREATE_FILE_EVENT:
     {
@@ -864,6 +917,7 @@
 
       if (!shall_skip_database(exlq->db))
       {
+        print_use_stmt(print_event_info, exlq);
         if (fname)
         {
           convert_path_to_forward_slashes(fname);
@@ -887,6 +941,13 @@
         destroy_evt= FALSE;
         goto end;
       }
+      size_t len_to= 0;
+      const char* db_to= binlog_filter->get_rewrite_db(map->get_db_name(), &len_to);
+      if (len_to && map->rewrite_db(db_to, len_to, glob_description_event))
+      {
+        error("Could not rewrite database name");
+        goto err;
+      }
     }
     case WRITE_ROWS_EVENT:
     case DELETE_ROWS_EVENT:
@@ -971,14 +1032,16 @@
   retval= ERROR_STOP;
 end:
   rec_count++;
+  
   /*
-    Destroy the log_event object. If reading from a remote host,
-    set the temp_buf to NULL so that memory isn't freed twice.
+    Destroy the log_event object. 
+    MariaDB MWL#36: mainline does this:
+      If reading from a remote host,
+      set the temp_buf to NULL so that memory isn't freed twice.
+    We no longer do that, we use Rpl_filter::event_owns_temp_buf instead.
   */
   if (ev)
   {
-    if (remote_opt)
-      ev->temp_buf= 0;
     if (destroy_evt) /* destroy it later if not set (ignored table map) */
       delete ev;
   }
@@ -1144,6 +1207,10 @@
    "Used to reserve file descriptors for use by this program.",
    &open_files_limit, &open_files_limit, 0, GET_ULONG,
    REQUIRED_ARG, MY_NFILE, 8, OS_FILE_LIMIT, 0, 1, 0},
+  {"rewrite-db", OPT_REWRITE_DB,
+   "Updates to a database with a different name than the original. \
+Example: rewrite-db='from->to'.",
+   0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
   {0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
 };
 
@@ -1338,6 +1405,53 @@
         (find_type_or_exit(argument, &base64_output_mode_typelib, opt->name)-1);
     }
     break;
+  case OPT_REWRITE_DB:    // db_from->db_to
+  {
+    /* See also handling of OPT_REPLICATE_REWRITE_DB in sql/mysqld.cc */
+    char* ptr;
+    char* key= argument;  // db-from
+    char* val;            // db-to
+
+    // Where key begins
+    while (*key && my_isspace(&my_charset_latin1, *key))
+      key++;
+
+    // Where val begins
+    if (!(ptr= strstr(argument, "->")))
+    {
+      sql_print_error("Bad syntax in rewrite-db: missing '->'!\n");
+      return 1;
+    }
+    val= ptr + 2;
+    while (*val && my_isspace(&my_charset_latin1, *val))
+      val++;
+
+    // Write \0 and skip blanks at the end of key
+    *ptr-- = 0;
+    while (my_isspace(&my_charset_latin1, *ptr) && ptr > argument)
+      *ptr-- = 0;
+
+    if (!*key)
+    {
+      sql_print_error("Bad syntax in rewrite-db: empty db-from!\n");
+      return 1;
+    }
+
+    // Skip blanks at the end of val
+    ptr= val;
+    while (*ptr && !my_isspace(&my_charset_latin1, *ptr))
+      ptr++;
+    *ptr= 0;
+
+    if (!*val)
+    {
+      sql_print_error("Bad syntax in rewrite-db: empty db-to!\n");
+      return 1;
+    }
+
+    binlog_filter->add_db_rewrite(key, val);
+    break;
+  }
   case 'v':
     if (argument == disabled_my_option)
       verbose= 0;
@@ -1382,7 +1496,7 @@
 */
 static Exit_status safe_connect()
 {
-  /* Close and old connections to MySQL */
+  /* Close any old connections to MySQL */
   if (mysql)
     mysql_close(mysql);
 
@@ -1611,7 +1725,7 @@
       If reading from a remote host, ensure the temp_buf for the
       Log_event class is pointing to the incoming stream.
     */
-    ev->register_temp_buf((char *) net->read_pos + 1);
+    ev->register_temp_buf((char *) net->read_pos + 1, FALSE);
 
     Log_event_type type= ev->get_type_code();
     if (glob_description_event->binlog_version >= 3 ||
@@ -2011,6 +2125,8 @@
   return retval;
 }
 
+/* Used in sql_alloc(). Inited and freed in main() */
+MEM_ROOT s_mem_root;
 
 int main(int argc, char** argv)
 {
@@ -2023,8 +2139,16 @@
 
   my_init_time(); // for time functions
 
+  init_alloc_root(&s_mem_root, 16384, 0);
+  if (!(binlog_filter= new Rpl_filter))
+  {
+    error("Failed to create Rpl_filter");
+    exit(1);
+  }
+
   if (load_defaults("my", load_default_groups, &argc, &argv))
     exit(1);
+
   defaults_argv= argv;
   parse_args(&argc, (char***)&argv);
 
@@ -2111,6 +2235,8 @@
   if (result_file != stdout)
     my_fclose(result_file, MYF(0));
   cleanup();
+  delete binlog_filter;
+  free_root(&s_mem_root, MYF(0));
   free_defaults(defaults_argv);
   my_free_open_file_info();
   load_processor.destroy();
@@ -2122,6 +2248,12 @@
   DBUG_RETURN(retval == ERROR_STOP ? 1 : 0);
 }
 
+
+void *sql_alloc(size_t size)
+{
+  return alloc_root(&s_mem_root, size);
+}
+
 /*
   We must include this here as it's compiled with different options for
   the server
@@ -2132,4 +2264,7 @@
 #include "my_decimal.cc"
 #include "log_event.cc"
 #include "log_event_old.cc"
+#include "sql_string.cc"
+#include "sql_list.cc"
+#include "rpl_filter.cc"
 

=== modified file 'client/mysqltest.cc'
--- a/client/mysqltest.cc	2010-11-24 22:57:34 +0000
+++ b/client/mysqltest.cc	2010-11-30 21:11:03 +0000
@@ -36,6 +36,7 @@
 #include "client_priv.h"
 #include <mysql_version.h>
 #include <mysqld_error.h>
+#include <sql_common.h>
 #include <m_ctype.h>
 #include <my_dir.h>
 #include <hash.h>
@@ -3795,13 +3796,15 @@
   }
 
   if (!ds_user.length)
+  {
     dynstr_set(&ds_user, mysql->user);
 
-  if (!ds_passwd.length)
-    dynstr_set(&ds_passwd, mysql->passwd);
+    if (!ds_passwd.length)
+      dynstr_set(&ds_passwd, mysql->passwd);
 
-  if (!ds_db.length)
-    dynstr_set(&ds_db, mysql->db);
+    if (!ds_db.length)
+      dynstr_set(&ds_db, mysql->db);
+  }
 
   DBUG_PRINT("info",("connection: '%s' user: '%s' password: '%s' database: '%s'",
                       cur_con->name, ds_user.str, ds_passwd.str, ds_db.str));
@@ -4822,11 +4825,11 @@
 }
 
 
-void set_reconnect(MYSQL* mysql, int val)
+void set_reconnect(MYSQL* mysql, my_bool val)
 {
   my_bool reconnect= val;
   DBUG_ENTER("set_reconnect");
-  DBUG_PRINT("info", ("val: %d", val));
+  DBUG_PRINT("info", ("val: %d", (int) val));
 #if MYSQL_VERSION_ID < 50000
   mysql->reconnect= reconnect;
 #else
@@ -7827,7 +7830,7 @@
     die("Out of memory");
 
   /* Milliseconds since start */
-  end= longlong2str(timer, buf, 10);
+  end= longlong10_to_str(timer, buf, 10);
   dynstr_append_mem(&ds_progress, buf, (int)(end-buf));
   dynstr_append_mem(&ds_progress, "\t", 1);
 
@@ -8584,7 +8587,7 @@
   {
     char buf[32], *end;
     ulonglong timer= timer_now() - timer_start;
-    end= longlong2str(timer, buf, 10);
+    end= longlong10_to_str(timer, buf, 10);
     str_to_file(timer_file,buf, (int) (end-buf));
     /* Timer has been written to the file, don't use it anymore */
     timer_file= 0;
@@ -8746,15 +8749,15 @@
 
 
 typedef struct st_replace {
-  my_bool found;
+  int found;
   struct st_replace *next[256];
 } REPLACE;
 
 typedef struct st_replace_found {
-  my_bool found;
-  char *replace_string;
+  int found;
   uint to_offset;
   int from_offset;
+  char *replace_string;
 } REPLACE_STRING;
 
 
@@ -8786,7 +8789,7 @@
     }
 
     /* Found a string that needs to be replaced */
-    DBUG_PRINT("info", ("found: %d, to_offset: %d, from_offset: %d, string: %s",
+    DBUG_PRINT("info", ("found: %d, to_offset: %u, from_offset: %d, string: %s",
                         rep_str->found, rep_str->to_offset,
                         rep_str->from_offset, rep_str->replace_string));
 

=== modified file 'client/sql_string.cc'
--- a/client/sql_string.cc	2010-08-27 14:12:44 +0000
+++ b/client/sql_string.cc	2010-09-11 18:43:48 +0000
@@ -26,15 +26,6 @@
 #ifdef HAVE_FCONVERT
 #include <floatingpoint.h>
 #endif
-
-/*
-  The following extern declarations are ok as these are interface functions
-  required by the string function
-*/
-
-extern void sql_alloc(size_t size);
-extern void sql_element_free(void *ptr);
-
 #include "sql_string.h"
 
 /*****************************************************************************

=== modified file 'client/sql_string.h'
--- a/client/sql_string.h	2010-10-19 22:36:59 +0000
+++ b/client/sql_string.h	2010-11-30 21:11:03 +0000
@@ -15,6 +15,9 @@
 
 /* This file is originally from the mysql distribution. Coded by monty */
 
+#ifndef CLIENT_SQL_STRING_H
+#define CLIENT_SQL_STRING_H
+
 #ifdef USE_PRAGMA_INTERFACE
 #pragma interface			/* gcc class implementation */
 #endif
@@ -357,3 +360,5 @@
     return (s->alloced && Ptr >= s->Ptr && Ptr < s->Ptr + s->str_length);
   }
 };
+
+#endif 

=== modified file 'config/ac-macros/plugins.m4'
--- a/config/ac-macros/plugins.m4	2010-11-17 12:24:20 +0000
+++ b/config/ac-macros/plugins.m4	2010-11-19 21:33:47 +0000
@@ -38,6 +38,7 @@
   _MYSQL_PLUGAPPEND([__mysql_plugin_list__],[$1])
   m4_define([MYSQL_PLUGIN_NAME_]AS_TR_CPP([$1]), [$3])
   m4_define([MYSQL_PLUGIN_DESC_]AS_TR_CPP([$1]), [$4])
+  m4_ifdef([_AC_ENABLE_IF], [_AC_ENABLE_IF([with],[plugin-$1])])
   _MYSQL_PLUGAPPEND_META([$1], $5)
   ifelse(m4_bregexp(__mysql_include__,[/plug\.in$]),-1,[],[
      MYSQL_PLUGIN_DIRECTORY([$1],
@@ -216,6 +217,30 @@
 
 
 dnl ---------------------------------------------------------------------------
+dnl Macro: MYSQL_PLUGIN_WITHOUT
+dnl
+dnl SYNOPSIS
+dnl   MYSQL_PLUGIN_WITHOUT([name])
+dnl
+dnl DESCRIPTION
+dnl   Exclude the plugin from being built, as if --without-plugin-name
+dnl   was specified.
+dnl   If the plugin was selected manually by --with-plugin-name,
+dnl   excluding it here will abort the configure script with an error,
+dnl   otherwise plugin will be silently disabled.
+dnl
+dnl ---------------------------------------------------------------------------
+
+AC_DEFUN([MYSQL_PLUGIN_WITHOUT],[
+ MYSQL_REQUIRE_PLUGIN([$1])
+ if test "X[$with_plugin_]$1" = Xyes; then
+   AC_MSG_ERROR([Plugin $1 cannot be built])
+ else
+   [mysql_plugin_]$1=no
+ fi
+])
+
+dnl ---------------------------------------------------------------------------
 dnl Macro: MYSQL_PLUGIN_DEPENDS
 dnl
 dnl SYNOPSIS
@@ -348,7 +373,7 @@
 dnl 12 - actions
 AC_DEFUN([__MYSQL_EMIT_CHECK_PLUGIN],[
  m4_ifdef([$5],[
-  AH_TEMPLATE($5, [Include ]$4[ into mysqld])
+  AH_TEMPLATE($5, [Include ]$3[ into mysqld])
  ])
  AC_MSG_CHECKING([whether to use ]$3)
  mysql_use_plugin_dir=""
@@ -356,12 +381,16 @@
   if test "X[$mysql_plugin_]$2" = Xyes -a \
           "X[$with_plugin_]$2" != Xno -o \
           "X[$with_plugin_]$2" = Xyes; then
-    AC_MSG_RESULT([error])
+    __MYSQL_EMIT_CHECK_RESULT($3,[error])
     AC_MSG_ERROR([disabled])
   fi
-  AC_MSG_RESULT([no])
+  __MYSQL_EMIT_CHECK_RESULT($3,[no])
  ],[
 
+  if test "X[$mysql_plugin_]$2" = Xno; then
+    [with_plugin_]$2=no
+  fi
+
   # Plugin is not disabled, determine if it should be built,
   # or only distributed
 
@@ -370,7 +399,7 @@
       # Plugin directory was removed after autoconf was run; treat
       # this as a disabled plugin
       if test "X[$with_plugin_]$2" = Xyes; then
-        AC_MSG_RESULT([error])
+        __MYSQL_EMIT_CHECK_RESULT($3,[error])
         AC_MSG_ERROR([disabled])
       fi
 
@@ -381,7 +410,7 @@
 
   m4_ifdef([$9],[
    if test "X[$with_plugin_]$2" = Xno; then
-     AC_MSG_RESULT([error])
+     __MYSQL_EMIT_CHECK_RESULT($3,[error])
      AC_MSG_ERROR([cannot disable mandatory plugin])
    fi
    [mysql_plugin_]$2=yes
@@ -408,7 +437,7 @@
 
 
   if test "X[$with_plugin_]$2" = Xno; then
-    AC_MSG_RESULT([no])
+    __MYSQL_EMIT_CHECK_RESULT($3,[no])
   else
     m4_ifdef([$8],m4_ifdef([$7],[],[[with_plugin_]$2='']))
     if test "X[$mysql_plugin_]$2" != Xyes -a \
@@ -422,16 +451,16 @@
        AC_SUBST([plugin_]$2[_static_target], [""])
        AC_SUBST([plugin_]$2[_embedded_static_target], [""])
        [with_plugin_]$2=yes
-       AC_MSG_RESULT([plugin])
+       __MYSQL_EMIT_CHECK_RESULT($3,[plugin])
        m4_ifdef([$6],[
          else
-           [mysql_plugin_]$2=no
-           AC_MSG_RESULT([no])
+           [with_plugin_]$2=no
+           __MYSQL_EMIT_CHECK_RESULT($3,[no])
          fi
        ])
       ],[
        [with_plugin_]$2=no
-       AC_MSG_RESULT([no])
+       __MYSQL_EMIT_CHECK_RESULT($3,[no])
       ])
     else
       m4_ifdef([$7],[
@@ -479,7 +508,7 @@
        AC_SUBST([plugin_]$2[_shared_target], [""])
       ],[
        m4_ifdef([$6],[
-        AC_MSG_RESULT([error])
+        __MYSQL_EMIT_CHECK_RESULT($3,[error])
         AC_MSG_ERROR([Plugin $1 does not support static linking])
        ],[
         m4_ifdef([$5],[
@@ -489,9 +518,9 @@
         ])
        ])
       ])
-      mysql_plugin_defs="$mysql_plugin_defs, [builtin_]$2[_plugin]"
+      maria_plugin_defs="$maria_plugin_defs, [builtin_maria_]$2[_plugin]"
       [with_plugin_]$2=yes
-      AC_MSG_RESULT([yes])
+      __MYSQL_EMIT_CHECK_RESULT($3,[yes])
     fi
   fi
 
@@ -539,6 +568,12 @@
  ])
 ])
 
+AC_DEFUN([__MYSQL_EMIT_CHECK_RESULT],[
+  AC_MSG_RESULT($2)
+  plugin_report="[$plugin_report]
+m4_format([  * %-32s $2],$1:)"
+])
+
 AC_DEFUN([_MYSQL_EMIT_PLUGIN_ACTIONS],[
  ifelse($#, 0, [], $#, 1, [
   _MYSQL_EMIT_PLUGIN_ACTION([$1])
@@ -752,6 +787,10 @@
 ])
 
 AC_DEFUN([_MYSQL_EMIT_PLUGIN_ENABLE],[
+    if test "X[$mysql_plugin_]$2" = Xno -a \
+            "X[$with_plugin_]$2" != Xno; then
+      AC_MSG_ERROR([Plugin $1 cannot be built])
+    fi
     m4_ifdef([$5],m4_ifdef([$4],[
       [mysql_plugin_]$2=yes
     ],[

=== modified file 'configure.in'
--- a/configure.in	2010-12-21 17:23:50 +0000
+++ b/configure.in	2011-01-05 14:03:58 +0000
@@ -12,7 +12,8 @@
 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.54-MariaDB], [], [mysql])
+
+AC_INIT([MariaDB Server], [5.2.5-MariaDB], [], [mysql])
 
 AC_CONFIG_SRCDIR([sql/mysqld.cc])
 AC_CANONICAL_SYSTEM
@@ -858,7 +859,7 @@
  sys/timeb.h sys/types.h sys/un.h sys/vadvise.h sys/wait.h term.h \
  unistd.h utime.h sys/utime.h termio.h termios.h sched.h crypt.h alloca.h \
  sys/ioctl.h malloc.h sys/malloc.h sys/ipc.h sys/shm.h linux/config.h \
- sys/prctl.h sys/resource.h sys/param.h port.h ieeefp.h \
+ sys/prctl.h sys/resource.h sys/param.h port.h ieeefp.h linux/unistd.h \
  execinfo.h)
 
 AC_CHECK_HEADERS([xfs/xfs.h])
@@ -1628,9 +1629,8 @@
     ;;
 
   *)
-    # Check for dlopen, needed for user definable functions
+    # Check for dlopen, needed for user definable functions and plugins
     # This must be checked after threads on AIX
-    # We only need this for mysqld, not for the clients.
 
     my_save_LIBS="$LIBS"
     LIBS=""
@@ -2145,7 +2145,18 @@
 	# We also disable for SCO for the time being, the headers for the
 	# thread library we use conflicts with other headers.
     ;;
- *) AC_CHECK_FUNCS(clock_gettime)
+*) 
+   # most systems require the program be linked with librt library to use
+   # the function clock_gettime 
+   my_save_LIBS="$LIBS"
+   LIBS=""
+   AC_CHECK_LIB(rt,clock_gettime)
+   LIBRT=$LIBS
+   LIBS="$my_save_LIBS"
+   AC_SUBST(LIBRT)
+
+   LIBS="$LIBS $LIBRT"
+   AC_CHECK_FUNCS(clock_gettime)
     ;;
 esac
 
@@ -2834,7 +2845,7 @@
 fi
 sql_client_dirs="$sql_client_dirs client"
 
-CLIENT_LIBS="$NON_THREADED_LIBS $openssl_libs $ZLIB_LIBS $STATIC_NSS_FLAGS"
+CLIENT_LIBS="$NON_THREADED_LIBS $openssl_libs $ZLIB_LIBS $STATIC_NSS_FLAGS $LIBRT"
 
 AC_SUBST(CLIENT_LIBS)
 AC_SUBST(CLIENT_THREAD_LIBS)
@@ -2884,7 +2895,7 @@
 AC_SUBST(mysql_plugin_dirs)
 AC_SUBST(mysql_plugin_libs)
 AC_SUBST(mysql_embedded_plugin_libs)
-AC_SUBST(mysql_plugin_defs)
+AC_SUBST(maria_plugin_defs)
 
 
 # Now that sql_client_dirs and sql_server_dirs are stable, determine the union.
@@ -2939,7 +2950,7 @@
  man/Makefile BUILD/Makefile vio/Makefile dnl
  libmysql/Makefile libmysql_r/Makefile client/Makefile dnl
  sql/Makefile sql/share/Makefile dnl
- sql/sql_builtin.cc sql-common/Makefile dnl
+ sql/sql_builtin.cc sql-common/Makefile libservices/Makefile dnl
  dbug/Makefile scripts/Makefile include/Makefile dnl
  tests/Makefile Docs/Makefile support-files/Makefile dnl
  support-files/MacOSX/Makefile support-files/RHEL4-SElinux/Makefile dnl
@@ -2958,30 +2969,29 @@
 
 AC_OUTPUT
 
-echo
+echo "---"
+echo "Configuration summary for $PACKAGE_NAME version $VERSION"
+echo "$plugin_report" | sort
+echo ""
+echo "  * Installation prefix:             $prefix"
+echo "  * System type:                     $SYSTEM_TYPE"
+echo "  * Host CPU:                        $host_cpu"
+echo "  * C Compiler:                      $CC_VERSION"
+echo "  * C++ Compiler:                    $CXX_VERSION"
+echo "  * Debug enabled:                   $with_debug"
+echo "  * Community Features:              $ENABLE_COMMUNITY_FEATURES"
+echo ""
+echo "---"
+echo ""
 echo "You can find information about MariaDB at"
-echo http://askmonty.org/wiki/index.php/MariaDB
-echo
+echo "http://kb.askmonty.org/"
+echo ""
 echo "Remember to check the platform specific part of the reference manual for"
 echo "hints about installing MariaDB on your platform. Also have a look at the"
 echo "files in the Docs directory."
-echo
-
-echo "---"
-echo "Configuration summary for $PACKAGE_NAME version $VERSION"
-echo ""
-echo "   * Installation prefix:       $prefix"
-echo "   * System type:               $SYSTEM_TYPE"
-echo "   * Host CPU:                  $host_cpu"
-echo "   * C Compiler:                $CC_VERSION"
-echo "   * C++ Compiler:              $CXX_VERSION"
-echo "   * Debug enabled:             $with_debug"
-echo "   * Community Features:        $ENABLE_COMMUNITY_FEATURES"
-echo ""
-echo "---"
 
 # The first line "Thank you ..." is checked in ./Do-compile to verify that configure
 # ended sucessfully - don't remove it.
-echo
+echo ""
 echo "Thank you for choosing MariaDB!"
-echo
+echo ""

=== modified file 'extra/libevent/CMakeLists.txt'
--- a/extra/libevent/CMakeLists.txt	2009-03-12 22:27:35 +0000
+++ b/extra/libevent/CMakeLists.txt	2010-10-26 05:37:44 +0000
@@ -1,7 +1,8 @@
 INCLUDE_DIRECTORIES(
 	${CMAKE_SOURCE_DIR}/extra/libevent
 	${CMAKE_SOURCE_DIR}/extra/libevent/compat
-	${CMAKE_SOURCE_DIR}/extra/libevent/WIN32-Code)
+	${CMAKE_SOURCE_DIR}/extra/libevent/WIN32-Code
+	${CMAKE_SOURCE_DIR}/include)
 	
 IF(MSVC)
 	ADD_DEFINITIONS("-DWIN32 -DHAVE_CONFIG_H")

=== modified file 'extra/libevent/event.h'
--- a/extra/libevent/event.h	2009-03-12 22:27:35 +0000
+++ b/extra/libevent/event.h	2010-10-26 05:37:44 +0000
@@ -159,6 +159,8 @@
 extern "C" {
 #endif
 
+#include <my_attribute.h>
+
 #include <event-config.h>
 #ifdef _EVENT_HAVE_SYS_TYPES_H
 #include <sys/types.h>

=== modified file 'extra/libevent/evutil.h'
--- a/extra/libevent/evutil.h	2010-11-26 22:37:34 +0000
+++ b/extra/libevent/evutil.h	2010-11-30 21:11:03 +0000
@@ -171,21 +171,4 @@
 }
 #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 'include/Makefile.am'
--- a/include/Makefile.am	2010-10-19 13:58:35 +0000
+++ b/include/Makefile.am	2010-10-25 13:21:16 +0000
@@ -21,8 +21,11 @@
 HEADERS_ABI =		mysql.h mysql_com.h mysql_time.h \
 			my_list.h my_alloc.h typelib.h mysql/plugin.h
 pkginclude_HEADERS =	$(HEADERS_ABI) my_dbug.h m_string.h my_sys.h \
-			my_xml.h mysql_embed.h \
+			my_xml.h mysql_embed.h mysql/services.h \
+			mysql/service_my_snprintf.h mysql/service_thd_alloc.h \
 		  	my_pthread.h my_no_pthread.h \
+			mysql/plugin_auth.h mysql/client_plugin.h \
+			mysql/plugin_auth_common.h \
 			decimal.h errmsg.h my_global.h my_valgrind.h my_net.h \
 			my_getopt.h sslopt-longopts.h my_dir.h \
 			sslopt-vars.h sslopt-case.h sql_common.h keycache.h \
@@ -37,13 +40,13 @@
 			my_nosys.h my_alarm.h queues.h rijndael.h sha1.h \
 			my_aes.h my_tree.h my_trie.h hash.h thr_alarm.h \
 			thr_lock.h t_ctype.h violite.h my_md5.h base64.h \
-			my_handler.h my_time.h \
+			my_handler.h my_time.h service_versions.h \
 			my_vle.h my_user.h my_atomic.h atomic/nolock.h \
 			atomic/rwlock.h atomic/x86-gcc.h atomic/generic-msvc.h \
                         atomic/gcc_builtins.h my_libwrap.h my_stacktrace.h \
                         wqueue.h waiting_threads.h
 
-EXTRA_DIST =        mysql.h.pp mysql/plugin.h.pp
+EXTRA_DIST =            mysql.h.pp mysql/plugin_auth.h.pp mysql/client_plugin.h.pp
 
 # Remove built files and the symlinked directories
 CLEANFILES =            $(BUILT_SOURCES) readline openssl

=== modified file 'include/errmsg.h'
--- a/include/errmsg.h	2008-05-20 16:36:26 +0000
+++ b/include/errmsg.h	2010-03-29 15:13:53 +0000
@@ -97,6 +97,7 @@
 #define CR_SERVER_LOST_EXTENDED			2055
 #define CR_STMT_CLOSED				2056
 #define CR_NEW_STMT_METADATA                    2057
-#define CR_ERROR_LAST  /*Copy last error nr:*/  2057
+#define CR_AUTH_PLUGIN_CANNOT_LOAD              2058
+#define CR_ERROR_LAST  /*Copy last error nr:*/  2058
 /* Add error numbers before CR_ERROR_LAST and change it accordingly. */
 

=== modified file 'include/keycache.h'
--- a/include/keycache.h	2009-12-03 11:19:05 +0000
+++ b/include/keycache.h	2010-10-29 21:18:02 +0000
@@ -19,96 +19,146 @@
 #define _keycache_h
 C_MODE_START
 
-/* declare structures that is used by st_key_cache */
-
-struct st_block_link;
-typedef struct st_block_link BLOCK_LINK;
-struct st_keycache_page;
-typedef struct st_keycache_page KEYCACHE_PAGE;
-struct st_hash_link;
-typedef struct st_hash_link HASH_LINK;
-
-/* info about requests in a waiting queue */
-typedef struct st_keycache_wqueue
-{
-  struct st_my_thread_var *last_thread;  /* circular list of waiting threads */
-} KEYCACHE_WQUEUE;
-
-#define CHANGED_BLOCKS_HASH 128             /* must be power of 2 */
+
+
+/* 
+  Currently the default key cache is created as non-partitioned at 
+  the start of the server unless the server is started with the parameter 
+  --key-cache-partitions that is greater than 0
+*/
+
+#define DEFAULT_KEY_CACHE_PARTITIONS    0
+
+/* 
+  MAX_KEY_CACHE_PARTITIONS cannot be greater than 
+  sizeof(MYISAM_SHARE::dirty_part_map)
+  Currently sizeof(MYISAM_SHARE::dirty_part_map)=sizeof(ulonglong)
+*/
+
+#define MAX_KEY_CACHE_PARTITIONS    64
+
+/* The structure to get statistical data about a key cache */
+
+typedef struct st_key_cache_statistics
+{
+  ulonglong mem_size;       /* memory for cache buffers/auxiliary structures */
+  ulonglong block_size;     /* size of the each buffers in the key cache     */
+  ulonglong blocks_used;    /* maximum number of used blocks/buffers         */ 
+  ulonglong blocks_unused;  /* number of currently unused blocks             */
+  ulonglong blocks_changed; /* number of currently dirty blocks              */
+  ulonglong blocks_warm;    /* number of blocks in warm sub-chain            */
+  ulonglong read_requests;  /* number of read requests (read hits)           */
+  ulonglong reads;        /* number of actual reads from files into buffers  */
+  ulonglong write_requests; /* number of write requests (write hits)         */
+  ulonglong writes;       /* number of actual writes from buffers into files */
+} KEY_CACHE_STATISTICS;
+
+#define NUM_LONG_KEY_CACHE_STAT_VARIABLES 3
+
+/* The type of a key cache object */
+typedef enum key_cache_type
+{
+  SIMPLE_KEY_CACHE,         
+  PARTITIONED_KEY_CACHE
+} KEY_CACHE_TYPE;
+
+
+typedef
+  int    (*INIT_KEY_CACHE)  
+           (void *, uint key_cache_block_size,
+            size_t use_mem, uint division_limit, uint age_threshold);
+typedef
+  int    (*RESIZE_KEY_CACHE)
+           (void *, uint key_cache_block_size,
+            size_t use_mem, uint division_limit, uint age_threshold);
+typedef
+  void   (*CHANGE_KEY_CACHE_PARAM)
+           (void *keycache_cb,
+            uint division_limit, uint age_threshold);
+typedef
+  uchar* (*KEY_CACHE_READ)
+           (void *keycache_cb,
+            File file, my_off_t filepos, int level,
+            uchar *buff, uint length,
+            uint block_length, int return_buffer);
+typedef
+  int    (*KEY_CACHE_INSERT)
+           (void *keycache_cb,
+            File file, my_off_t filepos, int level,
+            uchar *buff, uint length);
+typedef
+  int    (*KEY_CACHE_WRITE)
+           (void *keycache_cb,
+            File file, void *file_extra,
+            my_off_t filepos, int level,
+            uchar *buff, uint length, 
+            uint block_length, int force_write);
+typedef
+  int    (*FLUSH_KEY_BLOCKS)
+           (void *keycache_cb,
+            int file, void *file_extra,
+            enum flush_type type); 
+typedef
+  int    (*RESET_KEY_CACHE_COUNTERS)
+           (const char *name, void *keycache_cb); 
+typedef
+  void   (*END_KEY_CACHE)
+           (void *keycache_cb, my_bool cleanup);
+typedef
+  void   (*GET_KEY_CACHE_STATISTICS)
+           (void *keycache_cb, uint partition_no, 
+            KEY_CACHE_STATISTICS *key_cache_stats); 
 
 /*
-  The key cache structure
-  It also contains read-only statistics parameters.
+  An object of the type KEY_CACHE_FUNCS contains pointers to all functions
+  from the key cache interface.
+  Currently a key cache can be of two types: simple and partitioned.
+  For each of them its own static structure of the type KEY_CACHE_FUNCS is
+  defined . The structures contain the pointers to the implementations of
+  the interface functions used by simple key caches and partitioned key
+  caches respectively. Pointers to these structures are assigned to key cache
+  objects at the time of their creation.
 */   
 
+typedef struct st_key_cache_funcs 
+{
+  INIT_KEY_CACHE init;
+  RESIZE_KEY_CACHE         resize;
+  CHANGE_KEY_CACHE_PARAM   change_param;     
+  KEY_CACHE_READ           read;
+  KEY_CACHE_INSERT         insert;
+  KEY_CACHE_WRITE          write;
+  FLUSH_KEY_BLOCKS         flush;
+  RESET_KEY_CACHE_COUNTERS reset_counters; 
+  END_KEY_CACHE            end;
+  GET_KEY_CACHE_STATISTICS get_stats; 
+} KEY_CACHE_FUNCS;
+
+
 typedef struct st_key_cache
 {
-  my_bool key_cache_inited;
-  my_bool in_resize;             /* true during resize operation             */
-  my_bool resize_in_flush;       /* true during flush of resize operation    */
+  KEY_CACHE_TYPE key_cache_type; /* type of the key cache used for debugging */
+  void *keycache_cb;             /* control block of the used key cache      */
+  KEY_CACHE_FUNCS *interface_funcs; /* interface functions of the key cache  */
+  ulonglong param_buff_size;     /* size the memory allocated for the cache  */
+  ulong param_block_size;        /* size of the blocks in the key cache      */
+  ulong param_division_limit;    /* min. percentage of warm blocks           */
+  ulong param_age_threshold;     /* determines when hot block is downgraded  */
+  ulong param_partitions;        /* number of the key cache partitions       */
+  my_bool key_cache_inited;      /* <=> key cache has been created           */
   my_bool can_be_used;           /* usage of cache for read/write is allowed */
-  size_t key_cache_mem_size;      /* specified size of the cache memory       */
-  uint key_cache_block_size;     /* size of the page buffer of a cache block */
-  ulong min_warm_blocks;         /* min number of warm blocks;               */
-  ulong age_threshold;           /* age threshold for hot blocks             */
-  ulonglong keycache_time;       /* total number of block link operations    */
-  uint hash_entries;             /* max number of entries in the hash table  */
-  int hash_links;                /* max number of hash links                 */
-  int hash_links_used;           /* number of hash links currently used      */
-  int disk_blocks;               /* max number of blocks in the cache        */
-  ulong blocks_used; /* maximum number of concurrently used blocks */
-  ulong blocks_unused; /* number of currently unused blocks */
-  ulong blocks_changed;          /* number of currently dirty blocks         */
-  ulong warm_blocks;             /* number of blocks in warm sub-chain       */
-  ulong cnt_for_resize_op;       /* counter to block resize operation        */
-  long blocks_available;      /* number of blocks available in the LRU chain */
-  HASH_LINK **hash_root;         /* arr. of entries into hash table buckets  */
-  HASH_LINK *hash_link_root;     /* memory for hash table links              */
-  HASH_LINK *free_hash_list;     /* list of free hash links                  */
-  BLOCK_LINK *free_block_list;   /* list of free blocks */
-  BLOCK_LINK *block_root;        /* memory for block links                   */
-  uchar HUGE_PTR *block_mem;     /* memory for block buffers                 */
-  BLOCK_LINK *used_last;         /* ptr to the last block of the LRU chain   */
-  BLOCK_LINK *used_ins;          /* ptr to the insertion block in LRU chain  */
-  pthread_mutex_t cache_lock;    /* to lock access to the cache structure    */
-  KEYCACHE_WQUEUE resize_queue;  /* threads waiting during resize operation  */
-  /*
-    Waiting for a zero resize count. Using a queue for symmetry though
-    only one thread can wait here.
-  */
-  KEYCACHE_WQUEUE waiting_for_resize_cnt;
-  KEYCACHE_WQUEUE waiting_for_hash_link; /* waiting for a free hash link     */
-  KEYCACHE_WQUEUE waiting_for_block;    /* requests waiting for a free block */
-  BLOCK_LINK *changed_blocks[CHANGED_BLOCKS_HASH]; /* hash for dirty file bl.*/
-  BLOCK_LINK *file_blocks[CHANGED_BLOCKS_HASH];    /* hash for other file bl.*/
-
-  /*
-    The following variables are and variables used to hold parameters for
-    initializing the key cache.
-  */
-
-  ulonglong param_buff_size;    /* size the memory allocated for the cache  */
-  ulong param_block_size;       /* size of the blocks in the key cache      */
-  ulong param_division_limit;   /* min. percentage of warm blocks           */
-  ulong param_age_threshold;    /* determines when hot block is downgraded  */
-
-  /* Statistics variables. These are reset in reset_key_cache_counters(). */
-  ulong global_blocks_changed;	/* number of currently dirty blocks         */
-  ulonglong global_cache_w_requests;/* number of write requests (write hits) */
-  ulonglong global_cache_write;     /* number of writes from cache to files  */
-  ulonglong global_cache_r_requests;/* number of read requests (read hits)   */
-  ulonglong global_cache_read;      /* number of reads from files to cache   */
-
-  int blocks;                   /* max number of blocks in the cache        */
-  my_bool in_init;		/* Set to 1 in MySQL during init/resize     */
+  my_bool in_init;		 /* Set to 1 in MySQL during init/resize     */
+  uint partitions;               /* actual number of partitions              */
+  size_t key_cache_mem_size;     /* specified size of the cache memory       */
 } KEY_CACHE;
 
+
 /* The default key cache */
 extern KEY_CACHE dflt_key_cache_var, *dflt_key_cache;
 
 extern int init_key_cache(KEY_CACHE *keycache, uint key_cache_block_size,
 			  size_t use_mem, uint division_limit,
-			  uint age_threshold);
+			  uint age_threshold, uint partitions);
 extern int resize_key_cache(KEY_CACHE *keycache, uint key_cache_block_size,
 			    size_t use_mem, uint division_limit,
 			    uint age_threshold);
@@ -122,12 +172,17 @@
                             File file, my_off_t filepos, int level,
                             uchar *buff, uint length);
 extern int key_cache_write(KEY_CACHE *keycache,
-                           File file, my_off_t filepos, int level,
+                           File file, void *file_extra,
+                           my_off_t filepos, int level,
                            uchar *buff, uint length,
-			   uint block_length,int force_write);
+			   uint block_length, int force_write);
 extern int flush_key_blocks(KEY_CACHE *keycache,
-                            int file, enum flush_type type);
+                            int file, void *file_extra,
+                            enum flush_type type);
 extern void end_key_cache(KEY_CACHE *keycache, my_bool cleanup);
+extern void get_key_cache_statistics(KEY_CACHE *keycache,
+                                     uint partition_no, 
+                                     KEY_CACHE_STATISTICS *key_cache_stats);
 
 /* Functions to handle multiple key caches */
 extern my_bool multi_keycache_init(void);
@@ -140,5 +195,11 @@
 				   KEY_CACHE *new_data);
 extern int reset_key_cache_counters(const char *name,
                                     KEY_CACHE *key_cache);
+extern int repartition_key_cache(KEY_CACHE *keycache,
+                                 uint key_cache_block_size,
+			         size_t use_mem, 
+                                 uint division_limit,
+			         uint age_threshold,
+                                 uint partitions);
 C_MODE_END
 #endif /* _keycache_h */

=== modified file 'include/m_ctype.h'
--- a/include/m_ctype.h	2009-11-30 12:42:24 +0000
+++ b/include/m_ctype.h	2010-04-02 09:20:09 +0000
@@ -38,16 +38,23 @@
 
 #define my_wc_t ulong
 
-typedef struct unicase_info_st
+typedef const struct charset_info_st CHARSET_INFO;
+typedef const struct my_charset_handler_st MY_CHARSET_HANDLER;
+typedef const struct my_collation_handler_st MY_COLLATION_HANDLER;
+
+typedef const struct unicase_info_st MY_UNICASE_INFO;
+typedef const struct uni_ctype_st MY_UNI_CTYPE;
+typedef const struct my_uni_idx_st MY_UNI_IDX;
+
+struct unicase_info_st
 {
   uint16 toupper;
   uint16 tolower;
   uint16 sort;
-} MY_UNICASE_INFO;
-
-
-extern MY_UNICASE_INFO *my_unicase_default[256];
-extern MY_UNICASE_INFO *my_unicase_turkish[256];
+};
+
+extern MY_UNICASE_INFO *const my_unicase_default[256];
+extern MY_UNICASE_INFO *const my_unicase_turkish[256];
 
 #define MY_UCA_MAX_CONTRACTION 4
 #define MY_UCA_MAX_WEIGHT_SIZE 8
@@ -67,11 +74,11 @@
 } MY_CONTRACTIONS;
 
 
-typedef struct uni_ctype_st
+struct uni_ctype_st
 {
   uchar  pctype;
-  uchar  *ctype;
-} MY_UNI_CTYPE;
+  const uchar  *ctype;
+};
 
 extern MY_UNI_CTYPE my_uni_ctype[256];
 
@@ -114,12 +121,12 @@
 #define MY_REPERTOIRE_UNICODE30  3 /* ASCII | EXTENDED:     U+0000..U+FFFF */
 
 
-typedef struct my_uni_idx_st
+struct my_uni_idx_st
 {
   uint16 from;
   uint16 to;
-  uchar  *tab;
-} MY_UNI_IDX;
+  const uchar *tab;
+};
 
 typedef struct
 {
@@ -148,41 +155,41 @@
 
 
 /* See strings/CHARSET_INFO.txt for information about this structure  */
-typedef struct my_collation_handler_st
+struct my_collation_handler_st
 {
   my_bool (*init)(struct charset_info_st *, void *(*alloc)(size_t));
   /* Collation routines */
-  int     (*strnncoll)(struct charset_info_st *,
+  int     (*strnncoll)(CHARSET_INFO *,
 		       const uchar *, size_t, const uchar *, size_t, my_bool);
-  int     (*strnncollsp)(struct charset_info_st *,
+  int     (*strnncollsp)(CHARSET_INFO *,
                          const uchar *, size_t, const uchar *, size_t,
                          my_bool diff_if_only_endspace_difference);
-  size_t     (*strnxfrm)(struct charset_info_st *,
+  size_t     (*strnxfrm)(CHARSET_INFO *,
                          uchar *, size_t, const uchar *, size_t);
-  size_t    (*strnxfrmlen)(struct charset_info_st *, size_t); 
-  my_bool (*like_range)(struct charset_info_st *,
+  size_t    (*strnxfrmlen)(CHARSET_INFO *, size_t); 
+  my_bool (*like_range)(CHARSET_INFO *,
 			const char *s, size_t s_length,
 			pchar w_prefix, pchar w_one, pchar w_many, 
 			size_t res_length,
 			char *min_str, char *max_str,
 			size_t *min_len, size_t *max_len);
-  int     (*wildcmp)(struct charset_info_st *,
+  int     (*wildcmp)(CHARSET_INFO *,
   		     const char *str,const char *str_end,
                      const char *wildstr,const char *wildend,
                      int escape,int w_one, int w_many);
 
-  int  (*strcasecmp)(struct charset_info_st *, const char *, const char *);
+  int  (*strcasecmp)(CHARSET_INFO *, const char *, const char *);
   
-  uint (*instr)(struct charset_info_st *,
+  uint (*instr)(CHARSET_INFO *,
                 const char *b, size_t b_length,
                 const char *s, size_t s_length,
                 my_match_t *match, uint nmatch);
   
   /* Hash calculation */
-  void (*hash_sort)(struct charset_info_st *cs, const uchar *key, size_t len,
+  void (*hash_sort)(CHARSET_INFO *cs, const uchar *key, size_t len,
 		    ulong *nr1, ulong *nr2); 
-  my_bool (*propagate)(struct charset_info_st *cs, const uchar *str, size_t len);
-} MY_COLLATION_HANDLER;
+  my_bool (*propagate)(CHARSET_INFO *cs, const uchar *str, size_t len);
+};
 
 extern MY_COLLATION_HANDLER my_collation_mb_bin_handler;
 extern MY_COLLATION_HANDLER my_collation_8bit_bin_handler;
@@ -190,83 +197,83 @@
 extern MY_COLLATION_HANDLER my_collation_ucs2_uca_handler;
 
 /* Some typedef to make it easy for C++ to make function pointers */
-typedef int (*my_charset_conv_mb_wc)(struct charset_info_st *, my_wc_t *,
+typedef int (*my_charset_conv_mb_wc)(CHARSET_INFO *, my_wc_t *,
                                      const uchar *, const uchar *);
-typedef int (*my_charset_conv_wc_mb)(struct charset_info_st *, my_wc_t,
+typedef int (*my_charset_conv_wc_mb)(CHARSET_INFO *, my_wc_t,
                                      uchar *, uchar *);
-typedef size_t (*my_charset_conv_case)(struct charset_info_st *,
+typedef size_t (*my_charset_conv_case)(CHARSET_INFO *,
                                        char *, size_t, char *, size_t);
 
 
 /* See strings/CHARSET_INFO.txt about information on this structure  */
-typedef struct my_charset_handler_st
+struct my_charset_handler_st
 {
   my_bool (*init)(struct charset_info_st *, void *(*alloc)(size_t));
   /* Multibyte routines */
-  uint    (*ismbchar)(struct charset_info_st *, const char *, const char *);
-  uint    (*mbcharlen)(struct charset_info_st *, uint c);
-  size_t  (*numchars)(struct charset_info_st *, const char *b, const char *e);
-  size_t  (*charpos)(struct charset_info_st *, const char *b, const char *e,
+  uint    (*ismbchar)(CHARSET_INFO *, const char *, const char *);
+  uint    (*mbcharlen)(CHARSET_INFO *, uint c);
+  size_t  (*numchars)(CHARSET_INFO *, const char *b, const char *e);
+  size_t  (*charpos)(CHARSET_INFO *, const char *b, const char *e,
                      size_t pos);
-  size_t  (*well_formed_len)(struct charset_info_st *,
+  size_t  (*well_formed_len)(CHARSET_INFO *,
                              const char *b,const char *e,
                              size_t nchars, int *error);
-  size_t  (*lengthsp)(struct charset_info_st *, const char *ptr, size_t length);
-  size_t  (*numcells)(struct charset_info_st *, const char *b, const char *e);
+  size_t  (*lengthsp)(CHARSET_INFO *, const char *ptr, size_t length);
+  size_t  (*numcells)(CHARSET_INFO *, const char *b, const char *e);
   
   /* Unicode conversion */
   my_charset_conv_mb_wc mb_wc;
   my_charset_conv_wc_mb wc_mb;
 
   /* CTYPE scanner */
-  int (*ctype)(struct charset_info_st *cs, int *ctype,
+  int (*ctype)(CHARSET_INFO *cs, int *ctype,
                const uchar *s, const uchar *e);
   
   /* Functions for case and sort conversion */
-  size_t  (*caseup_str)(struct charset_info_st *, char *);
-  size_t  (*casedn_str)(struct charset_info_st *, char *);
+  size_t  (*caseup_str)(CHARSET_INFO *, char *);
+  size_t  (*casedn_str)(CHARSET_INFO *, char *);
 
   my_charset_conv_case caseup;
   my_charset_conv_case casedn;
 
   /* Charset dependant snprintf() */
-  size_t (*snprintf)(struct charset_info_st *, char *to, size_t n,
+  size_t (*snprintf)(CHARSET_INFO *, char *to, size_t n,
                      const char *fmt,
                      ...) ATTRIBUTE_FORMAT_FPTR(printf, 4, 5);
-  size_t (*long10_to_str)(struct charset_info_st *, char *to, size_t n,
+  size_t (*long10_to_str)(CHARSET_INFO *, char *to, size_t n,
                           int radix, long int val);
-  size_t (*longlong10_to_str)(struct charset_info_st *, char *to, size_t n,
+  size_t (*longlong10_to_str)(CHARSET_INFO *, char *to, size_t n,
                               int radix, longlong val);
   
-  void (*fill)(struct charset_info_st *, char *to, size_t len, int fill);
+  void (*fill)(CHARSET_INFO *, char *to, size_t len, int fill);
   
   /* String-to-number conversion routines */
-  long        (*strntol)(struct charset_info_st *, const char *s, size_t l,
-			 int base, char **e, int *err);
-  ulong      (*strntoul)(struct charset_info_st *, const char *s, size_t l,
-			 int base, char **e, int *err);
-  longlong   (*strntoll)(struct charset_info_st *, const char *s, size_t l,
-			 int base, char **e, int *err);
-  ulonglong (*strntoull)(struct charset_info_st *, const char *s, size_t l,
-			 int base, char **e, int *err);
-  double      (*strntod)(struct charset_info_st *, char *s, size_t l, char **e,
+  long        (*strntol)(CHARSET_INFO *, const char *s, size_t l,
+			 int base, char **e, int *err);
+  ulong      (*strntoul)(CHARSET_INFO *, const char *s, size_t l,
+			 int base, char **e, int *err);
+  longlong   (*strntoll)(CHARSET_INFO *, const char *s, size_t l,
+			 int base, char **e, int *err);
+  ulonglong (*strntoull)(CHARSET_INFO *, const char *s, size_t l,
+			 int base, char **e, int *err);
+  double      (*strntod)(CHARSET_INFO *, char *s, size_t l, char **e,
 			 int *err);
-  longlong    (*strtoll10)(struct charset_info_st *cs,
+  longlong    (*strtoll10)(CHARSET_INFO *cs,
                            const char *nptr, char **endptr, int *error);
-  ulonglong   (*strntoull10rnd)(struct charset_info_st *cs,
+  ulonglong   (*strntoull10rnd)(CHARSET_INFO *cs,
                                 const char *str, size_t length,
                                 int unsigned_fl,
                                 char **endptr, int *error);
-  size_t        (*scan)(struct charset_info_st *, const char *b, const char *e,
+  size_t        (*scan)(CHARSET_INFO *, const char *b, const char *e,
                         int sq);
-} MY_CHARSET_HANDLER;
+};
 
 extern MY_CHARSET_HANDLER my_charset_8bit_handler;
 extern MY_CHARSET_HANDLER my_charset_ucs2_handler;
 
 
 /* See strings/CHARSET_INFO.txt about information on this structure  */
-typedef struct charset_info_st
+struct charset_info_st
 {
   uint      number;
   uint      primary_number;
@@ -276,17 +283,17 @@
   const char *name;
   const char *comment;
   const char *tailoring;
-  uchar    *ctype;
-  uchar    *to_lower;
-  uchar    *to_upper;
-  uchar    *sort_order;
-  MY_CONTRACTIONS *contractions;
-  uint16   **sort_order_big;
-  uint16      *tab_to_uni;
-  MY_UNI_IDX  *tab_from_uni;
-  MY_UNICASE_INFO **caseinfo;
-  uchar     *state_map;
-  uchar     *ident_map;
+  const uchar *ctype;
+  const uchar *to_lower;
+  const uchar *to_upper;
+  const uchar *sort_order;
+  const MY_CONTRACTIONS *contractions;
+  const uint16 *const *sort_order_big;
+  const uint16 *tab_to_uni;
+  MY_UNI_IDX   *tab_from_uni;
+  MY_UNICASE_INFO *const *caseinfo;
+  const uchar  *state_map;
+  const uchar  *ident_map;
   uint      strxfrm_multiply;
   uchar     caseup_multiply;
   uchar     casedn_multiply;
@@ -300,41 +307,41 @@
   MY_CHARSET_HANDLER *cset;
   MY_COLLATION_HANDLER *coll;
   
-} CHARSET_INFO;
+};
 #define ILLEGAL_CHARSET_INFO_NUMBER (~0U)
 
+extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_bin;
+extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_latin1;
+extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_filename;
 
-extern MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_bin;
-extern CHARSET_INFO my_charset_big5_chinese_ci;
-extern CHARSET_INFO my_charset_big5_bin;
-extern CHARSET_INFO my_charset_cp932_japanese_ci;
-extern CHARSET_INFO my_charset_cp932_bin;
-extern CHARSET_INFO my_charset_eucjpms_japanese_ci;
-extern CHARSET_INFO my_charset_eucjpms_bin;
-extern CHARSET_INFO my_charset_euckr_korean_ci;
-extern CHARSET_INFO my_charset_euckr_bin;
-extern CHARSET_INFO my_charset_gb2312_chinese_ci;
-extern CHARSET_INFO my_charset_gb2312_bin;
-extern CHARSET_INFO my_charset_gbk_chinese_ci;
-extern CHARSET_INFO my_charset_gbk_bin;
-extern MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_latin1;
-extern CHARSET_INFO my_charset_latin1_german2_ci;
-extern CHARSET_INFO my_charset_latin1_bin;
-extern CHARSET_INFO my_charset_latin2_czech_ci;
-extern CHARSET_INFO my_charset_sjis_japanese_ci;
-extern CHARSET_INFO my_charset_sjis_bin;
-extern CHARSET_INFO my_charset_tis620_thai_ci;
-extern CHARSET_INFO my_charset_tis620_bin;
-extern CHARSET_INFO my_charset_ucs2_general_ci;
-extern CHARSET_INFO my_charset_ucs2_bin;
-extern CHARSET_INFO my_charset_ucs2_unicode_ci;
-extern CHARSET_INFO my_charset_ujis_japanese_ci;
-extern CHARSET_INFO my_charset_ujis_bin;
-extern CHARSET_INFO my_charset_utf8_general_ci;
-extern CHARSET_INFO my_charset_utf8_unicode_ci;
-extern CHARSET_INFO my_charset_utf8_bin;
-extern CHARSET_INFO my_charset_cp1250_czech_ci;
-extern MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_filename;
+extern struct charset_info_st my_charset_big5_chinese_ci;
+extern struct charset_info_st my_charset_big5_bin;
+extern struct charset_info_st my_charset_cp932_japanese_ci;
+extern struct charset_info_st my_charset_cp932_bin;
+extern struct charset_info_st my_charset_eucjpms_japanese_ci;
+extern struct charset_info_st my_charset_eucjpms_bin;
+extern struct charset_info_st my_charset_euckr_korean_ci;
+extern struct charset_info_st my_charset_euckr_bin;
+extern struct charset_info_st my_charset_gb2312_chinese_ci;
+extern struct charset_info_st my_charset_gb2312_bin;
+extern struct charset_info_st my_charset_gbk_chinese_ci;
+extern struct charset_info_st my_charset_gbk_bin;
+extern struct charset_info_st my_charset_latin1_german2_ci;
+extern struct charset_info_st my_charset_latin1_bin;
+extern struct charset_info_st my_charset_latin2_czech_ci;
+extern struct charset_info_st my_charset_sjis_japanese_ci;
+extern struct charset_info_st my_charset_sjis_bin;
+extern struct charset_info_st my_charset_tis620_thai_ci;
+extern struct charset_info_st my_charset_tis620_bin;
+extern struct charset_info_st my_charset_ucs2_general_ci;
+extern struct charset_info_st my_charset_ucs2_bin;
+extern struct charset_info_st my_charset_ucs2_unicode_ci;
+extern struct charset_info_st my_charset_ujis_japanese_ci;
+extern struct charset_info_st my_charset_ujis_bin;
+extern struct charset_info_st my_charset_utf8_general_ci;
+extern struct charset_info_st my_charset_utf8_unicode_ci;
+extern struct charset_info_st my_charset_utf8_bin;
+extern struct charset_info_st my_charset_cp1250_czech_ci;
 
 /* declarations for simple charsets */
 extern size_t my_strnxfrm_simple(CHARSET_INFO *, uchar *, size_t,
@@ -353,7 +360,7 @@
 
 extern size_t my_lengthsp_8bit(CHARSET_INFO *cs, const char *ptr, size_t length);
 
-extern uint my_instr_simple(struct charset_info_st *,
+extern uint my_instr_simple(CHARSET_INFO *,
                             const char *b, size_t b_length,
                             const char *s, size_t s_length,
                             my_match_t *match, uint nmatch);
@@ -377,7 +384,7 @@
 
 size_t my_scan_8bit(CHARSET_INFO *cs, const char *b, const char *e, int sq);
 
-size_t my_snprintf_8bit(struct charset_info_st *, char *to, size_t n,
+size_t my_snprintf_8bit(CHARSET_INFO *, char *to, size_t n,
                         const char *fmt, ...)
   ATTRIBUTE_FORMAT(printf, 4, 5);
 
@@ -468,7 +475,7 @@
 size_t my_charpos_mb(CHARSET_INFO *, const char *b, const char *e, size_t pos);
 size_t my_well_formed_len_mb(CHARSET_INFO *, const char *b, const char *e,
                              size_t pos, int *error);
-uint my_instr_mb(struct charset_info_st *,
+uint my_instr_mb(CHARSET_INFO *,
                  const char *b, size_t b_length,
                  const char *s, size_t s_length,
                  my_match_t *match, uint nmatch);
@@ -477,10 +484,10 @@
                        const char *str, const char *str_end,
                        const char *wildstr, const char *wildend,
                        int escape, int w_one, int w_many,
-                       MY_UNICASE_INFO **weights);
+                       MY_UNICASE_INFO *const *weights);
 
 extern my_bool my_parse_charset_xml(const char *bug, size_t len,
-				    int (*add)(CHARSET_INFO *cs));
+				    int (*add)(struct charset_info_st *cs));
 extern char *my_strchr(CHARSET_INFO *cs, const char *str, const char *end,
                        pchar c);
 
@@ -496,9 +503,8 @@
 my_bool my_uca_have_contractions(CHARSET_INFO *cs);
 my_bool my_uca_can_be_contraction_head(CHARSET_INFO *cs, my_wc_t wc);
 my_bool my_uca_can_be_contraction_tail(CHARSET_INFO *cs, my_wc_t wc);
-uint16 *my_uca_contraction2_weight(CHARSET_INFO *cs, my_wc_t wc1, my_wc_t wc2);
-
-
+const uint16 *my_uca_contraction2_weight(CHARSET_INFO *cs, my_wc_t wc1,
+                                         my_wc_t wc2);
 
 
 #define	_MY_U	01	/* Upper case */

=== modified file 'include/m_string.h'
--- a/include/m_string.h	2010-08-27 14:12:44 +0000
+++ b/include/m_string.h	2010-09-11 18:43:48 +0000
@@ -85,8 +85,8 @@
 #endif
 
 /* Declared in int2str() */
-extern char NEAR _dig_vec_upper[];
-extern char NEAR _dig_vec_lower[];
+extern const char NEAR _dig_vec_upper[];
+extern const char NEAR _dig_vec_lower[];
 
 /* Defined in strtod.c */
 extern const double log_10[309];
@@ -206,7 +206,7 @@
 			 long *val);
 longlong my_strtoll10(const char *nptr, char **endptr, int *error);
 #if SIZEOF_LONG == SIZEOF_LONG_LONG
-#define longlong2str(A,B,C) int2str((A),(B),(C),1)
+#define longlong2str(A,B,C,D) int2str((A),(B),(C),(D))
 #define longlong10_to_str(A,B,C) int10_to_str((A),(B),(C))
 #undef strtoll
 #define strtoll(A,B,C) strtol((A),(B),(C))
@@ -219,7 +219,7 @@
 #endif
 #else
 #ifdef HAVE_LONG_LONG
-extern char *longlong2str(longlong val,char *dst,int radix);
+  extern char *longlong2str(longlong val,char *dst,int radix, int upcase);
 extern char *longlong10_to_str(longlong val,char *dst,int radix);
 #if (!defined(HAVE_STRTOULL) || defined(NO_STRTOLL_PROTO))
 extern longlong strtoll(const char *str, char **ptr, int base);
@@ -241,16 +241,10 @@
 
 /*
   LEX_STRING -- a pair of a C-string and its length.
+  (it's part of the plugin API as a MYSQL_LEX_STRING)
 */
 
-#ifndef _my_plugin_h
-/* This definition must match the one given in mysql/plugin.h */
-struct st_mysql_lex_string
-{
-  char *str;
-  size_t length;
-};
-#endif
+#include <mysql/plugin.h>
 typedef struct st_mysql_lex_string LEX_STRING;
 
 #define STRING_WITH_LEN(X) (X), ((size_t) (sizeof(X) - 1))

=== modified file 'include/maria.h'
--- a/include/maria.h	2010-11-07 12:25:29 +0000
+++ b/include/maria.h	2010-11-19 21:33:47 +0000
@@ -21,12 +21,9 @@
 #ifdef	__cplusplus
 extern "C" {
 #endif
-#ifndef _my_base_h
 #include <my_base.h>
-#endif
-#ifndef _m_ctype_h
+#include <my_sys.h>
 #include <m_ctype.h>
-#endif
 #include "../storage/maria/ma_pagecache.h"
 #include "my_handler.h"
 #include "ft_global.h"
@@ -286,6 +283,7 @@
 
 extern int maria_init(void);
 extern void maria_end(void);
+extern my_bool maria_upgrade(void);
 extern int maria_close(MARIA_HA *file);
 extern int maria_delete(MARIA_HA *file, const uchar *buff);
 extern MARIA_HA *maria_open(const char *name, int mode,
@@ -334,6 +332,12 @@
 extern void maria_disable_logging(MARIA_HA *info);
 extern void maria_enable_logging(MARIA_HA *info);
 
+#define HA_RECOVER_NONE         0       /* No automatic recover */
+#define HA_RECOVER_DEFAULT      1       /* Automatic recover active */
+#define HA_RECOVER_BACKUP       2       /* Make a backupfile on recover */
+#define HA_RECOVER_FORCE        4       /* Recover even if we loose rows */
+#define HA_RECOVER_QUICK        8       /* Don't check rows in data file */
+
 /* this is used to pass to mysql_mariachk_table */
 
 #define MARIA_CHK_REPAIR 1              /* equivalent to mariachk -r */

=== modified file 'include/my_attribute.h'
--- a/include/my_attribute.h	2007-04-11 22:43:25 +0000
+++ b/include/my_attribute.h	2010-11-30 21:11:03 +0000
@@ -30,10 +30,15 @@
 #ifndef __attribute__
 # if !defined(__GNUC__)
 #  define __attribute__(A)
-# elif GCC_VERSION < 2008
-#  define __attribute__(A)
-# elif defined(__cplusplus) && GCC_VERSION < 3004
-#  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
 

=== modified file 'include/my_base.h'
--- a/include/my_base.h	2010-11-02 15:22:57 +0000
+++ b/include/my_base.h	2010-11-04 14:53:10 +0000
@@ -274,17 +274,6 @@
 #define HA_USES_PARSER           16384  /* Fulltext index uses [pre]parser */
 #define HA_USES_BLOCK_SIZE	 ((uint) 32768)
 #define HA_SORT_ALLOWS_SAME      512    /* Intern bit when sorting records */
-#if MYSQL_VERSION_ID < 50200
-/*
-  Key has a part that can have end space.  If this is an unique key
-  we have to handle it differently from other unique keys as we can find
-  many matching rows for one key (because end space are not compared)
-*/
-#define HA_END_SPACE_KEY      0 /* was: 4096 */
-#else
-#error HA_END_SPACE_KEY is obsolete, please remove it
-#endif
-
 
 	/* These flags can be added to key-seg-flag */
 
@@ -302,6 +291,7 @@
 */
 #define HA_END_SPACE_ARE_EQUAL	 512
 #define HA_BIT_PART		1024
+#define HA_CAN_MEMCMP           2048 /* internal, never stored in frm */
 
 	/* optionbits for database */
 #define HA_OPTION_PACK_RECORD		1
@@ -316,6 +306,8 @@
 #define HA_OPTION_RELIES_ON_SQL_LAYER   512
 #define HA_OPTION_NULL_FIELDS		1024
 #define HA_OPTION_PAGE_CHECKSUM		2048
+/* .frm has extra create options in linked-list format */
+#define HA_OPTION_TEXT_CREATE_OPTIONS   (1L << 14)
 #define HA_OPTION_TEMP_COMPRESS_RECORD  (1L << 15)      /* set by isamchk */
 #define HA_OPTION_READ_ONLY_DATA        (1L << 16)      /* Set by isamchk */
 #define HA_OPTION_NO_CHECKSUM           (1L << 17)

=== modified file 'include/my_global.h'
--- a/include/my_global.h	2010-09-11 07:46:33 +0000
+++ b/include/my_global.h	2010-09-11 18:43:48 +0000
@@ -580,6 +580,14 @@
 #define LINT_INIT(var)
 #endif
 
+#ifdef _WIN32
+#define SO_EXT ".dll"
+#elif defined(__APPLE__)
+#define SO_EXT ".dylib"
+#else
+#define SO_EXT ".so"
+#endif
+
 /*
    Suppress uninitialized variable warning without generating code.
 
@@ -1517,6 +1525,9 @@
 #elif defined(HAVE_DLFCN_H)
 #include <dlfcn.h>
 #endif
+#ifndef HAVE_DLERROR
+#define dlerror() ""
+#endif
 #endif
 
 /* FreeBSD 2.2.2 does not define RTLD_NOW) */
@@ -1524,11 +1535,13 @@
 #define RTLD_NOW 1
 #endif
 
-#ifndef HAVE_DLERROR
-#define dlerror() ""
+#ifndef HAVE_DLOPEN
+#define dlerror() "No support for dynamic loading (static build?)"
+#define dlopen(A,B) 0
+#define dlsym(A,B) 0
+#define dlclose(A) 0
 #endif
 
-
 #ifndef __NETWARE__
 /*
  *  Include standard definitions of operator new and delete.

=== modified file 'include/my_no_pthread.h'
--- a/include/my_no_pthread.h	2009-12-12 18:11:25 +0000
+++ b/include/my_no_pthread.h	2010-03-29 15:13:53 +0000
@@ -46,6 +46,7 @@
 #define rw_wrlock(A)
 #define rw_unlock(A)
 #define rwlock_destroy(A)
+#define safe_mutex_assert_owner(mp)
 
 typedef int my_pthread_once_t;
 #define MY_PTHREAD_ONCE_INIT 0

=== modified file 'include/my_pthread.h'
--- a/include/my_pthread.h	2010-12-01 20:37:03 +0000
+++ b/include/my_pthread.h	2010-12-04 21:18:46 +0000
@@ -127,6 +127,7 @@
 
 
 void pthread_exit(void *a);	 /* was #define pthread_exit(A) ExitThread(A)*/
+
 #ifndef ETIMEDOUT
 #define ETIMEDOUT 145		    /* Win32 doesn't have this */
 #endif

=== modified file 'include/my_sys.h'
--- a/include/my_sys.h	2010-11-07 12:25:29 +0000
+++ b/include/my_sys.h	2010-12-13 13:05:57 +0000
@@ -197,7 +197,7 @@
 #define my_large_free(A,B) my_free_lock((A),(B))
 #endif /* HAVE_LARGE_PAGES */
 
-#ifdef HAVE_ALLOCA
+#if defined(HAVE_ALLOCA) && !defined(HAVE_valgrind)
 #if defined(_AIX) && !defined(__GNUC__) && !defined(_AIX43)
 #pragma alloca
 #endif /* _AIX */
@@ -209,10 +209,14 @@
 #define alloca __builtin_alloca
 #endif /* GNUC */
 #define my_alloca(SZ) alloca((size_t) (SZ))
-#define my_afree(PTR) {}
+#define my_afree(PTR) ((void)0)
+#define my_safe_alloca(size, min_length) ((size <= min_length) ? my_alloca(size) : my_malloc(size,MYF(MY_FAE)))
+#define my_safe_afree(ptr, size, min_length) ((size <= min_length) ? (void)0 : my_free(ptr,MYF(MY_WME)))
 #else
-#define my_alloca(SZ) my_malloc(SZ,MYF(0))
+#define my_alloca(SZ) my_malloc(SZ,MYF(MY_FAE))
 #define my_afree(PTR) my_free(PTR,MYF(MY_WME))
+#define my_safe_alloca(size, min_length) my_alloca(size)
+#define my_safe_afree(ptr, size, min_length) my_afree(ptr)
 #endif /* HAVE_ALLOCA */
 
 #ifndef errno				/* did we already get it? */
@@ -243,7 +247,7 @@
 /* charsets */
 extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *default_charset_info;
 extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *all_charsets[256];
-extern CHARSET_INFO compiled_charsets[];
+extern struct charset_info_st compiled_charsets[];
 
 /* statistics */
 extern ulong	my_file_opened,my_stream_opened, my_tmp_file_created;
@@ -875,6 +879,10 @@
 extern void reset_root_defaults(MEM_ROOT *mem_root, size_t block_size,
                                 size_t prealloc_size);
 extern char *strdup_root(MEM_ROOT *root,const char *str);
+static inline char *safe_strdup_root(MEM_ROOT *root, const char *str)
+{
+  return str ? strdup_root(root, str) : 0;
+}
 extern char *strmake_root(MEM_ROOT *root,const char *str,size_t len);
 extern void *memdup_root(MEM_ROOT *root,const void *str, size_t len);
 extern int get_defaults_options(int argc, char **argv,
@@ -920,6 +928,7 @@
 
 extern time_t my_time(myf flags);
 extern ulonglong my_getsystime(void);
+extern ulonglong my_getcputime(void);
 extern ulonglong my_micro_time();
 extern ulonglong my_micro_time_and_time(time_t *time_arg);
 time_t my_time_possible_from_micro(ulonglong microtime);
@@ -1007,7 +1016,7 @@
 extern char *get_charsets_dir(char *buf);
 extern my_bool my_charset_same(CHARSET_INFO *cs1, CHARSET_INFO *cs2);
 extern my_bool init_compiled_charsets(myf flags);
-extern void add_compiled_collation(CHARSET_INFO *cs);
+extern void add_compiled_collation(struct charset_info_st *cs);
 extern size_t escape_string_for_mysql(CHARSET_INFO *charset_info,
                                       char *to, size_t to_length,
                                       const char *from, size_t length);

=== modified file 'include/mysql.h'
--- a/include/mysql.h	2010-11-23 21:39:59 +0000
+++ b/include/mysql.h	2010-11-30 21:11:03 +0000
@@ -169,9 +169,15 @@
   MYSQL_OPT_USE_REMOTE_CONNECTION, MYSQL_OPT_USE_EMBEDDED_CONNECTION,
   MYSQL_OPT_GUESS_CONNECTION, MYSQL_SET_CLIENT_IP, MYSQL_SECURE_AUTH,
   MYSQL_REPORT_DATA_TRUNCATION, MYSQL_OPT_RECONNECT,
-  MYSQL_OPT_SSL_VERIFY_SERVER_CERT
+  MYSQL_OPT_SSL_VERIFY_SERVER_CERT, MYSQL_PLUGIN_DIR, MYSQL_DEFAULT_AUTH
 };
 
+/**
+  @todo remove the "extension", move st_mysql_options completely
+  out of mysql.h
+*/
+struct st_mysql_options_extention; 
+
 struct st_mysql_options {
   unsigned int connect_timeout, read_timeout, write_timeout;
   unsigned int port, protocol;
@@ -219,7 +225,7 @@
   void (*local_infile_end)(void *);
   int (*local_infile_error)(void *, char *, unsigned int);
   void *local_infile_userdata;
-  void *extension;
+  struct st_mysql_options_extention *extension;
 };
 
 enum mysql_status 
@@ -264,7 +270,7 @@
   unsigned char	*connector_fd;		/* ConnectorFd for SSL */
   char		*host,*user,*passwd,*unix_socket,*server_version,*host_info;
   char          *info, *db;
-  struct charset_info_st *charset;
+  const struct charset_info_st *charset;
   MYSQL_FIELD	*fields;
   MEM_ROOT	field_alloc;
   my_ulonglong affected_rows;
@@ -755,38 +761,6 @@
 };
 
 
-typedef struct st_mysql_methods
-{
-  my_bool (*read_query_result)(MYSQL *mysql);
-  my_bool (*advanced_command)(MYSQL *mysql,
-			      enum enum_server_command command,
-			      const unsigned char *header,
-			      unsigned long header_length,
-			      const unsigned char *arg,
-			      unsigned long arg_length,
-			      my_bool skip_check,
-                              MYSQL_STMT *stmt);
-  MYSQL_DATA *(*read_rows)(MYSQL *mysql,MYSQL_FIELD *mysql_fields,
-			   unsigned int fields);
-  MYSQL_RES * (*use_result)(MYSQL *mysql);
-  void (*fetch_lengths)(unsigned long *to, 
-			MYSQL_ROW column, unsigned int field_count);
-  void (*flush_use_result)(MYSQL *mysql);
-#if !defined(MYSQL_SERVER) || defined(EMBEDDED_LIBRARY)
-  MYSQL_FIELD * (*list_fields)(MYSQL *mysql);
-  my_bool (*read_prepare_result)(MYSQL *mysql, MYSQL_STMT *stmt);
-  int (*stmt_execute)(MYSQL_STMT *stmt);
-  int (*read_binary_rows)(MYSQL_STMT *stmt);
-  int (*unbuffered_fetch)(MYSQL *mysql, char **row);
-  void (*free_embedded_thd)(MYSQL *mysql);
-  const char *(*read_statistics)(MYSQL *mysql);
-  my_bool (*next_result)(MYSQL *mysql);
-  int (*read_change_user_result)(MYSQL *mysql, char *buff, const char *passwd);
-  int (*read_rows_from_cursor)(MYSQL_STMT *stmt);
-#endif
-} MYSQL_METHODS;
-
-
 MYSQL_STMT * STDCALL mysql_stmt_init(MYSQL *mysql);
 int STDCALL mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query,
                                unsigned long length);
@@ -849,18 +823,6 @@
 #endif
 #define HAVE_MYSQL_REAL_CONNECT
 
-/*
-  The following functions are mainly exported because of mysqlbinlog;
-  They are not for general usage
-*/
-
-#define simple_command(mysql, command, arg, length, skip_check) \
-  (*(mysql)->methods->advanced_command)(mysql, command, 0,  \
-                                        0, arg, length, skip_check, NULL)
-#define stmt_command(mysql, command, arg, length, stmt) \
-  (*(mysql)->methods->advanced_command)(mysql, command, 0,  \
-                                        0, arg, length, 1, stmt)
-
 #ifdef __NETWARE__
 #pragma pack(pop)		/* restore alignment */
 #endif

=== modified file 'include/mysql.h.pp'
--- a/include/mysql.h.pp	2010-11-23 21:39:59 +0000
+++ b/include/mysql.h.pp	2010-11-30 21:11:03 +0000
@@ -127,13 +127,13 @@
 void hash_password(unsigned long *to, const char *password, unsigned int password_len);
 void make_scrambled_password_323(char *to, const char *password);
 void scramble_323(char *to, const char *message, const char *password);
-my_bool check_scramble_323(const char *, const char *message,
+my_bool check_scramble_323(const unsigned char *reply, const char *message,
                            unsigned long *salt);
 void get_salt_from_password_323(unsigned long *res, const char *password);
 void make_password_from_salt_323(char *to, const unsigned long *salt);
 void make_scrambled_password(char *to, const char *password);
 void scramble(char *to, const char *message, const char *password);
-my_bool check_scramble(const char *reply, const char *message,
+my_bool check_scramble(const unsigned char *reply, const char *message,
                        const unsigned char *hash_stage2);
 void get_salt_from_password(unsigned char *res, const char *password);
 void make_password_from_salt(char *to, const unsigned char *hash_stage2);
@@ -257,8 +257,9 @@
   MYSQL_OPT_USE_REMOTE_CONNECTION, MYSQL_OPT_USE_EMBEDDED_CONNECTION,
   MYSQL_OPT_GUESS_CONNECTION, MYSQL_SET_CLIENT_IP, MYSQL_SECURE_AUTH,
   MYSQL_REPORT_DATA_TRUNCATION, MYSQL_OPT_RECONNECT,
-  MYSQL_OPT_SSL_VERIFY_SERVER_CERT
+  MYSQL_OPT_SSL_VERIFY_SERVER_CERT, MYSQL_PLUGIN_DIR, MYSQL_DEFAULT_AUTH
 };
+struct st_mysql_options_extention;
 struct st_mysql_options {
   unsigned int connect_timeout, read_timeout, write_timeout;
   unsigned int port, protocol;
@@ -288,7 +289,7 @@
   void (*local_infile_end)(void *);
   int (*local_infile_error)(void *, char *, unsigned int);
   void *local_infile_userdata;
-  void *extension;
+  struct st_mysql_options_extention *extension;
 };
 enum mysql_status
 {
@@ -323,7 +324,7 @@
   unsigned char *connector_fd;
   char *host,*user,*passwd,*unix_socket,*server_version,*host_info;
   char *info, *db;
-  struct charset_info_st *charset;
+  const struct charset_info_st *charset;
   MYSQL_FIELD *fields;
   MEM_ROOT field_alloc;
   my_ulonglong affected_rows;
@@ -601,34 +602,6 @@
   STMT_ATTR_CURSOR_TYPE,
   STMT_ATTR_PREFETCH_ROWS
 };
-typedef struct st_mysql_methods
-{
-  my_bool (*read_query_result)(MYSQL *mysql);
-  my_bool (*advanced_command)(MYSQL *mysql,
-         enum enum_server_command command,
-         const unsigned char *header,
-         unsigned long header_length,
-         const unsigned char *arg,
-         unsigned long arg_length,
-         my_bool skip_check,
-                              MYSQL_STMT *stmt);
-  MYSQL_DATA *(*read_rows)(MYSQL *mysql,MYSQL_FIELD *mysql_fields,
-      unsigned int fields);
-  MYSQL_RES * (*use_result)(MYSQL *mysql);
-  void (*fetch_lengths)(unsigned long *to,
-   MYSQL_ROW column, unsigned int field_count);
-  void (*flush_use_result)(MYSQL *mysql);
-  MYSQL_FIELD * (*list_fields)(MYSQL *mysql);
-  my_bool (*read_prepare_result)(MYSQL *mysql, MYSQL_STMT *stmt);
-  int (*stmt_execute)(MYSQL_STMT *stmt);
-  int (*read_binary_rows)(MYSQL_STMT *stmt);
-  int (*unbuffered_fetch)(MYSQL *mysql, char **row);
-  void (*free_embedded_thd)(MYSQL *mysql);
-  const char *(*read_statistics)(MYSQL *mysql);
-  my_bool (*next_result)(MYSQL *mysql);
-  int (*read_change_user_result)(MYSQL *mysql, char *buff, const char *passwd);
-  int (*read_rows_from_cursor)(MYSQL_STMT *stmt);
-} MYSQL_METHODS;
 MYSQL_STMT * mysql_stmt_init(MYSQL *mysql);
 int mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query,
                                unsigned long length);

=== added file 'include/mysql/client_plugin.h'
--- a/include/mysql/client_plugin.h	1970-01-01 00:00:00 +0000
+++ b/include/mysql/client_plugin.h	2010-09-28 16:47:23 +0000
@@ -0,0 +1,166 @@
+#ifndef MYSQL_CLIENT_PLUGIN_INCLUDED
+/* Copyright (C) 2010 Sergei Golubchik and 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
+   the Free Software Foundation; version 2 of the License.
+
+   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
+   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 */
+
+/**
+  @file
+
+  MySQL Client Plugin API
+
+  This file defines the API for plugins that work on the client side
+*/
+#define MYSQL_CLIENT_PLUGIN_INCLUDED
+
+#ifndef MYSQL_ABI_CHECK
+#include <stdarg.h>
+#include <stdlib.h>
+#endif
+
+/* known plugin types */
+#define MYSQL_CLIENT_reserved1               0
+#define MYSQL_CLIENT_reserved2               1
+#define MYSQL_CLIENT_AUTHENTICATION_PLUGIN   2
+
+#define MYSQL_CLIENT_AUTHENTICATION_PLUGIN_INTERFACE_VERSION  0x0100
+
+#define MYSQL_CLIENT_MAX_PLUGINS             3
+
+#define mysql_declare_client_plugin(X)          \
+     struct st_mysql_client_plugin_ ## X        \
+        _mysql_client_plugin_declaration_ = {   \
+          MYSQL_CLIENT_ ## X ## _PLUGIN,        \
+          MYSQL_CLIENT_ ## X ## _PLUGIN_INTERFACE_VERSION,
+#define mysql_end_client_plugin             }
+
+/* generic plugin header structure */
+#define MYSQL_CLIENT_PLUGIN_HEADER                      \
+  int type;                                             \
+  unsigned int interface_version;                       \
+  const char *name;                                     \
+  const char *author;                                   \
+  const char *desc;                                     \
+  unsigned int version[3];                              \
+  int (*init)(char *, size_t, int, va_list);            \
+  int (*deinit)();
+
+struct st_mysql_client_plugin
+{
+  MYSQL_CLIENT_PLUGIN_HEADER
+};
+
+struct st_mysql;
+
+/******** authentication plugin specific declarations *********/
+#include <mysql/plugin_auth_common.h>
+
+struct st_mysql_client_plugin_AUTHENTICATION
+{
+  MYSQL_CLIENT_PLUGIN_HEADER
+  int (*authenticate_user)(MYSQL_PLUGIN_VIO *vio, struct st_mysql *mysql);
+};
+
+/**
+  type of the mysql_authentication_dialog_ask function
+
+  @param mysql          mysql
+  @param type           type of the input
+                        1 - ordinary string input
+                        2 - password string
+  @param prompt         prompt
+  @param buf            a buffer to store the use input
+  @param buf_len        the length of the buffer
+
+  @retval               a pointer to the user input string.
+                        It may be equal to 'buf' or to 'mysql->password'.
+                        In all other cases it is assumed to be an allocated
+                        string, and the "dialog" plugin will free() it.
+*/
+typedef char *(*mysql_authentication_dialog_ask_t)(struct st_mysql *mysql,
+                      int type, const char *prompt, char *buf, int buf_len);
+/******** using plugins ************/
+
+/**
+  loads a plugin and initializes it
+
+  @param mysql  MYSQL structure. only MYSQL_PLUGIN_DIR option value is used,
+                and last_errno/last_error, for error reporting
+  @param name   a name of the plugin to load
+  @param type   type of plugin that should be loaded, -1 to disable type check
+  @param argc   number of arguments to pass to the plugin initialization
+                function
+  @param ...    arguments for the plugin initialization function
+
+  @retval
+  a pointer to the loaded plugin, or NULL in case of a failure
+*/
+struct st_mysql_client_plugin *
+mysql_load_plugin(struct st_mysql *mysql, const char *name, int type,
+                  int argc, ...);
+
+/**
+  loads a plugin and initializes it, taking va_list as an argument
+
+  This is the same as mysql_load_plugin, but take va_list instead of
+  a list of arguments.
+
+  @param mysql  MYSQL structure. only MYSQL_PLUGIN_DIR option value is used,
+                and last_errno/last_error, for error reporting
+  @param name   a name of the plugin to load
+  @param type   type of plugin that should be loaded, -1 to disable type check
+  @param argc   number of arguments to pass to the plugin initialization
+                function
+  @param args   arguments for the plugin initialization function
+
+  @retval
+  a pointer to the loaded plugin, or NULL in case of a failure
+*/
+struct st_mysql_client_plugin *
+mysql_load_plugin_v(struct st_mysql *mysql, const char *name, int type,
+                    int argc, va_list args);
+
+/**
+  finds an already loaded plugin by name, or loads it, if necessary
+
+  @param mysql  MYSQL structure. only MYSQL_PLUGIN_DIR option value is used,
+                and last_errno/last_error, for error reporting
+  @param name   a name of the plugin to load
+  @param type   type of plugin that should be loaded
+
+  @retval
+  a pointer to the plugin, or NULL in case of a failure
+*/
+struct st_mysql_client_plugin *
+mysql_client_find_plugin(struct st_mysql *mysql, const char *name, int type);
+
+/**
+  adds a plugin structure to the list of loaded plugins
+
+  This is useful if an application has the necessary functionality
+  (for example, a special load data handler) statically linked into
+  the application binary. It can use this function to register the plugin
+  directly, avoiding the need to factor it out into a shared object.
+
+  @param mysql  MYSQL structure. It is only used for error reporting
+  @param plugin an st_mysql_client_plugin structure to register
+
+  @retval
+  a pointer to the plugin, or NULL in case of a failure
+*/
+struct st_mysql_client_plugin *
+mysql_client_register_plugin(struct st_mysql *mysql,
+                             struct st_mysql_client_plugin *plugin);
+
+#endif
+

=== added file 'include/mysql/client_plugin.h.pp'
--- a/include/mysql/client_plugin.h.pp	1970-01-01 00:00:00 +0000
+++ b/include/mysql/client_plugin.h.pp	2010-09-28 16:47:23 +0000
@@ -0,0 +1,39 @@
+struct st_mysql_client_plugin
+{
+  int type; unsigned int interface_version; const char *name; const char *author; const char *desc; unsigned int version[3]; int (*init)(char *, size_t, int, va_list); int (*deinit)();
+};
+struct st_mysql;
+#include <mysql/plugin_auth_common.h>
+typedef struct st_plugin_vio_info
+{
+  enum { MYSQL_VIO_INVALID, MYSQL_VIO_TCP, MYSQL_VIO_SOCKET,
+         MYSQL_VIO_PIPE, MYSQL_VIO_MEMORY } protocol;
+  int socket;
+} MYSQL_PLUGIN_VIO_INFO;
+typedef struct st_plugin_vio
+{
+  int (*read_packet)(struct st_plugin_vio *vio,
+                     unsigned char **buf);
+  int (*write_packet)(struct st_plugin_vio *vio,
+                      const unsigned char *packet,
+                      int packet_len);
+  void (*info)(struct st_plugin_vio *vio, struct st_plugin_vio_info *info);
+} MYSQL_PLUGIN_VIO;
+struct st_mysql_client_plugin_AUTHENTICATION
+{
+  int type; unsigned int interface_version; const char *name; const char *author; const char *desc; unsigned int version[3]; int (*init)(char *, size_t, int, va_list); int (*deinit)();
+  int (*authenticate_user)(MYSQL_PLUGIN_VIO *vio, struct st_mysql *mysql);
+};
+typedef char *(*mysql_authentication_dialog_ask_t)(struct st_mysql *mysql,
+                      int type, const char *prompt, char *buf, int buf_len);
+struct st_mysql_client_plugin *
+mysql_load_plugin(struct st_mysql *mysql, const char *name, int type,
+                  int argc, ...);
+struct st_mysql_client_plugin *
+mysql_load_plugin_v(struct st_mysql *mysql, const char *name, int type,
+                    int argc, va_list args);
+struct st_mysql_client_plugin *
+mysql_client_find_plugin(struct st_mysql *mysql, const char *name, int type);
+struct st_mysql_client_plugin *
+mysql_client_register_plugin(struct st_mysql *mysql,
+                             struct st_mysql_client_plugin *plugin);

=== modified file 'include/mysql/plugin.h'
--- a/include/mysql/plugin.h	2010-10-19 13:58:35 +0000
+++ b/include/mysql/plugin.h	2010-10-25 13:21:16 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 MySQL AB
+/* Copyright (C) 2005 MySQL AB, 2009 Sun Microsystems, Inc.
 
    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
@@ -34,15 +34,7 @@
 #define MYSQL_THD void*
 #endif
 
-#ifndef _m_string_h
-/* This definition must match the one given in m_string.h */
-struct st_mysql_lex_string
-{
-  char *str;
-  unsigned int length;
-};
-#endif /* _m_string_h */
-typedef struct st_mysql_lex_string MYSQL_LEX_STRING;
+#include <mysql/services.h>
 
 #define MYSQL_XIDDATASIZE 128
 /**
@@ -65,7 +57,10 @@
   Plugin API. Common for all plugin types.
 */
 
-#define MYSQL_PLUGIN_INTERFACE_VERSION 0x0100
+/* MySQL plugin interface version */
+#define MYSQL_PLUGIN_INTERFACE_VERSION 0x0101
+/* MariaDB plugin interface version */
+#define MARIA_PLUGIN_INTERFACE_VERSION 0x0100
 
 /*
   The allowable types of plugins
@@ -75,7 +70,10 @@
 #define MYSQL_FTPARSER_PLUGIN        2  /* Full-text parser plugin      */
 #define MYSQL_DAEMON_PLUGIN          3  /* The daemon/raw plugin type */
 #define MYSQL_INFORMATION_SCHEMA_PLUGIN  4  /* The I_S plugin type */
-#define MYSQL_MAX_PLUGIN_TYPE_NUM    5  /* The number of plugin types   */
+#define MYSQL_AUDIT_PLUGIN           5  /* The Audit plugin type        */
+#define MYSQL_REPLICATION_PLUGIN     6	/* The replication plugin type */
+#define MYSQL_AUTHENTICATION_PLUGIN  7  /* The authentication plugin type */
+#define MYSQL_MAX_PLUGIN_TYPE_NUM    8  /* The number of plugin types   */
 
 /* We use the following strings to define licenses for plugins */
 #define PLUGIN_LICENSE_PROPRIETARY 0
@@ -86,6 +84,14 @@
 #define PLUGIN_LICENSE_GPL_STRING "GPL"
 #define PLUGIN_LICENSE_BSD_STRING "BSD"
 
+/* definitions of code maturity for plugins */
+#define MariaDB_PLUGIN_MATURITY_UNKNOWN 0
+#define MariaDB_PLUGIN_MATURITY_EXPERIMENTAL 1
+#define MariaDB_PLUGIN_MATURITY_ALPHA 2
+#define MariaDB_PLUGIN_MATURITY_BETA 3
+#define MariaDB_PLUGIN_MATURITY_GAMMA 4
+#define MariaDB_PLUGIN_MATURITY_STABLE 5
+
 /*
   Macros for beginning and ending plugin declarations.  Between
   mysql_declare_plugin and mysql_declare_plugin_end there should
@@ -98,11 +104,24 @@
 int VERSION= MYSQL_PLUGIN_INTERFACE_VERSION;                                  \
 int PSIZE= sizeof(struct st_mysql_plugin);                                    \
 struct st_mysql_plugin DECLS[]= {
+
+#define MARIA_DECLARE_PLUGIN__(NAME, VERSION, PSIZE, DECLS)                    \
+int VERSION= MARIA_PLUGIN_INTERFACE_VERSION;                                   \
+int PSIZE= sizeof(struct st_maria_plugin);                                     \
+struct st_maria_plugin DECLS[]= {
+
 #else
+
 #define __MYSQL_DECLARE_PLUGIN(NAME, VERSION, PSIZE, DECLS)                   \
 MYSQL_PLUGIN_EXPORT int _mysql_plugin_interface_version_= MYSQL_PLUGIN_INTERFACE_VERSION;         \
 MYSQL_PLUGIN_EXPORT int _mysql_sizeof_struct_st_plugin_= sizeof(struct st_mysql_plugin);          \
 MYSQL_PLUGIN_EXPORT struct st_mysql_plugin _mysql_plugin_declarations_[]= {
+
+#define MARIA_DECLARE_PLUGIN__(NAME, VERSION, PSIZE, DECLS)                \
+MYSQL_PLUGIN_EXPORT int _maria_plugin_interface_version_= MARIA_PLUGIN_INTERFACE_VERSION;   \
+MYSQL_PLUGIN_EXPORT int _maria_sizeof_struct_st_plugin_= sizeof(struct st_maria_plugin);    \
+MYSQL_PLUGIN_EXPORT struct st_maria_plugin _maria_plugin_declarations_[]= {
+
 #endif
 
 #define mysql_declare_plugin(NAME) \
@@ -111,7 +130,14 @@
                  builtin_ ## NAME ## _sizeof_struct_st_plugin, \
                  builtin_ ## NAME ## _plugin)
 
+#define maria_declare_plugin(NAME) \
+MARIA_DECLARE_PLUGIN__(NAME, \
+                 builtin_maria_ ## NAME ## _plugin_interface_version, \
+                 builtin_maria_ ## NAME ## _sizeof_struct_st_plugin, \
+                 builtin_maria_ ## NAME ## _plugin)
+
 #define mysql_declare_plugin_end ,{0,0,0,0,0,0,0,0,0,0,0,0}}
+#define maria_declare_plugin_end ,{0,0,0,0,0,0,0,0,0,0,0,0,0}}
 
 /*
   declarations for SHOW STATUS support in plugins
@@ -120,7 +146,8 @@
 {
   SHOW_UNDEF, SHOW_BOOL, SHOW_INT, SHOW_LONG,
   SHOW_LONGLONG, SHOW_CHAR, SHOW_CHAR_PTR,
-  SHOW_ARRAY, SHOW_FUNC, SHOW_DOUBLE
+  SHOW_ARRAY, SHOW_FUNC, SHOW_DOUBLE,
+  SHOW_always_last
 };
 
 struct st_mysql_show_var {
@@ -230,7 +257,7 @@
 #define DECLARE_MYSQL_SYSVAR_BASIC(name, type) struct { \
   MYSQL_PLUGIN_VAR_HEADER;      \
   type *value;                  \
-  const type def_val;           \
+  const type def_val;                 \
 } MYSQL_SYSVAR_NAME(name)
 
 #define DECLARE_MYSQL_SYSVAR_SIMPLE(name, type) struct { \
@@ -267,7 +294,7 @@
 #define DECLARE_MYSQL_THDVAR_TYPELIB(name, type) struct { \
   MYSQL_PLUGIN_VAR_HEADER;      \
   int offset;                   \
-  type def_val;                 \
+  const type def_val;           \
   DECLARE_THDVAR_FUNC(type);    \
   TYPELIB *typelib;             \
 } MYSQL_SYSVAR_NAME(name)
@@ -407,6 +434,30 @@
   void * __reserved1;   /* reserved for dependency checking             */
 };
 
+/*
+  MariaDB extension for plugins declaration structure.
+
+  It also copy current MySQL plugin fields to have more independency
+  in plugins extension
+*/
+
+struct st_maria_plugin
+{
+  int type;             /* the plugin type (a MYSQL_XXX_PLUGIN value)   */
+  void *info;           /* pointer to type-specific plugin descriptor   */
+  const char *name;     /* plugin name                                  */
+  const char *author;   /* plugin author (for SHOW PLUGINS)             */
+  const char *descr;    /* general descriptive text (for SHOW PLUGINS ) */
+  int license;          /* the plugin license (PLUGIN_LICENSE_XXX)      */
+  int (*init)(void *);  /* the function to invoke when plugin is loaded */
+  int (*deinit)(void *);/* the function to invoke when plugin is unloaded */
+  unsigned int version; /* plugin version (for SHOW PLUGINS)            */
+  struct st_mysql_show_var *status_vars;
+  struct st_mysql_sys_var **system_vars;
+  const char *version_info;  /* plugin version string */
+  unsigned int maturity; /* MariaDB_PLUGIN_MATURITY_XXX */
+};
+
 /*************************************************************************
   API for Full-text parser plugin. (MYSQL_FTPARSER_PLUGIN)
 */
@@ -576,7 +627,7 @@
                         MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info);
   void *ftparser_state;
   void *mysql_ftparam;
-  struct charset_info_st *cs;
+  const struct charset_info_st *cs;
   const unsigned char *doc;
   mysql_ft_size_t length;
   unsigned int flags;
@@ -739,54 +790,6 @@
 */
 unsigned long thd_get_thread_id(const MYSQL_THD thd);
 
-
-/**
-  Allocate memory in the connection's local memory pool
-
-  @details
-  When properly used in place of @c my_malloc(), this can significantly
-  improve concurrency. Don't use this or related functions to allocate
-  large chunks of memory. Use for temporary storage only. The memory
-  will be freed automatically at the end of the statement; no explicit
-  code is required to prevent memory leaks.
-
-  @see alloc_root()
-*/
-void *thd_alloc(MYSQL_THD thd, unsigned int size);
-/**
-  @see thd_alloc()
-*/
-void *thd_calloc(MYSQL_THD thd, unsigned int size);
-/**
-  @see thd_alloc()
-*/
-char *thd_strdup(MYSQL_THD thd, const char *str);
-/**
-  @see thd_alloc()
-*/
-char *thd_strmake(MYSQL_THD thd, const char *str, unsigned int size);
-/**
-  @see thd_alloc()
-*/
-void *thd_memdup(MYSQL_THD thd, const void* str, unsigned int size);
-
-/**
-  Create a LEX_STRING in this connection's local memory pool
-
-  @param thd      user thread connection handle
-  @param lex_str  pointer to LEX_STRING object to be initialized
-  @param str      initializer to be copied into lex_str
-  @param size     length of str, in bytes
-  @param allocate_lex_string  flag: if TRUE, allocate new LEX_STRING object,
-                              instead of using lex_str value
-  @return  NULL on failure, or pointer to the LEX_STRING object
-
-  @see thd_alloc()
-*/
-MYSQL_LEX_STRING *thd_make_lex_string(MYSQL_THD thd, MYSQL_LEX_STRING *lex_str,
-                                      const char *str, unsigned int size,
-                                      int allocate_lex_string);
-
 /**
   Get the XID for this connection's transaction
 

=== removed file 'include/mysql/plugin.h.pp'
--- a/include/mysql/plugin.h.pp	2010-05-26 18:55:40 +0000
+++ b/include/mysql/plugin.h.pp	1970-01-01 00:00:00 +0000
@@ -1,144 +0,0 @@
-struct st_mysql_lex_string
-{
-  char *str;
-  unsigned int length;
-};
-typedef struct st_mysql_lex_string MYSQL_LEX_STRING;
-struct st_mysql_xid {
-  long formatID;
-  long gtrid_length;
-  long bqual_length;
-  char data[128];
-};
-typedef struct st_mysql_xid MYSQL_XID;
-enum enum_mysql_show_type
-{
-  SHOW_UNDEF, SHOW_BOOL, SHOW_INT, SHOW_LONG,
-  SHOW_LONGLONG, SHOW_CHAR, SHOW_CHAR_PTR,
-  SHOW_ARRAY, SHOW_FUNC, SHOW_DOUBLE
-};
-struct st_mysql_show_var {
-  const char *name;
-  char *value;
-  enum enum_mysql_show_type type;
-};
-typedef int (*mysql_show_var_func)(void*, struct st_mysql_show_var*, char *);
-struct st_mysql_sys_var;
-struct st_mysql_value;
-typedef int (*mysql_var_check_func)(void* thd,
-                                    struct st_mysql_sys_var *var,
-                                    void *save, struct st_mysql_value *value);
-typedef void (*mysql_var_update_func)(void* thd,
-                                      struct st_mysql_sys_var *var,
-                                      void *var_ptr, const void *save);
-struct st_mysql_plugin
-{
-  int type;
-  void *info;
-  const char *name;
-  const char *author;
-  const char *descr;
-  int license;
-  int (*init)(void *);
-  int (*deinit)(void *);
-  unsigned int version;
-  struct st_mysql_show_var *status_vars;
-  struct st_mysql_sys_var **system_vars;
-  void * __reserved1;
-};
-enum enum_ftparser_mode
-{
-  MYSQL_FTPARSER_SIMPLE_MODE= 0,
-  MYSQL_FTPARSER_WITH_STOPWORDS= 1,
-  MYSQL_FTPARSER_FULL_BOOLEAN_INFO= 2
-};
-enum enum_ft_token_type
-{
-  FT_TOKEN_EOF= 0,
-  FT_TOKEN_WORD= 1,
-  FT_TOKEN_LEFT_PAREN= 2,
-  FT_TOKEN_RIGHT_PAREN= 3,
-  FT_TOKEN_STOPWORD= 4
-};
-typedef struct st_mysql_ftparser_boolean_info
-{
-  enum enum_ft_token_type type;
-  int yesno;
-  int weight_adjust;
-  char wasign;
-  char trunc;
-  char prev;
-  char *quot;
-} MYSQL_FTPARSER_BOOLEAN_INFO;
-typedef int mysql_ft_size_t;
-typedef struct st_mysql_ftparser_param
-{
-  int (*mysql_parse)(struct st_mysql_ftparser_param *,
-                     const unsigned char *doc, mysql_ft_size_t doc_len);
-  int (*mysql_add_word)(struct st_mysql_ftparser_param *,
-                        const unsigned char *word, mysql_ft_size_t word_len,
-                        MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info);
-  void *ftparser_state;
-  void *mysql_ftparam;
-  struct charset_info_st *cs;
-  const unsigned char *doc;
-  mysql_ft_size_t length;
-  unsigned int flags;
-  enum enum_ftparser_mode mode;
-} MYSQL_FTPARSER_PARAM;
-struct st_mysql_ftparser
-{
-  int interface_version;
-  int (*parse)(MYSQL_FTPARSER_PARAM *param);
-  int (*init)(MYSQL_FTPARSER_PARAM *param);
-  int (*deinit)(MYSQL_FTPARSER_PARAM *param);
-};
-struct st_mysql_storage_engine
-{
-  int interface_version;
-};
-struct handlerton;
-struct st_mysql_daemon
-{
-  int interface_version;
-};
-struct st_mysql_information_schema
-{
-  int interface_version;
-};
-struct st_mysql_value
-{
-  int (*value_type)(struct st_mysql_value *);
-  const char *(*val_str)(struct st_mysql_value *, char *buffer, int *length);
-  int (*val_real)(struct st_mysql_value *, double *realbuf);
-  int (*val_int)(struct st_mysql_value *, long long *intbuf);
-};
-int thd_in_lock_tables(const void* thd);
-int thd_tablespace_op(const void* thd);
-long long thd_test_options(const void* thd, long long test_options);
-int thd_sql_command(const void* thd);
-void **thd_ha_data(const void* thd, const struct handlerton *hton);
-int thd_tx_isolation(const void* thd);
-char *thd_security_context(void* thd, char *buffer, unsigned int length,
-                           unsigned int max_query_len);
-void thd_inc_row_count(void* thd);
-const char *set_thd_proc_info(void*, const char * info, const char *func,
-                              const char *file, const unsigned int line);
-int mysql_tmpfile(const char *prefix);
-int thd_killed(const void* thd);
-unsigned long thd_get_thread_id(const void* thd);
-void *thd_alloc(void* thd, unsigned int size);
-void *thd_calloc(void* thd, unsigned int size);
-char *thd_strdup(void* thd, const char *str);
-char *thd_strmake(void* thd, const char *str, unsigned int size);
-void *thd_memdup(void* thd, const void* str, unsigned int size);
-MYSQL_LEX_STRING *thd_make_lex_string(void* thd, MYSQL_LEX_STRING *lex_str,
-                                      const char *str, unsigned int size,
-                                      int allocate_lex_string);
-void thd_get_xid(const void* thd, MYSQL_XID *xid);
-void mysql_query_cache_invalidate4(void* thd,
-                                   const char *key, unsigned int key_length,
-                                   int using_trx);
-void *thd_get_ha_data(const void* thd, const struct handlerton *hton);
-void thd_set_ha_data(void* thd, const struct handlerton *hton,
-                     const void *ha_data);

=== added file 'include/mysql/plugin_auth.h'
--- a/include/mysql/plugin_auth.h	1970-01-01 00:00:00 +0000
+++ b/include/mysql/plugin_auth.h	2010-03-29 15:13:53 +0000
@@ -0,0 +1,83 @@
+#ifndef MYSQL_PLUGIN_AUTH_INCLUDED
+/* Copyright (C) 2010 Sergei Golubchik and 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
+   the Free Software Foundation; version 2 of the License.
+
+   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
+   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 */
+
+/**
+  @file
+
+  Authentication Plugin API.
+
+  This file defines the API for server authentication plugins.
+*/
+
+#define MYSQL_PLUGIN_AUTH_INCLUDED
+
+#include <mysql/plugin.h>
+
+#define MYSQL_AUTHENTICATION_INTERFACE_VERSION 0x0100
+
+#include <mysql/plugin_auth_common.h>
+
+/**
+  Provides server plugin access to authentication information
+*/
+typedef struct st_mysql_server_auth_info
+{
+  /**
+    User name as sent by the client and shown in USER().
+    NULL if the client packet with the user name was not received yet.
+  */
+  const char *user_name;
+  /**
+    A corresponding column value from the mysql.user table for the
+    matching account name
+  */
+  const char *auth_string;
+
+  /**
+    Matching account name as found in the mysql.user table.
+    A plugin can override it with another name that will be
+    used by MySQL for authorization, and shown in CURRENT_USER()
+  */
+  char authenticated_as[MYSQL_USERNAME_LENGTH+1]; 
+  /**
+    This only affects the "Authentication failed. Password used: %s"
+    error message. If set, %s will be YES, otherwise - NO.
+    Set it as appropriate or ignore at will.
+  */
+  int  password_used;
+} MYSQL_SERVER_AUTH_INFO;
+
+/**
+  Server authentication plugin descriptor
+*/
+struct st_mysql_auth
+{
+  int interface_version;                        /**< version plugin uses */
+  /**
+    A plugin that a client must use for authentication with this server
+    plugin. Can be NULL to mean "any plugin".
+  */
+  const char *client_auth_plugin;
+  /**
+    Function provided by the plugin which should perform authentication (using
+    the vio functions if necessary) and return 0 if successful. The plugin can
+    also fill the info.authenticated_as field if a different username should be
+    used for authorization.
+  */
+  int (*authenticate_user)(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info);
+};
+#endif
+

=== added file 'include/mysql/plugin_auth.h.pp'
--- a/include/mysql/plugin_auth.h.pp	1970-01-01 00:00:00 +0000
+++ b/include/mysql/plugin_auth.h.pp	2010-09-28 16:47:23 +0000
@@ -0,0 +1,209 @@
+#include <mysql/plugin.h>
+#include <mysql/services.h>
+#include <mysql/service_my_snprintf.h>
+extern struct my_snprintf_service_st {
+  size_t (*my_snprintf_type)(char*, size_t, const char*, ...);
+  size_t (*my_vsnprintf_type)(char *, size_t, const char*, va_list);
+} *my_snprintf_service;
+size_t my_snprintf(char* to, size_t n, const char* fmt, ...);
+size_t my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap);
+#include <mysql/service_thd_alloc.h>
+struct st_mysql_lex_string
+{
+  char *str;
+  size_t length;
+};
+typedef struct st_mysql_lex_string MYSQL_LEX_STRING;
+extern struct thd_alloc_service_st {
+  void *(*thd_alloc_func)(void*, unsigned int);
+  void *(*thd_calloc_func)(void*, unsigned int);
+  char *(*thd_strdup_func)(void*, const char *);
+  char *(*thd_strmake_func)(void*, const char *, unsigned int);
+  void *(*thd_memdup_func)(void*, const void*, unsigned int);
+  MYSQL_LEX_STRING *(*thd_make_lex_string_func)(void*, MYSQL_LEX_STRING *,
+                                        const char *, unsigned int, int);
+} *thd_alloc_service;
+void *thd_alloc(void* thd, unsigned int size);
+void *thd_calloc(void* thd, unsigned int size);
+char *thd_strdup(void* thd, const char *str);
+char *thd_strmake(void* thd, const char *str, unsigned int size);
+void *thd_memdup(void* thd, const void* str, unsigned int size);
+MYSQL_LEX_STRING *thd_make_lex_string(void* thd, MYSQL_LEX_STRING *lex_str,
+                                      const char *str, unsigned int size,
+                                      int allocate_lex_string);
+struct st_mysql_xid {
+  long formatID;
+  long gtrid_length;
+  long bqual_length;
+  char data[128];
+};
+typedef struct st_mysql_xid MYSQL_XID;
+enum enum_mysql_show_type
+{
+  SHOW_UNDEF, SHOW_BOOL, SHOW_INT, SHOW_LONG,
+  SHOW_LONGLONG, SHOW_CHAR, SHOW_CHAR_PTR,
+  SHOW_ARRAY, SHOW_FUNC, SHOW_DOUBLE,
+  SHOW_always_last
+};
+struct st_mysql_show_var {
+  const char *name;
+  char *value;
+  enum enum_mysql_show_type type;
+};
+typedef int (*mysql_show_var_func)(void*, struct st_mysql_show_var*, char *);
+struct st_mysql_sys_var;
+struct st_mysql_value;
+typedef int (*mysql_var_check_func)(void* thd,
+                                    struct st_mysql_sys_var *var,
+                                    void *save, struct st_mysql_value *value);
+typedef void (*mysql_var_update_func)(void* thd,
+                                      struct st_mysql_sys_var *var,
+                                      void *var_ptr, const void *save);
+struct st_mysql_plugin
+{
+  int type;
+  void *info;
+  const char *name;
+  const char *author;
+  const char *descr;
+  int license;
+  int (*init)(void *);
+  int (*deinit)(void *);
+  unsigned int version;
+  struct st_mysql_show_var *status_vars;
+  struct st_mysql_sys_var **system_vars;
+  void * __reserved1;
+};
+struct st_maria_plugin
+{
+  int type;
+  void *info;
+  const char *name;
+  const char *author;
+  const char *descr;
+  int license;
+  int (*init)(void *);
+  int (*deinit)(void *);
+  unsigned int version;
+  struct st_mysql_show_var *status_vars;
+  struct st_mysql_sys_var **system_vars;
+  const char *version_info;
+  unsigned int maturity;
+};
+enum enum_ftparser_mode
+{
+  MYSQL_FTPARSER_SIMPLE_MODE= 0,
+  MYSQL_FTPARSER_WITH_STOPWORDS= 1,
+  MYSQL_FTPARSER_FULL_BOOLEAN_INFO= 2
+};
+enum enum_ft_token_type
+{
+  FT_TOKEN_EOF= 0,
+  FT_TOKEN_WORD= 1,
+  FT_TOKEN_LEFT_PAREN= 2,
+  FT_TOKEN_RIGHT_PAREN= 3,
+  FT_TOKEN_STOPWORD= 4
+};
+typedef struct st_mysql_ftparser_boolean_info
+{
+  enum enum_ft_token_type type;
+  int yesno;
+  int weight_adjust;
+  char wasign;
+  char trunc;
+  char prev;
+  char *quot;
+} MYSQL_FTPARSER_BOOLEAN_INFO;
+typedef int mysql_ft_size_t;
+typedef struct st_mysql_ftparser_param
+{
+  int (*mysql_parse)(struct st_mysql_ftparser_param *,
+                     const unsigned char *doc, mysql_ft_size_t doc_len);
+  int (*mysql_add_word)(struct st_mysql_ftparser_param *,
+                        const unsigned char *word, mysql_ft_size_t word_len,
+                        MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info);
+  void *ftparser_state;
+  void *mysql_ftparam;
+  const struct charset_info_st *cs;
+  const unsigned char *doc;
+  mysql_ft_size_t length;
+  unsigned int flags;
+  enum enum_ftparser_mode mode;
+} MYSQL_FTPARSER_PARAM;
+struct st_mysql_ftparser
+{
+  int interface_version;
+  int (*parse)(MYSQL_FTPARSER_PARAM *param);
+  int (*init)(MYSQL_FTPARSER_PARAM *param);
+  int (*deinit)(MYSQL_FTPARSER_PARAM *param);
+};
+struct st_mysql_storage_engine
+{
+  int interface_version;
+};
+struct handlerton;
+struct st_mysql_daemon
+{
+  int interface_version;
+};
+struct st_mysql_information_schema
+{
+  int interface_version;
+};
+struct st_mysql_value
+{
+  int (*value_type)(struct st_mysql_value *);
+  const char *(*val_str)(struct st_mysql_value *, char *buffer, int *length);
+  int (*val_real)(struct st_mysql_value *, double *realbuf);
+  int (*val_int)(struct st_mysql_value *, long long *intbuf);
+};
+int thd_in_lock_tables(const void* thd);
+int thd_tablespace_op(const void* thd);
+long long thd_test_options(const void* thd, long long test_options);
+int thd_sql_command(const void* thd);
+void **thd_ha_data(const void* thd, const struct handlerton *hton);
+int thd_tx_isolation(const void* thd);
+char *thd_security_context(void* thd, char *buffer, unsigned int length,
+                           unsigned int max_query_len);
+void thd_inc_row_count(void* thd);
+const char *set_thd_proc_info(void*, const char * info, const char *func,
+                              const char *file, const unsigned int line);
+int mysql_tmpfile(const char *prefix);
+int thd_killed(const void* thd);
+unsigned long thd_get_thread_id(const void* thd);
+void thd_get_xid(const void* thd, MYSQL_XID *xid);
+void mysql_query_cache_invalidate4(void* thd,
+                                   const char *key, unsigned int key_length,
+                                   int using_trx);
+void *thd_get_ha_data(const void* thd, const struct handlerton *hton);
+void thd_set_ha_data(void* thd, const struct handlerton *hton,
+                     const void *ha_data);
+#include <mysql/plugin_auth_common.h>
+typedef struct st_plugin_vio_info
+{
+  enum { MYSQL_VIO_INVALID, MYSQL_VIO_TCP, MYSQL_VIO_SOCKET,
+         MYSQL_VIO_PIPE, MYSQL_VIO_MEMORY } protocol;
+  int socket;
+} MYSQL_PLUGIN_VIO_INFO;
+typedef struct st_plugin_vio
+{
+  int (*read_packet)(struct st_plugin_vio *vio,
+                     unsigned char **buf);
+  int (*write_packet)(struct st_plugin_vio *vio,
+                      const unsigned char *packet,
+                      int packet_len);
+  void (*info)(struct st_plugin_vio *vio, struct st_plugin_vio_info *info);
+} MYSQL_PLUGIN_VIO;
+typedef struct st_mysql_server_auth_info
+{
+  const char *user_name;
+  const char *auth_string;
+  char authenticated_as[48 +1];
+  int password_used;
+} MYSQL_SERVER_AUTH_INFO;
+struct st_mysql_auth
+{
+  int interface_version;
+  const char *client_auth_plugin;
+  int (*authenticate_user)(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info);
+};

=== added file 'include/mysql/plugin_auth_common.h'
--- a/include/mysql/plugin_auth_common.h	1970-01-01 00:00:00 +0000
+++ b/include/mysql/plugin_auth_common.h	2010-03-29 15:13:53 +0000
@@ -0,0 +1,105 @@
+#ifndef MYSQL_PLUGIN_AUTH_COMMON_INCLUDED
+/* Copyright (C) 2010 Sergei Golubchik and 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
+   the Free Software Foundation; version 2 of the License.
+
+   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
+   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 */
+
+/**
+  @file
+
+  This file defines constants and data structures that are the same for
+  both client- and server-side authentication plugins.
+*/
+#define MYSQL_PLUGIN_AUTH_COMMON_INCLUDED
+
+/** the max allowed length for a user name */
+#define MYSQL_USERNAME_LENGTH 48
+
+/**
+  return values of the plugin authenticate_user() method.
+*/
+
+/**
+  Authentication failed. Additionally, all other CR_xxx values
+  (libmysql error code) can be used too.
+
+  The client plugin may set the error code and the error message directly
+  in the MYSQL structure and return CR_ERROR. If a CR_xxx specific error
+  code was returned, an error message in the MYSQL structure will be
+  overwritten. If CR_ERROR is returned without setting the error in MYSQL,
+  CR_UNKNOWN_ERROR will be user.
+*/
+#define CR_ERROR 0
+/**
+  Authentication (client part) was successful. It does not mean that the
+  authentication as a whole was successful, usually it only means
+  that the client was able to send the user name and the password to the
+  server. If CR_OK is returned, the libmysql reads the next packet expecting
+  it to be one of OK, ERROR, or CHANGE_PLUGIN packets.
+*/
+#define CR_OK -1
+/**
+  Authentication was successful.
+  It means that the client has done its part successfully and also that
+  a plugin has read the last packet (one of OK, ERROR, CHANGE_PLUGIN).
+  In this case, libmysql will not read a packet from the server,
+  but it will use the data at mysql->net.read_pos.
+
+  A plugin may return this value if the number of roundtrips in the
+  authentication protocol is not known in advance, and the client plugin
+  needs to read one packet more to determine if the authentication is finished
+  or not.
+*/
+#define CR_OK_HANDSHAKE_COMPLETE -2
+
+typedef struct st_plugin_vio_info
+{
+  enum { MYSQL_VIO_INVALID, MYSQL_VIO_TCP, MYSQL_VIO_SOCKET,
+         MYSQL_VIO_PIPE, MYSQL_VIO_MEMORY } protocol;
+  int socket;     /**< it's set, if the protocol is SOCKET or TCP */
+#ifdef _WIN32
+  HANDLE handle;  /**< it's set, if the protocol is PIPE or MEMORY */
+#endif
+} MYSQL_PLUGIN_VIO_INFO;
+
+/**
+  Provides plugin access to communication channel
+*/
+typedef struct st_plugin_vio
+{
+  /**
+    Plugin provides a pointer reference and this function sets it to the
+    contents of any incoming packet. Returns the packet length, or -1 if
+    the plugin should terminate.
+  */
+  int (*read_packet)(struct st_plugin_vio *vio, 
+                     unsigned char **buf);
+  
+  /**
+    Plugin provides a buffer with data and the length and this
+    function sends it as a packet. Returns 0 on success, 1 on failure.
+  */
+  int (*write_packet)(struct st_plugin_vio *vio, 
+                      const unsigned char *packet, 
+                      int packet_len);
+
+  /**
+    Fills in a st_plugin_vio_info structure, providing the information
+    about the connection.
+  */
+  void (*info)(struct st_plugin_vio *vio, struct st_plugin_vio_info *info);
+
+} MYSQL_PLUGIN_VIO;
+
+#endif
+

=== added file 'include/mysql/service_my_snprintf.h'
--- a/include/mysql/service_my_snprintf.h	1970-01-01 00:00:00 +0000
+++ b/include/mysql/service_my_snprintf.h	2010-09-28 16:47:23 +0000
@@ -0,0 +1,100 @@
+#ifndef MYSQL_SERVICE_MY_SNPRINTF_INCLUDED
+/* Copyright (C) 2009 Sun Microsystems, Inc.
+
+   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
+   the Free Software Foundation; version 2 of the License.
+
+   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
+   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 */
+
+/**
+  @file
+  my_snprintf service
+
+  Portable and limited vsnprintf() implementation.
+
+  This is a portable, limited vsnprintf() implementation, with some
+  extra features. "Portable" means that it'll produce identical result
+  on all platforms (for example, on Windows and Linux system printf %e
+  formats the exponent differently, on different systems %p either
+  prints leading 0x or not, %s may accept null pointer or crash on
+  it). "Limited" means that it does not support all the C89 features.
+  But it supports few extensions, not in any standard.
+
+  my_vsnprintf(to, n, fmt, ap)
+
+  @param[out] to     A buffer to store the result in
+  @param[in]  n      Store up to n-1 characters, followed by an end 0
+  @param[in]  fmt    printf-like format string
+  @param[in]  ap     Arguments
+
+  @return a number of bytes written to a buffer *excluding* terminating '\0'
+
+  @post
+  The syntax of a format string is generally the same:
+  % <flag> <width> <precision> <length modifier> <format>
+  where everithing but the format is optional.
+
+  Three one-character flags are recognized:
+    '0' has the standard zero-padding semantics;
+    '-' is parsed, but silently ignored;
+    '`' (backtick) is only supported for strings (%s) and means that the
+        string will be quoted according to MySQL identifier quoting rules.
+
+  Both <width> and <precision> can be specified as numbers or '*'.
+
+  <length modifier> can be 'l', 'll', or 'z'.
+
+  Supported formats are 's' (null pointer is accepted, printed as
+  "(null)"), 'b' (extension, see below), 'c', 'd', 'u', 'x',
+  'X', 'p' (works as 0x%x).
+
+  Standard syntax for positional arguments $n is supported.
+
+  Extensions:
+
+  Flag '`' (backtick): see above.
+
+  Format 'b': binary buffer, prints exactly <precision> bytes from the
+  argument, without stopping at '\0'.
+*/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef MYSQL_ABI_CHECK
+#include <stdarg.h>
+#include <stdlib.h>
+#endif
+extern struct my_snprintf_service_st {
+  size_t (*my_snprintf_type)(char*, size_t, const char*, ...);
+  size_t (*my_vsnprintf_type)(char *, size_t, const char*, va_list);
+} *my_snprintf_service;
+
+#ifdef MYSQL_DYNAMIC_PLUGIN
+
+#define my_vsnprintf my_snprintf_service->my_vsnprintf_type
+#define my_snprintf my_snprintf_service->my_snprintf_type
+
+#else
+
+size_t my_snprintf(char* to, size_t n, const char* fmt, ...);
+size_t my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap);
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#define MYSQL_SERVICE_MY_SNPRINTF_INCLUDED
+#endif
+

=== added file 'include/mysql/service_thd_alloc.h'
--- a/include/mysql/service_thd_alloc.h	1970-01-01 00:00:00 +0000
+++ b/include/mysql/service_thd_alloc.h	2010-09-28 16:47:23 +0000
@@ -0,0 +1,130 @@
+#ifndef MYSQL_SERVICE_THD_ALLOC_INCLUDED
+/* Copyright (C) 2009 Sun Microsystems, Inc.
+
+   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
+   the Free Software Foundation; version 2 of the License.
+
+   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
+   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 */
+
+/**
+  @file
+  This service provdes functions to allocate memory in a connection local
+  memory pool. The memory allocated there will be automatically freed at the
+  end of the statement, don't use it for allocations that should live longer
+  than that. For short living allocations this is more efficient than
+  using my_malloc and friends, and automatic "garbage collection" allows not
+  to think about memory leaks.
+
+  The pool is best for small to medium objects, don't use it for large
+  allocations - they are better served with my_malloc.
+*/
+
+#ifndef MYSQL_ABI_CHECK
+#include <stdlib.h>
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct st_mysql_lex_string
+{
+  char *str;
+  size_t length;
+};
+typedef struct st_mysql_lex_string MYSQL_LEX_STRING;
+
+extern struct thd_alloc_service_st {
+  void *(*thd_alloc_func)(MYSQL_THD, unsigned int);
+  void *(*thd_calloc_func)(MYSQL_THD, unsigned int);
+  char *(*thd_strdup_func)(MYSQL_THD, const char *);
+  char *(*thd_strmake_func)(MYSQL_THD, const char *, unsigned int);
+  void *(*thd_memdup_func)(MYSQL_THD, const void*, unsigned int);
+  MYSQL_LEX_STRING *(*thd_make_lex_string_func)(MYSQL_THD, MYSQL_LEX_STRING *,
+                                        const char *, unsigned int, int);
+} *thd_alloc_service;
+
+#ifdef MYSQL_DYNAMIC_PLUGIN
+
+#define thd_alloc(thd,size) (thd_alloc_service->thd_alloc_func((thd), (size)))
+
+#define thd_calloc(thd,size) (thd_alloc_service->thd_calloc_func((thd), (size)))
+
+#define thd_strdup(thd,str) (thd_alloc_service->thd_strdup_func((thd), (str)))
+
+#define thd_strmake(thd,str,size) \
+  (thd_alloc_service->thd_strmake_func((thd), (str), (size)))
+
+#define thd_memdup(thd,str,size) \
+  (thd_alloc_service->thd_memdup_func((thd), (str), (size)))
+
+#define thd_make_lex_string(thd, lex_str, str, size, allocate_lex_string) \
+  (thd_alloc_service->thd_make_lex_string_func((thd), (lex_str), (str), \
+                                               (size), (allocate_lex_string)))
+
+#else
+
+/**
+  Allocate memory in the connection's local memory pool
+
+  @details
+  When properly used in place of @c my_malloc(), this can significantly
+  improve concurrency. Don't use this or related functions to allocate
+  large chunks of memory. Use for temporary storage only. The memory
+  will be freed automatically at the end of the statement; no explicit
+  code is required to prevent memory leaks.
+
+  @see alloc_root()
+*/
+void *thd_alloc(MYSQL_THD thd, unsigned int size);
+/**
+  @see thd_alloc()
+*/
+void *thd_calloc(MYSQL_THD thd, unsigned int size);
+/**
+  @see thd_alloc()
+*/
+char *thd_strdup(MYSQL_THD thd, const char *str);
+/**
+  @see thd_alloc()
+*/
+char *thd_strmake(MYSQL_THD thd, const char *str, unsigned int size);
+/**
+  @see thd_alloc()
+*/
+void *thd_memdup(MYSQL_THD thd, const void* str, unsigned int size);
+
+/**
+  Create a LEX_STRING in this connection's local memory pool
+
+  @param thd      user thread connection handle
+  @param lex_str  pointer to LEX_STRING object to be initialized
+  @param str      initializer to be copied into lex_str
+  @param size     length of str, in bytes
+  @param allocate_lex_string  flag: if TRUE, allocate new LEX_STRING object,
+                              instead of using lex_str value
+  @return  NULL on failure, or pointer to the LEX_STRING object
+
+  @see thd_alloc()
+*/
+MYSQL_LEX_STRING *thd_make_lex_string(MYSQL_THD thd, MYSQL_LEX_STRING *lex_str,
+                                      const char *str, unsigned int size,
+                                      int allocate_lex_string);
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#define MYSQL_SERVICE_THD_ALLOC_INCLUDED
+#endif
+

=== added file 'include/mysql/services.h'
--- a/include/mysql/services.h	1970-01-01 00:00:00 +0000
+++ b/include/mysql/services.h	2010-03-03 14:44:14 +0000
@@ -0,0 +1,30 @@
+#ifndef MYSQL_SERVICES_INCLUDED
+/* Copyright (C) 2009 Sun Microsystems, Inc.
+
+   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
+   the Free Software Foundation; version 2 of the License.
+
+   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
+   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 */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <mysql/service_my_snprintf.h>
+#include <mysql/service_thd_alloc.h>
+
+#ifdef __cplusplus
+}
+#endif
+
+#define MYSQL_SERVICES_INCLUDED
+#endif
+

=== modified file 'include/mysql_com.h'
--- a/include/mysql_com.h	2010-08-27 14:12:44 +0000
+++ b/include/mysql_com.h	2010-09-11 18:43:48 +0000
@@ -27,8 +27,13 @@
 #define NAME_LEN                (NAME_CHAR_LEN*SYSTEM_CHARSET_MBMAXLEN)
 #define USERNAME_LENGTH         (USERNAME_CHAR_LENGTH*SYSTEM_CHARSET_MBMAXLEN)
 
+#define MYSQL50_TABLE_NAME_PREFIX         "#mysql50#"
+#define MYSQL50_TABLE_NAME_PREFIX_LENGTH  (sizeof(MYSQL50_TABLE_NAME_PREFIX)-1)
+#define SAFE_NAME_LEN (NAME_LEN + MYSQL50_TABLE_NAME_PREFIX_LENGTH)
+
 #define SERVER_VERSION_LENGTH 60
 #define SQLSTATE_LENGTH 5
+#define LIST_PROCESS_HOST_LEN 64
 
 /*
   USER_HOST_BUFF_SIZE -- length of string buffer, that is enough to contain
@@ -67,7 +72,8 @@
   COM_END
 };
 
-
+/* sql type stored in .frm files for virtual fields */
+#define MYSQL_TYPE_VIRTUAL 245
 /*
   Length of random string sent by server on handshake; this is also length of
   obfuscated password, recieved from client
@@ -115,6 +121,11 @@
 					   thread */
 #define REFRESH_MASTER          128     /* Remove all bin logs in the index
 					   and truncate the index */
+#define REFRESH_TABLE_STATS     256     /* Refresh table stats hash table */
+#define REFRESH_INDEX_STATS     512     /* Refresh index stats hash table */
+#define REFRESH_USER_STATS      1024    /* Refresh user stats hash table */
+#define REFRESH_SLOW_QUERY_LOG  4096    /* Flush slow query log and rotate*/
+#define REFRESH_CLIENT_STATS    8192    /* Refresh client stats hash table */
 
 /* The following can't be set with mysql_refresh() */
 #define REFRESH_READ_LOCK	16384	/* Lock tables for read */
@@ -145,9 +156,17 @@
 #define CLIENT_MULTI_STATEMENTS (1UL << 16) /* Enable/disable multi-stmt support */
 #define CLIENT_MULTI_RESULTS    (1UL << 17) /* Enable/disable multi-results */
 
+#define CLIENT_PLUGIN_AUTH  (1UL << 19) /* Client supports plugin authentication */
+
 #define CLIENT_SSL_VERIFY_SERVER_CERT (1UL << 30)
 #define CLIENT_REMEMBER_OPTIONS (1UL << 31)
 
+#ifdef HAVE_COMPRESS
+#define CAN_CLIENT_COMPRESS CLIENT_COMPRESS
+#else
+#define CAN_CLIENT_COMPRESS 0
+#endif
+
 /* Gather all possible capabilites (flags) supported by the server */
 #define CLIENT_ALL_FLAGS  (CLIENT_LONG_PASSWORD | \
                            CLIENT_FOUND_ROWS | \
@@ -168,7 +187,8 @@
                            CLIENT_MULTI_STATEMENTS | \
                            CLIENT_MULTI_RESULTS | \
                            CLIENT_SSL_VERIFY_SERVER_CERT | \
-                           CLIENT_REMEMBER_OPTIONS)
+                           CLIENT_REMEMBER_OPTIONS | \
+                           CLIENT_PLUGIN_AUTH)
 
 /*
   Switch off the flags that are optional and depending on build flags
@@ -481,14 +501,14 @@
 void hash_password(unsigned long *to, const char *password, unsigned int password_len);
 void make_scrambled_password_323(char *to, const char *password);
 void scramble_323(char *to, const char *message, const char *password);
-my_bool check_scramble_323(const char *, const char *message,
+my_bool check_scramble_323(const unsigned char *reply, const char *message,
                            unsigned long *salt);
 void get_salt_from_password_323(unsigned long *res, const char *password);
 void make_password_from_salt_323(char *to, const unsigned long *salt);
 
 void make_scrambled_password(char *to, const char *password);
 void scramble(char *to, const char *message, const char *password);
-my_bool check_scramble(const char *reply, const char *message,
+my_bool check_scramble(const unsigned char *reply, const char *message,
                        const unsigned char *hash_stage2);
 void get_salt_from_password(unsigned char *res, const char *password);
 void make_password_from_salt(char *to, const unsigned char *hash_stage2);

=== added file 'include/service_versions.h'
--- a/include/service_versions.h	1970-01-01 00:00:00 +0000
+++ b/include/service_versions.h	2010-03-03 14:44:14 +0000
@@ -0,0 +1,24 @@
+/* Copyright (C) 2009 Sun Microsystems, Inc.
+
+   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
+   the Free Software Foundation; version 2 of the License.
+
+   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
+   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 */
+
+#ifdef _WIN32
+#define SERVICE_VERSION __declspec(dllexport) void *
+#else
+#define SERVICE_VERSION void *
+#endif
+
+#define VERSION_my_snprintf     0x0100
+#define VERSION_thd_alloc       0x0100
+

=== modified file 'include/sql_common.h'
--- a/include/sql_common.h	2008-02-27 09:00:59 +0000
+++ b/include/sql_common.h	2010-04-01 09:04:26 +0000
@@ -1,3 +1,4 @@
+#ifndef SQL_COMMON_INCLUDED
 /* Copyright (C) 2003-2004, 2006 MySQL AB
    
    This program is free software; you can redistribute it and/or modify
@@ -13,14 +14,60 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
+#define SQL_COMMON_INCLUDED
+
+#ifdef	__cplusplus
+extern "C" {
+#endif
+
+#include <mysql.h>
 
 extern const char	*unknown_sqlstate;
 extern const char	*cant_connect_sqlstate;
 extern const char	*not_error_sqlstate;
 
-#ifdef	__cplusplus
-extern "C" {
+struct st_mysql_options_extention {
+  char *plugin_dir;
+  char *default_auth;
+};
+
+typedef struct st_mysql_methods
+{
+  my_bool (*read_query_result)(MYSQL *mysql);
+  my_bool (*advanced_command)(MYSQL *mysql,
+			      enum enum_server_command command,
+			      const unsigned char *header,
+			      unsigned long header_length,
+			      const unsigned char *arg,
+			      unsigned long arg_length,
+			      my_bool skip_check,
+                              MYSQL_STMT *stmt);
+  MYSQL_DATA *(*read_rows)(MYSQL *mysql,MYSQL_FIELD *mysql_fields,
+			   unsigned int fields);
+  MYSQL_RES * (*use_result)(MYSQL *mysql);
+  void (*fetch_lengths)(unsigned long *to, 
+			MYSQL_ROW column, unsigned int field_count);
+  void (*flush_use_result)(MYSQL *mysql);
+  int (*read_change_user_result)(MYSQL *mysql);
+#if !defined(MYSQL_SERVER) || defined(EMBEDDED_LIBRARY)
+  MYSQL_FIELD * (*list_fields)(MYSQL *mysql);
+  my_bool (*read_prepare_result)(MYSQL *mysql, MYSQL_STMT *stmt);
+  int (*stmt_execute)(MYSQL_STMT *stmt);
+  int (*read_binary_rows)(MYSQL_STMT *stmt);
+  int (*unbuffered_fetch)(MYSQL *mysql, char **row);
+  void (*free_embedded_thd)(MYSQL *mysql);
+  const char *(*read_statistics)(MYSQL *mysql);
+  my_bool (*next_result)(MYSQL *mysql);
+  int (*read_rows_from_cursor)(MYSQL_STMT *stmt);
 #endif
+} MYSQL_METHODS;
+
+#define simple_command(mysql, command, arg, length, skip_check) \
+  (*(mysql)->methods->advanced_command)(mysql, command, 0,  \
+                                        0, arg, length, skip_check, NULL)
+#define stmt_command(mysql, command, arg, length, stmt) \
+  (*(mysql)->methods->advanced_command)(mysql, command, 0,  \
+                                        0, arg, length, 1, stmt)
 
 extern CHARSET_INFO *default_client_charset_info;
 MYSQL_FIELD *unpack_fields(MYSQL_DATA *data,MEM_ROOT *alloc,uint fields,
@@ -42,9 +89,23 @@
 void set_stmt_error(MYSQL_STMT *stmt, int errcode, const char *sqlstate,
                     const char *err);
 void set_mysql_error(MYSQL *mysql, int errcode, const char *sqlstate);
+void set_mysql_extended_error(MYSQL *mysql, int errcode, const char *sqlstate,
+                              const char *format, ...);
+
+/* client side of the pluggable authentication */
+struct st_plugin_vio_info;
+void mpvio_info(Vio *vio, struct st_plugin_vio_info *info);
+int run_plugin_auth(MYSQL *mysql, char *data, uint data_len,
+                    const char *data_plugin, const char *db);
+int mysql_client_plugin_init();
+void mysql_client_plugin_deinit();
+struct st_mysql_client_plugin;
+extern struct st_mysql_client_plugin *mysql_client_builtins[];
+
 #ifdef	__cplusplus
 }
 #endif
 
 #define protocol_41(A) ((A)->server_capabilities & CLIENT_PROTOCOL_41)
 
+#endif

=== modified file 'libmysql/CMakeLists.txt'
--- a/libmysql/CMakeLists.txt	2010-12-06 11:52:06 +0000
+++ b/libmysql/CMakeLists.txt	2010-12-06 12:16:49 +0000
@@ -95,7 +95,7 @@
                      ../strings/strtoll.c ../strings/strtoull.c ../strings/strxmov.c ../strings/strxnmov.c 
                      ../mysys/thr_mutex.c ../mysys/typelib.c ../vio/vio.c ../vio/viosocket.c 
                      ../vio/viossl.c ../vio/viosslfactories.c ../strings/xml.c ../mysys/mf_qsort.c
-		     ../mysys/my_getsystime.c ../mysys/my_sync.c ${LIB_SOURCES})
+                     ../mysys/my_getsystime.c ../mysys/my_sync.c ../sql-common/client_plugin.c ${LIB_SOURCES})
 
 # Need to set USE_TLS for building the DLL, since __declspec(thread)
 # approach to thread local storage does not work properly in DLLs.
@@ -122,6 +122,7 @@
 ENDIF(WIN32)
 ADD_DEPENDENCIES(libmysql GenError)
 TARGET_LINK_LIBRARIES(libmysql wsock32)
+ADD_DEFINITIONS(-DHAVE_DLOPEN)
 
 IF(EMBED_MANIFESTS)
   MYSQL_EMBED_MANIFEST("myTest" "asInvoker")

=== modified file 'libmysql/Makefile.shared'
--- a/libmysql/Makefile.shared	2010-11-29 09:27:52 +0000
+++ b/libmysql/Makefile.shared	2010-11-30 21:11:03 +0000
@@ -23,6 +23,7 @@
 MYSQLDATAdir =			$(localstatedir)
 MYSQLSHAREdir =			$(pkgdatadir)
 MYSQLBASEdir=			$(prefix)
+pkgplugindir =			$(pkglibdir)/plugin
 ## We'll use CLIENT_EXTRA_LDFLAGS for threaded and non-threaded
 ## until someone complains that they need separate options.
 LDADD =				@CLIENT_EXTRA_LDFLAGS@ $(target)
@@ -71,26 +72,27 @@
 			my_getopt.lo my_gethostbyname.lo my_port.lo \
                         my_rename.lo my_chsize.lo my_sync.lo my_getsystime.lo
 sqlobjects =		net.lo
-sql_cmn_objects =	pack.lo client.lo my_time.lo
+sql_cmn_objects =	pack.lo client.lo my_time.lo client_plugin.lo
 
 # Not needed in the minimum library
 mysysobjects2 =		my_lib.lo mf_qsort.lo
 mysysobjects =		$(mysysobjects1) $(mysysobjects2)
 target_libadd =		$(mysysobjects) $(mystringsobjects) $(dbugobjects) \
  $(sql_cmn_objects) $(vio_objects) $(sqlobjects)
-target_ldflags = -version-info @SHARED_LIB_VERSION@ @LD_VERSION_SCRIPT@ 
+target_ldflags = -version-info @SHARED_LIB_VERSION@ @LD_VERSION_SCRIPT@ @LIBDL@
 vio_objects= vio.lo viosocket.lo viossl.lo viosslfactories.lo
 
 BUILT_SOURCES		= link_sources
 
 CLEANFILES =		$(target_libadd) $(SHLIBOBJS) \
 			$(target) $(BUILT_SOURCES)
-DEFS =			-DDEFAULT_CHARSET_HOME="\"$(MYSQLBASEdir)\"" \
-			-DMYSQL_DATADIR="\"$(MYSQLDATAdir)\"" \
+DEFS =			-DDEFAULT_CHARSET_HOME='"$(MYSQLBASEdir)"' \
+			-DMYSQL_DATADIR='"$(MYSQLDATAdir)"' \
 			-DDEFAULT_HOME_ENV=MYSQL_HOME \
+ 			-DPLUGINDIR='"$(pkgplugindir)"' \
 			-DDEFAULT_GROUP_SUFFIX_ENV=MYSQL_GROUP_SUFFIX \
-			-DDEFAULT_SYSCONFDIR="\"$(sysconfdir)\"" \
-			-DSHAREDIR="\"$(MYSQLSHAREdir)\"" $(target_defs)
+			-DDEFAULT_SYSCONFDIR='"$(sysconfdir)"' \
+			-DSHAREDIR='"$(MYSQLSHAREdir)"' $(target_defs)
 
 if HAVE_YASSL
 yassl_las = $(top_builddir)/extra/yassl/src/libyassl.la \

=== modified file 'libmysql/client_settings.h'
--- a/libmysql/client_settings.h	2007-09-29 19:31:08 +0000
+++ b/libmysql/client_settings.h	2010-03-29 15:13:53 +0000
@@ -18,7 +18,8 @@
 
 #define CLIENT_CAPABILITIES (CLIENT_LONG_PASSWORD | CLIENT_LONG_FLAG |	  \
                              CLIENT_TRANSACTIONS | \
-			     CLIENT_PROTOCOL_41 | CLIENT_SECURE_CONNECTION)
+			     CLIENT_PROTOCOL_41 | CLIENT_SECURE_CONNECTION | \
+                             CLIENT_PLUGIN_AUTH)
 
 sig_handler my_pipe_sig_handler(int sig);
 void read_user_name(char *name);
@@ -57,7 +58,7 @@
 int cli_read_binary_rows(MYSQL_STMT *stmt);
 int cli_unbuffered_fetch(MYSQL *mysql, char **row);
 const char * cli_read_statistics(MYSQL *mysql);
-int cli_read_change_user_result(MYSQL *mysql, char *buff, const char *passwd);
+int cli_read_change_user_result(MYSQL *mysql);
 
 #ifdef EMBEDDED_LIBRARY
 int init_embedded_server(int argc, char **argv, char **groups);

=== modified file 'libmysql/errmsg.c'
--- a/libmysql/errmsg.c	2008-05-20 16:36:26 +0000
+++ b/libmysql/errmsg.c	2010-03-29 15:13:53 +0000
@@ -85,6 +85,7 @@
   "Lost connection to MySQL server at '%s', system error: %d",
   "Statement closed indirectly because of a preceeding %s() call",
   "The number of columns in the result set differs from the number of bound buffers. You must reset the statement, rebind the result set columns, and execute the statement again",
+  "Authentication plugin '%s' cannot be loaded: %s",
   ""
 };
 
@@ -151,6 +152,7 @@
   "Lost connection to MySQL server at '%s', system error: %d",
   "Statement closed indirectly because of a preceeding %s() call",
   "The number of columns in the result set differs from the number of bound buffers. You must reset the statement, rebind the result set columns, and execute the statement again",
+  "Authentication plugin '%s' cannot be loaded: %s",
   ""
 };
 
@@ -215,6 +217,7 @@
   "Lost connection to MySQL server at '%s', system error: %d",
   "Statement closed indirectly because of a preceeding %s() call",
   "The number of columns in the result set differs from the number of bound buffers. You must reset the statement, rebind the result set columns, and execute the statement again",
+  "Authentication plugin '%s' cannot be loaded: %s",
   ""
 };
 #endif

=== modified file 'libmysql/libmysql.c'
--- a/libmysql/libmysql.c	2010-11-23 21:39:59 +0000
+++ b/libmysql/libmysql.c	2010-11-30 21:11:03 +0000
@@ -126,12 +126,13 @@
     if (my_init())				/* Will init threads */
       return 1;
     init_client_errs();
+    if (mysql_client_plugin_init())
+      return 1;
     if (!mysql_port)
     {
       mysql_port = MYSQL_PORT;
 #ifndef MSDOS
       {
-	struct servent *serv_ptr;
 	char	*env;
 
         /*
@@ -145,6 +146,7 @@
         */
 
 #if MYSQL_PORT_DEFAULT == 0
+	struct servent *serv_ptr;
         if ((serv_ptr = getservbyname("mysql", "tcp")))
           mysql_port = (uint) ntohs((ushort) serv_ptr->s_port);
 #endif
@@ -198,6 +200,8 @@
   if (!mysql_client_init)
     return;
 
+  mysql_client_plugin_deinit();
+
 #ifdef EMBEDDED_LIBRARY
   end_embedded_server();
 #endif
@@ -663,44 +667,14 @@
   Change user and database
 **************************************************************************/
 
-int cli_read_change_user_result(MYSQL *mysql, char *buff, const char *passwd)
-{
-  NET *net= &mysql->net;
-  ulong pkt_length;
-
-  pkt_length= cli_safe_read(mysql);
-  
-  if (pkt_length == packet_error)
-    return 1;
-
-  if (pkt_length == 1 && net->read_pos[0] == 254 &&
-      mysql->server_capabilities & CLIENT_SECURE_CONNECTION)
-  {
-    /*
-      By sending this very specific reply server asks us to send scrambled
-      password in old format. The reply contains scramble_323.
-    */
-    scramble_323(buff, mysql->scramble, passwd);
-    if (my_net_write(net, (uchar*) buff, SCRAMBLE_LENGTH_323 + 1) ||
-        net_flush(net))
-    {
-      set_mysql_error(mysql, CR_SERVER_LOST, unknown_sqlstate);
-      return 1;
-    }
-    /* Read what server thinks about out new auth message report */
-    if (cli_safe_read(mysql) == packet_error)
-      return 1;
-  }
-  return 0;
-}
-
 my_bool	STDCALL mysql_change_user(MYSQL *mysql, const char *user,
 				  const char *passwd, const char *db)
 {
-  char buff[USERNAME_LENGTH+SCRAMBLED_PASSWORD_CHAR_LENGTH+NAME_LEN+2];
-  char *end= buff;
   int rc;
   CHARSET_INFO *saved_cs= mysql->charset;
+  char *saved_user= mysql->user;
+  char *saved_passwd= mysql->passwd;
+  char *saved_db= mysql->db;
 
   DBUG_ENTER("mysql_change_user");
 
@@ -714,49 +688,11 @@
 
   /* Use an empty string instead of NULL. */
 
-  if (!user)
-    user="";
-  if (!passwd)
-    passwd="";
-
-  /*
-    Store user into the buffer.
-    Advance position as strmake returns a pointer to the closing NUL.
-  */
-  end= strmake(end, user, USERNAME_LENGTH) + 1;
-
-  /* write scrambled password according to server capabilities */
-  if (passwd[0])
-  {
-    if (mysql->server_capabilities & CLIENT_SECURE_CONNECTION)
-    {
-      *end++= SCRAMBLE_LENGTH;
-      scramble(end, mysql->scramble, passwd);
-      end+= SCRAMBLE_LENGTH;
-    }
-    else
-    {
-      scramble_323(end, mysql->scramble, passwd);
-      end+= SCRAMBLE_LENGTH_323 + 1;
-    }
-  }
-  else
-    *end++= '\0';                               /* empty password */
-  /* Add database if needed */
-  end= strmake(end, db ? db : "", NAME_LEN) + 1;
-
-  /* Add character set number. */
-
-  if (mysql->server_capabilities & CLIENT_SECURE_CONNECTION)
-  {
-    int2store(end, (ushort) mysql->charset->number);
-    end+= 2;
-  }
-
-  /* Write authentication package */
-  simple_command(mysql,COM_CHANGE_USER, (uchar*) buff, (ulong) (end-buff), 1);
-
-  rc= (*mysql->methods->read_change_user_result)(mysql, buff, passwd);
+  mysql->user= (char*)(user ? user : "");
+  mysql->passwd= (char*)(passwd ? passwd : "");
+  mysql->db= 0;
+
+  rc= run_plugin_auth(mysql, 0, 0, 0, db);
 
   /*
     The server will close all statements no matter was the attempt
@@ -766,18 +702,21 @@
   if (rc == 0)
   {
     /* Free old connect information */
-    my_free(mysql->user,MYF(MY_ALLOW_ZERO_PTR));
-    my_free(mysql->passwd,MYF(MY_ALLOW_ZERO_PTR));
-    my_free(mysql->db,MYF(MY_ALLOW_ZERO_PTR));
+    my_free(saved_user, MYF(MY_ALLOW_ZERO_PTR));
+    my_free(saved_passwd, MYF(MY_ALLOW_ZERO_PTR));
+    my_free(saved_db, MYF(MY_ALLOW_ZERO_PTR));
 
     /* alloc new connect information */
-    mysql->user=  my_strdup(user,MYF(MY_WME));
-    mysql->passwd=my_strdup(passwd,MYF(MY_WME));
-    mysql->db=    db ? my_strdup(db,MYF(MY_WME)) : 0;
+    mysql->user= my_strdup(mysql->user, MYF(MY_WME));
+    mysql->passwd= my_strdup(mysql->passwd, MYF(MY_WME));
+    mysql->db= db ? my_strdup(db, MYF(MY_WME)) : 0;
   }
   else
   {
     mysql->charset= saved_cs;
+    mysql->user= saved_user;
+    mysql->passwd= saved_passwd;
+    mysql->db= saved_db;
   }
 
   DBUG_RETURN(rc);

=== modified file 'libmysqld/CMakeLists.txt'
--- a/libmysqld/CMakeLists.txt	2010-12-06 11:52:06 +0000
+++ b/libmysqld/CMakeLists.txt	2010-12-06 12:16:49 +0000
@@ -102,7 +102,7 @@
            ../sql-common/client.c ../sql-common/my_time.c 
            ../sql-common/my_user.c ../sql-common/pack.c
            ../sql/password.c ../sql/discover.cc ../sql/derror.cc 
-           ../sql/field.cc ../sql/field_conv.cc
+           ../sql/field.cc ../sql/field_conv.cc ../sql-common/client_plugin.c
            ../sql/filesort.cc ../sql/gstream.cc ../sql/ha_partition.cc 
            ../sql/handler.cc ../sql/hash_filo.cc ../sql/hostname.cc 
            ../sql/init.cc ../sql/item_buff.cc ../sql/item_cmpfunc.cc 
@@ -137,7 +137,8 @@
            ../sql/strfunc.cc ../sql/table.cc ../sql/thr_malloc.cc
            ../sql/time.cc ../sql/tztime.cc ../sql/uniques.cc ../sql/unireg.cc
            ../sql/partition_info.cc ../sql/sql_connect.cc 
-           ../sql/scheduler.cc ../sql/event_parse_data.cc
+           ../sql/scheduler.cc ../sql/event_parse_data.cc 
+	   ../sql/create_options.cc
            ${GEN_SOURCES}
            ${LIB_SOURCES})
 

=== modified file 'libmysqld/Makefile.am'
--- a/libmysqld/Makefile.am	2010-11-17 12:24:20 +0000
+++ b/libmysqld/Makefile.am	2010-11-19 21:33:47 +0000
@@ -25,10 +25,10 @@
 
 EXTRA_DIST =		libmysqld.def CMakeLists.txt
 DEFS =			-DEMBEDDED_LIBRARY -DMYSQL_SERVER \
-			-DDEFAULT_MYSQL_HOME="\"$(MYSQLBASEdir)\"" \
-			-DMYSQL_DATADIR="\"$(MYSQLDATAdir)\"" \
-			-DSHAREDIR="\"$(MYSQLSHAREdir)\"" \
-			-DPLUGINDIR="\"$(pkgplugindir)\""
+			-DDEFAULT_MYSQL_HOME='"$(MYSQLBASEdir)"' \
+			-DMYSQL_DATADIR='"$(MYSQLDATAdir)"' \
+			-DSHAREDIR='"$(MYSQLSHAREdir)"' \
+			-DPLUGINDIR='"$(pkgplugindir)"'
 INCLUDES=		-I$(top_builddir)/include -I$(top_srcdir)/include \
 			-I$(top_builddir)/sql -I$(top_srcdir)/sql \
 			-I$(top_srcdir)/sql/examples \
@@ -41,7 +41,7 @@
 SUBDIRS =		. examples
 libmysqld_sources=	libmysqld.c lib_sql.cc emb_qcache.cc
 libmysqlsources =	errmsg.c get_password.c libmysql.c client.c pack.c \
-                        my_time.c
+                        my_time.c client_plugin.c
 
 noinst_HEADERS =	embedded_priv.h emb_qcache.h
 
@@ -75,7 +75,7 @@
 	parse_file.cc sql_view.cc sql_trigger.cc my_decimal.cc \
 	rpl_filter.cc sql_partition.cc sql_builtin.cc sql_plugin.cc \
 	debug_sync.cc \
-	sql_tablespace.cc \
+	sql_tablespace.cc create_options.cc \
 	rpl_injector.cc my_user.c partition_info.cc \
 	sql_servers.cc event_parse_data.cc opt_table_elimination.cc
 

=== modified file 'libmysqld/embedded_priv.h'
--- a/libmysqld/embedded_priv.h	2006-12-31 00:32:21 +0000
+++ b/libmysqld/embedded_priv.h	2010-03-29 15:13:53 +0000
@@ -15,6 +15,8 @@
 
 /* Prototypes for the embedded version of MySQL */
 
+#include <sql_common.h>
+
 C_MODE_START
 void lib_connection_phase(NET *net, int phase);
 void init_embedded_mysql(MYSQL *mysql, int client_flag);

=== modified file 'libmysqld/lib_sql.cc'
--- a/libmysqld/lib_sql.cc	2010-03-04 08:03:07 +0000
+++ b/libmysqld/lib_sql.cc	2010-05-14 21:45:32 +0000
@@ -35,7 +35,6 @@
 #include <mysql.h>
 #undef ER
 #include "errmsg.h"
-#include <sql_common.h>
 #include "embedded_priv.h"
 
 extern unsigned int mysql_server_last_errno;
@@ -413,11 +412,10 @@
   return mysql_store_result(mysql);
 }
 
-int emb_read_change_user_result(MYSQL *mysql, 
-				char *buff __attribute__((unused)),
-				const char *passwd __attribute__((unused)))
+int emb_read_change_user_result(MYSQL *mysql)
 {
-  return mysql_errno(mysql);
+  mysql->net.read_pos= (uchar*)""; // fake an OK packet
+  return mysql_errno(mysql) ? packet_error : 1 /* length of the OK packet */;
 }
 
 MYSQL_METHODS embedded_methods= 
@@ -428,6 +426,7 @@
   emb_store_result,
   emb_fetch_lengths, 
   emb_flush_use_result,
+  emb_read_change_user_result,
   emb_list_fields,
   emb_read_prepare_result,
   emb_stmt_execute,
@@ -436,7 +435,6 @@
   emb_free_embedded_thd,
   emb_read_statistics,
   emb_read_query_result,
-  emb_read_change_user_result,
   emb_read_rows_from_cursor
 };
 
@@ -584,6 +582,8 @@
   THD *thd = (THD *)mysql->thd;
   thd->mysql= mysql;
   mysql->server_version= server_version;
+  mysql->client_flag= client_flag;
+  mysql->server_capabilities= client_flag;
   init_alloc_root(&mysql->field_alloc, 8192, 0);
 }
 
@@ -648,14 +648,19 @@
 int check_embedded_connection(MYSQL *mysql, const char *db)
 {
   int result;
+  LEX_STRING db_str = { (char*)db, db ? strlen(db) : 0 };
   THD *thd= (THD*)mysql->thd;
   thd_init_client_charset(thd, mysql->charset->number);
   thd->update_charset();
   Security_context *sctx= thd->security_ctx;
   sctx->host_or_ip= sctx->host= (char*) my_localhost;
   strmake(sctx->priv_host, (char*) my_localhost,  MAX_HOSTNAME-1);
-  sctx->priv_user= sctx->user= my_strdup(mysql->user, MYF(0));
-  result= check_user(thd, COM_CONNECT, NULL, 0, db, true);
+  strmake(sctx->priv_user, mysql->user,  USERNAME_LENGTH-1);
+  sctx->user= my_strdup(mysql->user, MYF(0));
+  sctx->master_access= GLOBAL_ACLS;       // Full rights
+  /* Change database if necessary */
+  if (!(result= (db && db[0] && mysql_change_db(thd, &db_str, FALSE))))
+    my_ok(thd);
   net_end_statement(thd);
   emb_read_query_result(mysql);
   return result;
@@ -664,14 +669,15 @@
 #else
 int check_embedded_connection(MYSQL *mysql, const char *db)
 {
+  /*
+    we emulate a COM_CHANGE_USER user here,
+    it's easier than to emulate the complete 3-way handshake
+  */
+  char buf[USERNAME_LENGTH + SCRAMBLE_LENGTH + 1 + 2*NAME_LEN + 2], *end;
+  NET *net= &mysql->net;
   THD *thd= (THD*)mysql->thd;
   Security_context *sctx= thd->security_ctx;
-  int result;
-  char scramble_buff[SCRAMBLE_LENGTH];
-  int passwd_len;
 
-  thd_init_client_charset(thd, mysql->charset->number);
-  thd->update_charset();
   if (mysql->options.client_ip)
   {
     sctx->host= my_strdup(mysql->options.client_ip, MYF(0));
@@ -682,36 +688,45 @@
   sctx->host_or_ip= sctx->host;
 
   if (acl_check_host(sctx->host, sctx->ip))
-  {
-    result= ER_HOST_NOT_PRIVILEGED;
     goto err;
-  }
-
-  sctx->user= my_strdup(mysql->user, MYF(0));
+
+  /* construct a COM_CHANGE_USER packet */
+  end= strmake(buf, mysql->user, USERNAME_LENGTH) + 1;
+
+  memset(thd->scramble, 55, SCRAMBLE_LENGTH); // dummy scramble
+  thd->scramble[SCRAMBLE_LENGTH]= 0;
+  strcpy(mysql->scramble, thd->scramble);
+
   if (mysql->passwd && mysql->passwd[0])
   {
-    memset(thd->scramble, 55, SCRAMBLE_LENGTH); // dummy scramble
-    thd->scramble[SCRAMBLE_LENGTH]= 0;
-    scramble(scramble_buff, thd->scramble, mysql->passwd);
-    passwd_len= SCRAMBLE_LENGTH;
+    *end++= SCRAMBLE_LENGTH;
+    scramble(end, thd->scramble, mysql->passwd);
+    end+= SCRAMBLE_LENGTH;
   }
   else
-    passwd_len= 0;
-
-  if((result= check_user(thd, COM_CONNECT, 
-			 scramble_buff, passwd_len, db, true)))
-     goto err;
-
+    *end++= 0;
+
+  end= strmake(end, db ? db : "", NAME_LEN) + 1;
+
+  int2store(end, (ushort) mysql->charset->number);
+  end+= 2;
+
+  /* acl_authenticate() takes the data from thd->net->read_pos */
+  thd->net.read_pos= (uchar*)buf;
+
+  if (acl_authenticate(thd, 0, end - buf))
+  {
+    x_free(thd->security_ctx->user);
+    goto err;
+  }
   return 0;
+
 err:
-  {
-    NET *net= &mysql->net;
-    strmake(net->last_error, thd->main_da.message(), sizeof(net->last_error)-1);
-    memcpy(net->sqlstate,
-           mysql_errno_to_sqlstate(thd->main_da.sql_errno()),
-           sizeof(net->sqlstate)-1);
-  }
-  return result;
+  strmake(net->last_error, thd->main_da.message(), sizeof(net->last_error)-1);
+  memcpy(net->sqlstate,
+         mysql_errno_to_sqlstate(thd->main_da.sql_errno()),
+         sizeof(net->sqlstate)-1);
+  return 1;
 }
 #endif
 

=== modified file 'libmysqld/libmysqld.c'
--- a/libmysqld/libmysqld.c	2009-09-25 11:39:05 +0000
+++ b/libmysqld/libmysqld.c	2010-03-29 15:13:53 +0000
@@ -18,7 +18,6 @@
 #include <mysql_embed.h>
 #include <mysqld_error.h>
 #include <my_pthread.h>
-#include "embedded_priv.h"
 #include <my_sys.h>
 #include <mysys_err.h>
 #include <m_string.h>
@@ -28,6 +27,7 @@
 #include <sys/stat.h>
 #include <signal.h>
 #include <time.h>
+#include "embedded_priv.h"
 #include "client_settings.h"
 #ifdef	 HAVE_PWD_H
 #include <pwd.h>
@@ -81,9 +81,9 @@
 ** Shut down connection
 **************************************************************************/
 
-static void end_server(MYSQL *mysql)
+void embedded_end_server(MYSQL *mysql)
 {
-  DBUG_ENTER("end_server");
+  DBUG_ENTER("embedded_end_server");
   free_old_query(mysql);
   DBUG_VOID_RETURN;
 }
@@ -169,7 +169,11 @@
   client_flag|=CLIENT_CAPABILITIES;
   if (client_flag & CLIENT_MULTI_STATEMENTS)
     client_flag|= CLIENT_MULTI_RESULTS;
-  client_flag&= ~CLIENT_COMPRESS;
+  /*
+    no compression in embedded as we don't send any data,
+    and no pluggable auth, as we cannot do a client-server dialog
+  */
+  client_flag&= ~(CLIENT_COMPRESS | CLIENT_PLUGIN_AUTH);
   if (db)
     client_flag|=CLIENT_CONNECT_WITH_DB;
 
@@ -216,7 +220,7 @@
   {
     /* Free alloced memory */
     my_bool free_me=mysql->free_me;
-    end_server(mysql);
+    embedded_end_server(mysql);
     mysql->free_me=0;
     mysql_close(mysql);
     mysql->free_me=free_me;

=== added directory 'libservices'
=== added file 'libservices/CMakeLists.txt'
--- a/libservices/CMakeLists.txt	1970-01-01 00:00:00 +0000
+++ b/libservices/CMakeLists.txt	2010-03-03 14:44:14 +0000
@@ -0,0 +1,20 @@
+# Copyright (C) 2006 MySQL 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
+# the Free Software Foundation; version 2 of the License.
+# 
+# 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
+# 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
+
+SET(MYSQLSERVICES_SOURCES my_snprintf_service.c thd_alloc_service.c)
+
+ADD_LIBRARY(mysqlservices ${MYSQLSERVICES_SOURCES})

=== added file 'libservices/HOWTO'
--- a/libservices/HOWTO	1970-01-01 00:00:00 +0000
+++ b/libservices/HOWTO	2010-03-03 14:44:14 +0000
@@ -0,0 +1,100 @@
+How to create a new service
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+A "service" is a set of C functions in a structure that a
+service dynamic linker uses when a dynamic plugin is loaded.
+
+If you want to export C++ class you need to provide an
+extern "C" function that will create a new instance of your class,
+and put it in a service.
+
+Data structures are not part of the service structure, but they are part
+of the API you create and usually need to be declared in the same
+service_*.h file.
+
+To turn a set of functions (foo_func1, foo_func2)
+into a service "foo" you need to
+
+1. create a new file include/mysql/service_foo.h
+
+2. the template is
+==================================================================
+  #ifndef MYSQL_SERVICE_FOO_INCLUDED
+  /* standard GPL header */
+
+  /**
+    @file
+    *exhaustive* description of the interface you provide.
+    This file is the main user documentation of the new service
+  */
+  #ifdef __cplusplus
+  extern "C" {
+  #endif
+
+  extern struct foo_service_st {
+    int (*foo_func1_type)(...);  /* fix the prototype as appropriate */
+    void (*foo_func2_type)(...); /* fix the prototype as appropriate */
+  } *foo_service;
+
+  #ifdef MYSQL_DYNAMIC_PLUGIN
+
+  #define foo_func1(...) foo_service->foo_func1_type(...)
+  #define foo_func2(...) foo_service->foo_func2_type(...)
+
+  #else
+
+  int foo_func1(...);  /* fix the prototype as appropriate */
+  void foo_func2(...); /* fix the prototype as appropriate */
+
+  #endif
+
+  #ifdef __cplusplus
+  }
+  #endif
+
+  #define MYSQL_SERVICE_FOO_INCLUDED
+  #endif
+==================================================================
+
+the service_foo.h file should be self-contained, if it needs system headers -
+include them in it, e.g. if you use size_t - #include <stdlib.h>
+
+it should also declare all the accompanying data structures, as necessary
+(e.g. thd_alloc_service declares MYSQL_LEX_STRING).
+
+3. add the new file to include/Makefile.am (pkginclude_HEADERS)
+4. add the new file to include/mysql/services.h
+5. increase the minor plugin ABI version in include/mysql/plugin.h
+   (MYSQL_PLUGIN_INTERFACE_VERSION = MYSQL_PLUGIN_INTERFACE_VERSION+1)
+6. add the version of your service to include/service_versions.h:
+==================================================================
+    #define VERSION_foo 0x0100
+==================================================================
+
+7. create a new file libservices/foo_service.c using the following template:
+==================================================================
+  /* GPL header */
+  #include <service_versions.h>
+  SERVICE_VERSION *foo_service= (void*)VERSION_foo;
+==================================================================
+
+8. add the new file to libservices/CMakeLists.txt (MYSQLSERVICES_SOURCES)
+9. add the new file to libservices/Makefile.am (libmysqlservices_a_SOURCES)
+10. and finally, register your service for dynamic linking in
+    sql/sql_plugin_services.h
+10.1 fill in the service structure:
+==================================================================
+  static struct foo_service_st foo_handler = {
+    foo_func1,
+    foo_func2
+  }
+==================================================================
+
+10.2 and add it to the list of services
+
+==================================================================
+    { "foo_service", VERSION_foo, &foo_handler }
+==================================================================
+
+that's all.
+

=== added file 'libservices/Makefile.am'
--- a/libservices/Makefile.am	1970-01-01 00:00:00 +0000
+++ b/libservices/Makefile.am	2010-03-03 14:44:14 +0000
@@ -0,0 +1,19 @@
+# Copyright 2009 Sun Microsystems, Inc.
+# 
+# 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
+# the Free Software Foundation; version 2 of the License.
+# 
+# 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
+# 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
+
+AM_CPPFLAGS =		-I$(top_srcdir)/include
+pkglib_LIBRARIES =	libmysqlservices.a
+libmysqlservices_a_SOURCES =  my_snprintf_service.c thd_alloc_service.c
+EXTRA_DIST = CMakeLists.txt

=== added file 'libservices/my_snprintf_service.c'
--- a/libservices/my_snprintf_service.c	1970-01-01 00:00:00 +0000
+++ b/libservices/my_snprintf_service.c	2010-03-03 14:44:14 +0000
@@ -0,0 +1,17 @@
+/* Copyright (C) 2009 Sun Microsystems, Inc.
+
+   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
+   the Free Software Foundation; version 2 of the License.
+
+   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
+   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 */
+
+#include <service_versions.h>
+SERVICE_VERSION my_snprintf_service= (void*)VERSION_my_snprintf;

=== added file 'libservices/thd_alloc_service.c'
--- a/libservices/thd_alloc_service.c	1970-01-01 00:00:00 +0000
+++ b/libservices/thd_alloc_service.c	2010-03-03 14:44:14 +0000
@@ -0,0 +1,17 @@
+/* Copyright (C) 2009 Sun Microsystems, Inc.
+
+   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
+   the Free Software Foundation; version 2 of the License.
+
+   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
+   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 */
+
+#include <service_versions.h>
+SERVICE_VERSION *thd_alloc_service= (void*)VERSION_thd_alloc;

=== modified file 'mysql-test/Makefile.am'
--- a/mysql-test/Makefile.am	2011-01-10 21:22:40 +0000
+++ b/mysql-test/Makefile.am	2011-01-10 21:42:47 +0000
@@ -84,6 +84,10 @@
 	suite/binlog suite/binlog/t suite/binlog/r suite/binlog/std_data \
 	suite/bugs suite/bugs/data suite/bugs/t suite/bugs/r \
 	suite/federated \
+	suite/pbxt/t suite/pbxt/r suite/pbxt \
+	suite/vcol suite/vcol/t suite/vcol/r suite/vcol/inc \
+	suite/oqgraph suite/oqgraph/t suite/oqgraph/r suite/oqgraph/include \
+	suite/percona suite/sphinx \
 	suite/funcs_1 suite/funcs_1/bitdata \
 	suite/funcs_1/include suite/funcs_1/lib suite/funcs_1/r \
 	suite/funcs_1/t suite/funcs_1/views suite/funcs_1/cursors \
@@ -102,11 +106,10 @@
 	suite/ndb suite/ndb/t suite/ndb/r \
 	suite/rpl_ndb suite/rpl_ndb/t suite/rpl_ndb/r \
 	suite/parts suite/parts/t suite/parts/r suite/parts/inc \
-	suite/pbxt/t suite/pbxt/r suite/pbxt \
 	suite/innodb suite/innodb/t suite/innodb/r suite/innodb/include \
 	suite/innodb_plugin suite/innodb_plugin/t suite/innodb_plugin/r \
 	suite/innodb_plugin/include \
-	suite/percona suite/handler \
+	suite/handler \
 	suite/engines suite/engines/funcs suite/engines/iuds suite/engines/rr_trx \
 	suite/engines/funcs/r suite/engines/funcs/t suite/engines/iuds/r \
 	suite/engines/iuds/t suite/engines/rr_trx/include suite/engines/rr_trx/r \

=== modified file 'mysql-test/include/have_maria.inc'
--- a/mysql-test/include/have_maria.inc	2008-04-24 21:13:56 +0000
+++ b/mysql-test/include/have_maria.inc	2010-09-12 16:40:01 +0000
@@ -1,4 +1,5 @@
-disable_query_log;
---require r/true.require
-select (support = 'YES' or support = 'DEFAULT') as `TRUE` from information_schema.engines where engine = 'maria';
-enable_query_log;
+if (!`SELECT count(*) FROM information_schema.engines WHERE
+      (support = 'YES' OR support = 'DEFAULT') AND
+      engine = 'aria'`){
+  skip Need Aria engine;
+}

=== modified file 'mysql-test/include/have_xtradb.inc'
--- a/mysql-test/include/have_xtradb.inc	2010-08-03 21:26:17 +0000
+++ b/mysql-test/include/have_xtradb.inc	2010-12-31 09:39:14 +0000
@@ -1,4 +1,5 @@
-disable_query_log;
---require r/true.require
-SELECT (plugin_description LIKE '%xtradb%') AS `TRUE` FROM information_schema.plugins WHERE LOWER(plugin_name) = 'innodb' AND LOWER(plugin_status) = 'active';
-enable_query_log;
+if (!`SELECT count(*) FROM information_schema.plugins WHERE
+      plugin_name = 'innodb' AND plugin_status = 'active' AND
+      plugin_description LIKE '%xtradb%'`){
+  skip Need XtraDB engine;
+}

=== added file 'mysql-test/include/have_xtradb.opt'
--- a/mysql-test/include/have_xtradb.opt	1970-01-01 00:00:00 +0000
+++ b/mysql-test/include/have_xtradb.opt	2010-12-31 09:39:14 +0000
@@ -0,0 +1,2 @@
+--loose-innodb
+--plugin-load=$HA_XTRADB_SO

=== modified file 'mysql-test/include/maria_empty_logs.inc'
--- a/mysql-test/include/maria_empty_logs.inc	2010-09-15 12:48:15 +0000
+++ b/mysql-test/include/maria_empty_logs.inc	2010-09-16 07:58:57 +0000
@@ -28,52 +28,52 @@
 if (!$mel_keep_control_file)
 {
   --error 0,1
-  remove_file $MYSQLD_DATADIR/$MARIA_LOG/maria_log_control;
+  remove_file $MYSQLD_DATADIR/$MARIA_LOG/aria_log_control;
 }
 -- error 0,1
-remove_file $MYSQLD_DATADIR/$MARIA_LOG/maria_log.00000001;
--- error 0,1
-remove_file $MYSQLD_DATADIR/$MARIA_LOG/maria_log.00000002;
--- error 0,1
-remove_file $MYSQLD_DATADIR/$MARIA_LOG/maria_log.00000003;
--- error 0,1
-remove_file $MYSQLD_DATADIR/$MARIA_LOG/maria_log.00000004;
--- error 0,1
-remove_file $MYSQLD_DATADIR/$MARIA_LOG/maria_log.00000005;
--- error 0,1
-remove_file $MYSQLD_DATADIR/$MARIA_LOG/maria_log.00000006;
--- error 0,1
-remove_file $MYSQLD_DATADIR/$MARIA_LOG/maria_log.00000007;
--- error 0,1
-remove_file $MYSQLD_DATADIR/$MARIA_LOG/maria_log.00000008;
--- error 0,1
-remove_file $MYSQLD_DATADIR/$MARIA_LOG/maria_log.00000009;
--- error 0,1
-remove_file $MYSQLD_DATADIR/$MARIA_LOG/maria_log.00000010;
--- error 0,1
-remove_file $MYSQLD_DATADIR/$MARIA_LOG/maria_log.00000011;
--- error 0,1
-remove_file $MYSQLD_DATADIR/$MARIA_LOG/maria_log.00000012;
--- error 0,1
-remove_file $MYSQLD_DATADIR/$MARIA_LOG/maria_log.00000013;
--- error 0,1
-remove_file $MYSQLD_DATADIR/$MARIA_LOG/maria_log.00000014;
--- error 0,1
-remove_file $MYSQLD_DATADIR/$MARIA_LOG/maria_log.00000015;
--- error 0,1
-remove_file $MYSQLD_DATADIR/$MARIA_LOG/maria_log.00000016;
--- error 0,1
-remove_file $MYSQLD_DATADIR/$MARIA_LOG/maria_log.00000017;
--- error 0,1
-remove_file $MYSQLD_DATADIR/$MARIA_LOG/maria_log.00000018;
--- error 0,1
-remove_file $MYSQLD_DATADIR/$MARIA_LOG/maria_log.00000019;
--- error 0,1
-remove_file $MYSQLD_DATADIR/$MARIA_LOG/maria_log.00000020;
+remove_file $MYSQLD_DATADIR/$MARIA_LOG/aria_log.00000001;
+-- error 0,1
+remove_file $MYSQLD_DATADIR/$MARIA_LOG/aria_log.00000002;
+-- error 0,1
+remove_file $MYSQLD_DATADIR/$MARIA_LOG/aria_log.00000003;
+-- error 0,1
+remove_file $MYSQLD_DATADIR/$MARIA_LOG/aria_log.00000004;
+-- error 0,1
+remove_file $MYSQLD_DATADIR/$MARIA_LOG/aria_log.00000005;
+-- error 0,1
+remove_file $MYSQLD_DATADIR/$MARIA_LOG/aria_log.00000006;
+-- error 0,1
+remove_file $MYSQLD_DATADIR/$MARIA_LOG/aria_log.00000007;
+-- error 0,1
+remove_file $MYSQLD_DATADIR/$MARIA_LOG/aria_log.00000008;
+-- error 0,1
+remove_file $MYSQLD_DATADIR/$MARIA_LOG/aria_log.00000009;
+-- error 0,1
+remove_file $MYSQLD_DATADIR/$MARIA_LOG/aria_log.00000010;
+-- error 0,1
+remove_file $MYSQLD_DATADIR/$MARIA_LOG/aria_log.00000011;
+-- error 0,1
+remove_file $MYSQLD_DATADIR/$MARIA_LOG/aria_log.00000012;
+-- error 0,1
+remove_file $MYSQLD_DATADIR/$MARIA_LOG/aria_log.00000013;
+-- error 0,1
+remove_file $MYSQLD_DATADIR/$MARIA_LOG/aria_log.00000014;
+-- error 0,1
+remove_file $MYSQLD_DATADIR/$MARIA_LOG/aria_log.00000015;
+-- error 0,1
+remove_file $MYSQLD_DATADIR/$MARIA_LOG/aria_log.00000016;
+-- error 0,1
+remove_file $MYSQLD_DATADIR/$MARIA_LOG/aria_log.00000017;
+-- error 0,1
+remove_file $MYSQLD_DATADIR/$MARIA_LOG/aria_log.00000018;
+-- error 0,1
+remove_file $MYSQLD_DATADIR/$MARIA_LOG/aria_log.00000019;
+-- error 0,1
+remove_file $MYSQLD_DATADIR/$MARIA_LOG/aria_log.00000020;
 # hope there are not more than these logs...
 
 -- error 0,1
-remove_file $MYSQLD_DATADIR/maria_recovery.trace;
+remove_file $MYSQLD_DATADIR/aria_recovery.trace;
 --enable_warnings
 
 append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect;

=== modified file 'mysql-test/include/maria_make_snapshot_for_feeding_recovery.inc'
--- a/mysql-test/include/maria_make_snapshot_for_feeding_recovery.inc	2010-09-15 12:48:15 +0000
+++ b/mysql-test/include/maria_make_snapshot_for_feeding_recovery.inc	2010-09-16 07:58:57 +0000
@@ -33,8 +33,8 @@
 let $MYSQLD_DATADIR= `SELECT @@datadir`;
 --disable_warnings
 -- error 0,1
-remove_file $MYSQLTEST_VARDIR/tmp/mms_for_$mms_purpose.maria_log_control;
+remove_file $MYSQLTEST_VARDIR/tmp/mms_for_$mms_purpose.aria_log_control;
 --enable_warnings
-copy_file $MYSQLD_DATADIR/$MARIA_LOG/maria_log_control $MYSQLTEST_VARDIR/tmp/mms_for_$mms_purpose.maria_log_control;
+copy_file $MYSQLD_DATADIR/$MARIA_LOG/aria_log_control $MYSQLTEST_VARDIR/tmp/mms_for_$mms_purpose.aria_log_control;
 
 connection default;

=== modified file 'mysql-test/include/maria_verify_recovery.inc'
--- a/mysql-test/include/maria_verify_recovery.inc	2009-02-19 09:01:25 +0000
+++ b/mysql-test/include/maria_verify_recovery.inc	2010-09-12 16:40:01 +0000
@@ -56,8 +56,8 @@
   # also copy back control file, to force recovery to start from an early
   # point, ignoring further checkpoints.
   -- error 0,1
-  remove_file $MYSQLD_DATADIR/$MARIA_LOG/maria_log_control;
-  copy_file $MYSQLTEST_VARDIR/tmp/mms_for_$mms_purpose.maria_log_control $MYSQLD_DATADIR/$MARIA_LOG/maria_log_control;
+  remove_file $MYSQLD_DATADIR/$MARIA_LOG/aria_log_control;
+  copy_file $MYSQLTEST_VARDIR/tmp/mms_for_$mms_purpose.aria_log_control $MYSQLD_DATADIR/$MARIA_LOG/aria_log_control;
 }
 
 --echo * recovery happens

=== modified file 'mysql-test/lib/mtr_cases.pm'
--- a/mysql-test/lib/mtr_cases.pm	2011-01-03 14:33:39 +0000
+++ b/mysql-test/lib/mtr_cases.pm	2011-01-05 14:03:58 +0000
@@ -1023,6 +1023,16 @@
     }
   }
 
+  if ( $tinfo->{'oqgraph_test'} )
+  {
+    if ( !$ENV{'GRAPH_ENGINE_SO'} )
+    {
+      $tinfo->{'skip'}= 1;
+      $tinfo->{'comment'}= "Test requires the OQGraph storage engine";
+      return $tinfo;
+    }
+  }
+
   if (not ref $::suites{$tinfo->{suite}})
   {
     $tinfo->{'skip'}= 1;
@@ -1065,6 +1075,7 @@
  ["include/not_embedded.inc", "not_embedded", 1],
  ["include/not_valgrind.inc", "not_valgrind", 1],
  ["include/have_example_plugin.inc", "example_plugin_test", 1],
+ ["include/have_oqgraph_engine.inc", "oqgraph_test", 1],
  ["include/have_ssl.inc", "need_ssl", 1],
  ["include/long_test.inc", "long_test", 1],
 );

=== modified file 'mysql-test/lib/v1/mysql-test-run.pl'
--- a/mysql-test/lib/v1/mysql-test-run.pl	2010-09-05 23:25:44 +0000
+++ b/mysql-test/lib/v1/mysql-test-run.pl	2010-09-12 16:40:01 +0000
@@ -2228,20 +2228,20 @@
                         "$glob_basedir/myisam/myisampack"));
 
   # ----------------------------------------------------
-  # Setup env so childs can execute maria_pack and maria_chk
+  # Setup env so childs can execute aria_pack and aria_chk
   # ----------------------------------------------------
-  $ENV{'MARIA_CHK'}= mtr_native_path(mtr_exe_maybe_exists(
-                       vs_config_dirs('storage/maria', 'maria_chk'),
-                       vs_config_dirs('maria', 'maria_chk'),
-                       "$path_client_bindir/maria_chk",
-                       "$glob_basedir/storage/maria/maria_chk",
-                       "$glob_basedir/maria/maria_chk"));
-  $ENV{'MARIA_PACK'}= mtr_native_path(mtr_exe_maybe_exists(
-                        vs_config_dirs('storage/maria', 'maria_pack'),
-                        vs_config_dirs('maria', 'maria_pack'),
-                        "$path_client_bindir/maria_pack",
-                        "$glob_basedir/storage/maria/maria_pack",
-                        "$glob_basedir/maria/maria_pack"));
+  $ENV{'ARIA_CHK'}= mtr_native_path(mtr_exe_maybe_exists(
+                       vs_config_dirs('storage/maria', 'aria_chk'),
+                       vs_config_dirs('maria', 'aria_chk'),
+                       "$path_client_bindir/aria_chk",
+                       "$glob_basedir/storage/maria/aria_chk",
+                       "$glob_basedir/maria/aria_chk"));
+  $ENV{'ARIA_PACK'}= mtr_native_path(mtr_exe_maybe_exists(
+                        vs_config_dirs('storage/maria', 'aria_pack'),
+                        vs_config_dirs('maria', 'aria_pack'),
+                        "$path_client_bindir/aria_pack",
+                        "$glob_basedir/storage/maria/aria_pack",
+                        "$glob_basedir/maria/aria_pack"));
 
   # ----------------------------------------------------
   # We are nice and report a bit about our settings
@@ -3192,7 +3192,7 @@
   mtr_add_arg($args, "--datadir=%s", $data_dir);
   mtr_add_arg($args, "--loose-skip-innodb");
   mtr_add_arg($args, "--loose-skip-ndbcluster");
-  mtr_add_arg($args, "--loose-skip-maria");
+  mtr_add_arg($args, "--loose-skip-aria");
   mtr_add_arg($args, "--disable-sync-frm");
   mtr_add_arg($args, "--loose-disable-debug");
   mtr_add_arg($args, "--tmpdir=.");
@@ -3202,7 +3202,7 @@
   # Setup args for bootstrap.test
   #
   mtr_init_args(\$cmd_args);
-  mtr_add_arg($cmd_args, "--loose-skip-maria");
+  mtr_add_arg($cmd_args, "--loose-skip-aria");
 
   if ( $opt_debug )
   {

=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl	2011-01-18 13:02:00 +0000
+++ b/mysql-test/mysql-test-run.pl	2011-01-23 07:23:47 +0000
@@ -142,7 +142,7 @@
 # executables will be used by the test suite.
 our $opt_vs_config = $ENV{'MTR_VS_CONFIG'};
 
-my $DEFAULT_SUITES= "main,binlog,federated,rpl,maria,handler,parts,innodb,innodb_plugin,percona,ndb";
+my $DEFAULT_SUITES= "main,binlog,federated,rpl,maria,handler,parts,innodb,innodb_plugin,percona,ndb,vcol,oqgraph,sphinx";
 my $opt_suites;
 
 our $opt_verbose= 0;  # Verbose output, enable with --verbose
@@ -1366,21 +1366,18 @@
 
     if ($opt_gdb)
     {
-      mtr_warning("Silently converting --gdb to --client-gdb in embedded mode");
       $opt_client_gdb= $opt_gdb;
       $opt_gdb= undef;
     }
 
     if ($opt_ddd)
     {
-      mtr_warning("Silently converting --ddd to --client-ddd in embedded mode");
       $opt_client_ddd= $opt_ddd;
       $opt_ddd= undef;
     }
 
     if ($opt_debugger)
     {
-      mtr_warning("Silently converting --debugger to --client-debugger in embedded mode");
       $opt_client_debugger= $opt_debugger;
       $opt_debugger= undef;
     }
@@ -1981,7 +1978,7 @@
 
 
 sub have_maria_support () {
-  my $maria_var= $mysqld_variables{'maria'};
+  my $maria_var= $mysqld_variables{'aria'};
   return defined $maria_var and $maria_var eq 'TRUE';
 }
 
@@ -2180,12 +2177,12 @@
   $ENV{'MYISAM_FTDUMP'}= tool_arguments("storage/myisam", "myisam_ftdump");
 
   # ----------------------------------------------------
-  # maria tools
+  # aria tools
   # ----------------------------------------------------
   if (have_maria_support())
   {
-    $ENV{'MARIA_CHK'}= tool_arguments("storage/maria", "maria_chk");
-    $ENV{'MARIA_PACK'}= tool_arguments("storage/maria", "maria_pack");
+    $ENV{'MARIA_CHK'}= tool_arguments("storage/maria", "aria_chk");
+    $ENV{'MARIA_PACK'}= tool_arguments("storage/maria", "aria_pack");
   }
 
   # ----------------------------------------------------
@@ -3084,7 +3081,7 @@
   mtr_add_arg($args, "--loose-skip-innodb");
   mtr_add_arg($args, "--loose-skip-pbxt");
   mtr_add_arg($args, "--loose-skip-ndbcluster");
-  mtr_add_arg($args, "--loose-skip-maria");
+  mtr_add_arg($args, "--loose-skip-aria");
   mtr_add_arg($args, "--disable-sync-frm");
   mtr_add_arg($args, "--loose-disable-debug");
   mtr_add_arg($args, "--tmpdir=%s", "$opt_vardir/tmp/");
@@ -3111,7 +3108,7 @@
   # Setup args for bootstrap.test
   #
   #mtr_init_args(\$cmd_args);
-  #mtr_add_arg($cmd_args, "--loose-skip-maria")
+  #mtr_add_arg($cmd_args, "--loose-skip-aria")
 
   # ----------------------------------------------------------------------
   # export MYSQLD_BOOTSTRAP_CMD variable containing <path>/mysqld <args>
@@ -5520,9 +5517,7 @@
   if ( $type eq "client" )
   {
     # write init file for client
-    mtr_tofile($gdb_init_file,
-	       "set args $str\n" .
-	       "break main\n");
+    mtr_tofile($gdb_init_file, "set args $str\n");
   }
   else
   {
@@ -5578,9 +5573,7 @@
   if ( $type eq "client" )
   {
     # write init file for client
-    mtr_tofile($gdb_init_file,
-	       "set args $str\n" .
-	       "break main\n");
+    mtr_tofile($gdb_init_file, "set args $str\n");
   }
   else
   {

=== modified file 'mysql-test/r/change_user.result'
--- a/mysql-test/r/change_user.result	2009-02-12 14:08:56 +0000
+++ b/mysql-test/r/change_user.result	2010-03-29 15:13:53 +0000
@@ -1,3 +1,36 @@
+grant select on test.* to test_nopw;
+grant select on test.* to test_oldpw identified by password "09301740536db389";
+grant select on test.* to test_newpw identified by "newpw";
+select concat('<', user(), '>'), concat('<', current_user(), '>'), database();
+concat('<', user(), '>')	concat('<', current_user(), '>')	database()
+<root at localhost>	<root at localhost>	test
+select concat('<', user(), '>'), concat('<', current_user(), '>'), database();
+concat('<', user(), '>')	concat('<', current_user(), '>')	database()
+<test_nopw at localhost>	<test_nopw@%>	NULL
+select concat('<', user(), '>'), concat('<', current_user(), '>'), database();
+concat('<', user(), '>')	concat('<', current_user(), '>')	database()
+<test_oldpw at localhost>	<test_oldpw@%>	NULL
+select concat('<', user(), '>'), concat('<', current_user(), '>'), database();
+concat('<', user(), '>')	concat('<', current_user(), '>')	database()
+<test_newpw at localhost>	<test_newpw@%>	NULL
+select concat('<', user(), '>'), concat('<', current_user(), '>'), database();
+concat('<', user(), '>')	concat('<', current_user(), '>')	database()
+<root at localhost>	<root at localhost>	NULL
+select concat('<', user(), '>'), concat('<', current_user(), '>'), database();
+concat('<', user(), '>')	concat('<', current_user(), '>')	database()
+<test_nopw at localhost>	<test_nopw@%>	test
+select concat('<', user(), '>'), concat('<', current_user(), '>'), database();
+concat('<', user(), '>')	concat('<', current_user(), '>')	database()
+<test_oldpw at localhost>	<test_oldpw@%>	test
+select concat('<', user(), '>'), concat('<', current_user(), '>'), database();
+concat('<', user(), '>')	concat('<', current_user(), '>')	database()
+<test_newpw at localhost>	<test_newpw@%>	test
+select concat('<', user(), '>'), concat('<', current_user(), '>'), database();
+concat('<', user(), '>')	concat('<', current_user(), '>')	database()
+<root at localhost>	<root at localhost>	test
+drop user test_nopw;
+drop user test_oldpw;
+drop user test_newpw;
 Bug#20023
 SELECT @@session.sql_big_selects;
 @@session.sql_big_selects

=== modified file 'mysql-test/r/connect.result'
--- a/mysql-test/r/connect.result	2009-04-25 09:04:38 +0000
+++ b/mysql-test/r/connect.result	2010-12-20 18:19:24 +0000
@@ -225,3 +225,21 @@
 # ------------------------------------------------------------------
 # -- End of 5.1 tests
 # ------------------------------------------------------------------
+CREATE USER mysqltest_up1 IDENTIFIED VIA mysql_native_password using '*E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB';
+CREATE USER mysqltest_up2 IDENTIFIED VIA mysql_old_password using '09301740536db389';
+connect(localhost,mysqltest_up1,foo,test,MASTER_PORT,MASTER_SOCKET);
+ERROR 28000: Access denied for user 'mysqltest_up1'@'localhost' (using password: YES)
+select user(), current_user();
+user()	current_user()
+mysqltest_up1 at localhost	mysqltest_up1@%
+connect(localhost,mysqltest_up2,newpw,test,MASTER_PORT,MASTER_SOCKET);
+ERROR 28000: Access denied for user 'mysqltest_up2'@'localhost' (using password: YES)
+select user(), current_user();
+user()	current_user()
+mysqltest_up2 at localhost	mysqltest_up2@%
+connect(localhost,mysqltest_nouser,newpw,test,MASTER_PORT,MASTER_SOCKET);
+ERROR 28000: Access denied for user 'mysqltest_nouser'@'localhost' (using password: YES)
+connect(localhost,mysqltest_nouser,,test,MASTER_PORT,MASTER_SOCKET);
+ERROR 28000: Access denied for user 'mysqltest_nouser'@'localhost' (using password: NO)
+DROP USER mysqltest_up1@'%';
+DROP USER mysqltest_up2@'%';

=== modified file 'mysql-test/r/events_bugs.result'
--- a/mysql-test/r/events_bugs.result	2009-03-11 20:30:56 +0000
+++ b/mysql-test/r/events_bugs.result	2010-04-08 12:10:05 +0000
@@ -729,9 +729,8 @@
 create event e1 on schedule every 1 day do select 1;
 select @@sql_mode;
 @@sql_mode
-REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,?,ONLY_FULL_GROUP_BY,NO_UNSIGNED_SUBTRACTION,NO_DIR_IN_CREATE,POSTGRESQL,ORACLE,MSSQL,DB2,MAXDB,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,MYSQL323,MYSQL40,ANSI,NO_AUTO_VALUE_ON_ZERO,NO_BACKSLASH_ESCAPES,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ALLOW_INVALID_DATES,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,HIGH_NOT_PRECEDENCE,NO_ENGINE_SUBSTITUTION,PAD_CHAR_TO_FULL_LENGTH
+REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,IGNORE_BAD_TABLE_OPTIONS,ONLY_FULL_GROUP_BY,NO_UNSIGNED_SUBTRACTION,NO_DIR_IN_CREATE,POSTGRESQL,ORACLE,MSSQL,DB2,MAXDB,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,MYSQL323,MYSQL40,ANSI,NO_AUTO_VALUE_ON_ZERO,NO_BACKSLASH_ESCAPES,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ALLOW_INVALID_DATES,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,HIGH_NOT_PRECEDENCE,NO_ENGINE_SUBSTITUTION,PAD_CHAR_TO_FULL_LENGTH
 set @@sql_mode= @old_mode;
-select replace(@full_mode, '?', 'NOT_USED') into @full_mode;
 select replace(@full_mode, 'ALLOW_INVALID_DATES', 'INVALID_DATES') into @full_mode;
 select name from mysql.event where name = 'p' and sql_mode = @full_mode;
 name

=== modified file 'mysql-test/r/grant.result'
--- a/mysql-test/r/grant.result	2010-11-24 22:57:34 +0000
+++ b/mysql-test/r/grant.result	2010-11-30 21:11:03 +0000
@@ -13,8 +13,8 @@
 GRANT SELECT ON `mysqltest`.* TO 'mysqltest_1'@'localhost'
 grant delete on mysqltest.* to mysqltest_1 at localhost;
 select * from mysql.user where user="mysqltest_1";
-Host	User	Password	Select_priv	Insert_priv	Update_priv	Delete_priv	Create_priv	Drop_priv	Reload_priv	Shutdown_priv	Process_priv	File_priv	Grant_priv	References_priv	Index_priv	Alter_priv	Show_db_priv	Super_priv	Create_tmp_table_priv	Lock_tables_priv	Execute_priv	Repl_slave_priv	Repl_client_priv	Create_view_priv	Show_view_priv	Create_routine_priv	Alter_routine_priv	Create_user_priv	Event_priv	Trigger_priv	ssl_type	ssl_cipher	x509_issuer	x509_subject	max_questions	max_updates	max_connections	max_user_connections
-localhost	mysqltest_1		N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	SPECIFIED	EDH-RSA-DES-CBC3-SHA			0	0	0	0
+Host	User	Password	Select_priv	Insert_priv	Update_priv	Delete_priv	Create_priv	Drop_priv	Reload_priv	Shutdown_priv	Process_priv	File_priv	Grant_priv	References_priv	Index_priv	Alter_priv	Show_db_priv	Super_priv	Create_tmp_table_priv	Lock_tables_priv	Execute_priv	Repl_slave_priv	Repl_client_priv	Create_view_priv	Show_view_priv	Create_routine_priv	Alter_routine_priv	Create_user_priv	Event_priv	Trigger_priv	ssl_type	ssl_cipher	x509_issuer	x509_subject	max_questions	max_updates	max_connections	max_user_connections	plugin	auth_string
+localhost	mysqltest_1		N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	SPECIFIED	EDH-RSA-DES-CBC3-SHA			0	0	0	0		
 show grants for mysqltest_1 at localhost;
 Grants for mysqltest_1 at localhost
 GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' REQUIRE CIPHER 'EDH-RSA-DES-CBC3-SHA'
@@ -44,15 +44,15 @@
 flush privileges;
 grant usage on *.* to mysqltest_1 at localhost with max_queries_per_hour 10;
 select * from mysql.user where user="mysqltest_1";
-Host	User	Password	Select_priv	Insert_priv	Update_priv	Delete_priv	Create_priv	Drop_priv	Reload_priv	Shutdown_priv	Process_priv	File_priv	Grant_priv	References_priv	Index_priv	Alter_priv	Show_db_priv	Super_priv	Create_tmp_table_priv	Lock_tables_priv	Execute_priv	Repl_slave_priv	Repl_client_priv	Create_view_priv	Show_view_priv	Create_routine_priv	Alter_routine_priv	Create_user_priv	Event_priv	Trigger_priv	ssl_type	ssl_cipher	x509_issuer	x509_subject	max_questions	max_updates	max_connections	max_user_connections
-localhost	mysqltest_1		N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					10	0	0	0
+Host	User	Password	Select_priv	Insert_priv	Update_priv	Delete_priv	Create_priv	Drop_priv	Reload_priv	Shutdown_priv	Process_priv	File_priv	Grant_priv	References_priv	Index_priv	Alter_priv	Show_db_priv	Super_priv	Create_tmp_table_priv	Lock_tables_priv	Execute_priv	Repl_slave_priv	Repl_client_priv	Create_view_priv	Show_view_priv	Create_routine_priv	Alter_routine_priv	Create_user_priv	Event_priv	Trigger_priv	ssl_type	ssl_cipher	x509_issuer	x509_subject	max_questions	max_updates	max_connections	max_user_connections	plugin	auth_string
+localhost	mysqltest_1		N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					10	0	0	0		
 show grants for mysqltest_1 at localhost;
 Grants for mysqltest_1 at localhost
 GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' WITH MAX_QUERIES_PER_HOUR 10
 grant usage on *.* to mysqltest_1 at localhost with max_updates_per_hour 20 max_connections_per_hour 30;
 select * from mysql.user where user="mysqltest_1";
-Host	User	Password	Select_priv	Insert_priv	Update_priv	Delete_priv	Create_priv	Drop_priv	Reload_priv	Shutdown_priv	Process_priv	File_priv	Grant_priv	References_priv	Index_priv	Alter_priv	Show_db_priv	Super_priv	Create_tmp_table_priv	Lock_tables_priv	Execute_priv	Repl_slave_priv	Repl_client_priv	Create_view_priv	Show_view_priv	Create_routine_priv	Alter_routine_priv	Create_user_priv	Event_priv	Trigger_priv	ssl_type	ssl_cipher	x509_issuer	x509_subject	max_questions	max_updates	max_connections	max_user_connections
-localhost	mysqltest_1		N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					10	20	30	0
+Host	User	Password	Select_priv	Insert_priv	Update_priv	Delete_priv	Create_priv	Drop_priv	Reload_priv	Shutdown_priv	Process_priv	File_priv	Grant_priv	References_priv	Index_priv	Alter_priv	Show_db_priv	Super_priv	Create_tmp_table_priv	Lock_tables_priv	Execute_priv	Repl_slave_priv	Repl_client_priv	Create_view_priv	Show_view_priv	Create_routine_priv	Alter_routine_priv	Create_user_priv	Event_priv	Trigger_priv	ssl_type	ssl_cipher	x509_issuer	x509_subject	max_questions	max_updates	max_connections	max_user_connections	plugin	auth_string
+localhost	mysqltest_1		N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					10	20	30	0		
 show grants for mysqltest_1 at localhost;
 Grants for mysqltest_1 at localhost
 GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' WITH MAX_QUERIES_PER_HOUR 10 MAX_UPDATES_PER_HOUR 20 MAX_CONNECTIONS_PER_HOUR 30
@@ -164,6 +164,7 @@
 Warning	1364	Field 'ssl_cipher' doesn't have a default value
 Warning	1364	Field 'x509_issuer' doesn't have a default value
 Warning	1364	Field 'x509_subject' doesn't have a default value
+Warning	1364	Field 'auth_string' doesn't have a default value
 insert into mysql.db (host, db, user, select_priv) values
 ('localhost', 'a%', 'test11', 'Y'), ('localhost', 'ab%', 'test11', 'Y');
 alter table mysql.db order by db asc;

=== modified file 'mysql-test/r/grant2.result'
--- a/mysql-test/r/grant2.result	2009-10-30 05:06:10 +0000
+++ b/mysql-test/r/grant2.result	2010-03-29 15:13:53 +0000
@@ -287,6 +287,7 @@
 Warning	1364	Field 'ssl_cipher' doesn't have a default value
 Warning	1364	Field 'x509_issuer' doesn't have a default value
 Warning	1364	Field 'x509_subject' doesn't have a default value
+Warning	1364	Field 'auth_string' doesn't have a default value
 create user mysqltest_A@'%';
 rename user mysqltest_B@'%' to mysqltest_C@'%';
 drop user mysqltest_C@'%';
@@ -354,6 +355,7 @@
 Warning	1364	Field 'ssl_cipher' doesn't have a default value
 Warning	1364	Field 'x509_issuer' doesn't have a default value
 Warning	1364	Field 'x509_subject' doesn't have a default value
+Warning	1364	Field 'auth_string' doesn't have a default value
 INSERT INTO mysql.db (host, db, user, select_priv) VALUES
 ('%','TESTDB','mysqltest_1','Y');
 FLUSH PRIVILEGES;

=== modified file 'mysql-test/r/information_schema.result'
--- a/mysql-test/r/information_schema.result	2010-09-03 17:42:54 +0000
+++ b/mysql-test/r/information_schema.result	2010-09-11 18:43:48 +0000
@@ -45,6 +45,7 @@
 select * from v1 ORDER BY c COLLATE utf8_bin;
 c
 CHARACTER_SETS
+CLIENT_STATISTICS
 COLLATIONS
 COLLATION_CHARACTER_SET_APPLICABILITY
 COLUMNS
@@ -54,6 +55,7 @@
 FILES
 GLOBAL_STATUS
 GLOBAL_VARIABLES
+INDEX_STATISTICS
 INNODB_BUFFER_POOL_PAGES
 INNODB_BUFFER_POOL_PAGES_BLOB
 INNODB_BUFFER_POOL_PAGES_INDEX
@@ -70,6 +72,7 @@
 INNODB_SYS_TABLES
 INNODB_TABLE_STATS
 INNODB_TRX
+KEY_CACHES
 KEY_COLUMN_USAGE
 PARTITIONS
 PLUGINS
@@ -85,8 +88,10 @@
 TABLES
 TABLE_CONSTRAINTS
 TABLE_PRIVILEGES
+TABLE_STATISTICS
 TRIGGERS
 USER_PRIVILEGES
+USER_STATISTICS
 VIEWS
 XTRADB_ADMIN_COMMAND
 XTRADB_ENHANCEMENTS
@@ -125,6 +130,7 @@
 TABLES	TABLES
 TABLE_CONSTRAINTS	TABLE_CONSTRAINTS
 TABLE_PRIVILEGES	TABLE_PRIVILEGES
+TABLE_STATISTICS	TABLE_STATISTICS
 TRIGGERS	TRIGGERS
 tables_priv	tables_priv
 time_zone	time_zone
@@ -144,6 +150,7 @@
 TABLES	TABLES
 TABLE_CONSTRAINTS	TABLE_CONSTRAINTS
 TABLE_PRIVILEGES	TABLE_PRIVILEGES
+TABLE_STATISTICS	TABLE_STATISTICS
 TRIGGERS	TRIGGERS
 tables_priv	tables_priv
 time_zone	time_zone
@@ -163,6 +170,7 @@
 TABLES	TABLES
 TABLE_CONSTRAINTS	TABLE_CONSTRAINTS
 TABLE_PRIVILEGES	TABLE_PRIVILEGES
+TABLE_STATISTICS	TABLE_STATISTICS
 TRIGGERS	TRIGGERS
 tables_priv	tables_priv
 time_zone	time_zone
@@ -611,7 +619,7 @@
 proc	definer	char(77)
 proc	created	timestamp
 proc	modified	timestamp
-proc	sql_mode	set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH')
+proc	sql_mode	set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH')
 proc	comment	char(64)
 proc	character_set_client	char(32)
 proc	collation_connection	char(32)
@@ -644,12 +652,13 @@
 where table_schema='information_schema' limit 2;
 TABLE_NAME	TABLE_TYPE	ENGINE
 CHARACTER_SETS	SYSTEM VIEW	MEMORY
-COLLATIONS	SYSTEM VIEW	MEMORY
+CLIENT_STATISTICS	SYSTEM VIEW	MEMORY
 show tables from information_schema like "T%";
 Tables_in_information_schema (T%)
 TABLES
 TABLE_CONSTRAINTS
 TABLE_PRIVILEGES
+TABLE_STATISTICS
 TRIGGERS
 create database information_schema;
 ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
@@ -659,6 +668,7 @@
 TABLES	SYSTEM VIEW
 TABLE_CONSTRAINTS	SYSTEM VIEW
 TABLE_PRIVILEGES	SYSTEM VIEW
+TABLE_STATISTICS	SYSTEM VIEW
 TRIGGERS	SYSTEM VIEW
 create table t1(a int);
 ERROR 42S02: Unknown table 't1' in information_schema
@@ -671,6 +681,7 @@
 TABLES
 TABLE_CONSTRAINTS
 TABLE_PRIVILEGES
+TABLE_STATISTICS
 TRIGGERS
 select table_name from tables where table_name='user';
 table_name
@@ -860,6 +871,7 @@
 COLUMNS	TABLE_NAME	select
 COLUMN_PRIVILEGES	TABLE_NAME	select
 FILES	TABLE_NAME	select
+INDEX_STATISTICS	TABLE_NAME	select
 INNODB_INDEX_STATS	table_name	select
 INNODB_TABLE_STATS	table_name	select
 KEY_COLUMN_USAGE	TABLE_NAME	select
@@ -869,6 +881,7 @@
 TABLES	TABLE_NAME	select
 TABLE_CONSTRAINTS	TABLE_NAME	select
 TABLE_PRIVILEGES	TABLE_NAME	select
+TABLE_STATISTICS	TABLE_NAME	select
 VIEWS	TABLE_NAME	select
 delete from mysql.user where user='mysqltest_4';
 delete from mysql.db where user='mysqltest_4';

=== modified file 'mysql-test/r/information_schema_all_engines.result'
--- a/mysql-test/r/information_schema_all_engines.result	2010-09-03 17:42:54 +0000
+++ b/mysql-test/r/information_schema_all_engines.result	2010-09-11 18:43:48 +0000
@@ -2,6 +2,7 @@
 show tables;
 Tables_in_information_schema
 CHARACTER_SETS
+CLIENT_STATISTICS
 COLLATIONS
 COLLATION_CHARACTER_SET_APPLICABILITY
 COLUMNS
@@ -11,6 +12,8 @@
 FILES
 GLOBAL_STATUS
 GLOBAL_VARIABLES
+INDEX_STATISTICS
+KEY_CACHES
 KEY_COLUMN_USAGE
 PARTITIONS
 PLUGINS
@@ -26,8 +29,10 @@
 TABLES
 TABLE_CONSTRAINTS
 TABLE_PRIVILEGES
+TABLE_STATISTICS
 TRIGGERS
 USER_PRIVILEGES
+USER_STATISTICS
 VIEWS
 INNODB_BUFFER_POOL_PAGES
 PBXT_STATISTICS
@@ -64,6 +69,7 @@
         );
 table_name	column_name
 CHARACTER_SETS	CHARACTER_SET_NAME
+CLIENT_STATISTICS	CLIENT
 COLLATIONS	COLLATION_NAME
 COLLATION_CHARACTER_SET_APPLICABILITY	COLLATION_NAME
 COLUMNS	TABLE_SCHEMA
@@ -73,6 +79,8 @@
 FILES	TABLE_SCHEMA
 GLOBAL_STATUS	VARIABLE_NAME
 GLOBAL_VARIABLES	VARIABLE_NAME
+INDEX_STATISTICS	TABLE_SCHEMA
+KEY_CACHES	KEY_CACHE_NAME
 KEY_COLUMN_USAGE	CONSTRAINT_SCHEMA
 PARTITIONS	TABLE_SCHEMA
 PLUGINS	PLUGIN_NAME
@@ -88,8 +96,10 @@
 TABLES	TABLE_SCHEMA
 TABLE_CONSTRAINTS	CONSTRAINT_SCHEMA
 TABLE_PRIVILEGES	TABLE_SCHEMA
+TABLE_STATISTICS	TABLE_SCHEMA
 TRIGGERS	TRIGGER_SCHEMA
 USER_PRIVILEGES	GRANTEE
+USER_STATISTICS	USER
 VIEWS	TABLE_SCHEMA
 INNODB_BUFFER_POOL_PAGES	page_type
 PBXT_STATISTICS	ID
@@ -126,6 +136,7 @@
         );
 table_name	column_name
 CHARACTER_SETS	CHARACTER_SET_NAME
+CLIENT_STATISTICS	CLIENT
 COLLATIONS	COLLATION_NAME
 COLLATION_CHARACTER_SET_APPLICABILITY	COLLATION_NAME
 COLUMNS	TABLE_SCHEMA
@@ -135,6 +146,8 @@
 FILES	TABLE_SCHEMA
 GLOBAL_STATUS	VARIABLE_NAME
 GLOBAL_VARIABLES	VARIABLE_NAME
+INDEX_STATISTICS	TABLE_SCHEMA
+KEY_CACHES	KEY_CACHE_NAME
 KEY_COLUMN_USAGE	CONSTRAINT_SCHEMA
 PARTITIONS	TABLE_SCHEMA
 PLUGINS	PLUGIN_NAME
@@ -150,8 +163,10 @@
 TABLES	TABLE_SCHEMA
 TABLE_CONSTRAINTS	CONSTRAINT_SCHEMA
 TABLE_PRIVILEGES	TABLE_SCHEMA
+TABLE_STATISTICS	TABLE_SCHEMA
 TRIGGERS	TRIGGER_SCHEMA
 USER_PRIVILEGES	GRANTEE
+USER_STATISTICS	USER
 VIEWS	TABLE_SCHEMA
 INNODB_BUFFER_POOL_PAGES	page_type
 PBXT_STATISTICS	ID
@@ -194,6 +209,7 @@
 group by t.table_name order by num1, t.table_name;
 table_name	group_concat(t.table_schema, '.', t.table_name)	num1
 CHARACTER_SETS	information_schema.CHARACTER_SETS	1
+CLIENT_STATISTICS	information_schema.CLIENT_STATISTICS	1
 COLLATIONS	information_schema.COLLATIONS	1
 COLLATION_CHARACTER_SET_APPLICABILITY	information_schema.COLLATION_CHARACTER_SET_APPLICABILITY	1
 COLUMNS	information_schema.COLUMNS	1
@@ -203,6 +219,7 @@
 FILES	information_schema.FILES	1
 GLOBAL_STATUS	information_schema.GLOBAL_STATUS	1
 GLOBAL_VARIABLES	information_schema.GLOBAL_VARIABLES	1
+INDEX_STATISTICS	information_schema.INDEX_STATISTICS	1
 INNODB_BUFFER_POOL_PAGES	information_schema.INNODB_BUFFER_POOL_PAGES	1
 INNODB_BUFFER_POOL_PAGES_BLOB	information_schema.INNODB_BUFFER_POOL_PAGES_BLOB	1
 INNODB_BUFFER_POOL_PAGES_INDEX	information_schema.INNODB_BUFFER_POOL_PAGES_INDEX	1
@@ -219,6 +236,7 @@
 INNODB_SYS_TABLES	information_schema.INNODB_SYS_TABLES	1
 INNODB_TABLE_STATS	information_schema.INNODB_TABLE_STATS	1
 INNODB_TRX	information_schema.INNODB_TRX	1
+KEY_CACHES	information_schema.KEY_CACHES	1
 KEY_COLUMN_USAGE	information_schema.KEY_COLUMN_USAGE	1
 PARTITIONS	information_schema.PARTITIONS	1
 PBXT_STATISTICS	information_schema.PBXT_STATISTICS	1
@@ -235,8 +253,10 @@
 TABLES	information_schema.TABLES	1
 TABLE_CONSTRAINTS	information_schema.TABLE_CONSTRAINTS	1
 TABLE_PRIVILEGES	information_schema.TABLE_PRIVILEGES	1
+TABLE_STATISTICS	information_schema.TABLE_STATISTICS	1
 TRIGGERS	information_schema.TRIGGERS	1
 USER_PRIVILEGES	information_schema.USER_PRIVILEGES	1
+USER_STATISTICS	information_schema.USER_STATISTICS	1
 VIEWS	information_schema.VIEWS	1
 XTRADB_ENHANCEMENTS	information_schema.XTRADB_ENHANCEMENTS	1
 Database: information_schema
@@ -244,6 +264,7 @@
 |                Tables                 |
 +---------------------------------------+
 | CHARACTER_SETS                        |
+| CLIENT_STATISTICS                     |
 | COLLATIONS                            |
 | COLLATION_CHARACTER_SET_APPLICABILITY |
 | COLUMNS                               |
@@ -253,6 +274,8 @@
 | FILES                                 |
 | GLOBAL_STATUS                         |
 | GLOBAL_VARIABLES                      |
+| INDEX_STATISTICS                      |
+| KEY_CACHES                            |
 | KEY_COLUMN_USAGE                      |
 | PARTITIONS                            |
 | PLUGINS                               |
@@ -268,8 +291,10 @@
 | TABLES                                |
 | TABLE_CONSTRAINTS                     |
 | TABLE_PRIVILEGES                      |
+| TABLE_STATISTICS                      |
 | TRIGGERS                              |
 | USER_PRIVILEGES                       |
+| USER_STATISTICS                       |
 | VIEWS                                 |
 | INNODB_BUFFER_POOL_PAGES              |
 | PBXT_STATISTICS                       |
@@ -296,6 +321,7 @@
 |                Tables                 |
 +---------------------------------------+
 | CHARACTER_SETS                        |
+| CLIENT_STATISTICS                     |
 | COLLATIONS                            |
 | COLLATION_CHARACTER_SET_APPLICABILITY |
 | COLUMNS                               |
@@ -305,6 +331,8 @@
 | FILES                                 |
 | GLOBAL_STATUS                         |
 | GLOBAL_VARIABLES                      |
+| INDEX_STATISTICS                      |
+| KEY_CACHES                            |
 | KEY_COLUMN_USAGE                      |
 | PARTITIONS                            |
 | PLUGINS                               |
@@ -320,8 +348,10 @@
 | TABLES                                |
 | TABLE_CONSTRAINTS                     |
 | TABLE_PRIVILEGES                      |
+| TABLE_STATISTICS                      |
 | TRIGGERS                              |
 | USER_PRIVILEGES                       |
+| USER_STATISTICS                       |
 | VIEWS                                 |
 | INNODB_BUFFER_POOL_PAGES              |
 | PBXT_STATISTICS                       |
@@ -351,5 +381,5 @@
 +--------------------+
 SELECT table_schema, count(*) FROM information_schema.TABLES WHERE table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test', 'mysqltest') AND table_name<>'ndb_binlog_index' AND table_name<>'ndb_apply_status' GROUP BY TABLE_SCHEMA;
 table_schema	count(*)
-information_schema	47
+information_schema	52
 mysql	22

=== modified file 'mysql-test/r/information_schema_db.result'
--- a/mysql-test/r/information_schema_db.result	2009-12-03 11:19:05 +0000
+++ b/mysql-test/r/information_schema_db.result	2010-01-04 17:54:42 +0000
@@ -7,6 +7,7 @@
 TABLES
 TABLE_CONSTRAINTS
 TABLE_PRIVILEGES
+TABLE_STATISTICS
 TRIGGERS
 create database `inf%`;
 create database mbase;

=== modified file 'mysql-test/r/key_cache.result'
--- a/mysql-test/r/key_cache.result	2009-03-16 19:54:50 +0000
+++ b/mysql-test/r/key_cache.result	2010-10-29 21:18:02 +0000
@@ -1,5 +1,7 @@
 drop table if exists t1, t2, t3;
-SET @save_key_buffer=@@key_buffer_size;
+SET @save_key_buffer_size=@@key_buffer_size;
+SET @save_key_cache_block_size=@@key_cache_block_size;
+SET @save_key_cache_segments=@@key_cache_segments;
 SELECT @@key_buffer_size, @@small.key_buffer_size;
 @@key_buffer_size	@@small.key_buffer_size
 2097152	131072
@@ -37,7 +39,7 @@
 SELECT @@medium.key_buffer_size;
 @@medium.key_buffer_size
 0
-SET @@global.key_buffer_size=@save_key_buffer;
+SET @@global.key_buffer_size=@save_key_buffer_size;
 SELECT @@default.key_buffer_size;
 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'default.key_buffer_size' at line 1
 SELECT @@skr.storage_engine="test";
@@ -366,3 +368,435 @@
 key_cache_block_size	1536
 SET GLOBAL key_cache_block_size= @bug28478_key_cache_block_size;
 DROP TABLE t1;
+set global key_buffer_size=@save_key_buffer_size;
+set global key_cache_block_size=@save_key_cache_block_size;
+select @@key_buffer_size;
+@@key_buffer_size
+2097152
+select @@key_cache_block_size;
+@@key_cache_block_size
+1024
+select @@key_cache_segments;
+@@key_cache_segments
+0
+create table t1 (
+p int not null auto_increment primary key,
+a char(10));
+create table t2 (
+p int  not null auto_increment primary key,
+i int, a char(10), key k1(i), key k2(a));
+select @@key_cache_segments;
+@@key_cache_segments
+0
+select * from information_schema.key_caches where segment_number is null;
+KEY_CACHE_NAME	SEGMENTS	SEGMENT_NUMBER	FULL_SIZE	BLOCK_SIZE	USED_BLOCKS	UNUSED_BLOCKS	DIRTY_BLOCKS	READ_REQUESTS	READS	WRITE_REQUESTS	WRITES
+default	NULL	NULL	2097152	1024	0	#	0	0	0	0	0
+small	NULL	NULL	1048576	1024	1	#	0	1	0	2	1
+insert into t1 values (1, 'qqqq'), (2, 'yyyy');
+insert into t2 values (1, 1, 'qqqq'), (2, 1, 'pppp'),
+(3, 1, 'yyyy'), (4, 3, 'zzzz');
+select * from t1;
+p	a
+1	qqqq
+2	yyyy
+select * from t2;
+p	i	a
+1	1	qqqq
+2	1	pppp
+3	1	yyyy
+4	3	zzzz
+update t1 set p=3 where p=1;
+update t2 set i=2 where i=1;
+show status like 'key_%';
+Variable_name	Value
+Key_blocks_not_flushed	0
+Key_blocks_unused	KEY_BLOCKS_UNUSED
+Key_blocks_used	4
+Key_blocks_warm	0
+Key_read_requests	22
+Key_reads	0
+Key_write_requests	26
+Key_writes	6
+select * from information_schema.key_caches where segment_number is null;
+KEY_CACHE_NAME	SEGMENTS	SEGMENT_NUMBER	FULL_SIZE	BLOCK_SIZE	USED_BLOCKS	UNUSED_BLOCKS	DIRTY_BLOCKS	READ_REQUESTS	READS	WRITE_REQUESTS	WRITES
+default	NULL	NULL	2097152	1024	4	#	0	22	0	26	6
+small	NULL	NULL	1048576	1024	1	#	0	1	0	2	1
+delete from t2 where a='zzzz';
+select * from information_schema.key_caches where segment_number is null;
+KEY_CACHE_NAME	SEGMENTS	SEGMENT_NUMBER	FULL_SIZE	BLOCK_SIZE	USED_BLOCKS	UNUSED_BLOCKS	DIRTY_BLOCKS	READ_REQUESTS	READS	WRITE_REQUESTS	WRITES
+default	NULL	NULL	2097152	1024	4	#	0	29	0	32	9
+small	NULL	NULL	1048576	1024	1	#	0	1	0	2	1
+delete from t1;
+delete from t2;
+select * from information_schema.key_caches where segment_number is null;
+KEY_CACHE_NAME	SEGMENTS	SEGMENT_NUMBER	FULL_SIZE	BLOCK_SIZE	USED_BLOCKS	UNUSED_BLOCKS	DIRTY_BLOCKS	READ_REQUESTS	READS	WRITE_REQUESTS	WRITES
+default	NULL	NULL	2097152	1024	4	#	0	29	0	32	9
+small	NULL	NULL	1048576	1024	1	#	0	1	0	2	1
+set global key_cache_segments=2;
+select @@key_cache_segments;
+@@key_cache_segments
+2
+select * from information_schema.key_caches where segment_number is null;
+KEY_CACHE_NAME	SEGMENTS	SEGMENT_NUMBER	FULL_SIZE	BLOCK_SIZE	USED_BLOCKS	UNUSED_BLOCKS	DIRTY_BLOCKS	READ_REQUESTS	READS	WRITE_REQUESTS	WRITES
+default	2	NULL	2097152	1024	0	#	0	0	0	0	0
+small	NULL	NULL	1048576	1024	1	#	0	1	0	2	1
+insert into t1 values (1, 'qqqq'), (2, 'yyyy');
+insert into t2 values (1, 1, 'qqqq'), (2, 1, 'pppp'),
+(3, 1, 'yyyy'), (4, 3, 'zzzz');
+select * from t1;
+p	a
+1	qqqq
+2	yyyy
+select * from t2;
+p	i	a
+1	1	qqqq
+2	1	pppp
+3	1	yyyy
+4	3	zzzz
+update t1 set p=3 where p=1;
+update t2 set i=2 where i=1;
+show status like 'key_%';
+Variable_name	Value
+Key_blocks_not_flushed	0
+Key_blocks_unused	KEY_BLOCKS_UNUSED
+Key_blocks_used	4
+Key_blocks_warm	0
+Key_read_requests	22
+Key_reads	0
+Key_write_requests	26
+Key_writes	6
+select * from information_schema.key_caches where segment_number is null;
+KEY_CACHE_NAME	SEGMENTS	SEGMENT_NUMBER	FULL_SIZE	BLOCK_SIZE	USED_BLOCKS	UNUSED_BLOCKS	DIRTY_BLOCKS	READ_REQUESTS	READS	WRITE_REQUESTS	WRITES
+default	2	NULL	2097152	1024	4	#	0	22	0	26	6
+small	NULL	NULL	1048576	1024	1	#	0	1	0	2	1
+delete from t1;
+delete from t2;
+select * from information_schema.key_caches where segment_number is null;
+KEY_CACHE_NAME	SEGMENTS	SEGMENT_NUMBER	FULL_SIZE	BLOCK_SIZE	USED_BLOCKS	UNUSED_BLOCKS	DIRTY_BLOCKS	READ_REQUESTS	READS	WRITE_REQUESTS	WRITES
+default	2	NULL	2097152	1024	4	#	0	22	0	26	6
+small	NULL	NULL	1048576	1024	1	#	0	1	0	2	1
+set global key_cache_segments=1;
+select @@key_cache_segments;
+@@key_cache_segments
+1
+select * from information_schema.key_caches where segment_number is null;
+KEY_CACHE_NAME	SEGMENTS	SEGMENT_NUMBER	FULL_SIZE	BLOCK_SIZE	USED_BLOCKS	UNUSED_BLOCKS	DIRTY_BLOCKS	READ_REQUESTS	READS	WRITE_REQUESTS	WRITES
+default	1	NULL	2097152	1024	0	#	0	0	0	0	0
+small	NULL	NULL	1048576	1024	1	#	0	1	0	2	1
+insert into t1 values (1, 'qqqq'), (2, 'yyyy');
+insert into t2 values (1, 1, 'qqqq'), (2, 1, 'pppp'),
+(3, 1, 'yyyy'), (4, 3, 'zzzz');
+select * from t1;
+p	a
+1	qqqq
+2	yyyy
+select * from t2;
+p	i	a
+1	1	qqqq
+2	1	pppp
+3	1	yyyy
+4	3	zzzz
+update t1 set p=3 where p=1;
+update t2 set i=2 where i=1;
+show status like 'key_%';
+Variable_name	Value
+Key_blocks_not_flushed	0
+Key_blocks_unused	KEY_BLOCKS_UNUSED
+Key_blocks_used	4
+Key_blocks_warm	0
+Key_read_requests	22
+Key_reads	0
+Key_write_requests	26
+Key_writes	6
+select * from information_schema.key_caches where segment_number is null;
+KEY_CACHE_NAME	SEGMENTS	SEGMENT_NUMBER	FULL_SIZE	BLOCK_SIZE	USED_BLOCKS	UNUSED_BLOCKS	DIRTY_BLOCKS	READ_REQUESTS	READS	WRITE_REQUESTS	WRITES
+default	1	NULL	2097152	1024	4	#	0	22	0	26	6
+small	NULL	NULL	1048576	1024	1	#	0	1	0	2	1
+delete from t1;
+delete from t2;
+select * from information_schema.key_caches where segment_number is null;
+KEY_CACHE_NAME	SEGMENTS	SEGMENT_NUMBER	FULL_SIZE	BLOCK_SIZE	USED_BLOCKS	UNUSED_BLOCKS	DIRTY_BLOCKS	READ_REQUESTS	READS	WRITE_REQUESTS	WRITES
+default	1	NULL	2097152	1024	4	#	0	22	0	26	6
+small	NULL	NULL	1048576	1024	1	#	0	1	0	2	1
+flush tables;
+flush status;
+select * from information_schema.key_caches where segment_number is null;
+KEY_CACHE_NAME	SEGMENTS	SEGMENT_NUMBER	FULL_SIZE	BLOCK_SIZE	USED_BLOCKS	UNUSED_BLOCKS	DIRTY_BLOCKS	READ_REQUESTS	READS	WRITE_REQUESTS	WRITES
+default	1	NULL	2097152	1024	4	#	0	0	0	0	0
+small	NULL	NULL	1048576	1024	1	#	0	0	0	0	0
+set global key_buffer_size=32*1024;
+select @@key_buffer_size;
+@@key_buffer_size
+32768
+set global key_cache_segments=2;
+select @@key_cache_segments;
+@@key_cache_segments
+2
+select * from information_schema.key_caches where segment_number is null;
+KEY_CACHE_NAME	SEGMENTS	SEGMENT_NUMBER	FULL_SIZE	BLOCK_SIZE	USED_BLOCKS	UNUSED_BLOCKS	DIRTY_BLOCKS	READ_REQUESTS	READS	WRITE_REQUESTS	WRITES
+default	2	NULL	32768	1024	0	#	0	0	0	0	0
+small	NULL	NULL	1048576	1024	1	#	0	0	0	0	0
+insert into t1 values (1, 'qqqq'), (2, 'yyyy');
+insert into t2 values (1, 1, 'qqqq'), (2, 1, 'pppp'),
+(3, 1, 'yyyy'), (4, 3, 'zzzz');
+select * from t1;
+p	a
+1	qqqq
+2	yyyy
+select * from t2;
+p	i	a
+1	1	qqqq
+2	1	pppp
+3	1	yyyy
+4	3	zzzz
+update t1 set p=3 where p=1;
+update t2 set i=2 where i=1;
+select * from information_schema.key_caches where segment_number is null;
+KEY_CACHE_NAME	SEGMENTS	SEGMENT_NUMBER	FULL_SIZE	BLOCK_SIZE	USED_BLOCKS	UNUSED_BLOCKS	DIRTY_BLOCKS	READ_REQUESTS	READS	WRITE_REQUESTS	WRITES
+default	2	NULL	32768	1024	4	#	0	22	0	26	6
+small	NULL	NULL	1048576	1024	1	#	0	0	0	0	0
+insert into t1(a) select a from t1;
+insert into t1(a) select a from t1;
+insert into t1(a) select a from t1;
+insert into t1(a) select a from t1;
+insert into t1(a) select a from t1;
+insert into t1(a) select a from t1;
+insert into t1(a) select a from t1;
+insert into t1(a) select a from t1;
+insert into t2(i,a) select i,a from t2;
+insert into t2(i,a) select i,a from t2;
+insert into t2(i,a) select i,a from t2;
+insert into t2(i,a) select i,a from t2;
+insert into t2(i,a) select i,a from t2;
+insert into t2(i,a) select i,a from t2;
+insert into t2(i,a) select i,a from t2;
+insert into t2(i,a) select i,a from t2;
+select * from information_schema.key_caches where segment_number is null;
+KEY_CACHE_NAME	SEGMENTS	SEGMENT_NUMBER	FULL_SIZE	BLOCK_SIZE	USED_BLOCKS	UNUSED_BLOCKS	DIRTY_BLOCKS	READ_REQUESTS	READS	WRITE_REQUESTS	WRITES
+default	2	NULL	32768	1024	#	#	0	6733	#	3684	103
+small	NULL	NULL	1048576	1024	#	#	0	0	#	0	0
+select * from t1 where p between 1010 and 1020 ;
+p	a
+select * from t2 where p between 1010 and 1020 ;
+p	i	a
+1010	2	pppp
+1011	2	yyyy
+1012	3	zzzz
+1013	2	qqqq
+1014	2	pppp
+1015	2	yyyy
+1016	3	zzzz
+1017	2	qqqq
+1018	2	pppp
+1019	2	yyyy
+1020	3	zzzz
+select * from information_schema.key_caches where segment_number is null;
+KEY_CACHE_NAME	SEGMENTS	SEGMENT_NUMBER	FULL_SIZE	BLOCK_SIZE	USED_BLOCKS	UNUSED_BLOCKS	DIRTY_BLOCKS	READ_REQUESTS	READS	WRITE_REQUESTS	WRITES
+default	2	NULL	32768	1024	#	#	0	6750	#	3684	103
+small	NULL	NULL	1048576	1024	#	#	0	0	#	0	0
+flush tables;
+flush status;
+update t1 set a='zzzz' where a='qqqq';
+update t2 set i=1 where i=2;
+select * from information_schema.key_caches where segment_number is null;
+KEY_CACHE_NAME	SEGMENTS	SEGMENT_NUMBER	FULL_SIZE	BLOCK_SIZE	USED_BLOCKS	UNUSED_BLOCKS	DIRTY_BLOCKS	READ_REQUESTS	READS	WRITE_REQUESTS	WRITES
+default	2	NULL	32768	1024	#	#	0	3076	18	1552	18
+small	NULL	NULL	1048576	1024	#	#	0	0	0	0	0
+set global keycache1.key_buffer_size=256*1024;
+select @@keycache1.key_buffer_size;
+@@keycache1.key_buffer_size
+262144
+set global keycache1.key_cache_segments=7;
+select @@keycache1.key_cache_segments;
+@@keycache1.key_cache_segments
+7
+select * from information_schema.key_caches where segment_number is null;
+KEY_CACHE_NAME	SEGMENTS	SEGMENT_NUMBER	FULL_SIZE	BLOCK_SIZE	USED_BLOCKS	UNUSED_BLOCKS	DIRTY_BLOCKS	READ_REQUESTS	READS	WRITE_REQUESTS	WRITES
+default	2	NULL	32768	1024	#	#	0	3076	18	1552	18
+small	NULL	NULL	1048576	1024	#	#	0	0	0	0	0
+keycache1	7	NULL	262143	2048	#	#	0	0	0	0	0
+select * from information_schema.key_caches where key_cache_name like "key%"
+                                                  and segment_number is null;
+KEY_CACHE_NAME	SEGMENTS	SEGMENT_NUMBER	FULL_SIZE	BLOCK_SIZE	USED_BLOCKS	UNUSED_BLOCKS	DIRTY_BLOCKS	READ_REQUESTS	READS	WRITE_REQUESTS	WRITES
+keycache1	7	NULL	262143	2048	0	#	0	0	0	0	0
+cache index t1 key (`primary`) in keycache1;
+Table	Op	Msg_type	Msg_text
+test.t1	assign_to_keycache	status	OK
+explain select p from t1 where p between 1010 and 1020;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	range	PRIMARY	PRIMARY	4	NULL	1	Using where; Using index
+select p from t1 where p between 1010 and 1020;
+p
+explain select i from t2 where p between 1010 and 1020;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t2	range	PRIMARY	PRIMARY	4	NULL	28	Using where
+select i from t2 where p between 1010 and 1020;
+i
+1
+1
+3
+1
+1
+1
+3
+1
+1
+1
+3
+explain select count(*) from t1, t2 where t1.p = t2.i;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t2	index	k1	k1	5	NULL	1024	Using index
+1	SIMPLE	t1	eq_ref	PRIMARY	PRIMARY	4	test.t2.i	1	Using index
+select count(*) from t1, t2 where t1.p = t2.i;
+count(*)
+256
+select * from information_schema.key_caches where segment_number is null;
+KEY_CACHE_NAME	SEGMENTS	SEGMENT_NUMBER	FULL_SIZE	BLOCK_SIZE	USED_BLOCKS	UNUSED_BLOCKS	DIRTY_BLOCKS	READ_REQUESTS	READS	WRITE_REQUESTS	WRITES
+default	2	NULL	32768	1024	#	#	0	3172	24	1552	18
+small	NULL	NULL	1048576	1024	#	#	0	0	0	0	0
+keycache1	7	NULL	262143	2048	#	#	0	14	3	0	0
+select * from information_schema.key_caches where key_cache_name like "key%"
+                                                  and segment_number is null;
+KEY_CACHE_NAME	SEGMENTS	SEGMENT_NUMBER	FULL_SIZE	BLOCK_SIZE	USED_BLOCKS	UNUSED_BLOCKS	DIRTY_BLOCKS	READ_REQUESTS	READS	WRITE_REQUESTS	WRITES
+keycache1	7	NULL	262143	2048	3	#	0	14	3	0	0
+cache index t2 in keycache1;
+Table	Op	Msg_type	Msg_text
+test.t2	assign_to_keycache	status	OK
+update t2 set p=p+3000, i=2 where a='qqqq';
+select * from information_schema.key_caches where key_cache_name like "key%"
+                                                  and segment_number is null;
+KEY_CACHE_NAME	SEGMENTS	SEGMENT_NUMBER	FULL_SIZE	BLOCK_SIZE	USED_BLOCKS	UNUSED_BLOCKS	DIRTY_BLOCKS	READ_REQUESTS	READS	WRITE_REQUESTS	WRITES
+keycache1	7	NULL	262143	2048	25	#	0	2082	25	1071	19
+set global keycache2.key_buffer_size=1024*1024;
+cache index t2 in keycache2;
+Table	Op	Msg_type	Msg_text
+test.t2	assign_to_keycache	status	OK
+insert into t2 values (2000, 3, 'yyyy');
+select * from information_schema.key_caches where key_cache_name like "keycache2"
+                                                  and segment_number is null;
+KEY_CACHE_NAME	SEGMENTS	SEGMENT_NUMBER	FULL_SIZE	BLOCK_SIZE	USED_BLOCKS	UNUSED_BLOCKS	DIRTY_BLOCKS	READ_REQUESTS	READS	WRITE_REQUESTS	WRITES
+keycache2	NULL	NULL	1048576	1024	6	#	0	6	6	3	3
+select * from information_schema.key_caches where key_cache_name like "key%" 
+and segment_number is null;
+KEY_CACHE_NAME	SEGMENTS	SEGMENT_NUMBER	FULL_SIZE	BLOCK_SIZE	USED_BLOCKS	UNUSED_BLOCKS	DIRTY_BLOCKS	READ_REQUESTS	READS	WRITE_REQUESTS	WRITES
+keycache1	7	NULL	262143	2048	25	#	0	2082	25	1071	19
+keycache2	NULL	NULL	1048576	1024	6	#	0	6	6	3	3
+cache index t2 in keycache1;
+Table	Op	Msg_type	Msg_text
+test.t2	assign_to_keycache	status	OK
+update t2 set p=p+5000 where a='zzzz';
+select * from t2 where p between 1010 and 1020;
+p	i	a
+1010	1	pppp
+1011	1	yyyy
+1014	1	pppp
+1015	1	yyyy
+1018	1	pppp
+1019	1	yyyy
+explain select p from t2  where p between 1010 and 1020;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t2	range	PRIMARY	PRIMARY	4	NULL	7	Using where; Using index
+select p from t2 where p between 1010 and 1020;
+p
+1010
+1011
+1014
+1015
+1018
+1019
+explain select i from t2 where a='yyyy' and i=3;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t2	ref	k1,k2	k1	5	const	188	Using where
+select i from t2 where a='yyyy' and i=3;
+i
+3
+explain select a from t2 where a='yyyy' and i=3;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t2	ref	k1,k2	k1	5	const	188	Using where
+select a from t2 where a='yyyy' and i=3 ;
+a
+yyyy
+select * from information_schema.key_caches where segment_number is null;
+KEY_CACHE_NAME	SEGMENTS	SEGMENT_NUMBER	FULL_SIZE	BLOCK_SIZE	USED_BLOCKS	UNUSED_BLOCKS	DIRTY_BLOCKS	READ_REQUESTS	READS	WRITE_REQUESTS	WRITES
+default	2	NULL	32768	1024	#	#	0	3172	24	1552	18
+small	NULL	NULL	1048576	1024	#	#	0	0	0	0	0
+keycache1	7	NULL	262143	2048	#	#	0	3201	43	1594	30
+keycache2	NULL	NULL	1048576	1024	#	#	0	6	6	3	3
+set global keycache1.key_cache_block_size=2*1024;
+insert into t2 values (7000, 3, 'yyyy');
+select * from information_schema.key_caches where segment_number is null;
+KEY_CACHE_NAME	SEGMENTS	SEGMENT_NUMBER	FULL_SIZE	BLOCK_SIZE	USED_BLOCKS	UNUSED_BLOCKS	DIRTY_BLOCKS	READ_REQUESTS	READS	WRITE_REQUESTS	WRITES
+default	2	NULL	32768	1024	#	#	0	3172	24	1552	18
+small	NULL	NULL	1048576	1024	#	#	0	0	0	0	0
+keycache1	7	NULL	262143	2048	#	#	0	6	6	3	3
+keycache2	NULL	NULL	1048576	1024	#	#	0	6	6	3	3
+set global keycache1.key_cache_block_size=8*1024;
+select * from information_schema.key_caches where segment_number is null;
+KEY_CACHE_NAME	SEGMENTS	SEGMENT_NUMBER	FULL_SIZE	BLOCK_SIZE	USED_BLOCKS	UNUSED_BLOCKS	DIRTY_BLOCKS	READ_REQUESTS	READS	WRITE_REQUESTS	WRITES
+default	2	NULL	32768	1024	#	#	0	3172	24	1552	18
+small	NULL	NULL	1048576	1024	#	#	0	0	0	0	0
+keycache1	3	NULL	262143	8192	#	#	0	0	0	0	0
+keycache2	NULL	NULL	1048576	1024	#	#	0	6	6	3	3
+insert into t2 values (8000, 3, 'yyyy');
+select * from information_schema.key_caches where segment_number is null;
+KEY_CACHE_NAME	SEGMENTS	SEGMENT_NUMBER	FULL_SIZE	BLOCK_SIZE	USED_BLOCKS	UNUSED_BLOCKS	DIRTY_BLOCKS	READ_REQUESTS	READS	WRITE_REQUESTS	WRITES
+default	2	NULL	32768	1024	#	#	0	3172	24	1552	18
+small	NULL	NULL	1048576	1024	#	#	0	0	0	0	0
+keycache1	3	NULL	262143	8192	#	#	0	6	5	3	3
+keycache2	NULL	NULL	1048576	1024	#	#	0	6	6	3	3
+set global keycache1.key_buffer_size=64*1024;
+select * from information_schema.key_caches where segment_number is null;
+KEY_CACHE_NAME	SEGMENTS	SEGMENT_NUMBER	FULL_SIZE	BLOCK_SIZE	USED_BLOCKS	UNUSED_BLOCKS	DIRTY_BLOCKS	READ_REQUESTS	READS	WRITE_REQUESTS	WRITES
+default	2	NULL	32768	1024	#	#	0	3172	24	1552	18
+small	NULL	NULL	1048576	1024	#	#	0	0	0	0	0
+keycache2	NULL	NULL	1048576	1024	#	#	0	6	6	3	3
+set global keycache1.key_cache_block_size=2*1024;
+select * from information_schema.key_caches where segment_number is null;
+KEY_CACHE_NAME	SEGMENTS	SEGMENT_NUMBER	FULL_SIZE	BLOCK_SIZE	USED_BLOCKS	UNUSED_BLOCKS	DIRTY_BLOCKS	READ_REQUESTS	READS	WRITE_REQUESTS	WRITES
+default	2	NULL	32768	1024	#	#	0	3172	24	1552	18
+small	NULL	NULL	1048576	1024	#	#	0	0	0	0	0
+keycache1	3	NULL	65535	2048	#	#	0	0	0	0	0
+keycache2	NULL	NULL	1048576	1024	#	#	0	6	6	3	3
+set global keycache1.key_cache_block_size=8*1024;
+select * from information_schema.key_caches where segment_number is null;
+KEY_CACHE_NAME	SEGMENTS	SEGMENT_NUMBER	FULL_SIZE	BLOCK_SIZE	USED_BLOCKS	UNUSED_BLOCKS	DIRTY_BLOCKS	READ_REQUESTS	READS	WRITE_REQUESTS	WRITES
+default	2	NULL	32768	1024	#	#	0	3172	24	1552	18
+small	NULL	NULL	1048576	1024	#	#	0	0	0	0	0
+keycache2	NULL	NULL	1048576	1024	#	#	0	6	6	3	3
+set global keycache1.key_buffer_size=0;
+select * from information_schema.key_caches where segment_number is null;
+KEY_CACHE_NAME	SEGMENTS	SEGMENT_NUMBER	FULL_SIZE	BLOCK_SIZE	USED_BLOCKS	UNUSED_BLOCKS	DIRTY_BLOCKS	READ_REQUESTS	READS	WRITE_REQUESTS	WRITES
+default	2	NULL	32768	1024	#	#	0	3172	24	1552	18
+small	NULL	NULL	1048576	1024	#	#	0	0	0	0	0
+keycache2	NULL	NULL	1048576	1024	#	#	0	6	6	3	3
+set global keycache1.key_cache_block_size=8*1024;
+select * from information_schema.key_caches where segment_number is null;
+KEY_CACHE_NAME	SEGMENTS	SEGMENT_NUMBER	FULL_SIZE	BLOCK_SIZE	USED_BLOCKS	UNUSED_BLOCKS	DIRTY_BLOCKS	READ_REQUESTS	READS	WRITE_REQUESTS	WRITES
+default	2	NULL	32768	1024	#	#	0	3172	24	1552	18
+small	NULL	NULL	1048576	1024	#	#	0	0	0	0	0
+keycache2	NULL	NULL	1048576	1024	#	#	0	6	6	3	3
+set global keycache1.key_buffer_size=0;
+select * from information_schema.key_caches where segment_number is null;
+KEY_CACHE_NAME	SEGMENTS	SEGMENT_NUMBER	FULL_SIZE	BLOCK_SIZE	USED_BLOCKS	UNUSED_BLOCKS	DIRTY_BLOCKS	READ_REQUESTS	READS	WRITE_REQUESTS	WRITES
+default	2	NULL	32768	1024	#	#	0	3172	24	1552	18
+small	NULL	NULL	1048576	1024	#	#	0	0	0	0	0
+keycache2	NULL	NULL	1048576	1024	#	#	0	6	6	3	3
+set global keycache1.key_buffer_size=128*1024;
+select * from information_schema.key_caches where segment_number is null;
+KEY_CACHE_NAME	SEGMENTS	SEGMENT_NUMBER	FULL_SIZE	BLOCK_SIZE	USED_BLOCKS	UNUSED_BLOCKS	DIRTY_BLOCKS	READ_REQUESTS	READS	WRITE_REQUESTS	WRITES
+default	2	NULL	32768	1024	#	#	0	3172	24	1552	18
+small	NULL	NULL	1048576	1024	#	#	0	0	0	0	0
+keycache1	1	NULL	131072	8192	#	#	0	0	0	0	0
+keycache2	NULL	NULL	1048576	1024	#	#	0	6	6	3	3
+set global keycache1.key_cache_block_size=1024;
+select * from information_schema.key_caches where segment_number is null;
+KEY_CACHE_NAME	SEGMENTS	SEGMENT_NUMBER	FULL_SIZE	BLOCK_SIZE	USED_BLOCKS	UNUSED_BLOCKS	DIRTY_BLOCKS	READ_REQUESTS	READS	WRITE_REQUESTS	WRITES
+default	2	NULL	32768	1024	#	#	0	3172	24	1552	18
+small	NULL	NULL	1048576	1024	#	#	0	0	0	0	0
+keycache1	7	NULL	131068	1024	#	#	0	0	0	0	0
+keycache2	NULL	NULL	1048576	1024	#	#	0	6	6	3	3
+drop table t1,t2;
+set global keycache1.key_buffer_size=0;
+set global keycache2.key_buffer_size=0;
+set global key_buffer_size=@save_key_buffer_size;
+set global key_cache_segments=@save_key_cache_segments;

=== modified file 'mysql-test/r/log_slow.result'
--- a/mysql-test/r/log_slow.result	2009-09-03 14:05:38 +0000
+++ b/mysql-test/r/log_slow.result	2009-10-19 17:14:48 +0000
@@ -56,5 +56,6 @@
 insert_id	int(11)	NO		NULL	
 server_id	int(10) unsigned	NO		NULL	
 sql_text	mediumtext	NO		NULL	
+flush slow query logs;
 set @@log_slow_filter=default;
 set @@log_slow_verbosity=default;

=== modified file 'mysql-test/r/log_tables.result'
--- a/mysql-test/r/log_tables.result	2009-03-11 20:30:56 +0000
+++ b/mysql-test/r/log_tables.result	2010-12-31 09:39:14 +0000
@@ -248,13 +248,13 @@
 set @save_storage_engine= @@session.storage_engine;
 set storage_engine= MEMORY;
 alter table mysql.slow_log engine=ndb;
-ERROR HY000: This storage engine cannot be used for log tables"
+ERROR HY000: This storage engine cannot be used for log tables
 alter table mysql.slow_log engine=innodb;
-ERROR HY000: This storage engine cannot be used for log tables"
+ERROR HY000: This storage engine cannot be used for log tables
 alter table mysql.slow_log engine=archive;
-ERROR HY000: This storage engine cannot be used for log tables"
+ERROR HY000: This storage engine cannot be used for log tables
 alter table mysql.slow_log engine=blackhole;
-ERROR HY000: This storage engine cannot be used for log tables"
+ERROR HY000: This storage engine cannot be used for log tables
 set storage_engine= @save_storage_engine;
 drop table mysql.slow_log;
 drop table mysql.general_log;

=== added file 'mysql-test/r/mysqlbinlog-innodb.result'
--- a/mysql-test/r/mysqlbinlog-innodb.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/r/mysqlbinlog-innodb.result	2011-01-13 12:28:36 +0000
@@ -0,0 +1,85 @@
+SET TIMESTAMP=1000000000;
+CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=innodb;
+CREATE DATABASE test2;
+RESET MASTER;
+USE test2;
+BEGIN;
+USE test;
+INSERT INTO t1 VALUES (1);
+USE test2;
+COMMIT;
+BEGIN;
+USE test;
+INSERT INTO t1 VALUES (2);
+USE test2;
+COMMIT;
+USE test;
+SELECT * FROM t1 ORDER BY a;
+a
+1
+2
+FLUSH LOGS;
+/*!40019 SET @@session.max_insert_delayed_threads=0*/;
+/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+SET @@session.pseudo_thread_id=999999999/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.lc_time_names=0/*!*/;
+SET @@session.collation_database=DEFAULT/*!*/;
+BEGIN
+/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+INSERT INTO t1 VALUES (1)
+/*!*/;
+COMMIT/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+BEGIN
+/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+INSERT INTO t1 VALUES (2)
+/*!*/;
+COMMIT/*!*/;
+DELIMITER ;
+# End of log file
+ROLLBACK /* added by mysqlbinlog */;
+/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
+/*!40019 SET @@session.max_insert_delayed_threads=0*/;
+/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+SET @@session.pseudo_thread_id=999999999/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.lc_time_names=0/*!*/;
+SET @@session.collation_database=DEFAULT/*!*/;
+BEGIN
+/*!*/;
+use foo/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+INSERT INTO t1 VALUES (1)
+/*!*/;
+COMMIT/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+BEGIN
+/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+INSERT INTO t1 VALUES (2)
+/*!*/;
+COMMIT/*!*/;
+DELIMITER ;
+# End of log file
+ROLLBACK /* added by mysqlbinlog */;
+/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
+DROP DATABASE test2;
+DROP TABLE t1;

=== added file 'mysql-test/r/partition_example.result'
--- a/mysql-test/r/partition_example.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/r/partition_example.result	2010-05-11 14:49:23 +0000
@@ -0,0 +1,31 @@
+install plugin example soname 'ha_example.so';
+create table t1 (a int not null)
+engine=example
+partition by list (a)
+(partition p0 values in (1), partition p1 values in (2));
+show create table t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) NOT NULL
+) ENGINE=EXAMPLE DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (1) ENGINE = EXAMPLE,
+ PARTITION p1 VALUES IN (2) ENGINE = EXAMPLE) */
+drop table t1;
+create table t1 (a int not null)
+engine=example ull=12340
+partition by list (a)
+(partition p0 values in (1), partition p1 values in (2));
+show create table t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) NOT NULL
+) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `ull`=12340
+/*!50100 PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (1) ENGINE = EXAMPLE,
+ PARTITION p1 VALUES IN (2) ENGINE = EXAMPLE) */
+drop table t1;
+select 1;
+1
+1
+uninstall plugin example;

=== modified file 'mysql-test/r/plugin.result'
--- a/mysql-test/r/plugin.result	2008-02-24 13:12:17 +0000
+++ b/mysql-test/r/plugin.result	2010-12-31 09:39:14 +0000
@@ -12,6 +12,15 @@
 SELECT * FROM t1;
 a
 DROP TABLE t1;
+set global example_ulong_var=500;
+set global example_enum_var= e1;
+show status like 'example%';
+Variable_name	Value
+example_func_example	enum_var is 0, ulong_var is 500, really
+show variables like 'example%';
+Variable_name	Value
+example_enum_var	e1
+example_ulong_var	500
 UNINSTALL PLUGIN example;
 UNINSTALL PLUGIN EXAMPLE;
 ERROR 42000: PLUGIN EXAMPLE does not exist
@@ -53,4 +62,67 @@
 set session sql_mode=@old_sql_mode;
 set session old=bla;
 ERROR HY000: Variable 'old' is a read only variable
+#legal values
+CREATE TABLE t1 ( a int complex='c,f,f,f' ) ENGINE=example ULL=10000 STR='dskj' one_or_two='one' YESNO=0;
+show create table t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) DEFAULT NULL `complex`='c,f,f,f'
+) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `ULL`=10000 `STR`='dskj' `one_or_two`='one' `YESNO`=0
+drop table t1;
+SET @OLD_SQL_MODE=@@SQL_MODE;
+SET SQL_MODE='IGNORE_BAD_TABLE_OPTIONS';
+#illegal value fixed
+CREATE TABLE t1 (a int) ENGINE=example ULL=10000000000000000000 one_or_two='ttt' YESNO=SSS;
+Warnings:
+Warning	1653	Incorrect value '10000000000000000000' for option 'ULL'
+Warning	1653	Incorrect value 'ttt' for option 'one_or_two'
+Warning	1653	Incorrect value 'SSS' for option 'YESNO'
+show create table t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) DEFAULT NULL
+) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `ULL`=10000000000000000000 `one_or_two`='ttt' `YESNO`=SSS
+#alter table
+alter table t1 ULL=10000000;
+show create table t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) DEFAULT NULL
+) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `one_or_two`='ttt' `YESNO`=SSS `ULL`=10000000
+alter table t1 change a a int complex='c,c,c';
+show create table t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) DEFAULT NULL `complex`='c,c,c'
+) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `one_or_two`='ttt' `YESNO`=SSS `ULL`=10000000
+drop table t1;
+#illegal value error
+SET SQL_MODE='';
+CREATE TABLE t1 (a int) ENGINE=example ULL=10000000000000000000 one_or_two='ttt' YESNO=SSS;
+ERROR HY000: Incorrect value '10000000000000000000' for option 'ULL'
+CREATE TABLE t1 (a int) ENGINE=example ULL=10.00;
+ERROR 42000: Only integers allowed as number here near '10.00' at line 1
+CREATE TABLE t1 (a int) ENGINE=example ULL=1e2;
+ERROR 42000: Only integers allowed as number here near '1e2' at line 1
+CREATE TABLE t1 (a int) ENGINE=example ULL=0x1234;
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) DEFAULT NULL
+) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `ULL`=4660
+select create_options from information_schema.tables where table_schema='test' and table_name='t1';
+create_options
+`ULL`=4660
+ALTER TABLE t1 ULL=DEFAULT;
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) DEFAULT NULL
+) ENGINE=EXAMPLE DEFAULT CHARSET=latin1
+DROP TABLE t1;
+SET @@SQL_MODE=@OLD_SQL_MODE;
+select 1;
+1
+1
 UNINSTALL PLUGIN example;

=== added file 'mysql-test/r/plugin_maturity.result'
--- a/mysql-test/r/plugin_maturity.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/r/plugin_maturity.result	2010-06-16 17:01:22 +0000
@@ -0,0 +1,2 @@
+INSTALL PLUGIN example SONAME 'ha_example.so';
+ERROR HY000: Can't open shared library 'ha_example.so' (errno: 0 Loading of experimental plugins is prohibited by --plugin-maturity=stable)

=== modified file 'mysql-test/r/ps.result'
--- a/mysql-test/r/ps.result	2010-10-04 08:51:26 +0000
+++ b/mysql-test/r/ps.result	2010-11-30 21:11:03 +0000
@@ -1194,13 +1194,13 @@
 prepare my_stmt from @aux;
 execute my_stmt;
 COUNT(*)
-39
-execute my_stmt;
-COUNT(*)
-39
-execute my_stmt;
-COUNT(*)
-39
+41
+execute my_stmt;
+COUNT(*)
+41
+execute my_stmt;
+COUNT(*)
+41
 deallocate prepare my_stmt;
 drop procedure if exists p1|
 drop table if exists t1|

=== added file 'mysql-test/r/select_pkeycache.result'
--- a/mysql-test/r/select_pkeycache.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/r/select_pkeycache.result	2011-01-23 07:23:47 +0000
@@ -0,0 +1,4878 @@
+drop table if exists t1,t2,t3,t4,t11;
+drop table if exists t1_1,t1_2,t9_1,t9_2,t1aa,t2aa;
+drop view if exists v1;
+CREATE TABLE t1 (
+Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL,
+Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL
+);
+INSERT INTO t1 VALUES (9410,9412);
+select period from t1;
+period
+9410
+select * from t1;
+Period	Varor_period
+9410	9412
+select t1.* from t1;
+Period	Varor_period
+9410	9412
+CREATE TABLE t2 (
+auto int not null auto_increment,
+fld1 int(6) unsigned zerofill DEFAULT '000000' NOT NULL,
+companynr tinyint(2) unsigned zerofill DEFAULT '00' NOT NULL,
+fld3 char(30) DEFAULT '' NOT NULL,
+fld4 char(35) DEFAULT '' NOT NULL,
+fld5 char(35) DEFAULT '' NOT NULL,
+fld6 char(4) DEFAULT '' NOT NULL,
+UNIQUE fld1 (fld1),
+KEY fld3 (fld3),
+PRIMARY KEY (auto)
+);
+select t2.fld3 from t2 where companynr = 58 and fld3 like "%imaginable%";
+fld3
+imaginable
+select fld3 from t2 where fld3 like "%cultivation" ;
+fld3
+cultivation
+select t2.fld3,companynr from t2 where companynr = 57+1 order by fld3;
+fld3	companynr
+concoct	58
+druggists	58
+engrossing	58
+Eurydice	58
+exclaimers	58
+ferociousness	58
+hopelessness	58
+Huey	58
+imaginable	58
+judges	58
+merging	58
+ostrich	58
+peering	58
+Phelps	58
+presumes	58
+Ruth	58
+sentences	58
+Shylock	58
+straggled	58
+synergy	58
+thanking	58
+tying	58
+unlocks	58
+select fld3,companynr from t2 where companynr = 58 order by fld3;
+fld3	companynr
+concoct	58
+druggists	58
+engrossing	58
+Eurydice	58
+exclaimers	58
+ferociousness	58
+hopelessness	58
+Huey	58
+imaginable	58
+judges	58
+merging	58
+ostrich	58
+peering	58
+Phelps	58
+presumes	58
+Ruth	58
+sentences	58
+Shylock	58
+straggled	58
+synergy	58
+thanking	58
+tying	58
+unlocks	58
+select fld3 from t2 order by fld3 desc limit 10;
+fld3
+youthfulness
+yelped
+Wotan
+workers
+Witt
+witchcraft
+Winsett
+Willy
+willed
+wildcats
+select fld3 from t2 order by fld3 desc limit 5;
+fld3
+youthfulness
+yelped
+Wotan
+workers
+Witt
+select fld3 from t2 order by fld3 desc limit 5,5;
+fld3
+witchcraft
+Winsett
+Willy
+willed
+wildcats
+select t2.fld3 from t2 where fld3 = 'honeysuckle';
+fld3
+honeysuckle
+select t2.fld3 from t2 where fld3 LIKE 'honeysuckl_';
+fld3
+honeysuckle
+select t2.fld3 from t2 where fld3 LIKE 'hon_ysuckl_';
+fld3
+honeysuckle
+select t2.fld3 from t2 where fld3 LIKE 'honeysuckle%';
+fld3
+honeysuckle
+select t2.fld3 from t2 where fld3 LIKE 'h%le';
+fld3
+honeysuckle
+select t2.fld3 from t2 where fld3 LIKE 'honeysuckle_';
+fld3
+select t2.fld3 from t2 where fld3 LIKE 'don_t_find_me_please%';
+fld3
+explain select t2.fld3 from t2 where fld3 = 'honeysuckle';
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t2	ref	fld3	fld3	30	const	1	Using where; Using index
+explain select fld3 from t2 ignore index (fld3) where fld3 = 'honeysuckle';
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	1199	Using where
+explain select fld3 from t2 use index (fld1) where fld3 = 'honeysuckle';
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	1199	Using where
+explain select fld3 from t2 use index (fld3) where fld3 = 'honeysuckle';
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t2	ref	fld3	fld3	30	const	1	Using where; Using index
+explain select fld3 from t2 use index (fld1,fld3) where fld3 = 'honeysuckle';
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t2	ref	fld3	fld3	30	const	1	Using where; Using index
+explain select fld3 from t2 ignore index (fld3,not_used);
+ERROR 42000: Key 'not_used' doesn't exist in table 't2'
+explain select fld3 from t2 use index (not_used);
+ERROR 42000: Key 'not_used' doesn't exist in table 't2'
+select t2.fld3 from t2 where fld3 >= 'honeysuckle' and fld3 <= 'honoring' order by fld3;
+fld3
+honeysuckle
+honoring
+explain select t2.fld3 from t2 where fld3 >= 'honeysuckle' and fld3 <= 'honoring' order by fld3;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t2	range	fld3	fld3	30	NULL	2	Using where; Using index
+select fld1,fld3 from t2 where fld3="Colombo" or fld3 = "nondecreasing" order by fld3;
+fld1	fld3
+148504	Colombo
+068305	Colombo
+000000	nondecreasing
+select fld1,fld3 from t2 where companynr = 37 and fld3 = 'appendixes';
+fld1	fld3
+232605	appendixes
+1232605	appendixes
+1232606	appendixes
+1232607	appendixes
+1232608	appendixes
+1232609	appendixes
+select fld1 from t2 where fld1=250501 or fld1="250502";
+fld1
+250501
+250502
+explain select fld1 from t2 where fld1=250501 or fld1="250502";
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t2	range	fld1	fld1	4	NULL	2	Using where; Using index
+select fld1 from t2 where fld1=250501 or fld1=250502 or fld1 >= 250505 and fld1 <= 250601 or fld1 between 250501 and 250502;
+fld1
+250501
+250502
+250505
+250601
+explain select fld1 from t2 where fld1=250501 or fld1=250502 or fld1 >= 250505 and fld1 <= 250601 or fld1 between 250501 and 250502;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t2	range	fld1	fld1	4	NULL	4	Using where; Using index
+select fld1,fld3 from t2 where companynr = 37 and fld3 like 'f%';
+fld1	fld3
+218401	faithful
+018007	fanatic
+228311	fated
+018017	featherweight
+218022	feed
+088303	feminine
+058004	Fenton
+038017	fetched
+018054	fetters
+208101	fiftieth
+238007	filial
+013606	fingerings
+218008	finishers
+038205	firearm
+188505	fitting
+202301	Fitzpatrick
+238008	fixedly
+012001	flanking
+018103	flint
+018104	flopping
+188007	flurried
+013602	foldout
+226205	foothill
+232102	forgivably
+228306	forthcoming
+186002	freakish
+208113	freest
+231315	freezes
+036002	funereal
+226209	furnishings
+198006	furthermore
+select fld3 from t2 where fld3 like "L%" and fld3 = "ok";
+fld3
+select fld3 from t2 where (fld3 like "C%" and fld3 = "Chantilly");
+fld3
+Chantilly
+select fld1,fld3 from t2 where fld1 like "25050%";
+fld1	fld3
+250501	poisoning
+250502	Iraqis
+250503	heaving
+250504	population
+250505	bomb
+select fld1,fld3 from t2 where fld1 like "25050_";
+fld1	fld3
+250501	poisoning
+250502	Iraqis
+250503	heaving
+250504	population
+250505	bomb
+select distinct companynr from t2;
+companynr
+00
+37
+36
+50
+58
+29
+40
+53
+65
+41
+34
+68
+select distinct companynr from t2 order by companynr;
+companynr
+00
+29
+34
+36
+37
+40
+41
+50
+53
+58
+65
+68
+select distinct companynr from t2 order by companynr desc;
+companynr
+68
+65
+58
+53
+50
+41
+40
+37
+36
+34
+29
+00
+select distinct t2.fld3,period from t2,t1 where companynr=37 and fld3 like "O%";
+fld3	period
+obliterates	9410
+offload	9410
+opaquely	9410
+organizer	9410
+overestimating	9410
+overlay	9410
+select distinct fld3 from t2 where companynr = 34 order by fld3;
+fld3
+absentee
+accessed
+ahead
+alphabetic
+Asiaticizations
+attitude
+aye
+bankruptcies
+belays
+Blythe
+bomb
+boulevard
+bulldozes
+cannot
+caressing
+charcoal
+checksumming
+chess
+clubroom
+colorful
+cosy
+creator
+crying
+Darius
+diffusing
+duality
+Eiffel
+Epiphany
+Ernestine
+explorers
+exterminated
+famine
+forked
+Gershwins
+heaving
+Hodges
+Iraqis
+Italianization
+Lagos
+landslide
+libretto
+Majorca
+mastering
+narrowed
+occurred
+offerers
+Palestine
+Peruvianizes
+pharmaceutic
+poisoning
+population
+Pygmalion
+rats
+realest
+recording
+regimented
+retransmitting
+reviver
+rouses
+scars
+sicker
+sleepwalk
+stopped
+sugars
+translatable
+uncles
+unexpected
+uprisings
+versatility
+vest
+select distinct fld3 from t2 limit 10;
+fld3
+abates
+abiding
+Abraham
+abrogating
+absentee
+abut
+accessed
+accruing
+accumulating
+accuracies
+select distinct fld3 from t2 having fld3 like "A%" limit 10;
+fld3
+abates
+abiding
+Abraham
+abrogating
+absentee
+abut
+accessed
+accruing
+accumulating
+accuracies
+select distinct substring(fld3,1,3) from t2 where fld3 like "A%";
+substring(fld3,1,3)
+aba
+abi
+Abr
+abs
+abu
+acc
+acq
+acu
+Ade
+adj
+Adl
+adm
+Ado
+ads
+adv
+aer
+aff
+afi
+afl
+afo
+agi
+ahe
+aim
+air
+Ald
+alg
+ali
+all
+alp
+alr
+ama
+ame
+amm
+ana
+and
+ane
+Ang
+ani
+Ann
+Ant
+api
+app
+aqu
+Ara
+arc
+Arm
+arr
+Art
+Asi
+ask
+asp
+ass
+ast
+att
+aud
+Aug
+aut
+ave
+avo
+awe
+aye
+Azt
+select distinct substring(fld3,1,3) as a from t2 having a like "A%" order by a limit 10;
+a
+aba
+abi
+Abr
+abs
+abu
+acc
+acq
+acu
+Ade
+adj
+select distinct substring(fld3,1,3) from t2 where fld3 like "A%" limit 10;
+substring(fld3,1,3)
+aba
+abi
+Abr
+abs
+abu
+acc
+acq
+acu
+Ade
+adj
+select distinct substring(fld3,1,3) as a from t2 having a like "A%" limit 10;
+a
+aba
+abi
+Abr
+abs
+abu
+acc
+acq
+acu
+Ade
+adj
+create table t3 (
+period    int not null,
+name      char(32) not null,
+companynr int not null,
+price     double(11,0),
+price2     double(11,0),
+key (period),
+key (name)
+);
+create temporary table tmp engine = myisam select * from t3;
+insert into t3 select * from tmp;
+insert into tmp select * from t3;
+insert into t3 select * from tmp;
+insert into tmp select * from t3;
+insert into t3 select * from tmp;
+insert into tmp select * from t3;
+insert into t3 select * from tmp;
+insert into tmp select * from t3;
+insert into t3 select * from tmp;
+insert into tmp select * from t3;
+insert into t3 select * from tmp;
+insert into tmp select * from t3;
+insert into t3 select * from tmp;
+insert into tmp select * from t3;
+insert into t3 select * from tmp;
+insert into tmp select * from t3;
+insert into t3 select * from tmp;
+alter table t3 add t2nr int not null auto_increment primary key first;
+drop table tmp;
+SET SQL_BIG_TABLES=1;
+select distinct concat(fld3," ",fld3) as namn from t2,t3 where t2.fld1=t3.t2nr order by namn limit 10;
+namn
+Abraham Abraham
+abrogating abrogating
+admonishing admonishing
+Adolph Adolph
+afield afield
+aging aging
+ammonium ammonium
+analyzable analyzable
+animals animals
+animized animized
+SET SQL_BIG_TABLES=0;
+select distinct concat(fld3," ",fld3) from t2,t3 where t2.fld1=t3.t2nr order by fld3 limit 10;
+concat(fld3," ",fld3)
+Abraham Abraham
+abrogating abrogating
+admonishing admonishing
+Adolph Adolph
+afield afield
+aging aging
+ammonium ammonium
+analyzable analyzable
+animals animals
+animized animized
+select distinct fld5 from t2 limit 10;
+fld5
+neat
+Steinberg
+jarring
+tinily
+balled
+persist
+attainments
+fanatic
+measures
+rightfulness
+select distinct fld3,count(*) from t2 group by companynr,fld3 limit 10;
+fld3	count(*)
+affixed	1
+and	1
+annoyers	1
+Anthony	1
+assayed	1
+assurers	1
+attendants	1
+bedlam	1
+bedpost	1
+boasted	1
+SET SQL_BIG_TABLES=1;
+select distinct fld3,count(*) from t2 group by companynr,fld3 limit 10;
+fld3	count(*)
+affixed	1
+and	1
+annoyers	1
+Anthony	1
+assayed	1
+assurers	1
+attendants	1
+bedlam	1
+bedpost	1
+boasted	1
+SET SQL_BIG_TABLES=0;
+select distinct fld3,repeat("a",length(fld3)),count(*) from t2 group by companynr,fld3 limit 100,10;
+fld3	repeat("a",length(fld3))	count(*)
+circus	aaaaaa	1
+cited	aaaaa	1
+Colombo	aaaaaaa	1
+congresswoman	aaaaaaaaaaaaa	1
+contrition	aaaaaaaaaa	1
+corny	aaaaa	1
+cultivation	aaaaaaaaaaa	1
+definiteness	aaaaaaaaaaaa	1
+demultiplex	aaaaaaaaaaa	1
+disappointing	aaaaaaaaaaaaa	1
+select distinct companynr,rtrim(space(512+companynr)) from t3 order by 1,2;
+companynr	rtrim(space(512+companynr))
+37	
+78	
+101	
+154	
+311	
+447	
+512	
+select distinct fld3 from t2,t3 where t2.companynr = 34 and t2.fld1=t3.t2nr order by fld3;
+fld3
+explain select t3.t2nr,fld3 from t2,t3 where t2.companynr = 34 and t2.fld1=t3.t2nr order by t3.t2nr,fld3;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t2	ALL	fld1	NULL	NULL	NULL	1199	Using where; Using temporary; Using filesort
+1	SIMPLE	t3	eq_ref	PRIMARY	PRIMARY	4	test.t2.fld1	1	Using where; Using index
+explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	ALL	period	NULL	NULL	NULL	41810	Using temporary; Using filesort
+1	SIMPLE	t3	ref	period	period	4	test.t1.period	4181	
+explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period limit 10;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t3	index	period	period	4	NULL	1	
+1	SIMPLE	t1	ref	period	period	4	test.t3.period	4181	
+explain select * from t3 as t1,t3 where t1.period=t3.period order by t1.period limit 10;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	index	period	period	4	NULL	1	
+1	SIMPLE	t3	ref	period	period	4	test.t1.period	4181	
+select period from t1;
+period
+9410
+select period from t1 where period=1900;
+period
+select fld3,period from t1,t2 where fld1 = 011401 order by period;
+fld3	period
+breaking	9410
+select fld3,period from t2,t3 where t2.fld1 = 011401 and t2.fld1=t3.t2nr and t3.period=1001;
+fld3	period
+breaking	1001
+explain select fld3,period from t2,t3 where t2.fld1 = 011401 and t3.t2nr=t2.fld1 and 1001 = t3.period;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t2	const	fld1	fld1	4	const	1	
+1	SIMPLE	t3	const	PRIMARY,period	PRIMARY	4	const	1	
+select fld3,period from t2,t1 where companynr*10 = 37*10;
+fld3	period
+breaking	9410
+Romans	9410
+intercepted	9410
+bewilderingly	9410
+astound	9410
+admonishing	9410
+sumac	9410
+flanking	9410
+combed	9410
+subjective	9410
+scatterbrain	9410
+Eulerian	9410
+Kane	9410
+overlay	9410
+perturb	9410
+goblins	9410
+annihilates	9410
+Wotan	9410
+snatching	9410
+concludes	9410
+laterally	9410
+yelped	9410
+grazing	9410
+Baird	9410
+celery	9410
+misunderstander	9410
+handgun	9410
+foldout	9410
+mystic	9410
+succumbed	9410
+Nabisco	9410
+fingerings	9410
+aging	9410
+afield	9410
+ammonium	9410
+boat	9410
+intelligibility	9410
+Augustine	9410
+teethe	9410
+dreaded	9410
+scholastics	9410
+audiology	9410
+wallet	9410
+parters	9410
+eschew	9410
+quitter	9410
+neat	9410
+Steinberg	9410
+jarring	9410
+tinily	9410
+balled	9410
+persist	9410
+attainments	9410
+fanatic	9410
+measures	9410
+rightfulness	9410
+capably	9410
+impulsive	9410
+starlet	9410
+terminators	9410
+untying	9410
+announces	9410
+featherweight	9410
+pessimist	9410
+daughter	9410
+decliner	9410
+lawgiver	9410
+stated	9410
+readable	9410
+attrition	9410
+cascade	9410
+motors	9410
+interrogate	9410
+pests	9410
+stairway	9410
+dopers	9410
+testicle	9410
+Parsifal	9410
+leavings	9410
+postulation	9410
+squeaking	9410
+contrasted	9410
+leftover	9410
+whiteners	9410
+erases	9410
+Punjab	9410
+Merritt	9410
+Quixotism	9410
+sweetish	9410
+dogging	9410
+scornfully	9410
+bellow	9410
+bills	9410
+cupboard	9410
+sureties	9410
+puddings	9410
+fetters	9410
+bivalves	9410
+incurring	9410
+Adolph	9410
+pithed	9410
+Miles	9410
+trimmings	9410
+tragedies	9410
+skulking	9410
+flint	9410
+flopping	9410
+relaxing	9410
+offload	9410
+suites	9410
+lists	9410
+animized	9410
+multilayer	9410
+standardizes	9410
+Judas	9410
+vacuuming	9410
+dentally	9410
+humanness	9410
+inch	9410
+Weissmuller	9410
+irresponsibly	9410
+luckily	9410
+culled	9410
+medical	9410
+bloodbath	9410
+subschema	9410
+animals	9410
+Micronesia	9410
+repetitions	9410
+Antares	9410
+ventilate	9410
+pityingly	9410
+interdependent	9410
+Graves	9410
+neonatal	9410
+chafe	9410
+honoring	9410
+realtor	9410
+elite	9410
+funereal	9410
+abrogating	9410
+sorters	9410
+Conley	9410
+lectured	9410
+Abraham	9410
+Hawaii	9410
+cage	9410
+hushes	9410
+Simla	9410
+reporters	9410
+Dutchman	9410
+descendants	9410
+groupings	9410
+dissociate	9410
+coexist	9410
+Beebe	9410
+Taoism	9410
+Connally	9410
+fetched	9410
+checkpoints	9410
+rusting	9410
+galling	9410
+obliterates	9410
+traitor	9410
+resumes	9410
+analyzable	9410
+terminator	9410
+gritty	9410
+firearm	9410
+minima	9410
+Selfridge	9410
+disable	9410
+witchcraft	9410
+betroth	9410
+Manhattanize	9410
+imprint	9410
+peeked	9410
+swelling	9410
+interrelationships	9410
+riser	9410
+Gandhian	9410
+peacock	9410
+bee	9410
+kanji	9410
+dental	9410
+scarf	9410
+chasm	9410
+insolence	9410
+syndicate	9410
+alike	9410
+imperial	9410
+convulsion	9410
+railway	9410
+validate	9410
+normalizes	9410
+comprehensive	9410
+chewing	9410
+denizen	9410
+schemer	9410
+chronicle	9410
+Kline	9410
+Anatole	9410
+partridges	9410
+brunch	9410
+recruited	9410
+dimensions	9410
+Chicana	9410
+announced	9410
+praised	9410
+employing	9410
+linear	9410
+quagmire	9410
+western	9410
+relishing	9410
+serving	9410
+scheduling	9410
+lore	9410
+eventful	9410
+arteriole	9410
+disentangle	9410
+cured	9410
+Fenton	9410
+avoidable	9410
+drains	9410
+detectably	9410
+husky	9410
+impelling	9410
+undoes	9410
+evened	9410
+squeezes	9410
+destroyer	9410
+rudeness	9410
+beaner	9410
+boorish	9410
+Everhart	9410
+encompass	9410
+mushrooms	9410
+Alison	9410
+externally	9410
+pellagra	9410
+cult	9410
+creek	9410
+Huffman	9410
+Majorca	9410
+governing	9410
+gadfly	9410
+reassigned	9410
+intentness	9410
+craziness	9410
+psychic	9410
+squabbled	9410
+burlesque	9410
+capped	9410
+extracted	9410
+DiMaggio	9410
+exclamation	9410
+subdirectory	9410
+Gothicism	9410
+feminine	9410
+metaphysically	9410
+sanding	9410
+Miltonism	9410
+freakish	9410
+index	9410
+straight	9410
+flurried	9410
+denotative	9410
+coming	9410
+commencements	9410
+gentleman	9410
+gifted	9410
+Shanghais	9410
+sportswriting	9410
+sloping	9410
+navies	9410
+leaflet	9410
+shooter	9410
+Joplin	9410
+babies	9410
+assails	9410
+admiring	9410
+swaying	9410
+Goldstine	9410
+fitting	9410
+Norwalk	9410
+analogy	9410
+deludes	9410
+cokes	9410
+Clayton	9410
+exhausts	9410
+causality	9410
+sating	9410
+icon	9410
+throttles	9410
+communicants	9410
+dehydrate	9410
+priceless	9410
+publicly	9410
+incidentals	9410
+commonplace	9410
+mumbles	9410
+furthermore	9410
+cautioned	9410
+parametrized	9410
+registration	9410
+sadly	9410
+positioning	9410
+babysitting	9410
+eternal	9410
+hoarder	9410
+congregates	9410
+rains	9410
+workers	9410
+sags	9410
+unplug	9410
+garage	9410
+boulder	9410
+specifics	9410
+Teresa	9410
+Winsett	9410
+convenient	9410
+buckboards	9410
+amenities	9410
+resplendent	9410
+sews	9410
+participated	9410
+Simon	9410
+certificates	9410
+Fitzpatrick	9410
+Evanston	9410
+misted	9410
+textures	9410
+save	9410
+count	9410
+rightful	9410
+chaperone	9410
+Lizzy	9410
+clenched	9410
+effortlessly	9410
+accessed	9410
+beaters	9410
+Hornblower	9410
+vests	9410
+indulgences	9410
+infallibly	9410
+unwilling	9410
+excrete	9410
+spools	9410
+crunches	9410
+overestimating	9410
+ineffective	9410
+humiliation	9410
+sophomore	9410
+star	9410
+rifles	9410
+dialysis	9410
+arriving	9410
+indulge	9410
+clockers	9410
+languages	9410
+Antarctica	9410
+percentage	9410
+ceiling	9410
+specification	9410
+regimented	9410
+ciphers	9410
+pictures	9410
+serpents	9410
+allot	9410
+realized	9410
+mayoral	9410
+opaquely	9410
+hostess	9410
+fiftieth	9410
+incorrectly	9410
+decomposition	9410
+stranglings	9410
+mixture	9410
+electroencephalography	9410
+similarities	9410
+charges	9410
+freest	9410
+Greenberg	9410
+tinting	9410
+expelled	9410
+warm	9410
+smoothed	9410
+deductions	9410
+Romano	9410
+bitterroot	9410
+corset	9410
+securing	9410
+environing	9410
+cute	9410
+Crays	9410
+heiress	9410
+inform	9410
+avenge	9410
+universals	9410
+Kinsey	9410
+ravines	9410
+bestseller	9410
+equilibrium	9410
+extents	9410
+relatively	9410
+pressure	9410
+critiques	9410
+befouled	9410
+rightfully	9410
+mechanizing	9410
+Latinizes	9410
+timesharing	9410
+Aden	9410
+embassies	9410
+males	9410
+shapelessly	9410
+mastering	9410
+Newtonian	9410
+finishers	9410
+abates	9410
+teem	9410
+kiting	9410
+stodgy	9410
+feed	9410
+guitars	9410
+airships	9410
+store	9410
+denounces	9410
+Pyle	9410
+Saxony	9410
+serializations	9410
+Peruvian	9410
+taxonomically	9410
+kingdom	9410
+stint	9410
+Sault	9410
+faithful	9410
+Ganymede	9410
+tidiness	9410
+gainful	9410
+contrary	9410
+Tipperary	9410
+tropics	9410
+theorizers	9410
+renew	9410
+already	9410
+terminal	9410
+Hegelian	9410
+hypothesizer	9410
+warningly	9410
+journalizing	9410
+nested	9410
+Lars	9410
+saplings	9410
+foothill	9410
+labeled	9410
+imperiously	9410
+reporters	9410
+furnishings	9410
+precipitable	9410
+discounts	9410
+excises	9410
+Stalin	9410
+despot	9410
+ripeness	9410
+Arabia	9410
+unruly	9410
+mournfulness	9410
+boom	9410
+slaughter	9410
+Sabine	9410
+handy	9410
+rural	9410
+organizer	9410
+shipyard	9410
+civics	9410
+inaccuracy	9410
+rules	9410
+juveniles	9410
+comprised	9410
+investigations	9410
+stabilizes	9410
+seminaries	9410
+Hunter	9410
+sporty	9410
+test	9410
+weasels	9410
+CERN	9410
+tempering	9410
+afore	9410
+Galatean	9410
+techniques	9410
+error	9410
+veranda	9410
+severely	9410
+Cassites	9410
+forthcoming	9410
+guides	9410
+vanish	9410
+lied	9410
+sawtooth	9410
+fated	9410
+gradually	9410
+widens	9410
+preclude	9410
+evenhandedly	9410
+percentage	9410
+disobedience	9410
+humility	9410
+gleaning	9410
+petted	9410
+bloater	9410
+minion	9410
+marginal	9410
+apiary	9410
+measures	9410
+precaution	9410
+repelled	9410
+primary	9410
+coverings	9410
+Artemia	9410
+navigate	9410
+spatial	9410
+Gurkha	9410
+meanwhile	9410
+Melinda	9410
+Butterfield	9410
+Aldrich	9410
+previewing	9410
+glut	9410
+unaffected	9410
+inmate	9410
+mineral	9410
+impending	9410
+meditation	9410
+ideas	9410
+miniaturizes	9410
+lewdly	9410
+title	9410
+youthfulness	9410
+creak	9410
+Chippewa	9410
+clamored	9410
+freezes	9410
+forgivably	9410
+reduce	9410
+McGovern	9410
+Nazis	9410
+epistle	9410
+socializes	9410
+conceptions	9410
+Kevin	9410
+uncovering	9410
+chews	9410
+appendixes	9410
+appendixes	9410
+appendixes	9410
+appendixes	9410
+appendixes	9410
+appendixes	9410
+raining	9410
+infest	9410
+compartment	9410
+minting	9410
+ducks	9410
+roped	9410
+waltz	9410
+Lillian	9410
+repressions	9410
+chillingly	9410
+noncritical	9410
+lithograph	9410
+spongers	9410
+parenthood	9410
+posed	9410
+instruments	9410
+filial	9410
+fixedly	9410
+relives	9410
+Pandora	9410
+watering	9410
+ungrateful	9410
+secures	9410
+poison	9410
+dusted	9410
+encompasses	9410
+presentation	9410
+Kantian	9410
+select fld3,period,price,price2 from t2,t3 where t2.fld1=t3.t2nr and period >= 1001 and period <= 1002 and t2.companynr = 37 order by fld3,period, price;
+fld3	period	price	price2
+admonishing	1002	28357832	8723648
+analyzable	1002	28357832	8723648
+annihilates	1001	5987435	234724
+Antares	1002	28357832	8723648
+astound	1001	5987435	234724
+audiology	1001	5987435	234724
+Augustine	1002	28357832	8723648
+Baird	1002	28357832	8723648
+bewilderingly	1001	5987435	234724
+breaking	1001	5987435	234724
+Conley	1001	5987435	234724
+dentally	1002	28357832	8723648
+dissociate	1002	28357832	8723648
+elite	1001	5987435	234724
+eschew	1001	5987435	234724
+Eulerian	1001	5987435	234724
+flanking	1001	5987435	234724
+foldout	1002	28357832	8723648
+funereal	1002	28357832	8723648
+galling	1002	28357832	8723648
+Graves	1001	5987435	234724
+grazing	1001	5987435	234724
+groupings	1001	5987435	234724
+handgun	1001	5987435	234724
+humility	1002	28357832	8723648
+impulsive	1002	28357832	8723648
+inch	1001	5987435	234724
+intelligibility	1001	5987435	234724
+jarring	1001	5987435	234724
+lawgiver	1001	5987435	234724
+lectured	1002	28357832	8723648
+Merritt	1002	28357832	8723648
+neonatal	1001	5987435	234724
+offload	1002	28357832	8723648
+parters	1002	28357832	8723648
+pityingly	1002	28357832	8723648
+puddings	1002	28357832	8723648
+Punjab	1001	5987435	234724
+quitter	1002	28357832	8723648
+realtor	1001	5987435	234724
+relaxing	1001	5987435	234724
+repetitions	1001	5987435	234724
+resumes	1001	5987435	234724
+Romans	1002	28357832	8723648
+rusting	1001	5987435	234724
+scholastics	1001	5987435	234724
+skulking	1002	28357832	8723648
+stated	1002	28357832	8723648
+suites	1002	28357832	8723648
+sureties	1001	5987435	234724
+testicle	1002	28357832	8723648
+tinily	1002	28357832	8723648
+tragedies	1001	5987435	234724
+trimmings	1001	5987435	234724
+vacuuming	1001	5987435	234724
+ventilate	1001	5987435	234724
+wallet	1001	5987435	234724
+Weissmuller	1002	28357832	8723648
+Wotan	1002	28357832	8723648
+select t2.fld1,fld3,period,price,price2 from t2,t3 where t2.fld1>= 18201 and t2.fld1 <= 18811 and t2.fld1=t3.t2nr and period = 1001 and t2.companynr = 37;
+fld1	fld3	period	price	price2
+018201	relaxing	1001	5987435	234724
+018601	vacuuming	1001	5987435	234724
+018801	inch	1001	5987435	234724
+018811	repetitions	1001	5987435	234724
+create table t4 (
+companynr tinyint(2) unsigned zerofill NOT NULL default '00',
+companyname char(30) NOT NULL default '',
+PRIMARY KEY (companynr),
+UNIQUE KEY companyname(companyname)
+) ENGINE=MyISAM MAX_ROWS=50 PACK_KEYS=1 COMMENT='companynames';
+select STRAIGHT_JOIN t2.companynr,companyname from t4,t2 where t2.companynr=t4.companynr group by t2.companynr;
+companynr	companyname
+00	Unknown
+29	company 1
+34	company 2
+36	company 3
+37	company 4
+40	company 5
+41	company 6
+50	company 11
+53	company 7
+58	company 8
+65	company 9
+68	company 10
+select SQL_SMALL_RESULT t2.companynr,companyname from t4,t2 where t2.companynr=t4.companynr group by t2.companynr;
+companynr	companyname
+00	Unknown
+29	company 1
+34	company 2
+36	company 3
+37	company 4
+40	company 5
+41	company 6
+50	company 11
+53	company 7
+58	company 8
+65	company 9
+68	company 10
+select * from t1,t1 t12;
+Period	Varor_period	Period	Varor_period
+9410	9412	9410	9412
+select t2.fld1,t22.fld1 from t2,t2 t22 where t2.fld1 >= 250501 and t2.fld1 <= 250505 and t22.fld1 >= 250501 and t22.fld1 <= 250505;
+fld1	fld1
+250501	250501
+250502	250501
+250503	250501
+250504	250501
+250505	250501
+250501	250502
+250502	250502
+250503	250502
+250504	250502
+250505	250502
+250501	250503
+250502	250503
+250503	250503
+250504	250503
+250505	250503
+250501	250504
+250502	250504
+250503	250504
+250504	250504
+250505	250504
+250501	250505
+250502	250505
+250503	250505
+250504	250505
+250505	250505
+insert into t2 (fld1, companynr) values (999999,99);
+select t2.companynr,companyname from t2 left join t4 using (companynr) where t4.companynr is null;
+companynr	companyname
+99	NULL
+select count(*) from t2 left join t4 using (companynr) where t4.companynr is not null;
+count(*)
+1199
+explain select t2.companynr,companyname from t2 left join t4 using (companynr) where t4.companynr is null;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	1200	
+1	SIMPLE	t4	eq_ref	PRIMARY	PRIMARY	1	test.t2.companynr	1	Using where; Not exists
+explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr is null;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t4	ALL	NULL	NULL	NULL	NULL	12	
+1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	1200	Using where; Not exists
+select companynr,companyname from t2 left join t4 using (companynr) where companynr is null;
+companynr	companyname
+select count(*) from t2 left join t4 using (companynr) where companynr is not null;
+count(*)
+1200
+explain select companynr,companyname from t2 left join t4 using (companynr) where companynr is null;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Impossible WHERE
+explain select companynr,companyname from t4 left join t2 using (companynr) where companynr is null;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Impossible WHERE
+delete from t2 where fld1=999999;
+explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	1199	Using where
+1	SIMPLE	t4	eq_ref	PRIMARY	PRIMARY	1	test.t2.companynr	1	
+explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr < 0;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	1199	Using where
+1	SIMPLE	t4	eq_ref	PRIMARY	PRIMARY	1	test.t2.companynr	1	
+explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 and t4.companynr > 0;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	1199	Using where
+1	SIMPLE	t4	eq_ref	PRIMARY	PRIMARY	1	test.t2.companynr	1	
+explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t4	ALL	PRIMARY	NULL	NULL	NULL	12	Using where
+1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	1199	
+explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t4	ALL	PRIMARY	NULL	NULL	NULL	12	Using where
+1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	1199	
+explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 and companynr > 0;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t4	ALL	PRIMARY	NULL	NULL	NULL	12	Using where
+1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	1199	
+explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr is null;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t4	ALL	NULL	NULL	NULL	NULL	12	
+1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	1199	Using where
+explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr < 0 or t4.companynr > 0;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t4	ALL	PRIMARY	NULL	NULL	NULL	12	
+1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	1199	Using where
+explain select t2.companynr,companyname from t4 left join t2 using (companynr) where ifnull(t2.companynr,1)>0;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t4	ALL	NULL	NULL	NULL	NULL	12	
+1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	1199	Using where
+explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr is null;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t4	ALL	PRIMARY	NULL	NULL	NULL	12	Using where
+1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	1199	
+explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0 or companynr > 0;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t4	ALL	PRIMARY	NULL	NULL	NULL	12	Using where
+1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	1199	
+explain select companynr,companyname from t4 left join t2 using (companynr) where ifnull(companynr,1)>0;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t4	ALL	NULL	NULL	NULL	NULL	12	Using where
+1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	1199	
+select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1;
+companynr	companynr
+37	36
+41	40
+explain select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t4	index	NULL	PRIMARY	1	NULL	12	Using index; Using temporary
+1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	1199	Using where; Using join buffer
+select t2.fld1,t2.companynr,fld3,period from t3,t2 where t2.fld1 = 38208 and t2.fld1=t3.t2nr and period = 1008 or t2.fld1 = 38008 and t2.fld1 =t3.t2nr and period = 1008;
+fld1	companynr	fld3	period
+038008	37	reporters	1008
+038208	37	Selfridge	1008
+select t2.fld1,t2.companynr,fld3,period from t3,t2 where (t2.fld1 = 38208 or t2.fld1 = 38008) and t2.fld1=t3.t2nr and period>=1008 and period<=1009;
+fld1	companynr	fld3	period
+038008	37	reporters	1008
+038208	37	Selfridge	1008
+select t2.fld1,t2.companynr,fld3,period from t3,t2 where (t3.t2nr = 38208 or t3.t2nr = 38008) and t2.fld1=t3.t2nr and period>=1008 and period<=1009;
+fld1	companynr	fld3	period
+038008	37	reporters	1008
+038208	37	Selfridge	1008
+select period from t1 where (((period > 0) or period < 10000 or (period = 1900)) and (period=1900 and period <= 1901) or (period=1903 and (period=1903)) and period>=1902) or ((period=1904 or period=1905) or (period=1906 or period>1907)) or (period=1908 and period = 1909);
+period
+9410
+select period from t1 where ((period > 0 and period < 1) or (((period > 0 and period < 100) and (period > 10)) or (period > 10)) or (period > 0 and (period > 5 or period > 6)));
+period
+9410
+select a.fld1 from t2 as a,t2 b where ((a.fld1 = 250501 and a.fld1=b.fld1) or a.fld1=250502 or a.fld1=250503 or (a.fld1=250505 and a.fld1<=b.fld1 and b.fld1>=a.fld1)) and a.fld1=b.fld1;
+fld1
+250501
+250502
+250503
+250505
+select fld1 from t2 where fld1 in (250502,98005,98006,250503,250605,250606) and fld1 >=250502 and fld1 not in (250605,250606);
+fld1
+250502
+250503
+select fld1 from t2 where fld1 between 250502 and 250504;
+fld1
+250502
+250503
+250504
+select fld3 from t2 where (((fld3 like "_%L%" ) or (fld3 like "%ok%")) and ( fld3 like "L%" or fld3 like "G%")) and fld3 like "L%" ;
+fld3
+label
+labeled
+labeled
+landslide
+laterally
+leaflet
+lewdly
+Lillian
+luckily
+select count(*) from t1;
+count(*)
+1
+select companynr,count(*),sum(fld1) from t2 group by companynr;
+companynr	count(*)	sum(fld1)
+00	82	10355753
+29	95	14473298
+34	70	17788966
+36	215	22786296
+37	588	83602098
+40	37	6618386
+41	52	12816335
+50	11	1595438
+53	4	793210
+58	23	2254293
+65	10	2284055
+68	12	3097288
+select companynr,count(*) from t2 group by companynr order by companynr desc limit 5;
+companynr	count(*)
+68	12
+65	10
+58	23
+53	4
+50	11
+select count(*),min(fld4),max(fld4),sum(fld1),avg(fld1),std(fld1),variance(fld1) from t2 where companynr = 34 and fld4<>"";
+count(*)	min(fld4)	max(fld4)	sum(fld1)	avg(fld1)	std(fld1)	variance(fld1)
+70	absentee	vest	17788966	254128.0857	3272.5940	10709871.3069
+explain extended select count(*),min(fld4),max(fld4),sum(fld1),avg(fld1),std(fld1),variance(fld1) from t2 where companynr = 34 and fld4<>"";
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
+1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	1199	100.00	Using where
+Warnings:
+Note	1003	select count(0) AS `count(*)`,min(`test`.`t2`.`fld4`) AS `min(fld4)`,max(`test`.`t2`.`fld4`) AS `max(fld4)`,sum(`test`.`t2`.`fld1`) AS `sum(fld1)`,avg(`test`.`t2`.`fld1`) AS `avg(fld1)`,std(`test`.`t2`.`fld1`) AS `std(fld1)`,variance(`test`.`t2`.`fld1`) AS `variance(fld1)` from `test`.`t2` where ((`test`.`t2`.`companynr` = 34) and (`test`.`t2`.`fld4` <> ''))
+select companynr,count(*),min(fld4),max(fld4),sum(fld1),avg(fld1),std(fld1),variance(fld1) from t2 group by companynr limit 3;
+companynr	count(*)	min(fld4)	max(fld4)	sum(fld1)	avg(fld1)	std(fld1)	variance(fld1)
+00	82	Anthony	windmills	10355753	126289.6707	115550.9757	13352027981.7087
+29	95	abut	wetness	14473298	152350.5053	8368.5480	70032594.9026
+34	70	absentee	vest	17788966	254128.0857	3272.5940	10709871.3069
+select companynr,t2nr,count(price),sum(price),min(price),max(price),avg(price) from t3 where companynr = 37 group by companynr,t2nr limit 10;
+companynr	t2nr	count(price)	sum(price)	min(price)	max(price)	avg(price)
+37	1	1	5987435	5987435	5987435	5987435.0000
+37	2	1	28357832	28357832	28357832	28357832.0000
+37	3	1	39654943	39654943	39654943	39654943.0000
+37	11	1	5987435	5987435	5987435	5987435.0000
+37	12	1	28357832	28357832	28357832	28357832.0000
+37	13	1	39654943	39654943	39654943	39654943.0000
+37	21	1	5987435	5987435	5987435	5987435.0000
+37	22	1	28357832	28357832	28357832	28357832.0000
+37	23	1	39654943	39654943	39654943	39654943.0000
+37	31	1	5987435	5987435	5987435	5987435.0000
+select /*! SQL_SMALL_RESULT */ companynr,t2nr,count(price),sum(price),min(price),max(price),avg(price) from t3 where companynr = 37 group by companynr,t2nr limit 10;
+companynr	t2nr	count(price)	sum(price)	min(price)	max(price)	avg(price)
+37	1	1	5987435	5987435	5987435	5987435.0000
+37	2	1	28357832	28357832	28357832	28357832.0000
+37	3	1	39654943	39654943	39654943	39654943.0000
+37	11	1	5987435	5987435	5987435	5987435.0000
+37	12	1	28357832	28357832	28357832	28357832.0000
+37	13	1	39654943	39654943	39654943	39654943.0000
+37	21	1	5987435	5987435	5987435	5987435.0000
+37	22	1	28357832	28357832	28357832	28357832.0000
+37	23	1	39654943	39654943	39654943	39654943.0000
+37	31	1	5987435	5987435	5987435	5987435.0000
+select companynr,count(price),sum(price),min(price),max(price),avg(price) from t3 group by companynr ;
+companynr	count(price)	sum(price)	min(price)	max(price)	avg(price)
+37	12543	309394878010	5987435	39654943	24666736.6667
+78	8362	414611089292	726498	98439034	49582766.0000
+101	4181	3489454238	834598	834598	834598.0000
+154	4181	4112197254950	983543950	983543950	983543950.0000
+311	4181	979599938	234298	234298	234298.0000
+447	4181	9929180954	2374834	2374834	2374834.0000
+512	4181	3288532102	786542	786542	786542.0000
+select distinct mod(companynr,10) from t4 group by companynr;
+mod(companynr,10)
+0
+9
+4
+6
+7
+1
+3
+8
+5
+select distinct 1 from t4 group by companynr;
+1
+1
+select count(distinct fld1) from t2;
+count(distinct fld1)
+1199
+select companynr,count(distinct fld1) from t2 group by companynr;
+companynr	count(distinct fld1)
+00	82
+29	95
+34	70
+36	215
+37	588
+40	37
+41	52
+50	11
+53	4
+58	23
+65	10
+68	12
+select companynr,count(*) from t2 group by companynr;
+companynr	count(*)
+00	82
+29	95
+34	70
+36	215
+37	588
+40	37
+41	52
+50	11
+53	4
+58	23
+65	10
+68	12
+select companynr,count(distinct concat(fld1,repeat(65,1000))) from t2 group by companynr;
+companynr	count(distinct concat(fld1,repeat(65,1000)))
+00	82
+29	95
+34	70
+36	215
+37	588
+40	37
+41	52
+50	11
+53	4
+58	23
+65	10
+68	12
+select companynr,count(distinct concat(fld1,repeat(65,200))) from t2 group by companynr;
+companynr	count(distinct concat(fld1,repeat(65,200)))
+00	82
+29	95
+34	70
+36	215
+37	588
+40	37
+41	52
+50	11
+53	4
+58	23
+65	10
+68	12
+select companynr,count(distinct floor(fld1/100)) from t2 group by companynr;
+companynr	count(distinct floor(fld1/100))
+00	47
+29	35
+34	14
+36	69
+37	108
+40	16
+41	11
+50	9
+53	1
+58	1
+65	1
+68	1
+select companynr,count(distinct concat(repeat(65,1000),floor(fld1/100))) from t2 group by companynr;
+companynr	count(distinct concat(repeat(65,1000),floor(fld1/100)))
+00	47
+29	35
+34	14
+36	69
+37	108
+40	16
+41	11
+50	9
+53	1
+58	1
+65	1
+68	1
+select sum(fld1),fld3 from t2 where fld3="Romans" group by fld1 limit 10;
+sum(fld1)	fld3
+11402	Romans
+select name,count(*) from t3 where name='cloakroom' group by name;
+name	count(*)
+cloakroom	4181
+select name,count(*) from t3 where name='cloakroom' and price>10 group by name;
+name	count(*)
+cloakroom	4181
+select count(*) from t3 where name='cloakroom' and price2=823742;
+count(*)
+4181
+select name,count(*) from t3 where name='cloakroom' and price2=823742 group by name;
+name	count(*)
+cloakroom	4181
+select name,count(*) from t3 where name >= "extramarital" and price <= 39654943 group by name;
+name	count(*)
+extramarital	4181
+gazer	4181
+gems	4181
+Iranizes	4181
+spates	4181
+tucked	4181
+violinist	4181
+select t2.fld3,count(*) from t2,t3 where t2.fld1=158402 and t3.name=t2.fld3 group by t3.name;
+fld3	count(*)
+spates	4181
+select companynr|0,companyname from t4 group by 1;
+companynr|0	companyname
+0	Unknown
+29	company 1
+34	company 2
+36	company 3
+37	company 4
+40	company 5
+41	company 6
+50	company 11
+53	company 7
+58	company 8
+65	company 9
+68	company 10
+select t2.companynr,companyname,count(*) from t2,t4 where t2.companynr=t4.companynr group by t2.companynr order by companyname;
+companynr	companyname	count(*)
+29	company 1	95
+68	company 10	12
+50	company 11	11
+34	company 2	70
+36	company 3	215
+37	company 4	588
+40	company 5	37
+41	company 6	52
+53	company 7	4
+58	company 8	23
+65	company 9	10
+00	Unknown	82
+select t2.fld1,count(*) from t2,t3 where t2.fld1=158402 and t3.name=t2.fld3 group by t3.name;
+fld1	count(*)
+158402	4181
+select sum(Period)/count(*) from t1;
+sum(Period)/count(*)
+9410.0000
+select companynr,count(price) as "count",sum(price) as "sum" ,abs(sum(price)/count(price)-avg(price)) as "diff",(0+count(price))*companynr as func from t3 group by companynr;
+companynr	count	sum	diff	func
+37	12543	309394878010	0.0000	464091
+78	8362	414611089292	0.0000	652236
+101	4181	3489454238	0.0000	422281
+154	4181	4112197254950	0.0000	643874
+311	4181	979599938	0.0000	1300291
+447	4181	9929180954	0.0000	1868907
+512	4181	3288532102	0.0000	2140672
+select companynr,sum(price)/count(price) as avg from t3 group by companynr having avg > 70000000 order by avg;
+companynr	avg
+154	983543950.0000
+select companynr,count(*) from t2 group by companynr order by 2 desc;
+companynr	count(*)
+37	588
+36	215
+29	95
+00	82
+34	70
+41	52
+40	37
+58	23
+68	12
+50	11
+65	10
+53	4
+select companynr,count(*) from t2 where companynr > 40 group by companynr order by 2 desc;
+companynr	count(*)
+41	52
+58	23
+68	12
+50	11
+65	10
+53	4
+select t2.fld4,t2.fld1,count(price),sum(price),min(price),max(price),avg(price) from t3,t2 where t3.companynr = 37 and t2.fld1 = t3.t2nr group by fld1,t2.fld4;
+fld4	fld1	count(price)	sum(price)	min(price)	max(price)	avg(price)
+teethe	000001	1	5987435	5987435	5987435	5987435.0000
+dreaded	011401	1	5987435	5987435	5987435	5987435.0000
+scholastics	011402	1	28357832	28357832	28357832	28357832.0000
+audiology	011403	1	39654943	39654943	39654943	39654943.0000
+wallet	011501	1	5987435	5987435	5987435	5987435.0000
+parters	011701	1	5987435	5987435	5987435	5987435.0000
+eschew	011702	1	28357832	28357832	28357832	28357832.0000
+quitter	011703	1	39654943	39654943	39654943	39654943.0000
+neat	012001	1	5987435	5987435	5987435	5987435.0000
+Steinberg	012003	1	39654943	39654943	39654943	39654943.0000
+balled	012301	1	5987435	5987435	5987435	5987435.0000
+persist	012302	1	28357832	28357832	28357832	28357832.0000
+attainments	012303	1	39654943	39654943	39654943	39654943.0000
+capably	012501	1	5987435	5987435	5987435	5987435.0000
+impulsive	012602	1	28357832	28357832	28357832	28357832.0000
+starlet	012603	1	39654943	39654943	39654943	39654943.0000
+featherweight	012701	1	5987435	5987435	5987435	5987435.0000
+pessimist	012702	1	28357832	28357832	28357832	28357832.0000
+daughter	012703	1	39654943	39654943	39654943	39654943.0000
+lawgiver	013601	1	5987435	5987435	5987435	5987435.0000
+stated	013602	1	28357832	28357832	28357832	28357832.0000
+readable	013603	1	39654943	39654943	39654943	39654943.0000
+testicle	013801	1	5987435	5987435	5987435	5987435.0000
+Parsifal	013802	1	28357832	28357832	28357832	28357832.0000
+leavings	013803	1	39654943	39654943	39654943	39654943.0000
+squeaking	013901	1	5987435	5987435	5987435	5987435.0000
+contrasted	016001	1	5987435	5987435	5987435	5987435.0000
+leftover	016201	1	5987435	5987435	5987435	5987435.0000
+whiteners	016202	1	28357832	28357832	28357832	28357832.0000
+erases	016301	1	5987435	5987435	5987435	5987435.0000
+Punjab	016302	1	28357832	28357832	28357832	28357832.0000
+Merritt	016303	1	39654943	39654943	39654943	39654943.0000
+sweetish	018001	1	5987435	5987435	5987435	5987435.0000
+dogging	018002	1	28357832	28357832	28357832	28357832.0000
+scornfully	018003	1	39654943	39654943	39654943	39654943.0000
+fetters	018012	1	28357832	28357832	28357832	28357832.0000
+bivalves	018013	1	39654943	39654943	39654943	39654943.0000
+skulking	018021	1	5987435	5987435	5987435	5987435.0000
+flint	018022	1	28357832	28357832	28357832	28357832.0000
+flopping	018023	1	39654943	39654943	39654943	39654943.0000
+Judas	018032	1	28357832	28357832	28357832	28357832.0000
+vacuuming	018033	1	39654943	39654943	39654943	39654943.0000
+medical	018041	1	5987435	5987435	5987435	5987435.0000
+bloodbath	018042	1	28357832	28357832	28357832	28357832.0000
+subschema	018043	1	39654943	39654943	39654943	39654943.0000
+interdependent	018051	1	5987435	5987435	5987435	5987435.0000
+Graves	018052	1	28357832	28357832	28357832	28357832.0000
+neonatal	018053	1	39654943	39654943	39654943	39654943.0000
+sorters	018061	1	5987435	5987435	5987435	5987435.0000
+epistle	018062	1	28357832	28357832	28357832	28357832.0000
+Conley	018101	1	5987435	5987435	5987435	5987435.0000
+lectured	018102	1	28357832	28357832	28357832	28357832.0000
+Abraham	018103	1	39654943	39654943	39654943	39654943.0000
+cage	018201	1	5987435	5987435	5987435	5987435.0000
+hushes	018202	1	28357832	28357832	28357832	28357832.0000
+Simla	018402	1	28357832	28357832	28357832	28357832.0000
+reporters	018403	1	39654943	39654943	39654943	39654943.0000
+coexist	018601	1	5987435	5987435	5987435	5987435.0000
+Beebe	018602	1	28357832	28357832	28357832	28357832.0000
+Taoism	018603	1	39654943	39654943	39654943	39654943.0000
+Connally	018801	1	5987435	5987435	5987435	5987435.0000
+fetched	018802	1	28357832	28357832	28357832	28357832.0000
+checkpoints	018803	1	39654943	39654943	39654943	39654943.0000
+gritty	018811	1	5987435	5987435	5987435	5987435.0000
+firearm	018812	1	28357832	28357832	28357832	28357832.0000
+minima	019101	1	5987435	5987435	5987435	5987435.0000
+Selfridge	019102	1	28357832	28357832	28357832	28357832.0000
+disable	019103	1	39654943	39654943	39654943	39654943.0000
+witchcraft	019201	1	5987435	5987435	5987435	5987435.0000
+betroth	030501	1	5987435	5987435	5987435	5987435.0000
+Manhattanize	030502	1	28357832	28357832	28357832	28357832.0000
+imprint	030503	1	39654943	39654943	39654943	39654943.0000
+swelling	031901	1	5987435	5987435	5987435	5987435.0000
+interrelationships	036001	1	5987435	5987435	5987435	5987435.0000
+riser	036002	1	28357832	28357832	28357832	28357832.0000
+bee	038001	1	5987435	5987435	5987435	5987435.0000
+kanji	038002	1	28357832	28357832	28357832	28357832.0000
+dental	038003	1	39654943	39654943	39654943	39654943.0000
+railway	038011	1	5987435	5987435	5987435	5987435.0000
+validate	038012	1	28357832	28357832	28357832	28357832.0000
+normalizes	038013	1	39654943	39654943	39654943	39654943.0000
+Kline	038101	1	5987435	5987435	5987435	5987435.0000
+Anatole	038102	1	28357832	28357832	28357832	28357832.0000
+partridges	038103	1	39654943	39654943	39654943	39654943.0000
+recruited	038201	1	5987435	5987435	5987435	5987435.0000
+dimensions	038202	1	28357832	28357832	28357832	28357832.0000
+Chicana	038203	1	39654943	39654943	39654943	39654943.0000
+select t3.companynr,fld3,sum(price) from t3,t2 where t2.fld1 = t3.t2nr and t3.companynr = 512 group by companynr,fld3;
+companynr	fld3	sum(price)
+512	boat	786542
+512	capably	786542
+512	cupboard	786542
+512	decliner	786542
+512	descendants	786542
+512	dopers	786542
+512	erases	786542
+512	Micronesia	786542
+512	Miles	786542
+512	skies	786542
+select t2.companynr,count(*),min(fld3),max(fld3),sum(price),avg(price) from t2,t3 where t3.companynr >= 30 and t3.companynr <= 58 and t3.t2nr = t2.fld1 and 1+1=2 group by t2.companynr;
+companynr	count(*)	min(fld3)	max(fld3)	sum(price)	avg(price)
+00	1	Omaha	Omaha	5987435	5987435.0000
+36	1	dubbed	dubbed	28357832	28357832.0000
+37	83	Abraham	Wotan	1908978016	22999735.1325
+50	2	scribbled	tapestry	68012775	34006387.5000
+select t3.companynr+0,t3.t2nr,fld3,sum(price) from t3,t2 where t2.fld1 = t3.t2nr and t3.companynr = 37 group by 1,t3.t2nr,fld3,fld3,fld3,fld3,fld3 order by fld1;
+t3.companynr+0	t2nr	fld3	sum(price)
+37	1	Omaha	5987435
+37	11401	breaking	5987435
+37	11402	Romans	28357832
+37	11403	intercepted	39654943
+37	11501	bewilderingly	5987435
+37	11701	astound	5987435
+37	11702	admonishing	28357832
+37	11703	sumac	39654943
+37	12001	flanking	5987435
+37	12003	combed	39654943
+37	12301	Eulerian	5987435
+37	12302	dubbed	28357832
+37	12303	Kane	39654943
+37	12501	annihilates	5987435
+37	12602	Wotan	28357832
+37	12603	snatching	39654943
+37	12701	grazing	5987435
+37	12702	Baird	28357832
+37	12703	celery	39654943
+37	13601	handgun	5987435
+37	13602	foldout	28357832
+37	13603	mystic	39654943
+37	13801	intelligibility	5987435
+37	13802	Augustine	28357832
+37	13803	teethe	39654943
+37	13901	scholastics	5987435
+37	16001	audiology	5987435
+37	16201	wallet	5987435
+37	16202	parters	28357832
+37	16301	eschew	5987435
+37	16302	quitter	28357832
+37	16303	neat	39654943
+37	18001	jarring	5987435
+37	18002	tinily	28357832
+37	18003	balled	39654943
+37	18012	impulsive	28357832
+37	18013	starlet	39654943
+37	18021	lawgiver	5987435
+37	18022	stated	28357832
+37	18023	readable	39654943
+37	18032	testicle	28357832
+37	18033	Parsifal	39654943
+37	18041	Punjab	5987435
+37	18042	Merritt	28357832
+37	18043	Quixotism	39654943
+37	18051	sureties	5987435
+37	18052	puddings	28357832
+37	18053	tapestry	39654943
+37	18061	trimmings	5987435
+37	18062	humility	28357832
+37	18101	tragedies	5987435
+37	18102	skulking	28357832
+37	18103	flint	39654943
+37	18201	relaxing	5987435
+37	18202	offload	28357832
+37	18402	suites	28357832
+37	18403	lists	39654943
+37	18601	vacuuming	5987435
+37	18602	dentally	28357832
+37	18603	humanness	39654943
+37	18801	inch	5987435
+37	18802	Weissmuller	28357832
+37	18803	irresponsibly	39654943
+37	18811	repetitions	5987435
+37	18812	Antares	28357832
+37	19101	ventilate	5987435
+37	19102	pityingly	28357832
+37	19103	interdependent	39654943
+37	19201	Graves	5987435
+37	30501	neonatal	5987435
+37	30502	scribbled	28357832
+37	30503	chafe	39654943
+37	31901	realtor	5987435
+37	36001	elite	5987435
+37	36002	funereal	28357832
+37	38001	Conley	5987435
+37	38002	lectured	28357832
+37	38003	Abraham	39654943
+37	38011	groupings	5987435
+37	38012	dissociate	28357832
+37	38013	coexist	39654943
+37	38101	rusting	5987435
+37	38102	galling	28357832
+37	38103	obliterates	39654943
+37	38201	resumes	5987435
+37	38202	analyzable	28357832
+37	38203	terminator	39654943
+select sum(price) from t3,t2 where t2.fld1 = t3.t2nr and t3.companynr = 512 and t3.t2nr = 38008 and t2.fld1 = 38008 or t2.fld1= t3.t2nr and t3.t2nr = 38008 and t2.fld1 = 38008;
+sum(price)
+234298
+select t2.fld1,sum(price) from t3,t2 where t2.fld1 = t3.t2nr and t3.companynr = 512 and t3.t2nr = 38008 and t2.fld1 = 38008 or t2.fld1 = t3.t2nr and t3.t2nr = 38008 and t2.fld1 = 38008 or t3.t2nr = t2.fld1 and t2.fld1 = 38008 group by t2.fld1;
+fld1	sum(price)
+038008	234298
+explain select fld3 from t2 where 1>2 or 2>3;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Impossible WHERE
+explain select fld3 from t2 where fld1=fld1;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	1199	
+select companynr,fld1 from t2 HAVING fld1=250501 or fld1=250502;
+companynr	fld1
+34	250501
+34	250502
+select companynr,fld1 from t2 WHERE fld1>=250501 HAVING fld1<=250502;
+companynr	fld1
+34	250501
+34	250502
+select companynr,count(*) as count,sum(fld1) as sum from t2 group by companynr having count > 40 and sum/count >= 120000;
+companynr	count	sum
+00	82	10355753
+29	95	14473298
+34	70	17788966
+37	588	83602098
+41	52	12816335
+select companynr from t2 group by companynr having count(*) > 40 and sum(fld1)/count(*) >= 120000 ;
+companynr
+00
+29
+34
+37
+41
+select t2.companynr,companyname,count(*) from t2,t4 where t2.companynr=t4.companynr group by companyname having t2.companynr >= 40;
+companynr	companyname	count(*)
+68	company 10	12
+50	company 11	11
+40	company 5	37
+41	company 6	52
+53	company 7	4
+58	company 8	23
+65	company 9	10
+select count(*) from t2;
+count(*)
+1199
+select count(*) from t2 where fld1 < 098024;
+count(*)
+387
+select min(fld1) from t2 where fld1>= 098024;
+min(fld1)
+98024
+select max(fld1) from t2 where fld1>= 098024;
+max(fld1)
+1232609
+select count(*) from t3 where price2=76234234;
+count(*)
+4181
+select count(*) from t3 where companynr=512 and price2=76234234;
+count(*)
+4181
+explain select min(fld1),max(fld1),count(*) from t2;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Select tables optimized away
+select min(fld1),max(fld1),count(*) from t2;
+min(fld1)	max(fld1)	count(*)
+0	1232609	1199
+select min(t2nr),max(t2nr) from t3 where t2nr=2115 and price2=823742;
+min(t2nr)	max(t2nr)
+2115	2115
+select count(*),min(t2nr),max(t2nr) from t3 where name='spates' and companynr=78;
+count(*)	min(t2nr)	max(t2nr)
+4181	4	41804
+select t2nr,count(*) from t3 where name='gems' group by t2nr limit 20;
+t2nr	count(*)
+9	1
+19	1
+29	1
+39	1
+49	1
+59	1
+69	1
+79	1
+89	1
+99	1
+109	1
+119	1
+129	1
+139	1
+149	1
+159	1
+169	1
+179	1
+189	1
+199	1
+select max(t2nr) from t3 where price=983543950;
+max(t2nr)
+41807
+select t1.period from t3 = t1 limit 1;
+period
+1001
+select t1.period from t1 as t1 limit 1;
+period
+9410
+select t1.period as "Nuvarande period" from t1 as t1 limit 1;
+Nuvarande period
+9410
+select period as ok_period from t1 limit 1;
+ok_period
+9410
+select period as ok_period from t1 group by ok_period limit 1;
+ok_period
+9410
+select 1+1 as summa from t1 group by summa limit 1;
+summa
+2
+select period as "Nuvarande period" from t1 group by "Nuvarande period" limit 1;
+Nuvarande period
+9410
+show tables;
+Tables_in_test
+t1
+t2
+t3
+t4
+show tables from test like "s%";
+Tables_in_test (s%)
+show tables from test like "t?";
+Tables_in_test (t?)
+show full columns from t2;
+Field	Type	Collation	Null	Key	Default	Extra	Privileges	Comment
+auto	int(11)	NULL	NO	PRI	NULL	auto_increment	#	
+fld1	int(6) unsigned zerofill	NULL	NO	UNI	000000		#	
+companynr	tinyint(2) unsigned zerofill	NULL	NO		00		#	
+fld3	char(30)	latin1_swedish_ci	NO	MUL			#	
+fld4	char(35)	latin1_swedish_ci	NO				#	
+fld5	char(35)	latin1_swedish_ci	NO				#	
+fld6	char(4)	latin1_swedish_ci	NO				#	
+show full columns from t2 from test like 'f%';
+Field	Type	Collation	Null	Key	Default	Extra	Privileges	Comment
+fld1	int(6) unsigned zerofill	NULL	NO	UNI	000000		#	
+fld3	char(30)	latin1_swedish_ci	NO	MUL			#	
+fld4	char(35)	latin1_swedish_ci	NO				#	
+fld5	char(35)	latin1_swedish_ci	NO				#	
+fld6	char(4)	latin1_swedish_ci	NO				#	
+show full columns from t2 from test like 's%';
+Field	Type	Collation	Null	Key	Default	Extra	Privileges	Comment
+show keys from t2;
+Table	Non_unique	Key_name	Seq_in_index	Column_name	Collation	Cardinality	Sub_part	Packed	Null	Index_type	Comment
+t2	0	PRIMARY	1	auto	A	1199	NULL	NULL		BTREE	
+t2	0	fld1	1	fld1	A	1199	NULL	NULL		BTREE	
+t2	1	fld3	1	fld3	A	NULL	NULL	NULL		BTREE	
+drop table t4, t3, t2, t1;
+DO 1;
+DO benchmark(100,1+1),1,1;
+do default;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
+do foobar;
+ERROR 42S22: Unknown column 'foobar' in 'field list'
+CREATE TABLE t1 (
+id mediumint(8) unsigned NOT NULL auto_increment,
+pseudo varchar(35) NOT NULL default '',
+PRIMARY KEY  (id),
+UNIQUE KEY pseudo (pseudo)
+);
+INSERT INTO t1 (pseudo) VALUES ('test');
+INSERT INTO t1 (pseudo) VALUES ('test1');
+SELECT 1 as rnd1 from t1 where rand() > 2;
+rnd1
+DROP TABLE t1;
+CREATE TABLE t1 (gvid int(10) unsigned default NULL,  hmid int(10) unsigned default NULL,  volid int(10) unsigned default NULL,  mmid int(10) unsigned default NULL,  hdid int(10) unsigned default NULL,  fsid int(10) unsigned default NULL,  ctid int(10) unsigned default NULL,  dtid int(10) unsigned default NULL,  cost int(10) unsigned default NULL,  performance int(10) unsigned default NULL,  serialnumber bigint(20) unsigned default NULL,  monitored tinyint(3) unsigned default '1',  removed tinyint(3) unsigned default '0',  target tinyint(3) unsigned default '0',  dt_modified timestamp NOT NULL,  name varchar(255) binary default NULL,  description varchar(255) default NULL,  UNIQUE KEY hmid (hmid,volid)) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (200001,2,1,1,100,1,1,1,0,0,0,1,0,1,20020425060057,'\\\\ARKIVIO-TESTPDC\\E$',''),(200002,2,2,1,101,1,1,1,0,0,0,1,0,1,20020425060057,'\\\\ARKIVIO-TESTPDC\\C$',''),(200003,1,3,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,1,20020425060427,'c:',NULL);
+CREATE TABLE t2 (  hmid int(10) unsigned default NULL,  volid int(10) unsigned default NULL,  sampletid smallint(5) unsigned default NULL,  sampletime datetime default NULL,  samplevalue bigint(20) unsigned default NULL,  KEY idx1 (hmid,volid,sampletid,sampletime)) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (1,3,10,'2002-06-01 08:00:00',35),(1,3,1010,'2002-06-01 12:00:01',35);
+SELECT a.gvid, (SUM(CASE b.sampletid WHEN 140 THEN b.samplevalue ELSE 0 END)) as the_success,(SUM(CASE b.sampletid WHEN 141 THEN b.samplevalue ELSE 0 END)) as the_fail,(SUM(CASE b.sampletid WHEN 142 THEN b.samplevalue ELSE 0 END)) as the_size,(SUM(CASE b.sampletid WHEN 143 THEN b.samplevalue ELSE 0 END)) as the_time FROM t1 a, t2 b WHERE a.hmid = b.hmid AND a.volid = b.volid AND b.sampletime >= 'wrong-date-value' AND b.sampletime < 'wrong-date-value' AND b.sampletid IN (140, 141, 142, 143) GROUP BY a.gvid;
+gvid	the_success	the_fail	the_size	the_time
+Warnings:
+Warning	1292	Incorrect datetime value: 'wrong-date-value' for column 'sampletime' at row 1
+Warning	1292	Incorrect datetime value: 'wrong-date-value' for column 'sampletime' at row 1
+SELECT a.gvid, (SUM(CASE b.sampletid WHEN 140 THEN b.samplevalue ELSE 0 END)) as the_success,(SUM(CASE b.sampletid WHEN 141 THEN b.samplevalue ELSE 0 END)) as the_fail,(SUM(CASE b.sampletid WHEN 142 THEN b.samplevalue ELSE 0 END)) as the_size,(SUM(CASE b.sampletid WHEN 143 THEN b.samplevalue ELSE 0 END)) as the_time FROM t1 a, t2 b WHERE a.hmid = b.hmid AND a.volid = b.volid AND b.sampletime >= NULL AND b.sampletime < NULL AND b.sampletid IN (140, 141, 142, 143) GROUP BY a.gvid;
+gvid	the_success	the_fail	the_size	the_time
+DROP TABLE t1,t2;
+create table  t1 (  A_Id bigint(20) NOT NULL default '0',  A_UpdateBy char(10) NOT NULL default '',  A_UpdateDate bigint(20) NOT NULL default '0',  A_UpdateSerial int(11) NOT NULL default '0',  other_types bigint(20) NOT NULL default '0',  wss_type bigint(20) NOT NULL default '0');
+INSERT INTO t1 VALUES (102935998719055004,'brade',1029359987,2,102935229116544068,102935229216544093);
+select wss_type from t1 where wss_type ='102935229216544106';
+wss_type
+select wss_type from t1 where wss_type ='102935229216544105';
+wss_type
+select wss_type from t1 where wss_type ='102935229216544104';
+wss_type
+select wss_type from t1 where wss_type ='102935229216544093';
+wss_type
+102935229216544093
+select wss_type from t1 where wss_type =102935229216544093;
+wss_type
+102935229216544093
+drop table t1;
+select 1+2,"aaaa",3.13*2.0 into @a, at b, at c;
+select @a;
+ at a
+3
+select @b;
+ at b
+aaaa
+select @c;
+ at c
+6.260
+create table t1 (a int not null auto_increment primary key);
+insert into t1 values ();
+insert into t1 values ();
+insert into t1 values ();
+select * from (t1 as t2 left join t1 as t3 using (a)), t1;
+a	a
+1	1
+2	1
+3	1
+1	2
+2	2
+3	2
+1	3
+2	3
+3	3
+select * from t1, (t1 as t2 left join t1 as t3 using (a));
+a	a
+1	1
+2	1
+3	1
+1	2
+2	2
+3	2
+1	3
+2	3
+3	3
+select * from (t1 as t2 left join t1 as t3 using (a)) straight_join t1;
+a	a
+1	1
+2	1
+3	1
+1	2
+2	2
+3	2
+1	3
+2	3
+3	3
+select * from t1 straight_join (t1 as t2 left join t1 as t3 using (a));
+a	a
+1	1
+2	1
+3	1
+1	2
+2	2
+3	2
+1	3
+2	3
+3	3
+select * from (t1 as t2 left join t1 as t3 using (a)) inner join t1 on t1.a>1;
+a	a
+1	2
+2	2
+3	2
+1	3
+2	3
+3	3
+select * from t1 inner join (t1 as t2 left join t1 as t3 using (a)) on t1.a>1;
+a	a
+2	1
+3	1
+2	2
+3	2
+2	3
+3	3
+select * from (t1 as t2 left join t1 as t3 using (a)) inner join t1 using ( a );
+a
+1
+2
+3
+select * from t1 inner join (t1 as t2 left join t1 as t3 using (a)) using ( a );
+a
+1
+2
+3
+select * from (t1 as t2 left join t1 as t3 using (a)) left outer join t1 on t1.a>1;
+a	a
+1	2
+1	3
+2	2
+2	3
+3	2
+3	3
+select * from t1 left outer join (t1 as t2 left join t1 as t3 using (a)) on t1.a>1;
+a	a
+1	NULL
+2	1
+2	2
+2	3
+3	1
+3	2
+3	3
+select * from (t1 as t2 left join t1 as t3 using (a)) left join t1 using ( a );
+a
+1
+2
+3
+select * from t1 left join (t1 as t2 left join t1 as t3 using (a)) using ( a );
+a
+1
+2
+3
+select * from (t1 as t2 left join t1 as t3 using (a)) natural left join t1;
+a
+1
+2
+3
+select * from t1 natural left join (t1 as t2 left join t1 as t3 using (a));
+a
+1
+2
+3
+select * from (t1 as t2 left join t1 as t3 using (a)) right join t1 on t1.a>1;
+a	a
+NULL	1
+1	2
+2	2
+3	2
+1	3
+2	3
+3	3
+select * from t1 right join (t1 as t2 left join t1 as t3 using (a)) on t1.a>1;
+a	a
+2	1
+3	1
+2	2
+3	2
+2	3
+3	3
+select * from (t1 as t2 left join t1 as t3 using (a)) right outer join t1 using ( a );
+a
+1
+2
+3
+select * from t1 right outer join (t1 as t2 left join t1 as t3 using (a)) using ( a );
+a
+1
+2
+3
+select * from (t1 as t2 left join t1 as t3 using (a)) natural right join t1;
+a
+1
+2
+3
+select * from t1 natural right join (t1 as t2 left join t1 as t3 using (a));
+a
+1
+2
+3
+select * from t1 natural join (t1 as t2 left join t1 as t3 using (a));
+a
+1
+2
+3
+select * from (t1 as t2 left join t1 as t3 using (a)) natural join t1;
+a
+1
+2
+3
+drop table t1;
+CREATE TABLE t1 (  aa char(2),  id int(11) NOT NULL auto_increment,  t2_id int(11) NOT NULL default '0',  PRIMARY KEY  (id),  KEY replace_id (t2_id)) ENGINE=MyISAM;
+INSERT INTO t1 VALUES ("1",8264,2506),("2",8299,2517),("3",8301,2518),("4",8302,2519),("5",8303,2520),("6",8304,2521),("7",8305,2522);
+CREATE TABLE t2 ( id int(11) NOT NULL auto_increment,  PRIMARY KEY  (id)) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (2517), (2518), (2519), (2520), (2521), (2522);
+select * from t1, t2 WHERE t1.t2_id = t2.id and t1.t2_id > 0   order by t1.id   LIMIT 0, 5;
+aa	id	t2_id	id
+2	8299	2517	2517
+3	8301	2518	2518
+4	8302	2519	2519
+5	8303	2520	2520
+6	8304	2521	2521
+drop table t1,t2;
+create table t1 (id1 int NOT NULL);
+create table t2 (id2 int NOT NULL);
+create table t3 (id3 int NOT NULL);
+create table t4 (id4 int NOT NULL, id44 int NOT NULL, KEY (id4));
+insert into t1 values (1);
+insert into t1 values (2);
+insert into t2 values (1);
+insert into t4 values (1,1);
+explain select * from t1 left join t2 on id1 = id2 left join t3 on id1 = id3
+left join t4 on id3 = id4 where id2 = 1 or id4 = 1;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t3	system	NULL	NULL	NULL	NULL	0	const row not found
+1	SIMPLE	t4	const	id4	NULL	NULL	NULL	1	
+1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	2	
+1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	1	Using where
+select * from t1 left join t2 on id1 = id2 left join t3 on id1 = id3
+left join t4 on id3 = id4 where id2 = 1 or id4 = 1;
+id1	id2	id3	id4	id44
+1	1	NULL	NULL	NULL
+drop table t1,t2,t3,t4;
+create table t1(s varchar(10) not null);
+create table t2(s varchar(10) not null primary key);
+create table t3(s varchar(10) not null primary key);
+insert into t1 values ('one\t'), ('two\t');
+insert into t2 values ('one\r'), ('two\t');
+insert into t3 values ('one '), ('two\t');
+select * from t1 where s = 'one';
+s
+select * from t2 where s = 'one';
+s
+select * from t3 where s = 'one';
+s
+one 
+select * from t1,t2 where t1.s = t2.s;
+s	s
+two		two	
+select * from t2,t3 where t2.s = t3.s;
+s	s
+two		two	
+drop table t1, t2, t3;
+create table t1 (a integer,  b integer, index(a), index(b));
+create table t2 (c integer,  d integer, index(c), index(d));
+insert into t1 values (1,2), (2,2), (3,2), (4,2);
+insert into t2 values (1,3), (2,3), (3,4), (4,4);
+explain select * from t1 left join t2 on a=c where d in (4);
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t2	ref	c,d	d	5	const	2	Using where
+1	SIMPLE	t1	ALL	a	NULL	NULL	NULL	4	Using where; Using join buffer
+select * from t1 left join t2 on a=c where d in (4);
+a	b	c	d
+3	2	3	4
+4	2	4	4
+explain select * from t1 left join t2 on a=c where d = 4;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t2	ref	c,d	d	5	const	2	Using where
+1	SIMPLE	t1	ALL	a	NULL	NULL	NULL	4	Using where; Using join buffer
+select * from t1 left join t2 on a=c where d = 4;
+a	b	c	d
+3	2	3	4
+4	2	4	4
+drop table t1, t2;
+CREATE TABLE t1 (
+i int(11) NOT NULL default '0',
+c char(10) NOT NULL default '',
+PRIMARY KEY  (i),
+UNIQUE KEY c (c)
+) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (1,'a');
+INSERT INTO t1 VALUES (2,'b');
+INSERT INTO t1 VALUES (3,'c');
+EXPLAIN SELECT i FROM t1 WHERE i=1;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	const	PRIMARY	PRIMARY	4	const	1	Using index
+DROP TABLE t1;
+CREATE TABLE t1 ( a BLOB, INDEX (a(20)) );
+CREATE TABLE t2 ( a BLOB, INDEX (a(20)) );
+INSERT INTO t1 VALUES ('one'),('two'),('three'),('four'),('five');
+INSERT INTO t2 VALUES ('one'),('two'),('three'),('four'),('five');
+EXPLAIN SELECT * FROM t1 LEFT JOIN t2 USE INDEX (a) ON t1.a=t2.a;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	5	
+1	SIMPLE	t2	ref	a	a	23	test.t1.a	2	
+EXPLAIN SELECT * FROM t1 LEFT JOIN t2 FORCE INDEX (a) ON t1.a=t2.a;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	5	
+1	SIMPLE	t2	ref	a	a	23	test.t1.a	2	
+DROP TABLE t1, t2;
+CREATE TABLE t1 ( city char(30) );
+INSERT INTO t1 VALUES ('London');
+INSERT INTO t1 VALUES ('Paris');
+SELECT * FROM t1 WHERE city='London';
+city
+London
+SELECT * FROM t1 WHERE city='london';
+city
+London
+EXPLAIN SELECT * FROM t1 WHERE city='London' AND city='london';
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	2	Using where
+SELECT * FROM t1 WHERE city='London' AND city='london';
+city
+London
+EXPLAIN SELECT * FROM t1 WHERE city LIKE '%london%' AND city='London';
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	2	Using where
+SELECT * FROM t1 WHERE city LIKE '%london%' AND city='London';
+city
+London
+DROP TABLE t1;
+create table t1 (a int(11) unsigned, b int(11) unsigned);
+insert into t1 values (1,0), (1,1), (1,2);
+select a-b  from t1 order by 1;
+a-b
+0
+1
+18446744073709551615
+select a-b , (a-b < 0)  from t1 order by 1;
+a-b	(a-b < 0)
+0	0
+1	0
+18446744073709551615	0
+select a-b as d, (a-b >= 0), b from t1 group by b having d >= 0;
+d	(a-b >= 0)	b
+1	1	0
+0	1	1
+18446744073709551615	1	2
+select cast((a - b) as unsigned) from t1 order by 1;
+cast((a - b) as unsigned)
+0
+1
+18446744073709551615
+drop table t1;
+create table t1 (a int(11));
+select all all * from t1;
+a
+select distinct distinct * from t1;
+a
+select all distinct * from t1;
+ERROR HY000: Incorrect usage of ALL and DISTINCT
+select distinct all * from t1;
+ERROR HY000: Incorrect usage of ALL and DISTINCT
+drop table t1;
+CREATE TABLE t1 (
+kunde_intern_id int(10) unsigned NOT NULL default '0',
+kunde_id int(10) unsigned NOT NULL default '0',
+FK_firma_id int(10) unsigned NOT NULL default '0',
+aktuell enum('Ja','Nein') NOT NULL default 'Ja',
+vorname varchar(128) NOT NULL default '',
+nachname varchar(128) NOT NULL default '',
+geloescht enum('Ja','Nein') NOT NULL default 'Nein',
+firma varchar(128) NOT NULL default ''
+);
+INSERT INTO t1 VALUES 
+(3964,3051,1,'Ja','Vorname1','1Nachname','Nein','Print Schau XXXX'),
+(3965,3051111,1,'Ja','Vorname1111','1111Nachname','Nein','Print Schau XXXX');
+SELECT kunde_id ,FK_firma_id ,aktuell, vorname, nachname, geloescht FROM t1
+WHERE
+(
+(
+( '' != '' AND firma LIKE CONCAT('%', '', '%'))
+OR
+(vorname LIKE CONCAT('%', 'Vorname1', '%') AND 
+nachname LIKE CONCAT('%', '1Nachname', '%') AND 
+'Vorname1' != '' AND 'xxxx' != '')
+)
+AND
+(
+aktuell = 'Ja' AND geloescht = 'Nein' AND FK_firma_id = 2
+)
+)
+;
+kunde_id	FK_firma_id	aktuell	vorname	nachname	geloescht
+SELECT kunde_id ,FK_firma_id ,aktuell, vorname, nachname,
+geloescht FROM t1
+WHERE
+(
+(
+aktuell = 'Ja' AND geloescht = 'Nein' AND FK_firma_id = 2
+)
+AND
+(
+( '' != '' AND firma LIKE CONCAT('%', '', '%')  )
+OR
+(  vorname LIKE CONCAT('%', 'Vorname1', '%') AND
+nachname LIKE CONCAT('%', '1Nachname', '%') AND 'Vorname1' != '' AND
+'xxxx' != '')
+)
+)
+;
+kunde_id	FK_firma_id	aktuell	vorname	nachname	geloescht
+SELECT COUNT(*) FROM t1 WHERE 
+( 0 OR (vorname LIKE '%Vorname1%' AND nachname LIKE '%1Nachname%' AND 1)) 
+AND FK_firma_id = 2;
+COUNT(*)
+0
+drop table t1;
+CREATE TABLE t1 (b BIGINT(20) UNSIGNED NOT NULL, PRIMARY KEY (b));
+INSERT INTO t1 VALUES (0x8000000000000000);
+SELECT b FROM t1 WHERE b=0x8000000000000000;
+b
+9223372036854775808
+DROP TABLE t1;
+CREATE TABLE `t1` ( `gid` int(11) default NULL, `uid` int(11) default NULL);
+CREATE TABLE `t2` ( `ident` int(11) default NULL, `level` char(16) default NULL);
+INSERT INTO `t2` VALUES (0,'READ');
+CREATE TABLE `t3` ( `id` int(11) default NULL, `name` char(16) default NULL);
+INSERT INTO `t3` VALUES (1,'fs');
+select * from t3 left join t1 on t3.id = t1.uid, t2 where t2.ident in (0, t1.gid, t3.id, 0);
+id	name	gid	uid	ident	level
+1	fs	NULL	NULL	0	READ
+drop table t1,t2,t3;
+CREATE TABLE t1 (
+acct_id int(11) NOT NULL default '0',
+profile_id smallint(6) default NULL,
+UNIQUE KEY t1$acct_id (acct_id),
+KEY t1$profile_id (profile_id)
+);
+INSERT INTO t1 VALUES (132,17),(133,18);
+CREATE TABLE t2 (
+profile_id smallint(6) default NULL,
+queue_id int(11) default NULL,
+seq int(11) default NULL,
+KEY t2$queue_id (queue_id)
+);
+INSERT INTO t2 VALUES (17,31,4),(17,30,3),(17,36,2),(17,37,1);
+CREATE TABLE t3 (
+id int(11) NOT NULL default '0',
+qtype int(11) default NULL,
+seq int(11) default NULL,
+warn_lvl int(11) default NULL,
+crit_lvl int(11) default NULL,
+rr1 tinyint(4) NOT NULL default '0',
+rr2 int(11) default NULL,
+default_queue tinyint(4) NOT NULL default '0',
+KEY t3$qtype (qtype),
+KEY t3$id (id)
+);
+INSERT INTO t3 VALUES (30,1,29,NULL,NULL,0,NULL,0),(31,1,28,NULL,NULL,0,NULL,0),
+(36,1,34,NULL,NULL,0,NULL,0),(37,1,35,NULL,NULL,0,121,0);
+SELECT COUNT(*) FROM t1 a STRAIGHT_JOIN t2 pq STRAIGHT_JOIN t3 q 
+WHERE 
+(pq.profile_id = a.profile_id) AND (a.acct_id = 132) AND 
+(pq.queue_id = q.id) AND (q.rr1 <> 1);
+COUNT(*)
+4
+drop table t1,t2,t3;
+create table t1 (f1 int);
+insert into t1 values (1),(NULL);
+create table t2 (f2 int, f3 int, f4 int);
+create index idx1 on t2 (f4);
+insert into t2 values (1,2,3),(2,4,6);
+select A.f2 from t1 left join t2 A on A.f2 = f1 where A.f3=(select min(f3)
+from  t2 C where A.f4 = C.f4) or A.f3 IS NULL;
+f2
+1
+NULL
+drop table t1,t2;
+create table t2 (a tinyint unsigned);
+create index t2i on t2(a);
+insert into t2 values (0), (254), (255);
+explain select * from t2 where a > -1;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t2	index	t2i	t2i	2	NULL	3	Using where; Using index
+select * from t2 where a > -1;
+a
+0
+254
+255
+drop table t2;
+CREATE TABLE t1 (a int, b int, c int);
+INSERT INTO t1
+SELECT 50, 3, 3 FROM DUAL
+WHERE NOT EXISTS
+(SELECT * FROM t1 WHERE a = 50 AND b = 3);
+SELECT * FROM t1;
+a	b	c
+50	3	3
+INSERT INTO t1
+SELECT 50, 3, 3 FROM DUAL
+WHERE NOT EXISTS
+(SELECT * FROM t1 WHERE a = 50 AND b = 3);
+select found_rows();
+found_rows()
+0
+SELECT * FROM t1;
+a	b	c
+50	3	3
+select count(*) from t1;
+count(*)
+1
+select found_rows();
+found_rows()
+1
+select count(*) from t1 limit 2,3;
+count(*)
+select found_rows();
+found_rows()
+0
+select SQL_CALC_FOUND_ROWS count(*) from t1 limit 2,3;
+count(*)
+select found_rows();
+found_rows()
+1
+DROP TABLE t1;
+CREATE TABLE t1 (a INT, b INT);
+(SELECT a, b AS c FROM t1) ORDER BY c+1;
+a	c
+(SELECT a, b AS c FROM t1) ORDER BY b+1;
+a	c
+SELECT a, b AS c FROM t1 ORDER BY c+1;
+a	c
+SELECT a, b AS c FROM t1 ORDER BY b+1;
+a	c
+drop table t1;
+create table t1(f1 int, f2 int);
+create table t2(f3 int);
+select f1 from t1,t2 where f1=f2 and (f1,f2) = ((1,1));
+f1
+select f1 from t1,t2 where f1=f2 and (f1,NULL) = ((1,1));
+f1
+select f1 from t1,t2 where f1=f2 and (f1,f2) = ((1,NULL));
+f1
+insert into t1 values(1,1),(2,null);
+insert into t2 values(2);
+select * from t1,t2 where f1=f3 and (f1,f2) = (2,null);
+f1	f2	f3
+select * from t1,t2 where f1=f3 and (f1,f2) <=> (2,null);
+f1	f2	f3
+2	NULL	2
+drop table t1,t2;
+create table t1 (f1 int not null auto_increment primary key, f2 varchar(10));
+create table t11 like t1;
+insert into t1 values(1,""),(2,"");
+show table status like 't1%';
+Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment
+t1	MyISAM	10	Dynamic	2	20	X	X	X	X	X	X	X	X	latin1_swedish_ci	NULL		
+t11	MyISAM	10	Dynamic	0	0	X	X	X	X	X	X	X	X	latin1_swedish_ci	NULL		
+select 123 as a from t1 where f1 is null;
+a
+drop table t1,t11;
+CREATE TABLE t1 ( a INT NOT NULL, b INT NOT NULL, UNIQUE idx (a,b) );
+INSERT INTO t1 VALUES (1,1),(1,2),(1,3),(1,4);
+CREATE TABLE t2 ( a INT NOT NULL, b INT NOT NULL, e INT );
+INSERT INTO t2 VALUES ( 1,10,1), (1,10,2), (1,11,1), (1,11,2), (1,2,1), (1,2,2),(1,2,3);
+SELECT t2.a, t2.b, IF(t1.b IS NULL,'',e) AS c, COUNT(*) AS d FROM t2 LEFT JOIN
+t1 ON t2.a = t1.a AND t2.b = t1.b GROUP BY a, b, c;
+a	b	c	d
+1	2	1	1
+1	2	2	1
+1	2	3	1
+1	10		2
+1	11		2
+SELECT t2.a, t2.b, IF(t1.b IS NULL,'',e) AS c, COUNT(*) AS d FROM t2 LEFT JOIN
+t1 ON t2.a = t1.a AND t2.b = t1.b GROUP BY t1.a, t1.b, c;
+a	b	c	d
+1	10		4
+1	2	1	1
+1	2	2	1
+1	2	3	1
+SELECT t2.a, t2.b, IF(t1.b IS NULL,'',e) AS c, COUNT(*) AS d FROM t2 LEFT JOIN
+t1 ON t2.a = t1.a AND t2.b = t1.b GROUP BY t2.a, t2.b, c;
+a	b	c	d
+1	2	1	1
+1	2	2	1
+1	2	3	1
+1	10		2
+1	11		2
+SELECT t2.a, t2.b, IF(t1.b IS NULL,'',e) AS c, COUNT(*) AS d FROM t2,t1
+WHERE t2.a = t1.a AND t2.b = t1.b GROUP BY a, b, c;
+a	b	c	d
+1	2	1	1
+1	2	2	1
+1	2	3	1
+DROP TABLE IF EXISTS t1, t2;
+create table t1 (f1 int primary key, f2 int);
+create table t2 (f3 int, f4 int, primary key(f3,f4));
+insert into t1 values (1,1);
+insert into t2 values (1,1),(1,2);
+select distinct count(f2) >0 from t1 left join t2 on f1=f3 group by f1;
+count(f2) >0
+1
+drop table t1,t2;
+create table t1 (f1 int,f2 int);
+insert into t1 values(1,1);
+create table t2 (f3 int, f4 int, primary key(f3,f4));
+insert into t2 values(1,1);
+select * from t1 where f1 in (select f3 from t2 where (f3,f4)= (select f3,f4 from t2));
+f1	f2
+1	1
+drop table t1,t2;
+CREATE TABLE t1(a int, b int, c int, KEY b(b), KEY c(c));
+insert into t1 values (1,0,0),(2,0,0);
+CREATE TABLE t2 (a int, b varchar(2), c varchar(2), PRIMARY KEY(a));
+insert into t2 values (1,'',''), (2,'','');
+CREATE TABLE t3 (a int, b int, PRIMARY KEY (a,b), KEY a (a), KEY b (b));
+insert into t3 values (1,1),(1,2);
+explain select straight_join DISTINCT t2.a,t2.b, t1.c from t1, t3, t2 
+where (t1.c=t2.a or (t1.c=t3.a and t2.a=t3.b)) and t1.b=556476786 and 
+t2.b like '%%' order by t2.b limit 0,1;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	ref	b,c	b	5	const	1	Using where; Using temporary; Using filesort
+1	SIMPLE	t3	index	PRIMARY,a,b	PRIMARY	8	NULL	2	Using index; Using join buffer
+1	SIMPLE	t2	ALL	PRIMARY	NULL	NULL	NULL	2	Range checked for each record (index map: 0x1)
+DROP TABLE t1,t2,t3;
+CREATE TABLE t1 (a int, INDEX idx(a));
+INSERT INTO t1 VALUES (2), (3), (1);
+EXPLAIN SELECT * FROM t1 IGNORE INDEX (idx);
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	3	
+EXPLAIN SELECT * FROM t1 IGNORE INDEX (a);
+ERROR 42000: Key 'a' doesn't exist in table 't1'
+EXPLAIN SELECT * FROM t1 FORCE INDEX (a);
+ERROR 42000: Key 'a' doesn't exist in table 't1'
+DROP TABLE t1;
+CREATE TABLE t1 (a int, b int);
+INSERT INTO t1 VALUES (1,1), (2,1), (4,10);
+CREATE TABLE t2 (a int PRIMARY KEY, b int, KEY b (b));
+INSERT INTO t2 VALUES (1,NULL), (2,10);
+ALTER TABLE t1 ENABLE KEYS;
+EXPLAIN SELECT STRAIGHT_JOIN SQL_NO_CACHE COUNT(*) FROM t2, t1 WHERE t1.b = t2.b OR t2.b IS NULL;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t2	index	b	b	5	NULL	2	Using index
+1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	3	Using where; Using join buffer
+SELECT STRAIGHT_JOIN SQL_NO_CACHE * FROM t2, t1 WHERE t1.b = t2.b OR t2.b IS NULL;
+a	b	a	b
+1	NULL	1	1
+1	NULL	2	1
+1	NULL	4	10
+2	10	4	10
+EXPLAIN SELECT STRAIGHT_JOIN SQL_NO_CACHE COUNT(*) FROM t2, t1 WHERE t1.b = t2.b OR t2.b IS NULL;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t2	index	b	b	5	NULL	2	Using index
+1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	3	Using where; Using join buffer
+SELECT STRAIGHT_JOIN SQL_NO_CACHE * FROM t2, t1 WHERE t1.b = t2.b OR t2.b IS NULL;
+a	b	a	b
+1	NULL	1	1
+1	NULL	2	1
+1	NULL	4	10
+2	10	4	10
+DROP TABLE IF EXISTS t1,t2;
+CREATE TABLE t1 (key1 float default NULL, UNIQUE KEY key1 (key1));
+CREATE TABLE t2 (key2 float default NULL, UNIQUE KEY key2 (key2));
+INSERT INTO t1 VALUES (0.3762),(0.3845),(0.6158),(0.7941);
+INSERT INTO t2 VALUES (1.3762),(1.3845),(1.6158),(1.7941);
+explain select max(key1) from t1 where key1 <= 0.6158;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Select tables optimized away
+explain select max(key2) from t2 where key2 <= 1.6158;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Select tables optimized away
+explain select min(key1) from t1 where key1 >= 0.3762;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Select tables optimized away
+explain select min(key2) from t2 where key2 >= 1.3762;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Select tables optimized away
+explain select max(key1), min(key2) from t1, t2
+where key1 <= 0.6158 and key2 >= 1.3762;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Select tables optimized away
+explain select max(key1) from t1 where key1 <= 0.6158 and rand() + 0.5 >= 0.5;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Select tables optimized away
+explain select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Select tables optimized away
+select max(key1) from t1 where key1 <= 0.6158;
+max(key1)
+0.615800023078918
+select max(key2) from t2 where key2 <= 1.6158;
+max(key2)
+1.61580002307892
+select min(key1) from t1 where key1 >= 0.3762;
+min(key1)
+0.376199990510941
+select min(key2) from t2 where key2 >= 1.3762;
+min(key2)
+1.37619996070862
+select max(key1), min(key2) from t1, t2
+where key1 <= 0.6158 and key2 >= 1.3762;
+max(key1)	min(key2)
+0.615800023078918	1.37619996070862
+select max(key1) from t1 where key1 <= 0.6158 and rand() + 0.5 >= 0.5;
+max(key1)
+0.615800023078918
+select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5;
+min(key1)
+0.376199990510941
+DROP TABLE t1,t2;
+CREATE TABLE t1 (i BIGINT UNSIGNED NOT NULL);
+INSERT INTO t1 VALUES (10);
+SELECT i='1e+01',i=1e+01, i in (1e+01,1e+01), i in ('1e+01','1e+01') FROM t1;
+i='1e+01'	i=1e+01	i in (1e+01,1e+01)	i in ('1e+01','1e+01')
+1	1	1	1
+DROP TABLE t1;
+create table t1(a bigint unsigned, b bigint);
+insert into t1 values (0xfffffffffffffffff, 0xfffffffffffffffff), 
+(0x10000000000000000, 0x10000000000000000), 
+(0x8fffffffffffffff, 0x8fffffffffffffff);
+Warnings:
+Warning	1264	Out of range value for column 'a' at row 1
+Warning	1264	Out of range value for column 'b' at row 1
+Warning	1264	Out of range value for column 'a' at row 2
+Warning	1264	Out of range value for column 'b' at row 2
+Warning	1264	Out of range value for column 'b' at row 3
+select hex(a), hex(b) from t1;
+hex(a)	hex(b)
+FFFFFFFFFFFFFFFF	7FFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFF	7FFFFFFFFFFFFFFF
+8FFFFFFFFFFFFFFF	7FFFFFFFFFFFFFFF
+drop table t1;
+CREATE TABLE t1 (c0 int);
+CREATE TABLE t2 (c0 int);
+INSERT INTO t1 VALUES(@@connect_timeout);
+INSERT INTO t2 VALUES(@@connect_timeout);
+SELECT * FROM t1 JOIN t2 ON t1.c0 = t2.c0 WHERE (t1.c0 <=> @@connect_timeout);
+c0	c0
+X	X
+DROP TABLE t1, t2;
+End of 4.1 tests
+CREATE TABLE t1 ( 
+K2C4 varchar(4) character set latin1 collate latin1_bin NOT NULL default '', 
+K4N4 varchar(4) character set latin1 collate latin1_bin NOT NULL default '0000', 
+F2I4 int(11) NOT NULL default '0' 
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+INSERT INTO t1 VALUES 
+('W%RT', '0100',  1), 
+('W-RT', '0100', 1), 
+('WART', '0100', 1), 
+('WART', '0200', 1), 
+('WERT', '0100', 2), 
+('WORT','0200', 2), 
+('WT', '0100', 2), 
+('W_RT', '0100', 2), 
+('WaRT', '0100', 3), 
+('WART', '0300', 3), 
+('WRT' , '0400', 3), 
+('WURM', '0500', 3), 
+('W%T', '0600', 4), 
+('WA%T', '0700', 4), 
+('WA_T', '0800', 4);
+SELECT K2C4, K4N4, F2I4 FROM t1
+WHERE  K2C4 = 'WART' AND 
+(F2I4 = 2 AND K2C4 = 'WART' OR (F2I4 = 2 OR K4N4 = '0200'));
+K2C4	K4N4	F2I4
+WART	0200	1
+SELECT K2C4, K4N4, F2I4 FROM t1
+WHERE  K2C4 = 'WART' AND (K2C4 = 'WART' OR K4N4 = '0200');
+K2C4	K4N4	F2I4
+WART	0100	1
+WART	0200	1
+WART	0300	3
+DROP TABLE t1;
+create table t1 (a int, b int);
+create table t2 like t1;
+select t1.a from (t1 inner join t2 on t1.a=t2.a) where t2.a=1;
+a
+select t1.a from ((t1 inner join t2 on t1.a=t2.a)) where t2.a=1;
+a
+select x.a, y.a, z.a from ( (t1 x inner join t2 y on x.a=y.a) inner join t2 z on y.a=z.a) WHERE x.a=1;
+a	a	a
+drop table t1,t2;
+create table t1 (s1 varchar(5));
+insert into t1 values ('Wall');
+select min(s1) from t1 group by s1 with rollup;
+min(s1)
+Wall
+Wall
+drop table t1;
+create table t1 (s1 int) engine=myisam;
+insert into t1 values (0);
+select avg(distinct s1) from t1 group by s1 with rollup;
+avg(distinct s1)
+0.0000
+0.0000
+drop table t1;
+create table t1 (s1 int);
+insert into t1 values (null),(1);
+select distinct avg(s1) as x from t1 group by s1 with rollup;
+x
+NULL
+1.0000
+drop table t1;
+CREATE TABLE t1 (a int);
+CREATE TABLE t2 (a int);
+INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
+INSERT INTO t2 VALUES (2), (4), (6);
+SELECT t1.a FROM t1 STRAIGHT_JOIN t2 ON t1.a=t2.a;
+a
+2
+4
+EXPLAIN SELECT t1.a FROM t1 STRAIGHT_JOIN t2 ON t1.a=t2.a;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	5	
+1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	3	Using where; Using join buffer
+EXPLAIN SELECT t1.a FROM t1 INNER JOIN t2 ON t1.a=t2.a;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	3	
+1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	5	Using where; Using join buffer
+DROP TABLE t1,t2;
+select x'10' + 0, X'10' + 0, b'10' + 0, B'10' + 0;
+x'10' + 0	X'10' + 0	b'10' + 0	B'10' + 0
+16	16	2	2
+create table t1 (f1 varchar(6) default NULL, f2 int(6) primary key not null);
+create table t2 (f3 varchar(5) not null, f4 varchar(5) not null, UNIQUE KEY UKEY (f3,f4));
+insert into t1 values (" 2", 2);
+insert into t2 values (" 2", " one "),(" 2", " two ");
+select * from t1 left join t2 on f1 = f3;
+f1	f2	f3	f4
+ 2	2	 2	 one 
+ 2	2	 2	 two 
+drop table t1,t2;
+create table t1 (empnum smallint, grp int);
+create table t2 (empnum int, name char(5));
+insert into t1 values(1,1);
+insert into t2 values(1,'bob');
+create view v1 as select * from t2 inner join t1 using (empnum);
+select * from v1;
+empnum	name	grp
+1	bob	1
+drop table t1,t2;
+drop view v1;
+create table t1 (pk int primary key, b int);
+create table t2 (pk int primary key, c int);
+select pk from t1 inner join t2 using (pk);
+pk
+drop table t1,t2;
+create table t1 (s1 int, s2 char(5), s3 decimal(10));
+create view v1 as select s1, s2, 'x' as s3 from t1;
+select * from t1 natural join v1;
+s1	s2	s3
+insert into t1 values (1,'x',5);
+select * from t1 natural join v1;
+s1	s2	s3
+Warnings:
+Warning	1292	Truncated incorrect DOUBLE value: 'x'
+drop table t1;
+drop view v1;
+create table t1(a1 int);
+create table t2(a2 int);
+insert into t1 values(1),(2);
+insert into t2 values(1),(2);
+create view v2 (c) as select a1 from t1;
+select * from t1 natural left join t2;
+a1	a2
+1	1
+1	2
+2	1
+2	2
+select * from t1 natural right join t2;
+a2	a1
+1	1
+1	2
+2	1
+2	2
+select * from v2 natural left join t2;
+c	a2
+1	1
+1	2
+2	1
+2	2
+select * from v2 natural right join t2;
+a2	c
+1	1
+1	2
+2	1
+2	2
+drop table t1, t2;
+drop view v2;
+create table t1 (a int(10), t1_val int(10));
+create table t2 (b int(10), t2_val int(10));
+create table t3 (a int(10), b int(10));
+insert into t1 values (1,1),(2,2);
+insert into t2 values (1,1),(2,2),(3,3);
+insert into t3 values (1,1),(2,1),(3,1),(4,1);
+select * from t1 natural join t2 natural join t3;
+a	b	t1_val	t2_val
+1	1	1	1
+2	1	2	1
+select * from t1 natural join t3 natural join t2;
+b	a	t1_val	t2_val
+1	1	1	1
+1	2	2	1
+drop table t1, t2, t3;
+DO IFNULL(NULL, NULL);
+SELECT CAST(IFNULL(NULL, NULL) AS DECIMAL);
+CAST(IFNULL(NULL, NULL) AS DECIMAL)
+NULL
+SELECT ABS(IFNULL(NULL, NULL));
+ABS(IFNULL(NULL, NULL))
+NULL
+SELECT IFNULL(NULL, NULL);
+IFNULL(NULL, NULL)
+NULL
+SET @OLD_SQL_MODE12595=@@SQL_MODE, @@SQL_MODE='';
+SHOW LOCAL VARIABLES LIKE 'SQL_MODE';
+Variable_name	Value
+sql_mode	
+CREATE TABLE BUG_12595(a varchar(100));
+INSERT INTO BUG_12595 VALUES ('hakan%'), ('hakank'), ("ha%an");
+SELECT * FROM BUG_12595 WHERE a LIKE 'hakan\%';
+a
+hakan%
+SELECT * FROM BUG_12595 WHERE a LIKE 'hakan*%' ESCAPE '*';
+a
+hakan%
+SELECT * FROM BUG_12595 WHERE a LIKE 'hakan**%' ESCAPE '**';
+ERROR HY000: Incorrect arguments to ESCAPE
+SELECT * FROM BUG_12595 WHERE a LIKE 'hakan%' ESCAPE '';
+a
+hakan%
+hakank
+SELECT * FROM BUG_12595 WHERE a LIKE 'hakan\%' ESCAPE '';
+a
+SELECT * FROM BUG_12595 WHERE a LIKE 'ha\%an' ESCAPE 0x5c;
+a
+ha%an
+SELECT * FROM BUG_12595 WHERE a LIKE 'ha%%an' ESCAPE '%';
+a
+ha%an
+SELECT * FROM BUG_12595 WHERE a LIKE 'ha\%an' ESCAPE '\\';
+a
+ha%an
+SELECT * FROM BUG_12595 WHERE a LIKE 'ha|%an' ESCAPE '|';
+a
+ha%an
+SET @@SQL_MODE='NO_BACKSLASH_ESCAPES';
+SHOW LOCAL VARIABLES LIKE 'SQL_MODE';
+Variable_name	Value
+sql_mode	NO_BACKSLASH_ESCAPES
+SELECT * FROM BUG_12595 WHERE a LIKE 'hakan\%';
+a
+SELECT * FROM BUG_12595 WHERE a LIKE 'hakan*%' ESCAPE '*';
+a
+hakan%
+SELECT * FROM BUG_12595 WHERE a LIKE 'hakan**%' ESCAPE '**';
+ERROR HY000: Incorrect arguments to ESCAPE
+SELECT * FROM BUG_12595 WHERE a LIKE 'hakan\%' ESCAPE '\\';
+ERROR HY000: Incorrect arguments to ESCAPE
+SELECT * FROM BUG_12595 WHERE a LIKE 'hakan%' ESCAPE '';
+ERROR HY000: Incorrect arguments to ESCAPE
+SELECT * FROM BUG_12595 WHERE a LIKE 'ha\%an' ESCAPE 0x5c;
+a
+ha%an
+SELECT * FROM BUG_12595 WHERE a LIKE 'ha|%an' ESCAPE '|';
+a
+ha%an
+SELECT * FROM BUG_12595 WHERE a LIKE 'hakan\n%' ESCAPE '\n';
+ERROR HY000: Incorrect arguments to ESCAPE
+SET @@SQL_MODE=@OLD_SQL_MODE12595;
+DROP TABLE BUG_12595;
+create table t1 (a char(1));
+create table t2 (a char(1));
+insert into t1 values ('a'),('b'),('c');
+insert into t2 values ('b'),('c'),('d');
+select a from t1 natural join t2;
+a
+b
+c
+select * from t1 natural join t2 where a = 'b';
+a
+b
+drop table t1, t2;
+CREATE TABLE t1 (`id` TINYINT);
+CREATE TABLE t2 (`id` TINYINT);
+CREATE TABLE t3 (`id` TINYINT);
+INSERT INTO t1 VALUES (1),(2),(3);
+INSERT INTO t2 VALUES (2);
+INSERT INTO t3 VALUES (3);
+SELECT t1.id,t3.id FROM t1 JOIN t2 ON (t2.id=t1.id) LEFT JOIN t3 USING (id);
+ERROR 23000: Column 'id' in from clause is ambiguous
+SELECT t1.id,t3.id FROM t1 JOIN t2 ON (t2.notacolumn=t1.id) LEFT JOIN t3 USING (id);
+ERROR 23000: Column 'id' in from clause is ambiguous
+SELECT id,t3.id FROM t1 JOIN t2 ON (t2.id=t1.id) LEFT JOIN t3 USING (id);
+ERROR 23000: Column 'id' in from clause is ambiguous
+SELECT id,t3.id FROM (t1 JOIN t2 ON (t2.id=t1.id)) LEFT JOIN t3 USING (id);
+ERROR 23000: Column 'id' in from clause is ambiguous
+drop table t1, t2, t3;
+create table t1 (a int(10),b int(10));
+create table t2 (a int(10),b int(10));
+insert into t1 values (1,10),(2,20),(3,30);
+insert into t2 values (1,10);
+select * from t1 inner join t2 using (A);
+a	b	b
+1	10	10
+select * from t1 inner join t2 using (a);
+a	b	b
+1	10	10
+drop table t1, t2;
+create table t1 (a int, c int);
+create table t2 (b int);
+create table t3 (b int, a int);
+create table t4 (c int);
+insert into t1 values (1,1);
+insert into t2 values (1);
+insert into t3 values (1,1);
+insert into t4 values (1);
+select * from t1 join t2 join t3 on (t2.b = t3.b and t1.a = t3.a);
+a	c	b	b	a
+1	1	1	1	1
+select * from t1, t2 join t3 on (t2.b = t3.b and t1.a = t3.a);
+ERROR 42S22: Unknown column 't1.a' in 'on clause'
+select * from t1 join t2 join t3 join t4 on (t1.a = t4.c and t2.b = t4.c);
+a	c	b	b	a	c
+1	1	1	1	1	1
+select * from t1 join t2 join t4 using (c);
+c	a	b
+1	1	1
+drop table t1, t2, t3, t4;
+create table t1(x int, y int);
+create table t2(x int, y int);
+create table t3(x int, primary key(x));
+insert into t1 values (1, 1), (2, 1), (3, 1), (4, 3), (5, 6), (6, 6);
+insert into t2 values (1, 1), (2, 1), (3, 3), (4, 6), (5, 6);
+insert into t3 values (1), (2), (3), (4), (5);
+select t1.x, t3.x from t1, t2, t3  where t1.x = t2.x and t3.x >= t1.y and t3.x <= t2.y;
+x	x
+1	1
+2	1
+3	1
+3	2
+3	3
+4	3
+4	4
+4	5
+drop table t1,t2,t3;
+create table t1 (id char(16) not null default '', primary key  (id));
+insert into t1 values ('100'),('101'),('102');
+create table t2 (id char(16) default null);
+insert into t2 values (1);
+create view v1 as select t1.id from t1;
+create view v2 as select t2.id from t2;
+create view v3 as select (t1.id+2) as id from t1 natural left join t2;
+select t1.id from t1 left join v2 using (id);
+id
+100
+101
+102
+select t1.id from v2 right join t1 using (id);
+id
+100
+101
+102
+select t1.id from t1 left join v3 using (id);
+id
+100
+101
+102
+select * from t1 left join v2 using (id);
+id
+100
+101
+102
+select * from v2 right join t1 using (id);
+id
+100
+101
+102
+select * from t1 left join v3 using (id);
+id
+100
+101
+102
+select v1.id from v1 left join v2 using (id);
+id
+100
+101
+102
+select v1.id from v2 right join v1 using (id);
+id
+100
+101
+102
+select v1.id from v1 left join v3 using (id);
+id
+100
+101
+102
+select * from v1 left join v2 using (id);
+id
+100
+101
+102
+select * from v2 right join v1 using (id);
+id
+100
+101
+102
+select * from v1 left join v3 using (id);
+id
+100
+101
+102
+drop table t1, t2;
+drop view v1, v2, v3;
+create table t1 (id int(11) not null default '0');
+insert into t1 values (123),(191),(192);
+create table t2 (id char(16) character set utf8 not null);
+insert into t2 values ('58013'),('58014'),('58015'),('58016');
+create table t3 (a_id int(11) not null, b_id char(16) character set utf8);
+insert into t3 values (123,null),(123,null),(123,null),(123,null),(123,null),(123,'58013');
+select count(*)
+from t1 inner join (t3 left join t2 on t2.id = t3.b_id) on t1.id = t3.a_id;
+count(*)
+6
+select count(*)
+from t1 inner join (t2 right join t3 on t2.id = t3.b_id) on t1.id = t3.a_id;
+count(*)
+6
+drop table t1,t2,t3;
+create table t1 (a int);
+create table t2 (b int);
+create table t3 (c int);
+select * from t1 join t2 join t3 on (t1.a=t3.c);
+a	b	c
+select * from t1 join t2 left join t3 on (t1.a=t3.c);
+a	b	c
+select * from t1 join t2 right join t3 on (t1.a=t3.c);
+a	b	c
+select * from t1 join t2 straight_join t3 on (t1.a=t3.c);
+a	b	c
+drop table t1, t2 ,t3;
+create table t1(f1 int, f2 date);
+insert into t1 values(1,'2005-01-01'),(2,'2005-09-01'),(3,'2005-09-30'),
+(4,'2005-10-01'),(5,'2005-12-30');
+select * from t1 where f2 >= 0            order by f2;
+f1	f2
+1	2005-01-01
+2	2005-09-01
+3	2005-09-30
+4	2005-10-01
+5	2005-12-30
+select * from t1 where f2 >= '0000-00-00' order by f2;
+f1	f2
+1	2005-01-01
+2	2005-09-01
+3	2005-09-30
+4	2005-10-01
+5	2005-12-30
+select * from t1 where f2 >= '2005-09-31' order by f2;
+f1	f2
+4	2005-10-01
+5	2005-12-30
+select * from t1 where f2 >= '2005-09-3a' order by f2;
+f1	f2
+3	2005-09-30
+4	2005-10-01
+5	2005-12-30
+Warnings:
+Warning	1292	Incorrect date value: '2005-09-3a' for column 'f2' at row 1
+select * from t1 where f2 <= '2005-09-31' order by f2;
+f1	f2
+1	2005-01-01
+2	2005-09-01
+3	2005-09-30
+select * from t1 where f2 <= '2005-09-3a' order by f2;
+f1	f2
+1	2005-01-01
+2	2005-09-01
+Warnings:
+Warning	1292	Incorrect date value: '2005-09-3a' for column 'f2' at row 1
+drop table t1;
+create table t1 (f1 int, f2 int);
+insert into t1 values (1, 30), (2, 20), (3, 10);
+create algorithm=merge view v1 as select f1, f2 from t1;
+create algorithm=merge view v2 (f2, f1) as select f1, f2 from t1;
+create algorithm=merge view v3 as select t1.f1 as f2, t1.f2 as f1 from t1;
+select t1.f1 as x1, f1 from t1 order by t1.f1;
+x1	f1
+1	1
+2	2
+3	3
+select v1.f1 as x1, f1 from v1 order by v1.f1;
+x1	f1
+1	1
+2	2
+3	3
+select v2.f1 as x1, f1 from v2 order by v2.f1;
+x1	f1
+10	10
+20	20
+30	30
+select v3.f1 as x1, f1 from v3 order by v3.f1;
+x1	f1
+10	10
+20	20
+30	30
+select f1, f2, v1.f1 as x1 from v1 order by v1.f1;
+f1	f2	x1
+1	30	1
+2	20	2
+3	10	3
+select f1, f2, v2.f1 as x1 from v2 order by v2.f1;
+f1	f2	x1
+10	3	10
+20	2	20
+30	1	30
+select f1, f2, v3.f1 as x1 from v3 order by v3.f1;
+f1	f2	x1
+10	3	10
+20	2	20
+30	1	30
+drop table t1;
+drop view v1, v2, v3;
+CREATE TABLE t1(key_a int4 NOT NULL, optimus varchar(32), PRIMARY KEY(key_a));
+CREATE TABLE t2(key_a int4 NOT NULL, prime varchar(32), PRIMARY KEY(key_a));
+CREATE table t3(key_a int4 NOT NULL, key_b int4 NOT NULL, foo varchar(32),
+PRIMARY KEY(key_a,key_b));
+INSERT INTO t1 VALUES (0,'');
+INSERT INTO t1 VALUES (1,'i');
+INSERT INTO t1 VALUES (2,'j');
+INSERT INTO t1 VALUES (3,'k');
+INSERT INTO t2 VALUES (1,'r');
+INSERT INTO t2 VALUES (2,'s');
+INSERT INTO t2 VALUES (3,'t');
+INSERT INTO t3 VALUES (1,5,'x');
+INSERT INTO t3 VALUES (1,6,'y');
+INSERT INTO t3 VALUES (2,5,'xx');
+INSERT INTO t3 VALUES (2,6,'yy');
+INSERT INTO t3 VALUES (2,7,'zz');
+INSERT INTO t3 VALUES (3,5,'xxx');
+SELECT t2.key_a,foo 
+FROM t1 INNER JOIN t2 ON t1.key_a = t2.key_a
+INNER JOIN t3 ON t1.key_a = t3.key_a
+WHERE t2.key_a=2 and key_b=5;
+key_a	foo
+2	xx
+EXPLAIN SELECT t2.key_a,foo 
+FROM t1 INNER JOIN t2 ON t1.key_a = t2.key_a
+INNER JOIN t3 ON t1.key_a = t3.key_a
+WHERE t2.key_a=2 and key_b=5;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	const	PRIMARY	PRIMARY	4	const	1	Using index
+1	SIMPLE	t2	const	PRIMARY	PRIMARY	4	const	1	Using index
+1	SIMPLE	t3	const	PRIMARY	PRIMARY	8	const,const	1	
+SELECT t2.key_a,foo 
+FROM t1 INNER JOIN t2 ON t2.key_a = t1.key_a
+INNER JOIN t3 ON t1.key_a = t3.key_a
+WHERE t2.key_a=2 and key_b=5;
+key_a	foo
+2	xx
+EXPLAIN SELECT t2.key_a,foo 
+FROM t1 INNER JOIN t2 ON t2.key_a = t1.key_a
+INNER JOIN t3 ON t1.key_a = t3.key_a
+WHERE t2.key_a=2 and key_b=5;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	const	PRIMARY	PRIMARY	4	const	1	Using index
+1	SIMPLE	t2	const	PRIMARY	PRIMARY	4	const	1	Using index
+1	SIMPLE	t3	const	PRIMARY	PRIMARY	8	const,const	1	
+DROP TABLE t1,t2,t3;
+create  table t1 (f1 int);
+insert into t1 values(1),(2);
+create table t2 (f2 int, f3 int, key(f2));
+insert into t2 values(1,1),(2,2);
+create table t3 (f4 int not null);
+insert into t3 values (2),(2),(2);
+select f1,(select count(*) from t2,t3 where f2=f1 and f3=f4) as count from t1;
+f1	count
+1	0
+2	3
+drop table t1,t2,t3;
+create table t1 (f1 int unique);
+create table t2 (f2 int unique);
+create table t3 (f3 int unique);
+insert into t1 values(1),(2);
+insert into t2 values(1),(2);
+insert into t3 values(1),(NULL);
+select * from t3 where f3 is null;
+f3
+NULL
+select t2.f2 from t1 left join t2 on f1=f2 join t3 on f1=f3 where f1=1;
+f2
+1
+drop table t1,t2,t3;
+create table t1(f1 char, f2 char not null);
+insert into t1 values(null,'a');
+create table t2 (f2 char not null);
+insert into t2 values('b');
+select * from t1 left join t2 on f1=t2.f2 where t1.f2='a';
+f1	f2	f2
+NULL	a	NULL
+drop table t1,t2;
+select * from (select * left join t on f1=f2) tt;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'on f1=f2) tt' at line 1
+CREATE TABLE t1 (sku int PRIMARY KEY, pr int);
+CREATE TABLE t2 (sku int PRIMARY KEY, sppr int, name varchar(255));
+INSERT INTO t1 VALUES
+(10, 10), (20, 10), (30, 20), (40, 30), (50, 10), (60, 10);
+INSERT INTO t2 VALUES 
+(10, 10, 'aaa'), (20, 10, 'bbb'), (30, 10, 'ccc'), (40, 20, 'ddd'),
+(50, 10, 'eee'), (60, 20, 'fff'), (70, 20, 'ggg'), (80, 30, 'hhh');
+SELECT t2.sku, t2.sppr, t2.name, t1.sku, t1.pr
+FROM t2, t1 WHERE t2.sku=20 AND (t2.sku=t1.sku OR t2.sppr=t1.sku);
+sku	sppr	name	sku	pr
+20	10	bbb	10	10
+20	10	bbb	20	10
+EXPLAIN
+SELECT t2.sku, t2.sppr, t2.name, t1.sku, t1.pr
+FROM t2, t1 WHERE t2.sku=20 AND (t2.sku=t1.sku OR t2.sppr=t1.sku);
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t2	const	PRIMARY	PRIMARY	4	const	1	
+1	SIMPLE	t1	range	PRIMARY	PRIMARY	4	NULL	2	Using where
+DROP TABLE t1,t2;
+CREATE TABLE t1 (i TINYINT UNSIGNED NOT NULL);
+INSERT t1 SET i = 0;
+UPDATE t1 SET i = -1;
+Warnings:
+Warning	1264	Out of range value for column 'i' at row 1
+SELECT * FROM t1;
+i
+0
+UPDATE t1 SET i = CAST(i - 1 AS SIGNED);
+Warnings:
+Warning	1264	Out of range value for column 'i' at row 1
+SELECT * FROM t1;
+i
+0
+UPDATE t1 SET i = i - 1;
+Warnings:
+Warning	1264	Out of range value for column 'i' at row 1
+SELECT * FROM t1;
+i
+255
+DROP TABLE t1;
+create table t1 (a int);
+insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t2 (a int, b int, c int, e int, primary key(a,b,c));
+insert into t2 select A.a, B.a, C.a, C.a from t1 A, t1 B, t1 C;
+analyze table t2;
+Table	Op	Msg_type	Msg_text
+test.t2	analyze	status	OK
+select 'In next EXPLAIN, B.rows must be exactly 10:' Z;
+Z
+In next EXPLAIN, B.rows must be exactly 10:
+explain select * from t2 A, t2 B where A.a=5 and A.b=5 and A.C<5
+and B.a=5 and B.b=A.e and (B.b =1 or B.b = 3 or B.b=5);
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	A	range	PRIMARY	PRIMARY	12	NULL	4	Using where
+1	SIMPLE	B	ref	PRIMARY	PRIMARY	8	const,test.A.e	10	
+drop table t1, t2;
+CREATE TABLE t1 (a int PRIMARY KEY, b int, INDEX(b));
+INSERT INTO t1 VALUES (1, 3), (9,4), (7,5), (4,5), (6,2),
+(3,1), (5,1), (8,9), (2,2), (0,9);
+CREATE TABLE t2 (c int, d int, f int, INDEX(c,f));
+INSERT INTO t2 VALUES
+(1,0,0), (1,0,1), (2,0,0), (2,0,1), (3,0,0), (4,0,1),
+(5,0,0), (5,0,1), (6,0,0), (0,0,1), (7,0,0), (7,0,1),
+(0,0,0), (0,0,1), (8,0,0), (8,0,1), (9,0,0), (9,0,1);
+EXPLAIN
+SELECT a, c, d, f FROM t1,t2 WHERE a=c AND b BETWEEN 4 AND 6;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	range	PRIMARY,b	b	5	NULL	3	Using where
+1	SIMPLE	t2	ref	c	c	5	test.t1.a	2	Using where
+EXPLAIN
+SELECT a, c, d, f FROM t1,t2 WHERE a=c AND b BETWEEN 4 AND 6 AND a > 0;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	range	PRIMARY,b	b	5	NULL	3	Using where
+1	SIMPLE	t2	ref	c	c	5	test.t1.a	2	Using where
+DROP TABLE t1, t2;
+create table t1 (
+a int unsigned    not null auto_increment primary key,
+b bit             not null,
+c bit             not null
+);
+create table t2 (
+a int unsigned    not null auto_increment primary key,
+b bit             not null,
+c int unsigned    not null,
+d varchar(50)
+);
+insert into t1 (b,c) values (0,1), (0,1);
+insert into t2 (b,c) values (0,1);
+select t1.a, t1.b + 0, t1.c + 0, t2.a, t2.b + 0, t2.c, t2.d
+from t1 left outer join t2 on t1.a = t2.c and t2.b <> 1
+where t1.b <> 1 order by t1.a;
+a	t1.b + 0	t1.c + 0	a	t2.b + 0	c	d
+1	0	1	1	0	1	NULL
+2	0	1	NULL	NULL	NULL	NULL
+drop table t1,t2;
+SELECT 0.9888889889 * 1.011111411911;
+0.9888889889 * 1.011111411911
+0.9998769417899202067879
+prepare stmt from 'select 1 as " a "';
+Warnings:
+Warning	1466	Leading spaces are removed from name ' a '
+execute stmt;
+a 
+1
+CREATE TABLE t1 (a int NOT NULL PRIMARY KEY, b int NOT NULL);
+INSERT INTO t1 VALUES (1,1), (2,2), (3,3), (4,4);
+CREATE TABLE t2 (c int NOT NULL, INDEX idx(c));
+INSERT INTO t2 VALUES
+(1), (1), (1), (1), (1), (1), (1), (1),
+(2), (2), (2), (2),
+(3), (3),
+(4);
+EXPLAIN SELECT b FROM t1, t2 WHERE b=c AND a=1;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	const	PRIMARY	PRIMARY	4	const	1	
+1	SIMPLE	t2	ref	idx	idx	4	const	7	Using index
+EXPLAIN SELECT b FROM t1, t2 WHERE b=c AND a=4;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	const	PRIMARY	PRIMARY	4	const	1	
+1	SIMPLE	t2	ref	idx	idx	4	const	1	Using index
+DROP TABLE t1, t2;
+CREATE TABLE t1 (id int NOT NULL PRIMARY KEY, a int);
+INSERT INTO t1 VALUES (1,2), (2,NULL), (3,2);
+CREATE TABLE t2 (b int, c INT, INDEX idx1(b));
+INSERT INTO t2 VALUES (2,1), (3,2);
+CREATE TABLE t3 (d int,  e int, INDEX idx1(d));
+INSERT INTO t3 VALUES (2,10), (2,20), (1,30), (2,40), (2,50);
+EXPLAIN
+SELECT * FROM t1 LEFT JOIN t2 ON t2.b=t1.a INNER JOIN t3 ON t3.d=t1.id
+WHERE t1.id=2;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	const	PRIMARY	PRIMARY	4	const	1	
+1	SIMPLE	t2	const	idx1	NULL	NULL	NULL	1	
+1	SIMPLE	t3	ref	idx1	idx1	5	const	3	Using where
+SELECT * FROM t1 LEFT JOIN t2 ON t2.b=t1.a INNER JOIN t3 ON t3.d=t1.id
+WHERE t1.id=2;
+id	a	b	c	d	e
+2	NULL	NULL	NULL	2	10
+2	NULL	NULL	NULL	2	20
+2	NULL	NULL	NULL	2	40
+2	NULL	NULL	NULL	2	50
+DROP TABLE t1,t2,t3;
+create table t1 (c1 varchar(1), c2 int, c3 int, c4 int, c5 int, c6 int,
+c7 int, c8 int, c9 int, fulltext key (`c1`));
+select distinct match (`c1`) against ('z') , c2, c3, c4,c5, c6,c7, c8 
+from t1 where c9=1 order by c2, c2;
+match (`c1`) against ('z')	c2	c3	c4	c5	c6	c7	c8
+drop table t1;
+CREATE TABLE t1 (pk varchar(10) PRIMARY KEY, fk varchar(16));
+CREATE TABLE t2 (pk varchar(16) PRIMARY KEY, fk varchar(10));
+INSERT INTO t1 VALUES
+('d','dddd'), ('i','iii'), ('a','aa'), ('b','bb'), ('g','gg'), 
+('e','eee'), ('c','cccc'), ('h','hhh'), ('j','jjj'), ('f','fff');
+INSERT INTO t2 VALUES
+('jjj', 'j'), ('cc','c'), ('ccc','c'), ('aaa', 'a'), ('jjjj','j'),
+('hhh','h'), ('gg','g'), ('fff','f'), ('ee','e'), ('ffff','f'),
+('bbb','b'), ('ff','f'), ('cccc','c'), ('dddd','d'), ('jj','j'),
+('aaaa','a'), ('bb','b'), ('eeee','e'), ('aa','a'), ('hh','h');
+EXPLAIN SELECT t2.* 
+FROM t1 JOIN t2 ON t2.fk=t1.pk
+WHERE t2.fk < 'c' AND t2.pk=t1.fk;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	range	PRIMARY	PRIMARY	12	NULL	3	Using where
+1	SIMPLE	t2	eq_ref	PRIMARY	PRIMARY	18	test.t1.fk	1	Using where
+EXPLAIN SELECT t2.* 
+FROM t1 JOIN t2 ON t2.fk=t1.pk 
+WHERE t2.fk BETWEEN 'a' AND 'b' AND t2.pk=t1.fk;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	range	PRIMARY	PRIMARY	12	NULL	2	Using where
+1	SIMPLE	t2	eq_ref	PRIMARY	PRIMARY	18	test.t1.fk	1	Using where
+EXPLAIN SELECT t2.* 
+FROM t1 JOIN t2 ON t2.fk=t1.pk 
+WHERE t2.fk IN ('a','b') AND t2.pk=t1.fk;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	range	PRIMARY	PRIMARY	12	NULL	2	Using where
+1	SIMPLE	t2	eq_ref	PRIMARY	PRIMARY	18	test.t1.fk	1	Using where
+DROP TABLE t1,t2;
+CREATE TABLE t1 (a int, b varchar(20) NOT NULL, PRIMARY KEY(a));
+CREATE TABLE t2 (a int, b varchar(20) NOT NULL,
+PRIMARY KEY (a), UNIQUE KEY (b));
+INSERT INTO t1 VALUES (1,'a'),(2,'b'),(3,'c');
+INSERT INTO t2 VALUES (1,'a'),(2,'b'),(3,'c');
+EXPLAIN SELECT t1.a FROM t1 LEFT JOIN t2 ON t2.b=t1.b WHERE t1.a=3;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	const	PRIMARY	PRIMARY	4	const	1	
+DROP TABLE t1,t2;
+CREATE TABLE t1(id int PRIMARY KEY, b int, e int);
+CREATE TABLE t2(i int, a int, INDEX si(i), INDEX ai(a));
+CREATE TABLE t3(a int PRIMARY KEY, c char(4), INDEX ci(c));
+INSERT INTO t1 VALUES 
+(1,10,19), (2,20,22), (4,41,42), (9,93,95), (7, 77,79),
+(6,63,67), (5,55,58), (3,38,39), (8,81,89);
+INSERT INTO t2 VALUES
+(21,210), (41,410), (82,820), (83,830), (84,840),
+(65,650), (51,510), (37,370), (94,940), (76,760),
+(22,220), (33,330), (40,400), (95,950), (38,380),
+(67,670), (88,880), (57,570), (96,960), (97,970);
+INSERT INTO t3 VALUES
+(210,'bb'), (950,'ii'), (400,'ab'), (500,'ee'), (220,'gg'),
+(440,'gg'), (310,'eg'), (380,'ee'), (840,'bb'), (830,'ff'),
+(230,'aa'), (960,'ii'), (410,'aa'), (510,'ee'), (290,'bb'),
+(450,'gg'), (320,'dd'), (390,'hh'), (850,'jj'), (860,'ff');
+EXPLAIN
+SELECT t3.a FROM t1,t2 FORCE INDEX (si),t3
+WHERE t1.id = 8 AND t2.i BETWEEN t1.b AND t1.e AND 
+t3.a=t2.a AND t3.c IN ('bb','ee');
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	const	PRIMARY	PRIMARY	4	const	1	
+1	SIMPLE	t2	range	si	si	5	NULL	4	Using where
+1	SIMPLE	t3	eq_ref	PRIMARY,ci	PRIMARY	4	test.t2.a	1	Using where
+EXPLAIN
+SELECT t3.a FROM t1,t2,t3
+WHERE t1.id = 8 AND t2.i BETWEEN t1.b AND t1.e AND
+t3.a=t2.a AND t3.c IN ('bb','ee') ;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	const	PRIMARY	PRIMARY	4	const	1	
+1	SIMPLE	t2	range	si,ai	si	5	NULL	4	Using where
+1	SIMPLE	t3	eq_ref	PRIMARY,ci	PRIMARY	4	test.t2.a	1	Using where
+EXPLAIN 
+SELECT t3.a FROM t1,t2 FORCE INDEX (si),t3
+WHERE t1.id = 8 AND (t2.i=t1.b OR t2.i=t1.e) AND t3.a=t2.a AND
+t3.c IN ('bb','ee');
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	const	PRIMARY	PRIMARY	4	const	1	
+1	SIMPLE	t2	range	si	si	5	NULL	2	Using where
+1	SIMPLE	t3	eq_ref	PRIMARY,ci	PRIMARY	4	test.t2.a	1	Using where
+EXPLAIN 
+SELECT t3.a FROM t1,t2,t3
+WHERE t1.id = 8 AND (t2.i=t1.b OR t2.i=t1.e) AND t3.a=t2.a AND
+t3.c IN ('bb','ee');
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	const	PRIMARY	PRIMARY	4	const	1	
+1	SIMPLE	t2	range	si,ai	si	5	NULL	2	Using where
+1	SIMPLE	t3	eq_ref	PRIMARY,ci	PRIMARY	4	test.t2.a	1	Using where
+DROP TABLE t1,t2,t3;
+CREATE TABLE t1 ( f1 int primary key, f2 int, f3 int, f4 int, f5 int, f6 int, checked_out int);
+CREATE TABLE t2 ( f11 int PRIMARY KEY );
+INSERT INTO t1 VALUES (1,1,1,0,0,0,0),(2,1,1,3,8,1,0),(3,1,1,4,12,1,0);
+INSERT INTO t2 VALUES (62);
+SELECT * FROM t1 LEFT JOIN t2 ON f11 = t1.checked_out GROUP BY f1 ORDER BY f2, f3, f4, f5 LIMIT 0, 1;
+f1	f2	f3	f4	f5	f6	checked_out	f11
+1	1	1	0	0	0	0	NULL
+DROP TABLE t1, t2;
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1(a int);
+INSERT into t1 values (1), (2), (3);
+SELECT * FROM t1 LIMIT 2, -1;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-1' at line 1
+DROP TABLE t1;
+CREATE TABLE t1 (
+ID_with_null int NULL,
+ID_better int NOT NULL,
+INDEX idx1 (ID_with_null),
+INDEX idx2 (ID_better)
+);
+INSERT INTO t1 VALUES (1,1), (2,1), (null,3), (null,3), (null,3), (null,3);
+INSERT INTO t1 SELECT * FROM t1 WHERE ID_with_null IS NULL;
+INSERT INTO t1 SELECT * FROM t1 WHERE ID_with_null IS NULL;
+INSERT INTO t1 SELECT * FROM t1 WHERE ID_with_null IS NULL;
+INSERT INTO t1 SELECT * FROM t1 WHERE ID_with_null IS NULL;
+INSERT INTO t1 SELECT * FROM t1 WHERE ID_with_null IS NULL;
+SELECT COUNT(*) FROM t1 WHERE ID_with_null IS NULL;
+COUNT(*)
+128
+SELECT COUNT(*) FROM t1 WHERE ID_better=1;
+COUNT(*)
+2
+EXPLAIN SELECT * FROM t1 WHERE ID_better=1 AND ID_with_null IS NULL;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	ref	idx1,idx2	idx2	4	const	1	Using where
+DROP INDEX idx1 ON t1;
+CREATE UNIQUE INDEX idx1 ON t1(ID_with_null);
+EXPLAIN SELECT * FROM t1 WHERE ID_better=1 AND ID_with_null IS NULL;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	ref	idx1,idx2	idx2	4	const	1	Using where
+DROP TABLE t1;
+CREATE TABLE t1 (
+ID1_with_null int NULL,
+ID2_with_null int NULL,
+ID_better int NOT NULL,
+INDEX idx1 (ID1_with_null, ID2_with_null),
+INDEX idx2 (ID_better)
+);
+INSERT INTO t1 VALUES (1,1,1), (2,2,1), (3,null,3), (null,3,3), (null,null,3),
+(3,null,3), (null,3,3), (null,null,3), (3,null,3), (null,3,3), (null,null,3);
+INSERT INTO t1 SELECT * FROM t1 WHERE ID1_with_null IS NULL;
+INSERT INTO t1 SELECT * FROM t1 WHERE ID2_with_null IS NULL;
+INSERT INTO t1 SELECT * FROM t1 WHERE ID1_with_null IS NULL;
+INSERT INTO t1 SELECT * FROM t1 WHERE ID2_with_null IS NULL;
+INSERT INTO t1 SELECT * FROM t1 WHERE ID1_with_null IS NULL;
+INSERT INTO t1 SELECT * FROM t1 WHERE ID2_with_null IS NULL;
+SELECT COUNT(*) FROM t1 WHERE ID1_with_null IS NULL AND ID2_with_null=3;
+COUNT(*)
+24
+SELECT COUNT(*) FROM t1 WHERE ID1_with_null=3 AND ID2_with_null IS NULL;
+COUNT(*)
+24
+SELECT COUNT(*) FROM t1 WHERE ID1_with_null IS NULL AND ID2_with_null IS NULL;
+COUNT(*)
+192
+SELECT COUNT(*) FROM t1 WHERE ID_better=1;
+COUNT(*)
+2
+EXPLAIN SELECT * FROM t1
+WHERE ID_better=1 AND ID1_with_null IS NULL AND ID2_with_null=3 ;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	ref	idx1,idx2	idx2	4	const	1	Using where
+EXPLAIN SELECT * FROM t1
+WHERE ID_better=1 AND ID1_with_null=3 AND ID2_with_null=3 IS NULL ;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	ref	idx1,idx2	idx2	4	const	1	Using where
+EXPLAIN SELECT * FROM t1
+WHERE ID_better=1 AND ID1_with_null IS NULL AND ID2_with_null IS NULL;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	ref	idx1,idx2	idx2	4	const	1	Using where
+DROP INDEX idx1 ON t1;
+CREATE UNIQUE INDEX idx1 ON t1(ID1_with_null,ID2_with_null);
+EXPLAIN SELECT * FROM t1
+WHERE ID_better=1 AND ID1_with_null IS NULL AND ID2_with_null=3 ;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	ref	idx1,idx2	idx2	4	const	1	Using where
+EXPLAIN SELECT * FROM t1
+WHERE ID_better=1 AND ID1_with_null=3 AND ID2_with_null IS NULL ;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	ref	idx1,idx2	idx2	4	const	1	Using where
+EXPLAIN SELECT * FROM t1
+WHERE ID_better=1 AND ID1_with_null IS NULL AND ID2_with_null IS NULL;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	ref	idx1,idx2	idx2	4	const	1	Using where
+EXPLAIN SELECT * FROM t1
+WHERE ID_better=1 AND ID1_with_null IS NULL AND 
+(ID2_with_null=1 OR ID2_with_null=2);
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	ref	idx1,idx2	idx2	4	const	1	Using where
+DROP TABLE t1;
+CREATE TABLE t1 (a INT, ts TIMESTAMP, KEY ts(ts));
+INSERT INTO t1 VALUES (30,"2006-01-03 23:00:00"), (31,"2006-01-03 23:00:00");
+ANALYZE TABLE t1;
+Table	Op	Msg_type	Msg_text
+test.t1	analyze	status	OK
+CREATE TABLE t2 (a INT, dt1 DATETIME, dt2 DATETIME, PRIMARY KEY (a));
+INSERT INTO t2 VALUES (30, "2006-01-01 00:00:00", "2999-12-31 00:00:00");
+INSERT INTO t2 SELECT a+1,dt1,dt2 FROM t2;
+ANALYZE TABLE t2;
+Table	Op	Msg_type	Msg_text
+test.t2	analyze	status	OK
+EXPLAIN
+SELECT * FROM t1 LEFT JOIN t2 ON (t1.a=t2.a) WHERE t1.a=30
+AND t1.ts BETWEEN t2.dt1 AND t2.dt2
+AND t1.ts BETWEEN "2006-01-01" AND "2006-12-31";
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t2	const	PRIMARY	PRIMARY	4	const	1	
+1	SIMPLE	t1	range	ts	ts	4	NULL	1	Using where
+Warnings:
+Warning	1292	Incorrect datetime value: '2999-12-31 00:00:00' for column 'ts' at row 1
+SELECT * FROM t1 LEFT JOIN t2 ON (t1.a=t2.a) WHERE t1.a=30
+AND t1.ts BETWEEN t2.dt1 AND t2.dt2
+AND t1.ts BETWEEN "2006-01-01" AND "2006-12-31";
+a	ts	a	dt1	dt2
+30	2006-01-03 23:00:00	30	2006-01-01 00:00:00	2999-12-31 00:00:00
+Warnings:
+Warning	1292	Incorrect datetime value: '2999-12-31 00:00:00' for column 'ts' at row 1
+DROP TABLE t1,t2;
+create table t1 (a bigint unsigned);
+insert into t1 values
+(if(1, 9223372036854775808, 1)),
+(case when 1 then 9223372036854775808 else 1 end),
+(coalesce(9223372036854775808, 1));
+select * from t1;
+a
+9223372036854775808
+9223372036854775808
+9223372036854775808
+drop table t1;
+create table t1 select
+if(1, 9223372036854775808, 1) i,
+case when 1 then 9223372036854775808 else 1 end c,
+coalesce(9223372036854775808, 1) co;
+show create table t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `i` decimal(19,0) NOT NULL DEFAULT '0',
+  `c` decimal(19,0) NOT NULL DEFAULT '0',
+  `co` decimal(19,0) NOT NULL DEFAULT '0'
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t1;
+select 
+if(1, cast(1111111111111111111 as unsigned), 1) i,
+case when 1 then cast(1111111111111111111 as unsigned) else 1 end c,
+coalesce(cast(1111111111111111111 as unsigned), 1) co;
+i	c	co
+1111111111111111111	1111111111111111111	1111111111111111111
+CREATE TABLE t1 (name varchar(255));
+CREATE TABLE t2 (name varchar(255), n int, KEY (name(3)));
+INSERT INTO t1 VALUES ('ccc'), ('bb'), ('cc '), ('aa  '), ('aa');
+INSERT INTO t2 VALUES ('bb',1), ('aa',2), ('cc   ',3);
+INSERT INTO t2 VALUES (concat('cc ', 0x06), 4);
+INSERT INTO t2 VALUES ('cc',5), ('bb ',6), ('cc ',7);
+SELECT * FROM t2;
+name	n
+bb	1
+aa	2
+cc   	3
+cc 	4
+cc	5
+bb 	6
+cc 	7
+SELECT * FROM t2 ORDER BY name;
+name	n
+aa	2
+bb	1
+bb 	6
+cc 	4
+cc   	3
+cc	5
+cc 	7
+SELECT name, LENGTH(name), n FROM t2 ORDER BY name;
+name	LENGTH(name)	n
+aa	2	2
+bb	2	1
+bb 	3	6
+cc 	4	4
+cc   	5	3
+cc	2	5
+cc 	3	7
+EXPLAIN SELECT name, LENGTH(name), n FROM t2 WHERE name='cc ';
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t2	ref	name	name	6	const	3	Using where
+SELECT name, LENGTH(name), n FROM t2 WHERE name='cc ';
+name	LENGTH(name)	n
+cc   	5	3
+cc	2	5
+cc 	3	7
+EXPLAIN SELECT name , LENGTH(name), n FROM t2 WHERE name LIKE 'cc%';
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t2	range	name	name	6	NULL	3	Using where
+SELECT name , LENGTH(name), n FROM t2 WHERE name LIKE 'cc%';
+name	LENGTH(name)	n
+cc   	5	3
+cc 	4	4
+cc	2	5
+cc 	3	7
+EXPLAIN SELECT name , LENGTH(name), n FROM t2 WHERE name LIKE 'cc%' ORDER BY name;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t2	range	name	name	6	NULL	3	Using where; Using filesort
+SELECT name , LENGTH(name), n FROM t2 WHERE name LIKE 'cc%' ORDER BY name;
+name	LENGTH(name)	n
+cc 	4	4
+cc   	5	3
+cc	2	5
+cc 	3	7
+EXPLAIN SELECT * FROM t1 LEFT JOIN t2 ON t1.name=t2.name;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	5	
+1	SIMPLE	t2	ref	name	name	6	test.t1.name	2	
+SELECT * FROM t1 LEFT JOIN t2 ON t1.name=t2.name;
+name	name	n
+ccc	NULL	NULL
+bb	bb	1
+bb	bb 	6
+cc 	cc   	3
+cc 	cc	5
+cc 	cc 	7
+aa  	aa	2
+aa	aa	2
+DROP TABLE t1,t2;
+CREATE TABLE t1 (name text);
+CREATE TABLE t2 (name text, n int, KEY (name(3)));
+INSERT INTO t1 VALUES ('ccc'), ('bb'), ('cc '), ('aa  '), ('aa');
+INSERT INTO t2 VALUES ('bb',1), ('aa',2), ('cc   ',3);
+INSERT INTO t2 VALUES (concat('cc ', 0x06), 4);
+INSERT INTO t2 VALUES ('cc',5), ('bb ',6), ('cc ',7);
+SELECT * FROM t2;
+name	n
+bb	1
+aa	2
+cc   	3
+cc 	4
+cc	5
+bb 	6
+cc 	7
+SELECT * FROM t2 ORDER BY name;
+name	n
+aa	2
+bb	1
+bb 	6
+cc 	4
+cc   	3
+cc	5
+cc 	7
+SELECT name, LENGTH(name), n FROM t2 ORDER BY name;
+name	LENGTH(name)	n
+aa	2	2
+bb	2	1
+bb 	3	6
+cc 	4	4
+cc   	5	3
+cc	2	5
+cc 	3	7
+EXPLAIN SELECT name, LENGTH(name), n FROM t2 WHERE name='cc ';
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t2	ref	name	name	6	const	3	Using where
+SELECT name, LENGTH(name), n FROM t2 WHERE name='cc ';
+name	LENGTH(name)	n
+cc   	5	3
+cc	2	5
+cc 	3	7
+EXPLAIN SELECT name , LENGTH(name), n FROM t2 WHERE name LIKE 'cc%';
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t2	range	name	name	6	NULL	3	Using where
+SELECT name , LENGTH(name), n FROM t2 WHERE name LIKE 'cc%';
+name	LENGTH(name)	n
+cc   	5	3
+cc 	4	4
+cc	2	5
+cc 	3	7
+EXPLAIN SELECT name , LENGTH(name), n FROM t2 WHERE name LIKE 'cc%' ORDER BY name;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t2	range	name	name	6	NULL	3	Using where; Using filesort
+SELECT name , LENGTH(name), n FROM t2 WHERE name LIKE 'cc%' ORDER BY name;
+name	LENGTH(name)	n
+cc 	4	4
+cc   	5	3
+cc	2	5
+cc 	3	7
+EXPLAIN SELECT * FROM t1 LEFT JOIN t2 ON t1.name=t2.name;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	5	
+1	SIMPLE	t2	ref	name	name	6	test.t1.name	2	
+SELECT * FROM t1 LEFT JOIN t2 ON t1.name=t2.name;
+name	name	n
+ccc	NULL	NULL
+bb	bb	1
+bb	bb 	6
+cc 	cc   	3
+cc 	cc	5
+cc 	cc 	7
+aa  	aa	2
+aa	aa	2
+DROP TABLE t1,t2;
+CREATE TABLE t1 (
+access_id int NOT NULL default '0',
+name varchar(20) default NULL,
+rank int NOT NULL default '0',
+KEY idx (access_id)
+);
+CREATE TABLE t2 (
+faq_group_id int NOT NULL default '0',
+faq_id int NOT NULL default '0',
+access_id int default NULL,
+UNIQUE KEY idx1 (faq_id),
+KEY idx2 (faq_group_id,faq_id)
+);
+INSERT INTO t1 VALUES 
+(1,'Everyone',2),(2,'Help',3),(3,'Technical Support',1),(4,'Chat User',4);
+INSERT INTO t2 VALUES
+(261,265,1),(490,494,1);
+SELECT t2.faq_id 
+FROM t1 INNER JOIN t2 IGNORE INDEX (idx1)
+ON (t1.access_id = t2.access_id)
+LEFT JOIN t2 t
+ON (t.faq_group_id = t2.faq_group_id AND
+find_in_set(t.access_id, '1,4') < find_in_set(t2.access_id, '1,4'))
+WHERE
+t2.access_id IN (1,4) AND t.access_id IS NULL AND t2.faq_id in (265);
+faq_id
+265
+SELECT t2.faq_id 
+FROM t1 INNER JOIN t2
+ON (t1.access_id = t2.access_id)
+LEFT JOIN t2 t
+ON (t.faq_group_id = t2.faq_group_id AND
+find_in_set(t.access_id, '1,4') < find_in_set(t2.access_id, '1,4'))
+WHERE
+t2.access_id IN (1,4) AND t.access_id IS NULL AND t2.faq_id in (265);
+faq_id
+265
+DROP TABLE t1,t2;
+CREATE TABLE t1 (a INT, b INT, KEY inx (b,a));
+INSERT INTO t1 VALUES (1,1), (1,2), (1,3), (1,4), (1,5), (1, 6), (1,7);
+EXPLAIN SELECT COUNT(*) FROM t1 f1 INNER JOIN t1 f2
+ON ( f1.b=f2.b AND f1.a<f2.a ) 
+WHERE 1 AND f1.b NOT IN (100,2232,3343,51111);
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	f1	index	inx	inx	10	NULL	7	Using where; Using index
+1	SIMPLE	f2	ref	inx	inx	5	test.f1.b	1	Using where; Using index
+DROP TABLE t1;
+CREATE TABLE t1 (c1 INT, c2 INT);
+INSERT INTO t1 VALUES (1,11), (2,22), (2,22);
+EXPLAIN SELECT c1 FROM t1 WHERE (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT COUNT(c2)))))))))))))))))))))))))))))))) > 0;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	t1	ALL	NULL	NULL	NULL	NULL	3	Using where
+31	DEPENDENT SUBQUERY	NULL	NULL	NULL	NULL	NULL	NULL	NULL	No tables used
+32	DEPENDENT SUBQUERY	NULL	NULL	NULL	NULL	NULL	NULL	NULL	No tables used
+EXPLAIN SELECT c1 FROM t1 WHERE (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT COUNT(c2))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) > 0;
+ERROR HY000: Too high level of nesting for select
+DROP TABLE t1;
+CREATE TABLE t1 (
+c1 int(11) NOT NULL AUTO_INCREMENT,
+c2 varchar(1000) DEFAULT NULL,
+c3 bigint(20) DEFAULT NULL,
+c4 bigint(20) DEFAULT NULL,
+PRIMARY KEY (c1)
+);
+EXPLAIN EXTENDED 
+SELECT  join_2.c1  
+FROM 
+t1 AS join_0, 
+t1 AS join_1, 
+t1 AS join_2, 
+t1 AS join_3, 
+t1 AS join_4, 
+t1 AS join_5, 
+t1 AS join_6, 
+t1 AS join_7
+WHERE 
+join_0.c1=join_1.c1  AND 
+join_1.c1=join_2.c1  AND 
+join_2.c1=join_3.c1  AND 
+join_3.c1=join_4.c1  AND 
+join_4.c1=join_5.c1  AND 
+join_5.c1=join_6.c1  AND 
+join_6.c1=join_7.c1 
+OR 
+join_0.c2 < '?'  AND 
+join_1.c2 < '?'  AND
+join_2.c2 > '?'  AND
+join_2.c2 < '!'  AND
+join_3.c2 > '?'  AND 
+join_4.c2 = '?'  AND 
+join_5.c2 <> '?' AND
+join_6.c2 <> '?' AND 
+join_7.c2 >= '?' AND
+join_0.c1=join_1.c1  AND 
+join_1.c1=join_2.c1  AND 
+join_2.c1=join_3.c1  AND
+join_3.c1=join_4.c1  AND 
+join_4.c1=join_5.c1  AND 
+join_5.c1=join_6.c1  AND 
+join_6.c1=join_7.c1
+GROUP BY 
+join_3.c1,
+join_2.c1,
+join_7.c1,
+join_1.c1,
+join_0.c1;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
+1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Impossible WHERE noticed after reading const tables
+Warnings:
+Note	1003	select NULL AS `c1` from `test`.`t1` `join_0` join `test`.`t1` `join_1` join `test`.`t1` `join_2` join `test`.`t1` `join_3` join `test`.`t1` `join_4` join `test`.`t1` `join_5` join `test`.`t1` `join_6` join `test`.`t1` `join_7` where 0 group by NULL,NULL,NULL,NULL,NULL
+SHOW WARNINGS;
+Level	Code	Message
+Note	1003	select NULL AS `c1` from `test`.`t1` `join_0` join `test`.`t1` `join_1` join `test`.`t1` `join_2` join `test`.`t1` `join_3` join `test`.`t1` `join_4` join `test`.`t1` `join_5` join `test`.`t1` `join_6` join `test`.`t1` `join_7` where 0 group by NULL,NULL,NULL,NULL,NULL
+DROP TABLE t1;
+SELECT 1 AS ` `;
+
+1
+Warnings:
+Warning	1474	Name ' ' has become ''
+SELECT 1 AS `  `;
+
+1
+Warnings:
+Warning	1474	Name '  ' has become ''
+SELECT 1 AS ` x`;
+x
+1
+Warnings:
+Warning	1466	Leading spaces are removed from name ' x'
+CREATE VIEW v1 AS SELECT 1 AS ``;
+ERROR 42000: Incorrect column name ''
+CREATE VIEW v1 AS SELECT 1 AS ` `;
+ERROR 42000: Incorrect column name ' '
+CREATE VIEW v1 AS SELECT 1 AS `  `;
+ERROR 42000: Incorrect column name '  '
+CREATE VIEW v1 AS SELECT (SELECT 1 AS `  `);
+ERROR 42000: Incorrect column name '  '
+CREATE VIEW v1 AS SELECT 1 AS ` x`;
+Warnings:
+Warning	1466	Leading spaces are removed from name ' x'
+SELECT `x` FROM v1;
+x
+1
+ALTER VIEW v1 AS SELECT 1 AS ` `;
+ERROR 42000: Incorrect column name ' '
+DROP VIEW v1;
+select str_to_date('2007-10-09','%Y-%m-%d') between '2007/10/01 00:00:00 GMT'
+                                                and '2007/10/20 00:00:00 GMT';
+str_to_date('2007-10-09','%Y-%m-%d') between '2007/10/01 00:00:00 GMT'
+                                                and '2007/10/20 00:00:00 GMT'
+1
+Warnings:
+Warning	1292	Truncated incorrect datetime value: '2007/10/01 00:00:00 GMT'
+Warning	1292	Truncated incorrect datetime value: '2007/10/20 00:00:00 GMT'
+select str_to_date('2007-10-09','%Y-%m-%d') > '2007/10/01 00:00:00 GMT-6';
+str_to_date('2007-10-09','%Y-%m-%d') > '2007/10/01 00:00:00 GMT-6'
+1
+Warnings:
+Warning	1292	Truncated incorrect date value: '2007/10/01 00:00:00 GMT-6'
+select str_to_date('2007-10-09','%Y-%m-%d') <= '2007/10/2000:00:00 GMT-6';
+str_to_date('2007-10-09','%Y-%m-%d') <= '2007/10/2000:00:00 GMT-6'
+1
+Warnings:
+Warning	1292	Truncated incorrect date value: '2007/10/2000:00:00 GMT-6'
+select str_to_date('2007-10-01','%Y-%m-%d') = '2007-10-1 00:00:00 GMT-6';
+str_to_date('2007-10-01','%Y-%m-%d') = '2007-10-1 00:00:00 GMT-6'
+1
+Warnings:
+Warning	1292	Truncated incorrect date value: '2007-10-1 00:00:00 GMT-6'
+select str_to_date('2007-10-01','%Y-%m-%d') = '2007-10-01 x00:00:00 GMT-6';
+str_to_date('2007-10-01','%Y-%m-%d') = '2007-10-01 x00:00:00 GMT-6'
+1
+Warnings:
+Warning	1292	Truncated incorrect date value: '2007-10-01 x00:00:00 GMT-6'
+select str_to_date('2007-10-01','%Y-%m-%d %H:%i:%s') = '2007-10-01 00:00:00 GMT-6';
+str_to_date('2007-10-01','%Y-%m-%d %H:%i:%s') = '2007-10-01 00:00:00 GMT-6'
+1
+Warnings:
+Warning	1292	Truncated incorrect datetime value: '2007-10-01 00:00:00 GMT-6'
+select str_to_date('2007-10-01','%Y-%m-%d %H:%i:%s') = '2007-10-01 00:x00:00 GMT-6';
+str_to_date('2007-10-01','%Y-%m-%d %H:%i:%s') = '2007-10-01 00:x00:00 GMT-6'
+1
+Warnings:
+Warning	1292	Truncated incorrect datetime value: '2007-10-01 00:x00:00 GMT-6'
+select str_to_date('2007-10-01','%Y-%m-%d %H:%i:%s') = '2007-10-01 x12:34:56 GMT-6';
+str_to_date('2007-10-01','%Y-%m-%d %H:%i:%s') = '2007-10-01 x12:34:56 GMT-6'
+1
+Warnings:
+Warning	1292	Truncated incorrect datetime value: '2007-10-01 x12:34:56 GMT-6'
+select str_to_date('2007-10-01 12:34:00','%Y-%m-%d %H:%i:%s') = '2007-10-01 12:34x:56 GMT-6';
+str_to_date('2007-10-01 12:34:00','%Y-%m-%d %H:%i:%s') = '2007-10-01 12:34x:56 GMT-6'
+1
+Warnings:
+Warning	1292	Truncated incorrect datetime value: '2007-10-01 12:34x:56 GMT-6'
+select str_to_date('2007-10-01 12:34:56','%Y-%m-%d %H:%i:%s') = '2007-10-01 12:34x:56 GMT-6';
+str_to_date('2007-10-01 12:34:56','%Y-%m-%d %H:%i:%s') = '2007-10-01 12:34x:56 GMT-6'
+0
+Warnings:
+Warning	1292	Truncated incorrect datetime value: '2007-10-01 12:34x:56 GMT-6'
+select str_to_date('2007-10-01 12:34:56','%Y-%m-%d %H:%i:%s') = '2007-10-01 12:34:56';
+str_to_date('2007-10-01 12:34:56','%Y-%m-%d %H:%i:%s') = '2007-10-01 12:34:56'
+1
+select str_to_date('2007-10-01','%Y-%m-%d') = '2007-10-01 12:00:00';
+str_to_date('2007-10-01','%Y-%m-%d') = '2007-10-01 12:00:00'
+0
+select str_to_date('2007-10-01 12','%Y-%m-%d %H') = '2007-10-01 12:00:00';
+str_to_date('2007-10-01 12','%Y-%m-%d %H') = '2007-10-01 12:00:00'
+1
+select str_to_date('2007-10-01 12:34','%Y-%m-%d %H') = '2007-10-01 12:00:00';
+str_to_date('2007-10-01 12:34','%Y-%m-%d %H') = '2007-10-01 12:00:00'
+1
+Warnings:
+Warning	1292	Truncated incorrect datetime value: '2007-10-01 12:34'
+select str_to_date('2007-02-30 12:34','%Y-%m-%d %H:%i') = '2007-02-30 12:34';
+str_to_date('2007-02-30 12:34','%Y-%m-%d %H:%i') = '2007-02-30 12:34'
+1
+select str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34';
+str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34'
+1
+select str_to_date('2007-10-00','%Y-%m-%d') between '2007/09/01 00:00:00'
+                                                and '2007/10/20 00:00:00';
+str_to_date('2007-10-00','%Y-%m-%d') between '2007/09/01 00:00:00'
+                                                and '2007/10/20 00:00:00'
+1
+set SQL_MODE=TRADITIONAL;
+select str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34';
+str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34'
+0
+Warnings:
+Warning	1292	Truncated incorrect datetime value: '2007-10-00 12:34'
+select str_to_date('2007-10-01 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34';
+str_to_date('2007-10-01 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34'
+0
+Warnings:
+Warning	1292	Truncated incorrect datetime value: '2007-10-00 12:34'
+select str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-01 12:34';
+str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-01 12:34'
+0
+Warnings:
+Warning	1292	Truncated incorrect datetime value: '2007-10-00 12:34:00'
+select str_to_date('2007-10-00','%Y-%m-%d') between '2007/09/01'
+                                                and '2007/10/20';
+str_to_date('2007-10-00','%Y-%m-%d') between '2007/09/01'
+                                                and '2007/10/20'
+0
+Warnings:
+Warning	1292	Incorrect datetime value: '2007-10-00' for column '2007/09/01' at row 1
+Warning	1292	Incorrect datetime value: '2007-10-00' for column '2007/10/20' at row 1
+set SQL_MODE=DEFAULT;
+select str_to_date('2007-10-00','%Y-%m-%d') between '' and '2007/10/20';
+str_to_date('2007-10-00','%Y-%m-%d') between '' and '2007/10/20'
+1
+Warnings:
+Warning	1292	Truncated incorrect datetime value: ''
+select str_to_date('','%Y-%m-%d') between '2007/10/01' and '2007/10/20';
+str_to_date('','%Y-%m-%d') between '2007/10/01' and '2007/10/20'
+0
+select str_to_date('','%Y-%m-%d %H:%i') = '2007-10-01 12:34';
+str_to_date('','%Y-%m-%d %H:%i') = '2007-10-01 12:34'
+0
+select str_to_date(NULL,'%Y-%m-%d %H:%i') = '2007-10-01 12:34';
+str_to_date(NULL,'%Y-%m-%d %H:%i') = '2007-10-01 12:34'
+NULL
+select str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '';
+str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = ''
+0
+Warnings:
+Warning	1292	Truncated incorrect datetime value: ''
+select str_to_date('1','%Y-%m-%d') = '1';
+str_to_date('1','%Y-%m-%d') = '1'
+0
+Warnings:
+Warning	1292	Truncated incorrect date value: '1'
+select str_to_date('1','%Y-%m-%d') = '1';
+str_to_date('1','%Y-%m-%d') = '1'
+0
+Warnings:
+Warning	1292	Truncated incorrect date value: '1'
+select str_to_date('','%Y-%m-%d') = '';
+str_to_date('','%Y-%m-%d') = ''
+0
+Warnings:
+Warning	1292	Truncated incorrect date value: ''
+select str_to_date('1000-01-01','%Y-%m-%d') between '0000-00-00' and NULL;
+str_to_date('1000-01-01','%Y-%m-%d') between '0000-00-00' and NULL
+0
+select str_to_date('1000-01-01','%Y-%m-%d') between NULL and '2000-00-00';
+str_to_date('1000-01-01','%Y-%m-%d') between NULL and '2000-00-00'
+0
+select str_to_date('1000-01-01','%Y-%m-%d') between NULL and NULL;
+str_to_date('1000-01-01','%Y-%m-%d') between NULL and NULL
+0
+CREATE TABLE t1 (c11 INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY);
+CREATE TABLE t2 (c21 INT UNSIGNED NOT NULL, 
+c22 INT DEFAULT NULL, 
+KEY(c21, c22));
+CREATE TABLE t3 (c31 INT UNSIGNED NOT NULL DEFAULT 0, 
+c32 INT DEFAULT NULL, 
+c33 INT NOT NULL, 
+c34 INT UNSIGNED DEFAULT 0,
+KEY (c33, c34, c32));
+INSERT INTO t1 values (),(),(),(),();
+INSERT INTO t2 SELECT a.c11, b.c11 FROM t1 a, t1 b;
+INSERT INTO t3 VALUES (1, 1, 1, 0), 
+(2, 2, 0, 0), 
+(3, 3, 1, 0), 
+(4, 4, 0, 0), 
+(5, 5, 1, 0);
+SELECT c32 FROM t1, t2, t3 WHERE t1.c11 IN (1, 3, 5) AND 
+t3.c31 = t1.c11 AND t2.c21 = t1.c11 AND 
+t3.c33 = 1 AND t2.c22 in (1, 3) 
+ORDER BY c32;
+c32
+1
+1
+3
+3
+5
+5
+SELECT c32 FROM t1, t2, t3 WHERE t1.c11 IN (1, 3, 5) AND 
+t3.c31 = t1.c11 AND t2.c21 = t1.c11 AND 
+t3.c33 = 1 AND t2.c22 in (1, 3) 
+ORDER BY c32 DESC;
+c32
+5
+5
+3
+3
+1
+1
+DROP TABLE t1, t2, t3;
+
+#
+# Bug#30736: Row Size Too Large Error Creating a Table and
+# Inserting Data.
+#
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t2;
+
+CREATE TABLE t1(
+c1 DECIMAL(10, 2),
+c2 FLOAT);
+
+INSERT INTO t1 VALUES (0, 1), (2, 3), (4, 5);
+
+CREATE TABLE t2(
+c3 DECIMAL(10, 2))
+SELECT
+c1 * c2 AS c3
+FROM t1;
+
+SELECT * FROM t1;
+c1	c2
+0.00	1
+2.00	3
+4.00	5
+
+SELECT * FROM t2;
+c3
+0.00
+6.00
+20.00
+
+DROP TABLE t1;
+DROP TABLE t2;
+
+CREATE TABLE t1 (c1 BIGINT NOT NULL);
+INSERT INTO t1 (c1) VALUES (1);
+SELECT * FROM t1 WHERE c1 > NULL + 1;
+c1
+DROP TABLE t1;
+
+CREATE TABLE t1 (a VARCHAR(10) NOT NULL PRIMARY KEY);
+INSERT INTO t1 (a) VALUES ('foo0'), ('bar0'), ('baz0');
+SELECT * FROM t1 WHERE a IN (CONCAT('foo', 0), 'bar');
+a
+foo0
+DROP TABLE t1;
+CREATE TABLE t1 (a INT, b INT);
+CREATE TABLE t2 (a INT, c INT, KEY(a));
+INSERT INTO t1 VALUES (1, 1), (2, 2);
+INSERT INTO t2 VALUES (1, 1), (1, 2), (1, 3), (1, 4), (1, 5),
+(2, 1), (2, 2), (2, 3), (2, 4), (2, 5),
+(3, 1), (3, 2), (3, 3), (3, 4), (3, 5),
+(4, 1), (4, 2), (4, 3), (4, 4), (4, 5);
+FLUSH STATUS;
+SELECT DISTINCT b FROM t1 LEFT JOIN t2 USING(a) WHERE c <= 3;
+b
+1
+2
+SHOW STATUS LIKE 'Handler_read%';
+Variable_name	Value
+Handler_read_first	0
+Handler_read_key	2
+Handler_read_next	0
+Handler_read_prev	0
+Handler_read_rnd	0
+Handler_read_rnd_next	6
+DROP TABLE t1, t2;
+CREATE TABLE t1 (f1 bigint(20) NOT NULL default '0',
+f2 int(11) NOT NULL default '0',
+f3 bigint(20) NOT NULL default '0',
+f4 varchar(255) NOT NULL default '',
+PRIMARY KEY (f1),
+KEY key1 (f4),
+KEY key2 (f2));
+CREATE TABLE t2 (f1 int(11) NOT NULL default '0',
+f2 enum('A1','A2','A3') NOT NULL default 'A1',
+f3 int(11) NOT NULL default '0',
+PRIMARY KEY (f1),
+KEY key1 (f3));
+CREATE TABLE t3 (f1 bigint(20) NOT NULL default '0',
+f2 datetime NOT NULL default '1980-01-01 00:00:00',
+PRIMARY KEY (f1));
+insert into t1 values (1, 1, 1, 'abc');
+insert into t1 values (2, 1, 2, 'def');
+insert into t1 values (3, 1, 2, 'def');
+insert into t2 values (1, 'A1', 1);
+insert into t3 values (1, '1980-01-01');
+SELECT a.f3, cr.f4, count(*) count
+FROM t2 a
+STRAIGHT_JOIN t1 cr ON cr.f2 = a.f1
+LEFT JOIN
+(t1 cr2
+JOIN t3 ae2 ON cr2.f3 = ae2.f1
+) ON a.f1 = cr2.f2 AND ae2.f2 < now() - INTERVAL 7 DAY AND
+cr.f4 = cr2.f4
+GROUP BY a.f3, cr.f4;
+f3	f4	count
+1	abc	1
+1	def	2
+drop table t1, t2, t3;
+CREATE TABLE t1 (a INT KEY, b INT);
+INSERT INTO t1 VALUES (1,1), (2,2), (3,3), (4,4);
+EXPLAIN EXTENDED SELECT a, b FROM t1 WHERE a > 1 AND a = b LIMIT 2;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
+1	SIMPLE	t1	range	PRIMARY	PRIMARY	4	NULL	3	100.00	Using where
+Warnings:
+Note	1003	select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where ((`test`.`t1`.`b` = `test`.`t1`.`a`) and (`test`.`t1`.`a` > 1)) limit 2
+EXPLAIN EXTENDED SELECT a, b FROM t1 WHERE a > 1 AND b = a LIMIT 2;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
+1	SIMPLE	t1	range	PRIMARY	PRIMARY	4	NULL	3	100.00	Using where
+Warnings:
+Note	1003	select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where ((`test`.`t1`.`a` = `test`.`t1`.`b`) and (`test`.`t1`.`a` > 1)) limit 2
+DROP TABLE t1;
+#
+# Bug#47019: Assertion failed: 0, file .\rt_mbr.c, line 138 when 
+# forcing a spatial index
+#
+CREATE TABLE t1(a LINESTRING NOT NULL, SPATIAL KEY(a));
+INSERT INTO t1 VALUES
+(GEOMFROMTEXT('LINESTRING(-1 -1, 1 -1, -1 -1, -1 1, 1 1)')),
+(GEOMFROMTEXT('LINESTRING(-1 -1, 1 -1, -1 -1, -1 1, 1 1)'));
+EXPLAIN SELECT 1 FROM t1 NATURAL LEFT JOIN t1 AS t2;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	2	
+1	SIMPLE	t2	ALL	a	NULL	NULL	NULL	2	
+SELECT 1 FROM t1 NATURAL LEFT JOIN t1 AS t2;
+1
+1
+1
+1
+1
+EXPLAIN SELECT 1 FROM t1 NATURAL LEFT JOIN t1 AS t2 FORCE INDEX(a);
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	2	
+1	SIMPLE	t2	ALL	a	NULL	NULL	NULL	2	
+SELECT 1 FROM t1 NATURAL LEFT JOIN t1 AS t2 FORCE INDEX(a);
+1
+1
+1
+1
+1
+DROP TABLE t1;
+#
+# Bug #48291 : crash with row() operator,select into @var, and 
+#   subquery returning multiple rows
+#
+CREATE TABLE t1(a INT);
+INSERT INTO t1 VALUES (2),(3);
+# Should not crash
+SELECT 1 FROM t1 WHERE a <> 1 AND NOT
+ROW(a,a) <=> ROW((SELECT 1 FROM t1 WHERE 1=2),(SELECT 1 FROM t1))
+INTO @var0;
+ERROR 21000: Subquery returns more than 1 row
+DROP TABLE t1;
+#
+# Bug #48458: simple query tries to allocate enormous amount of
+#   memory
+#
+CREATE TABLE t1(a INT NOT NULL, b YEAR);
+INSERT INTO t1 VALUES ();
+Warnings:
+Warning	1364	Field 'a' doesn't have a default value
+CREATE TABLE t2(c INT);
+# Should not err out because of out-of-memory
+SELECT 1 FROM t2 JOIN t1 ON 1=1
+WHERE a != '1' AND NOT a >= b OR NOT ROW(b,a )<> ROW(a,a);
+1
+DROP TABLE t1,t2;
+#
+# Bug #49199: Optimizer handles incorrectly: 
+# field='const1' AND field='const2' in some cases
+
+CREATE TABLE t1(a DATETIME NOT NULL);
+INSERT INTO t1 VALUES('2001-01-01');
+SELECT * FROM t1 WHERE a='2001-01-01' AND a='2001-01-01 00:00:00';
+a
+2001-01-01 00:00:00
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='2001-01-01' AND a='2001-01-01 00:00:00';
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
+1	SIMPLE	t1	system	NULL	NULL	NULL	NULL	1	100.00	
+Warnings:
+Note	1003	select '2001-01-01 00:00:00' AS `a` from `test`.`t1` where 1
+DROP TABLE t1;
+CREATE TABLE t1(a DATE NOT NULL);
+INSERT INTO t1 VALUES('2001-01-01');
+SELECT * FROM t1 WHERE a='2001-01-01' AND a='2001-01-01 00:00:00';
+a
+2001-01-01
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='2001-01-01' AND a='2001-01-01 00:00:00';
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
+1	SIMPLE	t1	system	NULL	NULL	NULL	NULL	1	100.00	
+Warnings:
+Note	1003	select '2001-01-01' AS `a` from `test`.`t1` where 1
+DROP TABLE t1;
+CREATE TABLE t1(a TIMESTAMP NOT NULL);
+INSERT INTO t1 VALUES('2001-01-01');
+SELECT * FROM t1 WHERE a='2001-01-01' AND a='2001-01-01 00:00:00';
+a
+2001-01-01 00:00:00
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='2001-01-01' AND a='2001-01-01 00:00:00';
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
+1	SIMPLE	t1	system	NULL	NULL	NULL	NULL	1	100.00	
+Warnings:
+Note	1003	select '2001-01-01 00:00:00' AS `a` from `test`.`t1` where 1
+DROP TABLE t1;
+CREATE TABLE t1(a DATETIME NOT NULL, b DATE NOT NULL);
+INSERT INTO t1 VALUES('2001-01-01', '2001-01-01');
+SELECT * FROM t1 WHERE a='2001-01-01' AND a=b AND b='2001-01-01 00:00:00';
+a	b
+2001-01-01 00:00:00	2001-01-01
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='2001-01-01' AND a=b AND b='2001-01-01 00:00:00';
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
+1	SIMPLE	t1	system	NULL	NULL	NULL	NULL	1	100.00	
+Warnings:
+Note	1003	select '2001-01-01 00:00:00' AS `a`,'2001-01-01' AS `b` from `test`.`t1` where 1
+DROP TABLE t1;
+CREATE TABLE t1(a DATETIME NOT NULL, b VARCHAR(20) NOT NULL);
+INSERT INTO t1 VALUES('2001-01-01', '2001-01-01');
+SELECT * FROM t1 WHERE a='2001-01-01' AND a=b AND b='2001-01-01 00:00:00';
+a	b
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='2001-01-01' AND a=b AND b='2001-01-01 00:00:00';
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
+1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Impossible WHERE noticed after reading const tables
+Warnings:
+Note	1003	select '2001-01-01 00:00:00' AS `a`,'2001-01-01' AS `b` from `test`.`t1` where 0
+SELECT * FROM t1 WHERE a='2001-01-01 00:00:00' AND a=b AND b='2001-01-01';
+a	b
+2001-01-01 00:00:00	2001-01-01
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='2001-01-01 00:00:00' AND a=b AND b='2001-01-01';
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
+1	SIMPLE	t1	system	NULL	NULL	NULL	NULL	1	100.00	
+Warnings:
+Note	1003	select '2001-01-01 00:00:00' AS `a`,'2001-01-01' AS `b` from `test`.`t1` where 1
+DROP TABLE t1;
+CREATE TABLE t1(a DATETIME NOT NULL, b DATE NOT NULL);
+INSERT INTO t1 VALUES('2001-01-01', '2001-01-01');
+SELECT x.a, y.a, z.a FROM t1 x 
+JOIN t1 y ON x.a=y.a 
+JOIN t1 z ON y.a=z.a 
+WHERE x.a='2001-01-01' AND z.a='2001-01-01 00:00:00';
+a	a	a
+2001-01-01 00:00:00	2001-01-01 00:00:00	2001-01-01 00:00:00
+EXPLAIN EXTENDED SELECT x.a, y.a, z.a FROM t1 x 
+JOIN t1 y ON x.a=y.a 
+JOIN t1 z ON y.a=z.a 
+WHERE x.a='2001-01-01' AND z.a='2001-01-01 00:00:00';
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
+1	SIMPLE	x	system	NULL	NULL	NULL	NULL	1	100.00	
+1	SIMPLE	y	system	NULL	NULL	NULL	NULL	1	100.00	
+1	SIMPLE	z	system	NULL	NULL	NULL	NULL	1	100.00	
+Warnings:
+Note	1003	select '2001-01-01 00:00:00' AS `a`,'2001-01-01 00:00:00' AS `a`,'2001-01-01 00:00:00' AS `a` from `test`.`t1` `x` join `test`.`t1` `y` join `test`.`t1` `z` where 1
+DROP TABLE t1;
+#
+# Bug #49897: crash in ptr_compare when char(0) NOT NULL 
+# column is used for ORDER BY
+#
+SET @old_sort_buffer_size= @@session.sort_buffer_size;
+SET @@sort_buffer_size= 40000;
+CREATE TABLE t1(a CHAR(0) NOT NULL);
+INSERT INTO t1 VALUES (0), (0), (0);
+INSERT INTO t1 SELECT t11.a FROM t1 t11, t1 t12;
+INSERT INTO t1 SELECT t11.a FROM t1 t11, t1 t12;
+INSERT INTO t1 SELECT t11.a FROM t1 t11, t1 t12;
+EXPLAIN SELECT a FROM t1 ORDER BY a;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	24492	
+SELECT a FROM t1 ORDER BY a;
+DROP TABLE t1;
+CREATE TABLE t1(a CHAR(0) NOT NULL, b CHAR(0) NOT NULL, c int);
+INSERT INTO t1 VALUES (0, 0, 0), (0, 0, 2), (0, 0, 1);
+INSERT INTO t1 SELECT t11.a, t11.b, t11.c FROM t1 t11, t1 t12;
+INSERT INTO t1 SELECT t11.a, t11.b, t11.c FROM t1 t11, t1 t12;
+INSERT INTO t1 SELECT t11.a, t11.b, t11.c FROM t1 t11, t1 t12;
+EXPLAIN SELECT a FROM t1 ORDER BY a LIMIT 5;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	24492	
+SELECT a FROM t1 ORDER BY a LIMIT 5;
+a
+
+
+
+
+
+EXPLAIN SELECT * FROM t1 ORDER BY a, b LIMIT 5;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	24492	
+SELECT * FROM t1 ORDER BY a, b LIMIT 5;
+a	b	c
+		0
+		2
+		1
+		0
+		2
+EXPLAIN SELECT * FROM t1 ORDER BY a, b, c LIMIT 5;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	24492	Using filesort
+SELECT * FROM t1 ORDER BY a, b, c LIMIT 5;
+a	b	c
+		0
+		0
+		0
+		0
+		0
+EXPLAIN SELECT * FROM t1 ORDER BY c, a LIMIT 5;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	24492	Using filesort
+SELECT * FROM t1 ORDER BY c, a LIMIT 5;
+a	b	c
+		0
+		0
+		0
+		0
+		0
+SET @@sort_buffer_size= @old_sort_buffer_size;
+DROP TABLE t1;
+End of 5.0 tests
+create table t1(a INT, KEY (a));
+INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
+SELECT a FROM t1 ORDER BY a LIMIT 2;
+a
+1
+2
+SELECT a FROM t1 ORDER BY a LIMIT 2,4294967296;
+a
+3
+4
+5
+SELECT a FROM t1 ORDER BY a LIMIT 2,4294967297;
+a
+3
+4
+5
+DROP TABLE t1;
+CREATE TABLE A (date_key date);
+CREATE TABLE C (
+pk int,
+int_nokey int,
+int_key int,
+date_key date NOT NULL,
+date_nokey date,
+varchar_key varchar(1)
+);
+INSERT INTO C VALUES 
+(1,1,1,'0000-00-00',NULL,NULL),
+(1,1,1,'0000-00-00',NULL,NULL);
+SELECT 1 FROM C WHERE pk > ANY (SELECT 1 FROM C);
+1
+SELECT COUNT(DISTINCT 1) FROM C 
+WHERE date_key = (SELECT 1 FROM A WHERE C.date_key IS NULL) GROUP BY pk;
+COUNT(DISTINCT 1)
+SELECT date_nokey FROM C 
+WHERE int_key IN (SELECT 1 FROM A) 
+HAVING date_nokey = '10:41:7' 
+ORDER BY date_key;
+date_nokey
+Warnings:
+Warning	1292	Incorrect date value: '10:41:7' for column 'date_nokey' at row 1
+DROP TABLE A,C;
+CREATE TABLE t1 (a INT NOT NULL, b INT);
+INSERT INTO t1 VALUES (1, 1);
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE (a=a AND a=a) OR b > 2;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
+1	SIMPLE	t1	system	NULL	NULL	NULL	NULL	1	100.00	
+Warnings:
+Note	1003	select '1' AS `a`,'1' AS `b` from `test`.`t1` where 1
+SELECT * FROM t1 WHERE (a=a AND a=a) OR b > 2;
+a	b
+1	1
+DROP TABLE t1;
+CREATE TABLE t1 (a INT NOT NULL, b INT NOT NULL, c INT NOT NULL);
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE (a=a AND b=b AND c=c) OR b > 20;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
+1	SIMPLE	t1	system	NULL	NULL	NULL	NULL	0	0.00	const row not found
+Warnings:
+Note	1003	select NULL AS `a`,NULL AS `b`,NULL AS `c` from `test`.`t1` where 1
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE (a=a AND a=a AND b=b) OR b > 20;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
+1	SIMPLE	t1	system	NULL	NULL	NULL	NULL	0	0.00	const row not found
+Warnings:
+Note	1003	select NULL AS `a`,NULL AS `b`,NULL AS `c` from `test`.`t1` where 1
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE (a=a AND b=b AND a=a) OR b > 20;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
+1	SIMPLE	t1	system	NULL	NULL	NULL	NULL	0	0.00	const row not found
+Warnings:
+Note	1003	select NULL AS `a`,NULL AS `b`,NULL AS `c` from `test`.`t1` where 1
+DROP TABLE t1;
+#
+# Bug#45266: Uninitialized variable lead to an empty result.
+#
+drop table if exists A,AA,B,BB;
+CREATE TABLE `A` (
+`pk` int(11) NOT NULL AUTO_INCREMENT,
+`date_key` date NOT NULL,
+`date_nokey` date NOT NULL,
+`datetime_key` datetime NOT NULL,
+`int_nokey` int(11) NOT NULL,
+`time_key` time NOT NULL,
+`time_nokey` time NOT NULL,
+PRIMARY KEY (`pk`),
+KEY `date_key` (`date_key`),
+KEY `time_key` (`time_key`),
+KEY `datetime_key` (`datetime_key`)
+);
+CREATE TABLE `AA` (
+`pk` int(11) NOT NULL AUTO_INCREMENT,
+`int_nokey` int(11) NOT NULL,
+`time_key` time NOT NULL,
+KEY `time_key` (`time_key`),
+PRIMARY KEY (`pk`)
+);
+CREATE TABLE `B` (
+`date_nokey` date NOT NULL,
+`date_key` date NOT NULL,
+`time_key` time NOT NULL,
+`datetime_nokey` datetime NOT NULL,
+`varchar_key` varchar(1) NOT NULL,
+KEY `date_key` (`date_key`),
+KEY `time_key` (`time_key`),
+KEY `varchar_key` (`varchar_key`)
+);
+INSERT INTO `B` VALUES ('2003-07-28','2003-07-28','15:13:38','0000-00-00 00:00:00','f'),('0000-00-00','0000-00-00','00:05:48','2004-07-02 14:34:13','x');
+CREATE TABLE `BB` (
+`pk` int(11) NOT NULL AUTO_INCREMENT,
+`int_nokey` int(11) NOT NULL,
+`date_key` date NOT NULL,
+`varchar_nokey` varchar(1) NOT NULL,
+`date_nokey` date NOT NULL,
+PRIMARY KEY (`pk`),
+KEY `date_key` (`date_key`)
+);
+INSERT INTO `BB` VALUES (10,8,'0000-00-00','i','0000-00-00'),(11,0,'2005-08-18','','2005-08-18');
+SELECT table1 . `pk` AS field1 
+FROM 
+(BB AS table1 INNER JOIN 
+(AA AS table2 STRAIGHT_JOIN A AS table3 
+ON ( table3 . `date_key` = table2 . `pk` ))
+ON ( table3 . `datetime_key` = table2 . `int_nokey` ))
+WHERE  ( table3 . `date_key` <= 4 AND table2 . `pk` = table1 . `varchar_nokey`)
+GROUP BY field1 ;
+field1
+SELECT table3 .`date_key` field1
+FROM
+B table1 LEFT JOIN B table3 JOIN
+(BB table6 JOIN A table7 ON table6 .`varchar_nokey`)
+ON table6 .`int_nokey` ON table6 .`date_key`
+  WHERE  NOT ( table1 .`varchar_key`  AND table7 .`pk`) GROUP  BY field1;
+field1
+NULL
+SELECT table4 . `time_nokey` AS field1 FROM 
+(AA AS table1 CROSS JOIN 
+(AA AS table2 STRAIGHT_JOIN 
+(B AS table3 STRAIGHT_JOIN A AS table4 
+ON ( table4 . `date_key` = table3 . `time_key` ))
+ON ( table4 . `pk` = table3 . `date_nokey` ))
+ON ( table4 . `time_key` = table3 . `datetime_nokey` ))
+WHERE  ( table4 . `time_key` < table1 . `time_key` AND
+table1 . `int_nokey` != 'f')
+GROUP BY field1  ORDER BY field1 , field1;
+field1
+SELECT table1 .`time_key` field2  FROM B table1  LEFT JOIN  BB JOIN A table5 ON table5 .`date_nokey`  ON table5 .`int_nokey` GROUP  BY field2;
+field2
+00:05:48
+15:13:38
+drop table A,AA,B,BB;
+#end of test for bug#45266
+# 
+# BUG#48052: Valgrind warning - uninitialized value in init_read_record()
+# 
+CREATE TABLE t1 (
+pk int(11) NOT NULL,
+i int(11) DEFAULT NULL,
+v varchar(1) DEFAULT NULL,
+PRIMARY KEY (pk)
+);
+INSERT INTO t1 VALUES (2,7,'m');
+INSERT INTO t1 VALUES (3,9,'m');
+SELECT  v
+FROM t1
+WHERE NOT pk > 0  
+HAVING v <= 't' 
+ORDER BY pk;
+v
+DROP TABLE t1;
+#
+# Bug#49489 Uninitialized cache led to a wrong result.
+#
+CREATE TABLE t1(c1 DOUBLE(5,4));
+INSERT INTO t1 VALUES (9.1234);
+SELECT * FROM t1 WHERE c1 < 9.12345;
+c1
+9.1234
+DROP TABLE t1;
+# End of test for bug#49489.
+#
+# Bug #49517: Inconsistent behavior while using 
+# NULLable BIGINT and INT columns in comparison
+#
+CREATE TABLE t1(a BIGINT UNSIGNED NOT NULL, b BIGINT NULL, c INT NULL);
+INSERT INTO t1 VALUES(105, NULL, NULL);
+SELECT * FROM t1 WHERE b < 102;
+a	b	c
+SELECT * FROM t1 WHERE c < 102;
+a	b	c
+SELECT * FROM t1 WHERE 102 < b;
+a	b	c
+SELECT * FROM t1 WHERE 102 < c;
+a	b	c
+DROP TABLE t1;
+#
+# Bug #54459: Assertion failed: param.sort_length, 
+# file .\filesort.cc, line 149 (part II)
+#
+CREATE TABLE t1(a ENUM('') NOT NULL);
+INSERT INTO t1 VALUES (), (), ();
+EXPLAIN SELECT 1 FROM t1 ORDER BY a COLLATE latin1_german2_ci;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	3	
+SELECT 1 FROM t1 ORDER BY a COLLATE latin1_german2_ci;
+1
+1
+1
+1
+DROP TABLE t1;
+#
+# Bug #702310: usage of 2 join buffers after ref access to an empty table 
+#
+CREATE TABLE t1 (f1 int) ;
+INSERT INTO t1 VALUES (9);
+CREATE TABLE t2 (f1 int);
+INSERT INTO t2 VALUES (3),(7),(18);
+INSERT INTO t2 VALUES (3),(7),(18);
+INSERT INTO t2 VALUES (3),(7),(18);
+INSERT INTO t2 VALUES (3),(7),(18);
+CREATE TABLE t3 (f1 int);
+INSERT INTO t3 VALUES (17);
+CREATE TABLE t4  (f1 int PRIMARY KEY, f2 varchar(1024)) ;
+CREATE TABLE t5 (f1 int) ;
+INSERT INTO t5 VALUES (20),(5);
+CREATE TABLE t6(f1 int);
+INSERT INTO t6 VALUES (9),(7);
+SET SESSION join_buffer_size = 9000;
+EXPLAIN
+SELECT STRAIGHT_JOIN * FROM t2, (t1 LEFT JOIN (t3,t4) ON t1.f1 = t4.f1), t5, t6;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	system	NULL	NULL	NULL	NULL	1	
+1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	12	
+1	SIMPLE	t3	ALL	NULL	NULL	NULL	NULL	1	
+1	SIMPLE	t4	eq_ref	PRIMARY	PRIMARY	4	const	1	
+1	SIMPLE	t5	ALL	NULL	NULL	NULL	NULL	2	Using join buffer
+1	SIMPLE	t6	ALL	NULL	NULL	NULL	NULL	2	Using join buffer
+SELECT STRAIGHT_JOIN * FROM t2, (t1 LEFT JOIN (t3,t4) ON t1.f1 = t4.f1), t5, t6;
+f1	f1	f1	f1	f2	f1	f1
+3	9	NULL	NULL	NULL	20	9
+7	9	NULL	NULL	NULL	20	9
+18	9	NULL	NULL	NULL	20	9
+3	9	NULL	NULL	NULL	20	9
+7	9	NULL	NULL	NULL	20	9
+18	9	NULL	NULL	NULL	20	9
+3	9	NULL	NULL	NULL	20	9
+3	9	NULL	NULL	NULL	20	7
+7	9	NULL	NULL	NULL	20	7
+18	9	NULL	NULL	NULL	20	7
+3	9	NULL	NULL	NULL	20	7
+7	9	NULL	NULL	NULL	20	7
+18	9	NULL	NULL	NULL	20	7
+3	9	NULL	NULL	NULL	20	7
+3	9	NULL	NULL	NULL	5	9
+7	9	NULL	NULL	NULL	5	9
+18	9	NULL	NULL	NULL	5	9
+3	9	NULL	NULL	NULL	5	9
+7	9	NULL	NULL	NULL	5	9
+18	9	NULL	NULL	NULL	5	9
+3	9	NULL	NULL	NULL	5	9
+3	9	NULL	NULL	NULL	5	7
+7	9	NULL	NULL	NULL	5	7
+18	9	NULL	NULL	NULL	5	7
+3	9	NULL	NULL	NULL	5	7
+7	9	NULL	NULL	NULL	5	7
+18	9	NULL	NULL	NULL	5	7
+3	9	NULL	NULL	NULL	5	7
+7	9	NULL	NULL	NULL	20	9
+18	9	NULL	NULL	NULL	20	9
+3	9	NULL	NULL	NULL	20	9
+7	9	NULL	NULL	NULL	20	9
+18	9	NULL	NULL	NULL	20	9
+7	9	NULL	NULL	NULL	5	9
+18	9	NULL	NULL	NULL	5	9
+7	9	NULL	NULL	NULL	20	7
+18	9	NULL	NULL	NULL	20	7
+3	9	NULL	NULL	NULL	20	7
+7	9	NULL	NULL	NULL	20	7
+18	9	NULL	NULL	NULL	20	7
+7	9	NULL	NULL	NULL	5	7
+18	9	NULL	NULL	NULL	5	7
+3	9	NULL	NULL	NULL	5	9
+7	9	NULL	NULL	NULL	5	9
+18	9	NULL	NULL	NULL	5	9
+3	9	NULL	NULL	NULL	5	7
+7	9	NULL	NULL	NULL	5	7
+18	9	NULL	NULL	NULL	5	7
+SET SESSION join_buffer_size = DEFAULT;
+DROP TABLE t1,t2,t3,t4,t5,t6;
+End of 5.1 tests

=== modified file 'mysql-test/r/sp.result'
--- a/mysql-test/r/sp.result	2010-02-09 10:30:50 +0000
+++ b/mysql-test/r/sp.result	2010-06-01 19:52:20 +0000
@@ -6940,9 +6940,8 @@
 call p();
 select @@sql_mode;
 @@sql_mode
-REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,?,ONLY_FULL_GROUP_BY,NO_UNSIGNED_SUBTRACTION,NO_DIR_IN_CREATE,POSTGRESQL,ORACLE,MSSQL,DB2,MAXDB,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,MYSQL323,MYSQL40,ANSI,NO_AUTO_VALUE_ON_ZERO,NO_BACKSLASH_ESCAPES,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ALLOW_INVALID_DATES,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,HIGH_NOT_PRECEDENCE,NO_ENGINE_SUBSTITUTION,PAD_CHAR_TO_FULL_LENGTH
+REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,IGNORE_BAD_TABLE_OPTIONS,ONLY_FULL_GROUP_BY,NO_UNSIGNED_SUBTRACTION,NO_DIR_IN_CREATE,POSTGRESQL,ORACLE,MSSQL,DB2,MAXDB,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,MYSQL323,MYSQL40,ANSI,NO_AUTO_VALUE_ON_ZERO,NO_BACKSLASH_ESCAPES,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ALLOW_INVALID_DATES,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,HIGH_NOT_PRECEDENCE,NO_ENGINE_SUBSTITUTION,PAD_CHAR_TO_FULL_LENGTH
 set @@sql_mode= @old_mode;
-select replace(@full_mode, '?', 'NOT_USED') into @full_mode;
 select replace(@full_mode, 'ALLOW_INVALID_DATES', 'INVALID_DATES') into @full_mode;
 select name from mysql.proc where name = 'p' and sql_mode = @full_mode;
 name

=== modified file 'mysql-test/r/sp_notembedded.result'
--- a/mysql-test/r/sp_notembedded.result	2010-04-28 12:52:24 +0000
+++ b/mysql-test/r/sp_notembedded.result	2010-06-01 19:52:20 +0000
@@ -191,6 +191,8 @@
 VALUES('%', 'mysqltest_1', password(''), 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'N', 'N', 'N',
 'N', 'N', 'N', 'Y', 'Y', 'N', 'N', 'Y', 'Y', 'N', 'N', 'N', 'N', 'N', 'Y', 'Y', 'N', '',
 '', '', '', '0', '0', '0', '0');
+Warnings:
+Warning	1364	Field 'auth_string' doesn't have a default value
 FLUSH PRIVILEGES;
 CREATE PROCEDURE p1(i INT) BEGIN END;
 DROP PROCEDURE p1;

=== added file 'mysql-test/r/status_user.result'
--- a/mysql-test/r/status_user.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/r/status_user.result	2010-07-19 18:08:06 +0000
@@ -0,0 +1,186 @@
+DROP TABLE IF EXISTS t1;
+select variable_value from information_schema.global_status where variable_name="handler_read_key" into @global_read_key;
+show columns from information_schema.client_statistics;
+Field	Type	Null	Key	Default	Extra
+CLIENT	varchar(64)	NO			
+TOTAL_CONNECTIONS	bigint(21)	NO		0	
+CONCURRENT_CONNECTIONS	bigint(21)	NO		0	
+CONNECTED_TIME	bigint(21)	NO		0	
+BUSY_TIME	double	NO		0	
+CPU_TIME	double	NO		0	
+BYTES_RECEIVED	bigint(21)	NO		0	
+BYTES_SENT	bigint(21)	NO		0	
+BINLOG_BYTES_WRITTEN	bigint(21)	NO		0	
+ROWS_READ	bigint(21)	NO		0	
+ROWS_SENT	bigint(21)	NO		0	
+ROWS_DELETED	bigint(21)	NO		0	
+ROWS_INSERTED	bigint(21)	NO		0	
+ROWS_UPDATED	bigint(21)	NO		0	
+SELECT_COMMANDS	bigint(21)	NO		0	
+UPDATE_COMMANDS	bigint(21)	NO		0	
+OTHER_COMMANDS	bigint(21)	NO		0	
+COMMIT_TRANSACTIONS	bigint(21)	NO		0	
+ROLLBACK_TRANSACTIONS	bigint(21)	NO		0	
+DENIED_CONNECTIONS	bigint(21)	NO		0	
+LOST_CONNECTIONS	bigint(21)	NO		0	
+ACCESS_DENIED	bigint(21)	NO		0	
+EMPTY_QUERIES	bigint(21)	NO		0	
+show columns from information_schema.user_statistics;
+Field	Type	Null	Key	Default	Extra
+USER	varchar(48)	NO			
+TOTAL_CONNECTIONS	int(11)	NO		0	
+CONCURRENT_CONNECTIONS	int(11)	NO		0	
+CONNECTED_TIME	int(11)	NO		0	
+BUSY_TIME	double	NO		0	
+CPU_TIME	double	NO		0	
+BYTES_RECEIVED	bigint(21)	NO		0	
+BYTES_SENT	bigint(21)	NO		0	
+BINLOG_BYTES_WRITTEN	bigint(21)	NO		0	
+ROWS_READ	bigint(21)	NO		0	
+ROWS_SENT	bigint(21)	NO		0	
+ROWS_DELETED	bigint(21)	NO		0	
+ROWS_INSERTED	bigint(21)	NO		0	
+ROWS_UPDATED	bigint(21)	NO		0	
+SELECT_COMMANDS	bigint(21)	NO		0	
+UPDATE_COMMANDS	bigint(21)	NO		0	
+OTHER_COMMANDS	bigint(21)	NO		0	
+COMMIT_TRANSACTIONS	bigint(21)	NO		0	
+ROLLBACK_TRANSACTIONS	bigint(21)	NO		0	
+DENIED_CONNECTIONS	bigint(21)	NO		0	
+LOST_CONNECTIONS	bigint(21)	NO		0	
+ACCESS_DENIED	bigint(21)	NO		0	
+EMPTY_QUERIES	bigint(21)	NO		0	
+show columns from information_schema.index_statistics;
+Field	Type	Null	Key	Default	Extra
+TABLE_SCHEMA	varchar(192)	NO			
+TABLE_NAME	varchar(192)	NO			
+INDEX_NAME	varchar(192)	NO			
+ROWS_READ	bigint(21)	NO		0	
+show columns from information_schema.table_statistics;
+Field	Type	Null	Key	Default	Extra
+TABLE_SCHEMA	varchar(192)	NO			
+TABLE_NAME	varchar(192)	NO			
+ROWS_READ	bigint(21)	NO		0	
+ROWS_CHANGED	bigint(21)	NO		0	
+ROWS_CHANGED_X_INDEXES	bigint(21)	NO		0	
+set @save_general_log=@@global.general_log;
+set @@global.general_log=0;
+set @@global.userstat=1;
+flush status;
+create table t1 (a int, primary key (a), b int default 0) engine=innodb;
+insert into t1 (a) values (1),(2),(3),(4);
+update t1 set b=1;
+update t1 set b=5 where a=2;
+delete from t1 where a=3;
+/* Empty query */
+select * from t1 where a=999;
+a	b
+drop table t1;
+create table t1 (a int, primary key (a), b int default 0) engine=innodb;
+begin;
+insert into t1 values(1,1);
+commit;
+begin;
+insert into t1 values(2,2);
+commit;
+begin;
+insert into t1 values(3,3);
+rollback;
+drop table t1;
+select sleep(1);
+sleep(1)
+0
+show status like "rows%";
+Variable_name	Value
+Rows_read	6
+Rows_sent	1
+show status like "ha%";
+Variable_name	Value
+Handler_commit	19
+Handler_delete	1
+Handler_discover	0
+Handler_prepare	18
+Handler_read_first	0
+Handler_read_key	3
+Handler_read_next	0
+Handler_read_prev	0
+Handler_read_rnd	0
+Handler_read_rnd_next	5
+Handler_rollback	2
+Handler_savepoint	0
+Handler_savepoint_rollback	0
+Handler_update	5
+Handler_write	7
+select variable_value - @global_read_key as "handler_read_key" from information_schema.global_status where variable_name="handler_read_key";
+handler_read_key
+3
+set @@global.userstat=0;
+select * from information_schema.index_statistics;
+TABLE_SCHEMA	TABLE_NAME	INDEX_NAME	ROWS_READ
+test	t1	PRIMARY	2
+select * from information_schema.table_statistics;
+TABLE_SCHEMA	TABLE_NAME	ROWS_READ	ROWS_CHANGED	ROWS_CHANGED_X_INDEXES
+test	t1	6	13	13
+show table_statistics;
+Table_schema	Table_name	Rows_read	Rows_changed	Rows_changed_x_#indexes
+test	t1	6	13	13
+show index_statistics;
+Table_schema	Table_name	Index_name	Rows_read
+test	t1	PRIMARY	2
+select TOTAL_CONNECTIONS, CONCURRENT_CONNECTIONS, ROWS_READ, ROWS_SENT, ROWS_DELETED, ROWS_INSERTED, ROWS_UPDATED, SELECT_COMMANDS, UPDATE_COMMANDS, OTHER_COMMANDS, COMMIT_TRANSACTIONS, ROLLBACK_TRANSACTIONS, DENIED_CONNECTIONS, LOST_CONNECTIONS, ACCESS_DENIED, EMPTY_QUERIES from information_schema.client_statistics;;
+TOTAL_CONNECTIONS	1
+CONCURRENT_CONNECTIONS	0
+ROWS_READ	6
+ROWS_SENT	2
+ROWS_DELETED	1
+ROWS_INSERTED	8
+ROWS_UPDATED	5
+SELECT_COMMANDS	3
+UPDATE_COMMANDS	11
+OTHER_COMMANDS	7
+COMMIT_TRANSACTIONS	19
+ROLLBACK_TRANSACTIONS	2
+DENIED_CONNECTIONS	0
+LOST_CONNECTIONS	0
+ACCESS_DENIED	0
+EMPTY_QUERIES	1
+select TOTAL_CONNECTIONS, CONCURRENT_CONNECTIONS, ROWS_READ, ROWS_SENT, ROWS_DELETED, ROWS_INSERTED, ROWS_UPDATED, SELECT_COMMANDS, UPDATE_COMMANDS, OTHER_COMMANDS, COMMIT_TRANSACTIONS, ROLLBACK_TRANSACTIONS, DENIED_CONNECTIONS, LOST_CONNECTIONS, ACCESS_DENIED, EMPTY_QUERIES from information_schema.user_statistics;;
+TOTAL_CONNECTIONS	1
+CONCURRENT_CONNECTIONS	0
+ROWS_READ	6
+ROWS_SENT	2
+ROWS_DELETED	1
+ROWS_INSERTED	8
+ROWS_UPDATED	5
+SELECT_COMMANDS	3
+UPDATE_COMMANDS	11
+OTHER_COMMANDS	7
+COMMIT_TRANSACTIONS	19
+ROLLBACK_TRANSACTIONS	2
+DENIED_CONNECTIONS	0
+LOST_CONNECTIONS	0
+ACCESS_DENIED	0
+EMPTY_QUERIES	1
+flush table_statistics;
+flush index_statistics;
+select * from information_schema.index_statistics;
+TABLE_SCHEMA	TABLE_NAME	INDEX_NAME	ROWS_READ
+select * from information_schema.table_statistics;
+TABLE_SCHEMA	TABLE_NAME	ROWS_READ	ROWS_CHANGED	ROWS_CHANGED_X_INDEXES
+show status like "%statistics%";
+Variable_name	Value
+Com_show_client_statistics	0
+Com_show_index_statistics	1
+Com_show_table_statistics	1
+Com_show_user_statistics	0
+select connected_time <> 0, busy_time <> 0, bytes_received <> 0,
+bytes_sent <> 0, binlog_bytes_written <> 0
+from information_schema.user_statistics;
+connected_time <> 0	busy_time <> 0	bytes_received <> 0	bytes_sent <> 0	binlog_bytes_written <> 0
+1	1	1	1	1
+select connected_time <> 0, busy_time <> 0, bytes_received <> 0,
+bytes_sent <> 0, binlog_bytes_written <> 0
+from information_schema.client_statistics;
+connected_time <> 0	busy_time <> 0	bytes_received <> 0	bytes_sent <> 0	binlog_bytes_written <> 0
+1	1	1	1	1
+set @@global.general_log=@save_general_log;

=== modified file 'mysql-test/r/system_mysql_db.result'
--- a/mysql-test/r/system_mysql_db.result	2009-10-27 10:09:36 +0000
+++ b/mysql-test/r/system_mysql_db.result	2010-04-08 12:10:05 +0000
@@ -118,6 +118,8 @@
   `max_updates` int(11) unsigned NOT NULL DEFAULT '0',
   `max_connections` int(11) unsigned NOT NULL DEFAULT '0',
   `max_user_connections` int(11) unsigned NOT NULL DEFAULT '0',
+  `plugin` char(60) CHARACTER SET latin1 NOT NULL DEFAULT '',
+  `auth_string` text COLLATE utf8_bin NOT NULL,
   PRIMARY KEY (`Host`,`User`)
 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges'
 show create table func;
@@ -200,7 +202,7 @@
   `definer` char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
   `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
   `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
-  `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') NOT NULL DEFAULT '',
+  `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') NOT NULL DEFAULT '',
   `comment` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
   `character_set_client` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
   `collation_connection` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
@@ -225,7 +227,7 @@
   `ends` datetime DEFAULT NULL,
   `status` enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') NOT NULL DEFAULT 'ENABLED',
   `on_completion` enum('DROP','PRESERVE') NOT NULL DEFAULT 'DROP',
-  `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') NOT NULL DEFAULT '',
+  `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') NOT NULL DEFAULT '',
   `comment` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
   `originator` int(10) unsigned NOT NULL,
   `time_zone` char(64) CHARACTER SET latin1 NOT NULL DEFAULT 'SYSTEM',

=== added file 'mysql-test/r/table_options.result'
--- a/mysql-test/r/table_options.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/r/table_options.result	2010-12-31 09:39:14 +0000
@@ -0,0 +1,182 @@
+drop table if exists t1;
+SET @OLD_SQL_MODE=@@SQL_MODE;
+SET SQL_MODE='IGNORE_BAD_TABLE_OPTIONS';
+create table t1 (a int fkey=vvv, key akey (a) dff=vvv) tkey1='1v1';
+Warnings:
+Warning	1652	Unknown option 'fkey'
+Warning	1652	Unknown option 'dff'
+Warning	1652	Unknown option 'tkey1'
+show create table t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) DEFAULT NULL `fkey`=vvv,
+  KEY `akey` (`a`) `dff`=vvv
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 `tkey1`='1v1'
+drop table t1;
+#reassiginig options in the same line
+create table t1 (a int fkey=vvv, key akey (a) dff=vvv) tkey1=1v1 TKEY1=DEFAULT tkey1=1v2 tkey2=2v1;
+Warnings:
+Warning	1652	Unknown option 'fkey'
+Warning	1652	Unknown option 'dff'
+Warning	1652	Unknown option 'tkey1'
+Warning	1652	Unknown option 'tkey2'
+show create table t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) DEFAULT NULL `fkey`=vvv,
+  KEY `akey` (`a`) `dff`=vvv
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 `tkey1`=1v2 `tkey2`=2v1
+#add option
+alter table t1 tkey4=4v1;
+Warnings:
+Warning	1652	Unknown option 'tkey4'
+show create table t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) DEFAULT NULL `fkey`=vvv,
+  KEY `akey` (`a`) `dff`=vvv
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 `tkey1`=1v2 `tkey2`=2v1 `tkey4`=4v1
+#remove options 
+alter table t1 tkey3=DEFAULT tkey4=DEFAULT;
+Warnings:
+Warning	1652	Unknown option 'tkey3'
+Warning	1652	Unknown option 'tkey4'
+show create table t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) DEFAULT NULL `fkey`=vvv,
+  KEY `akey` (`a`) `dff`=vvv
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 `tkey1`=1v2 `tkey2`=2v1
+drop table t1;
+create table t1 (a int fkey1=v1, key akey (a) kkey1=v1) tkey1=1v1 tkey1=1v2 TKEY1=DEFAULT tkey2=2v1 tkey3=3v1;
+Warnings:
+Warning	1652	Unknown option 'fkey1'
+Warning	1652	Unknown option 'kkey1'
+Warning	1652	Unknown option 'TKEY1'
+Warning	1652	Unknown option 'tkey2'
+Warning	1652	Unknown option 'tkey3'
+show create table t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) DEFAULT NULL `fkey1`=v1,
+  KEY `akey` (`a`) `kkey1`=v1
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 `tkey2`=2v1 `tkey3`=3v1
+#change field with option with the same value
+alter table t1 change a a int `FKEY1`='v1';
+Warnings:
+Warning	1652	Unknown option 'FKEY1'
+show create table t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) DEFAULT NULL `FKEY1`='v1',
+  KEY `akey` (`a`) `kkey1`=v1
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 `tkey2`=2v1 `tkey3`=3v1
+#change field with option with a different value
+alter table t1 change a a int fkey1=v2;
+Warnings:
+Warning	1652	Unknown option 'fkey1'
+show create table t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) DEFAULT NULL `fkey1`=v2,
+  KEY `akey` (`a`) `kkey1`=v1
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 `tkey2`=2v1 `tkey3`=3v1
+#new column no options
+alter table t1 add column b int;
+show create table t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) DEFAULT NULL `fkey1`=v2,
+  `b` int(11) DEFAULT NULL,
+  KEY `akey` (`a`) `kkey1`=v1
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 `tkey2`=2v1 `tkey3`=3v1
+#new key with options
+alter table t1 add key bkey (b) kkey2=v1;
+Warnings:
+Warning	1652	Unknown option 'kkey2'
+show create table t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) DEFAULT NULL `fkey1`=v2,
+  `b` int(11) DEFAULT NULL,
+  KEY `akey` (`a`) `kkey1`=v1,
+  KEY `bkey` (`b`) `kkey2`=v1
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 `tkey2`=2v1 `tkey3`=3v1
+#new column with options
+alter table t1 add column c int fkey1=v1 fkey2=v2;
+Warnings:
+Warning	1652	Unknown option 'fkey1'
+Warning	1652	Unknown option 'fkey2'
+show create table t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) DEFAULT NULL `fkey1`=v2,
+  `b` int(11) DEFAULT NULL,
+  `c` int(11) DEFAULT NULL `fkey1`=v1 `fkey2`=v2,
+  KEY `akey` (`a`) `kkey1`=v1,
+  KEY `bkey` (`b`) `kkey2`=v1
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 `tkey2`=2v1 `tkey3`=3v1
+#new key no options
+alter table t1 add key ckey (c);
+show create table t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) DEFAULT NULL `fkey1`=v2,
+  `b` int(11) DEFAULT NULL,
+  `c` int(11) DEFAULT NULL `fkey1`=v1 `fkey2`=v2,
+  KEY `akey` (`a`) `kkey1`=v1,
+  KEY `bkey` (`b`) `kkey2`=v1,
+  KEY `ckey` (`c`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 `tkey2`=2v1 `tkey3`=3v1
+#drop column
+alter table t1 drop b;
+show create table t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) DEFAULT NULL `fkey1`=v2,
+  `c` int(11) DEFAULT NULL `fkey1`=v1 `fkey2`=v2,
+  KEY `akey` (`a`) `kkey1`=v1,
+  KEY `ckey` (`c`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 `tkey2`=2v1 `tkey3`=3v1
+#add column with options after delete
+alter table t1 add column b int fkey2=v1;
+Warnings:
+Warning	1652	Unknown option 'fkey2'
+show create table t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) DEFAULT NULL `fkey1`=v2,
+  `c` int(11) DEFAULT NULL `fkey1`=v1 `fkey2`=v2,
+  `b` int(11) DEFAULT NULL `fkey2`=v1,
+  KEY `akey` (`a`) `kkey1`=v1,
+  KEY `ckey` (`c`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 `tkey2`=2v1 `tkey3`=3v1
+#add key 
+alter table t1 add key bkey (b) kkey2=v2;
+Warnings:
+Warning	1652	Unknown option 'kkey2'
+show create table t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) DEFAULT NULL `fkey1`=v2,
+  `c` int(11) DEFAULT NULL `fkey1`=v1 `fkey2`=v2,
+  `b` int(11) DEFAULT NULL `fkey2`=v1,
+  KEY `akey` (`a`) `kkey1`=v1,
+  KEY `ckey` (`c`),
+  KEY `bkey` (`b`) `kkey2`=v2
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 `tkey2`=2v1 `tkey3`=3v1
+drop table t1;
+create table t1 (a int) tkey1=100;
+Warnings:
+Warning	1652	Unknown option 'tkey1'
+show create table t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 `tkey1`=100
+drop table t1;
+#error on unknown option
+SET SQL_MODE='';
+create table t1 (a int fkey=vvv, key akey (a) dff=vvv) tkey1=1v1;
+ERROR HY000: Unknown option 'fkey'
+SET @@SQL_MODE=@OLD_SQL_MODE;

=== added file 'mysql-test/std_data/loaddata7.dat'
--- a/mysql-test/std_data/loaddata7.dat	1970-01-01 00:00:00 +0000
+++ b/mysql-test/std_data/loaddata7.dat	2009-10-16 14:22:56 +0000
@@ -0,0 +1,5 @@
+2,2
+3,3
+4,4
+5,5
+6,6
\ No newline at end of file

=== modified file 'mysql-test/suite/binlog/r/binlog_index.result'
--- a/mysql-test/suite/binlog/r/binlog_index.result	2010-04-06 22:47:08 +0000
+++ b/mysql-test/suite/binlog/r/binlog_index.result	2010-04-08 09:52:53 +0000
@@ -13,6 +13,7 @@
 master-bin.000002	#
 master-bin.000003	#
 master-bin.000004	#
+flush tables;
 purge binary logs TO 'master-bin.000004';
 Warnings:
 Warning	1612	Being purged log master-bin.000001 was not found

=== added file 'mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result'
--- a/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result	2011-01-13 12:28:36 +0000
@@ -0,0 +1,414 @@
+DROP DATABASE IF EXISTS test1;
+DROP DATABASE IF EXISTS test2;
+DROP DATABASE IF EXISTS test3;
+CREATE DATABASE test1;
+CREATE DATABASE test2;
+CREATE DATABASE test3;
+SET timestamp=1000000000;
+RESET MASTER;
+USE test1;
+CREATE TABLE t1 (a INT, b INT);
+INSERT INTO t1 VALUES (1,1),(2,2);
+USE test2;
+CREATE TABLE t2 (a INT);
+INSERT INTO t2 VALUES (1),(2);
+DELETE FROM test1.t1 WHERE a=1;
+USE test3;
+CREATE TABLE t3 (a INT);
+INSERT INTO t3 VALUES (1),(2);
+INSERT INTO test1.t1 VALUES (3,3);
+USE test1;
+LOAD DATA INFILE '../../std_data/loaddata7.dat' INTO TABLE t1
+FIELDS TERMINATED BY ',' LINES TERMINATED BY '\r\n';
+DELETE FROM test3.t3 WHERE a=1;
+flush logs;
+#
+# mysqlbinlog output
+# --base64-output = decode-rows
+# --rewrite-db = test1->new_test1
+# --rewrite-db = test3->new_test3
+#
+/*!40019 SET @@session.max_insert_delayed_threads=0*/;
+/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
+DELIMITER /*!*/;
+# at #
+#010909  4:46:40 server id #  end_log_pos # 	Start: binlog v 4, server v #.##.## created 010909  4:46:40 at startup
+ROLLBACK/*!*/;
+# at #
+use new_test1/*!*/;
+#010909  4:46:40 server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
+SET TIMESTAMP=1000000000/*!*/;
+SET @@session.pseudo_thread_id=#/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.lc_time_names=0/*!*/;
+SET @@session.collation_database=DEFAULT/*!*/;
+CREATE TABLE t1 (a INT, b INT)
+/*!*/;
+# at #
+#010909  4:46:40 server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
+SET TIMESTAMP=1000000000/*!*/;
+BEGIN
+/*!*/;
+# at #
+# at #
+#010909  4:46:40 server id #  end_log_pos # 	Table_map: `new_test1`.`t1` mapped to number #
+#010909  4:46:40 server id #  end_log_pos # 	Write_rows: table id # flags: STMT_END_F
+### INSERT INTO new_test1.t1
+### SET
+###   @1=1 /* INT meta=0 nullable=1 is_null=0 */
+###   @2=1 /* INT meta=0 nullable=1 is_null=0 */
+### INSERT INTO new_test1.t1
+### SET
+###   @1=2 /* INT meta=0 nullable=1 is_null=0 */
+###   @2=2 /* INT meta=0 nullable=1 is_null=0 */
+# at #
+#010909  4:46:40 server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
+SET TIMESTAMP=1000000000/*!*/;
+COMMIT
+/*!*/;
+# at #
+#010909  4:46:40 server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
+use test2/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+CREATE TABLE t2 (a INT)
+/*!*/;
+# at #
+#010909  4:46:40 server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
+SET TIMESTAMP=1000000000/*!*/;
+BEGIN
+/*!*/;
+# at #
+# at #
+#010909  4:46:40 server id #  end_log_pos # 	Table_map: `test2`.`t2` mapped to number #
+#010909  4:46:40 server id #  end_log_pos # 	Write_rows: table id # flags: STMT_END_F
+### INSERT INTO test2.t2
+### SET
+###   @1=1 /* INT meta=0 nullable=1 is_null=0 */
+### INSERT INTO test2.t2
+### SET
+###   @1=2 /* INT meta=0 nullable=1 is_null=0 */
+# at #
+#010909  4:46:40 server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
+SET TIMESTAMP=1000000000/*!*/;
+COMMIT
+/*!*/;
+# at #
+#010909  4:46:40 server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
+SET TIMESTAMP=1000000000/*!*/;
+BEGIN
+/*!*/;
+# at #
+# at #
+#010909  4:46:40 server id #  end_log_pos # 	Table_map: `new_test1`.`t1` mapped to number #
+#010909  4:46:40 server id #  end_log_pos # 	Delete_rows: table id # flags: STMT_END_F
+### DELETE FROM new_test1.t1
+### WHERE
+###   @1=1 /* INT meta=0 nullable=1 is_null=0 */
+###   @2=1 /* INT meta=0 nullable=1 is_null=0 */
+# at #
+#010909  4:46:40 server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
+SET TIMESTAMP=1000000000/*!*/;
+COMMIT
+/*!*/;
+# at #
+use new_test3/*!*/;
+#010909  4:46:40 server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
+SET TIMESTAMP=1000000000/*!*/;
+CREATE TABLE t3 (a INT)
+/*!*/;
+# at #
+#010909  4:46:40 server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
+SET TIMESTAMP=1000000000/*!*/;
+BEGIN
+/*!*/;
+# at #
+# at #
+#010909  4:46:40 server id #  end_log_pos # 	Table_map: `new_test3`.`t3` mapped to number #
+#010909  4:46:40 server id #  end_log_pos # 	Write_rows: table id # flags: STMT_END_F
+### INSERT INTO new_test3.t3
+### SET
+###   @1=1 /* INT meta=0 nullable=1 is_null=0 */
+### INSERT INTO new_test3.t3
+### SET
+###   @1=2 /* INT meta=0 nullable=1 is_null=0 */
+# at #
+#010909  4:46:40 server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
+SET TIMESTAMP=1000000000/*!*/;
+COMMIT
+/*!*/;
+# at #
+#010909  4:46:40 server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
+SET TIMESTAMP=1000000000/*!*/;
+BEGIN
+/*!*/;
+# at #
+# at #
+#010909  4:46:40 server id #  end_log_pos # 	Table_map: `new_test1`.`t1` mapped to number #
+#010909  4:46:40 server id #  end_log_pos # 	Write_rows: table id # flags: STMT_END_F
+### INSERT INTO new_test1.t1
+### SET
+###   @1=3 /* INT meta=0 nullable=1 is_null=0 */
+###   @2=3 /* INT meta=0 nullable=1 is_null=0 */
+# at #
+#010909  4:46:40 server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
+SET TIMESTAMP=1000000000/*!*/;
+COMMIT
+/*!*/;
+# at #
+#010909  4:46:40 server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
+SET TIMESTAMP=1000000000/*!*/;
+BEGIN
+/*!*/;
+# at #
+# at #
+#010909  4:46:40 server id #  end_log_pos # 	Table_map: `new_test1`.`t1` mapped to number #
+#010909  4:46:40 server id #  end_log_pos # 	Write_rows: table id # flags: STMT_END_F
+### INSERT INTO new_test1.t1
+### SET
+###   @1=2 /* INT meta=0 nullable=1 is_null=0 */
+###   @2=2 /* INT meta=0 nullable=1 is_null=0 */
+### INSERT INTO new_test1.t1
+### SET
+###   @1=3 /* INT meta=0 nullable=1 is_null=0 */
+###   @2=3 /* INT meta=0 nullable=1 is_null=0 */
+### INSERT INTO new_test1.t1
+### SET
+###   @1=4 /* INT meta=0 nullable=1 is_null=0 */
+###   @2=4 /* INT meta=0 nullable=1 is_null=0 */
+### INSERT INTO new_test1.t1
+### SET
+###   @1=5 /* INT meta=0 nullable=1 is_null=0 */
+###   @2=5 /* INT meta=0 nullable=1 is_null=0 */
+### INSERT INTO new_test1.t1
+### SET
+###   @1=6 /* INT meta=0 nullable=1 is_null=0 */
+###   @2=6 /* INT meta=0 nullable=1 is_null=0 */
+# at #
+#010909  4:46:40 server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
+SET TIMESTAMP=1000000000/*!*/;
+COMMIT
+/*!*/;
+# at #
+#010909  4:46:40 server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
+SET TIMESTAMP=1000000000/*!*/;
+BEGIN
+/*!*/;
+# at #
+# at #
+#010909  4:46:40 server id #  end_log_pos # 	Table_map: `new_test3`.`t3` mapped to number #
+#010909  4:46:40 server id #  end_log_pos # 	Delete_rows: table id # flags: STMT_END_F
+### DELETE FROM new_test3.t3
+### WHERE
+###   @1=1 /* INT meta=0 nullable=1 is_null=0 */
+# at #
+#010909  4:46:40 server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
+SET TIMESTAMP=1000000000/*!*/;
+COMMIT
+/*!*/;
+# at #
+#010909  4:46:40 server id #  end_log_pos # 	Rotate to master-bin.000002  pos: 4
+DELIMITER ;
+# End of log file
+ROLLBACK /* added by mysqlbinlog */;
+/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
+#
+# mysqlbinlog output
+# --base64-output = decode-rows
+# --rewrite-db = test1->new_test1
+# --rewrite-db = test3->new_test3
+# --read-from-remote-server
+#
+/*!40019 SET @@session.max_insert_delayed_threads=0*/;
+/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
+DELIMITER /*!*/;
+# at #
+#010909  4:46:40 server id #  end_log_pos # 	Start: binlog v 4, server v #.##.## created 010909  4:46:40 at startup
+ROLLBACK/*!*/;
+# at #
+use new_test1/*!*/;
+#010909  4:46:40 server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
+SET TIMESTAMP=1000000000/*!*/;
+SET @@session.pseudo_thread_id=#/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.lc_time_names=0/*!*/;
+SET @@session.collation_database=DEFAULT/*!*/;
+CREATE TABLE t1 (a INT, b INT)
+/*!*/;
+# at #
+#010909  4:46:40 server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
+SET TIMESTAMP=1000000000/*!*/;
+BEGIN
+/*!*/;
+# at #
+# at #
+#010909  4:46:40 server id #  end_log_pos # 	Table_map: `new_test1`.`t1` mapped to number #
+#010909  4:46:40 server id #  end_log_pos # 	Write_rows: table id # flags: STMT_END_F
+### INSERT INTO new_test1.t1
+### SET
+###   @1=1 /* INT meta=0 nullable=1 is_null=0 */
+###   @2=1 /* INT meta=0 nullable=1 is_null=0 */
+### INSERT INTO new_test1.t1
+### SET
+###   @1=2 /* INT meta=0 nullable=1 is_null=0 */
+###   @2=2 /* INT meta=0 nullable=1 is_null=0 */
+# at #
+#010909  4:46:40 server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
+SET TIMESTAMP=1000000000/*!*/;
+COMMIT
+/*!*/;
+# at #
+#010909  4:46:40 server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
+use test2/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+CREATE TABLE t2 (a INT)
+/*!*/;
+# at #
+#010909  4:46:40 server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
+SET TIMESTAMP=1000000000/*!*/;
+BEGIN
+/*!*/;
+# at #
+# at #
+#010909  4:46:40 server id #  end_log_pos # 	Table_map: `test2`.`t2` mapped to number #
+#010909  4:46:40 server id #  end_log_pos # 	Write_rows: table id # flags: STMT_END_F
+### INSERT INTO test2.t2
+### SET
+###   @1=1 /* INT meta=0 nullable=1 is_null=0 */
+### INSERT INTO test2.t2
+### SET
+###   @1=2 /* INT meta=0 nullable=1 is_null=0 */
+# at #
+#010909  4:46:40 server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
+SET TIMESTAMP=1000000000/*!*/;
+COMMIT
+/*!*/;
+# at #
+#010909  4:46:40 server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
+SET TIMESTAMP=1000000000/*!*/;
+BEGIN
+/*!*/;
+# at #
+# at #
+#010909  4:46:40 server id #  end_log_pos # 	Table_map: `new_test1`.`t1` mapped to number #
+#010909  4:46:40 server id #  end_log_pos # 	Delete_rows: table id # flags: STMT_END_F
+### DELETE FROM new_test1.t1
+### WHERE
+###   @1=1 /* INT meta=0 nullable=1 is_null=0 */
+###   @2=1 /* INT meta=0 nullable=1 is_null=0 */
+# at #
+#010909  4:46:40 server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
+SET TIMESTAMP=1000000000/*!*/;
+COMMIT
+/*!*/;
+# at #
+use new_test3/*!*/;
+#010909  4:46:40 server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
+SET TIMESTAMP=1000000000/*!*/;
+CREATE TABLE t3 (a INT)
+/*!*/;
+# at #
+#010909  4:46:40 server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
+SET TIMESTAMP=1000000000/*!*/;
+BEGIN
+/*!*/;
+# at #
+# at #
+#010909  4:46:40 server id #  end_log_pos # 	Table_map: `new_test3`.`t3` mapped to number #
+#010909  4:46:40 server id #  end_log_pos # 	Write_rows: table id # flags: STMT_END_F
+### INSERT INTO new_test3.t3
+### SET
+###   @1=1 /* INT meta=0 nullable=1 is_null=0 */
+### INSERT INTO new_test3.t3
+### SET
+###   @1=2 /* INT meta=0 nullable=1 is_null=0 */
+# at #
+#010909  4:46:40 server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
+SET TIMESTAMP=1000000000/*!*/;
+COMMIT
+/*!*/;
+# at #
+#010909  4:46:40 server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
+SET TIMESTAMP=1000000000/*!*/;
+BEGIN
+/*!*/;
+# at #
+# at #
+#010909  4:46:40 server id #  end_log_pos # 	Table_map: `new_test1`.`t1` mapped to number #
+#010909  4:46:40 server id #  end_log_pos # 	Write_rows: table id # flags: STMT_END_F
+### INSERT INTO new_test1.t1
+### SET
+###   @1=3 /* INT meta=0 nullable=1 is_null=0 */
+###   @2=3 /* INT meta=0 nullable=1 is_null=0 */
+# at #
+#010909  4:46:40 server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
+SET TIMESTAMP=1000000000/*!*/;
+COMMIT
+/*!*/;
+# at #
+#010909  4:46:40 server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
+SET TIMESTAMP=1000000000/*!*/;
+BEGIN
+/*!*/;
+# at #
+# at #
+#010909  4:46:40 server id #  end_log_pos # 	Table_map: `new_test1`.`t1` mapped to number #
+#010909  4:46:40 server id #  end_log_pos # 	Write_rows: table id # flags: STMT_END_F
+### INSERT INTO new_test1.t1
+### SET
+###   @1=2 /* INT meta=0 nullable=1 is_null=0 */
+###   @2=2 /* INT meta=0 nullable=1 is_null=0 */
+### INSERT INTO new_test1.t1
+### SET
+###   @1=3 /* INT meta=0 nullable=1 is_null=0 */
+###   @2=3 /* INT meta=0 nullable=1 is_null=0 */
+### INSERT INTO new_test1.t1
+### SET
+###   @1=4 /* INT meta=0 nullable=1 is_null=0 */
+###   @2=4 /* INT meta=0 nullable=1 is_null=0 */
+### INSERT INTO new_test1.t1
+### SET
+###   @1=5 /* INT meta=0 nullable=1 is_null=0 */
+###   @2=5 /* INT meta=0 nullable=1 is_null=0 */
+### INSERT INTO new_test1.t1
+### SET
+###   @1=6 /* INT meta=0 nullable=1 is_null=0 */
+###   @2=6 /* INT meta=0 nullable=1 is_null=0 */
+# at #
+#010909  4:46:40 server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
+SET TIMESTAMP=1000000000/*!*/;
+COMMIT
+/*!*/;
+# at #
+#010909  4:46:40 server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
+SET TIMESTAMP=1000000000/*!*/;
+BEGIN
+/*!*/;
+# at #
+# at #
+#010909  4:46:40 server id #  end_log_pos # 	Table_map: `new_test3`.`t3` mapped to number #
+#010909  4:46:40 server id #  end_log_pos # 	Delete_rows: table id # flags: STMT_END_F
+### DELETE FROM new_test3.t3
+### WHERE
+###   @1=1 /* INT meta=0 nullable=1 is_null=0 */
+# at #
+#010909  4:46:40 server id #  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
+SET TIMESTAMP=1000000000/*!*/;
+COMMIT
+/*!*/;
+# at #
+#010909  4:46:40 server id #  end_log_pos # 	Rotate to master-bin.000002  pos: 4
+DELIMITER ;
+# End of log file
+ROLLBACK /* added by mysqlbinlog */;
+/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
+DROP DATABASE test1;
+DROP DATABASE test2;
+DROP DATABASE test3;

=== modified file 'mysql-test/suite/binlog/t/binlog_index.test'
--- a/mysql-test/suite/binlog/t/binlog_index.test	2010-04-06 22:47:08 +0000
+++ b/mysql-test/suite/binlog/t/binlog_index.test	2010-04-08 09:52:53 +0000
@@ -28,6 +28,7 @@
 
 source include/show_binary_logs.inc;
 remove_file $MYSQLD_DATADIR/master-bin.000001;
+flush tables;
 
 # there must be a warning with file names
 replace_regex /\.[\\\/]master/master/;

=== added file 'mysql-test/suite/binlog/t/binlog_row_mysqlbinlog_options-master.opt'
--- a/mysql-test/suite/binlog/t/binlog_row_mysqlbinlog_options-master.opt	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/binlog/t/binlog_row_mysqlbinlog_options-master.opt	2010-02-01 19:05:19 +0000
@@ -0,0 +1,1 @@
+--timezone=GMT-3

=== added file 'mysql-test/suite/binlog/t/binlog_row_mysqlbinlog_options.test'
--- a/mysql-test/suite/binlog/t/binlog_row_mysqlbinlog_options.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/binlog/t/binlog_row_mysqlbinlog_options.test	2009-10-27 13:42:47 +0000
@@ -0,0 +1,78 @@
+--source include/have_log_bin.inc
+--source include/have_binlog_format_row.inc
+
+#
+# MWL36: Add a mysqlbinlog option to change the used database
+# (Adding --rewrite-db option)
+#
+--disable_warnings
+DROP DATABASE IF EXISTS test1;
+DROP DATABASE IF EXISTS test2;
+DROP DATABASE IF EXISTS test3;
+--enable_warnings
+
+# For SBR --rewrite-db affects only default database and doesn't affect
+# a query (specifically CREATE DATABASE) itself. Hence (for testing
+# purpose) we start binary logging after all databases have been created.
+
+CREATE DATABASE test1;
+CREATE DATABASE test2;
+CREATE DATABASE test3;
+
+# Fix timestamp to avoid varying results.
+SET timestamp=1000000000;
+
+# Delete all existing binary logs.
+RESET MASTER;
+
+# Whe'll call mysqlbinlog with two rewrite rules:
+# --rewrite-db="test1->new_test1"
+# --rewrite-db="test3->new_test3"
+
+USE test1;
+CREATE TABLE t1 (a INT, b INT);
+INSERT INTO t1 VALUES (1,1),(2,2);
+
+USE test2;
+CREATE TABLE t2 (a INT);
+INSERT INTO t2 VALUES (1),(2);
+
+DELETE FROM test1.t1 WHERE a=1;
+
+USE test3;
+CREATE TABLE t3 (a INT);
+INSERT INTO t3 VALUES (1),(2);
+INSERT INTO test1.t1 VALUES (3,3);
+
+USE test1;
+LOAD DATA INFILE '../../std_data/loaddata7.dat' INTO TABLE t1
+     FIELDS TERMINATED BY ',' LINES TERMINATED BY '\r\n';
+DELETE FROM test3.t3 WHERE a=1;
+
+flush logs;
+
+--echo #
+--echo # mysqlbinlog output
+--echo # --base64-output = decode-rows
+--echo # --rewrite-db = test1->new_test1
+--echo # --rewrite-db = test3->new_test3
+--echo #
+
+let $MYSQLD_DATADIR= `select @@datadir`;
+--replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/
+--exec $MYSQL_BINLOG  --base64-output=decode-rows --rewrite-db="test1->new_test1" --rewrite-db="test3->new_test3" -v -v $MYSQLD_DATADIR/master-bin.000001
+
+--echo #
+--echo # mysqlbinlog output
+--echo # --base64-output = decode-rows
+--echo # --rewrite-db = test1->new_test1
+--echo # --rewrite-db = test3->new_test3
+--echo # --read-from-remote-server
+--echo #
+
+--replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/
+--exec $MYSQL_BINLOG  --base64-output=decode-rows --rewrite-db="test1->new_test1" --rewrite-db="test3->new_test3" -v -v --read-from-remote-server --user=root --host=localhost --port=$MASTER_MYPORT master-bin.000001
+
+DROP DATABASE test1;
+DROP DATABASE test2;
+DROP DATABASE test3;

=== modified file 'mysql-test/suite/funcs_1/datadict/is_routines.inc'
--- a/mysql-test/suite/funcs_1/datadict/is_routines.inc	2009-09-07 20:50:10 +0000
+++ b/mysql-test/suite/funcs_1/datadict/is_routines.inc	2010-09-12 16:40:01 +0000
@@ -75,7 +75,7 @@
 --source suite/funcs_1/datadict/datadict_bug_12777.inc
 eval DESCRIBE          information_schema.$is_table;
 --source suite/funcs_1/datadict/datadict_bug_12777.inc
---replace_result ENGINE=MyISAM "" ENGINE=MARIA "" " PAGE_CHECKSUM=1" "" " PAGE_CHECKSUM=0" ""
+--replace_result ENGINE=MyISAM "" ENGINE=Aria "" " PAGE_CHECKSUM=1" "" " PAGE_CHECKSUM=0" ""
 eval SHOW CREATE TABLE information_schema.$is_table;
 --source suite/funcs_1/datadict/datadict_bug_12777.inc
 eval SHOW COLUMNS FROM information_schema.$is_table;

=== modified file 'mysql-test/suite/funcs_1/datadict/is_triggers.inc'
--- a/mysql-test/suite/funcs_1/datadict/is_triggers.inc	2009-09-07 20:50:10 +0000
+++ b/mysql-test/suite/funcs_1/datadict/is_triggers.inc	2010-09-12 16:40:01 +0000
@@ -70,7 +70,7 @@
 --source suite/funcs_1/datadict/datadict_bug_12777.inc
 eval DESCRIBE          information_schema.$is_table;
 --source suite/funcs_1/datadict/datadict_bug_12777.inc
---replace_result ENGINE=MyISAM "" ENGINE=MARIA "" " PAGE_CHECKSUM=1" "" " PAGE_CHECKSUM=0" ""
+--replace_result ENGINE=MyISAM "" ENGINE=Aria "" " PAGE_CHECKSUM=1" "" " PAGE_CHECKSUM=0" ""
 eval SHOW CREATE TABLE information_schema.$is_table;
 --source suite/funcs_1/datadict/datadict_bug_12777.inc
 eval SHOW COLUMNS FROM information_schema.$is_table;

=== modified file 'mysql-test/suite/funcs_1/datadict/is_views.inc'
--- a/mysql-test/suite/funcs_1/datadict/is_views.inc	2009-09-07 20:50:10 +0000
+++ b/mysql-test/suite/funcs_1/datadict/is_views.inc	2010-09-12 16:40:01 +0000
@@ -57,7 +57,7 @@
 --source suite/funcs_1/datadict/datadict_bug_12777.inc
 eval DESCRIBE          information_schema.$is_table;
 --source suite/funcs_1/datadict/datadict_bug_12777.inc
---replace_result ENGINE=MyISAM "" ENGINE=MARIA "" " PAGE_CHECKSUM=1" "" " PAGE_CHECKSUM=0" ""
+--replace_result ENGINE=MyISAM "" ENGINE=Aria "" " PAGE_CHECKSUM=1" "" " PAGE_CHECKSUM=0" ""
 eval SHOW CREATE TABLE information_schema.$is_table;
 --source suite/funcs_1/datadict/datadict_bug_12777.inc
 eval SHOW COLUMNS FROM information_schema.$is_table;

=== modified file 'mysql-test/suite/funcs_1/datadict/processlist_priv.inc'
--- a/mysql-test/suite/funcs_1/datadict/processlist_priv.inc	2010-04-07 15:26:30 +0000
+++ b/mysql-test/suite/funcs_1/datadict/processlist_priv.inc	2010-09-12 16:40:01 +0000
@@ -155,7 +155,7 @@
 SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST
 WHERE DB = 'information_schema' AND COMMAND = 'Sleep' AND USER = 'ddicttestuser1';
 --source include/wait_condition.inc
---replace_result ENGINE=MyISAM "" ENGINE=MARIA "" " PAGE_CHECKSUM=1" "" " PAGE_CHECKSUM=0" ""
+--replace_result ENGINE=MyISAM "" ENGINE=Aria "" " PAGE_CHECKSUM=1" "" " PAGE_CHECKSUM=0" ""
 eval SHOW CREATE TABLE $table;
 --replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
 eval SHOW $table;
@@ -175,7 +175,7 @@
 # No need for poll routine here.
 # The current state of the default session might depend on load of testing box
 # but "ddicttestuser1" must not see anything of the root session.
---replace_result ENGINE=MyISAM "" ENGINE=MARIA "" " PAGE_CHECKSUM=1" "" " PAGE_CHECKSUM=0" ""
+--replace_result ENGINE=MyISAM "" ENGINE=Aria "" " PAGE_CHECKSUM=1" "" " PAGE_CHECKSUM=0" ""
 eval SHOW CREATE TABLE $table;
 --replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
 eval SHOW $table;

=== modified file 'mysql-test/suite/funcs_1/datadict/processlist_val.inc'
--- a/mysql-test/suite/funcs_1/datadict/processlist_val.inc	2010-01-11 13:15:28 +0000
+++ b/mysql-test/suite/funcs_1/datadict/processlist_val.inc	2010-09-12 16:40:01 +0000
@@ -72,7 +72,7 @@
 # Show the definition of the PROCESSLIST table
 #--------------------------------------------------------------------------
 ;
---replace_result ENGINE=MyISAM "" ENGINE=MARIA "" " PAGE_CHECKSUM=1" "" " PAGE_CHECKSUM=0" ""
+--replace_result ENGINE=MyISAM "" ENGINE=Aria "" " PAGE_CHECKSUM=1" "" " PAGE_CHECKSUM=0" ""
 SHOW CREATE TABLE INFORMATION_SCHEMA.PROCESSLIST;
 
 echo

=== modified file 'mysql-test/suite/funcs_1/datadict/tables2.inc'
--- a/mysql-test/suite/funcs_1/datadict/tables2.inc	2008-10-10 15:28:41 +0000
+++ b/mysql-test/suite/funcs_1/datadict/tables2.inc	2010-09-12 16:40:01 +0000
@@ -31,7 +31,7 @@
 --vertical_results
 # We do not unify the engine name here, because the rowformat is
 # specific to the engine.
---replace_result Dynamic DYNAMIC_OR_PAGE Page DYNAMIC_OR_PAGE MyISAM MYISAM_OR_MARIA MARIA MYISAM_OR_MARIA
+--replace_result Dynamic DYNAMIC_OR_PAGE Page DYNAMIC_OR_PAGE MyISAM MYISAM_OR_MARIA Aria MYISAM_OR_MARIA
 --replace_column  8 "#TBLR#" 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "#CRT#" 16 "#UT#" 17 "#CT#" 20 "#CO#" 21 "#TC#"
 eval
 SELECT *,

=== modified file 'mysql-test/suite/funcs_1/r/is_columns_is.result'
--- a/mysql-test/suite/funcs_1/r/is_columns_is.result	2010-09-05 10:52:33 +0000
+++ b/mysql-test/suite/funcs_1/r/is_columns_is.result	2010-09-16 07:04:59 +0000
@@ -7,6 +7,29 @@
 NULL	information_schema	CHARACTER_SETS	DEFAULT_COLLATE_NAME	2		NO	varchar	32	96	NULL	NULL	utf8	utf8_general_ci	varchar(32)			select	
 NULL	information_schema	CHARACTER_SETS	DESCRIPTION	3		NO	varchar	60	180	NULL	NULL	utf8	utf8_general_ci	varchar(60)			select	
 NULL	information_schema	CHARACTER_SETS	MAXLEN	4	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(3)			select	
+NULL	information_schema	CLIENT_STATISTICS	ACCESS_DENIED	22	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(21)			select	
+NULL	information_schema	CLIENT_STATISTICS	BINLOG_BYTES_WRITTEN	9	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(21)			select	
+NULL	information_schema	CLIENT_STATISTICS	BUSY_TIME	5	0	NO	double	NULL	NULL	21	NULL	NULL	NULL	double			select	
+NULL	information_schema	CLIENT_STATISTICS	BYTES_RECEIVED	7	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(21)			select	
+NULL	information_schema	CLIENT_STATISTICS	BYTES_SENT	8	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(21)			select	
+NULL	information_schema	CLIENT_STATISTICS	CLIENT	1		NO	varchar	64	192	NULL	NULL	utf8	utf8_general_ci	varchar(64)			select	
+NULL	information_schema	CLIENT_STATISTICS	COMMIT_TRANSACTIONS	18	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(21)			select	
+NULL	information_schema	CLIENT_STATISTICS	CONCURRENT_CONNECTIONS	3	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(21)			select	
+NULL	information_schema	CLIENT_STATISTICS	CONNECTED_TIME	4	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(21)			select	
+NULL	information_schema	CLIENT_STATISTICS	CPU_TIME	6	0	NO	double	NULL	NULL	21	NULL	NULL	NULL	double			select	
+NULL	information_schema	CLIENT_STATISTICS	DENIED_CONNECTIONS	20	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(21)			select	
+NULL	information_schema	CLIENT_STATISTICS	EMPTY_QUERIES	23	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(21)			select	
+NULL	information_schema	CLIENT_STATISTICS	LOST_CONNECTIONS	21	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(21)			select	
+NULL	information_schema	CLIENT_STATISTICS	OTHER_COMMANDS	17	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(21)			select	
+NULL	information_schema	CLIENT_STATISTICS	ROLLBACK_TRANSACTIONS	19	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(21)			select	
+NULL	information_schema	CLIENT_STATISTICS	ROWS_DELETED	12	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(21)			select	
+NULL	information_schema	CLIENT_STATISTICS	ROWS_INSERTED	13	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(21)			select	
+NULL	information_schema	CLIENT_STATISTICS	ROWS_READ	10	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(21)			select	
+NULL	information_schema	CLIENT_STATISTICS	ROWS_SENT	11	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(21)			select	
+NULL	information_schema	CLIENT_STATISTICS	ROWS_UPDATED	14	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(21)			select	
+NULL	information_schema	CLIENT_STATISTICS	SELECT_COMMANDS	15	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(21)			select	
+NULL	information_schema	CLIENT_STATISTICS	TOTAL_CONNECTIONS	2	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(21)			select	
+NULL	information_schema	CLIENT_STATISTICS	UPDATE_COMMANDS	16	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(21)			select	
 NULL	information_schema	COLLATIONS	CHARACTER_SET_NAME	2		NO	varchar	32	96	NULL	NULL	utf8	utf8_general_ci	varchar(32)			select	
 NULL	information_schema	COLLATIONS	COLLATION_NAME	1		NO	varchar	32	96	NULL	NULL	utf8	utf8_general_ci	varchar(32)			select	
 NULL	information_schema	COLLATIONS	ID	3	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(11)			select	
@@ -113,6 +136,10 @@
 NULL	information_schema	GLOBAL_STATUS	VARIABLE_VALUE	2	NULL	YES	varchar	1024	3072	NULL	NULL	utf8	utf8_general_ci	varchar(1024)			select	
 NULL	information_schema	GLOBAL_VARIABLES	VARIABLE_NAME	1		NO	varchar	64	192	NULL	NULL	utf8	utf8_general_ci	varchar(64)			select	
 NULL	information_schema	GLOBAL_VARIABLES	VARIABLE_VALUE	2	NULL	YES	varchar	1024	3072	NULL	NULL	utf8	utf8_general_ci	varchar(1024)			select	
+NULL	information_schema	INDEX_STATISTICS	INDEX_NAME	3		NO	varchar	192	576	NULL	NULL	utf8	utf8_general_ci	varchar(192)			select	
+NULL	information_schema	INDEX_STATISTICS	ROWS_READ	4	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(21)			select	
+NULL	information_schema	INDEX_STATISTICS	TABLE_NAME	2		NO	varchar	192	576	NULL	NULL	utf8	utf8_general_ci	varchar(192)			select	
+NULL	information_schema	INDEX_STATISTICS	TABLE_SCHEMA	1		NO	varchar	192	576	NULL	NULL	utf8	utf8_general_ci	varchar(192)			select	
 NULL	information_schema	INNODB_BUFFER_POOL_PAGES	fix_count	5	0	NO	bigint	NULL	NULL	20	0	NULL	NULL	bigint(21) unsigned			select	
 NULL	information_schema	INNODB_BUFFER_POOL_PAGES	flush_type	6	0	NO	bigint	NULL	NULL	20	0	NULL	NULL	bigint(21) unsigned			select	
 NULL	information_schema	INNODB_BUFFER_POOL_PAGES	lru_position	4	0	NO	bigint	NULL	NULL	20	0	NULL	NULL	bigint(21) unsigned			select	
@@ -222,6 +249,18 @@
 NULL	information_schema	INNODB_TRX	trx_state	2		NO	varchar	13	39	NULL	NULL	utf8	utf8_general_ci	varchar(13)			select	
 NULL	information_schema	INNODB_TRX	trx_wait_started	5	NULL	YES	datetime	NULL	NULL	NULL	NULL	NULL	NULL	datetime			select	
 NULL	information_schema	INNODB_TRX	trx_weight	6	0	NO	bigint	NULL	NULL	20	0	NULL	NULL	bigint(21) unsigned			select	
+NULL	information_schema	KEY_CACHES	BLOCK_SIZE	5	0	NO	bigint	NULL	NULL	20	0	NULL	NULL	bigint(21) unsigned			select	
+NULL	information_schema	KEY_CACHES	DIRTY_BLOCKS	8	0	NO	bigint	NULL	NULL	20	0	NULL	NULL	bigint(21) unsigned			select	
+NULL	information_schema	KEY_CACHES	FULL_SIZE	4	0	NO	bigint	NULL	NULL	20	0	NULL	NULL	bigint(21) unsigned			select	
+NULL	information_schema	KEY_CACHES	KEY_CACHE_NAME	1		NO	varchar	192	576	NULL	NULL	utf8	utf8_general_ci	varchar(192)			select	
+NULL	information_schema	KEY_CACHES	READS	10	0	NO	bigint	NULL	NULL	20	0	NULL	NULL	bigint(21) unsigned			select	
+NULL	information_schema	KEY_CACHES	READ_REQUESTS	9	0	NO	bigint	NULL	NULL	20	0	NULL	NULL	bigint(21) unsigned			select	
+NULL	information_schema	KEY_CACHES	SEGMENTS	2	NULL	YES	int	NULL	NULL	10	0	NULL	NULL	int(3) unsigned			select	
+NULL	information_schema	KEY_CACHES	SEGMENT_NUMBER	3	NULL	YES	int	NULL	NULL	10	0	NULL	NULL	int(3) unsigned			select	
+NULL	information_schema	KEY_CACHES	UNUSED_BLOCKS	7	0	NO	bigint	NULL	NULL	20	0	NULL	NULL	bigint(21) unsigned			select	
+NULL	information_schema	KEY_CACHES	USED_BLOCKS	6	0	NO	bigint	NULL	NULL	20	0	NULL	NULL	bigint(21) unsigned			select	
+NULL	information_schema	KEY_CACHES	WRITES	12	0	NO	bigint	NULL	NULL	20	0	NULL	NULL	bigint(21) unsigned			select	
+NULL	information_schema	KEY_CACHES	WRITE_REQUESTS	11	0	NO	bigint	NULL	NULL	20	0	NULL	NULL	bigint(21) unsigned			select	
 NULL	information_schema	KEY_COLUMN_USAGE	COLUMN_NAME	7		NO	varchar	64	192	NULL	NULL	utf8	utf8_general_ci	varchar(64)			select	
 NULL	information_schema	KEY_COLUMN_USAGE	CONSTRAINT_CATALOG	1	NULL	YES	varchar	512	1536	NULL	NULL	utf8	utf8_general_ci	varchar(512)			select	
 NULL	information_schema	KEY_COLUMN_USAGE	CONSTRAINT_NAME	3		NO	varchar	64	192	NULL	NULL	utf8	utf8_general_ci	varchar(64)			select	
@@ -263,10 +302,12 @@
 NULL	information_schema	PBXT_STATISTICS	Name	2		NO	varchar	40	120	NULL	NULL	utf8	utf8_general_ci	varchar(40)			select	
 NULL	information_schema	PBXT_STATISTICS	Value	3	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(8)			select	
 NULL	information_schema	PLUGINS	PLUGIN_AUTHOR	8	NULL	YES	varchar	64	192	NULL	NULL	utf8	utf8_general_ci	varchar(64)			select	
+NULL	information_schema	PLUGINS	PLUGIN_AUTH_VERSION	12	NULL	YES	varchar	80	240	NULL	NULL	utf8	utf8_general_ci	varchar(80)			select	
 NULL	information_schema	PLUGINS	PLUGIN_DESCRIPTION	9	NULL	YES	longtext	4294967295	4294967295	NULL	NULL	utf8	utf8_general_ci	longtext			select	
 NULL	information_schema	PLUGINS	PLUGIN_LIBRARY	6	NULL	YES	varchar	64	192	NULL	NULL	utf8	utf8_general_ci	varchar(64)			select	
 NULL	information_schema	PLUGINS	PLUGIN_LIBRARY_VERSION	7	NULL	YES	varchar	20	60	NULL	NULL	utf8	utf8_general_ci	varchar(20)			select	
 NULL	information_schema	PLUGINS	PLUGIN_LICENSE	10	NULL	YES	varchar	80	240	NULL	NULL	utf8	utf8_general_ci	varchar(80)			select	
+NULL	information_schema	PLUGINS	PLUGIN_MATURITY	11	NULL	YES	varchar	12	36	NULL	NULL	utf8	utf8_general_ci	varchar(12)			select	
 NULL	information_schema	PLUGINS	PLUGIN_NAME	1		NO	varchar	64	192	NULL	NULL	utf8	utf8_general_ci	varchar(64)			select	
 NULL	information_schema	PLUGINS	PLUGIN_STATUS	3		NO	varchar	10	30	NULL	NULL	utf8	utf8_general_ci	varchar(10)			select	
 NULL	information_schema	PLUGINS	PLUGIN_TYPE	4		NO	varchar	80	240	NULL	NULL	utf8	utf8_general_ci	varchar(80)			select	
@@ -377,6 +418,11 @@
 NULL	information_schema	TABLE_PRIVILEGES	TABLE_CATALOG	2	NULL	YES	varchar	512	1536	NULL	NULL	utf8	utf8_general_ci	varchar(512)			select	
 NULL	information_schema	TABLE_PRIVILEGES	TABLE_NAME	4		NO	varchar	64	192	NULL	NULL	utf8	utf8_general_ci	varchar(64)			select	
 NULL	information_schema	TABLE_PRIVILEGES	TABLE_SCHEMA	3		NO	varchar	64	192	NULL	NULL	utf8	utf8_general_ci	varchar(64)			select	
+NULL	information_schema	TABLE_STATISTICS	ROWS_CHANGED	4	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(21)			select	
+NULL	information_schema	TABLE_STATISTICS	ROWS_CHANGED_X_INDEXES	5	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(21)			select	
+NULL	information_schema	TABLE_STATISTICS	ROWS_READ	3	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(21)			select	
+NULL	information_schema	TABLE_STATISTICS	TABLE_NAME	2		NO	varchar	192	576	NULL	NULL	utf8	utf8_general_ci	varchar(192)			select	
+NULL	information_schema	TABLE_STATISTICS	TABLE_SCHEMA	1		NO	varchar	192	576	NULL	NULL	utf8	utf8_general_ci	varchar(192)			select	
 NULL	information_schema	TRIGGERS	ACTION_CONDITION	9	NULL	YES	longtext	4294967295	4294967295	NULL	NULL	utf8	utf8_general_ci	longtext			select	
 NULL	information_schema	TRIGGERS	ACTION_ORDER	8	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(4)			select	
 NULL	information_schema	TRIGGERS	ACTION_ORIENTATION	11		NO	varchar	9	27	NULL	NULL	utf8	utf8_general_ci	varchar(9)			select	
@@ -403,6 +449,29 @@
 NULL	information_schema	USER_PRIVILEGES	IS_GRANTABLE	4		NO	varchar	3	9	NULL	NULL	utf8	utf8_general_ci	varchar(3)			select	
 NULL	information_schema	USER_PRIVILEGES	PRIVILEGE_TYPE	3		NO	varchar	64	192	NULL	NULL	utf8	utf8_general_ci	varchar(64)			select	
 NULL	information_schema	USER_PRIVILEGES	TABLE_CATALOG	2	NULL	YES	varchar	512	1536	NULL	NULL	utf8	utf8_general_ci	varchar(512)			select	
+NULL	information_schema	USER_STATISTICS	ACCESS_DENIED	22	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(21)			select	
+NULL	information_schema	USER_STATISTICS	BINLOG_BYTES_WRITTEN	9	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(21)			select	
+NULL	information_schema	USER_STATISTICS	BUSY_TIME	5	0	NO	double	NULL	NULL	21	NULL	NULL	NULL	double			select	
+NULL	information_schema	USER_STATISTICS	BYTES_RECEIVED	7	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(21)			select	
+NULL	information_schema	USER_STATISTICS	BYTES_SENT	8	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(21)			select	
+NULL	information_schema	USER_STATISTICS	COMMIT_TRANSACTIONS	18	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(21)			select	
+NULL	information_schema	USER_STATISTICS	CONCURRENT_CONNECTIONS	3	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(11)			select	
+NULL	information_schema	USER_STATISTICS	CONNECTED_TIME	4	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(11)			select	
+NULL	information_schema	USER_STATISTICS	CPU_TIME	6	0	NO	double	NULL	NULL	21	NULL	NULL	NULL	double			select	
+NULL	information_schema	USER_STATISTICS	DENIED_CONNECTIONS	20	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(21)			select	
+NULL	information_schema	USER_STATISTICS	EMPTY_QUERIES	23	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(21)			select	
+NULL	information_schema	USER_STATISTICS	LOST_CONNECTIONS	21	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(21)			select	
+NULL	information_schema	USER_STATISTICS	OTHER_COMMANDS	17	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(21)			select	
+NULL	information_schema	USER_STATISTICS	ROLLBACK_TRANSACTIONS	19	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(21)			select	
+NULL	information_schema	USER_STATISTICS	ROWS_DELETED	12	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(21)			select	
+NULL	information_schema	USER_STATISTICS	ROWS_INSERTED	13	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(21)			select	
+NULL	information_schema	USER_STATISTICS	ROWS_READ	10	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(21)			select	
+NULL	information_schema	USER_STATISTICS	ROWS_SENT	11	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(21)			select	
+NULL	information_schema	USER_STATISTICS	ROWS_UPDATED	14	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(21)			select	
+NULL	information_schema	USER_STATISTICS	SELECT_COMMANDS	15	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(21)			select	
+NULL	information_schema	USER_STATISTICS	TOTAL_CONNECTIONS	2	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(11)			select	
+NULL	information_schema	USER_STATISTICS	UPDATE_COMMANDS	16	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(21)			select	
+NULL	information_schema	USER_STATISTICS	USER	1		NO	varchar	48	144	NULL	NULL	utf8	utf8_general_ci	varchar(48)			select	
 NULL	information_schema	VIEWS	CHARACTER_SET_CLIENT	9		NO	varchar	32	96	NULL	NULL	utf8	utf8_general_ci	varchar(32)			select	
 NULL	information_schema	VIEWS	CHECK_OPTION	5		NO	varchar	8	24	NULL	NULL	utf8	utf8_general_ci	varchar(8)			select	
 NULL	information_schema	VIEWS	COLLATION_CONNECTION	10		NO	varchar	32	96	NULL	NULL	utf8	utf8_general_ci	varchar(32)			select	
@@ -459,6 +528,7 @@
 NULL	bigint	NULL	NULL
 NULL	datetime	NULL	NULL
 NULL	decimal	NULL	NULL
+NULL	double	NULL	NULL
 NULL	int	NULL	NULL
 --> CHAR(0) is allowed (see manual), and here both CHARACHTER_* values
 --> are 0, which is intended behavior, and the result of 0 / 0 IS NULL
@@ -481,6 +551,29 @@
 3.0000	information_schema	CHARACTER_SETS	DEFAULT_COLLATE_NAME	varchar	32	96	utf8	utf8_general_ci	varchar(32)
 3.0000	information_schema	CHARACTER_SETS	DESCRIPTION	varchar	60	180	utf8	utf8_general_ci	varchar(60)
 NULL	information_schema	CHARACTER_SETS	MAXLEN	bigint	NULL	NULL	NULL	NULL	bigint(3)
+3.0000	information_schema	CLIENT_STATISTICS	CLIENT	varchar	64	192	utf8	utf8_general_ci	varchar(64)
+NULL	information_schema	CLIENT_STATISTICS	TOTAL_CONNECTIONS	bigint	NULL	NULL	NULL	NULL	bigint(21)
+NULL	information_schema	CLIENT_STATISTICS	CONCURRENT_CONNECTIONS	bigint	NULL	NULL	NULL	NULL	bigint(21)
+NULL	information_schema	CLIENT_STATISTICS	CONNECTED_TIME	bigint	NULL	NULL	NULL	NULL	bigint(21)
+NULL	information_schema	CLIENT_STATISTICS	BUSY_TIME	double	NULL	NULL	NULL	NULL	double
+NULL	information_schema	CLIENT_STATISTICS	CPU_TIME	double	NULL	NULL	NULL	NULL	double
+NULL	information_schema	CLIENT_STATISTICS	BYTES_RECEIVED	bigint	NULL	NULL	NULL	NULL	bigint(21)
+NULL	information_schema	CLIENT_STATISTICS	BYTES_SENT	bigint	NULL	NULL	NULL	NULL	bigint(21)
+NULL	information_schema	CLIENT_STATISTICS	BINLOG_BYTES_WRITTEN	bigint	NULL	NULL	NULL	NULL	bigint(21)
+NULL	information_schema	CLIENT_STATISTICS	ROWS_READ	bigint	NULL	NULL	NULL	NULL	bigint(21)
+NULL	information_schema	CLIENT_STATISTICS	ROWS_SENT	bigint	NULL	NULL	NULL	NULL	bigint(21)
+NULL	information_schema	CLIENT_STATISTICS	ROWS_DELETED	bigint	NULL	NULL	NULL	NULL	bigint(21)
+NULL	information_schema	CLIENT_STATISTICS	ROWS_INSERTED	bigint	NULL	NULL	NULL	NULL	bigint(21)
+NULL	information_schema	CLIENT_STATISTICS	ROWS_UPDATED	bigint	NULL	NULL	NULL	NULL	bigint(21)
+NULL	information_schema	CLIENT_STATISTICS	SELECT_COMMANDS	bigint	NULL	NULL	NULL	NULL	bigint(21)
+NULL	information_schema	CLIENT_STATISTICS	UPDATE_COMMANDS	bigint	NULL	NULL	NULL	NULL	bigint(21)
+NULL	information_schema	CLIENT_STATISTICS	OTHER_COMMANDS	bigint	NULL	NULL	NULL	NULL	bigint(21)
+NULL	information_schema	CLIENT_STATISTICS	COMMIT_TRANSACTIONS	bigint	NULL	NULL	NULL	NULL	bigint(21)
+NULL	information_schema	CLIENT_STATISTICS	ROLLBACK_TRANSACTIONS	bigint	NULL	NULL	NULL	NULL	bigint(21)
+NULL	information_schema	CLIENT_STATISTICS	DENIED_CONNECTIONS	bigint	NULL	NULL	NULL	NULL	bigint(21)
+NULL	information_schema	CLIENT_STATISTICS	LOST_CONNECTIONS	bigint	NULL	NULL	NULL	NULL	bigint(21)
+NULL	information_schema	CLIENT_STATISTICS	ACCESS_DENIED	bigint	NULL	NULL	NULL	NULL	bigint(21)
+NULL	information_schema	CLIENT_STATISTICS	EMPTY_QUERIES	bigint	NULL	NULL	NULL	NULL	bigint(21)
 3.0000	information_schema	COLLATIONS	COLLATION_NAME	varchar	32	96	utf8	utf8_general_ci	varchar(32)
 3.0000	information_schema	COLLATIONS	CHARACTER_SET_NAME	varchar	32	96	utf8	utf8_general_ci	varchar(32)
 NULL	information_schema	COLLATIONS	ID	bigint	NULL	NULL	NULL	NULL	bigint(11)
@@ -587,6 +680,10 @@
 3.0000	information_schema	GLOBAL_STATUS	VARIABLE_VALUE	varchar	1024	3072	utf8	utf8_general_ci	varchar(1024)
 3.0000	information_schema	GLOBAL_VARIABLES	VARIABLE_NAME	varchar	64	192	utf8	utf8_general_ci	varchar(64)
 3.0000	information_schema	GLOBAL_VARIABLES	VARIABLE_VALUE	varchar	1024	3072	utf8	utf8_general_ci	varchar(1024)
+3.0000	information_schema	INDEX_STATISTICS	TABLE_SCHEMA	varchar	192	576	utf8	utf8_general_ci	varchar(192)
+3.0000	information_schema	INDEX_STATISTICS	TABLE_NAME	varchar	192	576	utf8	utf8_general_ci	varchar(192)
+3.0000	information_schema	INDEX_STATISTICS	INDEX_NAME	varchar	192	576	utf8	utf8_general_ci	varchar(192)
+NULL	information_schema	INDEX_STATISTICS	ROWS_READ	bigint	NULL	NULL	NULL	NULL	bigint(21)
 3.0000	information_schema	INNODB_BUFFER_POOL_PAGES	page_type	varchar	64	192	utf8	utf8_general_ci	varchar(64)
 NULL	information_schema	INNODB_BUFFER_POOL_PAGES	space_id	bigint	NULL	NULL	NULL	NULL	bigint(21) unsigned
 NULL	information_schema	INNODB_BUFFER_POOL_PAGES	page_no	bigint	NULL	NULL	NULL	NULL	bigint(21) unsigned
@@ -696,6 +793,18 @@
 NULL	information_schema	INNODB_TRX	trx_weight	bigint	NULL	NULL	NULL	NULL	bigint(21) unsigned
 NULL	information_schema	INNODB_TRX	trx_mysql_thread_id	bigint	NULL	NULL	NULL	NULL	bigint(21) unsigned
 3.0000	information_schema	INNODB_TRX	trx_query	varchar	1024	3072	utf8	utf8_general_ci	varchar(1024)
+3.0000	information_schema	KEY_CACHES	KEY_CACHE_NAME	varchar	192	576	utf8	utf8_general_ci	varchar(192)
+NULL	information_schema	KEY_CACHES	SEGMENTS	int	NULL	NULL	NULL	NULL	int(3) unsigned
+NULL	information_schema	KEY_CACHES	SEGMENT_NUMBER	int	NULL	NULL	NULL	NULL	int(3) unsigned
+NULL	information_schema	KEY_CACHES	FULL_SIZE	bigint	NULL	NULL	NULL	NULL	bigint(21) unsigned
+NULL	information_schema	KEY_CACHES	BLOCK_SIZE	bigint	NULL	NULL	NULL	NULL	bigint(21) unsigned
+NULL	information_schema	KEY_CACHES	USED_BLOCKS	bigint	NULL	NULL	NULL	NULL	bigint(21) unsigned
+NULL	information_schema	KEY_CACHES	UNUSED_BLOCKS	bigint	NULL	NULL	NULL	NULL	bigint(21) unsigned
+NULL	information_schema	KEY_CACHES	DIRTY_BLOCKS	bigint	NULL	NULL	NULL	NULL	bigint(21) unsigned
+NULL	information_schema	KEY_CACHES	READ_REQUESTS	bigint	NULL	NULL	NULL	NULL	bigint(21) unsigned
+NULL	information_schema	KEY_CACHES	READS	bigint	NULL	NULL	NULL	NULL	bigint(21) unsigned
+NULL	information_schema	KEY_CACHES	WRITE_REQUESTS	bigint	NULL	NULL	NULL	NULL	bigint(21) unsigned
+NULL	information_schema	KEY_CACHES	WRITES	bigint	NULL	NULL	NULL	NULL	bigint(21) unsigned
 3.0000	information_schema	KEY_COLUMN_USAGE	CONSTRAINT_CATALOG	varchar	512	1536	utf8	utf8_general_ci	varchar(512)
 3.0000	information_schema	KEY_COLUMN_USAGE	CONSTRAINT_SCHEMA	varchar	64	192	utf8	utf8_general_ci	varchar(64)
 3.0000	information_schema	KEY_COLUMN_USAGE	CONSTRAINT_NAME	varchar	64	192	utf8	utf8_general_ci	varchar(64)
@@ -746,6 +855,8 @@
 3.0000	information_schema	PLUGINS	PLUGIN_AUTHOR	varchar	64	192	utf8	utf8_general_ci	varchar(64)
 1.0000	information_schema	PLUGINS	PLUGIN_DESCRIPTION	longtext	4294967295	4294967295	utf8	utf8_general_ci	longtext
 3.0000	information_schema	PLUGINS	PLUGIN_LICENSE	varchar	80	240	utf8	utf8_general_ci	varchar(80)
+3.0000	information_schema	PLUGINS	PLUGIN_MATURITY	varchar	12	36	utf8	utf8_general_ci	varchar(12)
+3.0000	information_schema	PLUGINS	PLUGIN_AUTH_VERSION	varchar	80	240	utf8	utf8_general_ci	varchar(80)
 NULL	information_schema	PROCESSLIST	ID	bigint	NULL	NULL	NULL	NULL	bigint(4)
 3.0000	information_schema	PROCESSLIST	USER	varchar	16	48	utf8	utf8_general_ci	varchar(16)
 3.0000	information_schema	PROCESSLIST	HOST	varchar	64	192	utf8	utf8_general_ci	varchar(64)
@@ -851,6 +962,11 @@
 3.0000	information_schema	TABLE_PRIVILEGES	TABLE_NAME	varchar	64	192	utf8	utf8_general_ci	varchar(64)
 3.0000	information_schema	TABLE_PRIVILEGES	PRIVILEGE_TYPE	varchar	64	192	utf8	utf8_general_ci	varchar(64)
 3.0000	information_schema	TABLE_PRIVILEGES	IS_GRANTABLE	varchar	3	9	utf8	utf8_general_ci	varchar(3)
+3.0000	information_schema	TABLE_STATISTICS	TABLE_SCHEMA	varchar	192	576	utf8	utf8_general_ci	varchar(192)
+3.0000	information_schema	TABLE_STATISTICS	TABLE_NAME	varchar	192	576	utf8	utf8_general_ci	varchar(192)
+NULL	information_schema	TABLE_STATISTICS	ROWS_READ	bigint	NULL	NULL	NULL	NULL	bigint(21)
+NULL	information_schema	TABLE_STATISTICS	ROWS_CHANGED	bigint	NULL	NULL	NULL	NULL	bigint(21)
+NULL	information_schema	TABLE_STATISTICS	ROWS_CHANGED_X_INDEXES	bigint	NULL	NULL	NULL	NULL	bigint(21)
 3.0000	information_schema	TRIGGERS	TRIGGER_CATALOG	varchar	512	1536	utf8	utf8_general_ci	varchar(512)
 3.0000	information_schema	TRIGGERS	TRIGGER_SCHEMA	varchar	64	192	utf8	utf8_general_ci	varchar(64)
 3.0000	information_schema	TRIGGERS	TRIGGER_NAME	varchar	64	192	utf8	utf8_general_ci	varchar(64)
@@ -877,6 +993,29 @@
 3.0000	information_schema	USER_PRIVILEGES	TABLE_CATALOG	varchar	512	1536	utf8	utf8_general_ci	varchar(512)
 3.0000	information_schema	USER_PRIVILEGES	PRIVILEGE_TYPE	varchar	64	192	utf8	utf8_general_ci	varchar(64)
 3.0000	information_schema	USER_PRIVILEGES	IS_GRANTABLE	varchar	3	9	utf8	utf8_general_ci	varchar(3)
+3.0000	information_schema	USER_STATISTICS	USER	varchar	48	144	utf8	utf8_general_ci	varchar(48)
+NULL	information_schema	USER_STATISTICS	TOTAL_CONNECTIONS	int	NULL	NULL	NULL	NULL	int(11)
+NULL	information_schema	USER_STATISTICS	CONCURRENT_CONNECTIONS	int	NULL	NULL	NULL	NULL	int(11)
+NULL	information_schema	USER_STATISTICS	CONNECTED_TIME	int	NULL	NULL	NULL	NULL	int(11)
+NULL	information_schema	USER_STATISTICS	BUSY_TIME	double	NULL	NULL	NULL	NULL	double
+NULL	information_schema	USER_STATISTICS	CPU_TIME	double	NULL	NULL	NULL	NULL	double
+NULL	information_schema	USER_STATISTICS	BYTES_RECEIVED	bigint	NULL	NULL	NULL	NULL	bigint(21)
+NULL	information_schema	USER_STATISTICS	BYTES_SENT	bigint	NULL	NULL	NULL	NULL	bigint(21)
+NULL	information_schema	USER_STATISTICS	BINLOG_BYTES_WRITTEN	bigint	NULL	NULL	NULL	NULL	bigint(21)
+NULL	information_schema	USER_STATISTICS	ROWS_READ	bigint	NULL	NULL	NULL	NULL	bigint(21)
+NULL	information_schema	USER_STATISTICS	ROWS_SENT	bigint	NULL	NULL	NULL	NULL	bigint(21)
+NULL	information_schema	USER_STATISTICS	ROWS_DELETED	bigint	NULL	NULL	NULL	NULL	bigint(21)
+NULL	information_schema	USER_STATISTICS	ROWS_INSERTED	bigint	NULL	NULL	NULL	NULL	bigint(21)
+NULL	information_schema	USER_STATISTICS	ROWS_UPDATED	bigint	NULL	NULL	NULL	NULL	bigint(21)
+NULL	information_schema	USER_STATISTICS	SELECT_COMMANDS	bigint	NULL	NULL	NULL	NULL	bigint(21)
+NULL	information_schema	USER_STATISTICS	UPDATE_COMMANDS	bigint	NULL	NULL	NULL	NULL	bigint(21)
+NULL	information_schema	USER_STATISTICS	OTHER_COMMANDS	bigint	NULL	NULL	NULL	NULL	bigint(21)
+NULL	information_schema	USER_STATISTICS	COMMIT_TRANSACTIONS	bigint	NULL	NULL	NULL	NULL	bigint(21)
+NULL	information_schema	USER_STATISTICS	ROLLBACK_TRANSACTIONS	bigint	NULL	NULL	NULL	NULL	bigint(21)
+NULL	information_schema	USER_STATISTICS	DENIED_CONNECTIONS	bigint	NULL	NULL	NULL	NULL	bigint(21)
+NULL	information_schema	USER_STATISTICS	LOST_CONNECTIONS	bigint	NULL	NULL	NULL	NULL	bigint(21)
+NULL	information_schema	USER_STATISTICS	ACCESS_DENIED	bigint	NULL	NULL	NULL	NULL	bigint(21)
+NULL	information_schema	USER_STATISTICS	EMPTY_QUERIES	bigint	NULL	NULL	NULL	NULL	bigint(21)
 3.0000	information_schema	VIEWS	TABLE_CATALOG	varchar	512	1536	utf8	utf8_general_ci	varchar(512)
 3.0000	information_schema	VIEWS	TABLE_SCHEMA	varchar	64	192	utf8	utf8_general_ci	varchar(64)
 3.0000	information_schema	VIEWS	TABLE_NAME	varchar	64	192	utf8	utf8_general_ci	varchar(64)

=== modified file 'mysql-test/suite/funcs_1/r/is_columns_is_embedded.result'
--- a/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result	2009-10-26 11:35:42 +0000
+++ b/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result	2009-10-28 14:56:07 +0000
@@ -7,6 +7,29 @@
 NULL	information_schema	CHARACTER_SETS	DEFAULT_COLLATE_NAME	2		NO	varchar	32	96	NULL	NULL	utf8	utf8_general_ci	varchar(32)				
 NULL	information_schema	CHARACTER_SETS	DESCRIPTION	3		NO	varchar	60	180	NULL	NULL	utf8	utf8_general_ci	varchar(60)				
 NULL	information_schema	CHARACTER_SETS	MAXLEN	4	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(3)				
+NULL	information_schema	CLIENT_STATISTICS	ACCESS_DENIED	22	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(21)				
+NULL	information_schema	CLIENT_STATISTICS	BINLOG_BYTES_WRITTEN	9	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(21)				
+NULL	information_schema	CLIENT_STATISTICS	BUSY_TIME	5	0	NO	double	NULL	NULL	21	NULL	NULL	NULL	double				
+NULL	information_schema	CLIENT_STATISTICS	BYTES_RECEIVED	7	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(21)				
+NULL	information_schema	CLIENT_STATISTICS	BYTES_SENT	8	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(21)				
+NULL	information_schema	CLIENT_STATISTICS	CLIENT	1		NO	varchar	64	192	NULL	NULL	utf8	utf8_general_ci	varchar(64)				
+NULL	information_schema	CLIENT_STATISTICS	COMMIT_TRANSACTIONS	18	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(21)				
+NULL	information_schema	CLIENT_STATISTICS	CONCURRENT_CONNECTIONS	3	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(21)				
+NULL	information_schema	CLIENT_STATISTICS	CONNECTED_TIME	4	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(21)				
+NULL	information_schema	CLIENT_STATISTICS	CPU_TIME	6	0	NO	double	NULL	NULL	21	NULL	NULL	NULL	double				
+NULL	information_schema	CLIENT_STATISTICS	DENIED_CONNECTIONS	20	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(21)				
+NULL	information_schema	CLIENT_STATISTICS	EMPTY_QUERIES	23	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(21)				
+NULL	information_schema	CLIENT_STATISTICS	LOST_CONNECTIONS	21	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(21)				
+NULL	information_schema	CLIENT_STATISTICS	OTHER_COMMANDS	17	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(21)				
+NULL	information_schema	CLIENT_STATISTICS	ROLLBACK_TRANSACTIONS	19	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(21)				
+NULL	information_schema	CLIENT_STATISTICS	ROWS_DELETED	12	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(21)				
+NULL	information_schema	CLIENT_STATISTICS	ROWS_INSERTED	13	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(21)				
+NULL	information_schema	CLIENT_STATISTICS	ROWS_READ	10	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(21)				
+NULL	information_schema	CLIENT_STATISTICS	ROWS_SENT	11	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(21)				
+NULL	information_schema	CLIENT_STATISTICS	ROWS_UPDATED	14	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(21)				
+NULL	information_schema	CLIENT_STATISTICS	SELECT_COMMANDS	15	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(21)				
+NULL	information_schema	CLIENT_STATISTICS	TOTAL_CONNECTIONS	2	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(21)				
+NULL	information_schema	CLIENT_STATISTICS	UPDATE_COMMANDS	16	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(21)				
 NULL	information_schema	COLLATIONS	CHARACTER_SET_NAME	2		NO	varchar	32	96	NULL	NULL	utf8	utf8_general_ci	varchar(32)				
 NULL	information_schema	COLLATIONS	COLLATION_NAME	1		NO	varchar	32	96	NULL	NULL	utf8	utf8_general_ci	varchar(32)				
 NULL	information_schema	COLLATIONS	ID	3	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(11)				
@@ -113,6 +136,10 @@
 NULL	information_schema	GLOBAL_STATUS	VARIABLE_VALUE	2	NULL	YES	varchar	1024	3072	NULL	NULL	utf8	utf8_general_ci	varchar(1024)				
 NULL	information_schema	GLOBAL_VARIABLES	VARIABLE_NAME	1		NO	varchar	64	192	NULL	NULL	utf8	utf8_general_ci	varchar(64)				
 NULL	information_schema	GLOBAL_VARIABLES	VARIABLE_VALUE	2	NULL	YES	varchar	1024	3072	NULL	NULL	utf8	utf8_general_ci	varchar(1024)				
+NULL	information_schema	INDEX_STATISTICS	INDEX_NAME	3		NO	varchar	192	576	NULL	NULL	utf8	utf8_general_ci	varchar(192)				
+NULL	information_schema	INDEX_STATISTICS	ROWS_READ	4	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(21)				
+NULL	information_schema	INDEX_STATISTICS	TABLE_NAME	2		NO	varchar	192	576	NULL	NULL	utf8	utf8_general_ci	varchar(192)				
+NULL	information_schema	INDEX_STATISTICS	TABLE_SCHEMA	1		NO	varchar	192	576	NULL	NULL	utf8	utf8_general_ci	varchar(192)				
 NULL	information_schema	INNODB_BUFFER_POOL_PAGES	fix_count	5	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(21) unsigned				
 NULL	information_schema	INNODB_BUFFER_POOL_PAGES	flush_type	6	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(21) unsigned				
 NULL	information_schema	INNODB_BUFFER_POOL_PAGES	lru_position	4	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(21) unsigned				
@@ -355,6 +382,11 @@
 NULL	information_schema	TABLE_PRIVILEGES	TABLE_CATALOG	2	NULL	YES	varchar	512	1536	NULL	NULL	utf8	utf8_general_ci	varchar(512)				
 NULL	information_schema	TABLE_PRIVILEGES	TABLE_NAME	4		NO	varchar	64	192	NULL	NULL	utf8	utf8_general_ci	varchar(64)				
 NULL	information_schema	TABLE_PRIVILEGES	TABLE_SCHEMA	3		NO	varchar	64	192	NULL	NULL	utf8	utf8_general_ci	varchar(64)				
+NULL	information_schema	TABLE_STATISTICS	ROWS_CHANGED	4	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(21)				
+NULL	information_schema	TABLE_STATISTICS	ROWS_CHANGED_X_INDEXES	5	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(21)				
+NULL	information_schema	TABLE_STATISTICS	ROWS_READ	3	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(21)				
+NULL	information_schema	TABLE_STATISTICS	TABLE_NAME	2		NO	varchar	192	576	NULL	NULL	utf8	utf8_general_ci	varchar(192)				
+NULL	information_schema	TABLE_STATISTICS	TABLE_SCHEMA	1		NO	varchar	192	576	NULL	NULL	utf8	utf8_general_ci	varchar(192)				
 NULL	information_schema	TRIGGERS	ACTION_CONDITION	9	NULL	YES	longtext	4294967295	4294967295	NULL	NULL	utf8	utf8_general_ci	longtext				
 NULL	information_schema	TRIGGERS	ACTION_ORDER	8	0	NO	bigint	NULL	NULL	19	0	NULL	NULL	bigint(4)				
 NULL	information_schema	TRIGGERS	ACTION_ORIENTATION	11		NO	varchar	9	27	NULL	NULL	utf8	utf8_general_ci	varchar(9)				
@@ -381,6 +413,29 @@
 NULL	information_schema	USER_PRIVILEGES	IS_GRANTABLE	4		NO	varchar	3	9	NULL	NULL	utf8	utf8_general_ci	varchar(3)				
 NULL	information_schema	USER_PRIVILEGES	PRIVILEGE_TYPE	3		NO	varchar	64	192	NULL	NULL	utf8	utf8_general_ci	varchar(64)				
 NULL	information_schema	USER_PRIVILEGES	TABLE_CATALOG	2	NULL	YES	varchar	512	1536	NULL	NULL	utf8	utf8_general_ci	varchar(512)				
+NULL	information_schema	USER_STATISTICS	ACCESS_DENIED	22	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(21)				
+NULL	information_schema	USER_STATISTICS	BINLOG_BYTES_WRITTEN	9	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(21)				
+NULL	information_schema	USER_STATISTICS	BUSY_TIME	5	0	NO	double	NULL	NULL	21	NULL	NULL	NULL	double				
+NULL	information_schema	USER_STATISTICS	BYTES_RECEIVED	7	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(21)				
+NULL	information_schema	USER_STATISTICS	BYTES_SENT	8	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(21)				
+NULL	information_schema	USER_STATISTICS	COMMIT_TRANSACTIONS	18	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(21)				
+NULL	information_schema	USER_STATISTICS	CONCURRENT_CONNECTIONS	3	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(21)				
+NULL	information_schema	USER_STATISTICS	CONNECTED_TIME	4	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(21)				
+NULL	information_schema	USER_STATISTICS	CPU_TIME	6	0	NO	double	NULL	NULL	21	NULL	NULL	NULL	double				
+NULL	information_schema	USER_STATISTICS	DENIED_CONNECTIONS	20	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(21)				
+NULL	information_schema	USER_STATISTICS	EMPTY_QUERIES	23	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(21)				
+NULL	information_schema	USER_STATISTICS	LOST_CONNECTIONS	21	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(21)				
+NULL	information_schema	USER_STATISTICS	OTHER_COMMANDS	17	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(21)				
+NULL	information_schema	USER_STATISTICS	ROLLBACK_TRANSACTIONS	19	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(21)				
+NULL	information_schema	USER_STATISTICS	ROWS_DELETED	12	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(21)				
+NULL	information_schema	USER_STATISTICS	ROWS_INSERTED	13	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(21)				
+NULL	information_schema	USER_STATISTICS	ROWS_READ	10	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(21)				
+NULL	information_schema	USER_STATISTICS	ROWS_SENT	11	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(21)				
+NULL	information_schema	USER_STATISTICS	ROWS_UPDATED	14	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(21)				
+NULL	information_schema	USER_STATISTICS	SELECT_COMMANDS	15	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(21)				
+NULL	information_schema	USER_STATISTICS	TOTAL_CONNECTIONS	2	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(21)				
+NULL	information_schema	USER_STATISTICS	UPDATE_COMMANDS	16	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(21)				
+NULL	information_schema	USER_STATISTICS	USER	1		NO	varchar	48	144	NULL	NULL	utf8	utf8_general_ci	varchar(48)				
 NULL	information_schema	VIEWS	CHARACTER_SET_CLIENT	9		NO	varchar	32	96	NULL	NULL	utf8	utf8_general_ci	varchar(32)				
 NULL	information_schema	VIEWS	CHECK_OPTION	5		NO	varchar	8	24	NULL	NULL	utf8	utf8_general_ci	varchar(8)				
 NULL	information_schema	VIEWS	COLLATION_CONNECTION	10		NO	varchar	32	96	NULL	NULL	utf8	utf8_general_ci	varchar(32)				
@@ -436,6 +491,7 @@
 NULL	bigint	NULL	NULL
 NULL	datetime	NULL	NULL
 NULL	decimal	NULL	NULL
+NULL	double	NULL	NULL
 NULL	int	NULL	NULL
 --> CHAR(0) is allowed (see manual), and here both CHARACHTER_* values
 --> are 0, which is intended behavior, and the result of 0 / 0 IS NULL
@@ -458,6 +514,29 @@
 3.0000	information_schema	CHARACTER_SETS	DEFAULT_COLLATE_NAME	varchar	32	96	utf8	utf8_general_ci	varchar(32)
 3.0000	information_schema	CHARACTER_SETS	DESCRIPTION	varchar	60	180	utf8	utf8_general_ci	varchar(60)
 NULL	information_schema	CHARACTER_SETS	MAXLEN	bigint	NULL	NULL	NULL	NULL	bigint(3)
+3.0000	information_schema	CLIENT_STATISTICS	CLIENT	varchar	64	192	utf8	utf8_general_ci	varchar(64)
+NULL	information_schema	CLIENT_STATISTICS	TOTAL_CONNECTIONS	int	NULL	NULL	NULL	NULL	int(21)
+NULL	information_schema	CLIENT_STATISTICS	CONCURRENT_CONNECTIONS	int	NULL	NULL	NULL	NULL	int(21)
+NULL	information_schema	CLIENT_STATISTICS	CONNECTED_TIME	int	NULL	NULL	NULL	NULL	int(21)
+NULL	information_schema	CLIENT_STATISTICS	BUSY_TIME	double	NULL	NULL	NULL	NULL	double
+NULL	information_schema	CLIENT_STATISTICS	CPU_TIME	double	NULL	NULL	NULL	NULL	double
+NULL	information_schema	CLIENT_STATISTICS	BYTES_RECEIVED	int	NULL	NULL	NULL	NULL	int(21)
+NULL	information_schema	CLIENT_STATISTICS	BYTES_SENT	int	NULL	NULL	NULL	NULL	int(21)
+NULL	information_schema	CLIENT_STATISTICS	BINLOG_BYTES_WRITTEN	int	NULL	NULL	NULL	NULL	int(21)
+NULL	information_schema	CLIENT_STATISTICS	ROWS_READ	int	NULL	NULL	NULL	NULL	int(21)
+NULL	information_schema	CLIENT_STATISTICS	ROWS_SENT	int	NULL	NULL	NULL	NULL	int(21)
+NULL	information_schema	CLIENT_STATISTICS	ROWS_DELETED	int	NULL	NULL	NULL	NULL	int(21)
+NULL	information_schema	CLIENT_STATISTICS	ROWS_INSERTED	int	NULL	NULL	NULL	NULL	int(21)
+NULL	information_schema	CLIENT_STATISTICS	ROWS_UPDATED	int	NULL	NULL	NULL	NULL	int(21)
+NULL	information_schema	CLIENT_STATISTICS	SELECT_COMMANDS	int	NULL	NULL	NULL	NULL	int(21)
+NULL	information_schema	CLIENT_STATISTICS	UPDATE_COMMANDS	int	NULL	NULL	NULL	NULL	int(21)
+NULL	information_schema	CLIENT_STATISTICS	OTHER_COMMANDS	int	NULL	NULL	NULL	NULL	int(21)
+NULL	information_schema	CLIENT_STATISTICS	COMMIT_TRANSACTIONS	int	NULL	NULL	NULL	NULL	int(21)
+NULL	information_schema	CLIENT_STATISTICS	ROLLBACK_TRANSACTIONS	int	NULL	NULL	NULL	NULL	int(21)
+NULL	information_schema	CLIENT_STATISTICS	DENIED_CONNECTIONS	int	NULL	NULL	NULL	NULL	int(21)
+NULL	information_schema	CLIENT_STATISTICS	LOST_CONNECTIONS	int	NULL	NULL	NULL	NULL	int(21)
+NULL	information_schema	CLIENT_STATISTICS	ACCESS_DENIED	int	NULL	NULL	NULL	NULL	int(21)
+NULL	information_schema	CLIENT_STATISTICS	EMPTY_QUERIES	int	NULL	NULL	NULL	NULL	int(21)
 3.0000	information_schema	COLLATIONS	COLLATION_NAME	varchar	32	96	utf8	utf8_general_ci	varchar(32)
 3.0000	information_schema	COLLATIONS	CHARACTER_SET_NAME	varchar	32	96	utf8	utf8_general_ci	varchar(32)
 NULL	information_schema	COLLATIONS	ID	bigint	NULL	NULL	NULL	NULL	bigint(11)
@@ -564,6 +643,10 @@
 3.0000	information_schema	GLOBAL_STATUS	VARIABLE_VALUE	varchar	1024	3072	utf8	utf8_general_ci	varchar(1024)
 3.0000	information_schema	GLOBAL_VARIABLES	VARIABLE_NAME	varchar	64	192	utf8	utf8_general_ci	varchar(64)
 3.0000	information_schema	GLOBAL_VARIABLES	VARIABLE_VALUE	varchar	1024	3072	utf8	utf8_general_ci	varchar(1024)
+3.0000	information_schema	INDEX_STATISTICS	TABLE_SCHEMA	varchar	192	576	utf8	utf8_general_ci	varchar(192)
+3.0000	information_schema	INDEX_STATISTICS	TABLE_NAME	varchar	192	576	utf8	utf8_general_ci	varchar(192)
+3.0000	information_schema	INDEX_STATISTICS	INDEX_NAME	varchar	192	576	utf8	utf8_general_ci	varchar(192)
+NULL	information_schema	INDEX_STATISTICS	ROWS_READ	int	NULL	NULL	NULL	NULL	int(21)
 3.0000	information_schema	INNODB_BUFFER_POOL_PAGES	page_type	varchar	64	192	utf8	utf8_general_ci	varchar(64)
 NULL	information_schema	INNODB_BUFFER_POOL_PAGES	space_id	bigint	NULL	NULL	NULL	NULL	bigint(21) unsigned
 NULL	information_schema	INNODB_BUFFER_POOL_PAGES	page_no	bigint	NULL	NULL	NULL	NULL	bigint(21) unsigned
@@ -806,6 +889,11 @@
 3.0000	information_schema	TABLE_PRIVILEGES	TABLE_NAME	varchar	64	192	utf8	utf8_general_ci	varchar(64)
 3.0000	information_schema	TABLE_PRIVILEGES	PRIVILEGE_TYPE	varchar	64	192	utf8	utf8_general_ci	varchar(64)
 3.0000	information_schema	TABLE_PRIVILEGES	IS_GRANTABLE	varchar	3	9	utf8	utf8_general_ci	varchar(3)
+3.0000	information_schema	TABLE_STATISTICS	TABLE_SCHEMA	varchar	192	576	utf8	utf8_general_ci	varchar(192)
+3.0000	information_schema	TABLE_STATISTICS	TABLE_NAME	varchar	192	576	utf8	utf8_general_ci	varchar(192)
+NULL	information_schema	TABLE_STATISTICS	ROWS_READ	int	NULL	NULL	NULL	NULL	int(21)
+NULL	information_schema	TABLE_STATISTICS	ROWS_CHANGED	int	NULL	NULL	NULL	NULL	int(21)
+NULL	information_schema	TABLE_STATISTICS	ROWS_CHANGED_X_INDEXES	int	NULL	NULL	NULL	NULL	int(21)
 3.0000	information_schema	TRIGGERS	TRIGGER_CATALOG	varchar	512	1536	utf8	utf8_general_ci	varchar(512)
 3.0000	information_schema	TRIGGERS	TRIGGER_SCHEMA	varchar	64	192	utf8	utf8_general_ci	varchar(64)
 3.0000	information_schema	TRIGGERS	TRIGGER_NAME	varchar	64	192	utf8	utf8_general_ci	varchar(64)
@@ -832,6 +920,29 @@
 3.0000	information_schema	USER_PRIVILEGES	TABLE_CATALOG	varchar	512	1536	utf8	utf8_general_ci	varchar(512)
 3.0000	information_schema	USER_PRIVILEGES	PRIVILEGE_TYPE	varchar	64	192	utf8	utf8_general_ci	varchar(64)
 3.0000	information_schema	USER_PRIVILEGES	IS_GRANTABLE	varchar	3	9	utf8	utf8_general_ci	varchar(3)
+3.0000	information_schema	USER_STATISTICS	USER	varchar	48	144	utf8	utf8_general_ci	varchar(48)
+NULL	information_schema	USER_STATISTICS	TOTAL_CONNECTIONS	int	NULL	NULL	NULL	NULL	int(21)
+NULL	information_schema	USER_STATISTICS	CONCURRENT_CONNECTIONS	int	NULL	NULL	NULL	NULL	int(21)
+NULL	information_schema	USER_STATISTICS	CONNECTED_TIME	int	NULL	NULL	NULL	NULL	int(21)
+NULL	information_schema	USER_STATISTICS	BUSY_TIME	double	NULL	NULL	NULL	NULL	double
+NULL	information_schema	USER_STATISTICS	CPU_TIME	double	NULL	NULL	NULL	NULL	double
+NULL	information_schema	USER_STATISTICS	BYTES_RECEIVED	int	NULL	NULL	NULL	NULL	int(21)
+NULL	information_schema	USER_STATISTICS	BYTES_SENT	int	NULL	NULL	NULL	NULL	int(21)
+NULL	information_schema	USER_STATISTICS	BINLOG_BYTES_WRITTEN	int	NULL	NULL	NULL	NULL	int(21)
+NULL	information_schema	USER_STATISTICS	ROWS_READ	int	NULL	NULL	NULL	NULL	int(21)
+NULL	information_schema	USER_STATISTICS	ROWS_SENT	int	NULL	NULL	NULL	NULL	int(21)
+NULL	information_schema	USER_STATISTICS	ROWS_DELETED	int	NULL	NULL	NULL	NULL	int(21)
+NULL	information_schema	USER_STATISTICS	ROWS_INSERTED	int	NULL	NULL	NULL	NULL	int(21)
+NULL	information_schema	USER_STATISTICS	ROWS_UPDATED	int	NULL	NULL	NULL	NULL	int(21)
+NULL	information_schema	USER_STATISTICS	SELECT_COMMANDS	int	NULL	NULL	NULL	NULL	int(21)
+NULL	information_schema	USER_STATISTICS	UPDATE_COMMANDS	int	NULL	NULL	NULL	NULL	int(21)
+NULL	information_schema	USER_STATISTICS	OTHER_COMMANDS	int	NULL	NULL	NULL	NULL	int(21)
+NULL	information_schema	USER_STATISTICS	COMMIT_TRANSACTIONS	int	NULL	NULL	NULL	NULL	int(21)
+NULL	information_schema	USER_STATISTICS	ROLLBACK_TRANSACTIONS	int	NULL	NULL	NULL	NULL	int(21)
+NULL	information_schema	USER_STATISTICS	DENIED_CONNECTIONS	int	NULL	NULL	NULL	NULL	int(21)
+NULL	information_schema	USER_STATISTICS	LOST_CONNECTIONS	int	NULL	NULL	NULL	NULL	int(21)
+NULL	information_schema	USER_STATISTICS	ACCESS_DENIED	int	NULL	NULL	NULL	NULL	int(21)
+NULL	information_schema	USER_STATISTICS	EMPTY_QUERIES	int	NULL	NULL	NULL	NULL	int(21)
 3.0000	information_schema	VIEWS	TABLE_CATALOG	varchar	512	1536	utf8	utf8_general_ci	varchar(512)
 3.0000	information_schema	VIEWS	TABLE_SCHEMA	varchar	64	192	utf8	utf8_general_ci	varchar(64)
 3.0000	information_schema	VIEWS	TABLE_NAME	varchar	64	192	utf8	utf8_general_ci	varchar(64)

=== modified file 'mysql-test/suite/funcs_1/r/is_columns_mysql.result'
--- a/mysql-test/suite/funcs_1/r/is_columns_mysql.result	2010-07-16 13:56:33 +0000
+++ b/mysql-test/suite/funcs_1/r/is_columns_mysql.result	2010-09-11 18:43:48 +0000
@@ -49,7 +49,7 @@
 NULL	mysql	event	name	2		NO	char	64	192	NULL	NULL	utf8	utf8_general_ci	char(64)	PRI		select,insert,update,references	
 NULL	mysql	event	on_completion	14	DROP	NO	enum	8	24	NULL	NULL	utf8	utf8_general_ci	enum('DROP','PRESERVE')			select,insert,update,references	
 NULL	mysql	event	originator	17	NULL	NO	int	NULL	NULL	10	0	NULL	NULL	int(10) unsigned			select,insert,update,references	
-NULL	mysql	event	sql_mode	15		NO	set	478	1434	NULL	NULL	utf8	utf8_general_ci	set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH')			select,insert,update,references	
+NULL	mysql	event	sql_mode	15		NO	set	494	1482	NULL	NULL	utf8	utf8_general_ci	set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH')			select,insert,update,references	
 NULL	mysql	event	starts	11	NULL	YES	datetime	NULL	NULL	NULL	NULL	NULL	NULL	datetime			select,insert,update,references	
 NULL	mysql	event	status	13	ENABLED	NO	enum	18	54	NULL	NULL	utf8	utf8_general_ci	enum('ENABLED','DISABLED','SLAVESIDE_DISABLED')			select,insert,update,references	
 NULL	mysql	event	time_zone	18	SYSTEM	NO	char	64	64	NULL	NULL	latin1	latin1_swedish_ci	char(64)			select,insert,update,references	
@@ -124,7 +124,7 @@
 NULL	mysql	proc	security_type	8	DEFINER	NO	enum	7	21	NULL	NULL	utf8	utf8_general_ci	enum('INVOKER','DEFINER')			select,insert,update,references	
 NULL	mysql	proc	specific_name	4		NO	char	64	192	NULL	NULL	utf8	utf8_general_ci	char(64)			select,insert,update,references	
 NULL	mysql	proc	sql_data_access	6	CONTAINS_SQL	NO	enum	17	51	NULL	NULL	utf8	utf8_general_ci	enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA')			select,insert,update,references	
-NULL	mysql	proc	sql_mode	15		NO	set	478	1434	NULL	NULL	utf8	utf8_general_ci	set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH')			select,insert,update,references	
+NULL	mysql	proc	sql_mode	15		NO	set	494	1482	NULL	NULL	utf8	utf8_general_ci	set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH')			select,insert,update,references	
 NULL	mysql	proc	type	3	NULL	NO	enum	9	27	NULL	NULL	utf8	utf8_general_ci	enum('FUNCTION','PROCEDURE')	PRI		select,insert,update,references	
 NULL	mysql	procs_priv	Db	2		NO	char	64	192	NULL	NULL	utf8	utf8_bin	char(64)	PRI		select,insert,update,references	
 NULL	mysql	procs_priv	Grantor	6		NO	char	77	231	NULL	NULL	utf8	utf8_bin	char(77)	MUL		select,insert,update,references	
@@ -178,6 +178,7 @@
 NULL	mysql	time_zone_transition_type	Transition_type_id	2	NULL	NO	int	NULL	NULL	10	0	NULL	NULL	int(10) unsigned	PRI		select,insert,update,references	
 NULL	mysql	user	Alter_priv	17	N	NO	enum	1	3	NULL	NULL	utf8	utf8_general_ci	enum('N','Y')			select,insert,update,references	
 NULL	mysql	user	Alter_routine_priv	28	N	NO	enum	1	3	NULL	NULL	utf8	utf8_general_ci	enum('N','Y')			select,insert,update,references	
+NULL	mysql	user	auth_string	41	NULL	NO	text	65535	65535	NULL	NULL	utf8	utf8_bin	text			select,insert,update,references	
 NULL	mysql	user	Create_priv	8	N	NO	enum	1	3	NULL	NULL	utf8	utf8_general_ci	enum('N','Y')			select,insert,update,references	
 NULL	mysql	user	Create_routine_priv	27	N	NO	enum	1	3	NULL	NULL	utf8	utf8_general_ci	enum('N','Y')			select,insert,update,references	
 NULL	mysql	user	Create_tmp_table_priv	20	N	NO	enum	1	3	NULL	NULL	utf8	utf8_general_ci	enum('N','Y')			select,insert,update,references	
@@ -198,6 +199,7 @@
 NULL	mysql	user	max_updates	37	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(11) unsigned			select,insert,update,references	
 NULL	mysql	user	max_user_connections	39	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(11) unsigned			select,insert,update,references	
 NULL	mysql	user	Password	3		NO	char	41	41	NULL	NULL	latin1	latin1_bin	char(41)			select,insert,update,references	
+NULL	mysql	user	plugin	40		NO	char	60	60	NULL	NULL	latin1	latin1_swedish_ci	char(60)			select,insert,update,references	
 NULL	mysql	user	Process_priv	12	N	NO	enum	1	3	NULL	NULL	utf8	utf8_general_ci	enum('N','Y')			select,insert,update,references	
 NULL	mysql	user	References_priv	15	N	NO	enum	1	3	NULL	NULL	utf8	utf8_general_ci	enum('N','Y')			select,insert,update,references	
 NULL	mysql	user	Reload_priv	10	N	NO	enum	1	3	NULL	NULL	utf8	utf8_general_ci	enum('N','Y')			select,insert,update,references	
@@ -233,6 +235,7 @@
 1.0000	char	latin1	latin1_bin
 1.0000	char	latin1	latin1_swedish_ci
 1.0000	varchar	latin1	latin1_swedish_ci
+1.0000	text	utf8	utf8_bin
 1.0000	mediumtext	utf8	utf8_general_ci
 1.0000	text	utf8	utf8_general_ci
 SELECT DISTINCT
@@ -327,7 +330,7 @@
 NULL	mysql	event	ends	datetime	NULL	NULL	NULL	NULL	datetime
 3.0000	mysql	event	status	enum	18	54	utf8	utf8_general_ci	enum('ENABLED','DISABLED','SLAVESIDE_DISABLED')
 3.0000	mysql	event	on_completion	enum	8	24	utf8	utf8_general_ci	enum('DROP','PRESERVE')
-3.0000	mysql	event	sql_mode	set	478	1434	utf8	utf8_general_ci	set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH')
+3.0000	mysql	event	sql_mode	set	494	1482	utf8	utf8_general_ci	set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH')
 3.0000	mysql	event	comment	char	64	192	utf8	utf8_bin	char(64)
 NULL	mysql	event	originator	int	NULL	NULL	NULL	NULL	int(10) unsigned
 1.0000	mysql	event	time_zone	char	64	64	latin1	latin1_swedish_ci	char(64)
@@ -402,7 +405,7 @@
 3.0000	mysql	proc	definer	char	77	231	utf8	utf8_bin	char(77)
 NULL	mysql	proc	created	timestamp	NULL	NULL	NULL	NULL	timestamp
 NULL	mysql	proc	modified	timestamp	NULL	NULL	NULL	NULL	timestamp
-3.0000	mysql	proc	sql_mode	set	478	1434	utf8	utf8_general_ci	set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH')
+3.0000	mysql	proc	sql_mode	set	494	1482	utf8	utf8_general_ci	set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH')
 3.0000	mysql	proc	comment	char	64	192	utf8	utf8_bin	char(64)
 3.0000	mysql	proc	character_set_client	char	32	96	utf8	utf8_bin	char(32)
 3.0000	mysql	proc	collation_connection	char	32	96	utf8	utf8_bin	char(32)
@@ -497,3 +500,5 @@
 NULL	mysql	user	max_updates	int	NULL	NULL	NULL	NULL	int(11) unsigned
 NULL	mysql	user	max_connections	int	NULL	NULL	NULL	NULL	int(11) unsigned
 NULL	mysql	user	max_user_connections	int	NULL	NULL	NULL	NULL	int(11) unsigned
+1.0000	mysql	user	plugin	char	60	60	latin1	latin1_swedish_ci	char(60)
+1.0000	mysql	user	auth_string	text	65535	65535	utf8	utf8_bin	text

=== modified file 'mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result'
--- a/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result	2009-05-19 16:43:50 +0000
+++ b/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result	2010-04-08 12:10:05 +0000
@@ -49,7 +49,7 @@
 NULL	mysql	event	name	2		NO	char	64	192	NULL	NULL	utf8	utf8_general_ci	char(64)	PRI			
 NULL	mysql	event	on_completion	14	DROP	NO	enum	8	24	NULL	NULL	utf8	utf8_general_ci	enum('DROP','PRESERVE')				
 NULL	mysql	event	originator	17	NULL	NO	int	NULL	NULL	10	0	NULL	NULL	int(10) unsigned				
-NULL	mysql	event	sql_mode	15		NO	set	478	1434	NULL	NULL	utf8	utf8_general_ci	set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH')				
+NULL	mysql	event	sql_mode	15		NO	set	478	1434	NULL	NULL	utf8	utf8_general_ci	set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH')				
 NULL	mysql	event	starts	11	NULL	YES	datetime	NULL	NULL	NULL	NULL	NULL	NULL	datetime				
 NULL	mysql	event	status	13	ENABLED	NO	enum	18	54	NULL	NULL	utf8	utf8_general_ci	enum('ENABLED','DISABLED','SLAVESIDE_DISABLED')				
 NULL	mysql	event	time_zone	18	SYSTEM	NO	char	64	64	NULL	NULL	latin1	latin1_swedish_ci	char(64)				
@@ -124,7 +124,7 @@
 NULL	mysql	proc	security_type	8	DEFINER	NO	enum	7	21	NULL	NULL	utf8	utf8_general_ci	enum('INVOKER','DEFINER')				
 NULL	mysql	proc	specific_name	4		NO	char	64	192	NULL	NULL	utf8	utf8_general_ci	char(64)				
 NULL	mysql	proc	sql_data_access	6	CONTAINS_SQL	NO	enum	17	51	NULL	NULL	utf8	utf8_general_ci	enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA')				
-NULL	mysql	proc	sql_mode	15		NO	set	478	1434	NULL	NULL	utf8	utf8_general_ci	set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH')				
+NULL	mysql	proc	sql_mode	15		NO	set	478	1434	NULL	NULL	utf8	utf8_general_ci	set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH')				
 NULL	mysql	proc	type	3	NULL	NO	enum	9	27	NULL	NULL	utf8	utf8_general_ci	enum('FUNCTION','PROCEDURE')	PRI			
 NULL	mysql	procs_priv	Db	2		NO	char	64	192	NULL	NULL	utf8	utf8_bin	char(64)	PRI			
 NULL	mysql	procs_priv	Grantor	6		NO	char	77	231	NULL	NULL	utf8	utf8_bin	char(77)	MUL			
@@ -327,7 +327,7 @@
 NULL	mysql	event	ends	datetime	NULL	NULL	NULL	NULL	datetime
 3.0000	mysql	event	status	enum	18	54	utf8	utf8_general_ci	enum('ENABLED','DISABLED','SLAVESIDE_DISABLED')
 3.0000	mysql	event	on_completion	enum	8	24	utf8	utf8_general_ci	enum('DROP','PRESERVE')
-3.0000	mysql	event	sql_mode	set	478	1434	utf8	utf8_general_ci	set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH')
+3.0000	mysql	event	sql_mode	set	478	1434	utf8	utf8_general_ci	set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH')
 3.0000	mysql	event	comment	char	64	192	utf8	utf8_bin	char(64)
 NULL	mysql	event	originator	int	NULL	NULL	NULL	NULL	int(10) unsigned
 1.0000	mysql	event	time_zone	char	64	64	latin1	latin1_swedish_ci	char(64)
@@ -402,7 +402,7 @@
 3.0000	mysql	proc	definer	char	77	231	utf8	utf8_bin	char(77)
 NULL	mysql	proc	created	timestamp	NULL	NULL	NULL	NULL	timestamp
 NULL	mysql	proc	modified	timestamp	NULL	NULL	NULL	NULL	timestamp
-3.0000	mysql	proc	sql_mode	set	478	1434	utf8	utf8_general_ci	set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH')
+3.0000	mysql	proc	sql_mode	set	478	1434	utf8	utf8_general_ci	set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH')
 3.0000	mysql	proc	comment	char	64	192	utf8	utf8_bin	char(64)
 3.0000	mysql	proc	character_set_client	char	32	96	utf8	utf8_bin	char(32)
 3.0000	mysql	proc	collation_connection	char	32	96	utf8	utf8_bin	char(32)

=== modified file 'mysql-test/suite/funcs_1/r/is_engines_innodb.result'
--- a/mysql-test/suite/funcs_1/r/is_engines_innodb.result	2010-09-05 10:52:33 +0000
+++ b/mysql-test/suite/funcs_1/r/is_engines_innodb.result	2010-09-16 07:04:59 +0000
@@ -2,7 +2,7 @@
 WHERE ENGINE = 'InnoDB';
 ENGINE	InnoDB
 SUPPORT	YES
-COMMENT	Percona-XtraDB, Supports transactions, row-level locking, and foreign keys
+COMMENT	Supports transactions, row-level locking, and foreign keys
 TRANSACTIONS	YES
 XA	YES
 SAVEPOINTS	YES

=== modified file 'mysql-test/suite/funcs_1/r/is_tables_is.result'
--- a/mysql-test/suite/funcs_1/r/is_tables_is.result	2010-09-05 10:52:33 +0000
+++ b/mysql-test/suite/funcs_1/r/is_tables_is.result	2010-09-11 18:43:48 +0000
@@ -38,6 +38,29 @@
 Separator	-----------------------------------------------------
 TABLE_CATALOG	NULL
 TABLE_SCHEMA	information_schema
+TABLE_NAME	CLIENT_STATISTICS
+TABLE_TYPE	SYSTEM VIEW
+ENGINE	MEMORY
+VERSION	10
+ROW_FORMAT	Fixed
+TABLE_ROWS	#TBLR#
+AVG_ROW_LENGTH	#ARL#
+DATA_LENGTH	#DL#
+MAX_DATA_LENGTH	#MDL#
+INDEX_LENGTH	#IL#
+DATA_FREE	#DF#
+AUTO_INCREMENT	NULL
+CREATE_TIME	#CRT#
+UPDATE_TIME	#UT#
+CHECK_TIME	#CT#
+TABLE_COLLATION	utf8_general_ci
+CHECKSUM	NULL
+CREATE_OPTIONS	#CO#
+TABLE_COMMENT	#TC#
+user_comment	
+Separator	-----------------------------------------------------
+TABLE_CATALOG	NULL
+TABLE_SCHEMA	information_schema
 TABLE_NAME	COLLATIONS
 TABLE_TYPE	SYSTEM VIEW
 ENGINE	MEMORY
@@ -245,6 +268,29 @@
 Separator	-----------------------------------------------------
 TABLE_CATALOG	NULL
 TABLE_SCHEMA	information_schema
+TABLE_NAME	INDEX_STATISTICS
+TABLE_TYPE	SYSTEM VIEW
+ENGINE	MEMORY
+VERSION	10
+ROW_FORMAT	Fixed
+TABLE_ROWS	#TBLR#
+AVG_ROW_LENGTH	#ARL#
+DATA_LENGTH	#DL#
+MAX_DATA_LENGTH	#MDL#
+INDEX_LENGTH	#IL#
+DATA_FREE	#DF#
+AUTO_INCREMENT	NULL
+CREATE_TIME	#CRT#
+UPDATE_TIME	#UT#
+CHECK_TIME	#CT#
+TABLE_COLLATION	utf8_general_ci
+CHECKSUM	NULL
+CREATE_OPTIONS	#CO#
+TABLE_COMMENT	#TC#
+user_comment	
+Separator	-----------------------------------------------------
+TABLE_CATALOG	NULL
+TABLE_SCHEMA	information_schema
 TABLE_NAME	INNODB_BUFFER_POOL_PAGES
 TABLE_TYPE	SYSTEM VIEW
 ENGINE	MEMORY
@@ -613,6 +659,29 @@
 Separator	-----------------------------------------------------
 TABLE_CATALOG	NULL
 TABLE_SCHEMA	information_schema
+TABLE_NAME	KEY_CACHES
+TABLE_TYPE	SYSTEM VIEW
+ENGINE	MEMORY
+VERSION	10
+ROW_FORMAT	Fixed
+TABLE_ROWS	#TBLR#
+AVG_ROW_LENGTH	#ARL#
+DATA_LENGTH	#DL#
+MAX_DATA_LENGTH	#MDL#
+INDEX_LENGTH	#IL#
+DATA_FREE	#DF#
+AUTO_INCREMENT	NULL
+CREATE_TIME	#CRT#
+UPDATE_TIME	#UT#
+CHECK_TIME	#CT#
+TABLE_COLLATION	utf8_general_ci
+CHECKSUM	NULL
+CREATE_OPTIONS	#CO#
+TABLE_COMMENT	#TC#
+user_comment	
+Separator	-----------------------------------------------------
+TABLE_CATALOG	NULL
+TABLE_SCHEMA	information_schema
 TABLE_NAME	KEY_COLUMN_USAGE
 TABLE_TYPE	SYSTEM VIEW
 ENGINE	MEMORY
@@ -958,6 +1027,29 @@
 Separator	-----------------------------------------------------
 TABLE_CATALOG	NULL
 TABLE_SCHEMA	information_schema
+TABLE_NAME	TABLE_STATISTICS
+TABLE_TYPE	SYSTEM VIEW
+ENGINE	MEMORY
+VERSION	10
+ROW_FORMAT	Fixed
+TABLE_ROWS	#TBLR#
+AVG_ROW_LENGTH	#ARL#
+DATA_LENGTH	#DL#
+MAX_DATA_LENGTH	#MDL#
+INDEX_LENGTH	#IL#
+DATA_FREE	#DF#
+AUTO_INCREMENT	NULL
+CREATE_TIME	#CRT#
+UPDATE_TIME	#UT#
+CHECK_TIME	#CT#
+TABLE_COLLATION	utf8_general_ci
+CHECKSUM	NULL
+CREATE_OPTIONS	#CO#
+TABLE_COMMENT	#TC#
+user_comment	
+Separator	-----------------------------------------------------
+TABLE_CATALOG	NULL
+TABLE_SCHEMA	information_schema
 TABLE_NAME	TRIGGERS
 TABLE_TYPE	SYSTEM VIEW
 ENGINE	MYISAM_OR_MARIA
@@ -1004,6 +1096,29 @@
 Separator	-----------------------------------------------------
 TABLE_CATALOG	NULL
 TABLE_SCHEMA	information_schema
+TABLE_NAME	USER_STATISTICS
+TABLE_TYPE	SYSTEM VIEW
+ENGINE	MEMORY
+VERSION	10
+ROW_FORMAT	Fixed
+TABLE_ROWS	#TBLR#
+AVG_ROW_LENGTH	#ARL#
+DATA_LENGTH	#DL#
+MAX_DATA_LENGTH	#MDL#
+INDEX_LENGTH	#IL#
+DATA_FREE	#DF#
+AUTO_INCREMENT	NULL
+CREATE_TIME	#CRT#
+UPDATE_TIME	#UT#
+CHECK_TIME	#CT#
+TABLE_COLLATION	utf8_general_ci
+CHECKSUM	NULL
+CREATE_OPTIONS	#CO#
+TABLE_COMMENT	#TC#
+user_comment	
+Separator	-----------------------------------------------------
+TABLE_CATALOG	NULL
+TABLE_SCHEMA	information_schema
 TABLE_NAME	VIEWS
 TABLE_TYPE	SYSTEM VIEW
 ENGINE	MYISAM_OR_MARIA
@@ -1113,6 +1228,29 @@
 Separator	-----------------------------------------------------
 TABLE_CATALOG	NULL
 TABLE_SCHEMA	information_schema
+TABLE_NAME	CLIENT_STATISTICS
+TABLE_TYPE	SYSTEM VIEW
+ENGINE	MEMORY
+VERSION	10
+ROW_FORMAT	Fixed
+TABLE_ROWS	#TBLR#
+AVG_ROW_LENGTH	#ARL#
+DATA_LENGTH	#DL#
+MAX_DATA_LENGTH	#MDL#
+INDEX_LENGTH	#IL#
+DATA_FREE	#DF#
+AUTO_INCREMENT	NULL
+CREATE_TIME	#CRT#
+UPDATE_TIME	#UT#
+CHECK_TIME	#CT#
+TABLE_COLLATION	utf8_general_ci
+CHECKSUM	NULL
+CREATE_OPTIONS	#CO#
+TABLE_COMMENT	#TC#
+user_comment	
+Separator	-----------------------------------------------------
+TABLE_CATALOG	NULL
+TABLE_SCHEMA	information_schema
 TABLE_NAME	COLLATIONS
 TABLE_TYPE	SYSTEM VIEW
 ENGINE	MEMORY
@@ -1320,6 +1458,29 @@
 Separator	-----------------------------------------------------
 TABLE_CATALOG	NULL
 TABLE_SCHEMA	information_schema
+TABLE_NAME	INDEX_STATISTICS
+TABLE_TYPE	SYSTEM VIEW
+ENGINE	MEMORY
+VERSION	10
+ROW_FORMAT	Fixed
+TABLE_ROWS	#TBLR#
+AVG_ROW_LENGTH	#ARL#
+DATA_LENGTH	#DL#
+MAX_DATA_LENGTH	#MDL#
+INDEX_LENGTH	#IL#
+DATA_FREE	#DF#
+AUTO_INCREMENT	NULL
+CREATE_TIME	#CRT#
+UPDATE_TIME	#UT#
+CHECK_TIME	#CT#
+TABLE_COLLATION	utf8_general_ci
+CHECKSUM	NULL
+CREATE_OPTIONS	#CO#
+TABLE_COMMENT	#TC#
+user_comment	
+Separator	-----------------------------------------------------
+TABLE_CATALOG	NULL
+TABLE_SCHEMA	information_schema
 TABLE_NAME	INNODB_BUFFER_POOL_PAGES
 TABLE_TYPE	SYSTEM VIEW
 ENGINE	MEMORY
@@ -1688,6 +1849,29 @@
 Separator	-----------------------------------------------------
 TABLE_CATALOG	NULL
 TABLE_SCHEMA	information_schema
+TABLE_NAME	KEY_CACHES
+TABLE_TYPE	SYSTEM VIEW
+ENGINE	MEMORY
+VERSION	10
+ROW_FORMAT	Fixed
+TABLE_ROWS	#TBLR#
+AVG_ROW_LENGTH	#ARL#
+DATA_LENGTH	#DL#
+MAX_DATA_LENGTH	#MDL#
+INDEX_LENGTH	#IL#
+DATA_FREE	#DF#
+AUTO_INCREMENT	NULL
+CREATE_TIME	#CRT#
+UPDATE_TIME	#UT#
+CHECK_TIME	#CT#
+TABLE_COLLATION	utf8_general_ci
+CHECKSUM	NULL
+CREATE_OPTIONS	#CO#
+TABLE_COMMENT	#TC#
+user_comment	
+Separator	-----------------------------------------------------
+TABLE_CATALOG	NULL
+TABLE_SCHEMA	information_schema
 TABLE_NAME	KEY_COLUMN_USAGE
 TABLE_TYPE	SYSTEM VIEW
 ENGINE	MEMORY
@@ -2033,6 +2217,29 @@
 Separator	-----------------------------------------------------
 TABLE_CATALOG	NULL
 TABLE_SCHEMA	information_schema
+TABLE_NAME	TABLE_STATISTICS
+TABLE_TYPE	SYSTEM VIEW
+ENGINE	MEMORY
+VERSION	10
+ROW_FORMAT	Fixed
+TABLE_ROWS	#TBLR#
+AVG_ROW_LENGTH	#ARL#
+DATA_LENGTH	#DL#
+MAX_DATA_LENGTH	#MDL#
+INDEX_LENGTH	#IL#
+DATA_FREE	#DF#
+AUTO_INCREMENT	NULL
+CREATE_TIME	#CRT#
+UPDATE_TIME	#UT#
+CHECK_TIME	#CT#
+TABLE_COLLATION	utf8_general_ci
+CHECKSUM	NULL
+CREATE_OPTIONS	#CO#
+TABLE_COMMENT	#TC#
+user_comment	
+Separator	-----------------------------------------------------
+TABLE_CATALOG	NULL
+TABLE_SCHEMA	information_schema
 TABLE_NAME	TRIGGERS
 TABLE_TYPE	SYSTEM VIEW
 ENGINE	MYISAM_OR_MARIA
@@ -2079,6 +2286,29 @@
 Separator	-----------------------------------------------------
 TABLE_CATALOG	NULL
 TABLE_SCHEMA	information_schema
+TABLE_NAME	USER_STATISTICS
+TABLE_TYPE	SYSTEM VIEW
+ENGINE	MEMORY
+VERSION	10
+ROW_FORMAT	Fixed
+TABLE_ROWS	#TBLR#
+AVG_ROW_LENGTH	#ARL#
+DATA_LENGTH	#DL#
+MAX_DATA_LENGTH	#MDL#
+INDEX_LENGTH	#IL#
+DATA_FREE	#DF#
+AUTO_INCREMENT	NULL
+CREATE_TIME	#CRT#
+UPDATE_TIME	#UT#
+CHECK_TIME	#CT#
+TABLE_COLLATION	utf8_general_ci
+CHECKSUM	NULL
+CREATE_OPTIONS	#CO#
+TABLE_COMMENT	#TC#
+user_comment	
+Separator	-----------------------------------------------------
+TABLE_CATALOG	NULL
+TABLE_SCHEMA	information_schema
 TABLE_NAME	VIEWS
 TABLE_TYPE	SYSTEM VIEW
 ENGINE	MYISAM_OR_MARIA

=== modified file 'mysql-test/suite/funcs_1/r/is_user_privileges.result'
--- a/mysql-test/suite/funcs_1/r/is_user_privileges.result	2008-03-07 19:18:14 +0000
+++ b/mysql-test/suite/funcs_1/r/is_user_privileges.result	2010-03-29 15:13:53 +0000
@@ -76,10 +76,10 @@
 'testuser3'@'localhost'	NULL	USAGE	NO
 SELECT * FROM mysql.user
 WHERE user LIKE 'testuser%' ORDER BY host, user;
-Host	User	Password	Select_priv	Insert_priv	Update_priv	Delete_priv	Create_priv	Drop_priv	Reload_priv	Shutdown_priv	Process_priv	File_priv	Grant_priv	References_priv	Index_priv	Alter_priv	Show_db_priv	Super_priv	Create_tmp_table_priv	Lock_tables_priv	Execute_priv	Repl_slave_priv	Repl_client_priv	Create_view_priv	Show_view_priv	Create_routine_priv	Alter_routine_priv	Create_user_priv	Event_priv	Trigger_priv	ssl_type	ssl_cipher	x509_issuer	x509_subject	max_questions	max_updates	max_connections	max_user_connections
-localhost	testuser1		N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0
-localhost	testuser2		N	Y	Y	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0
-localhost	testuser3		N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0
+Host	User	Password	Select_priv	Insert_priv	Update_priv	Delete_priv	Create_priv	Drop_priv	Reload_priv	Shutdown_priv	Process_priv	File_priv	Grant_priv	References_priv	Index_priv	Alter_priv	Show_db_priv	Super_priv	Create_tmp_table_priv	Lock_tables_priv	Execute_priv	Repl_slave_priv	Repl_client_priv	Create_view_priv	Show_view_priv	Create_routine_priv	Alter_routine_priv	Create_user_priv	Event_priv	Trigger_priv	ssl_type	ssl_cipher	x509_issuer	x509_subject	max_questions	max_updates	max_connections	max_user_connections	plugin	auth_string
+localhost	testuser1		N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0		
+localhost	testuser2		N	Y	Y	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0		
+localhost	testuser3		N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0		
 #
 # Add GRANT OPTION db_datadict.* to testuser1;
 GRANT UPDATE ON db_datadict.* TO 'testuser1'@'localhost' WITH GRANT OPTION;
@@ -93,10 +93,10 @@
 'testuser3'@'localhost'	NULL	USAGE	NO
 SELECT * FROM mysql.user
 WHERE user LIKE 'testuser%' ORDER BY host, user;
-Host	User	Password	Select_priv	Insert_priv	Update_priv	Delete_priv	Create_priv	Drop_priv	Reload_priv	Shutdown_priv	Process_priv	File_priv	Grant_priv	References_priv	Index_priv	Alter_priv	Show_db_priv	Super_priv	Create_tmp_table_priv	Lock_tables_priv	Execute_priv	Repl_slave_priv	Repl_client_priv	Create_view_priv	Show_view_priv	Create_routine_priv	Alter_routine_priv	Create_user_priv	Event_priv	Trigger_priv	ssl_type	ssl_cipher	x509_issuer	x509_subject	max_questions	max_updates	max_connections	max_user_connections
-localhost	testuser1		N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0
-localhost	testuser2		N	Y	Y	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0
-localhost	testuser3		N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0
+Host	User	Password	Select_priv	Insert_priv	Update_priv	Delete_priv	Create_priv	Drop_priv	Reload_priv	Shutdown_priv	Process_priv	File_priv	Grant_priv	References_priv	Index_priv	Alter_priv	Show_db_priv	Super_priv	Create_tmp_table_priv	Lock_tables_priv	Execute_priv	Repl_slave_priv	Repl_client_priv	Create_view_priv	Show_view_priv	Create_routine_priv	Alter_routine_priv	Create_user_priv	Event_priv	Trigger_priv	ssl_type	ssl_cipher	x509_issuer	x509_subject	max_questions	max_updates	max_connections	max_user_connections	plugin	auth_string
+localhost	testuser1		N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0		
+localhost	testuser2		N	Y	Y	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0		
+localhost	testuser3		N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0		
 # Establish connection testuser1 (user=testuser1)
 SELECT * FROM information_schema.user_privileges
 WHERE grantee LIKE '''testuser%'''
@@ -105,10 +105,10 @@
 'testuser1'@'localhost'	NULL	USAGE	NO
 SELECT * FROM mysql.user
 WHERE user LIKE 'testuser%' ORDER BY host, user;
-Host	User	Password	Select_priv	Insert_priv	Update_priv	Delete_priv	Create_priv	Drop_priv	Reload_priv	Shutdown_priv	Process_priv	File_priv	Grant_priv	References_priv	Index_priv	Alter_priv	Show_db_priv	Super_priv	Create_tmp_table_priv	Lock_tables_priv	Execute_priv	Repl_slave_priv	Repl_client_priv	Create_view_priv	Show_view_priv	Create_routine_priv	Alter_routine_priv	Create_user_priv	Event_priv	Trigger_priv	ssl_type	ssl_cipher	x509_issuer	x509_subject	max_questions	max_updates	max_connections	max_user_connections
-localhost	testuser1		N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0
-localhost	testuser2		N	Y	Y	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0
-localhost	testuser3		N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0
+Host	User	Password	Select_priv	Insert_priv	Update_priv	Delete_priv	Create_priv	Drop_priv	Reload_priv	Shutdown_priv	Process_priv	File_priv	Grant_priv	References_priv	Index_priv	Alter_priv	Show_db_priv	Super_priv	Create_tmp_table_priv	Lock_tables_priv	Execute_priv	Repl_slave_priv	Repl_client_priv	Create_view_priv	Show_view_priv	Create_routine_priv	Alter_routine_priv	Create_user_priv	Event_priv	Trigger_priv	ssl_type	ssl_cipher	x509_issuer	x509_subject	max_questions	max_updates	max_connections	max_user_connections	plugin	auth_string
+localhost	testuser1		N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0		
+localhost	testuser2		N	Y	Y	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0		
+localhost	testuser3		N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0		
 SHOW GRANTS;
 Grants for testuser1 at localhost
 GRANT USAGE ON *.* TO 'testuser1'@'localhost'
@@ -130,10 +130,10 @@
 'testuser3'@'localhost'	NULL	USAGE	NO
 SELECT * FROM mysql.user
 WHERE user LIKE 'testuser%' ORDER BY host, user;
-Host	User	Password	Select_priv	Insert_priv	Update_priv	Delete_priv	Create_priv	Drop_priv	Reload_priv	Shutdown_priv	Process_priv	File_priv	Grant_priv	References_priv	Index_priv	Alter_priv	Show_db_priv	Super_priv	Create_tmp_table_priv	Lock_tables_priv	Execute_priv	Repl_slave_priv	Repl_client_priv	Create_view_priv	Show_view_priv	Create_routine_priv	Alter_routine_priv	Create_user_priv	Event_priv	Trigger_priv	ssl_type	ssl_cipher	x509_issuer	x509_subject	max_questions	max_updates	max_connections	max_user_connections
-localhost	testuser1		Y	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0
-localhost	testuser2		N	Y	Y	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0
-localhost	testuser3		N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0
+Host	User	Password	Select_priv	Insert_priv	Update_priv	Delete_priv	Create_priv	Drop_priv	Reload_priv	Shutdown_priv	Process_priv	File_priv	Grant_priv	References_priv	Index_priv	Alter_priv	Show_db_priv	Super_priv	Create_tmp_table_priv	Lock_tables_priv	Execute_priv	Repl_slave_priv	Repl_client_priv	Create_view_priv	Show_view_priv	Create_routine_priv	Alter_routine_priv	Create_user_priv	Event_priv	Trigger_priv	ssl_type	ssl_cipher	x509_issuer	x509_subject	max_questions	max_updates	max_connections	max_user_connections	plugin	auth_string
+localhost	testuser1		Y	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0		
+localhost	testuser2		N	Y	Y	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0		
+localhost	testuser3		N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0		
 GRANT SELECT ON *.* TO 'testuser1'@'localhost' WITH GRANT OPTION;
 #
 # Here <SELECT YES> is shown correctly for testuser1;
@@ -147,10 +147,10 @@
 'testuser3'@'localhost'	NULL	USAGE	NO
 SELECT * FROM mysql.user
 WHERE user LIKE 'testuser%' ORDER BY host, user;
-Host	User	Password	Select_priv	Insert_priv	Update_priv	Delete_priv	Create_priv	Drop_priv	Reload_priv	Shutdown_priv	Process_priv	File_priv	Grant_priv	References_priv	Index_priv	Alter_priv	Show_db_priv	Super_priv	Create_tmp_table_priv	Lock_tables_priv	Execute_priv	Repl_slave_priv	Repl_client_priv	Create_view_priv	Show_view_priv	Create_routine_priv	Alter_routine_priv	Create_user_priv	Event_priv	Trigger_priv	ssl_type	ssl_cipher	x509_issuer	x509_subject	max_questions	max_updates	max_connections	max_user_connections
-localhost	testuser1		Y	N	N	N	N	N	N	N	N	N	Y	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0
-localhost	testuser2		N	Y	Y	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0
-localhost	testuser3		N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0
+Host	User	Password	Select_priv	Insert_priv	Update_priv	Delete_priv	Create_priv	Drop_priv	Reload_priv	Shutdown_priv	Process_priv	File_priv	Grant_priv	References_priv	Index_priv	Alter_priv	Show_db_priv	Super_priv	Create_tmp_table_priv	Lock_tables_priv	Execute_priv	Repl_slave_priv	Repl_client_priv	Create_view_priv	Show_view_priv	Create_routine_priv	Alter_routine_priv	Create_user_priv	Event_priv	Trigger_priv	ssl_type	ssl_cipher	x509_issuer	x509_subject	max_questions	max_updates	max_connections	max_user_connections	plugin	auth_string
+localhost	testuser1		Y	N	N	N	N	N	N	N	N	N	Y	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0		
+localhost	testuser2		N	Y	Y	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0		
+localhost	testuser3		N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0		
 # Switch to connection testuser1
 SELECT * FROM information_schema.user_privileges
 WHERE grantee LIKE '''testuser%'''
@@ -159,10 +159,10 @@
 'testuser1'@'localhost'	NULL	SELECT	YES
 SELECT * FROM mysql.user
 WHERE user LIKE 'testuser%' ORDER BY host, user;
-Host	User	Password	Select_priv	Insert_priv	Update_priv	Delete_priv	Create_priv	Drop_priv	Reload_priv	Shutdown_priv	Process_priv	File_priv	Grant_priv	References_priv	Index_priv	Alter_priv	Show_db_priv	Super_priv	Create_tmp_table_priv	Lock_tables_priv	Execute_priv	Repl_slave_priv	Repl_client_priv	Create_view_priv	Show_view_priv	Create_routine_priv	Alter_routine_priv	Create_user_priv	Event_priv	Trigger_priv	ssl_type	ssl_cipher	x509_issuer	x509_subject	max_questions	max_updates	max_connections	max_user_connections
-localhost	testuser1		Y	N	N	N	N	N	N	N	N	N	Y	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0
-localhost	testuser2		N	Y	Y	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0
-localhost	testuser3		N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0
+Host	User	Password	Select_priv	Insert_priv	Update_priv	Delete_priv	Create_priv	Drop_priv	Reload_priv	Shutdown_priv	Process_priv	File_priv	Grant_priv	References_priv	Index_priv	Alter_priv	Show_db_priv	Super_priv	Create_tmp_table_priv	Lock_tables_priv	Execute_priv	Repl_slave_priv	Repl_client_priv	Create_view_priv	Show_view_priv	Create_routine_priv	Alter_routine_priv	Create_user_priv	Event_priv	Trigger_priv	ssl_type	ssl_cipher	x509_issuer	x509_subject	max_questions	max_updates	max_connections	max_user_connections	plugin	auth_string
+localhost	testuser1		Y	N	N	N	N	N	N	N	N	N	Y	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0		
+localhost	testuser2		N	Y	Y	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0		
+localhost	testuser3		N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0		
 SHOW GRANTS;
 Grants for testuser1 at localhost
 GRANT SELECT ON *.* TO 'testuser1'@'localhost' WITH GRANT OPTION
@@ -207,10 +207,10 @@
 'testuser3'@'localhost'	NULL	USAGE	NO
 SELECT * FROM mysql.user
 WHERE user LIKE 'testuser%' ORDER BY host, user;
-Host	User	Password	Select_priv	Insert_priv	Update_priv	Delete_priv	Create_priv	Drop_priv	Reload_priv	Shutdown_priv	Process_priv	File_priv	Grant_priv	References_priv	Index_priv	Alter_priv	Show_db_priv	Super_priv	Create_tmp_table_priv	Lock_tables_priv	Execute_priv	Repl_slave_priv	Repl_client_priv	Create_view_priv	Show_view_priv	Create_routine_priv	Alter_routine_priv	Create_user_priv	Event_priv	Trigger_priv	ssl_type	ssl_cipher	x509_issuer	x509_subject	max_questions	max_updates	max_connections	max_user_connections
-localhost	testuser1		N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0
-localhost	testuser2		N	Y	Y	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0
-localhost	testuser3		N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0
+Host	User	Password	Select_priv	Insert_priv	Update_priv	Delete_priv	Create_priv	Drop_priv	Reload_priv	Shutdown_priv	Process_priv	File_priv	Grant_priv	References_priv	Index_priv	Alter_priv	Show_db_priv	Super_priv	Create_tmp_table_priv	Lock_tables_priv	Execute_priv	Repl_slave_priv	Repl_client_priv	Create_view_priv	Show_view_priv	Create_routine_priv	Alter_routine_priv	Create_user_priv	Event_priv	Trigger_priv	ssl_type	ssl_cipher	x509_issuer	x509_subject	max_questions	max_updates	max_connections	max_user_connections	plugin	auth_string
+localhost	testuser1		N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0		
+localhost	testuser2		N	Y	Y	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0		
+localhost	testuser3		N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0		
 # Switch to connection testuser1
 SELECT * FROM information_schema.user_privileges
 WHERE grantee LIKE '''testuser%'''
@@ -253,10 +253,10 @@
 'testuser3'@'localhost'	NULL	USAGE	NO
 SELECT * FROM mysql.user
 WHERE user LIKE 'testuser%' ORDER BY host, user;
-Host	User	Password	Select_priv	Insert_priv	Update_priv	Delete_priv	Create_priv	Drop_priv	Reload_priv	Shutdown_priv	Process_priv	File_priv	Grant_priv	References_priv	Index_priv	Alter_priv	Show_db_priv	Super_priv	Create_tmp_table_priv	Lock_tables_priv	Execute_priv	Repl_slave_priv	Repl_client_priv	Create_view_priv	Show_view_priv	Create_routine_priv	Alter_routine_priv	Create_user_priv	Event_priv	Trigger_priv	ssl_type	ssl_cipher	x509_issuer	x509_subject	max_questions	max_updates	max_connections	max_user_connections
-localhost	testuser1		N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0
-localhost	testuser2		N	Y	Y	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0
-localhost	testuser3		N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0
+Host	User	Password	Select_priv	Insert_priv	Update_priv	Delete_priv	Create_priv	Drop_priv	Reload_priv	Shutdown_priv	Process_priv	File_priv	Grant_priv	References_priv	Index_priv	Alter_priv	Show_db_priv	Super_priv	Create_tmp_table_priv	Lock_tables_priv	Execute_priv	Repl_slave_priv	Repl_client_priv	Create_view_priv	Show_view_priv	Create_routine_priv	Alter_routine_priv	Create_user_priv	Event_priv	Trigger_priv	ssl_type	ssl_cipher	x509_issuer	x509_subject	max_questions	max_updates	max_connections	max_user_connections	plugin	auth_string
+localhost	testuser1		N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0		
+localhost	testuser2		N	Y	Y	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0		
+localhost	testuser3		N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0		
 # Switch to connection testuser1
 SELECT * FROM information_schema.user_privileges
 WHERE grantee LIKE '''testuser%'''
@@ -265,10 +265,10 @@
 'testuser1'@'localhost'	NULL	USAGE	NO
 SELECT * FROM mysql.user
 WHERE user LIKE 'testuser%' ORDER BY host, user;
-Host	User	Password	Select_priv	Insert_priv	Update_priv	Delete_priv	Create_priv	Drop_priv	Reload_priv	Shutdown_priv	Process_priv	File_priv	Grant_priv	References_priv	Index_priv	Alter_priv	Show_db_priv	Super_priv	Create_tmp_table_priv	Lock_tables_priv	Execute_priv	Repl_slave_priv	Repl_client_priv	Create_view_priv	Show_view_priv	Create_routine_priv	Alter_routine_priv	Create_user_priv	Event_priv	Trigger_priv	ssl_type	ssl_cipher	x509_issuer	x509_subject	max_questions	max_updates	max_connections	max_user_connections
-localhost	testuser1		N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0
-localhost	testuser2		N	Y	Y	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0
-localhost	testuser3		N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0
+Host	User	Password	Select_priv	Insert_priv	Update_priv	Delete_priv	Create_priv	Drop_priv	Reload_priv	Shutdown_priv	Process_priv	File_priv	Grant_priv	References_priv	Index_priv	Alter_priv	Show_db_priv	Super_priv	Create_tmp_table_priv	Lock_tables_priv	Execute_priv	Repl_slave_priv	Repl_client_priv	Create_view_priv	Show_view_priv	Create_routine_priv	Alter_routine_priv	Create_user_priv	Event_priv	Trigger_priv	ssl_type	ssl_cipher	x509_issuer	x509_subject	max_questions	max_updates	max_connections	max_user_connections	plugin	auth_string
+localhost	testuser1		N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0		
+localhost	testuser2		N	Y	Y	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0		
+localhost	testuser3		N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0		
 SHOW GRANTS;
 Grants for testuser1 at localhost
 GRANT USAGE ON *.* TO 'testuser1'@'localhost'
@@ -284,10 +284,10 @@
 'testuser1'@'localhost'	NULL	USAGE	NO
 SELECT * FROM mysql.user
 WHERE user LIKE 'testuser%' ORDER BY host, user;
-Host	User	Password	Select_priv	Insert_priv	Update_priv	Delete_priv	Create_priv	Drop_priv	Reload_priv	Shutdown_priv	Process_priv	File_priv	Grant_priv	References_priv	Index_priv	Alter_priv	Show_db_priv	Super_priv	Create_tmp_table_priv	Lock_tables_priv	Execute_priv	Repl_slave_priv	Repl_client_priv	Create_view_priv	Show_view_priv	Create_routine_priv	Alter_routine_priv	Create_user_priv	Event_priv	Trigger_priv	ssl_type	ssl_cipher	x509_issuer	x509_subject	max_questions	max_updates	max_connections	max_user_connections
-localhost	testuser1		N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0
-localhost	testuser2		N	Y	Y	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0
-localhost	testuser3		N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0
+Host	User	Password	Select_priv	Insert_priv	Update_priv	Delete_priv	Create_priv	Drop_priv	Reload_priv	Shutdown_priv	Process_priv	File_priv	Grant_priv	References_priv	Index_priv	Alter_priv	Show_db_priv	Super_priv	Create_tmp_table_priv	Lock_tables_priv	Execute_priv	Repl_slave_priv	Repl_client_priv	Create_view_priv	Show_view_priv	Create_routine_priv	Alter_routine_priv	Create_user_priv	Event_priv	Trigger_priv	ssl_type	ssl_cipher	x509_issuer	x509_subject	max_questions	max_updates	max_connections	max_user_connections	plugin	auth_string
+localhost	testuser1		N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0		
+localhost	testuser2		N	Y	Y	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0		
+localhost	testuser3		N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0		
 SHOW GRANTS;
 Grants for testuser1 at localhost
 GRANT USAGE ON *.* TO 'testuser1'@'localhost'
@@ -309,10 +309,10 @@
 'testuser3'@'localhost'	NULL	USAGE	NO
 SELECT * FROM mysql.user
 WHERE user LIKE 'testuser%' ORDER BY host, user;
-Host	User	Password	Select_priv	Insert_priv	Update_priv	Delete_priv	Create_priv	Drop_priv	Reload_priv	Shutdown_priv	Process_priv	File_priv	Grant_priv	References_priv	Index_priv	Alter_priv	Show_db_priv	Super_priv	Create_tmp_table_priv	Lock_tables_priv	Execute_priv	Repl_slave_priv	Repl_client_priv	Create_view_priv	Show_view_priv	Create_routine_priv	Alter_routine_priv	Create_user_priv	Event_priv	Trigger_priv	ssl_type	ssl_cipher	x509_issuer	x509_subject	max_questions	max_updates	max_connections	max_user_connections
-localhost	testuser1		N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0
-localhost	testuser2		N	Y	Y	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0
-localhost	testuser3		N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0
+Host	User	Password	Select_priv	Insert_priv	Update_priv	Delete_priv	Create_priv	Drop_priv	Reload_priv	Shutdown_priv	Process_priv	File_priv	Grant_priv	References_priv	Index_priv	Alter_priv	Show_db_priv	Super_priv	Create_tmp_table_priv	Lock_tables_priv	Execute_priv	Repl_slave_priv	Repl_client_priv	Create_view_priv	Show_view_priv	Create_routine_priv	Alter_routine_priv	Create_user_priv	Event_priv	Trigger_priv	ssl_type	ssl_cipher	x509_issuer	x509_subject	max_questions	max_updates	max_connections	max_user_connections	plugin	auth_string
+localhost	testuser1		N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0		
+localhost	testuser2		N	Y	Y	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0		
+localhost	testuser3		N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N	N					0	0	0	0		
 # Switch to connection testuser1
 SELECT * FROM information_schema.user_privileges
 WHERE grantee LIKE '''testuser%'''

=== modified file 'mysql-test/suite/funcs_1/t/is_columns.test'
--- a/mysql-test/suite/funcs_1/t/is_columns.test	2009-09-07 20:50:10 +0000
+++ b/mysql-test/suite/funcs_1/t/is_columns.test	2010-09-12 16:40:01 +0000
@@ -78,7 +78,7 @@
 --source suite/funcs_1/datadict/datadict_bug_12777.inc
 eval DESCRIBE          information_schema.$is_table;
 --source suite/funcs_1/datadict/datadict_bug_12777.inc
---replace_result ENGINE=MyISAM "" ENGINE=MARIA "" " PAGE_CHECKSUM=1" "" " PAGE_CHECKSUM=0" ""
+--replace_result ENGINE=MyISAM "" ENGINE=Aria "" " PAGE_CHECKSUM=1" "" " PAGE_CHECKSUM=0" ""
 eval SHOW CREATE TABLE information_schema.$is_table;
 --source suite/funcs_1/datadict/datadict_bug_12777.inc
 eval SHOW COLUMNS FROM information_schema.$is_table;

=== modified file 'mysql-test/suite/funcs_1/t/is_events.test'
--- a/mysql-test/suite/funcs_1/t/is_events.test	2008-10-10 15:28:41 +0000
+++ b/mysql-test/suite/funcs_1/t/is_events.test	2010-09-12 16:40:01 +0000
@@ -89,7 +89,7 @@
 #                     is associated.
 #
 eval DESCRIBE          information_schema.$is_table;
---replace_result ENGINE=MyISAM "" ENGINE=MARIA "" " PAGE_CHECKSUM=1" "" " PAGE_CHECKSUM=0" ""
+--replace_result ENGINE=MyISAM "" ENGINE=Aria "" " PAGE_CHECKSUM=1" "" " PAGE_CHECKSUM=0" ""
 eval SHOW CREATE TABLE information_schema.$is_table;
 eval SHOW COLUMNS FROM information_schema.$is_table;
 

=== modified file 'mysql-test/suite/funcs_1/t/is_tables_is.test'
--- a/mysql-test/suite/funcs_1/t/is_tables_is.test	2010-09-05 10:52:33 +0000
+++ b/mysql-test/suite/funcs_1/t/is_tables_is.test	2010-09-11 18:43:48 +0000
@@ -17,4 +17,3 @@
 let $my_where = WHERE table_schema = 'information_schema'
 AND table_name <> 'profiling';
 --source suite/funcs_1/datadict/tables1.inc
-

=== modified file 'mysql-test/suite/innodb/t/innodb_bug57255.test'
--- a/mysql-test/suite/innodb/t/innodb_bug57255.test	2010-10-06 10:41:26 +0000
+++ b/mysql-test/suite/innodb/t/innodb_bug57255.test	2010-12-13 13:05:57 +0000
@@ -12,6 +12,7 @@
 insert into A values(1), (2);
 
 --disable_query_log
+begin;
 let $i=257;
 while ($i)
 {
@@ -24,6 +25,7 @@
 insert into C(f1) values(2);
 dec $i;
 }
+commit;
 --enable_query_log
 
 # Following Deletes should not report error

=== modified file 'mysql-test/suite/innodb_plugin/t/innodb_bug57255.test'
--- a/mysql-test/suite/innodb_plugin/t/innodb_bug57255.test	2010-10-06 10:41:26 +0000
+++ b/mysql-test/suite/innodb_plugin/t/innodb_bug57255.test	2010-12-13 13:05:57 +0000
@@ -12,6 +12,7 @@
 insert into A values(1), (2);
 
 --disable_query_log
+begin;
 let $i=257;
 while ($i)
 {
@@ -24,6 +25,7 @@
 insert into C(f1) values(2);
 dec $i;
 }
+commit;
 --enable_query_log
 
 # Following Deletes should not report error

=== added file 'mysql-test/suite/maria/r/compat_aliases.result'
--- a/mysql-test/suite/maria/r/compat_aliases.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/maria/r/compat_aliases.result	2010-11-09 08:17:36 +0000
@@ -0,0 +1,58 @@
+select * from information_schema.plugins where plugin_name like '%aria';
+PLUGIN_NAME	PLUGIN_VERSION	PLUGIN_STATUS	PLUGIN_TYPE	PLUGIN_TYPE_VERSION	PLUGIN_LIBRARY	PLUGIN_LIBRARY_VERSION	PLUGIN_AUTHOR	PLUGIN_DESCRIPTION	PLUGIN_LICENSE	PLUGIN_MATURITY	PLUGIN_AUTH_VERSION
+Maria	1.5	ACTIVE	DAEMON	#	NULL	NULL	Monty Program Ab	Compatibility aliases for the Aria engine	GPL	Gamma	1.5
+Aria	1.5	ACTIVE	STORAGE ENGINE	#	NULL	NULL	Monty Program Ab	Crash-safe tables with MyISAM heritage	GPL	Gamma	1.5
+select maria_vars.variable_name, aria_vars.variable_name from
+information_schema.session_variables as maria_vars left join
+information_schema.session_variables as aria_vars
+on (maria_vars.variable_name = concat('m', aria_vars.variable_name))
+where maria_vars.variable_name like 'maria_%'
+    and not (maria_vars.variable_value <=> aria_vars.variable_value);
+variable_name	variable_name
+select maria_vars.variable_name, aria_vars.variable_name from
+information_schema.session_status as maria_vars left join
+information_schema.session_status as aria_vars
+on (maria_vars.variable_name = concat('m', aria_vars.variable_name))
+where maria_vars.variable_name like 'maria_%'
+    and not (maria_vars.variable_value <=> aria_vars.variable_value);
+variable_name	variable_name
+select maria_vars.variable_name, aria_vars.variable_name from
+information_schema.session_variables as aria_vars left join
+information_schema.session_variables as maria_vars
+on (maria_vars.variable_name = concat('m', aria_vars.variable_name))
+where aria_vars.variable_name like 'aria_%'
+    and not (maria_vars.variable_value <=> aria_vars.variable_value);
+variable_name	variable_name
+select maria_vars.variable_name, aria_vars.variable_name from
+information_schema.session_status as aria_vars left join
+information_schema.session_status as maria_vars
+on (maria_vars.variable_name = concat('m', aria_vars.variable_name))
+where aria_vars.variable_name like 'aria_%'
+    and not (maria_vars.variable_value <=> aria_vars.variable_value);
+variable_name	variable_name
+set @old_checkpoint_interval=@@global.aria_checkpoint_interval;
+set global maria_checkpoint_interval=10;
+select @@global.aria_checkpoint_interval;
+@@global.aria_checkpoint_interval
+10
+set global maria_checkpoint_interval=@old_checkpoint_interval;
+set @old_sort_buffer_size=@@global.maria_sort_buffer_size;
+set global aria_sort_buffer_size=1024;
+select @@global.maria_sort_buffer_size;
+@@global.maria_sort_buffer_size
+1024
+set global aria_sort_buffer_size=@old_sort_buffer_size;
+set @old_sort_buffer_size=@@session.maria_sort_buffer_size;
+set session aria_sort_buffer_size=2048;
+select @@session.maria_sort_buffer_size;
+@@session.maria_sort_buffer_size
+2048
+set session aria_sort_buffer_size=@old_sort_buffer_size;
+set @old_max_sort_file_size=@@global.maria_max_sort_file_size,
+ at old_repair_threads=@@global.aria_repair_threads;
+set @@global.maria_max_sort_file_size=default, @@global.aria_repair_threads=default;
+select @@global.maria_max_sort_file_size, @@global.aria_repair_threads;
+@@global.maria_max_sort_file_size	@@global.aria_repair_threads
+9223372036853727232	1
+set @@global.aria_max_sort_file_size=@old_max_sort_file_size,
+@@global.maria_repair_threads=@old_repair_threads;

=== added file 'mysql-test/suite/maria/r/group_commit.result'
--- a/mysql-test/suite/maria/r/group_commit.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/maria/r/group_commit.result	2010-09-12 16:40:01 +0000
@@ -0,0 +1,17 @@
+drop table if exists t1;
+create table t1 (a int);
+SET GLOBAL aria_group_commit="NONE";
+SET GLOBAL aria_group_commit_interval= 0;
+SET GLOBAL aria_group_commit="NONE";
+SET GLOBAL aria_group_commit_interval= 100;
+SET GLOBAL aria_group_commit="HARD";
+SET GLOBAL aria_group_commit_interval= 0;
+SET GLOBAL aria_group_commit="HARD";
+SET GLOBAL aria_group_commit_interval= 100;
+SET GLOBAL aria_group_commit="SOFT";
+SET GLOBAL aria_group_commit_interval= 0;
+SET GLOBAL aria_group_commit="SOFT";
+SET GLOBAL aria_group_commit_interval= 100;
+SET GLOBAL aria_group_commit="NONE";
+SET GLOBAL aria_group_commit_interval= 0;
+drop table t1;

=== modified file 'mysql-test/suite/maria/r/maria-autozerofill.result'
--- a/mysql-test/suite/maria/r/maria-autozerofill.result	2011-01-20 17:08:12 +0000
+++ b/mysql-test/suite/maria/r/maria-autozerofill.result	2011-01-23 07:23:47 +0000
@@ -2,7 +2,7 @@
 drop database if exists mysqltest;
 create database mysqltest;
 use mysqltest;
-create table t1(a int) engine=maria;
+create table t1(a int) engine=aria;
 insert into t1 values(1);
 flush table t1;
 create_rename_lsn has non-magic value

=== modified file 'mysql-test/suite/maria/r/maria-big.result'
--- a/mysql-test/suite/maria/r/maria-big.result	2009-02-12 14:08:56 +0000
+++ b/mysql-test/suite/maria/r/maria-big.result	2010-09-12 16:40:01 +0000
@@ -1,5 +1,5 @@
 set global max_allowed_packet=400000000;
-set storage_engine=maria;
+set storage_engine=aria;
 affected rows: 0
 drop table if exists t1, t2;
 affected rows: 0

=== modified file 'mysql-test/suite/maria/r/maria-big2.result'
--- a/mysql-test/suite/maria/r/maria-big2.result	2009-02-19 09:01:25 +0000
+++ b/mysql-test/suite/maria/r/maria-big2.result	2010-09-12 16:40:01 +0000
@@ -1,4 +1,4 @@
-create table t2(id int,a varchar(255),b varchar(255),key(a))engine=maria row_format=dynamic transactional=0;
+create table t2(id int,a varchar(255),b varchar(255),key(a))engine=aria row_format=dynamic transactional=0;
 Table	Op	Msg_type	Msg_text
 test.t2	check	status	OK
 Table	Op	Msg_type	Msg_text

=== modified file 'mysql-test/suite/maria/r/maria-connect.result'
--- a/mysql-test/suite/maria/r/maria-connect.result	2009-02-12 14:08:56 +0000
+++ b/mysql-test/suite/maria/r/maria-connect.result	2010-09-12 16:40:01 +0000
@@ -1,5 +1,5 @@
-set global storage_engine=maria;
-set session storage_engine=maria;
+set global storage_engine=aria;
+set session storage_engine=aria;
 drop table if exists t1;
 SET SQL_WARNINGS=1;
 RESET MASTER;

=== modified file 'mysql-test/suite/maria/r/maria-gis-rtree-dynamic.result'
--- a/mysql-test/suite/maria/r/maria-gis-rtree-dynamic.result	2008-10-01 12:13:39 +0000
+++ b/mysql-test/suite/maria/r/maria-gis-rtree-dynamic.result	2010-09-12 16:40:01 +0000
@@ -1,4 +1,4 @@
-set storage_engine=maria;
+set storage_engine=aria;
 DROP TABLE IF EXISTS t1, t2;
 CREATE TABLE t1 (
 fid INT NOT NULL AUTO_INCREMENT PRIMARY KEY, 
@@ -12,7 +12,7 @@
   `g` geometry NOT NULL,
   PRIMARY KEY (`fid`),
   SPATIAL KEY `g` (`g`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 ROW_FORMAT=DYNAMIC
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 ROW_FORMAT=DYNAMIC
 INSERT INTO t1 (g) VALUES (GeomFromText('LineString(150 150, 150 150)'));
 INSERT INTO t1 (g) VALUES (GeomFromText('LineString(149 149, 151 151)'));
 INSERT INTO t1 (g) VALUES (GeomFromText('LineString(148 148, 152 152)'));
@@ -295,7 +295,7 @@
   `g` geometry NOT NULL,
   PRIMARY KEY (`fid`),
   SPATIAL KEY `g` (`g`)
-) ENGINE=MARIA AUTO_INCREMENT=101 DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 ROW_FORMAT=DYNAMIC
+) ENGINE=Aria AUTO_INCREMENT=101 DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 ROW_FORMAT=DYNAMIC
 SELECT count(*) FROM t2;
 count(*)
 100

=== modified file 'mysql-test/suite/maria/r/maria-gis-rtree-trans.result'
--- a/mysql-test/suite/maria/r/maria-gis-rtree-trans.result	2008-10-01 12:13:39 +0000
+++ b/mysql-test/suite/maria/r/maria-gis-rtree-trans.result	2010-09-12 16:40:01 +0000
@@ -1,4 +1,4 @@
-set storage_engine=maria;
+set storage_engine=aria;
 DROP TABLE IF EXISTS t1, t2;
 CREATE TABLE t1 (
 fid INT NOT NULL AUTO_INCREMENT PRIMARY KEY, 
@@ -12,7 +12,7 @@
   `g` geometry NOT NULL,
   PRIMARY KEY (`fid`),
   SPATIAL KEY `g` (`g`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 ROW_FORMAT=PAGE TRANSACTIONAL=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 ROW_FORMAT=PAGE TRANSACTIONAL=1
 INSERT INTO t1 (g) VALUES (GeomFromText('LineString(150 150, 150 150)'));
 INSERT INTO t1 (g) VALUES (GeomFromText('LineString(149 149, 151 151)'));
 INSERT INTO t1 (g) VALUES (GeomFromText('LineString(148 148, 152 152)'));
@@ -295,7 +295,7 @@
   `g` geometry NOT NULL,
   PRIMARY KEY (`fid`),
   SPATIAL KEY `g` (`g`)
-) ENGINE=MARIA AUTO_INCREMENT=101 DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 ROW_FORMAT=PAGE TRANSACTIONAL=1
+) ENGINE=Aria AUTO_INCREMENT=101 DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 ROW_FORMAT=PAGE TRANSACTIONAL=1
 SELECT count(*) FROM t2;
 count(*)
 100

=== modified file 'mysql-test/suite/maria/r/maria-gis-rtree.result'
--- a/mysql-test/suite/maria/r/maria-gis-rtree.result	2008-10-01 12:13:39 +0000
+++ b/mysql-test/suite/maria/r/maria-gis-rtree.result	2010-09-12 16:40:01 +0000
@@ -1,4 +1,4 @@
-set storage_engine=maria;
+set storage_engine=aria;
 DROP TABLE IF EXISTS t1, t2;
 CREATE TABLE t1 (
 fid INT NOT NULL AUTO_INCREMENT PRIMARY KEY, 
@@ -12,7 +12,7 @@
   `g` geometry NOT NULL,
   PRIMARY KEY (`fid`),
   SPATIAL KEY `g` (`g`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 ROW_FORMAT=PAGE TRANSACTIONAL=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 ROW_FORMAT=PAGE TRANSACTIONAL=0
 INSERT INTO t1 (g) VALUES (GeomFromText('LineString(150 150, 150 150)'));
 INSERT INTO t1 (g) VALUES (GeomFromText('LineString(149 149, 151 151)'));
 INSERT INTO t1 (g) VALUES (GeomFromText('LineString(148 148, 152 152)'));
@@ -295,7 +295,7 @@
   `g` geometry NOT NULL,
   PRIMARY KEY (`fid`),
   SPATIAL KEY `g` (`g`)
-) ENGINE=MARIA AUTO_INCREMENT=101 DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 ROW_FORMAT=PAGE TRANSACTIONAL=0
+) ENGINE=Aria AUTO_INCREMENT=101 DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 ROW_FORMAT=PAGE TRANSACTIONAL=0
 SELECT count(*) FROM t2;
 count(*)
 100

=== modified file 'mysql-test/suite/maria/r/maria-mvcc.result'
--- a/mysql-test/suite/maria/r/maria-mvcc.result	2008-10-01 12:13:39 +0000
+++ b/mysql-test/suite/maria/r/maria-mvcc.result	2010-09-12 16:40:01 +0000
@@ -1,11 +1,11 @@
-set global maria_page_checksum=1;
+set global aria_page_checksum=1;
 drop table if exists t1;
-create table t1 (i int) engine=maria;
+create table t1 (i int) engine=aria;
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `i` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 insert into t1 values (0);
 lock tables t1 write concurrent;
 insert into t1 values (1);
@@ -151,7 +151,7 @@
 count(*)
 8
 drop table t1;
-CREATE TABLE t1 (fid INT NOT NULL AUTO_INCREMENT PRIMARY KEY,    g GEOMETRY NOT NULL,   SPATIAL KEY(g) ) transactional=1 row_format=page engine=maria;
+CREATE TABLE t1 (fid INT NOT NULL AUTO_INCREMENT PRIMARY KEY,    g GEOMETRY NOT NULL,   SPATIAL KEY(g) ) transactional=1 row_format=page engine=aria;
 lock tables t1 write concurrent, t1 as t2 write concurrent;
 insert into t1 (fid,g) values (NULL,GeomFromText('LineString(0 0,1 1)'));
 select fid from t1 as t2;

=== modified file 'mysql-test/suite/maria/r/maria-no-logging.result'
--- a/mysql-test/suite/maria/r/maria-no-logging.result	2008-10-01 12:13:39 +0000
+++ b/mysql-test/suite/maria/r/maria-no-logging.result	2010-09-12 16:40:01 +0000
@@ -1,8 +1,8 @@
-set global maria_log_file_size=4294967295;
+set global aria_log_file_size=4294967295;
 drop database if exists mysqltest;
 create database mysqltest;
 use mysqltest;
-set global maria_checkpoint_interval=0;
+set global aria_checkpoint_interval=0;
 create table t2 (a varchar(100)) engine=myisam;
 insert into t2 select repeat('z',100);
 insert into t2 select * from t2;
@@ -12,40 +12,40 @@
 insert into t2 select * from t2;
 insert into t2 select * from t2;
 * shut down mysqld, removed logs, restarted it
-create table t1 (a varchar(100)) engine=maria transactional=1;
+create table t1 (a varchar(100)) engine=aria transactional=1;
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` varchar(100) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
-show engine maria logs;
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
+show engine aria logs;
 Type	Name	Status
-MARIA	Size        16384 maria_log.00000001	unknown
+Aria	Size        16384 aria_log.00000001	unknown
 insert into t1 values('a');
 insert into t1 select * from t2;
-show engine maria logs;
+show engine aria logs;
 Type	Name	Status
-MARIA	Size        24576 maria_log.00000001	unknown
+Aria	Size        24576 aria_log.00000001	unknown
 * shut down mysqld, removed logs, restarted it
 truncate table t1;
 insert into t1 select * from t2;
-show engine maria logs;
+show engine aria logs;
 Type	Name	Status
-MARIA	Size        16384 maria_log.00000001	unknown
+Aria	Size        16384 aria_log.00000001	unknown
 drop table t1;
 * shut down mysqld, removed logs, restarted it
-create table t1 (a varchar(100)) engine=maria transactional=1;
+create table t1 (a varchar(100)) engine=aria transactional=1;
 insert into t1 values('a');
 create table if not exists t1 select * from t2;
 Warnings:
 Note	1050	Table 't1' already exists
-show engine maria logs;
+show engine aria logs;
 Type	Name	Status
-MARIA	Size        24576 maria_log.00000001	unknown
+Aria	Size        24576 aria_log.00000001	unknown
 * shut down mysqld, removed logs, restarted it
 drop table t1;
-create table t1 engine=maria transactional=1 select * from t2;
-show engine maria logs;
+create table t1 engine=aria transactional=1 select * from t2;
+show engine aria logs;
 Type	Name	Status
-MARIA	Size        16384 maria_log.00000001	unknown
+Aria	Size        16384 aria_log.00000001	unknown
 drop database mysqltest;

=== modified file 'mysql-test/suite/maria/r/maria-page-checksum.result'
--- a/mysql-test/suite/maria/r/maria-page-checksum.result	2008-10-01 12:13:39 +0000
+++ b/mysql-test/suite/maria/r/maria-page-checksum.result	2010-09-12 16:40:01 +0000
@@ -1,940 +1,940 @@
 drop table if exists t1;
-select @@global.maria_page_checksum;
-@@global.maria_page_checksum
+select @@global.aria_page_checksum;
+@@global.aria_page_checksum
 1
 # iteration 1
-set global maria_page_checksum = 0 ;
-create table t1(a int) engine=maria  ;
+set global aria_page_checksum = 0 ;
+create table t1(a int) engine=aria  ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 Page checksums are not used
-set global maria_page_checksum = 0 ;
-alter table t1 engine=maria  ;
+set global aria_page_checksum = 0 ;
+alter table t1 engine=aria  ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 Page checksums are not used
 drop table t1;
 # iteration 2
-set global maria_page_checksum = 0 ;
-create table t1(a int) engine=maria  ;
+set global aria_page_checksum = 0 ;
+create table t1(a int) engine=aria  ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 Page checksums are not used
-set global maria_page_checksum = 0 ;
+set global aria_page_checksum = 0 ;
 alter table t1 PAGE_CHECKSUM=0 ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 Page checksums are not used
 drop table t1;
 # iteration 3
-set global maria_page_checksum = 0 ;
-create table t1(a int) engine=maria  ;
+set global aria_page_checksum = 0 ;
+create table t1(a int) engine=aria  ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 Page checksums are not used
-set global maria_page_checksum = 0 ;
+set global aria_page_checksum = 0 ;
 alter table t1 PAGE_CHECKSUM=1 ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 Page checksums are used
 drop table t1;
 # iteration 4
-set global maria_page_checksum = 0 ;
-create table t1(a int) engine=maria  ;
+set global aria_page_checksum = 0 ;
+create table t1(a int) engine=aria  ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 Page checksums are not used
-set global maria_page_checksum = 1 ;
-alter table t1 engine=maria  ;
+set global aria_page_checksum = 1 ;
+alter table t1 engine=aria  ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 Page checksums are not used
 drop table t1;
 # iteration 5
-set global maria_page_checksum = 0 ;
-create table t1(a int) engine=maria  ;
+set global aria_page_checksum = 0 ;
+create table t1(a int) engine=aria  ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 Page checksums are not used
-set global maria_page_checksum = 1 ;
+set global aria_page_checksum = 1 ;
 alter table t1 PAGE_CHECKSUM=0 ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 Page checksums are not used
 drop table t1;
 # iteration 6
-set global maria_page_checksum = 0 ;
-create table t1(a int) engine=maria  ;
+set global aria_page_checksum = 0 ;
+create table t1(a int) engine=aria  ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 Page checksums are not used
-set global maria_page_checksum = 1 ;
+set global aria_page_checksum = 1 ;
 alter table t1 PAGE_CHECKSUM=1 ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 Page checksums are used
 drop table t1;
 # iteration 7
-set global maria_page_checksum = 0 ;
-create table t1(a int) engine=maria PAGE_CHECKSUM=0 ;
+set global aria_page_checksum = 0 ;
+create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 Page checksums are not used
-set global maria_page_checksum = 0 ;
-alter table t1 engine=maria  ;
+set global aria_page_checksum = 0 ;
+alter table t1 engine=aria  ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 Page checksums are not used
 drop table t1;
 # iteration 8
-set global maria_page_checksum = 0 ;
-create table t1(a int) engine=maria PAGE_CHECKSUM=0 ;
+set global aria_page_checksum = 0 ;
+create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 Page checksums are not used
-set global maria_page_checksum = 0 ;
+set global aria_page_checksum = 0 ;
 alter table t1 PAGE_CHECKSUM=0 ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 Page checksums are not used
 drop table t1;
 # iteration 9
-set global maria_page_checksum = 0 ;
-create table t1(a int) engine=maria PAGE_CHECKSUM=0 ;
+set global aria_page_checksum = 0 ;
+create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 Page checksums are not used
-set global maria_page_checksum = 0 ;
+set global aria_page_checksum = 0 ;
 alter table t1 PAGE_CHECKSUM=1 ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 Page checksums are used
 drop table t1;
 # iteration 10
-set global maria_page_checksum = 0 ;
-create table t1(a int) engine=maria PAGE_CHECKSUM=0 ;
+set global aria_page_checksum = 0 ;
+create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 Page checksums are not used
-set global maria_page_checksum = 1 ;
-alter table t1 engine=maria  ;
+set global aria_page_checksum = 1 ;
+alter table t1 engine=aria  ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 Page checksums are not used
 drop table t1;
 # iteration 11
-set global maria_page_checksum = 0 ;
-create table t1(a int) engine=maria PAGE_CHECKSUM=0 ;
+set global aria_page_checksum = 0 ;
+create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 Page checksums are not used
-set global maria_page_checksum = 1 ;
+set global aria_page_checksum = 1 ;
 alter table t1 PAGE_CHECKSUM=0 ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 Page checksums are not used
 drop table t1;
 # iteration 12
-set global maria_page_checksum = 0 ;
-create table t1(a int) engine=maria PAGE_CHECKSUM=0 ;
+set global aria_page_checksum = 0 ;
+create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 Page checksums are not used
-set global maria_page_checksum = 1 ;
+set global aria_page_checksum = 1 ;
 alter table t1 PAGE_CHECKSUM=1 ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 Page checksums are used
 drop table t1;
 # iteration 13
-set global maria_page_checksum = 0 ;
-create table t1(a int) engine=maria PAGE_CHECKSUM=1 ;
+set global aria_page_checksum = 0 ;
+create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 Page checksums are used
-set global maria_page_checksum = 0 ;
-alter table t1 engine=maria  ;
+set global aria_page_checksum = 0 ;
+alter table t1 engine=aria  ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 Page checksums are used
 drop table t1;
 # iteration 14
-set global maria_page_checksum = 0 ;
-create table t1(a int) engine=maria PAGE_CHECKSUM=1 ;
+set global aria_page_checksum = 0 ;
+create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 Page checksums are used
-set global maria_page_checksum = 0 ;
+set global aria_page_checksum = 0 ;
 alter table t1 PAGE_CHECKSUM=0 ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 Page checksums are not used
 drop table t1;
 # iteration 15
-set global maria_page_checksum = 0 ;
-create table t1(a int) engine=maria PAGE_CHECKSUM=1 ;
+set global aria_page_checksum = 0 ;
+create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 Page checksums are used
-set global maria_page_checksum = 0 ;
+set global aria_page_checksum = 0 ;
 alter table t1 PAGE_CHECKSUM=1 ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 Page checksums are used
 drop table t1;
 # iteration 16
-set global maria_page_checksum = 0 ;
-create table t1(a int) engine=maria PAGE_CHECKSUM=1 ;
+set global aria_page_checksum = 0 ;
+create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 Page checksums are used
-set global maria_page_checksum = 1 ;
-alter table t1 engine=maria  ;
+set global aria_page_checksum = 1 ;
+alter table t1 engine=aria  ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 Page checksums are used
 drop table t1;
 # iteration 17
-set global maria_page_checksum = 0 ;
-create table t1(a int) engine=maria PAGE_CHECKSUM=1 ;
+set global aria_page_checksum = 0 ;
+create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 Page checksums are used
-set global maria_page_checksum = 1 ;
+set global aria_page_checksum = 1 ;
 alter table t1 PAGE_CHECKSUM=0 ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 Page checksums are not used
 drop table t1;
 # iteration 18
-set global maria_page_checksum = 0 ;
-create table t1(a int) engine=maria PAGE_CHECKSUM=1 ;
+set global aria_page_checksum = 0 ;
+create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 Page checksums are used
-set global maria_page_checksum = 1 ;
+set global aria_page_checksum = 1 ;
 alter table t1 PAGE_CHECKSUM=1 ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 Page checksums are used
 drop table t1;
 # iteration 19
-set global maria_page_checksum = 1 ;
-create table t1(a int) engine=maria  ;
+set global aria_page_checksum = 1 ;
+create table t1(a int) engine=aria  ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 Page checksums are used
-set global maria_page_checksum = 0 ;
-alter table t1 engine=maria  ;
+set global aria_page_checksum = 0 ;
+alter table t1 engine=aria  ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 Page checksums are used
 drop table t1;
 # iteration 20
-set global maria_page_checksum = 1 ;
-create table t1(a int) engine=maria  ;
+set global aria_page_checksum = 1 ;
+create table t1(a int) engine=aria  ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 Page checksums are used
-set global maria_page_checksum = 0 ;
+set global aria_page_checksum = 0 ;
 alter table t1 PAGE_CHECKSUM=0 ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 Page checksums are not used
 drop table t1;
 # iteration 21
-set global maria_page_checksum = 1 ;
-create table t1(a int) engine=maria  ;
+set global aria_page_checksum = 1 ;
+create table t1(a int) engine=aria  ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 Page checksums are used
-set global maria_page_checksum = 0 ;
+set global aria_page_checksum = 0 ;
 alter table t1 PAGE_CHECKSUM=1 ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 Page checksums are used
 drop table t1;
 # iteration 22
-set global maria_page_checksum = 1 ;
-create table t1(a int) engine=maria  ;
+set global aria_page_checksum = 1 ;
+create table t1(a int) engine=aria  ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 Page checksums are used
-set global maria_page_checksum = 1 ;
-alter table t1 engine=maria  ;
+set global aria_page_checksum = 1 ;
+alter table t1 engine=aria  ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 Page checksums are used
 drop table t1;
 # iteration 23
-set global maria_page_checksum = 1 ;
-create table t1(a int) engine=maria  ;
+set global aria_page_checksum = 1 ;
+create table t1(a int) engine=aria  ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 Page checksums are used
-set global maria_page_checksum = 1 ;
+set global aria_page_checksum = 1 ;
 alter table t1 PAGE_CHECKSUM=0 ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 Page checksums are not used
 drop table t1;
 # iteration 24
-set global maria_page_checksum = 1 ;
-create table t1(a int) engine=maria  ;
+set global aria_page_checksum = 1 ;
+create table t1(a int) engine=aria  ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 Page checksums are used
-set global maria_page_checksum = 1 ;
+set global aria_page_checksum = 1 ;
 alter table t1 PAGE_CHECKSUM=1 ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 Page checksums are used
 drop table t1;
 # iteration 25
-set global maria_page_checksum = 1 ;
-create table t1(a int) engine=maria PAGE_CHECKSUM=0 ;
+set global aria_page_checksum = 1 ;
+create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 Page checksums are not used
-set global maria_page_checksum = 0 ;
-alter table t1 engine=maria  ;
+set global aria_page_checksum = 0 ;
+alter table t1 engine=aria  ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 Page checksums are not used
 drop table t1;
 # iteration 26
-set global maria_page_checksum = 1 ;
-create table t1(a int) engine=maria PAGE_CHECKSUM=0 ;
+set global aria_page_checksum = 1 ;
+create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 Page checksums are not used
-set global maria_page_checksum = 0 ;
+set global aria_page_checksum = 0 ;
 alter table t1 PAGE_CHECKSUM=0 ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 Page checksums are not used
 drop table t1;
 # iteration 27
-set global maria_page_checksum = 1 ;
-create table t1(a int) engine=maria PAGE_CHECKSUM=0 ;
+set global aria_page_checksum = 1 ;
+create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 Page checksums are not used
-set global maria_page_checksum = 0 ;
+set global aria_page_checksum = 0 ;
 alter table t1 PAGE_CHECKSUM=1 ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 Page checksums are used
 drop table t1;
 # iteration 28
-set global maria_page_checksum = 1 ;
-create table t1(a int) engine=maria PAGE_CHECKSUM=0 ;
+set global aria_page_checksum = 1 ;
+create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 Page checksums are not used
-set global maria_page_checksum = 1 ;
-alter table t1 engine=maria  ;
+set global aria_page_checksum = 1 ;
+alter table t1 engine=aria  ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 Page checksums are not used
 drop table t1;
 # iteration 29
-set global maria_page_checksum = 1 ;
-create table t1(a int) engine=maria PAGE_CHECKSUM=0 ;
+set global aria_page_checksum = 1 ;
+create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 Page checksums are not used
-set global maria_page_checksum = 1 ;
+set global aria_page_checksum = 1 ;
 alter table t1 PAGE_CHECKSUM=0 ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 Page checksums are not used
 drop table t1;
 # iteration 30
-set global maria_page_checksum = 1 ;
-create table t1(a int) engine=maria PAGE_CHECKSUM=0 ;
+set global aria_page_checksum = 1 ;
+create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 Page checksums are not used
-set global maria_page_checksum = 1 ;
+set global aria_page_checksum = 1 ;
 alter table t1 PAGE_CHECKSUM=1 ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 Page checksums are used
 drop table t1;
 # iteration 31
-set global maria_page_checksum = 1 ;
-create table t1(a int) engine=maria PAGE_CHECKSUM=1 ;
+set global aria_page_checksum = 1 ;
+create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 Page checksums are used
-set global maria_page_checksum = 0 ;
-alter table t1 engine=maria  ;
+set global aria_page_checksum = 0 ;
+alter table t1 engine=aria  ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 Page checksums are used
 drop table t1;
 # iteration 32
-set global maria_page_checksum = 1 ;
-create table t1(a int) engine=maria PAGE_CHECKSUM=1 ;
+set global aria_page_checksum = 1 ;
+create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 Page checksums are used
-set global maria_page_checksum = 0 ;
+set global aria_page_checksum = 0 ;
 alter table t1 PAGE_CHECKSUM=0 ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 Page checksums are not used
 drop table t1;
 # iteration 33
-set global maria_page_checksum = 1 ;
-create table t1(a int) engine=maria PAGE_CHECKSUM=1 ;
+set global aria_page_checksum = 1 ;
+create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 Page checksums are used
-set global maria_page_checksum = 0 ;
+set global aria_page_checksum = 0 ;
 alter table t1 PAGE_CHECKSUM=1 ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 Page checksums are used
 drop table t1;
 # iteration 34
-set global maria_page_checksum = 1 ;
-create table t1(a int) engine=maria PAGE_CHECKSUM=1 ;
+set global aria_page_checksum = 1 ;
+create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 Page checksums are used
-set global maria_page_checksum = 1 ;
-alter table t1 engine=maria  ;
+set global aria_page_checksum = 1 ;
+alter table t1 engine=aria  ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 Page checksums are used
 drop table t1;
 # iteration 35
-set global maria_page_checksum = 1 ;
-create table t1(a int) engine=maria PAGE_CHECKSUM=1 ;
+set global aria_page_checksum = 1 ;
+create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 Page checksums are used
-set global maria_page_checksum = 1 ;
+set global aria_page_checksum = 1 ;
 alter table t1 PAGE_CHECKSUM=0 ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 Page checksums are not used
 drop table t1;
 # iteration 36
-set global maria_page_checksum = 1 ;
-create table t1(a int) engine=maria PAGE_CHECKSUM=1 ;
+set global aria_page_checksum = 1 ;
+create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 Page checksums are used
-set global maria_page_checksum = 1 ;
+set global aria_page_checksum = 1 ;
 alter table t1 PAGE_CHECKSUM=1 ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 Page checksums are used
 drop table t1;
 # iteration 1
-create table t1(a int) engine=maria  ;
+create table t1(a int) engine=aria  ;
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 Crashsafe:           yes
 alter table t1 modify a bigint ;
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` bigint(20) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 Crashsafe:           yes
 drop table t1;
 # iteration 2
-create table t1(a int) engine=maria  ;
+create table t1(a int) engine=aria  ;
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 Crashsafe:           yes
 alter table t1  transactional=0 ;
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
 Crashsafe:           no
 drop table t1;
 # iteration 3
-create table t1(a int) engine=maria  ;
+create table t1(a int) engine=aria  ;
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 Crashsafe:           yes
 alter table t1  transactional=1 ;
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
 Crashsafe:           yes
 drop table t1;
 # iteration 4
-create table t1(a int) engine=maria  ;
+create table t1(a int) engine=aria  ;
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 Crashsafe:           yes
-alter table t1 engine=maria  ;
+alter table t1 engine=aria  ;
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 Crashsafe:           yes
 drop table t1;
 # iteration 5
-create table t1(a int) engine=maria  ;
+create table t1(a int) engine=aria  ;
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 Crashsafe:           yes
-alter table t1 engine=maria transactional=0 ;
+alter table t1 engine=aria transactional=0 ;
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
 Crashsafe:           no
 drop table t1;
 # iteration 6
-create table t1(a int) engine=maria  ;
+create table t1(a int) engine=aria  ;
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 Crashsafe:           yes
-alter table t1 engine=maria transactional=1 ;
+alter table t1 engine=aria transactional=1 ;
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
 Crashsafe:           yes
 drop table t1;
 # iteration 7
-create table t1(a int) engine=maria transactional=0 ;
+create table t1(a int) engine=aria transactional=0 ;
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
 Crashsafe:           no
 alter table t1 modify a bigint ;
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` bigint(20) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
 Crashsafe:           no
 drop table t1;
 # iteration 8
-create table t1(a int) engine=maria transactional=0 ;
+create table t1(a int) engine=aria transactional=0 ;
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
 Crashsafe:           no
 alter table t1  transactional=0 ;
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
 Crashsafe:           no
 drop table t1;
 # iteration 9
-create table t1(a int) engine=maria transactional=0 ;
+create table t1(a int) engine=aria transactional=0 ;
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
 Crashsafe:           no
 alter table t1  transactional=1 ;
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
 Crashsafe:           yes
 drop table t1;
 # iteration 10
-create table t1(a int) engine=maria transactional=0 ;
+create table t1(a int) engine=aria transactional=0 ;
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
 Crashsafe:           no
-alter table t1 engine=maria  ;
+alter table t1 engine=aria  ;
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
 Crashsafe:           no
 drop table t1;
 # iteration 11
-create table t1(a int) engine=maria transactional=0 ;
+create table t1(a int) engine=aria transactional=0 ;
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
 Crashsafe:           no
-alter table t1 engine=maria transactional=0 ;
+alter table t1 engine=aria transactional=0 ;
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
 Crashsafe:           no
 drop table t1;
 # iteration 12
-create table t1(a int) engine=maria transactional=0 ;
+create table t1(a int) engine=aria transactional=0 ;
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
 Crashsafe:           no
-alter table t1 engine=maria transactional=1 ;
+alter table t1 engine=aria transactional=1 ;
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
 Crashsafe:           yes
 drop table t1;
 # iteration 13
-create table t1(a int) engine=maria transactional=1 ;
+create table t1(a int) engine=aria transactional=1 ;
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
 Crashsafe:           yes
 alter table t1 modify a bigint ;
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` bigint(20) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
 Crashsafe:           yes
 drop table t1;
 # iteration 14
-create table t1(a int) engine=maria transactional=1 ;
+create table t1(a int) engine=aria transactional=1 ;
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
 Crashsafe:           yes
 alter table t1  transactional=0 ;
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
 Crashsafe:           no
 drop table t1;
 # iteration 15
-create table t1(a int) engine=maria transactional=1 ;
+create table t1(a int) engine=aria transactional=1 ;
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
 Crashsafe:           yes
 alter table t1  transactional=1 ;
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
 Crashsafe:           yes
 drop table t1;
 # iteration 16
-create table t1(a int) engine=maria transactional=1 ;
+create table t1(a int) engine=aria transactional=1 ;
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
 Crashsafe:           yes
-alter table t1 engine=maria  ;
+alter table t1 engine=aria  ;
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
 Crashsafe:           yes
 drop table t1;
 # iteration 17
-create table t1(a int) engine=maria transactional=1 ;
+create table t1(a int) engine=aria transactional=1 ;
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
 Crashsafe:           yes
-alter table t1 engine=maria transactional=0 ;
+alter table t1 engine=aria transactional=0 ;
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
 Crashsafe:           no
 drop table t1;
 # iteration 18
-create table t1(a int) engine=maria transactional=1 ;
+create table t1(a int) engine=aria transactional=1 ;
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
 Crashsafe:           yes
-alter table t1 engine=maria transactional=1 ;
+alter table t1 engine=aria transactional=1 ;
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
 Crashsafe:           yes
 drop table t1;

=== modified file 'mysql-test/suite/maria/r/maria-partitioning.result'
--- a/mysql-test/suite/maria/r/maria-partitioning.result	2008-12-22 00:19:43 +0000
+++ b/mysql-test/suite/maria/r/maria-partitioning.result	2010-09-12 16:40:01 +0000
@@ -1,11 +1,11 @@
-set global storage_engine=maria;
-set session storage_engine=maria;
+set global storage_engine=aria;
+set session storage_engine=aria;
 DROP TABLE if exists t1,t2;
 Warnings:
 Note	1051	Unknown table 't1'
 Note	1051	Unknown table 't2'
-create table t2(a blob) engine=maria;
-create table t1(a int primary key) engine=maria;
+create table t2(a blob) engine=aria;
+create table t1(a int primary key) engine=aria;
 insert into t2 values ('foo'),('bar');
 select * from t2 left join t1 on (t2.a=t1.a) where t2.a='bbb';
 a	a
@@ -16,8 +16,8 @@
 select * from t2 left join t1 on (t2.a=t1.a) where t2.a='bbb';
 a	a
 drop table t1,t2;
-create table t2(a blob) engine= maria;
-create table t1(a int primary key) engine= maria PARTITION BY HASH (a) PARTITIONS 2;
+create table t2(a blob) engine= aria;
+create table t1(a int primary key) engine= aria PARTITION BY HASH (a) PARTITIONS 2;
 insert into t2 values ('foo'),('bar');
 select * from t2 left join t1 on (t2.a=t1.a) where t2.a='bbb';
 a	a

=== modified file 'mysql-test/suite/maria/r/maria-preload.result'
--- a/mysql-test/suite/maria/r/maria-preload.result	2009-04-01 09:34:52 +0000
+++ b/mysql-test/suite/maria/r/maria-preload.result	2010-09-12 16:40:01 +0000
@@ -1,20 +1,20 @@
 drop table if exists t1, t2;
-set global maria_checkpoint_interval=0;
+set global aria_checkpoint_interval=0;
 create temporary table initial
 select variable_name,variable_value from
-information_schema.global_status where variable_name like "Maria_pagecache_reads";
+information_schema.global_status where variable_name like "Aria_pagecache_reads";
 create table t1 (
 a int not null auto_increment,
 b char(16) not null,
 primary key (a),
 key (b)
-) engine=maria row_format=dynamic;
+) engine=aria row_format=dynamic;
 create table t2(
 a int not null auto_increment,
 b char(16) not null,
 primary key (a),
 key (b)
-) engine=maria row_format=dynamic;
+) engine=aria row_format=dynamic;
 insert into t1(b) values 
 ('test0'),
 ('test1'),
@@ -50,21 +50,21 @@
 20672
 flush tables;
 flush status;
-select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Maria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;
-variable_name	g.variable_value-i.variable_value
-MARIA_PAGECACHE_READS	2
-select count(*) from t1 where b = 'test1';
-count(*)
-4181
-select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Maria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;
-variable_name	g.variable_value-i.variable_value
-MARIA_PAGECACHE_READS	9
-select count(*) from t1 where b = 'test1';
-count(*)
-4181
-select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Maria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;
-variable_name	g.variable_value-i.variable_value
-MARIA_PAGECACHE_READS	9
+select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Aria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;
+variable_name	g.variable_value-i.variable_value
+ARIA_PAGECACHE_READS	2
+select count(*) from t1 where b = 'test1';
+count(*)
+4181
+select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Aria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;
+variable_name	g.variable_value-i.variable_value
+ARIA_PAGECACHE_READS	9
+select count(*) from t1 where b = 'test1';
+count(*)
+4181
+select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Aria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;
+variable_name	g.variable_value-i.variable_value
+ARIA_PAGECACHE_READS	9
 flush tables;
 flush status;
 select @@preload_buffer_size;
@@ -73,20 +73,20 @@
 load index into cache t1;
 Table	Op	Msg_type	Msg_text
 test.t1	preload_keys	status	OK
-select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Maria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;
+select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Aria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;
 variable_name	g.variable_value-i.variable_value
-MARIA_PAGECACHE_READS	80
+ARIA_PAGECACHE_READS	80
 select count(*) from t1 where b = 'test1';
 count(*)
 4181
-select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Maria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;
+select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Aria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;
 variable_name	g.variable_value-i.variable_value
-MARIA_PAGECACHE_READS	80
+ARIA_PAGECACHE_READS	80
 flush tables;
 flush status;
-select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Maria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;
+select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Aria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;
 variable_name	g.variable_value-i.variable_value
-MARIA_PAGECACHE_READS	80
+ARIA_PAGECACHE_READS	80
 set session preload_buffer_size=256*1024;
 select @@preload_buffer_size;
 @@preload_buffer_size
@@ -94,20 +94,20 @@
 load index into cache t1 ignore leaves;
 Table	Op	Msg_type	Msg_text
 test.t1	preload_keys	status	OK
-select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Maria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;
+select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Aria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;
 variable_name	g.variable_value-i.variable_value
-MARIA_PAGECACHE_READS	151
+ARIA_PAGECACHE_READS	151
 select count(*) from t1 where b = 'test1';
 count(*)
 4181
-select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Maria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;
+select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Aria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;
 variable_name	g.variable_value-i.variable_value
-MARIA_PAGECACHE_READS	157
+ARIA_PAGECACHE_READS	157
 flush tables;
 flush status;
-select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Maria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;
+select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Aria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;
 variable_name	g.variable_value-i.variable_value
-MARIA_PAGECACHE_READS	157
+ARIA_PAGECACHE_READS	157
 set session preload_buffer_size=1*1024;
 select @@preload_buffer_size;
 @@preload_buffer_size
@@ -116,45 +116,45 @@
 Table	Op	Msg_type	Msg_text
 test.t1	preload_keys	status	OK
 test.t2	preload_keys	status	OK
-select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Maria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;
+select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Aria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;
 variable_name	g.variable_value-i.variable_value
-MARIA_PAGECACHE_READS	271
+ARIA_PAGECACHE_READS	271
 select count(*) from t1 where b = 'test1';
 count(*)
 4181
 select count(*) from t2 where b = 'test1';
 count(*)
 2584
-select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Maria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;
+select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Aria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;
 variable_name	g.variable_value-i.variable_value
-MARIA_PAGECACHE_READS	274
+ARIA_PAGECACHE_READS	274
 flush tables;
 flush status;
-select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Maria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;
+select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Aria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;
 variable_name	g.variable_value-i.variable_value
-MARIA_PAGECACHE_READS	274
+ARIA_PAGECACHE_READS	274
 load index into cache t3, t2 key (primary,b) ;
 Table	Op	Msg_type	Msg_text
 test.t3	preload_keys	Error	Table 'test.t3' doesn't exist
 test.t3	preload_keys	status	Operation failed
 test.t2	preload_keys	status	OK
-select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Maria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;
+select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Aria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;
 variable_name	g.variable_value-i.variable_value
-MARIA_PAGECACHE_READS	317
+ARIA_PAGECACHE_READS	317
 flush tables;
 flush status;
-select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Maria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;
+select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Aria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;
 variable_name	g.variable_value-i.variable_value
-MARIA_PAGECACHE_READS	317
+ARIA_PAGECACHE_READS	317
 load index into cache t3 key (b), t2 key (c) ;
 Table	Op	Msg_type	Msg_text
 test.t3	preload_keys	Error	Table 'test.t3' doesn't exist
 test.t3	preload_keys	status	Operation failed
 test.t2	preload_keys	Error	Key 'c' doesn't exist in table 't2'
 test.t2	preload_keys	status	Operation failed
-select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Maria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;
+select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Aria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;
 variable_name	g.variable_value-i.variable_value
-MARIA_PAGECACHE_READS	317
+ARIA_PAGECACHE_READS	317
 drop table t1, t2;
 drop temporary table initial;
 show status like "key_read%";

=== modified file 'mysql-test/suite/maria/r/maria-purge.result'
--- a/mysql-test/suite/maria/r/maria-purge.result	2009-02-19 09:01:25 +0000
+++ b/mysql-test/suite/maria/r/maria-purge.result	2010-09-12 16:40:01 +0000
@@ -1,7 +1,7 @@
 * shut down mysqld, removed logs, restarted it
-set global storage_engine=maria;
-set session storage_engine=maria;
-set global maria_log_file_size=4294967295;
+set global storage_engine=aria;
+set session storage_engine=aria;
+set global aria_log_file_size=4294967295;
 drop table if exists t1,t2;
 SET SQL_WARNINGS=1;
 CREATE TABLE t1 (
@@ -34,60 +34,60 @@
 insert into t1 select * from t2;
 insert into t2 select * from t1;
 insert into t1 select * from t2;
-set global maria_log_file_size=16777216;
-set global maria_checkpoint_interval=30;
-SHOW ENGINE maria logs;
+set global aria_log_file_size=16777216;
+set global aria_checkpoint_interval=30;
+SHOW ENGINE aria logs;
 Type	Name	Status
-MARIA	maria_log.00000002	in use
+Aria	aria_log.00000002	in use
 insert into t2 select * from t1;
 insert into t1 select * from t2;
-set global maria_checkpoint_interval=30;
-SHOW ENGINE maria logs;
+set global aria_checkpoint_interval=30;
+SHOW ENGINE aria logs;
 Type	Name	Status
-MARIA	maria_log.00000004	in use
-set global maria_log_file_size=16777216;
-select @@global.maria_log_file_size;
-@@global.maria_log_file_size
+Aria	aria_log.00000004	in use
+set global aria_log_file_size=16777216;
+select @@global.aria_log_file_size;
+@@global.aria_log_file_size
 16777216
-set global maria_checkpoint_interval=30;
-SHOW ENGINE maria logs;
+set global aria_checkpoint_interval=30;
+SHOW ENGINE aria logs;
 Type	Name	Status
-MARIA	maria_log.00000004	in use
-set global maria_log_file_size=8388608;
-select @@global.maria_log_file_size;
-@@global.maria_log_file_size
+Aria	aria_log.00000004	in use
+set global aria_log_file_size=8388608;
+select @@global.aria_log_file_size;
+@@global.aria_log_file_size
 8388608
-set global maria_log_purge_type=at_flush;
-insert into t1 select * from t2;
-set global maria_checkpoint_interval=30;
-SHOW ENGINE maria logs;
-Type	Name	Status
-MARIA	maria_log.00000004	free
-MARIA	maria_log.00000005	free
-MARIA	maria_log.00000006	free
-MARIA	maria_log.00000007	free
-MARIA	maria_log.00000008	in use
-flush logs;
-SHOW ENGINE maria logs;
-Type	Name	Status
-MARIA	maria_log.00000008	in use
-set global maria_log_file_size=16777216;
-set global maria_log_purge_type=external;
-insert into t1 select * from t2;
-set global maria_checkpoint_interval=30;
-SHOW ENGINE maria logs;
-Type	Name	Status
-MARIA	maria_log.00000008	free
-MARIA	maria_log.00000009	in use
-flush logs;
-SHOW ENGINE maria logs;
-Type	Name	Status
-MARIA	maria_log.00000008	free
-MARIA	maria_log.00000009	in use
-set global maria_log_purge_type=immediate;
-insert into t1 select * from t2;
-set global maria_checkpoint_interval=30;
-SHOW ENGINE maria logs;
-Type	Name	Status
-MARIA	maria_log.00000011	in use
+set global aria_log_purge_type=at_flush;
+insert into t1 select * from t2;
+set global aria_checkpoint_interval=30;
+SHOW ENGINE aria logs;
+Type	Name	Status
+Aria	aria_log.00000004	free
+Aria	aria_log.00000005	free
+Aria	aria_log.00000006	free
+Aria	aria_log.00000007	free
+Aria	aria_log.00000008	in use
+flush logs;
+SHOW ENGINE aria logs;
+Type	Name	Status
+Aria	aria_log.00000008	in use
+set global aria_log_file_size=16777216;
+set global aria_log_purge_type=external;
+insert into t1 select * from t2;
+set global aria_checkpoint_interval=30;
+SHOW ENGINE aria logs;
+Type	Name	Status
+Aria	aria_log.00000008	free
+Aria	aria_log.00000009	in use
+flush logs;
+SHOW ENGINE aria logs;
+Type	Name	Status
+Aria	aria_log.00000008	free
+Aria	aria_log.00000009	in use
+set global aria_log_purge_type=immediate;
+insert into t1 select * from t2;
+set global aria_checkpoint_interval=30;
+SHOW ENGINE aria logs;
+Type	Name	Status
+Aria	aria_log.00000011	in use
 drop table t1, t2;

=== modified file 'mysql-test/suite/maria/r/maria-recover.result'
--- a/mysql-test/suite/maria/r/maria-recover.result	2010-06-13 22:13:32 +0000
+++ b/mysql-test/suite/maria/r/maria-recover.result	2010-09-12 16:40:01 +0000
@@ -1,22 +1,22 @@
-select @@global.maria_recover;
-@@global.maria_recover
+select @@global.aria_recover;
+@@global.aria_recover
 BACKUP
-set global maria_recover=off;
-select @@global.maria_recover;
-@@global.maria_recover
+set global aria_recover=off;
+select @@global.aria_recover;
+@@global.aria_recover
 OFF
-set global maria_recover=default;
-select @@global.maria_recover;
-@@global.maria_recover
+set global aria_recover=default;
+select @@global.aria_recover;
+@@global.aria_recover
 NORMAL
-set global maria_recover=normal;
-select @@global.maria_recover;
-@@global.maria_recover
+set global aria_recover=normal;
+select @@global.aria_recover;
+@@global.aria_recover
 NORMAL
 drop database if exists mysqltest;
 create database mysqltest;
 use mysqltest;
-create table t1 (a varchar(1000), index(a)) engine=maria;
+create table t1 (a varchar(1000), index(a)) engine=aria;
 insert into t1 values("ThursdayMorningsMarket");
 flush table t1;
 insert into t1 select concat(a,'b') from t1 limit 1;
@@ -32,4 +32,4 @@
 a
 ThursdayMorningsMarket
 drop database mysqltest;
-set global maria_recover=backup;
+set global aria_recover=backup;

=== modified file 'mysql-test/suite/maria/r/maria-recovery-big.result'
--- a/mysql-test/suite/maria/r/maria-recovery-big.result	2009-01-15 14:29:14 +0000
+++ b/mysql-test/suite/maria/r/maria-recovery-big.result	2010-09-12 16:40:01 +0000
@@ -1,10 +1,10 @@
-set global maria_log_file_size=4294967295;
+set global aria_log_file_size=4294967295;
 drop database if exists mysqltest;
 create database mysqltest;
 use mysqltest;
 * TEST of recovery with blobs
 * shut down mysqld, removed logs, restarted it
-create table t1 (a int, b longtext) engine=maria table_checksum=1;
+create table t1 (a int, b longtext) engine=aria table_checksum=1;
 * copied t1 for feeding_recovery
 insert into t1 values (1,"123456789012345678901234567890"),(2,"09876543210987654321");
 flush table t1;
@@ -62,7 +62,7 @@
 2	5
 SET SESSION debug="+d,maria_flush_whole_log,maria_crash";
 * crashing mysqld intentionally
-set global maria_checkpoint_interval=1;
+set global aria_checkpoint_interval=1;
 ERROR HY000: Lost connection to MySQL server during query
 * copied t1 back for feeding_recovery
 * recovery happens

=== modified file 'mysql-test/suite/maria/r/maria-recovery-bitmap.result'
--- a/mysql-test/suite/maria/r/maria-recovery-bitmap.result	2008-10-01 12:13:39 +0000
+++ b/mysql-test/suite/maria/r/maria-recovery-bitmap.result	2010-09-12 16:40:01 +0000
@@ -2,7 +2,7 @@
 create database mysqltest;
 use mysqltest;
 * shut down mysqld, removed logs, restarted it
-create table t1 (a varchar(10000)) engine=maria;
+create table t1 (a varchar(10000)) engine=aria;
 * TEST of over-allocated bitmap not flushed by checkpoint
 insert into t1 values ("bbbbbbb");
 flush table t1;
@@ -11,10 +11,10 @@
 delete from t1 limit 1;
 set session debug="+d,info,enter,exit,maria_over_alloc_bitmap";
 insert into t1 values ("aaaaaaaaa");
-set global maria_checkpoint_interval=1;
+set global aria_checkpoint_interval=1;
 SET SESSION debug="+d,maria_crash";
 * crashing mysqld intentionally
-set global maria_checkpoint_interval=1;
+set global aria_checkpoint_interval=1;
 ERROR HY000: Lost connection to MySQL server during query
 * recovery happens
 check table t1 extended;
@@ -31,7 +31,7 @@
 insert into t1 values (REPEAT('a', 6000));
 SET SESSION debug="+d,maria_flush_bitmap,maria_crash";
 * crashing mysqld intentionally
-set global maria_checkpoint_interval=1;
+set global aria_checkpoint_interval=1;
 ERROR HY000: Lost connection to MySQL server during query
 * recovery happens
 check table t1 extended;

=== modified file 'mysql-test/suite/maria/r/maria-recovery-rtree-ft.result'
--- a/mysql-test/suite/maria/r/maria-recovery-rtree-ft.result	2009-02-19 09:01:25 +0000
+++ b/mysql-test/suite/maria/r/maria-recovery-rtree-ft.result	2010-09-12 16:40:01 +0000
@@ -1,4 +1,4 @@
-set global maria_log_file_size=4294967295;
+set global aria_log_file_size=4294967295;
 drop database if exists mysqltest;
 create database mysqltest;
 use mysqltest;
@@ -8,12 +8,12 @@
 kind ENUM('po', 'pp', 'rr', 'dr', 'rd', 'ts', 'cl') NOT NULL DEFAULT 'po',
 name VARCHAR(32)
 ,SPATIAL key (line)
-) transactional=1 row_format=page engine=maria;
+) transactional=1 row_format=page engine=aria;
 SHOW INDEX FROM t1;
 Table	Non_unique	Key_name	Seq_in_index	Column_name	Collation	Cardinality	Sub_part	Packed	Null	Index_type	Comment
 t1	1	line	1	line	A	NULL	32	NULL		SPATIAL	
 CREATE TABLE t2 (a VARCHAR(200), b TEXT, FULLTEXT (a,b)
-) transactional=1 row_format=page engine=maria;
+) transactional=1 row_format=page engine=aria;
 SHOW INDEX FROM t2;
 Table	Non_unique	Key_name	Seq_in_index	Column_name	Collation	Cardinality	Sub_part	Packed	Null	Index_type	Comment
 t2	1	a	1	a	NULL	NULL	NULL	NULL	YES	FULLTEXT	
@@ -27,7 +27,7 @@
 * copied t1 for comparison
 SET SESSION debug="+d,maria_flush_whole_log,maria_crash";
 * crashing mysqld intentionally
-set global maria_checkpoint_interval=1;
+set global aria_checkpoint_interval=1;
 ERROR HY000: Lost connection to MySQL server during query
 * copied t2 back for feeding_recovery
 * copied t1 back for feeding_recovery
@@ -53,7 +53,7 @@
 lock tables t1 write, t2 write;
 SET SESSION debug="+d,maria_crash";
 * crashing mysqld intentionally
-set global maria_checkpoint_interval=1;
+set global aria_checkpoint_interval=1;
 ERROR HY000: Lost connection to MySQL server during query
 * recovery happens
 check table t2 extended;
@@ -76,7 +76,7 @@
 lock tables t1 write, t2 write;
 SET SESSION debug="+d,maria_flush_whole_page_cache,maria_crash";
 * crashing mysqld intentionally
-set global maria_checkpoint_interval=1;
+set global aria_checkpoint_interval=1;
 ERROR HY000: Lost connection to MySQL server during query
 * recovery happens
 check table t2 extended;
@@ -99,7 +99,7 @@
 lock tables t1 write, t2 write;
 SET SESSION debug="+d,maria_flush_states,maria_flush_whole_log,maria_crash";
 * crashing mysqld intentionally
-set global maria_checkpoint_interval=1;
+set global aria_checkpoint_interval=1;
 ERROR HY000: Lost connection to MySQL server during query
 * recovery happens
 check table t2 extended;
@@ -122,7 +122,7 @@
 lock tables t1 write, t2 write;
 SET SESSION debug="+d,maria_flush_whole_log,maria_crash";
 * crashing mysqld intentionally
-set global maria_checkpoint_interval=1;
+set global aria_checkpoint_interval=1;
 ERROR HY000: Lost connection to MySQL server during query
 * recovery happens
 check table t2 extended;
@@ -140,7 +140,7 @@
 use mysqltest;
 SET SESSION debug="+d,maria_flush_whole_log,maria_crash";
 * crashing mysqld intentionally
-set global maria_checkpoint_interval=1;
+set global aria_checkpoint_interval=1;
 ERROR HY000: Lost connection to MySQL server during query
 * recovery happens
 check table t2 extended;

=== modified file 'mysql-test/suite/maria/r/maria-recovery.result'
--- a/mysql-test/suite/maria/r/maria-recovery.result	2008-10-01 12:13:39 +0000
+++ b/mysql-test/suite/maria/r/maria-recovery.result	2010-09-12 16:40:01 +0000
@@ -1,9 +1,9 @@
-set global maria_log_file_size=4294967295;
+set global aria_log_file_size=4294967295;
 drop database if exists mysqltest;
 create database mysqltest;
 use mysqltest;
 * shut down mysqld, removed logs, restarted it
-create table t1 (a varchar(1000)) engine=maria;
+create table t1 (a varchar(1000)) engine=aria;
 * TEST of REDO: see if recovery can reconstruct if we give it an old table
 * copied t1 for feeding_recovery
 insert into t1 values ("00000000");
@@ -11,7 +11,7 @@
 * copied t1 for comparison
 SET SESSION debug="+d,maria_flush_whole_log,maria_crash";
 * crashing mysqld intentionally
-set global maria_checkpoint_interval=1;
+set global aria_checkpoint_interval=1;
 ERROR HY000: Lost connection to MySQL server during query
 * copied t1 back for feeding_recovery
 * recovery happens
@@ -34,7 +34,7 @@
 insert into t1 values ("aaaaaaaaa");
 SET SESSION debug="+d,maria_crash";
 * crashing mysqld intentionally
-set global maria_checkpoint_interval=1;
+set global aria_checkpoint_interval=1;
 ERROR HY000: Lost connection to MySQL server during query
 * recovery happens
 check table t1 extended;
@@ -55,7 +55,7 @@
 insert into t1 values ("aaaaaaaaa");
 SET SESSION debug="+d,maria_flush_whole_page_cache,maria_crash";
 * crashing mysqld intentionally
-set global maria_checkpoint_interval=1;
+set global aria_checkpoint_interval=1;
 ERROR HY000: Lost connection to MySQL server during query
 * recovery happens
 check table t1 extended;
@@ -77,7 +77,7 @@
 insert into t1 values ("aaaaaaaaa");
 SET SESSION debug="+d,maria_flush_states,maria_flush_whole_log,maria_crash";
 * crashing mysqld intentionally
-set global maria_checkpoint_interval=1;
+set global aria_checkpoint_interval=1;
 ERROR HY000: Lost connection to MySQL server during query
 * recovery happens
 check table t1 extended;
@@ -100,7 +100,7 @@
 insert into t1 values ("aaaaaaaaa");
 SET SESSION debug="+d,maria_flush_whole_log,maria_crash";
 * crashing mysqld intentionally
-set global maria_checkpoint_interval=1;
+set global aria_checkpoint_interval=1;
 ERROR HY000: Lost connection to MySQL server during query
 * recovery happens
 check table t1 extended;
@@ -124,7 +124,7 @@
 i int,
 b blob default NULL,
 c varchar(6000) default NULL
-) ENGINE=MARIA CHECKSUM=1;
+) ENGINE=ARIA CHECKSUM=1;
 * copied t1 for feeding_recovery
 INSERT INTO t1 VALUES (1, REPEAT('a', 5000), REPEAT('b', 5000));
 UPDATE t1 SET i=3, b=CONCAT(b,'c') WHERE i=1;
@@ -135,7 +135,7 @@
 * copied t1 for comparison
 SET SESSION debug="+d,maria_flush_whole_log,maria_crash";
 * crashing mysqld intentionally
-set global maria_checkpoint_interval=1;
+set global aria_checkpoint_interval=1;
 ERROR HY000: Lost connection to MySQL server during query
 * copied t1 back for feeding_recovery
 * recovery happens
@@ -156,7 +156,7 @@
 i int auto_increment primary key,
 c varchar(6),
 key(c)
-) ENGINE=MARIA;
+) ENGINE=ARIA;
 insert into t1 values(null,"b");
 * copied t1 for feeding_recovery
 insert into t1 values(null,"a"), (null,"c"), (null,"d");
@@ -165,7 +165,7 @@
 * copied t1 for comparison
 SET SESSION debug="+d,maria_flush_whole_log,maria_crash";
 * crashing mysqld intentionally
-set global maria_checkpoint_interval=1;
+set global aria_checkpoint_interval=1;
 ERROR HY000: Lost connection to MySQL server during query
 * copied t1 back for feeding_recovery
 * recovery happens
@@ -183,7 +183,7 @@
   `c` varchar(6) DEFAULT NULL,
   PRIMARY KEY (`i`),
   KEY `c` (`c`)
-) ENGINE=MARIA AUTO_INCREMENT=5 DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria AUTO_INCREMENT=5 DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 * TEST of UPDATE vs state.auto_increment
 * copied t1 for feeding_recovery
 update t1 set i=15 where c="a";
@@ -191,7 +191,7 @@
 * copied t1 for comparison
 SET SESSION debug="+d,maria_flush_whole_log,maria_crash";
 * crashing mysqld intentionally
-set global maria_checkpoint_interval=1;
+set global aria_checkpoint_interval=1;
 ERROR HY000: Lost connection to MySQL server during query
 * copied t1 back for feeding_recovery
 * recovery happens
@@ -209,7 +209,7 @@
   `c` varchar(6) DEFAULT NULL,
   PRIMARY KEY (`i`),
   KEY `c` (`c`)
-) ENGINE=MARIA AUTO_INCREMENT=16 DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria AUTO_INCREMENT=16 DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 * TEST of INSERT's rollback vs state.auto_increment
 flush table t1;
 * copied t1 for comparison
@@ -217,7 +217,7 @@
 insert into t1 values(null, "e");
 SET SESSION debug="+d,maria_flush_whole_log,maria_crash";
 * crashing mysqld intentionally
-set global maria_checkpoint_interval=1;
+set global aria_checkpoint_interval=1;
 ERROR HY000: Lost connection to MySQL server during query
 * recovery happens
 check table t1 extended;
@@ -234,7 +234,7 @@
   `c` varchar(6) DEFAULT NULL,
   PRIMARY KEY (`i`),
   KEY `c` (`c`)
-) ENGINE=MARIA AUTO_INCREMENT=17 DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria AUTO_INCREMENT=17 DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 insert into t1 values(null, "f");
 drop table t1;
 drop database mysqltest_for_feeding_recovery;

=== modified file 'mysql-test/suite/maria/r/maria-recovery2.result'
--- a/mysql-test/suite/maria/r/maria-recovery2.result	2010-07-30 07:45:27 +0000
+++ b/mysql-test/suite/maria/r/maria-recovery2.result	2010-09-12 16:40:01 +0000
@@ -1,13 +1,13 @@
-call mtr.add_suppression("File '.*maria_log.000.*' not found \\(Errcode: 2\\)");
-call mtr.add_suppression("Table '.\/mysqltest\/t_corrupted1' is crashed, skipping it. Please repair it with maria_chk -r");
-set global maria_log_file_size=4294967295;
+call mtr.add_suppression("File '.*aria_log.000.*' not found \\(Errcode: 2\\)");
+call mtr.add_suppression("Table '.\/mysqltest\/t_corrupted1' is crashed, skipping it. Please repair it with aria_chk -r");
+set global aria_log_file_size=4294967295;
 drop database if exists mysqltest;
 create database mysqltest;
 use mysqltest;
 * TEST of removing logs manually
 * shut down mysqld, removed logs, restarted it
 * TEST of UNDO_ROW_DELETE preserving rowid
-create table t1(a int) engine=maria;
+create table t1(a int) engine=aria;
 insert into t1 values(1),(2);
 flush table t1;
 * copied t1 for comparison
@@ -16,7 +16,7 @@
 delete from t1 where a in (1,2,3);
 SET SESSION debug="+d,maria_flush_whole_log,maria_crash";
 * crashing mysqld intentionally
-set global maria_checkpoint_interval=1;
+set global aria_checkpoint_interval=1;
 ERROR HY000: Lost connection to MySQL server during query
 * recovery happens
 check table t1 extended;
@@ -29,8 +29,8 @@
 drop table t1;
 * TEST of checkpoint
 set global debug="+d,info,query,enter,exit,loop,maria_checkpoint_indirect";
-set global maria_checkpoint_interval=10000;
-create table t1(a int, b varchar(10), index(a,b)) engine=maria;
+set global aria_checkpoint_interval=10000;
+create table t1(a int, b varchar(10), index(a,b)) engine=aria;
 insert into t1 values(1,"a"),(2,"b"),(3,"c");
 delete from t1 where b="b";
 update t1 set b="d" where a=1;
@@ -40,14 +40,14 @@
 insert into t1 values(4,"e"),(5,"f"),(6,"g");
 update t1 set b="h" where a=5;
 delete from t1 where b="g";
-show status like "Maria_pagecache_blocks_not_flushed";
+show status like "Aria_pagecache_blocks_not_flushed";
 Variable_name	Value
-Maria_pagecache_blocks_not_flushed	3
-set global maria_checkpoint_interval=10000;
+Aria_pagecache_blocks_not_flushed	3
+set global aria_checkpoint_interval=10000;
 update t1 set b="i" where a=5;
 SET SESSION debug="+d,maria_crash";
 * crashing mysqld intentionally
-set global maria_checkpoint_interval=1;
+set global aria_checkpoint_interval=1;
 ERROR HY000: Lost connection to MySQL server during query
 * recovery happens
 check table t1 extended;
@@ -59,7 +59,7 @@
 use mysqltest;
 drop table t1;
 Test of REPAIR's implicit commit
-create table t1 (a varchar(100), key(a)) engine=maria;
+create table t1 (a varchar(100), key(a)) engine=aria;
 insert into t1 values(3);
 flush table t1;
 * copied t1 for comparison
@@ -76,7 +76,7 @@
 3
 SET SESSION debug="+d,maria_flush_whole_log,maria_flush_whole_page_cache,maria_crash";
 * crashing mysqld intentionally
-set global maria_checkpoint_interval=1;
+set global aria_checkpoint_interval=1;
 ERROR HY000: Lost connection to MySQL server during query
 * recovery happens
 check table t1 extended;
@@ -92,7 +92,7 @@
 3
 drop table t1;
 * TEST of recovery when crash before bulk-insert-with-repair is committed
-create table t1 (a varchar(100), key(a)) engine=maria;
+create table t1 (a varchar(100), key(a)) engine=aria;
 create table t2 (a varchar(100)) engine=myisam;
 set rand_seed1=12, rand_seed2=254;
 insert into t2 values (rand());
@@ -110,7 +110,7 @@
 insert into t1 select * from t2;
 SET SESSION debug="+d,maria_flush_whole_log,maria_flush_whole_page_cache,maria_crash";
 * crashing mysqld intentionally
-set global maria_checkpoint_interval=1;
+set global aria_checkpoint_interval=1;
 ERROR HY000: Lost connection to MySQL server during query
 * recovery happens
 check table t1 extended;
@@ -125,7 +125,7 @@
 t1	1	a	1	a	A	1	NULL	NULL	YES	BTREE	
 drop table t1;
 * TEST of recovery when OPTIMIZE has replaced the index file and crash
-create table t_corrupted1 (a varchar(100), key(a)) engine=maria;
+create table t_corrupted1 (a varchar(100), key(a)) engine=aria;
 insert into t_corrupted1 select (rand()) from t2;
 flush table t_corrupted1;
 * copied t_corrupted1 for comparison

=== modified file 'mysql-test/suite/maria/r/maria-recovery3.result'
--- a/mysql-test/suite/maria/r/maria-recovery3.result	2009-02-19 09:01:25 +0000
+++ b/mysql-test/suite/maria/r/maria-recovery3.result	2010-09-12 16:40:01 +0000
@@ -1,20 +1,20 @@
-set global maria_log_file_size=4294967295;
+set global aria_log_file_size=4294967295;
 drop database if exists mysqltest;
 create database mysqltest;
 use mysqltest;
 * shut down mysqld, removed logs, restarted it
 * TEST of Checkpoint between writing the commit log record and committing in trnman
-create table t1(a int primary key) engine=maria;
+create table t1(a int primary key) engine=aria;
 insert into t1 values(1);
 flush table t1;
 * copied t1 for comparison
 set session debug="+d,maria_sleep_in_commit";
 insert into t1 values(2);
-set global maria_checkpoint_interval=1000;
+set global aria_checkpoint_interval=1000;
 delete from t1 where a=2;
 SET SESSION debug="+d,maria_flush_whole_log,maria_crash";
 * crashing mysqld intentionally
-set global maria_checkpoint_interval=1;
+set global aria_checkpoint_interval=1;
 ERROR HY000: Lost connection to MySQL server during query
 * recovery happens
 check table t1 extended;
@@ -29,11 +29,11 @@
 CREATE TABLE `t1` (
 `blob` blob,
 `blob_key` blob
-) ENGINE=maria ROW_FORMAT=page
+) ENGINE=aria ROW_FORMAT=page
 ;
 * copied t1 for feeding_recovery
 * compared t1 to old version
-set global maria_checkpoint_interval=0;
+set global aria_checkpoint_interval=0;
 INSERT INTO `t1` VALUES (NULL,repeat('A',5198));
 INSERT INTO `t1` VALUES (NULL,repeat('B',65535));
 INSERT INTO `t1` VALUES (repeat('K',5198),repeat('L',2325));
@@ -50,7 +50,7 @@
 * compared t1 to old version
 SET SESSION debug="+d,maria_flush_whole_log,maria_crash";
 * crashing mysqld intentionally
-set global maria_checkpoint_interval=1;
+set global aria_checkpoint_interval=1;
 ERROR HY000: Lost connection to MySQL server during query
 * copied t1 back for feeding_recovery
 * recovery happens
@@ -63,9 +63,9 @@
 * compared t1 to old version
 use mysqltest;
 drop table t1;
-create table t1 engine=maria select 1;
+create table t1 engine=aria select 1;
 * copied t1 for feeding_recovery
-set global maria_checkpoint_interval=0;
+set global aria_checkpoint_interval=0;
 insert into t1 values(2);
 truncate table t1;
 flush table t1;

=== modified file 'mysql-test/suite/maria/r/maria.result'
--- a/mysql-test/suite/maria/r/maria.result	2010-12-21 17:22:20 +0000
+++ b/mysql-test/suite/maria/r/maria.result	2011-01-05 14:03:58 +0000
@@ -1,10 +1,10 @@
-select * from INFORMATION_SCHEMA.ENGINES where ENGINE="MARIA";
+select * from INFORMATION_SCHEMA.ENGINES where ENGINE="ARIA";
 ENGINE	SUPPORT	COMMENT	TRANSACTIONS	XA	SAVEPOINTS
-MARIA	YES	Crash-safe tables with MyISAM heritage	YES	NO	NO
-set global storage_engine=maria;
-set session storage_engine=maria;
-set global maria_page_checksum=0;
-set global maria_log_file_size=4294967295;
+Aria	YES	Crash-safe tables with MyISAM heritage	NO	NO	NO
+set global storage_engine=aria;
+set session storage_engine=aria;
+set global aria_page_checksum=0;
+set global aria_log_file_size=4294967295;
 drop table if exists t1,t2;
 drop view if exists v1;
 SET SQL_WARNINGS=1;
@@ -702,9 +702,9 @@
 Table	Checksum
 test.t1	4183529555
 drop table t1;
-show variables like 'maria_stats_method';
+show variables like 'aria_stats_method';
 Variable_name	Value
-maria_stats_method	nulls_unequal
+aria_stats_method	nulls_unequal
 create table t1 (a int, key(a));
 insert into t1 values (0),(1),(2),(3),(4);
 insert into t1 select NULL from t1;
@@ -722,10 +722,10 @@
 show index from t1;
 Table	Non_unique	Key_name	Seq_in_index	Column_name	Collation	Cardinality	Sub_part	Packed	Null	Index_type	Comment
 t1	1	a	1	a	A	10	NULL	NULL	YES	BTREE	
-set maria_stats_method=nulls_equal;
-show variables like 'maria_stats_method';
+set aria_stats_method=nulls_equal;
+show variables like 'aria_stats_method';
 Variable_name	Value
-maria_stats_method	nulls_equal
+aria_stats_method	nulls_equal
 insert into t1 values (11);
 delete from t1 where a=11;
 analyze table t1;
@@ -742,10 +742,10 @@
 show index from t1;
 Table	Non_unique	Key_name	Seq_in_index	Column_name	Collation	Cardinality	Sub_part	Packed	Null	Index_type	Comment
 t1	1	a	1	a	A	5	NULL	NULL	YES	BTREE	
-set maria_stats_method=DEFAULT;
-show variables like 'maria_stats_method';
+set aria_stats_method=DEFAULT;
+show variables like 'aria_stats_method';
 Variable_name	Value
-maria_stats_method	nulls_unequal
+aria_stats_method	nulls_unequal
 insert into t1 values (11);
 delete from t1 where a=11;
 analyze table t1;
@@ -763,10 +763,10 @@
 Table	Non_unique	Key_name	Seq_in_index	Column_name	Collation	Cardinality	Sub_part	Packed	Null	Index_type	Comment
 t1	1	a	1	a	A	10	NULL	NULL	YES	BTREE	
 drop table t1;
-set maria_stats_method=nulls_ignored;
-show variables like 'maria_stats_method';
+set aria_stats_method=nulls_ignored;
+show variables like 'aria_stats_method';
 Variable_name	Value
-maria_stats_method	nulls_ignored
+aria_stats_method	nulls_ignored
 create table t1 (
 a char(3), b char(4), c char(5), d char(6),
 key(a,b,c,d)
@@ -794,7 +794,7 @@
 t1	1	a	2	b	A	0	NULL	NULL	YES	BTREE	
 t1	1	a	3	c	A	0	NULL	NULL	YES	BTREE	
 t1	1	a	4	d	A	0	NULL	NULL	YES	BTREE	
-set maria_stats_method=DEFAULT;
+set aria_stats_method=DEFAULT;
 drop table t1;
 create table t1(
 cip INT NOT NULL,
@@ -819,7 +819,7 @@
 t text not null,
 primary key  (id1),
 key x (id2, t(32))
-) engine=maria;
+) engine=aria;
 insert into t1 (id2, t) values
 (10, 'abc'), (10, 'abc'), (10, 'abc'),
 (20, 'abc'), (20, 'abc'), (20, 'def'),
@@ -852,10 +852,10 @@
 xxxxxxxxx	bbbbbb
 xxxxxxxxx	bbbbbb
 DROP TABLE t1;
-SET @@maria_repair_threads=2;
-SHOW VARIABLES LIKE 'maria_repair%';
+SET @@aria_repair_threads=2;
+SHOW VARIABLES LIKE 'aria_repair%';
 Variable_name	Value
-maria_repair_threads	2
+aria_repair_threads	2
 CREATE TABLE t1 (
 `_id` int(11) NOT NULL default '0',
 `url` text,
@@ -897,7 +897,7 @@
 DELETE FROM t1 WHERE _id < 8;
 SHOW TABLE STATUS LIKE 't1';
 Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment
-t1	MARIA	10	Page	2	#	#	#	#	0	#	#	#	#	#	#		
+t1	Aria	10	Page	2	#	#	#	#	0	#	#	#	#	#	#		
 CHECK TABLE t1 EXTENDED;
 Table	Op	Msg_type	Msg_text
 test.t1	check	status	OK
@@ -909,7 +909,7 @@
 test.t1	check	status	OK
 SHOW TABLE STATUS LIKE 't1';
 Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment
-t1	MARIA	10	Page	2	#	#	#	#	0	#	#	#	#	#	#		
+t1	Aria	10	Page	2	#	#	#	#	0	#	#	#	#	#	#		
 SELECT _id FROM t1;
 _id
 8
@@ -956,7 +956,7 @@
 DELETE FROM t1 WHERE _id < 8;
 SHOW TABLE STATUS LIKE 't1';
 Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment
-t1	MARIA	10	Page	2	#	#	#	#	0	#	#	#	#	#	#		
+t1	Aria	10	Page	2	#	#	#	#	0	#	#	#	#	#	#		
 CHECK TABLE t1 EXTENDED;
 Table	Op	Msg_type	Msg_text
 test.t1	check	status	OK
@@ -968,16 +968,16 @@
 test.t1	check	status	OK
 SHOW TABLE STATUS LIKE 't1';
 Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment
-t1	MARIA	10	Page	2	#	#	#	#	0	#	#	#	#	#	#		
+t1	Aria	10	Page	2	#	#	#	#	0	#	#	#	#	#	#		
 SELECT _id FROM t1;
 _id
 8
 9
 DROP TABLE t1;
-SET @@maria_repair_threads=1;
-SHOW VARIABLES LIKE 'maria_repair%';
+SET @@aria_repair_threads=1;
+SHOW VARIABLES LIKE 'aria_repair%';
 Variable_name	Value
-maria_repair_threads	1
+aria_repair_threads	1
 drop table if exists t1,t2,t3;
 --- Testing varchar ---
 --- Testing varchar ---
@@ -997,7 +997,7 @@
   `v` varchar(10) DEFAULT NULL,
   `c` char(10) DEFAULT NULL,
   `t` text
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 create table t2 like t1;
 show create table t2;
 Table	Create Table
@@ -1005,7 +1005,7 @@
   `v` varchar(10) DEFAULT NULL,
   `c` char(10) DEFAULT NULL,
   `t` text
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 create table t3 select * from t1;
 show create table t3;
 Table	Create Table
@@ -1013,7 +1013,7 @@
   `v` varchar(10) DEFAULT NULL,
   `c` char(10) DEFAULT NULL,
   `t` text
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 alter table t1 modify c varchar(10);
 show create table t1;
 Table	Create Table
@@ -1021,7 +1021,7 @@
   `v` varchar(10) DEFAULT NULL,
   `c` varchar(10) DEFAULT NULL,
   `t` text
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 alter table t1 modify v char(10);
 show create table t1;
 Table	Create Table
@@ -1029,7 +1029,7 @@
   `v` char(10) DEFAULT NULL,
   `c` varchar(10) DEFAULT NULL,
   `t` text
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 alter table t1 modify t varchar(10);
 Warnings:
 Note	1265	Data truncated for column 't' at row 2
@@ -1039,7 +1039,7 @@
   `v` char(10) DEFAULT NULL,
   `c` varchar(10) DEFAULT NULL,
   `t` varchar(10) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 select concat('*',v,'*',c,'*',t,'*') from t1;
 concat('*',v,'*',c,'*',t,'*')
 *+*+*+ *
@@ -1055,7 +1055,7 @@
   KEY `v` (`v`),
   KEY `c` (`c`),
   KEY `t` (`t`(10))
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 select count(*) from t1;
 count(*)
 270
@@ -1274,7 +1274,7 @@
   KEY `c` (`c`),
   KEY `t` (`t`(10)),
   KEY `v` (`v`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 select count(*) from t1 where v='a';
 count(*)
 10
@@ -1354,7 +1354,7 @@
   KEY `c` (`c`),
   KEY `t` (`t`(10)),
   KEY `v` (`v`(30))
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 select count(*) from t1 where v='a';
 count(*)
 10
@@ -1434,7 +1434,7 @@
   KEY `c` (`c`),
   KEY `t` (`t`(10)),
   KEY `v` (`v`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 select v,count(*) from t1 group by v limit 10;
 v	count(*)
 a	1
@@ -1512,14 +1512,14 @@
   KEY `v` (`v`(5)),
   KEY `c` (`c`(5)),
   KEY `t` (`t`(5))
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 drop table t1;
 create table t1 (v char(10) character set utf8);
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `v` char(10) CHARACTER SET utf8 DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 drop table t1;
 create table t1 (v varchar(10), c char(10)) row_format=fixed;
 show create table t1;
@@ -1527,7 +1527,7 @@
 t1	CREATE TABLE `t1` (
   `v` varchar(10) DEFAULT NULL,
   `c` char(10) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=FIXED
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=FIXED
 insert into t1 values('a','a'),('a ','a ');
 select concat('*',v,'*',c,'*') from t1;
 concat('*',v,'*',c,'*')
@@ -1560,7 +1560,7 @@
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `v` mediumtext
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 drop table t1;
 create table t1 (v varchar(65530) character set utf8);
 Warnings:
@@ -1569,7 +1569,7 @@
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `v` mediumtext CHARACTER SET utf8
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 drop table t1;
 create table t1 (v varchar(65535));
 ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs
@@ -1696,32 +1696,32 @@
 CREATE TABLE t1 (c1 INT, c2 INT, UNIQUE INDEX (c1), INDEX (c2));
 SHOW TABLE STATUS LIKE 't1';
 Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment
-t1	MARIA	10	Page	0	#	#	#	8192	#	#	#	#	#	#	#		
+t1	Aria	10	Page	0	#	#	#	8192	#	#	#	#	#	#	#		
 INSERT INTO t1 VALUES (1,1);
 SHOW TABLE STATUS LIKE 't1';
 Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment
-t1	MARIA	10	Page	1	#	#	#	24576	#	#	#	#	#	#	#		
-ALTER TABLE t1 DISABLE KEYS;
-SHOW TABLE STATUS LIKE 't1';
-Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment
-t1	MARIA	10	Page	1	#	#	#	24576	#	#	#	#	#	#	#		
-ALTER TABLE t1 ENABLE KEYS;
-SHOW TABLE STATUS LIKE 't1';
-Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment
-t1	MARIA	10	Page	1	#	#	#	24576	#	#	#	#	#	#	#		
-ALTER TABLE t1 DISABLE KEYS;
-SHOW TABLE STATUS LIKE 't1';
-Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment
-t1	MARIA	10	Page	1	#	#	#	24576	#	#	#	#	#	#	#		
-ALTER TABLE t1 ENABLE KEYS;
-SHOW TABLE STATUS LIKE 't1';
-Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment
-t1	MARIA	10	Page	1	#	#	#	24576	#	#	#	#	#	#	#		
+t1	Aria	10	Page	1	#	#	#	24576	#	#	#	#	#	#	#		
+ALTER TABLE t1 DISABLE KEYS;
+SHOW TABLE STATUS LIKE 't1';
+Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment
+t1	Aria	10	Page	1	#	#	#	24576	#	#	#	#	#	#	#		
+ALTER TABLE t1 ENABLE KEYS;
+SHOW TABLE STATUS LIKE 't1';
+Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment
+t1	Aria	10	Page	1	#	#	#	24576	#	#	#	#	#	#	#		
+ALTER TABLE t1 DISABLE KEYS;
+SHOW TABLE STATUS LIKE 't1';
+Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment
+t1	Aria	10	Page	1	#	#	#	24576	#	#	#	#	#	#	#		
+ALTER TABLE t1 ENABLE KEYS;
+SHOW TABLE STATUS LIKE 't1';
+Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment
+t1	Aria	10	Page	1	#	#	#	24576	#	#	#	#	#	#	#		
 # Enable keys with parallel repair
-SET @@maria_repair_threads=2;
+SET @@aria_repair_threads=2;
 ALTER TABLE t1 DISABLE KEYS;
 ALTER TABLE t1 ENABLE KEYS;
-SET @@maria_repair_threads=1;
+SET @@aria_repair_threads=1;
 CHECK TABLE t1 EXTENDED;
 Table	Op	Msg_type	Msg_text
 test.t1	check	status	OK
@@ -1748,7 +1748,7 @@
 3	2
 4	5
 DROP TABLE t1, t2;
-CREATE TABLE t1 (a INT) ENGINE=MARIA CHECKSUM=1 ROW_FORMAT=DYNAMIC;
+CREATE TABLE t1 (a INT) ENGINE=ARIA CHECKSUM=1 ROW_FORMAT=DYNAMIC;
 INSERT INTO t1 VALUES (0);
 UPDATE t1 SET a=1;
 SELECT a FROM t1;
@@ -1777,7 +1777,7 @@
 t1	CREATE TABLE `t1` (
   `a` int(11) NOT NULL,
   KEY `a` (`a`) KEY_BLOCK_SIZE=8192
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 drop table t1;
 create table t1 (a int not null, key `a` (a) key_block_size=2048);
 show create table t1;
@@ -1785,7 +1785,7 @@
 t1	CREATE TABLE `t1` (
   `a` int(11) NOT NULL,
   KEY `a` (`a`) KEY_BLOCK_SIZE=8192
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 drop table t1;
 create table t1 (a varchar(2048), key `a` (a));
 Warnings:
@@ -1795,7 +1795,7 @@
 t1	CREATE TABLE `t1` (
   `a` varchar(2048) DEFAULT NULL,
   KEY `a` (`a`(1208))
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 drop table t1;
 create table t1 (a varchar(2048), key `a` (a) key_block_size=1024);
 Warnings:
@@ -1805,7 +1805,7 @@
 t1	CREATE TABLE `t1` (
   `a` varchar(2048) DEFAULT NULL,
   KEY `a` (`a`(1208)) KEY_BLOCK_SIZE=8192
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 drop table t1;
 create table t1 (a int not null, b varchar(2048), key (a), key(b)) key_block_size=1024;
 Warnings:
@@ -1817,7 +1817,7 @@
   `b` varchar(2048) DEFAULT NULL,
   KEY `a` (`a`) KEY_BLOCK_SIZE=8192,
   KEY `b` (`b`(1208)) KEY_BLOCK_SIZE=8192
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 KEY_BLOCK_SIZE=1024
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 KEY_BLOCK_SIZE=1024
 alter table t1 key_block_size=2048;
 show create table t1;
 Table	Create Table
@@ -1826,7 +1826,7 @@
   `b` varchar(2048) DEFAULT NULL,
   KEY `a` (`a`) KEY_BLOCK_SIZE=8192,
   KEY `b` (`b`(1208)) KEY_BLOCK_SIZE=8192
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 KEY_BLOCK_SIZE=2048
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 KEY_BLOCK_SIZE=2048
 alter table t1 add c int, add key (c);
 show create table t1;
 Table	Create Table
@@ -1837,7 +1837,7 @@
   KEY `a` (`a`) KEY_BLOCK_SIZE=8192,
   KEY `b` (`b`(1208)) KEY_BLOCK_SIZE=8192,
   KEY `c` (`c`) KEY_BLOCK_SIZE=8192
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 KEY_BLOCK_SIZE=2048
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 KEY_BLOCK_SIZE=2048
 alter table t1 key_block_size=0;
 alter table t1 add d int, add key (d);
 show create table t1;
@@ -1851,7 +1851,7 @@
   KEY `b` (`b`(1208)) KEY_BLOCK_SIZE=8192,
   KEY `c` (`c`) KEY_BLOCK_SIZE=8192,
   KEY `d` (`d`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 drop table t1;
 create table t1 (a int not null, b varchar(2048), key (a), key(b)) key_block_size=8192;
 Warnings:
@@ -1863,7 +1863,7 @@
   `b` varchar(2048) DEFAULT NULL,
   KEY `a` (`a`),
   KEY `b` (`b`(1208))
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 KEY_BLOCK_SIZE=8192
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 KEY_BLOCK_SIZE=8192
 drop table t1;
 create table t1 (a int not null, b varchar(2048), key (a) key_block_size=1024, key(b)) key_block_size=8192;
 Warnings:
@@ -1875,7 +1875,7 @@
   `b` varchar(2048) DEFAULT NULL,
   KEY `a` (`a`),
   KEY `b` (`b`(1208))
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 KEY_BLOCK_SIZE=8192
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 KEY_BLOCK_SIZE=8192
 drop table t1;
 create table t1 (a int not null, b int, key (a) key_block_size=1024, key(b) key_block_size=8192) key_block_size=16384;
 show create table t1;
@@ -1885,7 +1885,7 @@
   `b` int(11) DEFAULT NULL,
   KEY `a` (`a`) KEY_BLOCK_SIZE=8192,
   KEY `b` (`b`) KEY_BLOCK_SIZE=8192
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 KEY_BLOCK_SIZE=16384
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 KEY_BLOCK_SIZE=16384
 drop table t1;
 create table t1 (a int not null, key `a` (a) key_block_size=512);
 show create table t1;
@@ -1893,7 +1893,7 @@
 t1	CREATE TABLE `t1` (
   `a` int(11) NOT NULL,
   KEY `a` (`a`) KEY_BLOCK_SIZE=8192
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 drop table t1;
 create table t1 (a varchar(2048), key `a` (a) key_block_size=1000000000000000000);
 Warnings:
@@ -1903,7 +1903,7 @@
 t1	CREATE TABLE `t1` (
   `a` varchar(2048) DEFAULT NULL,
   KEY `a` (`a`(1208)) KEY_BLOCK_SIZE=8192
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 drop table t1;
 create table t1 (a int not null, key `a` (a) key_block_size=1025);
 show create table t1;
@@ -1911,7 +1911,7 @@
 t1	CREATE TABLE `t1` (
   `a` int(11) NOT NULL,
   KEY `a` (`a`) KEY_BLOCK_SIZE=8192
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 drop table t1;
 create table t1 (a int not null, key key_block_size=1024 (a));
 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '=1024 (a))' at line 1
@@ -1965,7 +1965,7 @@
 CREATE TABLE t1 (
 c1 CHAR(130),
 c2 VARCHAR(1)
-) ENGINE=maria;
+) ENGINE=aria;
 INSERT INTO t1 VALUES(REPEAT("a",128), 'b');
 SELECT COUNT(*) FROM t1;
 COUNT(*)
@@ -1986,7 +1986,7 @@
 CREATE TABLE t1 (
 c1 CHAR(130),
 c2 VARCHAR(1)
-) ENGINE=maria;
+) ENGINE=aria;
 INSERT INTO t1 VALUES(REPEAT("a",128), 'b');
 SELECT COUNT(*) FROM t1;
 COUNT(*)
@@ -2007,7 +2007,7 @@
 CREATE TABLE t1 (
 c1 CHAR(130),
 c2 VARCHAR(1)
-) ENGINE=maria;
+) ENGINE=aria;
 INSERT INTO t1 VALUES(REPEAT("a",128), 'b');
 INSERT INTO t1 VALUES('b', 'b');
 INSERT INTO t1 VALUES('c', 'b');
@@ -2026,13 +2026,13 @@
 c1 CHAR(130),
 c2 VARCHAR(1),
 KEY (c1)
-) ENGINE=maria;
+) ENGINE=aria;
 # Insert 100 rows. Query log disabled.
 UPDATE t1 SET c1=REPEAT("a",128) LIMIT 90;
 SELECT COUNT(*) FROM t1;
 COUNT(*)
 100
-ALTER TABLE t1 ENGINE=maria;
+ALTER TABLE t1 ENGINE=aria;
 SELECT COUNT(*) FROM t1;
 COUNT(*)
 100
@@ -2046,7 +2046,7 @@
 CREATE TABLE t1 (
 c1 CHAR(50),
 c2 VARCHAR(1)
-) ENGINE=maria DEFAULT CHARSET UTF8;
+) ENGINE=aria DEFAULT CHARSET UTF8;
 INSERT INTO t1 VALUES(REPEAT(_utf8 x'e0ae85',43), 'b');
 SELECT COUNT(*) FROM t1;
 COUNT(*)
@@ -2067,7 +2067,7 @@
 CREATE TABLE t1 (
 c1 CHAR(50),
 c2 VARCHAR(1)
-) ENGINE=maria DEFAULT CHARSET UTF8;
+) ENGINE=aria DEFAULT CHARSET UTF8;
 INSERT INTO t1 VALUES(REPEAT(_utf8 x'e0ae85',43), 'b');
 SELECT COUNT(*) FROM t1;
 COUNT(*)
@@ -2088,7 +2088,7 @@
 CREATE TABLE t1 (
 c1 CHAR(50),
 c2 VARCHAR(1)
-) ENGINE=maria DEFAULT CHARSET UTF8;
+) ENGINE=aria DEFAULT CHARSET UTF8;
 INSERT INTO t1 VALUES(REPEAT(_utf8 x'e0ae85',43), 'b');
 INSERT INTO t1 VALUES('b', 'b');
 INSERT INTO t1 VALUES('c', 'b');
@@ -2107,13 +2107,13 @@
 c1 CHAR(50),
 c2 VARCHAR(1),
 KEY (c1)
-) ENGINE=maria DEFAULT CHARSET UTF8;
+) ENGINE=aria DEFAULT CHARSET UTF8;
 # Insert 100 rows. Query log disabled.
 UPDATE t1 SET c1=REPEAT(_utf8 x'e0ae85',43) LIMIT 90;
 SELECT COUNT(*) FROM t1;
 COUNT(*)
 100
-ALTER TABLE t1 ENGINE=maria;
+ALTER TABLE t1 ENGINE=aria;
 SELECT COUNT(*) FROM t1;
 COUNT(*)
 100
@@ -2130,8 +2130,8 @@
 c3 VARCHAR(10) NOT NULL,
 KEY (c1),
 KEY (c2)
-) ENGINE=maria DEFAULT CHARSET=utf8 PACK_KEYS=0;
-MARIA file:          MYSQLD_DATADIR/test/t1
+) ENGINE=aria DEFAULT CHARSET=utf8 PACK_KEYS=0;
+Aria file:          MYSQLD_DATADIR/test/t1
 Record format:       Block
 Crashsafe:           yes
 Character set:       utf8_general_ci (33)
@@ -2150,14 +2150,14 @@
 t1	CREATE TABLE `t1` (
   `n` int(11) NOT NULL,
   `c` char(1) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 TRANSACTIONAL=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 TRANSACTIONAL=1
 drop table t1;
-CREATE TABLE t1 (line LINESTRING NOT NULL) engine=maria;
+CREATE TABLE t1 (line LINESTRING NOT NULL) engine=aria;
 INSERT INTO t1 VALUES (GeomFromText("POINT(0 0)"));
 checksum table t1;
 Table	Checksum
 test.t1	326284887
-CREATE TABLE t2 (line LINESTRING NOT NULL) engine=maria;
+CREATE TABLE t2 (line LINESTRING NOT NULL) engine=aria;
 INSERT INTO t2 VALUES (GeomFromText("POINT(0 0)"));
 checksum table t2;
 Table	Checksum
@@ -2168,7 +2168,7 @@
 test.t3	326284887
 drop table t1,t2,t3;
 End of 5.1 tests
-create table t2(a varchar(255),key(a))engine=maria row_format=dynamic transactional=0;
+create table t2(a varchar(255),key(a))engine=aria row_format=dynamic transactional=0;
 insert into t2 values (repeat('o',124)), (repeat('h',226)), (repeat('i',236)),
 (repeat('l',234)), (repeat('b',13)), (repeat('g',236)), (repeat('y',205)),
 (repeat('c',99)), (repeat('g',145)), (repeat('o',131)), (repeat('e',63)),
@@ -2380,7 +2380,7 @@
 col173 tinytext,
 col174 decimal(10,0) DEFAULT NULL,
 col175 double DEFAULT NULL
-) engine=maria;
+) engine=aria;
 insert ignore into t1 set 
 col10=abs(28449) % 2,
 col11='1973',
@@ -2505,7 +2505,7 @@
 Table	Op	Msg_type	Msg_text
 test.t1	check	status	OK
 drop table t1;
-create table t1 (a char(200) primary key, b int default 12345) engine=maria;
+create table t1 (a char(200) primary key, b int default 12345) engine=aria;
 insert t1 (a) values (repeat('0', 200));
 insert t1 (a) values (repeat('1', 200)), (repeat('2', 200)), (repeat('3', 200)),
 (repeat('4', 200)), (repeat('5', 200)), (repeat('6', 200)), (repeat('7', 200)),
@@ -2525,14 +2525,14 @@
 12345
 12345
 drop table t1;
-create table t1 (a int) engine=maria transactional=1;
+create table t1 (a int) engine=aria transactional=1;
 insert into t1 values (1);
 lock table t1 write concurrent;
 delete from t1;
 ERROR 42000: The storage engine for the table doesn't support DELETE in WRITE CONCURRENT
 drop table t1;
 create table t1 (p int primary key, i int, a char(10), key k1(i), key k2(a))
-engine maria;
+engine aria;
 insert into t1 values (1, 1, 'qqqq'), (2, 1, 'pppp'),
 (3, 1, 'yyyy'), (4, 3, 'zzzz');
 insert into t1 values (5, 3, 'yyyy'), (6, 3, 'yyyy'), (7, 0, NULL),
@@ -2563,8 +2563,8 @@
 Table	Op	Msg_type	Msg_text
 test.t1	check	status	OK
 drop table t1;
-create table t1 (f1 int unique, f2 int) engine=maria;
-create table t2 (f3 int, f4 int) engine=maria;
+create table t1 (f1 int unique, f2 int) engine=aria;
+create table t2 (f3 int, f4 int) engine=aria;
 create view v1 as select * from t1, t2 where f1= f3;
 insert into t1 values (1,11), (2,22);
 insert into v1 (f1) values (3) on duplicate key update f1= f3 + 10;
@@ -2573,7 +2573,7 @@
 ERROR HY000: Can not modify more than one base table through a join view 'test.v1'
 drop table t1,t2;
 drop view v1;
-CREATE TABLE t1 (id int, c varchar(10)) engine=maria;
+CREATE TABLE t1 (id int, c varchar(10)) engine=aria;
 INSERT INTO t1 VALUES (1,"1");
 ALTER TABLE t1 CHANGE c d varchar(10);
 affected rows: 0
@@ -2590,7 +2590,7 @@
 flush tables with read lock;
 unlock tables;
 drop table t1, t2;
-create table t1(a int primary key, b blob, c blob) engine=maria;
+create table t1(a int primary key, b blob, c blob) engine=aria;
 insert into t1 values(1,repeat('a',100), repeat('b',657860));
 Warnings:
 Warning	1265	Data truncated for column 'c' at row 1
@@ -2605,7 +2605,7 @@
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 drop table t1;
 CREATE TABLE t1 ( f1 DOUBLE , f2 DOUBLE , f3 DOUBLE , f4 DOUBLE , v3 DOUBLE , v4 DOUBLE , KEY ( v3 ) , KEY ( v4 ) ) engine=maria;
 REPLACE t1 ( f2 , f1 ) VALUES ( f2 , 56 ) ;
@@ -2618,7 +2618,7 @@
 f2 CHAR(255) BINARY NOT NULL DEFAULT '0',
 f3 CHAR(255) BINARY NOT NULL ,
 f4 CHAR(255) BINARY NOT NULL DEFAULT '0' ,
-v3 CHAR(255) BINARY NOT NULL DEFAULT '0' ,
+v3 CHAR(255) BINARY AS ( ( f1 NOT LIKE '%' ) ) PERSISTENT,
 KEY (v3)
 ) ENGINE=Maria;
 INSERT INTO t1 ( f1 , f2 , f3 , f4 ) SELECT f1 , f4 , f1 , f4 FROM t1;

=== modified file 'mysql-test/suite/maria/r/maria2.result'
--- a/mysql-test/suite/maria/r/maria2.result	2009-02-19 09:01:25 +0000
+++ b/mysql-test/suite/maria/r/maria2.result	2010-09-12 16:40:01 +0000
@@ -3,7 +3,7 @@
 line BLOB,
 kind ENUM('po', 'pp', 'rr', 'dr', 'rd', 'ts', 'cl') NOT NULL DEFAULT 'po',
 name VARCHAR(32)
-) transactional=0 row_format=page engine=maria;
+) transactional=0 row_format=page engine=aria;
 select count(*) from t1;
 count(*)
 810
@@ -17,8 +17,8 @@
 Table	Op	Msg_type	Msg_text
 test.t1	check	status	OK
 drop table t1;
-create table t1 (i int) engine=maria;
-create table t2 (j int) engine=maria;
+create table t1 (i int) engine=aria;
+create table t2 (j int) engine=aria;
 lock table t1 write, t2 read;
 alter table t1 modify i int default 1;
 insert into t1 values (2);
@@ -30,7 +30,7 @@
 i
 2
 drop table t1,t2;
-create table t1(id int, s char(1), unique(s)) engine=maria;
+create table t1(id int, s char(1), unique(s)) engine=aria;
 insert into t1 values(1,"a") on duplicate key update t1.id=t1.id+1;
 insert into t1 values(1,"a") on duplicate key update t1.id=t1.id+1;
 insert into t1 select 1,"a" on duplicate key update t1.id=t1.id+1;
@@ -42,7 +42,7 @@
 id	s
 1	a
 drop table t1;
-create table t1 (pk int primary key, apk int unique, data int) engine=maria;
+create table t1 (pk int primary key, apk int unique, data int) engine=aria;
 insert into t1 values (1, 1, 1), (4, 4, 4), (6, 6, 6);
 load data concurrent infile '../../std_data/loaddata5.dat' replace into table t1 fields terminated by '' enclosed by '' ignore 1 lines (pk, apk);
 select * from t1 order by pk;

=== modified file 'mysql-test/suite/maria/r/maria3.result'
--- a/mysql-test/suite/maria/r/maria3.result	2010-08-24 22:18:01 +0000
+++ b/mysql-test/suite/maria/r/maria3.result	2010-12-27 09:53:02 +0000
@@ -1,10 +1,10 @@
-select * from INFORMATION_SCHEMA.ENGINES where ENGINE="MARIA";
+select * from INFORMATION_SCHEMA.ENGINES where ENGINE="ARIA";
 ENGINE	SUPPORT	COMMENT	TRANSACTIONS	XA	SAVEPOINTS
-MARIA	YES	Crash-safe tables with MyISAM heritage	YES	NO	NO
-set global storage_engine=maria;
-set session storage_engine=maria;
-set global maria_page_checksum=0;
-set global maria_log_file_size=4294967295;
+Aria	YES	Crash-safe tables with MyISAM heritage	NO	NO	NO
+set global storage_engine=aria;
+set session storage_engine=aria;
+set global aria_page_checksum=0;
+set global aria_log_file_size=4294967295;
 drop table if exists t1,t2;
 SET SQL_WARNINGS=1;
 create table t1 (a int not null, key `a` (a) key_block_size=512);
@@ -13,7 +13,7 @@
 t1	CREATE TABLE `t1` (
   `a` int(11) NOT NULL,
   KEY `a` (`a`) KEY_BLOCK_SIZE=8192
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 drop table t1;
 create table t1 (a varchar(2048), key `a` (a) key_block_size=1000000000000000000);
 Warnings:
@@ -23,7 +23,7 @@
 t1	CREATE TABLE `t1` (
   `a` varchar(2048) DEFAULT NULL,
   KEY `a` (`a`(1208)) KEY_BLOCK_SIZE=8192
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 drop table t1;
 create table t1 (a int not null, key `a` (a) key_block_size=1025);
 show create table t1;
@@ -31,7 +31,7 @@
 t1	CREATE TABLE `t1` (
   `a` int(11) NOT NULL,
   KEY `a` (`a`) KEY_BLOCK_SIZE=8192
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
 drop table t1;
 create table t1 (a int not null, key key_block_size=1024 (a));
 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '=1024 (a))' at line 1
@@ -87,14 +87,14 @@
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 TRANSACTIONAL=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 TRANSACTIONAL=0
 drop table t1;
 create table t1 (a int) row_format=dynamic transactional=0;
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=DYNAMIC TRANSACTIONAL=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=DYNAMIC TRANSACTIONAL=0
 drop table t1;
 create table t1 (a int) row_format=dynamic transactional=1;
 Warnings:
@@ -103,13 +103,13 @@
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=PAGE TRANSACTIONAL=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=PAGE TRANSACTIONAL=1
 alter table t1 row_format=PAGE;
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=PAGE TRANSACTIONAL=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=PAGE TRANSACTIONAL=1
 alter table t1 row_format=DYNAMIC;
 Warnings:
 Note	1478	Row format set to PAGE because of TRANSACTIONAL=1 option
@@ -117,88 +117,88 @@
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=PAGE TRANSACTIONAL=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=PAGE TRANSACTIONAL=1
 alter table t1 transactional=0;
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=DYNAMIC TRANSACTIONAL=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=DYNAMIC TRANSACTIONAL=0
 alter table t1 row_format=DYNAMIC;
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=DYNAMIC TRANSACTIONAL=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=DYNAMIC TRANSACTIONAL=0
 drop table t1;
 create table t1 (a int) row_format=PAGE;
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=PAGE
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=PAGE
 drop table t1;
 create table t1 (a int) row_format=PAGE TRANSACTIONAL=DEFAULT;
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=PAGE
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=PAGE
 alter table t1 row_format=DYNAMIC;
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=DYNAMIC
-drop table t1;
-create table t1 (a int) transactional=0 row_format=FIXED;
-show create table t1;
-Table	Create Table
-t1	CREATE TABLE `t1` (
-  `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=FIXED TRANSACTIONAL=0
-alter table t1 transactional=1;
-Warnings:
-Note	1478	Row format set to PAGE because of TRANSACTIONAL=1 option
-show create table t1;
-Table	Create Table
-t1	CREATE TABLE `t1` (
-  `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=PAGE TRANSACTIONAL=1
-alter table t1 transactional=0;
-show create table t1;
-Table	Create Table
-t1	CREATE TABLE `t1` (
-  `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=FIXED TRANSACTIONAL=0
-drop table t1;
-create table t1 (a int) transactional=0 row_format=FIXED;
-show create table t1;
-Table	Create Table
-t1	CREATE TABLE `t1` (
-  `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=FIXED TRANSACTIONAL=0
-alter table t1 transactional=1;
-Warnings:
-Note	1478	Row format set to PAGE because of TRANSACTIONAL=1 option
-show create table t1;
-Table	Create Table
-t1	CREATE TABLE `t1` (
-  `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=PAGE TRANSACTIONAL=1
-alter table t1 transactional=0;
-show create table t1;
-Table	Create Table
-t1	CREATE TABLE `t1` (
-  `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=FIXED TRANSACTIONAL=0
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=DYNAMIC
+drop table t1;
+create table t1 (a int) transactional=0 row_format=FIXED;
+show create table t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) DEFAULT NULL
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=FIXED TRANSACTIONAL=0
+alter table t1 transactional=1;
+Warnings:
+Note	1478	Row format set to PAGE because of TRANSACTIONAL=1 option
+show create table t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) DEFAULT NULL
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=PAGE TRANSACTIONAL=1
+alter table t1 transactional=0;
+show create table t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) DEFAULT NULL
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=FIXED TRANSACTIONAL=0
+drop table t1;
+create table t1 (a int) transactional=0 row_format=FIXED;
+show create table t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) DEFAULT NULL
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=FIXED TRANSACTIONAL=0
+alter table t1 transactional=1;
+Warnings:
+Note	1478	Row format set to PAGE because of TRANSACTIONAL=1 option
+show create table t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) DEFAULT NULL
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=PAGE TRANSACTIONAL=1
+alter table t1 transactional=0;
+show create table t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) DEFAULT NULL
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 ROW_FORMAT=FIXED TRANSACTIONAL=0
 drop table t1;
 create table `t1` (
 t1_name varchar(255) default null,
 t1_id int(10) unsigned not null auto_increment,
 key (t1_name),
 primary key (t1_id)
-) engine=maria auto_increment = 1000 default charset=latin1;
+) engine=aria auto_increment = 1000 default charset=latin1;
 lock tables t1 write;
 INSERT INTO `t1` VALUES ('bla',1000),('bla',1001),('bla',1002);
 check table t1;
@@ -226,7 +226,7 @@
 Table	Op	Msg_type	Msg_text
 test.t1	check	status	OK
 drop table t1;
-CREATE TABLE t1 (a int, b int, v varchar(60000)) checksum=1 engine=maria;
+CREATE TABLE t1 (a int, b int, v varchar(60000)) checksum=1 engine=aria;
 insert into t1 values (1,1,"aaa"),(1,2,null);
 checksum table t1;
 Table	Checksum
@@ -278,9 +278,9 @@
 KEY (ulong),
 KEY (ulonglong,ulong),
 KEY (options,flags)
-) engine=maria;
+) engine=aria;
 insert into t1 values (10,1,1,1,1,1,1,1,1,1,1,1,1,1,NULL,0,0,0,1,1,1,1,'one','one');
-create table t2 (primary key (auto)) engine=maria row_format=page select auto+1 as auto,1 as t1, 'a' as t2, repeat('a',256) as t3, binary repeat('b',256) as t4, repeat('a',4096) as t5, binary repeat('b',4096) as t6, '' as t7, binary '' as t8 from t1;
+create table t2 (primary key (auto)) engine=aria row_format=page select auto+1 as auto,1 as t1, 'a' as t2, repeat('a',256) as t3, binary repeat('b',256) as t4, repeat('a',4096) as t5, binary repeat('b',4096) as t6, '' as t7, binary '' as t8 from t1;
 check table t1,t2;
 Table	Op	Msg_type	Msg_text
 test.t1	check	status	OK
@@ -289,7 +289,7 @@
 t1	t2	length(t3)	length(t4)	length(t5)	length(t6)	t7	t8
 1	a	256	256	4096	4096		
 drop table t2;
-create table t2 (primary key (auto)) engine=maria row_format=dynamic select auto+1 as auto,1 as t1, 'a' as t2, repeat('a',256) as t3, binary repeat('b',256) as t4, repeat('a',4096) as t5, binary repeat('b',4096) as t6, '' as t7, binary '' as t8 from t1;
+create table t2 (primary key (auto)) engine=aria row_format=dynamic select auto+1 as auto,1 as t1, 'a' as t2, repeat('a',256) as t3, binary repeat('b',256) as t4, repeat('a',4096) as t5, binary repeat('b',4096) as t6, '' as t7, binary '' as t8 from t1;
 check table t2;
 Table	Op	Msg_type	Msg_text
 test.t2	check	status	OK
@@ -301,32 +301,35 @@
 Table	Op	Msg_type	Msg_text
 test.t1	check	status	OK
 drop table t1;
-select lower(variable_name) as Variable_name, Variable_value as Value from information_schema.session_variables where variable_name like "maria%" and variable_name not like "maria_used_for_temp_tables" order by 1;
-Variable_name	Value
-maria_block_size	8192
-maria_checkpoint_interval	30
-maria_force_start_after_recovery_failures	0
-maria_log_file_size	4294959104
-maria_log_purge_type	immediate
-maria_max_sort_file_size	9223372036853727232
-maria_pagecache_age_threshold	300
-maria_pagecache_buffer_size	134213632
-maria_pagecache_division_limit	100
-maria_page_checksum	OFF
-maria_recover	NORMAL
-maria_repair_threads	1
-maria_sort_buffer_size	134217728
-maria_stats_method	nulls_unequal
-maria_sync_log_dir	NEWFILE
-show status like 'maria%';
-Variable_name	Value
-Maria_pagecache_blocks_not_flushed	#
-Maria_pagecache_blocks_unused	#
-Maria_pagecache_blocks_used	#
-Maria_pagecache_read_requests	#
-Maria_pagecache_reads	#
-Maria_pagecache_write_requests	#
-Maria_pagecache_writes	#
+select lower(variable_name) as Variable_name, Variable_value as Value from information_schema.session_variables where variable_name like "aria%" and variable_name not like "aria_used_for_temp_tables" order by 1;
+Variable_name	Value
+aria_block_size	8192
+aria_checkpoint_interval	30
+aria_force_start_after_recovery_failures	0
+aria_group_commit	none
+aria_group_commit_interval	0
+aria_log_file_size	4294959104
+aria_log_purge_type	immediate
+aria_max_sort_file_size	9223372036853727232
+aria_pagecache_age_threshold	300
+aria_pagecache_buffer_size	134213632
+aria_pagecache_division_limit	100
+aria_page_checksum	OFF
+aria_recover	NORMAL
+aria_repair_threads	1
+aria_sort_buffer_size	134217728
+aria_stats_method	nulls_unequal
+aria_sync_log_dir	NEWFILE
+show status like 'aria%';
+Variable_name	Value
+Aria_pagecache_blocks_not_flushed	#
+Aria_pagecache_blocks_unused	#
+Aria_pagecache_blocks_used	#
+Aria_pagecache_read_requests	#
+Aria_pagecache_reads	#
+Aria_pagecache_write_requests	#
+Aria_pagecache_writes	#
+Aria_transaction_log_syncs	#
 create table t1 (b char(0));
 insert into t1 values(NULL),("");
 select length(b) from t1;
@@ -382,15 +385,15 @@
 CREATE TABLE t1 (col1 int, s1 char(16) DEFAULT NULL, s2 char(16) DEFAULT NULL, KEY (s1,s2));
 insert into t1 (col1) values(0);
 drop table t1;
-set global maria_page_checksum=1;
+set global aria_page_checksum=1;
 create table t1 (a int);
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 drop table t1;
-set global maria_log_file_size=4294967296;
+set global aria_log_file_size=4294967296;
 Warnings:
 Warning	1292	Truncated incorrect log_file_size value: '4294967296'
 create table t1 (a int not null);
@@ -412,7 +415,7 @@
 ERROR 42S21: Duplicate column name 'c'
 create table t3 select t1.c AS c1, t2.c AS c2,1 as "const" from t1, t2;
 drop table t1, t2, t3;
-create table t1 (t datetime) engine=maria;
+create table t1 (t datetime) engine=aria;
 insert into t1 values (101),(691231),(700101),(991231),(10000101),(99991231),(101000000),(691231000000),(700101000000),(991231235959),(10000101000000),(99991231235959),(20030100000000),(20030000000000);
 select * from t1;
 t
@@ -497,38 +500,38 @@
 301	c
 302	d
 drop table t1;
-create table t1 (n int not null, c char(1)) engine=maria;
+create table t1 (n int not null, c char(1)) engine=aria;
 alter table t1 engine=myisam;
-alter table t1 engine=maria;
+alter table t1 engine=aria;
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `n` int(11) NOT NULL,
   `c` char(1) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 drop table t1;
-create table t1 (n int not null, c char(1)) engine=maria transactional=1;
+create table t1 (n int not null, c char(1)) engine=aria transactional=1;
 alter table t1 engine=myisam;
 Warnings:
 Error	1478	Table storage engine 'MyISAM' does not support the create option 'TRANSACTIONAL=1'
-alter table t1 engine=maria;
+alter table t1 engine=aria;
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `n` int(11) NOT NULL,
   `c` char(1) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
 drop table t1;
 create table t1 (n int not null, c char(1)) engine=myisam transactional=1;
 Warnings:
 Error	1478	Table storage engine 'MyISAM' does not support the create option 'TRANSACTIONAL=1'
-alter table t1 engine=maria;
+alter table t1 engine=aria;
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `n` int(11) NOT NULL,
   `c` char(1) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
 drop table t1;
 create table t1 (a int, key(a)) transactional=0;
 insert into t1 values (0),(1),(2),(3),(4);
@@ -600,17 +603,17 @@
 a
 City Of God
 DROP TABLE t1;
-create table t1(a int) engine=maria transactional=1;
+create table t1(a int) engine=aria transactional=1;
 select CREATE_OPTIONS from information_schema.TABLES where
 TABLE_SCHEMA='test' and TABLE_NAME='t1';
 CREATE_OPTIONS
 transactional=1
 drop table t1;
-create table t1 (a int, unique(a)) engine=maria transactional=1;
+create table t1 (a int, unique(a)) engine=aria transactional=1;
 insert into t1 values(1);
 insert into t1 values(2),(2);
 ERROR 23000: Duplicate entry '2' for key 'a'
-create table t2 (a int, unique(a)) engine=maria transactional=0 row_format=dynamic;
+create table t2 (a int, unique(a)) engine=aria transactional=0 row_format=dynamic;
 insert into t2 values(1);
 insert into t2 values(2),(2);
 ERROR 23000: Duplicate entry '2' for key 'a'

=== modified file 'mysql-test/suite/maria/r/maria_notembedded.result'
--- a/mysql-test/suite/maria/r/maria_notembedded.result	2009-02-06 21:14:13 +0000
+++ b/mysql-test/suite/maria/r/maria_notembedded.result	2010-09-12 16:40:01 +0000
@@ -1,4 +1,4 @@
-set session storage_engine=maria;
+set session storage_engine=aria;
 create table t1 (a int) row_format=page;
 insert delayed into t1 values(1);
 ERROR HY000: DELAYED option not supported for table 't1'

=== modified file 'mysql-test/suite/maria/r/maria_partition.result'
--- a/mysql-test/suite/maria/r/maria_partition.result	2009-02-12 14:08:56 +0000
+++ b/mysql-test/suite/maria/r/maria_partition.result	2010-09-12 16:40:01 +0000
@@ -1,6 +1,6 @@
-set global storage_engine=maria;
-set session storage_engine=maria;
-set global maria_page_checksum=0;
+set global storage_engine=aria;
+set session storage_engine=aria;
+set global aria_page_checksum=0;
 drop table if exists t1,t2;
 drop view if exists v1;
 SET SQL_WARNINGS=1;
@@ -9,8 +9,8 @@
 alter table t1 partition by list (s1) (partition p1 values in (2));
 ERROR HY000: Table has no partition for value 1
 drop table t1;
-create table t2(a blob) engine=maria;
-create table t1(a int primary key) engine=maria;
+create table t2(a blob) engine=aria;
+create table t1(a int primary key) engine=aria;
 insert into t2 values ('foo'),('bar');
 select * from t2 left join t1 on (t2.a=t1.a) where t2.a='bbb';
 a	a

=== modified file 'mysql-test/suite/maria/r/maria_showlog_error.result'
--- a/mysql-test/suite/maria/r/maria_showlog_error.result	2008-12-01 13:21:37 +0000
+++ b/mysql-test/suite/maria/r/maria_showlog_error.result	2010-09-12 16:40:01 +0000
@@ -1,5 +1,5 @@
 * shut down mysqld, removed logs, restarted it
-show engine maria logs;
+show engine aria logs;
 Type	Name	Status
-MARIA	Size unknown ; maria_log.00000001	can't stat
+Aria	Size unknown ; aria_log.00000001	can't stat
 * shut down mysqld, removed logs, restarted it

=== modified file 'mysql-test/suite/maria/r/ps_maria.result'
--- a/mysql-test/suite/maria/r/ps_maria.result	2010-11-23 21:39:59 +0000
+++ b/mysql-test/suite/maria/r/ps_maria.result	2010-11-30 21:11:03 +0000
@@ -4,7 +4,7 @@
 (
 a int, b varchar(30),
 primary key(a)
-) engine = 'MARIA'  ;
+) engine = 'ARIA'  ;
 create table t9 
 (
 c1  tinyint, c2  smallint, c3  mediumint, c4  int,
@@ -17,7 +17,7 @@
 c29 longblob, c30 longtext, c31 enum('one', 'two', 'three'),
 c32 set('monday', 'tuesday', 'wednesday'),
 primary key(c1)
-) engine = 'MARIA'  ;
+) engine = 'ARIA'  ;
 delete from t1 ;
 insert into t1 values (1,'one');
 insert into t1 values (2,'two');
@@ -1166,7 +1166,7 @@
 1	SIMPLE	t9	ALL	NULL	NULL	NULL	NULL	2	
 drop table if exists t2 ;
 create table t2 (s varchar(25), fulltext(s)) TRANSACTIONAL= 0
-ENGINE = 'MARIA'  ;
+ENGINE = 'ARIA'  ;
 insert into t2 values ('Gravedigger'), ('Greed'),('Hollow Dogs') ;
 commit ;
 prepare stmt1 from ' select s from t2 where match (s) against (?) ' ;
@@ -1352,7 +1352,7 @@
 (
 a int, b varchar(30),
 primary key(a)
-) engine = 'MARIA'  ;
+) engine = 'ARIA'  ;
 insert into t2(a,b) select a, b from t1 ;
 prepare stmt1 from 'update t1 set a=? where b=?
                     and a in (select ? from t2
@@ -1542,7 +1542,7 @@
 ERROR 23000: Duplicate entry '82' for key 'PRIMARY'
 drop table if exists t2 ;
 create table t2 (id int auto_increment primary key) 
-ENGINE= 'MARIA'  ;
+ENGINE= 'ARIA'  ;
 prepare stmt1 from ' select last_insert_id() ' ;
 insert into t2 values (NULL) ;
 execute stmt1 ;

=== added file 'mysql-test/suite/maria/suite.pm'
--- a/mysql-test/suite/maria/suite.pm	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/maria/suite.pm	2010-09-14 21:06:54 +0000
@@ -0,0 +1,8 @@
+package My::Suite::Maria;
+
+ at ISA = qw(My::Suite);
+
+return "Need Aria engine" unless $::mysqld_variables{'aria'} eq "ON";
+
+bless { };
+

=== added file 'mysql-test/suite/maria/t/compat_aliases-master.opt'
--- a/mysql-test/suite/maria/t/compat_aliases-master.opt	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/maria/t/compat_aliases-master.opt	2010-09-14 21:06:54 +0000
@@ -0,0 +1,1 @@
+--maria-max-sort-file-size=100M --aria-repair-threads=10000

=== added file 'mysql-test/suite/maria/t/compat_aliases.test'
--- a/mysql-test/suite/maria/t/compat_aliases.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/maria/t/compat_aliases.test	2010-11-09 08:17:36 +0000
@@ -0,0 +1,59 @@
+#
+# test for maria* aliases (system variables, status variables,
+#  command-line options). They should match aria* variables.
+#
+
+--replace_column 5 #
+select * from information_schema.plugins where plugin_name like '%aria';
+
+select maria_vars.variable_name, aria_vars.variable_name from
+  information_schema.session_variables as maria_vars left join
+  information_schema.session_variables as aria_vars
+  on (maria_vars.variable_name = concat('m', aria_vars.variable_name))
+  where maria_vars.variable_name like 'maria_%'
+    and not (maria_vars.variable_value <=> aria_vars.variable_value);
+
+select maria_vars.variable_name, aria_vars.variable_name from
+  information_schema.session_status as maria_vars left join
+  information_schema.session_status as aria_vars
+  on (maria_vars.variable_name = concat('m', aria_vars.variable_name))
+  where maria_vars.variable_name like 'maria_%'
+    and not (maria_vars.variable_value <=> aria_vars.variable_value);
+
+select maria_vars.variable_name, aria_vars.variable_name from
+  information_schema.session_variables as aria_vars left join
+  information_schema.session_variables as maria_vars
+  on (maria_vars.variable_name = concat('m', aria_vars.variable_name))
+  where aria_vars.variable_name like 'aria_%'
+    and not (maria_vars.variable_value <=> aria_vars.variable_value);
+
+select maria_vars.variable_name, aria_vars.variable_name from
+  information_schema.session_status as aria_vars left join
+  information_schema.session_status as maria_vars
+  on (maria_vars.variable_name = concat('m', aria_vars.variable_name))
+  where aria_vars.variable_name like 'aria_%'
+    and not (maria_vars.variable_value <=> aria_vars.variable_value);
+
+set @old_checkpoint_interval=@@global.aria_checkpoint_interval;
+set global maria_checkpoint_interval=10;
+select @@global.aria_checkpoint_interval;
+set global maria_checkpoint_interval=@old_checkpoint_interval;
+
+set @old_sort_buffer_size=@@global.maria_sort_buffer_size;
+set global aria_sort_buffer_size=1024;
+select @@global.maria_sort_buffer_size;
+set global aria_sort_buffer_size=@old_sort_buffer_size;
+
+set @old_sort_buffer_size=@@session.maria_sort_buffer_size;
+set session aria_sort_buffer_size=2048;
+select @@session.maria_sort_buffer_size;
+set session aria_sort_buffer_size=@old_sort_buffer_size;
+
+set @old_max_sort_file_size=@@global.maria_max_sort_file_size,
+    @old_repair_threads=@@global.aria_repair_threads;
+set @@global.maria_max_sort_file_size=default, @@global.aria_repair_threads=default;
+--replace_result 4293918720 9223372036853727232
+select @@global.maria_max_sort_file_size, @@global.aria_repair_threads;
+set @@global.aria_max_sort_file_size=@old_max_sort_file_size,
+    @@global.maria_repair_threads=@old_repair_threads;
+

=== added file 'mysql-test/suite/maria/t/group_commit.test'
--- a/mysql-test/suite/maria/t/group_commit.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/maria/t/group_commit.test	2010-09-12 16:40:01 +0000
@@ -0,0 +1,72 @@
+# Test different ways of syncing (mostly syntax)
+--source include/have_maria.inc
+
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+
+create table t1 (a int);
+
+SET GLOBAL aria_group_commit="NONE";
+SET GLOBAL aria_group_commit_interval= 0;
+--disable_query_log
+let $num = 5000;
+while ($num)
+{
+  insert into t1 values (1);
+  dec $num;
+}
+--enable_query_log
+SET GLOBAL aria_group_commit="NONE";
+SET GLOBAL aria_group_commit_interval= 100;
+--disable_query_log
+let $num = 5000;
+while ($num)
+{
+  insert into t1 values (1);
+  dec $num;
+}
+--enable_query_log
+SET GLOBAL aria_group_commit="HARD";
+SET GLOBAL aria_group_commit_interval= 0;
+--disable_query_log
+let $num = 5000;
+while ($num)
+{
+  insert into t1 values (1);
+  dec $num;
+}
+--enable_query_log
+SET GLOBAL aria_group_commit="HARD";
+SET GLOBAL aria_group_commit_interval= 100;
+--disable_query_log
+let $num = 5000;
+while ($num)
+{
+  insert into t1 values (1);
+  dec $num;
+}
+--enable_query_log
+SET GLOBAL aria_group_commit="SOFT";
+SET GLOBAL aria_group_commit_interval= 0;
+--disable_query_log
+let $num = 5000;
+while ($num)
+{
+  insert into t1 values (1);
+  dec $num;
+}
+--enable_query_log
+SET GLOBAL aria_group_commit="SOFT";
+SET GLOBAL aria_group_commit_interval= 100;
+--disable_query_log
+let $num = 5000;
+while ($num)
+{
+  insert into t1 values (1);
+  dec $num;
+}
+--enable_query_log
+SET GLOBAL aria_group_commit="NONE";
+SET GLOBAL aria_group_commit_interval= 0;
+drop table t1;

=== modified file 'mysql-test/suite/maria/t/maria-autozerofill.test'
--- a/mysql-test/suite/maria/t/maria-autozerofill.test	2011-01-20 17:08:12 +0000
+++ b/mysql-test/suite/maria/t/maria-autozerofill.test	2011-01-23 07:23:47 +0000
@@ -1,5 +1,5 @@
 # Test to verify that auto-zerofilling happens when a table is
-# imported from a different Maria instance
+# imported from a different Aria instance
 
 # can't restart in embedded
 --source include/not_embedded.inc
@@ -22,16 +22,16 @@
 use mysqltest;
 --enable_reconnect
 
-create table t1(a int) engine=maria;
+create table t1(a int) engine=aria;
 insert into t1 values(1);
 flush table t1;
 # Check that table is not zerofilled, not movable
 let $MYSQLD_DATADIR= `select @@datadir`;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/mysqltest/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/mysqltest/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= <FILE>;
     print grep(/Status:.*(zerofilled|movable)/, @content);
@@ -39,23 +39,23 @@
     close FILE;
 EOF
 
-# this will remove control file, so change the uuid of the Maria
+# this will remove control file, so change the uuid of the Aria
 # instance, thus t1 will appear as imported from elsewhere.
 
 -- source include/maria_empty_logs.inc
 
-disable_ps_protocol; # see maria-recover.test
+disable_ps_protocol; # see aria-recover.test
 replace_regex /Table.*t1/t1/ ;
 select * from t1;
 enable_ps_protocol;
 flush table t1;
 
 # Check that table is auto-zerofilled, movable
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/mysqltest/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/mysqltest/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= <FILE>;
     print grep(/Status:.*zerofilled/, @content);
@@ -63,16 +63,16 @@
     close FILE;
 EOF
 
-# this will attach t1 to the current Maria instance
+# this will attach t1 to the current Aria instance
 insert into t1 values(2);
 flush table t1;
 
 # Check that table is not zerofilled, not movable
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/mysqltest/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/mysqltest/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= <FILE>;
     print grep(/Status:.*(zerofilled|movable)/, @content);

=== modified file 'mysql-test/suite/maria/t/maria-big.test'
--- a/mysql-test/suite/maria/t/maria-big.test	2009-02-19 09:01:25 +0000
+++ b/mysql-test/suite/maria/t/maria-big.test	2010-09-12 16:40:01 +0000
@@ -9,7 +9,7 @@
 connection root;
 
 enable_info;
-set storage_engine=maria;
+set storage_engine=aria;
 disable_warnings;
 drop table if exists t1, t2;
 enable_warnings;
@@ -68,7 +68,7 @@
 # Set defaults back
 --disable_result_log
 --disable_query_log
-set global maria_log_file_size=default;
+set global aria_log_file_size=default;
 set global max_allowed_packet=default;
 --enable_result_log
 --enable_query_log

=== modified file 'mysql-test/suite/maria/t/maria-big2.test'
--- a/mysql-test/suite/maria/t/maria-big2.test	2009-02-19 09:01:25 +0000
+++ b/mysql-test/suite/maria/t/maria-big2.test	2010-09-12 16:40:01 +0000
@@ -5,7 +5,7 @@
 # (CHECK TABLE said Invalid key block position: 15731098820608  key
 # block size: 8192  file_length: 425984)
 
-create table t2(id int,a varchar(255),b varchar(255),key(a))engine=maria row_format=dynamic transactional=0;
+create table t2(id int,a varchar(255),b varchar(255),key(a))engine=aria row_format=dynamic transactional=0;
 
 disable_query_log;
 insert into t2(a,b) values ('zmysnptvgzljpaumbdhrzkmbhefugcyhncbl','urecietrsfhgusavxffpdszrfcpdqbwxzvygsuwammwunjhpxanvozwnngnnjbwfenjgosaixpccjyviiutzpxkwiecuprltzrpxvkrjnjqgsneniewbagpvwelajvnckbbkqpaicxor')

=== modified file 'mysql-test/suite/maria/t/maria-connect.test'
--- a/mysql-test/suite/maria/t/maria-connect.test	2009-02-19 09:01:25 +0000
+++ b/mysql-test/suite/maria/t/maria-connect.test	2010-09-12 16:40:01 +0000
@@ -6,8 +6,8 @@
 -- source include/have_log_bin.inc
 
 let $default=`select @@global.storage_engine`;
-set global storage_engine=maria;
-set session storage_engine=maria;
+set global storage_engine=aria;
+set session storage_engine=aria;
 
 # Initialise
 --disable_warnings
@@ -18,7 +18,7 @@
 #
 # UNIQUE key test
 #
-# as long as maria cannot rollback, binlog should contain both inserts
+# as long as aria cannot rollback, binlog should contain both inserts
 #
 RESET MASTER;
 set binlog_format=statement;
@@ -36,6 +36,6 @@
 --disable_result_log
 --disable_query_log
 eval set global storage_engine=$default;
-set global maria_log_file_size=default;
+set global aria_log_file_size=default;
 --enable_result_log
 --enable_query_log

=== modified file 'mysql-test/suite/maria/t/maria-gis-rtree-dynamic.test'
--- a/mysql-test/suite/maria/t/maria-gis-rtree-dynamic.test	2008-10-01 12:13:39 +0000
+++ b/mysql-test/suite/maria/t/maria-gis-rtree-dynamic.test	2010-09-12 16:40:01 +0000
@@ -1,7 +1,7 @@
 -- source include/have_maria.inc
 -- source include/have_geometry.inc
 
-set storage_engine=maria;
+set storage_engine=aria;
 
 #
 # test of rtree (using with spatial data)

=== modified file 'mysql-test/suite/maria/t/maria-gis-rtree-trans.test'
--- a/mysql-test/suite/maria/t/maria-gis-rtree-trans.test	2008-10-01 12:13:39 +0000
+++ b/mysql-test/suite/maria/t/maria-gis-rtree-trans.test	2010-09-12 16:40:01 +0000
@@ -1,10 +1,10 @@
 # Because state.key_root is updated differently between transactional
-# and non-trans tables, we have several maria-gis-rtree-* tests.
+# and non-trans tables, we have several aria-gis-rtree-* tests.
 
 -- source include/have_maria.inc
 -- source include/have_geometry.inc
 
-set storage_engine=maria;
+set storage_engine=aria;
 
 #
 # test of rtree (using with spatial data)

=== modified file 'mysql-test/suite/maria/t/maria-gis-rtree.test'
--- a/mysql-test/suite/maria/t/maria-gis-rtree.test	2008-10-01 12:13:39 +0000
+++ b/mysql-test/suite/maria/t/maria-gis-rtree.test	2010-09-12 16:40:01 +0000
@@ -1,7 +1,7 @@
 -- source include/have_maria.inc
 -- source include/have_geometry.inc
 
-set storage_engine=maria;
+set storage_engine=aria;
 
 #
 # test of rtree (using with spatial data)

=== modified file 'mysql-test/suite/maria/t/maria-mvcc.test'
--- a/mysql-test/suite/maria/t/maria-mvcc.test	2008-10-01 12:13:39 +0000
+++ b/mysql-test/suite/maria/t/maria-mvcc.test	2010-09-12 16:40:01 +0000
@@ -4,7 +4,7 @@
 #
 
 -- source include/have_maria.inc
-set global maria_page_checksum=1;
+set global aria_page_checksum=1;
 
 --disable_warnings
 drop table if exists t1;
@@ -13,7 +13,7 @@
 connect (con1,localhost,root,,);
 connection con1;
 
-create table t1 (i int) engine=maria;
+create table t1 (i int) engine=aria;
 show create table t1;
 
 # versioning is disabled when table is empty, so insert a row
@@ -94,7 +94,7 @@
 # Test count(*) for not versioned tables
 #
 
-CREATE TABLE t1 (fid INT NOT NULL AUTO_INCREMENT PRIMARY KEY,    g GEOMETRY NOT NULL,   SPATIAL KEY(g) ) transactional=1 row_format=page engine=maria;
+CREATE TABLE t1 (fid INT NOT NULL AUTO_INCREMENT PRIMARY KEY,    g GEOMETRY NOT NULL,   SPATIAL KEY(g) ) transactional=1 row_format=page engine=aria;
 
 lock tables t1 write concurrent, t1 as t2 write concurrent;
 insert into t1 (fid,g) values (NULL,GeomFromText('LineString(0 0,1 1)'));

=== modified file 'mysql-test/suite/maria/t/maria-no-logging.test'
--- a/mysql-test/suite/maria/t/maria-no-logging.test	2008-10-01 12:13:39 +0000
+++ b/mysql-test/suite/maria/t/maria-no-logging.test	2010-09-12 16:40:01 +0000
@@ -4,7 +4,7 @@
 # can't restart server in embedded
 --source include/not_embedded.inc
 
-set global maria_log_file_size=4294967295;
+set global aria_log_file_size=4294967295;
 
 --disable_warnings
 drop database if exists mysqltest;
@@ -19,8 +19,8 @@
 --enable_reconnect
 
 # checkpoints can make log unrepeatable
-let $def_checkinterval=`select @@global.maria_checkpoint_interval`;
-set global maria_checkpoint_interval=0;
+let $def_checkinterval=`select @@global.aria_checkpoint_interval`;
+set global aria_checkpoint_interval=0;
 
 # Prepare table to help for big load
 create table t2 (a varchar(100)) engine=myisam;
@@ -36,24 +36,24 @@
 
 # no optimization because table not empty
 
-# SHOW ENGINE MARIA LOGS could be influenced by older logs
+# SHOW ENGINE ARIA LOGS could be influenced by older logs
 -- source include/maria_empty_logs.inc
-create table t1 (a varchar(100)) engine=maria transactional=1;
+create table t1 (a varchar(100)) engine=aria transactional=1;
 show create table t1;
---replace_regex /; .+maria_log/maria_log/
-show engine maria logs;
+--replace_regex /; .+aria_log/aria_log/
+show engine aria logs;
 
 insert into t1 values('a');
 insert into t1 select * from t2;
---replace_regex /; .+maria_log/maria_log/
-show engine maria logs;
+--replace_regex /; .+aria_log/aria_log/
+show engine aria logs;
 
 # optimization because table is empty
 -- source include/maria_empty_logs.inc
 truncate table t1;
 insert into t1 select * from t2;
---replace_regex /; .+maria_log/maria_log/
-show engine maria logs;
+--replace_regex /; .+aria_log/aria_log/
+show engine aria logs;
 
 drop table t1;
 
@@ -61,23 +61,23 @@
 
 # no optimization because table not empty
 -- source include/maria_empty_logs.inc
-create table t1 (a varchar(100)) engine=maria transactional=1;
+create table t1 (a varchar(100)) engine=aria transactional=1;
 insert into t1 values('a');
 create table if not exists t1 select * from t2;
---replace_regex /; .+maria_log/maria_log/
-show engine maria logs;
+--replace_regex /; .+aria_log/aria_log/
+show engine aria logs;
 
 # optimization because table is empty
 -- source include/maria_empty_logs.inc
 drop table t1;
-create table t1 engine=maria transactional=1 select * from t2;
---replace_regex /; .+maria_log/maria_log/
-show engine maria logs;
+create table t1 engine=aria transactional=1 select * from t2;
+--replace_regex /; .+aria_log/aria_log/
+show engine aria logs;
 
 drop database mysqltest;
 
 --disable_result_log
 --disable_query_log
-eval set global maria_checkpoint_interval=$def_checkinterval;
+eval set global aria_checkpoint_interval=$def_checkinterval;
 --enable_result_log
 --enable_query_log

=== modified file 'mysql-test/suite/maria/t/maria-page-checksum.test'
--- a/mysql-test/suite/maria/t/maria-page-checksum.test	2009-02-19 09:01:25 +0000
+++ b/mysql-test/suite/maria/t/maria-page-checksum.test	2010-09-12 16:40:01 +0000
@@ -1,4 +1,4 @@
-# Tests for two bugs related to ALTER TABLE and maria-specific alter
+# Tests for two bugs related to ALTER TABLE and aria-specific alter
 # options (PAGE_CHECKSUM and TRANSACTIONAL).
 
 -- source include/have_maria.inc
@@ -13,34 +13,34 @@
 
 let $MYSQLD_DATADIR= `select @@datadir`;
 
-select @@global.maria_page_checksum;
+select @@global.aria_page_checksum;
 
 # we scan through combinations in the cartesian product of
-# (first value of maria_page_checksum) x (clauses in CREATE TABLE) x
-# (second value of maria_page_checksum) x (clauses in ALTER TABLE).
+# (first value of aria_page_checksum) x (clauses in CREATE TABLE) x
+# (second value of aria_page_checksum) x (clauses in ALTER TABLE).
 
 --echo # iteration 1
-set global maria_page_checksum = 0 ;
-create table t1(a int) engine=maria  ;
+set global aria_page_checksum = 0 ;
+create table t1(a int) engine=aria  ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
     close FILE;
 EOF
-set global maria_page_checksum = 0 ;
-alter table t1 engine=maria  ;
+set global aria_page_checksum = 0 ;
+alter table t1 engine=aria  ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
@@ -49,27 +49,27 @@
 drop table t1;
 
 --echo # iteration 2
-set global maria_page_checksum = 0 ;
-create table t1(a int) engine=maria  ;
+set global aria_page_checksum = 0 ;
+create table t1(a int) engine=aria  ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
     close FILE;
 EOF
-set global maria_page_checksum = 0 ;
+set global aria_page_checksum = 0 ;
 alter table t1 PAGE_CHECKSUM=0 ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
@@ -78,27 +78,27 @@
 drop table t1;
 
 --echo # iteration 3
-set global maria_page_checksum = 0 ;
-create table t1(a int) engine=maria  ;
+set global aria_page_checksum = 0 ;
+create table t1(a int) engine=aria  ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
     close FILE;
 EOF
-set global maria_page_checksum = 0 ;
+set global aria_page_checksum = 0 ;
 alter table t1 PAGE_CHECKSUM=1 ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
@@ -107,27 +107,27 @@
 drop table t1;
 
 --echo # iteration 4
-set global maria_page_checksum = 0 ;
-create table t1(a int) engine=maria  ;
+set global aria_page_checksum = 0 ;
+create table t1(a int) engine=aria  ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
     close FILE;
 EOF
-set global maria_page_checksum = 1 ;
-alter table t1 engine=maria  ;
+set global aria_page_checksum = 1 ;
+alter table t1 engine=aria  ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
@@ -136,27 +136,27 @@
 drop table t1;
 
 --echo # iteration 5
-set global maria_page_checksum = 0 ;
-create table t1(a int) engine=maria  ;
+set global aria_page_checksum = 0 ;
+create table t1(a int) engine=aria  ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
     close FILE;
 EOF
-set global maria_page_checksum = 1 ;
+set global aria_page_checksum = 1 ;
 alter table t1 PAGE_CHECKSUM=0 ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
@@ -165,27 +165,27 @@
 drop table t1;
 
 --echo # iteration 6
-set global maria_page_checksum = 0 ;
-create table t1(a int) engine=maria  ;
+set global aria_page_checksum = 0 ;
+create table t1(a int) engine=aria  ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
     close FILE;
 EOF
-set global maria_page_checksum = 1 ;
+set global aria_page_checksum = 1 ;
 alter table t1 PAGE_CHECKSUM=1 ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
@@ -194,27 +194,27 @@
 drop table t1;
 
 --echo # iteration 7
-set global maria_page_checksum = 0 ;
-create table t1(a int) engine=maria PAGE_CHECKSUM=0 ;
+set global aria_page_checksum = 0 ;
+create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
     close FILE;
 EOF
-set global maria_page_checksum = 0 ;
-alter table t1 engine=maria  ;
+set global aria_page_checksum = 0 ;
+alter table t1 engine=aria  ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
@@ -223,27 +223,27 @@
 drop table t1;
 
 --echo # iteration 8
-set global maria_page_checksum = 0 ;
-create table t1(a int) engine=maria PAGE_CHECKSUM=0 ;
+set global aria_page_checksum = 0 ;
+create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
     close FILE;
 EOF
-set global maria_page_checksum = 0 ;
+set global aria_page_checksum = 0 ;
 alter table t1 PAGE_CHECKSUM=0 ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
@@ -252,27 +252,27 @@
 drop table t1;
 
 --echo # iteration 9
-set global maria_page_checksum = 0 ;
-create table t1(a int) engine=maria PAGE_CHECKSUM=0 ;
+set global aria_page_checksum = 0 ;
+create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
     close FILE;
 EOF
-set global maria_page_checksum = 0 ;
+set global aria_page_checksum = 0 ;
 alter table t1 PAGE_CHECKSUM=1 ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
@@ -281,27 +281,27 @@
 drop table t1;
 
 --echo # iteration 10
-set global maria_page_checksum = 0 ;
-create table t1(a int) engine=maria PAGE_CHECKSUM=0 ;
+set global aria_page_checksum = 0 ;
+create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
     close FILE;
 EOF
-set global maria_page_checksum = 1 ;
-alter table t1 engine=maria  ;
+set global aria_page_checksum = 1 ;
+alter table t1 engine=aria  ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
@@ -310,27 +310,27 @@
 drop table t1;
 
 --echo # iteration 11
-set global maria_page_checksum = 0 ;
-create table t1(a int) engine=maria PAGE_CHECKSUM=0 ;
+set global aria_page_checksum = 0 ;
+create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
     close FILE;
 EOF
-set global maria_page_checksum = 1 ;
+set global aria_page_checksum = 1 ;
 alter table t1 PAGE_CHECKSUM=0 ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
@@ -339,27 +339,27 @@
 drop table t1;
 
 --echo # iteration 12
-set global maria_page_checksum = 0 ;
-create table t1(a int) engine=maria PAGE_CHECKSUM=0 ;
+set global aria_page_checksum = 0 ;
+create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
     close FILE;
 EOF
-set global maria_page_checksum = 1 ;
+set global aria_page_checksum = 1 ;
 alter table t1 PAGE_CHECKSUM=1 ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
@@ -368,27 +368,27 @@
 drop table t1;
 
 --echo # iteration 13
-set global maria_page_checksum = 0 ;
-create table t1(a int) engine=maria PAGE_CHECKSUM=1 ;
+set global aria_page_checksum = 0 ;
+create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
     close FILE;
 EOF
-set global maria_page_checksum = 0 ;
-alter table t1 engine=maria  ;
+set global aria_page_checksum = 0 ;
+alter table t1 engine=aria  ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
@@ -397,27 +397,27 @@
 drop table t1;
 
 --echo # iteration 14
-set global maria_page_checksum = 0 ;
-create table t1(a int) engine=maria PAGE_CHECKSUM=1 ;
+set global aria_page_checksum = 0 ;
+create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
     close FILE;
 EOF
-set global maria_page_checksum = 0 ;
+set global aria_page_checksum = 0 ;
 alter table t1 PAGE_CHECKSUM=0 ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
@@ -426,27 +426,27 @@
 drop table t1;
 
 --echo # iteration 15
-set global maria_page_checksum = 0 ;
-create table t1(a int) engine=maria PAGE_CHECKSUM=1 ;
+set global aria_page_checksum = 0 ;
+create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
     close FILE;
 EOF
-set global maria_page_checksum = 0 ;
+set global aria_page_checksum = 0 ;
 alter table t1 PAGE_CHECKSUM=1 ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
@@ -455,27 +455,27 @@
 drop table t1;
 
 --echo # iteration 16
-set global maria_page_checksum = 0 ;
-create table t1(a int) engine=maria PAGE_CHECKSUM=1 ;
+set global aria_page_checksum = 0 ;
+create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
     close FILE;
 EOF
-set global maria_page_checksum = 1 ;
-alter table t1 engine=maria  ;
+set global aria_page_checksum = 1 ;
+alter table t1 engine=aria  ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
@@ -484,27 +484,27 @@
 drop table t1;
 
 --echo # iteration 17
-set global maria_page_checksum = 0 ;
-create table t1(a int) engine=maria PAGE_CHECKSUM=1 ;
+set global aria_page_checksum = 0 ;
+create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
     close FILE;
 EOF
-set global maria_page_checksum = 1 ;
+set global aria_page_checksum = 1 ;
 alter table t1 PAGE_CHECKSUM=0 ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
@@ -513,27 +513,27 @@
 drop table t1;
 
 --echo # iteration 18
-set global maria_page_checksum = 0 ;
-create table t1(a int) engine=maria PAGE_CHECKSUM=1 ;
+set global aria_page_checksum = 0 ;
+create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
     close FILE;
 EOF
-set global maria_page_checksum = 1 ;
+set global aria_page_checksum = 1 ;
 alter table t1 PAGE_CHECKSUM=1 ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
@@ -542,27 +542,27 @@
 drop table t1;
 
 --echo # iteration 19
-set global maria_page_checksum = 1 ;
-create table t1(a int) engine=maria  ;
+set global aria_page_checksum = 1 ;
+create table t1(a int) engine=aria  ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
     close FILE;
 EOF
-set global maria_page_checksum = 0 ;
-alter table t1 engine=maria  ;
+set global aria_page_checksum = 0 ;
+alter table t1 engine=aria  ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
@@ -571,27 +571,27 @@
 drop table t1;
 
 --echo # iteration 20
-set global maria_page_checksum = 1 ;
-create table t1(a int) engine=maria  ;
+set global aria_page_checksum = 1 ;
+create table t1(a int) engine=aria  ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
     close FILE;
 EOF
-set global maria_page_checksum = 0 ;
+set global aria_page_checksum = 0 ;
 alter table t1 PAGE_CHECKSUM=0 ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
@@ -600,27 +600,27 @@
 drop table t1;
 
 --echo # iteration 21
-set global maria_page_checksum = 1 ;
-create table t1(a int) engine=maria  ;
+set global aria_page_checksum = 1 ;
+create table t1(a int) engine=aria  ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
     close FILE;
 EOF
-set global maria_page_checksum = 0 ;
+set global aria_page_checksum = 0 ;
 alter table t1 PAGE_CHECKSUM=1 ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
@@ -629,27 +629,27 @@
 drop table t1;
 
 --echo # iteration 22
-set global maria_page_checksum = 1 ;
-create table t1(a int) engine=maria  ;
+set global aria_page_checksum = 1 ;
+create table t1(a int) engine=aria  ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
     close FILE;
 EOF
-set global maria_page_checksum = 1 ;
-alter table t1 engine=maria  ;
+set global aria_page_checksum = 1 ;
+alter table t1 engine=aria  ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
@@ -658,27 +658,27 @@
 drop table t1;
 
 --echo # iteration 23
-set global maria_page_checksum = 1 ;
-create table t1(a int) engine=maria  ;
+set global aria_page_checksum = 1 ;
+create table t1(a int) engine=aria  ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
     close FILE;
 EOF
-set global maria_page_checksum = 1 ;
+set global aria_page_checksum = 1 ;
 alter table t1 PAGE_CHECKSUM=0 ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
@@ -687,27 +687,27 @@
 drop table t1;
 
 --echo # iteration 24
-set global maria_page_checksum = 1 ;
-create table t1(a int) engine=maria  ;
+set global aria_page_checksum = 1 ;
+create table t1(a int) engine=aria  ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
     close FILE;
 EOF
-set global maria_page_checksum = 1 ;
+set global aria_page_checksum = 1 ;
 alter table t1 PAGE_CHECKSUM=1 ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
@@ -716,27 +716,27 @@
 drop table t1;
 
 --echo # iteration 25
-set global maria_page_checksum = 1 ;
-create table t1(a int) engine=maria PAGE_CHECKSUM=0 ;
+set global aria_page_checksum = 1 ;
+create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
     close FILE;
 EOF
-set global maria_page_checksum = 0 ;
-alter table t1 engine=maria  ;
+set global aria_page_checksum = 0 ;
+alter table t1 engine=aria  ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
@@ -745,27 +745,27 @@
 drop table t1;
 
 --echo # iteration 26
-set global maria_page_checksum = 1 ;
-create table t1(a int) engine=maria PAGE_CHECKSUM=0 ;
+set global aria_page_checksum = 1 ;
+create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
     close FILE;
 EOF
-set global maria_page_checksum = 0 ;
+set global aria_page_checksum = 0 ;
 alter table t1 PAGE_CHECKSUM=0 ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
@@ -774,27 +774,27 @@
 drop table t1;
 
 --echo # iteration 27
-set global maria_page_checksum = 1 ;
-create table t1(a int) engine=maria PAGE_CHECKSUM=0 ;
+set global aria_page_checksum = 1 ;
+create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
     close FILE;
 EOF
-set global maria_page_checksum = 0 ;
+set global aria_page_checksum = 0 ;
 alter table t1 PAGE_CHECKSUM=1 ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
@@ -803,27 +803,27 @@
 drop table t1;
 
 --echo # iteration 28
-set global maria_page_checksum = 1 ;
-create table t1(a int) engine=maria PAGE_CHECKSUM=0 ;
+set global aria_page_checksum = 1 ;
+create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
     close FILE;
 EOF
-set global maria_page_checksum = 1 ;
-alter table t1 engine=maria  ;
+set global aria_page_checksum = 1 ;
+alter table t1 engine=aria  ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
@@ -832,27 +832,27 @@
 drop table t1;
 
 --echo # iteration 29
-set global maria_page_checksum = 1 ;
-create table t1(a int) engine=maria PAGE_CHECKSUM=0 ;
+set global aria_page_checksum = 1 ;
+create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
     close FILE;
 EOF
-set global maria_page_checksum = 1 ;
+set global aria_page_checksum = 1 ;
 alter table t1 PAGE_CHECKSUM=0 ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
@@ -861,27 +861,27 @@
 drop table t1;
 
 --echo # iteration 30
-set global maria_page_checksum = 1 ;
-create table t1(a int) engine=maria PAGE_CHECKSUM=0 ;
+set global aria_page_checksum = 1 ;
+create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
     close FILE;
 EOF
-set global maria_page_checksum = 1 ;
+set global aria_page_checksum = 1 ;
 alter table t1 PAGE_CHECKSUM=1 ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
@@ -890,27 +890,27 @@
 drop table t1;
 
 --echo # iteration 31
-set global maria_page_checksum = 1 ;
-create table t1(a int) engine=maria PAGE_CHECKSUM=1 ;
+set global aria_page_checksum = 1 ;
+create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
     close FILE;
 EOF
-set global maria_page_checksum = 0 ;
-alter table t1 engine=maria  ;
+set global aria_page_checksum = 0 ;
+alter table t1 engine=aria  ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
@@ -919,27 +919,27 @@
 drop table t1;
 
 --echo # iteration 32
-set global maria_page_checksum = 1 ;
-create table t1(a int) engine=maria PAGE_CHECKSUM=1 ;
+set global aria_page_checksum = 1 ;
+create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
     close FILE;
 EOF
-set global maria_page_checksum = 0 ;
+set global aria_page_checksum = 0 ;
 alter table t1 PAGE_CHECKSUM=0 ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
@@ -948,27 +948,27 @@
 drop table t1;
 
 --echo # iteration 33
-set global maria_page_checksum = 1 ;
-create table t1(a int) engine=maria PAGE_CHECKSUM=1 ;
+set global aria_page_checksum = 1 ;
+create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
     close FILE;
 EOF
-set global maria_page_checksum = 0 ;
+set global aria_page_checksum = 0 ;
 alter table t1 PAGE_CHECKSUM=1 ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
@@ -977,27 +977,27 @@
 drop table t1;
 
 --echo # iteration 34
-set global maria_page_checksum = 1 ;
-create table t1(a int) engine=maria PAGE_CHECKSUM=1 ;
+set global aria_page_checksum = 1 ;
+create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
     close FILE;
 EOF
-set global maria_page_checksum = 1 ;
-alter table t1 engine=maria  ;
+set global aria_page_checksum = 1 ;
+alter table t1 engine=aria  ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
@@ -1006,27 +1006,27 @@
 drop table t1;
 
 --echo # iteration 35
-set global maria_page_checksum = 1 ;
-create table t1(a int) engine=maria PAGE_CHECKSUM=1 ;
+set global aria_page_checksum = 1 ;
+create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
     close FILE;
 EOF
-set global maria_page_checksum = 1 ;
+set global aria_page_checksum = 1 ;
 alter table t1 PAGE_CHECKSUM=0 ;
 show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
@@ -1035,27 +1035,27 @@
 drop table t1;
 
 --echo # iteration 36
-set global maria_page_checksum = 1 ;
-create table t1(a int) engine=maria PAGE_CHECKSUM=1 ;
+set global aria_page_checksum = 1 ;
+create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
     close FILE;
 EOF
-set global maria_page_checksum = 1 ;
+set global aria_page_checksum = 1 ;
 alter table t1 PAGE_CHECKSUM=1 ;
 show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     my @content= grep(/Page checksums are used/, <FILE>);
     print @content ? $content[0] : "Page checksums are not used\n";
@@ -1065,20 +1065,20 @@
 
 #
 # Test for BUG#37005
-# "Maria: ALTER TABLE TRANSACTIONAL=0 leaves table transactional inside Maria"
+# "Aria: ALTER TABLE TRANSACTIONAL=0 leaves table transactional inside Aria"
 #
 
 # we scan through combinations in the cartesian product of
 # (clauses in CREATE TABLE) x (clauses in ALTER TABLE).
 
 --echo # iteration 1
-create table t1(a int) engine=maria  ;
+create table t1(a int) engine=aria  ;
 show create table t1;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     print grep(/Crashsafe/, <FILE>);
     close FILE;
@@ -1086,11 +1086,11 @@
 
 alter table t1 modify a bigint ;
 show create table t1;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     print grep(/Crashsafe/, <FILE>);
     close FILE;
@@ -1099,13 +1099,13 @@
 
 
 --echo # iteration 2
-create table t1(a int) engine=maria  ;
+create table t1(a int) engine=aria  ;
 show create table t1;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     print grep(/Crashsafe/, <FILE>);
     close FILE;
@@ -1113,11 +1113,11 @@
 
 alter table t1  transactional=0 ;
 show create table t1;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     print grep(/Crashsafe/, <FILE>);
     close FILE;
@@ -1126,13 +1126,13 @@
 
 
 --echo # iteration 3
-create table t1(a int) engine=maria  ;
+create table t1(a int) engine=aria  ;
 show create table t1;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     print grep(/Crashsafe/, <FILE>);
     close FILE;
@@ -1140,11 +1140,11 @@
 
 alter table t1  transactional=1 ;
 show create table t1;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     print grep(/Crashsafe/, <FILE>);
     close FILE;
@@ -1153,25 +1153,25 @@
 
 
 --echo # iteration 4
-create table t1(a int) engine=maria  ;
+create table t1(a int) engine=aria  ;
 show create table t1;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     print grep(/Crashsafe/, <FILE>);
     close FILE;
 EOF
 
-alter table t1 engine=maria  ;
+alter table t1 engine=aria  ;
 show create table t1;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     print grep(/Crashsafe/, <FILE>);
     close FILE;
@@ -1180,25 +1180,25 @@
 
 
 --echo # iteration 5
-create table t1(a int) engine=maria  ;
+create table t1(a int) engine=aria  ;
 show create table t1;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     print grep(/Crashsafe/, <FILE>);
     close FILE;
 EOF
 
-alter table t1 engine=maria transactional=0 ;
+alter table t1 engine=aria transactional=0 ;
 show create table t1;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     print grep(/Crashsafe/, <FILE>);
     close FILE;
@@ -1207,25 +1207,25 @@
 
 
 --echo # iteration 6
-create table t1(a int) engine=maria  ;
+create table t1(a int) engine=aria  ;
 show create table t1;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     print grep(/Crashsafe/, <FILE>);
     close FILE;
 EOF
 
-alter table t1 engine=maria transactional=1 ;
+alter table t1 engine=aria transactional=1 ;
 show create table t1;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     print grep(/Crashsafe/, <FILE>);
     close FILE;
@@ -1234,13 +1234,13 @@
 
 
 --echo # iteration 7
-create table t1(a int) engine=maria transactional=0 ;
+create table t1(a int) engine=aria transactional=0 ;
 show create table t1;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     print grep(/Crashsafe/, <FILE>);
     close FILE;
@@ -1248,11 +1248,11 @@
 
 alter table t1 modify a bigint ;
 show create table t1;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     print grep(/Crashsafe/, <FILE>);
     close FILE;
@@ -1261,13 +1261,13 @@
 
 
 --echo # iteration 8
-create table t1(a int) engine=maria transactional=0 ;
+create table t1(a int) engine=aria transactional=0 ;
 show create table t1;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     print grep(/Crashsafe/, <FILE>);
     close FILE;
@@ -1275,11 +1275,11 @@
 
 alter table t1  transactional=0 ;
 show create table t1;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     print grep(/Crashsafe/, <FILE>);
     close FILE;
@@ -1288,13 +1288,13 @@
 
 
 --echo # iteration 9
-create table t1(a int) engine=maria transactional=0 ;
+create table t1(a int) engine=aria transactional=0 ;
 show create table t1;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     print grep(/Crashsafe/, <FILE>);
     close FILE;
@@ -1302,11 +1302,11 @@
 
 alter table t1  transactional=1 ;
 show create table t1;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     print grep(/Crashsafe/, <FILE>);
     close FILE;
@@ -1315,25 +1315,25 @@
 
 
 --echo # iteration 10
-create table t1(a int) engine=maria transactional=0 ;
+create table t1(a int) engine=aria transactional=0 ;
 show create table t1;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     print grep(/Crashsafe/, <FILE>);
     close FILE;
 EOF
 
-alter table t1 engine=maria  ;
+alter table t1 engine=aria  ;
 show create table t1;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     print grep(/Crashsafe/, <FILE>);
     close FILE;
@@ -1342,25 +1342,25 @@
 
 
 --echo # iteration 11
-create table t1(a int) engine=maria transactional=0 ;
+create table t1(a int) engine=aria transactional=0 ;
 show create table t1;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     print grep(/Crashsafe/, <FILE>);
     close FILE;
 EOF
 
-alter table t1 engine=maria transactional=0 ;
+alter table t1 engine=aria transactional=0 ;
 show create table t1;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     print grep(/Crashsafe/, <FILE>);
     close FILE;
@@ -1369,25 +1369,25 @@
 
 
 --echo # iteration 12
-create table t1(a int) engine=maria transactional=0 ;
+create table t1(a int) engine=aria transactional=0 ;
 show create table t1;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     print grep(/Crashsafe/, <FILE>);
     close FILE;
 EOF
 
-alter table t1 engine=maria transactional=1 ;
+alter table t1 engine=aria transactional=1 ;
 show create table t1;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     print grep(/Crashsafe/, <FILE>);
     close FILE;
@@ -1396,13 +1396,13 @@
 
 
 --echo # iteration 13
-create table t1(a int) engine=maria transactional=1 ;
+create table t1(a int) engine=aria transactional=1 ;
 show create table t1;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     print grep(/Crashsafe/, <FILE>);
     close FILE;
@@ -1410,11 +1410,11 @@
 
 alter table t1 modify a bigint ;
 show create table t1;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     print grep(/Crashsafe/, <FILE>);
     close FILE;
@@ -1423,13 +1423,13 @@
 
 
 --echo # iteration 14
-create table t1(a int) engine=maria transactional=1 ;
+create table t1(a int) engine=aria transactional=1 ;
 show create table t1;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     print grep(/Crashsafe/, <FILE>);
     close FILE;
@@ -1437,11 +1437,11 @@
 
 alter table t1  transactional=0 ;
 show create table t1;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     print grep(/Crashsafe/, <FILE>);
     close FILE;
@@ -1450,13 +1450,13 @@
 
 
 --echo # iteration 15
-create table t1(a int) engine=maria transactional=1 ;
+create table t1(a int) engine=aria transactional=1 ;
 show create table t1;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     print grep(/Crashsafe/, <FILE>);
     close FILE;
@@ -1464,11 +1464,11 @@
 
 alter table t1  transactional=1 ;
 show create table t1;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     print grep(/Crashsafe/, <FILE>);
     close FILE;
@@ -1477,25 +1477,25 @@
 
 
 --echo # iteration 16
-create table t1(a int) engine=maria transactional=1 ;
+create table t1(a int) engine=aria transactional=1 ;
 show create table t1;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     print grep(/Crashsafe/, <FILE>);
     close FILE;
 EOF
 
-alter table t1 engine=maria  ;
+alter table t1 engine=aria  ;
 show create table t1;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     print grep(/Crashsafe/, <FILE>);
     close FILE;
@@ -1504,25 +1504,25 @@
 
 
 --echo # iteration 17
-create table t1(a int) engine=maria transactional=1 ;
+create table t1(a int) engine=aria transactional=1 ;
 show create table t1;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     print grep(/Crashsafe/, <FILE>);
     close FILE;
 EOF
 
-alter table t1 engine=maria transactional=0 ;
+alter table t1 engine=aria transactional=0 ;
 show create table t1;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     print grep(/Crashsafe/, <FILE>);
     close FILE;
@@ -1531,25 +1531,25 @@
 
 
 --echo # iteration 18
-create table t1(a int) engine=maria transactional=1 ;
+create table t1(a int) engine=aria transactional=1 ;
 show create table t1;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     print grep(/Crashsafe/, <FILE>);
     close FILE;
 EOF
 
-alter table t1 engine=maria transactional=1 ;
+alter table t1 engine=aria transactional=1 ;
 show create table t1;
---exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
+--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
 perl;
     use strict;
     use warnings;
-    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
+    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
     open(FILE, "<", $fname) or die;
     print grep(/Crashsafe/, <FILE>);
     close FILE;

=== modified file 'mysql-test/suite/maria/t/maria-partitioning.test'
--- a/mysql-test/suite/maria/t/maria-partitioning.test	2008-12-22 00:19:43 +0000
+++ b/mysql-test/suite/maria/t/maria-partitioning.test	2010-09-12 16:40:01 +0000
@@ -1,21 +1,21 @@
 #
-# Testing of potential problems in Maria with partitioning
+# Testing of potential problems in Aria with partitioning
 #
 
 --source include/have_maria.inc
 --source include/have_partition.inc
 
 let $default_engine=`select @@global.storage_engine`;
-let $default_checksum=`select @@global.maria_page_checksum`;
-set global storage_engine=maria;
-set session storage_engine=maria;
+let $default_checksum=`select @@global.aria_page_checksum`;
+set global storage_engine=aria;
+set session storage_engine=aria;
 
 #
 # Test outer join const propagation
 #
 DROP TABLE if exists t1,t2;
-create table t2(a blob) engine=maria;
-create table t1(a int primary key) engine=maria;
+create table t2(a blob) engine=aria;
+create table t1(a int primary key) engine=aria;
 insert into t2 values ('foo'),('bar');
 select * from t2 left join t1 on (t2.a=t1.a) where t2.a='bbb';
 insert into t1 values (1);
@@ -24,8 +24,8 @@
 select * from t2 left join t1 on (t2.a=t1.a) where t2.a='bbb';
 drop table t1,t2;
 
-create table t2(a blob) engine= maria;
-create table t1(a int primary key) engine= maria PARTITION BY HASH (a) PARTITIONS 2;
+create table t2(a blob) engine= aria;
+create table t1(a int primary key) engine= aria PARTITION BY HASH (a) PARTITIONS 2;
 insert into t2 values ('foo'),('bar');
 select * from t2 left join t1 on (t2.a=t1.a) where t2.a='bbb';
 insert into t1 values (1);

=== modified file 'mysql-test/suite/maria/t/maria-preload.test'
--- a/mysql-test/suite/maria/t/maria-preload.test	2009-06-05 15:35:22 +0000
+++ b/mysql-test/suite/maria/t/maria-preload.test	2010-09-12 16:40:01 +0000
@@ -11,15 +11,15 @@
 --enable_warnings
 
 # Background dirty pages flushing may influence page cache stats:
-let $def_checkinterval=`select @@global.maria_checkpoint_interval`;
-set global maria_checkpoint_interval=0;
+let $def_checkinterval=`select @@global.aria_checkpoint_interval`;
+set global aria_checkpoint_interval=0;
 
 # Work around BUG#34911 "FLUSH STATUS doesn't flush what it should":
 # compute differences in status variables before and after relevant
-# queries. Maria_pagecache_read_requests varies accross machines.
+# queries. Aria_pagecache_read_requests varies accross machines.
 create temporary table initial
 select variable_name,variable_value from
-information_schema.global_status where variable_name like "Maria_pagecache_reads";
+information_schema.global_status where variable_name like "Aria_pagecache_reads";
 
 # we don't use block-format because we want page cache stats
 # about indices and not data pages.
@@ -29,14 +29,14 @@
   b char(16) not null,
   primary key (a),
   key (b)
-) engine=maria row_format=dynamic;
+) engine=aria row_format=dynamic;
 
 create table t2(
   a int not null auto_increment,
   b char(16) not null,
   primary key (a),
   key (b)
-) engine=maria row_format=dynamic;
+) engine=aria row_format=dynamic;
 
 insert into t1(b) values 
   ('test0'),
@@ -71,7 +71,7 @@
 select count(*) from t2;
 
 flush tables; flush status;
-let $show_stat=select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Maria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;
+let $show_stat=select g.variable_name,g.variable_value-i.variable_value from information_schema.global_status as g,initial as i where g.variable_name like "Aria_pagecache_read%" and g.variable_name=i.variable_name order by g.variable_name desc;
 eval $show_stat;
 select count(*) from t1 where b = 'test1';
 eval $show_stat;
@@ -116,11 +116,11 @@
 drop table t1, t2;
 drop temporary table initial;
 
-# check that Maria didn't use key cache
+# check that Aria didn't use key cache
 show status like "key_read%";
 
 --disable_result_log
 --disable_query_log
-eval set global maria_checkpoint_interval=$def_checkinterval;
+eval set global aria_checkpoint_interval=$def_checkinterval;
 --enable_result_log
 --enable_query_log

=== modified file 'mysql-test/suite/maria/t/maria-purge.test'
--- a/mysql-test/suite/maria/t/maria-purge.test	2009-02-19 09:01:25 +0000
+++ b/mysql-test/suite/maria/t/maria-purge.test	2010-09-12 16:40:01 +0000
@@ -2,7 +2,7 @@
 -- source include/big_test.inc
 -- source include/not_embedded.inc
 
-# pre-requisites for maria_empty_logs
+# pre-requisites for aria_empty_logs
 connect (admin, localhost, root,,test,,);
 #
 --enable_reconnect
@@ -10,18 +10,18 @@
 --enable_reconnect
 # end of pre-requisites
 
-# SHOW ENGINE MARIA LOGS could be influenced by older logs
+# SHOW ENGINE ARIA LOGS could be influenced by older logs
 # Also, possibly automatic checkpoints (see if that happens in
 # practice)
 -- source include/maria_empty_logs.inc
 
 let $default=`select @@global.storage_engine`;
-set global storage_engine=maria;
-set session storage_engine=maria;
-let $def_logsize=`select @@global.maria_log_file_size`;
-let $def_checkinterval=`select @@global.maria_checkpoint_interval`;
+set global storage_engine=aria;
+set session storage_engine=aria;
+let $def_logsize=`select @@global.aria_log_file_size`;
+let $def_checkinterval=`select @@global.aria_checkpoint_interval`;
 
-set global maria_log_file_size=4294967295;
+set global aria_log_file_size=4294967295;
 # Initialise
 --disable_warnings
 drop table if exists t1,t2;
@@ -61,58 +61,58 @@
 insert into t2 select * from t1;
 insert into t1 select * from t2;
 
-set global maria_log_file_size=16777216;
+set global aria_log_file_size=16777216;
 # force a checkpoint to allow log purge
-eval set global maria_checkpoint_interval=$def_checkinterval;
---replace_regex /Size +[0-9]+ ; .+maria_log/maria_log/
-SHOW ENGINE maria logs;
+eval set global aria_checkpoint_interval=$def_checkinterval;
+--replace_regex /Size +[0-9]+ ; .+aria_log/aria_log/
+SHOW ENGINE aria logs;
 
 insert into t2 select * from t1;
 insert into t1 select * from t2;
 
-eval set global maria_checkpoint_interval=$def_checkinterval;
---replace_regex /Size +[0-9]+ ; .+maria_log/maria_log/
-SHOW ENGINE maria logs;
-set global maria_log_file_size=16777216;
-select @@global.maria_log_file_size;
-eval set global maria_checkpoint_interval=$def_checkinterval;
---replace_regex /Size +[0-9]+ ; .+maria_log/maria_log/
-SHOW ENGINE maria logs;
-set global maria_log_file_size=8388608;
-select @@global.maria_log_file_size;
-
-set global maria_log_purge_type=at_flush;
-insert into t1 select * from t2;
-eval set global maria_checkpoint_interval=$def_checkinterval;
---replace_regex /Size +[0-9]+ ; .+maria_log/maria_log/
-SHOW ENGINE maria logs;
-flush logs;
---replace_regex /Size +[0-9]+ ; .+maria_log/maria_log/
-SHOW ENGINE maria logs;
-
-set global maria_log_file_size=16777216;
-set global maria_log_purge_type=external;
-insert into t1 select * from t2;
-eval set global maria_checkpoint_interval=$def_checkinterval;
---replace_regex /Size +[0-9]+ ; .+maria_log/maria_log/
-SHOW ENGINE maria logs;
-flush logs;
---replace_regex /Size +[0-9]+ ; .+maria_log/maria_log/
-SHOW ENGINE maria logs;
-
-set global maria_log_purge_type=immediate;
-insert into t1 select * from t2;
-eval set global maria_checkpoint_interval=$def_checkinterval;
---replace_regex /Size +[0-9]+ ; .+maria_log/maria_log/
-SHOW ENGINE maria logs;
+eval set global aria_checkpoint_interval=$def_checkinterval;
+--replace_regex /Size +[0-9]+ ; .+aria_log/aria_log/
+SHOW ENGINE aria logs;
+set global aria_log_file_size=16777216;
+select @@global.aria_log_file_size;
+eval set global aria_checkpoint_interval=$def_checkinterval;
+--replace_regex /Size +[0-9]+ ; .+aria_log/aria_log/
+SHOW ENGINE aria logs;
+set global aria_log_file_size=8388608;
+select @@global.aria_log_file_size;
+
+set global aria_log_purge_type=at_flush;
+insert into t1 select * from t2;
+eval set global aria_checkpoint_interval=$def_checkinterval;
+--replace_regex /Size +[0-9]+ ; .+aria_log/aria_log/
+SHOW ENGINE aria logs;
+flush logs;
+--replace_regex /Size +[0-9]+ ; .+aria_log/aria_log/
+SHOW ENGINE aria logs;
+
+set global aria_log_file_size=16777216;
+set global aria_log_purge_type=external;
+insert into t1 select * from t2;
+eval set global aria_checkpoint_interval=$def_checkinterval;
+--replace_regex /Size +[0-9]+ ; .+aria_log/aria_log/
+SHOW ENGINE aria logs;
+flush logs;
+--replace_regex /Size +[0-9]+ ; .+aria_log/aria_log/
+SHOW ENGINE aria logs;
+
+set global aria_log_purge_type=immediate;
+insert into t1 select * from t2;
+eval set global aria_checkpoint_interval=$def_checkinterval;
+--replace_regex /Size +[0-9]+ ; .+aria_log/aria_log/
+SHOW ENGINE aria logs;
 
 drop table t1, t2;
 
 --disable_result_log
 --disable_query_log
-set global maria_log_purge_type=immediate;
+set global aria_log_purge_type=immediate;
 eval set global storage_engine=$default;
-eval set global maria_log_file_size=$def_logsize;
-eval set global maria_checkpoint_interval=$def_checkinterval;
+eval set global aria_log_file_size=$def_logsize;
+eval set global aria_checkpoint_interval=$def_checkinterval;
 --enable_result_log
 --enable_query_log

=== modified file 'mysql-test/suite/maria/t/maria-recover-master.opt'
--- a/mysql-test/suite/maria/t/maria-recover-master.opt	2008-10-01 12:13:39 +0000
+++ b/mysql-test/suite/maria/t/maria-recover-master.opt	2010-09-12 16:40:01 +0000
@@ -1,1 +1,1 @@
---loose-maria-recover=backup --loose-maria-log-dir-path=$MYSQLTEST_VARDIR/tmp
+--loose-aria-recover=backup --loose-aria-log-dir-path=$MYSQLTEST_VARDIR/tmp

=== modified file 'mysql-test/suite/maria/t/maria-recover.test'
--- a/mysql-test/suite/maria/t/maria-recover.test	2011-01-20 17:08:12 +0000
+++ b/mysql-test/suite/maria/t/maria-recover.test	2011-01-23 07:23:47 +0000
@@ -1,4 +1,4 @@
-# Test of the --maria-recover option.
+# Test of the --aria-recover option.
 
 --source include/have_maria.inc
 
@@ -16,13 +16,13 @@
 # so that the perl code below can access it.
 let MYSQLD_DATADIR= `select @@datadir`;
 
-select @@global.maria_recover;
-set global maria_recover=off;
-select @@global.maria_recover;
-set global maria_recover=default;
-select @@global.maria_recover;
-set global maria_recover=normal;
-select @@global.maria_recover;
+select @@global.aria_recover;
+set global aria_recover=off;
+select @@global.aria_recover;
+set global aria_recover=default;
+select @@global.aria_recover;
+set global aria_recover=normal;
+select @@global.aria_recover;
 
 --disable_warnings
 drop database if exists mysqltest;
@@ -31,7 +31,7 @@
 
 use mysqltest;
 
-create table t1 (a varchar(1000), index(a)) engine=maria;
+create table t1 (a varchar(1000), index(a)) engine=aria;
 insert into t1 values("ThursdayMorningsMarket");
 
 flush table t1; # put index page on disk
@@ -47,7 +47,7 @@
 copy_file $MYSQLD_DATADIR/mysqltest/t1.MAI $MYSQLD_DATADIR/mysqltest/t_corrupted2.MAI;
 
 # Ruin the index file.
-# If maria-block-size is smaller than the default, the corruption
+# If aria-block-size is smaller than the default, the corruption
 # messages will differ.
 perl;
     use strict;
@@ -67,4 +67,4 @@
 select * from t_corrupted2; # should show just rows
 
 drop database mysqltest;
-set global maria_recover=backup;
+set global aria_recover=backup;

=== modified file 'mysql-test/suite/maria/t/maria-recovery-big.test'
--- a/mysql-test/suite/maria/t/maria-recovery-big.test	2009-01-15 14:29:14 +0000
+++ b/mysql-test/suite/maria/t/maria-recovery-big.test	2010-09-12 16:40:01 +0000
@@ -1,4 +1,4 @@
-# Maria recovery test which cannot run in shared memory
+# Aria recovery test which cannot run in shared memory
 # because it generates too much data, or which takes a lot of time.
 
 --source include/not_embedded.inc
@@ -9,7 +9,7 @@
 --source include/have_maria.inc
 --source include/big_test.inc
 
-set global maria_log_file_size=4294967295;
+set global aria_log_file_size=4294967295;
 
 --disable_warnings
 drop database if exists mysqltest;
@@ -33,7 +33,7 @@
 
 --echo * TEST of recovery with blobs
 -- source include/maria_empty_logs.inc
-create table t1 (a int, b longtext) engine=maria table_checksum=1;
+create table t1 (a int, b longtext) engine=aria table_checksum=1;
 let $mms_tables=1;
 -- source include/maria_make_snapshot_for_feeding_recovery.inc
 insert into t1 values (1,"123456789012345678901234567890"),(2,"09876543210987654321");
@@ -57,7 +57,7 @@
 let $mvr_restore_old_snapshot=1;
 let $mms_compare_physically=0;
 let $mvr_debug_option="+d,maria_flush_whole_log,maria_crash";
-let $mvr_crash_statement= set global maria_checkpoint_interval=1;
+let $mvr_crash_statement= set global aria_checkpoint_interval=1;
 -- source include/maria_verify_recovery.inc
 drop table t1;
 

=== modified file 'mysql-test/suite/maria/t/maria-recovery-bitmap.test'
--- a/mysql-test/suite/maria/t/maria-recovery-bitmap.test	2010-04-28 12:52:24 +0000
+++ b/mysql-test/suite/maria/t/maria-recovery-bitmap.test	2010-09-12 16:40:01 +0000
@@ -1,4 +1,4 @@
-# Tests of Maria's recovery of the bitmap pages
+# Tests of Aria's recovery of the bitmap pages
 
 --source include/not_embedded.inc
 # Don't test this under valgrind, memory leaks will occur as we crash
@@ -25,14 +25,14 @@
 
 -- source include/maria_empty_logs.inc
 let $mms_tables=1;
-create table t1 (a varchar(10000)) engine=maria;
+create table t1 (a varchar(10000)) engine=aria;
 
 # we want recovery to use the tables as they were at time of crash
 let $mvr_restore_old_snapshot=0;
 # UNDO phase prevents physical comparison, normally,
 # so we'll only use checksums to compare.
 let $mms_compare_physically=0;
-let $mvr_crash_statement= set global maria_checkpoint_interval=1;
+let $mvr_crash_statement= set global aria_checkpoint_interval=1;
 
 --echo * TEST of over-allocated bitmap not flushed by checkpoint
 let $mvr_debug_option="+d,maria_crash";
@@ -45,7 +45,7 @@
 insert into t1 values ("bbbbbbb");
 delete from t1 limit 1;
 # Use a separate connection here. The reason is that we leave a dangling
-# --send on the connection during maria_verify_recovery.inc, which makes that
+# --send on the connection during aria_verify_recovery.inc, which makes that
 # script fail if it were to try to use that connection before --reap.
 connect (extra, localhost, root,,mysqltest,,);
 set session debug="+d,info,enter,exit,maria_over_alloc_bitmap";
@@ -59,7 +59,7 @@
 # bitmap page; as REDO-UNDO was not written, bitmap and data page
 # would be inconsistent. Correct checkpoint will wait until UNDO is
 # written.
-set global maria_checkpoint_interval=1;
+set global aria_checkpoint_interval=1;
 -- source include/maria_verify_recovery.inc
 connection default;
 

=== modified file 'mysql-test/suite/maria/t/maria-recovery-master.opt'
--- a/mysql-test/suite/maria/t/maria-recovery-master.opt	2008-10-01 12:13:39 +0000
+++ b/mysql-test/suite/maria/t/maria-recovery-master.opt	2010-09-12 16:40:01 +0000
@@ -1,1 +1,1 @@
---skip-stack-trace --skip-core-file --loose-maria-log-dir-path=$MYSQLTEST_VARDIR/tmp
+--skip-stack-trace --skip-core-file --loose-aria-log-dir-path=$MYSQLTEST_VARDIR/tmp

=== modified file 'mysql-test/suite/maria/t/maria-recovery-rtree-ft.test'
--- a/mysql-test/suite/maria/t/maria-recovery-rtree-ft.test	2011-01-03 14:33:39 +0000
+++ b/mysql-test/suite/maria/t/maria-recovery-rtree-ft.test	2011-01-05 14:03:58 +0000
@@ -8,7 +8,7 @@
 --source include/have_maria.inc
 --source include/long_test.inc
 
-set global maria_log_file_size=4294967295;
+set global aria_log_file_size=4294967295;
 let $MARIA_LOG=.;
 
 --disable_warnings
@@ -35,10 +35,10 @@
   kind ENUM('po', 'pp', 'rr', 'dr', 'rd', 'ts', 'cl') NOT NULL DEFAULT 'po',
   name VARCHAR(32)
   ,SPATIAL key (line)
-) transactional=1 row_format=page engine=maria;
+) transactional=1 row_format=page engine=aria;
 SHOW INDEX FROM t1;
 CREATE TABLE t2 (a VARCHAR(200), b TEXT, FULLTEXT (a,b)
-) transactional=1 row_format=page engine=maria;
+) transactional=1 row_format=page engine=aria;
 SHOW INDEX FROM t2;
 
 let $query1=   INSERT INTO t1 (name, kind, line) VALUES 
@@ -114,7 +114,7 @@
 let $mvr_restore_old_snapshot=1;
 let $mms_compare_physically=0;
 let $mvr_debug_option="+d,maria_flush_whole_log,maria_crash";
-let $mvr_crash_statement= set global maria_checkpoint_interval=1;
+let $mvr_crash_statement= set global aria_checkpoint_interval=1;
 # the script below will trigger recovery and compare checksums
 -- source include/maria_verify_recovery.inc
 
@@ -133,7 +133,7 @@
 # UNDO phase prevents physical comparison, normally,
 # so we'll only use checksums to compare.
 let $mms_compare_physically=0;
-let $mvr_crash_statement= set global maria_checkpoint_interval=1;
+let $mvr_crash_statement= set global aria_checkpoint_interval=1;
 
 # Note that we don't remove logs between iterations. Test is
 # cumulative (each new recovery processes more log records than the previous).

=== modified file 'mysql-test/suite/maria/t/maria-recovery.test'
--- a/mysql-test/suite/maria/t/maria-recovery.test	2009-02-19 09:01:25 +0000
+++ b/mysql-test/suite/maria/t/maria-recovery.test	2010-09-12 16:40:01 +0000
@@ -5,7 +5,7 @@
 --source include/have_debug.inc
 --source include/have_maria.inc
 
-set global maria_log_file_size=4294967295;
+set global aria_log_file_size=4294967295;
 let $MARIA_LOG=../../tmp;
 
 --disable_warnings
@@ -27,7 +27,7 @@
 # A sample test
 -- source include/maria_empty_logs.inc
 let $mms_tables=1;
-create table t1 (a varchar(1000)) engine=maria;
+create table t1 (a varchar(1000)) engine=aria;
 
 --echo * TEST of REDO: see if recovery can reconstruct if we give it an old table
 
@@ -42,7 +42,7 @@
 # produce a physically identical table.
 let $mms_compare_physically=1;
 let $mvr_debug_option="+d,maria_flush_whole_log,maria_crash";
-let $mvr_crash_statement= set global maria_checkpoint_interval=1;
+let $mvr_crash_statement= set global aria_checkpoint_interval=1;
 # the script below will trigger recovery and compare checksums
 -- source include/maria_verify_recovery.inc
 let $mms_compare_physically=0;
@@ -63,7 +63,7 @@
 # UNDO phase prevents physical comparison, normally,
 # so we'll only use checksums to compare.
 let $mms_compare_physically=0;
-let $mvr_crash_statement= set global maria_checkpoint_interval=1;
+let $mvr_crash_statement= set global aria_checkpoint_interval=1;
 
 # Note that we don't remove logs between iterations. Test is
 # cumulative (each new recovery processes more log records than the previous).
@@ -131,7 +131,7 @@
   i int,
   b blob default NULL,
   c varchar(6000) default NULL
-) ENGINE=MARIA CHECKSUM=1;
+) ENGINE=ARIA CHECKSUM=1;
 -- source include/maria_make_snapshot_for_feeding_recovery.inc
 INSERT INTO t1 VALUES (1, REPEAT('a', 5000), REPEAT('b', 5000));
 UPDATE t1 SET i=3, b=CONCAT(b,'c') WHERE i=1;
@@ -141,7 +141,7 @@
 let $mvr_restore_old_snapshot=1;
 let $mms_compare_physically=0;
 let $mvr_debug_option="+d,maria_flush_whole_log,maria_crash";
-let $mvr_crash_statement= set global maria_checkpoint_interval=1;
+let $mvr_crash_statement= set global aria_checkpoint_interval=1;
 -- source include/maria_verify_recovery.inc
 SELECT LENGTH(b) FROM t1 WHERE i=3;
 drop table t1;
@@ -154,7 +154,7 @@
   i int auto_increment primary key,
   c varchar(6),
   key(c)
-) ENGINE=MARIA;
+) ENGINE=ARIA;
 insert into t1 values(null,"b");
 -- source include/maria_make_snapshot_for_feeding_recovery.inc
 insert into t1 values(null,"a"), (null,"c"), (null,"d");
@@ -164,7 +164,7 @@
 let $mvr_restore_old_snapshot=1;
 let $mms_compare_physically=0;
 let $mvr_debug_option="+d,maria_flush_whole_log,maria_crash";
-let $mvr_crash_statement= set global maria_checkpoint_interval=1;
+let $mvr_crash_statement= set global aria_checkpoint_interval=1;
 -- source include/maria_verify_recovery.inc
 show create table t1;
 
@@ -176,7 +176,7 @@
 let $mvr_restore_old_snapshot=1;
 let $mms_compare_physically=0;
 let $mvr_debug_option="+d,maria_flush_whole_log,maria_crash";
-let $mvr_crash_statement= set global maria_checkpoint_interval=1;
+let $mvr_crash_statement= set global aria_checkpoint_interval=1;
 -- source include/maria_verify_recovery.inc
 show create table t1;
 
@@ -187,7 +187,7 @@
 let $mvr_restore_old_snapshot=0;
 let $mms_compare_physically=0;
 let $mvr_debug_option="+d,maria_flush_whole_log,maria_crash";
-let $mvr_crash_statement= set global maria_checkpoint_interval=1;
+let $mvr_crash_statement= set global aria_checkpoint_interval=1;
 lock tables t1 write;
 insert into t1 values(null, "e");
 -- source include/maria_verify_recovery.inc

=== modified file 'mysql-test/suite/maria/t/maria-recovery2-master.opt'
--- a/mysql-test/suite/maria/t/maria-recovery2-master.opt	2010-02-10 19:06:24 +0000
+++ b/mysql-test/suite/maria/t/maria-recovery2-master.opt	2010-09-12 16:40:01 +0000
@@ -1,1 +1,1 @@
---skip-stack-trace --skip-core-file --loose-maria-log-dir-path=$MYSQLTEST_VARDIR/tmp --myisam-recover=
+--skip-stack-trace --skip-core-file --loose-aria-log-dir-path=$MYSQLTEST_VARDIR/tmp --myisam-recover=

=== modified file 'mysql-test/suite/maria/t/maria-recovery2.test'
--- a/mysql-test/suite/maria/t/maria-recovery2.test	2009-02-19 09:01:25 +0000
+++ b/mysql-test/suite/maria/t/maria-recovery2.test	2010-09-12 16:40:01 +0000
@@ -5,10 +5,10 @@
 --source include/have_debug.inc
 --source include/have_maria.inc
 
-call mtr.add_suppression("File '.*maria_log.000.*' not found \\(Errcode: 2\\)");
-call mtr.add_suppression("Table '.\/mysqltest\/t_corrupted1' is crashed, skipping it. Please repair it with maria_chk -r");
+call mtr.add_suppression("File '.*aria_log.000.*' not found \\(Errcode: 2\\)");
+call mtr.add_suppression("Table '.\/mysqltest\/t_corrupted1' is crashed, skipping it. Please repair it with aria_chk -r");
 
-set global maria_log_file_size=4294967295;
+set global aria_log_file_size=4294967295;
 let $MARIA_LOG=../../tmp;
 
 --disable_warnings
@@ -31,13 +31,13 @@
 let $mvr_restore_old_snapshot=0;
 let $mms_compare_physically=0;
 let $mvr_debug_option="+d,maria_flush_whole_log,maria_crash";
-let $mvr_crash_statement= set global maria_checkpoint_interval=1;
+let $mvr_crash_statement= set global aria_checkpoint_interval=1;
 
 # Test of removing logs manually
 --echo * TEST of removing logs manually
 let $mel_keep_control_file=1;
 # this will shut mysqld down cleanly (so, take a checkpoint) and
-# remove only logs; at restart Maria will create a new log with a high
+# remove only logs; at restart Aria will create a new log with a high
 # number
 -- source include/maria_empty_logs.inc
 let $mel_keep_control_file=0;
@@ -49,8 +49,8 @@
 # UNDO phase prevents physical comparison, normally,
 # so we'll only use checksums to compare.
 let $mms_compare_physically=0;
-let $mvr_crash_statement= set global maria_checkpoint_interval=1;
-create table t1(a int) engine=maria;
+let $mvr_crash_statement= set global aria_checkpoint_interval=1;
+create table t1(a int) engine=aria;
 insert into t1 values(1),(2);
 -- source include/maria_make_snapshot_for_comparison.inc
 lock tables t1 write;
@@ -64,8 +64,8 @@
 # Don't take a full checkpoints, we want to test checkpoint vs dirty pages
 set global debug="+d,info,query,enter,exit,loop,maria_checkpoint_indirect";
 # restart checkpoint thread for it to notice the above
-set global maria_checkpoint_interval=10000;
-create table t1(a int, b varchar(10), index(a,b)) engine=maria;
+set global aria_checkpoint_interval=10000;
+create table t1(a int, b varchar(10), index(a,b)) engine=aria;
 insert into t1 values(1,"a"),(2,"b"),(3,"c");
 delete from t1 where b="b";
 update t1 set b="d" where a=1;
@@ -74,15 +74,15 @@
 insert into t1 values(4,"e"),(5,"f"),(6,"g");
 update t1 set b="h" where a=5;
 delete from t1 where b="g";
-show status like "Maria_pagecache_blocks_not_flushed";
+show status like "Aria_pagecache_blocks_not_flushed";
 # force a checkpoint; there should be dirty pages and an open transaction
-set global maria_checkpoint_interval=10000;
+set global aria_checkpoint_interval=10000;
 # do some more work
 update t1 set b="i" where a=5;
 let $mvr_restore_old_snapshot=0;
 let $mms_compare_physically=0;
 let $mvr_debug_option="+d,maria_crash";
-let $mvr_crash_statement= set global maria_checkpoint_interval=1;
+let $mvr_crash_statement= set global aria_checkpoint_interval=1;
 # Now we have a recovery, which should use the checkpoint record
 # and its dirty pages list.
 -- source include/maria_verify_recovery.inc
@@ -90,10 +90,10 @@
 
 --echo Test of REPAIR's implicit commit
 let $mms_tables=1;
-create table t1 (a varchar(100), key(a)) engine=maria;
+create table t1 (a varchar(100), key(a)) engine=aria;
 let $mvr_restore_old_snapshot=0;
 let $mms_compare_physically=0;
-let $mvr_crash_statement= set global maria_checkpoint_interval=1;
+let $mvr_crash_statement= set global aria_checkpoint_interval=1;
 
 let $mvr_debug_option="+d,maria_flush_whole_log,maria_flush_whole_page_cache,maria_crash";
 insert into t1 values(3);
@@ -111,11 +111,11 @@
 drop table t1;
 
 --echo * TEST of recovery when crash before bulk-insert-with-repair is committed
-create table t1 (a varchar(100), key(a)) engine=maria;
+create table t1 (a varchar(100), key(a)) engine=aria;
 create table t2 (a varchar(100)) engine=myisam;
 let $mvr_restore_old_snapshot=0;
 let $mms_compare_physically=0;
-let $mvr_crash_statement= set global maria_checkpoint_interval=1;
+let $mvr_crash_statement= set global aria_checkpoint_interval=1;
 let $mvr_debug_option="+d,maria_flush_whole_log,maria_flush_whole_page_cache,maria_crash";
 set rand_seed1=12, rand_seed2=254; # repeatable
 insert into t2 values (rand());
@@ -136,7 +136,7 @@
 drop table t1;
 
 --echo * TEST of recovery when OPTIMIZE has replaced the index file and crash
-create table t_corrupted1 (a varchar(100), key(a)) engine=maria;
+create table t_corrupted1 (a varchar(100), key(a)) engine=aria;
 # we use a special name because this test portion will generate
 # corruption warnings, which we tell mtr_report.pl to ignore by
 # putting the message in mtr_report.pl, but we don't want to it ignore

=== modified file 'mysql-test/suite/maria/t/maria-recovery3-master.opt'
--- a/mysql-test/suite/maria/t/maria-recovery3-master.opt	2008-12-05 21:11:46 +0000
+++ b/mysql-test/suite/maria/t/maria-recovery3-master.opt	2010-09-12 16:40:01 +0000
@@ -1,1 +1,1 @@
---skip-stack-trace --skip-core-file --loose-maria-log-dir-path=$MYSQLTEST_VARDIR/tmp
+--skip-stack-trace --skip-core-file --loose-aria-log-dir-path=$MYSQLTEST_VARDIR/tmp

=== modified file 'mysql-test/suite/maria/t/maria-recovery3.test'
--- a/mysql-test/suite/maria/t/maria-recovery3.test	2009-02-19 09:01:25 +0000
+++ b/mysql-test/suite/maria/t/maria-recovery3.test	2010-09-12 16:40:01 +0000
@@ -5,7 +5,7 @@
 --source include/have_debug.inc
 --source include/have_maria.inc
 
-set global maria_log_file_size=4294967295;
+set global aria_log_file_size=4294967295;
 let $MARIA_LOG=../../tmp;
 
 --disable_warnings
@@ -28,7 +28,7 @@
 let $mvr_restore_old_snapshot=0;
 let $mms_compare_physically=0;
 let $mvr_debug_option="+d,maria_flush_whole_log,maria_crash";
-let $mvr_crash_statement= set global maria_checkpoint_interval=1;
+let $mvr_crash_statement= set global aria_checkpoint_interval=1;
 
 -- source include/maria_empty_logs.inc
 
@@ -39,7 +39,7 @@
 # UNDO phase prevents physical comparison, normally,
 # so we'll only use checksums to compare.
 let $mms_compare_physically=0;
-create table t1(a int primary key) engine=maria;
+create table t1(a int primary key) engine=aria;
 insert into t1 values(1);
 -- source include/maria_make_snapshot_for_comparison.inc
 set session debug="+d,maria_sleep_in_commit";
@@ -49,7 +49,7 @@
 # but not yet called trnman_commit(), so for checkpoint it's not
 # committed.
 connection admin;
-set global maria_checkpoint_interval=1000; # force a checkpoint
+set global aria_checkpoint_interval=1000; # force a checkpoint
 connection default;
 reap; # end of INSERT
 delete from t1 where a=2;
@@ -64,17 +64,17 @@
 # before checkpoint happens, test should still pass (though it won't
 # reproduce the conditions of the bug).
 
-# Test for BUG#41493 Maria: two recovery failures (wrong logging of BLOB pages)
+# Test for BUG#41493 Aria: two recovery failures (wrong logging of BLOB pages)
 --echo * TEST of logging of BLOBs
 let $mvr_restore_old_snapshot=1;
 let $mms_compare_physically=1;
 CREATE TABLE `t1` (
 `blob` blob,
 `blob_key` blob
-) ENGINE=maria ROW_FORMAT=page
+) ENGINE=aria ROW_FORMAT=page
 ;
 -- source include/maria_make_snapshot_for_feeding_recovery.inc
-set global maria_checkpoint_interval=0; # no checkpoints
+set global aria_checkpoint_interval=0; # no checkpoints
 INSERT INTO `t1` VALUES (NULL,repeat('A',5198));
 INSERT INTO `t1` VALUES (NULL,repeat('B',65535));
 INSERT INTO `t1` VALUES (repeat('K',5198),repeat('L',2325));
@@ -88,14 +88,14 @@
 -- source include/maria_verify_recovery.inc
 drop table t1;
 
-# Test for BUG#42112 "Maria: recovery failure (pushbuild2) Assertion
+# Test for BUG#42112 "Aria: recovery failure (pushbuild2) Assertion
 # `rownr == 0 && new_page' failed"
 
 let $mvr_restore_old_snapshot=0;
 let $mms_compare_physically=0;
-create table t1 engine=maria select 1;
+create table t1 engine=aria select 1;
 -- source include/maria_make_snapshot_for_feeding_recovery.inc
-set global maria_checkpoint_interval=0; # no checkpoints
+set global aria_checkpoint_interval=0; # no checkpoints
 insert into t1 values(2);
 truncate table t1;
 -- source include/maria_make_snapshot_for_comparison.inc

=== modified file 'mysql-test/suite/maria/t/maria.test'
--- a/mysql-test/suite/maria/t/maria.test	2010-12-21 17:22:20 +0000
+++ b/mysql-test/suite/maria/t/maria.test	2011-01-05 14:03:58 +0000
@@ -1,20 +1,20 @@
 #
-# Testing of potential problems in Maria
+# Testing of potential problems in Aria
 # This code was initially taken from myisam.test
 #
 
 -- source include/have_maria.inc
 -- source include/have_partition.inc
 
-select * from INFORMATION_SCHEMA.ENGINES where ENGINE="MARIA";
+select * from INFORMATION_SCHEMA.ENGINES where ENGINE="ARIA";
 
 let $default_engine=`select @@global.storage_engine`;
-let $default_checksum=`select @@global.maria_page_checksum`;
-set global storage_engine=maria;
-set session storage_engine=maria;
-set global maria_page_checksum=0;
-let $default_log_file_size=`select @@global.maria_log_file_size`;
-set global maria_log_file_size=4294967295;
+let $default_checksum=`select @@global.aria_page_checksum`;
+set global storage_engine=aria;
+set session storage_engine=aria;
+set global aria_page_checksum=0;
+let $default_log_file_size=`select @@global.aria_log_file_size`;
+set global aria_log_file_size=4294967295;
 
 # Initialise
 --disable_warnings
@@ -116,7 +116,7 @@
 
 #
 # Test of optimize, when only mi_sort_index (but not mi_repair*) is done
-# in ha_maria::repair, and index size is changed (decreased).
+# in ha_aria::repair, and index size is changed (decreased).
 #
 
 create table t1 ( t1 char(255), key(t1(250)));
@@ -154,7 +154,7 @@
 drop table t1;
 
 #
-# test of maria with huge number of packed fields
+# test of aria with huge number of packed fields
 #
 
 create table t1 (i1 int, i2 int, i3 int, i4 int, i5 int, i6 int, i7 int, i8
@@ -533,7 +533,7 @@
 
 #
 # Test join that could miss concurrently inserted row
-# Note that for the moment Maria only supports multiple writers if we have
+# Note that for the moment Aria only supports multiple writers if we have
 # static or dynamic row format
 #
 # Partial key.
@@ -664,10 +664,10 @@
 drop table t1;
 
 #
-# maria_stats_method variable.
+# aria_stats_method variable.
 #
 
-show variables like 'maria_stats_method';
+show variables like 'aria_stats_method';
 
 create table t1 (a int, key(a));
 insert into t1 values (0),(1),(2),(3),(4);
@@ -682,8 +682,8 @@
 show index from t1;
 
 # Set nulls to be equal:
-set maria_stats_method=nulls_equal;
-show variables like 'maria_stats_method';
+set aria_stats_method=nulls_equal;
+show variables like 'aria_stats_method';
 insert into t1 values (11);
 delete from t1 where a=11;
 
@@ -697,8 +697,8 @@
 show index from t1;
 
 # Set nulls back to be equal 
-set maria_stats_method=DEFAULT;
-show variables like 'maria_stats_method';
+set aria_stats_method=DEFAULT;
+show variables like 'aria_stats_method';
 insert into t1 values (11);
 delete from t1 where a=11;
 
@@ -713,9 +713,9 @@
 
 drop table t1;
 
-# WL#2609, CSC#XXXX: MARIA 
-set maria_stats_method=nulls_ignored;
-show variables like 'maria_stats_method';
+# WL#2609, CSC#XXXX: ARIA 
+set aria_stats_method=nulls_ignored;
+show variables like 'aria_stats_method';
 
 create table t1 (
   a char(3), b char(4), c char(5), d char(6),
@@ -735,7 +735,7 @@
 analyze table t1;
 show index from t1;
 
-set maria_stats_method=DEFAULT;
+set aria_stats_method=DEFAULT;
 
 drop table t1;
 
@@ -768,7 +768,7 @@
   t text not null,
   primary key  (id1),
   key x (id2, t(32))
-) engine=maria; # engine clause is redundant but it's to test its parsing
+) engine=aria; # engine clause is redundant but it's to test its parsing
 insert into t1 (id2, t) values
 (10, 'abc'), (10, 'abc'), (10, 'abc'),
 (20, 'abc'), (20, 'abc'), (20, 'def'),
@@ -801,8 +801,8 @@
 #
 # OPTIMIZE TABLE with multiple threads
 #
-SET @@maria_repair_threads=2;
-SHOW VARIABLES LIKE 'maria_repair%';
+SET @@aria_repair_threads=2;
+SHOW VARIABLES LIKE 'aria_repair%';
 #
 # Test OPTIMIZE. This creates a new data file.
 CREATE TABLE t1 (
@@ -888,8 +888,8 @@
 SELECT _id FROM t1;
 DROP TABLE t1;
 #
-SET @@maria_repair_threads=1;
-SHOW VARIABLES LIKE 'maria_repair%';
+SET @@aria_repair_threads=1;
+SHOW VARIABLES LIKE 'aria_repair%';
 
 #
 # Test varchar
@@ -910,7 +910,7 @@
 show create table t1;
 drop table t1;
 
-# MARIA specific varchar tests
+# ARIA specific varchar tests
 --error 1118
 create table t1 (v varchar(65535));
 
@@ -1040,7 +1040,7 @@
 drop table t1, t2, t3;
 
 #
-# Bug#28476: force index on a disabled maria index gives error 124
+# Bug#28476: force index on a disabled aria index gives error 124
 #
 
 CREATE TABLE t1(a INT, b INT, KEY inx (a), UNIQUE KEY uinx (b));
@@ -1078,13 +1078,13 @@
 --replace_column 6 # 7 # 8 # 10 # 11 # 12 # 13 # 14 # 15 # 16 #
 SHOW TABLE STATUS LIKE 't1';
 #--exec ls -log var/mysqld.1/data/test/t1
-#--exec maria_chk -dvv var/mysqld.1/data/test/t1
-#--exec maria_chk -iev var/mysqld.1/data/test/t1
+#--exec aria_chk -dvv var/mysqld.1/data/test/t1
+#--exec aria_chk -iev var/mysqld.1/data/test/t1
 --echo # Enable keys with parallel repair
-SET @@maria_repair_threads=2;
+SET @@aria_repair_threads=2;
 ALTER TABLE t1 DISABLE KEYS;
 ALTER TABLE t1 ENABLE KEYS;
-SET @@maria_repair_threads=1;
+SET @@aria_repair_threads=1;
 CHECK TABLE t1 EXTENDED;
 DROP TABLE t1;
 
@@ -1108,7 +1108,7 @@
 #
 # Bug#37310: 'on update CURRENT_TIMESTAMP' option crashes the table
 #
-CREATE TABLE t1 (a INT) ENGINE=MARIA CHECKSUM=1 ROW_FORMAT=DYNAMIC;
+CREATE TABLE t1 (a INT) ENGINE=ARIA CHECKSUM=1 ROW_FORMAT=DYNAMIC;
 INSERT INTO t1 VALUES (0);
 UPDATE t1 SET a=1;
 SELECT a FROM t1;
@@ -1237,7 +1237,7 @@
 CREATE TABLE t1 (
   c1 CHAR(130),
   c2 VARCHAR(1)
-) ENGINE=maria;
+) ENGINE=aria;
 INSERT INTO t1 VALUES(REPEAT("a",128), 'b');
 SELECT COUNT(*) FROM t1;
 CHECK TABLE t1;
@@ -1252,7 +1252,7 @@
 CREATE TABLE t1 (
   c1 CHAR(130),
   c2 VARCHAR(1)
-) ENGINE=maria;
+) ENGINE=aria;
 INSERT INTO t1 VALUES(REPEAT("a",128), 'b');
 SELECT COUNT(*) FROM t1;
 CHECK TABLE t1 EXTENDED;
@@ -1267,7 +1267,7 @@
 CREATE TABLE t1 (
   c1 CHAR(130),
   c2 VARCHAR(1)
-) ENGINE=maria;
+) ENGINE=aria;
 INSERT INTO t1 VALUES(REPEAT("a",128), 'b');
 # Insert more rows and delete one in the middle to force optimize.
 INSERT INTO t1 VALUES('b', 'b');
@@ -1286,7 +1286,7 @@
   c1 CHAR(130),
   c2 VARCHAR(1),
   KEY (c1)
-) ENGINE=maria;
+) ENGINE=aria;
 #
 # Insert 100 rows. This turns bulk insert on during the copy phase of
 # ALTER TABLE. Bulk insert disables keys before the insert and re-enables
@@ -1304,7 +1304,7 @@
 # Change most of the rows into long character values with > 127 characters.
 UPDATE t1 SET c1=REPEAT("a",128) LIMIT 90;
 SELECT COUNT(*) FROM t1;
-ALTER TABLE t1 ENGINE=maria;
+ALTER TABLE t1 ENGINE=aria;
 #
 # With bug present, this shows that all long rows are gone.
 SELECT COUNT(*) FROM t1;
@@ -1318,7 +1318,7 @@
 CREATE TABLE t1 (
   c1 CHAR(50),
   c2 VARCHAR(1)
-) ENGINE=maria DEFAULT CHARSET UTF8;
+) ENGINE=aria DEFAULT CHARSET UTF8;
 # Using Tamil Letter A, Unicode U+0B85
 INSERT INTO t1 VALUES(REPEAT(_utf8 x'e0ae85',43), 'b');
 SELECT COUNT(*) FROM t1;
@@ -1334,7 +1334,7 @@
 CREATE TABLE t1 (
   c1 CHAR(50),
   c2 VARCHAR(1)
-) ENGINE=maria DEFAULT CHARSET UTF8;
+) ENGINE=aria DEFAULT CHARSET UTF8;
 # Using Tamil Letter A, Unicode U+0B85
 INSERT INTO t1 VALUES(REPEAT(_utf8 x'e0ae85',43), 'b');
 SELECT COUNT(*) FROM t1;
@@ -1350,7 +1350,7 @@
 CREATE TABLE t1 (
   c1 CHAR(50),
   c2 VARCHAR(1)
-) ENGINE=maria DEFAULT CHARSET UTF8;
+) ENGINE=aria DEFAULT CHARSET UTF8;
 # Using Tamil Letter A, Unicode U+0B85
 INSERT INTO t1 VALUES(REPEAT(_utf8 x'e0ae85',43), 'b');
 # Insert more rows and delete one in the middle to force optimize.
@@ -1370,7 +1370,7 @@
   c1 CHAR(50),
   c2 VARCHAR(1),
   KEY (c1)
-) ENGINE=maria DEFAULT CHARSET UTF8;
+) ENGINE=aria DEFAULT CHARSET UTF8;
 #
 # Insert 100 rows. This turns bulk insert on during the copy phase of
 # ALTER TABLE. Bulk insert disables keys before the insert and re-enables
@@ -1389,7 +1389,7 @@
 # Using Tamil Letter A, Unicode U+0B85
 UPDATE t1 SET c1=REPEAT(_utf8 x'e0ae85',43) LIMIT 90;
 SELECT COUNT(*) FROM t1;
-ALTER TABLE t1 ENGINE=maria;
+ALTER TABLE t1 ENGINE=aria;
 #
 # With bug present, this shows that all long rows are gone.
 SELECT COUNT(*) FROM t1;
@@ -1406,7 +1406,7 @@
   c3 VARCHAR(10) NOT NULL,
   KEY (c1),
   KEY (c2)
-) ENGINE=maria DEFAULT CHARSET=utf8 PACK_KEYS=0;
+) ENGINE=aria DEFAULT CHARSET=utf8 PACK_KEYS=0;
 let $MYSQLD_DATADIR= `select @@datadir`;
 --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
 --exec $MARIA_CHK -d $MYSQLD_DATADIR/test/t1
@@ -1423,10 +1423,10 @@
 # (same content / differen checksum)
 #
 
-CREATE TABLE t1 (line LINESTRING NOT NULL) engine=maria;
+CREATE TABLE t1 (line LINESTRING NOT NULL) engine=aria;
 INSERT INTO t1 VALUES (GeomFromText("POINT(0 0)"));
 checksum table t1;
-CREATE TABLE t2 (line LINESTRING NOT NULL) engine=maria;
+CREATE TABLE t2 (line LINESTRING NOT NULL) engine=aria;
 INSERT INTO t2 VALUES (GeomFromText("POINT(0 0)"));
 checksum table t2;
 CREATE TABLE t3 select * from t1;
@@ -1437,7 +1437,7 @@
 #
 # from bug37276_reduced_corruption.sql
 #
-create table t2(a varchar(255),key(a))engine=maria row_format=dynamic transactional=0;
+create table t2(a varchar(255),key(a))engine=aria row_format=dynamic transactional=0;
 insert into t2 values (repeat('o',124)), (repeat('h',226)), (repeat('i',236)),
 (repeat('l',234)), (repeat('b',13)), (repeat('g',236)), (repeat('y',205)),
 (repeat('c',99)), (repeat('g',145)), (repeat('o',131)), (repeat('e',63)),
@@ -1649,7 +1649,7 @@
 col173 tinytext,
 col174 decimal(10,0) DEFAULT NULL,
 col175 double DEFAULT NULL
-) engine=maria;
+) engine=aria;
 
 insert ignore into t1 set 
 col10=abs(28449) % 2,
@@ -1766,10 +1766,10 @@
 drop table t1;
 
 #
-# Bug#38466 maria: range query returns no data
+# Bug#38466 aria: range query returns no data
 #
 
-create table t1 (a char(200) primary key, b int default 12345) engine=maria;
+create table t1 (a char(200) primary key, b int default 12345) engine=aria;
 insert t1 (a) values (repeat('0', 200));
 insert t1 (a) values (repeat('1', 200)), (repeat('2', 200)), (repeat('3', 200)),
  (repeat('4', 200)), (repeat('5', 200)), (repeat('6', 200)), (repeat('7', 200)),
@@ -1787,7 +1787,7 @@
 #
 # BUG#38606  test suite
 #
-create table t1 (a int) engine=maria transactional=1;
+create table t1 (a int) engine=aria transactional=1;
 insert into t1 values (1);
 lock table t1 write concurrent;
 # should be fixed with fully implemented versioning
@@ -1801,7 +1801,7 @@
 #
 
 create table t1 (p int primary key, i int, a char(10), key k1(i), key k2(a))
-engine maria;
+engine aria;
 insert into t1 values (1, 1, 'qqqq'), (2, 1, 'pppp'),
                       (3, 1, 'yyyy'), (4, 3, 'zzzz');
 insert into t1 values (5, 3, 'yyyy'), (6, 3, 'yyyy'), (7, 0, NULL),
@@ -1819,8 +1819,8 @@
 # --mysqld=--binlog-format=row --ps-protocol
 #
 
-create table t1 (f1 int unique, f2 int) engine=maria;
-create table t2 (f3 int, f4 int) engine=maria;
+create table t1 (f1 int unique, f2 int) engine=aria;
+create table t2 (f3 int, f4 int) engine=aria;
 create view v1 as select * from t1, t2 where f1= f3;
 insert into t1 values (1,11), (2,22);
 --error 1393
@@ -1834,7 +1834,7 @@
 # BUG#39399 ALTER TABLE renaming column: affected_rows > 0
 #
 
-CREATE TABLE t1 (id int, c varchar(10)) engine=maria;
+CREATE TABLE t1 (id int, c varchar(10)) engine=aria;
 INSERT INTO t1 VALUES (1,"1");
 --enable_info
 ALTER TABLE t1 CHANGE c d varchar(10);
@@ -1842,7 +1842,7 @@
 drop table t1;
 
 #
-# Bug #39227 Maria: crash with ALTER TABLE PARTITION
+# Bug #39227 Aria: crash with ALTER TABLE PARTITION
 #
 
 create table t1 (s1 int);
@@ -1852,7 +1852,7 @@
 drop table t1;
 
 #
-# Bug #39226 Maria: crash with FLUSH TABLES WITH READ LOCK after LOCK TABLES
+# Bug #39226 Aria: crash with FLUSH TABLES WITH READ LOCK after LOCK TABLES
 
 create table t1 (c1 int);
 create table t2 (c1 int);
@@ -1866,7 +1866,7 @@
 # Crash when aborting inserting of row with 2 blobs where first is short
 #
 
-create table t1(a int primary key, b blob, c blob) engine=maria;
+create table t1(a int primary key, b blob, c blob) engine=aria;
 insert into t1 values(1,repeat('a',100), repeat('b',657860));
 --error ER_DUP_ENTRY
 insert into t1 values(1,repeat('a',100), repeat('b',657860));
@@ -1903,7 +1903,7 @@
          f2 CHAR(255) BINARY NOT NULL DEFAULT '0',
          f3 CHAR(255) BINARY NOT NULL ,
          f4 CHAR(255) BINARY NOT NULL DEFAULT '0' ,
-         v3 CHAR(255) BINARY NOT NULL DEFAULT '0' ,
+         v3 CHAR(255) BINARY AS ( ( f1 NOT LIKE '%' ) ) PERSISTENT,
          KEY (v3)
 ) ENGINE=Maria;
 INSERT INTO t1 ( f1 , f2 , f3 , f4 ) SELECT f1 , f4 , f1 , f4 FROM t1;
@@ -1935,7 +1935,7 @@
 --disable_result_log
 --disable_query_log
 eval set global storage_engine=$default_engine,
-maria_page_checksum=$default_checksum,
-maria_log_file_size=$default_log_file_size;
+aria_page_checksum=$default_checksum,
+aria_log_file_size=$default_log_file_size;
 --enable_result_log
 --enable_query_log

=== modified file 'mysql-test/suite/maria/t/maria2.test'
--- a/mysql-test/suite/maria/t/maria2.test	2009-02-19 09:01:25 +0000
+++ b/mysql-test/suite/maria/t/maria2.test	2010-09-12 16:40:01 +0000
@@ -6,13 +6,13 @@
 --enable_warnings
 
 # Test for BUG#36319
-# "Maria: table is not empty but DELETE and SELECT find no rows"
+# "Aria: table is not empty but DELETE and SELECT find no rows"
 
 CREATE TABLE t1 (
   line BLOB,
   kind ENUM('po', 'pp', 'rr', 'dr', 'rd', 'ts', 'cl') NOT NULL DEFAULT 'po',
   name VARCHAR(32)
-) transactional=0 row_format=page engine=maria;
+) transactional=0 row_format=page engine=aria;
 
 let $query=   INSERT INTO t1 (name, kind, line) VALUES 
   ("Aadaouane", "pp", GeomFromText("POINT(32.816667 35.983333)")),
@@ -74,8 +74,8 @@
 # Testing of ALTER TABLE under lock tables
 #
 
-create table t1 (i int) engine=maria;
-create table t2 (j int) engine=maria;
+create table t1 (i int) engine=aria;
+create table t2 (j int) engine=aria;
 lock table t1 write, t2 read;
 alter table t1 modify i int default 1;
 insert into t1 values (2);
@@ -89,7 +89,7 @@
 # test INSERT ON DUPLICATE KEY UPDATE
 #
 
-create table t1(id int, s char(1), unique(s)) engine=maria;
+create table t1(id int, s char(1), unique(s)) engine=aria;
 insert into t1 values(1,"a") on duplicate key update t1.id=t1.id+1;
 insert into t1 values(1,"a") on duplicate key update t1.id=t1.id+1;
 insert into t1 select 1,"a" on duplicate key update t1.id=t1.id+1;
@@ -101,7 +101,7 @@
 drop table t1;
 
 # test LOAD DATA INFILE REPLACE
-create table t1 (pk int primary key, apk int unique, data int) engine=maria;
+create table t1 (pk int primary key, apk int unique, data int) engine=aria;
 insert into t1 values (1, 1, 1), (4, 4, 4), (6, 6, 6);
 load data concurrent infile '../../std_data/loaddata5.dat' replace into table t1 fields terminated by '' enclosed by '' ignore 1 lines (pk, apk);
 select * from t1 order by pk;

=== modified file 'mysql-test/suite/maria/t/maria3.test'
--- a/mysql-test/suite/maria/t/maria3.test	2010-06-13 22:13:32 +0000
+++ b/mysql-test/suite/maria/t/maria3.test	2010-09-12 16:40:01 +0000
@@ -1,14 +1,14 @@
 -- source include/have_maria.inc
 
-select * from INFORMATION_SCHEMA.ENGINES where ENGINE="MARIA";
+select * from INFORMATION_SCHEMA.ENGINES where ENGINE="ARIA";
 
 let $default_engine=`select @@global.storage_engine`;
-let $default_checksum=`select @@global.maria_page_checksum`;
-set global storage_engine=maria;
-set session storage_engine=maria;
-set global maria_page_checksum=0;
-let $default_log_file_size=`select @@global.maria_log_file_size`;
-set global maria_log_file_size=4294967295;
+let $default_checksum=`select @@global.aria_page_checksum`;
+set global storage_engine=aria;
+set session storage_engine=aria;
+set global aria_page_checksum=0;
+let $default_log_file_size=`select @@global.aria_log_file_size`;
+set global aria_log_file_size=4294967295;
 
 # Initialise
 --disable_warnings
@@ -142,7 +142,7 @@
     t1_id int(10) unsigned not null auto_increment,
     key (t1_name),
     primary key (t1_id)
-) engine=maria auto_increment = 1000 default charset=latin1;
+) engine=aria auto_increment = 1000 default charset=latin1;
 lock tables t1 write;
 INSERT INTO `t1` VALUES ('bla',1000),('bla',1001),('bla',1002);
 check table t1;
@@ -188,7 +188,7 @@
 # Test where we shrink varchar
 #
 
-CREATE TABLE t1 (a int, b int, v varchar(60000)) checksum=1 engine=maria;
+CREATE TABLE t1 (a int, b int, v varchar(60000)) checksum=1 engine=aria;
 insert into t1 values (1,1,"aaa"),(1,2,null);
 checksum table t1;
 lock table t1 write;
@@ -239,13 +239,13 @@
   KEY (ulong),
   KEY (ulonglong,ulong),
   KEY (options,flags)
-) engine=maria;
+) engine=aria;
 insert into t1 values (10,1,1,1,1,1,1,1,1,1,1,1,1,1,NULL,0,0,0,1,1,1,1,'one','one');
-create table t2 (primary key (auto)) engine=maria row_format=page select auto+1 as auto,1 as t1, 'a' as t2, repeat('a',256) as t3, binary repeat('b',256) as t4, repeat('a',4096) as t5, binary repeat('b',4096) as t6, '' as t7, binary '' as t8 from t1;
+create table t2 (primary key (auto)) engine=aria row_format=page select auto+1 as auto,1 as t1, 'a' as t2, repeat('a',256) as t3, binary repeat('b',256) as t4, repeat('a',4096) as t5, binary repeat('b',4096) as t6, '' as t7, binary '' as t8 from t1;
 check table t1,t2;
 select t1,t2,length(t3),length(t4),length(t5),length(t6),t7,t8 from t2;
 drop table t2;
-create table t2 (primary key (auto)) engine=maria row_format=dynamic select auto+1 as auto,1 as t1, 'a' as t2, repeat('a',256) as t3, binary repeat('b',256) as t4, repeat('a',4096) as t5, binary repeat('b',4096) as t6, '' as t7, binary '' as t8 from t1;
+create table t2 (primary key (auto)) engine=aria row_format=dynamic select auto+1 as auto,1 as t1, 'a' as t2, repeat('a',256) as t3, binary repeat('b',256) as t4, repeat('a',4096) as t5, binary repeat('b',4096) as t6, '' as t7, binary '' as t8 from t1;
 check table t2;
 drop table t1,t2;
 
@@ -259,9 +259,9 @@
 
 # Fix if we are using safemalloc
 --replace_result 8388572 8388600
-select lower(variable_name) as Variable_name, Variable_value as Value from information_schema.session_variables where variable_name like "maria%" and variable_name not like "maria_used_for_temp_tables" order by 1;
+select lower(variable_name) as Variable_name, Variable_value as Value from information_schema.session_variables where variable_name like "aria%" and variable_name not like "aria_used_for_temp_tables" order by 1;
 --replace_column 2 #
-show status like 'maria%';
+show status like 'aria%';
 
 #
 # Test creating table with no field data and index on zero length columns
@@ -300,7 +300,7 @@
 #
 # Show that page_checksum is remembered
 #
-set global maria_page_checksum=1;
+set global aria_page_checksum=1;
 create table t1 (a int);
 show create table t1;
 drop table t1;
@@ -310,7 +310,7 @@
 #
 
 --enable_warnings
-set global maria_log_file_size=4294967296;
+set global aria_log_file_size=4294967296;
 
 #
 # Test delete of all rows in autocommit and not autocommit
@@ -338,10 +338,10 @@
 create table t3 select t1.c AS c1, t2.c AS c2,1 as "const" from t1, t2;
 drop table t1, t2, t3;
 
-# Test for bug "maria_repair() (OPTIMIZE) leaves wrong
+# Test for bug "aria_repair() (OPTIMIZE) leaves wrong
 # data_file_length" (originally from type_datetime.test)
 
-create table t1 (t datetime) engine=maria;
+create table t1 (t datetime) engine=aria;
 insert into t1 values (101),(691231),(700101),(991231),(10000101),(99991231),(101000000),(691231000000),(700101000000),(991231235959),(10000101000000),(99991231235959),(20030100000000),(20030000000000);
 select * from t1;
 optimize table t1;
@@ -394,18 +394,18 @@
 # Test warnings with transactional=1 with MyISAM
 #
 
-create table t1 (n int not null, c char(1)) engine=maria;
+create table t1 (n int not null, c char(1)) engine=aria;
 alter table t1 engine=myisam;
-alter table t1 engine=maria;
+alter table t1 engine=aria;
 show create table t1;
 drop table t1;
-create table t1 (n int not null, c char(1)) engine=maria transactional=1;
+create table t1 (n int not null, c char(1)) engine=aria transactional=1;
 alter table t1 engine=myisam;
-alter table t1 engine=maria;
+alter table t1 engine=aria;
 show create table t1;
 drop table t1;
 create table t1 (n int not null, c char(1)) engine=myisam transactional=1;
-alter table t1 engine=maria;
+alter table t1 engine=aria;
 show create table t1;
 drop table t1;
 
@@ -453,7 +453,7 @@
 
 #
 # Test problems with small rows and row_type=page 
-# Bug 35048 "maria table corruption reported when transactional=0"
+# Bug 35048 "aria table corruption reported when transactional=0"
 #
 
 create table t1 (i int auto_increment not null primary key) transactional=0;
@@ -499,19 +499,19 @@
 # BUG#36104 - INFORMATION_SCHEMA.TABLES shows TRANSACTIONAL=1 twice in
 # CREATE_OPTIONS
 #
-create table t1(a int) engine=maria transactional=1;
+create table t1(a int) engine=aria transactional=1;
 select CREATE_OPTIONS from information_schema.TABLES where
 TABLE_SCHEMA='test' and TABLE_NAME='t1';
 drop table t1;
 
 #
-# BUG#39697 - Maria: hang when failing to insert due to UNIQUE
+# BUG#39697 - Aria: hang when failing to insert due to UNIQUE
 #
-create table t1 (a int, unique(a)) engine=maria transactional=1;
+create table t1 (a int, unique(a)) engine=aria transactional=1;
 insert into t1 values(1);
 --error 1062
 insert into t1 values(2),(2);
-create table t2 (a int, unique(a)) engine=maria transactional=0 row_format=dynamic;
+create table t2 (a int, unique(a)) engine=aria transactional=0 row_format=dynamic;
 insert into t2 values(1);
 --error 1062
 insert into t2 values(2),(2);
@@ -527,7 +527,7 @@
 --disable_result_log
 --disable_query_log
 eval set global storage_engine=$default_engine,
-maria_page_checksum=$default_checksum,
-maria_log_file_size=$default_log_file_size;
+aria_page_checksum=$default_checksum,
+aria_log_file_size=$default_log_file_size;
 --enable_result_log
 --enable_query_log

=== modified file 'mysql-test/suite/maria/t/maria_notembedded.test'
--- a/mysql-test/suite/maria/t/maria_notembedded.test	2009-02-06 21:14:13 +0000
+++ b/mysql-test/suite/maria/t/maria_notembedded.test	2010-09-12 16:40:01 +0000
@@ -4,7 +4,7 @@
 -- source include/have_maria.inc
 
 let $default_engine=`select @@session.storage_engine`;
-set session storage_engine=maria;
+set session storage_engine=aria;
 
 # Verify that INSERT DELAYED is disabled only for transactional tables
 # ("embedded" server translates them to plain INSERT)

=== modified file 'mysql-test/suite/maria/t/maria_partition.test'
--- a/mysql-test/suite/maria/t/maria_partition.test	2009-02-19 09:01:25 +0000
+++ b/mysql-test/suite/maria/t/maria_partition.test	2010-09-12 16:40:01 +0000
@@ -1,13 +1,13 @@
-# Maria tests which require partitioning enabled
+# Aria tests which require partitioning enabled
 
 --source include/have_partition.inc
 -- source include/have_maria.inc
 
 let $default_engine=`select @@global.storage_engine`;
-let $default_checksum=`select @@global.maria_page_checksum`;
-set global storage_engine=maria;
-set session storage_engine=maria;
-set global maria_page_checksum=0;
+let $default_checksum=`select @@global.aria_page_checksum`;
+set global storage_engine=aria;
+set session storage_engine=aria;
+set global aria_page_checksum=0;
 
 # Initialise
 --disable_warnings
@@ -17,7 +17,7 @@
 SET SQL_WARNINGS=1;
 
 #
-# Bug #39227 Maria: crash with ALTER TABLE PARTITION
+# Bug #39227 Aria: crash with ALTER TABLE PARTITION
 #
 
 create table t1 (s1 int);
@@ -29,8 +29,8 @@
 #
 # Test outer join const propagation
 #
-create table t2(a blob) engine=maria;
-create table t1(a int primary key) engine=maria;
+create table t2(a blob) engine=aria;
+create table t1(a int primary key) engine=aria;
 insert into t2 values ('foo'),('bar');
 select * from t2 left join t1 on (t2.a=t1.a) where t2.a='bbb';
 insert into t1 values (1);
@@ -52,7 +52,7 @@
 # Set defaults back
 --disable_result_log
 --disable_query_log
-eval set global storage_engine=$default_engine, maria_page_checksum=$default_checksum;
-set global maria_log_file_size=default;
+eval set global storage_engine=$default_engine, aria_page_checksum=$default_checksum;
+set global aria_log_file_size=default;
 --enable_result_log
 --enable_query_log

=== modified file 'mysql-test/suite/maria/t/maria_showlog_error.test'
--- a/mysql-test/suite/maria/t/maria_showlog_error.test	2009-02-19 09:01:25 +0000
+++ b/mysql-test/suite/maria/t/maria_showlog_error.test	2010-09-12 16:40:01 +0000
@@ -19,9 +19,9 @@
 connection default;
 
 let MYSQLD_DATADIR= `select @@datadir`;
-remove_file $MYSQLD_DATADIR/$MARIA_LOG/maria_log.00000001;
---replace_regex /Size unknown ; .*maria_log.00000001/Size unknown ; maria_log.00000001/
-show engine maria logs;
+remove_file $MYSQLD_DATADIR/$MARIA_LOG/aria_log.00000001;
+--replace_regex /Size unknown ; .*aria_log.00000001/Size unknown ; aria_log.00000001/
+show engine aria logs;
 
 # cleunup after this test
 -- source include/maria_empty_logs.inc

=== modified file 'mysql-test/suite/maria/t/optimize.test'
--- a/mysql-test/suite/maria/t/optimize.test	2010-07-16 10:35:49 +0000
+++ b/mysql-test/suite/maria/t/optimize.test	2010-09-12 16:40:01 +0000
@@ -5,13 +5,13 @@
 --enable_warnings
 
 #
-# Test for LP#603026: RQG: pagecache_read: Assertion `pageno < ((1ULL) << 40)' on OPTIMIZE TABLE of a Maria table
+# Test for LP#603026: RQG: pagecache_read: Assertion `pageno < ((1ULL) << 40)' on OPTIMIZE TABLE of a Aria table
 #
 
 --disable_query_log
 set autocommit=1;
 --disable_warnings
-CREATE TABLE t1 ( `col_varchar_1024_utf8_not_null_key` varchar(1024)  CHARACTER SET utf8 not null, `col_varchar_1024_utf8_key` varchar(1024)  CHARACTER SET utf8, `col_varchar_1024_utf8_not_null` varchar(1024)  CHARACTER SET utf8 not null, `col_varchar_1024_utf8` varchar(1024)  CHARACTER SET utf8, pk varchar(1024) not null, `col_varchar_1024_latin1` varchar(1024)  CHARACTER SET latin1, `col_varchar_1024_latin1_not_null_key` varchar(1024)  CHARACTER SET latin1 not null, `col_varchar_1024_latin1_not_null` varchar(1024)  CHARACTER SET latin1 not null, `col_varchar_1024_latin1_key` varchar(1024)  CHARACTER SET latin1, /*Indices*/ key (`col_varchar_1024_utf8_not_null_key` ), key (`col_varchar_1024_utf8_key` ), primary key (pk), key (`col_varchar_1024_latin1_not_null_key` ), key (`col_varchar_1024_latin1_key` )) ENGINE=maria;
+CREATE TABLE t1 ( `col_varchar_1024_utf8_not_null_key` varchar(1024)  CHARACTER SET utf8 not null, `col_varchar_1024_utf8_key` varchar(1024)  CHARACTER SET utf8, `col_varchar_1024_utf8_not_null` varchar(1024)  CHARACTER SET utf8 not null, `col_varchar_1024_utf8` varchar(1024)  CHARACTER SET utf8, pk varchar(1024) not null, `col_varchar_1024_latin1` varchar(1024)  CHARACTER SET latin1, `col_varchar_1024_latin1_not_null_key` varchar(1024)  CHARACTER SET latin1 not null, `col_varchar_1024_latin1_not_null` varchar(1024)  CHARACTER SET latin1 not null, `col_varchar_1024_latin1_key` varchar(1024)  CHARACTER SET latin1, /*Indices*/ key (`col_varchar_1024_utf8_not_null_key` ), key (`col_varchar_1024_utf8_key` ), primary key (pk), key (`col_varchar_1024_latin1_not_null_key` ), key (`col_varchar_1024_latin1_key` )) ENGINE=aria;
 --enable_warnings
 INSERT /*! IGNORE */ INTO t1 VALUES  ('dbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwbyynvenjcsmasklnxxtbzrqxmoupppjcctptgoksleizxkrbednzzwgvlnnghjvvtlpajyalhsygtjrhjxreywihgnxlevtsvfzsztftgvgzkqhwpnbztbcpoqdmhgjffokjvoaejwgqpnhemopbmrkfnkwngdjiawsiarcbkgoudqpkecymujxlwfzdeqnrumctcfmndgknecfzkndoohlpkgksukysorfgkvvkreijhlyhznczsxfdezymeqjpdeydhvhrxolrlxmxxdmajqwizwmyvustnzb', 'wdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwby', 'something', 'pwdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwbyynvenjcsmasklnxxtbzrqxmoupppjcctptgoksleizxkrbednzzwgvlnnghjvvtlpajyalhsygtjrhjxreywihgnxlevtsvfzsztftgvgzkqhwpnbztbcpoqdmhgjffokjvoaejwgqpnhemopbmrkfnkwngdjiawsiarcbkgoudqpkecymujxlwfzdeqnrumctcfmndgknecfzkndoohlpkgksukysorfgkvvkreijhlyhznczsxfdezymeqjpdeydhvhrxolrlxmxxdmajqwizwmyvustnzbrbopxmspxnazyxzmuysgonfckdeurqnroljslhdnjmdetcftzsrkjzmhimfmsbhnsgriqkaejakxzbldvftdcaugaahtcwtnujxmwqvkfepcswvrvqhibmuutnuhmvcnctfzmswcmtsrpmyedqxpoluufzbhwbrmcdiwytofotjitmaijfpfbpdwickgvibccphunilmnxvdsykirhgxvyehxyhixejfktoptnpveambxrovrpulkkjqccekfbfa', 1, 'dpwdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwbyynvenjcsmasklnxxtbzrqxmoupppjcctptgoksleizxkrbednzzwgvlnnghjvvtlpajyalhsygtjr', 'can', 'hdpwdbhfatqokbosjofmpdxvhq', 'rhdpwdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwbyynvenjcsmasklnxxtbzrqxmoupppjcctptgoksleizxkrbednzzwgvlnnghjvvtlpajyalhsygtjrhjxreywihgnxlevtsvfzsztftgvgzkqhwpnbztbcpoqdmhgjffokjvoaejwgqpnhemopbmrkfnkwngdjiawsiarcbkgoudqpkecymujxlwfzdeqnrumctcfmndgknecfzkndoohlpkgksukysorfgkvvkreijhlyhznczsxfdezymeqjpdeydhvhrxolrlxmxxdmajqwizwmyvustnzbrbopxmspxnazyxzmuysgonfckdeurqnroljslhdnjmdetcftzsrkjzmhimfmsbhnsgriqkaejakxzbldvftdcaugaahtcwtnujxmwqvkfepcswvrvqhibmuutnuhmvcnctfzmswcmtsrpmyedqxpoluufzbhwbrmcdiwytofotjitmaijfpfbpdwickgvibccphunilmnxvdsykirhgxvyehxyhixejfktoptnpveambxrovrpulkkjqccekfbfamsuiwhofodwrlsvwmxtvaoazfufeehwftkaugjsnebabzsscqhnafqodwrvohesokjrzhnkjhqowroirjsmofgfvfuomwlcdytimiwybmtuheejeitapnjnestutftmutidlvdubbjdznrxsrrmahxsxurpkqkedeznqccfidiazhmmasxemcshyvhqcxvmhqqvzowtbnjpxxw') ,  ('urhdpwdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxci', 'turhdpwdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwbyynvenjcsmasklnxxtbzrqxmoupppjcctptgoksleizxkrbednzzwgvlnnghjvvtlpajyalhsygtjrhjxreywihgnxlevtsvfzsztftgvgzkqhwpnbztbcpoqdmhgjffokjvoaejwgqpnhemopbmrkfnkwngdjiawsiarcbkgoudqpkecymujxlwfzdeqnrumctcfmndgknecfzkndoohlpkgksukysorfgkvvkreijhlyhznczsxfdezymeqjpdeydhvhrxolrlxmxxdmajqwizwmyvustnzbrbopxmspxnazyxzmuysgonfckdeurqnroljslhdnjmdetcftzsrkjzmhimfmsbhnsgriqkaejakxzbldvftdcaugaahtcwtnujxmwqvkfepcswvrvqhibmuutnuhmvcnctfzmswcmtsrpmyedqxpoluufzbhwbrmcdiwytofotjitmaijfpfbpdwickgvibccphunilmnxvdsykirhgxvyehxyhixejfktoptnpveambxrovrpulkkjqccekfbfamsuiwhofodwrlsvwmxtvaoazfufeehwftkaugjsnebabzsscqhnafqodwrvohesokjrzhnkjhqowroirjsmofgfvfuomwlcdytimiwybmtuheejeitapnjnestutftmutidl', 'to', 'rturhdpwdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwbyynvenjcsmasklnxxtbzrqxmoupppjcctptgoksleizxkrbednzzwgvlnnghjvvtlpajyalhsygtjrhjxreywihgnxlevtsvfzsztftgvgzkqhwpnbztbcpoqdmhgjffokjvoaejwgqpnhemopbmrkfnkwngdjiawsiarcbkgoudqpkecymujxlwfzdeqnrumctcfmndgknecfzkndoohlpkgksukysorfgkvvkreijhlyhznczsxfdezymeqjpdeydhvhrxolrlxmxxdmajqwizwmyvustnzbrbopxmspxnazyxzmuysgonfckdeurqnroljslhdnjmdetcftzsrkjzmhimfmsbhnsgriqkaejakxzbldvftdcaugaahtcwtnujxmwqvkfepcswvrvqhibmuutnuhmvcnctfzmswcmtsrpmyedqxpoluufzbhwbrmcdiwytofotjitmaijfpfbpdwickgvibccphunilmnxvdsykirhgxvyehxyhixejfktoptnpveambxrovrpulkkjqccekfbfamsuiwhofodwrlsvwmxtvaoazfufeehwftka', 2, 'grturhdpwdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwbyynvenjcsmasklnxxtbzrqxmoupppjcctptgoksleizxkrbednzzwgvlnnghjvvtlpajyalhsygtjrhjxreywihgnxlevtsvfzsztftgvgzkqhwpnbztbcpoqdmhgjffokjvoaejwgqpnhemopbmrkfnkwngdjiawsiarcbkgoudqpkecymujxlwfzdeqnrumctcfmndgknecfzkndoohlpkgksukysorfgkvvkreijhlyhznczsxfdezymeqjpdeydhvhrxolrlxmxxdmajqwizwmyvustnzbrbopxmspxnazyxzmuysgonfckdeurqnroljslhdnjmdetcftzsrkjzmh', 'ygrturhdpwdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwbyynvenjcsmasklnxxtbzrqxmoupppjcctptgoksleizxkrbednzzwgvlnnghjvvtlpajyalhsygtjrhjxreywihgnxlevtsvfzsztftgvgzkqhwpnbztbcpoqdmhgjffokjvoaejwgqpnhemopbmrkfnkwngdjiawsiarcbkgoudqpkecymujxlwfzdeqnrumctcfmndgknecfzkndoohlpkgksukysorfgkvvkreijhlyhznczsxfdezymeqjpdeydhvhrxolrlxmxxdmajqwizwmyvustnzbrbopxmspxnazyxzmuysgonfckdeurqnroljslhdnjmdetcftzsrkjzmhimfmsbhnsgriqkaejakxzbldvftdcaugaahtcwtnujxmwqvkfepcswvrvqhibmuutnuhmvcnctfzmswcmtsrpmyedqxpoluufzbhwbrmcdiwytofotjitmaijfpfbpdwickgvibccphunilmnxvdsykirhgxvyehxyhixejfktoptnpveambxrovrpulkkjqccekfbfamsuiwhofodwrlsvwmxtvaoazfufeehwftkaugjsnebabzsscqhnafqodwrvohesokjrzhnkjhqowroirjsmofgfvfuomwlcdytimiwybmtuheejeitapnjnestutftmutidlvdubbjdznrxsrrmahxsxurpkqkedeznqccfidiazhmmasxemcshyvh', 'rygrturhdpwdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwbyynvenjcsmasklnxxtbzrqxmoupppjcctptgoksleizxkrbednzzwgvlnnghjvvtlpajyalhsygtjrhjxreywihgnxlevtsvfzsztftgvgzkqhwpnbztbcpoqdmhgjffokjvoaejwgqpnhemopbmrkfnkwngdjiawsiarcbkgoudqpkecymujxlwfzdeqnrumctcfmndgknecfzkndoohlpkgksukysorfgkvvkreijhlyhznczsxfdezymeqjpdeydhvhrxolrlxmxxdmajqwizwmyvustnzbrbopxmspxnazyxzmuysgonfckdeurqnroljslhdnjmdetcftzsrkjzmhimfmsbhnsgriqkaejakxzbldvftdcaugaahtcwtnujxmwqvkfepcswvrvqhibmuutnuhmvcnctfzmswcmtsrpmyedqxpoluufzbhwbrmcdiwytofotjitmaijfpfbpdwickgvibccphunilmnxvdsykirhgxvyehxyhixejfktoptnpveambxrovrpulkkjqccekfbfamsuiwhofodwrlsvwmxtvaoazfufeehwftkaugjsnebabzsscqhnafqodwrvohesokjrzhnkjhqowroirjsmofgfvfuomwlcdytimiwybmtuheejeitapnjnestutftmutidlvdubbjdznrxsrrmahxsxurpkqkedeznqccfidiazhmmasxemcshyvhqcxvmhqqvzowtbnjpxxwmabsoaiqscbnfwvhwdjgrhlfusfplamodraqbpgtdgviqngjtlykclmdokwpttsicss', 'vrygrturhdpwdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwbyynvenjcsmasklnxxtbzrqxmoupppjcctptgoksleizxkrbednzzwgvlnnghjvvtlpajyalhsygtjrhjxreywihgnxlevtsvfzsztftgvgzkqhwpnbztbcpoqdmhgjffokjvoaejwgqpnhemopbmrkfnkwngdjiawsiarcbkgoudqpkecymujxlwfzdeqnrumctcfmndgknecfzkndoohlpkgksukysorfgkvvkreijhlyhznczsxfdezymeqjpdeydhvhrxolrlxmxxdmajqwizw') ,  ('c', 'wvrygrturhdpwdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwbyynvenjcsmasklnxxtbzrqxmoupppjcctptgoksleizxkrbednzzwgvlnnghjvvtlpajyalhsygtjrhjxreywihgnxlevtsvfzsztftgvgzkqhwpnbztbcpoqdmhgjffokjvoaejwgqpnhemopbmrkfnkwngdjiawsiarcbkgoudqpkecymujxlwfzdeqnrumctcfmndgknecfzkndoohlpkgksukysorfgkvvkreijhlyhznczsxfdezymeqjpdeydhvhrxolrlxmxxdmajqwizwmyvustnzbrbopxmspxnazyxzmuysgonfckdeurqnroljslhdnjmdetcftzsrkjzmhimfmsbhnsgriqkaejakxzbld', 'had', 'twvrygrturhdpwdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxw', 3, 'htwvrygrturhdpwdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwbyynvenjcsmasklnxxtbzrqxmoupppjcctptgoksleizxkrbednzzwgvlnnghjvvtlpajyalhsygtjrhjxreywihgnxlevtsvfzsztftgvgzkqhwpnbztbcpoqdmhgjffokjvoaejwgqpnhemopbmrkfnkwngdjiawsiarcbkgoudqpkecymujxlwfzdeqnrumctcfmndgknecfzkndoohlpkgksukysorfgkvvkreijhlyhznczsxfdezymeqjpdeydhvhrxolrlxmxxdmajqwizwmyvustnzbrbopxmspxnazyxzmuysgonfckdeurqnroljslhdnjmdetcftzsrkjzmhimfmsbhnsgriqkaejakxzbldvftdcaugaahtcwtnujxmwqvkfepcswvrvqhibmuutnuhmvcnctfzmswcmtsrpmyedqxpoluufzbhwbrmcdiwytofotjitmaijfpfbpdwickgvibccphunilmnxvdsykirhgxvyehxyhixejfktoptnpveambxrovrpulkkjqccekfbfamsuiwhofodwrlsvwmxtvaoazfufeehwftkaugjsnebabzsscqhnafqodwrvohesokjrzhnkjhqowroirjsmofgfvfuomwlcdytimiwybmtuheejeitapnjnestutftmutidlvdubbjd', 'q', 'z', 'phtwvrygrturhdpwdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfi') ,  ('vphtwvrygrturhdpwdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwbyynvenjcsmasklnxxtbzrqxmoupppjcctptgoksleizxkrbednzzwgvlnnghjvvtlpajyalhsygtjrhjxreywihgnxlevtsvfzsztftgvgzkqhwpnbztbcpoqdmhgjffokjvoaejwgqpnhemopbmrkfnkwngdjiawsiarcbkgoudqpkecymujxlwfzdeqnrumctcfmndgknecfzkndoohlpkgksukysorfgkvvkreijhlyhznczsxfdezymeqjpdeydhvhrxolrlxmxxdmajqwizwmyvustnzbrbopxmspxnazyxzmuysgonfckdeurqnroljslhdnjmdetcftzsrkjzmhimfmsbhnsgriqkaejakxzbldvftdcaugaahtcwtnujxmwqvkfepcswvrvqhibmuutnuhmvcnctfzmswcmtsrpmyedqxpoluufzbhwbrmcdiwytofotjitmaijfpfbpdwickgvibccphunilmnxvdsykirhgxvyehxyhixejfktoptnpveambxrovrpulkkjqccekfbfamsuiwhofodwrlsvwmxtvaoazfufeehwftkaugjsnebabzsscqhnafqodwrvohesokjrzhnkjhqowroirjsmofgfvfuomwlcdytimiwybmtuheejeitapn', 'jvphtwvrygrturhdpwdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwbyynvenjcsmasklnxxtbzrqxmoupppjcctptgoksleizxkrbednzzwgvlnnghjvvtlpajyalhsygtjrhjxreywihgnxlevtsvfzsztftgvgzkqhwpnbztbcpoqdmhgjffokjv', 'ejvphtwvrygrturhdpwdbhfatqokbosjofmpdxvhqvfnyxowgq', 'vejvphtwvrygrturhdpwdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqyt', 4, 't', 'why', 'your', 'cvejvphtwvrygrturhdpwdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwbyynvenjcsmasklnxxtbzrqxmoupppjcctptgoksleizxkrbednzzwgvlnnghjvvtlpajyalhsygtjrhjxrey') ,  ('v', 'rcvejvphtwvrygrturhdpwdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwbyynvenjcsmasklnxxtbzrqxmoupppjcctptgoksleizxkrbednzzwgvlnnghjvvtlpajyalhsygtjrhjxreywihgnxlevtsvfzsztftgvgzkqhwpnbztbcpoqdmhgjffokjvoaejwgqpnhemopbmrkfnkwngdjiawsiarcbkgoudqpkecymujxlwfzdeqnrumctcfmndgknecfzkndoohlpkgksukysorfgkvvkreijhlyhznczsxfdezymeqjpdeydhvhrxolrlxmxxdmajqwizwmyvustnzbrbopxmspxnazyxzmuysgonfckdeurqnroljslhdnjmdetcftzsrkjzmhimfmsbhnsgriqkaejakxzbldvftdcaugaahtcwtnujxmwqvkfepcswvrvqhibmuutnuhmvcnctfzmswcmtsrpmyedqxpoluufzbhwbrmcdiwytofotjitmaijfpfbpdwickgvibccphunilmnxvdsykirhgxvyehxyhixejfktoptnpveambx', 'frcvejvphtwvrygrturhdpwdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilx', 'p', 5, 'kfrcvejvphtwvrygrturhdpwdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwbyynvenjcsmasklnxxtbzrqxmoupppjcctptgoksleizxkrbednzzwgvlnnghjvvtlpajyalhsygtjrhjxreywihgnxlevtsvfzsztftgvgzkqhwpnbztbcpoqdmhgjffokjvoaejwgqpnhemopbmrkfnkwngdjiawsiarcbkgoudqpkecymujxlwfzdeqnrumctcfmndgknecfzkndoohlpkgksukysorfgkvvkreijhlyhznczsxfdezymeqjpdeydhvhrxolrlxmxxdmajqwizwmyvustnzbrbopxmspxnazyxzmuysgonfckdeurqnroljslhdnjmdetcftzsrkjzmhimfmsbhnsgriqkaejakxzbldvftdcaugaahtcwtnujxmwqvkfepcswvrvqhibmuutnuhmvcnctfzmswcmtsrpmyedqxpoluufzbhwbrmcdiwytofotjitmaijfpfbpdwickgvibccphunilmnxvdsykirhgxvyehxyhixejfktoptnpveambxrovrpulkkjqccekfbfamsuiwhofodwrlsvwmxtvaoazfufeehwftkaugjsnebabzsscqhnafqodwrvohesokjrzhnkjhqowroirjsmofgfvfuomwlcdytimiwybmtuheejeitapnjnestutftmutidlvdubbjdznrxsrrmahxsxurpkqkedeznqccfidiazhmmasxemcshyvhqcxvmhqqvzowtbnjpxxwmabsoaiqscbnfwvhwdjgrhlfusfplamodr', 'i', 'ikfrcvejvphtwvrygrturhdpwdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwbyynvenjcsmasklnxxtbzrqxmoupppjcctptgoksleizxkrbednzzwgvlnnghjvvtlpajyalhsygtjrhjxreywihgnxlevtsvfzsztftgvgzkqhwpnbztbcpoqdmhgjffokjvoaejwgqpnhemopbmrkfnkwngdjiawsiarcbkgoudqpkecymujxlwfzdeqnrumctcfmndgknecfzkndoohlpkgksukysorfgkvvkreijhlyhznczsxfdezymeqjpdeydhvhrxolrlxmxxdmajqwizwmy', 'jikfrcvejvphtwvrygrturhdpwdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwbyynvenjcsmasklnxxtbzrqxmoupppjcctptgoksleizxkrbednzzwgvlnnghjvvtlpajyalhsygtjrhjxreywihgnxlevtsvfzsztftgvgzkqhwpnbztbcpoqdmhgjffokjvoaejwgqpnhemopbmrkfnkwngdjiawsiarcbkgoudqpkecymujxlwfzdeqnrumctcfmndgknecfzkndoohlpkgksukysorfgkvvkreijhlyhznczsxfdezymeqjpdeydhvhrxolrlxmxxdmajqwizwmyvustnzbrbopxmspxnazyxzmuysgonfckdeurqnroljslhdnjmdetcftzsrkjzmhimfmsbhnsgriqkaejakxzbldvftdcaugaahtcwtnujxmwqvkfepcswvrvqhibmu');
 INSERT /*! IGNORE */ INTO t1 VALUES  ('wjikfrcvejvphtwvrygrturhdpwdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcq', 'uwjikfrcvejvphtwvrygrturhdpwdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwbyynvenjcsmasklnxxtbzrqxmoupppjcctptgoksleizxkrbednzzwgvlnng', 'zuwjikfrcvejvphtwvrygrturhdpwdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwbyynvenjcsmasklnxxtbzrqxmoupppjcctptgoksleizxkrbednzzwgvlnnghjvvtlpajy', 'i', 6, 'u', 'q', 'd', 'izuwjikfrcvejvphtwvrygrturhdpwdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwbyynvenjcsmasklnxxtbzrqxmoupppjcctptgoksleizxkrbednzzwgvlnnghjvvtlpajyalhsygtjrhjxreywihgnxlevtsvfzsztftgvgzkq') ,  ('bizuwjikfrcvejvphtwvrygrturhdpwdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwbyynvenjcsmasklnxxtbzrqxmoupppjcctptgoksleizxkrbednzzwgvlnnghjvvtlpajyalhsygtjrhjxreywihgnxlevtsvfzsztftgvgzkqhwpnbztbcpoqdmhgjffokjvoaejwgqpnhemopbmrkfnkwngdjiawsiarcbkgoudqpkecymujxlwfzdeqnrumctcfmndgknecfzkndoohlpkgksukysorfgkvvkreijhlyhznczsxfdezymeqjpdeydhvhrxolrlxmxxdmajqwizwmyvustnzbrbopxmspxnazyxzmuysgonfckdeurqnroljslhdnjmdetcftzsrkjzmhimfmsbhnsgriqkaejakxzbldvftdcaugaahtcwtnujxmwqvkfepcswvrvqhibmuutnuhmvcnctfzmswcmtsrpmyedqxpoluufzbhwbrmcdiwytofotjitmaijfpfbpdwickgvibccphunilmnxvdsykirhgxvyehxyhixejfktoptnpveambxrovrpulkkjqccekfbfamsuiwhofodwrlsvwmxtvaoazfufeehwftkaugjsnebabzsscqhnafqodwrvohesokjrzhnkjhqowroirjsmofgfvfuomwlcdytimiwybmtuheejeitapnjnestutftmutidlvdub', 'd', 'lbizuwjikfrcvejvphtwvrygrturhdpwdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwbyynvenjcsmasklnxxtbzrqxmoupppjcctptgoksleizxkrbednzzwgvlnnghjvvtlpajyalhsygtjrhjxreywihgnxlevtsvfzsztftgvgzkqhwpnbztbcpoqdmhgjffokjvoaejwgqpnhemopbmrkfnkwngdjiawsiarcbkgoudqpkecymujxlwfzdeqnrumctcfmndgknecfzkndoohlpkgksukysorfgkvvkreijhlyhznczsxfdezymeqjpdeydhvhrxolrlxmxxdmajqwizwmyvustnzbrbopxmspxnazyxzmuysgonfckdeurqnroljslhdnjmdetcftzsrkjzmhimfmsbhnsgriqkaejakxzbldvftdcaugaahtcwtnujxmwqvkfepcswvrvqhibmuutnuhmvcnctfzmswcmtsrpmyedqxpoluufzbhwbrmcdiwytofotjitmaijfpfbpdwickgvibccphunilmnxvdsykirhgxvyehxyhixejfktoptnpveambxrovrpulkkjqccekfbfamsuiwhofodwrlsvwmxtvaoazfufeehwftkaugjsnebabzsscqhnafqodwrvohesokjrzhnkjhqowroirjsmofgfvfuomwlcdytimiwybmtuheejeitapnjnestutftmutidlvdubbjdznrxsrrmahxsxurpkqkedeznqccfidiazhmmasxemcshyvhqcxvmhqqvzowtbnjpxxwmabsoaiqscbn', 'llbizuwjikfrcvejvphtwvrygrturhdpwdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwbyynvenjcsmasklnxxtbzrqxmoupppjcctptgoksleizxkrbednzzwgvlnnghjvvtlpajyalhsygtjrhjxreywihgnxlevtsvfzsztftgvgzkqhwpnbztbcpoqdmhgjffokjvoaejwgqpnhemopbmrkfnkwngdjiawsiarcbkgoudqpkecymujxlwfz', 7, 'bllbizuwjikfrcvejvphtwvrygrturhdpwdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwbyynvenjcsmasklnxxtbzrqxmoupppjcctptgoksleizxkrbednzzwgvlnnghjvvtlpajyalhsygtjrhjxreywihgnxlevtsvfzsztftgvgzkqhwpnbztbcpoqdmhgjffokjvoaejwgqpnhemopbmrkfnkwngdjiawsiarcbkgoudqpkecymujxlwfzdeqnrumctcfmndgknecfzkndoohlpkgksukysorfgkvvkreijhlyhznczsxfdezymeqjpdeydhvhrxolrlxmxxdmajqwizwmyvustnzbrbopxmspxnazyxzmuysgonfckdeurqnroljslhdnjmdetcftzsrkjzmhimfmsbhnsgriqkaejakxzbldvftdcaugaahtcwtnujxmwqvkfepcswvrvqhibmuutnuhmvcnctfzmswcmtsrpmyedqxpoluufzbhwbrmcdiwytofotjitmaijfpfbpdwickgvibccphunilmnxvdsykirhgxvyehxyhixejfktoptnpveambxrovrpulkkjqccekfbfamsuiwhofodwrlsvwmxtvaoazfufeehwftkaugjsnebabzsscqhnafqodwrvohesokjrzhnkjhqowroirjsmofgfvfuomwlcdytimiwybmtuheejeitapnjnestutf', 'rbllbizuwjikfrcvejvphtwvrygrturhdpwdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmf', 'really', 'yrbllbizuwjikfrcvejvphtwvrygrturhdpwdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwbyynvenjcsmasklnxxtbzrqxmoupppjcctptgoksleizxkrbednzzwgvlnngh') ,  ('tyrbllbizuwjikfrcvejvphtwvrygrturhdpwdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwbyynvenjcsmasklnxxtbzrqxmoupppjcctptgoksleizxkrbednzzwgvlnnghjvvtlpajyalhsygtjrhjxreywihgnxlevtsvfzsztftgvgzkqhwp', 'xtyrbllbizuwjikfrcvejvphtwvrygrturhdpwdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwbyynvenjcsmasklnxxtbzrqxmoupppjcctptgoksleizxkrbednzzwgvlnnghjvvtlpajyalhsygtjrhjxreywihgnxlevtsvfzsztftgvgzkqhwpnbztbcpoqdmhgjffokjvoaejwgqpnhemopbmrkfnkwngdjiawsiarcbkgoudqpkecymujxlwfzdeqnrumctcfmndgknecfzkndoohlpkgksukysorfgkvvkreijhlyhznczsxfdezymeqjpdeydhvhrxolrlxmxxdmajqwizwmyvustnzbrbopxmspxnazyxzmuysgonfckdeurqnroljslhdnjmdetcftzsrkjzmhimfmsbhnsgriqkaejakxzbldvftdcaugaahtcwtnujxmwqvkfepcswvrvqhibmuutnuhmvcnctfzmsw', 'kxtyrbllbizuwjikfrcvejvphtwvrygrturhdpwdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwbyynvenjcsmasklnxxtbzrqxmoupppjcctptgoksleizxkrbednzzwgvlnnghjvvtlpajyalhsygtjrhjxreywihgnxlevtsvfzsztftgvgzkqhwpnbztbcpoqdmhgjffokjvoaejwgqpnhemopbmrkfnkwngdjiawsiarcbkgoudqpkecymujxlwfzdeqnrumctcfmndgkne', 'mkxtyrbllbizuwjikfrcvejvphtwvrygrturhdpwdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwbyynvenjcsmasklnxxtbzrqxmoupppjcctptgoksleizxkrbednzzwgvlnnghjvvtlpajyalhsygtjrhjxreywihgnxlevtsvfzsztftgvgzkqhwpnbztbcpoqdmhgjffokjv', 8, 'zmkxtyrbllbizuwjikfrcvejvphtwvrygrturhdpwdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwbyynvenjcsmasklnxxtbzrqxmoupppjcctptgoksleizxkrbednzzwgvlnnghjvvtlpajyalhsygtjrhjxreywihgnxlevtsvfzsztftgvgzkqhwpnbztbcpoqdmhgjffokjvoaejwgqpnhemopbmrkfnkwngdjiawsiarcbkgoudqpkecymujxlwfzdeqnrumctcfmndgknecfzkndoohlpkgksukysorfgkvvkreijhlyhznczsxfdezymeqjpdeydhvhrxolrlxmxxdmajqwizwmyvustnzbrbopxmspxnazyxzmuysgonfckdeurqnroljslhdnjmdetcftzsrkjzmhimfmsbhnsgriqkaejakxzbldvftdcaugaahtcwtnujxmwqvkfepcswvrvqhibmuutnuhmvcnctfzmswcmtsrpmyedqxpoluufzbhwbrmcdiwytofotjitmaijfpfbpdwickgvibccphunilmnxvdsykirhgx', 'ezmkxtyrbllbizuwjikfrcvejvphtwvrygrturhdpwdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwbyynvenjcsmasklnxxtbzrqxmoupppjcctptgoksleizxkrbednzzwgvlnnghjvvtlpajyalhsygtjrhjxreywihgnxlevtsvfzsztftgvgzkqhwpnbztbcpoqdmhgjffokjvoaejwgqpnhemopbmrkfnkwngdjiawsiarcbkgoudqpkecymujxlwfzdeqnrumctcfmndgknecfzkndoohlpkgksukysorfgkvvkreijhlyhznczsxfdezymeqjpdeydhvhrxolrlxmxxdmajqwizwmyvustnzbrbopxmspxnazyxzmuysgonfckdeurqnroljslhdnjmdetcftzsrkjzmhimfmsbhnsgriqkaejakxzbldvftdcaugaahtcwtnujxmwqvkfepcswvrvqhibmuutnuhmvcnctfzmswcmtsrpmyedqxpoluufzbhwbrmcdiwytofotjitmaijfpfbpdwickgvibccphunilmnxvdsykirhgxvyehxyhixejfktoptnpveambxrovrpulkkjqccekfbfamsuiwhofodwrlsvwmxtvaoazfufeehwftkaugjsnebabzsscqhnafqodwrvohesokjrzhnkjhqowroirjsmofgfvfuomwlcdytimiwybmtuheejeitapnjnestutftmutidlvdubbjdznrxsrrmahxsxurpkqkedeznqccfidiazhmmasxemcshyvhqcxvmhqqvzowtbnjpxxwmabsoaiqscbnfwvhwdjgrhlfusfplamodraqbpgtdgviqngjtlykclm', 'no', 'eezmkxtyrbllbizuwjikfrcvejvphtwvrygrturhdpwdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwbyynvenjcsmasklnxxtbzrqxmoupppjcctptgoksleizxkrbednzzwgvlnnghjvvtlpajyalhsygtjrhjxreywihgnxlevtsvfzsztftgvgzkqhwpnbztbcpoqdmhgjffokjvoaejwgqpnhemopbmrkfnkwngdjiawsiarcbkgoudqpkecymujxlwfzdeqnrumctcfmndgknecfzkndoohlpkgksukysorfgkvvkreijhlyhznczs') ,  ('m', 'keezmkxtyrbllbizuwjikfrcvejvphtwvrygrturhdpwdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwbyynvenjcsmasklnxxtbzrqxmoupppjcctptgoksleizxkrbednzzwgvlnnghjvvtlpajyalhsygtjrhjxreywihgnxlevtsvfzsztftgvgzkqhwpnbztbcpoqdmhgjffokjvoaejwgqpnhemopbmrkfnkwngdjiawsiarcbkgoudqpkecymujxlwfzdeqnrumctcfmndgknecfzkndoohlpkgksukysorfgkvvkreijhlyhznczsxfdezymeqjpdeydhvhrxolrlxmxxdmajqwizwmyvustnzbrbopxmspxnazyxzmuysgonfckdeurqnroljslhdnjmdetcftzsrkjzmhimfmsbhnsgriqkaejakxzbldvftdcaugaahtcwtnujxmwqvkfep', 'tkeezmkxtyrbllbizuwjikfrcvejvphtwvrygrturhdpwdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqh', 'ztkeezmkxtyrbllbizuwjikfrcvejvphtwvrygrturhdpwdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwbyynvenjcsmasklnxxtbzrqxmoupppjcctptgoksleizxkrbednzzwgvlnnghjvvtlpajyalhsygtjrhjxreywihgnxlevtsvfzsztftgvgzkqhwpnbztbcpoqdmhgjffokjvoaejwgqpnhemopbmrkfnkwngdjiawsiarcbkgoudqpkecymujxlwfzdeqnrumctcfmndgknecfzkndoohlpkgksukysorfgkvvkreijhlyhznczsxfdezymeqjpdeydhvhrxolrlxmxxdmajqwizwmyvustnzbrbopxmspxnazyxzmuysgonfckdeurqnroljslhdnjmdetcftzsrkjzmhimfmsbhnsgriqkaejakxzbldvftdcaugaahtcwtnujxmwqvkfepcswvrvqhibmuutnuhmvcnctfzmswcmtsrpmyedqxpoluufzbhwbrmcdiwytofotjitmaijfpfbpdwickgvibccphunilmnxvdsykirhgxvyehxyhixejfktoptnpveambxrovrpulkkjqccekfbfamsuiwhofodwrlsvwmxtvaoazfufeehwftkaugjsnebabzsscqhnafqodwrvohesokjrzhnkjhqowroirjsmofgfvfuomwlcdytimiwybmtuheejeitapnjnestutftmutidlvdubbjdznrxsrrmahxsxurpkqkedeznqccfidiazhmmasxemcshyvhqcxvmhqqvzowtbnjpxxwmabsoaiqscbnfwvhwdjgrhlf', 9, 'n', 'hey', 'hztkeezmkxtyrbllbizuwjikfrcvejvphtwvrygrturhdpwdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxw', 'shztkeezmkxtyrbllbizuwjikfrcvejvphtwvrygrturhdpwdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwbyynvenjcsmasklnxxtbzrqxmoupppjcctptgoksleizxkrbednzzwgvlnnghjvvtlpajyalhsygtjrhjxreywihgnxlevtsvfzsztftgvgzkqhwpnbztbcpoqdmhgjffokjvoaejwgqpnhemopbmrkfnkwngdjiawsiarcbkgoudqpkecymujxlwfzdeqnrumctcfmndgknecfzkndoohlpkgksukysorfgkvvkreijhlyhznczsxfdezymeqjpdeydhvhrxolrlxmxxdmajqwizwmyvustnzbrbopxmspxnazyxzmuysgonfckdeurqnroljslhdnjmdetcftzsrkjzmhimfmsbhnsgriqkaejakxzbldvftdcaugaahtcwtnujxmwqvkfepcswvrvqhibmuutnuhmvcnctfzmswcmtsrpmyedqxpoluufzbhwbrmcdiwytofotjitmaijfpfbpdwickgvibccphunilmnxvdsykirhgxvyehxyhixejfktoptnpveamb') ,  ('bshztkeezmkxtyrbllbizuwjikfrcvejvphtwvrygrturhdpwdbhfatqokbosjofmpdxvhqvf', 'on', 'look', 'I', 10, 'xbshztkeezmkxtyrbllbizuwjikfrcvejvphtwvrygrturhdpwdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwbyynvenjcsmasklnxxtbzrqxmoupppjcctptgoksleizxkrbednzzwgvlnnghjvvtlpajyalhsygtjrhjxreywihgnxlevtsvfzsztftgvgzkqhwpnbztbcpoqdmhgjffokjvoaejwgqpnhemopbmrkfnkwngdjiawsiarcbkgoudqpkecymujxlwfzdeqnrumctcfmndgknecfzkndoohlpkgksukysorfgkvvkreijhlyhznczsxfdezymeqjpdeydhvhrxolrlxmxxdmajqwizwmyvustnzbrbopxmspxnazyxz', 'lxbshztkeezmkxtyrbllbizuwjikfrcvejvphtwvrygrturhdpwdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwbyynvenjcsmasklnxxtbzrqxmoupppjcctptgoksleizxkrbednzzwgvlnnghjvvtlpajyalhsygtjr', 'what', 'ilxbshztkeezmkxtyrbllbizuwjikfrcvejvphtwvrygrturhdpwdbhfatqokbosjofmpdxvhqvfnyxowgqqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwbyynvenjcsmasklnxxtbzrqxmoupppjcctptgoksleizxkrbednzzwgvlnnghjvvtlpajyalhsygtjrhjxreywihgnxlevtsvfzsztftgvgzkqhwpnbztbcpoqdmhgjffokjvoaejwgqpnhemopbmrkfnkwngdjiawsiarcbkgoudqpkecymujxlwfzdeqnrumctcfmndgknecfzkndoohlpkgksukysorfgkvvkreijhlyhznczsxfdezymeqjpdeydhvhrxolrlxmxxdmajqwizwmyvustnzbrbopxmspxnazyxzmuysgonfckdeurqnrolj');

=== modified file 'mysql-test/suite/maria/t/ps_maria.test'
--- a/mysql-test/suite/maria/t/ps_maria.test	2009-02-19 09:01:25 +0000
+++ b/mysql-test/suite/maria/t/ps_maria.test	2010-09-12 16:40:01 +0000
@@ -1,6 +1,6 @@
 ###############################################
 #                                             #
-#  Prepared Statements test on MARIA tables  #
+#  Prepared Statements test on ARIA tables  #
 #                                             #
 ###############################################
 
@@ -12,7 +12,7 @@
 
 use test;
 
-let $type= 'MARIA' ;
+let $type= 'ARIA' ;
 -- source include/ps_create.inc
 -- source include/ps_renew.inc
 
@@ -47,6 +47,6 @@
 
 --disable_result_log
 --disable_query_log
-set global maria_log_file_size=default;
+set global aria_log_file_size=default;
 --enable_result_log
 --enable_query_log

=== added directory 'mysql-test/suite/oqgraph'
=== added directory 'mysql-test/suite/oqgraph/r'
=== added file 'mysql-test/suite/oqgraph/r/basic.result'
--- a/mysql-test/suite/oqgraph/r/basic.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/oqgraph/r/basic.result	2010-01-04 08:27:50 +0000
@@ -0,0 +1,63 @@
+drop table if exists graph;
+Warnings:
+Note	1051	Unknown table 'graph'
+CREATE TABLE graph (
+latch   SMALLINT  UNSIGNED NULL,
+origid  BIGINT    UNSIGNED NULL,
+destid  BIGINT    UNSIGNED NULL,
+weight  DOUBLE    NULL,
+seq     BIGINT    UNSIGNED NULL,
+linkid  BIGINT    UNSIGNED NULL,
+KEY (latch, origid, destid) USING HASH,
+KEY (latch, destid, origid) USING HASH
+) ENGINE=OQGRAPH;
+delete from graph;
+insert into graph(origid, destid) values (1,2), (2,1);
+insert into graph(origid, destid) values (1,3), (3,1);
+insert into graph(origid, destid) values (3,4), (4,3);
+insert into graph(origid, destid) values (3,5), (5,3);
+insert into graph(origid, destid) values (5,6), (6,5);
+select * from graph where latch = 2 and origid = 1 and weight = 1;
+latch	origid	destid	weight	seq	linkid
+2	1	NULL	1	3	3
+2	1	NULL	1	2	2
+select * from graph where latch = 2 and origid = 1 and weight = 2;
+latch	origid	destid	weight	seq	linkid
+2	1	NULL	2	5	5
+2	1	NULL	2	4	4
+select * from graph 
+where latch = 2 and origid = 1 and (weight = 1 or weight = 2);
+latch	origid	destid	weight	seq	linkid
+2	1	NULL	2	5	5
+2	1	NULL	2	4	4
+2	1	NULL	1	3	3
+2	1	NULL	1	2	2
+select * from graph where latch=1 and origid=1 and destid=6;
+latch	origid	destid	weight	seq	linkid
+1	1	6	NULL	0	1
+1	1	6	1	1	3
+1	1	6	1	2	5
+1	1	6	1	3	6
+select * from graph where latch=1 and origid=1 and destid=4;
+latch	origid	destid	weight	seq	linkid
+1	1	4	NULL	0	1
+1	1	4	1	1	3
+1	1	4	1	2	4
+select * from graph where latch=1 and origid=4 and destid=1;
+latch	origid	destid	weight	seq	linkid
+1	4	1	NULL	0	4
+1	4	1	1	1	3
+1	4	1	1	2	1
+insert into graph (origid,destid) values (4,6);
+delete from graph where origid=5;
+delete from graph where origid=3 and destid=5;
+select * from graph where latch=1 and origid=1 and destid=6;
+latch	origid	destid	weight	seq	linkid
+1	1	6	NULL	0	1
+1	1	6	1	1	3
+1	1	6	1	2	4
+1	1	6	1	3	6
+select * from graph where latch=1 and origid=6 and destid=1;
+latch	origid	destid	weight	seq	linkid
+truncate table graph;
+drop table graph;

=== added file 'mysql-test/suite/oqgraph/r/binlog.result'
--- a/mysql-test/suite/oqgraph/r/binlog.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/oqgraph/r/binlog.result	2010-04-12 23:23:51 +0000
@@ -0,0 +1,18 @@
+drop table if exists graph;
+CREATE TABLE graph (
+latch   SMALLINT  UNSIGNED NULL,
+origid  BIGINT    UNSIGNED NULL,
+destid  BIGINT    UNSIGNED NULL,
+weight  DOUBLE    NULL,
+seq     BIGINT    UNSIGNED NULL,
+linkid  BIGINT    UNSIGNED NULL,
+KEY (latch, origid, destid) USING HASH,
+KEY (latch, destid, origid) USING HASH
+) ENGINE=OQGRAPH;
+SET binlog_format = row;
+insert into graph(origid, destid) values (1,3), (3,1);
+SET binlog_format = statement;
+insert into graph(origid, destid) values (3,4), (4,3);
+SET binlog_format = mixed;
+insert into graph(origid, destid) values (3,5), (5,3);
+drop table graph;

=== added file 'mysql-test/suite/oqgraph/suite.opt'
--- a/mysql-test/suite/oqgraph/suite.opt	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/oqgraph/suite.opt	2010-09-15 15:29:57 +0000
@@ -0,0 +1,1 @@
+--plugin-load=$HA_OQGRAPH_SO

=== added file 'mysql-test/suite/oqgraph/suite.pm'
--- a/mysql-test/suite/oqgraph/suite.pm	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/oqgraph/suite.pm	2010-09-15 15:29:57 +0000
@@ -0,0 +1,8 @@
+package My::Suite::OQGraph;
+
+ at ISA = qw(My::Suite);
+
+return "No OQGraph" unless $ENV{HA_OQGRAPH_SO};
+
+bless { };
+

=== added directory 'mysql-test/suite/oqgraph/t'
=== added file 'mysql-test/suite/oqgraph/t/basic.test'
--- a/mysql-test/suite/oqgraph/t/basic.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/oqgraph/t/basic.test	2010-09-12 12:32:17 +0000
@@ -0,0 +1,43 @@
+drop table if exists graph;
+
+CREATE TABLE graph (
+    latch   SMALLINT  UNSIGNED NULL,
+    origid  BIGINT    UNSIGNED NULL,
+    destid  BIGINT    UNSIGNED NULL,
+    weight  DOUBLE    NULL,
+    seq     BIGINT    UNSIGNED NULL,
+    linkid  BIGINT    UNSIGNED NULL,
+    KEY (latch, origid, destid) USING HASH,
+    KEY (latch, destid, origid) USING HASH
+  ) ENGINE=OQGRAPH;
+
+delete from graph;
+
+insert into graph(origid, destid) values (1,2), (2,1);
+insert into graph(origid, destid) values (1,3), (3,1);
+insert into graph(origid, destid) values (3,4), (4,3);
+insert into graph(origid, destid) values (3,5), (5,3);
+insert into graph(origid, destid) values (5,6), (6,5);
+
+select * from graph where latch = 2 and origid = 1 and weight = 1;
+
+select * from graph where latch = 2 and origid = 1 and weight = 2;
+
+select * from graph 
+where latch = 2 and origid = 1 and (weight = 1 or weight = 2);
+
+select * from graph where latch=1 and origid=1 and destid=6;
+select * from graph where latch=1 and origid=1 and destid=4;
+select * from graph where latch=1 and origid=4 and destid=1;
+
+insert into graph (origid,destid) values (4,6);
+
+delete from graph where origid=5;
+delete from graph where origid=3 and destid=5;
+
+select * from graph where latch=1 and origid=1 and destid=6;
+select * from graph where latch=1 and origid=6 and destid=1;
+
+truncate table graph;
+
+drop table graph;

=== added file 'mysql-test/suite/oqgraph/t/binlog.test'
--- a/mysql-test/suite/oqgraph/t/binlog.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/oqgraph/t/binlog.test	2010-09-12 12:32:17 +0000
@@ -0,0 +1,27 @@
+-- source include/have_log_bin.inc
+
+--disable_warnings
+drop table if exists graph;
+--enable_warnings
+
+CREATE TABLE graph (
+    latch   SMALLINT  UNSIGNED NULL,
+    origid  BIGINT    UNSIGNED NULL,
+    destid  BIGINT    UNSIGNED NULL,
+    weight  DOUBLE    NULL,
+    seq     BIGINT    UNSIGNED NULL,
+    linkid  BIGINT    UNSIGNED NULL,
+    KEY (latch, origid, destid) USING HASH,
+    KEY (latch, destid, origid) USING HASH
+  ) ENGINE=OQGRAPH;
+
+# MBug#524625: OQGraph error with binary logging enabled 
+# Test that OQGraph works with different binlogging modes.
+SET binlog_format = row;
+insert into graph(origid, destid) values (1,3), (3,1);
+SET binlog_format = statement;
+insert into graph(origid, destid) values (3,4), (4,3);
+SET binlog_format = mixed;
+insert into graph(origid, destid) values (3,5), (5,3);
+
+drop table graph;

=== modified file 'mysql-test/suite/parts/r/partition_alter2_1_maria.result'
--- a/mysql-test/suite/parts/r/partition_alter2_1_maria.result	2009-04-01 10:06:41 +0000
+++ b/mysql-test/suite/parts/r/partition_alter2_1_maria.result	2010-09-12 16:40:01 +0000
@@ -1,5 +1,5 @@
 SET @max_row = 20;
-SET @@session.storage_engine = 'MARIA';
+SET @@session.storage_engine = 'Aria';
 
 #------------------------------------------------------------------------
 #  0. Setting of auxiliary variables + Creation of an auxiliary tables
@@ -73,7 +73,7 @@
   `f_char1` char(20) DEFAULT NULL,
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY HASH (f_int1)
 PARTITIONS 2 */
 
@@ -538,7 +538,7 @@
   `f_char1` char(20) DEFAULT NULL,
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY KEY (f_int1)
 PARTITIONS 5 */
 
@@ -1017,16 +1017,16 @@
   `f_char1` char(20) DEFAULT NULL,
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (MOD(f_int1,4))
-(PARTITION part_3 VALUES IN (-3) ENGINE = MARIA,
- PARTITION part_2 VALUES IN (-2) ENGINE = MARIA,
- PARTITION part_1 VALUES IN (-1) ENGINE = MARIA,
- PARTITION part_N VALUES IN (NULL) ENGINE = MARIA,
- PARTITION part0 VALUES IN (0) ENGINE = MARIA,
- PARTITION part1 VALUES IN (1) ENGINE = MARIA,
- PARTITION part2 VALUES IN (2) ENGINE = MARIA,
- PARTITION part3 VALUES IN (3) ENGINE = MARIA) */
+(PARTITION part_3 VALUES IN (-3) ENGINE = Aria,
+ PARTITION part_2 VALUES IN (-2) ENGINE = Aria,
+ PARTITION part_1 VALUES IN (-1) ENGINE = Aria,
+ PARTITION part_N VALUES IN (NULL) ENGINE = Aria,
+ PARTITION part0 VALUES IN (0) ENGINE = Aria,
+ PARTITION part1 VALUES IN (1) ENGINE = Aria,
+ PARTITION part2 VALUES IN (2) ENGINE = Aria,
+ PARTITION part3 VALUES IN (3) ENGINE = Aria) */
 
 unified filelist
 t1#P#part0.MAD
@@ -1507,14 +1507,14 @@
   `f_char1` char(20) DEFAULT NULL,
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE (f_int1)
-(PARTITION parta VALUES LESS THAN (0) ENGINE = MARIA,
- PARTITION partb VALUES LESS THAN (5) ENGINE = MARIA,
- PARTITION partc VALUES LESS THAN (10) ENGINE = MARIA,
- PARTITION partd VALUES LESS THAN (15) ENGINE = MARIA,
- PARTITION parte VALUES LESS THAN (20) ENGINE = MARIA,
- PARTITION partf VALUES LESS THAN (2147483646) ENGINE = MARIA) */
+(PARTITION parta VALUES LESS THAN (0) ENGINE = Aria,
+ PARTITION partb VALUES LESS THAN (5) ENGINE = Aria,
+ PARTITION partc VALUES LESS THAN (10) ENGINE = Aria,
+ PARTITION partd VALUES LESS THAN (15) ENGINE = Aria,
+ PARTITION parte VALUES LESS THAN (20) ENGINE = Aria,
+ PARTITION partf VALUES LESS THAN (2147483646) ENGINE = Aria) */
 
 unified filelist
 t1#P#parta.MAD
@@ -1987,14 +1987,14 @@
   `f_char1` char(20) DEFAULT NULL,
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE (f_int1 DIV 2)
 SUBPARTITION BY HASH (f_int1)
 SUBPARTITIONS 2
-(PARTITION parta VALUES LESS THAN (0) ENGINE = MARIA,
- PARTITION partb VALUES LESS THAN (5) ENGINE = MARIA,
- PARTITION partc VALUES LESS THAN (10) ENGINE = MARIA,
- PARTITION partd VALUES LESS THAN (2147483646) ENGINE = MARIA) */
+(PARTITION parta VALUES LESS THAN (0) ENGINE = Aria,
+ PARTITION partb VALUES LESS THAN (5) ENGINE = Aria,
+ PARTITION partc VALUES LESS THAN (10) ENGINE = Aria,
+ PARTITION partd VALUES LESS THAN (2147483646) ENGINE = Aria) */
 
 unified filelist
 t1#P#parta#SP#partasp0.MAD
@@ -2477,21 +2477,21 @@
   `f_char1` char(20) DEFAULT NULL,
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE (f_int1)
 SUBPARTITION BY KEY (f_int1)
 (PARTITION part1 VALUES LESS THAN (0)
- (SUBPARTITION subpart11 ENGINE = MARIA,
-  SUBPARTITION subpart12 ENGINE = MARIA),
+ (SUBPARTITION subpart11 ENGINE = Aria,
+  SUBPARTITION subpart12 ENGINE = Aria),
  PARTITION part2 VALUES LESS THAN (5)
- (SUBPARTITION subpart21 ENGINE = MARIA,
-  SUBPARTITION subpart22 ENGINE = MARIA),
+ (SUBPARTITION subpart21 ENGINE = Aria,
+  SUBPARTITION subpart22 ENGINE = Aria),
  PARTITION part3 VALUES LESS THAN (10)
- (SUBPARTITION subpart31 ENGINE = MARIA,
-  SUBPARTITION subpart32 ENGINE = MARIA),
+ (SUBPARTITION subpart31 ENGINE = Aria,
+  SUBPARTITION subpart32 ENGINE = Aria),
  PARTITION part4 VALUES LESS THAN (2147483646)
- (SUBPARTITION subpart41 ENGINE = MARIA,
-  SUBPARTITION subpart42 ENGINE = MARIA)) */
+ (SUBPARTITION subpart41 ENGINE = Aria,
+  SUBPARTITION subpart42 ENGINE = Aria)) */
 
 unified filelist
 t1#P#part1#SP#subpart11.MAD
@@ -2972,21 +2972,21 @@
   `f_char1` char(20) DEFAULT NULL,
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3)))
 SUBPARTITION BY HASH (f_int1 + 1)
 (PARTITION part1 VALUES IN (0)
- (SUBPARTITION sp11 ENGINE = MARIA,
-  SUBPARTITION sp12 ENGINE = MARIA),
+ (SUBPARTITION sp11 ENGINE = Aria,
+  SUBPARTITION sp12 ENGINE = Aria),
  PARTITION part2 VALUES IN (1)
- (SUBPARTITION sp21 ENGINE = MARIA,
-  SUBPARTITION sp22 ENGINE = MARIA),
+ (SUBPARTITION sp21 ENGINE = Aria,
+  SUBPARTITION sp22 ENGINE = Aria),
  PARTITION part3 VALUES IN (2)
- (SUBPARTITION sp31 ENGINE = MARIA,
-  SUBPARTITION sp32 ENGINE = MARIA),
+ (SUBPARTITION sp31 ENGINE = Aria,
+  SUBPARTITION sp32 ENGINE = Aria),
  PARTITION part4 VALUES IN (NULL)
- (SUBPARTITION sp41 ENGINE = MARIA,
-  SUBPARTITION sp42 ENGINE = MARIA)) */
+ (SUBPARTITION sp41 ENGINE = Aria,
+  SUBPARTITION sp42 ENGINE = Aria)) */
 
 unified filelist
 t1#P#part1#SP#sp11.MAD
@@ -3465,13 +3465,13 @@
   `f_char1` char(20) DEFAULT NULL,
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2)))
 SUBPARTITION BY KEY (f_int1)
 SUBPARTITIONS 3
-(PARTITION part1 VALUES IN (0) ENGINE = MARIA,
- PARTITION part2 VALUES IN (1) ENGINE = MARIA,
- PARTITION part3 VALUES IN (NULL) ENGINE = MARIA) */
+(PARTITION part1 VALUES IN (0) ENGINE = Aria,
+ PARTITION part2 VALUES IN (1) ENGINE = Aria,
+ PARTITION part3 VALUES IN (NULL) ENGINE = Aria) */
 
 unified filelist
 t1#P#part1#SP#part1sp0.MAD
@@ -3951,7 +3951,7 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx1` (`f_int1`,`f_int2`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY HASH (f_int1)
 PARTITIONS 2 */
 
@@ -4468,7 +4468,7 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx1` (`f_int1`,`f_int2`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY KEY (f_int1)
 PARTITIONS 5 */
 
@@ -4999,16 +4999,16 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx1` (`f_int1`,`f_int2`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (MOD(f_int1,4))
-(PARTITION part_3 VALUES IN (-3) ENGINE = MARIA,
- PARTITION part_2 VALUES IN (-2) ENGINE = MARIA,
- PARTITION part_1 VALUES IN (-1) ENGINE = MARIA,
- PARTITION part_N VALUES IN (NULL) ENGINE = MARIA,
- PARTITION part0 VALUES IN (0) ENGINE = MARIA,
- PARTITION part1 VALUES IN (1) ENGINE = MARIA,
- PARTITION part2 VALUES IN (2) ENGINE = MARIA,
- PARTITION part3 VALUES IN (3) ENGINE = MARIA) */
+(PARTITION part_3 VALUES IN (-3) ENGINE = Aria,
+ PARTITION part_2 VALUES IN (-2) ENGINE = Aria,
+ PARTITION part_1 VALUES IN (-1) ENGINE = Aria,
+ PARTITION part_N VALUES IN (NULL) ENGINE = Aria,
+ PARTITION part0 VALUES IN (0) ENGINE = Aria,
+ PARTITION part1 VALUES IN (1) ENGINE = Aria,
+ PARTITION part2 VALUES IN (2) ENGINE = Aria,
+ PARTITION part3 VALUES IN (3) ENGINE = Aria) */
 
 unified filelist
 t1#P#part0.MAD
@@ -5541,14 +5541,14 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx1` (`f_int1`,`f_int2`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE (f_int1)
-(PARTITION parta VALUES LESS THAN (0) ENGINE = MARIA,
- PARTITION partb VALUES LESS THAN (5) ENGINE = MARIA,
- PARTITION partc VALUES LESS THAN (10) ENGINE = MARIA,
- PARTITION partd VALUES LESS THAN (15) ENGINE = MARIA,
- PARTITION parte VALUES LESS THAN (20) ENGINE = MARIA,
- PARTITION partf VALUES LESS THAN (2147483646) ENGINE = MARIA) */
+(PARTITION parta VALUES LESS THAN (0) ENGINE = Aria,
+ PARTITION partb VALUES LESS THAN (5) ENGINE = Aria,
+ PARTITION partc VALUES LESS THAN (10) ENGINE = Aria,
+ PARTITION partd VALUES LESS THAN (15) ENGINE = Aria,
+ PARTITION parte VALUES LESS THAN (20) ENGINE = Aria,
+ PARTITION partf VALUES LESS THAN (2147483646) ENGINE = Aria) */
 
 unified filelist
 t1#P#parta.MAD
@@ -6073,14 +6073,14 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx1` (`f_int1`,`f_int2`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE (f_int1 DIV 2)
 SUBPARTITION BY HASH (f_int1)
 SUBPARTITIONS 2
-(PARTITION parta VALUES LESS THAN (0) ENGINE = MARIA,
- PARTITION partb VALUES LESS THAN (5) ENGINE = MARIA,
- PARTITION partc VALUES LESS THAN (10) ENGINE = MARIA,
- PARTITION partd VALUES LESS THAN (2147483646) ENGINE = MARIA) */
+(PARTITION parta VALUES LESS THAN (0) ENGINE = Aria,
+ PARTITION partb VALUES LESS THAN (5) ENGINE = Aria,
+ PARTITION partc VALUES LESS THAN (10) ENGINE = Aria,
+ PARTITION partd VALUES LESS THAN (2147483646) ENGINE = Aria) */
 
 unified filelist
 t1#P#parta#SP#partasp0.MAD
@@ -6615,21 +6615,21 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx1` (`f_int1`,`f_int2`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE (f_int1)
 SUBPARTITION BY KEY (f_int1)
 (PARTITION part1 VALUES LESS THAN (0)
- (SUBPARTITION subpart11 ENGINE = MARIA,
-  SUBPARTITION subpart12 ENGINE = MARIA),
+ (SUBPARTITION subpart11 ENGINE = Aria,
+  SUBPARTITION subpart12 ENGINE = Aria),
  PARTITION part2 VALUES LESS THAN (5)
- (SUBPARTITION subpart21 ENGINE = MARIA,
-  SUBPARTITION subpart22 ENGINE = MARIA),
+ (SUBPARTITION subpart21 ENGINE = Aria,
+  SUBPARTITION subpart22 ENGINE = Aria),
  PARTITION part3 VALUES LESS THAN (10)
- (SUBPARTITION subpart31 ENGINE = MARIA,
-  SUBPARTITION subpart32 ENGINE = MARIA),
+ (SUBPARTITION subpart31 ENGINE = Aria,
+  SUBPARTITION subpart32 ENGINE = Aria),
  PARTITION part4 VALUES LESS THAN (2147483646)
- (SUBPARTITION subpart41 ENGINE = MARIA,
-  SUBPARTITION subpart42 ENGINE = MARIA)) */
+ (SUBPARTITION subpart41 ENGINE = Aria,
+  SUBPARTITION subpart42 ENGINE = Aria)) */
 
 unified filelist
 t1#P#part1#SP#subpart11.MAD
@@ -7162,21 +7162,21 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx1` (`f_int1`,`f_int2`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3)))
 SUBPARTITION BY HASH (f_int1 + 1)
 (PARTITION part1 VALUES IN (0)
- (SUBPARTITION sp11 ENGINE = MARIA,
-  SUBPARTITION sp12 ENGINE = MARIA),
+ (SUBPARTITION sp11 ENGINE = Aria,
+  SUBPARTITION sp12 ENGINE = Aria),
  PARTITION part2 VALUES IN (1)
- (SUBPARTITION sp21 ENGINE = MARIA,
-  SUBPARTITION sp22 ENGINE = MARIA),
+ (SUBPARTITION sp21 ENGINE = Aria,
+  SUBPARTITION sp22 ENGINE = Aria),
  PARTITION part3 VALUES IN (2)
- (SUBPARTITION sp31 ENGINE = MARIA,
-  SUBPARTITION sp32 ENGINE = MARIA),
+ (SUBPARTITION sp31 ENGINE = Aria,
+  SUBPARTITION sp32 ENGINE = Aria),
  PARTITION part4 VALUES IN (NULL)
- (SUBPARTITION sp41 ENGINE = MARIA,
-  SUBPARTITION sp42 ENGINE = MARIA)) */
+ (SUBPARTITION sp41 ENGINE = Aria,
+  SUBPARTITION sp42 ENGINE = Aria)) */
 
 unified filelist
 t1#P#part1#SP#sp11.MAD
@@ -7707,13 +7707,13 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx1` (`f_int1`,`f_int2`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2)))
 SUBPARTITION BY KEY (f_int1)
 SUBPARTITIONS 3
-(PARTITION part1 VALUES IN (0) ENGINE = MARIA,
- PARTITION part2 VALUES IN (1) ENGINE = MARIA,
- PARTITION part3 VALUES IN (NULL) ENGINE = MARIA) */
+(PARTITION part1 VALUES IN (0) ENGINE = Aria,
+ PARTITION part2 VALUES IN (1) ENGINE = Aria,
+ PARTITION part3 VALUES IN (NULL) ENGINE = Aria) */
 
 unified filelist
 t1#P#part1#SP#part1sp0.MAD
@@ -8243,7 +8243,7 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx1` (`f_int2`,`f_int1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY HASH (f_int1)
 PARTITIONS 2 */
 
@@ -8760,7 +8760,7 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx1` (`f_int2`,`f_int1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY KEY (f_int1)
 PARTITIONS 5 */
 
@@ -9291,16 +9291,16 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx1` (`f_int2`,`f_int1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (MOD(f_int1,4))
-(PARTITION part_3 VALUES IN (-3) ENGINE = MARIA,
- PARTITION part_2 VALUES IN (-2) ENGINE = MARIA,
- PARTITION part_1 VALUES IN (-1) ENGINE = MARIA,
- PARTITION part_N VALUES IN (NULL) ENGINE = MARIA,
- PARTITION part0 VALUES IN (0) ENGINE = MARIA,
- PARTITION part1 VALUES IN (1) ENGINE = MARIA,
- PARTITION part2 VALUES IN (2) ENGINE = MARIA,
- PARTITION part3 VALUES IN (3) ENGINE = MARIA) */
+(PARTITION part_3 VALUES IN (-3) ENGINE = Aria,
+ PARTITION part_2 VALUES IN (-2) ENGINE = Aria,
+ PARTITION part_1 VALUES IN (-1) ENGINE = Aria,
+ PARTITION part_N VALUES IN (NULL) ENGINE = Aria,
+ PARTITION part0 VALUES IN (0) ENGINE = Aria,
+ PARTITION part1 VALUES IN (1) ENGINE = Aria,
+ PARTITION part2 VALUES IN (2) ENGINE = Aria,
+ PARTITION part3 VALUES IN (3) ENGINE = Aria) */
 
 unified filelist
 t1#P#part0.MAD
@@ -9833,14 +9833,14 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx1` (`f_int2`,`f_int1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE (f_int1)
-(PARTITION parta VALUES LESS THAN (0) ENGINE = MARIA,
- PARTITION partb VALUES LESS THAN (5) ENGINE = MARIA,
- PARTITION partc VALUES LESS THAN (10) ENGINE = MARIA,
- PARTITION partd VALUES LESS THAN (15) ENGINE = MARIA,
- PARTITION parte VALUES LESS THAN (20) ENGINE = MARIA,
- PARTITION partf VALUES LESS THAN (2147483646) ENGINE = MARIA) */
+(PARTITION parta VALUES LESS THAN (0) ENGINE = Aria,
+ PARTITION partb VALUES LESS THAN (5) ENGINE = Aria,
+ PARTITION partc VALUES LESS THAN (10) ENGINE = Aria,
+ PARTITION partd VALUES LESS THAN (15) ENGINE = Aria,
+ PARTITION parte VALUES LESS THAN (20) ENGINE = Aria,
+ PARTITION partf VALUES LESS THAN (2147483646) ENGINE = Aria) */
 
 unified filelist
 t1#P#parta.MAD
@@ -10365,14 +10365,14 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx1` (`f_int2`,`f_int1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE (f_int1 DIV 2)
 SUBPARTITION BY HASH (f_int1)
 SUBPARTITIONS 2
-(PARTITION parta VALUES LESS THAN (0) ENGINE = MARIA,
- PARTITION partb VALUES LESS THAN (5) ENGINE = MARIA,
- PARTITION partc VALUES LESS THAN (10) ENGINE = MARIA,
- PARTITION partd VALUES LESS THAN (2147483646) ENGINE = MARIA) */
+(PARTITION parta VALUES LESS THAN (0) ENGINE = Aria,
+ PARTITION partb VALUES LESS THAN (5) ENGINE = Aria,
+ PARTITION partc VALUES LESS THAN (10) ENGINE = Aria,
+ PARTITION partd VALUES LESS THAN (2147483646) ENGINE = Aria) */
 
 unified filelist
 t1#P#parta#SP#partasp0.MAD
@@ -10907,21 +10907,21 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx1` (`f_int2`,`f_int1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE (f_int1)
 SUBPARTITION BY KEY (f_int1)
 (PARTITION part1 VALUES LESS THAN (0)
- (SUBPARTITION subpart11 ENGINE = MARIA,
-  SUBPARTITION subpart12 ENGINE = MARIA),
+ (SUBPARTITION subpart11 ENGINE = Aria,
+  SUBPARTITION subpart12 ENGINE = Aria),
  PARTITION part2 VALUES LESS THAN (5)
- (SUBPARTITION subpart21 ENGINE = MARIA,
-  SUBPARTITION subpart22 ENGINE = MARIA),
+ (SUBPARTITION subpart21 ENGINE = Aria,
+  SUBPARTITION subpart22 ENGINE = Aria),
  PARTITION part3 VALUES LESS THAN (10)
- (SUBPARTITION subpart31 ENGINE = MARIA,
-  SUBPARTITION subpart32 ENGINE = MARIA),
+ (SUBPARTITION subpart31 ENGINE = Aria,
+  SUBPARTITION subpart32 ENGINE = Aria),
  PARTITION part4 VALUES LESS THAN (2147483646)
- (SUBPARTITION subpart41 ENGINE = MARIA,
-  SUBPARTITION subpart42 ENGINE = MARIA)) */
+ (SUBPARTITION subpart41 ENGINE = Aria,
+  SUBPARTITION subpart42 ENGINE = Aria)) */
 
 unified filelist
 t1#P#part1#SP#subpart11.MAD
@@ -11454,21 +11454,21 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx1` (`f_int2`,`f_int1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3)))
 SUBPARTITION BY HASH (f_int1 + 1)
 (PARTITION part1 VALUES IN (0)
- (SUBPARTITION sp11 ENGINE = MARIA,
-  SUBPARTITION sp12 ENGINE = MARIA),
+ (SUBPARTITION sp11 ENGINE = Aria,
+  SUBPARTITION sp12 ENGINE = Aria),
  PARTITION part2 VALUES IN (1)
- (SUBPARTITION sp21 ENGINE = MARIA,
-  SUBPARTITION sp22 ENGINE = MARIA),
+ (SUBPARTITION sp21 ENGINE = Aria,
+  SUBPARTITION sp22 ENGINE = Aria),
  PARTITION part3 VALUES IN (2)
- (SUBPARTITION sp31 ENGINE = MARIA,
-  SUBPARTITION sp32 ENGINE = MARIA),
+ (SUBPARTITION sp31 ENGINE = Aria,
+  SUBPARTITION sp32 ENGINE = Aria),
  PARTITION part4 VALUES IN (NULL)
- (SUBPARTITION sp41 ENGINE = MARIA,
-  SUBPARTITION sp42 ENGINE = MARIA)) */
+ (SUBPARTITION sp41 ENGINE = Aria,
+  SUBPARTITION sp42 ENGINE = Aria)) */
 
 unified filelist
 t1#P#part1#SP#sp11.MAD
@@ -11999,13 +11999,13 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx1` (`f_int2`,`f_int1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2)))
 SUBPARTITION BY KEY (f_int1)
 SUBPARTITIONS 3
-(PARTITION part1 VALUES IN (0) ENGINE = MARIA,
- PARTITION part2 VALUES IN (1) ENGINE = MARIA,
- PARTITION part3 VALUES IN (NULL) ENGINE = MARIA) */
+(PARTITION part1 VALUES IN (0) ENGINE = Aria,
+ PARTITION part2 VALUES IN (1) ENGINE = Aria,
+ PARTITION part3 VALUES IN (NULL) ENGINE = Aria) */
 
 unified filelist
 t1#P#part1#SP#part1sp0.MAD
@@ -12539,7 +12539,7 @@
   `f_char1` char(20) DEFAULT NULL,
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY HASH (f_int1)
 PARTITIONS 2 */
 
@@ -13004,7 +13004,7 @@
   `f_char1` char(20) DEFAULT NULL,
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY KEY (f_int1)
 PARTITIONS 5 */
 
@@ -13483,16 +13483,16 @@
   `f_char1` char(20) DEFAULT NULL,
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (MOD(f_int1,4))
-(PARTITION part_3 VALUES IN (-3) ENGINE = MARIA,
- PARTITION part_2 VALUES IN (-2) ENGINE = MARIA,
- PARTITION part_1 VALUES IN (-1) ENGINE = MARIA,
- PARTITION part_N VALUES IN (NULL) ENGINE = MARIA,
- PARTITION part0 VALUES IN (0) ENGINE = MARIA,
- PARTITION part1 VALUES IN (1) ENGINE = MARIA,
- PARTITION part2 VALUES IN (2) ENGINE = MARIA,
- PARTITION part3 VALUES IN (3) ENGINE = MARIA) */
+(PARTITION part_3 VALUES IN (-3) ENGINE = Aria,
+ PARTITION part_2 VALUES IN (-2) ENGINE = Aria,
+ PARTITION part_1 VALUES IN (-1) ENGINE = Aria,
+ PARTITION part_N VALUES IN (NULL) ENGINE = Aria,
+ PARTITION part0 VALUES IN (0) ENGINE = Aria,
+ PARTITION part1 VALUES IN (1) ENGINE = Aria,
+ PARTITION part2 VALUES IN (2) ENGINE = Aria,
+ PARTITION part3 VALUES IN (3) ENGINE = Aria) */
 
 unified filelist
 t1#P#part0.MAD
@@ -13973,14 +13973,14 @@
   `f_char1` char(20) DEFAULT NULL,
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE (f_int1)
-(PARTITION parta VALUES LESS THAN (0) ENGINE = MARIA,
- PARTITION partb VALUES LESS THAN (5) ENGINE = MARIA,
- PARTITION partc VALUES LESS THAN (10) ENGINE = MARIA,
- PARTITION partd VALUES LESS THAN (15) ENGINE = MARIA,
- PARTITION parte VALUES LESS THAN (20) ENGINE = MARIA,
- PARTITION partf VALUES LESS THAN (2147483646) ENGINE = MARIA) */
+(PARTITION parta VALUES LESS THAN (0) ENGINE = Aria,
+ PARTITION partb VALUES LESS THAN (5) ENGINE = Aria,
+ PARTITION partc VALUES LESS THAN (10) ENGINE = Aria,
+ PARTITION partd VALUES LESS THAN (15) ENGINE = Aria,
+ PARTITION parte VALUES LESS THAN (20) ENGINE = Aria,
+ PARTITION partf VALUES LESS THAN (2147483646) ENGINE = Aria) */
 
 unified filelist
 t1#P#parta.MAD
@@ -14453,14 +14453,14 @@
   `f_char1` char(20) DEFAULT NULL,
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE (f_int1 DIV 2)
 SUBPARTITION BY HASH (f_int1)
 SUBPARTITIONS 2
-(PARTITION parta VALUES LESS THAN (0) ENGINE = MARIA,
- PARTITION partb VALUES LESS THAN (5) ENGINE = MARIA,
- PARTITION partc VALUES LESS THAN (10) ENGINE = MARIA,
- PARTITION partd VALUES LESS THAN (2147483646) ENGINE = MARIA) */
+(PARTITION parta VALUES LESS THAN (0) ENGINE = Aria,
+ PARTITION partb VALUES LESS THAN (5) ENGINE = Aria,
+ PARTITION partc VALUES LESS THAN (10) ENGINE = Aria,
+ PARTITION partd VALUES LESS THAN (2147483646) ENGINE = Aria) */
 
 unified filelist
 t1#P#parta#SP#partasp0.MAD
@@ -14943,21 +14943,21 @@
   `f_char1` char(20) DEFAULT NULL,
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE (f_int1)
 SUBPARTITION BY KEY (f_int1)
 (PARTITION part1 VALUES LESS THAN (0)
- (SUBPARTITION subpart11 ENGINE = MARIA,
-  SUBPARTITION subpart12 ENGINE = MARIA),
+ (SUBPARTITION subpart11 ENGINE = Aria,
+  SUBPARTITION subpart12 ENGINE = Aria),
  PARTITION part2 VALUES LESS THAN (5)
- (SUBPARTITION subpart21 ENGINE = MARIA,
-  SUBPARTITION subpart22 ENGINE = MARIA),
+ (SUBPARTITION subpart21 ENGINE = Aria,
+  SUBPARTITION subpart22 ENGINE = Aria),
  PARTITION part3 VALUES LESS THAN (10)
- (SUBPARTITION subpart31 ENGINE = MARIA,
-  SUBPARTITION subpart32 ENGINE = MARIA),
+ (SUBPARTITION subpart31 ENGINE = Aria,
+  SUBPARTITION subpart32 ENGINE = Aria),
  PARTITION part4 VALUES LESS THAN (2147483646)
- (SUBPARTITION subpart41 ENGINE = MARIA,
-  SUBPARTITION subpart42 ENGINE = MARIA)) */
+ (SUBPARTITION subpart41 ENGINE = Aria,
+  SUBPARTITION subpart42 ENGINE = Aria)) */
 
 unified filelist
 t1#P#part1#SP#subpart11.MAD
@@ -15438,21 +15438,21 @@
   `f_char1` char(20) DEFAULT NULL,
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3)))
 SUBPARTITION BY HASH (f_int1 + 1)
 (PARTITION part1 VALUES IN (0)
- (SUBPARTITION sp11 ENGINE = MARIA,
-  SUBPARTITION sp12 ENGINE = MARIA),
+ (SUBPARTITION sp11 ENGINE = Aria,
+  SUBPARTITION sp12 ENGINE = Aria),
  PARTITION part2 VALUES IN (1)
- (SUBPARTITION sp21 ENGINE = MARIA,
-  SUBPARTITION sp22 ENGINE = MARIA),
+ (SUBPARTITION sp21 ENGINE = Aria,
+  SUBPARTITION sp22 ENGINE = Aria),
  PARTITION part3 VALUES IN (2)
- (SUBPARTITION sp31 ENGINE = MARIA,
-  SUBPARTITION sp32 ENGINE = MARIA),
+ (SUBPARTITION sp31 ENGINE = Aria,
+  SUBPARTITION sp32 ENGINE = Aria),
  PARTITION part4 VALUES IN (NULL)
- (SUBPARTITION sp41 ENGINE = MARIA,
-  SUBPARTITION sp42 ENGINE = MARIA)) */
+ (SUBPARTITION sp41 ENGINE = Aria,
+  SUBPARTITION sp42 ENGINE = Aria)) */
 
 unified filelist
 t1#P#part1#SP#sp11.MAD
@@ -15931,13 +15931,13 @@
   `f_char1` char(20) DEFAULT NULL,
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2)))
 SUBPARTITION BY KEY (f_int1)
 SUBPARTITIONS 3
-(PARTITION part1 VALUES IN (0) ENGINE = MARIA,
- PARTITION part2 VALUES IN (1) ENGINE = MARIA,
- PARTITION part3 VALUES IN (NULL) ENGINE = MARIA) */
+(PARTITION part1 VALUES IN (0) ENGINE = Aria,
+ PARTITION part2 VALUES IN (1) ENGINE = Aria,
+ PARTITION part3 VALUES IN (NULL) ENGINE = Aria) */
 
 unified filelist
 t1#P#part1#SP#part1sp0.MAD
@@ -16415,7 +16415,7 @@
   `f_char1` char(20) DEFAULT NULL,
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY HASH (f_int1 + f_int2)
 PARTITIONS 2 */
 
@@ -16880,7 +16880,7 @@
   `f_char1` char(20) DEFAULT NULL,
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY KEY (f_int1,f_int2)
 PARTITIONS 5 */
 
@@ -17359,16 +17359,16 @@
   `f_char1` char(20) DEFAULT NULL,
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4))
-(PARTITION part_3 VALUES IN (-3) ENGINE = MARIA,
- PARTITION part_2 VALUES IN (-2) ENGINE = MARIA,
- PARTITION part_1 VALUES IN (-1) ENGINE = MARIA,
- PARTITION part_N VALUES IN (NULL) ENGINE = MARIA,
- PARTITION part0 VALUES IN (0) ENGINE = MARIA,
- PARTITION part1 VALUES IN (1) ENGINE = MARIA,
- PARTITION part2 VALUES IN (2) ENGINE = MARIA,
- PARTITION part3 VALUES IN (3) ENGINE = MARIA) */
+(PARTITION part_3 VALUES IN (-3) ENGINE = Aria,
+ PARTITION part_2 VALUES IN (-2) ENGINE = Aria,
+ PARTITION part_1 VALUES IN (-1) ENGINE = Aria,
+ PARTITION part_N VALUES IN (NULL) ENGINE = Aria,
+ PARTITION part0 VALUES IN (0) ENGINE = Aria,
+ PARTITION part1 VALUES IN (1) ENGINE = Aria,
+ PARTITION part2 VALUES IN (2) ENGINE = Aria,
+ PARTITION part3 VALUES IN (3) ENGINE = Aria) */
 
 unified filelist
 t1#P#part0.MAD
@@ -17849,14 +17849,14 @@
   `f_char1` char(20) DEFAULT NULL,
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2)
-(PARTITION parta VALUES LESS THAN (0) ENGINE = MARIA,
- PARTITION partb VALUES LESS THAN (5) ENGINE = MARIA,
- PARTITION partc VALUES LESS THAN (10) ENGINE = MARIA,
- PARTITION partd VALUES LESS THAN (15) ENGINE = MARIA,
- PARTITION parte VALUES LESS THAN (20) ENGINE = MARIA,
- PARTITION partf VALUES LESS THAN (2147483646) ENGINE = MARIA) */
+(PARTITION parta VALUES LESS THAN (0) ENGINE = Aria,
+ PARTITION partb VALUES LESS THAN (5) ENGINE = Aria,
+ PARTITION partc VALUES LESS THAN (10) ENGINE = Aria,
+ PARTITION partd VALUES LESS THAN (15) ENGINE = Aria,
+ PARTITION parte VALUES LESS THAN (20) ENGINE = Aria,
+ PARTITION partf VALUES LESS THAN (2147483646) ENGINE = Aria) */
 
 unified filelist
 t1#P#parta.MAD
@@ -18329,14 +18329,14 @@
   `f_char1` char(20) DEFAULT NULL,
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE (f_int1)
 SUBPARTITION BY HASH (f_int2)
 SUBPARTITIONS 2
-(PARTITION parta VALUES LESS THAN (0) ENGINE = MARIA,
- PARTITION partb VALUES LESS THAN (5) ENGINE = MARIA,
- PARTITION partc VALUES LESS THAN (10) ENGINE = MARIA,
- PARTITION partd VALUES LESS THAN (2147483646) ENGINE = MARIA) */
+(PARTITION parta VALUES LESS THAN (0) ENGINE = Aria,
+ PARTITION partb VALUES LESS THAN (5) ENGINE = Aria,
+ PARTITION partc VALUES LESS THAN (10) ENGINE = Aria,
+ PARTITION partd VALUES LESS THAN (2147483646) ENGINE = Aria) */
 
 unified filelist
 t1#P#parta#SP#partasp0.MAD
@@ -18817,21 +18817,21 @@
   `f_char1` char(20) DEFAULT NULL,
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE (f_int1)
 SUBPARTITION BY KEY (f_int2)
 (PARTITION part1 VALUES LESS THAN (0)
- (SUBPARTITION subpart11 ENGINE = MARIA,
-  SUBPARTITION subpart12 ENGINE = MARIA),
+ (SUBPARTITION subpart11 ENGINE = Aria,
+  SUBPARTITION subpart12 ENGINE = Aria),
  PARTITION part2 VALUES LESS THAN (5)
- (SUBPARTITION subpart21 ENGINE = MARIA,
-  SUBPARTITION subpart22 ENGINE = MARIA),
+ (SUBPARTITION subpart21 ENGINE = Aria,
+  SUBPARTITION subpart22 ENGINE = Aria),
  PARTITION part3 VALUES LESS THAN (10)
- (SUBPARTITION subpart31 ENGINE = MARIA,
-  SUBPARTITION subpart32 ENGINE = MARIA),
+ (SUBPARTITION subpart31 ENGINE = Aria,
+  SUBPARTITION subpart32 ENGINE = Aria),
  PARTITION part4 VALUES LESS THAN (2147483646)
- (SUBPARTITION subpart41 ENGINE = MARIA,
-  SUBPARTITION subpart42 ENGINE = MARIA)) */
+ (SUBPARTITION subpart41 ENGINE = Aria,
+  SUBPARTITION subpart42 ENGINE = Aria)) */
 
 unified filelist
 t1#P#part1#SP#subpart11.MAD
@@ -19312,21 +19312,21 @@
   `f_char1` char(20) DEFAULT NULL,
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3)))
 SUBPARTITION BY HASH (f_int2 + 1)
 (PARTITION part1 VALUES IN (0)
- (SUBPARTITION sp11 ENGINE = MARIA,
-  SUBPARTITION sp12 ENGINE = MARIA),
+ (SUBPARTITION sp11 ENGINE = Aria,
+  SUBPARTITION sp12 ENGINE = Aria),
  PARTITION part2 VALUES IN (1)
- (SUBPARTITION sp21 ENGINE = MARIA,
-  SUBPARTITION sp22 ENGINE = MARIA),
+ (SUBPARTITION sp21 ENGINE = Aria,
+  SUBPARTITION sp22 ENGINE = Aria),
  PARTITION part3 VALUES IN (2)
- (SUBPARTITION sp31 ENGINE = MARIA,
-  SUBPARTITION sp32 ENGINE = MARIA),
+ (SUBPARTITION sp31 ENGINE = Aria,
+  SUBPARTITION sp32 ENGINE = Aria),
  PARTITION part4 VALUES IN (NULL)
- (SUBPARTITION sp41 ENGINE = MARIA,
-  SUBPARTITION sp42 ENGINE = MARIA)) */
+ (SUBPARTITION sp41 ENGINE = Aria,
+  SUBPARTITION sp42 ENGINE = Aria)) */
 
 unified filelist
 t1#P#part1#SP#sp11.MAD
@@ -19805,13 +19805,13 @@
   `f_char1` char(20) DEFAULT NULL,
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2)))
 SUBPARTITION BY KEY (f_int2)
 SUBPARTITIONS 3
-(PARTITION part1 VALUES IN (0) ENGINE = MARIA,
- PARTITION part2 VALUES IN (1) ENGINE = MARIA,
- PARTITION part3 VALUES IN (NULL) ENGINE = MARIA) */
+(PARTITION part1 VALUES IN (0) ENGINE = Aria,
+ PARTITION part2 VALUES IN (1) ENGINE = Aria,
+ PARTITION part3 VALUES IN (NULL) ENGINE = Aria) */
 
 unified filelist
 t1#P#part1#SP#part1sp0.MAD
@@ -20291,7 +20291,7 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int1`,`f_int2`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY HASH (f_int1)
 PARTITIONS 2 */
 
@@ -20808,7 +20808,7 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int1`,`f_int2`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY KEY (f_int1)
 PARTITIONS 5 */
 
@@ -21339,16 +21339,16 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int1`,`f_int2`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (MOD(f_int1,4))
-(PARTITION part_3 VALUES IN (-3) ENGINE = MARIA,
- PARTITION part_2 VALUES IN (-2) ENGINE = MARIA,
- PARTITION part_1 VALUES IN (-1) ENGINE = MARIA,
- PARTITION part_N VALUES IN (NULL) ENGINE = MARIA,
- PARTITION part0 VALUES IN (0) ENGINE = MARIA,
- PARTITION part1 VALUES IN (1) ENGINE = MARIA,
- PARTITION part2 VALUES IN (2) ENGINE = MARIA,
- PARTITION part3 VALUES IN (3) ENGINE = MARIA) */
+(PARTITION part_3 VALUES IN (-3) ENGINE = Aria,
+ PARTITION part_2 VALUES IN (-2) ENGINE = Aria,
+ PARTITION part_1 VALUES IN (-1) ENGINE = Aria,
+ PARTITION part_N VALUES IN (NULL) ENGINE = Aria,
+ PARTITION part0 VALUES IN (0) ENGINE = Aria,
+ PARTITION part1 VALUES IN (1) ENGINE = Aria,
+ PARTITION part2 VALUES IN (2) ENGINE = Aria,
+ PARTITION part3 VALUES IN (3) ENGINE = Aria) */
 
 unified filelist
 t1#P#part0.MAD
@@ -21881,14 +21881,14 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int1`,`f_int2`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE (f_int1)
-(PARTITION parta VALUES LESS THAN (0) ENGINE = MARIA,
- PARTITION partb VALUES LESS THAN (5) ENGINE = MARIA,
- PARTITION partc VALUES LESS THAN (10) ENGINE = MARIA,
- PARTITION partd VALUES LESS THAN (15) ENGINE = MARIA,
- PARTITION parte VALUES LESS THAN (20) ENGINE = MARIA,
- PARTITION partf VALUES LESS THAN (2147483646) ENGINE = MARIA) */
+(PARTITION parta VALUES LESS THAN (0) ENGINE = Aria,
+ PARTITION partb VALUES LESS THAN (5) ENGINE = Aria,
+ PARTITION partc VALUES LESS THAN (10) ENGINE = Aria,
+ PARTITION partd VALUES LESS THAN (15) ENGINE = Aria,
+ PARTITION parte VALUES LESS THAN (20) ENGINE = Aria,
+ PARTITION partf VALUES LESS THAN (2147483646) ENGINE = Aria) */
 
 unified filelist
 t1#P#parta.MAD
@@ -22413,14 +22413,14 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int1`,`f_int2`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE (f_int1 DIV 2)
 SUBPARTITION BY HASH (f_int1)
 SUBPARTITIONS 2
-(PARTITION parta VALUES LESS THAN (0) ENGINE = MARIA,
- PARTITION partb VALUES LESS THAN (5) ENGINE = MARIA,
- PARTITION partc VALUES LESS THAN (10) ENGINE = MARIA,
- PARTITION partd VALUES LESS THAN (2147483646) ENGINE = MARIA) */
+(PARTITION parta VALUES LESS THAN (0) ENGINE = Aria,
+ PARTITION partb VALUES LESS THAN (5) ENGINE = Aria,
+ PARTITION partc VALUES LESS THAN (10) ENGINE = Aria,
+ PARTITION partd VALUES LESS THAN (2147483646) ENGINE = Aria) */
 
 unified filelist
 t1#P#parta#SP#partasp0.MAD
@@ -22955,21 +22955,21 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int1`,`f_int2`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE (f_int1)
 SUBPARTITION BY KEY (f_int1)
 (PARTITION part1 VALUES LESS THAN (0)
- (SUBPARTITION subpart11 ENGINE = MARIA,
-  SUBPARTITION subpart12 ENGINE = MARIA),
+ (SUBPARTITION subpart11 ENGINE = Aria,
+  SUBPARTITION subpart12 ENGINE = Aria),
  PARTITION part2 VALUES LESS THAN (5)
- (SUBPARTITION subpart21 ENGINE = MARIA,
-  SUBPARTITION subpart22 ENGINE = MARIA),
+ (SUBPARTITION subpart21 ENGINE = Aria,
+  SUBPARTITION subpart22 ENGINE = Aria),
  PARTITION part3 VALUES LESS THAN (10)
- (SUBPARTITION subpart31 ENGINE = MARIA,
-  SUBPARTITION subpart32 ENGINE = MARIA),
+ (SUBPARTITION subpart31 ENGINE = Aria,
+  SUBPARTITION subpart32 ENGINE = Aria),
  PARTITION part4 VALUES LESS THAN (2147483646)
- (SUBPARTITION subpart41 ENGINE = MARIA,
-  SUBPARTITION subpart42 ENGINE = MARIA)) */
+ (SUBPARTITION subpart41 ENGINE = Aria,
+  SUBPARTITION subpart42 ENGINE = Aria)) */
 
 unified filelist
 t1#P#part1#SP#subpart11.MAD
@@ -23502,21 +23502,21 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int1`,`f_int2`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3)))
 SUBPARTITION BY HASH (f_int1 + 1)
 (PARTITION part1 VALUES IN (0)
- (SUBPARTITION sp11 ENGINE = MARIA,
-  SUBPARTITION sp12 ENGINE = MARIA),
+ (SUBPARTITION sp11 ENGINE = Aria,
+  SUBPARTITION sp12 ENGINE = Aria),
  PARTITION part2 VALUES IN (1)
- (SUBPARTITION sp21 ENGINE = MARIA,
-  SUBPARTITION sp22 ENGINE = MARIA),
+ (SUBPARTITION sp21 ENGINE = Aria,
+  SUBPARTITION sp22 ENGINE = Aria),
  PARTITION part3 VALUES IN (2)
- (SUBPARTITION sp31 ENGINE = MARIA,
-  SUBPARTITION sp32 ENGINE = MARIA),
+ (SUBPARTITION sp31 ENGINE = Aria,
+  SUBPARTITION sp32 ENGINE = Aria),
  PARTITION part4 VALUES IN (NULL)
- (SUBPARTITION sp41 ENGINE = MARIA,
-  SUBPARTITION sp42 ENGINE = MARIA)) */
+ (SUBPARTITION sp41 ENGINE = Aria,
+  SUBPARTITION sp42 ENGINE = Aria)) */
 
 unified filelist
 t1#P#part1#SP#sp11.MAD
@@ -24047,13 +24047,13 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int1`,`f_int2`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2)))
 SUBPARTITION BY KEY (f_int1)
 SUBPARTITIONS 3
-(PARTITION part1 VALUES IN (0) ENGINE = MARIA,
- PARTITION part2 VALUES IN (1) ENGINE = MARIA,
- PARTITION part3 VALUES IN (NULL) ENGINE = MARIA) */
+(PARTITION part1 VALUES IN (0) ENGINE = Aria,
+ PARTITION part2 VALUES IN (1) ENGINE = Aria,
+ PARTITION part3 VALUES IN (NULL) ENGINE = Aria) */
 
 unified filelist
 t1#P#part1#SP#part1sp0.MAD
@@ -24583,7 +24583,7 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int1`,`f_int2`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY HASH (f_int1 + f_int2)
 PARTITIONS 2 */
 
@@ -25100,7 +25100,7 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int1`,`f_int2`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY KEY (f_int1,f_int2)
 PARTITIONS 5 */
 
@@ -25631,16 +25631,16 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int1`,`f_int2`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4))
-(PARTITION part_3 VALUES IN (-3) ENGINE = MARIA,
- PARTITION part_2 VALUES IN (-2) ENGINE = MARIA,
- PARTITION part_1 VALUES IN (-1) ENGINE = MARIA,
- PARTITION part_N VALUES IN (NULL) ENGINE = MARIA,
- PARTITION part0 VALUES IN (0) ENGINE = MARIA,
- PARTITION part1 VALUES IN (1) ENGINE = MARIA,
- PARTITION part2 VALUES IN (2) ENGINE = MARIA,
- PARTITION part3 VALUES IN (3) ENGINE = MARIA) */
+(PARTITION part_3 VALUES IN (-3) ENGINE = Aria,
+ PARTITION part_2 VALUES IN (-2) ENGINE = Aria,
+ PARTITION part_1 VALUES IN (-1) ENGINE = Aria,
+ PARTITION part_N VALUES IN (NULL) ENGINE = Aria,
+ PARTITION part0 VALUES IN (0) ENGINE = Aria,
+ PARTITION part1 VALUES IN (1) ENGINE = Aria,
+ PARTITION part2 VALUES IN (2) ENGINE = Aria,
+ PARTITION part3 VALUES IN (3) ENGINE = Aria) */
 
 unified filelist
 t1#P#part0.MAD
@@ -26173,14 +26173,14 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int1`,`f_int2`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2)
-(PARTITION parta VALUES LESS THAN (0) ENGINE = MARIA,
- PARTITION partb VALUES LESS THAN (5) ENGINE = MARIA,
- PARTITION partc VALUES LESS THAN (10) ENGINE = MARIA,
- PARTITION partd VALUES LESS THAN (15) ENGINE = MARIA,
- PARTITION parte VALUES LESS THAN (20) ENGINE = MARIA,
- PARTITION partf VALUES LESS THAN (2147483646) ENGINE = MARIA) */
+(PARTITION parta VALUES LESS THAN (0) ENGINE = Aria,
+ PARTITION partb VALUES LESS THAN (5) ENGINE = Aria,
+ PARTITION partc VALUES LESS THAN (10) ENGINE = Aria,
+ PARTITION partd VALUES LESS THAN (15) ENGINE = Aria,
+ PARTITION parte VALUES LESS THAN (20) ENGINE = Aria,
+ PARTITION partf VALUES LESS THAN (2147483646) ENGINE = Aria) */
 
 unified filelist
 t1#P#parta.MAD
@@ -26705,14 +26705,14 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int1`,`f_int2`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE (f_int1)
 SUBPARTITION BY HASH (f_int2)
 SUBPARTITIONS 2
-(PARTITION parta VALUES LESS THAN (0) ENGINE = MARIA,
- PARTITION partb VALUES LESS THAN (5) ENGINE = MARIA,
- PARTITION partc VALUES LESS THAN (10) ENGINE = MARIA,
- PARTITION partd VALUES LESS THAN (2147483646) ENGINE = MARIA) */
+(PARTITION parta VALUES LESS THAN (0) ENGINE = Aria,
+ PARTITION partb VALUES LESS THAN (5) ENGINE = Aria,
+ PARTITION partc VALUES LESS THAN (10) ENGINE = Aria,
+ PARTITION partd VALUES LESS THAN (2147483646) ENGINE = Aria) */
 
 unified filelist
 t1#P#parta#SP#partasp0.MAD
@@ -27245,21 +27245,21 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int1`,`f_int2`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE (f_int1)
 SUBPARTITION BY KEY (f_int2)
 (PARTITION part1 VALUES LESS THAN (0)
- (SUBPARTITION subpart11 ENGINE = MARIA,
-  SUBPARTITION subpart12 ENGINE = MARIA),
+ (SUBPARTITION subpart11 ENGINE = Aria,
+  SUBPARTITION subpart12 ENGINE = Aria),
  PARTITION part2 VALUES LESS THAN (5)
- (SUBPARTITION subpart21 ENGINE = MARIA,
-  SUBPARTITION subpart22 ENGINE = MARIA),
+ (SUBPARTITION subpart21 ENGINE = Aria,
+  SUBPARTITION subpart22 ENGINE = Aria),
  PARTITION part3 VALUES LESS THAN (10)
- (SUBPARTITION subpart31 ENGINE = MARIA,
-  SUBPARTITION subpart32 ENGINE = MARIA),
+ (SUBPARTITION subpart31 ENGINE = Aria,
+  SUBPARTITION subpart32 ENGINE = Aria),
  PARTITION part4 VALUES LESS THAN (2147483646)
- (SUBPARTITION subpart41 ENGINE = MARIA,
-  SUBPARTITION subpart42 ENGINE = MARIA)) */
+ (SUBPARTITION subpart41 ENGINE = Aria,
+  SUBPARTITION subpart42 ENGINE = Aria)) */
 
 unified filelist
 t1#P#part1#SP#subpart11.MAD
@@ -27792,21 +27792,21 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int1`,`f_int2`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3)))
 SUBPARTITION BY HASH (f_int2 + 1)
 (PARTITION part1 VALUES IN (0)
- (SUBPARTITION sp11 ENGINE = MARIA,
-  SUBPARTITION sp12 ENGINE = MARIA),
+ (SUBPARTITION sp11 ENGINE = Aria,
+  SUBPARTITION sp12 ENGINE = Aria),
  PARTITION part2 VALUES IN (1)
- (SUBPARTITION sp21 ENGINE = MARIA,
-  SUBPARTITION sp22 ENGINE = MARIA),
+ (SUBPARTITION sp21 ENGINE = Aria,
+  SUBPARTITION sp22 ENGINE = Aria),
  PARTITION part3 VALUES IN (2)
- (SUBPARTITION sp31 ENGINE = MARIA,
-  SUBPARTITION sp32 ENGINE = MARIA),
+ (SUBPARTITION sp31 ENGINE = Aria,
+  SUBPARTITION sp32 ENGINE = Aria),
  PARTITION part4 VALUES IN (NULL)
- (SUBPARTITION sp41 ENGINE = MARIA,
-  SUBPARTITION sp42 ENGINE = MARIA)) */
+ (SUBPARTITION sp41 ENGINE = Aria,
+  SUBPARTITION sp42 ENGINE = Aria)) */
 
 unified filelist
 t1#P#part1#SP#sp11.MAD
@@ -28337,13 +28337,13 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int1`,`f_int2`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2)))
 SUBPARTITION BY KEY (f_int2)
 SUBPARTITIONS 3
-(PARTITION part1 VALUES IN (0) ENGINE = MARIA,
- PARTITION part2 VALUES IN (1) ENGINE = MARIA,
- PARTITION part3 VALUES IN (NULL) ENGINE = MARIA) */
+(PARTITION part1 VALUES IN (0) ENGINE = Aria,
+ PARTITION part2 VALUES IN (1) ENGINE = Aria,
+ PARTITION part3 VALUES IN (NULL) ENGINE = Aria) */
 
 unified filelist
 t1#P#part1#SP#part1sp0.MAD
@@ -28873,7 +28873,7 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int2`,`f_int1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY HASH (f_int1)
 PARTITIONS 2 */
 
@@ -29390,7 +29390,7 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int2`,`f_int1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY KEY (f_int1)
 PARTITIONS 5 */
 
@@ -29921,16 +29921,16 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int2`,`f_int1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (MOD(f_int1,4))
-(PARTITION part_3 VALUES IN (-3) ENGINE = MARIA,
- PARTITION part_2 VALUES IN (-2) ENGINE = MARIA,
- PARTITION part_1 VALUES IN (-1) ENGINE = MARIA,
- PARTITION part_N VALUES IN (NULL) ENGINE = MARIA,
- PARTITION part0 VALUES IN (0) ENGINE = MARIA,
- PARTITION part1 VALUES IN (1) ENGINE = MARIA,
- PARTITION part2 VALUES IN (2) ENGINE = MARIA,
- PARTITION part3 VALUES IN (3) ENGINE = MARIA) */
+(PARTITION part_3 VALUES IN (-3) ENGINE = Aria,
+ PARTITION part_2 VALUES IN (-2) ENGINE = Aria,
+ PARTITION part_1 VALUES IN (-1) ENGINE = Aria,
+ PARTITION part_N VALUES IN (NULL) ENGINE = Aria,
+ PARTITION part0 VALUES IN (0) ENGINE = Aria,
+ PARTITION part1 VALUES IN (1) ENGINE = Aria,
+ PARTITION part2 VALUES IN (2) ENGINE = Aria,
+ PARTITION part3 VALUES IN (3) ENGINE = Aria) */
 
 unified filelist
 t1#P#part0.MAD
@@ -30463,14 +30463,14 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int2`,`f_int1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE (f_int1)
-(PARTITION parta VALUES LESS THAN (0) ENGINE = MARIA,
- PARTITION partb VALUES LESS THAN (5) ENGINE = MARIA,
- PARTITION partc VALUES LESS THAN (10) ENGINE = MARIA,
- PARTITION partd VALUES LESS THAN (15) ENGINE = MARIA,
- PARTITION parte VALUES LESS THAN (20) ENGINE = MARIA,
- PARTITION partf VALUES LESS THAN (2147483646) ENGINE = MARIA) */
+(PARTITION parta VALUES LESS THAN (0) ENGINE = Aria,
+ PARTITION partb VALUES LESS THAN (5) ENGINE = Aria,
+ PARTITION partc VALUES LESS THAN (10) ENGINE = Aria,
+ PARTITION partd VALUES LESS THAN (15) ENGINE = Aria,
+ PARTITION parte VALUES LESS THAN (20) ENGINE = Aria,
+ PARTITION partf VALUES LESS THAN (2147483646) ENGINE = Aria) */
 
 unified filelist
 t1#P#parta.MAD
@@ -30995,14 +30995,14 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int2`,`f_int1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE (f_int1 DIV 2)
 SUBPARTITION BY HASH (f_int1)
 SUBPARTITIONS 2
-(PARTITION parta VALUES LESS THAN (0) ENGINE = MARIA,
- PARTITION partb VALUES LESS THAN (5) ENGINE = MARIA,
- PARTITION partc VALUES LESS THAN (10) ENGINE = MARIA,
- PARTITION partd VALUES LESS THAN (2147483646) ENGINE = MARIA) */
+(PARTITION parta VALUES LESS THAN (0) ENGINE = Aria,
+ PARTITION partb VALUES LESS THAN (5) ENGINE = Aria,
+ PARTITION partc VALUES LESS THAN (10) ENGINE = Aria,
+ PARTITION partd VALUES LESS THAN (2147483646) ENGINE = Aria) */
 
 unified filelist
 t1#P#parta#SP#partasp0.MAD
@@ -31537,21 +31537,21 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int2`,`f_int1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE (f_int1)
 SUBPARTITION BY KEY (f_int1)
 (PARTITION part1 VALUES LESS THAN (0)
- (SUBPARTITION subpart11 ENGINE = MARIA,
-  SUBPARTITION subpart12 ENGINE = MARIA),
+ (SUBPARTITION subpart11 ENGINE = Aria,
+  SUBPARTITION subpart12 ENGINE = Aria),
  PARTITION part2 VALUES LESS THAN (5)
- (SUBPARTITION subpart21 ENGINE = MARIA,
-  SUBPARTITION subpart22 ENGINE = MARIA),
+ (SUBPARTITION subpart21 ENGINE = Aria,
+  SUBPARTITION subpart22 ENGINE = Aria),
  PARTITION part3 VALUES LESS THAN (10)
- (SUBPARTITION subpart31 ENGINE = MARIA,
-  SUBPARTITION subpart32 ENGINE = MARIA),
+ (SUBPARTITION subpart31 ENGINE = Aria,
+  SUBPARTITION subpart32 ENGINE = Aria),
  PARTITION part4 VALUES LESS THAN (2147483646)
- (SUBPARTITION subpart41 ENGINE = MARIA,
-  SUBPARTITION subpart42 ENGINE = MARIA)) */
+ (SUBPARTITION subpart41 ENGINE = Aria,
+  SUBPARTITION subpart42 ENGINE = Aria)) */
 
 unified filelist
 t1#P#part1#SP#subpart11.MAD
@@ -32084,21 +32084,21 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int2`,`f_int1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3)))
 SUBPARTITION BY HASH (f_int1 + 1)
 (PARTITION part1 VALUES IN (0)
- (SUBPARTITION sp11 ENGINE = MARIA,
-  SUBPARTITION sp12 ENGINE = MARIA),
+ (SUBPARTITION sp11 ENGINE = Aria,
+  SUBPARTITION sp12 ENGINE = Aria),
  PARTITION part2 VALUES IN (1)
- (SUBPARTITION sp21 ENGINE = MARIA,
-  SUBPARTITION sp22 ENGINE = MARIA),
+ (SUBPARTITION sp21 ENGINE = Aria,
+  SUBPARTITION sp22 ENGINE = Aria),
  PARTITION part3 VALUES IN (2)
- (SUBPARTITION sp31 ENGINE = MARIA,
-  SUBPARTITION sp32 ENGINE = MARIA),
+ (SUBPARTITION sp31 ENGINE = Aria,
+  SUBPARTITION sp32 ENGINE = Aria),
  PARTITION part4 VALUES IN (NULL)
- (SUBPARTITION sp41 ENGINE = MARIA,
-  SUBPARTITION sp42 ENGINE = MARIA)) */
+ (SUBPARTITION sp41 ENGINE = Aria,
+  SUBPARTITION sp42 ENGINE = Aria)) */
 
 unified filelist
 t1#P#part1#SP#sp11.MAD
@@ -32629,13 +32629,13 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int2`,`f_int1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2)))
 SUBPARTITION BY KEY (f_int1)
 SUBPARTITIONS 3
-(PARTITION part1 VALUES IN (0) ENGINE = MARIA,
- PARTITION part2 VALUES IN (1) ENGINE = MARIA,
- PARTITION part3 VALUES IN (NULL) ENGINE = MARIA) */
+(PARTITION part1 VALUES IN (0) ENGINE = Aria,
+ PARTITION part2 VALUES IN (1) ENGINE = Aria,
+ PARTITION part3 VALUES IN (NULL) ENGINE = Aria) */
 
 unified filelist
 t1#P#part1#SP#part1sp0.MAD
@@ -33165,7 +33165,7 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int2`,`f_int1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY HASH (f_int1 + f_int2)
 PARTITIONS 2 */
 
@@ -33682,7 +33682,7 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int2`,`f_int1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY KEY (f_int1,f_int2)
 PARTITIONS 5 */
 
@@ -34213,16 +34213,16 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int2`,`f_int1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4))
-(PARTITION part_3 VALUES IN (-3) ENGINE = MARIA,
- PARTITION part_2 VALUES IN (-2) ENGINE = MARIA,
- PARTITION part_1 VALUES IN (-1) ENGINE = MARIA,
- PARTITION part_N VALUES IN (NULL) ENGINE = MARIA,
- PARTITION part0 VALUES IN (0) ENGINE = MARIA,
- PARTITION part1 VALUES IN (1) ENGINE = MARIA,
- PARTITION part2 VALUES IN (2) ENGINE = MARIA,
- PARTITION part3 VALUES IN (3) ENGINE = MARIA) */
+(PARTITION part_3 VALUES IN (-3) ENGINE = Aria,
+ PARTITION part_2 VALUES IN (-2) ENGINE = Aria,
+ PARTITION part_1 VALUES IN (-1) ENGINE = Aria,
+ PARTITION part_N VALUES IN (NULL) ENGINE = Aria,
+ PARTITION part0 VALUES IN (0) ENGINE = Aria,
+ PARTITION part1 VALUES IN (1) ENGINE = Aria,
+ PARTITION part2 VALUES IN (2) ENGINE = Aria,
+ PARTITION part3 VALUES IN (3) ENGINE = Aria) */
 
 unified filelist
 t1#P#part0.MAD
@@ -34755,14 +34755,14 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int2`,`f_int1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2)
-(PARTITION parta VALUES LESS THAN (0) ENGINE = MARIA,
- PARTITION partb VALUES LESS THAN (5) ENGINE = MARIA,
- PARTITION partc VALUES LESS THAN (10) ENGINE = MARIA,
- PARTITION partd VALUES LESS THAN (15) ENGINE = MARIA,
- PARTITION parte VALUES LESS THAN (20) ENGINE = MARIA,
- PARTITION partf VALUES LESS THAN (2147483646) ENGINE = MARIA) */
+(PARTITION parta VALUES LESS THAN (0) ENGINE = Aria,
+ PARTITION partb VALUES LESS THAN (5) ENGINE = Aria,
+ PARTITION partc VALUES LESS THAN (10) ENGINE = Aria,
+ PARTITION partd VALUES LESS THAN (15) ENGINE = Aria,
+ PARTITION parte VALUES LESS THAN (20) ENGINE = Aria,
+ PARTITION partf VALUES LESS THAN (2147483646) ENGINE = Aria) */
 
 unified filelist
 t1#P#parta.MAD
@@ -35287,14 +35287,14 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int2`,`f_int1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE (f_int1)
 SUBPARTITION BY HASH (f_int2)
 SUBPARTITIONS 2
-(PARTITION parta VALUES LESS THAN (0) ENGINE = MARIA,
- PARTITION partb VALUES LESS THAN (5) ENGINE = MARIA,
- PARTITION partc VALUES LESS THAN (10) ENGINE = MARIA,
- PARTITION partd VALUES LESS THAN (2147483646) ENGINE = MARIA) */
+(PARTITION parta VALUES LESS THAN (0) ENGINE = Aria,
+ PARTITION partb VALUES LESS THAN (5) ENGINE = Aria,
+ PARTITION partc VALUES LESS THAN (10) ENGINE = Aria,
+ PARTITION partd VALUES LESS THAN (2147483646) ENGINE = Aria) */
 
 unified filelist
 t1#P#parta#SP#partasp0.MAD
@@ -35827,21 +35827,21 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int2`,`f_int1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE (f_int1)
 SUBPARTITION BY KEY (f_int2)
 (PARTITION part1 VALUES LESS THAN (0)
- (SUBPARTITION subpart11 ENGINE = MARIA,
-  SUBPARTITION subpart12 ENGINE = MARIA),
+ (SUBPARTITION subpart11 ENGINE = Aria,
+  SUBPARTITION subpart12 ENGINE = Aria),
  PARTITION part2 VALUES LESS THAN (5)
- (SUBPARTITION subpart21 ENGINE = MARIA,
-  SUBPARTITION subpart22 ENGINE = MARIA),
+ (SUBPARTITION subpart21 ENGINE = Aria,
+  SUBPARTITION subpart22 ENGINE = Aria),
  PARTITION part3 VALUES LESS THAN (10)
- (SUBPARTITION subpart31 ENGINE = MARIA,
-  SUBPARTITION subpart32 ENGINE = MARIA),
+ (SUBPARTITION subpart31 ENGINE = Aria,
+  SUBPARTITION subpart32 ENGINE = Aria),
  PARTITION part4 VALUES LESS THAN (2147483646)
- (SUBPARTITION subpart41 ENGINE = MARIA,
-  SUBPARTITION subpart42 ENGINE = MARIA)) */
+ (SUBPARTITION subpart41 ENGINE = Aria,
+  SUBPARTITION subpart42 ENGINE = Aria)) */
 
 unified filelist
 t1#P#part1#SP#subpart11.MAD
@@ -36374,21 +36374,21 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int2`,`f_int1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3)))
 SUBPARTITION BY HASH (f_int2 + 1)
 (PARTITION part1 VALUES IN (0)
- (SUBPARTITION sp11 ENGINE = MARIA,
-  SUBPARTITION sp12 ENGINE = MARIA),
+ (SUBPARTITION sp11 ENGINE = Aria,
+  SUBPARTITION sp12 ENGINE = Aria),
  PARTITION part2 VALUES IN (1)
- (SUBPARTITION sp21 ENGINE = MARIA,
-  SUBPARTITION sp22 ENGINE = MARIA),
+ (SUBPARTITION sp21 ENGINE = Aria,
+  SUBPARTITION sp22 ENGINE = Aria),
  PARTITION part3 VALUES IN (2)
- (SUBPARTITION sp31 ENGINE = MARIA,
-  SUBPARTITION sp32 ENGINE = MARIA),
+ (SUBPARTITION sp31 ENGINE = Aria,
+  SUBPARTITION sp32 ENGINE = Aria),
  PARTITION part4 VALUES IN (NULL)
- (SUBPARTITION sp41 ENGINE = MARIA,
-  SUBPARTITION sp42 ENGINE = MARIA)) */
+ (SUBPARTITION sp41 ENGINE = Aria,
+  SUBPARTITION sp42 ENGINE = Aria)) */
 
 unified filelist
 t1#P#part1#SP#sp11.MAD
@@ -36919,13 +36919,13 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int2`,`f_int1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2)))
 SUBPARTITION BY KEY (f_int2)
 SUBPARTITIONS 3
-(PARTITION part1 VALUES IN (0) ENGINE = MARIA,
- PARTITION part2 VALUES IN (1) ENGINE = MARIA,
- PARTITION part3 VALUES IN (NULL) ENGINE = MARIA) */
+(PARTITION part1 VALUES IN (0) ENGINE = Aria,
+ PARTITION part2 VALUES IN (1) ENGINE = Aria,
+ PARTITION part3 VALUES IN (NULL) ENGINE = Aria) */
 
 unified filelist
 t1#P#part1#SP#part1sp0.MAD

=== modified file 'mysql-test/suite/parts/r/partition_alter2_2_maria.result'
--- a/mysql-test/suite/parts/r/partition_alter2_2_maria.result	2009-04-01 10:06:41 +0000
+++ b/mysql-test/suite/parts/r/partition_alter2_2_maria.result	2010-09-12 16:40:01 +0000
@@ -1,5 +1,5 @@
 SET @max_row = 20;
-SET @@session.storage_engine = 'MARIA';
+SET @@session.storage_engine = 'Aria';
 
 #------------------------------------------------------------------------
 #  0. Setting of auxiliary variables + Creation of an auxiliary tables
@@ -73,7 +73,7 @@
   `f_char1` char(20) DEFAULT NULL,
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY HASH (f_int1)
 PARTITIONS 2 */
 
@@ -540,7 +540,7 @@
   `f_char1` char(20) DEFAULT NULL,
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY KEY (f_int1)
 PARTITIONS 5 */
 
@@ -1021,16 +1021,16 @@
   `f_char1` char(20) DEFAULT NULL,
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (MOD(f_int1,4))
-(PARTITION part_3 VALUES IN (-3) ENGINE = MARIA,
- PARTITION part_2 VALUES IN (-2) ENGINE = MARIA,
- PARTITION part_1 VALUES IN (-1) ENGINE = MARIA,
- PARTITION part_N VALUES IN (NULL) ENGINE = MARIA,
- PARTITION part0 VALUES IN (0) ENGINE = MARIA,
- PARTITION part1 VALUES IN (1) ENGINE = MARIA,
- PARTITION part2 VALUES IN (2) ENGINE = MARIA,
- PARTITION part3 VALUES IN (3) ENGINE = MARIA) */
+(PARTITION part_3 VALUES IN (-3) ENGINE = Aria,
+ PARTITION part_2 VALUES IN (-2) ENGINE = Aria,
+ PARTITION part_1 VALUES IN (-1) ENGINE = Aria,
+ PARTITION part_N VALUES IN (NULL) ENGINE = Aria,
+ PARTITION part0 VALUES IN (0) ENGINE = Aria,
+ PARTITION part1 VALUES IN (1) ENGINE = Aria,
+ PARTITION part2 VALUES IN (2) ENGINE = Aria,
+ PARTITION part3 VALUES IN (3) ENGINE = Aria) */
 
 unified filelist
 t1#P#part0.MAD
@@ -1513,14 +1513,14 @@
   `f_char1` char(20) DEFAULT NULL,
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE (f_int1)
-(PARTITION parta VALUES LESS THAN (0) ENGINE = MARIA,
- PARTITION partb VALUES LESS THAN (5) ENGINE = MARIA,
- PARTITION partc VALUES LESS THAN (10) ENGINE = MARIA,
- PARTITION partd VALUES LESS THAN (15) ENGINE = MARIA,
- PARTITION parte VALUES LESS THAN (20) ENGINE = MARIA,
- PARTITION partf VALUES LESS THAN (2147483646) ENGINE = MARIA) */
+(PARTITION parta VALUES LESS THAN (0) ENGINE = Aria,
+ PARTITION partb VALUES LESS THAN (5) ENGINE = Aria,
+ PARTITION partc VALUES LESS THAN (10) ENGINE = Aria,
+ PARTITION partd VALUES LESS THAN (15) ENGINE = Aria,
+ PARTITION parte VALUES LESS THAN (20) ENGINE = Aria,
+ PARTITION partf VALUES LESS THAN (2147483646) ENGINE = Aria) */
 
 unified filelist
 t1#P#parta.MAD
@@ -1993,14 +1993,14 @@
   `f_char1` char(20) DEFAULT NULL,
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE (f_int1 DIV 2)
 SUBPARTITION BY HASH (f_int1)
 SUBPARTITIONS 2
-(PARTITION parta VALUES LESS THAN (0) ENGINE = MARIA,
- PARTITION partb VALUES LESS THAN (5) ENGINE = MARIA,
- PARTITION partc VALUES LESS THAN (10) ENGINE = MARIA,
- PARTITION partd VALUES LESS THAN (2147483646) ENGINE = MARIA) */
+(PARTITION parta VALUES LESS THAN (0) ENGINE = Aria,
+ PARTITION partb VALUES LESS THAN (5) ENGINE = Aria,
+ PARTITION partc VALUES LESS THAN (10) ENGINE = Aria,
+ PARTITION partd VALUES LESS THAN (2147483646) ENGINE = Aria) */
 
 unified filelist
 t1#P#parta#SP#partasp0.MAD
@@ -2485,21 +2485,21 @@
   `f_char1` char(20) DEFAULT NULL,
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE (f_int1)
 SUBPARTITION BY KEY (f_int1)
 (PARTITION part1 VALUES LESS THAN (0)
- (SUBPARTITION subpart11 ENGINE = MARIA,
-  SUBPARTITION subpart12 ENGINE = MARIA),
+ (SUBPARTITION subpart11 ENGINE = Aria,
+  SUBPARTITION subpart12 ENGINE = Aria),
  PARTITION part2 VALUES LESS THAN (5)
- (SUBPARTITION subpart21 ENGINE = MARIA,
-  SUBPARTITION subpart22 ENGINE = MARIA),
+ (SUBPARTITION subpart21 ENGINE = Aria,
+  SUBPARTITION subpart22 ENGINE = Aria),
  PARTITION part3 VALUES LESS THAN (10)
- (SUBPARTITION subpart31 ENGINE = MARIA,
-  SUBPARTITION subpart32 ENGINE = MARIA),
+ (SUBPARTITION subpart31 ENGINE = Aria,
+  SUBPARTITION subpart32 ENGINE = Aria),
  PARTITION part4 VALUES LESS THAN (2147483646)
- (SUBPARTITION subpart41 ENGINE = MARIA,
-  SUBPARTITION subpart42 ENGINE = MARIA)) */
+ (SUBPARTITION subpart41 ENGINE = Aria,
+  SUBPARTITION subpart42 ENGINE = Aria)) */
 
 unified filelist
 t1#P#part1#SP#subpart11.MAD
@@ -2980,21 +2980,21 @@
   `f_char1` char(20) DEFAULT NULL,
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3)))
 SUBPARTITION BY HASH (f_int1 + 1)
 (PARTITION part1 VALUES IN (0)
- (SUBPARTITION sp11 ENGINE = MARIA,
-  SUBPARTITION sp12 ENGINE = MARIA),
+ (SUBPARTITION sp11 ENGINE = Aria,
+  SUBPARTITION sp12 ENGINE = Aria),
  PARTITION part2 VALUES IN (1)
- (SUBPARTITION sp21 ENGINE = MARIA,
-  SUBPARTITION sp22 ENGINE = MARIA),
+ (SUBPARTITION sp21 ENGINE = Aria,
+  SUBPARTITION sp22 ENGINE = Aria),
  PARTITION part3 VALUES IN (2)
- (SUBPARTITION sp31 ENGINE = MARIA,
-  SUBPARTITION sp32 ENGINE = MARIA),
+ (SUBPARTITION sp31 ENGINE = Aria,
+  SUBPARTITION sp32 ENGINE = Aria),
  PARTITION part4 VALUES IN (NULL)
- (SUBPARTITION sp41 ENGINE = MARIA,
-  SUBPARTITION sp42 ENGINE = MARIA)) */
+ (SUBPARTITION sp41 ENGINE = Aria,
+  SUBPARTITION sp42 ENGINE = Aria)) */
 
 unified filelist
 t1#P#part1#SP#sp11.MAD
@@ -3475,13 +3475,13 @@
   `f_char1` char(20) DEFAULT NULL,
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2)))
 SUBPARTITION BY KEY (f_int1)
 SUBPARTITIONS 3
-(PARTITION part1 VALUES IN (0) ENGINE = MARIA,
- PARTITION part2 VALUES IN (1) ENGINE = MARIA,
- PARTITION part3 VALUES IN (NULL) ENGINE = MARIA) */
+(PARTITION part1 VALUES IN (0) ENGINE = Aria,
+ PARTITION part2 VALUES IN (1) ENGINE = Aria,
+ PARTITION part3 VALUES IN (NULL) ENGINE = Aria) */
 
 unified filelist
 t1#P#part1#SP#part1sp0.MAD
@@ -3963,7 +3963,7 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx1` (`f_int1`,`f_int2`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY HASH (f_int1)
 PARTITIONS 2 */
 
@@ -4482,7 +4482,7 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx1` (`f_int1`,`f_int2`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY KEY (f_int1)
 PARTITIONS 5 */
 
@@ -5015,16 +5015,16 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx1` (`f_int1`,`f_int2`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (MOD(f_int1,4))
-(PARTITION part_3 VALUES IN (-3) ENGINE = MARIA,
- PARTITION part_2 VALUES IN (-2) ENGINE = MARIA,
- PARTITION part_1 VALUES IN (-1) ENGINE = MARIA,
- PARTITION part_N VALUES IN (NULL) ENGINE = MARIA,
- PARTITION part0 VALUES IN (0) ENGINE = MARIA,
- PARTITION part1 VALUES IN (1) ENGINE = MARIA,
- PARTITION part2 VALUES IN (2) ENGINE = MARIA,
- PARTITION part3 VALUES IN (3) ENGINE = MARIA) */
+(PARTITION part_3 VALUES IN (-3) ENGINE = Aria,
+ PARTITION part_2 VALUES IN (-2) ENGINE = Aria,
+ PARTITION part_1 VALUES IN (-1) ENGINE = Aria,
+ PARTITION part_N VALUES IN (NULL) ENGINE = Aria,
+ PARTITION part0 VALUES IN (0) ENGINE = Aria,
+ PARTITION part1 VALUES IN (1) ENGINE = Aria,
+ PARTITION part2 VALUES IN (2) ENGINE = Aria,
+ PARTITION part3 VALUES IN (3) ENGINE = Aria) */
 
 unified filelist
 t1#P#part0.MAD
@@ -5559,14 +5559,14 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx1` (`f_int1`,`f_int2`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE (f_int1)
-(PARTITION parta VALUES LESS THAN (0) ENGINE = MARIA,
- PARTITION partb VALUES LESS THAN (5) ENGINE = MARIA,
- PARTITION partc VALUES LESS THAN (10) ENGINE = MARIA,
- PARTITION partd VALUES LESS THAN (15) ENGINE = MARIA,
- PARTITION parte VALUES LESS THAN (20) ENGINE = MARIA,
- PARTITION partf VALUES LESS THAN (2147483646) ENGINE = MARIA) */
+(PARTITION parta VALUES LESS THAN (0) ENGINE = Aria,
+ PARTITION partb VALUES LESS THAN (5) ENGINE = Aria,
+ PARTITION partc VALUES LESS THAN (10) ENGINE = Aria,
+ PARTITION partd VALUES LESS THAN (15) ENGINE = Aria,
+ PARTITION parte VALUES LESS THAN (20) ENGINE = Aria,
+ PARTITION partf VALUES LESS THAN (2147483646) ENGINE = Aria) */
 
 unified filelist
 t1#P#parta.MAD
@@ -6091,14 +6091,14 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx1` (`f_int1`,`f_int2`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE (f_int1 DIV 2)
 SUBPARTITION BY HASH (f_int1)
 SUBPARTITIONS 2
-(PARTITION parta VALUES LESS THAN (0) ENGINE = MARIA,
- PARTITION partb VALUES LESS THAN (5) ENGINE = MARIA,
- PARTITION partc VALUES LESS THAN (10) ENGINE = MARIA,
- PARTITION partd VALUES LESS THAN (2147483646) ENGINE = MARIA) */
+(PARTITION parta VALUES LESS THAN (0) ENGINE = Aria,
+ PARTITION partb VALUES LESS THAN (5) ENGINE = Aria,
+ PARTITION partc VALUES LESS THAN (10) ENGINE = Aria,
+ PARTITION partd VALUES LESS THAN (2147483646) ENGINE = Aria) */
 
 unified filelist
 t1#P#parta#SP#partasp0.MAD
@@ -6635,21 +6635,21 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx1` (`f_int1`,`f_int2`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE (f_int1)
 SUBPARTITION BY KEY (f_int1)
 (PARTITION part1 VALUES LESS THAN (0)
- (SUBPARTITION subpart11 ENGINE = MARIA,
-  SUBPARTITION subpart12 ENGINE = MARIA),
+ (SUBPARTITION subpart11 ENGINE = Aria,
+  SUBPARTITION subpart12 ENGINE = Aria),
  PARTITION part2 VALUES LESS THAN (5)
- (SUBPARTITION subpart21 ENGINE = MARIA,
-  SUBPARTITION subpart22 ENGINE = MARIA),
+ (SUBPARTITION subpart21 ENGINE = Aria,
+  SUBPARTITION subpart22 ENGINE = Aria),
  PARTITION part3 VALUES LESS THAN (10)
- (SUBPARTITION subpart31 ENGINE = MARIA,
-  SUBPARTITION subpart32 ENGINE = MARIA),
+ (SUBPARTITION subpart31 ENGINE = Aria,
+  SUBPARTITION subpart32 ENGINE = Aria),
  PARTITION part4 VALUES LESS THAN (2147483646)
- (SUBPARTITION subpart41 ENGINE = MARIA,
-  SUBPARTITION subpart42 ENGINE = MARIA)) */
+ (SUBPARTITION subpart41 ENGINE = Aria,
+  SUBPARTITION subpart42 ENGINE = Aria)) */
 
 unified filelist
 t1#P#part1#SP#subpart11.MAD
@@ -7182,21 +7182,21 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx1` (`f_int1`,`f_int2`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3)))
 SUBPARTITION BY HASH (f_int1 + 1)
 (PARTITION part1 VALUES IN (0)
- (SUBPARTITION sp11 ENGINE = MARIA,
-  SUBPARTITION sp12 ENGINE = MARIA),
+ (SUBPARTITION sp11 ENGINE = Aria,
+  SUBPARTITION sp12 ENGINE = Aria),
  PARTITION part2 VALUES IN (1)
- (SUBPARTITION sp21 ENGINE = MARIA,
-  SUBPARTITION sp22 ENGINE = MARIA),
+ (SUBPARTITION sp21 ENGINE = Aria,
+  SUBPARTITION sp22 ENGINE = Aria),
  PARTITION part3 VALUES IN (2)
- (SUBPARTITION sp31 ENGINE = MARIA,
-  SUBPARTITION sp32 ENGINE = MARIA),
+ (SUBPARTITION sp31 ENGINE = Aria,
+  SUBPARTITION sp32 ENGINE = Aria),
  PARTITION part4 VALUES IN (NULL)
- (SUBPARTITION sp41 ENGINE = MARIA,
-  SUBPARTITION sp42 ENGINE = MARIA)) */
+ (SUBPARTITION sp41 ENGINE = Aria,
+  SUBPARTITION sp42 ENGINE = Aria)) */
 
 unified filelist
 t1#P#part1#SP#sp11.MAD
@@ -7729,13 +7729,13 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx1` (`f_int1`,`f_int2`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2)))
 SUBPARTITION BY KEY (f_int1)
 SUBPARTITIONS 3
-(PARTITION part1 VALUES IN (0) ENGINE = MARIA,
- PARTITION part2 VALUES IN (1) ENGINE = MARIA,
- PARTITION part3 VALUES IN (NULL) ENGINE = MARIA) */
+(PARTITION part1 VALUES IN (0) ENGINE = Aria,
+ PARTITION part2 VALUES IN (1) ENGINE = Aria,
+ PARTITION part3 VALUES IN (NULL) ENGINE = Aria) */
 
 unified filelist
 t1#P#part1#SP#part1sp0.MAD
@@ -8267,7 +8267,7 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx1` (`f_int2`,`f_int1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY HASH (f_int1)
 PARTITIONS 2 */
 
@@ -8786,7 +8786,7 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx1` (`f_int2`,`f_int1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY KEY (f_int1)
 PARTITIONS 5 */
 
@@ -9319,16 +9319,16 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx1` (`f_int2`,`f_int1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (MOD(f_int1,4))
-(PARTITION part_3 VALUES IN (-3) ENGINE = MARIA,
- PARTITION part_2 VALUES IN (-2) ENGINE = MARIA,
- PARTITION part_1 VALUES IN (-1) ENGINE = MARIA,
- PARTITION part_N VALUES IN (NULL) ENGINE = MARIA,
- PARTITION part0 VALUES IN (0) ENGINE = MARIA,
- PARTITION part1 VALUES IN (1) ENGINE = MARIA,
- PARTITION part2 VALUES IN (2) ENGINE = MARIA,
- PARTITION part3 VALUES IN (3) ENGINE = MARIA) */
+(PARTITION part_3 VALUES IN (-3) ENGINE = Aria,
+ PARTITION part_2 VALUES IN (-2) ENGINE = Aria,
+ PARTITION part_1 VALUES IN (-1) ENGINE = Aria,
+ PARTITION part_N VALUES IN (NULL) ENGINE = Aria,
+ PARTITION part0 VALUES IN (0) ENGINE = Aria,
+ PARTITION part1 VALUES IN (1) ENGINE = Aria,
+ PARTITION part2 VALUES IN (2) ENGINE = Aria,
+ PARTITION part3 VALUES IN (3) ENGINE = Aria) */
 
 unified filelist
 t1#P#part0.MAD
@@ -9863,14 +9863,14 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx1` (`f_int2`,`f_int1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE (f_int1)
-(PARTITION parta VALUES LESS THAN (0) ENGINE = MARIA,
- PARTITION partb VALUES LESS THAN (5) ENGINE = MARIA,
- PARTITION partc VALUES LESS THAN (10) ENGINE = MARIA,
- PARTITION partd VALUES LESS THAN (15) ENGINE = MARIA,
- PARTITION parte VALUES LESS THAN (20) ENGINE = MARIA,
- PARTITION partf VALUES LESS THAN (2147483646) ENGINE = MARIA) */
+(PARTITION parta VALUES LESS THAN (0) ENGINE = Aria,
+ PARTITION partb VALUES LESS THAN (5) ENGINE = Aria,
+ PARTITION partc VALUES LESS THAN (10) ENGINE = Aria,
+ PARTITION partd VALUES LESS THAN (15) ENGINE = Aria,
+ PARTITION parte VALUES LESS THAN (20) ENGINE = Aria,
+ PARTITION partf VALUES LESS THAN (2147483646) ENGINE = Aria) */
 
 unified filelist
 t1#P#parta.MAD
@@ -10395,14 +10395,14 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx1` (`f_int2`,`f_int1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE (f_int1 DIV 2)
 SUBPARTITION BY HASH (f_int1)
 SUBPARTITIONS 2
-(PARTITION parta VALUES LESS THAN (0) ENGINE = MARIA,
- PARTITION partb VALUES LESS THAN (5) ENGINE = MARIA,
- PARTITION partc VALUES LESS THAN (10) ENGINE = MARIA,
- PARTITION partd VALUES LESS THAN (2147483646) ENGINE = MARIA) */
+(PARTITION parta VALUES LESS THAN (0) ENGINE = Aria,
+ PARTITION partb VALUES LESS THAN (5) ENGINE = Aria,
+ PARTITION partc VALUES LESS THAN (10) ENGINE = Aria,
+ PARTITION partd VALUES LESS THAN (2147483646) ENGINE = Aria) */
 
 unified filelist
 t1#P#parta#SP#partasp0.MAD
@@ -10939,21 +10939,21 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx1` (`f_int2`,`f_int1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE (f_int1)
 SUBPARTITION BY KEY (f_int1)
 (PARTITION part1 VALUES LESS THAN (0)
- (SUBPARTITION subpart11 ENGINE = MARIA,
-  SUBPARTITION subpart12 ENGINE = MARIA),
+ (SUBPARTITION subpart11 ENGINE = Aria,
+  SUBPARTITION subpart12 ENGINE = Aria),
  PARTITION part2 VALUES LESS THAN (5)
- (SUBPARTITION subpart21 ENGINE = MARIA,
-  SUBPARTITION subpart22 ENGINE = MARIA),
+ (SUBPARTITION subpart21 ENGINE = Aria,
+  SUBPARTITION subpart22 ENGINE = Aria),
  PARTITION part3 VALUES LESS THAN (10)
- (SUBPARTITION subpart31 ENGINE = MARIA,
-  SUBPARTITION subpart32 ENGINE = MARIA),
+ (SUBPARTITION subpart31 ENGINE = Aria,
+  SUBPARTITION subpart32 ENGINE = Aria),
  PARTITION part4 VALUES LESS THAN (2147483646)
- (SUBPARTITION subpart41 ENGINE = MARIA,
-  SUBPARTITION subpart42 ENGINE = MARIA)) */
+ (SUBPARTITION subpart41 ENGINE = Aria,
+  SUBPARTITION subpart42 ENGINE = Aria)) */
 
 unified filelist
 t1#P#part1#SP#subpart11.MAD
@@ -11486,21 +11486,21 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx1` (`f_int2`,`f_int1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3)))
 SUBPARTITION BY HASH (f_int1 + 1)
 (PARTITION part1 VALUES IN (0)
- (SUBPARTITION sp11 ENGINE = MARIA,
-  SUBPARTITION sp12 ENGINE = MARIA),
+ (SUBPARTITION sp11 ENGINE = Aria,
+  SUBPARTITION sp12 ENGINE = Aria),
  PARTITION part2 VALUES IN (1)
- (SUBPARTITION sp21 ENGINE = MARIA,
-  SUBPARTITION sp22 ENGINE = MARIA),
+ (SUBPARTITION sp21 ENGINE = Aria,
+  SUBPARTITION sp22 ENGINE = Aria),
  PARTITION part3 VALUES IN (2)
- (SUBPARTITION sp31 ENGINE = MARIA,
-  SUBPARTITION sp32 ENGINE = MARIA),
+ (SUBPARTITION sp31 ENGINE = Aria,
+  SUBPARTITION sp32 ENGINE = Aria),
  PARTITION part4 VALUES IN (NULL)
- (SUBPARTITION sp41 ENGINE = MARIA,
-  SUBPARTITION sp42 ENGINE = MARIA)) */
+ (SUBPARTITION sp41 ENGINE = Aria,
+  SUBPARTITION sp42 ENGINE = Aria)) */
 
 unified filelist
 t1#P#part1#SP#sp11.MAD
@@ -12033,13 +12033,13 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx1` (`f_int2`,`f_int1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2)))
 SUBPARTITION BY KEY (f_int1)
 SUBPARTITIONS 3
-(PARTITION part1 VALUES IN (0) ENGINE = MARIA,
- PARTITION part2 VALUES IN (1) ENGINE = MARIA,
- PARTITION part3 VALUES IN (NULL) ENGINE = MARIA) */
+(PARTITION part1 VALUES IN (0) ENGINE = Aria,
+ PARTITION part2 VALUES IN (1) ENGINE = Aria,
+ PARTITION part3 VALUES IN (NULL) ENGINE = Aria) */
 
 unified filelist
 t1#P#part1#SP#part1sp0.MAD
@@ -12574,7 +12574,7 @@
   `f_char1` char(20) DEFAULT NULL,
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY HASH (f_int1)
 PARTITIONS 2 */
 
@@ -13042,7 +13042,7 @@
   `f_char1` char(20) DEFAULT NULL,
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY KEY (f_int1)
 PARTITIONS 5 */
 
@@ -13524,16 +13524,16 @@
   `f_char1` char(20) DEFAULT NULL,
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (MOD(f_int1,4))
-(PARTITION part_3 VALUES IN (-3) ENGINE = MARIA,
- PARTITION part_2 VALUES IN (-2) ENGINE = MARIA,
- PARTITION part_1 VALUES IN (-1) ENGINE = MARIA,
- PARTITION part_N VALUES IN (NULL) ENGINE = MARIA,
- PARTITION part0 VALUES IN (0) ENGINE = MARIA,
- PARTITION part1 VALUES IN (1) ENGINE = MARIA,
- PARTITION part2 VALUES IN (2) ENGINE = MARIA,
- PARTITION part3 VALUES IN (3) ENGINE = MARIA) */
+(PARTITION part_3 VALUES IN (-3) ENGINE = Aria,
+ PARTITION part_2 VALUES IN (-2) ENGINE = Aria,
+ PARTITION part_1 VALUES IN (-1) ENGINE = Aria,
+ PARTITION part_N VALUES IN (NULL) ENGINE = Aria,
+ PARTITION part0 VALUES IN (0) ENGINE = Aria,
+ PARTITION part1 VALUES IN (1) ENGINE = Aria,
+ PARTITION part2 VALUES IN (2) ENGINE = Aria,
+ PARTITION part3 VALUES IN (3) ENGINE = Aria) */
 
 unified filelist
 t1#P#part0.MAD
@@ -14017,14 +14017,14 @@
   `f_char1` char(20) DEFAULT NULL,
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE (f_int1)
-(PARTITION parta VALUES LESS THAN (0) ENGINE = MARIA,
- PARTITION partb VALUES LESS THAN (5) ENGINE = MARIA,
- PARTITION partc VALUES LESS THAN (10) ENGINE = MARIA,
- PARTITION partd VALUES LESS THAN (15) ENGINE = MARIA,
- PARTITION parte VALUES LESS THAN (20) ENGINE = MARIA,
- PARTITION partf VALUES LESS THAN (2147483646) ENGINE = MARIA) */
+(PARTITION parta VALUES LESS THAN (0) ENGINE = Aria,
+ PARTITION partb VALUES LESS THAN (5) ENGINE = Aria,
+ PARTITION partc VALUES LESS THAN (10) ENGINE = Aria,
+ PARTITION partd VALUES LESS THAN (15) ENGINE = Aria,
+ PARTITION parte VALUES LESS THAN (20) ENGINE = Aria,
+ PARTITION partf VALUES LESS THAN (2147483646) ENGINE = Aria) */
 
 unified filelist
 t1#P#parta.MAD
@@ -14502,14 +14502,14 @@
   `f_char1` char(20) DEFAULT NULL,
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE (f_int1 DIV 2)
 SUBPARTITION BY HASH (f_int1)
 SUBPARTITIONS 2
-(PARTITION parta VALUES LESS THAN (0) ENGINE = MARIA,
- PARTITION partb VALUES LESS THAN (5) ENGINE = MARIA,
- PARTITION partc VALUES LESS THAN (10) ENGINE = MARIA,
- PARTITION partd VALUES LESS THAN (2147483646) ENGINE = MARIA) */
+(PARTITION parta VALUES LESS THAN (0) ENGINE = Aria,
+ PARTITION partb VALUES LESS THAN (5) ENGINE = Aria,
+ PARTITION partc VALUES LESS THAN (10) ENGINE = Aria,
+ PARTITION partd VALUES LESS THAN (2147483646) ENGINE = Aria) */
 
 unified filelist
 t1#P#parta#SP#partasp0.MAD
@@ -14995,21 +14995,21 @@
   `f_char1` char(20) DEFAULT NULL,
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE (f_int1)
 SUBPARTITION BY KEY (f_int1)
 (PARTITION part1 VALUES LESS THAN (0)
- (SUBPARTITION subpart11 ENGINE = MARIA,
-  SUBPARTITION subpart12 ENGINE = MARIA),
+ (SUBPARTITION subpart11 ENGINE = Aria,
+  SUBPARTITION subpart12 ENGINE = Aria),
  PARTITION part2 VALUES LESS THAN (5)
- (SUBPARTITION subpart21 ENGINE = MARIA,
-  SUBPARTITION subpart22 ENGINE = MARIA),
+ (SUBPARTITION subpart21 ENGINE = Aria,
+  SUBPARTITION subpart22 ENGINE = Aria),
  PARTITION part3 VALUES LESS THAN (10)
- (SUBPARTITION subpart31 ENGINE = MARIA,
-  SUBPARTITION subpart32 ENGINE = MARIA),
+ (SUBPARTITION subpart31 ENGINE = Aria,
+  SUBPARTITION subpart32 ENGINE = Aria),
  PARTITION part4 VALUES LESS THAN (2147483646)
- (SUBPARTITION subpart41 ENGINE = MARIA,
-  SUBPARTITION subpart42 ENGINE = MARIA)) */
+ (SUBPARTITION subpart41 ENGINE = Aria,
+  SUBPARTITION subpart42 ENGINE = Aria)) */
 
 unified filelist
 t1#P#part1#SP#subpart11.MAD
@@ -15495,21 +15495,21 @@
   `f_char1` char(20) DEFAULT NULL,
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3)))
 SUBPARTITION BY HASH (f_int1 + 1)
 (PARTITION part1 VALUES IN (0)
- (SUBPARTITION sp11 ENGINE = MARIA,
-  SUBPARTITION sp12 ENGINE = MARIA),
+ (SUBPARTITION sp11 ENGINE = Aria,
+  SUBPARTITION sp12 ENGINE = Aria),
  PARTITION part2 VALUES IN (1)
- (SUBPARTITION sp21 ENGINE = MARIA,
-  SUBPARTITION sp22 ENGINE = MARIA),
+ (SUBPARTITION sp21 ENGINE = Aria,
+  SUBPARTITION sp22 ENGINE = Aria),
  PARTITION part3 VALUES IN (2)
- (SUBPARTITION sp31 ENGINE = MARIA,
-  SUBPARTITION sp32 ENGINE = MARIA),
+ (SUBPARTITION sp31 ENGINE = Aria,
+  SUBPARTITION sp32 ENGINE = Aria),
  PARTITION part4 VALUES IN (NULL)
- (SUBPARTITION sp41 ENGINE = MARIA,
-  SUBPARTITION sp42 ENGINE = MARIA)) */
+ (SUBPARTITION sp41 ENGINE = Aria,
+  SUBPARTITION sp42 ENGINE = Aria)) */
 
 unified filelist
 t1#P#part1#SP#sp11.MAD
@@ -15991,13 +15991,13 @@
   `f_char1` char(20) DEFAULT NULL,
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2)))
 SUBPARTITION BY KEY (f_int1)
 SUBPARTITIONS 3
-(PARTITION part1 VALUES IN (0) ENGINE = MARIA,
- PARTITION part2 VALUES IN (1) ENGINE = MARIA,
- PARTITION part3 VALUES IN (NULL) ENGINE = MARIA) */
+(PARTITION part1 VALUES IN (0) ENGINE = Aria,
+ PARTITION part2 VALUES IN (1) ENGINE = Aria,
+ PARTITION part3 VALUES IN (NULL) ENGINE = Aria) */
 
 unified filelist
 t1#P#part1#SP#part1sp0.MAD
@@ -16478,7 +16478,7 @@
   `f_char1` char(20) DEFAULT NULL,
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY HASH (f_int1 + f_int2)
 PARTITIONS 2 */
 
@@ -16946,7 +16946,7 @@
   `f_char1` char(20) DEFAULT NULL,
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY KEY (f_int1,f_int2)
 PARTITIONS 5 */
 
@@ -17428,16 +17428,16 @@
   `f_char1` char(20) DEFAULT NULL,
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4))
-(PARTITION part_3 VALUES IN (-3) ENGINE = MARIA,
- PARTITION part_2 VALUES IN (-2) ENGINE = MARIA,
- PARTITION part_1 VALUES IN (-1) ENGINE = MARIA,
- PARTITION part_N VALUES IN (NULL) ENGINE = MARIA,
- PARTITION part0 VALUES IN (0) ENGINE = MARIA,
- PARTITION part1 VALUES IN (1) ENGINE = MARIA,
- PARTITION part2 VALUES IN (2) ENGINE = MARIA,
- PARTITION part3 VALUES IN (3) ENGINE = MARIA) */
+(PARTITION part_3 VALUES IN (-3) ENGINE = Aria,
+ PARTITION part_2 VALUES IN (-2) ENGINE = Aria,
+ PARTITION part_1 VALUES IN (-1) ENGINE = Aria,
+ PARTITION part_N VALUES IN (NULL) ENGINE = Aria,
+ PARTITION part0 VALUES IN (0) ENGINE = Aria,
+ PARTITION part1 VALUES IN (1) ENGINE = Aria,
+ PARTITION part2 VALUES IN (2) ENGINE = Aria,
+ PARTITION part3 VALUES IN (3) ENGINE = Aria) */
 
 unified filelist
 t1#P#part0.MAD
@@ -17921,14 +17921,14 @@
   `f_char1` char(20) DEFAULT NULL,
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2)
-(PARTITION parta VALUES LESS THAN (0) ENGINE = MARIA,
- PARTITION partb VALUES LESS THAN (5) ENGINE = MARIA,
- PARTITION partc VALUES LESS THAN (10) ENGINE = MARIA,
- PARTITION partd VALUES LESS THAN (15) ENGINE = MARIA,
- PARTITION parte VALUES LESS THAN (20) ENGINE = MARIA,
- PARTITION partf VALUES LESS THAN (2147483646) ENGINE = MARIA) */
+(PARTITION parta VALUES LESS THAN (0) ENGINE = Aria,
+ PARTITION partb VALUES LESS THAN (5) ENGINE = Aria,
+ PARTITION partc VALUES LESS THAN (10) ENGINE = Aria,
+ PARTITION partd VALUES LESS THAN (15) ENGINE = Aria,
+ PARTITION parte VALUES LESS THAN (20) ENGINE = Aria,
+ PARTITION partf VALUES LESS THAN (2147483646) ENGINE = Aria) */
 
 unified filelist
 t1#P#parta.MAD
@@ -18406,14 +18406,14 @@
   `f_char1` char(20) DEFAULT NULL,
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE (f_int1)
 SUBPARTITION BY HASH (f_int2)
 SUBPARTITIONS 2
-(PARTITION parta VALUES LESS THAN (0) ENGINE = MARIA,
- PARTITION partb VALUES LESS THAN (5) ENGINE = MARIA,
- PARTITION partc VALUES LESS THAN (10) ENGINE = MARIA,
- PARTITION partd VALUES LESS THAN (2147483646) ENGINE = MARIA) */
+(PARTITION parta VALUES LESS THAN (0) ENGINE = Aria,
+ PARTITION partb VALUES LESS THAN (5) ENGINE = Aria,
+ PARTITION partc VALUES LESS THAN (10) ENGINE = Aria,
+ PARTITION partd VALUES LESS THAN (2147483646) ENGINE = Aria) */
 
 unified filelist
 t1#P#parta#SP#partasp0.MAD
@@ -18899,21 +18899,21 @@
   `f_char1` char(20) DEFAULT NULL,
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE (f_int1)
 SUBPARTITION BY KEY (f_int2)
 (PARTITION part1 VALUES LESS THAN (0)
- (SUBPARTITION subpart11 ENGINE = MARIA,
-  SUBPARTITION subpart12 ENGINE = MARIA),
+ (SUBPARTITION subpart11 ENGINE = Aria,
+  SUBPARTITION subpart12 ENGINE = Aria),
  PARTITION part2 VALUES LESS THAN (5)
- (SUBPARTITION subpart21 ENGINE = MARIA,
-  SUBPARTITION subpart22 ENGINE = MARIA),
+ (SUBPARTITION subpart21 ENGINE = Aria,
+  SUBPARTITION subpart22 ENGINE = Aria),
  PARTITION part3 VALUES LESS THAN (10)
- (SUBPARTITION subpart31 ENGINE = MARIA,
-  SUBPARTITION subpart32 ENGINE = MARIA),
+ (SUBPARTITION subpart31 ENGINE = Aria,
+  SUBPARTITION subpart32 ENGINE = Aria),
  PARTITION part4 VALUES LESS THAN (2147483646)
- (SUBPARTITION subpart41 ENGINE = MARIA,
-  SUBPARTITION subpart42 ENGINE = MARIA)) */
+ (SUBPARTITION subpart41 ENGINE = Aria,
+  SUBPARTITION subpart42 ENGINE = Aria)) */
 
 unified filelist
 t1#P#part1#SP#subpart11.MAD
@@ -19399,21 +19399,21 @@
   `f_char1` char(20) DEFAULT NULL,
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3)))
 SUBPARTITION BY HASH (f_int2 + 1)
 (PARTITION part1 VALUES IN (0)
- (SUBPARTITION sp11 ENGINE = MARIA,
-  SUBPARTITION sp12 ENGINE = MARIA),
+ (SUBPARTITION sp11 ENGINE = Aria,
+  SUBPARTITION sp12 ENGINE = Aria),
  PARTITION part2 VALUES IN (1)
- (SUBPARTITION sp21 ENGINE = MARIA,
-  SUBPARTITION sp22 ENGINE = MARIA),
+ (SUBPARTITION sp21 ENGINE = Aria,
+  SUBPARTITION sp22 ENGINE = Aria),
  PARTITION part3 VALUES IN (2)
- (SUBPARTITION sp31 ENGINE = MARIA,
-  SUBPARTITION sp32 ENGINE = MARIA),
+ (SUBPARTITION sp31 ENGINE = Aria,
+  SUBPARTITION sp32 ENGINE = Aria),
  PARTITION part4 VALUES IN (NULL)
- (SUBPARTITION sp41 ENGINE = MARIA,
-  SUBPARTITION sp42 ENGINE = MARIA)) */
+ (SUBPARTITION sp41 ENGINE = Aria,
+  SUBPARTITION sp42 ENGINE = Aria)) */
 
 unified filelist
 t1#P#part1#SP#sp11.MAD
@@ -19895,13 +19895,13 @@
   `f_char1` char(20) DEFAULT NULL,
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2)))
 SUBPARTITION BY KEY (f_int2)
 SUBPARTITIONS 3
-(PARTITION part1 VALUES IN (0) ENGINE = MARIA,
- PARTITION part2 VALUES IN (1) ENGINE = MARIA,
- PARTITION part3 VALUES IN (NULL) ENGINE = MARIA) */
+(PARTITION part1 VALUES IN (0) ENGINE = Aria,
+ PARTITION part2 VALUES IN (1) ENGINE = Aria,
+ PARTITION part3 VALUES IN (NULL) ENGINE = Aria) */
 
 unified filelist
 t1#P#part1#SP#part1sp0.MAD
@@ -20384,7 +20384,7 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int1`,`f_int2`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY HASH (f_int1)
 PARTITIONS 2 */
 
@@ -20904,7 +20904,7 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int1`,`f_int2`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY KEY (f_int1)
 PARTITIONS 5 */
 
@@ -21438,16 +21438,16 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int1`,`f_int2`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (MOD(f_int1,4))
-(PARTITION part_3 VALUES IN (-3) ENGINE = MARIA,
- PARTITION part_2 VALUES IN (-2) ENGINE = MARIA,
- PARTITION part_1 VALUES IN (-1) ENGINE = MARIA,
- PARTITION part_N VALUES IN (NULL) ENGINE = MARIA,
- PARTITION part0 VALUES IN (0) ENGINE = MARIA,
- PARTITION part1 VALUES IN (1) ENGINE = MARIA,
- PARTITION part2 VALUES IN (2) ENGINE = MARIA,
- PARTITION part3 VALUES IN (3) ENGINE = MARIA) */
+(PARTITION part_3 VALUES IN (-3) ENGINE = Aria,
+ PARTITION part_2 VALUES IN (-2) ENGINE = Aria,
+ PARTITION part_1 VALUES IN (-1) ENGINE = Aria,
+ PARTITION part_N VALUES IN (NULL) ENGINE = Aria,
+ PARTITION part0 VALUES IN (0) ENGINE = Aria,
+ PARTITION part1 VALUES IN (1) ENGINE = Aria,
+ PARTITION part2 VALUES IN (2) ENGINE = Aria,
+ PARTITION part3 VALUES IN (3) ENGINE = Aria) */
 
 unified filelist
 t1#P#part0.MAD
@@ -21983,14 +21983,14 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int1`,`f_int2`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE (f_int1)
-(PARTITION parta VALUES LESS THAN (0) ENGINE = MARIA,
- PARTITION partb VALUES LESS THAN (5) ENGINE = MARIA,
- PARTITION partc VALUES LESS THAN (10) ENGINE = MARIA,
- PARTITION partd VALUES LESS THAN (15) ENGINE = MARIA,
- PARTITION parte VALUES LESS THAN (20) ENGINE = MARIA,
- PARTITION partf VALUES LESS THAN (2147483646) ENGINE = MARIA) */
+(PARTITION parta VALUES LESS THAN (0) ENGINE = Aria,
+ PARTITION partb VALUES LESS THAN (5) ENGINE = Aria,
+ PARTITION partc VALUES LESS THAN (10) ENGINE = Aria,
+ PARTITION partd VALUES LESS THAN (15) ENGINE = Aria,
+ PARTITION parte VALUES LESS THAN (20) ENGINE = Aria,
+ PARTITION partf VALUES LESS THAN (2147483646) ENGINE = Aria) */
 
 unified filelist
 t1#P#parta.MAD
@@ -22520,14 +22520,14 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int1`,`f_int2`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE (f_int1 DIV 2)
 SUBPARTITION BY HASH (f_int1)
 SUBPARTITIONS 2
-(PARTITION parta VALUES LESS THAN (0) ENGINE = MARIA,
- PARTITION partb VALUES LESS THAN (5) ENGINE = MARIA,
- PARTITION partc VALUES LESS THAN (10) ENGINE = MARIA,
- PARTITION partd VALUES LESS THAN (2147483646) ENGINE = MARIA) */
+(PARTITION parta VALUES LESS THAN (0) ENGINE = Aria,
+ PARTITION partb VALUES LESS THAN (5) ENGINE = Aria,
+ PARTITION partc VALUES LESS THAN (10) ENGINE = Aria,
+ PARTITION partd VALUES LESS THAN (2147483646) ENGINE = Aria) */
 
 unified filelist
 t1#P#parta#SP#partasp0.MAD
@@ -23065,21 +23065,21 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int1`,`f_int2`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE (f_int1)
 SUBPARTITION BY KEY (f_int1)
 (PARTITION part1 VALUES LESS THAN (0)
- (SUBPARTITION subpart11 ENGINE = MARIA,
-  SUBPARTITION subpart12 ENGINE = MARIA),
+ (SUBPARTITION subpart11 ENGINE = Aria,
+  SUBPARTITION subpart12 ENGINE = Aria),
  PARTITION part2 VALUES LESS THAN (5)
- (SUBPARTITION subpart21 ENGINE = MARIA,
-  SUBPARTITION subpart22 ENGINE = MARIA),
+ (SUBPARTITION subpart21 ENGINE = Aria,
+  SUBPARTITION subpart22 ENGINE = Aria),
  PARTITION part3 VALUES LESS THAN (10)
- (SUBPARTITION subpart31 ENGINE = MARIA,
-  SUBPARTITION subpart32 ENGINE = MARIA),
+ (SUBPARTITION subpart31 ENGINE = Aria,
+  SUBPARTITION subpart32 ENGINE = Aria),
  PARTITION part4 VALUES LESS THAN (2147483646)
- (SUBPARTITION subpart41 ENGINE = MARIA,
-  SUBPARTITION subpart42 ENGINE = MARIA)) */
+ (SUBPARTITION subpart41 ENGINE = Aria,
+  SUBPARTITION subpart42 ENGINE = Aria)) */
 
 unified filelist
 t1#P#part1#SP#subpart11.MAD
@@ -23617,21 +23617,21 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int1`,`f_int2`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3)))
 SUBPARTITION BY HASH (f_int1 + 1)
 (PARTITION part1 VALUES IN (0)
- (SUBPARTITION sp11 ENGINE = MARIA,
-  SUBPARTITION sp12 ENGINE = MARIA),
+ (SUBPARTITION sp11 ENGINE = Aria,
+  SUBPARTITION sp12 ENGINE = Aria),
  PARTITION part2 VALUES IN (1)
- (SUBPARTITION sp21 ENGINE = MARIA,
-  SUBPARTITION sp22 ENGINE = MARIA),
+ (SUBPARTITION sp21 ENGINE = Aria,
+  SUBPARTITION sp22 ENGINE = Aria),
  PARTITION part3 VALUES IN (2)
- (SUBPARTITION sp31 ENGINE = MARIA,
-  SUBPARTITION sp32 ENGINE = MARIA),
+ (SUBPARTITION sp31 ENGINE = Aria,
+  SUBPARTITION sp32 ENGINE = Aria),
  PARTITION part4 VALUES IN (NULL)
- (SUBPARTITION sp41 ENGINE = MARIA,
-  SUBPARTITION sp42 ENGINE = MARIA)) */
+ (SUBPARTITION sp41 ENGINE = Aria,
+  SUBPARTITION sp42 ENGINE = Aria)) */
 
 unified filelist
 t1#P#part1#SP#sp11.MAD
@@ -24165,13 +24165,13 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int1`,`f_int2`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2)))
 SUBPARTITION BY KEY (f_int1)
 SUBPARTITIONS 3
-(PARTITION part1 VALUES IN (0) ENGINE = MARIA,
- PARTITION part2 VALUES IN (1) ENGINE = MARIA,
- PARTITION part3 VALUES IN (NULL) ENGINE = MARIA) */
+(PARTITION part1 VALUES IN (0) ENGINE = Aria,
+ PARTITION part2 VALUES IN (1) ENGINE = Aria,
+ PARTITION part3 VALUES IN (NULL) ENGINE = Aria) */
 
 unified filelist
 t1#P#part1#SP#part1sp0.MAD
@@ -24704,7 +24704,7 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int1`,`f_int2`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY HASH (f_int1 + f_int2)
 PARTITIONS 2 */
 
@@ -25224,7 +25224,7 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int1`,`f_int2`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY KEY (f_int1,f_int2)
 PARTITIONS 5 */
 
@@ -25758,16 +25758,16 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int1`,`f_int2`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4))
-(PARTITION part_3 VALUES IN (-3) ENGINE = MARIA,
- PARTITION part_2 VALUES IN (-2) ENGINE = MARIA,
- PARTITION part_1 VALUES IN (-1) ENGINE = MARIA,
- PARTITION part_N VALUES IN (NULL) ENGINE = MARIA,
- PARTITION part0 VALUES IN (0) ENGINE = MARIA,
- PARTITION part1 VALUES IN (1) ENGINE = MARIA,
- PARTITION part2 VALUES IN (2) ENGINE = MARIA,
- PARTITION part3 VALUES IN (3) ENGINE = MARIA) */
+(PARTITION part_3 VALUES IN (-3) ENGINE = Aria,
+ PARTITION part_2 VALUES IN (-2) ENGINE = Aria,
+ PARTITION part_1 VALUES IN (-1) ENGINE = Aria,
+ PARTITION part_N VALUES IN (NULL) ENGINE = Aria,
+ PARTITION part0 VALUES IN (0) ENGINE = Aria,
+ PARTITION part1 VALUES IN (1) ENGINE = Aria,
+ PARTITION part2 VALUES IN (2) ENGINE = Aria,
+ PARTITION part3 VALUES IN (3) ENGINE = Aria) */
 
 unified filelist
 t1#P#part0.MAD
@@ -26303,14 +26303,14 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int1`,`f_int2`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2)
-(PARTITION parta VALUES LESS THAN (0) ENGINE = MARIA,
- PARTITION partb VALUES LESS THAN (5) ENGINE = MARIA,
- PARTITION partc VALUES LESS THAN (10) ENGINE = MARIA,
- PARTITION partd VALUES LESS THAN (15) ENGINE = MARIA,
- PARTITION parte VALUES LESS THAN (20) ENGINE = MARIA,
- PARTITION partf VALUES LESS THAN (2147483646) ENGINE = MARIA) */
+(PARTITION parta VALUES LESS THAN (0) ENGINE = Aria,
+ PARTITION partb VALUES LESS THAN (5) ENGINE = Aria,
+ PARTITION partc VALUES LESS THAN (10) ENGINE = Aria,
+ PARTITION partd VALUES LESS THAN (15) ENGINE = Aria,
+ PARTITION parte VALUES LESS THAN (20) ENGINE = Aria,
+ PARTITION partf VALUES LESS THAN (2147483646) ENGINE = Aria) */
 
 unified filelist
 t1#P#parta.MAD
@@ -26840,14 +26840,14 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int1`,`f_int2`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE (f_int1)
 SUBPARTITION BY HASH (f_int2)
 SUBPARTITIONS 2
-(PARTITION parta VALUES LESS THAN (0) ENGINE = MARIA,
- PARTITION partb VALUES LESS THAN (5) ENGINE = MARIA,
- PARTITION partc VALUES LESS THAN (10) ENGINE = MARIA,
- PARTITION partd VALUES LESS THAN (2147483646) ENGINE = MARIA) */
+(PARTITION parta VALUES LESS THAN (0) ENGINE = Aria,
+ PARTITION partb VALUES LESS THAN (5) ENGINE = Aria,
+ PARTITION partc VALUES LESS THAN (10) ENGINE = Aria,
+ PARTITION partd VALUES LESS THAN (2147483646) ENGINE = Aria) */
 
 unified filelist
 t1#P#parta#SP#partasp0.MAD
@@ -27385,21 +27385,21 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int1`,`f_int2`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE (f_int1)
 SUBPARTITION BY KEY (f_int2)
 (PARTITION part1 VALUES LESS THAN (0)
- (SUBPARTITION subpart11 ENGINE = MARIA,
-  SUBPARTITION subpart12 ENGINE = MARIA),
+ (SUBPARTITION subpart11 ENGINE = Aria,
+  SUBPARTITION subpart12 ENGINE = Aria),
  PARTITION part2 VALUES LESS THAN (5)
- (SUBPARTITION subpart21 ENGINE = MARIA,
-  SUBPARTITION subpart22 ENGINE = MARIA),
+ (SUBPARTITION subpart21 ENGINE = Aria,
+  SUBPARTITION subpart22 ENGINE = Aria),
  PARTITION part3 VALUES LESS THAN (10)
- (SUBPARTITION subpart31 ENGINE = MARIA,
-  SUBPARTITION subpart32 ENGINE = MARIA),
+ (SUBPARTITION subpart31 ENGINE = Aria,
+  SUBPARTITION subpart32 ENGINE = Aria),
  PARTITION part4 VALUES LESS THAN (2147483646)
- (SUBPARTITION subpart41 ENGINE = MARIA,
-  SUBPARTITION subpart42 ENGINE = MARIA)) */
+ (SUBPARTITION subpart41 ENGINE = Aria,
+  SUBPARTITION subpart42 ENGINE = Aria)) */
 
 unified filelist
 t1#P#part1#SP#subpart11.MAD
@@ -27937,21 +27937,21 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int1`,`f_int2`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3)))
 SUBPARTITION BY HASH (f_int2 + 1)
 (PARTITION part1 VALUES IN (0)
- (SUBPARTITION sp11 ENGINE = MARIA,
-  SUBPARTITION sp12 ENGINE = MARIA),
+ (SUBPARTITION sp11 ENGINE = Aria,
+  SUBPARTITION sp12 ENGINE = Aria),
  PARTITION part2 VALUES IN (1)
- (SUBPARTITION sp21 ENGINE = MARIA,
-  SUBPARTITION sp22 ENGINE = MARIA),
+ (SUBPARTITION sp21 ENGINE = Aria,
+  SUBPARTITION sp22 ENGINE = Aria),
  PARTITION part3 VALUES IN (2)
- (SUBPARTITION sp31 ENGINE = MARIA,
-  SUBPARTITION sp32 ENGINE = MARIA),
+ (SUBPARTITION sp31 ENGINE = Aria,
+  SUBPARTITION sp32 ENGINE = Aria),
  PARTITION part4 VALUES IN (NULL)
- (SUBPARTITION sp41 ENGINE = MARIA,
-  SUBPARTITION sp42 ENGINE = MARIA)) */
+ (SUBPARTITION sp41 ENGINE = Aria,
+  SUBPARTITION sp42 ENGINE = Aria)) */
 
 unified filelist
 t1#P#part1#SP#sp11.MAD
@@ -28485,13 +28485,13 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int1`,`f_int2`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2)))
 SUBPARTITION BY KEY (f_int2)
 SUBPARTITIONS 3
-(PARTITION part1 VALUES IN (0) ENGINE = MARIA,
- PARTITION part2 VALUES IN (1) ENGINE = MARIA,
- PARTITION part3 VALUES IN (NULL) ENGINE = MARIA) */
+(PARTITION part1 VALUES IN (0) ENGINE = Aria,
+ PARTITION part2 VALUES IN (1) ENGINE = Aria,
+ PARTITION part3 VALUES IN (NULL) ENGINE = Aria) */
 
 unified filelist
 t1#P#part1#SP#part1sp0.MAD
@@ -29024,7 +29024,7 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int2`,`f_int1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY HASH (f_int1)
 PARTITIONS 2 */
 
@@ -29544,7 +29544,7 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int2`,`f_int1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY KEY (f_int1)
 PARTITIONS 5 */
 
@@ -30078,16 +30078,16 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int2`,`f_int1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (MOD(f_int1,4))
-(PARTITION part_3 VALUES IN (-3) ENGINE = MARIA,
- PARTITION part_2 VALUES IN (-2) ENGINE = MARIA,
- PARTITION part_1 VALUES IN (-1) ENGINE = MARIA,
- PARTITION part_N VALUES IN (NULL) ENGINE = MARIA,
- PARTITION part0 VALUES IN (0) ENGINE = MARIA,
- PARTITION part1 VALUES IN (1) ENGINE = MARIA,
- PARTITION part2 VALUES IN (2) ENGINE = MARIA,
- PARTITION part3 VALUES IN (3) ENGINE = MARIA) */
+(PARTITION part_3 VALUES IN (-3) ENGINE = Aria,
+ PARTITION part_2 VALUES IN (-2) ENGINE = Aria,
+ PARTITION part_1 VALUES IN (-1) ENGINE = Aria,
+ PARTITION part_N VALUES IN (NULL) ENGINE = Aria,
+ PARTITION part0 VALUES IN (0) ENGINE = Aria,
+ PARTITION part1 VALUES IN (1) ENGINE = Aria,
+ PARTITION part2 VALUES IN (2) ENGINE = Aria,
+ PARTITION part3 VALUES IN (3) ENGINE = Aria) */
 
 unified filelist
 t1#P#part0.MAD
@@ -30623,14 +30623,14 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int2`,`f_int1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE (f_int1)
-(PARTITION parta VALUES LESS THAN (0) ENGINE = MARIA,
- PARTITION partb VALUES LESS THAN (5) ENGINE = MARIA,
- PARTITION partc VALUES LESS THAN (10) ENGINE = MARIA,
- PARTITION partd VALUES LESS THAN (15) ENGINE = MARIA,
- PARTITION parte VALUES LESS THAN (20) ENGINE = MARIA,
- PARTITION partf VALUES LESS THAN (2147483646) ENGINE = MARIA) */
+(PARTITION parta VALUES LESS THAN (0) ENGINE = Aria,
+ PARTITION partb VALUES LESS THAN (5) ENGINE = Aria,
+ PARTITION partc VALUES LESS THAN (10) ENGINE = Aria,
+ PARTITION partd VALUES LESS THAN (15) ENGINE = Aria,
+ PARTITION parte VALUES LESS THAN (20) ENGINE = Aria,
+ PARTITION partf VALUES LESS THAN (2147483646) ENGINE = Aria) */
 
 unified filelist
 t1#P#parta.MAD
@@ -31160,14 +31160,14 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int2`,`f_int1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE (f_int1 DIV 2)
 SUBPARTITION BY HASH (f_int1)
 SUBPARTITIONS 2
-(PARTITION parta VALUES LESS THAN (0) ENGINE = MARIA,
- PARTITION partb VALUES LESS THAN (5) ENGINE = MARIA,
- PARTITION partc VALUES LESS THAN (10) ENGINE = MARIA,
- PARTITION partd VALUES LESS THAN (2147483646) ENGINE = MARIA) */
+(PARTITION parta VALUES LESS THAN (0) ENGINE = Aria,
+ PARTITION partb VALUES LESS THAN (5) ENGINE = Aria,
+ PARTITION partc VALUES LESS THAN (10) ENGINE = Aria,
+ PARTITION partd VALUES LESS THAN (2147483646) ENGINE = Aria) */
 
 unified filelist
 t1#P#parta#SP#partasp0.MAD
@@ -31705,21 +31705,21 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int2`,`f_int1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE (f_int1)
 SUBPARTITION BY KEY (f_int1)
 (PARTITION part1 VALUES LESS THAN (0)
- (SUBPARTITION subpart11 ENGINE = MARIA,
-  SUBPARTITION subpart12 ENGINE = MARIA),
+ (SUBPARTITION subpart11 ENGINE = Aria,
+  SUBPARTITION subpart12 ENGINE = Aria),
  PARTITION part2 VALUES LESS THAN (5)
- (SUBPARTITION subpart21 ENGINE = MARIA,
-  SUBPARTITION subpart22 ENGINE = MARIA),
+ (SUBPARTITION subpart21 ENGINE = Aria,
+  SUBPARTITION subpart22 ENGINE = Aria),
  PARTITION part3 VALUES LESS THAN (10)
- (SUBPARTITION subpart31 ENGINE = MARIA,
-  SUBPARTITION subpart32 ENGINE = MARIA),
+ (SUBPARTITION subpart31 ENGINE = Aria,
+  SUBPARTITION subpart32 ENGINE = Aria),
  PARTITION part4 VALUES LESS THAN (2147483646)
- (SUBPARTITION subpart41 ENGINE = MARIA,
-  SUBPARTITION subpart42 ENGINE = MARIA)) */
+ (SUBPARTITION subpart41 ENGINE = Aria,
+  SUBPARTITION subpart42 ENGINE = Aria)) */
 
 unified filelist
 t1#P#part1#SP#subpart11.MAD
@@ -32257,21 +32257,21 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int2`,`f_int1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3)))
 SUBPARTITION BY HASH (f_int1 + 1)
 (PARTITION part1 VALUES IN (0)
- (SUBPARTITION sp11 ENGINE = MARIA,
-  SUBPARTITION sp12 ENGINE = MARIA),
+ (SUBPARTITION sp11 ENGINE = Aria,
+  SUBPARTITION sp12 ENGINE = Aria),
  PARTITION part2 VALUES IN (1)
- (SUBPARTITION sp21 ENGINE = MARIA,
-  SUBPARTITION sp22 ENGINE = MARIA),
+ (SUBPARTITION sp21 ENGINE = Aria,
+  SUBPARTITION sp22 ENGINE = Aria),
  PARTITION part3 VALUES IN (2)
- (SUBPARTITION sp31 ENGINE = MARIA,
-  SUBPARTITION sp32 ENGINE = MARIA),
+ (SUBPARTITION sp31 ENGINE = Aria,
+  SUBPARTITION sp32 ENGINE = Aria),
  PARTITION part4 VALUES IN (NULL)
- (SUBPARTITION sp41 ENGINE = MARIA,
-  SUBPARTITION sp42 ENGINE = MARIA)) */
+ (SUBPARTITION sp41 ENGINE = Aria,
+  SUBPARTITION sp42 ENGINE = Aria)) */
 
 unified filelist
 t1#P#part1#SP#sp11.MAD
@@ -32805,13 +32805,13 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int2`,`f_int1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2)))
 SUBPARTITION BY KEY (f_int1)
 SUBPARTITIONS 3
-(PARTITION part1 VALUES IN (0) ENGINE = MARIA,
- PARTITION part2 VALUES IN (1) ENGINE = MARIA,
- PARTITION part3 VALUES IN (NULL) ENGINE = MARIA) */
+(PARTITION part1 VALUES IN (0) ENGINE = Aria,
+ PARTITION part2 VALUES IN (1) ENGINE = Aria,
+ PARTITION part3 VALUES IN (NULL) ENGINE = Aria) */
 
 unified filelist
 t1#P#part1#SP#part1sp0.MAD
@@ -33344,7 +33344,7 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int2`,`f_int1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY HASH (f_int1 + f_int2)
 PARTITIONS 2 */
 
@@ -33864,7 +33864,7 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int2`,`f_int1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY KEY (f_int1,f_int2)
 PARTITIONS 5 */
 
@@ -34398,16 +34398,16 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int2`,`f_int1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4))
-(PARTITION part_3 VALUES IN (-3) ENGINE = MARIA,
- PARTITION part_2 VALUES IN (-2) ENGINE = MARIA,
- PARTITION part_1 VALUES IN (-1) ENGINE = MARIA,
- PARTITION part_N VALUES IN (NULL) ENGINE = MARIA,
- PARTITION part0 VALUES IN (0) ENGINE = MARIA,
- PARTITION part1 VALUES IN (1) ENGINE = MARIA,
- PARTITION part2 VALUES IN (2) ENGINE = MARIA,
- PARTITION part3 VALUES IN (3) ENGINE = MARIA) */
+(PARTITION part_3 VALUES IN (-3) ENGINE = Aria,
+ PARTITION part_2 VALUES IN (-2) ENGINE = Aria,
+ PARTITION part_1 VALUES IN (-1) ENGINE = Aria,
+ PARTITION part_N VALUES IN (NULL) ENGINE = Aria,
+ PARTITION part0 VALUES IN (0) ENGINE = Aria,
+ PARTITION part1 VALUES IN (1) ENGINE = Aria,
+ PARTITION part2 VALUES IN (2) ENGINE = Aria,
+ PARTITION part3 VALUES IN (3) ENGINE = Aria) */
 
 unified filelist
 t1#P#part0.MAD
@@ -34943,14 +34943,14 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int2`,`f_int1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2)
-(PARTITION parta VALUES LESS THAN (0) ENGINE = MARIA,
- PARTITION partb VALUES LESS THAN (5) ENGINE = MARIA,
- PARTITION partc VALUES LESS THAN (10) ENGINE = MARIA,
- PARTITION partd VALUES LESS THAN (15) ENGINE = MARIA,
- PARTITION parte VALUES LESS THAN (20) ENGINE = MARIA,
- PARTITION partf VALUES LESS THAN (2147483646) ENGINE = MARIA) */
+(PARTITION parta VALUES LESS THAN (0) ENGINE = Aria,
+ PARTITION partb VALUES LESS THAN (5) ENGINE = Aria,
+ PARTITION partc VALUES LESS THAN (10) ENGINE = Aria,
+ PARTITION partd VALUES LESS THAN (15) ENGINE = Aria,
+ PARTITION parte VALUES LESS THAN (20) ENGINE = Aria,
+ PARTITION partf VALUES LESS THAN (2147483646) ENGINE = Aria) */
 
 unified filelist
 t1#P#parta.MAD
@@ -35480,14 +35480,14 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int2`,`f_int1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE (f_int1)
 SUBPARTITION BY HASH (f_int2)
 SUBPARTITIONS 2
-(PARTITION parta VALUES LESS THAN (0) ENGINE = MARIA,
- PARTITION partb VALUES LESS THAN (5) ENGINE = MARIA,
- PARTITION partc VALUES LESS THAN (10) ENGINE = MARIA,
- PARTITION partd VALUES LESS THAN (2147483646) ENGINE = MARIA) */
+(PARTITION parta VALUES LESS THAN (0) ENGINE = Aria,
+ PARTITION partb VALUES LESS THAN (5) ENGINE = Aria,
+ PARTITION partc VALUES LESS THAN (10) ENGINE = Aria,
+ PARTITION partd VALUES LESS THAN (2147483646) ENGINE = Aria) */
 
 unified filelist
 t1#P#parta#SP#partasp0.MAD
@@ -36025,21 +36025,21 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int2`,`f_int1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY RANGE (f_int1)
 SUBPARTITION BY KEY (f_int2)
 (PARTITION part1 VALUES LESS THAN (0)
- (SUBPARTITION subpart11 ENGINE = MARIA,
-  SUBPARTITION subpart12 ENGINE = MARIA),
+ (SUBPARTITION subpart11 ENGINE = Aria,
+  SUBPARTITION subpart12 ENGINE = Aria),
  PARTITION part2 VALUES LESS THAN (5)
- (SUBPARTITION subpart21 ENGINE = MARIA,
-  SUBPARTITION subpart22 ENGINE = MARIA),
+ (SUBPARTITION subpart21 ENGINE = Aria,
+  SUBPARTITION subpart22 ENGINE = Aria),
  PARTITION part3 VALUES LESS THAN (10)
- (SUBPARTITION subpart31 ENGINE = MARIA,
-  SUBPARTITION subpart32 ENGINE = MARIA),
+ (SUBPARTITION subpart31 ENGINE = Aria,
+  SUBPARTITION subpart32 ENGINE = Aria),
  PARTITION part4 VALUES LESS THAN (2147483646)
- (SUBPARTITION subpart41 ENGINE = MARIA,
-  SUBPARTITION subpart42 ENGINE = MARIA)) */
+ (SUBPARTITION subpart41 ENGINE = Aria,
+  SUBPARTITION subpart42 ENGINE = Aria)) */
 
 unified filelist
 t1#P#part1#SP#subpart11.MAD
@@ -36577,21 +36577,21 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int2`,`f_int1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3)))
 SUBPARTITION BY HASH (f_int2 + 1)
 (PARTITION part1 VALUES IN (0)
- (SUBPARTITION sp11 ENGINE = MARIA,
-  SUBPARTITION sp12 ENGINE = MARIA),
+ (SUBPARTITION sp11 ENGINE = Aria,
+  SUBPARTITION sp12 ENGINE = Aria),
  PARTITION part2 VALUES IN (1)
- (SUBPARTITION sp21 ENGINE = MARIA,
-  SUBPARTITION sp22 ENGINE = MARIA),
+ (SUBPARTITION sp21 ENGINE = Aria,
+  SUBPARTITION sp22 ENGINE = Aria),
  PARTITION part3 VALUES IN (2)
- (SUBPARTITION sp31 ENGINE = MARIA,
-  SUBPARTITION sp32 ENGINE = MARIA),
+ (SUBPARTITION sp31 ENGINE = Aria,
+  SUBPARTITION sp32 ENGINE = Aria),
  PARTITION part4 VALUES IN (NULL)
- (SUBPARTITION sp41 ENGINE = MARIA,
-  SUBPARTITION sp42 ENGINE = MARIA)) */
+ (SUBPARTITION sp41 ENGINE = Aria,
+  SUBPARTITION sp42 ENGINE = Aria)) */
 
 unified filelist
 t1#P#part1#SP#sp11.MAD
@@ -37125,13 +37125,13 @@
   `f_char2` char(20) DEFAULT NULL,
   `f_charbig` varchar(1000) DEFAULT NULL,
   UNIQUE KEY `uidx` (`f_int2`,`f_int1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1
+) ENGINE=Aria DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2)))
 SUBPARTITION BY KEY (f_int2)
 SUBPARTITIONS 3
-(PARTITION part1 VALUES IN (0) ENGINE = MARIA,
- PARTITION part2 VALUES IN (1) ENGINE = MARIA,
- PARTITION part3 VALUES IN (NULL) ENGINE = MARIA) */
+(PARTITION part1 VALUES IN (0) ENGINE = Aria,
+ PARTITION part2 VALUES IN (1) ENGINE = Aria,
+ PARTITION part3 VALUES IN (NULL) ENGINE = Aria) */
 
 unified filelist
 t1#P#part1#SP#part1sp0.MAD

=== modified file 'mysql-test/suite/parts/r/partition_auto_increment_maria.result'
--- a/mysql-test/suite/parts/r/partition_auto_increment_maria.result	2010-04-28 12:52:24 +0000
+++ b/mysql-test/suite/parts/r/partition_auto_increment_maria.result	2010-09-12 16:40:01 +0000
@@ -3,13 +3,13 @@
 CREATE TABLE t1 (
 c1 INT NOT NULL AUTO_INCREMENT,
 PRIMARY KEY (c1))
-ENGINE='MARIA';
+ENGINE='Aria';
 SHOW CREATE TABLE t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `c1` int(11) NOT NULL AUTO_INCREMENT,
   PRIMARY KEY (`c1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test'
 AND TABLE_NAME='t1';
 AUTO_INCREMENT
@@ -71,20 +71,20 @@
 CREATE TABLE t1 (
 c1 INT NOT NULL AUTO_INCREMENT,
 PRIMARY KEY (c1))
-ENGINE='MARIA';
+ENGINE='Aria';
 SHOW CREATE TABLE t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `c1` int(11) NOT NULL AUTO_INCREMENT,
   PRIMARY KEY (`c1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 FLUSH TABLE;
 SHOW CREATE TABLE t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `c1` int(11) NOT NULL AUTO_INCREMENT,
   PRIMARY KEY (`c1`)
-) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 INSERT INTO t1 VALUES (4);
 FLUSH TABLE;
 SHOW CREATE TABLE t1;
@@ -92,7 +92,7 @@
 t1	CREATE TABLE `t1` (
   `c1` int(11) NOT NULL AUTO_INCREMENT,
   PRIMARY KEY (`c1`)
-) ENGINE=MARIA AUTO_INCREMENT=5 DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria AUTO_INCREMENT=5 DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 INSERT INTO t1 VALUES (NULL);
 FLUSH TABLE;
 SHOW CREATE TABLE t1;
@@ -100,7 +100,7 @@
 t1	CREATE TABLE `t1` (
   `c1` int(11) NOT NULL AUTO_INCREMENT,
   PRIMARY KEY (`c1`)
-) ENGINE=MARIA AUTO_INCREMENT=6 DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria AUTO_INCREMENT=6 DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 DELETE FROM t1;
 INSERT INTO t1 VALUES (NULL);
 SHOW CREATE TABLE t1;
@@ -108,7 +108,7 @@
 t1	CREATE TABLE `t1` (
   `c1` int(11) NOT NULL AUTO_INCREMENT,
   PRIMARY KEY (`c1`)
-) ENGINE=MARIA AUTO_INCREMENT=7 DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria AUTO_INCREMENT=7 DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 SELECT * FROM t1 ORDER BY c1;
 c1
 6
@@ -119,7 +119,7 @@
 t1	CREATE TABLE `t1` (
   `c1` int(11) NOT NULL AUTO_INCREMENT,
   PRIMARY KEY (`c1`)
-) ENGINE=MARIA AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 SELECT * FROM t1 ORDER BY c1;
 c1
 1
@@ -134,13 +134,13 @@
 t1	CREATE TABLE `t1` (
   `c1` int(11) NOT NULL AUTO_INCREMENT,
   PRIMARY KEY (`c1`)
-) ENGINE=MARIA AUTO_INCREMENT=102 DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+) ENGINE=Aria AUTO_INCREMENT=102 DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
 DROP TABLE t1;
 # Simple test with NULL
 CREATE TABLE t1 (
 c1 INT NOT NULL AUTO_INCREMENT,
 PRIMARY KEY (c1))
-ENGINE='MARIA'
+ENGINE='Aria'
 PARTITION BY HASH(c1)
 PARTITIONS 2;
 INSERT INTO t1 VALUES (NULL);
@@ -149,7 +149,7 @@
 t1	CREATE TABLE `t1` (
   `c1` int(11) NOT NULL AUTO_INCREMENT,
   PRIMARY KEY (`c1`)
-) ENGINE=MARIA AUTO_INCREMENT=2 DEFAULT CHARSET=latin1
+) ENGINE=Aria AUTO_INCREMENT=2 DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY HASH (c1)
 PARTITIONS 2 */
 SELECT * FROM t1;
@@ -161,7 +161,7 @@
 c1 INT,
 c2 INT NOT NULL AUTO_INCREMENT,
 PRIMARY KEY (c2))
-ENGINE='MARIA'
+ENGINE='Aria'
 PARTITION BY HASH(c2)
 PARTITIONS 2;
 INSERT INTO t1 VALUES (1, NULL);
@@ -179,7 +179,7 @@
 c1 INT,
 c2 INT NOT NULL AUTO_INCREMENT,
 PRIMARY KEY (c2))
-ENGINE='MARIA'
+ENGINE='Aria'
 PARTITION BY HASH(c2)
 PARTITIONS 2;
 INSERT INTO t1 VALUES (1, 0);
@@ -200,7 +200,7 @@
 CREATE TABLE t1 (
 c1 INT NOT NULL AUTO_INCREMENT,
 PRIMARY KEY (c1))
-ENGINE='MARIA'
+ENGINE='Aria'
 PARTITION BY HASH(c1)
 PARTITIONS 2;
 INSERT INTO t1 VALUES (2), (4), (NULL);
@@ -251,7 +251,7 @@
 CREATE TABLE t1 (
 c1 INT NOT NULL AUTO_INCREMENT,
 PRIMARY KEY (c1))
-ENGINE='MARIA'
+ENGINE='Aria'
 PARTITION BY HASH(c1)
 PARTITIONS 2;
 SET @@session.auto_increment_increment = 10;
@@ -299,7 +299,7 @@
 CREATE TABLE t1 (
 c1 INT NOT NULL AUTO_INCREMENT,
 PRIMARY KEY (c1))
-ENGINE='MARIA'
+ENGINE='Aria'
 PARTITION BY HASH (c1)
 PARTITIONS 2;
 SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test'
@@ -373,7 +373,7 @@
 t1	CREATE TABLE `t1` (
   `c1` int(11) NOT NULL AUTO_INCREMENT,
   PRIMARY KEY (`c1`)
-) ENGINE=MARIA AUTO_INCREMENT=27 DEFAULT CHARSET=latin1
+) ENGINE=Aria AUTO_INCREMENT=27 DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY HASH (c1)
 PARTITIONS 2 */
 SELECT * FROM t1 ORDER BY c1;
@@ -386,7 +386,7 @@
 t1	CREATE TABLE `t1` (
   `c1` int(11) NOT NULL AUTO_INCREMENT,
   PRIMARY KEY (`c1`)
-) ENGINE=MARIA AUTO_INCREMENT=28 DEFAULT CHARSET=latin1
+) ENGINE=Aria AUTO_INCREMENT=28 DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY HASH (c1)
 PARTITIONS 2 */
 SELECT * FROM t1 ORDER BY c1;
@@ -403,14 +403,14 @@
 t1	CREATE TABLE `t1` (
   `c1` int(11) NOT NULL AUTO_INCREMENT,
   PRIMARY KEY (`c1`)
-) ENGINE=MARIA AUTO_INCREMENT=102 DEFAULT CHARSET=latin1
+) ENGINE=Aria AUTO_INCREMENT=102 DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY HASH (c1)
 PARTITIONS 2 */
 DROP TABLE t1;
 # Test with two threads
 # con default
 CREATE TABLE t1 (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (c1))
-ENGINE = 'MARIA'
+ENGINE = 'Aria'
 PARTITION BY HASH(c1)
 PARTITIONS 2;
 INSERT INTO t1 (c1) VALUES (2);
@@ -449,7 +449,7 @@
 # Test with two threads + start transaction NO PARTITIONING
 # con default
 CREATE TABLE t1 (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (c1))
-ENGINE = 'MARIA';
+ENGINE = 'Aria';
 START TRANSACTION;
 INSERT INTO t1 (c1) VALUES (2);
 INSERT INTO t1 (c1) VALUES (4);
@@ -530,7 +530,7 @@
 # Test with two threads + start transaction
 # con default
 CREATE TABLE t1 (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (c1))
-ENGINE = 'MARIA'
+ENGINE = 'Aria'
 PARTITION BY HASH(c1)
 PARTITIONS 2;
 START TRANSACTION;
@@ -612,7 +612,7 @@
 c1 INT NOT NULL AUTO_INCREMENT,
 c2 INT,
 PRIMARY KEY (c1,c2))
-ENGINE = 'MARIA'
+ENGINE = 'Aria'
 PARTITION BY HASH(c2)
 PARTITIONS 2;
 INSERT INTO t1 VALUES (1, 0);
@@ -642,7 +642,7 @@
 c1 INT,
 c2 INT NOT NULL AUTO_INCREMENT,
 PRIMARY KEY (c2))
-ENGINE = 'MARIA'
+ENGINE = 'Aria'
 PARTITION BY HASH(c2)
 PARTITIONS 2;
 INSERT INTO t1 VALUES (1, 0);
@@ -670,7 +670,7 @@
 c1 INT,
 c2 INT NOT NULL AUTO_INCREMENT,
 PRIMARY KEY (c1,c2))
-ENGINE = 'MARIA'
+ENGINE = 'Aria'
 PARTITION BY HASH(c2)
 PARTITIONS 2;
 INSERT INTO t1 VALUES (1, 0);
@@ -695,7 +695,7 @@
 DROP TABLE t1;
 # Test AUTO_INCREMENT in CREATE
 CREATE TABLE t1 (c1 INT NOT NULL AUTO_INCREMENT, PRI