summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.bzrignore19
-rwxr-xr-xBUILD/autorun.sh23
-rwxr-xr-xBUILD/compile-dist11
-rwxr-xr-xBitKeeper/triggers/pre-commit.check-case.pl26
-rwxr-xr-xCMakeLists.txt19
-rw-r--r--Docs/INSTALL-BINARY8
-rw-r--r--Docs/Makefile.am42
-rwxr-xr-xDocs/generate-text-files.pl58
-rw-r--r--Docs/manual.chm14
-rw-r--r--Docs/mysql.info29
-rw-r--r--INSTALL-SOURCE8
-rw-r--r--INSTALL-WIN-SOURCE9
-rw-r--r--Makefile.am21
-rw-r--r--client/client_priv.h3
-rw-r--r--client/mysql.cc260
-rw-r--r--client/mysql_upgrade.c13
-rw-r--r--client/mysqladmin.cc8
-rw-r--r--client/mysqlbinlog.cc11
-rw-r--r--client/mysqlcheck.c92
-rw-r--r--client/mysqldump.c44
-rw-r--r--client/mysqlimport.c8
-rw-r--r--client/mysqlshow.c8
-rw-r--r--client/mysqlslap.c18
-rw-r--r--client/mysqltest.c99
-rw-r--r--cmd-line-utils/libedit/Makefile.am12
-rw-r--r--cmd-line-utils/readline/INSTALL16
-rw-r--r--cmd-line-utils/readline/README18
-rw-r--r--cmd-line-utils/readline/bind.c310
-rw-r--r--cmd-line-utils/readline/callback.c132
-rw-r--r--cmd-line-utils/readline/chardefs.h6
-rw-r--r--cmd-line-utils/readline/compat.c4
-rw-r--r--cmd-line-utils/readline/complete.c140
-rw-r--r--cmd-line-utils/readline/configure.in99
-rw-r--r--cmd-line-utils/readline/display.c528
-rw-r--r--cmd-line-utils/readline/funmap.c5
-rw-r--r--cmd-line-utils/readline/histexpand.c54
-rw-r--r--cmd-line-utils/readline/histfile.c16
-rw-r--r--cmd-line-utils/readline/history.c113
-rw-r--r--cmd-line-utils/readline/histsearch.c4
-rw-r--r--cmd-line-utils/readline/input.c45
-rw-r--r--cmd-line-utils/readline/isearch.c784
-rw-r--r--cmd-line-utils/readline/keymaps.c4
-rw-r--r--cmd-line-utils/readline/kill.c36
-rw-r--r--cmd-line-utils/readline/macro.c23
-rw-r--r--cmd-line-utils/readline/mbutil.c48
-rw-r--r--cmd-line-utils/readline/misc.c302
-rw-r--r--cmd-line-utils/readline/nls.c6
-rw-r--r--cmd-line-utils/readline/parens.c4
-rw-r--r--cmd-line-utils/readline/readline.c384
-rw-r--r--cmd-line-utils/readline/readline.h69
-rw-r--r--cmd-line-utils/readline/rlconf.h5
-rw-r--r--cmd-line-utils/readline/rldefs.h8
-rw-r--r--cmd-line-utils/readline/rlmbutil.h38
-rw-r--r--cmd-line-utils/readline/rlprivate.h141
-rw-r--r--cmd-line-utils/readline/rltty.c89
-rw-r--r--cmd-line-utils/readline/savestring.c3
-rw-r--r--cmd-line-utils/readline/search.c314
-rw-r--r--cmd-line-utils/readline/shell.c40
-rw-r--r--cmd-line-utils/readline/signals.c78
-rw-r--r--cmd-line-utils/readline/terminal.c141
-rw-r--r--cmd-line-utils/readline/text.c373
-rw-r--r--cmd-line-utils/readline/tilde.c62
-rw-r--r--cmd-line-utils/readline/tilde.h3
-rw-r--r--cmd-line-utils/readline/undo.c91
-rw-r--r--cmd-line-utils/readline/util.c34
-rw-r--r--cmd-line-utils/readline/vi_keymap.c2
-rw-r--r--cmd-line-utils/readline/vi_mode.c534
-rw-r--r--cmd-line-utils/readline/xmalloc.c11
-rw-r--r--config/ac-macros/large_file.m411
-rw-r--r--config/ac-macros/plugins.m411
-rw-r--r--configure.in59
-rw-r--r--dbug/dbug.c28
-rw-r--r--debian/Makefile.am118
-rw-r--r--debian/README.Maintainer99
-rw-r--r--debian/additions/my.cnf134
-rw-r--r--debian/additions/mysql-server.lintian-overrides2
-rw-r--r--debian/additions/ndb_mgmd.cnf35
-rw-r--r--debian/changelog3281
-rw-r--r--debian/compat1
-rw-r--r--debian/control.in353
-rw-r--r--debian/copyright139
-rw-r--r--debian/copyright.more60
-rw-r--r--debian/defs.mk.in14
-rw-r--r--debian/libmysqlclientSLIB-dev.README.Maintainer.in4
-rw-r--r--debian/libmysqlclientSLIB-dev.dirs.in2
-rw-r--r--debian/libmysqlclientSLIB-dev.docs.in1
-rw-r--r--debian/libmysqlclientSLIB-dev.examples.in1
-rw-r--r--debian/libmysqlclientSLIB-dev.files.in6
-rw-r--r--debian/libmysqlclientSLIB-dev.links.in2
-rw-r--r--debian/libmysqlclientSLIBoff.README.Debian.in30
-rw-r--r--debian/libmysqlclientSLIBoff.dirs.in1
-rw-r--r--debian/libmysqlclientSLIBoff.docs.in1
-rw-r--r--debian/libmysqlclientSLIBoff.files.in1
-rw-r--r--debian/libmysqlclientSLIBoff.postinst.in12
-rw-r--r--debian/libndbclientNLIB-dev.dirs.in3
-rw-r--r--debian/libndbclientNLIB-dev.files.in3
-rw-r--r--debian/libndbclientNLIB-dev.links.in1
-rw-r--r--debian/libndbclientNLIB.README.Debian.in30
-rw-r--r--debian/libndbclientNLIB.dirs.in1
-rw-r--r--debian/libndbclientNLIB.files.in1
-rw-r--r--debian/libndbclientNLIB.postinst.in12
-rw-r--r--debian/mysql-client-BASE.NEWS.in6
-rw-r--r--debian/mysql-client-BASE.README.Debian.in4
-rw-r--r--debian/mysql-client-BASE.dirs.in2
-rw-r--r--debian/mysql-client-BASE.docs.in2
-rw-r--r--debian/mysql-client-BASE.files.in17
-rw-r--r--debian/mysql-client-BASE.lintian-overrides.in1
-rw-r--r--debian/mysql-common.README.Debian.in20
-rw-r--r--debian/mysql-common.dirs.in1
-rw-r--r--debian/mysql-common.files.in2
-rw-r--r--debian/mysql-common.postrm.in7
-rw-r--r--debian/mysql-common.preinst.in215
-rw-r--r--debian/mysql-extra-BASE.dirs.in1
-rw-r--r--debian/mysql-extra-BASE.files.in3
-rw-r--r--debian/mysql-management-BASE.dirs.in1
-rw-r--r--debian/mysql-management-BASE.files.in1
-rw-r--r--debian/mysql-management-BASE.mysql-management.init.in86
-rw-r--r--debian/mysql-server-BASE.NEWS.in10
-rw-r--r--debian/mysql-server-BASE.README.Debian.in125
-rw-r--r--debian/mysql-server-BASE.config.in39
-rw-r--r--debian/mysql-server-BASE.dirs.in13
-rw-r--r--debian/mysql-server-BASE.docs.in2
-rw-r--r--debian/mysql-server-BASE.files.in47
-rw-r--r--debian/mysql-server-BASE.links.in1
-rw-r--r--debian/mysql-server-BASE.lintian-overrides.in4
-rw-r--r--debian/mysql-server-BASE.logcheck.ignore.paranoid.in10
-rw-r--r--debian/mysql-server-BASE.logcheck.ignore.server.in31
-rw-r--r--debian/mysql-server-BASE.logcheck.ignore.workstation.in31
-rw-r--r--debian/mysql-server-BASE.mysql-server.logrotate.in28
-rw-r--r--debian/mysql-server-BASE.postinst.in276
-rw-r--r--debian/mysql-server-BASE.postrm.in92
-rw-r--r--debian/mysql-server-BASE.preinst.in167
-rw-r--r--debian/mysql-server-BASE.prerm.in8
-rw-r--r--debian/mysql-server-BASE.templates.in71
-rw-r--r--debian/mysql-server-PREV.preinst.in191
-rw-r--r--debian/mysql-server.preinst.in191
-rw-r--r--debian/mysql-storage-BASE.dirs.in1
-rw-r--r--debian/mysql-storage-BASE.files.in1
-rw-r--r--debian/mysql-storage-BASE.mysql-storage.init.in85
-rw-r--r--debian/mysql-test-BASE.dirs.in2
-rw-r--r--debian/mysql-test-BASE.files.in2
-rw-r--r--debian/mysql-tools-BASE.dirs.in2
-rw-r--r--debian/mysql-tools-BASE.files.in13
-rw-r--r--debian/po/POTFILES.in.in1
-rw-r--r--debian/po/ca.po290
-rw-r--r--debian/po/cs.po259
-rw-r--r--debian/po/da.po283
-rw-r--r--debian/po/de.po195
-rw-r--r--debian/po/es.po288
-rw-r--r--debian/po/eu.po163
-rw-r--r--debian/po/fr.po204
-rw-r--r--debian/po/gl.po279
-rw-r--r--debian/po/it.po184
-rw-r--r--debian/po/ja.po278
-rw-r--r--debian/po/nb.po179
-rw-r--r--debian/po/nl.po187
-rw-r--r--debian/po/pt.po198
-rw-r--r--debian/po/pt_BR.po339
-rw-r--r--debian/po/ro.po193
-rw-r--r--debian/po/ru.po172
-rw-r--r--debian/po/sv.po225
-rw-r--r--debian/po/templates.pot155
-rw-r--r--debian/po/tr.po290
-rwxr-xr-xdebian/rules405
-rw-r--r--debian/source.lintian-overrides.in6
-rw-r--r--debian/watch3
-rw-r--r--extra/comp_err.c1
-rw-r--r--include/config-win.h3
-rw-r--r--include/my_base.h18
-rw-r--r--include/my_getopt.h5
-rw-r--r--include/my_global.h64
-rw-r--r--include/my_pthread.h9
-rw-r--r--include/my_sys.h10
-rw-r--r--include/myisammrg.h10
-rw-r--r--include/mysql.h10
-rw-r--r--include/mysql_com.h18
-rw-r--r--include/mysql_embed.h1
-rw-r--r--include/mysql_h.ic192
-rw-r--r--include/mysql_version.h.in1
-rw-r--r--include/queues.h6
-rw-r--r--include/sql_common.h6
-rwxr-xr-xlibmysql/CMakeLists.txt7
-rw-r--r--libmysql/Makefile.am2
-rw-r--r--libmysql/Makefile.shared4
-rw-r--r--libmysql/client_settings.h4
-rw-r--r--libmysql/libmysql.c296
-rw-r--r--libmysql/libmysql.def1
-rw-r--r--libmysql/mytest.c175
-rw-r--r--libmysqld/CMakeLists.txt2
-rw-r--r--libmysqld/emb_qcache.cc103
-rw-r--r--libmysqld/emb_qcache.h4
-rw-r--r--libmysqld/lib_sql.cc37
-rw-r--r--libmysqld/libmysqld.def1
-rw-r--r--mysql-test/Makefile.am5
-rw-r--r--mysql-test/extra/binlog_tests/blackhole.test9
-rw-r--r--mysql-test/extra/binlog_tests/ctype_cp932.test4
-rw-r--r--mysql-test/extra/binlog_tests/database.test15
-rw-r--r--mysql-test/extra/binlog_tests/mix_innodb_myisam_side_effects.test298
-rw-r--r--mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test842
-rw-r--r--mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test73
-rw-r--r--mysql-test/extra/rpl_tests/rpl_row_basic.test36
-rw-r--r--mysql-test/extra/rpl_tests/rpl_row_charset.test6
-rw-r--r--mysql-test/extra/rpl_tests/rpl_truncate_helper.test14
-rw-r--r--mysql-test/include/ctype_common.inc11
-rw-r--r--mysql-test/include/ctype_regex.inc42
-rw-r--r--mysql-test/include/gis_keys.inc46
-rw-r--r--mysql-test/include/handler.inc194
-rw-r--r--mysql-test/include/innodb_rollback_on_timeout.inc4
-rw-r--r--mysql-test/include/mix1.inc237
-rw-r--r--mysql-test/include/partition_1.inc750
-rw-r--r--mysql-test/include/ps_query.inc4
-rw-r--r--mysql-test/include/reset_master_and_slave.inc10
-rw-r--r--mysql-test/include/wait_for_slave_sql_error.inc33
-rw-r--r--mysql-test/include/windows.inc9
-rw-r--r--mysql-test/lib/mtr_cases.pl276
-rw-r--r--mysql-test/lib/mtr_report.pl28
-rw-r--r--mysql-test/mysql-test-run-shell.sh13
-rwxr-xr-xmysql-test/mysql-test-run.pl124
-rw-r--r--mysql-test/r/almost_full.result29
-rw-r--r--mysql-test/r/analyze.result8
-rw-r--r--mysql-test/r/archive.result24
-rw-r--r--mysql-test/r/bigint.result6
-rw-r--r--mysql-test/r/binlog_unsafe.result4
-rw-r--r--mysql-test/r/case.result20
-rw-r--r--mysql-test/r/cast.result24
-rw-r--r--mysql-test/r/change_user.result46
-rw-r--r--mysql-test/r/compress.result4
-rw-r--r--mysql-test/r/create.result64
-rw-r--r--mysql-test/r/csv.result112
-rw-r--r--mysql-test/r/ctype_big5.result17
-rw-r--r--mysql-test/r/ctype_euckr.result58
-rw-r--r--mysql-test/r/ctype_gb2312.result17
-rw-r--r--mysql-test/r/ctype_gbk.result17
-rw-r--r--mysql-test/r/ctype_uca.result62
-rw-r--r--mysql-test/r/ctype_ucs.result62
-rw-r--r--mysql-test/r/ctype_utf8.result87
-rw-r--r--mysql-test/r/date_formats.result2
-rw-r--r--mysql-test/r/ddl_i18n_koi8r.result6
-rw-r--r--mysql-test/r/ddl_i18n_utf8.result6
-rw-r--r--mysql-test/r/delayed.result56
-rw-r--r--mysql-test/r/delete.result8
-rw-r--r--mysql-test/r/derived.result3
-rw-r--r--mysql-test/r/drop.result7
-rw-r--r--mysql-test/r/events_bugs.result123
-rw-r--r--mysql-test/r/events_scheduling.result4
-rw-r--r--mysql-test/r/events_trans.result2
-rw-r--r--mysql-test/r/explain.result20
-rw-r--r--mysql-test/r/federated.result111
-rw-r--r--mysql-test/r/federated_server.result10
-rw-r--r--mysql-test/r/flush.result17
-rw-r--r--mysql-test/r/fulltext.result6
-rw-r--r--mysql-test/r/func_gconcat.result51
-rw-r--r--mysql-test/r/func_group.result30
-rw-r--r--mysql-test/r/func_in.result5
-rw-r--r--mysql-test/r/func_math.result38
-rw-r--r--mysql-test/r/func_misc.result42
-rw-r--r--mysql-test/r/func_regexp.result19
-rw-r--r--mysql-test/r/func_sapdb.result5
-rw-r--r--mysql-test/r/func_set.result30
-rw-r--r--mysql-test/r/func_str.result30
-rw-r--r--mysql-test/r/func_time.result21
-rw-r--r--mysql-test/r/gis-rtree.result35
-rw-r--r--mysql-test/r/gis.result85
-rw-r--r--mysql-test/r/grant.result65
-rw-r--r--mysql-test/r/grant2.result18
-rw-r--r--mysql-test/r/grant3.result122
-rw-r--r--mysql-test/r/group_by.result215
-rw-r--r--mysql-test/r/group_min_max.result49
-rw-r--r--mysql-test/r/handler_innodb.result193
-rw-r--r--mysql-test/r/handler_myisam.result193
-rw-r--r--mysql-test/r/heap_btree.result15
-rw-r--r--mysql-test/r/index_merge_myisam.result2
-rw-r--r--mysql-test/r/information_schema.result93
-rw-r--r--mysql-test/r/information_schema_db.result6
-rw-r--r--mysql-test/r/innodb-semi-consistent.result37
-rw-r--r--mysql-test/r/innodb-ucs2.result1
-rw-r--r--mysql-test/r/innodb.result137
-rw-r--r--mysql-test/r/innodb_autoinc_lock_mode_zero.result39
-rw-r--r--mysql-test/r/innodb_gis.result39
-rw-r--r--mysql-test/r/innodb_mysql.result204
-rw-r--r--mysql-test/r/innodb_timeout_rollback.result1
-rw-r--r--mysql-test/r/insert.result134
-rw-r--r--mysql-test/r/insert_select.result12
-rw-r--r--mysql-test/r/join.result164
-rw-r--r--mysql-test/r/join_outer_innodb.result4
-rw-r--r--mysql-test/r/key.result74
-rw-r--r--mysql-test/r/key_cache.result2
-rw-r--r--mysql-test/r/kill.result11
-rw-r--r--mysql-test/r/log_state.result75
-rw-r--r--mysql-test/r/log_tables.result348
-rw-r--r--mysql-test/r/lowercase_view.result21
-rw-r--r--mysql-test/r/merge-big.result77
-rw-r--r--mysql-test/r/merge.result1132
-rw-r--r--mysql-test/r/merge_innodb.result37
-rw-r--r--mysql-test/r/metadata.result2
-rw-r--r--mysql-test/r/multi_update.result23
-rw-r--r--mysql-test/r/myisam.result73
-rw-r--r--mysql-test/r/myisampack.result29
-rw-r--r--mysql-test/r/mysql.result9
-rw-r--r--mysql-test/r/mysql_comments.result62
-rw-r--r--mysql-test/r/mysqlbinlog.result24
-rw-r--r--mysql-test/r/mysqlcheck.result25
-rw-r--r--mysql-test/r/mysqldump.result41
-rw-r--r--mysql-test/r/mysqlslap.result6
-rw-r--r--mysql-test/r/mysqltest.result3
-rw-r--r--mysql-test/r/named_pipe.result2153
-rw-r--r--mysql-test/r/no-threads.result3
-rw-r--r--mysql-test/r/null.result25
-rw-r--r--mysql-test/r/olap.result19
-rw-r--r--mysql-test/r/order_by.result285
-rw-r--r--mysql-test/r/outfile_loaddata.result103
-rw-r--r--mysql-test/r/packet.result8
-rw-r--r--mysql-test/r/parser.result43
-rw-r--r--mysql-test/r/partition.result222
-rw-r--r--mysql-test/r/partition_02myisam.result1725
-rw-r--r--mysql-test/r/partition_archive.result91
-rw-r--r--mysql-test/r/partition_blackhole.result7
-rw-r--r--mysql-test/r/partition_csv.result15
-rw-r--r--mysql-test/r/partition_datatype.result282
-rw-r--r--mysql-test/r/partition_error.result15
-rw-r--r--mysql-test/r/partition_hash.result15
-rw-r--r--mysql-test/r/partition_innodb.result32
-rw-r--r--mysql-test/r/partition_mgm.result10
-rw-r--r--mysql-test/r/partition_range.result2
-rw-r--r--mysql-test/r/partition_symlink.result83
-rw-r--r--mysql-test/r/plugin.result10
-rw-r--r--mysql-test/r/ps.result24
-rw-r--r--mysql-test/r/ps_2myisam.result17
-rw-r--r--mysql-test/r/ps_3innodb.result17
-rw-r--r--mysql-test/r/ps_4heap.result17
-rw-r--r--mysql-test/r/ps_5merge.result34
-rw-r--r--mysql-test/r/query_cache.result87
-rw-r--r--mysql-test/r/query_cache_notembedded.result33
-rw-r--r--mysql-test/r/range.result18
-rw-r--r--mysql-test/r/renamedb.result43
-rw-r--r--mysql-test/r/repair.result27
-rw-r--r--mysql-test/r/select.result274
-rw-r--r--mysql-test/r/shm.result2155
-rw-r--r--mysql-test/r/show_check.result4
-rw-r--r--mysql-test/r/skip_grants.result12
-rw-r--r--mysql-test/r/sp-code.result4
-rw-r--r--mysql-test/r/sp-error.result107
-rw-r--r--mysql-test/r/sp.result301
-rw-r--r--mysql-test/r/sp_gis.result4
-rw-r--r--mysql-test/r/ssl.result4
-rw-r--r--mysql-test/r/ssl_compress.result4
-rw-r--r--mysql-test/r/status.result3
-rw-r--r--mysql-test/r/subselect.result193
-rw-r--r--mysql-test/r/subselect3.result2
-rw-r--r--mysql-test/r/subselect_notembedded.result101
-rw-r--r--mysql-test/r/symlink.result6
-rw-r--r--mysql-test/r/system_mysql_db.result20
-rw-r--r--mysql-test/r/trigger.result39
-rw-r--r--mysql-test/r/trigger_notembedded.result (renamed from mysql-test/r/trigger-grant.result)1
-rw-r--r--mysql-test/r/type_bit.result12
-rw-r--r--mysql-test/r/type_bit_innodb.result2
-rw-r--r--mysql-test/r/type_blob.result14
-rw-r--r--mysql-test/r/type_date.result123
-rw-r--r--mysql-test/r/type_datetime.result134
-rw-r--r--mysql-test/r/type_decimal.result91
-rw-r--r--mysql-test/r/type_float.result16
-rw-r--r--mysql-test/r/type_newdecimal.result20
-rw-r--r--mysql-test/r/type_ranges.result4
-rw-r--r--mysql-test/r/type_timestamp.result8
-rw-r--r--mysql-test/r/udf.result52
-rw-r--r--mysql-test/r/upgrade.result25
-rw-r--r--mysql-test/r/user_var.result18
-rw-r--r--mysql-test/r/variables.result39
-rw-r--r--mysql-test/r/view.result109
-rw-r--r--mysql-test/r/view_grant.result53
-rw-r--r--mysql-test/r/windows.result1
-rw-r--r--mysql-test/r/windows_shm.result2
-rw-r--r--mysql-test/r/xml.result36
-rw-r--r--mysql-test/std_data/corrupt-relay-bin.000624bin0 -> 91418 bytes
-rw-r--r--mysql-test/suite/binlog/r/binlog_database.result56
-rw-r--r--mysql-test/suite/binlog/r/binlog_killed.result131
-rw-r--r--mysql-test/suite/binlog/r/binlog_killed_simulate.result33
-rw-r--r--mysql-test/suite/binlog/r/binlog_row_ctype_cp932.result74
-rw-r--r--mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result233
-rw-r--r--mysql-test/suite/binlog/r/binlog_stm_blackhole.result1
-rwxr-xr-xmysql-test/suite/binlog/r/binlog_stm_ctype_cp932.result74
-rw-r--r--mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result169
-rw-r--r--mysql-test/suite/binlog/t/binlog_database.test12
-rw-r--r--mysql-test/suite/binlog/t/binlog_killed.test323
-rw-r--r--mysql-test/suite/binlog/t/binlog_killed_simulate-master.opt1
-rw-r--r--mysql-test/suite/binlog/t/binlog_killed_simulate.test69
-rw-r--r--mysql-test/suite/binlog/t/binlog_row_mix_innodb_myisam.test2
-rw-r--r--mysql-test/suite/binlog/t/binlog_stm_mix_innodb_myisam.test120
-rw-r--r--mysql-test/suite/binlog/t/disabled.def1
-rw-r--r--mysql-test/suite/funcs_1/datadict/datadict_master.inc12
-rw-r--r--mysql-test/suite/funcs_1/datadict/datadict_priv.inc5
-rw-r--r--mysql-test/suite/funcs_1/datadict/datadict_show_schema.inc3
-rw-r--r--mysql-test/suite/funcs_1/datadict/datadict_tables.inc4
-rw-r--r--mysql-test/suite/funcs_1/datadict/processlist_val.inc123
-rw-r--r--mysql-test/suite/funcs_1/r/a_processlist_priv_no_prot.result4
-rw-r--r--mysql-test/suite/funcs_1/r/a_processlist_val_no_prot.result8
-rw-r--r--mysql-test/suite/funcs_1/r/b_processlist_priv_ps.result4
-rw-r--r--mysql-test/suite/funcs_1/r/b_processlist_val_ps.result8
-rw-r--r--mysql-test/suite/funcs_1/r/innodb__datadict.result484
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_trig_03e.result2
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_views.result289
-rw-r--r--mysql-test/suite/funcs_1/r/memory__datadict.result484
-rw-r--r--mysql-test/suite/funcs_1/r/memory_trig_03e.result2
-rw-r--r--mysql-test/suite/funcs_1/r/memory_views.result289
-rw-r--r--mysql-test/suite/funcs_1/r/myisam__datadict.result484
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_trig_03e.result2
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_views.result289
-rw-r--r--mysql-test/suite/funcs_1/r/ndb__datadict.result554
-rw-r--r--mysql-test/suite/funcs_1/r/ndb_cursors.result2
-rw-r--r--mysql-test/suite/funcs_1/r/ndb_trig_0102.result2
-rw-r--r--mysql-test/suite/funcs_1/r/ndb_trig_03.result2
-rw-r--r--mysql-test/suite/funcs_1/r/ndb_trig_03e.result2
-rw-r--r--mysql-test/suite/funcs_1/r/ndb_trig_0407.result2
-rw-r--r--mysql-test/suite/funcs_1/r/ndb_trig_08.result2
-rw-r--r--mysql-test/suite/funcs_1/r/ndb_trig_09.result2
-rw-r--r--mysql-test/suite/funcs_1/r/ndb_trig_1011ext.result2
-rw-r--r--mysql-test/suite/funcs_1/r/ndb_views.result333
-rw-r--r--mysql-test/suite/funcs_1/t/disabled.def1
-rw-r--r--mysql-test/suite/funcs_1/views/views_master.inc593
-rw-r--r--mysql-test/suite/funcs_2/r/innodb_charset.result6
-rw-r--r--mysql-test/suite/funcs_2/r/memory_charset.result6
-rw-r--r--mysql-test/suite/funcs_2/r/myisam_charset.result6
-rw-r--r--mysql-test/suite/funcs_2/r/ndb_charset.result6
-rw-r--r--mysql-test/suite/manual/r/rpl_replication_delay.result136
-rw-r--r--mysql-test/suite/manual/t/rpl_replication_delay-slave.opt1
-rw-r--r--mysql-test/suite/manual/t/rpl_replication_delay.test71
-rw-r--r--mysql-test/suite/ndb/r/ndb_condition_pushdown.result22
-rw-r--r--mysql-test/suite/ndb/r/ndb_dd_basic.result6
-rw-r--r--mysql-test/suite/ndb/r/ndb_dd_ddl.result2
-rw-r--r--mysql-test/suite/ndb/r/ndb_gis.result4
-rw-r--r--mysql-test/suite/ndb/r/ndb_lock_table.result11
-rw-r--r--mysql-test/suite/ndb/r/ndb_multi.result21
-rw-r--r--mysql-test/suite/ndb/r/ndb_row_format.result2
-rw-r--r--mysql-test/suite/ndb/r/ndb_single_user.result10
-rw-r--r--mysql-test/suite/ndb/r/ndb_update.result8
-rw-r--r--mysql-test/suite/ndb/r/ndb_update_no_read.result75
-rw-r--r--mysql-test/suite/ndb/r/partition_03ndb.result1361
-rw-r--r--mysql-test/suite/ndb/r/ps_7ndb.result17
-rw-r--r--mysql-test/suite/ndb/t/disabled.def6
-rw-r--r--mysql-test/suite/ndb/t/ndb_condition_pushdown.test1025
-rw-r--r--mysql-test/suite/ndb/t/ndb_lock_table.test15
-rw-r--r--mysql-test/suite/ndb/t/ndb_multi.test29
-rw-r--r--mysql-test/suite/ndb/t/ndb_update.test5
-rw-r--r--mysql-test/suite/ndb/t/ndb_update_no_read.test79
-rw-r--r--mysql-test/suite/ndb/t/partition_03ndb.test26
-rw-r--r--mysql-test/suite/parts/inc/methods1.inc18
-rw-r--r--mysql-test/suite/parts/inc/part_blocked_sql_funcs_main.inc47
-rw-r--r--mysql-test/suite/parts/inc/part_supported_sql_funcs_delete.inc3
-rw-r--r--mysql-test/suite/parts/inc/part_supported_sql_funcs_main.inc23
-rw-r--r--mysql-test/suite/parts/inc/partition.pre173
-rw-r--r--mysql-test/suite/parts/inc/partition_10.inc (renamed from mysql-test/include/partition_10.inc)10
-rw-r--r--mysql-test/suite/parts/inc/partition_11.inc (renamed from mysql-test/include/partition_11.inc)6
-rw-r--r--mysql-test/suite/parts/inc/partition_12.inc (renamed from mysql-test/include/partition_12.inc)10
-rw-r--r--mysql-test/suite/parts/inc/partition_20.inc15
-rw-r--r--mysql-test/suite/parts/inc/partition_alter1.inc51
-rw-r--r--mysql-test/suite/parts/inc/partition_alter2.inc82
-rw-r--r--mysql-test/suite/parts/inc/partition_alter3.inc40
-rw-r--r--mysql-test/suite/parts/inc/partition_alter4.inc23
-rw-r--r--mysql-test/suite/parts/inc/partition_alter_1.inc35
-rw-r--r--mysql-test/suite/parts/inc/partition_alter_11.inc16
-rw-r--r--mysql-test/suite/parts/inc/partition_alter_13.inc16
-rw-r--r--mysql-test/suite/parts/inc/partition_alter_41.inc20
-rw-r--r--mysql-test/suite/parts/inc/partition_basic.inc25
-rw-r--r--mysql-test/suite/parts/inc/partition_binary.inc9
-rw-r--r--mysql-test/suite/parts/inc/partition_bit.inc2
-rw-r--r--mysql-test/suite/parts/inc/partition_blob.inc2
-rw-r--r--mysql-test/suite/parts/inc/partition_char.inc6
-rw-r--r--mysql-test/suite/parts/inc/partition_check.inc153
-rw-r--r--mysql-test/suite/parts/inc/partition_check_drop.inc6
-rw-r--r--mysql-test/suite/parts/inc/partition_check_read.inc6
-rw-r--r--mysql-test/suite/parts/inc/partition_check_read1.inc4
-rw-r--r--mysql-test/suite/parts/inc/partition_check_read2.inc4
-rw-r--r--mysql-test/suite/parts/inc/partition_cleanup.inc4
-rw-r--r--mysql-test/suite/parts/inc/partition_directory.inc11
-rw-r--r--mysql-test/suite/parts/inc/partition_engine.inc18
-rw-r--r--mysql-test/suite/parts/inc/partition_enum.inc8
-rw-r--r--mysql-test/suite/parts/inc/partition_layout.inc (renamed from mysql-test/include/partition_layout.inc)2
-rw-r--r--mysql-test/suite/parts/inc/partition_layout_check1.inc6
-rw-r--r--mysql-test/suite/parts/inc/partition_layout_check2.inc8
-rw-r--r--mysql-test/suite/parts/inc/partition_methods1.inc18
-rw-r--r--mysql-test/suite/parts/inc/partition_methods2.inc18
-rw-r--r--mysql-test/suite/parts/inc/partition_set.inc2
-rw-r--r--mysql-test/suite/parts/inc/partition_supported_sql_funcs.inc2
-rw-r--r--mysql-test/suite/parts/inc/partition_syntax.inc109
-rw-r--r--mysql-test/suite/parts/inc/partition_syntax_1.inc44
-rw-r--r--mysql-test/suite/parts/inc/partition_syntax_2.inc14
-rw-r--r--mysql-test/suite/parts/inc/partition_text.inc3
-rw-r--r--mysql-test/suite/parts/inc/partition_trigg1.inc10
-rw-r--r--mysql-test/suite/parts/inc/partition_trigg2.inc8
-rw-r--r--mysql-test/suite/parts/inc/partition_trigg3.inc28
-rw-r--r--mysql-test/suite/parts/inc/partition_value.inc4
-rw-r--r--mysql-test/suite/parts/inc/partition_varbinary.inc2
-rw-r--r--mysql-test/suite/parts/inc/partition_varchar.inc2
-rw-r--r--mysql-test/suite/parts/r/partition_alter1_innodb.result682
-rw-r--r--mysql-test/suite/parts/r/partition_alter1_myisam.result266
-rw-r--r--mysql-test/suite/parts/r/partition_alter2_innodb.result970
-rw-r--r--mysql-test/suite/parts/r/partition_alter2_myisam.result586
-rw-r--r--mysql-test/suite/parts/r/partition_alter3_innodb.result14
-rw-r--r--mysql-test/suite/parts/r/partition_alter3_myisam.result10
-rw-r--r--mysql-test/suite/parts/r/partition_alter4_innodb.result298
-rw-r--r--mysql-test/suite/parts/r/partition_alter4_myisam.result362
-rw-r--r--mysql-test/suite/parts/r/partition_basic_innodb.result420
-rw-r--r--mysql-test/suite/parts/r/partition_basic_myisam.result332
-rw-r--r--mysql-test/suite/parts/r/partition_bit_myisam.result4
-rw-r--r--mysql-test/suite/parts/r/partition_char_innodb.result311
-rw-r--r--mysql-test/suite/parts/r/partition_char_myisam.result787
-rw-r--r--mysql-test/suite/parts/r/partition_datetime_myisam.result10
-rw-r--r--mysql-test/suite/parts/r/partition_decimal_myisam.result2
-rw-r--r--mysql-test/suite/parts/r/partition_engine_innodb.result66
-rw-r--r--mysql-test/suite/parts/r/partition_engine_myisam.result66
-rw-r--r--mysql-test/suite/parts/r/partition_float_innodb.result292
-rw-r--r--mysql-test/suite/parts/r/partition_float_myisam.result4
-rw-r--r--mysql-test/suite/parts/r/partition_int_myisam.result10
-rw-r--r--mysql-test/suite/parts/r/partition_special_myisam.result8
-rw-r--r--mysql-test/suite/parts/r/partition_syntax_innodb.result125
-rw-r--r--mysql-test/suite/parts/r/partition_syntax_myisam.result125
-rw-r--r--mysql-test/suite/parts/r/rpl_partition.result2
-rw-r--r--mysql-test/suite/parts/t/disabled.def2
-rw-r--r--mysql-test/suite/parts/t/part_blocked_sql_func_innodb.test6
-rw-r--r--mysql-test/suite/parts/t/part_blocked_sql_func_myisam.test4
-rw-r--r--mysql-test/suite/parts/t/part_supported_sql_func_innodb.test4
-rw-r--r--mysql-test/suite/parts/t/part_supported_sql_func_myisam.test4
-rw-r--r--mysql-test/suite/parts/t/part_supported_sql_func_ndb.test4
-rw-r--r--mysql-test/suite/parts/t/partition_alter1_innodb.test9
-rw-r--r--mysql-test/suite/parts/t/partition_alter1_myisam.test7
-rw-r--r--mysql-test/suite/parts/t/partition_alter1_ndb.test9
-rw-r--r--mysql-test/suite/parts/t/partition_alter2_innodb.test9
-rw-r--r--mysql-test/suite/parts/t/partition_alter2_myisam.test7
-rw-r--r--mysql-test/suite/parts/t/partition_alter2_ndb.test9
-rw-r--r--mysql-test/suite/parts/t/partition_alter3_innodb.test9
-rw-r--r--mysql-test/suite/parts/t/partition_alter3_myisam.test7
-rw-r--r--mysql-test/suite/parts/t/partition_alter4_innodb.test7
-rw-r--r--mysql-test/suite/parts/t/partition_alter4_myisam.test5
-rw-r--r--mysql-test/suite/parts/t/partition_basic_innodb.test9
-rw-r--r--mysql-test/suite/parts/t/partition_basic_myisam.test10
-rw-r--r--mysql-test/suite/parts/t/partition_basic_ndb.test11
-rw-r--r--mysql-test/suite/parts/t/partition_bit_innodb.test4
-rw-r--r--mysql-test/suite/parts/t/partition_bit_myisam.test3
-rw-r--r--mysql-test/suite/parts/t/partition_bit_ndb.test4
-rw-r--r--mysql-test/suite/parts/t/partition_char_innodb.test12
-rw-r--r--mysql-test/suite/parts/t/partition_char_myisam.test21
-rw-r--r--mysql-test/suite/parts/t/partition_datetime_innodb.test9
-rw-r--r--mysql-test/suite/parts/t/partition_datetime_myisam.test7
-rw-r--r--mysql-test/suite/parts/t/partition_decimal_innodb.test5
-rw-r--r--mysql-test/suite/parts/t/partition_decimal_myisam.test3
-rw-r--r--mysql-test/suite/parts/t/partition_engine_innodb.test9
-rw-r--r--mysql-test/suite/parts/t/partition_engine_myisam.test7
-rw-r--r--mysql-test/suite/parts/t/partition_engine_ndb.test7
-rw-r--r--mysql-test/suite/parts/t/partition_float_innodb.test12
-rw-r--r--mysql-test/suite/parts/t/partition_float_myisam.test4
-rw-r--r--mysql-test/suite/parts/t/partition_int_innodb.test9
-rw-r--r--mysql-test/suite/parts/t/partition_int_myisam.test7
-rw-r--r--mysql-test/suite/parts/t/partition_int_ndb.test7
-rw-r--r--mysql-test/suite/parts/t/partition_special_innodb.test8
-rw-r--r--mysql-test/suite/parts/t/partition_special_myisam.test6
-rw-r--r--mysql-test/suite/parts/t/partition_syntax_innodb.test9
-rw-r--r--mysql-test/suite/parts/t/partition_syntax_myisam.test7
-rw-r--r--mysql-test/suite/parts/t/partition_syntax_ndb.test9
-rw-r--r--mysql-test/suite/parts/t/partition_value_innodb.test9
-rw-r--r--mysql-test/suite/parts/t/partition_value_myisam.test7
-rw-r--r--mysql-test/suite/parts/t/partition_value_ndb.test9
-rw-r--r--mysql-test/suite/rpl/data/rpl_bug28618.dat3
-rw-r--r--mysql-test/suite/rpl/include/rpl_mixed_check_select.inc8
-rw-r--r--mysql-test/suite/rpl/include/rpl_mixed_check_view.inc4
-rw-r--r--mysql-test/suite/rpl/include/rpl_mixed_dml.inc8
-rw-r--r--mysql-test/suite/rpl/r/rpl_binlog_grant.result6
-rw-r--r--mysql-test/suite/rpl/r/rpl_extraCol_innodb.result95
-rw-r--r--mysql-test/suite/rpl/r/rpl_extraCol_myisam.result95
-rw-r--r--mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.resultbin38226 -> 98074 bytes
-rw-r--r--mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.resultbin38226 -> 98074 bytes
-rw-r--r--mysql-test/suite/rpl/r/rpl_flushlog_loop.result7
-rw-r--r--mysql-test/suite/rpl/r/rpl_found_rows.result233
-rw-r--r--mysql-test/suite/rpl/r/rpl_idempotency.result71
-rw-r--r--mysql-test/suite/rpl/r/rpl_incident.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_innodb_bug28430.result18
-rw-r--r--mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result152
-rw-r--r--mysql-test/suite/rpl/r/rpl_invoked_features.result30
-rw-r--r--mysql-test/suite/rpl/r/rpl_loaddata_fatal.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_packet.result42
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result31
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result19
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result19
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_charset.result8
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_charset_innodb.result215
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_colSize.result52
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_extraColmaster_ndb.resultbin19129 -> 0 bytes
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result12
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result12
-rw-r--r--mysql-test/suite/rpl/r/rpl_skip_error.result3
-rw-r--r--mysql-test/suite/rpl/r/rpl_slave_skip.result208
-rw-r--r--mysql-test/suite/rpl/r/rpl_sp_effects.result41
-rw-r--r--mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result68
-rw-r--r--mysql-test/suite/rpl/r/rpl_temporary_errors.result81
-rw-r--r--mysql-test/suite/rpl/r/rpl_truncate_2myisam.result42
-rw-r--r--mysql-test/suite/rpl/r/rpl_truncate_3innodb.result42
-rw-r--r--mysql-test/suite/rpl/r/rpl_udf.result8
-rw-r--r--mysql-test/suite/rpl/t/disabled.def7
-rw-r--r--mysql-test/suite/rpl/t/rpl_binlog_grant.test1
-rw-r--r--mysql-test/suite/rpl/t/rpl_bug31076.test1
-rw-r--r--mysql-test/suite/rpl/t/rpl_dual_pos_advance.test6
-rw-r--r--mysql-test/suite/rpl/t/rpl_extraColmaster_innodb.test3
-rw-r--r--mysql-test/suite/rpl/t/rpl_extraColmaster_myisam.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_flushlog_loop.test9
-rw-r--r--mysql-test/suite/rpl/t/rpl_found_rows.test256
-rw-r--r--mysql-test/suite/rpl/t/rpl_idempotency.test79
-rw-r--r--mysql-test/suite/rpl/t/rpl_innodb_bug28430.test4
-rw-r--r--mysql-test/suite/rpl/t/rpl_innodb_bug30919.test1
-rw-r--r--mysql-test/suite/rpl/t/rpl_invoked_features.test80
-rw-r--r--mysql-test/suite/rpl/t/rpl_packet.test17
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test35
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_charset_innodb-master.opt1
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_charset_innodb-slave.opt1
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_charset_innodb.test10
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_extraColmaster_ndb.test12
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test1
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_until.test4
-rw-r--r--mysql-test/suite/rpl/t/rpl_skip_error-slave.opt2
-rw-r--r--mysql-test/suite/rpl/t/rpl_skip_error.test8
-rw-r--r--mysql-test/suite/rpl/t/rpl_slave_skip-slave.opt1
-rw-r--r--mysql-test/suite/rpl/t/rpl_slave_skip.test239
-rw-r--r--mysql-test/suite/rpl/t/rpl_sp_effects.test50
-rw-r--r--mysql-test/suite/rpl/t/rpl_ssl.test17
-rw-r--r--mysql-test/suite/rpl/t/rpl_stm_extraColmaster_ndb.test13
-rw-r--r--mysql-test/suite/rpl/t/rpl_stm_mystery22.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_stm_until.test4
-rw-r--r--mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test36
-rw-r--r--mysql-test/suite/rpl/t/rpl_temporary.test3
-rw-r--r--mysql-test/suite/rpl/t/rpl_temporary_errors-slave.opt3
-rw-r--r--mysql-test/suite/rpl/t/rpl_temporary_errors.test27
-rw-r--r--mysql-test/suite/rpl/t/rpl_trigger.test5
-rw-r--r--mysql-test/suite/rpl_ndb/r/rpl_ndb_charset.result34
-rw-r--r--mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result94
-rw-r--r--mysql-test/suite/rpl_ndb/r/rpl_ndb_extraColMaster.result2286
-rw-r--r--mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result19
-rw-r--r--mysql-test/suite/rpl_ndb/t/disabled.def13
-rw-r--r--mysql-test/suite/rpl_ndb/t/rpl_ndb_charset.test4
-rw-r--r--mysql-test/suite/rpl_ndb/t/rpl_ndb_extraColMaster.test14
-rw-r--r--mysql-test/t/almost_full.test41
-rw-r--r--mysql-test/t/analyze.test14
-rw-r--r--mysql-test/t/archive.test47
-rw-r--r--mysql-test/t/bigint.test9
-rw-r--r--mysql-test/t/case.test23
-rw-r--r--mysql-test/t/cast.test22
-rw-r--r--mysql-test/t/change_user.test35
-rw-r--r--mysql-test/t/create.test59
-rw-r--r--mysql-test/t/csv.test94
-rw-r--r--mysql-test/t/ctype_euckr.test23
-rw-r--r--mysql-test/t/ctype_uca.test4
-rw-r--r--mysql-test/t/ctype_ucs.test28
-rw-r--r--mysql-test/t/ctype_utf8.test34
-rw-r--r--mysql-test/t/delayed.test62
-rw-r--r--mysql-test/t/delete.test15
-rw-r--r--mysql-test/t/derived.test3
-rw-r--r--mysql-test/t/disabled.def8
-rw-r--r--mysql-test/t/drop.test13
-rw-r--r--mysql-test/t/events.test3
-rw-r--r--mysql-test/t/events_bugs-master.opt1
-rw-r--r--mysql-test/t/events_bugs.test239
-rw-r--r--mysql-test/t/events_scheduling.test2
-rw-r--r--mysql-test/t/explain.test28
-rw-r--r--mysql-test/t/federated.test31
-rw-r--r--mysql-test/t/federated_server.test14
-rw-r--r--mysql-test/t/flush.test31
-rw-r--r--mysql-test/t/fulltext.test8
-rw-r--r--mysql-test/t/func_gconcat.test37
-rw-r--r--mysql-test/t/func_group.test41
-rw-r--r--mysql-test/t/func_in.test8
-rw-r--r--mysql-test/t/func_math.test25
-rw-r--r--mysql-test/t/func_misc.test50
-rw-r--r--mysql-test/t/func_regexp.test34
-rw-r--r--mysql-test/t/func_sapdb.test1
-rw-r--r--mysql-test/t/func_set.test19
-rw-r--r--mysql-test/t/func_str.test25
-rw-r--r--mysql-test/t/func_time.test20
-rw-r--r--mysql-test/t/gis-rtree.test36
-rw-r--r--mysql-test/t/gis.test61
-rw-r--r--mysql-test/t/grant.test103
-rw-r--r--mysql-test/t/grant2.test32
-rw-r--r--mysql-test/t/grant3.test100
-rw-r--r--mysql-test/t/group_by.test36
-rw-r--r--mysql-test/t/group_min_max.test25
-rw-r--r--mysql-test/t/heap_btree.test18
-rw-r--r--mysql-test/t/information_schema.test74
-rw-r--r--mysql-test/t/innodb-semi-consistent-master.opt1
-rw-r--r--mysql-test/t/innodb-semi-consistent.test50
-rw-r--r--mysql-test/t/innodb-ucs2.test4
-rw-r--r--mysql-test/t/innodb.test126
-rw-r--r--mysql-test/t/innodb_autoinc_lock_mode_zero-master.opt1
-rw-r--r--mysql-test/t/innodb_autoinc_lock_mode_zero.test44
-rw-r--r--mysql-test/t/innodb_gis.test1
-rw-r--r--mysql-test/t/insert.test101
-rw-r--r--mysql-test/t/insert_select.test12
-rw-r--r--mysql-test/t/join.test29
-rw-r--r--mysql-test/t/key.test60
-rw-r--r--mysql-test/t/kill.test18
-rw-r--r--mysql-test/t/log_state.test54
-rw-r--r--mysql-test/t/log_tables.test223
-rw-r--r--mysql-test/t/lowercase_view.test23
-rw-r--r--mysql-test/t/merge-big.test150
-rw-r--r--mysql-test/t/merge.test882
-rw-r--r--mysql-test/t/merge_innodb.test41
-rw-r--r--mysql-test/t/multi_update.test38
-rw-r--r--mysql-test/t/myisam.test76
-rw-r--r--mysql-test/t/myisampack.test33
-rw-r--r--mysql-test/t/mysql.test27
-rw-r--r--mysql-test/t/mysql_client_test.test4
-rw-r--r--mysql-test/t/mysql_comments.sql218
-rw-r--r--mysql-test/t/mysql_comments.test37
-rw-r--r--mysql-test/t/mysqlbinlog.test32
-rw-r--r--mysql-test/t/mysqlcheck.test24
-rw-r--r--mysql-test/t/mysqldump.test29
-rw-r--r--mysql-test/t/mysqlslap.test13
-rw-r--r--mysql-test/t/mysqltest.test21
-rw-r--r--mysql-test/t/named_pipe-master.opt1
-rw-r--r--mysql-test/t/named_pipe.test14
-rw-r--r--mysql-test/t/no-threads.test1
-rw-r--r--mysql-test/t/null.test27
-rw-r--r--mysql-test/t/olap.test18
-rw-r--r--mysql-test/t/order_by.test57
-rw-r--r--mysql-test/t/order_fill_sortbuf-master.opt2
-rw-r--r--mysql-test/t/outfile_loaddata.test113
-rw-r--r--mysql-test/t/parser.test28
-rw-r--r--mysql-test/t/partition.test318
-rw-r--r--mysql-test/t/partition_02myisam.test25
-rw-r--r--mysql-test/t/partition_archive.test107
-rw-r--r--mysql-test/t/partition_blackhole.test24
-rw-r--r--mysql-test/t/partition_csv.test38
-rw-r--r--mysql-test/t/partition_datatype.test213
-rw-r--r--mysql-test/t/partition_error.test13
-rw-r--r--mysql-test/t/partition_hash.test26
-rw-r--r--mysql-test/t/partition_innodb.test35
-rw-r--r--mysql-test/t/partition_mgm.test19
-rw-r--r--mysql-test/t/partition_range.test28
-rw-r--r--mysql-test/t/partition_symlink.test121
-rw-r--r--mysql-test/t/plugin.test15
-rw-r--r--mysql-test/t/ps.test44
-rw-r--r--mysql-test/t/query_cache.test125
-rw-r--r--mysql-test/t/query_cache_notembedded.test36
-rw-r--r--mysql-test/t/range.test20
-rw-r--r--mysql-test/t/renamedb.test71
-rw-r--r--mysql-test/t/repair.test31
-rw-r--r--mysql-test/t/select.test216
-rw-r--r--mysql-test/t/shm-master.opt (renamed from mysql-test/t/windows_shm-master.opt)2
-rw-r--r--mysql-test/t/shm.test19
-rw-r--r--mysql-test/t/skip_grants.test20
-rw-r--r--mysql-test/t/sp-error.test167
-rw-r--r--mysql-test/t/sp.test475
-rw-r--r--mysql-test/t/sp_notembedded.test23
-rw-r--r--mysql-test/t/status.test3
-rw-r--r--mysql-test/t/subselect.test164
-rw-r--r--mysql-test/t/subselect_notembedded.test96
-rw-r--r--mysql-test/t/symlink.test12
-rw-r--r--mysql-test/t/trigger.test59
-rw-r--r--mysql-test/t/trigger_notembedded.test (renamed from mysql-test/t/trigger-grant.test)34
-rw-r--r--mysql-test/t/type_bit.test15
-rw-r--r--mysql-test/t/type_blob.test11
-rw-r--r--mysql-test/t/type_date.test85
-rw-r--r--mysql-test/t/type_datetime.test112
-rw-r--r--mysql-test/t/type_decimal.test73
-rw-r--r--mysql-test/t/type_float.test21
-rw-r--r--mysql-test/t/type_newdecimal.test21
-rw-r--r--mysql-test/t/udf.test54
-rw-r--r--mysql-test/t/upgrade.test35
-rw-r--r--mysql-test/t/user_var.test27
-rw-r--r--mysql-test/t/variables.test10
-rw-r--r--mysql-test/t/view.test108
-rw-r--r--mysql-test/t/view_grant.test50
-rw-r--r--mysql-test/t/windows.test3
-rw-r--r--mysql-test/t/windows_shm.test9
-rw-r--r--mysql-test/t/xml.test19
-rwxr-xr-xmysys/CMakeLists.txt2
-rw-r--r--mysys/Makefile.am2
-rw-r--r--mysys/default.c176
-rw-r--r--mysys/mf_arr_appstr.c61
-rw-r--r--mysys/mf_keycache.c2
-rw-r--r--mysys/mf_qsort.c4
-rw-r--r--mysys/mf_sort.c4
-rw-r--r--mysys/my_delete.c10
-rw-r--r--mysys/my_getopt.c192
-rw-r--r--mysys/my_init.c2
-rw-r--r--mysys/my_lib.c4
-rw-r--r--mysys/my_symlink2.c11
-rw-r--r--mysys/my_winthread.c23
-rw-r--r--mysys/my_write.c4
-rw-r--r--mysys/queues.c38
-rw-r--r--mysys/thr_lock.c33
-rw-r--r--mysys/thr_mutex.c49
-rw-r--r--netware/Makefile.am3
-rw-r--r--netware/mysql_test_run.c5
-rw-r--r--netware/mysqld_safe.c2
-rw-r--r--scripts/Makefile.am15
-rwxr-xr-xscripts/make_win_bin_dist1
-rw-r--r--scripts/mysql_config.sh7
-rw-r--r--scripts/mysql_fix_privilege_tables.sh1
-rw-r--r--scripts/mysql_install_db.sh369
-rw-r--r--scripts/mysql_system_tables.sql6
-rw-r--r--scripts/mysql_system_tables_data.sql11
-rw-r--r--scripts/mysql_system_tables_fix.sql1
-rw-r--r--scripts/mysqlbug.sh6
-rw-r--r--scripts/mysqld_safe.sh2
-rw-r--r--server-tools/instance-manager/mysqlmanager.cc3
-rw-r--r--server-tools/instance-manager/priv.h2
-rw-r--r--sql-common/client.c259
-rw-r--r--sql-common/my_time.c43
-rwxr-xr-xsql/CMakeLists.txt2
-rw-r--r--sql/event_data_objects.cc18
-rw-r--r--sql/event_db_repository.cc9
-rw-r--r--sql/event_scheduler.cc8
-rw-r--r--sql/events.cc23
-rw-r--r--sql/field.cc571
-rw-r--r--sql/field.h273
-rw-r--r--sql/filesort.cc7
-rw-r--r--sql/gstream.cc2
-rw-r--r--sql/ha_ndbcluster.cc375
-rw-r--r--sql/ha_ndbcluster.h17
-rw-r--r--sql/ha_ndbcluster_binlog.cc7
-rw-r--r--sql/ha_ndbcluster_cond.cc20
-rw-r--r--sql/ha_partition.cc113
-rw-r--r--sql/handler.cc135
-rw-r--r--sql/handler.h11
-rw-r--r--sql/item.cc125
-rw-r--r--sql/item.h62
-rw-r--r--sql/item_cmpfunc.cc390
-rw-r--r--sql/item_cmpfunc.h17
-rw-r--r--sql/item_create.cc19
-rw-r--r--sql/item_func.cc59
-rw-r--r--sql/item_func.h94
-rw-r--r--sql/item_geofunc.cc20
-rw-r--r--sql/item_geofunc.h7
-rw-r--r--sql/item_strfunc.cc95
-rw-r--r--sql/item_strfunc.h13
-rw-r--r--sql/item_subselect.cc19
-rw-r--r--sql/item_subselect.h1
-rw-r--r--sql/item_sum.cc42
-rw-r--r--sql/item_timefunc.cc60
-rw-r--r--sql/item_timefunc.h12
-rw-r--r--sql/item_xmlfunc.cc63
-rw-r--r--sql/item_xmlfunc.h12
-rw-r--r--sql/key.cc13
-rw-r--r--sql/lock.cc20
-rw-r--r--sql/log.cc217
-rw-r--r--sql/log.h12
-rw-r--r--sql/log_event.cc440
-rw-r--r--sql/log_event.h1060
-rw-r--r--sql/log_event_old.cc12
-rw-r--r--sql/my_decimal.cc43
-rw-r--r--sql/mysql_priv.h94
-rw-r--r--sql/mysqld.cc156
-rw-r--r--sql/net_serv.cc2
-rw-r--r--sql/opt_range.cc61
-rw-r--r--sql/opt_range.h9
-rw-r--r--sql/opt_sum.cc7
-rw-r--r--sql/partition_info.cc11
-rw-r--r--sql/protocol.cc141
-rw-r--r--sql/protocol.h1
-rw-r--r--sql/records.cc5
-rw-r--r--sql/rpl_record.cc53
-rw-r--r--sql/rpl_rli.cc10
-rw-r--r--sql/rpl_rli.h12
-rw-r--r--sql/rpl_utility.cc36
-rw-r--r--sql/rpl_utility.h14
-rw-r--r--sql/scheduler.h2
-rw-r--r--sql/set_var.cc154
-rw-r--r--sql/set_var.h15
-rw-r--r--sql/share/errmsg.txt11
-rw-r--r--sql/slave.cc82
-rw-r--r--sql/sp.cc146
-rw-r--r--sql/sp.h1
-rw-r--r--sql/sp_head.cc95
-rw-r--r--sql/sp_head.h17
-rw-r--r--sql/sp_rcontext.cc6
-rw-r--r--sql/sp_rcontext.h2
-rw-r--r--sql/sql_acl.cc474
-rw-r--r--sql/sql_acl.h5
-rw-r--r--sql/sql_array.h2
-rw-r--r--sql/sql_base.cc1318
-rw-r--r--sql/sql_binlog.cc3
-rw-r--r--sql/sql_cache.cc2
-rw-r--r--sql/sql_class.cc143
-rw-r--r--sql/sql_class.h103
-rw-r--r--sql/sql_connect.cc248
-rw-r--r--sql/sql_db.cc130
-rw-r--r--sql/sql_delete.cc76
-rw-r--r--sql/sql_error.cc2
-rw-r--r--sql/sql_handler.cc323
-rw-r--r--sql/sql_help.cc2
-rw-r--r--sql/sql_insert.cc204
-rw-r--r--sql/sql_lex.cc4
-rw-r--r--sql/sql_lex.h20
-rw-r--r--sql/sql_load.cc29
-rw-r--r--sql/sql_parse.cc402
-rw-r--r--sql/sql_partition.cc63
-rw-r--r--sql/sql_partition.h1
-rw-r--r--sql/sql_plugin.cc72
-rw-r--r--sql/sql_prepare.cc30
-rw-r--r--sql/sql_rename.cc2
-rw-r--r--sql/sql_repl.cc13
-rw-r--r--sql/sql_select.cc338
-rw-r--r--sql/sql_select.h19
-rw-r--r--sql/sql_servers.cc5
-rw-r--r--sql/sql_show.cc93
-rw-r--r--sql/sql_string.cc5
-rw-r--r--sql/sql_table.cc335
-rw-r--r--sql/sql_trigger.cc59
-rw-r--r--sql/sql_udf.cc17
-rw-r--r--sql/sql_union.cc2
-rw-r--r--sql/sql_update.cc111
-rw-r--r--sql/sql_view.cc19
-rw-r--r--sql/sql_yacc.yy717
-rw-r--r--sql/structs.h2
-rw-r--r--sql/table.cc48
-rw-r--r--sql/table.h56
-rw-r--r--sql/tztime.cc1
-rw-r--r--sql/udf_example.c14
-rw-r--r--sql/unireg.cc50
-rw-r--r--storage/archive/azio.c12
-rw-r--r--storage/archive/ha_archive.cc41
-rw-r--r--storage/csv/ha_tina.cc37
-rw-r--r--storage/example/ha_example.cc30
-rw-r--r--storage/federated/ha_federated.cc25
-rw-r--r--storage/federated/ha_federated.h1
-rw-r--r--storage/heap/hp_delete.c3
-rw-r--r--storage/heap/hp_rfirst.c11
-rw-r--r--storage/heap/hp_rnext.c29
-rw-r--r--storage/innobase/buf/buf0lru.c2
-rw-r--r--storage/innobase/dict/dict0dict.c14
-rw-r--r--storage/innobase/dict/dict0load.c80
-rw-r--r--storage/innobase/handler/ha_innodb.cc242
-rw-r--r--storage/innobase/handler/ha_innodb.h14
-rw-r--r--storage/innobase/ibuf/ibuf0ibuf.c4
-rw-r--r--storage/innobase/include/db0err.h6
-rw-r--r--storage/innobase/include/ha_prototypes.h16
-rw-r--r--storage/innobase/include/mach0data.h11
-rw-r--r--storage/innobase/include/mach0data.ic37
-rw-r--r--storage/innobase/include/mem0dbg.h16
-rw-r--r--storage/innobase/include/mem0mem.ic16
-rw-r--r--storage/innobase/include/page0cur.h1
-rw-r--r--storage/innobase/include/rem0rec.ic1
-rw-r--r--storage/innobase/include/row0mysql.h13
-rw-r--r--storage/innobase/include/sync0rw.h2
-rw-r--r--storage/innobase/include/univ.i28
-rw-r--r--storage/innobase/include/ut0ut.h18
-rw-r--r--storage/innobase/mem/mem0dbg.c40
-rw-r--r--storage/innobase/mem/mem0mem.c6
-rw-r--r--storage/innobase/row/row0mysql.c82
-rw-r--r--storage/innobase/row/row0sel.c76
-rw-r--r--storage/innobase/sync/sync0rw.c6
-rw-r--r--storage/innobase/sync/sync0sync.c2
-rw-r--r--storage/innobase/ut/ut0ut.c71
-rw-r--r--storage/myisam/ft_boolean_search.c4
-rw-r--r--storage/myisam/ft_nlq_search.c3
-rw-r--r--storage/myisam/ha_myisam.cc12
-rw-r--r--storage/myisam/ha_myisam.h4
-rw-r--r--storage/myisam/mi_check.c265
-rw-r--r--storage/myisam/mi_dynrec.c68
-rw-r--r--storage/myisam/mi_open.c9
-rw-r--r--storage/myisam/mi_packrec.c3
-rw-r--r--storage/myisam/myisamchk.c7
-rw-r--r--storage/myisam/myisampack.c2
-rw-r--r--storage/myisam/rt_index.c18
-rw-r--r--storage/myisam/rt_mbr.c5
-rw-r--r--storage/myisam/sort.c18
-rw-r--r--storage/myisammrg/ha_myisammrg.cc701
-rw-r--r--storage/myisammrg/ha_myisammrg.h9
-rw-r--r--storage/myisammrg/myrg_close.c35
-rw-r--r--storage/myisammrg/myrg_extra.c4
-rw-r--r--storage/myisammrg/myrg_open.c349
-rw-r--r--storage/ndb/include/kernel/AttributeHeader.hpp10
-rw-r--r--storage/ndb/include/kernel/GlobalSignalNumbers.h8
-rw-r--r--storage/ndb/include/kernel/signaldata/AccScan.hpp1
-rw-r--r--storage/ndb/include/kernel/signaldata/CopyFrag.hpp41
-rw-r--r--storage/ndb/include/kernel/signaldata/ScanTab.hpp1
-rw-r--r--storage/ndb/include/kernel/signaldata/TcKeyConf.hpp2
-rw-r--r--storage/ndb/include/ndb_version.h.in47
-rw-r--r--storage/ndb/include/ndbapi/Ndb.hpp3
-rw-r--r--storage/ndb/include/ndbapi/NdbOperation.hpp5
-rw-r--r--storage/ndb/include/ndbapi/NdbPool.hpp3
-rw-r--r--storage/ndb/include/ndbapi/NdbScanFilter.hpp29
-rw-r--r--storage/ndb/include/ndbapi/NdbTransaction.hpp9
-rw-r--r--storage/ndb/include/ndbapi/ndbapi_limits.h2
-rw-r--r--storage/ndb/include/util/ndb_rand.h33
-rw-r--r--storage/ndb/src/common/debugger/EventLogger.cpp12
-rw-r--r--storage/ndb/src/common/debugger/signaldata/SignalNames.cpp4
-rw-r--r--storage/ndb/src/common/debugger/signaldata/TcKeyConf.cpp4
-rw-r--r--storage/ndb/src/common/util/Makefile.am3
-rw-r--r--storage/ndb/src/common/util/ndb_rand.c40
-rw-r--r--storage/ndb/src/cw/cpcd/APIService.cpp2
-rw-r--r--storage/ndb/src/kernel/blocks/ERROR_codes.txt15
-rw-r--r--storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp32
-rw-r--r--storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp8
-rw-r--r--storage/ndb/src/kernel/blocks/dbdih/DbdihInit.cpp5
-rw-r--r--storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp150
-rw-r--r--storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp2
-rw-r--r--storage/ndb/src/kernel/blocks/dblqh/DblqhInit.cpp3
-rw-r--r--storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp180
-rw-r--r--storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp12
-rw-r--r--storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp203
-rw-r--r--storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp14
-rw-r--r--storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp264
-rw-r--r--storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp6
-rw-r--r--storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp66
-rw-r--r--storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp10
-rw-r--r--storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp70
-rw-r--r--storage/ndb/src/kernel/blocks/dbutil/DbUtil.cpp5
-rw-r--r--storage/ndb/src/kernel/blocks/lgman.cpp12
-rw-r--r--storage/ndb/src/kernel/blocks/pgman.cpp62
-rw-r--r--storage/ndb/src/kernel/blocks/suma/Suma.cpp6
-rw-r--r--storage/ndb/src/kernel/blocks/tsman.cpp62
-rw-r--r--storage/ndb/src/kernel/blocks/tsman.hpp24
-rw-r--r--storage/ndb/src/mgmclient/CommandInterpreter.cpp12
-rw-r--r--storage/ndb/src/mgmsrv/MgmtSrvr.cpp6
-rw-r--r--storage/ndb/src/mgmsrv/Services.cpp2
-rw-r--r--storage/ndb/src/ndbapi/ClusterMgr.cpp5
-rw-r--r--storage/ndb/src/ndbapi/NdbBlob.cpp2
-rw-r--r--storage/ndb/src/ndbapi/NdbIndexOperation.cpp3
-rw-r--r--storage/ndb/src/ndbapi/NdbOperation.cpp6
-rw-r--r--storage/ndb/src/ndbapi/NdbOperationDefine.cpp76
-rw-r--r--storage/ndb/src/ndbapi/NdbOperationExec.cpp17
-rw-r--r--storage/ndb/src/ndbapi/NdbReceiver.cpp2
-rw-r--r--storage/ndb/src/ndbapi/NdbScanFilter.cpp244
-rw-r--r--storage/ndb/src/ndbapi/NdbScanOperation.cpp5
-rw-r--r--storage/ndb/src/ndbapi/NdbTransaction.cpp6
-rw-r--r--storage/ndb/src/ndbapi/ndberror.c1
-rw-r--r--storage/ndb/test/include/HugoTransactions.hpp18
-rw-r--r--storage/ndb/test/include/UtilTransactions.hpp5
-rwxr-xr-xstorage/ndb/test/include/dbutil.hpp97
-rw-r--r--storage/ndb/test/ndbapi/testBasic.cpp35
-rw-r--r--storage/ndb/test/ndbapi/testDict.cpp259
-rw-r--r--storage/ndb/test/ndbapi/testIndex.cpp4
-rw-r--r--storage/ndb/test/ndbapi/testNodeRestart.cpp77
-rw-r--r--storage/ndb/test/ndbapi/testScan.cpp2
-rw-r--r--storage/ndb/test/ndbapi/testSystemRestart.cpp329
-rw-r--r--storage/ndb/test/ndbapi/test_event.cpp90
-rw-r--r--storage/ndb/test/run-test/daily-basic-tests.txt96
-rw-r--r--storage/ndb/test/src/HugoOperations.cpp1
-rw-r--r--storage/ndb/test/src/HugoTransactions.cpp229
-rw-r--r--storage/ndb/test/src/Makefile.am2
-rw-r--r--storage/ndb/test/src/NDBT_Thread.cpp2
-rw-r--r--storage/ndb/test/src/NdbRestarts.cpp1
-rw-r--r--storage/ndb/test/src/UtilTransactions.cpp74
-rwxr-xr-xstorage/ndb/test/src/dbutil.cpp176
-rw-r--r--strings/ctype-big5.c4
-rw-r--r--strings/ctype-cp932.c4
-rw-r--r--strings/ctype-euc_kr.c32
-rw-r--r--strings/ctype-gb2312.c4
-rw-r--r--strings/ctype-simple.c38
-rw-r--r--strings/ctype-sjis.c4
-rw-r--r--strings/ctype-ucs2.c24
-rw-r--r--strings/decimal.c3
-rw-r--r--strings/int2str.c16
-rw-r--r--strings/longlong2str.c32
-rw-r--r--support-files/MacOSX/ReadMe.txt8
-rw-r--r--support-files/compiler_warnings.supp6
-rw-r--r--support-files/mysql.server.sh2
-rw-r--r--tests/bug25714.c6
-rw-r--r--tests/mysql_client_test.c827
-rw-r--r--tests/ssl_test.c2
-rw-r--r--tests/thread_test.c8
-rw-r--r--win/configure.js37
1059 files changed, 53274 insertions, 30046 deletions
diff --git a/.bzrignore b/.bzrignore
index acbf0040063..fcafdf8915a 100644
--- a/.bzrignore
+++ b/.bzrignore
@@ -901,7 +901,9 @@ libmysql_r/.libs/libmysqlclient_r.lai
libmysql_r/.libs/libmysqlclient_r.so.15
libmysql_r/.libs/libmysqlclient_r.so.15.0.0
libmysql_r/acconfig.h
+libmysql_r/client_settings.h
libmysql_r/conf_to_src
+libmysql_r/link_sources
libmysql_r/my_static.h
libmysql_r/mysys_priv.h
libmysql_r/vio_priv.h
@@ -1138,6 +1140,7 @@ libmysqld/rpl_filter.cc
libmysqld/rpl_injector.cc
libmysqld/rpl_record.cc
libmysqld/rpl_record_old.cc
+libmysqld/scheduler.cc
libmysqld/set_var.cc
libmysqld/simple-test
libmysqld/slave.cc
@@ -1154,6 +1157,7 @@ libmysqld/sql_builtin.cc
libmysqld/sql_cache.cc
libmysqld/sql_class.cc
libmysqld/sql_command
+libmysqld/sql_connect.cc
libmysqld/sql_crypt.cc
libmysqld/sql_cursor.cc
libmysqld/sql_cursor.h
@@ -1184,6 +1188,7 @@ libmysqld/sql_show.cc
libmysqld/sql_state.c
libmysqld/sql_string.cc
libmysqld/sql_table.cc
+libmysqld/sql_tablespace.cc
libmysqld/sql_test.cc
libmysqld/sql_trigger.cc
libmysqld/sql_udf.cc
@@ -1843,6 +1848,7 @@ scripts/make_binary_distribution
scripts/make_sharedlib_distribution
scripts/make_win_binary_distribution
scripts/make_win_src_distribution
+scripts/make_win_src_distribution_old
scripts/msql2mysql
scripts/mysql_config
scripts/mysql_convert_table_format
@@ -2084,6 +2090,7 @@ sql/gen_lex_hash
sql/gmon.out
sql/handlerton.cc
sql/lex_hash.h
+sql/link_sources
sql/max/*
sql/message.h
sql/message.mc
@@ -2462,6 +2469,8 @@ storage/maria/unittest/mf_pagecache_consist_64kHC-t-big
storage/maria/unittest/mf_pagecache_consist_64kRD-t-big
storage/maria/unittest/mf_pagecache_consist_64kWR-t-big
storage/maria/unittest/mf_pagecache_single_64k-t-big
+storage/maria/unittest/page_cache_test_file_1
+storage/maria/unittest/pagecache_debug.log
storage/myisam/.deps/ft_boolean_search.Po
storage/myisam/.deps/ft_nlq_search.Po
storage/myisam/.deps/ft_parser.Po
@@ -3054,14 +3063,6 @@ vio/viotest.cpp
win/configure.data
win/vs71cache.txt
win/vs8cache.txt
+ylwrap
zlib/*.ds?
zlib/*.vcproj
-libmysql_r/client_settings.h
-libmysqld/scheduler.cc
-libmysqld/sql_connect.cc
-libmysqld/sql_tablespace.cc
-sql/link_sources
-ylwrap
-libmysql_r/link_sources
-storage/maria/unittest/page_cache_test_file_1
-storage/maria/unittest/pagecache_debug.log
diff --git a/BUILD/autorun.sh b/BUILD/autorun.sh
index def229e21a0..35a2e56cbdf 100755
--- a/BUILD/autorun.sh
+++ b/BUILD/autorun.sh
@@ -3,20 +3,29 @@
die() { echo "$@"; exit 1; }
-# Added glibtoolize reference to make native OSX autotools work
-if [ -f /usr/bin/glibtoolize ]
+# Handle "glibtoolize" (e.g., for native OS X autotools) as another
+# name for "libtoolize". Use the first one, either name, found in PATH.
+LIBTOOLIZE=libtoolize # Default
+IFS="${IFS= }"; save_ifs="$IFS"; IFS=':'
+for dir in $PATH
+do
+ if test -x $dir/glibtoolize
then
LIBTOOLIZE=glibtoolize
- else
- LIBTOOLIZE=libtoolize
-fi
+ break
+ elif test -x $dir/libtoolize
+ then
+ break
+ fi
+done
+IFS="$save_ifs"
aclocal || die "Can't execute aclocal"
autoheader || die "Can't execute autoheader"
# --force means overwrite ltmain.sh script if it already exists
-$LIBTOOLIZE --automake --force || die "Can't execute libtoolize"
+$LIBTOOLIZE --automake --force --copy || die "Can't execute libtoolize"
# --add-missing instructs automake to install missing auxiliary files
# and --force to overwrite them if they already exist
-automake --add-missing --force || die "Can't execute automake"
+automake --add-missing --force --copy || die "Can't execute automake"
autoconf || die "Can't execute autoconf"
diff --git a/BUILD/compile-dist b/BUILD/compile-dist
index 33c29c75e10..d0a49bbd78d 100755
--- a/BUILD/compile-dist
+++ b/BUILD/compile-dist
@@ -7,14 +7,9 @@
# package" that is used as the basis for all other binary builds.
#
test -f Makefile && make maintainer-clean
-(cd storage/innobase && aclocal && autoheader && \
- libtoolize --automake --force --copy && \
- automake --force --add-missing --copy && autoconf)
-aclocal
-autoheader
-libtoolize --automake --force --copy
-automake --force --add-missing --copy
-autoconf
+
+path=`dirname $0`
+. $path/autorun.sh
# Default to gcc for CC and CXX
if test -z "$CXX" ; then
diff --git a/BitKeeper/triggers/pre-commit.check-case.pl b/BitKeeper/triggers/pre-commit.check-case.pl
new file mode 100755
index 00000000000..4f68f8619e5
--- /dev/null
+++ b/BitKeeper/triggers/pre-commit.check-case.pl
@@ -0,0 +1,26 @@
+#!/usr/bin/perl
+my $status = 0;
+
+my $pending = $ENV{'BK_PENDING'};
+exit 0 unless -f $pending;
+
+open FI, "<", $pending || exit 0;
+while(<FI>) {
+ my ($file, $stuff) = split /\|/, $_, 2;
+ next unless -f $file;
+ $file =~ s/^(.*)\/([^\/]*)$/$2/;
+ my $path = $1;
+ opendir DIR, $path;
+ my @files = sort map { lc } readdir DIR;
+ closedir DIR;
+ my %count = ();
+ $count{$_}++ for @files;
+ @files = grep { $count{$_} > 1 } keys %count;
+ if(@files > 0) {
+ print "$path/$file: duplicate file names: " . (join " ", @files) . "\n";
+ $status = 1;
+ }
+}
+close FI;
+
+exit $status;
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b702810f2c3..341f8d08df2 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,6 +13,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+CMAKE_MINIMUM_REQUIRED(VERSION 2.4.7 FATAL_ERROR)
+
PROJECT(MySql)
# This reads user configuration, generated by configure.js.
@@ -135,6 +137,15 @@ IF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR
STRING(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS_INIT ${CMAKE_CXX_FLAGS_INIT})
STRING(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS_DEBUG_INIT ${CMAKE_CXX_FLAGS_DEBUG_INIT})
+ # Disable automatic manifest generation.
+ STRING(REPLACE "/MANIFEST" "/MANIFEST:NO" CMAKE_EXE_LINKER_FLAGS
+ ${CMAKE_EXE_LINKER_FLAGS})
+ # Explicitly disable it since it is the default for newer versions of VS
+ STRING(REGEX MATCH "MANIFEST:NO" tmp_manifest ${CMAKE_EXE_LINKER_FLAGS})
+ IF(NOT tmp_manifest)
+ SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO")
+ ENDIF(NOT tmp_manifest)
+
ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR
CMAKE_GENERATOR MATCHES "Visual Studio 8")
@@ -184,14 +195,6 @@ IF(EMBED_MANIFESTS)
MESSAGE(FATAL_ERROR "Sign tool, signtool.exe, can't be found.")
ENDIF(HAVE_SIGN_TOOL)
- # Disable automatic manifest generation.
- STRING(REPLACE "/MANIFEST" "/MANIFEST:NO" CMAKE_EXE_LINKER_FLAGS
- ${CMAKE_EXE_LINKER_FLAGS})
- # Explicitly disable it since it is the default for newer versions of VS
- STRING(REGEX MATCH "MANIFEST:NO" tmp_manifest ${CMAKE_EXE_LINKER_FLAGS})
- IF(NOT tmp_manifest)
- SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO")
- ENDIF(NOT tmp_manifest)
# Set the processor architecture.
IF(CMAKE_GENERATOR MATCHES "Visual Studio 8 2005 Win64")
SET(PROCESSOR_ARCH "amd64")
diff --git a/Docs/INSTALL-BINARY b/Docs/INSTALL-BINARY
new file mode 100644
index 00000000000..d1c409acd67
--- /dev/null
+++ b/Docs/INSTALL-BINARY
@@ -0,0 +1,8 @@
+
+You can find information about how to install binary distributions at
+
+ http://dev.mysql.com/doc/refman/5.1/en/quick-standard-installation.html
+
+The MySQL Reference Manual is also available in various formats on
+http://dev.mysql.com/doc; if you're interested in the DocBook XML
+sources go to http://svn.mysql.com.
diff --git a/Docs/Makefile.am b/Docs/Makefile.am
index e57a1abcb0c..629618609a3 100644
--- a/Docs/Makefile.am
+++ b/Docs/Makefile.am
@@ -13,14 +13,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-noinst_SCRIPTS = generate-text-files.pl
-
-EXTRA_DIST = $(noinst_SCRIPTS) manual.chm mysql.info INSTALL-BINARY
-
-TXT_FILES= ../INSTALL-SOURCE ../INSTALL-WIN-SOURCE \
- INSTALL-BINARY ../support-files/MacOSX/ReadMe.txt
-
-all-local: $(TXT_FILES)
+EXTRA_DIST = mysql.info INSTALL-BINARY @extra_docs@
# make sure that "make install" installs the info page, too
# automake only seems to take care of this automatically,
@@ -32,38 +25,5 @@ install-data-hook: $(srcdir)/mysql.info
uninstall-local:
@RM@ -f $(DESTDIR)$(infodir)/mysql.info
-# Problems with "make distclean", works differently for make files
-# generated by different versions of the automake. Some require the
-# generated files explicitly in DISTCLEANFILES.
-DISTCLEANFILES = $(TXT_FILES)
-
-# This target is not used in builds, just for convinience
-CLEAN_FILES: $(TXT_FILES)
- touch $(TXT_FILES)
-
-GT = $(srcdir)/generate-text-files.pl
-
-../INSTALL-SOURCE: $(srcdir)/mysql.info $(GT)
- perl -w $(GT) $(srcdir)/mysql.info "installing-source" "windows-source-build" > $@
-
-../INSTALL-WIN-SOURCE: $(srcdir)/mysql.info $(GT)
- perl -w $(GT) $(srcdir)/mysql.info "windows-source-build" "post-installation" > $@
-
-# We put the description for the binary installation here so that
-# people who download source wont have to see it. It is moved up to
-# the toplevel by the script that makes the binary tar files.
-INSTALL-BINARY: $(srcdir)/mysql.info $(GT)
- perl -w $(GT) $(srcdir)/mysql.info "installing-binary" "installing-source" > $@
-
-../support-files/MacOSX/ReadMe.txt: $(srcdir)/mysql.info $(GT)
- perl -w $(GT) $(srcdir)/mysql.info "mac-os-x-installation" "netware-installation" > $@
-
-# Include the Windows manual.chm in source .tar.gz only if available.
-# It is not in BitKeeper, but is downloaded from intranet by Bootstrap.
-dist-hook:
- if [ -e $(srcdir)/manual.chm ] ; then \
- cp -f $(srcdir)/manual.chm $(distdir); \
- fi
-
# Don't update the files from bitkeeper
%::SCCS/s.%
diff --git a/Docs/generate-text-files.pl b/Docs/generate-text-files.pl
deleted file mode 100755
index 69e0478eb8a..00000000000
--- a/Docs/generate-text-files.pl
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/usr/bin/perl -w -*- perl -*-
-# Copyright (C) 2000, 2003, 2005 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
-
-# Generate text files from top directory from the manual.
-
-$from = shift(@ARGV);
-$fnode = shift(@ARGV);
-$tnode = shift(@ARGV);
-
-open(IN, "$from") || die "Cannot open $from: $!";
-
-$in = 0;
-
-while (<IN>)
-{
- if ($in)
- {
- if (/Node: $tnode,/ || /\[index/)
- {
- $in = 0;
- }
- elsif (/^File: mysql.info/ || (/^/))
- {
- # Just Skip node beginnings
- }
- else
- {
- print;
- }
- }
- else
- {
- if (/Node: $fnode,/)
- {
- $in = 1;
- # Skip first empty line
- <IN>;
- }
- }
-}
-
-close(IN);
-
-die "Could not find node \"$tnode\"" if ($in == 1);
-exit 0;
diff --git a/Docs/manual.chm b/Docs/manual.chm
deleted file mode 100644
index 28c3e1b5a86..00000000000
--- a/Docs/manual.chm
+++ /dev/null
@@ -1,14 +0,0 @@
-
-*********************************************************
-
-This is a dummy placeholder file for "manual.chm" in the
-MySQL source trees.
-
-Note, that the documentation has been moved into a separate
-BitKeeper source tree named "mysqldoc" - do not attempt to edit this
-file! All changes to it should be done in the mysqldoc tree.
-
-This dummy file is being replaced with the actual file from the
-mysqldoc tree when building the official source distribution.
-
-*********************************************************
diff --git a/Docs/mysql.info b/Docs/mysql.info
index 5846d7aadf6..b2c411e51ab 100644
--- a/Docs/mysql.info
+++ b/Docs/mysql.info
@@ -1,27 +1,4 @@
-This is mysql.info, produced by makeinfo version 4.8 from manual.texi.
-START-INFO-DIR-ENTRY
-* mysql: (mysql). MySQL documentation.
-END-INFO-DIR-ENTRY
-
-
-File: mysql.info, Node: Top, Next: (dir), Prev: (dir), Up: (dir)
-
-This is an empty placeholder file for the MySQL manual.
-
-The MySQL manual is now maintained in a separate BitKeeper source tree!
-Please see `http://www.mysql.com/doc/en/Installing_source_tree.html'
-for more info on how to work with BitKeeper.
-
-This file will be replaced with the current `mysql.info' when building
-the official source distribution.
-
-You can find a specific manual for any older version of MySQL in the
-binary or source distribution for that version.
-
-
-
-Tag Table:
-Node: Top166
-
-End Tag Table
+The MySQL Reference Manual is available in various formats on
+http://dev.mysql.com/doc; if you're interested in the DocBook XML
+sources go to http://svn.mysql.com.
diff --git a/INSTALL-SOURCE b/INSTALL-SOURCE
new file mode 100644
index 00000000000..3a5dd22fa38
--- /dev/null
+++ b/INSTALL-SOURCE
@@ -0,0 +1,8 @@
+
+You can find information about how to install from a source distributions at
+
+ http://dev.mysql.com/doc/refman/5.1/en/installing-source.html
+
+The MySQL Reference Manual is also available in various formats on
+http://dev.mysql.com/doc; if you're interested in the DocBook XML
+sources go to http://svn.mysql.com.
diff --git a/INSTALL-WIN-SOURCE b/INSTALL-WIN-SOURCE
new file mode 100644
index 00000000000..9484513c431
--- /dev/null
+++ b/INSTALL-WIN-SOURCE
@@ -0,0 +1,9 @@
+
+You can find information about how to install from a Windows source
+distributions at
+
+ http://dev.mysql.com/doc/refman/5.1/en/windows-source-build.html
+
+The MySQL Reference Manual is also available in various formats on
+http://dev.mysql.com/doc; if you're interested in the DocBook XML
+sources go to http://svn.mysql.com.
diff --git a/Makefile.am b/Makefile.am
index 10201e4df63..da850136ec9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -38,8 +38,7 @@ DIST_SUBDIRS = . include Docs zlib \
netware libmysqld \
mysql-test support-files sql-bench server-tools \
win \
- BUILD debian
-
+ BUILD
DISTCLEANFILES = ac_available_languages_fragment
# Create permission databases
@@ -54,8 +53,8 @@ bin-dist: all
dist-hook:
rm -rf `find $(distdir) -type d -name SCCS -print`
mkdir -p $(distdir)/win
- scripts/mysql_install_db --no-defaults --windows \
- --basedir=$(top_builddir) \
+ scripts/mysql_install_db --no-defaults --cross-bootstrap \
+ --builddir=$(top_builddir) \
--datadir=$(distdir)/win/data \
--srcdir=$(top_srcdir)
@@ -67,7 +66,7 @@ tags:
test-pl test-force-pl test-full-pl test-force-full-pl test-force-pl-mem \
test-unit test-ps test-nr test-pr test-ns test-binlog-statement \
test-ext-funcs test-ext-rpl test-ext-partitions test-ext-jp \
- test-ext-stress test-ext \
+ test-ext-stress test-ext test-embedded \
test-fast test-fast-cursor test-fast-view test-fast-prepare \
test-full-qa
@@ -102,6 +101,16 @@ test-binlog-statement:
cd mysql-test ; \
@PERL@ ./mysql-test-run.pl $(force) --mysqld=--binlog-format=statement
+# This code is duplicated in "test-bt", see the Changeset comment of 2007-Dec-07
+test-embedded:
+ if [ -e bin/mysqltest_embedded -o -e libmysqld/examples/mysqltest_embedded ] ; then \
+ cd mysql-test ; MTR_BUILD_THREAD=auto \
+ @PERL@ ./mysql-test-run.pl --comment=embedded --force --timer \
+ --embedded-server --skip-rpl --skip-ndbcluster ; \
+ else \
+ echo "no program found for 'embedded' tests - skipped testing" ; \
+ fi
+
test: test-ns test-pr
test-full: test test-nr test-ps
@@ -136,6 +145,8 @@ test-bt:
cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --comment=embedded --force --timer \
--embedded-server --skip-rpl --skip-ndbcluster ; \
+ else \
+ echo "no program found for 'embedded' tests - skipped testing" ; \
fi
-cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --force --comment=funcs1_ps --ps-protocol --suite=funcs_1
diff --git a/client/client_priv.h b/client/client_priv.h
index a2f61b9e9ca..c205d07c34c 100644
--- a/client/client_priv.h
+++ b/client/client_priv.h
@@ -80,5 +80,6 @@ enum options_client
OPT_MYSQL_REPLACE_INTO, OPT_BASE64_OUTPUT, OPT_SERVER_ID,
OPT_FIX_TABLE_NAMES, OPT_FIX_DB_NAMES, OPT_SSL_VERIFY_SERVER_CERT,
OPT_DEBUG_INFO, OPT_DEBUG_CHECK, OPT_COLUMN_TYPES, OPT_ERROR_LOG_FILE,
- OPT_WRITE_BINLOG, OPT_MAX_CLIENT_OPTION
+ OPT_WRITE_BINLOG, OPT_DUMP_DATE,
+ OPT_MAX_CLIENT_OPTION
};
diff --git a/client/mysql.cc b/client/mysql.cc
index 794f252853a..d30b60732bc 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -144,6 +144,7 @@ static my_bool ignore_errors=0,wait_flag=0,quick=0,
show_warnings= 0, executing_query= 0, interrupted_query= 0;
static my_bool debug_info_flag, debug_check_flag;
static my_bool column_types_flag;
+static my_bool preserve_comments= 0;
static ulong opt_max_allowed_packet, opt_net_buffer_length;
static uint verbose=0,opt_silent=0,opt_mysql_port=0, opt_local_infile=0;
static uint my_end_arg;
@@ -604,6 +605,10 @@ static struct my_option my_long_options[] =
{"column-type-info", OPT_COLUMN_TYPES, "Display column type information.",
(uchar**) &column_types_flag, (uchar**) &column_types_flag,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
+ {"comments", 'c', "Preserve comments. Send comments to the server."
+ " The default is --skip-comments (discard comments), enable with --comments",
+ (uchar**) &preserve_comments, (uchar**) &preserve_comments,
+ 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"compress", 'C', "Use compression in server/client protocol.",
(uchar**) &opt_compress, (uchar**) &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0,
0, 0, 0},
@@ -692,9 +697,14 @@ static struct my_option my_long_options[] =
{"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0},
#endif
- {"port", 'P', "Port number to use for connection.", (uchar**) &opt_mysql_port,
- (uchar**) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,
- 0},
+ {"port", 'P', "Port number to use for connection or 0 for default to, in "
+ "order of preference, my.cnf, $MYSQL_TCP_PORT, "
+#if MYSQL_PORT_DEFAULT == 0
+ "/etc/services, "
+#endif
+ "built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
+ (uchar**) &opt_mysql_port,
+ (uchar**) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"prompt", OPT_PROMPT, "Set the mysql prompt to this value.",
(uchar**) &current_prompt, (uchar**) &current_prompt, 0, GET_STR_ALLOC,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@@ -749,9 +759,9 @@ static struct my_option my_long_options[] =
0, 0},
{"max_allowed_packet", OPT_MAX_ALLOWED_PACKET,
"Max packet length to send to, or receive from server",
- (uchar**) &opt_max_allowed_packet, (uchar**) &opt_max_allowed_packet, 0, GET_ULONG,
- REQUIRED_ARG, 16 *1024L*1024L, 4096, (longlong) 2*1024L*1024L*1024L,
- MALLOC_OVERHEAD, 1024, 0},
+ (uchar**) &opt_max_allowed_packet, (uchar**) &opt_max_allowed_packet, 0,
+ GET_ULONG, REQUIRED_ARG, 16 *1024L*1024L, 4096,
+ (longlong) 2*1024L*1024L*1024L, MALLOC_OVERHEAD, 1024, 0},
{"net_buffer_length", OPT_NET_BUFFER_LENGTH,
"Buffer for TCP/IP and socket communication",
(uchar**) &opt_net_buffer_length, (uchar**) &opt_net_buffer_length, 0, GET_ULONG,
@@ -759,12 +769,13 @@ static struct my_option my_long_options[] =
{"select_limit", OPT_SELECT_LIMIT,
"Automatic limit for SELECT when using --safe-updates",
(uchar**) &select_limit,
- (uchar**) &select_limit, 0, GET_ULONG, REQUIRED_ARG, 1000L, 1, ~0L, 0, 1, 0},
+ (uchar**) &select_limit, 0, GET_ULONG, REQUIRED_ARG, 1000L, 1, ULONG_MAX,
+ 0, 1, 0},
{"max_join_size", OPT_MAX_JOIN_SIZE,
"Automatic limit for rows in a join when using --safe-updates",
(uchar**) &max_join_size,
- (uchar**) &max_join_size, 0, GET_ULONG, REQUIRED_ARG, 1000000L, 1, ~0L, 0, 1,
- 0},
+ (uchar**) &max_join_size, 0, GET_ULONG, REQUIRED_ARG, 1000000L, 1, ULONG_MAX,
+ 0, 1, 0},
{"secure-auth", OPT_SECURE_AUTH, "Refuse client connecting to server if it"
" uses old (pre-4.1.1) protocol", (uchar**) &opt_secure_auth,
(uchar**) &opt_secure_auth, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
@@ -1082,6 +1093,17 @@ static int read_and_execute(bool interactive)
if (!interactive)
{
line=batch_readline(status.line_buff);
+ /*
+ Skip UTF8 Byte Order Marker (BOM) 0xEFBBBF.
+ Editors like "notepad" put this marker in
+ the very beginning of a text file when
+ you save the file using "Unicode UTF-8" format.
+ */
+ if (!line_number &&
+ (uchar) line[0] == 0xEF &&
+ (uchar) line[1] == 0xBB &&
+ (uchar) line[2] == 0xBF)
+ line+= 3;
line_number++;
if (!glob_buffer.length())
status.query_start_line=line_number;
@@ -1149,10 +1171,6 @@ static int read_and_execute(bool interactive)
status.exit_status=0;
break;
}
- if (!in_string && (line[0] == '#' ||
- (line[0] == '-' && line[1] == '-') ||
- line[0] == 0))
- continue; // Skip comment lines
/*
Check if line is a mysql command line
@@ -1278,15 +1296,21 @@ static bool add_line(String &buffer,char *line,char *in_string,
for (pos=out=line ; (inchar= (uchar) *pos) ; pos++)
{
- if (my_isspace(charset_info,inchar) && out == line &&
- buffer.is_empty())
- continue;
+ if (!preserve_comments)
+ {
+ // Skip spaces at the beggining of a statement
+ if (my_isspace(charset_info,inchar) && (out == line) &&
+ buffer.is_empty())
+ continue;
+ }
+
#ifdef USE_MB
+ // Accept multi-byte characters as-is
int length;
if (use_mb(charset_info) &&
(length= my_ismbchar(charset_info, pos, end_of_line)))
{
- if (!*ml_comment)
+ if (!*ml_comment || preserve_comments)
{
while (length--)
*out++ = *pos++;
@@ -1312,8 +1336,13 @@ static bool add_line(String &buffer,char *line,char *in_string,
}
if ((com=find_command(NullS,(char) inchar)))
{
- const String tmp(line,(uint) (out-line), charset_info);
- buffer.append(tmp);
+ // Flush previously accepted characters
+ if (out != line)
+ {
+ buffer.append(line, (uint) (out-line));
+ out= line;
+ }
+
if ((*com->func)(&buffer,pos-1) > 0)
DBUG_RETURN(1); // Quit
if (com->takes_params)
@@ -1341,7 +1370,6 @@ static bool add_line(String &buffer,char *line,char *in_string,
pos+= delimiter_length - 1; // Point at last delim char
}
}
- out=line;
}
else
{
@@ -1354,46 +1382,105 @@ static bool add_line(String &buffer,char *line,char *in_string,
}
}
else if (!*ml_comment && !*in_string &&
- (*pos == *delimiter && is_prefix(pos + 1, delimiter + 1) ||
- buffer.length() == 0 && (out - line) >= 9 &&
- !my_strcasecmp(charset_info, line, "delimiter")))
- {
- uint old_delimiter_length= delimiter_length;
+ strlen(pos) >= 10 &&
+ !my_strnncoll(charset_info, (uchar*) pos, 10,
+ (const uchar*) "delimiter ", 10))
+ {
+ // Flush previously accepted characters
+ if (out != line)
+ {
+ buffer.append(line, (uint32) (out - line));
+ out= line;
+ }
+
+ // Flush possible comments in the buffer
+ if (!buffer.is_empty())
+ {
+ if (com_go(&buffer, 0) > 0) // < 0 is not fatal
+ DBUG_RETURN(1);
+ buffer.length(0);
+ }
+
+ /*
+ Delimiter wants the get rest of the given line as argument to
+ allow one to change ';' to ';;' and back
+ */
+ buffer.append(pos);
+ if (com_delimiter(&buffer, pos) > 0)
+ DBUG_RETURN(1);
+
+ buffer.length(0);
+ break;
+ }
+ else if (!*ml_comment && !*in_string && is_prefix(pos, delimiter))
+ {
+ // Found a statement. Continue parsing after the delimiter
+ pos+= delimiter_length;
+
+ if (preserve_comments)
+ {
+ while (my_isspace(charset_info, *pos))
+ *out++= *pos++;
+ }
+ // Flush previously accepted characters
if (out != line)
- buffer.append(line, (uint) (out - line)); // Add this line
+ {
+ buffer.append(line, (uint32) (out-line));
+ out= line;
+ }
+
+ if (preserve_comments && ((*pos == '#') ||
+ ((*pos == '-') &&
+ (pos[1] == '-') &&
+ my_isspace(charset_info, pos[2]))))
+ {
+ // Add trailing single line comments to this statement
+ buffer.append(pos);
+ pos+= strlen(pos);
+ }
+
+ pos--;
+
if ((com= find_command(buffer.c_ptr(), 0)))
{
- if (com->func == com_delimiter)
- {
- /*
- Delimiter wants the get rest of the given line as argument to
- allow one to change ';' to ';;' and back
- */
- char *end= strend(pos);
- buffer.append(pos, (uint) (end - pos));
- /* Ensure pos will point at \0 after the pos+= below */
- pos= end - old_delimiter_length + 1;
- }
- if ((*com->func)(&buffer, buffer.c_ptr()) > 0)
- DBUG_RETURN(1); // Quit
+
+ if ((*com->func)(&buffer, buffer.c_ptr()) > 0)
+ DBUG_RETURN(1); // Quit
}
else
{
- if (com_go(&buffer, 0) > 0) // < 0 is not fatal
- DBUG_RETURN(1);
+ if (com_go(&buffer, 0) > 0) // < 0 is not fatal
+ DBUG_RETURN(1);
}
buffer.length(0);
- out= line;
- pos+= old_delimiter_length - 1;
}
else if (!*ml_comment && (!*in_string && (inchar == '#' ||
inchar == '-' && pos[1] == '-' &&
my_isspace(charset_info,pos[2]))))
- break; // comment to end of line
+ {
+ // Flush previously accepted characters
+ if (out != line)
+ {
+ buffer.append(line, (uint32) (out - line));
+ out= line;
+ }
+
+ // comment to end of line
+ if (preserve_comments)
+ buffer.append(pos);
+
+ break;
+ }
else if (!*in_string && inchar == '/' && *(pos+1) == '*' &&
*(pos+2) != '!')
{
- pos++;
+ if (preserve_comments)
+ {
+ *out++= *pos++; // copy '/'
+ *out++= *pos; // copy '*'
+ }
+ else
+ pos++;
*ml_comment= 1;
if (out != line)
{
@@ -1403,8 +1490,21 @@ static bool add_line(String &buffer,char *line,char *in_string,
}
else if (*ml_comment && !ss_comment && inchar == '*' && *(pos + 1) == '/')
{
- pos++;
+ if (preserve_comments)
+ {
+ *out++= *pos++; // copy '*'
+ *out++= *pos; // copy '/'
+ }
+ else
+ pos++;
*ml_comment= 0;
+ if (out != line)
+ {
+ buffer.append(line, (uint32) (out - line));
+ out= line;
+ }
+ // Consumed a 2 chars or more, and will add 1 at most,
+ // so using the 'line' buffer to edit data in place is ok.
need_space= 1;
}
else
@@ -1419,14 +1519,12 @@ static bool add_line(String &buffer,char *line,char *in_string,
else if (!*ml_comment && !*in_string &&
(inchar == '\'' || inchar == '"' || inchar == '`'))
*in_string= (char) inchar;
- if (!*ml_comment)
+ if (!*ml_comment || preserve_comments)
{
if (need_space && !my_isspace(charset_info, (char)inchar))
- {
*out++= ' ';
- need_space= 0;
- }
- *out++= (char) inchar;
+ need_space= 0;
+ *out++= (char) inchar;
}
}
}
@@ -1436,7 +1534,7 @@ static bool add_line(String &buffer,char *line,char *in_string,
uint length=(uint) (out-line);
if (buffer.length() + length >= buffer.alloced_length())
buffer.realloc(buffer.length()+length+IO_SIZE);
- if (!(*ml_comment) && buffer.append(line,length))
+ if ((!*ml_comment || preserve_comments) && buffer.append(line, length))
DBUG_RETURN(1);
}
DBUG_RETURN(0);
@@ -2069,7 +2167,7 @@ com_go(String *buffer,char *line __attribute__((unused)))
{
char buff[200], time_buff[32], *pos;
MYSQL_RES *result;
- ulong timer, warnings;
+ ulong timer, warnings= 0;
uint error= 0;
int err= 0;
@@ -2121,33 +2219,26 @@ com_go(String *buffer,char *line __attribute__((unused)))
}
#endif
- if (error)
- {
- executing_query= 0;
- buffer->length(0); // Remove query on error
- return error;
- }
- error=0;
buffer->length(0);
+ if (error)
+ goto end;
+
do
{
if (quick)
{
if (!(result=mysql_use_result(&mysql)) && mysql_field_count(&mysql))
{
- executing_query= 0;
- return put_error(&mysql);
+ error= put_error(&mysql);
+ goto end;
}
}
else
{
error= mysql_store_result_for_lazy(&result);
if (error)
- {
- executing_query= 0;
- return error;
- }
+ goto end;
}
if (verbose >= 3 || !opt_silent)
@@ -2224,12 +2315,11 @@ com_go(String *buffer,char *line __attribute__((unused)))
if (err >= 1)
error= put_error(&mysql);
- if (show_warnings == 1 && warnings >= 1) /* Show warnings if any */
- {
- init_pager();
+end:
+
+ /* Show warnings if any or error occured */
+ if (show_warnings == 1 && (warnings >= 1 || error))
print_warnings();
- end_pager();
- }
if (!error && !status.batch &&
(mysql.server_status & SERVER_STATUS_DB_DROPPED))
@@ -2361,6 +2451,7 @@ static char *fieldflags2str(uint f) {
ff2s_check_flag(GROUP);
ff2s_check_flag(UNIQUE);
ff2s_check_flag(BINCMP);
+ ff2s_check_flag(ON_UPDATE_NOW);
#undef ff2s_check_flag
if (f)
sprintf(s, " unknows=0x%04x", f);
@@ -2653,6 +2744,9 @@ static void print_warnings()
MYSQL_RES *result;
MYSQL_ROW cur;
my_ulonglong num_rows;
+
+ /* Save current error before calling "show warnings" */
+ uint error= mysql_errno(&mysql);
/* Get the warnings */
query= "show warnings";
@@ -2661,16 +2755,28 @@ static void print_warnings()
/* Bail out when no warnings */
if (!(num_rows= mysql_num_rows(result)))
- {
- mysql_free_result(result);
- return;
- }
+ goto end;
+
+ cur= mysql_fetch_row(result);
+
+ /*
+ Don't print a duplicate of the current error. It is possible for SHOW
+ WARNINGS to return multiple errors with the same code, but different
+ messages. To be safe, skip printing the duplicate only if it is the only
+ warning.
+ */
+ if (!cur || num_rows == 1 && error == (uint) strtoul(cur[1], NULL, 10))
+ goto end;
/* Print the warnings */
- while ((cur= mysql_fetch_row(result)))
+ init_pager();
+ do
{
tee_fprintf(PAGER, "%s (Code %s): %s\n", cur[0], cur[1], cur[2]);
- }
+ } while ((cur= mysql_fetch_row(result)));
+ end_pager();
+
+end:
mysql_free_result(result);
}
diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c
index 334269720b4..fe2e48fdba1 100644
--- a/client/mysql_upgrade.c
+++ b/client/mysql_upgrade.c
@@ -96,8 +96,13 @@ static struct my_option my_long_options[]=
{"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0,
GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
#endif
- {"port", 'P', "Port number to use for connection.", 0,
- 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+ {"port", 'P', "Port number to use for connection or 0 for default to, in "
+ "order of preference, my.cnf, $MYSQL_TCP_PORT, "
+#if MYSQL_PORT_DEFAULT == 0
+ "/etc/services, "
+#endif
+ "built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
+ 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"protocol", OPT_MYSQL_PROTOCOL,
"The protocol of connection (tcp,socket,pipe,memory).",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@@ -462,7 +467,11 @@ static int run_query(const char *query, DYNAMIC_STRING *ds_res,
if (my_write(fd, (uchar*) query, strlen(query),
MYF(MY_FNABP | MY_WME)))
+ {
+ my_close(fd, MYF(0));
+ my_delete(query_file_path, MYF(0));
die("Failed to write to '%s'", query_file_path);
+ }
ret= run_tool(mysql_path,
ds_res,
diff --git a/client/mysqladmin.cc b/client/mysqladmin.cc
index 0375e84b458..01329c550d6 100644
--- a/client/mysqladmin.cc
+++ b/client/mysqladmin.cc
@@ -173,7 +173,13 @@ static struct my_option my_long_options[] =
{"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0},
#endif
- {"port", 'P', "Port number to use for connection.", (uchar**) &tcp_port,
+ {"port", 'P', "Port number to use for connection or 0 for default to, in "
+ "order of preference, my.cnf, $MYSQL_TCP_PORT, "
+#if MYSQL_PORT_DEFAULT == 0
+ "/etc/services, "
+#endif
+ "built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
+ (uchar**) &tcp_port,
(uchar**) &tcp_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"protocol", OPT_MYSQL_PROTOCOL, "The protocol of connection (tcp,socket,pipe,memory).",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc
index 12d1da39974..7a4135ab649 100644
--- a/client/mysqlbinlog.cc
+++ b/client/mysqlbinlog.cc
@@ -760,9 +760,14 @@ static struct my_option my_long_options[] =
0, GET_ULL, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"password", 'p', "Password to connect to remote server.",
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
- {"port", 'P', "Use port to connect to the remote server.",
- (uchar**) &port, (uchar**) &port, 0, GET_INT, REQUIRED_ARG, 0, 0, 0,
- 0, 0, 0},
+ {"port", 'P', "Port number to use for connection or 0 for default to, in "
+ "order of preference, my.cnf, $MYSQL_TCP_PORT, "
+#if MYSQL_PORT_DEFAULT == 0
+ "/etc/services, "
+#endif
+ "built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
+ (uchar**) &port, (uchar**) &port, 0, GET_INT, REQUIRED_ARG,
+ 0, 0, 0, 0, 0, 0},
{"position", 'j', "Deprecated. Use --start-position instead.",
(uchar**) &start_position, (uchar**) &start_position, 0, GET_ULL,
REQUIRED_ARG, BIN_LOG_HEADER_SIZE, BIN_LOG_HEADER_SIZE,
diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c
index 316412d7df9..3350bfa17a7 100644
--- a/client/mysqlcheck.c
+++ b/client/mysqlcheck.c
@@ -142,7 +142,13 @@ static struct my_option my_long_options[] =
{"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0},
#endif
- {"port", 'P', "Port number to use for connection.", (uchar**) &opt_mysql_port,
+ {"port", 'P', "Port number to use for connection or 0 for default to, in "
+ "order of preference, my.cnf, $MYSQL_TCP_PORT, "
+#if MYSQL_PORT_DEFAULT == 0
+ "/etc/services, "
+#endif
+ "built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
+ (uchar**) &opt_mysql_port,
(uchar**) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,
0},
{"protocol", OPT_MYSQL_PROTOCOL, "The protocol of connection (tcp,socket,pipe,memory).",
@@ -200,6 +206,7 @@ static void dbDisconnect(char *host);
static void DBerror(MYSQL *mysql, const char *when);
static void safe_exit(int error);
static void print_result();
+static uint fixed_name_length(const char *name);
static char *fix_table_name(char *dest, char *src);
int what_to_do = 0;
@@ -432,14 +439,14 @@ static int process_selected_tables(char *db, char **table_names, int tables)
{
/*
We need table list in form `a`, `b`, `c`
- that's why we need 4 more chars added to to each table name
+ that's why we need 2 more chars added to to each table name
space is for more readable output in logs and in case of error
*/
char *table_names_comma_sep, *end;
int i, tot_length = 0;
for (i = 0; i < tables; i++)
- tot_length += strlen(*(table_names + i)) + 4;
+ tot_length+= fixed_name_length(*(table_names + i)) + 2;
if (!(table_names_comma_sep = (char *)
my_malloc((sizeof(char) * tot_length) + 4, MYF(MY_WME))))
@@ -457,23 +464,46 @@ static int process_selected_tables(char *db, char **table_names, int tables)
}
else
for (; tables > 0; tables--, table_names++)
- handle_request_for_tables(*table_names, strlen(*table_names));
+ handle_request_for_tables(*table_names, fixed_name_length(*table_names));
return 0;
} /* process_selected_tables */
-static char *fix_table_name(char *dest, char *src)
+static uint fixed_name_length(const char *name)
{
- char *db_sep;
+ const char *p;
+ uint extra_length= 2; /* count the first/last backticks */
+
+ for (p= name; *p; p++)
+ {
+ if (*p == '`')
+ extra_length++;
+ else if (*p == '.')
+ extra_length+= 2;
+ }
+ return (p - name) + extra_length;
+}
+
+static char *fix_table_name(char *dest, char *src)
+{
*dest++= '`';
- if ((db_sep= strchr(src, '.')))
+ for (; *src; src++)
{
- dest= strmake(dest, src, (uint) (db_sep - src));
- dest= strmov(dest, "`.`");
- src= db_sep + 1;
+ switch (*src) {
+ case '.': /* add backticks around '.' */
+ *dest++= '`';
+ *dest++= '.';
+ *dest++= '`';
+ break;
+ case '`': /* escape backtick character */
+ *dest++= '`';
+ /* fall through */
+ default:
+ *dest++= *src;
+ }
}
- dest= strxmov(dest, src, "`", NullS);
+ *dest++= '`';
return dest;
}
@@ -494,7 +524,7 @@ static int process_all_tables_in_db(char *database)
{
/*
We need table list in form `a`, `b`, `c`
- that's why we need 4 more chars added to to each table name
+ that's why we need 2 more chars added to to each table name
space is for more readable output in logs and in case of error
*/
@@ -502,7 +532,7 @@ static int process_all_tables_in_db(char *database)
uint tot_length = 0;
while ((row = mysql_fetch_row(res)))
- tot_length += strlen(row[0]) + 4;
+ tot_length+= fixed_name_length(row[0]) + 2;
mysql_data_seek(res, 0);
if (!(tables=(char *) my_malloc(sizeof(char)*tot_length+4, MYF(MY_WME))))
@@ -527,10 +557,13 @@ static int process_all_tables_in_db(char *database)
else
{
while ((row = mysql_fetch_row(res)))
- /* Skip tables with an engine of NULL (probably a view). */
- if (row[1])
+ /*
+ Skip tables with an engine of NULL (probably a view)
+ if we don't perform renaming.
+ */
+ if (row[1] || what_to_do == DO_UPGRADE)
{
- handle_request_for_tables(row[0], strlen(row[0]));
+ handle_request_for_tables(row[0], fixed_name_length(row[0]));
}
}
mysql_free_result(res);
@@ -539,13 +572,13 @@ static int process_all_tables_in_db(char *database)
-static int fix_object_name(const char *obj, const char *name)
+static int fix_table_storage_name(const char *name)
{
char qbuf[100 + NAME_LEN*4];
int rc= 0;
if (strncmp(name, "#mysql50#", 9))
return 1;
- sprintf(qbuf, "RENAME %s `%s` TO `%s`", obj, name, name + 9);
+ sprintf(qbuf, "RENAME TABLE `%s` TO `%s`", name, name + 9);
if (mysql_query(sock, qbuf))
{
fprintf(stderr, "Failed to %s\n", qbuf);
@@ -557,6 +590,23 @@ static int fix_object_name(const char *obj, const char *name)
return rc;
}
+static int fix_database_storage_name(const char *name)
+{
+ char qbuf[100 + NAME_LEN*4];
+ int rc= 0;
+ if (strncmp(name, "#mysql50#", 9))
+ return 1;
+ sprintf(qbuf, "ALTER DATABASE `%s` UPGRADE DATA DIRECTORY NAME", name);
+ if (mysql_query(sock, qbuf))
+ {
+ fprintf(stderr, "Failed to %s\n", qbuf);
+ fprintf(stderr, "Error: %s\n", mysql_error(sock));
+ rc= 1;
+ }
+ if (verbose)
+ printf("%-50s %s\n", name, rc ? "FAILED" : "OK");
+ return rc;
+}
static int process_one_db(char *database)
{
@@ -565,7 +615,7 @@ static int process_one_db(char *database)
int rc= 0;
if (opt_fix_db_names && !strncmp(database,"#mysql50#", 9))
{
- rc= fix_object_name("DATABASE", database);
+ rc= fix_database_storage_name(database);
database+= 9;
}
if (rc || !opt_fix_table_names)
@@ -620,7 +670,7 @@ static int handle_request_for_tables(char *tables, uint length)
op= (opt_write_binlog) ? "OPTIMIZE" : "OPTIMIZE NO_WRITE_TO_BINLOG";
break;
case DO_UPGRADE:
- return fix_object_name("TABLE", tables);
+ return fix_table_storage_name(tables);
}
if (!(query =(char *) my_malloc((sizeof(char)*(length+110)), MYF(MY_WME))))
@@ -803,7 +853,7 @@ int main(int argc, char **argv)
for (i = 0; i < tables4repair.elements ; i++)
{
char *name= (char*) dynamic_array_ptr(&tables4repair, i);
- handle_request_for_tables(name, strlen(name));
+ handle_request_for_tables(name, fixed_name_length(name));
}
}
end:
diff --git a/client/mysqldump.c b/client/mysqldump.c
index 582e9e3b3b9..01b484e924e 100644
--- a/client/mysqldump.c
+++ b/client/mysqldump.c
@@ -90,7 +90,7 @@ static my_bool verbose= 0, opt_no_create_info= 0, opt_no_data= 0,
opt_drop=1,opt_keywords=0,opt_lock=1,opt_compress=0,
opt_delayed=0,create_options=1,opt_quoted=0,opt_databases=0,
opt_alldbs=0,opt_create_db=0,opt_lock_all_tables=0,
- opt_set_charset=0,
+ opt_set_charset=0, opt_dump_date=1,
opt_autocommit=0,opt_disable_keys=1,opt_xml=0,
opt_delete_master_logs=0, tty_password=0,
opt_single_transaction=0, opt_comments= 0, opt_compact= 0,
@@ -420,10 +420,17 @@ static struct my_option my_long_options[] =
"Creates a consistent snapshot by dumping all tables in a single "
"transaction. Works ONLY for tables stored in storage engines which "
"support multiversioning (currently only InnoDB does); the dump is NOT "
- "guaranteed to be consistent for other storage engines. Option "
- "automatically turns off --lock-tables.",
+ "guaranteed to be consistent for other storage engines. "
+ "While a --single-transaction dump is in process, to ensure a valid "
+ "dump file (correct table contents and binary log position), no other "
+ "connection should use the following statements: ALTER TABLE, DROP "
+ "TABLE, RENAME TABLE, TRUNCATE TABLE, as consistent snapshot is not "
+ "isolated from them. Option automatically turns off --lock-tables.",
(uchar**) &opt_single_transaction, (uchar**) &opt_single_transaction, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
+ {"dump-date", OPT_DUMP_DATE, "Put a dump date to the end of the output.",
+ (uchar**) &opt_dump_date, (uchar**) &opt_dump_date, 0,
+ GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
{"skip-opt", OPT_SKIP_OPTIMIZATION,
"Disable --opt. Disables --add-drop-table, --add-locks, --create-options, --quick, --extended-insert, --lock-tables, --set-charset, and --disable-keys.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
@@ -651,10 +658,15 @@ static void write_footer(FILE *sql_file)
fputs("\n", sql_file);
if (opt_comments)
{
- char time_str[20];
- get_date(time_str, GETDATE_DATE_TIME, 0);
- fprintf(sql_file, "-- Dump completed on %s\n",
- time_str);
+ if (opt_dump_date)
+ {
+ char time_str[20];
+ get_date(time_str, GETDATE_DATE_TIME, 0);
+ fprintf(sql_file, "-- Dump completed on %s\n",
+ time_str);
+ }
+ else
+ fprintf(sql_file, "-- Dump completed\n");
}
check_io(sql_file);
}
@@ -1032,8 +1044,10 @@ static int fetch_db_collation(const char *db_name,
char query[QUERY_LENGTH];
MYSQL_RES *db_cl_res;
MYSQL_ROW db_cl_row;
+ char quoted_database_buf[NAME_LEN*2+3];
+ char *qdatabase= quote_name(db_name, quoted_database_buf, 1);
- my_snprintf(query, sizeof (query), "use %s", db_name);
+ my_snprintf(query, sizeof (query), "use %s", qdatabase);
if (mysql_query_with_error_report(mysql, NULL, query))
return 1;
@@ -1888,7 +1902,7 @@ static uint dump_events_for_db(char *db)
if (create_delimiter(row[3], delimiter, sizeof(delimiter)) == NULL)
{
fprintf(stderr, "%s: Warning: Can't create delimiter for event '%s'\n",
- event_name, my_progname);
+ my_progname, event_name);
DBUG_RETURN(1);
}
@@ -4369,6 +4383,18 @@ static int start_transaction(MYSQL *mysql_con)
need the REPEATABLE READ level (not anything lower, for example READ
COMMITTED would give one new consistent read per dumped table).
*/
+ if ((mysql_get_server_version(mysql_con) < 40100) && opt_master_data)
+ {
+ fprintf(stderr, "-- %s: the combination of --single-transaction and "
+ "--master-data requires a MySQL server version of at least 4.1 "
+ "(current server's version is %s). %s\n",
+ ignore_errors ? "Warning" : "Error",
+ mysql_con->server_version ? mysql_con->server_version : "unknown",
+ ignore_errors ? "Continuing due to --force, backup may not be consistent across all tables!" : "Aborting.");
+ if (!ignore_errors)
+ exit(EX_MYSQLERR);
+ }
+
return (mysql_query_with_error_report(mysql_con, 0,
"SET SESSION TRANSACTION ISOLATION "
"LEVEL REPEATABLE READ") ||
diff --git a/client/mysqlimport.c b/client/mysqlimport.c
index afd9454d6be..954af0cff97 100644
--- a/client/mysqlimport.c
+++ b/client/mysqlimport.c
@@ -137,7 +137,13 @@ static struct my_option my_long_options[] =
{"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0},
#endif
- {"port", 'P', "Port number to use for connection.", (uchar**) &opt_mysql_port,
+ {"port", 'P', "Port number to use for connection or 0 for default to, in "
+ "order of preference, my.cnf, $MYSQL_TCP_PORT, "
+#if MYSQL_PORT_DEFAULT == 0
+ "/etc/services, "
+#endif
+ "built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
+ (uchar**) &opt_mysql_port,
(uchar**) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,
0},
{"protocol", OPT_MYSQL_PROTOCOL, "The protocol of connection (tcp,socket,pipe,memory).",
diff --git a/client/mysqlshow.c b/client/mysqlshow.c
index a7f6cadf450..a43adb0d586 100644
--- a/client/mysqlshow.c
+++ b/client/mysqlshow.c
@@ -196,7 +196,13 @@ static struct my_option my_long_options[] =
{"password", 'p',
"Password to use when connecting to server. If password is not given it's asked from the tty.",
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
- {"port", 'P', "Port number to use for connection.", (uchar**) &opt_mysql_port,
+ {"port", 'P', "Port number to use for connection or 0 for default to, in "
+ "order of preference, my.cnf, $MYSQL_TCP_PORT, "
+#if MYSQL_PORT_DEFAULT == 0
+ "/etc/services, "
+#endif
+ "built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
+ (uchar**) &opt_mysql_port,
(uchar**) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,
0},
#ifdef __WIN__
diff --git a/client/mysqlslap.c b/client/mysqlslap.c
index 02a0cbd04c5..1c54ba86718 100644
--- a/client/mysqlslap.c
+++ b/client/mysqlslap.c
@@ -140,7 +140,8 @@ static my_bool opt_compress= FALSE, tty_password= FALSE,
auto_generate_sql= FALSE;
const char *auto_generate_sql_type= "mixed";
-static unsigned long connect_flags= CLIENT_MULTI_RESULTS;
+static unsigned long connect_flags= CLIENT_MULTI_RESULTS |
+ CLIENT_MULTI_STATEMENTS;
static int verbose, delimiter_length;
static uint commit_rate;
@@ -1877,13 +1878,16 @@ limit_not_met:
}
}
- if (mysql_field_count(mysql))
+ do
{
- result= mysql_store_result(mysql);
- while ((row = mysql_fetch_row(result)))
- counter++;
- mysql_free_result(result);
- }
+ if (mysql_field_count(mysql))
+ {
+ result= mysql_store_result(mysql);
+ while ((row = mysql_fetch_row(result)))
+ counter++;
+ mysql_free_result(result);
+ }
+ } while(mysql_next_result(mysql) == 0);
queries++;
if (commit_rate && commit_rate <= trans_counter)
diff --git a/client/mysqltest.c b/client/mysqltest.c
index 558763f7cff..f74a3bf506b 100644
--- a/client/mysqltest.c
+++ b/client/mysqltest.c
@@ -271,7 +271,7 @@ enum enum_commands {
Q_REPLACE_REGEX, Q_REMOVE_FILE, Q_FILE_EXIST,
Q_WRITE_FILE, Q_COPY_FILE, Q_PERL, Q_DIE, Q_EXIT, Q_SKIP,
Q_CHMOD_FILE, Q_APPEND_FILE, Q_CAT_FILE, Q_DIFF_FILES,
- Q_SEND_QUIT,
+ Q_SEND_QUIT, Q_CHANGE_USER,
Q_UNKNOWN, /* Unknown command. */
Q_COMMENT, /* Comments, ignored. */
@@ -360,6 +360,7 @@ const char *command_names[]=
"cat_file",
"diff_files",
"send_quit",
+ "change_user",
0
};
@@ -1515,7 +1516,7 @@ int dyn_string_cmp(DYNAMIC_STRING* ds, const char *fname)
die("Failed to create temporary file for ds");
/* Write ds to temporary file and set file pos to beginning*/
- if (my_write(fd, ds->str, ds->length,
+ if (my_write(fd, (uchar *) ds->str, ds->length,
MYF(MY_FNABP | MY_WME)) ||
my_seek(fd, 0, SEEK_SET, MYF(0)) == MY_FILEPOS_ERROR)
{
@@ -1597,10 +1598,22 @@ void check_result(DYNAMIC_STRING* ds)
and then show the diff
*/
char reject_file[FN_REFLEN];
- str_to_file(fn_format(reject_file, result_file_name, opt_logdir, ".reject",
- *opt_logdir ? MY_REPLACE_DIR | MY_REPLACE_EXT :
- MY_REPLACE_EXT),
- ds->str, ds->length);
+ size_t reject_length;
+ dirname_part(reject_file, result_file_name, &reject_length);
+
+ if (access(reject_file, W_OK) == 0)
+ {
+ /* Result file directory is writable, save reject file there */
+ fn_format(reject_file, result_file_name, NULL,
+ ".reject", MY_REPLACE_EXT);
+ }
+ else
+ {
+ /* Put reject file in opt_logdir */
+ fn_format(reject_file, result_file_name, opt_logdir,
+ ".reject", MY_REPLACE_DIR | MY_REPLACE_EXT);
+ }
+ str_to_file(reject_file, ds->str, ds->length);
dynstr_set(ds, NULL); /* Don't create a .log file */
@@ -2691,7 +2704,7 @@ void do_copy_file(struct st_command *command)
command command handle
DESCRIPTION
- chmod_file <octal> <file_name>
+ chmod <octal> <file_name>
Change file permission of <file_name>
*/
@@ -3064,6 +3077,69 @@ void do_send_quit(struct st_command *command)
/*
SYNOPSIS
+ do_change_user
+ command called command
+
+ DESCRIPTION
+ change_user [<user>], [<passwd>], [<db>]
+ <user> - user to change to
+ <passwd> - user password
+ <db> - default database
+
+ Changes the user and causes the database specified by db to become
+ the default (current) database for the the current connection.
+
+*/
+
+void do_change_user(struct st_command *command)
+{
+ MYSQL *mysql = &cur_con->mysql;
+ /* static keyword to make the NetWare compiler happy. */
+ static DYNAMIC_STRING ds_user, ds_passwd, ds_db;
+ const struct command_arg change_user_args[] = {
+ { "user", ARG_STRING, FALSE, &ds_user, "User to connect as" },
+ { "password", ARG_STRING, FALSE, &ds_passwd, "Password used when connecting" },
+ { "database", ARG_STRING, FALSE, &ds_db, "Database to select after connect" },
+ };
+
+ DBUG_ENTER("do_change_user");
+
+ check_command_args(command, command->first_argument,
+ change_user_args,
+ sizeof(change_user_args)/sizeof(struct command_arg),
+ ',');
+
+ if (cur_con->stmt)
+ {
+ mysql_stmt_close(cur_con->stmt);
+ cur_con->stmt= NULL;
+ }
+
+ if (!ds_user.length)
+ dynstr_set(&ds_user, mysql->user);
+
+ if (!ds_passwd.length)
+ dynstr_set(&ds_passwd, mysql->passwd);
+
+ 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));
+
+ if (mysql_change_user(mysql, ds_user.str, ds_passwd.str, ds_db.str))
+ die("change user failed: %s", mysql_error(mysql));
+
+ dynstr_free(&ds_user);
+ dynstr_free(&ds_passwd);
+ dynstr_free(&ds_db);
+
+ DBUG_VOID_RETURN;
+}
+
+
+/*
+ SYNOPSIS
do_perl
command command handle
@@ -4985,7 +5061,13 @@ static struct my_option my_long_options[] =
GET_INT, REQUIRED_ARG, 500, 1, 10000, 0, 0, 0},
{"password", 'p', "Password to use when connecting to server.",
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
- {"port", 'P', "Port number to use for connection.", (uchar**) &opt_port,
+ {"port", 'P', "Port number to use for connection or 0 for default to, in "
+ "order of preference, my.cnf, $MYSQL_TCP_PORT, "
+#if MYSQL_PORT_DEFAULT == 0
+ "/etc/services, "
+#endif
+ "built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
+ (uchar**) &opt_port,
(uchar**) &opt_port, 0, GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"ps-protocol", OPT_PS_PROTOCOL, "Use prepared statements protocol for communication",
(uchar**) &ps_protocol, (uchar**) &ps_protocol, 0,
@@ -6885,6 +6967,7 @@ int main(int argc, char **argv)
case Q_APPEND_FILE: do_append_file(command); break;
case Q_DIFF_FILES: do_diff_files(command); break;
case Q_SEND_QUIT: do_send_quit(command); break;
+ case Q_CHANGE_USER: do_change_user(command); break;
case Q_CAT_FILE: do_cat_file(command); break;
case Q_COPY_FILE: do_copy_file(command); break;
case Q_CHMOD_FILE: do_chmod_file(command); break;
diff --git a/cmd-line-utils/libedit/Makefile.am b/cmd-line-utils/libedit/Makefile.am
index b87f11a8de2..23ee20894ec 100644
--- a/cmd-line-utils/libedit/Makefile.am
+++ b/cmd-line-utils/libedit/Makefile.am
@@ -5,8 +5,7 @@
ASRC = $(srcdir)/vi.c $(srcdir)/emacs.c $(srcdir)/common.c
AHDR = vi.h emacs.h common.h
-# Make sure to include stuff from this directory first, to get right "config.h"
-INCLUDES = -I. -I$(top_builddir)/include -I$(top_srcdir)/include
+INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include
noinst_LIBRARIES = libedit.a
@@ -31,7 +30,14 @@ EXTRA_DIST = makelist.sh np/unvis.c np/strlcpy.c np/vis.c np/vis.h np/strlcat.c
CLEANFILES = makelist common.h emacs.h vi.h fcns.h help.h fcns.c help.c
-DEFS = -DUNDEF_THREADS_HACK -DHAVE_CONFIG_H -DNO_KILL_INTR
+# Make sure to include stuff from this directory first, to get right "config.h"
+# Automake puts into DEFAULT_INCLUDES this source and corresponding
+# build directory together with ../../include to let all make files
+# find the central "config.h". This variable is used before INCLUDES
+# above. But in automake 1.10 the order of these are changed. Put the
+# includes of this directory into DEFS to always be sure it is first
+# before DEFAULT_INCLUDES on the compile line.
+DEFS = -DUNDEF_THREADS_HACK -DHAVE_CONFIG_H -DNO_KILL_INTR -I. -I$(srcdir)
SUFFIXES = .sh
diff --git a/cmd-line-utils/readline/INSTALL b/cmd-line-utils/readline/INSTALL
index cb4a06fb701..f360b9e7907 100644
--- a/cmd-line-utils/readline/INSTALL
+++ b/cmd-line-utils/readline/INSTALL
@@ -1,7 +1,7 @@
Basic Installation
==================
-These are installation instructions for Readline-5.0.
+These are installation instructions for Readline-5.2.
The simplest way to compile readline is:
@@ -238,6 +238,9 @@ SHLIB_XLDFLAGS Additional flags to pass to SHOBJ_LD for shared library
SHLIB_LIBS Any additional libraries that shared libraries should be
linked against when they are created.
+SHLIB_LIBPREF The prefix to use when generating the filename of the shared
+ library. The default is `lib'; Cygwin uses `cyg'.
+
SHLIB_LIBSUFF The suffix to add to `libreadline' and `libhistory' when
generating the filename of the shared library. Many systems
use `so'; HP-UX uses `sl'.
@@ -254,6 +257,17 @@ SHLIB_LIBVERSION The string to append to the filename to indicate the version
numbers; use `$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' on those systems.
Other Unix versions use different schemes.
+SHLIB_DLLVERSION The version number for shared libraries that determines API
+ compatibility between readline versions and the underlying
+ system. Used only on Cygwin. Defaults to $SHLIB_MAJOR, but
+ can be overridden at configuration time by defining DLLVERSION
+ in the environment.
+
+SHLIB_DOT The character used to separate the name of the shared library
+ from the suffix and version information. The default is `.';
+ systems like Cygwin which don't separate version information
+ from the library name should set this to the empty string.
+
SHLIB_STATUS Set this to `supported' when you have defined the other
necessary variables. Make uses this to determine whether
or not shared library creation should be attempted. If
diff --git a/cmd-line-utils/readline/README b/cmd-line-utils/readline/README
index ac4e3a767f9..8da99626aa1 100644
--- a/cmd-line-utils/readline/README
+++ b/cmd-line-utils/readline/README
@@ -1,7 +1,7 @@
Introduction
============
-This is the Gnu Readline library, version 5.0.
+This is the Gnu Readline library, version 5.2.
The Readline library provides a set of functions for use by applications
that allow users to edit command lines as they are typed in. Both
@@ -102,6 +102,9 @@ SHLIB_XLDFLAGS Additional flags to pass to SHOBJ_LD for shared library
SHLIB_LIBS Any additional libraries that shared libraries should be
linked against when they are created.
+SHLIB_LIBPREF The prefix to use when generating the filename of the shared
+ library. The default is `lib'; Cygwin uses `cyg'.
+
SHLIB_LIBSUFF The suffix to add to `libreadline' and `libhistory' when
generating the filename of the shared library. Many systems
use `so'; HP-UX uses `sl'.
@@ -118,6 +121,17 @@ SHLIB_LIBVERSION The string to append to the filename to indicate the version
numbers; use `$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' on those systems.
Other Unix versions use different schemes.
+SHLIB_DLLVERSION The version number for shared libraries that determines API
+ compatibility between readline versions and the underlying
+ system. Used only on Cygwin. Defaults to $SHLIB_MAJOR, but
+ can be overridden at configuration time by defining DLLVERSION
+ in the environment.
+
+SHLIB_DOT The character used to separate the name of the shared library
+ from the suffix and version information. The default is `.';
+ systems like Cygwin which don't separate version information
+ from the library name should set this to the empty string.
+
SHLIB_STATUS Set this to `supported' when you have defined the other
necessary variables. Make uses this to determine whether
or not shared library creation should be attempted.
@@ -169,4 +183,4 @@ list (mirrored to the Usenet newsgroup gnu.bash.bug) often contains
Readline bug reports and fixes.
Chet Ramey
-chet@po.cwru.edu
+chet.ramey@case.edu
diff --git a/cmd-line-utils/readline/bind.c b/cmd-line-utils/readline/bind.c
index 568c3e8776a..08c906bfcc3 100644
--- a/cmd-line-utils/readline/bind.c
+++ b/cmd-line-utils/readline/bind.c
@@ -1,6 +1,6 @@
/* bind.c -- key binding and startup file support for the readline library. */
-/* Copyright (C) 1987, 1989, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2006 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -26,7 +26,9 @@
# include <floss.h>
#endif
-#include "config_readline.h"
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
#include <stdio.h>
#include <sys/types.h>
@@ -75,6 +77,9 @@ static char *_rl_read_file PARAMS((char *, size_t *));
static void _rl_init_file_error PARAMS((const char *));
static int _rl_read_init_file PARAMS((const char *, int));
static int glean_key_from_name PARAMS((char *));
+static int find_boolean_var PARAMS((const char *));
+
+static char *_rl_get_string_variable_value PARAMS((const char *));
static int substring_member_of_array PARAMS((char *, const char **));
static int currently_reading_init_file;
@@ -337,10 +342,9 @@ rl_generic_bind (type, keyseq, data, map)
KEYMAP_ENTRY k;
k.function = 0;
- k.type= 0;
/* If no keys to bind to, exit right away. */
- if (!keyseq || !*keyseq)
+ if (keyseq == 0 || *keyseq == 0)
{
if (type == ISMACR)
free (data);
@@ -366,9 +370,12 @@ rl_generic_bind (type, keyseq, data, map)
ic = uc;
if (ic < 0 || ic >= KEYMAP_SIZE)
- return -1;
+ {
+ free (keys);
+ return -1;
+ }
- if (_rl_convert_meta_chars_to_ascii && META_CHAR (ic))
+ if (META_CHAR (ic) && _rl_convert_meta_chars_to_ascii)
{
ic = UNMETA (ic);
if (map[ESC].type == ISKMAP)
@@ -435,7 +442,7 @@ rl_translate_keyseq (seq, array, len)
{
register int i, c, l, temp;
- for (i = l = 0; (c = seq[i]); i++)
+ for (i = l = 0; c = seq[i]; i++)
{
if (c == '\\')
{
@@ -458,8 +465,24 @@ rl_translate_keyseq (seq, array, len)
}
else if (c == 'M')
{
- i++;
- array[l++] = ESC; /* ESC is meta-prefix */
+ i++; /* seq[i] == '-' */
+ /* XXX - obey convert-meta setting */
+ if (_rl_convert_meta_chars_to_ascii && _rl_keymap[ESC].type == ISKMAP)
+ array[l++] = ESC; /* ESC is meta-prefix */
+ else if (seq[i+1] == '\\' && seq[i+2] == 'C' && seq[i+3] == '-')
+ {
+ i += 4;
+ temp = (seq[i] == '?') ? RUBOUT : CTRL (_rl_to_upper (seq[i]));
+ array[l++] = META (temp);
+ }
+ else
+ {
+ /* This doesn't yet handle things like \M-\a, which may
+ or may not have any reasonable meaning. You're
+ probably better off using straight octal or hex. */
+ i++;
+ array[l++] = META (seq[i]);
+ }
}
else if (c == 'C')
{
@@ -554,6 +577,11 @@ rl_untranslate_keyseq (seq)
kseq[i++] = '-';
c = UNMETA (c);
}
+ else if (c == ESC)
+ {
+ kseq[i++] = '\\';
+ c = 'e';
+ }
else if (CTRL_CHAR (c))
{
kseq[i++] = '\\';
@@ -602,7 +630,12 @@ _rl_untranslate_macro_value (seq)
*r++ = '-';
c = UNMETA (c);
}
- else if (CTRL_CHAR (c) && c != ESC)
+ else if (c == ESC)
+ {
+ *r++ = '\\';
+ c = 'e';
+ }
+ else if (CTRL_CHAR (c))
{
*r++ = '\\';
*r++ = 'C';
@@ -661,7 +694,7 @@ rl_function_of_keyseq (keyseq, map, type)
{
register int i;
- if (!map)
+ if (map == 0)
map = _rl_keymap;
for (i = 0; keyseq && keyseq[i]; i++)
@@ -670,25 +703,27 @@ rl_function_of_keyseq (keyseq, map, type)
if (META_CHAR (ic) && _rl_convert_meta_chars_to_ascii)
{
- if (map[ESC].type != ISKMAP)
+ if (map[ESC].type == ISKMAP)
+ {
+ map = FUNCTION_TO_KEYMAP (map, ESC);
+ ic = UNMETA (ic);
+ }
+ /* XXX - should we just return NULL here, since this obviously
+ doesn't match? */
+ else
{
if (type)
*type = map[ESC].type;
return (map[ESC].function);
}
- else
- {
- map = FUNCTION_TO_KEYMAP (map, ESC);
- ic = UNMETA (ic);
- }
}
if (map[ic].type == ISKMAP)
{
/* If this is the last key in the key sequence, return the
map. */
- if (!keyseq[i + 1])
+ if (keyseq[i + 1] == '\0')
{
if (type)
*type = ISKMAP;
@@ -698,7 +733,12 @@ rl_function_of_keyseq (keyseq, map, type)
else
map = FUNCTION_TO_KEYMAP (map, ic);
}
- else
+ /* If we're not at the end of the key sequence, and the current key
+ is bound to something other than a keymap, then the entire key
+ sequence is not bound. */
+ else if (map[ic].type != ISKMAP && keyseq[i+1])
+ return ((rl_command_func_t *)NULL);
+ else /* map[ic].type != ISKMAP && keyseq[i+1] == 0 */
{
if (type)
*type = map[ic].type;
@@ -736,8 +776,7 @@ _rl_read_file (filename, sizep)
file_size = (size_t)finfo.st_size;
/* check for overflow on very large files */
- if ((long long) file_size != (long long) finfo.st_size ||
- file_size + 1 < file_size)
+ if (file_size != finfo.st_size || file_size + 1 < file_size)
{
if (file >= 0)
close (file);
@@ -767,8 +806,8 @@ _rl_read_file (filename, sizep)
/* Re-read the current keybindings file. */
int
-rl_re_read_init_file (int count __attribute__((unused)),
- int ignore __attribute__((unused)))
+rl_re_read_init_file (count, ignore)
+ int count, ignore;
{
int r;
r = rl_read_init_file ((const char *)NULL);
@@ -781,6 +820,7 @@ rl_re_read_init_file (int count __attribute__((unused)),
1. the filename used for the previous call
2. the value of the shell variable `INPUTRC'
3. ~/.inputrc
+ 4. /etc/inputrc
If the file existed and could be opened and read, 0 is returned,
otherwise errno is returned. */
int
@@ -789,17 +829,18 @@ rl_read_init_file (filename)
{
/* Default the filename. */
if (filename == 0)
+ filename = last_readline_init_file;
+ if (filename == 0)
+ filename = sh_get_env_value ("INPUTRC");
+ if (filename == 0 || *filename == 0)
{
- filename = last_readline_init_file;
- if (filename == 0)
- filename = sh_get_env_value ("INPUTRC");
- if (filename == 0)
- filename = DEFAULT_INPUTRC;
+ filename = DEFAULT_INPUTRC;
+ /* Try to read DEFAULT_INPUTRC; fall back to SYS_INPUTRC on failure */
+ if (_rl_read_init_file (filename, 0) == 0)
+ return 0;
+ filename = SYS_INPUTRC;
}
- if (*filename == 0)
- filename = DEFAULT_INPUTRC;
-
#if defined (__MSDOS__)
if (_rl_read_init_file (filename, 0) == 0)
return 0;
@@ -989,7 +1030,8 @@ parser_if (args)
/* Invert the current parser state if there is anything on the stack. */
static int
-parser_else (char *args __attribute__((unused)))
+parser_else (args)
+ char *args;
{
register int i;
@@ -1019,7 +1061,8 @@ parser_else (char *args __attribute__((unused)))
/* Terminate a conditional, popping the value of
_rl_parsing_conditionalized_out from the stack. */
static int
-parser_endif (char *args __attribute__((unused)))
+parser_endif (args)
+ char *args;
{
if (if_stack_depth)
_rl_parsing_conditionalized_out = if_stack[--if_stack_depth];
@@ -1142,7 +1185,7 @@ rl_parse_and_bind (string)
{
int passc = 0;
- for (i = 1; (c = string[i]); i++)
+ for (i = 1; c = string[i]; i++)
{
if (passc)
{
@@ -1183,9 +1226,9 @@ rl_parse_and_bind (string)
/* If this is a command to set a variable, then do that. */
if (_rl_stricmp (string, "set") == 0)
{
- char *var = string + i;
- char *value;
+ char *var, *value, *e;
+ var = string + i;
/* Make VAR point to start of variable name. */
while (*var && whitespace (*var)) var++;
@@ -1196,6 +1239,20 @@ rl_parse_and_bind (string)
*value++ = '\0';
while (*value && whitespace (*value)) value++;
+ /* Strip trailing whitespace from values to boolean variables. Temp
+ fix until I get a real quoted-string parser here. */
+ i = find_boolean_var (var);
+ if (i >= 0)
+ {
+ /* remove trailing whitespace */
+ e = value + strlen (value) - 1;
+ while (e >= value && whitespace (*e))
+ e--;
+ e++; /* skip back to whitespace or EOS */
+ if (*e && e >= value)
+ *e = '\0';
+ }
+
rl_variable_bind (var, value);
return 0;
}
@@ -1216,9 +1273,10 @@ rl_parse_and_bind (string)
the quoted string delimiter, like the shell. */
if (*funname == '\'' || *funname == '"')
{
- int delimiter = string[i++], passc;
+ int delimiter, passc;
- for (passc = 0; (c = string[i]); i++)
+ delimiter = string[i++];
+ for (passc = 0; c = string[i]; i++)
{
if (passc)
{
@@ -1353,6 +1411,7 @@ static struct {
int *value;
int flags;
} boolean_varlist [] = {
+ { "bind-tty-special-chars", &_rl_bind_stty_chars, 0 },
{ "blink-matching-paren", &rl_blink_matching_paren, V_SPECIAL },
{ "byte-oriented", &rl_byte_oriented, 0 },
{ "completion-ignore-case", &_rl_completion_case_fold, 0 },
@@ -1377,7 +1436,7 @@ static struct {
#if defined (VISIBLE_STATS)
{ "visible-stats", &rl_visible_stats, 0 },
#endif /* VISIBLE_STATS */
- { (char *)NULL, (int *)NULL, 0 }
+ { (char *)NULL, (int *)NULL }
};
static int
@@ -1446,7 +1505,7 @@ static struct {
{ "editing-mode", V_STRING, sv_editmode },
{ "isearch-terminators", V_STRING, sv_isrchterm },
{ "keymap", V_STRING, sv_keymap },
- { (char *)NULL, 0, 0 }
+ { (char *)NULL, 0 }
};
static int
@@ -1466,13 +1525,32 @@ find_string_var (name)
values result in 0 (false). */
static int
bool_to_int (value)
-const char *value;
+ const char *value;
{
return (value == 0 || *value == '\0' ||
(_rl_stricmp (value, "on") == 0) ||
(value[0] == '1' && value[1] == '\0'));
}
+char *
+rl_variable_value (name)
+ const char *name;
+{
+ register int i;
+
+ /* Check for simple variables first. */
+ i = find_boolean_var (name);
+ if (i >= 0)
+ return (*boolean_varlist[i].value ? "on" : "off");
+
+ i = find_string_var (name);
+ if (i >= 0)
+ return (_rl_get_string_variable_value (string_varlist[i].name));
+
+ /* Unknown variable names return NULL. */
+ return 0;
+}
+
int
rl_variable_bind (name, value)
const char *name, *value;
@@ -1725,13 +1803,13 @@ char *
rl_get_keymap_name_from_edit_mode ()
{
if (rl_editing_mode == emacs_mode)
- return (char*) "emacs";
+ return "emacs";
#if defined (VI_MODE)
else if (rl_editing_mode == vi_mode)
- return (char*) "vi";
+ return "vi";
#endif /* VI_MODE */
else
- return (char*) "none";
+ return "none";
}
/* **************************************************************** */
@@ -1899,12 +1977,16 @@ rl_invoking_keyseqs_in_map (function, map)
char *keyname = (char *)xmalloc (6 + strlen (seqs[i]));
if (key == ESC)
-#if 0
- sprintf (keyname, "\\e");
-#else
- /* XXX - experimental */
- sprintf (keyname, "\\M-");
-#endif
+ {
+ /* If ESC is the meta prefix and we're converting chars
+ with the eighth bit set to ESC-prefixed sequences, then
+ we can use \M-. Otherwise we need to use the sequence
+ for ESC. */
+ if (_rl_convert_meta_chars_to_ascii && map[ESC].type == ISKMAP)
+ sprintf (keyname, "\\M-");
+ else
+ sprintf (keyname, "\\e");
+ }
else if (CTRL_CHAR (key))
sprintf (keyname, "\\C-%c", _rl_to_lower (UNCTRL (key)));
else if (key == RUBOUT)
@@ -1966,7 +2048,7 @@ rl_function_dumper (print_readably)
fprintf (rl_outstream, "\n");
- for (i = 0; (name = names[i]); i++)
+ for (i = 0; name = names[i]; i++)
{
rl_command_func_t *function;
char **invokers;
@@ -2025,8 +2107,8 @@ rl_function_dumper (print_readably)
rl_outstream. If an explicit argument is given, then print
the output in such a way that it can be read back in. */
int
-rl_dump_functions (int count __attribute__((unused)),
- int key __attribute__((unused)))
+rl_dump_functions (count, key)
+ int count, key;
{
if (rl_dispatching)
fprintf (rl_outstream, "\r\n");
@@ -2105,7 +2187,8 @@ rl_macro_dumper (print_readably)
}
int
-rl_dump_macros(int count __attribute__((unused)), int key __attribute__((unused)))
+rl_dump_macros (count, key)
+ int count, key;
{
if (rl_dispatching)
fprintf (rl_outstream, "\r\n");
@@ -2114,12 +2197,67 @@ rl_dump_macros(int count __attribute__((unused)), int key __attribute__((unused)
return (0);
}
+static char *
+_rl_get_string_variable_value (name)
+ const char *name;
+{
+ static char numbuf[32];
+ char *ret;
+
+ if (_rl_stricmp (name, "bell-style") == 0)
+ {
+ switch (_rl_bell_preference)
+ {
+ case NO_BELL:
+ return "none";
+ case VISIBLE_BELL:
+ return "visible";
+ case AUDIBLE_BELL:
+ default:
+ return "audible";
+ }
+ }
+ else if (_rl_stricmp (name, "comment-begin") == 0)
+ return (_rl_comment_begin ? _rl_comment_begin : RL_COMMENT_BEGIN_DEFAULT);
+ else if (_rl_stricmp (name, "completion-query-items") == 0)
+ {
+ sprintf (numbuf, "%d", rl_completion_query_items);
+ return (numbuf);
+ }
+ else if (_rl_stricmp (name, "editing-mode") == 0)
+ return (rl_get_keymap_name_from_edit_mode ());
+ else if (_rl_stricmp (name, "isearch-terminators") == 0)
+ {
+ if (_rl_isearch_terminators == 0)
+ return 0;
+ ret = _rl_untranslate_macro_value (_rl_isearch_terminators);
+ if (ret)
+ {
+ strncpy (numbuf, ret, sizeof (numbuf) - 1);
+ free (ret);
+ numbuf[sizeof(numbuf) - 1] = '\0';
+ }
+ else
+ numbuf[0] = '\0';
+ return numbuf;
+ }
+ else if (_rl_stricmp (name, "keymap") == 0)
+ {
+ ret = rl_get_keymap_name (_rl_keymap);
+ if (ret == 0)
+ ret = rl_get_keymap_name_from_edit_mode ();
+ return (ret ? ret : "none");
+ }
+ else
+ return (0);
+}
+
void
rl_variable_dumper (print_readably)
int print_readably;
{
int i;
- const char *kname;
+ char *v;
for (i = 0; boolean_varlist[i].name; i++)
{
@@ -2131,70 +2269,24 @@ rl_variable_dumper (print_readably)
*boolean_varlist[i].value ? "on" : "off");
}
- /* bell-style */
- switch (_rl_bell_preference)
- {
- case NO_BELL:
- kname = "none"; break;
- case VISIBLE_BELL:
- kname = "visible"; break;
- case AUDIBLE_BELL:
- default:
- kname = "audible"; break;
- }
- if (print_readably)
- fprintf (rl_outstream, "set bell-style %s\n", kname);
- else
- fprintf (rl_outstream, "bell-style is set to `%s'\n", kname);
-
- /* comment-begin */
- if (print_readably)
- fprintf (rl_outstream, "set comment-begin %s\n", _rl_comment_begin ? _rl_comment_begin : RL_COMMENT_BEGIN_DEFAULT);
- else
- fprintf (rl_outstream, "comment-begin is set to `%s'\n", _rl_comment_begin ? _rl_comment_begin : RL_COMMENT_BEGIN_DEFAULT);
-
- /* completion-query-items */
- if (print_readably)
- fprintf (rl_outstream, "set completion-query-items %d\n", rl_completion_query_items);
- else
- fprintf (rl_outstream, "completion-query-items is set to `%d'\n", rl_completion_query_items);
-
- /* editing-mode */
- if (print_readably)
- fprintf (rl_outstream, "set editing-mode %s\n", (rl_editing_mode == emacs_mode) ? "emacs" : "vi");
- else
- fprintf (rl_outstream, "editing-mode is set to `%s'\n", (rl_editing_mode == emacs_mode) ? "emacs" : "vi");
-
- /* isearch-terminators */
- if (_rl_isearch_terminators)
+ for (i = 0; string_varlist[i].name; i++)
{
- char *disp;
-
- disp = _rl_untranslate_macro_value (_rl_isearch_terminators);
-
+ v = _rl_get_string_variable_value (string_varlist[i].name);
+ if (v == 0) /* _rl_isearch_terminators can be NULL */
+ continue;
if (print_readably)
- fprintf (rl_outstream, "set isearch-terminators \"%s\"\n", disp);
+ fprintf (rl_outstream, "set %s %s\n", string_varlist[i].name, v);
else
- fprintf (rl_outstream, "isearch-terminators is set to \"%s\"\n", disp);
-
- free (disp);
+ fprintf (rl_outstream, "%s is set to `%s'\n", string_varlist[i].name, v);
}
-
- /* keymap */
- kname = rl_get_keymap_name (_rl_keymap);
- if (kname == 0)
- kname = rl_get_keymap_name_from_edit_mode ();
- if (print_readably)
- fprintf (rl_outstream, "set keymap %s\n", kname ? kname : "none");
- else
- fprintf (rl_outstream, "keymap is set to `%s'\n", kname ? kname : "none");
}
/* Print all of the current variables and their values to
rl_outstream. If an explicit argument is given, then print
the output in such a way that it can be read back in. */
int
-rl_dump_variables(int count __attribute__((unused)), int key __attribute__((unused)))
+rl_dump_variables (count, key)
+ int count, key;
{
if (rl_dispatching)
fprintf (rl_outstream, "\r\n");
diff --git a/cmd-line-utils/readline/callback.c b/cmd-line-utils/readline/callback.c
index 0807f137b92..ada04d8593b 100644
--- a/cmd-line-utils/readline/callback.c
+++ b/cmd-line-utils/readline/callback.c
@@ -1,6 +1,6 @@
/* callback.c -- functions to use readline as an X `callback' mechanism. */
-/* Copyright (C) 1987, 1989, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2005 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -21,7 +21,9 @@
59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#define READLINE_LIBRARY
-#include "config_readline.h"
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
#include "rlconf.h"
@@ -41,10 +43,16 @@
#include "rldefs.h"
#include "readline.h"
#include "rlprivate.h"
+#include "xmalloc.h"
+
+/* Private data for callback registration functions. See comments in
+ rl_callback_read_char for more details. */
+_rl_callback_func_t *_rl_callback_func = 0;
+_rl_callback_generic_arg *_rl_callback_data = 0;
/* **************************************************************** */
/* */
-/* Callback Readline Functions */
+/* Callback Readline Functions */
/* */
/* **************************************************************** */
@@ -70,7 +78,8 @@ _rl_callback_newline ()
{
in_handler = 1;
- (*rl_prep_term_function) (_rl_meta_flag);
+ if (rl_prep_term_function)
+ (*rl_prep_term_function) (_rl_meta_flag);
#if defined (HANDLE_SIGNALS)
rl_set_signals ();
@@ -87,6 +96,7 @@ rl_callback_handler_install (prompt, linefunc)
rl_vcpfunc_t *linefunc;
{
rl_set_prompt (prompt);
+ RL_SETSTATE (RL_STATE_CALLBACK);
rl_linefunc = linefunc;
_rl_callback_newline ();
}
@@ -96,7 +106,8 @@ void
rl_callback_read_char ()
{
char *line;
- int eof;
+ int eof, jcode;
+ static procenv_t olevel;
if (rl_linefunc == NULL)
{
@@ -104,16 +115,89 @@ rl_callback_read_char ()
abort ();
}
- eof = readline_internal_char ();
+ memcpy ((void *)olevel, (void *)readline_top_level, sizeof (procenv_t));
+ jcode = setjmp (readline_top_level);
+ if (jcode)
+ {
+ (*rl_redisplay_function) ();
+ _rl_want_redisplay = 0;
+ memcpy ((void *)readline_top_level, (void *)olevel, sizeof (procenv_t));
+ return;
+ }
- /* We loop in case some function has pushed input back with rl_execute_next. */
- for (;;)
+ do
{
+ if (RL_ISSTATE (RL_STATE_ISEARCH))
+ {
+ eof = _rl_isearch_callback (_rl_iscxt);
+ if (eof == 0 && (RL_ISSTATE (RL_STATE_ISEARCH) == 0) && RL_ISSTATE (RL_STATE_INPUTPENDING))
+ rl_callback_read_char ();
+
+ return;
+ }
+ else if (RL_ISSTATE (RL_STATE_NSEARCH))
+ {
+ eof = _rl_nsearch_callback (_rl_nscxt);
+ return;
+ }
+ else if (RL_ISSTATE (RL_STATE_NUMERICARG))
+ {
+ eof = _rl_arg_callback (_rl_argcxt);
+ if (eof == 0 && (RL_ISSTATE (RL_STATE_NUMERICARG) == 0) && RL_ISSTATE (RL_STATE_INPUTPENDING))
+ rl_callback_read_char ();
+ /* XXX - this should handle _rl_last_command_was_kill better */
+ else if (RL_ISSTATE (RL_STATE_NUMERICARG) == 0)
+ _rl_internal_char_cleanup ();
+
+ return;
+ }
+ else if (RL_ISSTATE (RL_STATE_MULTIKEY))
+ {
+ eof = _rl_dispatch_callback (_rl_kscxt); /* For now */
+ while ((eof == -1 || eof == -2) && RL_ISSTATE (RL_STATE_MULTIKEY) && _rl_kscxt && (_rl_kscxt->flags & KSEQ_DISPATCHED))
+ eof = _rl_dispatch_callback (_rl_kscxt);
+ if (RL_ISSTATE (RL_STATE_MULTIKEY) == 0)
+ {
+ _rl_internal_char_cleanup ();
+ _rl_want_redisplay = 1;
+ }
+ }
+ else if (_rl_callback_func)
+ {
+ /* This allows functions that simply need to read an additional
+ character (like quoted-insert) to register a function to be
+ called when input is available. _rl_callback_data is simply a
+ pointer to a struct that has the argument count originally
+ passed to the registering function and space for any additional
+ parameters. */
+ eof = (*_rl_callback_func) (_rl_callback_data);
+ /* If the function `deregisters' itself, make sure the data is
+ cleaned up. */
+ if (_rl_callback_func == 0)
+ {
+ if (_rl_callback_data)
+ {
+ _rl_callback_data_dispose (_rl_callback_data);
+ _rl_callback_data = 0;
+ }
+ _rl_internal_char_cleanup ();
+ }
+ }
+ else
+ eof = readline_internal_char ();
+
+ if (rl_done == 0 && _rl_want_redisplay)
+ {
+ (*rl_redisplay_function) ();
+ _rl_want_redisplay = 0;
+ }
+
if (rl_done)
{
line = readline_internal_teardown (eof);
- (*rl_deprep_term_function) ();
+ if (rl_deprep_term_function)
+ (*rl_deprep_term_function) ();
#if defined (HANDLE_SIGNALS)
rl_clear_signals ();
#endif
@@ -129,11 +213,8 @@ rl_callback_read_char ()
if (in_handler == 0 && rl_linefunc)
_rl_callback_newline ();
}
- if (rl_pending_input || _rl_pushed_input_available ())
- eof = readline_internal_char ();
- else
- break;
}
+ while (rl_pending_input || _rl_pushed_input_available () || RL_ISSTATE (RL_STATE_MACROINPUT));
}
/* Remove the handler, and make sure the terminal is in its normal state. */
@@ -141,14 +222,37 @@ void
rl_callback_handler_remove ()
{
rl_linefunc = NULL;
+ RL_UNSETSTATE (RL_STATE_CALLBACK);
if (in_handler)
{
in_handler = 0;
- (*rl_deprep_term_function) ();
+ if (rl_deprep_term_function)
+ (*rl_deprep_term_function) ();
#if defined (HANDLE_SIGNALS)
rl_clear_signals ();
#endif
}
}
+_rl_callback_generic_arg *
+_rl_callback_data_alloc (count)
+ int count;
+{
+ _rl_callback_generic_arg *arg;
+
+ arg = (_rl_callback_generic_arg *)xmalloc (sizeof (_rl_callback_generic_arg));
+ arg->count = count;
+
+ arg->i1 = arg->i2 = 0;
+
+ return arg;
+}
+
+void _rl_callback_data_dispose (arg)
+ _rl_callback_generic_arg *arg;
+{
+ if (arg)
+ free (arg);
+}
+
#endif
diff --git a/cmd-line-utils/readline/chardefs.h b/cmd-line-utils/readline/chardefs.h
index 04a3b7a8e9c..def3a111bd3 100644
--- a/cmd-line-utils/readline/chardefs.h
+++ b/cmd-line-utils/readline/chardefs.h
@@ -59,11 +59,7 @@
#define largest_char 255 /* Largest character value. */
#define CTRL_CHAR(c) ((c) < control_character_threshold && (((c) & 0x80) == 0))
-#if largest_char >= 255
-#define META_CHAR(c) ((c) > meta_character_threshold)
-#else
#define META_CHAR(c) ((c) > meta_character_threshold && (c) <= largest_char)
-#endif
#define CTRL(c) ((c) & control_character_mask)
#define META(c) ((c) | meta_character_bit)
@@ -90,6 +86,8 @@
/* Some systems define these; we want our definitions. */
#undef ISPRINT
+/* Beware: these only work with single-byte ASCII characters. */
+
#define ISALNUM(c) (IN_CTYPE_DOMAIN (c) && isalnum (c))
#define ISALPHA(c) (IN_CTYPE_DOMAIN (c) && isalpha (c))
#define ISDIGIT(c) (IN_CTYPE_DOMAIN (c) && isdigit (c))
diff --git a/cmd-line-utils/readline/compat.c b/cmd-line-utils/readline/compat.c
index e4fbc322cee..a66d210fd2e 100644
--- a/cmd-line-utils/readline/compat.c
+++ b/cmd-line-utils/readline/compat.c
@@ -21,7 +21,9 @@
59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#define READLINE_LIBRARY
-#include "config_readline.h"
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
#include <stdio.h>
diff --git a/cmd-line-utils/readline/complete.c b/cmd-line-utils/readline/complete.c
index 526c1edb33d..a0232b2afdf 100644
--- a/cmd-line-utils/readline/complete.c
+++ b/cmd-line-utils/readline/complete.c
@@ -1,6 +1,6 @@
/* complete.c -- filename completion for readline. */
-/* Copyright (C) 1987-2004 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2005 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -21,18 +21,12 @@
59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#define READLINE_LIBRARY
-#if !defined(_XOPEN_SOURCE) && !defined(__FreeBSD__)
-#define _XOPEN_SOURCE 500
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
#endif
-#include "config_readline.h"
-
#include <sys/types.h>
-
-/* To get SuSE 9.3 to define wcwidth() (in wchar.h) */
-
#include <fcntl.h>
-
/* FreeBSD 5.3 will not declare u_int in sys/types.h, file.h needs it */
#if defined (HAVE_SYS_FILE_H) && !defined(__FreeBSD__)
# include <sys/file.h>
@@ -55,7 +49,9 @@
extern int errno;
#endif /* !errno */
+#if defined (HAVE_PWD_H)
#include <pwd.h>
+#endif
#include "posixdir.h"
#include "posixstat.h"
@@ -86,9 +82,9 @@ typedef int QSFUNC ();
/* Most systems don't declare getpwent in <pwd.h> if _POSIX_SOURCE is
defined. */
-#if !defined (HAVE_GETPW_DECLS) || defined (_POSIX_SOURCE)
+#if defined (HAVE_GETPWENT) && (!defined (HAVE_GETPW_DECLS) || defined (_POSIX_SOURCE))
extern struct passwd *getpwent PARAMS((void));
-#endif /* !HAVE_GETPW_DECLS || _POSIX_SOURCE */
+#endif /* HAVE_GETPWENT && (!HAVE_GETPW_DECLS || _POSIX_SOURCE) */
/* If non-zero, then this is the address of a function to call when
completing a word would normally display the list of possible matches.
@@ -213,7 +209,8 @@ int rl_completion_type = 0;
/* Up to this many items will be displayed in response to a
possible-completions call. After that, we ask the user if
- she is sure she wants to see them all. */
+ she is sure she wants to see them all. A negative value means
+ don't ask. */
int rl_completion_query_items = 100;
int _rl_page_completions = 1;
@@ -361,15 +358,15 @@ rl_complete (ignore, invoking_key)
/* List the possible completions. See description of rl_complete (). */
int
-rl_possible_completions (int ignore __attribute__((unused)),
- int invoking_key __attribute__((unused)))
+rl_possible_completions (ignore, invoking_key)
+ int ignore, invoking_key;
{
return (rl_complete_internal ('?'));
}
int
-rl_insert_completions (int ignore __attribute__((unused)),
- int invoking_key __attribute__((unused)))
+rl_insert_completions (ignore, invoking_key)
+ int ignore, invoking_key;
{
return (rl_complete_internal ('*'));
}
@@ -628,6 +625,8 @@ fnprint (to_print)
mbstate_t ps;
const char *end;
size_t tlen;
+ int width, w;
+ wchar_t wc;
end = to_print + strlen (to_print) + 1;
memset (&ps, 0, sizeof (mbstate_t));
@@ -660,21 +659,28 @@ fnprint (to_print)
else
{
#if defined (HANDLE_MULTIBYTE)
- tlen = mbrlen (s, end - s, &ps);
+ tlen = mbrtowc (&wc, s, end - s, &ps);
if (MB_INVALIDCH (tlen))
{
tlen = 1;
+ width = 1;
memset (&ps, 0, sizeof (mbstate_t));
}
else if (MB_NULLWCH (tlen))
break;
+ else
+ {
+ w = wcwidth (wc);
+ width = (w >= 0) ? w : 1;
+ }
fwrite (s, 1, tlen, rl_outstream);
s += tlen;
+ printed_len += width;
#else
putc (*s, rl_outstream);
s++;
-#endif
printed_len++;
+#endif
}
}
@@ -690,7 +696,7 @@ print_filename (to_print, full_pathname)
char *to_print, *full_pathname;
{
int printed_len, extension_char, slen, tlen;
- char *s, c, *new_full_pathname;
+ char *s, c, *new_full_pathname, *dn;
extension_char = 0;
printed_len = fnprint (to_print);
@@ -715,7 +721,17 @@ print_filename (to_print, full_pathname)
files in the root directory. If we pass a null string to the
bash directory completion hook, for example, it will expand it
to the current directory. We just want the `/'. */
- s = tilde_expand (full_pathname && *full_pathname ? full_pathname : "/");
+ if (full_pathname == 0 || *full_pathname == 0)
+ dn = "/";
+ else if (full_pathname[0] != '/')
+ dn = full_pathname;
+ else if (full_pathname[1] == 0)
+ dn = "//"; /* restore trailing slash to `//' */
+ else if (full_pathname[1] == '/' && full_pathname[2] == 0)
+ dn = "/"; /* don't turn /// into // */
+ else
+ dn = full_pathname;
+ s = tilde_expand (dn);
if (rl_directory_completion_hook)
(*rl_directory_completion_hook) (&s);
@@ -723,6 +739,10 @@ print_filename (to_print, full_pathname)
tlen = strlen (to_print);
new_full_pathname = (char *)xmalloc (slen + tlen + 2);
strcpy (new_full_pathname, s);
+ if (s[slen - 1] == '/')
+ slen--;
+ else
+ new_full_pathname[slen] = '/';
new_full_pathname[slen] = '/';
strcpy (new_full_pathname + slen + 1, to_print);
@@ -761,7 +781,10 @@ print_filename (to_print, full_pathname)
}
static char *
-rl_quote_filename (char *s, int rtype __attribute__((unused)), char *qcp)
+rl_quote_filename (s, rtype, qcp)
+ char *s;
+ int rtype;
+ char *qcp;
{
char *r;
@@ -811,14 +834,7 @@ _rl_find_completion_word (fp, dp)
quote substrings for the completer. Try to find the start
of an unclosed quoted substring. */
/* FOUND_QUOTE is set so we know what kind of quotes we found. */
-#if defined (HANDLE_MULTIBYTE)
- for (scan = pass_next = 0; scan < end;
- scan = ((MB_CUR_MAX == 1 || rl_byte_oriented)
- ? (scan + 1)
- : _rl_find_next_mbchar (rl_line_buffer, scan, 1, MB_FIND_ANY)))
-#else
- for (scan = pass_next = 0; scan < end; scan++)
-#endif
+ for (scan = pass_next = 0; scan < end; scan = MB_NEXTCHAR (rl_line_buffer, scan, 1, MB_FIND_ANY))
{
if (pass_next)
{
@@ -868,11 +884,7 @@ _rl_find_completion_word (fp, dp)
/* We didn't find an unclosed quoted substring upon which to do
completion, so use the word break characters to find the
substring on which to complete. */
-#if defined (HANDLE_MULTIBYTE)
- while ((rl_point = _rl_find_prev_mbchar (rl_line_buffer, rl_point, MB_FIND_ANY)))
-#else
- while (--rl_point)
-#endif
+ while (rl_point = MB_PREVCHAR (rl_line_buffer, rl_point, MB_FIND_ANY))
{
scan = rl_line_buffer[rl_point];
@@ -939,7 +951,7 @@ gen_completion_matches (text, start, end, our_func, found_quote, quote_char)
rl_compentry_func_t *our_func;
int found_quote, quote_char;
{
- char **matches, *temp;
+ char **matches;
rl_completion_found_quote = found_quote;
rl_completion_quote_character = quote_char;
@@ -958,21 +970,9 @@ gen_completion_matches (text, start, end, our_func, found_quote, quote_char)
}
}
- /* Beware -- we're stripping the quotes here. Do this only if we know
- we are doing filename completion and the application has defined a
- filename dequoting function. */
- temp = (char *)NULL;
-
- if (found_quote && our_func == rl_filename_completion_function &&
- rl_filename_dequoting_function)
- {
- /* delete single and double quotes */
- temp = (*rl_filename_dequoting_function) (text, quote_char);
- text = temp; /* not freeing text is not a memory leak */
- }
+ /* XXX -- filename dequoting moved into rl_filename_completion_function */
matches = rl_completion_matches (text, our_func);
- FREE (temp);
return matches;
}
@@ -1105,7 +1105,8 @@ compute_lcd_of_matches (match_list, matches, text)
#if defined (HANDLE_MULTIBYTE)
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
{
- mbstate_t ps_back = ps1;
+ mbstate_t ps_back;
+ ps_back = ps1;
if (!_rl_compare_chars (match_list[i], si, &ps1, match_list[i+1], si, &ps2))
break;
else if ((v = _rl_get_char_len (&match_list[i][si], &ps_back)) > 1)
@@ -1155,8 +1156,7 @@ compute_lcd_of_matches (match_list, matches, text)
rl_completion_found_quote &&
rl_filename_quoting_desired)
{
- dtext = (*rl_filename_dequoting_function)
- ((char*) text, rl_completion_quote_character);
+ dtext = (*rl_filename_dequoting_function) ((char *)text, rl_completion_quote_character);
text = dtext;
}
@@ -1402,7 +1402,7 @@ display_matches (matches)
/* If there are many items, then ask the user if she really wants to
see them all. */
- if (len >= rl_completion_query_items)
+ if (rl_completion_query_items > 0 && len >= rl_completion_query_items)
{
rl_crlf ();
fprintf (rl_outstream, "Display all %d possibilities? (y or n)", len);
@@ -1539,7 +1539,7 @@ append_to_match (text, delimiter, quote_char, nontrivial_match)
: stat (filename, &finfo);
if (s == 0 && S_ISDIR (finfo.st_mode))
{
- if (_rl_complete_mark_directories)
+ if (_rl_complete_mark_directories /* && rl_completion_suppress_append == 0 */)
{
/* This is clumsy. Avoid putting in a double slash if point
is at the end of the line and the previous character is a
@@ -1803,7 +1803,7 @@ rl_completion_matches (text, entry_function)
match_list = (char **)xmalloc ((match_list_size + 1) * sizeof (char *));
match_list[1] = (char *)NULL;
- while ((string = (*entry_function) (text, matches)))
+ while (string = (*entry_function) (text, matches))
{
if (matches + 1 == match_list_size)
match_list = (char **)xrealloc
@@ -1853,16 +1853,20 @@ rl_username_completion_function (text, state)
setpwent ();
}
- while ((entry = getpwent ()))
+#if defined (HAVE_GETPWENT)
+ while (entry = getpwent ())
{
/* Null usernames should result in all users as possible completions. */
if (namelen == 0 || (STREQN (username, entry->pw_name, namelen)))
break;
}
+#endif
if (entry == 0)
{
+#if defined (HAVE_GETPWENT)
endpwent ();
+#endif
return ((char *)NULL);
}
else
@@ -1960,13 +1964,30 @@ rl_filename_completion_function (text, state)
if (rl_directory_rewrite_hook)
(*rl_directory_rewrite_hook) (&dirname);
+ /* The directory completion hook should perform any necessary
+ dequoting. */
if (rl_directory_completion_hook && (*rl_directory_completion_hook) (&dirname))
{
free (users_dirname);
users_dirname = savestring (dirname);
}
-
+ else if (rl_completion_found_quote && rl_filename_dequoting_function)
+ {
+ /* delete single and double quotes */
+ temp = (*rl_filename_dequoting_function) (users_dirname, rl_completion_quote_character);
+ free (users_dirname);
+ users_dirname = temp;
+ }
directory = opendir (dirname);
+
+ /* Now dequote a non-null filename. */
+ if (filename && *filename && rl_completion_found_quote && rl_filename_dequoting_function)
+ {
+ /* delete single and double quotes */
+ temp = (*rl_filename_dequoting_function) (filename, rl_completion_quote_character);
+ free (filename);
+ filename = temp;
+ }
filename_len = strlen (filename);
rl_filename_completion_desired = 1;
@@ -2089,7 +2110,8 @@ rl_filename_completion_function (text, state)
hit the end of the match list, we restore the original unmatched text,
ring the bell, and reset the counter to zero. */
int
-rl_menu_complete (int count, int ignore __attribute__((unused)))
+rl_menu_complete (count, ignore)
+ int count, ignore;
{
rl_compentry_func_t *our_func;
int matching_filenames, found_quote;
@@ -2173,9 +2195,11 @@ rl_menu_complete (int count, int ignore __attribute__((unused)))
return (0);
}
- match_list_index = (match_list_index + count) % match_list_size;
+ match_list_index += count;
if (match_list_index < 0)
match_list_index += match_list_size;
+ else
+ match_list_index %= match_list_size;
if (match_list_index == 0 && match_list_size > 1)
{
diff --git a/cmd-line-utils/readline/configure.in b/cmd-line-utils/readline/configure.in
index 31e17606024..868773be696 100644
--- a/cmd-line-utils/readline/configure.in
+++ b/cmd-line-utils/readline/configure.in
@@ -4,9 +4,27 @@ dnl
dnl report bugs to chet@po.cwru.edu
dnl
dnl Process this file with autoconf to produce a configure script.
-AC_REVISION([for Readline 5.0, version 2.52, from autoconf version] AC_ACVERSION)
-AC_INIT(readline, 5.0-rc1, bug-readline@gnu.org)
+# Copyright (C) 1987-2005 Free Software Foundation, 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; either version 2, or (at your option)
+# any later version.
+
+# 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.
+
+AC_REVISION([for Readline 5.2, version 2.61])
+
+AC_INIT(readline, 5.2, bug-readline@gnu.org)
dnl make sure we are using a recent autoconf version
AC_PREREQ(2.50)
@@ -16,20 +34,28 @@ AC_CONFIG_AUX_DIR(./support)
AC_CONFIG_HEADERS(config.h)
dnl update the value of RL_READLINE_VERSION in readline.h when this changes
-LIBVERSION=5.0
+LIBVERSION=5.2
AC_CANONICAL_HOST
dnl configure defaults
opt_curses=no
+opt_purify=no
dnl arguments to configure
AC_ARG_WITH(curses, AC_HELP_STRING([--with-curses], [use the curses library instead of the termcap library]), opt_curses=$withval)
+AC_ARG_WITH(purify, AC_HELP_STRING([--with-purify], [configure to postprocess with purify]), opt_purify=$withval)
if test "$opt_curses" = "yes"; then
prefer_curses=yes
fi
+if test "$opt_purify" = yes; then
+ PURIFY="purify"
+else
+ PURIFY=
+fi
+
dnl option parsing for optional features
opt_multibyte=yes
opt_static_libs=yes
@@ -43,6 +69,36 @@ if test $opt_multibyte = no; then
AC_DEFINE(NO_MULTIBYTE_SUPPORT)
fi
+dnl load up the cross-building cache file -- add more cases and cache
+dnl files as necessary
+
+dnl Note that host and target machine are the same, and different than the
+dnl build machine.
+
+CROSS_COMPILE=
+if test "x$cross_compiling" = "xyes"; then
+ case "${host}" in
+ *-cygwin*)
+ cross_cache=${srcdir}/cross-build/cygwin.cache
+ ;;
+ *-mingw*)
+ cross_cache=${srcdir}/cross-build/mingw.cache
+ ;;
+ i[[3456]]86-*-beos*)
+ cross_cache=${srcdir}/cross-build/x86-beos.cache
+ ;;
+ *) echo "configure: cross-compiling for $host is not supported" >&2
+ ;;
+ esac
+ if test -n "${cross_cache}" && test -r "${cross_cache}"; then
+ echo "loading cross-build cache file ${cross_cache}"
+ . ${cross_cache}
+ fi
+ unset cross_cache
+ CROSS_COMPILE='-DCROSS_COMPILING'
+ AC_SUBST(CROSS_COMPILE)
+fi
+
echo ""
echo "Beginning configuration for readline-$LIBVERSION for ${host_cpu}-${host_vendor}-${host_os}"
echo ""
@@ -83,14 +139,24 @@ AC_HEADER_STDC
AC_HEADER_STAT
AC_HEADER_DIRENT
-AC_CHECK_FUNCS(lstat memmove putenv select setenv setlocale \
- strcasecmp strpbrk tcgetattr vsnprintf isascii isxdigit)
+AC_CHECK_FUNCS(fcntl kill lstat)
+AC_CHECK_FUNCS(memmove putenv select setenv setlocale \
+ strcasecmp strpbrk tcgetattr vsnprintf)
+AC_CHECK_FUNCS(isascii isxdigit)
+AC_CHECK_FUNCS(getpwent getpwnam getpwuid)
AC_FUNC_STRCOLL
-AC_CHECK_HEADERS(unistd.h stdlib.h varargs.h stdarg.h string.h strings.h \
- limits.h sys/ptem.h sys/pte.h sys/stream.h sys/select.h \
- termcap.h termios.h termio.h sys/file.h locale.h memory.h )
+AC_CHECK_HEADERS(fcntl.h unistd.h stdlib.h varargs.h stdarg.h string.h strings.h \
+ limits.h locale.h pwd.h memory.h termcap.h termios.h termio.h)
+AC_CHECK_HEADERS(sys/pte.h sys/stream.h sys/select.h sys/file.h)
+
+AC_CHECK_HEADERS(sys/ptem.h,,,
+[[
+#if HAVE_SYS_STREAM_H
+# include <sys/stream.h>
+#endif
+]])
BASH_SYS_SIGNAL_VINTAGE
BASH_SYS_REINSTALL_SIGHANDLERS
@@ -143,7 +209,13 @@ esac
#
if test -f ${srcdir}/support/shobj-conf; then
AC_MSG_CHECKING(configuration for building shared libraries)
- eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c ${host_cpu} -o ${host_os} -v ${host_vendor}`
+ eval `TERMCAP_LIB=$TERMCAP_LIB ${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c ${host_cpu} -o ${host_os} -v ${host_vendor}`
+
+# case "$SHLIB_LIBS" in
+# *curses*|*termcap*|*termlib*) ;;
+# *) SHLIB_LIBS="$SHLIB_LIBS $TERMCAP_LIB" ;;
+# esac
+
AC_SUBST(SHOBJ_CC)
AC_SUBST(SHOBJ_CFLAGS)
AC_SUBST(SHOBJ_LD)
@@ -153,8 +225,11 @@ if test -f ${srcdir}/support/shobj-conf; then
AC_SUBST(SHOBJ_STATUS)
AC_SUBST(SHLIB_STATUS)
AC_SUBST(SHLIB_XLDFLAGS)
+ AC_SUBST(SHLIB_DOT)
+ AC_SUBST(SHLIB_LIBPREF)
AC_SUBST(SHLIB_LIBSUFF)
AC_SUBST(SHLIB_LIBVERSION)
+ AC_SUBST(SHLIB_DLLVERSION)
AC_SUBST(SHLIB_LIBS)
AC_MSG_RESULT($SHLIB_STATUS)
@@ -191,6 +266,12 @@ msdosdjgpp*) BUILD_DIR=`pwd.exe` ;; # to prevent //d/path/file
*) BUILD_DIR=`pwd` ;;
esac
+case "$BUILD_DIR" in
+*\ *) BUILD_DIR=`echo "$BUILD_DIR" | sed 's: :\\\\ :g'` ;;
+*) ;;
+esac
+
+AC_SUBST(PURIFY)
AC_SUBST(BUILD_DIR)
AC_SUBST(CFLAGS)
diff --git a/cmd-line-utils/readline/display.c b/cmd-line-utils/readline/display.c
index 06cac3bfd32..47ff0615974 100644
--- a/cmd-line-utils/readline/display.c
+++ b/cmd-line-utils/readline/display.c
@@ -1,6 +1,6 @@
/* display.c -- readline redisplay facility. */
-/* Copyright (C) 1987-2004 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2006 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -21,16 +21,12 @@
59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#define READLINE_LIBRARY
-#ifndef _XOPEN_SOURCE
-#define _XOPEN_SOURCE 500
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
#endif
-#include "config_readline.h"
-
#include <sys/types.h>
-/* To get SuSE 9.3 to define wcwidth() (in wchar.h) */
-
#if defined (HAVE_UNISTD_H)
# include <unistd.h>
#endif /* HAVE_UNISTD_H */
@@ -63,10 +59,6 @@
extern char *strchr (), *strrchr ();
#endif /* !strchr && !__STDC__ */
-#if defined (HACK_TERMCAP_MOTION)
-extern char *_rl_term_forward_char;
-#endif
-
static void update_line PARAMS((char *, char *, int, int, int, int));
static void space_to_eol PARAMS((int));
static void delete_chars PARAMS((int));
@@ -84,9 +76,18 @@ static int *inv_lbreaks, *vis_lbreaks;
static int inv_lbsize, vis_lbsize;
/* Heuristic used to decide whether it is faster to move from CUR to NEW
- by backing up or outputting a carriage return and moving forward. */
+ by backing up or outputting a carriage return and moving forward. CUR
+ and NEW are either both buffer positions or absolute screen positions. */
#define CR_FASTER(new, cur) (((new) + 1) < ((cur) - (new)))
+/* _rl_last_c_pos is an absolute cursor position in multibyte locales and a
+ buffer index in others. This macro is used when deciding whether the
+ current cursor position is in the middle of a prompt string containing
+ invisible characters. */
+#define PROMPT_ENDING_INDEX \
+ ((MB_CUR_MAX > 1 && rl_byte_oriented == 0) ? prompt_physical_chars : prompt_last_invisible+1)
+
+
/* **************************************************************** */
/* */
/* Display stuff */
@@ -122,16 +123,25 @@ rl_voidfunc_t *rl_redisplay_function = rl_redisplay;
int rl_display_fixed = 0;
int _rl_suppress_redisplay = 0;
+int _rl_want_redisplay = 0;
/* The stuff that gets printed out before the actual text of the line.
This is usually pointing to rl_prompt. */
char *rl_display_prompt = (char *)NULL;
/* Pseudo-global variables declared here. */
+
/* The visible cursor position. If you print some text, adjust this. */
+/* NOTE: _rl_last_c_pos is used as a buffer index when not in a locale
+ supporting multibyte characters, and an absolute cursor position when
+ in such a locale. This is an artifact of the donated multibyte support.
+ Care must be taken when modifying its value. */
int _rl_last_c_pos = 0;
int _rl_last_v_pos = 0;
+static int cpos_adjusted;
+static int cpos_buffer_position;
+
/* Number of lines currently on screen minus 1. */
int _rl_vis_botlin = 0;
@@ -158,6 +168,7 @@ static int line_size = 1024;
include invisible characters. */
static char *local_prompt, *local_prompt_prefix;
+static int local_prompt_len;
static int prompt_visible_length, prompt_prefix_length;
/* The number of invisible characters in the line currently being
@@ -184,6 +195,19 @@ static int prompt_last_screen_line;
static int prompt_physical_chars;
+/* Variables to save and restore prompt and display information. */
+
+/* These are getting numerous enough that it's time to create a struct. */
+
+static char *saved_local_prompt;
+static char *saved_local_prefix;
+static int saved_last_invisible;
+static int saved_visible_length;
+static int saved_prefix_length;
+static int saved_local_length;
+static int saved_invis_chars_first_line;
+static int saved_physical_chars;
+
/* Expand the prompt string S and return the number of visible
characters in *LP, if LP is not null. This is currently more-or-less
a placeholder for expansion. LIP, if non-null is a place to store the
@@ -204,8 +228,8 @@ expand_prompt (pmt, lp, lip, niflp, vlp)
char *pmt;
int *lp, *lip, *niflp, *vlp;
{
- char *r, *ret, *p;
- int l, rl, last, ignoring, ninvis, invfl, ind, pind, physchars;
+ char *r, *ret, *p, *igstart;
+ int l, rl, last, ignoring, ninvis, invfl, invflset, ind, pind, physchars;
/* Short-circuit if we can. */
if ((MB_CUR_MAX <= 1 || rl_byte_oriented) && strchr (pmt, RL_PROMPT_START_IGNORE) == 0)
@@ -218,7 +242,7 @@ expand_prompt (pmt, lp, lip, niflp, vlp)
if (niflp)
*niflp = 0;
if (vlp)
- *vlp = lp ? *lp : (int) strlen (r);
+ *vlp = lp ? *lp : strlen (r);
return r;
}
@@ -226,20 +250,24 @@ expand_prompt (pmt, lp, lip, niflp, vlp)
r = ret = (char *)xmalloc (l + 1);
invfl = 0; /* invisible chars in first line of prompt */
+ invflset = 0; /* we only want to set invfl once */
+ igstart = 0;
for (rl = ignoring = last = ninvis = physchars = 0, p = pmt; p && *p; p++)
{
/* This code strips the invisible character string markers
RL_PROMPT_START_IGNORE and RL_PROMPT_END_IGNORE */
- if (*p == RL_PROMPT_START_IGNORE)
+ if (ignoring == 0 && *p == RL_PROMPT_START_IGNORE) /* XXX - check ignoring? */
{
- ignoring++;
+ ignoring = 1;
+ igstart = p;
continue;
}
else if (ignoring && *p == RL_PROMPT_END_IGNORE)
{
ignoring = 0;
- last = r - ret - 1;
+ if (p != (igstart + 1))
+ last = r - ret - 1;
continue;
}
else
@@ -253,7 +281,10 @@ expand_prompt (pmt, lp, lip, niflp, vlp)
while (l--)
*r++ = *p++;
if (!ignoring)
- rl += ind - pind;
+ {
+ rl += ind - pind;
+ physchars += _rl_col_width (pmt, pind, ind);
+ }
else
ninvis += ind - pind;
p--; /* compensate for later increment */
@@ -263,16 +294,19 @@ expand_prompt (pmt, lp, lip, niflp, vlp)
{
*r++ = *p;
if (!ignoring)
- rl++; /* visible length byte counter */
+ {
+ rl++; /* visible length byte counter */
+ physchars++;
+ }
else
ninvis++; /* invisible chars byte counter */
}
- if (rl >= _rl_screenwidth)
- invfl = ninvis;
-
- if (ignoring == 0)
- physchars++;
+ if (invflset == 0 && rl >= _rl_screenwidth)
+ {
+ invfl = ninvis;
+ invflset = 1;
+ }
}
}
@@ -332,7 +366,9 @@ rl_expand_prompt (prompt)
FREE (local_prompt_prefix);
local_prompt = local_prompt_prefix = (char *)0;
- prompt_last_invisible = prompt_visible_length = 0;
+ local_prompt_len = 0;
+ prompt_last_invisible = prompt_invis_chars_first_line = 0;
+ prompt_visible_length = prompt_physical_chars = 0;
if (prompt == 0 || *prompt == 0)
return (0);
@@ -346,6 +382,7 @@ rl_expand_prompt (prompt)
&prompt_invis_chars_first_line,
&prompt_physical_chars);
local_prompt_prefix = (char *)0;
+ local_prompt_len = local_prompt ? strlen (local_prompt) : 0;
return (prompt_visible_length);
}
else
@@ -355,15 +392,16 @@ rl_expand_prompt (prompt)
local_prompt = expand_prompt (p, &prompt_visible_length,
&prompt_last_invisible,
(int *)NULL,
- (int *)NULL);
+ &prompt_physical_chars);
c = *t; *t = '\0';
/* The portion of the prompt string up to and including the
final newline is now null-terminated. */
local_prompt_prefix = expand_prompt (prompt, &prompt_prefix_length,
(int *)NULL,
&prompt_invis_chars_first_line,
- &prompt_physical_chars);
+ (int *)NULL);
*t = c;
+ local_prompt_len = local_prompt ? strlen (local_prompt) : 0;
return (prompt_prefix_length);
}
}
@@ -420,13 +458,13 @@ rl_redisplay ()
{
register int in, out, c, linenum, cursor_linenum;
register char *line;
- int c_pos, inv_botlin, lb_botlin, lb_linenum;
- int newlines, lpos, temp, modmark;
+ int inv_botlin, lb_botlin, lb_linenum, o_cpos;
+ int newlines, lpos, temp, modmark, n0, num;
char *prompt_this_line;
#if defined (HANDLE_MULTIBYTE)
wchar_t wc;
size_t wc_bytes;
- int wc_width= 0;
+ int wc_width;
mbstate_t ps;
int _rl_wrapped_multicolumn = 0;
#endif
@@ -435,16 +473,16 @@ rl_redisplay ()
return;
if (!rl_display_prompt)
- rl_display_prompt = (char*) "";
+ rl_display_prompt = "";
- if (invisible_line == 0)
+ if (invisible_line == 0 || vis_lbreaks == 0)
{
init_line_structures (0);
rl_on_new_line ();
}
/* Draw the line into the buffer. */
- c_pos = -1;
+ cpos_buffer_position = -1;
line = invisible_line;
out = inv_botlin = 0;
@@ -471,24 +509,23 @@ rl_redisplay ()
number of non-visible characters in the prompt string. */
if (rl_display_prompt == rl_prompt || local_prompt)
{
- int local_len = local_prompt ? strlen (local_prompt) : 0;
if (local_prompt_prefix && forced_display)
_rl_output_some_chars (local_prompt_prefix, strlen (local_prompt_prefix));
- if (local_len > 0)
+ if (local_prompt_len > 0)
{
- temp = local_len + out + 2;
+ temp = local_prompt_len + out + 2;
if (temp >= line_size)
{
line_size = (temp + 1024) - (temp % 1024);
visible_line = (char *)xrealloc (visible_line, line_size);
line = invisible_line = (char *)xrealloc (invisible_line, line_size);
}
- strncpy (line + out, local_prompt, local_len);
- out += local_len;
+ strncpy (line + out, local_prompt, local_prompt_len);
+ out += local_prompt_len;
}
line[out] = '\0';
- wrap_offset = local_len - prompt_visible_length;
+ wrap_offset = local_prompt_len - prompt_visible_length;
}
else
{
@@ -524,17 +561,6 @@ rl_redisplay ()
wrap_offset = prompt_invis_chars_first_line = 0;
}
-#if defined (HANDLE_MULTIBYTE)
-#define CHECK_INV_LBREAKS() \
- do { \
- if (newlines >= (inv_lbsize - 2)) \
- { \
- inv_lbsize *= 2; \
- inv_lbreaks = (int *)xrealloc (inv_lbreaks, inv_lbsize * sizeof (int)); \
- _rl_wrapped_line = (int *)xrealloc (_rl_wrapped_line, inv_lbsize * sizeof (int)); \
- } \
- } while (0)
-#else
#define CHECK_INV_LBREAKS() \
do { \
if (newlines >= (inv_lbsize - 2)) \
@@ -543,7 +569,6 @@ rl_redisplay ()
inv_lbreaks = (int *)xrealloc (inv_lbreaks, inv_lbsize * sizeof (int)); \
} \
} while (0)
-#endif
#if defined (HANDLE_MULTIBYTE)
#define CHECK_LPOS() \
@@ -589,6 +614,7 @@ rl_redisplay ()
#if defined (HANDLE_MULTIBYTE)
memset (_rl_wrapped_line, 0, vis_lbsize);
+ num = 0;
#endif
/* prompt_invis_chars_first_line is the number of invisible characters in
@@ -600,6 +626,7 @@ rl_redisplay ()
contents of the command line? */
while (lpos >= _rl_screenwidth)
{
+ int z;
/* fix from Darin Johnson <darin@acuson.com> for prompt string with
invisible characters that is longer than the screen width. The
prompt_invis_chars_first_line variable could be made into an array
@@ -607,19 +634,47 @@ rl_redisplay ()
probably too much work for the benefit gained. How many people have
prompts that exceed two physical lines?
Additional logic fix from Edward Catmur <ed@catmur.co.uk> */
- temp = ((newlines + 1) * _rl_screenwidth) +
- ((local_prompt_prefix == 0) ? ((newlines == 0) ? prompt_invis_chars_first_line
- : ((newlines == 1) ? wrap_offset : 0))
- : ((newlines == 0) ? wrap_offset :0));
+#if defined (HANDLE_MULTIBYTE)
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ {
+ n0 = num;
+ temp = local_prompt_len;
+ while (num < temp)
+ {
+ z = _rl_col_width (local_prompt, n0, num);
+ if (z > _rl_screenwidth)
+ {
+ num = _rl_find_prev_mbchar (local_prompt, num, MB_FIND_ANY);
+ break;
+ }
+ else if (z == _rl_screenwidth)
+ break;
+ num++;
+ }
+ temp = num;
+ }
+ else
+#endif /* !HANDLE_MULTIBYTE */
+ temp = ((newlines + 1) * _rl_screenwidth);
+
+ /* Now account for invisible characters in the current line. */
+ temp += ((local_prompt_prefix == 0) ? ((newlines == 0) ? prompt_invis_chars_first_line
+ : ((newlines == 1) ? wrap_offset : 0))
+ : ((newlines == 0) ? wrap_offset :0));
inv_lbreaks[++newlines] = temp;
- lpos -= _rl_screenwidth;
+#if defined (HANDLE_MULTIBYTE)
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ lpos -= _rl_col_width (local_prompt, n0, num);
+ else
+#endif
+ lpos -= _rl_screenwidth;
}
prompt_last_screen_line = newlines;
/* Draw the rest of the line (after the prompt) into invisible_line, keeping
- track of where the cursor is (c_pos), the number of the line containing
+ track of where the cursor is (cpos_buffer_position), the number of the line containing
the cursor (lb_linenum), the last line number (lb_botlin and inv_botlin).
It maintains an array of line breaks for display (inv_lbreaks).
This handles expanding tabs for display and displaying meta characters. */
@@ -672,7 +727,7 @@ rl_redisplay ()
if (in == rl_point)
{
- c_pos = out;
+ cpos_buffer_position = out;
lb_linenum = newlines;
}
@@ -766,10 +821,10 @@ rl_redisplay ()
}
if (in == rl_point)
{
- c_pos = out;
+ cpos_buffer_position = out;
lb_linenum = newlines;
}
- for (i = in; i < (int) (in+wc_bytes); i++)
+ for (i = in; i < in+wc_bytes; i++)
line[out++] = rl_line_buffer[i];
for (i = 0; i < wc_width; i++)
CHECK_LPOS();
@@ -797,9 +852,9 @@ rl_redisplay ()
}
line[out] = '\0';
- if (c_pos < 0)
+ if (cpos_buffer_position < 0)
{
- c_pos = out;
+ cpos_buffer_position = out;
lb_linenum = newlines;
}
@@ -808,7 +863,7 @@ rl_redisplay ()
inv_lbreaks[newlines+1] = out;
cursor_linenum = lb_linenum;
- /* C_POS == position in buffer where cursor should be placed.
+ /* CPOS_BUFFER_POSITION == position in buffer where cursor should be placed.
CURSOR_LINENUM == line number where the cursor should be placed. */
/* PWP: now is when things get a bit hairy. The visible and invisible
@@ -822,7 +877,7 @@ rl_redisplay ()
if (_rl_horizontal_scroll_mode == 0 && _rl_term_up && *_rl_term_up)
{
- int nleft, pos, changed_screen_line;
+ int nleft, pos, changed_screen_line, tx;
if (!rl_display_fixed || forced_display)
{
@@ -847,15 +902,38 @@ rl_redisplay ()
#define VIS_LLEN(l) ((l) > _rl_vis_botlin ? 0 : (vis_lbreaks[l+1] - vis_lbreaks[l]))
#define INV_LLEN(l) (inv_lbreaks[l+1] - inv_lbreaks[l])
#define VIS_CHARS(line) (visible_line + vis_lbreaks[line])
-#define VIS_LINE(line) ((line) > _rl_vis_botlin) ? (char*) "" : VIS_CHARS(line)
+#define VIS_LINE(line) ((line) > _rl_vis_botlin) ? "" : VIS_CHARS(line)
#define INV_LINE(line) (invisible_line + inv_lbreaks[line])
/* For each line in the buffer, do the updating display. */
for (linenum = 0; linenum <= inv_botlin; linenum++)
{
+ /* This can lead us astray if we execute a program that changes
+ the locale from a non-multibyte to a multibyte one. */
+ o_cpos = _rl_last_c_pos;
+ cpos_adjusted = 0;
update_line (VIS_LINE(linenum), INV_LINE(linenum), linenum,
VIS_LLEN(linenum), INV_LLEN(linenum), inv_botlin);
+ /* update_line potentially changes _rl_last_c_pos, but doesn't
+ take invisible characters into account, since _rl_last_c_pos
+ is an absolute cursor position in a multibyte locale. See
+ if compensating here is the right thing, or if we have to
+ change update_line itself. There is one case in which
+ update_line adjusts _rl_last_c_pos itself (so it can pass
+ _rl_move_cursor_relative accurate values); it communicates
+ this back by setting cpos_adjusted. If we assume that
+ _rl_last_c_pos is correct (an absolute cursor position) each
+ time update_line is called, then we can assume in our
+ calculations that o_cpos does not need to be adjusted by
+ wrap_offset. */
+ if (linenum == 0 && (MB_CUR_MAX > 1 && rl_byte_oriented == 0) &&
+ cpos_adjusted == 0 &&
+ _rl_last_c_pos != o_cpos &&
+ _rl_last_c_pos > wrap_offset &&
+ o_cpos < prompt_last_invisible)
+ _rl_last_c_pos -= wrap_offset;
+
/* If this is the line with the prompt, we might need to
compensate for invisible characters in the new line. Do
this only if there is not more than one new line (which
@@ -867,7 +945,10 @@ rl_redisplay ()
(wrap_offset > visible_wrap_offset) &&
(_rl_last_c_pos < visible_first_line_len))
{
- nleft = _rl_screenwidth + wrap_offset - _rl_last_c_pos;
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ nleft = _rl_screenwidth - _rl_last_c_pos;
+ else
+ nleft = _rl_screenwidth + wrap_offset - _rl_last_c_pos;
if (nleft)
_rl_clear_to_eol (nleft);
}
@@ -888,7 +969,7 @@ rl_redisplay ()
_rl_move_vert (linenum);
_rl_move_cursor_relative (0, tt);
_rl_clear_to_eol
- ((linenum == _rl_vis_botlin) ? (int) strlen (tt) : _rl_screenwidth);
+ ((linenum == _rl_vis_botlin) ? strlen (tt) : _rl_screenwidth);
}
}
_rl_vis_botlin = inv_botlin;
@@ -903,7 +984,7 @@ rl_redisplay ()
the physical cursor position on the screen stays the same,
but the buffer position needs to be adjusted to account
for invisible characters. */
- if (cursor_linenum == 0 && wrap_offset)
+ if ((MB_CUR_MAX == 1 || rl_byte_oriented) && cursor_linenum == 0 && wrap_offset)
_rl_last_c_pos += wrap_offset;
}
@@ -914,7 +995,11 @@ rl_redisplay ()
invisible character in the prompt string. */
nleft = prompt_visible_length + wrap_offset;
if (cursor_linenum == 0 && wrap_offset > 0 && _rl_last_c_pos > 0 &&
- _rl_last_c_pos <= prompt_last_invisible && local_prompt)
+#if 0
+ _rl_last_c_pos <= PROMPT_ENDING_INDEX && local_prompt)
+#else
+ _rl_last_c_pos < PROMPT_ENDING_INDEX && local_prompt)
+#endif
{
#if defined (__MSDOS__)
putc ('\r', rl_outstream);
@@ -924,7 +1009,7 @@ rl_redisplay ()
#endif
_rl_output_some_chars (local_prompt, nleft);
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- _rl_last_c_pos = _rl_col_width (local_prompt, 0, nleft);
+ _rl_last_c_pos = _rl_col_width (local_prompt, 0, nleft) - wrap_offset;
else
_rl_last_c_pos = nleft;
}
@@ -933,21 +1018,35 @@ rl_redisplay ()
in the buffer? */
pos = inv_lbreaks[cursor_linenum];
/* nleft == number of characters in the line buffer between the
- start of the line and the cursor position. */
- nleft = c_pos - pos;
+ start of the line and the desired cursor position. */
+ nleft = cpos_buffer_position - pos;
+
+ /* NLEFT is now a number of characters in a buffer. When in a
+ multibyte locale, however, _rl_last_c_pos is an absolute cursor
+ position that doesn't take invisible characters in the prompt
+ into account. We use a fudge factor to compensate. */
/* Since _rl_backspace() doesn't know about invisible characters in the
prompt, and there's no good way to tell it, we compensate for
those characters here and call _rl_backspace() directly. */
if (wrap_offset && cursor_linenum == 0 && nleft < _rl_last_c_pos)
{
- _rl_backspace (_rl_last_c_pos - nleft);
+ /* TX == new physical cursor position in multibyte locale. */
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- _rl_last_c_pos = _rl_col_width (&visible_line[pos], 0, nleft);
+ tx = _rl_col_width (&visible_line[pos], 0, nleft) - visible_wrap_offset;
else
- _rl_last_c_pos = nleft;
+ tx = nleft;
+ if (_rl_last_c_pos > tx)
+ {
+ _rl_backspace (_rl_last_c_pos - tx); /* XXX */
+ _rl_last_c_pos = tx;
+ }
}
+ /* We need to note that in a multibyte locale we are dealing with
+ _rl_last_c_pos as an absolute cursor position, but moving to a
+ point specified by a buffer position (NLEFT) that doesn't take
+ invisible characters into account. */
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
_rl_move_cursor_relative (nleft, &invisible_line[pos]);
else if (nleft != _rl_last_c_pos)
@@ -966,11 +1065,11 @@ rl_redisplay ()
will be LMARGIN. */
/* The number of characters that will be displayed before the cursor. */
- ndisp = c_pos - wrap_offset;
+ ndisp = cpos_buffer_position - wrap_offset;
nleft = prompt_visible_length + wrap_offset;
/* Where the new cursor position will be on the screen. This can be
longer than SCREENWIDTH; if it is, lmargin will be adjusted. */
- phys_c_pos = c_pos - (last_lmargin ? last_lmargin : wrap_offset);
+ phys_c_pos = cpos_buffer_position - (last_lmargin ? last_lmargin : wrap_offset);
t = _rl_screenwidth / 3;
/* If the number of characters had already exceeded the screenwidth,
@@ -981,7 +1080,7 @@ rl_redisplay ()
two-thirds of the way across the screen. */
if (phys_c_pos > _rl_screenwidth - 2)
{
- lmargin = c_pos - (2 * t);
+ lmargin = cpos_buffer_position - (2 * t);
if (lmargin < 0)
lmargin = 0;
/* If the left margin would be in the middle of a prompt with
@@ -995,7 +1094,7 @@ rl_redisplay ()
{
/* If we are moving back towards the beginning of the line and
the last margin is no longer correct, compute a new one. */
- lmargin = ((c_pos - 1) / t) * t; /* XXX */
+ lmargin = ((cpos_buffer_position - 1) / t) * t; /* XXX */
if (wrap_offset && lmargin > 0 && lmargin < nleft)
lmargin = nleft;
}
@@ -1040,7 +1139,7 @@ rl_redisplay ()
if (visible_first_line_len > _rl_screenwidth)
visible_first_line_len = _rl_screenwidth;
- _rl_move_cursor_relative (c_pos - lmargin, &invisible_line[lmargin]);
+ _rl_move_cursor_relative (cpos_buffer_position - lmargin, &invisible_line[lmargin]);
last_lmargin = lmargin;
}
}
@@ -1106,7 +1205,10 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
the exact cursor position and cut-and-paste with certain terminal
emulators. In this calculation, TEMP is the physical screen
position of the cursor. */
- temp = _rl_last_c_pos - W_OFFSET(_rl_last_v_pos, visible_wrap_offset);
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ temp = _rl_last_c_pos;
+ else
+ temp = _rl_last_c_pos - W_OFFSET(_rl_last_v_pos, visible_wrap_offset);
if (temp == _rl_screenwidth && _rl_term_autowrap && !_rl_horizontal_scroll_mode
&& _rl_last_v_pos == current_line - 1)
{
@@ -1171,7 +1273,7 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
putc (new[0], rl_outstream);
else
putc (' ', rl_outstream);
- _rl_last_c_pos = 1; /* XXX */
+ _rl_last_c_pos = 1;
_rl_last_v_pos++;
if (old[0] && new[0])
old[0] = new[0];
@@ -1312,7 +1414,7 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
if (_rl_last_v_pos != current_line)
{
_rl_move_vert (current_line);
- if (current_line == 0 && visible_wrap_offset)
+ if ((MB_CUR_MAX == 1 || rl_byte_oriented) && current_line == 0 && visible_wrap_offset)
_rl_last_c_pos += visible_wrap_offset;
}
@@ -1328,11 +1430,11 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
sequences (like drawing the `unbold' sequence without a corresponding
`bold') that manifests itself on certain terminals. */
- lendiff = local_prompt ? strlen (local_prompt) : 0;
+ lendiff = local_prompt_len;
od = ofd - old; /* index of first difference in visible line */
if (current_line == 0 && !_rl_horizontal_scroll_mode &&
_rl_term_cr && lendiff > prompt_visible_length && _rl_last_c_pos > 0 &&
- od >= lendiff && _rl_last_c_pos <= prompt_last_invisible)
+ od >= lendiff && _rl_last_c_pos < PROMPT_ENDING_INDEX)
{
#if defined (__MSDOS__)
putc ('\r', rl_outstream);
@@ -1341,12 +1443,29 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
#endif
_rl_output_some_chars (local_prompt, lendiff);
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- _rl_last_c_pos = _rl_col_width (local_prompt, 0, lendiff);
+ {
+ /* We take wrap_offset into account here so we can pass correct
+ information to _rl_move_cursor_relative. */
+ _rl_last_c_pos = _rl_col_width (local_prompt, 0, lendiff) - wrap_offset;
+ cpos_adjusted = 1;
+ }
else
_rl_last_c_pos = lendiff;
}
+ /* When this function returns, _rl_last_c_pos is correct, and an absolute
+ cursor postion in multibyte mode, but a buffer index when not in a
+ multibyte locale. */
_rl_move_cursor_relative (od, old);
+#if 1
+#if defined (HANDLE_MULTIBYTE)
+ /* We need to indicate that the cursor position is correct in the presence of
+ invisible characters in the prompt string. Let's see if setting this when
+ we make sure we're at the end of the drawn prompt string works. */
+ if (current_line == 0 && MB_CUR_MAX > 1 && rl_byte_oriented == 0 && _rl_last_c_pos == prompt_physical_chars)
+ cpos_adjusted = 1;
+#endif
+#endif
/* if (len (new) > len (old))
lendiff == difference in buffer
@@ -1403,7 +1522,7 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
insert_some_chars (nfd, lendiff, col_lendiff);
_rl_last_c_pos += col_lendiff;
}
- else if (*ols == 0 && lendiff > 0)
+ else if ((MB_CUR_MAX == 1 || rl_byte_oriented != 0) && *ols == 0 && lendiff > 0)
{
/* At the end of a line the characters do not have to
be "inserted". They can just be placed on the screen. */
@@ -1442,6 +1561,10 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
/* cannot insert chars, write to EOL */
_rl_output_some_chars (nfd, temp);
_rl_last_c_pos += col_temp;
+ /* If we're in a multibyte locale and were before the last invisible
+ char in the current line (which implies we just output some invisible
+ characters) we need to adjust _rl_last_c_pos, since it represents
+ a physical character position. */
}
}
else /* Delete characters from line. */
@@ -1473,7 +1596,7 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
if (temp > 0)
{
_rl_output_some_chars (nfd, temp);
- _rl_last_c_pos += col_temp;
+ _rl_last_c_pos += col_temp; /* XXX */
}
lendiff = (oe - old) - (ne - new);
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
@@ -1535,7 +1658,7 @@ rl_on_new_line_with_prompt ()
l = strlen (prompt_last_line);
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- _rl_last_c_pos = _rl_col_width (prompt_last_line, 0, l);
+ _rl_last_c_pos = _rl_col_width (prompt_last_line, 0, l); /* XXX */
else
_rl_last_c_pos = l;
@@ -1570,10 +1693,11 @@ rl_on_new_line_with_prompt ()
int
rl_forced_update_display ()
{
+ register char *temp;
+
if (visible_line)
{
- register char *temp = visible_line;
-
+ temp = visible_line;
while (*temp)
*temp++ = '\0';
}
@@ -1584,6 +1708,8 @@ rl_forced_update_display ()
}
/* Move the cursor from _rl_last_c_pos to NEW, which are buffer indices.
+ (Well, when we don't have multibyte characters, _rl_last_c_pos is a
+ buffer index.)
DATA is the contents of the screen line of interest; i.e., where
the movement is being done. */
void
@@ -1592,29 +1718,47 @@ _rl_move_cursor_relative (new, data)
const char *data;
{
register int i;
+ int woff; /* number of invisible chars on current line */
+ int cpos, dpos; /* current and desired cursor positions */
- /* If we don't have to do anything, then return. */
+ woff = W_OFFSET (_rl_last_v_pos, wrap_offset);
+ cpos = _rl_last_c_pos;
#if defined (HANDLE_MULTIBYTE)
/* If we have multibyte characters, NEW is indexed by the buffer point in
a multibyte string, but _rl_last_c_pos is the display position. In
this case, NEW's display position is not obvious and must be
- calculated. */
- if (MB_CUR_MAX == 1 || rl_byte_oriented)
+ calculated. We need to account for invisible characters in this line,
+ as long as we are past them and they are counted by _rl_col_width. */
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
{
- if (_rl_last_c_pos == new)
- return;
+ dpos = _rl_col_width (data, 0, new);
+ if (dpos > prompt_last_invisible) /* XXX - don't use woff here */
+ {
+ dpos -= woff;
+ /* Since this will be assigned to _rl_last_c_pos at the end (more
+ precisely, _rl_last_c_pos == dpos when this function returns),
+ let the caller know. */
+ cpos_adjusted = 1;
+ }
}
- else if (_rl_last_c_pos == _rl_col_width (data, 0, new))
- return;
-#else
- if (_rl_last_c_pos == new) return;
+ else
#endif
+ dpos = new;
+
+ /* If we don't have to do anything, then return. */
+ if (cpos == dpos)
+ return;
/* It may be faster to output a CR, and then move forwards instead
of moving backwards. */
/* i == current physical cursor position. */
- i = _rl_last_c_pos - W_OFFSET(_rl_last_v_pos, visible_wrap_offset);
- if (new == 0 || CR_FASTER (new, _rl_last_c_pos) ||
+#if defined (HANDLE_MULTIBYTE)
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ i = _rl_last_c_pos;
+ else
+#endif
+ i = _rl_last_c_pos - woff;
+ if (dpos == 0 || CR_FASTER (dpos, _rl_last_c_pos) ||
(_rl_term_autowrap && i == _rl_screenwidth))
{
#if defined (__MSDOS__)
@@ -1622,10 +1766,10 @@ _rl_move_cursor_relative (new, data)
#else
tputs (_rl_term_cr, 1, _rl_output_character_function);
#endif /* !__MSDOS__ */
- _rl_last_c_pos = 0;
+ cpos = _rl_last_c_pos = 0;
}
- if (_rl_last_c_pos < new)
+ if (cpos < dpos)
{
/* Move the cursor forward. We do it by printing the command
to move the cursor forward if there is one, else print that
@@ -1636,67 +1780,43 @@ _rl_move_cursor_relative (new, data)
sequence telling the terminal to move forward one character.
That kind of control is for people who don't know what the
data is underneath the cursor. */
-#if defined (HACK_TERMCAP_MOTION)
- if (_rl_term_forward_char)
+
+ /* However, we need a handle on where the current display position is
+ in the buffer for the immediately preceding comment to be true.
+ In multibyte locales, we don't currently have that info available.
+ Without it, we don't know where the data we have to display begins
+ in the buffer and we have to go back to the beginning of the screen
+ line. In this case, we can use the terminal sequence to move forward
+ if it's available. */
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
{
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ if (_rl_term_forward_char)
{
- int width;
- width = _rl_col_width (data, _rl_last_c_pos, new);
- for (i = 0; i < width; i++)
- tputs (_rl_term_forward_char, 1, _rl_output_character_function);
+ for (i = cpos; i < dpos; i++)
+ tputs (_rl_term_forward_char, 1, _rl_output_character_function);
}
else
{
- for (i = _rl_last_c_pos; i < new; i++)
- tputs (_rl_term_forward_char, 1, _rl_output_character_function);
+ tputs (_rl_term_cr, 1, _rl_output_character_function);
+ for (i = 0; i < new; i++)
+ putc (data[i], rl_outstream);
}
}
- else if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- {
- tputs (_rl_term_cr, 1, _rl_output_character_function);
- for (i = 0; i < new; i++)
- putc (data[i], rl_outstream);
- }
else
- for (i = _rl_last_c_pos; i < new; i++)
+ for (i = cpos; i < new; i++)
putc (data[i], rl_outstream);
-
-#else /* !HACK_TERMCAP_MOTION */
-
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- {
- tputs (_rl_term_cr, 1, _rl_output_character_function);
- for (i = 0; i < new; i++)
- putc (data[i], rl_outstream);
- }
- else
- for (i = _rl_last_c_pos; i < new; i++)
- putc (data[i], rl_outstream);
-
-#endif /* !HACK_TERMCAP_MOTION */
-
}
+
#if defined (HANDLE_MULTIBYTE)
/* NEW points to the buffer point, but _rl_last_c_pos is the display point.
The byte length of the string is probably bigger than the column width
of the string, which means that if NEW == _rl_last_c_pos, then NEW's
display point is less than _rl_last_c_pos. */
- else if (_rl_last_c_pos >= new)
-#else
- else if (_rl_last_c_pos > new)
#endif
- {
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- _rl_backspace (_rl_last_c_pos - _rl_col_width (data, 0, new));
- else
- _rl_backspace (_rl_last_c_pos - new);
- }
+ else if (cpos > dpos)
+ _rl_backspace (cpos - dpos);
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- _rl_last_c_pos = _rl_col_width (data, 0, new);
- else
- _rl_last_c_pos = new;
+ _rl_last_c_pos = dpos;
}
/* PWP: move the cursor up or down. */
@@ -1785,9 +1905,9 @@ rl_character_len (c, pos)
return ((ISPRINT (uc)) ? 1 : 2);
}
-
/* How to print things in the "echo-area". The prompt is treated as a
mini-modeline. */
+static int msg_saved_prompt = 0;
#if defined (USE_VARARGS)
int
@@ -1818,8 +1938,20 @@ rl_message (va_alist)
#endif
va_end (args);
+ if (saved_local_prompt == 0)
+ {
+ rl_save_prompt ();
+ msg_saved_prompt = 1;
+ }
rl_display_prompt = msg_buf;
+ local_prompt = expand_prompt (msg_buf, &prompt_visible_length,
+ &prompt_last_invisible,
+ &prompt_invis_chars_first_line,
+ &prompt_physical_chars);
+ local_prompt_prefix = (char *)NULL;
+ local_prompt_len = local_prompt ? strlen (local_prompt) : 0;
(*rl_redisplay_function) ();
+
return 0;
}
#else /* !USE_VARARGS */
@@ -1829,8 +1961,21 @@ rl_message (format, arg1, arg2)
{
sprintf (msg_buf, format, arg1, arg2);
msg_buf[sizeof(msg_buf) - 1] = '\0'; /* overflow? */
+
rl_display_prompt = msg_buf;
+ if (saved_local_prompt == 0)
+ {
+ rl_save_prompt ();
+ msg_saved_prompt = 1;
+ }
+ local_prompt = expand_prompt (msg_buf, &prompt_visible_length,
+ &prompt_last_invisible,
+ &prompt_invis_chars_first_line,
+ &prompt_physical_chars);
+ local_prompt_prefix = (char *)NULL;
+ local_prompt_len = local_prompt ? strlen (local_prompt) : 0;
(*rl_redisplay_function) ();
+
return 0;
}
#endif /* !USE_VARARGS */
@@ -1840,6 +1985,11 @@ int
rl_clear_message ()
{
rl_display_prompt = rl_prompt;
+ if (msg_saved_prompt)
+ {
+ rl_restore_prompt ();
+ msg_saved_prompt = 0;
+ }
(*rl_redisplay_function) ();
return 0;
}
@@ -1849,32 +1999,26 @@ rl_reset_line_state ()
{
rl_on_new_line ();
- rl_display_prompt = rl_prompt ? rl_prompt : (char*) "";
+ rl_display_prompt = rl_prompt ? rl_prompt : "";
forced_display = 1;
return 0;
}
-/* These are getting numerous enough that it's time to create a struct. */
-
-static char *saved_local_prompt;
-static char *saved_local_prefix;
-static int saved_last_invisible;
-static int saved_visible_length;
-static int saved_invis_chars_first_line;
-static int saved_physical_chars;
-
void
rl_save_prompt ()
{
saved_local_prompt = local_prompt;
saved_local_prefix = local_prompt_prefix;
+ saved_prefix_length = prompt_prefix_length;
+ saved_local_length = local_prompt_len;
saved_last_invisible = prompt_last_invisible;
saved_visible_length = prompt_visible_length;
saved_invis_chars_first_line = prompt_invis_chars_first_line;
saved_physical_chars = prompt_physical_chars;
local_prompt = local_prompt_prefix = (char *)0;
- prompt_last_invisible = prompt_visible_length = 0;
+ local_prompt_len = 0;
+ prompt_last_invisible = prompt_visible_length = prompt_prefix_length = 0;
prompt_invis_chars_first_line = prompt_physical_chars = 0;
}
@@ -1886,10 +2030,18 @@ rl_restore_prompt ()
local_prompt = saved_local_prompt;
local_prompt_prefix = saved_local_prefix;
+ local_prompt_len = saved_local_length;
+ prompt_prefix_length = saved_prefix_length;
prompt_last_invisible = saved_last_invisible;
prompt_visible_length = saved_visible_length;
prompt_invis_chars_first_line = saved_invis_chars_first_line;
prompt_physical_chars = saved_physical_chars;
+
+ /* can test saved_local_prompt to see if prompt info has been saved. */
+ saved_local_prompt = saved_local_prefix = (char *)0;
+ saved_local_length = 0;
+ saved_last_invisible = saved_visible_length = saved_prefix_length = 0;
+ saved_invis_chars_first_line = saved_physical_chars = 0;
}
char *
@@ -1897,11 +2049,15 @@ _rl_make_prompt_for_search (pchar)
int pchar;
{
int len;
- char *pmt;
+ char *pmt, *p;
rl_save_prompt ();
- if (saved_local_prompt == 0)
+ /* We've saved the prompt, and can do anything with the various prompt
+ strings we need before they're restored. We want the unexpanded
+ portion of the prompt string after any final newline. */
+ p = rl_prompt ? strrchr (rl_prompt, '\n') : 0;
+ if (p == 0)
{
len = (rl_prompt && *rl_prompt) ? strlen (rl_prompt) : 0;
pmt = (char *)xmalloc (len + 2);
@@ -1912,17 +2068,17 @@ _rl_make_prompt_for_search (pchar)
}
else
{
- len = *saved_local_prompt ? strlen (saved_local_prompt) : 0;
+ p++;
+ len = strlen (p);
pmt = (char *)xmalloc (len + 2);
if (len)
- strcpy (pmt, saved_local_prompt);
+ strcpy (pmt, p);
pmt[len] = pchar;
pmt[len+1] = '\0';
- local_prompt = savestring (pmt);
- prompt_last_invisible = saved_last_invisible;
- prompt_visible_length = saved_visible_length + 1;
- }
+ }
+ /* will be overwritten by expand_prompt, called from rl_message */
+ prompt_physical_chars = saved_physical_chars + 1;
return pmt;
}
@@ -1983,6 +2139,9 @@ insert_some_chars (string, count, col)
char *string;
int count, col;
{
+#if defined (__MSDOS__) || defined (__MINGW32__)
+ _rl_output_some_chars (string, count);
+#else
/* DEBUGGING */
if (MB_CUR_MAX == 1 || rl_byte_oriented)
if (count != col)
@@ -2021,6 +2180,7 @@ insert_some_chars (string, count, col)
if (_rl_term_ei && *_rl_term_ei)
tputs (_rl_term_ei, 1, _rl_output_character_function);
}
+#endif /* __MSDOS__ || __MINGW32__ */
}
/* Delete COUNT characters from the display line. */
@@ -2031,6 +2191,7 @@ delete_chars (count)
if (count > _rl_screenwidth) /* XXX */
return;
+#if !defined (__MSDOS__) && !defined (__MINGW32__)
if (_rl_term_DC && *_rl_term_DC)
{
char *buffer;
@@ -2043,6 +2204,7 @@ delete_chars (count)
while (count--)
tputs (_rl_term_dc, 1, _rl_output_character_function);
}
+#endif /* !__MSDOS__ && !__MINGW32__ */
}
void
@@ -2066,7 +2228,8 @@ _rl_update_final ()
char *last_line;
last_line = &visible_line[vis_lbreaks[_rl_vis_botlin]];
- _rl_move_cursor_relative (_rl_screenwidth - 1, last_line);
+ cpos_buffer_position = -1; /* don't know where we are in buffer */
+ _rl_move_cursor_relative (_rl_screenwidth - 1, last_line); /* XXX */
_rl_clear_to_eol (0);
putc (last_line[_rl_screenwidth - 1], rl_outstream);
}
@@ -2098,18 +2261,10 @@ static void
redraw_prompt (t)
char *t;
{
- char *oldp, *oldl, *oldlprefix;
- int oldlen, oldlast, oldplen, oldninvis, oldphyschars;
+ char *oldp;
- /* Geez, I should make this a struct. */
oldp = rl_display_prompt;
- oldl = local_prompt;
- oldlprefix = local_prompt_prefix;
- oldlen = prompt_visible_length;
- oldplen = prompt_prefix_length;
- oldlast = prompt_last_invisible;
- oldninvis = prompt_invis_chars_first_line;
- oldphyschars = prompt_physical_chars;
+ rl_save_prompt ();
rl_display_prompt = t;
local_prompt = expand_prompt (t, &prompt_visible_length,
@@ -2117,16 +2272,12 @@ redraw_prompt (t)
&prompt_invis_chars_first_line,
&prompt_physical_chars);
local_prompt_prefix = (char *)NULL;
+ local_prompt_len = local_prompt ? strlen (local_prompt) : 0;
+
rl_forced_update_display ();
rl_display_prompt = oldp;
- local_prompt = oldl;
- local_prompt_prefix = oldlprefix;
- prompt_visible_length = oldlen;
- prompt_prefix_length = oldplen;
- prompt_last_invisible = oldlast;
- prompt_invis_chars_first_line = oldninvis;
- prompt_physical_chars = oldphyschars;
+ rl_restore_prompt();
}
/* Redisplay the current line after a SIGWINCH is received. */
@@ -2230,10 +2381,11 @@ _rl_col_width (str, start, end)
if (end <= start)
return 0;
+ memset (&ps, 0, sizeof (mbstate_t));
+
point = 0;
max = end;
- memset (&ps, 0, sizeof(ps));
while (point < start)
{
tmp = mbrlen (str + point, max, &ps);
diff --git a/cmd-line-utils/readline/funmap.c b/cmd-line-utils/readline/funmap.c
index d56ffb9fadc..9c760cc3475 100644
--- a/cmd-line-utils/readline/funmap.c
+++ b/cmd-line-utils/readline/funmap.c
@@ -21,7 +21,9 @@
59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#define READLINE_LIBRARY
-#include "config_readline.h"
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
#if !defined (BUFSIZ)
#include <stdio.h>
@@ -174,6 +176,7 @@ static FUNMAP default_funmap[] = {
{ "vi-put", rl_vi_put },
{ "vi-redo", rl_vi_redo },
{ "vi-replace", rl_vi_replace },
+ { "vi-rubout", rl_vi_rubout },
{ "vi-search", rl_vi_search },
{ "vi-search-again", rl_vi_search_again },
{ "vi-set-mark", rl_vi_set_mark },
diff --git a/cmd-line-utils/readline/histexpand.c b/cmd-line-utils/readline/histexpand.c
index 0a45438990a..f46c0b2a45d 100644
--- a/cmd-line-utils/readline/histexpand.c
+++ b/cmd-line-utils/readline/histexpand.c
@@ -22,7 +22,9 @@
#define READLINE_LIBRARY
-#include "config_readline.h"
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
#include <stdio.h>
@@ -54,8 +56,6 @@
typedef int _hist_search_func_t PARAMS((const char *, int));
-extern int rl_byte_oriented; /* declared in mbutil.c */
-
static char error_pointer;
static char *subst_lhs;
@@ -87,14 +87,14 @@ char history_comment_char = '\0';
/* The list of characters which inhibit the expansion of text if found
immediately following history_expansion_char. */
-char *history_no_expand_chars = (char*) " \t\n\r=";
+char *history_no_expand_chars = " \t\n\r=";
/* If set to a non-zero value, single quotes inhibit history expansion.
The default is 0. */
int history_quotes_inhibit_expansion = 0;
/* Used to split words by history_tokenize_internal. */
-char *history_word_delimiters = (char*) HISTORY_WORD_DELIMITERS;
+char *history_word_delimiters = HISTORY_WORD_DELIMITERS;
/* If set, this points to a function that is called to verify that a
particular history expansion should be performed. */
@@ -203,24 +203,25 @@ get_history_event (string, caller_index, delimiting_quote)
}
/* Only a closing `?' or a newline delimit a substring search string. */
- for (local_index = i; (c = string[i]); i++)
+ for (local_index = i; c = string[i]; i++)
+ {
#if defined (HANDLE_MULTIBYTE)
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- {
- int v;
- mbstate_t ps;
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ {
+ int v;
+ mbstate_t ps;
+
+ memset (&ps, 0, sizeof (mbstate_t));
+ /* These produce warnings because we're passing a const string to a
+ function that takes a non-const string. */
+ _rl_adjust_point ((char *)string, i, &ps);
+ if ((v = _rl_get_char_len ((char *)string + i, &ps)) > 1)
+ {
+ i += v - 1;
+ continue;
+ }
+ }
- memset (&ps, 0, sizeof (mbstate_t));
- /* These produce warnings because we're passing a const string to a
- function that takes a non-const string. */
- _rl_adjust_point ((char *)string, i, &ps);
- if ((v = _rl_get_char_len ((char *)string + i, &ps)) > 1)
- {
- i += v - 1;
- continue;
- }
- }
- else
#endif /* HANDLE_MULTIBYTE */
if ((!substring_okay && (whitespace (c) || c == ':' ||
(history_search_delimiter_chars && member (c, history_search_delimiter_chars)) ||
@@ -228,6 +229,7 @@ get_history_event (string, caller_index, delimiting_quote)
string[i] == '\n' ||
(substring_okay && string[i] == '?'))
break;
+ }
which = i - local_index;
temp = (char *)xmalloc (1 + which);
@@ -560,12 +562,12 @@ history_expand_internal (string, start, end_index_ptr, ret_string, current_line)
#if defined (HANDLE_MULTIBYTE)
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
{
- int chr, l;
+ int ch, l;
l = _rl_find_prev_mbchar (string, i, MB_FIND_ANY);
- chr = string[l];
+ ch = string[l];
/* XXX - original patch had i - 1 ??? If i == 0 it would fail. */
- if (i && (chr == '\'' || chr == '"'))
- quoted_search_delimiter = chr;
+ if (i && (ch == '\'' || ch == '"'))
+ quoted_search_delimiter = ch;
}
else
#endif /* HANDLE_MULTIBYTE */
@@ -1426,6 +1428,8 @@ history_tokenize_word (string, ind)
{
if (peek == '<' && string[i + 2] == '-')
i++;
+ else if (peek == '<' && string[i + 2] == '<')
+ i++;
i += 2;
return i;
}
diff --git a/cmd-line-utils/readline/histfile.c b/cmd-line-utils/readline/histfile.c
index f1822b105a4..2f051a32563 100644
--- a/cmd-line-utils/readline/histfile.c
+++ b/cmd-line-utils/readline/histfile.c
@@ -30,7 +30,9 @@
# include <floss.h>
#endif
-#include "config_readline.h"
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
#include <stdio.h>
@@ -184,8 +186,7 @@ read_history_range (filename, from, to)
file_size = (size_t)finfo.st_size;
/* check for overflow on very large files */
- if ((long long) file_size != (long long) finfo.st_size ||
- file_size + 1 < file_size)
+ if (file_size != finfo.st_size || file_size + 1 < file_size)
{
errno = overflow_errno;
goto error_and_exit;
@@ -255,7 +256,11 @@ read_history_range (filename, from, to)
for (line_end = line_start; line_end < bufend; line_end++)
if (*line_end == '\n')
{
- *line_end = '\0';
+ /* Change to allow Windows-like \r\n end of line delimiter. */
+ if (line_end > line_start && line_end[-1] == '\r')
+ line_end[-1] = '\0';
+ else
+ *line_end = '\0';
if (*line_start)
{
@@ -334,8 +339,7 @@ history_truncate_file (fname, lines)
file_size = (size_t)finfo.st_size;
/* check for overflow on very large files */
- if ((long long) file_size != (long long) finfo.st_size ||
- file_size + 1 < file_size)
+ if (file_size != finfo.st_size || file_size + 1 < file_size)
{
close (file);
#if defined (EFBIG)
diff --git a/cmd-line-utils/readline/history.c b/cmd-line-utils/readline/history.c
index bb1960d8d99..1ccf4db786c 100644
--- a/cmd-line-utils/readline/history.c
+++ b/cmd-line-utils/readline/history.c
@@ -1,6 +1,6 @@
/* history.c -- standalone history library */
-/* Copyright (C) 1989-2003 Free Software Foundation, Inc.
+/* Copyright (C) 1989-2005 Free Software Foundation, Inc.
This file contains the GNU History Library (the Library), a set of
routines for managing the text of previously typed lines.
@@ -25,7 +25,9 @@
you can call. I think I have done that. */
#define READLINE_LIBRARY
-#include "config_readline.h"
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
#include <stdio.h>
@@ -202,11 +204,27 @@ history_get (offset)
int local_index;
local_index = offset - history_base;
- return (local_index >= history_length || local_index < 0 || !the_history)
+ return (local_index >= history_length || local_index < 0 || the_history == 0)
? (HIST_ENTRY *)NULL
: the_history[local_index];
}
+HIST_ENTRY *
+alloc_history_entry (string, ts)
+ char *string;
+ char *ts;
+{
+ HIST_ENTRY *temp;
+
+ temp = (HIST_ENTRY *)xmalloc (sizeof (HIST_ENTRY));
+
+ temp->line = string ? savestring (string) : string;
+ temp->data = (char *)NULL;
+ temp->timestamp = ts;
+
+ return temp;
+}
+
time_t
history_get_time (hist)
HIST_ENTRY *hist;
@@ -288,11 +306,7 @@ add_history (string)
}
}
- temp = (HIST_ENTRY *)xmalloc (sizeof (HIST_ENTRY));
- temp->line = savestring (string);
- temp->data = (char *)NULL;
-
- temp->timestamp = hist_inittime ();
+ temp = alloc_history_entry (string, hist_inittime ());
the_history[history_length] = (HIST_ENTRY *)NULL;
the_history[history_length - 1] = temp;
@@ -326,6 +340,26 @@ free_history_entry (hist)
free (hist);
return (x);
}
+
+HIST_ENTRY *
+copy_history_entry (hist)
+ HIST_ENTRY *hist;
+{
+ HIST_ENTRY *ret;
+ char *ts;
+
+ if (hist == 0)
+ return hist;
+
+ ret = alloc_history_entry (hist->line, (char *)NULL);
+
+ ts = hist->timestamp ? savestring (hist->timestamp) : hist->timestamp;
+ ret->timestamp = ts;
+
+ ret->data = hist->data;
+
+ return ret;
+}
/* Make the history entry at WHICH have LINE and DATA. This returns
the old entry so you can dispose of the data. In the case of an
@@ -338,7 +372,7 @@ replace_history_entry (which, line, data)
{
HIST_ENTRY *temp, *old_value;
- if (which >= history_length)
+ if (which < 0 || which >= history_length)
return ((HIST_ENTRY *)NULL);
temp = (HIST_ENTRY *)xmalloc (sizeof (HIST_ENTRY));
@@ -352,6 +386,51 @@ replace_history_entry (which, line, data)
return (old_value);
}
+/* Replace the DATA in the specified history entries, replacing OLD with
+ NEW. WHICH says which one(s) to replace: WHICH == -1 means to replace
+ all of the history entries where entry->data == OLD; WHICH == -2 means
+ to replace the `newest' history entry where entry->data == OLD; and
+ WHICH >= 0 means to replace that particular history entry's data, as
+ long as it matches OLD. */
+void
+replace_history_data (which,old, new)
+ int which;
+ histdata_t *old, *new;
+{
+ HIST_ENTRY *entry;
+ register int i, last;
+
+ if (which < -2 || which >= history_length || history_length == 0 || the_history == 0)
+ return;
+
+ if (which >= 0)
+ {
+ entry = the_history[which];
+ if (entry && entry->data == old)
+ entry->data = new;
+ return;
+ }
+
+ last = -1;
+ for (i = 0; i < history_length; i++)
+ {
+ entry = the_history[i];
+ if (entry == 0)
+ continue;
+ if (entry->data == old)
+ {
+ last = i;
+ if (which == -1)
+ entry->data = new;
+ }
+ }
+ if (which == -2 && last >= 0)
+ {
+ entry = the_history[last];
+ entry->data = new; /* XXX - we don't check entry->old */
+ }
+}
+
/* Remove history element WHICH from the history. The removed
element is returned to you so you can free the line, data,
and containing structure. */
@@ -362,17 +441,15 @@ remove_history (which)
HIST_ENTRY *return_value;
register int i;
- if (which >= history_length || !history_length)
- return_value = (HIST_ENTRY *)NULL;
- else
- {
- return_value = the_history[which];
+ if (which < 0 || which >= history_length || history_length == 0 || the_history == 0)
+ return ((HIST_ENTRY *)NULL);
- for (i = which; i < history_length; i++)
- the_history[i] = the_history[i + 1];
+ return_value = the_history[which];
- history_length--;
- }
+ for (i = which; i < history_length; i++)
+ the_history[i] = the_history[i + 1];
+
+ history_length--;
return (return_value);
}
diff --git a/cmd-line-utils/readline/histsearch.c b/cmd-line-utils/readline/histsearch.c
index 778b323afdc..1cc5875a4b4 100644
--- a/cmd-line-utils/readline/histsearch.c
+++ b/cmd-line-utils/readline/histsearch.c
@@ -22,7 +22,9 @@
#define READLINE_LIBRARY
-#include "config_readline.h"
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
#include <stdio.h>
#if defined (HAVE_STDLIB_H)
diff --git a/cmd-line-utils/readline/input.c b/cmd-line-utils/readline/input.c
index 818f2e8763d..da5d771c481 100644
--- a/cmd-line-utils/readline/input.c
+++ b/cmd-line-utils/readline/input.c
@@ -1,6 +1,6 @@
/* input.c -- character input functions for readline. */
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994-2005 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -25,7 +25,9 @@
# include <floss.h>
#endif
-#include "config_readline.h"
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
#include <sys/types.h>
#include <fcntl.h>
@@ -177,6 +179,7 @@ rl_gather_tyi ()
struct timeval timeout;
#endif
+ chars_avail = 0;
tty = fileno (rl_instream);
#if defined (HAVE_SELECT)
@@ -218,6 +221,13 @@ rl_gather_tyi ()
}
#endif /* O_NDELAY */
+#if defined (__MINGW32__)
+ /* Use getch/_kbhit to check for available console input, in the same way
+ that we read it normally. */
+ chars_avail = isatty (tty) ? _kbhit () : 0;
+ result = 0;
+#endif
+
/* If there's nothing available, don't waste time trying to read
something. */
if (chars_avail <= 0)
@@ -261,7 +271,7 @@ rl_set_keyboard_input_timeout (u)
int o;
o = _keyboard_input_timeout;
- if (u > 0)
+ if (u >= 0)
_keyboard_input_timeout = u;
return (o);
}
@@ -303,6 +313,11 @@ _rl_input_available ()
#endif
+#if defined (__MINGW32__)
+ if (isatty (tty))
+ return (_kbhit ());
+#endif
+
return 0;
}
@@ -405,7 +420,7 @@ rl_read_key ()
else
{
/* If input is coming from a macro, then use that. */
- if ((c= _rl_next_macro_key ()))
+ if (c = _rl_next_macro_key ())
return (c);
/* If the user has an event function, then call it periodically. */
@@ -442,6 +457,10 @@ rl_getc (stream)
while (1)
{
+#if defined (__MINGW32__)
+ if (isatty (fileno (stream)))
+ return (getch ());
+#endif
result = read (fileno (stream), &c, sizeof (unsigned char));
if (result == sizeof (unsigned char))
@@ -483,7 +502,7 @@ rl_getc (stream)
this is simply an interrupted system call to read ().
Otherwise, some error ocurred, also signifying EOF. */
if (errno != EINTR)
- return (EOF);
+ return (RL_ISSTATE (RL_STATE_READCMD) ? READERR : EOF);
}
}
@@ -517,6 +536,12 @@ _rl_read_mbchar (mbchar, size)
ps = ps_back;
continue;
}
+ else if (mbchar_bytes_length == 0)
+ {
+ mbchar[0] = '\0'; /* null wide character */
+ mb_len = 1;
+ break;
+ }
else if (mbchar_bytes_length > (size_t)(0))
break;
}
@@ -525,21 +550,21 @@ _rl_read_mbchar (mbchar, size)
}
/* Read a multibyte-character string whose first character is FIRST into
- the buffer MB of length MBLEN. Returns the last character read, which
+ the buffer MB of length MLEN. Returns the last character read, which
may be FIRST. Used by the search functions, among others. Very similar
to _rl_read_mbchar. */
int
-_rl_read_mbstring (first, mb, mb_len)
+_rl_read_mbstring (first, mb, mlen)
int first;
char *mb;
- int mb_len;
+ int mlen;
{
int i, c;
mbstate_t ps;
c = first;
- memset (mb, 0, mb_len);
- for (i = 0; i < mb_len; i++)
+ memset (mb, 0, mlen);
+ for (i = 0; i < mlen; i++)
{
mb[i] = (char)c;
memset (&ps, 0, sizeof (mbstate_t));
diff --git a/cmd-line-utils/readline/isearch.c b/cmd-line-utils/readline/isearch.c
index 9071695dda8..9f67bfc0801 100644
--- a/cmd-line-utils/readline/isearch.c
+++ b/cmd-line-utils/readline/isearch.c
@@ -4,7 +4,7 @@
/* */
/* **************************************************************** */
-/* Copyright (C) 1987-2002 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2005 Free Software Foundation, Inc.
This file contains the Readline Library (the Library), a set of
routines for providing Emacs style line input to programs that ask
@@ -26,7 +26,9 @@
59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#define READLINE_LIBRARY
-#include "config_readline.h"
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
#include <sys/types.h>
@@ -54,21 +56,77 @@
/* Variables exported to other files in the readline library. */
char *_rl_isearch_terminators = (char *)NULL;
+_rl_search_cxt *_rl_iscxt = 0;
+
/* Variables imported from other files in the readline library. */
extern HIST_ENTRY *_rl_saved_line_for_history;
-/* Forward declarations */
static int rl_search_history PARAMS((int, int));
+static _rl_search_cxt *_rl_isearch_init PARAMS((int));
+static void _rl_isearch_fini PARAMS((_rl_search_cxt *));
+static int _rl_isearch_cleanup PARAMS((_rl_search_cxt *, int));
+
/* Last line found by the current incremental search, so we don't `find'
- identical lines many times in a row. */
-static char *prev_line_found;
+ identical lines many times in a row. Now part of isearch context. */
+/* static char *prev_line_found; */
/* Last search string and its length. */
static char *last_isearch_string;
static int last_isearch_string_len;
-static char *default_isearch_terminators = (char*) "\033\012";
+static char *default_isearch_terminators = "\033\012";
+
+_rl_search_cxt *
+_rl_scxt_alloc (type, flags)
+ int type, flags;
+{
+ _rl_search_cxt *cxt;
+
+ cxt = (_rl_search_cxt *)xmalloc (sizeof (_rl_search_cxt));
+
+ cxt->type = type;
+ cxt->sflags = flags;
+
+ cxt->search_string = 0;
+ cxt->search_string_size = cxt->search_string_index = 0;
+
+ cxt->lines = 0;
+ cxt->allocated_line = 0;
+ cxt->hlen = cxt->hindex = 0;
+
+ cxt->save_point = rl_point;
+ cxt->save_mark = rl_mark;
+ cxt->save_line = where_history ();
+ cxt->last_found_line = cxt->save_line;
+ cxt->prev_line_found = 0;
+
+ cxt->save_undo_list = 0;
+
+ cxt->history_pos = 0;
+ cxt->direction = 0;
+
+ cxt->lastc = 0;
+
+ cxt->sline = 0;
+ cxt->sline_len = cxt->sline_index = 0;
+
+ cxt->search_terminators = 0;
+
+ return cxt;
+}
+
+void
+_rl_scxt_dispose (cxt, flags)
+ _rl_search_cxt *cxt;
+ int flags;
+{
+ FREE (cxt->search_string);
+ FREE (cxt->allocated_line);
+ FREE (cxt->lines);
+
+ free (cxt);
+}
/* Search backwards through the history looking for a string which is typed
interactively. Start with the current line. */
@@ -90,12 +148,13 @@ rl_forward_search_history (sign, key)
/* Display the current state of the search in the echo-area.
SEARCH_STRING contains the string that is being searched for,
- DIRECTION is zero for forward, or 1 for reverse,
+ DIRECTION is zero for forward, or non-zero for reverse,
WHERE is the history list number of the current line. If it is
-1, then this line is the starting one. */
static void
-rl_display_search (char *search_string, int reverse_p,
- int where __attribute__((unused)))
+rl_display_search (search_string, reverse_p, where)
+ char *search_string;
+ int reverse_p, where;
{
char *message;
int msglen, searchlen;
@@ -137,65 +196,23 @@ rl_display_search (char *search_string, int reverse_p,
(*rl_redisplay_function) ();
}
-/* Search through the history looking for an interactively typed string.
- This is analogous to i-search. We start the search in the current line.
- DIRECTION is which direction to search; >= 0 means forward, < 0 means
- backwards. */
-static int
-rl_search_history (int direction, int invoking_key __attribute__((unused)))
+static _rl_search_cxt *
+_rl_isearch_init (direction)
+ int direction;
{
- /* The string that the user types in to search for. */
- char *search_string;
-
- /* The current length of SEARCH_STRING. */
- int search_string_index;
-
- /* The amount of space that SEARCH_STRING has allocated to it. */
- int search_string_size;
-
- /* The list of lines to search through. */
- char **lines, *allocated_line;
-
- /* The length of LINES. */
- int hlen;
-
- /* Where we get LINES from. */
- HIST_ENTRY **hlist;
-
+ _rl_search_cxt *cxt;
register int i;
- int orig_point, orig_mark, orig_line, last_found_line;
- int c, found, failed, sline_len;
- int n, wstart, wlen;
-#if defined (HANDLE_MULTIBYTE)
- char mb[MB_LEN_MAX];
-#endif
-
- /* The line currently being searched. */
- char *sline;
-
- /* Offset in that line. */
- int line_index;
-
- /* Non-zero if we are doing a reverse search. */
- int reverse;
-
- /* The list of characters which terminate the search, but are not
- subsequently executed. If the variable isearch-terminators has
- been set, we use that value, otherwise we use ESC and C-J. */
- char *isearch_terminators;
+ HIST_ENTRY **hlist;
- RL_SETSTATE(RL_STATE_ISEARCH);
- orig_point = rl_point;
- orig_mark = rl_mark;
- last_found_line = orig_line = where_history ();
- reverse = direction < 0;
- hlist = history_list ();
- allocated_line = (char *)NULL;
+ cxt = _rl_scxt_alloc (RL_SEARCH_ISEARCH, 0);
+ if (direction < 0)
+ cxt->sflags |= SF_REVERSE;
- isearch_terminators = _rl_isearch_terminators ? _rl_isearch_terminators
+ cxt->search_terminators = _rl_isearch_terminators ? _rl_isearch_terminators
: default_isearch_terminators;
/* Create an arrary of pointers to the lines that we want to search. */
+ hlist = history_list ();
rl_maybe_replace_line ();
i = 0;
if (hlist)
@@ -203,354 +220,447 @@ rl_search_history (int direction, int invoking_key __attribute__((unused)))
/* Allocate space for this many lines, +1 for the current input line,
and remember those lines. */
- lines = (char **)xmalloc ((1 + (hlen = i)) * sizeof (char *));
- for (i = 0; i < hlen; i++)
- lines[i] = hlist[i]->line;
+ cxt->lines = (char **)xmalloc ((1 + (cxt->hlen = i)) * sizeof (char *));
+ for (i = 0; i < cxt->hlen; i++)
+ cxt->lines[i] = hlist[i]->line;
if (_rl_saved_line_for_history)
- lines[i] = _rl_saved_line_for_history->line;
+ cxt->lines[i] = _rl_saved_line_for_history->line;
else
{
/* Keep track of this so we can free it. */
- allocated_line = (char *)xmalloc (1 + strlen (rl_line_buffer));
- strcpy (allocated_line, &rl_line_buffer[0]);
- lines[i] = allocated_line;
+ cxt->allocated_line = (char *)xmalloc (1 + strlen (rl_line_buffer));
+ strcpy (cxt->allocated_line, &rl_line_buffer[0]);
+ cxt->lines[i] = cxt->allocated_line;
}
- hlen++;
+ cxt->hlen++;
/* The line where we start the search. */
- i = orig_line;
+ cxt->history_pos = cxt->save_line;
rl_save_prompt ();
/* Initialize search parameters. */
- search_string = (char *)xmalloc (search_string_size = 128);
- *search_string = '\0';
- search_string_index = 0;
- prev_line_found = (char *)0; /* XXX */
+ cxt->search_string = (char *)xmalloc (cxt->search_string_size = 128);
+ cxt->search_string[cxt->search_string_index = 0] = '\0';
/* Normalize DIRECTION into 1 or -1. */
- direction = (direction >= 0) ? 1 : -1;
+ cxt->direction = (direction >= 0) ? 1 : -1;
- rl_display_search (search_string, reverse, -1);
+ cxt->sline = rl_line_buffer;
+ cxt->sline_len = strlen (cxt->sline);
+ cxt->sline_index = rl_point;
- sline = rl_line_buffer;
- sline_len = strlen (sline);
- line_index = rl_point;
+ _rl_iscxt = cxt; /* save globally */
- found = failed = 0;
- for (;;)
+ return cxt;
+}
+
+static void
+_rl_isearch_fini (cxt)
+ _rl_search_cxt *cxt;
+{
+ /* First put back the original state. */
+ strcpy (rl_line_buffer, cxt->lines[cxt->save_line]);
+
+ rl_restore_prompt ();
+
+ /* Save the search string for possible later use. */
+ FREE (last_isearch_string);
+ last_isearch_string = cxt->search_string;
+ last_isearch_string_len = cxt->search_string_index;
+ cxt->search_string = 0;
+
+ if (cxt->last_found_line < cxt->save_line)
+ rl_get_previous_history (cxt->save_line - cxt->last_found_line, 0);
+ else
+ rl_get_next_history (cxt->last_found_line - cxt->save_line, 0);
+
+ /* If the string was not found, put point at the end of the last matching
+ line. If last_found_line == orig_line, we didn't find any matching
+ history lines at all, so put point back in its original position. */
+ if (cxt->sline_index < 0)
{
- rl_command_func_t *f = (rl_command_func_t *)NULL;
+ if (cxt->last_found_line == cxt->save_line)
+ cxt->sline_index = cxt->save_point;
+ else
+ cxt->sline_index = strlen (rl_line_buffer);
+ rl_mark = cxt->save_mark;
+ }
+
+ rl_point = cxt->sline_index;
+ /* Don't worry about where to put the mark here; rl_get_previous_history
+ and rl_get_next_history take care of it. */
+
+ rl_clear_message ();
+}
- /* Read a key and decide how to proceed. */
- RL_SETSTATE(RL_STATE_MOREINPUT);
- c = rl_read_key ();
- RL_UNSETSTATE(RL_STATE_MOREINPUT);
+int
+_rl_search_getchar (cxt)
+ _rl_search_cxt *cxt;
+{
+ int c;
+
+ /* Read a key and decide how to proceed. */
+ RL_SETSTATE(RL_STATE_MOREINPUT);
+ c = cxt->lastc = rl_read_key ();
+ RL_UNSETSTATE(RL_STATE_MOREINPUT);
#if defined (HANDLE_MULTIBYTE)
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- c = _rl_read_mbstring (c, mb, MB_LEN_MAX);
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ c = cxt->lastc = _rl_read_mbstring (cxt->lastc, cxt->mb, MB_LEN_MAX);
#endif
- /* Translate the keys we do something with to opcodes. */
- if (c >= 0 && _rl_keymap[c].type == ISFUNC)
- {
- f = _rl_keymap[c].function;
-
- if (f == rl_reverse_search_history)
- c = reverse ? -1 : -2;
- else if (f == rl_forward_search_history)
- c = !reverse ? -1 : -2;
- else if (f == rl_rubout)
- c = -3;
- else if (c == CTRL ('G'))
- c = -4;
- else if (c == CTRL ('W')) /* XXX */
- c = -5;
- else if (c == CTRL ('Y')) /* XXX */
- c = -6;
- }
+ return c;
+}
- /* The characters in isearch_terminators (set from the user-settable
- variable isearch-terminators) are used to terminate the search but
- not subsequently execute the character as a command. The default
- value is "\033\012" (ESC and C-J). */
- if (strchr (isearch_terminators, c))
- {
- /* ESC still terminates the search, but if there is pending
- input or if input arrives within 0.1 seconds (on systems
- with select(2)) it is used as a prefix character
- with rl_execute_next. WATCH OUT FOR THIS! This is intended
- to allow the arrow keys to be used like ^F and ^B are used
- to terminate the search and execute the movement command.
- XXX - since _rl_input_available depends on the application-
- settable keyboard timeout value, this could alternatively
- use _rl_input_queued(100000) */
- if (c == ESC && _rl_input_available ())
- rl_execute_next (ESC);
- break;
- }
+/* Process just-read character C according to isearch context CXT. Return
+ -1 if the caller should just free the context and return, 0 if we should
+ break out of the loop, and 1 if we should continue to read characters. */
+int
+_rl_isearch_dispatch (cxt, c)
+ _rl_search_cxt *cxt;
+ int c;
+{
+ int n, wstart, wlen, limit, cval;
+ rl_command_func_t *f;
+
+ f = (rl_command_func_t *)NULL;
+
+ /* Translate the keys we do something with to opcodes. */
+ if (c >= 0 && _rl_keymap[c].type == ISFUNC)
+ {
+ f = _rl_keymap[c].function;
+
+ if (f == rl_reverse_search_history)
+ cxt->lastc = (cxt->sflags & SF_REVERSE) ? -1 : -2;
+ else if (f == rl_forward_search_history)
+ cxt->lastc = (cxt->sflags & SF_REVERSE) ? -2 : -1;
+ else if (f == rl_rubout)
+ cxt->lastc = -3;
+ else if (c == CTRL ('G'))
+ cxt->lastc = -4;
+ else if (c == CTRL ('W')) /* XXX */
+ cxt->lastc = -5;
+ else if (c == CTRL ('Y')) /* XXX */
+ cxt->lastc = -6;
+ }
+
+ /* The characters in isearch_terminators (set from the user-settable
+ variable isearch-terminators) are used to terminate the search but
+ not subsequently execute the character as a command. The default
+ value is "\033\012" (ESC and C-J). */
+ if (strchr (cxt->search_terminators, cxt->lastc))
+ {
+ /* ESC still terminates the search, but if there is pending
+ input or if input arrives within 0.1 seconds (on systems
+ with select(2)) it is used as a prefix character
+ with rl_execute_next. WATCH OUT FOR THIS! This is intended
+ to allow the arrow keys to be used like ^F and ^B are used
+ to terminate the search and execute the movement command.
+ XXX - since _rl_input_available depends on the application-
+ settable keyboard timeout value, this could alternatively
+ use _rl_input_queued(100000) */
+ if (cxt->lastc == ESC && _rl_input_available ())
+ rl_execute_next (ESC);
+ return (0);
+ }
#define ENDSRCH_CHAR(c) \
((CTRL_CHAR (c) || META_CHAR (c) || (c) == RUBOUT) && ((c) != CTRL ('G')))
#if defined (HANDLE_MULTIBYTE)
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ {
+ if (cxt->lastc >= 0 && (cxt->mb[0] && cxt->mb[1] == '\0') && ENDSRCH_CHAR (cxt->lastc))
+ {
+ /* This sets rl_pending_input to c; it will be picked up the next
+ time rl_read_key is called. */
+ rl_execute_next (cxt->lastc);
+ return (0);
+ }
+ }
+ else
+#endif
+ if (cxt->lastc >= 0 && ENDSRCH_CHAR (cxt->lastc))
+ {
+ /* This sets rl_pending_input to LASTC; it will be picked up the next
+ time rl_read_key is called. */
+ rl_execute_next (cxt->lastc);
+ return (0);
+ }
+
+ /* Now dispatch on the character. `Opcodes' affect the search string or
+ state. Other characters are added to the string. */
+ switch (cxt->lastc)
+ {
+ /* search again */
+ case -1:
+ if (cxt->search_string_index == 0)
{
- if (c >= 0 && strlen (mb) == 1 && ENDSRCH_CHAR (c))
+ if (last_isearch_string)
{
- /* This sets rl_pending_input to c; it will be picked up the next
- time rl_read_key is called. */
- rl_execute_next (c);
+ cxt->search_string_size = 64 + last_isearch_string_len;
+ cxt->search_string = (char *)xrealloc (cxt->search_string, cxt->search_string_size);
+ strcpy (cxt->search_string, last_isearch_string);
+ cxt->search_string_index = last_isearch_string_len;
+ rl_display_search (cxt->search_string, (cxt->sflags & SF_REVERSE), -1);
break;
}
+ return (1);
}
+ else if (cxt->sflags & SF_REVERSE)
+ cxt->sline_index--;
+ else if (cxt->sline_index != cxt->sline_len)
+ cxt->sline_index++;
else
-#endif
- if (c >= 0 && ENDSRCH_CHAR (c))
+ rl_ding ();
+ break;
+
+ /* switch directions */
+ case -2:
+ cxt->direction = -cxt->direction;
+ if (cxt->direction < 0)
+ cxt->sflags |= SF_REVERSE;
+ else
+ cxt->sflags &= ~SF_REVERSE;
+ break;
+
+ /* delete character from search string. */
+ case -3: /* C-H, DEL */
+ /* This is tricky. To do this right, we need to keep a
+ stack of search positions for the current search, with
+ sentinels marking the beginning and end. But this will
+ do until we have a real isearch-undo. */
+ if (cxt->search_string_index == 0)
+ rl_ding ();
+ else
+ cxt->search_string[--cxt->search_string_index] = '\0';
+ break;
+
+ case -4: /* C-G, abort */
+ rl_replace_line (cxt->lines[cxt->save_line], 0);
+ rl_point = cxt->save_point;
+ rl_mark = cxt->save_mark;
+ rl_restore_prompt();
+ rl_clear_message ();
+
+ return -1;
+
+ case -5: /* C-W */
+ /* skip over portion of line we already matched and yank word */
+ wstart = rl_point + cxt->search_string_index;
+ if (wstart >= rl_end)
{
- /* This sets rl_pending_input to c; it will be picked up the next
- time rl_read_key is called. */
- rl_execute_next (c);
+ rl_ding ();
break;
}
- switch (c)
+ /* if not in a word, move to one. */
+ cval = _rl_char_value (rl_line_buffer, wstart);
+ if (_rl_walphabetic (cval) == 0)
{
- case -1:
- if (search_string_index == 0)
- {
- if (last_isearch_string)
- {
- search_string_size = 64 + last_isearch_string_len;
- search_string = (char *)xrealloc (search_string, search_string_size);
- strcpy (search_string, last_isearch_string);
- search_string_index = last_isearch_string_len;
- rl_display_search (search_string, reverse, -1);
- break;
- }
- continue;
- }
- else if (reverse)
- --line_index;
- else if (line_index != sline_len)
- ++line_index;
- else
- rl_ding ();
+ rl_ding ();
break;
-
- /* switch directions */
- case -2:
- direction = -direction;
- reverse = direction < 0;
+ }
+ n = MB_NEXTCHAR (rl_line_buffer, wstart, 1, MB_FIND_NONZERO);;
+ while (n < rl_end)
+ {
+ cval = _rl_char_value (rl_line_buffer, n);
+ if (_rl_walphabetic (cval) == 0)
+ break;
+ n = MB_NEXTCHAR (rl_line_buffer, n, 1, MB_FIND_NONZERO);;
+ }
+ wlen = n - wstart + 1;
+ if (cxt->search_string_index + wlen + 1 >= cxt->search_string_size)
+ {
+ cxt->search_string_size += wlen + 1;
+ cxt->search_string = (char *)xrealloc (cxt->search_string, cxt->search_string_size);
+ }
+ for (; wstart < n; wstart++)
+ cxt->search_string[cxt->search_string_index++] = rl_line_buffer[wstart];
+ cxt->search_string[cxt->search_string_index] = '\0';
+ break;
+
+ case -6: /* C-Y */
+ /* skip over portion of line we already matched and yank rest */
+ wstart = rl_point + cxt->search_string_index;
+ if (wstart >= rl_end)
+ {
+ rl_ding ();
break;
+ }
+ n = rl_end - wstart + 1;
+ if (cxt->search_string_index + n + 1 >= cxt->search_string_size)
+ {
+ cxt->search_string_size += n + 1;
+ cxt->search_string = (char *)xrealloc (cxt->search_string, cxt->search_string_size);
+ }
+ for (n = wstart; n < rl_end; n++)
+ cxt->search_string[cxt->search_string_index++] = rl_line_buffer[n];
+ cxt->search_string[cxt->search_string_index] = '\0';
+ break;
+
+ /* Add character to search string and continue search. */
+ default:
+ if (cxt->search_string_index + 2 >= cxt->search_string_size)
+ {
+ cxt->search_string_size += 128;
+ cxt->search_string = (char *)xrealloc (cxt->search_string, cxt->search_string_size);
+ }
+#if defined (HANDLE_MULTIBYTE)
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ {
+ int j, l;
+ for (j = 0, l = strlen (cxt->mb); j < l; )
+ cxt->search_string[cxt->search_string_index++] = cxt->mb[j++];
+ }
+ else
+#endif
+ cxt->search_string[cxt->search_string_index++] = c;
+ cxt->search_string[cxt->search_string_index] = '\0';
+ break;
+ }
- /* delete character from search string. */
- case -3: /* C-H, DEL */
- /* This is tricky. To do this right, we need to keep a
- stack of search positions for the current search, with
- sentinels marking the beginning and end. But this will
- do until we have a real isearch-undo. */
- if (search_string_index == 0)
- rl_ding ();
- else
- search_string[--search_string_index] = '\0';
-
- break;
+ for (cxt->sflags &= ~(SF_FOUND|SF_FAILED);; )
+ {
+ limit = cxt->sline_len - cxt->search_string_index + 1;
- case -4: /* C-G */
- rl_replace_line (lines[orig_line], 0);
- rl_point = orig_point;
- rl_mark = orig_mark;
- rl_restore_prompt();
- rl_clear_message ();
- if (allocated_line)
- free (allocated_line);
- free (lines);
- RL_UNSETSTATE(RL_STATE_ISEARCH);
- return 0;
-
- case -5: /* C-W */
- /* skip over portion of line we already matched */
- wstart = rl_point + search_string_index;
- if (wstart >= rl_end)
+ /* Search the current line. */
+ while ((cxt->sflags & SF_REVERSE) ? (cxt->sline_index >= 0) : (cxt->sline_index < limit))
+ {
+ if (STREQN (cxt->search_string, cxt->sline + cxt->sline_index, cxt->search_string_index))
{
- rl_ding ();
+ cxt->sflags |= SF_FOUND;
break;
}
+ else
+ cxt->sline_index += cxt->direction;
+ }
+ if (cxt->sflags & SF_FOUND)
+ break;
- /* if not in a word, move to one. */
- if (rl_alphabetic(rl_line_buffer[wstart]) == 0)
- {
- rl_ding ();
- break;
- }
- n = wstart;
- while (n < rl_end && rl_alphabetic(rl_line_buffer[n]))
- n++;
- wlen = n - wstart + 1;
- if (search_string_index + wlen + 1 >= search_string_size)
- {
- search_string_size += wlen + 1;
- search_string = (char *)xrealloc (search_string, search_string_size);
- }
- for (; wstart < n; wstart++)
- search_string[search_string_index++] = rl_line_buffer[wstart];
- search_string[search_string_index] = '\0';
- break;
+ /* Move to the next line, but skip new copies of the line
+ we just found and lines shorter than the string we're
+ searching for. */
+ do
+ {
+ /* Move to the next line. */
+ cxt->history_pos += cxt->direction;
- case -6: /* C-Y */
- /* skip over portion of line we already matched */
- wstart = rl_point + search_string_index;
- if (wstart >= rl_end)
+ /* At limit for direction? */
+ if ((cxt->sflags & SF_REVERSE) ? (cxt->history_pos < 0) : (cxt->history_pos == cxt->hlen))
{
- rl_ding ();
+ cxt->sflags |= SF_FAILED;
break;
}
- n = rl_end - wstart + 1;
- if (search_string_index + n + 1 >= search_string_size)
- {
- search_string_size += n + 1;
- search_string = (char *)xrealloc (search_string, search_string_size);
- }
- for (n = wstart; n < rl_end; n++)
- search_string[search_string_index++] = rl_line_buffer[n];
- search_string[search_string_index] = '\0';
- break;
- default:
- /* Add character to search string and continue search. */
- if (search_string_index + 2 >= search_string_size)
- {
- search_string_size += 128;
- search_string = (char *)xrealloc (search_string, search_string_size);
- }
-#if defined (HANDLE_MULTIBYTE)
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- {
- int j, l;
- for (j = 0, l = strlen (mb); j < l; )
- search_string[search_string_index++] = mb[j++];
- }
- else
-#endif
- search_string[search_string_index++] = c;
- search_string[search_string_index] = '\0';
- break;
+ /* We will need these later. */
+ cxt->sline = cxt->lines[cxt->history_pos];
+ cxt->sline_len = strlen (cxt->sline);
}
+ while ((cxt->prev_line_found && STREQ (cxt->prev_line_found, cxt->lines[cxt->history_pos])) ||
+ (cxt->search_string_index > cxt->sline_len));
- for (found = failed = 0;;)
- {
- int limit = sline_len - search_string_index + 1;
+ if (cxt->sflags & SF_FAILED)
+ break;
- /* Search the current line. */
- while (reverse ? (line_index >= 0) : (line_index < limit))
- {
- if (STREQN (search_string, sline + line_index, search_string_index))
- {
- found++;
- break;
- }
- else
- line_index += direction;
- }
- if (found)
- break;
+ /* Now set up the line for searching... */
+ cxt->sline_index = (cxt->sflags & SF_REVERSE) ? cxt->sline_len - cxt->search_string_index : 0;
+ }
- /* Move to the next line, but skip new copies of the line
- we just found and lines shorter than the string we're
- searching for. */
- do
- {
- /* Move to the next line. */
- i += direction;
-
- /* At limit for direction? */
- if (reverse ? (i < 0) : (i == hlen))
- {
- failed++;
- break;
- }
-
- /* We will need these later. */
- sline = lines[i];
- sline_len = strlen (sline);
- }
- while ((prev_line_found && STREQ (prev_line_found, lines[i])) ||
- (search_string_index > sline_len));
+ if (cxt->sflags & SF_FAILED)
+ {
+ /* We cannot find the search string. Ding the bell. */
+ rl_ding ();
+ cxt->history_pos = cxt->last_found_line;
+ return 1;
+ }
- if (failed)
- break;
+ /* We have found the search string. Just display it. But don't
+ actually move there in the history list until the user accepts
+ the location. */
+ if (cxt->sflags & SF_FOUND)
+ {
+ cxt->prev_line_found = cxt->lines[cxt->history_pos];
+ rl_replace_line (cxt->lines[cxt->history_pos], 0);
+ rl_point = cxt->sline_index;
+ cxt->last_found_line = cxt->history_pos;
+ rl_display_search (cxt->search_string, (cxt->sflags & SF_REVERSE), (cxt->history_pos == cxt->save_line) ? -1 : cxt->history_pos);
+ }
- /* Now set up the line for searching... */
- line_index = reverse ? sline_len - search_string_index : 0;
- }
+ return 1;
+}
- if (failed)
- {
- /* We cannot find the search string. Ding the bell. */
- rl_ding ();
- i = last_found_line;
- continue; /* XXX - was break */
- }
+static int
+_rl_isearch_cleanup (cxt, r)
+ _rl_search_cxt *cxt;
+ int r;
+{
+ if (r >= 0)
+ _rl_isearch_fini (cxt);
+ _rl_scxt_dispose (cxt, 0);
+ _rl_iscxt = 0;
- /* We have found the search string. Just display it. But don't
- actually move there in the history list until the user accepts
- the location. */
- if (found)
- {
- prev_line_found = lines[i];
- rl_replace_line (lines[i], 0);
- rl_point = line_index;
- last_found_line = i;
- rl_display_search (search_string, reverse, (i == orig_line) ? -1 : i);
- }
- }
+ RL_UNSETSTATE(RL_STATE_ISEARCH);
- /* The searching is over. The user may have found the string that she
- was looking for, or else she may have exited a failing search. If
- LINE_INDEX is -1, then that shows that the string searched for was
- not found. We use this to determine where to place rl_point. */
+ return (r != 0);
+}
- /* First put back the original state. */
- strcpy (rl_line_buffer, lines[orig_line]);
+/* Search through the history looking for an interactively typed string.
+ This is analogous to i-search. We start the search in the current line.
+ DIRECTION is which direction to search; >= 0 means forward, < 0 means
+ backwards. */
+static int
+rl_search_history (direction, invoking_key)
+ int direction, invoking_key;
+{
+ _rl_search_cxt *cxt; /* local for now, but saved globally */
+ int c, r;
- rl_restore_prompt ();
+ RL_SETSTATE(RL_STATE_ISEARCH);
+ cxt = _rl_isearch_init (direction);
- /* Save the search string for possible later use. */
- FREE (last_isearch_string);
- last_isearch_string = search_string;
- last_isearch_string_len = search_string_index;
+ rl_display_search (cxt->search_string, (cxt->sflags & SF_REVERSE), -1);
- if (last_found_line < orig_line)
- rl_get_previous_history (orig_line - last_found_line, 0);
- else
- rl_get_next_history (last_found_line - orig_line, 0);
+ /* If we are using the callback interface, all we do is set up here and
+ return. The key is that we leave RL_STATE_ISEARCH set. */
+ if (RL_ISSTATE (RL_STATE_CALLBACK))
+ return (0);
- /* If the string was not found, put point at the end of the last matching
- line. If last_found_line == orig_line, we didn't find any matching
- history lines at all, so put point back in its original position. */
- if (line_index < 0)
+ r = -1;
+ for (;;)
{
- if (last_found_line == orig_line)
- line_index = orig_point;
- else
- line_index = strlen (rl_line_buffer);
- rl_mark = orig_mark;
+ c = _rl_search_getchar (cxt);
+ /* We might want to handle EOF here (c == 0) */
+ r = _rl_isearch_dispatch (cxt, cxt->lastc);
+ if (r <= 0)
+ break;
}
- rl_point = line_index;
- /* Don't worry about where to put the mark here; rl_get_previous_history
- and rl_get_next_history take care of it. */
-
- rl_clear_message ();
+ /* The searching is over. The user may have found the string that she
+ was looking for, or else she may have exited a failing search. If
+ LINE_INDEX is -1, then that shows that the string searched for was
+ not found. We use this to determine where to place rl_point. */
+ return (_rl_isearch_cleanup (cxt, r));
+}
- FREE (allocated_line);
- free (lines);
+#if defined (READLINE_CALLBACKS)
+/* Called from the callback functions when we are ready to read a key. The
+ callback functions know to call this because RL_ISSTATE(RL_STATE_ISEARCH).
+ If _rl_isearch_dispatch finishes searching, this function is responsible
+ for turning off RL_STATE_ISEARCH, which it does using _rl_isearch_cleanup. */
+int
+_rl_isearch_callback (cxt)
+ _rl_search_cxt *cxt;
+{
+ int c, r;
- RL_UNSETSTATE(RL_STATE_ISEARCH);
+ c = _rl_search_getchar (cxt);
+ /* We might want to handle EOF here */
+ r = _rl_isearch_dispatch (cxt, cxt->lastc);
- return 0;
+ return (r <= 0) ? _rl_isearch_cleanup (cxt, r) : 0;
}
+#endif
diff --git a/cmd-line-utils/readline/keymaps.c b/cmd-line-utils/readline/keymaps.c
index 2be03f7086f..70d0cc08d3f 100644
--- a/cmd-line-utils/readline/keymaps.c
+++ b/cmd-line-utils/readline/keymaps.c
@@ -20,7 +20,9 @@
Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#define READLINE_LIBRARY
-#include "config_readline.h"
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
#if defined (HAVE_STDLIB_H)
# include <stdlib.h>
diff --git a/cmd-line-utils/readline/kill.c b/cmd-line-utils/readline/kill.c
index 4d31a8ff170..031ddf47c5b 100644
--- a/cmd-line-utils/readline/kill.c
+++ b/cmd-line-utils/readline/kill.c
@@ -21,7 +21,9 @@
59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#define READLINE_LIBRARY
-#include "config_readline.h"
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
#include <sys/types.h>
@@ -76,7 +78,8 @@ static int rl_yank_nth_arg_internal PARAMS((int, int, int));
/* How to say that you only want to save a certain amount
of kill material. */
int
-rl_set_retained_kills (int num __attribute__((unused)))
+rl_set_retained_kills (num)
+ int num;
{
return 0;
}
@@ -292,8 +295,8 @@ rl_backward_kill_line (direction, ignore)
/* Kill the whole line, no matter where point is. */
int
-rl_kill_full_line (int count __attribute__((unused)),
- int ignore __attribute__((unused)))
+rl_kill_full_line (count, ignore)
+ int count, ignore;
{
rl_begin_undo_group ();
rl_point = 0;
@@ -310,7 +313,8 @@ rl_kill_full_line (int count __attribute__((unused)),
/* This does what C-w does in Unix. We can't prevent people from
using behaviour that they expect. */
int
-rl_unix_word_rubout (int count, int key __attribute__((unused)))
+rl_unix_word_rubout (count, key)
+ int count, key;
{
int orig_point;
@@ -342,7 +346,8 @@ rl_unix_word_rubout (int count, int key __attribute__((unused)))
/* This deletes one filename component in a Unix pathname. That is, it
deletes backward to directory separator (`/') or whitespace. */
int
-rl_unix_filename_rubout (int count, int key __attribute__((unused)))
+rl_unix_filename_rubout (count, key)
+ int count, key;
{
int orig_point, c;
@@ -385,8 +390,8 @@ rl_unix_filename_rubout (int count, int key __attribute__((unused)))
into the line at all, and if you aren't, then you know what you are
doing. */
int
-rl_unix_line_discard (int count __attribute__((unused)),
- int key __attribute__((unused)))
+rl_unix_line_discard (count, key)
+ int count, key;
{
if (rl_point == 0)
rl_ding ();
@@ -422,16 +427,16 @@ region_kill_internal (delete)
/* Copy the text in the region to the kill ring. */
int
-rl_copy_region_to_kill (int count __attribute__((unused)),
- int key __attribute__((unused)))
+rl_copy_region_to_kill (count, ignore)
+ int count, ignore;
{
return (region_kill_internal (0));
}
/* Kill the text between the point and mark. */
int
-rl_kill_region (int count __attribute__((unused)),
- int ignore __attribute__((unused)))
+rl_kill_region (count, ignore)
+ int count, ignore;
{
int r, npoint;
@@ -495,7 +500,8 @@ rl_copy_backward_word (count, key)
/* Yank back the last killed text. This ignores arguments. */
int
-rl_yank (int count __attribute__((unused)), int ignore __attribute__((unused)))
+rl_yank (count, ignore)
+ int count, ignore;
{
if (rl_kill_ring == 0)
{
@@ -513,7 +519,8 @@ rl_yank (int count __attribute__((unused)), int ignore __attribute__((unused)))
delete that text from the line, rotate the index down, and
yank back some other text. */
int
-rl_yank_pop (int count __attribute__((unused)), int key __attribute__((unused)))
+rl_yank_pop (count, key)
+ int count, key;
{
int l, n;
@@ -575,6 +582,7 @@ rl_yank_nth_arg_internal (count, ignore, history_skip)
if (!arg || !*arg)
{
rl_ding ();
+ FREE (arg);
return -1;
}
diff --git a/cmd-line-utils/readline/macro.c b/cmd-line-utils/readline/macro.c
index 8727285e181..00cd58d628c 100644
--- a/cmd-line-utils/readline/macro.c
+++ b/cmd-line-utils/readline/macro.c
@@ -21,7 +21,9 @@
59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#define READLINE_LIBRARY
-#include "config_readline.h"
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
#include <sys/types.h>
@@ -98,6 +100,8 @@ _rl_with_macro_input (string)
int
_rl_next_macro_key ()
{
+ int c;
+
if (rl_executing_macro == 0)
return (0);
@@ -107,7 +111,14 @@ _rl_next_macro_key ()
return (_rl_next_macro_key ());
}
+#if defined (READLINE_CALLBACKS)
+ c = rl_executing_macro[executing_macro_index++];
+ if (RL_ISSTATE (RL_STATE_CALLBACK) && RL_ISSTATE (RL_STATE_READCMD|RL_STATE_MOREINPUT) && rl_executing_macro[executing_macro_index] == 0)
+ _rl_pop_executing_macro ();
+ return c;
+#else
return (rl_executing_macro[executing_macro_index++]);
+#endif
}
/* Save the currently executing macro on a stack of saved macros. */
@@ -189,8 +200,8 @@ _rl_kill_kbd_macro ()
definition to the end of the existing macro, and start by
re-executing the existing macro. */
int
-rl_start_kbd_macro (int ignore1 __attribute__((unused)),
- int ignore2 __attribute__((unused)))
+rl_start_kbd_macro (ignore1, ignore2)
+ int ignore1, ignore2;
{
if (RL_ISSTATE (RL_STATE_MACRODEF))
{
@@ -214,7 +225,8 @@ rl_start_kbd_macro (int ignore1 __attribute__((unused)),
A numeric argument says to execute the macro right now,
that many times, counting the definition as the first time. */
int
-rl_end_kbd_macro (int count, int ignore __attribute__((unused)))
+rl_end_kbd_macro (count, ignore)
+ int count, ignore;
{
if (RL_ISSTATE (RL_STATE_MACRODEF) == 0)
{
@@ -233,7 +245,8 @@ rl_end_kbd_macro (int count, int ignore __attribute__((unused)))
/* Execute the most recently defined keyboard macro.
COUNT says how many times to execute it. */
int
-rl_call_last_kbd_macro (int count, int ignore __attribute__((unused)))
+rl_call_last_kbd_macro (count, ignore)
+ int count, ignore;
{
if (current_macro == 0)
_rl_abort_internal ();
diff --git a/cmd-line-utils/readline/mbutil.c b/cmd-line-utils/readline/mbutil.c
index 284ea63aae4..17dde53ed7b 100644
--- a/cmd-line-utils/readline/mbutil.c
+++ b/cmd-line-utils/readline/mbutil.c
@@ -1,6 +1,6 @@
/* mbutil.c -- readline multibyte character utility functions */
-/* Copyright (C) 2001-2004 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2005 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -21,16 +21,11 @@
59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#define READLINE_LIBRARY
-#ifndef _XOPEN_SOURCE
-#define _XOPEN_SOURCE 500
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
#endif
-#include "config_readline.h"
-
#include <sys/types.h>
-
-/* To get SuSE 9.3 to define wcwidth() (in wchar.h) */
-
#include <fcntl.h>
#include "posixjmp.h"
@@ -82,18 +77,20 @@ _rl_find_next_mbchar_internal (string, seed, count, find_non_zero)
char *string;
int seed, count, find_non_zero;
{
- size_t tmp = 0;
+ size_t tmp;
mbstate_t ps;
- int point = 0;
+ int point;
wchar_t wc;
+ tmp = 0;
+
memset(&ps, 0, sizeof (mbstate_t));
if (seed < 0)
seed = 0;
if (count <= 0)
return seed;
- point = seed + _rl_adjust_point(string, seed, &ps);
+ point = seed + _rl_adjust_point (string, seed, &ps);
/* if this is true, means that seed was not pointed character
started byte. So correct the point and consume count */
if (seed < point)
@@ -131,15 +128,16 @@ _rl_find_next_mbchar_internal (string, seed, count, find_non_zero)
if (find_non_zero)
{
tmp = mbrtowc (&wc, string + point, strlen (string + point), &ps);
- while (wcwidth (wc) == 0)
+ while (tmp > 0 && wcwidth (wc) == 0)
{
point += tmp;
tmp = mbrtowc (&wc, string + point, strlen (string + point), &ps);
- if (tmp == (size_t)(0) || tmp == (size_t)(-1) || tmp == (size_t)(-2))
+ if (MB_NULLWCH (tmp) || MB_INVALIDCH (tmp))
break;
}
}
- return point;
+
+ return point;
}
static int
@@ -318,6 +316,28 @@ _rl_is_mbchar_matched (string, seed, end, mbchar, length)
return 0;
return 1;
}
+
+wchar_t
+_rl_char_value (buf, ind)
+ char *buf;
+ int ind;
+{
+ size_t tmp;
+ wchar_t wc;
+ mbstate_t ps;
+ int l;
+
+ if (MB_LEN_MAX == 1 || rl_byte_oriented)
+ return ((wchar_t) buf[ind]);
+ l = strlen (buf);
+ if (ind >= l - 1)
+ return ((wchar_t) buf[ind]);
+ memset (&ps, 0, sizeof (mbstate_t));
+ tmp = mbrtowc (&wc, buf + ind, l - ind, &ps);
+ if (MB_INVALIDCH (tmp) || MB_NULLWCH (tmp))
+ return ((wchar_t) buf[ind]);
+ return wc;
+}
#endif /* HANDLE_MULTIBYTE */
/* Find next `count' characters started byte point of the specified seed.
diff --git a/cmd-line-utils/readline/misc.c b/cmd-line-utils/readline/misc.c
index c8739d0d750..94ecb25900a 100644
--- a/cmd-line-utils/readline/misc.c
+++ b/cmd-line-utils/readline/misc.c
@@ -1,6 +1,6 @@
/* misc.c -- miscellaneous bindable readline functions. */
-/* Copyright (C) 1987-2004 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2005 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -21,7 +21,9 @@
59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#define READLINE_LIBRARY
-#include "config_readline.h"
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
#if defined (HAVE_UNISTD_H)
# include <unistd.h>
@@ -61,6 +63,8 @@ void _rl_free_history_entry PARAMS((HIST_ENTRY *));
to preserve the value of rl_point from line to line. */
int _rl_history_preserve_point = 0;
+_rl_arg_cxt _rl_argcxt;
+
/* Saved target point for when _rl_history_preserve_point is set. Special
value of -1 means that point is at the end of the line. */
int _rl_history_saved_point = -1;
@@ -71,77 +75,74 @@ int _rl_history_saved_point = -1;
/* */
/* **************************************************************** */
-/* Handle C-u style numeric args, as well as M--, and M-digits. */
-static int
-rl_digit_loop ()
+int
+_rl_arg_overflow ()
{
- int key, c, sawminus, sawdigits;
+ if (rl_numeric_arg > 1000000)
+ {
+ _rl_argcxt = 0;
+ rl_explicit_arg = rl_numeric_arg = 0;
+ rl_ding ();
+ rl_restore_prompt ();
+ rl_clear_message ();
+ RL_UNSETSTATE(RL_STATE_NUMERICARG);
+ return 1;
+ }
+ return 0;
+}
+void
+_rl_arg_init ()
+{
rl_save_prompt ();
-
+ _rl_argcxt = 0;
RL_SETSTATE(RL_STATE_NUMERICARG);
- sawminus = sawdigits = 0;
- while (1)
- {
- if (rl_numeric_arg > 1000000)
- {
- sawdigits = rl_explicit_arg = rl_numeric_arg = 0;
- rl_ding ();
- rl_restore_prompt ();
- rl_clear_message ();
- RL_UNSETSTATE(RL_STATE_NUMERICARG);
- return 1;
- }
- rl_message ("(arg: %d) ", rl_arg_sign * rl_numeric_arg);
- RL_SETSTATE(RL_STATE_MOREINPUT);
- key = c = rl_read_key ();
- RL_UNSETSTATE(RL_STATE_MOREINPUT);
+}
- if (c < 0)
- {
- _rl_abort_internal ();
- return -1;
- }
+int
+_rl_arg_getchar ()
+{
+ int c;
- /* If we see a key bound to `universal-argument' after seeing digits,
- it ends the argument but is otherwise ignored. */
- if (_rl_keymap[c].type == ISFUNC &&
- _rl_keymap[c].function == rl_universal_argument)
- {
- if (sawdigits == 0)
- {
- rl_numeric_arg *= 4;
- continue;
- }
- else
- {
- RL_SETSTATE(RL_STATE_MOREINPUT);
- key = rl_read_key ();
- RL_UNSETSTATE(RL_STATE_MOREINPUT);
- rl_restore_prompt ();
- rl_clear_message ();
- RL_UNSETSTATE(RL_STATE_NUMERICARG);
- return (_rl_dispatch (key, _rl_keymap));
- }
- }
+ rl_message ("(arg: %d) ", rl_arg_sign * rl_numeric_arg);
+ RL_SETSTATE(RL_STATE_MOREINPUT);
+ c = rl_read_key ();
+ RL_UNSETSTATE(RL_STATE_MOREINPUT);
- c = UNMETA (c);
+ return c;
+}
- if (_rl_digit_p (c))
- {
- rl_numeric_arg = rl_explicit_arg ? (rl_numeric_arg * 10) + c - '0' : c - '0';
- sawdigits = rl_explicit_arg = 1;
- }
- else if (c == '-' && rl_explicit_arg == 0)
+/* Process C as part of the current numeric argument. Return -1 if the
+ argument should be aborted, 0 if we should not read any more chars, and
+ 1 if we should continue to read chars. */
+int
+_rl_arg_dispatch (cxt, c)
+ _rl_arg_cxt cxt;
+ int c;
+{
+ int key, r;
+
+ key = c;
+
+ /* If we see a key bound to `universal-argument' after seeing digits,
+ it ends the argument but is otherwise ignored. */
+ if (_rl_keymap[c].type == ISFUNC && _rl_keymap[c].function == rl_universal_argument)
+ {
+ if ((cxt & NUM_SAWDIGITS) == 0)
{
- rl_numeric_arg = sawminus = 1;
- rl_arg_sign = -1;
+ rl_numeric_arg *= 4;
+ return 1;
}
+ else if (RL_ISSTATE (RL_STATE_CALLBACK))
+ {
+ _rl_argcxt |= NUM_READONE;
+ return 0; /* XXX */
+ }
else
{
- /* Make M-- command equivalent to M--1 command. */
- if (sawminus && rl_numeric_arg == 1 && rl_explicit_arg == 0)
- rl_explicit_arg = 1;
+ RL_SETSTATE(RL_STATE_MOREINPUT);
+ key = rl_read_key ();
+ RL_UNSETSTATE(RL_STATE_MOREINPUT);
rl_restore_prompt ();
rl_clear_message ();
RL_UNSETSTATE(RL_STATE_NUMERICARG);
@@ -149,45 +150,144 @@ rl_digit_loop ()
}
}
- /*NOTREACHED*/
-}
+ c = UNMETA (c);
-/* Add the current digit to the argument in progress. */
-int
-rl_digit_argument (int ignore __attribute__((unused)), int key)
-{
- rl_execute_next (key);
- return (rl_digit_loop ());
+ if (_rl_digit_p (c))
+ {
+ r = _rl_digit_value (c);
+ rl_numeric_arg = rl_explicit_arg ? (rl_numeric_arg * 10) + r : r;
+ rl_explicit_arg = 1;
+ _rl_argcxt |= NUM_SAWDIGITS;
+ }
+ else if (c == '-' && rl_explicit_arg == 0)
+ {
+ rl_numeric_arg = 1;
+ _rl_argcxt |= NUM_SAWMINUS;
+ rl_arg_sign = -1;
+ }
+ else
+ {
+ /* Make M-- command equivalent to M--1 command. */
+ if ((_rl_argcxt & NUM_SAWMINUS) && rl_numeric_arg == 1 && rl_explicit_arg == 0)
+ rl_explicit_arg = 1;
+ rl_restore_prompt ();
+ rl_clear_message ();
+ RL_UNSETSTATE(RL_STATE_NUMERICARG);
+
+ r = _rl_dispatch (key, _rl_keymap);
+ if (RL_ISSTATE (RL_STATE_CALLBACK))
+ {
+ /* At worst, this will cause an extra redisplay. Otherwise,
+ we have to wait until the next character comes in. */
+ if (rl_done == 0)
+ (*rl_redisplay_function) ();
+ r = 0;
+ }
+ return r;
+ }
+
+ return 1;
}
-/* What to do when you abort reading an argument. */
-int
-rl_discard_argument ()
+/* Handle C-u style numeric args, as well as M--, and M-digits. */
+static int
+rl_digit_loop ()
{
- rl_ding ();
- rl_clear_message ();
- _rl_init_argument ();
- return 0;
+ int c, r;
+
+ while (1)
+ {
+ if (_rl_arg_overflow ())
+ return 1;
+
+ c = _rl_arg_getchar ();
+
+ if (c < 0)
+ {
+ _rl_abort_internal ();
+ return -1;
+ }
+
+ r = _rl_arg_dispatch (_rl_argcxt, c);
+ if (r <= 0 || (RL_ISSTATE (RL_STATE_NUMERICARG) == 0))
+ break;
+ }
+
+ return r;
}
/* Create a default argument. */
-int
-_rl_init_argument ()
+void
+_rl_reset_argument ()
{
rl_numeric_arg = rl_arg_sign = 1;
rl_explicit_arg = 0;
- return 0;
+ _rl_argcxt = 0;
+}
+
+/* Start a numeric argument with initial value KEY */
+int
+rl_digit_argument (ignore, key)
+ int ignore, key;
+{
+ _rl_arg_init ();
+ if (RL_ISSTATE (RL_STATE_CALLBACK))
+ {
+ _rl_arg_dispatch (_rl_argcxt, key);
+ rl_message ("(arg: %d) ", rl_arg_sign * rl_numeric_arg);
+ return 0;
+ }
+ else
+ {
+ rl_execute_next (key);
+ return (rl_digit_loop ());
+ }
}
/* C-u, universal argument. Multiply the current argument by 4.
Read a key. If the key has nothing to do with arguments, then
dispatch on it. If the key is the abort character then abort. */
int
-rl_universal_argument (int count __attribute__((unused)),
- int key __attribute__((unused)))
+rl_universal_argument (count, key)
+ int count, key;
{
+ _rl_arg_init ();
rl_numeric_arg *= 4;
- return (rl_digit_loop ());
+
+ return (RL_ISSTATE (RL_STATE_CALLBACK) ? 0 : rl_digit_loop ());
+}
+
+int
+_rl_arg_callback (cxt)
+ _rl_arg_cxt cxt;
+{
+ int c, r;
+
+ c = _rl_arg_getchar ();
+
+ if (_rl_argcxt & NUM_READONE)
+ {
+ _rl_argcxt &= ~NUM_READONE;
+ rl_restore_prompt ();
+ rl_clear_message ();
+ RL_UNSETSTATE(RL_STATE_NUMERICARG);
+ rl_execute_next (c);
+ return 0;
+ }
+
+ r = _rl_arg_dispatch (cxt, c);
+ return (r != 1);
+}
+
+/* What to do when you abort reading an argument. */
+int
+rl_discard_argument ()
+{
+ rl_ding ();
+ rl_clear_message ();
+ _rl_reset_argument ();
+
+ return 0;
}
/* **************************************************************** */
@@ -222,8 +322,10 @@ _rl_free_history_entry (entry)
{
if (entry == 0)
return;
- if (entry->line)
- free (entry->line);
+
+ FREE (entry->line);
+ FREE (entry->timestamp);
+
free (entry);
}
@@ -239,6 +341,7 @@ rl_maybe_replace_line ()
{
temp = replace_history_entry (where_history (), rl_line_buffer, (histdata_t)rl_undo_list);
free (temp->line);
+ FREE (temp->timestamp);
free (temp);
}
return 0;
@@ -271,14 +374,9 @@ rl_maybe_save_line ()
{
_rl_saved_line_for_history = (HIST_ENTRY *)xmalloc (sizeof (HIST_ENTRY));
_rl_saved_line_for_history->line = savestring (rl_line_buffer);
+ _rl_saved_line_for_history->timestamp = (char *)NULL;
_rl_saved_line_for_history->data = (char *)rl_undo_list;
}
- else if (STREQ (rl_line_buffer, _rl_saved_line_for_history->line) == 0)
- {
- free (_rl_saved_line_for_history->line);
- _rl_saved_line_for_history->line = savestring (rl_line_buffer);
- _rl_saved_line_for_history->data = (char *)rl_undo_list; /* XXX possible memleak */
- }
return 0;
}
@@ -313,7 +411,9 @@ _rl_history_set_point ()
}
void
-rl_replace_from_history (HIST_ENTRY *entry, int flags __attribute__((unused)))
+rl_replace_from_history (entry, flags)
+ HIST_ENTRY *entry;
+ int flags; /* currently unused */
{
/* Can't call with `1' because rl_undo_list might point to an undo list
from a history entry, just like we're setting up here. */
@@ -339,15 +439,16 @@ rl_replace_from_history (HIST_ENTRY *entry, int flags __attribute__((unused)))
/* Meta-< goes to the start of the history. */
int
-rl_beginning_of_history (int count __attribute__((unused)), int key)
+rl_beginning_of_history (count, key)
+ int count, key;
{
return (rl_get_previous_history (1 + where_history (), key));
}
/* Meta-> goes to the end of the history. (The current line). */
int
-rl_end_of_history (int count __attribute__((unused)),
- int key __attribute__((unused)))
+rl_end_of_history (count, key)
+ int count, key;
{
rl_maybe_replace_line ();
using_history ();
@@ -451,7 +552,8 @@ rl_get_previous_history (count, key)
/* **************************************************************** */
/* How to toggle back and forth between editing modes. */
int
-rl_vi_editing_mode (int count __attribute__((unused)), int key)
+rl_vi_editing_mode (count, key)
+ int count, key;
{
#if defined (VI_MODE)
_rl_set_insert_mode (RL_IM_INSERT, 1); /* vi mode ignores insert mode */
@@ -463,8 +565,8 @@ rl_vi_editing_mode (int count __attribute__((unused)), int key)
}
int
-rl_emacs_editing_mode (int count __attribute__((unused)),
- int key __attribute__((unused)))
+rl_emacs_editing_mode (count, key)
+ int count, key;
{
rl_editing_mode = emacs_mode;
_rl_set_insert_mode (RL_IM_INSERT, 1); /* emacs mode default is insert mode */
@@ -474,7 +576,8 @@ rl_emacs_editing_mode (int count __attribute__((unused)),
/* Function for the rest of the library to use to set insert/overwrite mode. */
void
-_rl_set_insert_mode (int im, int force __attribute__((unused)))
+_rl_set_insert_mode (im, force)
+ int im, force;
{
#ifdef CURSOR_MODE
_rl_set_cursor (im, force);
@@ -486,7 +589,8 @@ _rl_set_insert_mode (int im, int force __attribute__((unused)))
/* Toggle overwrite mode. A positive explicit argument selects overwrite
mode. A negative or zero explicit argument selects insert mode. */
int
-rl_overwrite_mode (int count, int key __attribute__((unused)))
+rl_overwrite_mode (count, key)
+ int count, key;
{
if (rl_explicit_arg == 0)
_rl_set_insert_mode (rl_insert_mode ^ 1, 0);
diff --git a/cmd-line-utils/readline/nls.c b/cmd-line-utils/readline/nls.c
index 73ad0227195..bcee87561aa 100644
--- a/cmd-line-utils/readline/nls.c
+++ b/cmd-line-utils/readline/nls.c
@@ -21,7 +21,9 @@
59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#define READLINE_LIBRARY
-#include "config_readline.h"
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
#include <sys/types.h>
@@ -111,7 +113,7 @@ _rl_init_eightbit ()
if (lspec == 0 || *lspec == 0)
lspec = setlocale (LC_CTYPE, (char *)NULL);
if (lspec == 0)
- lspec = (char*) "";
+ lspec = "";
t = setlocale (LC_CTYPE, lspec);
if (t && *t && (t[0] != 'C' || t[1]) && (STREQ (t, "POSIX") == 0))
diff --git a/cmd-line-utils/readline/parens.c b/cmd-line-utils/readline/parens.c
index bb893ac1bfb..737f7675e93 100644
--- a/cmd-line-utils/readline/parens.c
+++ b/cmd-line-utils/readline/parens.c
@@ -27,7 +27,9 @@
#include "rlconf.h"
-#include "config_readline.h"
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
#include <stdio.h>
#include <sys/types.h>
diff --git a/cmd-line-utils/readline/readline.c b/cmd-line-utils/readline/readline.c
index dd3724a86d7..c2b74006b05 100644
--- a/cmd-line-utils/readline/readline.c
+++ b/cmd-line-utils/readline/readline.c
@@ -1,7 +1,7 @@
/* readline.c -- a general facility for reading lines of input
with emacs style editing and completion. */
-/* Copyright (C) 1987-2002 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2005 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -22,7 +22,9 @@
59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#define READLINE_LIBRARY
-#include "config_readline.h"
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
#include <sys/types.h>
#include "posixstat.h"
@@ -47,6 +49,11 @@
#include <stdio.h>
#include "posixjmp.h"
+#include <errno.h>
+
+#if !defined (errno)
+extern int errno;
+#endif /* !errno */
/* System-specific feature definitions and include files. */
#include "rldefs.h"
@@ -66,11 +73,11 @@
#include "xmalloc.h"
#ifndef RL_LIBRARY_VERSION
-# define RL_LIBRARY_VERSION "5.0"
+# define RL_LIBRARY_VERSION "5.1"
#endif
#ifndef RL_READLINE_VERSION
-# define RL_READLINE_VERSION 0x0500
+# define RL_READLINE_VERSION 0x0501
#endif
extern void _rl_free_history_entry PARAMS((HIST_ENTRY *));
@@ -83,9 +90,10 @@ static void bind_arrow_keys_internal PARAMS((Keymap));
static void bind_arrow_keys PARAMS((void));
static void readline_default_bindings PARAMS((void));
-#ifdef NOT_USED
static void reset_default_bindings PARAMS((void));
-#endif
+
+static int _rl_subseq_result PARAMS((int, Keymap, int, int));
+static int _rl_subseq_getchar PARAMS((int));
/* **************************************************************** */
/* */
@@ -104,6 +112,7 @@ int rl_gnu_readline_p = 1;
By default, it is the standard emacs keymap. */
Keymap _rl_keymap = emacs_standard_keymap;
+
/* The current style of editing. */
int rl_editing_mode = emacs_mode;
@@ -219,6 +228,9 @@ char *_rl_comment_begin;
/* Keymap holding the function currently being executed. */
Keymap rl_executing_keymap;
+/* Keymap we're currently using to dispatch. */
+Keymap _rl_dispatching_keymap;
+
/* Non-zero means to erase entire line, including prompt, on empty input lines. */
int rl_erase_empty_line = 0;
@@ -230,6 +242,9 @@ int rl_num_chars_to_read;
char *rl_line_buffer = (char *)NULL;
int rl_line_buffer_len = 0;
+/* Key sequence `contexts' */
+_rl_keyseq_cxt *_rl_kscxt = 0;
+
/* Forward declarations used by the display, termcap, and history code. */
/* **************************************************************** */
@@ -251,6 +266,10 @@ int _rl_convert_meta_chars_to_ascii = 1;
rather than as a meta-prefixed escape sequence. */
int _rl_output_meta_chars = 0;
+/* Non-zero means to look at the termios special characters and bind
+ them to equivalent readline functions at startup. */
+int _rl_bind_stty_chars = 1;
+
/* **************************************************************** */
/* */
/* Top Level Functions */
@@ -268,6 +287,7 @@ rl_set_prompt (prompt)
{
FREE (rl_prompt);
rl_prompt = prompt ? savestring (prompt) : (char *)NULL;
+ rl_display_prompt = rl_prompt ? rl_prompt : "";
rl_visible_prompt_length = rl_expand_prompt (rl_prompt);
return 0;
@@ -291,14 +311,16 @@ readline (prompt)
rl_set_prompt (prompt);
rl_initialize ();
- (*rl_prep_term_function) (_rl_meta_flag);
+ if (rl_prep_term_function)
+ (*rl_prep_term_function) (_rl_meta_flag);
#if defined (HANDLE_SIGNALS)
rl_set_signals ();
#endif
value = readline_internal ();
- (*rl_deprep_term_function) ();
+ if (rl_deprep_term_function)
+ (*rl_deprep_term_function) ();
#if defined (HANDLE_SIGNALS)
rl_clear_signals ();
@@ -388,6 +410,36 @@ readline_internal_teardown (eof)
return (eof ? (char *)NULL : savestring (the_line));
}
+void
+_rl_internal_char_cleanup ()
+{
+#if defined (VI_MODE)
+ /* In vi mode, when you exit insert mode, the cursor moves back
+ over the previous character. We explicitly check for that here. */
+ if (rl_editing_mode == vi_mode && _rl_keymap == vi_movement_keymap)
+ rl_vi_check ();
+#endif /* VI_MODE */
+
+ if (rl_num_chars_to_read && rl_end >= rl_num_chars_to_read)
+ {
+ (*rl_redisplay_function) ();
+ _rl_want_redisplay = 0;
+ rl_newline (1, '\n');
+ }
+
+ if (rl_done == 0)
+ {
+ (*rl_redisplay_function) ();
+ _rl_want_redisplay = 0;
+ }
+
+ /* If the application writer has told us to erase the entire line if
+ the only character typed was something bound to rl_newline, do so. */
+ if (rl_erase_empty_line && rl_done && rl_last_func == rl_newline &&
+ rl_point == 0 && rl_end == 0)
+ _rl_erase_entire_line ();
+}
+
STATIC_CALLBACK int
#if defined (READLINE_CALLBACKS)
readline_internal_char ()
@@ -410,12 +462,21 @@ readline_internal_charloop ()
code = setjmp (readline_top_level);
if (code)
- (*rl_redisplay_function) ();
+ {
+ (*rl_redisplay_function) ();
+ _rl_want_redisplay = 0;
+ /* If we get here, we're not being called from something dispatched
+ from _rl_callback_read_char(), which sets up its own value of
+ readline_top_level (saving and restoring the old, of course), so
+ we can just return here. */
+ if (RL_ISSTATE (RL_STATE_CALLBACK))
+ return (0);
+ }
if (rl_pending_input == 0)
{
/* Then initialize the argument and number of keys read. */
- _rl_init_argument ();
+ _rl_reset_argument ();
rl_key_sequence_length = 0;
}
@@ -423,6 +484,20 @@ readline_internal_charloop ()
c = rl_read_key ();
RL_UNSETSTATE(RL_STATE_READCMD);
+ /* look at input.c:rl_getc() for the circumstances under which this will
+ be returned; punt immediately on read error without converting it to
+ a newline. */
+ if (c == READERR)
+ {
+#if defined (READLINE_CALLBACKS)
+ RL_SETSTATE(RL_STATE_DONE);
+ return (rl_done = 1);
+#else
+ eof_found = 1;
+ break;
+#endif
+ }
+
/* EOF typed to a non-blank line is a <NL>. */
if (c == EOF && rl_end)
c = NEWLINE;
@@ -449,27 +524,7 @@ readline_internal_charloop ()
if (rl_pending_input == 0 && lk == _rl_last_command_was_kill)
_rl_last_command_was_kill = 0;
-#if defined (VI_MODE)
- /* In vi mode, when you exit insert mode, the cursor moves back
- over the previous character. We explicitly check for that here. */
- if (rl_editing_mode == vi_mode && _rl_keymap == vi_movement_keymap)
- rl_vi_check ();
-#endif /* VI_MODE */
-
- if (rl_num_chars_to_read && rl_end >= rl_num_chars_to_read)
- {
- (*rl_redisplay_function) ();
- rl_newline (1, '\n');
- }
-
- if (rl_done == 0)
- (*rl_redisplay_function) ();
-
- /* If the application writer has told us to erase the entire line if
- the only character typed was something bound to rl_newline, do so. */
- if (rl_erase_empty_line && rl_done && rl_last_func == rl_newline &&
- rl_point == 0 && rl_end == 0)
- _rl_erase_entire_line ();
+ _rl_internal_char_cleanup ();
#if defined (READLINE_CALLBACKS)
return 0;
@@ -519,6 +574,107 @@ _rl_set_the_line ()
the_line = rl_line_buffer;
}
+#if defined (READLINE_CALLBACKS)
+_rl_keyseq_cxt *
+_rl_keyseq_cxt_alloc ()
+{
+ _rl_keyseq_cxt *cxt;
+
+ cxt = (_rl_keyseq_cxt *)xmalloc (sizeof (_rl_keyseq_cxt));
+
+ cxt->flags = cxt->subseq_arg = cxt->subseq_retval = 0;
+
+ cxt->okey = 0;
+ cxt->ocxt = _rl_kscxt;
+ cxt->childval = 42; /* sentinel value */
+
+ return cxt;
+}
+
+void
+_rl_keyseq_cxt_dispose (cxt)
+ _rl_keyseq_cxt *cxt;
+{
+ free (cxt);
+}
+
+void
+_rl_keyseq_chain_dispose ()
+{
+ _rl_keyseq_cxt *cxt;
+
+ while (_rl_kscxt)
+ {
+ cxt = _rl_kscxt;
+ _rl_kscxt = _rl_kscxt->ocxt;
+ _rl_keyseq_cxt_dispose (cxt);
+ }
+}
+#endif
+
+static int
+_rl_subseq_getchar (key)
+ int key;
+{
+ int k;
+
+ if (key == ESC)
+ RL_SETSTATE(RL_STATE_METANEXT);
+ RL_SETSTATE(RL_STATE_MOREINPUT);
+ k = rl_read_key ();
+ RL_UNSETSTATE(RL_STATE_MOREINPUT);
+ if (key == ESC)
+ RL_UNSETSTATE(RL_STATE_METANEXT);
+
+ return k;
+}
+
+#if defined (READLINE_CALLBACKS)
+int
+_rl_dispatch_callback (cxt)
+ _rl_keyseq_cxt *cxt;
+{
+ int nkey, r;
+
+ /* For now */
+#if 1
+ /* The first time this context is used, we want to read input and dispatch
+ on it. When traversing the chain of contexts back `up', we want to use
+ the value from the next context down. We're simulating recursion using
+ a chain of contexts. */
+ if ((cxt->flags & KSEQ_DISPATCHED) == 0)
+ {
+ nkey = _rl_subseq_getchar (cxt->okey);
+ r = _rl_dispatch_subseq (nkey, cxt->dmap, cxt->subseq_arg);
+ cxt->flags |= KSEQ_DISPATCHED;
+ }
+ else
+ r = cxt->childval;
+#else
+ r = _rl_dispatch_subseq (nkey, cxt->dmap, cxt->subseq_arg);
+#endif
+
+ /* For now */
+ r = _rl_subseq_result (r, cxt->oldmap, cxt->okey, (cxt->flags & KSEQ_SUBSEQ));
+
+ if (r == 0) /* success! */
+ {
+ _rl_keyseq_chain_dispose ();
+ RL_UNSETSTATE (RL_STATE_MULTIKEY);
+ return r;
+ }
+
+ if (r != -3) /* magic value that says we added to the chain */
+ _rl_kscxt = cxt->ocxt;
+ if (_rl_kscxt)
+ _rl_kscxt->childval = r;
+ if (r != -3)
+ _rl_keyseq_cxt_dispose (cxt);
+
+ return r;
+}
+#endif /* READLINE_CALLBACKS */
+
/* Do the command associated with KEY in MAP.
If the associated command is really a keymap, then read
another key, and dispatch into that map. */
@@ -527,6 +683,7 @@ _rl_dispatch (key, map)
register int key;
Keymap map;
{
+ _rl_dispatching_keymap = map;
return _rl_dispatch_subseq (key, map, 0);
}
@@ -539,6 +696,9 @@ _rl_dispatch_subseq (key, map, got_subseq)
int r, newkey;
char *macro;
rl_command_func_t *func;
+#if defined (READLINE_CALLBACKS)
+ _rl_keyseq_cxt *cxt;
+#endif
if (META_CHAR (key) && _rl_convert_meta_chars_to_ascii)
{
@@ -572,13 +732,9 @@ _rl_dispatch_subseq (key, map, got_subseq)
rl_executing_keymap = map;
-#if 0
- _rl_suppress_redisplay = (map[key].function == rl_insert) && _rl_input_available ();
-#endif
-
rl_dispatching = 1;
RL_SETSTATE(RL_STATE_DISPATCHING);
- r = (*map[key].function)(rl_numeric_arg * rl_arg_sign, key);
+ (*map[key].function)(rl_numeric_arg * rl_arg_sign, key);
RL_UNSETSTATE(RL_STATE_DISPATCHING);
rl_dispatching = 0;
@@ -607,6 +763,10 @@ _rl_dispatch_subseq (key, map, got_subseq)
}
else
{
+#if defined (READLINE_CALLBACKS)
+ RL_UNSETSTATE (RL_STATE_MULTIKEY);
+ _rl_keyseq_chain_dispose ();
+#endif
_rl_abort_internal ();
return -1;
}
@@ -628,58 +788,43 @@ _rl_dispatch_subseq (key, map, got_subseq)
#endif
rl_key_sequence_length++;
+ _rl_dispatching_keymap = FUNCTION_TO_KEYMAP (map, key);
- if (key == ESC)
- RL_SETSTATE(RL_STATE_METANEXT);
- RL_SETSTATE(RL_STATE_MOREINPUT);
- newkey = rl_read_key ();
- RL_UNSETSTATE(RL_STATE_MOREINPUT);
- if (key == ESC)
- RL_UNSETSTATE(RL_STATE_METANEXT);
+ /* Allocate new context here. Use linked contexts (linked through
+ cxt->ocxt) to simulate recursion */
+#if defined (READLINE_CALLBACKS)
+ if (RL_ISSTATE (RL_STATE_CALLBACK))
+ {
+ /* Return 0 only the first time, to indicate success to
+ _rl_callback_read_char. The rest of the time, we're called
+ from _rl_dispatch_callback, so we return 3 to indicate
+ special handling is necessary. */
+ r = RL_ISSTATE (RL_STATE_MULTIKEY) ? -3 : 0;
+ cxt = _rl_keyseq_cxt_alloc ();
+
+ if (got_subseq)
+ cxt->flags |= KSEQ_SUBSEQ;
+ cxt->okey = key;
+ cxt->oldmap = map;
+ cxt->dmap = _rl_dispatching_keymap;
+ cxt->subseq_arg = got_subseq || cxt->dmap[ANYOTHERKEY].function;
+
+ RL_SETSTATE (RL_STATE_MULTIKEY);
+ _rl_kscxt = cxt;
+
+ return r; /* don't indicate immediate success */
+ }
+#endif
+ newkey = _rl_subseq_getchar (key);
if (newkey < 0)
{
_rl_abort_internal ();
return -1;
}
- r = _rl_dispatch_subseq (newkey, FUNCTION_TO_KEYMAP (map, key), got_subseq || map[ANYOTHERKEY].function);
-
- if (r == -2)
- /* We didn't match anything, and the keymap we're indexed into
- shadowed a function previously bound to that prefix. Call
- the function. The recursive call to _rl_dispatch_subseq has
- already taken care of pushing any necessary input back onto
- the input queue with _rl_unget_char. */
- {
-#if 0
- r = _rl_dispatch (ANYOTHERKEY, FUNCTION_TO_KEYMAP (map, key));
-#else
- /* XXX - experimental code -- might never be executed. Save
- for later. */
- Keymap m = FUNCTION_TO_KEYMAP (map, key);
- int type = m[ANYOTHERKEY].type;
- func = m[ANYOTHERKEY].function;
- if (type == ISFUNC && func == rl_do_lowercase_version)
- r = _rl_dispatch (_rl_to_lower (key), map);
- else
- r = _rl_dispatch (ANYOTHERKEY, m);
-#endif
- }
- else if (r && map[ANYOTHERKEY].function)
- {
- /* We didn't match (r is probably -1), so return something to
- tell the caller that it should try ANYOTHERKEY for an
- overridden function. */
- _rl_unget_char (key);
- return -2;
- }
- else if (r && got_subseq)
- {
- /* OK, back up the chain. */
- _rl_unget_char (key);
- return -1;
- }
+ r = _rl_dispatch_subseq (newkey, _rl_dispatching_keymap, got_subseq || map[ANYOTHERKEY].function);
+ return _rl_subseq_result (r, map, key, got_subseq);
}
else
{
@@ -703,9 +848,69 @@ _rl_dispatch_subseq (key, map, got_subseq)
_rl_vi_textmod_command (key))
_rl_vi_set_last (key, rl_numeric_arg, rl_arg_sign);
#endif
+
return (r);
}
+static int
+_rl_subseq_result (r, map, key, got_subseq)
+ int r;
+ Keymap map;
+ int key, got_subseq;
+{
+ Keymap m;
+ int type, nt;
+ rl_command_func_t *func, *nf;
+
+ if (r == -2)
+ /* We didn't match anything, and the keymap we're indexed into
+ shadowed a function previously bound to that prefix. Call
+ the function. The recursive call to _rl_dispatch_subseq has
+ already taken care of pushing any necessary input back onto
+ the input queue with _rl_unget_char. */
+ {
+ m = _rl_dispatching_keymap;
+ type = m[ANYOTHERKEY].type;
+ func = m[ANYOTHERKEY].function;
+ if (type == ISFUNC && func == rl_do_lowercase_version)
+ r = _rl_dispatch (_rl_to_lower (key), map);
+ else if (type == ISFUNC && func == rl_insert)
+ {
+ /* If the function that was shadowed was self-insert, we
+ somehow need a keymap with map[key].func == self-insert.
+ Let's use this one. */
+ nt = m[key].type;
+ nf = m[key].function;
+
+ m[key].type = type;
+ m[key].function = func;
+ r = _rl_dispatch (key, m);
+ m[key].type = nt;
+ m[key].function = nf;
+ }
+ else
+ r = _rl_dispatch (ANYOTHERKEY, m);
+ }
+ else if (r && map[ANYOTHERKEY].function)
+ {
+ /* We didn't match (r is probably -1), so return something to
+ tell the caller that it should try ANYOTHERKEY for an
+ overridden function. */
+ _rl_unget_char (key);
+ _rl_dispatching_keymap = map;
+ return -2;
+ }
+ else if (r && got_subseq)
+ {
+ /* OK, back up the chain. */
+ _rl_unget_char (key);
+ _rl_dispatching_keymap = map;
+ return -1;
+ }
+
+ return r;
+}
+
/* **************************************************************** */
/* */
/* Initializations */
@@ -863,19 +1068,21 @@ readline_initialize_everything ()
static void
readline_default_bindings ()
{
- rl_tty_set_default_bindings (_rl_keymap);
+ if (_rl_bind_stty_chars)
+ rl_tty_set_default_bindings (_rl_keymap);
}
/* Reset the default bindings for the terminal special characters we're
interested in back to rl_insert and read the new ones. */
-#ifdef NOT_USED
static void
reset_default_bindings ()
{
- rl_tty_unset_default_bindings (_rl_keymap);
- rl_tty_set_default_bindings (_rl_keymap);
+ if (_rl_bind_stty_chars)
+ {
+ rl_tty_unset_default_bindings (_rl_keymap);
+ rl_tty_set_default_bindings (_rl_keymap);
+ }
}
-#endif
/* Bind some common arrow key sequences in MAP. */
static void
@@ -908,6 +1115,13 @@ bind_arrow_keys_internal (map)
rl_bind_keyseq_if_unbound ("\033OH", rl_beg_of_line);
rl_bind_keyseq_if_unbound ("\033OF", rl_end_of_line);
+#if defined (__MINGW32__)
+ rl_bind_keyseq_if_unbound ("\340H", rl_get_previous_history);
+ rl_bind_keyseq_if_unbound ("\340P", rl_get_next_history);
+ rl_bind_keyseq_if_unbound ("\340M", rl_forward_char);
+ rl_bind_keyseq_if_unbound ("\340K", rl_backward_char);
+#endif
+
_rl_keymap = xkeymap;
}
diff --git a/cmd-line-utils/readline/readline.h b/cmd-line-utils/readline/readline.h
index 222b317c4a8..b71bf98d204 100644
--- a/cmd-line-utils/readline/readline.h
+++ b/cmd-line-utils/readline/readline.h
@@ -1,6 +1,6 @@
/* Readline.h -- the names of functions callable from within readline. */
-/* Copyright (C) 1987-2004 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2005 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -40,9 +40,9 @@ extern "C" {
#endif
/* Hex-encoded Readline version number. */
-#define RL_READLINE_VERSION 0x0500 /* Readline 5.0 */
+#define RL_READLINE_VERSION 0x0502 /* Readline 5.2 */
#define RL_VERSION_MAJOR 5
-#define RL_VERSION_MINOR 0
+#define RL_VERSION_MINOR 2
/* Readline data structures. */
@@ -241,6 +241,7 @@ extern int rl_vi_column PARAMS((int, int));
extern int rl_vi_delete_to PARAMS((int, int));
extern int rl_vi_change_to PARAMS((int, int));
extern int rl_vi_yank_to PARAMS((int, int));
+extern int rl_vi_rubout PARAMS((int, int));
extern int rl_vi_delete PARAMS((int, int));
extern int rl_vi_back_to_indent PARAMS((int, int));
extern int rl_vi_first_print PARAMS((int, int));
@@ -302,6 +303,8 @@ extern int rl_bind_keyseq_in_map PARAMS((const char *, rl_command_func_t *, Keym
extern int rl_bind_keyseq_if_unbound PARAMS((const char *, rl_command_func_t *));
extern int rl_bind_keyseq_if_unbound_in_map PARAMS((const char *, rl_command_func_t *, Keymap));
extern int rl_generic_bind PARAMS((int, const char *, char *, Keymap));
+
+extern char *rl_variable_value PARAMS((const char *));
extern int rl_variable_bind PARAMS((const char *, const char *));
/* Backwards compatibility, use rl_bind_keyseq_in_map instead. */
@@ -401,6 +404,7 @@ extern int rl_reset_terminal PARAMS((const char *));
extern void rl_resize_terminal PARAMS((void));
extern void rl_set_screen_size PARAMS((int, int));
extern void rl_get_screen_size PARAMS((int *, int *));
+extern void rl_reset_screen_size PARAMS((void));
extern char *rl_get_termcap PARAMS((const char *));
@@ -528,6 +532,11 @@ extern const char *rl_terminal_name;
extern FILE *rl_instream;
extern FILE *rl_outstream;
+/* If non-zero, Readline gives values of LINES and COLUMNS from the environment
+ greater precedence than values fetched from the kernel when computing the
+ screen dimensions. */
+extern int rl_prefer_env_winsize;
+
/* If non-zero, then this is the address of a function to call just
before readline_internal () prints the first prompt. */
extern rl_hook_func_t *rl_startup_hook;
@@ -748,6 +757,10 @@ extern int rl_ignore_completion_duplicates;
completion character will be inserted as any other. */
extern int rl_inhibit_completion;
+/* Input error; can be returned by (*rl_getc_function) if readline is reading
+ a top-level command (RL_ISSTATE (RL_STATE_READCMD)). */
+#define READERR (-2)
+
/* Definitions available for use by readline clients. */
#define RL_PROMPT_START_IGNORE '\001'
#define RL_PROMPT_END_IGNORE '\002'
@@ -759,29 +772,33 @@ extern int rl_inhibit_completion;
#define MULT_MATCH 2
/* Possible state values for rl_readline_state */
-#define RL_STATE_NONE 0x00000 /* no state; before first call */
-
-#define RL_STATE_INITIALIZING 0x00001 /* initializing */
-#define RL_STATE_INITIALIZED 0x00002 /* initialization done */
-#define RL_STATE_TERMPREPPED 0x00004 /* terminal is prepped */
-#define RL_STATE_READCMD 0x00008 /* reading a command key */
-#define RL_STATE_METANEXT 0x00010 /* reading input after ESC */
-#define RL_STATE_DISPATCHING 0x00020 /* dispatching to a command */
-#define RL_STATE_MOREINPUT 0x00040 /* reading more input in a command function */
-#define RL_STATE_ISEARCH 0x00080 /* doing incremental search */
-#define RL_STATE_NSEARCH 0x00100 /* doing non-inc search */
-#define RL_STATE_SEARCH 0x00200 /* doing a history search */
-#define RL_STATE_NUMERICARG 0x00400 /* reading numeric argument */
-#define RL_STATE_MACROINPUT 0x00800 /* getting input from a macro */
-#define RL_STATE_MACRODEF 0x01000 /* defining keyboard macro */
-#define RL_STATE_OVERWRITE 0x02000 /* overwrite mode */
-#define RL_STATE_COMPLETING 0x04000 /* doing completion */
-#define RL_STATE_SIGHANDLER 0x08000 /* in readline sighandler */
-#define RL_STATE_UNDOING 0x10000 /* doing an undo */
-#define RL_STATE_INPUTPENDING 0x20000 /* rl_execute_next called */
-#define RL_STATE_TTYCSAVED 0x40000 /* tty special chars saved */
-
-#define RL_STATE_DONE 0x80000 /* done; accepted line */
+#define RL_STATE_NONE 0x000000 /* no state; before first call */
+
+#define RL_STATE_INITIALIZING 0x000001 /* initializing */
+#define RL_STATE_INITIALIZED 0x000002 /* initialization done */
+#define RL_STATE_TERMPREPPED 0x000004 /* terminal is prepped */
+#define RL_STATE_READCMD 0x000008 /* reading a command key */
+#define RL_STATE_METANEXT 0x000010 /* reading input after ESC */
+#define RL_STATE_DISPATCHING 0x000020 /* dispatching to a command */
+#define RL_STATE_MOREINPUT 0x000040 /* reading more input in a command function */
+#define RL_STATE_ISEARCH 0x000080 /* doing incremental search */
+#define RL_STATE_NSEARCH 0x000100 /* doing non-inc search */
+#define RL_STATE_SEARCH 0x000200 /* doing a history search */
+#define RL_STATE_NUMERICARG 0x000400 /* reading numeric argument */
+#define RL_STATE_MACROINPUT 0x000800 /* getting input from a macro */
+#define RL_STATE_MACRODEF 0x001000 /* defining keyboard macro */
+#define RL_STATE_OVERWRITE 0x002000 /* overwrite mode */
+#define RL_STATE_COMPLETING 0x004000 /* doing completion */
+#define RL_STATE_SIGHANDLER 0x008000 /* in readline sighandler */
+#define RL_STATE_UNDOING 0x010000 /* doing an undo */
+#define RL_STATE_INPUTPENDING 0x020000 /* rl_execute_next called */
+#define RL_STATE_TTYCSAVED 0x040000 /* tty special chars saved */
+#define RL_STATE_CALLBACK 0x080000 /* using the callback interface */
+#define RL_STATE_VIMOTION 0x100000 /* reading vi motion arg */
+#define RL_STATE_MULTIKEY 0x200000 /* reading multiple-key command */
+#define RL_STATE_VICMDONCE 0x400000 /* entered vi command mode at least once */
+
+#define RL_STATE_DONE 0x800000 /* done; accepted line */
#define RL_SETSTATE(x) (rl_readline_state |= (x))
#define RL_UNSETSTATE(x) (rl_readline_state &= ~(x))
diff --git a/cmd-line-utils/readline/rlconf.h b/cmd-line-utils/readline/rlconf.h
index c651fd8b41f..ff3929e0bf5 100644
--- a/cmd-line-utils/readline/rlconf.h
+++ b/cmd-line-utils/readline/rlconf.h
@@ -37,9 +37,12 @@
/* Ugly but working hack for binding prefix meta. */
#define PREFIX_META_HACK
-/* The final, last-ditch effort file name for an init file. */
+/* The next-to-last-ditch effort file name for a user-specific init file. */
#define DEFAULT_INPUTRC "~/.inputrc"
+/* The ultimate last-ditch filenname for an init file -- system-wide. */
+#define SYS_INPUTRC "/etc/inputrc"
+
/* If defined, expand tabs to spaces. */
#define DISPLAY_TABS
diff --git a/cmd-line-utils/readline/rldefs.h b/cmd-line-utils/readline/rldefs.h
index 0d600407b5f..0f6c87446dd 100644
--- a/cmd-line-utils/readline/rldefs.h
+++ b/cmd-line-utils/readline/rldefs.h
@@ -2,7 +2,7 @@
for readline. This should be included after any files that define
system-specific constants like _POSIX_VERSION or USG. */
-/* Copyright (C) 1987,1989 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2005 Free Software Foundation, Inc.
This file contains the Readline Library (the Library), a set of
routines for providing Emacs style line input to programs that ask
@@ -38,7 +38,11 @@
# if defined (HAVE_TERMIO_H)
# define TERMIO_TTY_DRIVER
# else
-# define NEW_TTY_DRIVER
+# if !defined (__MINGW32__)
+# define NEW_TTY_DRIVER
+# else
+# define NO_TTY_DRIVER
+# endif
# endif
#endif
diff --git a/cmd-line-utils/readline/rlmbutil.h b/cmd-line-utils/readline/rlmbutil.h
index 77cc026e3e8..dd317e2a090 100644
--- a/cmd-line-utils/readline/rlmbutil.h
+++ b/cmd-line-utils/readline/rlmbutil.h
@@ -32,10 +32,19 @@
/* For platforms which support the ISO C amendement 1 functionality we
support user defined character classes. */
/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>. */
-#if defined (HAVE_WCTYPE_H) && defined (HAVE_WCHAR_H)
+#if defined (HAVE_WCTYPE_H) && defined (HAVE_WCHAR_H) && defined (HAVE_LOCALE_H)
# include <wchar.h>
# include <wctype.h>
-# if defined (HAVE_MBSRTOWCS) && defined (HAVE_MBRTOWC) && defined (HAVE_MBRLEN) && defined (HAVE_WCWIDTH)
+# if defined (HAVE_ISWCTYPE) && \
+ defined (HAVE_ISWLOWER) && \
+ defined (HAVE_ISWUPPER) && \
+ defined (HAVE_MBSRTOWCS) && \
+ defined (HAVE_MBRTOWC) && \
+ defined (HAVE_MBRLEN) && \
+ defined (HAVE_TOWLOWER) && \
+ defined (HAVE_TOWUPPER) && \
+ defined (HAVE_WCHAR_T) && \
+ defined (HAVE_WCWIDTH)
/* system is supposed to support XPG5 */
# define HANDLE_MULTIBYTE 1
# endif
@@ -97,6 +106,21 @@ extern int _rl_read_mbstring PARAMS((int, char *, int));
extern int _rl_is_mbchar_matched PARAMS((char *, int, int, char *, int));
+extern wchar_t _rl_char_value PARAMS((char *, int));
+extern int _rl_walphabetic PARAMS((wchar_t));
+
+#define _rl_to_wupper(wc) (iswlower (wc) ? towupper (wc) : (wc))
+#define _rl_to_wlower(wc) (iswupper (wc) ? towlower (wc) : (wc))
+
+#define MB_NEXTCHAR(b,s,c,f) \
+ ((MB_CUR_MAX > 1 && rl_byte_oriented == 0) \
+ ? _rl_find_next_mbchar ((b), (s), (c), (f)) \
+ : ((s) + (c)))
+#define MB_PREVCHAR(b,s,f) \
+ ((MB_CUR_MAX > 1 && rl_byte_oriented == 0) \
+ ? _rl_find_prev_mbchar ((b), (s), (f)) \
+ : ((s) - 1))
+
#define MB_INVALIDCH(x) ((x) == (size_t)-1 || (x) == (size_t)-2)
#define MB_NULLWCH(x) ((x) == 0)
@@ -111,6 +135,16 @@ extern int _rl_is_mbchar_matched PARAMS((char *, int, int, char *, int));
#define _rl_find_prev_mbchar(b, i, f) (((i) == 0) ? (i) : ((i) - 1))
#define _rl_find_next_mbchar(b, i1, i2, f) ((i1) + (i2))
+#define _rl_char_value(buf,ind) ((buf)[(ind)])
+
+#define _rl_walphabetic(c) (rl_alphabetic (c))
+
+#define _rl_to_wupper(c) (_rl_to_upper (c))
+#define _rl_to_wlower(c) (_rl_to_lower (c))
+
+#define MB_NEXTCHAR(b,s,c,f) ((s) + (c))
+#define MB_PREVCHAR(b,s,f) ((s) - 1)
+
#define MB_INVALIDCH(x) (0)
#define MB_NULLWCH(x) (0)
diff --git a/cmd-line-utils/readline/rlprivate.h b/cmd-line-utils/readline/rlprivate.h
index c3cee917b76..64aa7bdd3fa 100644
--- a/cmd-line-utils/readline/rlprivate.h
+++ b/cmd-line-utils/readline/rlprivate.h
@@ -1,7 +1,7 @@
/* rlprivate.h -- functions and variables global to the readline library,
but not intended for use by applications. */
-/* Copyright (C) 1999-2004 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2005 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -30,6 +30,95 @@
/*************************************************************************
* *
+ * Global structs undocumented in texinfo manual and not in readline.h *
+ * *
+ *************************************************************************/
+/* search types */
+#define RL_SEARCH_ISEARCH 0x01 /* incremental search */
+#define RL_SEARCH_NSEARCH 0x02 /* non-incremental search */
+#define RL_SEARCH_CSEARCH 0x04 /* intra-line char search */
+
+/* search flags */
+#define SF_REVERSE 0x01
+#define SF_FOUND 0x02
+#define SF_FAILED 0x04
+
+typedef struct __rl_search_context
+{
+ int type;
+ int sflags;
+
+ char *search_string;
+ int search_string_index;
+ int search_string_size;
+
+ char **lines;
+ char *allocated_line;
+ int hlen;
+ int hindex;
+
+ int save_point;
+ int save_mark;
+ int save_line;
+ int last_found_line;
+ char *prev_line_found;
+
+ UNDO_LIST *save_undo_list;
+
+ int history_pos;
+ int direction;
+
+ int lastc;
+#if defined (HANDLE_MULTIBYTE)
+ char mb[MB_LEN_MAX];
+#endif
+
+ char *sline;
+ int sline_len;
+ int sline_index;
+
+ char *search_terminators;
+} _rl_search_cxt;
+
+/* Callback data for reading numeric arguments */
+#define NUM_SAWMINUS 0x01
+#define NUM_SAWDIGITS 0x02
+#define NUM_READONE 0x04
+
+typedef int _rl_arg_cxt;
+
+/* A context for reading key sequences longer than a single character when
+ using the callback interface. */
+#define KSEQ_DISPATCHED 0x01
+#define KSEQ_SUBSEQ 0x02
+#define KSEQ_RECURSIVE 0x04
+
+typedef struct __rl_keyseq_context
+{
+ int flags;
+ int subseq_arg;
+ int subseq_retval; /* XXX */
+ Keymap dmap;
+
+ Keymap oldmap;
+ int okey;
+ struct __rl_keyseq_context *ocxt;
+ int childval;
+} _rl_keyseq_cxt;
+
+ /* fill in more as needed */
+/* `Generic' callback data and functions */
+typedef struct __rl_callback_generic_arg
+{
+ int count;
+ int i1, i2;
+ /* add here as needed */
+} _rl_callback_generic_arg;
+
+typedef int _rl_callback_func_t PARAMS((_rl_callback_generic_arg *));
+
+/*************************************************************************
+ * *
* Global functions undocumented in texinfo manual and not in readline.h *
* *
*************************************************************************/
@@ -54,6 +143,8 @@ extern int readline_echoing_p;
extern int rl_key_sequence_length;
extern int rl_byte_oriented;
+extern _rl_keyseq_cxt *_rl_kscxt;
+
/* display.c */
extern int rl_display_fixed;
@@ -100,6 +191,16 @@ extern void readline_internal_setup PARAMS((void));
extern char *readline_internal_teardown PARAMS((int));
extern int readline_internal_char PARAMS((void));
+extern _rl_keyseq_cxt *_rl_keyseq_cxt_alloc PARAMS((void));
+extern void _rl_keyseq_cxt_dispose PARAMS((_rl_keyseq_cxt *));
+extern void _rl_keyseq_chain_dispose PARAMS((void));
+
+extern int _rl_dispatch_callback PARAMS((_rl_keyseq_cxt *));
+
+/* callback.c */
+extern _rl_callback_generic_arg *_rl_callback_data_alloc PARAMS((int));
+extern void _rl_callback_data_dispose PARAMS((_rl_callback_generic_arg *));
+
#endif /* READLINE_CALLBACKS */
/* bind.c */
@@ -132,6 +233,15 @@ extern void _rl_insert_typein PARAMS((int));
extern int _rl_unget_char PARAMS((int));
extern int _rl_pushed_input_available PARAMS((void));
+/* isearch.c */
+extern _rl_search_cxt *_rl_scxt_alloc PARAMS((int, int));
+extern void _rl_scxt_dispose PARAMS((_rl_search_cxt *, int));
+
+extern int _rl_isearch_dispatch PARAMS((_rl_search_cxt *, int));
+extern int _rl_isearch_callback PARAMS((_rl_search_cxt *));
+
+extern int _rl_search_getchar PARAMS((_rl_search_cxt *));
+
/* macro.c */
extern void _rl_with_macro_input PARAMS((char *));
extern int _rl_next_macro_key PARAMS((void));
@@ -141,7 +251,12 @@ extern void _rl_add_macro_char PARAMS((int));
extern void _rl_kill_kbd_macro PARAMS((void));
/* misc.c */
-extern int _rl_init_argument PARAMS((void));
+extern int _rl_arg_overflow PARAMS((void));
+extern void _rl_arg_init PARAMS((void));
+extern int _rl_arg_getchar PARAMS((void));
+extern int _rl_arg_callback PARAMS((_rl_arg_cxt));
+extern void _rl_reset_argument PARAMS((void));
+
extern void _rl_start_using_history PARAMS((void));
extern int _rl_free_saved_history_line PARAMS((void));
extern void _rl_set_insert_mode PARAMS((int, int));
@@ -157,11 +272,15 @@ extern void _rl_init_line_state PARAMS((void));
extern void _rl_set_the_line PARAMS((void));
extern int _rl_dispatch PARAMS((int, Keymap));
extern int _rl_dispatch_subseq PARAMS((int, Keymap, int));
+extern void _rl_internal_char_cleanup PARAMS((void));
/* rltty.c */
extern int _rl_disable_tty_signals PARAMS((void));
extern int _rl_restore_tty_signals PARAMS((void));
+/* search.c */
+extern int _rl_nsearch_callback PARAMS((_rl_search_cxt *));
+
/* terminal.c */
extern void _rl_get_screen_size PARAMS((int, int));
extern int _rl_init_terminal_io PARAMS((const char *));
@@ -190,6 +309,10 @@ extern int _rl_char_search_internal PARAMS((int, int, int));
#endif
extern int _rl_set_mark_at_pos PARAMS((int));
+/* undo.c */
+extern UNDO_LIST *_rl_copy_undo_entry PARAMS((UNDO_LIST *));
+extern UNDO_LIST *_rl_copy_undo_list PARAMS((UNDO_LIST *));
+
/* util.c */
extern int _rl_abort_internal PARAMS((void));
extern char *_rl_strindex PARAMS((const char *, const char *));
@@ -217,6 +340,10 @@ extern void _rl_vi_done_inserting PARAMS((void));
extern const char *_rl_possible_control_prefixes[];
extern const char *_rl_possible_meta_prefixes[];
+/* callback.c */
+extern _rl_callback_func_t *_rl_callback_func;
+extern _rl_callback_generic_arg *_rl_callback_data;
+
/* complete.c */
extern int _rl_complete_show_all;
extern int _rl_complete_show_unmodified;
@@ -231,11 +358,14 @@ extern int _rl_page_completions;
extern int _rl_vis_botlin;
extern int _rl_last_c_pos;
extern int _rl_suppress_redisplay;
+extern int _rl_want_redisplay;
extern char *rl_display_prompt;
/* isearch.c */
extern char *_rl_isearch_terminators;
+extern _rl_search_cxt *_rl_iscxt;
+
/* macro.c */
extern char *_rl_executing_macro;
@@ -243,6 +373,8 @@ extern char *_rl_executing_macro;
extern int _rl_history_preserve_point;
extern int _rl_history_saved_point;
+extern _rl_arg_cxt _rl_argcxt;
+
/* readline.c */
extern int _rl_horizontal_scroll_mode;
extern int _rl_mark_modified_lines;
@@ -250,6 +382,7 @@ extern int _rl_bell_preference;
extern int _rl_meta_flag;
extern int _rl_convert_meta_chars_to_ascii;
extern int _rl_output_meta_chars;
+extern int _rl_bind_stty_chars;
extern char *_rl_comment_begin;
extern unsigned char _rl_parsing_conditionalized_out;
extern Keymap _rl_keymap;
@@ -259,6 +392,9 @@ extern int _rl_last_command_was_kill;
extern int _rl_eof_char;
extern procenv_t readline_top_level;
+/* search.c */
+extern _rl_search_cxt *_rl_nscxt;
+
/* terminal.c */
extern int _rl_enable_keypad;
extern int _rl_enable_meta;
@@ -272,6 +408,7 @@ extern char *_rl_term_up;
extern char *_rl_term_dc;
extern char *_rl_term_cr;
extern char *_rl_term_IC;
+extern char *_rl_term_forward_char;
extern int _rl_screenheight;
extern int _rl_screenwidth;
extern int _rl_screenchars;
diff --git a/cmd-line-utils/readline/rltty.c b/cmd-line-utils/readline/rltty.c
index 869538af9ab..12f3a93e524 100644
--- a/cmd-line-utils/readline/rltty.c
+++ b/cmd-line-utils/readline/rltty.c
@@ -1,7 +1,7 @@
/* rltty.c -- functions to prepare and restore the terminal for readline's
use. */
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2005 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -22,7 +22,9 @@
59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#define READLINE_LIBRARY
-#include "config_readline.h"
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
#include <sys/types.h>
#include <signal.h>
@@ -149,7 +151,9 @@ set_winsize (int tty __attribute__((unused)))
#endif /* TIOCGWINSZ */
}
-#if defined (NEW_TTY_DRIVER)
+#if defined (NO_TTY_DRIVER)
+/* Nothing */
+#elif defined (NEW_TTY_DRIVER)
/* Values for the `flags' field of a struct bsdtty. This tells which
elements of the struct bsdtty have been fetched from the system and
@@ -230,6 +234,7 @@ get_tty_settings (tty, tiop)
tiop->flags = tiop->lflag = 0;
+ errno = 0;
if (ioctl (tty, TIOCGETP, &(tiop->sgttyb)) < 0)
return -1;
tiop->flags |= SGTTY_SET;
@@ -515,6 +520,7 @@ get_tty_settings (tty, tiop)
{
set_winsize (tty);
+ errno = 0;
if (_get_tty_settings (tty, tiop) < 0)
return -1;
@@ -628,9 +634,23 @@ prepare_terminal_settings (meta_flag, oldtio, tiop)
#endif /* TERMIOS_TTY_DRIVER && _POSIX_VDISABLE */
}
-#endif /* NEW_TTY_DRIVER */
+#endif /* !NEW_TTY_DRIVER */
/* Put the terminal in CBREAK mode so that we can detect key presses. */
+#if defined (NO_TTY_DRIVER)
+void
+rl_prep_terminal (meta_flag)
+ int meta_flag;
+{
+ readline_echoing_p = 1;
+}
+
+void
+rl_deprep_terminal ()
+{
+}
+
+#else /* ! NO_TTY_DRIVER */
void
rl_prep_terminal (meta_flag)
int meta_flag;
@@ -648,16 +668,43 @@ rl_prep_terminal (meta_flag)
if (get_tty_settings (tty, &tio) < 0)
{
+#if defined (ENOTSUP)
+ /* MacOS X, at least, lies about the value of errno if tcgetattr fails. */
+ if (errno == ENOTTY || errno == ENOTSUP)
+#else
+ if (errno == ENOTTY)
+#endif
+ readline_echoing_p = 1; /* XXX */
release_sigint ();
return;
}
otio = tio;
- rl_tty_unset_default_bindings (_rl_keymap);
+ if (_rl_bind_stty_chars)
+ {
+#if defined (VI_MODE)
+ /* If editing in vi mode, make sure we restore the bindings in the
+ insertion keymap no matter what keymap we ended up in. */
+ if (rl_editing_mode == vi_mode)
+ rl_tty_unset_default_bindings (vi_insertion_keymap);
+ else
+#endif
+ rl_tty_unset_default_bindings (_rl_keymap);
+ }
save_tty_chars (&otio);
RL_SETSTATE(RL_STATE_TTYCSAVED);
- _rl_bind_tty_special_chars (_rl_keymap, tio);
+ if (_rl_bind_stty_chars)
+ {
+#if defined (VI_MODE)
+ /* If editing in vi mode, make sure we set the bindings in the
+ insertion keymap no matter what keymap we ended up in. */
+ if (rl_editing_mode == vi_mode)
+ _rl_bind_tty_special_chars (vi_insertion_keymap, tio);
+ else
+#endif
+ _rl_bind_tty_special_chars (_rl_keymap, tio);
+ }
prepare_terminal_settings (meta_flag, otio, &tio);
@@ -707,6 +754,7 @@ rl_deprep_terminal ()
release_sigint ();
}
+#endif /* !NO_TTY_DRIVER */
/* **************************************************************** */
/* */
@@ -715,8 +763,13 @@ rl_deprep_terminal ()
/* **************************************************************** */
int
-rl_restart_output(int count __attribute__((unused)), int key __attribute__((unused)))
+rl_restart_output (count, key)
+ int count, key;
{
+#if defined (__MINGW32__)
+ return 0;
+#else /* !__MING32__ */
+
int fildes = fileno (rl_outstream);
#if defined (TIOCSTART)
#if defined (apollo)
@@ -744,11 +797,17 @@ rl_restart_output(int count __attribute__((unused)), int key __attribute__((unus
#endif /* !TIOCSTART */
return 0;
+#endif /* !__MINGW32__ */
}
int
-rl_stop_output(int count __attribute__((unused)), int key __attribute__((unused)))
+rl_stop_output (count, key)
+ int count, key;
{
+#if defined (__MINGW32__)
+ return 0;
+#else
+
int fildes = fileno (rl_instream);
#if defined (TIOCSTOP)
@@ -771,6 +830,7 @@ rl_stop_output(int count __attribute__((unused)), int key __attribute__((unused)
#endif /* !TIOCSTOP */
return 0;
+#endif /* !__MINGW32__ */
}
/* **************************************************************** */
@@ -779,9 +839,16 @@ rl_stop_output(int count __attribute__((unused)), int key __attribute__((unused)
/* */
/* **************************************************************** */
+#if !defined (NO_TTY_DRIVER)
#define SET_SPECIAL(sc, func) set_special_char(kmap, &ttybuff, sc, func)
+#endif
-#if defined (NEW_TTY_DRIVER)
+#if defined (NO_TTY_DRIVER)
+
+#define SET_SPECIAL(sc, func)
+#define RESET_SPECIAL(c)
+
+#elif defined (NEW_TTY_DRIVER)
static void
set_special_char (kmap, tiop, sc, func)
Keymap kmap;
@@ -862,6 +929,7 @@ void
rltty_set_default_bindings (kmap)
Keymap kmap;
{
+#if !defined (NO_TTY_DRIVER)
TIOTYPE ttybuff;
int tty;
@@ -869,6 +937,7 @@ rltty_set_default_bindings (kmap)
if (get_tty_settings (tty, &ttybuff) == 0)
_rl_bind_tty_special_chars (kmap, ttybuff);
+#endif
}
/* New public way to set the system default editing chars to their readline
@@ -906,7 +975,7 @@ rl_tty_unset_default_bindings (kmap)
#if defined (HANDLE_SIGNALS)
-#if defined (NEW_TTY_DRIVER)
+#if defined (NEW_TTY_DRIVER) || defined (NO_TTY_DRIVER)
int
_rl_disable_tty_signals ()
{
diff --git a/cmd-line-utils/readline/savestring.c b/cmd-line-utils/readline/savestring.c
index ae605374d13..820428d8881 100644
--- a/cmd-line-utils/readline/savestring.c
+++ b/cmd-line-utils/readline/savestring.c
@@ -21,8 +21,7 @@
59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#define READLINE_LIBRARY
-#include "config_readline.h"
-
+#include <config.h>
#ifdef HAVE_STRING_H
# include <string.h>
#endif
diff --git a/cmd-line-utils/readline/search.c b/cmd-line-utils/readline/search.c
index 6479427be2f..33cc4fc1e73 100644
--- a/cmd-line-utils/readline/search.c
+++ b/cmd-line-utils/readline/search.c
@@ -1,6 +1,6 @@
/* search.c - code for non-incremental searching in emacs and vi modes. */
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2005 Free Software Foundation, Inc.
This file is part of the Readline Library (the Library), a set of
routines for providing Emacs style line input to programs that ask
@@ -22,7 +22,9 @@
59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#define READLINE_LIBRARY
-#include "config_readline.h"
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
#include <sys/types.h>
#include <stdio.h>
@@ -51,6 +53,8 @@
#endif
#define abs(x) (((x) >= 0) ? (x) : -(x))
+_rl_search_cxt *_rl_nscxt = 0;
+
extern HIST_ENTRY *_rl_saved_line_for_history;
/* Functions imported from the rest of the library. */
@@ -68,11 +72,16 @@ static int history_string_size;
static void make_history_line_current PARAMS((HIST_ENTRY *));
static int noninc_search_from_pos PARAMS((char *, int, int));
-static void noninc_dosearch PARAMS((char *, int));
-static void noninc_search PARAMS((int, int));
+static int noninc_dosearch PARAMS((char *, int));
+static int noninc_search PARAMS((int, int));
static int rl_history_search_internal PARAMS((int, int));
static void rl_history_search_reinit PARAMS((void));
+static _rl_search_cxt *_rl_nsearch_init PARAMS((int, int));
+static int _rl_nsearch_cleanup PARAMS((_rl_search_cxt *, int));
+static void _rl_nsearch_abort PARAMS((_rl_search_cxt *));
+static int _rl_nsearch_dispatch PARAMS((_rl_search_cxt *, int));
+
/* Make the data from the history entry ENTRY be the contents of the
current line. This doesn't do anything with rl_point; the caller
must set it. */
@@ -80,12 +89,15 @@ static void
make_history_line_current (entry)
HIST_ENTRY *entry;
{
-#if 0
- rl_replace_line (entry->line, 1);
- rl_undo_list = (UNDO_LIST *)entry->data;
-#else
_rl_replace_text (entry->line, 0, rl_end);
_rl_fix_point (1);
+#if defined (VI_MODE)
+ if (rl_editing_mode == vi_mode)
+ /* POSIX.2 says that the `U' command doesn't affect the copy of any
+ command lines to the edit line. We're going to implement that by
+ making the undo list start after the matching line is copied to the
+ current editing buffer. */
+ rl_free_undo_list ();
#endif
if (_rl_saved_line_for_history)
@@ -128,8 +140,8 @@ noninc_search_from_pos (string, pos, dir)
/* Search for a line in the history containing STRING. If DIR is < 0, the
search is backwards through previous entries, else through subsequent
- entries. */
-static void
+ entries. Returns 1 if the search was successful, 0 otherwise. */
+static int
noninc_dosearch (string, dir)
char *string;
int dir;
@@ -140,7 +152,7 @@ noninc_dosearch (string, dir)
if (string == 0 || *string == '\0' || noninc_history_pos < 0)
{
rl_ding ();
- return;
+ return 0;
}
pos = noninc_search_from_pos (string, noninc_history_pos + dir, dir);
@@ -151,7 +163,7 @@ noninc_dosearch (string, dir)
rl_clear_message ();
rl_point = 0;
rl_ding ();
- return;
+ return 0;
}
noninc_history_pos = pos;
@@ -162,7 +174,7 @@ noninc_dosearch (string, dir)
#if defined (VI_MODE)
if (rl_editing_mode != vi_mode)
#endif
- history_set_pos (oldpos);
+ history_set_pos (oldpos);
make_history_line_current (entry);
@@ -170,27 +182,24 @@ noninc_dosearch (string, dir)
rl_mark = rl_end;
rl_clear_message ();
+ return 1;
}
-/* Search non-interactively through the history list. DIR < 0 means to
- search backwards through the history of previous commands; otherwise
- the search is for commands subsequent to the current position in the
- history list. PCHAR is the character to use for prompting when reading
- the search string; if not specified (0), it defaults to `:'. */
-static void
-noninc_search (dir, pchar)
- int dir;
- int pchar;
+static _rl_search_cxt *
+_rl_nsearch_init (dir, pchar)
+ int dir, pchar;
{
- int saved_point, saved_mark, c;
+ _rl_search_cxt *cxt;
char *p;
-#if defined (HANDLE_MULTIBYTE)
- char mb[MB_LEN_MAX];
-#endif
+
+ cxt = _rl_scxt_alloc (RL_SEARCH_NSEARCH, 0);
+ if (dir < 0)
+ cxt->sflags |= SF_REVERSE; /* not strictly needed */
+
+ cxt->direction = dir;
+ cxt->history_pos = cxt->save_line;
rl_maybe_save_line ();
- saved_point = rl_point;
- saved_mark = rl_mark;
/* Clear the undo list, since reading the search string should create its
own undo list, and the whole list will end up being freed when we
@@ -202,152 +211,243 @@ noninc_search (dir, pchar)
rl_end = rl_point = 0;
p = _rl_make_prompt_for_search (pchar ? pchar : ':');
- rl_message (p, 0, 0);
+ rl_message ("%s", p, 0);
free (p);
-#define SEARCH_RETURN rl_restore_prompt (); RL_UNSETSTATE(RL_STATE_NSEARCH); return
-
RL_SETSTATE(RL_STATE_NSEARCH);
- /* Read the search string. */
- while (1)
+
+ _rl_nscxt = cxt;
+
+ return cxt;
+}
+
+static int
+_rl_nsearch_cleanup (cxt, r)
+ _rl_search_cxt *cxt;
+ int r;
+{
+ _rl_scxt_dispose (cxt, 0);
+ _rl_nscxt = 0;
+
+ RL_UNSETSTATE(RL_STATE_NSEARCH);
+
+ return (r != 1);
+}
+
+static void
+_rl_nsearch_abort (cxt)
+ _rl_search_cxt *cxt;
+{
+ rl_maybe_unsave_line ();
+ rl_clear_message ();
+ rl_point = cxt->save_point;
+ rl_mark = cxt->save_mark;
+ rl_restore_prompt ();
+
+ RL_UNSETSTATE (RL_STATE_NSEARCH);
+}
+
+/* Process just-read character C according to search context CXT. Return -1
+ if the caller should abort the search, 0 if we should break out of the
+ loop, and 1 if we should continue to read characters. */
+static int
+_rl_nsearch_dispatch (cxt, c)
+ _rl_search_cxt *cxt;
+ int c;
+{
+ switch (c)
{
- RL_SETSTATE(RL_STATE_MOREINPUT);
- c = rl_read_key ();
- RL_UNSETSTATE(RL_STATE_MOREINPUT);
+ case CTRL('W'):
+ rl_unix_word_rubout (1, c);
+ break;
-#if defined (HANDLE_MULTIBYTE)
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- c = _rl_read_mbstring (c, mb, MB_LEN_MAX);
-#endif
+ case CTRL('U'):
+ rl_unix_line_discard (1, c);
+ break;
- if (c == 0)
- break;
+ case RETURN:
+ case NEWLINE:
+ return 0;
- switch (c)
+ case CTRL('H'):
+ case RUBOUT:
+ if (rl_point == 0)
{
- case CTRL('H'):
- case RUBOUT:
- if (rl_point == 0)
- {
- rl_maybe_unsave_line ();
- rl_clear_message ();
- rl_point = saved_point;
- rl_mark = saved_mark;
- SEARCH_RETURN;
- }
- _rl_rubout_char (1, c);
- break;
-
- case CTRL('W'):
- rl_unix_word_rubout (1, c);
- break;
-
- case CTRL('U'):
- rl_unix_line_discard (1, c);
- break;
-
- case RETURN:
- case NEWLINE:
- goto dosearch;
- /* NOTREACHED */
- break;
-
- case CTRL('C'):
- case CTRL('G'):
- rl_maybe_unsave_line ();
- rl_clear_message ();
- rl_point = saved_point;
- rl_mark = saved_mark;
- rl_ding ();
- SEARCH_RETURN;
+ _rl_nsearch_abort (cxt);
+ return -1;
+ }
+ _rl_rubout_char (1, c);
+ break;
+
+ case CTRL('C'):
+ case CTRL('G'):
+ rl_ding ();
+ _rl_nsearch_abort (cxt);
+ return -1;
- default:
+ default:
#if defined (HANDLE_MULTIBYTE)
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- rl_insert_text (mb);
- else
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ rl_insert_text (cxt->mb);
+ else
#endif
- _rl_insert_char (1, c);
- break;
- }
- (*rl_redisplay_function) ();
+ _rl_insert_char (1, c);
+ break;
}
- dosearch:
- rl_mark = saved_mark;
+ (*rl_redisplay_function) ();
+ return 1;
+}
+
+/* Perform one search according to CXT, using NONINC_SEARCH_STRING. Return
+ -1 if the search should be aborted, any other value means to clean up
+ using _rl_nsearch_cleanup (). Returns 1 if the search was successful,
+ 0 otherwise. */
+static int
+_rl_nsearch_dosearch (cxt)
+ _rl_search_cxt *cxt;
+{
+ rl_mark = cxt->save_mark;
/* If rl_point == 0, we want to re-use the previous search string and
start from the saved history position. If there's no previous search
string, punt. */
if (rl_point == 0)
{
- if (!noninc_search_string)
+ if (noninc_search_string == 0)
{
rl_ding ();
- SEARCH_RETURN;
+ rl_restore_prompt ();
+ RL_UNSETSTATE (RL_STATE_NSEARCH);
+ return -1;
}
}
else
{
/* We want to start the search from the current history position. */
- noninc_history_pos = where_history ();
+ noninc_history_pos = cxt->save_line;
FREE (noninc_search_string);
noninc_search_string = savestring (rl_line_buffer);
+
+ /* If we don't want the subsequent undo list generated by the search
+ matching a history line to include the contents of the search string,
+ we need to clear rl_line_buffer here. For now, we just clear the
+ undo list generated by reading the search string. (If the search
+ fails, the old undo list will be restored by rl_maybe_unsave_line.) */
+ rl_free_undo_list ();
}
rl_restore_prompt ();
- noninc_dosearch (noninc_search_string, dir);
- RL_UNSETSTATE(RL_STATE_NSEARCH);
+ return (noninc_dosearch (noninc_search_string, cxt->direction));
+}
+
+/* Search non-interactively through the history list. DIR < 0 means to
+ search backwards through the history of previous commands; otherwise
+ the search is for commands subsequent to the current position in the
+ history list. PCHAR is the character to use for prompting when reading
+ the search string; if not specified (0), it defaults to `:'. */
+static int
+noninc_search (dir, pchar)
+ int dir;
+ int pchar;
+{
+ _rl_search_cxt *cxt;
+ int c, r;
+
+ cxt = _rl_nsearch_init (dir, pchar);
+
+ if (RL_ISSTATE (RL_STATE_CALLBACK))
+ return (0);
+
+ /* Read the search string. */
+ r = 0;
+ while (1)
+ {
+ c = _rl_search_getchar (cxt);
+
+ if (c == 0)
+ break;
+
+ r = _rl_nsearch_dispatch (cxt, c);
+ if (r < 0)
+ return 1;
+ else if (r == 0)
+ break;
+ }
+
+ r = _rl_nsearch_dosearch (cxt);
+ return ((r >= 0) ? _rl_nsearch_cleanup (cxt, r) : (r != 1));
}
/* Search forward through the history list for a string. If the vi-mode
code calls this, KEY will be `?'. */
int
-rl_noninc_forward_search (int count __attribute__((unused)), int key)
+rl_noninc_forward_search (count, key)
+ int count, key;
{
- noninc_search (1, (key == '?') ? '?' : 0);
- return 0;
+ return noninc_search (1, (key == '?') ? '?' : 0);
}
/* Reverse search the history list for a string. If the vi-mode code
calls this, KEY will be `/'. */
int
-rl_noninc_reverse_search (int count __attribute__((unused)), int key)
+rl_noninc_reverse_search (count, key)
+ int count, key;
{
- noninc_search (-1, (key == '/') ? '/' : 0);
- return 0;
+ return noninc_search (-1, (key == '/') ? '/' : 0);
}
/* Search forward through the history list for the last string searched
for. If there is no saved search string, abort. */
int
-rl_noninc_forward_search_again (int count __attribute__((unused)),
- int key __attribute__((unused)))
+rl_noninc_forward_search_again (count, key)
+ int count, key;
{
+ int r;
+
if (!noninc_search_string)
{
rl_ding ();
return (-1);
}
- noninc_dosearch (noninc_search_string, 1);
- return 0;
+ r = noninc_dosearch (noninc_search_string, 1);
+ return (r != 1);
}
/* Reverse search in the history list for the last string searched
for. If there is no saved search string, abort. */
int
-rl_noninc_reverse_search_again (int count __attribute__((unused)),
- int key __attribute__((unused)))
+rl_noninc_reverse_search_again (count, key)
+ int count, key;
{
+ int r;
+
if (!noninc_search_string)
{
rl_ding ();
return (-1);
}
- noninc_dosearch (noninc_search_string, -1);
- return 0;
+ r = noninc_dosearch (noninc_search_string, -1);
+ return (r != 1);
}
+#if defined (READLINE_CALLBACKS)
+int
+_rl_nsearch_callback (cxt)
+ _rl_search_cxt *cxt;
+{
+ int c, r;
+
+ c = _rl_search_getchar (cxt);
+ r = _rl_nsearch_dispatch (cxt, c);
+ if (r != 0)
+ return 1;
+
+ r = _rl_nsearch_dosearch (cxt);
+ return ((r >= 0) ? _rl_nsearch_cleanup (cxt, r) : (r != 1));
+}
+#endif
+
static int
rl_history_search_internal (count, dir)
int count, dir;
diff --git a/cmd-line-utils/readline/shell.c b/cmd-line-utils/readline/shell.c
index 41668d70ab5..346f8113d43 100644
--- a/cmd-line-utils/readline/shell.c
+++ b/cmd-line-utils/readline/shell.c
@@ -22,7 +22,9 @@
59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#define READLINE_LIBRARY
-#include "config_readline.h"
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
#include <sys/types.h>
@@ -46,8 +48,12 @@
# include <limits.h>
#endif
+#if defined (HAVE_FCNTL_H)
#include <fcntl.h>
+#endif
+#if defined (HAVE_PWD_H)
#include <pwd.h>
+#endif
#include <stdio.h>
@@ -55,9 +61,9 @@
#include "rlshell.h"
#include "xmalloc.h"
-#if !defined (HAVE_GETPW_DECLS)
+#if defined (HAVE_GETPWUID) && !defined (HAVE_GETPW_DECLS)
extern struct passwd *getpwuid PARAMS((uid_t));
-#endif /* !HAVE_GETPW_DECLS */
+#endif /* HAVE_GETPWUID && !HAVE_GETPW_DECLS */
#ifndef NULL
# define NULL 0
@@ -120,16 +126,7 @@ sh_set_lines_and_columns (lines, cols)
{
char *b;
-#if defined (HAVE_PUTENV)
- b = (char *)xmalloc (INT_STRLEN_BOUND (int) + sizeof ("LINES=") + 1);
- sprintf (b, "LINES=%d", lines);
- putenv (b);
-
- b = (char *)xmalloc (INT_STRLEN_BOUND (int) + sizeof ("COLUMNS=") + 1);
- sprintf (b, "COLUMNS=%d", cols);
- putenv (b);
-#else /* !HAVE_PUTENV */
-# if defined (HAVE_SETENV)
+#if defined (HAVE_SETENV)
b = (char *)xmalloc (INT_STRLEN_BOUND (int) + 1);
sprintf (b, "%d", lines);
setenv ("LINES", b, 1);
@@ -139,8 +136,17 @@ sh_set_lines_and_columns (lines, cols)
sprintf (b, "%d", cols);
setenv ("COLUMNS", b, 1);
free (b);
-# endif /* HAVE_SETENV */
-#endif /* !HAVE_PUTENV */
+#else /* !HAVE_SETENV */
+# if defined (HAVE_PUTENV)
+ b = (char *)xmalloc (INT_STRLEN_BOUND (int) + sizeof ("LINES=") + 1);
+ sprintf (b, "LINES=%d", lines);
+ putenv (b);
+
+ b = (char *)xmalloc (INT_STRLEN_BOUND (int) + sizeof ("COLUMNS=") + 1);
+ sprintf (b, "COLUMNS=%d", cols);
+ putenv (b);
+# endif /* HAVE_PUTENV */
+#endif /* !HAVE_SETENV */
}
char *
@@ -157,9 +163,11 @@ sh_get_home_dir ()
struct passwd *entry;
home_dir = (char *)NULL;
+#if defined (HAVE_GETPWUID)
entry = getpwuid (getuid ());
if (entry)
home_dir = entry->pw_dir;
+#endif
return (home_dir);
}
@@ -173,6 +181,7 @@ int
sh_unset_nodelay_mode (fd)
int fd;
{
+#if defined (HAVE_FCNTL)
int flags, bflags;
if ((flags = fcntl (fd, F_GETFL, 0)) < 0)
@@ -193,6 +202,7 @@ sh_unset_nodelay_mode (fd)
flags &= ~bflags;
return (fcntl (fd, F_SETFL, flags));
}
+#endif
return 0;
}
diff --git a/cmd-line-utils/readline/signals.c b/cmd-line-utils/readline/signals.c
index be1150f6c54..54f2a642846 100644
--- a/cmd-line-utils/readline/signals.c
+++ b/cmd-line-utils/readline/signals.c
@@ -1,6 +1,6 @@
/* signals.c -- signal handling support for readline. */
-/* Copyright (C) 1987, 1989, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2005 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -21,7 +21,9 @@
59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#define READLINE_LIBRARY
-#include "config_readline.h"
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
#include <stdio.h> /* Just for NULL. Yuck. */
#include <sys/types.h>
@@ -129,7 +131,11 @@ rl_signal_handler (sig)
#if !defined (HAVE_BSD_SIGNALS) && !defined (HAVE_POSIX_SIGNALS)
/* Since the signal will not be blocked while we are in the signal
handler, ignore it until rl_clear_signals resets the catcher. */
+# if defined (SIGALRM)
if (sig == SIGINT || sig == SIGALRM)
+# else
+ if (sig == SIGINT)
+# endif
rl_set_sighandler (sig, SIG_IGN, &dummy_cxt);
#endif /* !HAVE_BSD_SIGNALS && !HAVE_POSIX_SIGNALS */
@@ -139,17 +145,22 @@ rl_signal_handler (sig)
rl_free_line_state ();
/* FALLTHROUGH */
+ case SIGTERM:
#if defined (SIGTSTP)
case SIGTSTP:
case SIGTTOU:
case SIGTTIN:
#endif /* SIGTSTP */
+#if defined (SIGALRM)
case SIGALRM:
- case SIGTERM:
+#endif
+#if defined (SIGQUIT)
case SIGQUIT:
+#endif
rl_cleanup_after_signal ();
#if defined (HAVE_POSIX_SIGNALS)
+ sigemptyset (&set);
sigprocmask (SIG_BLOCK, (sigset_t *)NULL, &set);
sigdelset (&set, sig);
#else /* !HAVE_POSIX_SIGNALS */
@@ -162,7 +173,11 @@ rl_signal_handler (sig)
signal (sig, SIG_ACK);
#endif
+#if defined (HAVE_KILL)
kill (getpid (), sig);
+#else
+ raise (sig); /* assume we have raise */
+#endif
/* Let the signal that we just sent through. */
#if defined (HAVE_POSIX_SIGNALS)
@@ -274,13 +289,51 @@ rl_set_signals ()
{
sighandler_cxt dummy;
SigHandler *oh;
+#if defined (HAVE_POSIX_SIGNALS)
+ static int sigmask_set = 0;
+ static sigset_t bset, oset;
+#endif
+
+#if defined (HAVE_POSIX_SIGNALS)
+ if (rl_catch_signals && sigmask_set == 0)
+ {
+ sigemptyset (&bset);
+
+ sigaddset (&bset, SIGINT);
+ sigaddset (&bset, SIGINT);
+#if defined (SIGQUIT)
+ sigaddset (&bset, SIGQUIT);
+#endif
+#if defined (SIGALRM)
+ sigaddset (&bset, SIGALRM);
+#endif
+#if defined (SIGTSTP)
+ sigaddset (&bset, SIGTSTP);
+#endif
+#if defined (SIGTTIN)
+ sigaddset (&bset, SIGTTIN);
+#endif
+#if defined (SIGTTOU)
+ sigaddset (&bset, SIGTTOU);
+#endif
+ sigmask_set = 1;
+ }
+#endif /* HAVE_POSIX_SIGNALS */
if (rl_catch_signals && signals_set_flag == 0)
{
+#if defined (HAVE_POSIX_SIGNALS)
+ sigemptyset (&oset);
+ sigprocmask (SIG_BLOCK, &bset, &oset);
+#endif
+
rl_maybe_set_sighandler (SIGINT, rl_signal_handler, &old_int);
rl_maybe_set_sighandler (SIGTERM, rl_signal_handler, &old_term);
+#if defined (SIGQUIT)
rl_maybe_set_sighandler (SIGQUIT, rl_signal_handler, &old_quit);
+#endif
+#if defined (SIGALRM)
oh = rl_set_sighandler (SIGALRM, rl_signal_handler, &old_alrm);
if (oh == (SigHandler *)SIG_IGN)
rl_sigaction (SIGALRM, &old_alrm, &dummy);
@@ -292,6 +345,7 @@ rl_set_signals ()
if (oh != (SigHandler *)SIG_DFL && (old_alrm.sa_flags & SA_RESTART))
rl_sigaction (SIGALRM, &old_alrm, &dummy);
#endif /* HAVE_POSIX_SIGNALS */
+#endif /* SIGALRM */
#if defined (SIGTSTP)
rl_maybe_set_sighandler (SIGTSTP, rl_signal_handler, &old_tstp);
@@ -306,6 +360,10 @@ rl_set_signals ()
#endif /* SIGTTIN */
signals_set_flag = 1;
+
+#if defined (HAVE_POSIX_SIGNALS)
+ sigprocmask (SIG_SETMASK, &oset, (sigset_t *)NULL);
+#endif
}
#if defined (SIGWINCH)
@@ -330,8 +388,12 @@ rl_clear_signals ()
rl_sigaction (SIGINT, &old_int, &dummy);
rl_sigaction (SIGTERM, &old_term, &dummy);
+#if defined (SIGQUIT)
rl_sigaction (SIGQUIT, &old_quit, &dummy);
+#endif
+#if defined (SIGALRM)
rl_sigaction (SIGALRM, &old_alrm, &dummy);
+#endif
#if defined (SIGTSTP)
rl_sigaction (SIGTSTP, &old_tstp, &dummy);
@@ -366,16 +428,18 @@ void
rl_cleanup_after_signal ()
{
_rl_clean_up_for_exit ();
- (*rl_deprep_term_function) ();
- rl_clear_signals ();
+ if (rl_deprep_term_function)
+ (*rl_deprep_term_function) ();
rl_clear_pending_input ();
+ rl_clear_signals ();
}
/* Reset the terminal and readline state after a signal handler returns. */
void
rl_reset_after_signal ()
{
- (*rl_prep_term_function) (_rl_meta_flag);
+ if (rl_prep_term_function)
+ (*rl_prep_term_function) (_rl_meta_flag);
rl_set_signals ();
}
@@ -396,7 +460,7 @@ rl_free_line_state ()
_rl_kill_kbd_macro ();
rl_clear_message ();
- _rl_init_argument ();
+ _rl_reset_argument ();
}
#endif /* HANDLE_SIGNALS */
diff --git a/cmd-line-utils/readline/terminal.c b/cmd-line-utils/readline/terminal.c
index 4b900c5d860..547f6f5dfe5 100644
--- a/cmd-line-utils/readline/terminal.c
+++ b/cmd-line-utils/readline/terminal.c
@@ -1,6 +1,6 @@
/* terminal.c -- controlling the terminal with termcap. */
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2006 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -21,7 +21,9 @@
59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#define READLINE_LIBRARY
-#include "config_readline.h"
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
#include <sys/types.h>
#include "posixstat.h"
@@ -64,9 +66,25 @@
#include "rlshell.h"
#include "xmalloc.h"
+#if defined (__MINGW32__)
+# include <windows.h>
+# include <wincon.h>
+
+static void _win_get_screensize PARAMS((int *, int *));
+#endif
+
+#if defined (__EMX__)
+static void _emx_get_screensize PARAMS((int *, int *));
+#endif
+
#define CUSTOM_REDISPLAY_FUNC() (rl_redisplay_function != rl_redisplay)
#define CUSTOM_INPUT_FUNC() (rl_getc_function != rl_getc)
+/* If the calling application sets this to a non-zero value, readline will
+ use the $LINES and $COLUMNS environment variables to set its idea of the
+ window size before interrogating the kernel. */
+int rl_prefer_env_winsize = 0;
+
/* **************************************************************** */
/* */
/* Terminal and Termcap */
@@ -107,9 +125,7 @@ char *_rl_term_IC;
char *_rl_term_dc;
char *_rl_term_DC;
-#if defined (HACK_TERMCAP_MOTION)
char *_rl_term_forward_char;
-#endif /* HACK_TERMCAP_MOTION */
/* How to go up a line. */
char *_rl_term_up;
@@ -118,7 +134,7 @@ char *_rl_term_up;
static char *_rl_visible_bell;
/* Non-zero means the terminal can auto-wrap lines. */
-int _rl_term_autowrap;
+int _rl_term_autowrap = -1;
/* Non-zero means that this terminal has a meta key. */
static int term_has_meta;
@@ -143,6 +159,9 @@ static char *_rl_term_kh;
static char *_rl_term_kH;
static char *_rl_term_at7; /* @7 */
+/* Delete key */
+static char *_rl_term_kD;
+
/* Insert key */
static char *_rl_term_kI;
@@ -177,6 +196,26 @@ _emx_get_screensize (swp, shp)
}
#endif
+#if defined (__MINGW32__)
+static void
+_win_get_screensize (swp, shp)
+ int *swp, *shp;
+{
+ HANDLE hConOut;
+ CONSOLE_SCREEN_BUFFER_INFO scr;
+
+ hConOut = GetStdHandle (STD_OUTPUT_HANDLE);
+ if (hConOut != INVALID_HANDLE_VALUE)
+ {
+ if (GetConsoleScreenBufferInfo (hConOut, &scr))
+ {
+ *swp = scr.dwSize.X;
+ *shp = scr.srWindow.Bottom - scr.srWindow.Top + 1;
+ }
+ }
+}
+#endif
+
/* Get readline's idea of the screen size. TTY is a file descriptor open
to the terminal. If IGNORE_ENV is true, we do not pay attention to the
values of $LINES and $COLUMNS. The tests for TERM_STRING_BUFFER being
@@ -189,26 +228,42 @@ _rl_get_screen_size (tty, ignore_env)
#if defined (TIOCGWINSZ)
struct winsize window_size;
#endif /* TIOCGWINSZ */
+ int wr, wc;
+ wr = wc = -1;
#if defined (TIOCGWINSZ)
if (ioctl (tty, TIOCGWINSZ, &window_size) == 0)
{
- _rl_screenwidth = (int) window_size.ws_col;
- _rl_screenheight = (int) window_size.ws_row;
+ wc = (int) window_size.ws_col;
+ wr = (int) window_size.ws_row;
}
#endif /* TIOCGWINSZ */
#if defined (__EMX__)
- _emx_get_screensize (&_rl_screenwidth, &_rl_screenheight);
+ _emx_get_screensize (&wc, &wr);
+#elif defined (__MINGW32__)
+ _win_get_screensize (&wc, &wr);
#endif
+ if (ignore_env || rl_prefer_env_winsize == 0)
+ {
+ _rl_screenwidth = wc;
+ _rl_screenheight = wr;
+ }
+ else
+ _rl_screenwidth = _rl_screenheight = -1;
+
/* Environment variable COLUMNS overrides setting of "co" if IGNORE_ENV
- is unset. */
+ is unset. If we prefer the environment, check it first before
+ assigning the value returned by the kernel. */
if (_rl_screenwidth <= 0)
{
if (ignore_env == 0 && (ss = sh_get_env_value ("COLUMNS")))
_rl_screenwidth = atoi (ss);
+ if (_rl_screenwidth <= 0)
+ _rl_screenwidth = wc;
+
#if !defined (__DJGPP__)
if (_rl_screenwidth <= 0 && term_string_buffer)
_rl_screenwidth = tgetnum ("co");
@@ -222,6 +277,9 @@ _rl_get_screen_size (tty, ignore_env)
if (ignore_env == 0 && (ss = sh_get_env_value ("LINES")))
_rl_screenheight = atoi (ss);
+ if (_rl_screenheight <= 0)
+ _rl_screenheight = wr;
+
#if !defined (__DJGPP__)
if (_rl_screenheight <= 0 && term_string_buffer)
_rl_screenheight = tgetnum ("li");
@@ -250,16 +308,20 @@ void
_rl_set_screen_size (rows, cols)
int rows, cols;
{
- if (rows == 0 || cols == 0)
- return;
-
- _rl_screenheight = rows;
- _rl_screenwidth = cols;
+ if (_rl_term_autowrap == -1)
+ _rl_init_terminal_io (rl_terminal_name);
- if (_rl_term_autowrap == 0)
- _rl_screenwidth--;
+ if (rows > 0)
+ _rl_screenheight = rows;
+ if (cols > 0)
+ {
+ _rl_screenwidth = cols;
+ if (_rl_term_autowrap == 0)
+ _rl_screenwidth--;
+ }
- _rl_screenchars = _rl_screenwidth * _rl_screenheight;
+ if (rows > 0 || cols > 0)
+ _rl_screenchars = _rl_screenwidth * _rl_screenheight;
}
void
@@ -278,6 +340,12 @@ rl_get_screen_size (rows, cols)
if (cols)
*cols = _rl_screenwidth;
}
+
+void
+rl_reset_screen_size ()
+{
+ _rl_get_screen_size (fileno (rl_instream), 0);
+}
void
rl_resize_terminal ()
@@ -311,6 +379,7 @@ static struct _tc_string tc_strings[] =
{ "ei", &_rl_term_ei },
{ "ic", &_rl_term_ic },
{ "im", &_rl_term_im },
+ { "kD", &_rl_term_kD }, /* delete */
{ "kH", &_rl_term_kH }, /* home down ?? */
{ "kI", &_rl_term_kI }, /* insert */
{ "kd", &_rl_term_kd },
@@ -323,9 +392,7 @@ static struct _tc_string tc_strings[] =
{ "le", &_rl_term_backspace },
{ "mm", &_rl_term_mm },
{ "mo", &_rl_term_mo },
-#if defined (HACK_TERMCAP_MOTION)
{ "nd", &_rl_term_forward_char },
-#endif
{ "pc", &_rl_term_pc },
{ "up", &_rl_term_up },
{ "vb", &_rl_visible_bell },
@@ -344,7 +411,7 @@ get_term_capabilities (bp)
#if !defined (__DJGPP__) /* XXX - doesn't DJGPP have a termcap library? */
register int i;
- for (i = 0; i < (int) NUM_TC_STRINGS; i++)
+ for (i = 0; i < NUM_TC_STRINGS; i++)
*(tc_strings[i].tc_value) = tgetstr ((char *)tc_strings[i].tc_var, bp);
#endif
tcap_initialized = 1;
@@ -361,7 +428,6 @@ _rl_init_terminal_io (terminal_name)
term = terminal_name ? terminal_name : sh_get_env_value ("TERM");
_rl_term_clrpag = _rl_term_cr = _rl_term_clreol = (char *)NULL;
tty = rl_instream ? fileno (rl_instream) : 0;
- _rl_screenwidth = _rl_screenheight = 0;
if (term == 0)
term = "dumb";
@@ -394,12 +460,17 @@ _rl_init_terminal_io (terminal_name)
_rl_term_autowrap = 0; /* used by _rl_get_screen_size */
+ /* Allow calling application to set default height and width, using
+ rl_set_screen_size */
+ if (_rl_screenwidth <= 0 || _rl_screenheight <= 0)
+ {
#if defined (__EMX__)
- _emx_get_screensize (&_rl_screenwidth, &_rl_screenheight);
- _rl_screenwidth--;
+ _emx_get_screensize (&_rl_screenwidth, &_rl_screenheight);
+ _rl_screenwidth--;
#else /* !__EMX__ */
- _rl_get_screen_size (tty, 0);
+ _rl_get_screen_size (tty, 0);
#endif /* !__EMX__ */
+ }
/* Defaults. */
if (_rl_screenwidth <= 0 || _rl_screenheight <= 0)
@@ -410,24 +481,22 @@ _rl_init_terminal_io (terminal_name)
/* Everything below here is used by the redisplay code (tputs). */
_rl_screenchars = _rl_screenwidth * _rl_screenheight;
- _rl_term_cr = (char*) "\r";
+ _rl_term_cr = "\r";
_rl_term_im = _rl_term_ei = _rl_term_ic = _rl_term_IC = (char *)NULL;
_rl_term_up = _rl_term_dc = _rl_term_DC = _rl_visible_bell = (char *)NULL;
_rl_term_ku = _rl_term_kd = _rl_term_kl = _rl_term_kr = (char *)NULL;
- _rl_term_kh = _rl_term_kH = _rl_term_kI = (char *)NULL;
+ _rl_term_kh = _rl_term_kH = _rl_term_kI = _rl_term_kD = (char *)NULL;
_rl_term_ks = _rl_term_ke = _rl_term_at7 = (char *)NULL;
_rl_term_mm = _rl_term_mo = (char *)NULL;
_rl_term_ve = _rl_term_vs = (char *)NULL;
-#if defined (HACK_TERMCAP_MOTION)
- term_forward_char = (char *)NULL;
-#endif
+ _rl_term_forward_char = (char *)NULL;
_rl_terminal_can_insert = term_has_meta = 0;
/* Reasonable defaults for tgoto(). Readline currently only uses
tgoto if _rl_term_IC or _rl_term_DC is defined, but just in case we
change that later... */
PC = '\0';
- BC = _rl_term_backspace = (char*) "\b";
+ BC = _rl_term_backspace = "\b";
UP = _rl_term_up;
return 0;
@@ -442,11 +511,14 @@ _rl_init_terminal_io (terminal_name)
UP = _rl_term_up;
if (!_rl_term_cr)
- _rl_term_cr = (char*) "\r";
+ _rl_term_cr = "\r";
_rl_term_autowrap = tgetflag ("am") && tgetflag ("xn");
- _rl_get_screen_size (tty, 0);
+ /* Allow calling application to set default height and width, using
+ rl_set_screen_size */
+ if (_rl_screenwidth <= 0 || _rl_screenheight <= 0)
+ _rl_get_screen_size (tty, 0);
/* "An application program can assume that the terminal can do
character insertion if *any one of* the capabilities `IC',
@@ -491,6 +563,8 @@ bind_termcap_arrow_keys (map)
rl_bind_keyseq_if_unbound (_rl_term_kh, rl_beg_of_line); /* Home */
rl_bind_keyseq_if_unbound (_rl_term_at7, rl_end_of_line); /* End */
+ rl_bind_keyseq_if_unbound (_rl_term_kD, rl_delete);
+
_rl_keymap = xkeymap;
}
@@ -502,7 +576,7 @@ rl_get_termcap (cap)
if (tcap_initialized == 0)
return ((char *)NULL);
- for (i = 0; i < (int) NUM_TC_STRINGS; i++)
+ for (i = 0; i < NUM_TC_STRINGS; i++)
{
if (tc_strings[i].tc_var[0] == cap[0] && strcmp (tc_strings[i].tc_var, cap) == 0)
return *(tc_strings[i].tc_value);
@@ -516,6 +590,7 @@ int
rl_reset_terminal (terminal_name)
const char *terminal_name;
{
+ _rl_screenwidth = _rl_screenheight = 0;
_rl_init_terminal_io (terminal_name);
return 0;
}
diff --git a/cmd-line-utils/readline/text.c b/cmd-line-utils/readline/text.c
index cf9223df844..399a48c5f1e 100644
--- a/cmd-line-utils/readline/text.c
+++ b/cmd-line-utils/readline/text.c
@@ -1,6 +1,6 @@
/* text.c -- text handling commands for readline. */
-/* Copyright (C) 1987-2004 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2005 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -21,7 +21,9 @@
59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#define READLINE_LIBRARY
-#include "config_readline.h"
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
#if defined (HAVE_UNISTD_H)
# include <unistd.h>
@@ -60,6 +62,11 @@
static int rl_change_case PARAMS((int, int));
static int _rl_char_search PARAMS((int, int, int));
+#if defined (READLINE_CALLBACKS)
+static int _rl_insert_next_callback PARAMS((_rl_callback_generic_arg *));
+static int _rl_char_search_callback PARAMS((_rl_callback_generic_arg *));
+#endif
+
/* **************************************************************** */
/* */
/* Insert and Delete */
@@ -402,7 +409,8 @@ rl_backward (count, key)
/* Move to the beginning of the line. */
int
-rl_beg_of_line (int count __attribute__((unused)), int key __attribute__((unused)))
+rl_beg_of_line (count, key)
+ int count, key;
{
rl_point = 0;
return 0;
@@ -410,14 +418,14 @@ rl_beg_of_line (int count __attribute__((unused)), int key __attribute__((unused
/* Move to the end of the line. */
int
-rl_end_of_line (int count __attribute__((unused)), int key __attribute__((unused)))
+rl_end_of_line (count, key)
+ int count, key;
{
rl_point = rl_end;
return 0;
}
-/* XXX - these might need changes for multibyte characters */
-/* Move forward a word. We do what Emacs does. */
+/* Move forward a word. We do what Emacs does. Handles multibyte chars. */
int
rl_forward_word (count, key)
int count, key;
@@ -434,68 +442,80 @@ rl_forward_word (count, key)
/* If we are not in a word, move forward until we are in one.
Then, move forward until we hit a non-alphabetic character. */
- c = rl_line_buffer[rl_point];
- if (rl_alphabetic (c) == 0)
+ c = _rl_char_value (rl_line_buffer, rl_point);
+
+ if (_rl_walphabetic (c) == 0)
{
- while (++rl_point < rl_end)
+ rl_point = MB_NEXTCHAR (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO);
+ while (rl_point < rl_end)
{
- c = rl_line_buffer[rl_point];
- if (rl_alphabetic (c))
+ c = _rl_char_value (rl_line_buffer, rl_point);
+ if (_rl_walphabetic (c))
break;
+ rl_point = MB_NEXTCHAR (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO);
}
}
if (rl_point == rl_end)
return 0;
- while (++rl_point < rl_end)
+ rl_point = MB_NEXTCHAR (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO);
+ while (rl_point < rl_end)
{
- c = rl_line_buffer[rl_point];
- if (rl_alphabetic (c) == 0)
+ c = _rl_char_value (rl_line_buffer, rl_point);
+ if (_rl_walphabetic (c) == 0)
break;
+ rl_point = MB_NEXTCHAR (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO);
}
+
--count;
}
return 0;
}
-/* Move backward a word. We do what Emacs does. */
+/* Move backward a word. We do what Emacs does. Handles multibyte chars. */
int
rl_backward_word (count, key)
int count, key;
{
- int c;
+ int c, p;
if (count < 0)
return (rl_forward_word (-count, key));
while (count)
{
- if (!rl_point)
+ if (rl_point == 0)
return 0;
/* Like rl_forward_word (), except that we look at the characters
just before point. */
- c = rl_line_buffer[rl_point - 1];
- if (rl_alphabetic (c) == 0)
+ p = MB_PREVCHAR (rl_line_buffer, rl_point, MB_FIND_NONZERO);
+ c = _rl_char_value (rl_line_buffer, p);
+
+ if (_rl_walphabetic (c) == 0)
{
- while (--rl_point)
+ rl_point = p;
+ while (rl_point > 0)
{
- c = rl_line_buffer[rl_point - 1];
- if (rl_alphabetic (c))
+ p = MB_PREVCHAR (rl_line_buffer, rl_point, MB_FIND_NONZERO);
+ c = _rl_char_value (rl_line_buffer, p);
+ if (_rl_walphabetic (c))
break;
+ rl_point = p;
}
}
while (rl_point)
{
- c = rl_line_buffer[rl_point - 1];
- if (rl_alphabetic (c) == 0)
+ p = MB_PREVCHAR (rl_line_buffer, rl_point, MB_FIND_NONZERO);
+ c = _rl_char_value (rl_line_buffer, p);
+ if (_rl_walphabetic (c) == 0)
break;
else
- --rl_point;
+ rl_point = p;
}
--count;
@@ -506,7 +526,8 @@ rl_backward_word (count, key)
/* Clear the current line. Numeric argument to C-l does this. */
int
-rl_refresh_line (int count __attribute__((unused)), int key __attribute__((unused)))
+rl_refresh_line (ignore1, ignore2)
+ int ignore1, ignore2;
{
int curr_line;
@@ -544,7 +565,8 @@ rl_clear_screen (count, key)
}
int
-rl_arrow_keys (int count, int c __attribute__((unused)))
+rl_arrow_keys (count, c)
+ int count, c;
{
int ch;
@@ -592,7 +614,7 @@ rl_arrow_keys (int count, int c __attribute__((unused)))
#ifdef HANDLE_MULTIBYTE
static char pending_bytes[MB_LEN_MAX];
static int pending_bytes_length = 0;
-static mbstate_t ps;
+static mbstate_t ps = {0};
#endif
/* Insert the character C at the current location, moving point forward.
@@ -750,10 +772,8 @@ _rl_insert_char (count, c)
return 0;
}
-#if defined (HANDLE_MULTIBYTE)
if (MB_CUR_MAX == 1 || rl_byte_oriented)
{
-#endif
/* We are inserting a single character.
If there is pending input, then make a string of all of the
pending characters that are bound to rl_insert, and insert
@@ -769,8 +789,8 @@ _rl_insert_char (count, c)
str[0] = c;
rl_insert_text (str);
}
-#if defined (HANDLE_MULTIBYTE)
}
+#if defined (HANDLE_MULTIBYTE)
else
{
rl_insert_text (incoming);
@@ -827,29 +847,67 @@ rl_insert (count, c)
}
/* Insert the next typed character verbatim. */
-int
-rl_quoted_insert (int count, int key __attribute__((unused)))
+static int
+_rl_insert_next (count)
+ int count;
{
int c;
-#if defined (HANDLE_SIGNALS)
- _rl_disable_tty_signals ();
-#endif
-
RL_SETSTATE(RL_STATE_MOREINPUT);
c = rl_read_key ();
RL_UNSETSTATE(RL_STATE_MOREINPUT);
#if defined (HANDLE_SIGNALS)
- _rl_restore_tty_signals ();
+ if (RL_ISSTATE (RL_STATE_CALLBACK) == 0)
+ _rl_restore_tty_signals ();
#endif
return (_rl_insert_char (count, c));
}
+#if defined (READLINE_CALLBACKS)
+static int
+_rl_insert_next_callback (data)
+ _rl_callback_generic_arg *data;
+{
+ int count;
+
+ count = data->count;
+
+ /* Deregister function, let rl_callback_read_char deallocate data */
+ _rl_callback_func = 0;
+ _rl_want_redisplay = 1;
+
+ return _rl_insert_next (count);
+}
+#endif
+
+int
+rl_quoted_insert (count, key)
+ int count, key;
+{
+ /* Let's see...should the callback interface futz with signal handling? */
+#if defined (HANDLE_SIGNALS)
+ if (RL_ISSTATE (RL_STATE_CALLBACK) == 0)
+ _rl_disable_tty_signals ();
+#endif
+
+#if defined (READLINE_CALLBACKS)
+ if (RL_ISSTATE (RL_STATE_CALLBACK))
+ {
+ _rl_callback_data = _rl_callback_data_alloc (count);
+ _rl_callback_func = _rl_insert_next_callback;
+ return (0);
+ }
+#endif
+
+ return _rl_insert_next (count);
+}
+
/* Insert a tab character. */
int
-rl_tab_insert (int count, int key __attribute__((unused)))
+rl_tab_insert (count, key)
+ int count, key;
{
return (_rl_insert_char (count, '\t'));
}
@@ -858,7 +916,8 @@ rl_tab_insert (int count, int key __attribute__((unused)))
KEY is the key that invoked this command. I guess it could have
meaning in the future. */
int
-rl_newline (int count __attribute__((unused)), int key __attribute__((unused)))
+rl_newline (count, key)
+ int count, key;
{
rl_done = 1;
@@ -891,8 +950,8 @@ rl_newline (int count __attribute__((unused)), int key __attribute__((unused)))
is just a stub, you bind keys to it and the code in _rl_dispatch ()
is special cased. */
int
-rl_do_lowercase_version (int count __attribute__((unused)),
- int key __attribute__((unused)))
+rl_do_lowercase_version (ignore1, ignore2)
+ int ignore1, ignore2;
{
return 0;
}
@@ -979,43 +1038,17 @@ _rl_rubout_char (count, key)
return -1;
}
+ orig_point = rl_point;
if (count > 1 || rl_explicit_arg)
{
- orig_point = rl_point;
-#if defined (HANDLE_MULTIBYTE)
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- rl_backward_char (count, key);
- else
-#endif
- rl_backward_byte (count, key);
+ rl_backward_char (count, key);
rl_kill_text (orig_point, rl_point);
}
- else
+ else if (MB_CUR_MAX == 1 || rl_byte_oriented)
{
-#if defined (HANDLE_MULTIBYTE)
- if (MB_CUR_MAX == 1 || rl_byte_oriented)
- {
-#endif
- c = rl_line_buffer[--rl_point];
- rl_delete_text (rl_point, rl_point + 1);
-#if defined (HANDLE_MULTIBYTE)
- }
- else
- {
- int orig_point2;
-
- orig_point2 = rl_point;
- rl_point = _rl_find_prev_mbchar (rl_line_buffer, rl_point, MB_FIND_NONZERO);
- c = rl_line_buffer[rl_point];
- rl_delete_text (rl_point, orig_point2);
- }
-#endif /* HANDLE_MULTIBYTE */
-
- /* I don't think that the hack for end of line is needed for
- multibyte chars. */
-#if defined (HANDLE_MULTIBYTE)
- if (MB_CUR_MAX == 1 || rl_byte_oriented)
-#endif
+ c = rl_line_buffer[--rl_point];
+ rl_delete_text (rl_point, orig_point);
+ /* The erase-at-end-of-line hack is of questionable merit now. */
if (rl_point == rl_end && ISPRINT (c) && _rl_last_c_pos)
{
int l;
@@ -1023,6 +1056,11 @@ _rl_rubout_char (count, key)
_rl_erase_at_end_of_line (l);
}
}
+ else
+ {
+ rl_point = _rl_find_prev_mbchar (rl_line_buffer, rl_point, MB_FIND_NONZERO);
+ rl_delete_text (rl_point, orig_point);
+ }
return 0;
}
@@ -1033,7 +1071,7 @@ int
rl_delete (count, key)
int count, key;
{
- int r;
+ int xpoint;
if (count < 0)
return (_rl_rubout_char (-count, key));
@@ -1046,28 +1084,21 @@ rl_delete (count, key)
if (count > 1 || rl_explicit_arg)
{
- int orig_point = rl_point;
-#if defined (HANDLE_MULTIBYTE)
+ xpoint = rl_point;
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
rl_forward_char (count, key);
else
-#endif
rl_forward_byte (count, key);
- r = rl_kill_text (orig_point, rl_point);
- rl_point = orig_point;
- return r;
+ rl_kill_text (xpoint, rl_point);
+ rl_point = xpoint;
}
else
{
- int new_point;
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- new_point = _rl_find_next_mbchar (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO);
- else
- new_point = rl_point + 1;
-
- return (rl_delete_text (rl_point, new_point));
+ xpoint = MB_NEXTCHAR (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO);
+ rl_delete_text (rl_point, xpoint);
}
+ return 0;
}
/* Delete the character under the cursor, unless the insertion
@@ -1086,8 +1117,8 @@ rl_rubout_or_delete (count, key)
/* Delete all spaces and tabs around point. */
int
-rl_delete_horizontal_space (int count __attribute__((unused)),
- int key __attribute__((unused)))
+rl_delete_horizontal_space (count, ignore)
+ int count, ignore;
{
int start = rl_point;
@@ -1104,6 +1135,10 @@ rl_delete_horizontal_space (int count __attribute__((unused)),
rl_delete_text (start, rl_point);
rl_point = start;
}
+
+ if (rl_point < 0)
+ rl_point = 0;
+
return 0;
}
@@ -1127,13 +1162,14 @@ rl_delete_or_show_completions (count, key)
/* Turn the current line into a comment in shell history.
A K*rn shell style function. */
int
-rl_insert_comment (int count __attribute__((unused)), int key)
+rl_insert_comment (count, key)
+ int count, key;
{
char *rl_comment_text;
int rl_comment_len;
rl_beg_of_line (1, key);
- rl_comment_text = _rl_comment_begin ? _rl_comment_begin : (char*) RL_COMMENT_BEGIN_DEFAULT;
+ rl_comment_text = _rl_comment_begin ? _rl_comment_begin : RL_COMMENT_BEGIN_DEFAULT;
if (rl_explicit_arg == 0)
rl_insert_text (rl_comment_text);
@@ -1165,21 +1201,24 @@ rl_insert_comment (int count __attribute__((unused)), int key)
/* Uppercase the word at point. */
int
-rl_upcase_word (int count, int key __attribute__((unused)))
+rl_upcase_word (count, key)
+ int count, key;
{
return (rl_change_case (count, UpCase));
}
/* Lowercase the word at point. */
int
-rl_downcase_word (int count, int key __attribute__((unused)))
+rl_downcase_word (count, key)
+ int count, key;
{
return (rl_change_case (count, DownCase));
}
/* Upcase the first letter, downcase the rest. */
int
-rl_capitalize_word (int count, int key __attribute__((unused)))
+rl_capitalize_word (count, key)
+ int count, key;
{
return (rl_change_case (count, CapCase));
}
@@ -1193,42 +1232,80 @@ static int
rl_change_case (count, op)
int count, op;
{
- register int start, end;
- int inword, c;
+ int start, next, end;
+ int inword, c, nc, nop;
+#if defined (HANDLE_MULTIBYTE)
+ wchar_t wc, nwc;
+ char mb[MB_LEN_MAX+1];
+ int mlen;
+ mbstate_t mps;
+#endif
start = rl_point;
rl_forward_word (count, 0);
end = rl_point;
+ if (op != UpCase && op != DownCase && op != CapCase)
+ {
+ rl_ding ();
+ return -1;
+ }
+
if (count < 0)
SWAP (start, end);
+#if defined (HANDLE_MULTIBYTE)
+ memset (&mps, 0, sizeof (mbstate_t));
+#endif
+
/* We are going to modify some text, so let's prepare to undo it. */
rl_modifying (start, end);
- for (inword = 0; start < end; start++)
+ inword = 0;
+ while (start < end)
{
- c = rl_line_buffer[start];
- switch (op)
- {
- case UpCase:
- rl_line_buffer[start] = _rl_to_upper (c);
- break;
+ c = _rl_char_value (rl_line_buffer, start);
+ /* This assumes that the upper and lower case versions are the same width. */
+ next = MB_NEXTCHAR (rl_line_buffer, start, 1, MB_FIND_NONZERO);
- case DownCase:
- rl_line_buffer[start] = _rl_to_lower (c);
- break;
-
- case CapCase:
- rl_line_buffer[start] = (inword == 0) ? _rl_to_upper (c) : _rl_to_lower (c);
- inword = rl_alphabetic (rl_line_buffer[start]);
- break;
+ if (_rl_walphabetic (c) == 0)
+ {
+ inword = 0;
+ start = next;
+ continue;
+ }
- default:
- rl_ding ();
- return -1;
+ if (op == CapCase)
+ {
+ nop = inword ? DownCase : UpCase;
+ inword = 1;
+ }
+ else
+ nop = op;
+ if (MB_CUR_MAX == 1 || rl_byte_oriented || isascii (c))
+ {
+ nc = (nop == UpCase) ? _rl_to_upper (c) : _rl_to_lower (c);
+ rl_line_buffer[start] = nc;
+ }
+#if defined (HANDLE_MULTIBYTE)
+ else
+ {
+ mbrtowc (&wc, rl_line_buffer + start, end - start, &mps);
+ nwc = (nop == UpCase) ? _rl_to_wupper (wc) : _rl_to_wlower (wc);
+ if (nwc != wc) /* just skip unchanged characters */
+ {
+ mlen = wcrtomb (mb, nwc, &mps);
+ if (mlen > 0)
+ mb[mlen] = '\0';
+ /* Assume the same width */
+ strncpy (rl_line_buffer + start, mb, mlen);
+ }
}
+#endif
+
+ start = next;
}
+
rl_point = end;
return 0;
}
@@ -1303,15 +1380,16 @@ rl_transpose_words (count, key)
/* Transpose the characters at point. If point is at the end of the line,
then transpose the characters before point. */
int
-rl_transpose_chars (int count, int key __attribute__((unused)))
+rl_transpose_chars (count, key)
+ int count, key;
{
#if defined (HANDLE_MULTIBYTE)
char *dummy;
- int i, prev_point;
+ int i;
#else
char dummy[2];
#endif
- int char_length;
+ int char_length, prev_point;
if (count == 0)
return 0;
@@ -1326,20 +1404,12 @@ rl_transpose_chars (int count, int key __attribute__((unused)))
if (rl_point == rl_end)
{
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- rl_point = _rl_find_prev_mbchar (rl_line_buffer, rl_point, MB_FIND_NONZERO);
- else
- --rl_point;
+ rl_point = MB_PREVCHAR (rl_line_buffer, rl_point, MB_FIND_NONZERO);
count = 1;
}
-#if defined (HANDLE_MULTIBYTE)
prev_point = rl_point;
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- rl_point = _rl_find_prev_mbchar (rl_line_buffer, rl_point, MB_FIND_NONZERO);
- else
-#endif
- rl_point--;
+ rl_point = MB_PREVCHAR (rl_line_buffer, rl_point, MB_FIND_NONZERO);
#if defined (HANDLE_MULTIBYTE)
char_length = prev_point - rl_point;
@@ -1473,15 +1543,51 @@ _rl_char_search (count, fdir, bdir)
}
#endif /* !HANDLE_MULTIBYTE */
+#if defined (READLINE_CALLBACKS)
+static int
+_rl_char_search_callback (data)
+ _rl_callback_generic_arg *data;
+{
+ _rl_callback_func = 0;
+ _rl_want_redisplay = 1;
+
+ return (_rl_char_search (data->count, data->i1, data->i2));
+}
+#endif
+
int
-rl_char_search (int count, int key __attribute__((unused)))
+rl_char_search (count, key)
+ int count, key;
{
+#if defined (READLINE_CALLBACKS)
+ if (RL_ISSTATE (RL_STATE_CALLBACK))
+ {
+ _rl_callback_data = _rl_callback_data_alloc (count);
+ _rl_callback_data->i1 = FFIND;
+ _rl_callback_data->i2 = BFIND;
+ _rl_callback_func = _rl_char_search_callback;
+ return (0);
+ }
+#endif
+
return (_rl_char_search (count, FFIND, BFIND));
}
int
-rl_backward_char_search (int count, int key __attribute__((unused)))
+rl_backward_char_search (count, key)
+ int count, key;
{
+#if defined (READLINE_CALLBACKS)
+ if (RL_ISSTATE (RL_STATE_CALLBACK))
+ {
+ _rl_callback_data = _rl_callback_data_alloc (count);
+ _rl_callback_data->i1 = BFIND;
+ _rl_callback_data->i2 = FFIND;
+ _rl_callback_func = _rl_char_search_callback;
+ return (0);
+ }
+#endif
+
return (_rl_char_search (count, BFIND, FFIND));
}
@@ -1505,15 +1611,16 @@ _rl_set_mark_at_pos (position)
/* A bindable command to set the mark. */
int
-rl_set_mark (int count, int key __attribute__((unused)))
+rl_set_mark (count, key)
+ int count, key;
{
return (_rl_set_mark_at_pos (rl_explicit_arg ? count : rl_point));
}
/* Exchange the position of mark and point. */
int
-rl_exchange_point_and_mark (int count __attribute__((unused)),
- int key __attribute__((unused)))
+rl_exchange_point_and_mark (count, key)
+ int count, key;
{
if (rl_mark > rl_end)
rl_mark = -1;
diff --git a/cmd-line-utils/readline/tilde.c b/cmd-line-utils/readline/tilde.c
index 91eead0d9e2..1b76c9f2404 100644
--- a/cmd-line-utils/readline/tilde.c
+++ b/cmd-line-utils/readline/tilde.c
@@ -19,9 +19,9 @@
along with Readline; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
-#define READLINE_LIBRARY
-
-#include "config_readline.h"
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
#if defined (HAVE_UNISTD_H)
# ifdef _MINIX
@@ -43,7 +43,9 @@
#endif /* HAVE_STDLIB_H */
#include <sys/types.h>
+#if defined (HAVE_PWD_H)
#include <pwd.h>
+#endif
#include "tilde.h"
@@ -54,8 +56,12 @@ static void *xmalloc (), *xrealloc ();
#endif /* TEST || STATIC_MALLOC */
#if !defined (HAVE_GETPW_DECLS)
+# if defined (HAVE_GETPWUID)
extern struct passwd *getpwuid PARAMS((uid_t));
+# endif
+# if defined (HAVE_GETPWNAM)
extern struct passwd *getpwnam PARAMS((const char *));
+# endif
#endif /* !HAVE_GETPW_DECLS */
#if !defined (savestring)
@@ -190,7 +196,7 @@ tilde_expand (string)
int result_size, result_index;
result_index = result_size = 0;
- if ((result = strchr (string, '~')))
+ if (result = strchr (string, '~'))
result = (char *)xmalloc (result_size = (strlen (string) + 16));
else
result = (char *)xmalloc (result_size = (strlen (string) + 1));
@@ -277,6 +283,39 @@ isolate_tilde_prefix (fname, lenp)
return ret;
}
+#if 0
+/* Public function to scan a string (FNAME) beginning with a tilde and find
+ the portion of the string that should be passed to the tilde expansion
+ function. Right now, it just calls tilde_find_suffix and allocates new
+ memory, but it can be expanded to do different things later. */
+char *
+tilde_find_word (fname, flags, lenp)
+ const char *fname;
+ int flags, *lenp;
+{
+ int x;
+ char *r;
+
+ x = tilde_find_suffix (fname);
+ if (x == 0)
+ {
+ r = savestring (fname);
+ if (lenp)
+ *lenp = 0;
+ }
+ else
+ {
+ r = (char *)xmalloc (1 + x);
+ strncpy (r, fname, x);
+ r[x] = '\0';
+ if (lenp)
+ *lenp = x;
+ }
+
+ return r;
+}
+#endif
+
/* Return a string that is PREFIX concatenated with SUFFIX starting at
SUFFIND. */
static char *
@@ -347,7 +386,11 @@ tilde_expand_word (filename)
/* No preexpansion hook, or the preexpansion hook failed. Look in the
password database. */
dirname = (char *)NULL;
+#if defined (HAVE_GETPWNAM)
user_entry = getpwnam (username);
+#else
+ user_entry = 0;
+#endif
if (user_entry == 0)
{
/* If the calling program has a special syntax for expanding tildes,
@@ -361,19 +404,20 @@ tilde_expand_word (filename)
free (expansion);
}
}
- free (username);
/* If we don't have a failure hook, or if the failure hook did not
expand the tilde, return a copy of what we were passed. */
if (dirname == 0)
dirname = savestring (filename);
}
+#if defined (HAVE_GETPWENT)
else
- {
- free (username);
- dirname = glue_prefix_and_suffix (user_entry->pw_dir, filename, user_len);
- }
+ dirname = glue_prefix_and_suffix (user_entry->pw_dir, filename, user_len);
+#endif
+ free (username);
+#if defined (HAVE_GETPWENT)
endpwent ();
+#endif
return (dirname);
}
diff --git a/cmd-line-utils/readline/tilde.h b/cmd-line-utils/readline/tilde.h
index f8182c999d9..c58ce20e7a2 100644
--- a/cmd-line-utils/readline/tilde.h
+++ b/cmd-line-utils/readline/tilde.h
@@ -71,6 +71,9 @@ extern char *tilde_expand PARAMS((const char *));
tilde. If there is no expansion, call tilde_expansion_failure_hook. */
extern char *tilde_expand_word PARAMS((const char *));
+/* Find the portion of the string beginning with ~ that should be expanded. */
+extern char *tilde_find_word PARAMS((const char *, int, int *));
+
#ifdef __cplusplus
}
#endif
diff --git a/cmd-line-utils/readline/undo.c b/cmd-line-utils/readline/undo.c
index 4d256f492b8..9d9bd25ba8f 100644
--- a/cmd-line-utils/readline/undo.c
+++ b/cmd-line-utils/readline/undo.c
@@ -1,7 +1,7 @@
/* readline.c -- a general facility for reading lines of input
with emacs style editing and completion. */
-/* Copyright (C) 1987, 1989, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1987, 1989, 1992, 2006 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -22,7 +22,9 @@
59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#define READLINE_LIBRARY
-#include "config_readline.h"
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
#include <sys/types.h>
@@ -48,6 +50,8 @@
#include "rlprivate.h"
#include "xmalloc.h"
+extern void replace_history_data PARAMS((int, histdata_t *, histdata_t *));
+
/* Non-zero tells rl_delete_text and rl_insert_text to not add to
the undo list. */
int _rl_doing_an_undo = 0;
@@ -64,19 +68,35 @@ UNDO_LIST *rl_undo_list = (UNDO_LIST *)NULL;
/* */
/* **************************************************************** */
-/* Remember how to undo something. Concatenate some undos if that
- seems right. */
-void
-rl_add_undo (what, start, end, text)
+static UNDO_LIST *
+alloc_undo_entry (what, start, end, text)
enum undo_code what;
int start, end;
char *text;
{
- UNDO_LIST *temp = (UNDO_LIST *)xmalloc (sizeof (UNDO_LIST));
+ UNDO_LIST *temp;
+
+ temp = (UNDO_LIST *)xmalloc (sizeof (UNDO_LIST));
temp->what = what;
temp->start = start;
temp->end = end;
temp->text = text;
+
+ temp->next = (UNDO_LIST *)NULL;
+ return temp;
+}
+
+/* Remember how to undo something. Concatenate some undos if that
+ seems right. */
+void
+rl_add_undo (what, start, end, text)
+ enum undo_code what;
+ int start, end;
+ char *text;
+{
+ UNDO_LIST *temp;
+
+ temp = alloc_undo_entry (what, start, end, text);
temp->next = rl_undo_list;
rl_undo_list = temp;
}
@@ -85,9 +105,12 @@ rl_add_undo (what, start, end, text)
void
rl_free_undo_list ()
{
+ UNDO_LIST *release, *orig_list;
+
+ orig_list = rl_undo_list;
while (rl_undo_list)
{
- UNDO_LIST *release = rl_undo_list;
+ release = rl_undo_list;
rl_undo_list = rl_undo_list->next;
if (release->what == UNDO_DELETE)
@@ -96,6 +119,43 @@ rl_free_undo_list ()
free (release);
}
rl_undo_list = (UNDO_LIST *)NULL;
+ replace_history_data (-1, (histdata_t *)orig_list, (histdata_t *)NULL);
+}
+
+UNDO_LIST *
+_rl_copy_undo_entry (entry)
+ UNDO_LIST *entry;
+{
+ UNDO_LIST *new;
+
+ new = alloc_undo_entry (entry->what, entry->start, entry->end, (char *)NULL);
+ new->text = entry->text ? savestring (entry->text) : 0;
+ return new;
+}
+
+UNDO_LIST *
+_rl_copy_undo_list (head)
+ UNDO_LIST *head;
+{
+ UNDO_LIST *list, *new, *roving, *c;
+
+ list = head;
+ new = 0;
+ while (list)
+ {
+ c = _rl_copy_undo_entry (list);
+ if (new == 0)
+ roving = new = c;
+ else
+ {
+ roving->next = c;
+ roving = roving->next;
+ }
+ list = list->next;
+ }
+
+ roving->next = 0;
+ return new;
}
/* Undo the next thing in the list. Return 0 if there
@@ -159,6 +219,8 @@ rl_do_undo ()
release = rl_undo_list;
rl_undo_list = rl_undo_list->next;
+ replace_history_data (-1, (histdata_t *)release, (histdata_t *)rl_undo_list);
+
free (release);
}
while (waiting_for_begin);
@@ -175,7 +237,7 @@ _rl_fix_last_undo_of_type (type, start, end)
for (rl = rl_undo_list; rl; rl = rl->next)
{
- if (rl->what == (unsigned int) type)
+ if (rl->what == type)
{
rl->start = start;
rl->end = end;
@@ -226,7 +288,8 @@ rl_modifying (start, end)
/* Revert the current line to its previous state. */
int
-rl_revert_line (int count __attribute__((unused)), int key __attribute__((unused)))
+rl_revert_line (count, key)
+ int count, key;
{
if (!rl_undo_list)
rl_ding ();
@@ -234,13 +297,19 @@ rl_revert_line (int count __attribute__((unused)), int key __attribute__((unuse
{
while (rl_undo_list)
rl_do_undo ();
+#if defined (VI_MODE)
+ if (rl_editing_mode == vi_mode)
+ rl_point = rl_mark = 0; /* rl_end should be set correctly */
+#endif
}
+
return 0;
}
/* Do some undoing of things that were done. */
int
-rl_undo_command (int count, int key __attribute__((unused)))
+rl_undo_command (count, key)
+ int count, key;
{
if (count < 0)
return 0; /* Nothing to do. */
diff --git a/cmd-line-utils/readline/util.c b/cmd-line-utils/readline/util.c
index d5fe51a7bf2..e44ef64349d 100644
--- a/cmd-line-utils/readline/util.c
+++ b/cmd-line-utils/readline/util.c
@@ -1,6 +1,6 @@
/* util.c -- readline utility functions */
-/* Copyright (C) 1987, 1989, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2005 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -21,7 +21,9 @@
59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#define READLINE_LIBRARY
-#include "config_readline.h"
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
#include <sys/types.h>
#include <fcntl.h>
@@ -42,6 +44,7 @@
/* System-specific feature definitions and include files. */
#include "rldefs.h"
+#include "rlmbutil.h"
#if defined (TIOCSTAT_IN_SYS_IOCTL)
# include <sys/ioctl.h>
@@ -76,13 +79,29 @@ rl_alphabetic (c)
strchr (pathname_alphabetic_chars, c) != NULL);
}
+#if defined (HANDLE_MULTIBYTE)
+int
+_rl_walphabetic (wc)
+ wchar_t wc;
+{
+ int c;
+
+ if (iswalnum (wc))
+ return (1);
+
+ c = wc & 0177;
+ return (_rl_allow_pathname_alphabetic_chars &&
+ strchr (pathname_alphabetic_chars, c) != NULL);
+}
+#endif
+
/* How to abort things. */
int
_rl_abort_internal ()
{
rl_ding ();
rl_clear_message ();
- _rl_init_argument ();
+ _rl_reset_argument ();
rl_clear_pending_input ();
RL_UNSETSTATE (RL_STATE_MACRODEF);
@@ -95,13 +114,15 @@ _rl_abort_internal ()
}
int
-rl_abort (int count __attribute__((unused)), int key __attribute__((unused)))
+rl_abort (count, key)
+ int count, key;
{
return (_rl_abort_internal ());
}
int
-rl_tty_status (int count __attribute__((unused)), int key __attribute__((unused)))
+rl_tty_status (count, key)
+ int count, key;
{
#if defined (TIOCSTAT)
ioctl (1, TIOCSTAT, (char *)0);
@@ -150,7 +171,8 @@ rl_extend_line_buffer (len)
/* A function for simple tilde expansion. */
int
-rl_tilde_expand (int ignore __attribute__((unused)), int key __attribute__((unused)))
+rl_tilde_expand (ignore, key)
+ int ignore, key;
{
register int start, end;
char *homedir, *temp;
diff --git a/cmd-line-utils/readline/vi_keymap.c b/cmd-line-utils/readline/vi_keymap.c
index 53a67c674ce..4b48c75cc5d 100644
--- a/cmd-line-utils/readline/vi_keymap.c
+++ b/cmd-line-utils/readline/vi_keymap.c
@@ -130,7 +130,7 @@ KEYMAP_ENTRY_ARRAY vi_movement_keymap = {
{ ISFUNC, rl_revert_line }, /* U */
{ ISFUNC, (rl_command_func_t *)0x0 }, /* V */
{ ISFUNC, rl_vi_next_word }, /* W */
- { ISFUNC, rl_rubout }, /* X */
+ { ISFUNC, rl_vi_rubout }, /* X */
{ ISFUNC, rl_vi_yank_to }, /* Y */
{ ISFUNC, (rl_command_func_t *)0x0 }, /* Z */
diff --git a/cmd-line-utils/readline/vi_mode.c b/cmd-line-utils/readline/vi_mode.c
index a277fe2c237..d0b7e330adc 100644
--- a/cmd-line-utils/readline/vi_mode.c
+++ b/cmd-line-utils/readline/vi_mode.c
@@ -1,7 +1,7 @@
/* vi_mode.c -- A vi emulation mode for Bash.
Derived from code written by Jeff Sparkes (jsparkes@bnr.ca). */
-/* Copyright (C) 1987-2004 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2005 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -31,7 +31,9 @@
#if defined (VI_MODE)
-#include "config_readline.h"
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
#include <sys/types.h>
@@ -88,6 +90,7 @@ static int _rl_vi_last_arg_sign = 1;
static int _rl_vi_last_motion;
#if defined (HANDLE_MULTIBYTE)
static char _rl_vi_last_search_mbchar[MB_LEN_MAX];
+static int _rl_vi_last_search_mblen;
#else
static int _rl_vi_last_search_char;
#endif
@@ -105,15 +108,35 @@ static int vi_mark_chars['z' - 'a' + 1];
static void _rl_vi_stuff_insert PARAMS((int));
static void _rl_vi_save_insert PARAMS((UNDO_LIST *));
+
+static void _rl_vi_backup PARAMS((void));
+
+static int _rl_vi_arg_dispatch PARAMS((int));
static int rl_digit_loop1 PARAMS((void));
+static int _rl_vi_set_mark PARAMS((void));
+static int _rl_vi_goto_mark PARAMS((void));
+
+static void _rl_vi_append_forward PARAMS((int));
+
+static int _rl_vi_callback_getchar PARAMS((char *, int));
+
+#if defined (READLINE_CALLBACKS)
+static int _rl_vi_callback_set_mark PARAMS((_rl_callback_generic_arg *));
+static int _rl_vi_callback_goto_mark PARAMS((_rl_callback_generic_arg *));
+static int _rl_vi_callback_change_char PARAMS((_rl_callback_generic_arg *));
+static int _rl_vi_callback_char_search PARAMS((_rl_callback_generic_arg *));
+#endif
+
void
_rl_vi_initialize_line ()
{
register int i;
- for (i = 0; i < (int) (sizeof (vi_mark_chars) / sizeof (int)); i++)
+ for (i = 0; i < sizeof (vi_mark_chars) / sizeof (int); i++)
vi_mark_chars[i] = -1;
+
+ RL_UNSETSTATE(RL_STATE_VICMDONCE);
}
void
@@ -166,7 +189,8 @@ _rl_vi_stuff_insert (count)
redo a text modification command. The default for _rl_vi_last_command
puts you back into insert mode. */
int
-rl_vi_redo (int count, int c __attribute__((unused)))
+rl_vi_redo (count, c)
+ int count, c;
{
int r;
@@ -185,7 +209,16 @@ rl_vi_redo (int count, int c __attribute__((unused)))
_rl_vi_stuff_insert (count);
/* And back up point over the last character inserted. */
if (rl_point > 0)
- rl_point--;
+ _rl_vi_backup ();
+ }
+ /* Ditto for redoing an insert with `a', but move forward a character first
+ like the `a' command does. */
+ else if (_rl_vi_last_command == 'a' && vi_insert_buffer && *vi_insert_buffer)
+ {
+ _rl_vi_append_forward ('a');
+ _rl_vi_stuff_insert (count);
+ if (rl_point > 0)
+ _rl_vi_backup ();
}
else
r = _rl_dispatch (_rl_vi_last_command, _rl_keymap);
@@ -204,7 +237,8 @@ rl_vi_undo (count, key)
/* Yank the nth arg from the previous line into this line at point. */
int
-rl_vi_yank_arg (int count, int key __attribute__((unused)))
+rl_vi_yank_arg (count, key)
+ int count, key;
{
/* Readline thinks that the first word on a line is the 0th, while vi
thinks the first word on a line is the 1st. Compensate. */
@@ -268,10 +302,12 @@ rl_vi_search (count, key)
switch (key)
{
case '?':
+ _rl_free_saved_history_line ();
rl_noninc_forward_search (count, key);
break;
case '/':
+ _rl_free_saved_history_line ();
rl_noninc_reverse_search (count, key);
break;
@@ -284,7 +320,8 @@ rl_vi_search (count, key)
/* Completion, from vi's point of view. */
int
-rl_vi_complete (int ignore __attribute__((unused)), int key)
+rl_vi_complete (ignore, key)
+ int ignore, key;
{
if ((rl_point < rl_end) && (!whitespace (rl_line_buffer[rl_point])))
{
@@ -310,7 +347,8 @@ rl_vi_complete (int ignore __attribute__((unused)), int key)
/* Tilde expansion for vi mode. */
int
-rl_vi_tilde_expand (int ignore __attribute__((unused)), int key)
+rl_vi_tilde_expand (ignore, key)
+ int ignore, key;
{
rl_tilde_expand (0, key);
rl_vi_start_inserting (key, 1, rl_arg_sign);
@@ -380,7 +418,8 @@ rl_vi_end_word (count, key)
/* Move forward a word the way that 'W' does. */
int
-rl_vi_fWord (int count, int ignore __attribute__((unused)))
+rl_vi_fWord (count, ignore)
+ int count, ignore;
{
while (count-- && rl_point < (rl_end - 1))
{
@@ -396,7 +435,8 @@ rl_vi_fWord (int count, int ignore __attribute__((unused)))
}
int
-rl_vi_bWord (int count, int ignore __attribute__((unused)))
+rl_vi_bWord (count, ignore)
+ int count, ignore;
{
while (count-- && rl_point > 0)
{
@@ -419,7 +459,8 @@ rl_vi_bWord (int count, int ignore __attribute__((unused)))
}
int
-rl_vi_eWord(int count, int ignore __attribute__((unused)))
+rl_vi_eWord (count, ignore)
+ int count, ignore;
{
while (count-- && rl_point < (rl_end - 1))
{
@@ -449,7 +490,8 @@ rl_vi_eWord(int count, int ignore __attribute__((unused)))
}
int
-rl_vi_fword (int count, int ignore __attribute__((unused)))
+rl_vi_fword (count, ignore)
+ int count, ignore;
{
while (count-- && rl_point < (rl_end - 1))
{
@@ -474,7 +516,8 @@ rl_vi_fword (int count, int ignore __attribute__((unused)))
}
int
-rl_vi_bword (int count, int ignore __attribute__((unused)))
+rl_vi_bword (count, ignore)
+ int count, ignore;
{
while (count-- && rl_point > 0)
{
@@ -512,7 +555,8 @@ rl_vi_bword (int count, int ignore __attribute__((unused)))
}
int
-rl_vi_eword (int count, int ignore __attribute__((unused)))
+rl_vi_eword (count, ignore)
+ int count, ignore;
{
while (count-- && rl_point < rl_end - 1)
{
@@ -536,34 +580,46 @@ rl_vi_eword (int count, int ignore __attribute__((unused)))
}
int
-rl_vi_insert_beg (int count __attribute__((unused)), int key)
+rl_vi_insert_beg (count, key)
+ int count, key;
{
rl_beg_of_line (1, key);
rl_vi_insertion_mode (1, key);
return (0);
}
-int
-rl_vi_append_mode (int count __attribute__((unused)), int key)
+static void
+_rl_vi_append_forward (key)
+ int key;
{
+ int point;
+
if (rl_point < rl_end)
{
if (MB_CUR_MAX == 1 || rl_byte_oriented)
rl_point++;
else
{
- int point = rl_point;
+ point = rl_point;
rl_forward_char (1, key);
if (point == rl_point)
rl_point = rl_end;
}
}
- rl_vi_insertion_mode (1, key);
+}
+
+int
+rl_vi_append_mode (count, key)
+ int count, key;
+{
+ _rl_vi_append_forward (key);
+ rl_vi_start_inserting (key, 1, rl_arg_sign);
return (0);
}
int
-rl_vi_append_eol (int count __attribute__((unused)), int key)
+rl_vi_append_eol (count, key)
+ int count, key;
{
rl_end_of_line (1, key);
rl_vi_append_mode (1, key);
@@ -572,7 +628,8 @@ rl_vi_append_eol (int count __attribute__((unused)), int key)
/* What to do in the case of C-d. */
int
-rl_vi_eof_maybe (int count __attribute__((unused)), int c __attribute__((unused)))
+rl_vi_eof_maybe (count, c)
+ int count, c;
{
return (rl_newline (1, '\n'));
}
@@ -582,7 +639,8 @@ rl_vi_eof_maybe (int count __attribute__((unused)), int c __attribute__((unused)
/* Switching from one mode to the other really just involves
switching keymaps. */
int
-rl_vi_insertion_mode (int count __attribute__((unused)), int key)
+rl_vi_insertion_mode (count, key)
+ int count, key;
{
_rl_keymap = vi_insertion_keymap;
_rl_vi_last_key_before_insert = key;
@@ -595,7 +653,7 @@ _rl_vi_save_insert (up)
{
int len, start, end;
- if (up == 0)
+ if (up == 0 || up->what != UNDO_INSERT)
{
if (vi_insert_buffer_size >= 1)
vi_insert_buffer[0] = '\0';
@@ -644,13 +702,21 @@ _rl_vi_done_inserting ()
}
int
-rl_vi_movement_mode (int count __attribute__((unused)), int key)
+rl_vi_movement_mode (count, key)
+ int count, key;
{
if (rl_point > 0)
rl_backward_char (1, key);
_rl_keymap = vi_movement_keymap;
_rl_vi_done_inserting ();
+
+ /* This is how POSIX.2 says `U' should behave -- everything up until the
+ first time you go into command mode should not be undone. */
+ if (RL_ISSTATE (RL_STATE_VICMDONCE) == 0)
+ rl_free_undo_list ();
+
+ RL_SETSTATE (RL_STATE_VICMDONCE);
return (0);
}
@@ -672,7 +738,7 @@ _rl_vi_change_mbchar_case (count)
{
wchar_t wc;
char mb[MB_LEN_MAX+1];
- int local_mblen;
+ int mlen, p;
mbstate_t ps;
memset (&ps, 0, sizeof (mbstate_t));
@@ -695,11 +761,14 @@ _rl_vi_change_mbchar_case (count)
/* Vi is kind of strange here. */
if (wc)
{
- local_mblen = wcrtomb (mb, wc, &ps);
- if (local_mblen >= 0)
- mb[local_mblen] = '\0';
+ p = rl_point;
+ mlen = wcrtomb (mb, wc, &ps);
+ if (mlen >= 0)
+ mb[mlen] = '\0';
rl_begin_undo_group ();
- rl_delete (1, 0);
+ rl_vi_delete (1, 0);
+ if (rl_point < p) /* Did we retreat at EOL? */
+ rl_point++; /* XXX - should we advance more than 1 for mbchar? */
rl_insert_text (mb);
rl_end_undo_group ();
rl_vi_check ();
@@ -713,7 +782,8 @@ _rl_vi_change_mbchar_case (count)
#endif
int
-rl_vi_change_case (int count, int ignore __attribute__((unused)))
+rl_vi_change_case (count, ignore)
+ int count, ignore;
{
int c, p;
@@ -772,6 +842,15 @@ rl_vi_put (count, key)
return (0);
}
+static void
+_rl_vi_backup ()
+{
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ rl_point = _rl_find_prev_mbchar (rl_line_buffer, rl_point, MB_FIND_NONZERO);
+ else
+ rl_point--;
+}
+
int
rl_vi_check ()
{
@@ -816,7 +895,9 @@ rl_vi_domove (key, nextkey)
save = rl_numeric_arg;
rl_numeric_arg = _rl_digit_value (c);
rl_explicit_arg = 1;
+ RL_SETSTATE (RL_STATE_NUMERICARG|RL_STATE_VIMOTION);
rl_digit_loop1 ();
+ RL_UNSETSTATE (RL_STATE_VIMOTION);
rl_numeric_arg *= save;
RL_SETSTATE(RL_STATE_MOREINPUT);
c = rl_read_key (); /* real command */
@@ -889,52 +970,59 @@ rl_vi_domove (key, nextkey)
return (0);
}
+/* Process C as part of the current numeric argument. Return -1 if the
+ argument should be aborted, 0 if we should not read any more chars, and
+ 1 if we should continue to read chars. */
+static int
+_rl_vi_arg_dispatch (c)
+ int c;
+{
+ int key;
+
+ key = c;
+ if (c >= 0 && _rl_keymap[c].type == ISFUNC && _rl_keymap[c].function == rl_universal_argument)
+ {
+ rl_numeric_arg *= 4;
+ return 1;
+ }
+
+ c = UNMETA (c);
+
+ if (_rl_digit_p (c))
+ {
+ if (rl_explicit_arg)
+ rl_numeric_arg = (rl_numeric_arg * 10) + _rl_digit_value (c);
+ else
+ rl_numeric_arg = _rl_digit_value (c);
+ rl_explicit_arg = 1;
+ return 1;
+ }
+ else
+ {
+ rl_clear_message ();
+ rl_stuff_char (key);
+ return 0;
+ }
+}
+
/* A simplified loop for vi. Don't dispatch key at end.
Don't recognize minus sign?
Should this do rl_save_prompt/rl_restore_prompt? */
static int
rl_digit_loop1 ()
{
- int key, c;
+ int c, r;
- RL_SETSTATE(RL_STATE_NUMERICARG);
while (1)
{
- if (rl_numeric_arg > 1000000)
- {
- rl_explicit_arg = rl_numeric_arg = 0;
- rl_ding ();
- rl_clear_message ();
- RL_UNSETSTATE(RL_STATE_NUMERICARG);
- return 1;
- }
- rl_message ("(arg: %d) ", rl_arg_sign * rl_numeric_arg);
- RL_SETSTATE(RL_STATE_MOREINPUT);
- key = c = rl_read_key ();
- RL_UNSETSTATE(RL_STATE_MOREINPUT);
+ if (_rl_arg_overflow ())
+ return 1;
- if (c >= 0 && _rl_keymap[c].type == ISFUNC &&
- _rl_keymap[c].function == rl_universal_argument)
- {
- rl_numeric_arg *= 4;
- continue;
- }
+ c = _rl_arg_getchar ();
- c = UNMETA (c);
- if (_rl_digit_p (c))
- {
- if (rl_explicit_arg)
- rl_numeric_arg = (rl_numeric_arg * 10) + _rl_digit_value (c);
- else
- rl_numeric_arg = _rl_digit_value (c);
- rl_explicit_arg = 1;
- }
- else
- {
- rl_clear_message ();
- rl_stuff_char (key);
- break;
- }
+ r = _rl_vi_arg_dispatch (c);
+ if (r <= 0)
+ break;
}
RL_UNSETSTATE(RL_STATE_NUMERICARG);
@@ -942,7 +1030,8 @@ rl_digit_loop1 ()
}
int
-rl_vi_delete_to (int count __attribute__((unused)), int key)
+rl_vi_delete_to (count, key)
+ int count, key;
{
int c;
@@ -967,7 +1056,8 @@ rl_vi_delete_to (int count __attribute__((unused)), int key)
}
int
-rl_vi_change_to (int count __attribute__((unused)), int key)
+rl_vi_change_to (count, key)
+ int count, key;
{
int c, start_pos;
@@ -1019,10 +1109,12 @@ rl_vi_change_to (int count __attribute__((unused)), int key)
}
int
-rl_vi_yank_to (int count __attribute__((unused)), int key)
+rl_vi_yank_to (count, key)
+ int count, key;
{
- int c, save = rl_point;
+ int c, save;
+ save = rl_point;
if (_rl_uppercase_p (key))
rl_stuff_char ('$');
@@ -1047,11 +1139,45 @@ rl_vi_yank_to (int count __attribute__((unused)), int key)
}
int
+rl_vi_rubout (count, key)
+ int count, key;
+{
+ int opoint;
+
+ if (count < 0)
+ return (rl_vi_delete (-count, key));
+
+ if (rl_point == 0)
+ {
+ rl_ding ();
+ return -1;
+ }
+
+ opoint = rl_point;
+ if (count > 1 && MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ rl_backward_char (count, key);
+ else if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ rl_point = _rl_find_prev_mbchar (rl_line_buffer, rl_point, MB_FIND_NONZERO);
+ else
+ rl_point -= count;
+
+ if (rl_point < 0)
+ rl_point = 0;
+
+ rl_kill_text (rl_point, opoint);
+
+ return (0);
+}
+
+int
rl_vi_delete (count, key)
int count, key;
{
int end;
+ if (count < 0)
+ return (rl_vi_rubout (-count, key));
+
if (rl_end == 0)
{
rl_ding ();
@@ -1070,11 +1196,13 @@ rl_vi_delete (count, key)
if (rl_point > 0 && rl_point == rl_end)
rl_backward_char (1, key);
+
return (0);
}
int
-rl_vi_back_to_indent (int count __attribute__((unused)), int key)
+rl_vi_back_to_indent (count, key)
+ int count, key;
{
rl_beg_of_line (1, key);
while (rl_point < rl_end && whitespace (rl_line_buffer[rl_point]))
@@ -1083,75 +1211,115 @@ rl_vi_back_to_indent (int count __attribute__((unused)), int key)
}
int
-rl_vi_first_print (int count __attribute__((unused)), int key)
+rl_vi_first_print (count, key)
+ int count, key;
{
return (rl_vi_back_to_indent (1, key));
}
+static int _rl_cs_dir, _rl_cs_orig_dir;
+
+#if defined (READLINE_CALLBACKS)
+static int
+_rl_vi_callback_char_search (data)
+ _rl_callback_generic_arg *data;
+{
+#if defined (HANDLE_MULTIBYTE)
+ _rl_vi_last_search_mblen = _rl_read_mbchar (_rl_vi_last_search_mbchar, MB_LEN_MAX);
+#else
+ RL_SETSTATE(RL_STATE_MOREINPUT);
+ _rl_vi_last_search_char = rl_read_key ();
+ RL_UNSETSTATE(RL_STATE_MOREINPUT);
+#endif
+
+ _rl_callback_func = 0;
+ _rl_want_redisplay = 1;
+
+#if defined (HANDLE_MULTIBYTE)
+ return (_rl_char_search_internal (data->count, _rl_cs_dir, _rl_vi_last_search_mbchar, _rl_vi_last_search_mblen));
+#else
+ return (_rl_char_search_internal (data->count, _rl_cs_dir, _rl_vi_last_search_char));
+#endif
+}
+#endif
+
int
rl_vi_char_search (count, key)
int count, key;
{
#if defined (HANDLE_MULTIBYTE)
static char *target;
- static int mb_len;
+ static int tlen;
#else
static char target;
#endif
- static int orig_dir, dir;
if (key == ';' || key == ',')
- dir = key == ';' ? orig_dir : -orig_dir;
+ _rl_cs_dir = (key == ';') ? _rl_cs_orig_dir : -_rl_cs_orig_dir;
else
{
- if (vi_redoing)
-#if defined (HANDLE_MULTIBYTE)
- target = _rl_vi_last_search_mbchar;
-#else
- target = _rl_vi_last_search_char;
-#endif
- else
- {
-#if defined (HANDLE_MULTIBYTE)
- mb_len = _rl_read_mbchar (_rl_vi_last_search_mbchar, MB_LEN_MAX);
- target = _rl_vi_last_search_mbchar;
-#else
- RL_SETSTATE(RL_STATE_MOREINPUT);
- _rl_vi_last_search_char = target = rl_read_key ();
- RL_UNSETSTATE(RL_STATE_MOREINPUT);
-#endif
- }
-
switch (key)
{
case 't':
- orig_dir = dir = FTO;
+ _rl_cs_orig_dir = _rl_cs_dir = FTO;
break;
case 'T':
- orig_dir = dir = BTO;
+ _rl_cs_orig_dir = _rl_cs_dir = BTO;
break;
case 'f':
- orig_dir = dir = FFIND;
+ _rl_cs_orig_dir = _rl_cs_dir = FFIND;
break;
case 'F':
- orig_dir = dir = BFIND;
+ _rl_cs_orig_dir = _rl_cs_dir = BFIND;
break;
}
+
+ if (vi_redoing)
+ {
+ /* set target and tlen below */
+ }
+#if defined (READLINE_CALLBACKS)
+ else if (RL_ISSTATE (RL_STATE_CALLBACK))
+ {
+ _rl_callback_data = _rl_callback_data_alloc (count);
+ _rl_callback_data->i1 = _rl_cs_dir;
+ _rl_callback_func = _rl_vi_callback_char_search;
+ return (0);
+ }
+#endif
+ else
+ {
+#if defined (HANDLE_MULTIBYTE)
+ _rl_vi_last_search_mblen = _rl_read_mbchar (_rl_vi_last_search_mbchar, MB_LEN_MAX);
+#else
+ RL_SETSTATE(RL_STATE_MOREINPUT);
+ _rl_vi_last_search_char = rl_read_key ();
+ RL_UNSETSTATE(RL_STATE_MOREINPUT);
+#endif
+ }
}
#if defined (HANDLE_MULTIBYTE)
- return (_rl_char_search_internal (count, dir, target, mb_len));
+ target = _rl_vi_last_search_mbchar;
+ tlen = _rl_vi_last_search_mblen;
+#else
+ target = _rl_vi_last_search_char;
+#endif
+
+#if defined (HANDLE_MULTIBYTE)
+ return (_rl_char_search_internal (count, _rl_cs_dir, target, tlen));
#else
- return (_rl_char_search_internal (count, dir, target));
+ return (_rl_char_search_internal (count, _rl_cs_dir, target));
#endif
}
/* Match brackets */
int
-rl_vi_match (int ignore __attribute__((unused)), int key)
+rl_vi_match (ignore, key)
+ int ignore, key;
{
int count = 1, brack, pos, tmp, pre;
@@ -1255,24 +1423,12 @@ rl_vi_bracktype (c)
}
}
-/* XXX - think about reading an entire mbchar with _rl_read_mbchar and
- inserting it in one bunch instead of the loop below (like in
- rl_vi_char_search or _rl_vi_change_mbchar_case). Set c to mbchar[0]
- for test against 033 or ^C. Make sure that _rl_read_mbchar does
- this right. */
-int
-rl_vi_change_char (int count, int key __attribute__((unused)))
+static int
+_rl_vi_change_char (count, c, mb)
+ int count, c;
+ char *mb;
{
- int c, p;
-
- if (vi_redoing)
- c = _rl_vi_last_replacement;
- else
- {
- RL_SETSTATE(RL_STATE_MOREINPUT);
- _rl_vi_last_replacement = c = rl_read_key ();
- RL_UNSETSTATE(RL_STATE_MOREINPUT);
- }
+ int p;
if (c == '\033' || c == CTRL ('C'))
return -1;
@@ -1282,27 +1438,87 @@ rl_vi_change_char (int count, int key __attribute__((unused)))
{
p = rl_point;
rl_vi_delete (1, c);
+ if (rl_point < p) /* Did we retreat at EOL? */
+ rl_point++;
#if defined (HANDLE_MULTIBYTE)
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- while (_rl_insert_char (1, c))
- {
- RL_SETSTATE (RL_STATE_MOREINPUT);
- c = rl_read_key ();
- RL_UNSETSTATE (RL_STATE_MOREINPUT);
- }
+ rl_insert_text (mb);
else
#endif
- {
- if (rl_point < p) /* Did we retreat at EOL? */
- rl_point++;
- _rl_insert_char (1, c);
- }
+ _rl_insert_char (1, c);
}
+
+ /* The cursor shall be left on the last character changed. */
+ rl_backward_char (1, c);
+
rl_end_undo_group ();
return (0);
}
+static int
+_rl_vi_callback_getchar (mb, mlen)
+ char *mb;
+ int mlen;
+{
+ int c;
+
+ RL_SETSTATE(RL_STATE_MOREINPUT);
+ c = rl_read_key ();
+ RL_UNSETSTATE(RL_STATE_MOREINPUT);
+
+#if defined (HANDLE_MULTIBYTE)
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ c = _rl_read_mbstring (c, mb, mlen);
+#endif
+
+ return c;
+}
+
+#if defined (READLINE_CALLBACKS)
+static int
+_rl_vi_callback_change_char (data)
+ _rl_callback_generic_arg *data;
+{
+ int c;
+ char mb[MB_LEN_MAX];
+
+ _rl_vi_last_replacement = c = _rl_vi_callback_getchar (mb, MB_LEN_MAX);
+
+ _rl_callback_func = 0;
+ _rl_want_redisplay = 1;
+
+ return (_rl_vi_change_char (data->count, c, mb));
+}
+#endif
+
+int
+rl_vi_change_char (count, key)
+ int count, key;
+{
+ int c;
+ char mb[MB_LEN_MAX];
+
+ if (vi_redoing)
+ {
+ c = _rl_vi_last_replacement;
+ mb[0] = c;
+ mb[1] = '\0';
+ }
+#if defined (READLINE_CALLBACKS)
+ else if (RL_ISSTATE (RL_STATE_CALLBACK))
+ {
+ _rl_callback_data = _rl_callback_data_alloc (count);
+ _rl_callback_func = _rl_vi_callback_change_char;
+ return (0);
+ }
+#endif
+ else
+ _rl_vi_last_replacement = c = _rl_vi_callback_getchar (mb, MB_LEN_MAX);
+
+ return (_rl_vi_change_char (count, c, mb));
+}
+
int
rl_vi_subst (count, key)
int count, key;
@@ -1365,7 +1581,8 @@ rl_vi_overstrike_delete (count, key)
}
int
-rl_vi_replace (int count __attribute__((unused)), int key __attribute__((unused)))
+rl_vi_replace (count, key)
+ int count, key;
{
int i;
@@ -1424,8 +1641,8 @@ rl_vi_possible_completions()
#endif
/* Functions to save and restore marks. */
-int
-rl_vi_set_mark (int count __attribute__((unused)), int key __attribute__((unused)))
+static int
+_rl_vi_set_mark ()
{
int ch;
@@ -1443,8 +1660,36 @@ rl_vi_set_mark (int count __attribute__((unused)), int key __attribute__((unused
return 0;
}
+#if defined (READLINE_CALLBACKS)
+static int
+_rl_vi_callback_set_mark (data)
+ _rl_callback_generic_arg *data;
+{
+ _rl_callback_func = 0;
+ _rl_want_redisplay = 1;
+
+ return (_rl_vi_set_mark ());
+}
+#endif
+
int
-rl_vi_goto_mark (int count __attribute__((unused)), int key __attribute__((unused)))
+rl_vi_set_mark (count, key)
+ int count, key;
+{
+#if defined (READLINE_CALLBACKS)
+ if (RL_ISSTATE (RL_STATE_CALLBACK))
+ {
+ _rl_callback_data = 0;
+ _rl_callback_func = _rl_vi_callback_set_mark;
+ return (0);
+ }
+#endif
+
+ return (_rl_vi_set_mark ());
+}
+
+static int
+_rl_vi_goto_mark ()
{
int ch;
@@ -1473,4 +1718,31 @@ rl_vi_goto_mark (int count __attribute__((unused)), int key __attribute__((unuse
return 0;
}
+#if defined (READLINE_CALLBACKS)
+static int
+_rl_vi_callback_goto_mark (data)
+ _rl_callback_generic_arg *data;
+{
+ _rl_callback_func = 0;
+ _rl_want_redisplay = 1;
+
+ return (_rl_vi_goto_mark ());
+}
+#endif
+
+int
+rl_vi_goto_mark (count, key)
+ int count, key;
+{
+#if defined (READLINE_CALLBACKS)
+ if (RL_ISSTATE (RL_STATE_CALLBACK))
+ {
+ _rl_callback_data = 0;
+ _rl_callback_func = _rl_vi_callback_goto_mark;
+ return (0);
+ }
+#endif
+
+ return (_rl_vi_goto_mark ());
+}
#endif /* VI_MODE */
diff --git a/cmd-line-utils/readline/xmalloc.c b/cmd-line-utils/readline/xmalloc.c
index 497936d3b43..8985d340d39 100644
--- a/cmd-line-utils/readline/xmalloc.c
+++ b/cmd-line-utils/readline/xmalloc.c
@@ -20,7 +20,9 @@
Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#define READLINE_LIBRARY
-#include "config_readline.h"
+#if defined (HAVE_CONFIG_H)
+#include <config.h>
+#endif
#include <stdio.h>
@@ -39,7 +41,8 @@
/* **************************************************************** */
static void
-memory_error_and_abort(const char *fname)
+memory_error_and_abort (fname)
+ char *fname;
{
fprintf (stderr, "%s: out of virtual memory\n", fname);
exit (2);
@@ -56,7 +59,7 @@ xmalloc (bytes)
temp = malloc (bytes);
if (temp == 0)
- memory_error_and_abort("xmalloc");
+ memory_error_and_abort ("xmalloc");
return (temp);
}
@@ -70,7 +73,7 @@ xrealloc (pointer, bytes)
temp = pointer ? realloc (pointer, bytes) : malloc (bytes);
if (temp == 0)
- memory_error_and_abort("xrealloc");
+ memory_error_and_abort ("xrealloc");
return (temp);
}
diff --git a/config/ac-macros/large_file.m4 b/config/ac-macros/large_file.m4
index 2639cec5fb7..279ce6d60f1 100644
--- a/config/ac-macros/large_file.m4
+++ b/config/ac-macros/large_file.m4
@@ -128,8 +128,15 @@ AC_DEFUN([MYSQL_SYS_LARGEFILE],
ac_cv_sys_largefile_source=1 ;;
esac])
- # AIX 4.2 and later -- do nothing, include standards.h instead.
- # this goes for both GNU and IBM C and C++ compilers.
+ AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES,
+ ac_cv_sys_large_files,
+ [Large files support on AIX-style hosts.],
+ [case "$host_os" in
+ # Large file support on AIX is available starting from version 4.2
+ # Tested only on 5.2 and up
+ aix4.[2-9]* | aix4.1[0-9]* | aix[5-9].* | aix[1-9][0-9]*)
+ ac_cv_sys_large_files=1 ;;
+ esac])
fi
])
diff --git a/config/ac-macros/plugins.m4 b/config/ac-macros/plugins.m4
index 48754563992..8dfb698709f 100644
--- a/config/ac-macros/plugins.m4
+++ b/config/ac-macros/plugins.m4
@@ -360,6 +360,17 @@ AC_DEFUN([__MYSQL_EMIT_CHECK_PLUGIN],[
AC_MSG_ERROR([cannot disable mandatory plugin])
fi
[mysql_plugin_]$2=yes
+ ],[
+ case "$with_mysqld_ldflags " in
+ *"-all-static "*)
+ # No need to build shared plugins when mysqld is linked with
+ # -all-static as it won't be able to load them.
+ if test "X[$mysql_plugin_]$2" != Xyes -a \
+ "X[$with_plugin_]$2" != Xyes; then
+ [with_plugin_]$2=no
+ fi
+ ;;
+ esac
])
if test "X[$with_plugin_]$2" = Xno; then
AC_MSG_RESULT([no])
diff --git a/configure.in b/configure.in
index 12490201d00..5d65bec75c0 100644
--- a/configure.in
+++ b/configure.in
@@ -10,7 +10,7 @@ AC_CANONICAL_SYSTEM
#
# When changing major version number please also check switch statement
# in mysqlbinlog::check_master_version().
-AM_INIT_AUTOMAKE(mysql, 5.1.23-beta)
+AM_INIT_AUTOMAKE(mysql, 5.1.23-rc)
AM_CONFIG_HEADER([include/config.h:config.h.in])
PROTOCOL_VERSION=10
@@ -20,6 +20,7 @@ SHARED_LIB_MAJOR_VERSION=16
SHARED_LIB_VERSION=$SHARED_LIB_MAJOR_VERSION:0:0
NDB_SHARED_LIB_MAJOR_VERSION=3
NDB_SHARED_LIB_VERSION=$NDB_SHARED_LIB_MAJOR_VERSION:0:0
+
# Set all version vars based on $VERSION. How do we do this more elegant ?
# Remember that regexps needs to quote [ and ] since this is run through m4
MYSQL_NO_DASH_VERSION=`echo $VERSION | sed -e "s|[[a-z]]*-.*$||"`
@@ -95,6 +96,8 @@ case $MACHINE_TYPE in
esac
# Save some variables and the command line options for mysqlbug
+SAVE_CC="$CC"
+SAVE_CXX="$CXX"
SAVE_ASFLAGS="$ASFLAGS"
SAVE_CFLAGS="$CFLAGS"
SAVE_CXXFLAGS="$CXXFLAGS"
@@ -102,6 +105,8 @@ SAVE_LDFLAGS="$LDFLAGS"
SAVE_CXXLDFLAGS="$CXXLDFLAGS"
CONF_COMMAND="$0 $ac_configure_args"
AC_SUBST(CONF_COMMAND)
+AC_SUBST(SAVE_CC)
+AC_SUBST(SAVE_CXX)
AC_SUBST(SAVE_ASFLAGS)
AC_SUBST(SAVE_CFLAGS)
AC_SUBST(SAVE_CXXFLAGS)
@@ -340,6 +345,7 @@ AC_SUBST(CC)
AC_SUBST(CFLAGS)
AC_SUBST(CXX)
AC_SUBST(CXXFLAGS)
+AC_SUBST(ASFLAGS)
AC_SUBST(LD)
AC_SUBST(INSTALL_SCRIPT)
@@ -589,7 +595,7 @@ AC_SUBST(NOINST_LDFLAGS)
if test "$TARGET_LINUX" = "true" -a "$static_nss" = ""
then
- tmp=`nm /usr/lib/libc.a | grep _nss_files_getaliasent_r`
+ tmp=`nm /usr/lib*/libc.a | grep _nss_files_getaliasent_r`
if test -n "$tmp"
then
STATIC_NSS_FLAGS="-lc -lnss_files -lnss_dns -lresolv"
@@ -676,7 +682,34 @@ AC_ARG_WITH(tcp-port,
[ --with-tcp-port=port-number
Which port to use for MySQL services (default 3306)],
[ MYSQL_TCP_PORT=$withval ],
- [ MYSQL_TCP_PORT=$MYSQL_TCP_PORT_DEFAULT ]
+ [ MYSQL_TCP_PORT=$MYSQL_TCP_PORT_DEFAULT
+ # if we actually defaulted (as opposed to the pathological case of
+ # --with-tcp-port=<MYSQL_TCP_PORT_DEFAULT> which might in theory
+ # happen if whole batch of servers was built from a script), set
+ # the default to zero to indicate that; we don't lose information
+ # that way, because 0 obviously indicates that we can get the
+ # default value from MYSQL_TCP_PORT. this seems really evil, but
+ # testing for MYSQL_TCP_PORT==MYSQL_TCP_PORT_DEFAULT would make a
+ # a port of MYSQL_TCP_PORT_DEFAULT magic even if the builder did not
+ # intend it to mean "use the default, in fact, look up a good default
+ # from /etc/services if you can", but really, really meant 3306 when
+ # they passed in 3306. When they pass in a specific value, let them
+ # have it; don't second guess user and think we know better, this will
+ # just make people cross. this makes the the logic work like this
+ # (which is complicated enough):
+ #
+ # - if a port was set during build, use that as a default.
+ #
+ # - otherwise, try to look up a port in /etc/services; if that fails,
+ # use MYSQL_TCP_PORT_DEFAULT (at the time of this writing 3306)
+ #
+ # - allow the MYSQL_TCP_PORT environment variable to override that.
+ #
+ # - allow command-line parameters to override all of the above.
+ #
+ # the top-most MYSQL_TCP_PORT_DEFAULT is read from win/configure.js,
+ # so don't mess with that.
+ MYSQL_TCP_PORT_DEFAULT=0 ]
)
AC_SUBST(MYSQL_TCP_PORT)
# We might want to document the assigned port in the manual.
@@ -757,7 +790,6 @@ AC_CHECK_LIB(m, floor, [], AC_CHECK_LIB(m, __infinity))
AC_CHECK_LIB(nsl_r, gethostbyname_r, [],
AC_CHECK_LIB(nsl, gethostbyname_r))
AC_CHECK_FUNC(gethostbyname_r)
-AC_CHECK_LIB(mtmalloc, malloc)
AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
AC_CHECK_FUNC(yp_get_default_domain, ,
@@ -1718,7 +1750,18 @@ then
LDFLAGS="$LDFLAGS -rdynamic"
AC_MSG_RESULT("-rdynamic")
else
- AC_MSG_RESULT("none")
+ case "$SYSTEM_TYPE$with_mysqld_ldflags " in
+ *freebsd*"-all-static "*|*dragonfly*"-all-static "*)
+ AC_MSG_RESULT("none")
+ ;;
+ *freebsd*|*dragonfly*)
+ MYSQLD_EXTRA_LDFLAGS="$MYSQLD_EXTRA_LDFLAGS -export-dynamic"
+ AC_MSG_RESULT("-export-dynamic")
+ ;;
+ *)
+ AC_MSG_RESULT("none")
+ ;;
+ esac
fi
dnl Checks for typedefs, structures, and compiler characteristics.
@@ -2347,10 +2390,15 @@ AC_ARG_WITH(docs,
if test "$with_docs" = "yes"
then
docs_dirs="Docs"
+ if test -f "$srcdir/Docs/manual.chm" ; then
+ extra_docs="manual.chm"
+ fi
else
docs_dirs=""
+ extra_docs=""
fi
AC_SUBST(docs_dirs)
+AC_SUBST(extra_docs)
# Shall we build the man pages?
AC_ARG_WITH(man,
@@ -2647,7 +2695,6 @@ AC_CONFIG_FILES(Makefile extra/Makefile mysys/Makefile dnl
cmd-line-utils/Makefile cmd-line-utils/libedit/Makefile dnl
libmysqld/Makefile libmysqld/examples/Makefile dnl
mysql-test/Makefile dnl
- debian/Makefile debian/defs.mk debian/control dnl
mysql-test/ndb/Makefile netware/Makefile sql-bench/Makefile dnl
include/mysql_version.h plugin/Makefile win/Makefile)
diff --git a/dbug/dbug.c b/dbug/dbug.c
index 7bb7396ad5b..4ddf785b27c 100644
--- a/dbug/dbug.c
+++ b/dbug/dbug.c
@@ -1828,7 +1828,13 @@ static void DBUGOpenFile(CODE_STATE *cs,
else
{
newfile= !EXISTS(name);
- if (!(fp= fopen(name, append ? "a+" : "w")))
+ if (!(fp= fopen(name,
+#if defined(MSDOS) || defined(__WIN__)
+ append ? "a+c" : "wc"
+#else
+ append ? "a+" : "w"
+#endif
+ )))
{
(void) fprintf(stderr, ERR_OPEN, cs->process, name);
perror("");
@@ -2233,23 +2239,9 @@ static void dbug_flush(CODE_STATE *cs)
if (cs->stack->flags & FLUSH_ON_WRITE)
#endif
{
-#if defined(MSDOS) || defined(__WIN__)
- if (cs->stack->out_file != stdout && cs->stack->out_file != stderr)
- {
- if (!(freopen(cs->stack->name,"a",cs->stack->out_file)))
- {
- (void) fprintf(stderr, ERR_OPEN, cs->process, cs->stack->name);
- fflush(stderr);
- cs->stack->out_file= stderr;
- }
- }
- else
-#endif
- {
- (void) fflush(cs->stack->out_file);
- if (cs->stack->delay)
- (void) Delay(cs->stack->delay);
- }
+ (void) fflush(cs->stack->out_file);
+ if (cs->stack->delay)
+ (void) Delay(cs->stack->delay);
}
if (!cs->locked)
pthread_mutex_unlock(&THR_LOCK_dbug);
diff --git a/debian/Makefile.am b/debian/Makefile.am
deleted file mode 100644
index 14035865371..00000000000
--- a/debian/Makefile.am
+++ /dev/null
@@ -1,118 +0,0 @@
-# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-## Process this file with automake to create Makefile.in
-EXTRA_DIST = \
- mysql-test-BASE.files.in \
- libndbclientNLIB-dev.files.in \
- mysql-server-BASE.config.in \
- libndbclientNLIB.README.Debian.in \
- mysql-server-BASE.postrm.in \
- mysql-server-BASE.NEWS.in \
- libndbclientNLIB.postinst.in \
- mysql-server-BASE.links.in \
- libndbclientNLIB.files.in \
- source.lintian-overrides.in \
- mysql-server-BASE.docs.in \
- libmysqlclientSLIBoff.files.in \
- mysql-server-BASE.files.in \
- libndbclientNLIB-dev.links.in \
- libmysqlclientSLIBoff.postinst.in \
- mysql-extra-BASE.dirs.in \
- libmysqlclientSLIB-dev.links.in \
- mysql-server-BASE.dirs.in \
- libmysqlclientSLIB-dev.examples.in \
- mysql-client-BASE.lintian-overrides.in \
- copyright.more \
- libndbclientNLIB-dev.dirs.in \
- mysql-server-BASE.README.Debian.in \
- libmysqlclientSLIBoff.docs.in \
- compat \
- mysql-test-BASE.dirs.in \
- libmysqlclientSLIB-dev.files.in \
- libmysqlclientSLIBoff.dirs.in \
- mysql-server-BASE.logcheck.ignore.server.in \
- mysql-storage-BASE.mysql-storage.init.in \
- libmysqlclientSLIBoff.README.Debian.in \
- mysql-client-BASE.README.Debian.in \
- Makefile.am \
- mysql-server-BASE.prerm.in \
- mysql-common.dirs.in \
- defs.mk \
- defs.mk.in \
- mysql-server-BASE.mysql-server.logrotate.in \
- mysql-common.README.Debian.in \
- copyright \
- mysql-storage-BASE.dirs.in \
- mysql-common.preinst.in \
- mysql-client-BASE.files.in \
- mysql-server-BASE.templates.in \
- mysql-tools-BASE.dirs.in \
- mysql-management-BASE.mysql-management.init.in \
- watch \
- mysql-common.postrm.in \
- mysql-server-BASE.preinst.in \
- README.Maintainer \
- mysql-tools-BASE.files.in \
- mysql-client-BASE.NEWS.in \
- mysql-server-BASE.lintian-overrides.in \
- changelog \
- mysql-server-BASE.logcheck.ignore.paranoid.in \
- mysql-common.files.in \
- mysql-server-BASE.logcheck.ignore.workstation.in \
- mysql-extra-BASE.files.in \
- mysql-management-BASE.files.in \
- mysql-client-BASE.docs.in \
- libmysqlclientSLIB-dev.README.Maintainer.in \
- mysql-storage-BASE.files.in \
- additions \
- additions/ndb_mgmd.cnf \
- additions/mysql-server.lintian-overrides \
- additions/my.cnf \
- mysql-server-BASE.postinst.in \
- libndbclientNLIB.dirs.in \
- po \
- po/fr.po \
- po/sv.po \
- po/da.po \
- po/es.po \
- po/ja.po \
- po/tr.po \
- po/nb.po \
- po/POTFILES.in.in \
- po/cs.po \
- po/pt.po \
- po/gl.po \
- po/pt_BR.po \
- po/nl.po \
- po/templates.pot \
- po/de.po \
- po/eu.po \
- po/ro.po \
- po/ru.po \
- po/it.po \
- po/ca.po \
- mysql-client-BASE.dirs.in \
- control.in \
- libmysqlclientSLIB-dev.dirs.in \
- mysql-server-PREV.preinst.in \
- mysql-server.preinst.in \
- mysql-management-BASE.dirs.in \
- rules \
- libmysqlclientSLIB-dev.docs.in
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
-
diff --git a/debian/README.Maintainer b/debian/README.Maintainer
deleted file mode 100644
index 80b484d7a6c..00000000000
--- a/debian/README.Maintainer
+++ /dev/null
@@ -1,99 +0,0 @@
-###########################################################################
-# Here are some information that are only of interest to the Debiani #
-# maintainers of MySQL. #
-###########################################################################
-
-#
-# Remarks to dependencies
-#
-libwrap0-dev (>= 7.6-8.3)
- According to bug report 114582 where where build problems on
- IA-64/sid with at least two prior versions.
-psmisc
- /usr/bin/killall in the initscript
-
-zlib1g in libmysqlclient-dev:
- "mysql_config --libs" adds "-lz"
-
-Build-Dep:
-
-debhelper (>=4.1.16):
- See po-debconf(7).
-
-autoconf (>= 2.13-20), automake1.7
- Try to get rid of them.
-
-doxygen, tetex-bin, tetex-extra, gs
- for ndb/docs/*tex
-
-mysql-server-5.0: Pre-Depends: mysql-common
- This was necessary as mysql-server-5.0.preinst checks for unmodified
- conffiles from mysql-server-4.1 and copies 5.0 ones over them to avoid
- unnecessary dpkg questions. As mysql-server-5.0 is not unpacked at its
- pre-inst stage, it had to copy those files from a package that is
- definetly already unpacked which does not have to be the case with Depends.
-
-#
-# Remarks to the start scripts
-#
-
-## initscripts rely on mysqladmin from a different package
-We have the problem that "/etc/init.d/mysql stop" relies on mysqladmin which
-is in another package (mysql-client) and a passwordless access that's maybe
-only available if the user configured his /root/.my.cnf. Can this be a problem?
-* normal mode: not because the user is required to have it. Else:
-* purge/remove: not, same as normal mode
-* upgrade: not, same as normal mode
-* first install: not, it depends on mysql-client which at least is unpacked
- so mysqladmin is there (to ping). It is not yet configured
- passwordles but if there's a server running then there's a
- /root/.my.cnf. Anyways, we simply kill anything that's mysqld.
-
-## Passwordless access for the maintainer scripts
-Another issue is that the scripts needs passwordless access. To ensure this
-a debian-sys-maint user is configured which has process and shutdown privs.
-The file with the randomly (that's important!) generated password must be
-present as long as the databases remain installed because else a new install
-would have no access. This file should be used like:
- mysqladmin --defaults-file=/etc/mysql/debian.cnf restart
-to avoid providing the password in plaintext on a commandline where it would
-be visible to any user via the "ps" command.
-
-## When to start the daemon?
-We aim to give the admin full control on when MySQL is running.
-Issues to be faced here:
-OLD:
- 1. Debconf asks whether MySQL should be started on boot so update-rc.d is
- only run if the answer has been yes. The admin is likely to forget
- this decision but update-rc.d checks for an existing line in
- /etc/runlevel.conf and leaves it intact.
- 2. On initial install, if the answer is yes, the daemon has to be started.
- 3. On upgrades it should only be started if it was already running, everything
- else is confusing. Especiall relying on an debconf decision made month ago
- is considered suboptimal. See bug #274264
- Implementation so far:
- prerm (called on upgrade before stopping the server):
- check for a running server and set flag if necessary
- preinst (called on initial install and before unpacking when upgrading):
- check for the debconf variable and set flag if necessary
- postinst (called on initial install and after each upgrade after unpacking):
- call update-rc.d if debconf says yes
- call invoce-rc.d if the flag has been set
- Problems remaining:
- dpkg-reconfigure and setting mysql start on boot to yes did not start mysql
- (ok "start on boot" literally does not mean "start now" so that might have been ok)
-NEW:
- 1. --- no debconf anymore for the sake of simplicity. We have runlevel.conf,
- the admin should use it
- 2. On initial install the server is started.
- 3. On upgrades the server is started exactly if it was running before so the
- runlevel configuration is irrelevant. It will be preserved by the mean of
- update-rc.d's builtin check.
- Implementation:
- prerm (called on upgrade before stopping the server):
- check for a running server and set flag if necessary
- preinst (called on initial install and before unpacking when upgrading):
- check for $1 beeing (initial) "install" and set flag
- postinst (called on initial install and after each upgrade after unpacking):
- call update-rc.d
- call invoce-rc.d if the flag has been set
diff --git a/debian/additions/my.cnf b/debian/additions/my.cnf
deleted file mode 100644
index a569c041401..00000000000
--- a/debian/additions/my.cnf
+++ /dev/null
@@ -1,134 +0,0 @@
-#
-# The MySQL database server configuration file.
-#
-# You can copy this to one of:
-# - "/etc/mysql/my.cnf" to set global options,
-# - "~/.my.cnf" to set user-specific options.
-#
-# One can use all long options that the program supports.
-# Run program with --help to get a list of available options and with
-# --print-defaults to see which it would actually understand and use.
-#
-# For explanations see
-# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
-
-# This will be passed to all mysql clients
-# It has been reported that passwords should be enclosed with ticks/quotes
-# escpecially if they contain "#" chars...
-# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
-[client]
-port = 3306
-socket = /var/run/mysqld/mysqld.sock
-
-# Here is entries for some specific programs
-# The following values assume you have at least 32M ram
-
-# This was formally known as [safe_mysqld]. Both versions are currently parsed.
-[mysqld_safe]
-socket = /var/run/mysqld/mysqld.sock
-nice = 0
-
-[mysqld]
-#
-# * Basic Settings
-#
-user = mysql
-pid-file = /var/run/mysqld/mysqld.pid
-socket = /var/run/mysqld/mysqld.sock
-port = 3306
-basedir = /usr
-datadir = /var/lib/mysql
-tmpdir = /tmp
-language = /usr/share/mysql/english
-skip-external-locking
-#
-# Instead of skip-networking the default is now to listen only on
-# localhost which is more compatible and is not less secure.
-bind-address = 127.0.0.1
-#
-# * Fine Tuning
-#
-key_buffer = 16M
-max_allowed_packet = 16M
-thread_stack = 128K
-thread_cache_size = 8
-#
-# * Query Cache Configuration
-#
-query_cache_limit = 1048576
-query_cache_size = 16777216
-query_cache_type = 1
-#
-# * Logging and Replication
-#
-# Both location gets rotated by the cronjob.
-# Be aware that this log type is a performance killer.
-#log = /var/log/mysql/mysql.log
-#
-# Error logging goes to syslog. This is a Debian improvement :)
-#
-# Here you can see queries with especially long duration
-#log_slow_queries = /var/log/mysql/mysql-slow.log
-#
-# The following can be used as easy to replay backup logs or for replication.
-#server-id = 1
-log_bin = /var/log/mysql/mysql-bin.log
-# WARNING: Using expire_logs_days without bin_log crashes the server! See README.Debian!
-expire_logs_days = 10
-max_binlog_size = 100M
-#binlog_do_db = include_database_name
-#binlog_ignore_db = include_database_name
-#
-# * BerkeleyDB
-#
-# Using BerkeleyDB is now discouraged as its support will cease in 5.1.12.
-skip-bdb
-#
-# * InnoDB
-#
-# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
-# Read the manual for more InnoDB related options. There are many!
-# You might want to disable InnoDB to shrink the mysqld process by circa 100MB.
-#skip-innodb
-#
-# * Security Features
-#
-# Read the manual, too, if you want chroot!
-# chroot = /var/lib/mysql/
-#
-# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
-#
-# ssl-ca=/etc/mysql/cacert.pem
-# ssl-cert=/etc/mysql/server-cert.pem
-# ssl-key=/etc/mysql/server-key.pem
-
-
-
-[mysqldump]
-quick
-quote-names
-max_allowed_packet = 16M
-
-[mysql]
-#no-auto-rehash # faster start of mysql but no tab completition
-
-[isamchk]
-key_buffer = 16M
-
-#
-# * NDB Cluster
-#
-# See /usr/share/doc/mysql-server-*/README.Debian for more information.
-#
-# The following configuration is read by the NDB Data Nodes (ndbd processes)
-# not from the NDB Management Nodes (ndb_mgmd processes).
-#
-# [MYSQL_CLUSTER]
-# ndb-connectstring=127.0.0.1
-
-
-#
-# * IMPORTANT: Additional settings that can override those from this file!
-#
-!includedir /etc/mysql/conf.d/
-
diff --git a/debian/additions/mysql-server.lintian-overrides b/debian/additions/mysql-server.lintian-overrides
deleted file mode 100644
index 9d741cf16e9..00000000000
--- a/debian/additions/mysql-server.lintian-overrides
+++ /dev/null
@@ -1,2 +0,0 @@
-W: mysql-dfsg source: maintainer-script-lacks-debhelper-token debian/mysql-server.postinst
-W: mysql-server: possible-bashism-in-maintainer-script postinst:68 'p{("a".."z","A".."Z",0..9)[int(rand(62))]}'
diff --git a/debian/additions/ndb_mgmd.cnf b/debian/additions/ndb_mgmd.cnf
deleted file mode 100644
index d94a28ff705..00000000000
--- a/debian/additions/ndb_mgmd.cnf
+++ /dev/null
@@ -1,35 +0,0 @@
-[NDBD DEFAULT]
-NoOfReplicas=2
-DataMemory=10MB
-IndexMemory=25MB
-MaxNoOfTables=256
-MaxNoOfOrderedIndexes=256
-MaxNoOfUniqueHashIndexes=128
-
-[MYSQLD DEFAULT]
-
-[NDB_MGMD DEFAULT]
-
-[TCP DEFAULT]
-
-[NDB_MGMD]
-Id=1 # the NDB Management Node (this one)
-HostName=127.0.0.1
-
-[NDBD]
-Id=2 # the first NDB Data Node
-HostName=127.0.0.1
-DataDir= /var/lib/mysql-cluster
-
-[NDBD]
-Id=3 # the second NDB Data Node
-HostName=127.0.0.1
-DataDir=/var/lib/mysql-cluster
-
-[MYSQLD]
-Id=4 # the first SQL node
-HostName=127.0.0.1
-
-# [MYSQLD]
-# Id=5 # the second SQL node
-# HostName=127.0.0.10
diff --git a/debian/changelog b/debian/changelog
deleted file mode 100644
index 2c1418746cc..00000000000
--- a/debian/changelog
+++ /dev/null
@@ -1,3281 +0,0 @@
-mysql-5.1 (5.1.18) UNRELEASED; urgency=low
-
- * Branched for 5.1.
-
- -- Monty Taylor <mtaylor@mysql.com> Fri, 20 Apr 2007 14:46:51 -0700
-
-mysql-5.0 (5.0.42) UNRELEASED; urgency=low
-
- * Upgraded to 5.0.42 branch.
-
- -- Monty Taylor <mtaylor@mysql.com> Thu, 19 Apr 2007 22:18:02 +0200
-
-mysql-5.0 (5.0.38) UNRELEASED; urgency=low
-
- * Imported packaging work from Debian.
- * Removed debian-start, mysqlreport and echo_stderr to align with official
- packages.
-
- -- Monty Taylor <mtaylor@mysql.com> Wed, 7 Mar 2007 07:52:55 +0800
-
-mysql-dfsg-5.0 (5.0.32-3etch1) testing-proposed-updates; urgency=high
-
- * Backported upstream patch for a bug that crashed the server when using
- certain join/group/limit combinations.
- Users of the Joomla CMS seemed to be affected by this. Closes: #403721
- * The debian-start script that runs on every server start now first upgrades
- the system tables (if neccessary) and then check them as it sometimes did
- not work the other way around (e.g. for MediaWiki). The script now uses
- mysql_update instead of mysql_update_script as recommended. Closes: 409780
- * The old_passwords setting that is set according to a Debconf question is
- now written to /etc/mysql/conf.d/old_passwords.cnf instead directly to the
- conffile /etc/mysql/my.cnf which would be fobidden by policy (thanks to
- Robert Bihlmeyer). Closes: #409750
- * Added bison to build dependencies.
- * Synced Debconf translations with 5.0.32-7.
-
- -- Christian Hammers <ch@debian.org> Sun, 18 Feb 2007 22:33:05 +0100
-
-mysql-dfsg-5.0 (5.0.32-3) unstable; urgency=high
-
- * mysql-server-5.0 pre-depends on adduser now and has --disabled-login
- explicitly added to be on the safe side (thanks to the puiparts team).
- Closes: #408362
- * Corrections the terminology regarding NDB in the comments of all config
- files and init scripts (thanks to Geert Vanderkelen of MySQL).
- * Updated Swedish Debconf translation (thanks to Andreas Henriksson).
- Closes: #407859
- * Updated Czech Debconf translation (thanks to Miroslav Kure).
- Closes: #407809
-
- -- Christian Hammers <ch@debian.org> Thu, 11 Jan 2007 11:18:47 +0100
-
-mysql-dfsg-5.0 (5.0.32-2) unstable; urgency=high
-
- * The last upload suffered from a regression that made NDB totally
- unusable and caused a dependency to libmysqlclient15-dev in the
- mysql-server-5.0 package. The relevant 85_* patch was re-added again.
- Closes: #406435
- * Added lintian-overrides for an error that does not affect our packages.
- There are now only warnings and not errors left.
-
- -- Christian Hammers <ch@debian.org> Tue, 9 Jan 2007 23:55:10 +0100
-
-mysql-dfsg-5.0 (5.0.32-1) unstable; urgency=high
-
- * New upstream version.
- * SECURITY: mysql_fix_privilege_tables.sql altered the
- table_privs.table_priv column to contain too few privileges, causing
- loss of the CREATE VIEW and SHOW VIEW privileges. (MySQL Bug#20589)
- * SECURITY (DoS): ALTER TABLE statements that performed both RENAME TO
- and {ENABLE|DISABLE} KEYS operations caused a server crash. (MySQL
- Bug#24089)
- * SECURITY (DoS): LAST_DAY('0000-00-00') could cause a server crash.
- (MySQL Bug#23653)
- * SECURITY (DoS): Using EXPLAIN caused a server crash for queries that
- selected from INFORMATION_SCHEMA in a subquery in the FROM clause.
- (MySQL Bug#22413)
- * SECURITY (DoS): Invalidating the query cache (e.g. when using stored procedures)
- caused a server crash for INSERT INTO ... SELECT statements that
- selected from a view. (MySQL Bug#20045)
- * Using mysql_upgrade with a password crashed the server. Closes: #406229
- * yaSSL crashed on pre-Pentium Intel and Cyrix CPUs. (MySQL Bug#21765)
- Closes: #383759
- * Lots of small fixes to the NDB cluster storage engine.
- * Updated Japanese Debconf template (thanks to Hideki Yamane).
- Closes: #405793
- * Fixed comment regarding "mycheck" in debian-start (thanks to
- Enrico Zini). Closes: #405787
-
- -- Christian Hammers <ch@debian.org> Sat, 6 Jan 2007 14:26:20 +0100
-
-mysql-dfsg-5.0 (5.0.30-3) unstable; urgency=low
-
- * Updated Brazilian Debconf translation (thanks to Andre Luis Lopes).
- Closes: #403821
- * Added Romanian Debconf translation (thanks to Stan Ioan-Eugen).
- Closes: #403943
- * Updated Spanish Debconf translation (thanks to Javier Fernandez-Sanguino
- Pena). Closes: #404084
- * Updated Galician Debconf translation (thanks to Jacobo Tarrio).
- Closes: #404318
- * Updated Dutch Debconf translation (thanks to Vincent Zweije).
- Closes: #404566
- * Updated Danish Debconf translation (thanks to Claus Hindsgaul).
- Closes: #405018
-
- -- Christian Hammers <ch@debian.org> Thu, 21 Dec 2006 21:35:09 +0100
-
-mysql-dfsg-5.0 (5.0.30-2) unstable; urgency=high
-
- * Fixed upstream regression in header files that lead to FTBFS for
- mysql-admin, mysql-query-browser and probably other pacakges.
- (thanks to Andreas Henriksson). Closes: #403081, #403082
- * Fixed some upstream scripts by replacing /etc by /etc/mysql (thanks to
- Julien Antony). Closes: #401083
- * Updated French Debconf translation (thanks to Christian Perrier).
- Closes: #401434
- * Added Spanish Debconf translation (thanks to Javier Fernandez-Sanguino
- Pena). Closes: #401953
- * Marked a Debconf question that is just a dummy and only internally
- used as not-needing-translation. Closes: #403163
- * Fixed mysqlslowdump patch to not remove the usage() function (thanks
- to Monty Tailor).
-
- -- Christian Hammers <ch@debian.org> Sun, 3 Dec 2006 19:20:10 +0100
-
-mysql-dfsg-5.0 (5.0.30-1) unstable; urgency=low
-
- * New upstream version (switch to the MySQL Enterprise branch).
- * Upstream bugfix for the Innodb performance bug:
- "Very poor performance with multiple queries running
- concurrently (Bug#15815)".
- * Upstream bugfix for a possible server crash:
- "Selecting from a MERGE table could result in a server crash if the
- underlying tables had fewer indexes than the MERGE table itself
- (Bug#22937)"
- * Upstream bugfies for *lot* of NDB problems.
- * Upstream bugfix for Innodb optimizer bug. Closes: #397597
- * Updated Italian Debconf translation (thanks to Luca Monducci).
- Closes: #401305
- * Updated debian/watch file to MySQL Enterprise branch.
-
- -- Christian Hammers <ch@debian.org> Sat, 2 Dec 2006 16:36:38 +0100
-
-mysql-dfsg-5.0 (5.0.27-2) unstable; urgency=medium
-
- * Disabled YaSSL x86 assembler as it was reported to crash applications
- like pam-mysql or proftpd-mysql which are linked against libmysqlclient
- on i486 and Cyrix (i586) CPUs. Closes: #385147
- * Adjusted mysql-server-4.1 priority to extra and section to oldlibs
- according to the ftp masters overrides.
- * Updated German Debconf translation (thanks to Alwin Meschede).
- Closes: #400809
-
- -- Christian Hammers <ch@debian.org> Wed, 22 Nov 2006 13:36:31 +0100
-
-mysql-dfsg-5.0 (5.0.27-1) unstable; urgency=medium
-
- * New upstream version (but no codechange, the only difference to 5.0.26
- was a patch to the ABI change which Debian already included.
- * When dist-upgrading from mysql-server-4.1/sarge dpkg does not longer
- ask unnecessary "config file has changed" questions regarding
- /etc/init.d/mysql, /etc/logrotate.d/mysql-server and
- /etc/mysql/debian-start just because these files previously belonged
- to mysql-server-4.1 and not to mysql-server-5.0.
- To archive this mysql-server-5.0 now pre-depends on mysql-common which
- provides current versions of those files.
- * The automatic run mysql_upgrade now works with non-standard datadir
- settings, too (thanks to Benjami Villoslada). Closes: #394607
- * Debconf now asks if the old_passwords option is really needed.
- * Improved explanations of the old_passwords variable in my.cnf.
- * Removed possibly leftover cron script from MySQL-4.1 (thanks to
- Mario Oyorzabal Salgado). Closes: #390889
- * Postrm ignores failed "userdel mysql".
- * Updated Danish Debconf translation (thanks to Claus Hindsgaul).
- Closes: #398784
- * Added Euskarian Debconf translation (thanks to Piarres Beobide).
- Closes: #399045
- * Updated Japanese Debconf translation (thanks to Hideki Yamane).
- Closes: #399074
- * Updated German Debconf translation (thanks to Alwin Meschede).
- Closes: #399087
- * New Portuguese debconf translations from Miguel Figueiredo.
- Closes: #398186
-
- -- Christian Hammers <ch@debian.org> Tue, 7 Nov 2006 21:26:25 +0100
-
-mysql-dfsg-5.0 (5.0.26-3) unstable; urgency=high
-
- [sean finney]
- * Fix for the deadly ISAM trap. Now during upgrades we will do our
- very best to convert pre-existing ISAM format tables using the
- binaries from the previous package. Success is not guaranteed, but
- this is probably as good as it gets. Note that this also necessitates
- re-introducing an (empty transitional) mysql-server-4.1 package.
- Closes: #354544, #354850
- * Remove a couple spurious and wrongly placed WARNING statements from
- 45_warn-CLI-passwords.dpatch. thanks to Dan Jacobsen for pointing these
- out. Closes: #394262
-
- -- sean finney <seanius@debian.org> Fri, 03 Nov 2006 18:34:46 +0100
-
-mysql-dfsg-5.0 (5.0.26-2) unstable; urgency=high
-
- * Fixed FTBFS for Alpha by applying an upstream patch (thanks to Falk
- Hueffner). Closes: #395921
-
- -- Christian Hammers <ch@debian.org> Sat, 28 Oct 2006 20:13:46 +0200
-
-mysql-dfsg-5.0 (5.0.26-1) unstable; urgency=high
-
- * SECURITY:
- This combined release of 5.0.25 and 5.0.26 fixes lot of possible server
- crashs so it should get into Etch. Quoting the changelog (bug numbers are
- bugs.mysql.com ones):
- - character_set_results can be NULL to signify no conversion, but some
- code did not check for NULL, resulting in a server crash. (Bug#21913)
- - Using cursors with READ COMMITTED isolation level could cause InnoDB to
- crash. (Bug#19834)
- - Some prepared statements caused a server crash when executed a second
- time. (Bug#21166)
- - When DROP DATABASE or SHOW OPEN TABLES was issued while concurrently
- issuing DROP TABLE (or RENAME TABLE, CREATE TABLE LIKE or any other
- statement that required a name lock) in another connection, the server
- crashed. (Bug#21216)
- - Use of zero-length variable names caused a server crash. (Bug#20908)
- - For InnoDB tables, the server could crash when executing NOT IN ()
- subqueries. (Bug#21077)
- - Repeated DROP TABLE statements in a stored procedure could sometimes
- cause the server to crash. (Bug#19399)
- - Performing an INSERT on a view that was defined using a SELECT that
- specified a collation and a column alias caused the server to crash
- (Bug#21086).
- - A query of the form shown here caused the server to crash. (Bug#21007)
- - NDB Cluster: Some queries involving joins on very large NDB tables could
- crash the MySQL server. (Bug#21059)
- - The character set was not being properly initialized for CAST() with a
- type like CHAR(2) BINARY, which resulted in incorrect results or even a
- server crash. (Bug#17903)
- - For certain queries, the server incorrectly resolved a reference to an
- aggregate function and crashed. (Bug#20868)
- - The server crashed when using the range access method to execut a
- subquery with a ORDER BY DESC clause. (Bug#20869)
- - Triggers on tables in the mysql database caused a server crash. Triggers
- for tables in this database now are disallowed. (Bug#18361)
- - Using SELECT on a corrupt MyISAM table using the dynamic record format
- could cause a server crash. (Bug#19835)
- - Use of MIN() or MAX() with GROUP BY on a ucs2 column could cause a
- server crash. (Bug#20076)
- - Selecting from a MERGE table could result in a server crash if the
- underlying tables had fewer indexes than the MERGE table itself.
- (Bug#21617, Bug#22937)
-
- * New upstream release.
- - This bug would cause trouble for Sarge->Etch upgrades, it was supposed to
- have been fixed in 5.0.16 but that apparently did not fix the whole
- problem:
- Using tables from MySQL 4.x in MySQL 5.x, in particular those with VARCHAR
- fields and using INSERT DELAYED to update data in the table would result in
- either data corruption or a server crash. (Bug#16611, Bug#16218, Bug#17294)
- Closes: #386337
- - Fixes data corruption as an automatic client reconnect used to set
- the wrong character set. Closes: #365050
- - Fixes an undefined ulong type in an include file. Closes: #389102
- - Fixes wrong output format when using Unicode characters. Closes: #355302
- - Fixes mysql_upgrade when using a password. Closes: #371841
-
- [Christian Hammers]
- * Removed --sysconfdir from debian/rules as it puts /etc/mysql/ at the
- end of the my.cnf search patch thus overriding $HOME/my.cnf
- (thanks to Christoph Biedl). Closes: #394992
- * The provided patch from bug #385947 was wrong, the variable is called
- BLOCKSIZE not BLOCK_SIZE according to "strings `which df`" (thanks to
- Bruno Muller). Closes: #385947
-
- [sean finney]
- * new dutch debconf translations from Vincent Zweije (closes: #392809).
- * new japanese debconf translations from Hideki Yamane (closes: #391625).
- * new italian debconf translations from Luca Monducci (closes: #391741).
- * new french debconf translations from Christian Perrier (closes: #393334).
- * ran debconf-updatepo to merge the fuzzies into svn.
- * massage the following patches so they continue to apply cleanly:
- - 44_scripts__mysql_config__libs.dpatch to cleanly apply.
- - 45_warn-CLI-passwords.dpatch
- - 96_TEMP__libmysqlclient_ssl_symbols.dpatch (note, this patch might
- no longer be needed, but is retained "just in case" after massaging it)
- * the following patches have been incorporated upstream:
- - 70_kfreebsd.dpatch
- - 80_hurd_mach.dpatch
- - 87_ps_Hurd.dpatch
- - 90_TEMP__client__mysql_upgrade__O_EXEC.dpatch
- - 91_TEMP__client__mysql_upgrade__password.dpatch
- - 92_TEMP__client__mysql_upgrade__defaultgroups.dpatch
- - 94_TEMP__CVE-2006-4227.dpatch
- - 95_TEMP__CVE-2006-4226.dpatch
- * the udf_example.cc has disappeared from the source code, but there's
- a udf_example.c which seems to be a good example to use instead :)
- * update documentation in the configuration to no longer reference
- using my.cnf in the DATADIR, as it's never been the recommended
- method for debian systems and hasn't worked since 5.0 was released
- anyway (closes: #393868).
-
- -- Christian Hammers <ch@debian.org> Wed, 25 Oct 2006 19:54:04 +0200
-
-mysql-dfsg-5.0 (5.0.24a-9) unstable; urgency=medium
-
- * Having expire_logs_days enabled but log-bin not crashes the server. Using
- both or none of those options is safe. To prevent this happening during the
- nightly log rotation via /etc/logrotate.d/mysql the initscript checks for
- malicious combination of options. See: #368547
- * The Sarge package "mysql-server" which used to include the mysqld daemon
- may still be in unselected-configured state (i.e. after a remove but not
- purge) in which case its now obsolete cronscript has to be moved away
- (thanks to Charles Lepple). Closes: #385669
- * Updated Danish Debconf translation (thanks to Claus Hindsgaul).
- Closes: #390315
- * Updated Frensh Debconf translation (thanks to Christian Perrier).
- Closes: #390980
-
- -- Christian Hammers <ch@debian.org> Tue, 3 Oct 2006 14:55:31 +0200
-
-mysql-dfsg-5.0 (5.0.24a-8) unstable; urgency=low
-
- * (broken upload)
-
- -- Christian Hammers <ch@debian.org> Tue, 3 Oct 2006 14:55:31 +0200
-
-mysql-dfsg-5.0 (5.0.24a-7) unstable; urgency=low
-
- * Stopped mysql_config from announcing unnecessary library dependencies
- which until now cause "NEEDED" dependencies in the "readelf -d" output
- of libraries who only depend on libmysqlclient.so (thanks to Michal
- Cihar). Closes: #390692
-
- -- Christian Hammers <ch@debian.org> Sun, 1 Oct 2006 23:59:43 +0200
-
-mysql-dfsg-5.0 (5.0.24a-6) unstable; urgency=low
-
- [sean finney]
- * finally add support for setting a root password at install.
- while this is not a random password as requested in one bug
- report, we believe it is the best solution and provides a
- means to set a random password via preseeding if it's really
- desired (Closes: #316127, #298295).
-
- -- sean finney <seanius@debian.org> Sun, 01 Oct 2006 23:34:30 +0200
-
-mysql-dfsg-5.0 (5.0.24a-5) unstable; urgency=low
-
- * Added ${shlibs:Depends} to debian/control section libmysqlclient-dev as it
- contains the experimental /usr/lib/mysql/libndbclient.so.0.0.0.
- * Bumped standards version to 3.7.2.
- * Added LSB info section to init scripts.
- * Rephrased Debconf templates as suggested by lintian.
- * Added benchmark suite in /usr/share/mysql/sql-bench/.
- * The mysql.timezone* tables are now filled by the postinst script (thanks
- to Mark Sheppard). Closes: #388491
- * Moved Debconf install notes to README.Debian. Displaying them with
- medium priority was a bug anyway. Closes: #388941
- * Replaced /usr/bin/mysql_upgrade by /usr/bin/mysql_upgrade_shell in
- /etc/mysql/debian-start.sh as it works without errors (thanks to Javier
- Kohen). Closes: #389443
-
- -- Christian Hammers <ch@debian.org> Wed, 20 Sep 2006 15:01:42 +0200
-
-mysql-dfsg-5.0 (5.0.24a-4) unstable; urgency=high
-
- * libmysqlclient.so.15 from 5.0.24 accidentaly exports some symbols that are
- historically exported by OpenSSL's libcrypto.so. This bug was supposed to
- be fixed in 5.0.24a bug according to the mysql bug tracking system will
- only be fixed in 5.0.25 so I backported the patch. People already reported
- crashing apps due to this (thanks to Duncan Simpson). See also: #385348
- Closes: #388262
- * Fixed BLOCKSIZE to BLOCK_SIZE in initscript (thanks to Bruno Muller).
- Closes: #385947
- * Added hint to "--extended-insert=0" to mysqldump manpage (thanks to Martin
- Schulze).
- * Documented the meaning of "NDB" in README.Debian (thanks to Dan Jacobson).
- Closes: #386274
- * Added patch to build on hurd-i386 (thanks to Cyril Brulebois). Closes: #387369
- * Fixed debian-start script to work together with the recend LSB modifications in
- the initscript (thanks to wens). Closes: #387481
- * Reverted tmpdir change in my.cnf back to /tmp to comply with FHS (thanks
- to Alessandro Valente). Closes: #382778
- * Added logcheck filter rule (thanks to Paul Wise). Closes: #381043
- * I will definetly not disable InnoDB but added a note to the default my.cnf
- that disabling it saves about 100MB virtual memory (thanks to Olivier
- Berger). Closes: #384399
- * Added thread_cache_size=8 to default my.cnf as this variable seems to have
- a negligible memory footprint but can improve performance when lots of
- threads connect simultaneously as often seen on web servers.
-
- -- Christian Hammers <ch@debian.org> Mon, 4 Sep 2006 00:21:50 +0200
-
-mysql-dfsg-5.0 (5.0.24a-3) unstable; urgency=low
-
- * Fixed potential tempfile problem in the newly added mysqlreport script.
-
- -- Christian Hammers <ch@debian.org> Sun, 3 Sep 2006 23:17:24 +0200
-
-mysql-dfsg-5.0 (5.0.24a-2) unstable; urgency=low
-
- * Added "mysqlreport" (GPL'ed) from hackmysql.com.
- * Temporarily disabled expire_days option as it causes the server
- to crash. See #368547
- * Made output of init scripts LSB compliant (thanks to David Haerdeman).
- Closes: #385874
-
- -- Christian Hammers <ch@debian.org> Sun, 3 Sep 2006 19:06:53 +0200
-
-mysql-dfsg-5.0 (5.0.24a-1) unstable; urgency=high
-
- * New upstream version.
- * The shared library in the 5.0.24 upstream release accidently exported
- some symbols that are also exported by the OpenSSL libraries (notably
- BN_bin2bn) causing unexpected behaviour in applications using these
- functions (thanks to Peter Cernak). Closes: #385348
- * Added note about possible crash on certain i486 clone CPUs.
- * Made recipient address of startup mysqlcheck output configurable
- (thanks to Mattias Guns). Closes: #385119
-
- -- Christian Hammers <ch@debian.org> Mon, 28 Aug 2006 01:22:12 +0200
-
-mysql-dfsg-5.0 (5.0.24-3) unstable; urgency=high
-
- * SECURITY:
- CVE-2006-4226:
- When run on case-sensitive filesystems, MySQL allows remote
- authenticated users to create or access a database when the database
- name differs only in case from a database for which they have
- permissions.
- CVE-2006-4227:
- MySQL evaluates arguments of suid routines in the security context of
- the routine's definer instead of the routine's caller, which allows
- remote authenticated users to gain privileges through a routine that
- has been made available using GRANT EXECUTE.
- Thanks to Stefan Fritsch for reporting. Closes: #384798
-
- -- Christian Hammers <ch@debian.org> Sat, 26 Aug 2006 04:55:17 +0200
-
-mysql-dfsg-5.0 (5.0.24-2) unstable; urgency=high
-
- * 5.0.24-1 introduced an ABI incompatibility, which this patch reverts.
- Programs compiled against 5.0.24-1 are not compatible with any other
- version and needs a rebuild.
- This bug already caused a lot of segfaults and crashes in various
- programs. Thanks to Chad MILLER from MySQL for quickly providing a patch.
- The shlibdeps version has been increased to 5.0.24-2.
- Closes: #384047, #384221, #383700
-
- -- Christian Hammers <ch@debian.org> Fri, 25 Aug 2006 21:47:35 +0200
-
-mysql-dfsg-5.0 (5.0.24-1) unstable; urgency=high
-
- * SECURITY: Upstream fixes a security bug which allows a user to continue
- accessing a table using a MERGE TABLE after the right to direct access to
- the database has been revoked (CVE-2006-4031, MySQL bug #15195).
- (Well they did not exactly fixed it, they documented the behaviour and
- allow the admin to disable merge table alltogether...). Closes: #380271
- * SECURITY: Applied patch that fixes a possibly insecure filehandling
- in the recently added mysql_upgrade binary file (MySQL bug #10320).
- * New upstream version.
- - Fixes nasty MySQL bug #19618 that leads to crashes when using
- "SELECT ... WHERE ... not in (1, -1)" (e.g. vbulletin was affected).
- - Fixes upstream bug #16803 so that linking ~/.mysql_history to /dev/null
- now has the desired effect of having no history.
- * Really fixed the runlevels. Closes: #377651
- * Added patch for broken upstream handling of "host=" to mysql_upgrade.c.
- * Adjusted /etc/mysql/debian-start to new mysql_upgrade.c
-
- -- Christian Hammers <ch@debian.org> Tue, 8 Aug 2006 00:44:13 +0200
-
-mysql-dfsg-5.0 (5.0.22-5) unstable; urgency=low
-
- * Added further line to the logcheck ignore files (thanks to Paul Wise).
- Closes: #381038
-
- -- Christian Hammers <ch@debian.org> Wed, 2 Aug 2006 00:28:50 +0200
-
-mysql-dfsg-5.0 (5.0.22-4) unstable; urgency=low
-
- * Upstream fixes a bug in the (never released) version 5.0.23 which could
- maybe used to crash the server if the mysqlmanager daemon is in use
- which is not yet the default in Debian. (CVE-2006-3486 *DISPUTED*)
- * Changed runlevel priority of mysqld from 20 to 19 so that it gets started
- before apache and proftpd etc. which might depend on an already running
- database server (thanks to Martin Gruner). Closes: #377651
- * Added patch which sets PATH_MAX in ndb (thanks to Cyril Brulebois).
- Closes: #378949
- * Activated YaSSL as licence issues are settled according to:
- http://bugs.mysql.com/?id=16755. This also closes the FTBFS bug
- regarding OpenSSL as it is discouraged to use now. Closes: #368639
- * Removed SSL-MINI-HOWTO as the official documentation is good enough now.
- * mysql_upgrade no longer gives --password on the commandline which would
- be insecure (thanks to Dean Gaudet). Closes: #379199
- * Adjusted debian/patches/45* to make consecutive builds in the same source
- tree possible (thanks to Bob Tanner). Closes: #368661
- * mysql-server-5.0 is now suggesting tinyca as yaSSL is enabled and tinyca
- was found to be really cool :)
- * Moved tempdir from /tmp to /var/tmp as it will more likely have enough
- free space as /tmp is often on the root partition and /var or at least
- /var/tmp is on a bigger one.
-
- -- Christian Hammers <ch@debian.org> Mon, 10 Jul 2006 23:30:26 +0200
-
-mysql-dfsg-5.0 (5.0.22-3) unstable; urgency=low
-
- * Added patch for MySQL bug #19618: "select x from x
- where x not in(1,-1)" may crash the server" (thanks to
- Ruben Puettmann).
-
- -- Christian Hammers <ch@debian.org> Fri, 9 Jun 2006 01:41:44 +0200
-
-mysql-dfsg-5.0 (5.0.22-2) unstable; urgency=high
-
- * Fixed debian-sys-maint related bug in postinst (thanks to
- Jean-Christophe Dubacq). Closes: #369970
- * The last upload was a security patch (which I did not know as I
- uploaded before the announcement came). I now added the CVE id for
- reference and set urgency to high as the last entry did not.
-
- -- Christian Hammers <ch@debian.org> Wed, 31 May 2006 01:04:11 +0200
-
-mysql-dfsg-5.0 (5.0.22-1) unstable; urgency=low
-
- * SECURITY: This upstream release fixes an SQL-injection with multibyte
- encoding problem. (CVE-2006-2753)
- * New upstream release.
- * Upstream fixes REPAIR TABLE problem. Closes: #354300
- * Upstream fixes problem that empty strings in varchar and text columns
- are displayed as NULL. Closes: #368663
-
- -- Christian Hammers <ch@debian.org> Tue, 30 May 2006 23:43:24 +0200
-
-mysql-dfsg-5.0 (5.0.21-4) unstable; urgency=low
-
- * Added "BLOCKSIZE=" to the diskfree check (thanks to Farzad FARID).
- Closes: #367027, #367083
- * Further fixed mysql_upgrade upstream script (thanks to Andreas Pakulat)
- Closes: #366155
- * Adjusted the /proc test in debian/rules from /proc/1 to /proc/self
- to make building on grsec systems possible (thanks to K. Rosenegger).
- Closes: #366824
- * Updated Russion Debconf translation (thanks to Yuriy Talakan).
- Closes: #367141
- * Updated Czech Debconf translation (thanks to Kiroslav Kure).
- Closes: #367160
- * Updated Galician Debconf translation (thanks to Jacobo Tarrio).
- Closes: #367384
- * Updated Swedish Debconf translation (thanks to Daniel Nylander).
- Closes: #368186
-
- -- Christian Hammers <ch@debian.org> Wed, 10 May 2006 08:45:42 +0200
-
-mysql-dfsg-5.0 (5.0.21-3) unstable; urgency=low
-
- * Fixed FTBFS problem which was caused by a patch that modifies Makefile.am
- as well as Makefile.in and was not deteced because my desktop was fast
- enough to patch both files within the same second and so fooled automake.
- (thanks to Blars Blarson for notifying me). Closes: #366534
-
- -- Christian Hammers <ch@debian.org> Sat, 6 May 2006 19:03:58 +0200
-
-mysql-dfsg-5.0 (5.0.21-2) unstable; urgency=low
-
- * Fixed bug in postinst that did not correctly rewrite
- /etc/mysql/debian.cnf (thanks to Daniel Leidert).
- Closes: #365433, #366155
-
- -- Christian Hammers <ch@debian.org> Thu, 4 May 2006 02:37:03 +0200
-
-mysql-dfsg-5.0 (5.0.21-1) unstable; urgency=high
-
- * SECURITY: New upstream release with some security relevant bugfixes:
- * "Buffer over-read in check_connection with usernames lacking a
- trailing null byte" (CVE-2006-1516)
- * "Anonymous Login Handshake - Information Leakage" (CVE-2006-1517)
- * "COM_TABLE_DUMP Information Leakage and Arbitrary command execution"
- (CVE-2006-1518)
- Closes: #365938, #365939
- * Added diskfree check to the init script (thanks to Tim Baverstock).
- Closes: #365460
- * First amd64 upload!
-
- -- Christian Hammers <ch@debian.org> Sat, 29 Apr 2006 04:31:27 +0200
-
-mysql-dfsg-5.0 (5.0.20a-2) unstable; urgency=low
-
- * The new mysql-upgrade which is started from /etc/mysql/debian-start
- does now use the debian-sys-maint user for authentication (thanks to
- Philipp). Closes: #364991
- * Wrote patch debian/patches/43* which adds a password option to
- mysql_update. See MySQL bug #19400.
- * Added "Provides: libmysqlclient-dev" to libmysqlclient15-dev as I saw no
- obvious reasons against it (problems should be documented in
- debian/README.Maintainer!) (thanks to Olaf van der Spek). Closes: #364899
- * Updated Netherlands debconf translation (thanks to Vincent Zweije)
- Closes: #364464
- * Updated French debconf translation (thanks to Christian Perrier)
- Closes: #364401
- * Updated Danish debconf translation (thanks to Claus Hindsgaul)
- Closes: #365135
-
- -- Christian Hammers <ch@debian.org> Wed, 26 Apr 2006 01:14:53 +0200
-
-mysql-dfsg-5.0 (5.0.20a-1) unstable; urgency=low
-
- * New upstream release.
- * Added the new mysql_upgrade script and added it to
- /etc/mysql/debian-start (thanks to Alessandro Polverini).
- The script is currently very noise that is a known bug and will be
- fixed in the next release!
- Closes: #363458
- * No longer creates the "test" database. This actuallay had been tried
- to archive before (at least patches) exists but apparently was not the
- case in the last versions (thanks to Olaf van der Spek). Closes: #362126
- * Reformatted libmysqlclient15off.NEWS.Debian to changelog format
- (thanks to Peter Palfrader). Closes: #363062
-
- -- Christian Hammers <ch@debian.org> Sat, 15 Apr 2006 13:05:22 +0200
-
-mysql-dfsg-5.0 (5.0.20-1) unstable; urgency=high
-
- * Upstream contains a fix for a nasty bug (MySQL#18153) that users
- already experienced and that caused corrupted triggers after
- REPAIR/OPTIMIZE/ALTER TABLE statements.
- (thanks to Jerome Despatis for pointing out)
- * Added patch for the "updates on multiple tables is buggy after
- upgrading from 4.1 to 5.0" problem which MySQL has been committed
- for the upcoming 5.0.21 release. Closes #352704
- * Added Netherlands debconf translation (thanks to Vincent Zweije).
- Closes: #360443
- * Added Galician debconf translation (thanks to Jacobo Tarrio).
- Closes: #361257
-
- -- Christian Hammers <ch@debian.org> Fri, 7 Apr 2006 00:00:43 +0200
-
-mysql-dfsg-5.0 (5.0.19-3) unstable; urgency=high
-
- [ Christian Hammers ]
- * Fixed libmysqlclient15.README.Debian regarding package name changes
- (thanks to Leppo).
- * Moved libheap.a etc. back to /usr/lib/mysql/ as their names are just
- too generic. Closes: #353924
- [ Sean Finney ]
- * updated danish debconf translation, thanks to Claus Hindsgaul
- (closes: #357424).
- [ Adam Conrad ]
- * Send stderr from 'find' in preinst to /dev/null to tidy up chatter.
- * Backport patch for CVE-2006-0903 from the upcoming release to resolve
- a log bypass vulnerability when using non-binary logs (closes: #359701)
-
- -- Adam Conrad <adconrad@0c3.net> Tue, 4 Apr 2006 15:23:18 +1000
-
-mysql-dfsg-5.0 (5.0.19-2) unstable; urgency=medium
-
- * New upstream release.
- * Renamed package libmysqlclient15 to libmysqlclient15off due to
- binary incompatible changes.
- See /usr/share/doc/libmysqlclient15off/README.Debian
- * Updated Czech debconf translation (thanks to Miroslav Kure).
- Closes: #356503
- * Updated French debconf translation (thanks to Christian Perrier).
- Closes: #356332
- * Improved README.Debian (thanks to Olaf van der Spek). Closes: #355702
- * Fixed 5.0.18-8 changelog by saying in which package the NEWS.Debian
- file is (thanks to Ross Boylan). Closes: #355978
-
- -- Christian Hammers <ch@debian.org> Fri, 17 Mar 2006 02:32:19 +0100
-
-mysql-dfsg-5.0 (5.0.19-1) experimental; urgency=medium
-
- * New upstream release.
- * SECURITY: CVE-2006-3081: A bug where str_to_date(1,NULL) lead to a
- server crash has been fixed.
- (this note has been added subsequently for reference)
- * Renamed package libmysqlclient15 to libmysqlclient15off.
- See /usr/share/doc/libmysqlclient15off/NEWS.Debian
- * Updated Czech debconf translation (thanks to Miroslav Kure).
- Closes: #356503
- * Updated French debconf translation (thanks to Christian Perrier).
- Closes: #356332
- * Improved README.Debian (thanks to Olaf van der Spek). Closes: #355702
- * Fixed 5.0.18-8 changelog by saying in which package the NEWS.Debian
- file is (thanks to Ross Boylan). Closes: #355978
-
- -- Christian Hammers <ch@debian.org> Tue, 14 Mar 2006 22:56:13 +0100
-
-mysql-dfsg-5.0 (5.0.18-9) unstable; urgency=medium
-
- [ Christian Hammers ]
- * When using apt-get the check for left-over ISAM tables can abort the
- installation of mysql-server-5.0 but not prevent the mysql-server-4.1
- package from getting removed. The only thing I can do is reflect this
- in the Debconf notice that is shown and suggest to reinstall
- mysql-server-4.1 for converting. See: #354850
- * Suggests removing of /etc/cron.daily/mysql-server in last NEWS message
- (thanks to Mourad De Clerck). Closes: #354111
- * Added versioned symbols for kfreebsd and Hurd, too (thanks to Aurelien
- Jarno and Michael Bank). Closes: #353971
- * Added versioned symbols for kfreebsd, too (thanks to Aurelien Jarno).
- Closes: #353971
- [ Adam Conrad ]
- * Add 39_scripts__mysqld_safe.sh__port_dir.dpatch to ensure that the
- permissions on /var/run/mysqld are always correct, even on a tmpfs.
-
- -- Christian Hammers <ch@debian.org> Mon, 6 Mar 2006 21:42:13 +0100
-
-mysql-dfsg-5.0 (5.0.18-8) unstable; urgency=low
-
- * The rotation of the binary logs is now configured via
- expire-logs-days in /etc/mysql/my.cnf and handled completely
- by the server and no longer in configured in debian-log-rotate.conf
- and handled by a cron job. Thanks to David Johnson.
- See /usr/share/doc/mysql-server-5.0/NEWS.Debian
- * Ran aspell over some files in debian/ and learned a lot :)
- * debian/rules: Added check if versioned symbols are really there.
- * Updated SSL-MINI-HOWTO.
- * Updated copyright (removed the parts regarding the now removed
- BerkeleyDB table handler and mysql-doc package).
- * Relocated a variable in preinst (thanks to Michael Heldebrant).
- Closes: #349258, #352587, #351216
- * Updated Danish debconf translation (thanks to Claus Hindsgaul).
- Closes: #349013
- * Updated Swedish debconf translation (thanks to Daniel Nylander).
- Closes: #349522
- * Updated French debconf translation (thanks to Christian Perrier).
- Closes: #349592
- * Fixed typo in README.Debian (thanks to Vincent Ricard).
- * Prolonged waiting time for mysqld in the init script. Closes: #352070
-
- -- Christian Hammers <ch@debian.org> Mon, 23 Jan 2006 23:13:46 +0100
-
-mysql-dfsg-5.0 (5.0.18-7) unstable; urgency=low
-
- * Made mailx in debian-start.inc.sh optional and changed the dependency on it
- on it to a mere recommendation. Closes: #316297
- * the previous FTBFS patches for GNU/Hurd inadvertently led to configure
- being regenerating, losing a couple trivial things like our versioned
- symbols patch, causing many nasty problems (closes: #348854).
-
- -- sean finney <seanius@debian.org> Fri, 20 Jan 2006 20:59:27 +0100
-
-mysql-dfsg-5.0 (5.0.18-6) unstable; urgency=low
-
- * Added version comment (thanks to Daniel van Eeden).
- * Added two patches to build on GNU/Hurd (thanks to Michael Bank).
- Closes: #348182
- * Abort upgrade if old and now unsupported ISAM tables are present
- (thanks to David Coe). Closes: #345895
-
- -- Christian Hammers <ch@debian.org> Tue, 17 Jan 2006 19:25:59 +0100
-
-mysql-dfsg-5.0 (5.0.18-5) unstable; urgency=low
-
- * Bump shlibdeps for libmysqlclient15 to (>= 5.0.15-1), which was
- the first non-beta release from upstream, as well as being shortly
- after we broke the ABI in Debian by introducing versioned symbols.
-
- -- Adam Conrad <adconrad@0c3.net> Fri, 13 Jan 2006 13:18:03 +1100
-
-mysql-dfsg-5.0 (5.0.18-4) unstable; urgency=low
-
- * Munge our dependencies further to smooth upgrades even more, noting
- that we really need 5.0 to conflict with 4.1, and stealing a page from
- the book of mysql-common, it doesn't hurt to hint package managers in
- the direction of "hey, this stuff is a complete replacement for 4.1"
- * Change the description of mysql-server and mysql-client to remove the
- references to it being "transition", and instead point out that it's
- the way to get the "current best version" of each package installed.
-
- -- Adam Conrad <adconrad@0c3.net> Wed, 11 Jan 2006 11:39:45 +1100
-
-mysql-dfsg-5.0 (5.0.18-3) unstable; urgency=low
-
- * Make the mysql-{client,server}-5.0 conflict against mysql-{client,server}
- versioned, so they can be installed side-by-side and upgrade properly.
- * Add myself to Uploaders; since I have access to the alioth repository.
-
- -- Adam Conrad <adconrad@0c3.net> Tue, 10 Jan 2006 19:15:48 +1100
-
-mysql-dfsg-5.0 (5.0.18-2) unstable; urgency=low
-
- * Removed the transitional package that forced an upgrade from
- mysql-server-4.1 to mysql-server-5.0 as I was convinced that
- having a general "mysql-server" package with adjusted dependencies
- is enough (thanks to Adam Conrad).
- * Updated logcheck.ignore files (thanks to Jamie McCarthy). Closes: #340193
-
- -- Christian Hammers <ch@debian.org> Mon, 9 Jan 2006 21:54:53 +0100
-
-mysql-dfsg-5.0 (5.0.18-1) unstable; urgency=low
-
- * New upstream version.
- * Added empty transitional packages that force an upgrade from the
- server and client packages that have been present in Sarge.
- * Fixed SSL-MINI-HOWTO (thanks to Jonas Smedegaard). Closes: #340589
-
- -- Christian Hammers <ch@debian.org> Mon, 2 Jan 2006 21:17:51 +0100
-
-mysql-dfsg-5.0 (5.0.17-1) unstable; urgency=low
-
- * Never released as Debian package.
-
- -- Christian Hammers <ch@debian.org> Thu, 22 Dec 2005 07:49:52 +0100
-
-mysql-dfsg-5.0 (5.0.16-1) unstable; urgency=low
-
- * New upstream version.
- * Removed the error logs from the logrotate script as Debian does
- not use them anymore. Closes: #339628
-
- -- Christian Hammers <ch@debian.org> Tue, 22 Nov 2005 01:19:11 +0100
-
-mysql-dfsg-5.0 (5.0.15-2) unstable; urgency=medium
-
- * Added 14_configure__gcc-atomic.h.diff to fix FTBFS on m68k
- (thanks to Stephen R Marenka). Closes: #337082
- * Removed dynamic linking against libstdc++ as it was not really
- needed (thanks to Adam Conrad). Closes: #328613
- * Fixed the "/var/lib/mysql is a symlink" workaround that accidently
- left a stalled symlink (thanks to Thomas Lamy). Closes: #336759
- * As the init script cannot distinguish between a broken startup and
- one that just takes very long the "failed" message now says
- "or took more than 6s" (thanks to Olaf van der Spek). Closes: #335547
-
- -- Christian Hammers <ch@debian.org> Thu, 3 Nov 2005 22:00:15 +0100
-
-mysql-dfsg-5.0 (5.0.15-1) unstable; urgency=low
-
- * New upstream version. 5.0 has finally been declared STABLE!
- * Added small patch to debian/rules that fixed sporadic build errors
- where stdout and stderr were piped together, got mixed up and broke
- * Added --with-big-tables to ./configure (thanks to tj.trevelyan).
- Closes: #333090
- * Added capability to parse "-rc" to debian/watch.
- * Fixed cronscript (thanks to Andrew Deason). Closes: #335244
- * Added Swedish debconf translation (thanks to Daniel Nylander).
- Closes: #333670
- * Added comment to README.Debian regarding applications that manually
- set new-style passwords... Closes: #334444
- * Sean Finney:
- - Fix duplicate reference to [-e|--extended-insert]. Closes: #334957
- - Fix default behavior for mysqldumpslow. Closes: #334517
- - Reference documentation issue in mysql manpage. Closes: #335219
-
- -- Christian Hammers <ch@debian.org> Fri, 30 Sep 2005 00:10:39 +0200
-
-mysql-dfsg-5.0 (5.0.13rc-1) unstable; urgency=low
-
- * New upstream release. Now "release-candidate"!
- * Removed any dynamic link dependencies to libndbclient.so.0 which
- is due to its version only distributed as a static library.
- * Sean Finney:
- - FTBFS fix related to stripping rpath in debian/rules
-
- -- Christian Hammers <ch@debian.org> Mon, 26 Sep 2005 22:09:26 +0200
-
-mysql-dfsg-5.0 (5.0.12beta-5) unstable; urgency=low
-
- * The recent FTBFS were probably result of a timing bug in the
- debian/patches/75_*.dpatch file where Makefile.in got patched just
- before the Makefile.shared which it depended on. For that reason
- only some of the autobuilders failed. Closes: #330149
- * Fixed chrpath removal (option -k had to be added).
- * Corrected debconf dependency as requested by Joey Hess.
-
- -- Christian Hammers <ch@debian.org> Mon, 26 Sep 2005 18:37:07 +0200
-
-mysql-dfsg-5.0 (5.0.12beta-4) unstable; urgency=low
-
- * Removed experimental shared library libndbclient.so.0.0.0 as it
- is doomed to cause trouble as long as it is present in both MySQL 4.1
- and 5.0 without real soname and its own package. We still have
- libndbclient.a for developers. (thanks to Adam Conrad and
- mediaforest.net). Closes: #329772
-
- -- Christian Hammers <ch@debian.org> Fri, 23 Sep 2005 12:36:48 +0200
-
-mysql-dfsg-5.0 (5.0.12beta-3) unstable; urgency=medium
-
- * Symbol versioning support! wooooohoooooo!
- (thanks to Steve Langasek) Closes: #236288
- * Moved libndbcclient.so.0 to the -dev package as it is provided by
- libmysqlclient14 and -15 which must be installable simultaneously.
- * Removed mysql-*-doc suggestions.
-
- -- Christian Hammers <ch@debian.org> Tue, 20 Sep 2005 00:07:03 +0200
-
-mysql-dfsg-5.0 (5.0.12beta-2) unstable; urgency=low
-
- * Added patch to build on GNU/kFreeBSD (thanks to Aurelien Jarno).
- Closes: #327702
- * Added patch that was already been present on the 4.1 branch which
- makes the "status" command of the init script more sensible
- (thanks to Stephen Gildea). Closes: #311836
- * Added Vietnamese Debconf translation (thanks to Clytie Siddal).
- Closes: #313006
- * Updated German Debconf translation (thanks to Jens Seidel).
- Closes: #313957
- * Corrected commends in example debian-log-rotate.conf. The default is
- unlike the mysql-sever-4.1 package which needed to stay backwards
- compatible now 2 to avoid filling up the disk endlessly.
- * Fixed watch file to be "-beta" aware.
-
- -- Christian Hammers <ch@debian.org> Thu, 15 Sep 2005 20:50:19 +0200
-
-mysql-dfsg-5.0 (5.0.12beta-1) unstable; urgency=medium
-
- * Christian Hammers:
- - New upstream release.
- - Changed build-dep to libreadline5-dev as requested by Matthias Klose.
- Closes: #326316
- - Applied fix for changed output format of SHOW MASTER LOGS for
- binary log rotation (thanks to Martin Krueger). Closes: #326427, #326427
- - Removed explicit setting of $PATH as I saw no sense in it and
- it introduced a bug (thanks to Quim Calpe). Closes: #326769
- - Removed PID file creation from /etc/init.d/mysql-ndb as it does
- not work with this daemon (thanks to Quim Calpe).
- - Updated French Debconf translation (thanks to Christian Perrier).
- Closes: #324805
- - Moved conflicts line in debian/control from libmysqlclient15 to
- libmysqlclient15-dev and removed some pre-sarge conflicts as
- suggested by Adam Majer. Closes: #324623
- * Sean Finney:
- - For posterity, CAN-2005-2558 has been fixed since 5.0.7beta.
-
- -- Christian Hammers <ch@debian.org> Thu, 15 Sep 2005 19:58:22 +0200
-
-mysql-dfsg-5.0 (5.0.11beta-3) unstable; urgency=low
-
- * Temporarily build only with -O2 to circumvent gcc internal errors
- (thanks to Matthias Klose). Related to: #321165
-
- -- Christian Hammers <ch@debian.org> Thu, 18 Aug 2005 15:44:04 +0200
-
-mysql-dfsg-5.0 (5.0.11beta-2) unstable; urgency=low
-
- * Fixed README.Debian regarding the status of mysql-doc.
- * Added "set +e" around chgrp in mysql-server-5.0.preinst to
- not fail on .journal files (thanks to Christophe Nowicki).
- Closes: #318435
-
- -- Christian Hammers <ch@debian.org> Sun, 14 Aug 2005 18:02:08 +0200
-
-mysql-dfsg-5.0 (5.0.11beta-1) unstable; urgency=low
-
- * New upstream version.
- * Added Danish Debconf translations (thanks to Claus Hindsgaul).
- Closes: #322384
- * Updated Czech Debconf translations (thanks to Miroslav Kure).
- Closes: #321765
-
- -- Christian Hammers <ch@debian.org> Sat, 13 Aug 2005 11:56:15 +0000
-
-mysql-dfsg-5.0 (5.0.10beta-1) unstable; urgency=low
-
- * New upstream release.
- * Christian Hammers:
- - Added check for mounted /proc to debian/rules.
- * Sean Finney:
- - fix for fix_mysql_privilege_tables/mysql_fix_privilege_tables typo
- in mysql-server-5.0's README.Debian (see #319838).
-
- -- Christian Hammers <ch@debian.org> Sun, 31 Jul 2005 00:30:45 +0200
-
-mysql-dfsg-5.0 (5.0.7beta-1) unstable; urgency=low
-
- * Second try for new upstream release.
- * Renamed mysql-common-5.0 to mysql-common as future libmysqlclient16
- from e.g. MySQL-5.1 would else introduce mysql-common-5.1 which makes
- a simultanous installation of libmysqlclient14 impossible as that
- depends on either mysql-common or mysql-common-5.0 but not on future
- versions. Thus we decided to always let the newest MySQL version
- provide mysql-common.
- * Added ${misc:Depends} as suggested by debhelper manpage.
- * Raised standard in control file to 3.6.2.
- * Removed DH_COMPAT from rules in faviour of debian/compat.
- * Checkes for presence of init script before executing it in preinst.
- Referres: 315959
- * Added 60_includes_mysys.h__gcc40.dpatch for GCC-4.0 compatibility.
-
- -- Christian Hammers <ch@debian.org> Wed, 29 Jun 2005 00:39:05 +0200
-
-mysql-dfsg-5.0 (5.0.5beta-1) unstable; urgency=low
-
- * New major release! Still beta so be carefull...
- * Added federated storage engine.
-
- -- Christian Hammers <ch@debian.org> Wed, 8 Jun 2005 19:29:45 +0200
-
-mysql-dfsg-4.1 (4.1.12-1) unstable; urgency=low
-
- * Christian Hammers:
- - New upstream release.
- - Disabled BerkeleyDB finally. It has been obsoleted by InnoDB.
- * Sean Finney:
- - Updated French translation from Christian Perrier (Closes: #310526).
- - Updated Japanese translation from Hideki Yamane (Closes: #310263).
- - Updated Russian translation from Yuriy Talakan (Closes: #310197).
-
- -- Christian Hammers <ch@debian.org> Sat, 4 Jun 2005 05:49:11 +0200
-
-mysql-dfsg-4.1 (4.1.11a-4) unstable; urgency=high
-
- * Fixed FTBFS problem which was caused due to the fact that last uploads
- BerkeleyDB patch was tried to applied on all architectures and not only
- on those where BerkeleyDB is actually beeing built. Closes: #310296
-
- -- Christian Hammers <ch@debian.org> Mon, 23 May 2005 00:54:51 +0200
-
-mysql-dfsg-4.1 (4.1.11a-3) unstable; urgency=high
-
- * Added patch from Piotr Roszatycki to compile the bundled db3 library
- that is needed for the BerkeleyDB support with versioned symbols so
- that mysqld no longer crashes when it gets linked together with the
- Debian db3 version which happens when e.g. using libnss-db.
- Closes: #308966
-
- -- Christian Hammers <ch@debian.org> Thu, 19 May 2005 01:41:14 +0200
-
-mysql-dfsg-4.1 (4.1.11a-2) unstable; urgency=high
-
- * Okay, the hackery with /var/lib/dpkg/info/mysql-server.list will not
- stand and is removed from the preinst of mysql-server.
- * New workaround for the symlink problem that does not involve mucking
- with dpkg's file lists is storing the symlinks in a temporary location
- across upgrades.
- As this sometimes fails since apt-get does not always call new.preinst
- before old.postrm, some remarks were added to README.Debian and the
- Debconf installation notes to minimize the inconvinience this causes.
-
- -- sean finney <seanius@debian.org> Sun, 15 May 2005 10:25:31 -0400
-
-mysql-dfsg-4.1 (4.1.11a-1) unstable; urgency=high
-
- * Added the "a" to the version number to be able to upload a new
- .orig.tar.gz file which now has the non-free Docs/ directory removed
- as this has been forgotten in the 4.1.11 release (thanks to Goeran
- Weinholt). Closes: #308691
- * The Woody package listed /var/lib/mysql and /var/log/mysql in its
- /var/lib/dpkg/info/mysql-server.list. These directories are often
- replaced by symlinks to data partitions which triggers a dpkg bug
- that causes these symlinks to be removed on upgrades. The new preinst
- prevents this by removing the two lines from the .list file
- (thanks to Andreas Barth and Jamin W. Collins). See dpkg bug #287978.
- * Updated French Debconf translation (thanks to Christian Perrier).
- Closes: #308353
-
- -- Christian Hammers <ch@debian.org> Thu, 12 May 2005 21:52:46 +0200
-
-mysql-dfsg-4.1 (4.1.11-3) unstable; urgency=high
-
- * The "do you want to remove /var/lib/mysql when purging the package" flag
- from old versions is removed once this package is beeing installed so
- that purging an old Woody mysql-server package while having a
- mysql-server-4.1 package installed can no longer lead to the removal of
- all databases. Additionaly clarified the wording of this versions Debconf
- template and added a check that skips this purge in the postrm script
- if another mysql-server* package has /usr/sbin/mysqld installed.
- (thanks to Adrian Bunk for spotting that problem) Closes: #307473
- * Cronfile was not beeing installed as the filename was not in the
- correct format for "dh_installcron --name" (thanks to Tomislav
- Gountchev). Closes: #302712
-
- -- Christian Hammers <ch@debian.org> Sat, 23 Apr 2005 22:55:15 +0200
-
-mysql-dfsg-4.1 (4.1.11-2) unstable; urgency=low
-
- * Sean Finney:
- - don't freak out if we can't remove /etc/mysql during purge.
- - debian/rules clean works again.
- * Christian Hammers:
- - Fixed typo in README.Debian (thanks to Joerg Rieger). Closes: #304897
- - Completely removed the passwordless test user as it was not only
- insecure but also lead to irritations as MySQL checks first the
- permissions of this user and then those of a password having one.
- See bug report from Hilko Bengen for details. Closes: #301741
-
- -- Christian Hammers <ch@debian.org> Sat, 16 Apr 2005 15:55:00 +0200
-
-mysql-dfsg-4.1 (4.1.11-1) unstable; urgency=low
-
- * New upstream version.
- * Upstream fix for charset/collation problem. Closes: #282256
- * Upstream fix for subselect crash. Closes: #297687
- * Corrected minor issue in Debconf template regarding skip-networking
- (thanks to Isaac Clerencia). Closes: #303417
- * Made dependency to gawk unnecessary (thanks to Zoran Dzelajlija).
- Closes: #302284
- * Removed obsolete 50_innodb_mixlen.dpatch.
- * Removed obsolete 51_CAN-2004-0957_db_grant_underscore.dpatch.
-
- -- Christian Hammers <ch@debian.org> Fri, 8 Apr 2005 00:23:53 +0200
-
-mysql-dfsg-4.1 (4.1.10a-7) unstable; urgency=low
-
- * Sean Finney:
- - fix for the mysteriously disappeared cronjob. thanks to
- Peter Palfrader <weasel@debian.org> for pointing out this omission.
- (closes: #302712).
-
- -- sean finney <seanius@debian.org> Sat, 02 Apr 2005 16:54:13 -0500
-
-mysql-dfsg-4.1 (4.1.10a-6) unstable; urgency=high
-
- * Sean Finney:
- - the previous upload did not completely address the issue. this one
- should do so. d'oh.
-
- -- sean finney <seanius@debian.org> Thu, 31 Mar 2005 03:35:50 +0000
-
-mysql-dfsg-4.1 (4.1.10a-5) unstable; urgency=high
-
- * Sean Finney:
- - the following security issue is addressed in this upload:
- CAN-2004-0957 (grant privilege escalation on tables with underscores)
- thanks to sergei at mysql for all his help with this.
-
- -- sean finney <seanius@debian.org> Wed, 30 Mar 2005 21:19:26 -0500
-
-mysql-dfsg-4.1 (4.1.10a-4) unstable; urgency=low
-
- * Sean Finney:
- - FTBFS fix for amd64/gcc-4.0. Thanks to Andreas Jochens <aj@andaco.de>
- for reporting this (closes: #301807).
- - ANSI-compatible quoting fix in daily cron job. thanks to
- Karl Hammar <karl@aspodata.se> for pointing out the problem in
- the 4.0 branch.
- - Added myself as a co-maintainer in the control file (closes: #295312).
-
- -- sean finney <seanius@debian.org> Tue, 29 Mar 2005 18:54:42 -0500
-
-mysql-dfsg-4.1 (4.1.10a-3) unstable; urgency=low
-
- * BerkeleyDB is now disabled by default as its use is discouraged by MySQL.
- * Added embedded server libraries as they finally do compile.
- They are currently in libmysqlclient-dev as they are still
- experimental and only available as .a library (thanks to Keith Packard).
- Closes: #297062
- * Fixed obsolete "tail" syntax (thanks to Sven Mueller). Closes: #301413
- * Added CAN numbers for the latest security bugfix upload.
- * Updated manpage of mysqlmanager (thanks to Justin Pryzby). Closes: #299844
- * Added comments to default configuration.
-
- -- Christian Hammers <ch@debian.org> Sun, 20 Mar 2005 17:40:18 +0100
-
-mysql-dfsg-4.1 (4.1.10a-2) unstable; urgency=low
-
- * Disabled "--with-mysqld-ldflags=-all-static" as it causes sig11 crashes
- if LDAP is used for groups in /etc/nsswitch.conf. Confirmed by Sean Finney
- and Daniel Dehennin. Closes: #299382
-
- -- Christian Hammers <ch@debian.org> Mon, 14 Mar 2005 03:01:03 +0100
-
-mysql-dfsg-4.1 (4.1.10a-1) unstable; urgency=high
-
- * SECURITY:
- - The following security related updates are addressed:
- CAN-2005-0711 (temporary file creation with "CREATE TEMPORARY TABLE")
- CAN-2005-0709 (arbitrary library injection in udf_init())
- CAN-2005-0710 (arbitrary code execution via "CREATE FUNCTION")
- Closes: #299029, #299031, #299065
- * New Upstream Release.
- - Fixes some server crash conditions.
- - Upstream includes fix for TMPDIR overriding my.cnf tmpdir setting
- Closes: #294347
- - Fixes InnoDB error message. Closes: #298875
- - Fixes resouce limiting. Closes: #285044
- * Improved checking whether or not the server is alive in the init script
- which should make it possible to run several mysqld instances in
- different chroot environments. Closes: #297772
- * Fixed cron script name as dots are not allowed (thanks to Michel
- v/d Ven). Closes: #298447
- * Added -O3 and --with-mysqld-ldflags=-all-static as MySQL recommends to
- build the server binary statically in order to gain about 13% more
- performance (thanks to Marcin Kowalski).
- * Added patch to let mysqld_safe react to signals (thanks to Erich
- Schubert). Closes: #208364
- * (Thanks to Sean Finney for doing a great share of work for this release!)
-
- -- Christian Hammers <ch@debian.org> Thu, 3 Mar 2005 02:36:39 +0100
-
-mysql-dfsg-4.1 (4.1.10-4) unstable; urgency=medium
-
- * Fixed bug that prevented MySQL from starting after upgrades.
- Closes: #297198, #296403
- * Added comment about logging to syslog to the default my.cnf
- and the logrotate script (thanks to Ryszard Lach). Closes: #295507
-
- -- Christian Hammers <ch@debian.org> Thu, 3 Mar 2005 00:28:02 +0100
-
-mysql-dfsg-4.1 (4.1.10-3) unstable; urgency=low
-
- * Sean Finney: Cronjobs now exit silently when the server package
- has been removed but not purged (thanks to Vineet Kumar).
- Closes: #297404
- * Fixed comments of /etc/mysql/debian-log-rotate.conf (thanks to
- Philip Ross). Closes: #297467
- * Made mysqld_safe reacting sane on signals (thanks to Erich Schubert).
- Closes: #208364
-
- -- Christian Hammers <ch@debian.org> Tue, 1 Mar 2005 19:44:34 +0100
-
-mysql-dfsg-4.1 (4.1.10-2) unstable; urgency=low
-
- * Converted to dpatch.
- * debian/ is now maintained via Subversion on svn.debian.org.
-
- -- Christian Hammers <ch@debian.org> Tue, 1 Mar 2005 02:16:36 +0100
-
-mysql-dfsg-4.1 (4.1.10-1) unstable; urgency=low
-
- * New upstream version.
- * Upstream fixed memleak bug. Closes: #205587
- * Added debian/copyright.more for personal reference.
- * Lowered default query cache size as suggested by Arjen from MySQL.
- * Switched from log to log-bin as suggested by Arjen from MySQL.
- * Fixed typo in my.cnf (thanks to Sebastian Feltel). Closes: #295247
- * Replaced --defaults-extra-file by --defaults-file in Debian scripts
- as former lets password/host etc be overwriteable by /root/.my.cnf.
- Added socket to /etc/mysql/debian.cnf to let it work. (thanks to
- SATOH Fumiyasu). Closes: #295170
-
- -- Christian Hammers <ch@debian.org> Tue, 15 Feb 2005 23:47:02 +0100
-
-mysql-dfsg-4.1 (4.1.9-4) unstable; urgency=low
-
- * Improved the way mysqld is started and registered with update-rc.d
- in cases where the admin modifies the runlevel configuration.
- Most notably removed the debconf question whether or not mysql should
- start on when booting. Closes: #274264
- * Renamed configuration option old-passwords to the more preferred
- naming convention old_passwords. Same for some others (thanks to
- Patrice Pawlak). Closes: #293983
-
- -- Christian Hammers <ch@debian.org> Tue, 8 Feb 2005 02:21:18 +0100
-
-mysql-dfsg-4.1 (4.1.9-3) unstable; urgency=low
-
- * Renamed ca_ES.po to ca.po to reach a broader audience (thanks to
- Christian Perrier). Closes: #293786
- * Expicitly disabled mysqlfs support as it has never been enabled by
- configure during the autodetection but fails due to broken upstream
- code when users try to build the package theirselves while having
- liborbit-dev installed which triggers the mysqlfs autodetection
- (thanks to Max Kellermann). Closes: #293431
- * Added dependencies to gawk as one script does not work with original-awk
- (thanks to Petr Ferschmann). Closes: #291634
-
- -- Christian Hammers <ch@debian.org> Sun, 6 Feb 2005 23:33:11 +0100
-
-mysql-dfsg-4.1 (4.1.9-2) unstable; urgency=high
-
- * SECURITY:
- For historical reasons /usr/share/mysql/ was owned and writable by
- the user "mysql". This is a security problem as some scripts that
- are run by root are in this directory and could be modified and used
- by a malicious user who already has mysql privileges to gain full root
- rights (thanks to Matt Brubeck). Closes: #293345
- * Changed "skip-networking" to "bind-address 127.0.0.1" which is more
- compatible and not less secure but maybe even more, as less people enable
- networking for all interfaces (thanks to Arjen Lentz).
- * Enabled InnoDB by default as recommended by Arjen Lentz from MySQL.
- * Added remarks about hosts.allow to README.Debian (thanks to David
- Chappell). Closes: #291300
- * mysql-server-4.1 now provides mysql-server (thanks to Paul van den Berg).
- Closes: #287735
-
- -- Christian Hammers <ch@debian.org> Wed, 2 Feb 2005 23:31:55 +0100
-
-mysql-dfsg-4.1 (4.1.9-1) unstable; urgency=low
-
- * New upstream version.
- * mysql-client-4.1 now provides "mysql-client" so that packages depending
- on mysql-client (ca. 40) can now be used with MySQL-4.1, too.
-
- -- Christian Hammers <ch@debian.org> Sun, 23 Jan 2005 22:52:48 +0100
-
-mysql-dfsg-4.1 (4.1.8a-6) unstable; urgency=high
-
- * SECURITY:
- Javier Fernandez-Sanguino Pena from the Debian Security Audit Project
- discovered a temporary file vulnerability in the mysqlaccess script of
- MySQL that could allow an unprivileged user to let root overwrite
- arbitrary files via a symlink attack and could also could unveil the
- contents of a temporary file which might contain sensitive information.
- (CAN-2005-0004, http://lists.mysql.com/internals/20600) Closes: #291122
-
- -- Christian Hammers <ch@debian.org> Tue, 18 Jan 2005 23:11:48 +0100
-
-mysql-dfsg-4.1 (4.1.8a-5) unstable; urgency=medium
-
- * Fixed important upstream bug that causes from_unixtime(0) to return
- NULL instead of "1970-01-01 00:00:00" which fails on NOT NULL columns.
- Closes: #287792
- * Fixes upstream bug in mysql_list_fields() . Closes: #282486
- * Fixes bug that lead to double rotated logfiles when mysql-server 4.0
- was previously installed (thanks to Olaf van der Spek). Closes: #289851
- * Fixed typo in README.Debian (thanks to Mark Nipper). Closes: #289131
- * Changed max_allowed_packet in my.cnf to 16M as in 4.0.x (thanks to
- Olaf van der Spek). Closes: #289840
- * Updated French debconf translation (thanks to Christian Perrier).
- Closes: #287955
-
- -- Christian Hammers <ch@debian.org> Thu, 13 Jan 2005 01:29:05 +0100
-
-mysql-dfsg-4.1 (4.1.8a-4) unstable; urgency=low
-
- * Broken patch again :-(
-
- -- Christian Hammers <ch@debian.org> Sun, 9 Jan 2005 23:47:55 +0100
-
-mysql-dfsg-4.1 (4.1.8a-3) unstable; urgency=low
-
- * The mutex patch was a bit too x86 centric. This broke the alpha build.
-
- -- Christian Hammers <ch@debian.org> Sun, 9 Jan 2005 14:18:49 +0100
-
-mysql-dfsg-4.1 (4.1.8a-2) unstable; urgency=medium
-
- * Some Makefiles that were patched by me got overwritten by the GNU
- autotools, probably because I also patched ./configure. Fixed now,
- the critical mutex patch is now back in again. Closes: #286961
- * Added patch to make MySQL compile on ARM (thanks to Adam Majer).
- Closes: #285071
-
- -- Christian Hammers <ch@debian.org> Thu, 6 Jan 2005 09:30:13 +0100
-
-mysql-dfsg-4.1 (4.1.8a-1) unstable; urgency=medium
-
- * Upstream 4.1.8 had some problems in their GNU Autotools files so they
- released 4.1.8a. Debian's 4.1.8 was fixed by running autoreconf but this
- again overwrote MySQL changes to ltmain.sh which are supposed to fix some
- problems on uncommon architectures (maybe the FTBFS on alpha, arm, m68k
- and sparc?).
- * libmysqlclient_r.so.14 from 4.1.8-3 also missed a link dependency to
- libz which lead to unresolved symbols visible with "ldd -r" (thanks
- to Laurent Bonnaud). Closes: #287573
-
- -- Christian Hammers <ch@debian.org> Wed, 29 Dec 2004 14:26:33 +0100
-
-mysql-dfsg-4.1 (4.1.8-3) unstable; urgency=low
-
- * Fixed checking for error messages by forcing english language
- output by adding LC_ALL=C to debian-start (thanks to Rene
- Konasz) Closes: #285709
- * Fixed bashisms in Debian scripts. Closes: #286863
- * Updated Japanese Debconf translation (thanks to Hideki Yamane).
- Closes: #287003
- * Improved 4.0 to 4.1 upgrade if /var/lib/mysql is a symlink
- (thanks to Thomas Lamy). Closes: #286560
- * Added patch for FTBFS problem where no LinuxThreads can be found.
- I don't know if this still applies but it should not hurt.
- The patch is debian/patches/configure__AMD64-LinuxThreads-vs-NPTL.diff
-
- -- Christian Hammers <ch@debian.org> Sun, 26 Dec 2004 14:04:20 +0100
-
-mysql-dfsg-4.1 (4.1.8-2) unstable; urgency=low
-
- * If /var/lib/mysql is a symlink then it is kept as such.
- * Added the old-passwords option to the default my.cnf to stay
- compatible to clients that are still compiled to libmysqlclient10
- and libmysqlclient12 for licence reasons.
- * Adjusted tetex build-deps to ease backporting (thanks to Norbert
- Tretkowski from backports.org).
-
- -- Christian Hammers <ch@debian.org> Tue, 21 Dec 2004 01:00:27 +0100
-
-mysql-dfsg-4.1 (4.1.8-1) unstable; urgency=medium
-
- * New upstream version. Closes: #286175
- * Added conflict to libmysqlclient-dev (thanks to Adam Majer).
- Closes: #286538
- * Added debconf-updatepo to debian/rules:clean.
- * Updated Japanese Debconf translation (thanks to Hideki Yamane).
- Closes: #285107
- * Updated French Debconf translation (thanks to Christian Perrier).
- Closes: #285977
- * Renamed cz.po to cs.po (thanks to Miroslav Kure). Closes: #285438
- * Aplied patch for changed server notice to debian-start (thanks to
- Adam Majer). Closes: #286035
- * Changed nice value in default my.cnf as nohup changed its behaviour
- (thanks to Dariush Pietrzak). Closes: #285446
- * Increased verbosity of preinst script in cases where it cannot stop
- a running server (thanks to Jan Minar). Closes: #285982
- * Splitted the code parts of /etc/mysql/debian-start to
- /usr/share/mysql/debian-start.inc.sh (thanks to Jan Minar).
- Closes: #285988
-
- -- Christian Hammers <ch@debian.org> Mon, 20 Dec 2004 00:33:21 +0100
-
-mysql-dfsg-4.1 (4.1.7-4) unstable; urgency=medium
-
- * Removed OpenSSL support.
- After a short discussion with MySQL, I decided to drop OpenSSL support as
- 1. MySQL started shipping their binaries without it, too and do not
- seem to support it in favour of using a different library somewhen.
- 2. MySQL did not adjust their licence to grant permission to link
- against OpenSSL.
- 3. Even if they did, third parties who use libmysqlclient.so often
- do not realise licencing problems or even do not want OpenSSL.
- (thanks to Jordi Mallach and the responders to MySQL bug #6924)
- Closes: #283786
- * debian/control: Improved depends and conflicts to mysql-4.0.
-
- -- Christian Hammers <ch@debian.org> Thu, 2 Dec 2004 22:02:28 +0100
-
-mysql-dfsg-4.1 (4.1.7-3) unstable; urgency=low
-
- * Raised version to make it higher as the one in experimental.
-
- -- Christian Hammers <ch@debian.org> Wed, 1 Dec 2004 21:09:20 +0100
-
-mysql-dfsg-4.1 (4.1.7-2) unstable; urgency=low
-
- * Patched scripts/mysql_install_db so that it no longer creates a
- passwordless test database during installation (thanks to Patrick
- Schnorbus). Closes: #281158
- * Added Czech debconf translation (thanks to Miroslav Kure).
- Closes: #283222
-
- -- Christian Hammers <ch@debian.org> Wed, 1 Dec 2004 01:29:31 +0100
-
-mysql-dfsg-4.1 (4.1.7-1) unstable; urgency=low
-
- * New upstream branch!
- * Adjusted debian/control to make this package suitable to get parallel
- to version 4.0.x into unstable and sarge. The package names are
- different so that "mysql-server" still defaults to the rock-stable
- 4.0 instead to this announced-to-be-stable 4.1.
- * Added --with-mutex=i86/gcc-assemler to the Berkeley-DB configure
- to prevent the use of NPLT threads when compiling under kernel 2.6
- because the binaries are else not runable on kernel 2.4 hosts.
- Closes: #278638, #274598
-
- -- Christian Hammers <ch@debian.org> Sun, 31 Oct 2004 20:15:03 +0100
-
-mysql-dfsg (4.1.6-1) experimental; urgency=low
-
- * New upstream version.
- * Fixed symlinks in libmysqlclient-dev package. Closes: #277028
- * This time I did not update the libtool files as they were pretty
- up to date and I want to have a shorter diff file.
-
- -- Christian Hammers <ch@debian.org> Wed, 20 Oct 2004 00:07:58 +0200
-
-mysql-dfsg (4.1.5-3) experimental; urgency=low
-
- * debian/postinst: mysql_install_db changed parameter from --IN-RPM
- to --rpm which caused problems during installs. Closes: #276320
-
- -- Christian Hammers <ch@debian.org> Sat, 16 Oct 2004 20:36:46 +0200
-
-mysql-dfsg (4.1.5-2) experimental; urgency=low
-
- * Activated support for ndb clustering (thanks to Kevin M. Rosenberg).
- Closes: #275109
-
- -- Christian Hammers <ch@debian.org> Wed, 6 Oct 2004 01:58:00 +0200
-
-mysql-dfsg (4.1.5-1) experimental; urgency=low
-
- * WARNING:
- The upstream branch 4.1 is still considered BETA.
- The Debian packages for 4.1 were done without big testing. If you miss
- a new functionality or binary, contact me and I check add the relevant
- configure option or include the program.
- * New MAJOR upstream version.
- Thanks to the great demand here's now the first MySQL 4.1 experimental
- release. FEEDBACK IS WELCOME.
- * 4.0->4.1 notes:
- - debian/patches/alpha.diff could not be applied, I fix that later
- - debian/patches/scripts__mysql_install_db.sh.diff was obsolete
- - debian/patches/scripts__Makefile.in was neccessary due to a dependency
- to the removed non-free Docs/ directory. Upstream has been contacted.
- - Build-Deps: += automake1.7
- - debian/rules: embedded servers examples did not compile, removed
-
- -- Christian Hammers <ch@debian.org> Sun, 26 Sep 2004 19:46:47 +0200
-
-mysql-dfsg (4.0.21-3) unstable; urgency=low
-
- * Upstream tried to fix a security bug in mysqlhotcopy and broke it :-)
- Applied a patch (see debian/patches) from Martin Pitt. Closes: #271632
- * Between 4.0.20 and 4.0.21 the Debian specific changes in
- /usr/bin/mysqld_safe that piped the error log to syslog got lost
- and are now back again.
- * Fixed capitalization in debconf headings.
- * Changed wording of the initscript status message to make heartbeat
- happier. Closes: #271591
-
- -- Christian Hammers <ch@debian.org> Fri, 17 Sep 2004 18:42:25 +0200
-
-mysql-dfsg (4.0.21-2) unstable; urgency=medium
-
- * The dependencies between mysql-client and libmysqlclient12 were
- too loose, when upgrading only the client this can lead to non working
- binaries due to relocation errors (thanks to Dominic Cleal).
- Closes: #271803
- * Fixed typo in mysqldump.1 manpage (thanks to Nicolas Francois).
- Closes: #271334
-
- -- Christian Hammers <ch@debian.org> Wed, 15 Sep 2004 15:38:11 +0200
-
-mysql-dfsg (4.0.21-1) unstable; urgency=high
-
- * SECURITY:
- This upstream version fixes some security problems that might at least
- allow a DoS attack on the server.
- * Fixed an old bug in concurrent accesses to `MERGE' tables (even
- one `MERGE' table and `MyISAM' tables), that could've resulted in
- a crash or hang of the server. (Bug #2408)
- * Fixed bug in privilege checking where, under some conditions, one
- was able to grant privileges on the database, he has no privileges
- on. (Bug #3933)
- * Fixed crash in `MATCH ... AGAINST()' on a phrase search operator
- with a missing closing double quote. (Bug #3870)
- * Fixed potential memory overrun in `mysql_real_connect()' (which
- required a compromised DNS server and certain operating systems).
- (Bug #4017)
- * New upstream version.
- * Fixes bug that made x="foo" in WHERE sometimes the same as x="foo ".
- Closes: #211618
- * Updated Japanese Debconf translation (thanks to Hideki Yamane).
- Closes: #271097
-
- -- Christian Hammers <ch@debian.org> Sat, 11 Sep 2004 23:15:44 +0200
-
-mysql-dfsg (4.0.20-14) unstable; urgency=low
-
- * Dave Rolsky spottet that -DBIG_JOINS was not properly enabled.
- It allowes joining 64 instead of an 32 tables to join.
-
- -- Christian Hammers <ch@debian.org> Thu, 9 Sep 2004 20:24:02 +0200
-
-mysql-dfsg (4.0.20-13) unstable; urgency=medium
-
- * Fixed a bug in the initscript which caused the check for not properly
- closed i.e. corrupt tables that is executed when the server starts
- not to run in background as supposed.
- Although the check does not repair anything on servers with several
- thousand tables the script was reported to take some minutes which
- is quite annoying. (Thanks to Jakob Goldbach). Closes: #270800
-
- -- Christian Hammers <ch@debian.org> Thu, 9 Sep 2004 17:11:05 +0200
-
-mysql-dfsg (4.0.20-12) unstable; urgency=medium
-
- * Filter messages regarding table handles that do not support CHECK TABLE
- in the script that checks for corrupted tables on every start which lead
- to unnecessary mails (thanks to David Everly). Closes: #269811
- * Added a note to the corrupt-table-check mail which notes that a
- false-positive is reported in the case that immediately after starting
- the server a client starts using a table (thanks to Uwe Kappe).
- Closes: #269985
- * Added "quote-names" as default to the [mysqldump] section in
- /etc/mysql/my.cnf as too many users stumble over dump files that
- could not be read in again due to the valid use of reserved words
- as table names. This has also be done by upstream in 4.1.1 and has
- no known drawbacks. Closes: #269865
- * Binary logs can now be rotated as well. Defaults to off, though, for
- compatibilty reasons (thanks to Mark Ferlatte). Closes: #94230, #269110
- * The mysql user "debian-sys-maint" now gets all possible rights which
- makes binary logging possible and helps other package maintainer who
- wants to use it to create package specific databases and users.
- * Added example how to change daemon nice level via /etc/mysql/my.cnf
- * Updated French debconf translations (thanks to Christian Perrier).
- Closes: #265811
- * Renamed options in the default config file that still had old names
- (thanks to Yves Kreis). Closes: #266445
- * Fixed spelling in debconf note.
- * Added -l and -L to dh_shlibdeps.
-
- -- Christian Hammers <ch@debian.org> Fri, 3 Sep 2004 20:10:46 +0200
-
-mysql-dfsg (4.0.20-11) unstable; urgency=high
-
- * SECURITY
- This version fixes a security flaw in mysqlhotcopy which created
- temporary files in /tmp which had predictable filenames and such
- could be used for a tempfile run attack.
- The issue has been recorded as CAN-2004-0457.
-
- -- Christian Hammers <ch@debian.org> Sat, 14 Aug 2004 18:27:19 +0200
-
-mysql-dfsg (4.0.20-10) unstable; urgency=low
-
- * MySQL finally updated their copyright page and installed v1.5 of
- the "Free/Libre and Open Source Software License (FLOSS) - Exception"
- which will hopefully end the license hell they created by putting the
- client libraries under GPL instead of LGPL which conflicts with PHP and
- other software that used to link against MySQL.
- The license text is not yet in any release MySQL version but visible
- on their web site and copied into the debian/copyright file.
- Special thanks to Zak Greant <zak@mysql.com> and the debian-legal list
- for helping to solve this release critical problem.
- Closes: #242449
- * Updated Brazil debconf translation (thanks to Andre Luis Lopes).
- Closes: #264233
- * Updated Japanese debconf translation (thanks to Hideki Yamane).
- Closes: #264620
- * Fixed minor typo in debconf description (thanks to TROJETTE Mohammed
- Adnene). Closes: #264840
- * Improved init and preinst script which now detects stalled servers which
- do no longer communicate but are present in the process list (thanks to
- Henrik Johansson). Closes: #263215
-
- -- Christian Hammers <ch@debian.org> Mon, 9 Aug 2004 19:44:28 +0200
-
-mysql-dfsg (4.0.20-9) unstable; urgency=medium
-
- * Partly reverted the last patch which gave the mysql-user
- "debian-sys-maint" more rights as there are old versions of MySQL which
- have fewer privlige columns. Now only those are set (thanks to Alan Tam).
- Closes: #263111
-
- -- Christian Hammers <ch@debian.org> Tue, 3 Aug 2004 13:03:02 +0200
-
-mysql-dfsg (4.0.20-8) unstable; urgency=low
-
- * The mysqlcheck that is started from the initscript will now be
- backgrounded because it might else prevent the boot process to continue.
- It also now notifies root by mail and syslog if a table is corrupt.
- * The "debian-sys-maint" MySQL user now has almost full rights so that other
- packages might use this account to create databases and user (thanks to
- Andreas Barth). Closes: #262541
- * Added paranoid rules for logcheck.
-
- -- Christian Hammers <ch@debian.org> Sun, 1 Aug 2004 21:00:55 +0200
-
-mysql-dfsg (4.0.20-8) unstable; urgency=low
-
- * Upload stalled. Not released.
-
- -- Christian Hammers <ch@debian.org> Sun, 1 Aug 2004 20:27:55 +0200
-
-mysql-dfsg (4.0.20-7) unstable; urgency=medium
-
- * Solved the upstream bug that error messages of the server are written
- in a file that is then rotated away leaving mysqld logging effectively
- to /dev/null. It now logs to a /usr/bin/logger process which puts the
- messages into the syslog.
- Modified files: /etc/init.d/mysql, /usr/bin/mysqld_safe and the
- logchecker files. Closes: #254070
- * The initscript does no longer call mysqlcheck directly but via
- /etc/mysql/debian-start which is a user customizable config script.
- * Splitted the debconf "install and update notes" and only show them
- when it is appropriate (thanks to Steve Langasek). Closes: #240515
- * Added NEWS.Debian.
- * Added hint to -DBIG_ROWS, which is currently not used, to README.Debian.
- * Corrected typo in myisampack manpage (thanks to Marc Lehmann).
- Closes: #207090
- * Added Catalan debconf translation (thanks to Aleix Badia i Bosch).
- Closes: #236651
-
- -- Christian Hammers <ch@debian.org> Wed, 28 Jul 2004 01:41:51 +0200
-
-mysql-dfsg (4.0.20-6) unstable; urgency=low
-
- * The build arch detected by configure was "pc-linux-gnu (i686)"
- instead of "pc-linux-gnu (i386)". Was no problem AFAIK but
- Adam Majer asked me to explicitly change it to i386. Closes: #261382
- * Removed some unused shell scripts from /usr/share/mysql.
- * Added lintian overrides.
- * Removed rpath by using chrpath.
-
- -- Christian Hammers <ch@debian.org> Mon, 26 Jul 2004 00:17:12 +0200
-
-mysql-dfsg (4.0.20-5) unstable; urgency=medium
-
- * The mysqlcheck in the init script is only called when the server
- is really alive. Also, the mysql-user 'debian-sys-maint' now has
- global select rights (thanks to Nathan Poznick). Closes: #261130
- * Moved the debconf question whether to remove the databases or not
- from mysql-server.config to mysql-server.postrm so that it shows
- up on purge time and not months earlier (thanks to Wouter Verhelst).
- Closes: #251838
-
- -- Christian Hammers <ch@debian.org> Fri, 23 Jul 2004 22:41:13 +0200
-
-mysql-dfsg (4.0.20-4) unstable; urgency=low
-
- * Added a "mysqlcheck -A --fast" to the 'start' section of the
- init script to help admins detect corrupt tables after a server crash.
- Currently it exists with an error message but leaves the server
- running. Feedback appreciated!
- * Made postinst script more robust by calling db_stop earlier and
- so prevent pipe-deadlocks.
- * Fixed minor typos in initscript (thanks to "C.Y.M."). Closes: 259518
- * Added the undocumented "-DBIG_JOINS" that MySQL apparently uses in
- their MAX binaries. It enables 62 instead of 30 tables in a "join".
- (thanks to Dave Rolsky). Closes: #260843
- * Added a "df --portability /var/lib/mysql/." check to the preinst
- script as users experienced hard to kill hanging mysqlds in such
- a situation (thanks to Vaidas Pilkauskas). Closes: #260306
-
- -- Christian Hammers <ch@debian.org> Fri, 23 Jul 2004 00:51:32 +0200
-
-mysql-dfsg (4.0.20-3) unstable; urgency=low
-
- * Improved tolerance if the init script has been deleted (thanks to
- Leonid Shulov for spotting the problem).
- * Minor wording changes to README.Debian generalizing /root/ by $HOME
- (thanks to Santiago Vila). Closes: #257725
- * Added Japanese debconf translation (thanks to Hideki Yamane).
- Closes: #256485
- * Fixed commend in my.cnf regarding logfile directory (thanks to Jayen
- Ashar). Closes: #253434
- * Correted "ease to" by "ease of" in package description (thanks to
- Johannes Berg). Closes: #253510
-
- -- Christian Hammers <ch@debian.org> Fri, 9 Jul 2004 00:57:42 +0200
-
-mysql-dfsg (4.0.20-2) unstable; urgency=low
-
- * Removed RPM .spec file from the included documentation as it is pretty
- useless (thanks to Loic Minier).
- * Added turkish debconf translation (thanks to Recai Oktas). Closes: #252802
-
- -- Christian Hammers <ch@debian.org> Sun, 6 Jun 2004 14:48:26 +0200
-
-mysql-dfsg (4.0.20-1) unstable; urgency=low
-
- * New upstream version.
-
- -- Christian Hammers <ch@debian.org> Mon, 31 May 2004 23:36:39 +0200
-
-mysql-dfsg (4.0.18-8) unstable; urgency=low
-
- * Updated french translation (thanks to Christian Perrier). Closes: #246789
-
- -- Christian Hammers <ch@debian.org> Tue, 4 May 2004 23:26:54 +0200
-
-mysql-dfsg (4.0.18-7) unstable; urgency=low
-
- * Added CVE ids for the recent security fixes.
- 4.0.18-4 is CAN-2004-0381 (mysqlbug) and
- 4.0.18-6 is CAN-2004-0388 (mysql_multi)
-
- -- Christian Hammers <ch@debian.org> Mon, 19 Apr 2004 18:32:03 +0200
-
-mysql-dfsg (4.0.18-6) unstable; urgency=medium
-
- * SECURITY:
- Fixed minor tempfile-run security problem in mysqld_multi.
- Unprivileged users could create symlinks to files which were then
- unknowingly overwritten by run when this script gets executed.
- Upstream informed. Thanks to Martin Schulze for finding this.
-
- -- Christian Hammers <ch@debian.org> Wed, 7 Apr 2004 01:28:22 +0200
-
-mysql-dfsg (4.0.18-5) unstable; urgency=low
-
- * Little improvements in debian scripts for last upload.
- * Added check to logrotate script for the case that a mysql
- server is running but not be accessible with the username and
- password from /etc/mysql/debian.conf (thanks to Jeffrey W. Baker).
- Closes: 239421
-
- -- Christian Hammers <ch@debian.org> Sun, 4 Apr 2004 15:27:40 +0200
-
-mysql-dfsg (4.0.18-4) unstable; urgency=medium
-
- * SECURITY:
- Aplied fix for unprobable tempfile-symlink security problem in
- mysqlbug reported by Shaun Colley on bugtraq on 2004-03-24.
- * Updated french debconf translation (thanks to Christian Perrier).
- Closes: #236878
- * Updated portugesian debconf translation (thanks to Nuno Senica).
- Closes: #239168
- * Updated german debconf translation (thanks to Alwin Meschede).
- Closes: #241749
- * Improved debconf template regarding fix_privileges_tables (thanks
- to Matt Zimmermann for suggestions). Closes: #219400
- * Improved README.Debian regarding to password settings (thanks to
- Yann Dirson). Closes: #241328
-
- -- Christian Hammers <ch@debian.org> Sat, 3 Apr 2004 19:52:15 +0200
-
-mysql-dfsg (4.0.18-3) unstable; urgency=medium
-
- * Added Build-Depend to po-debconf to let it build everywhere.
-
- -- Christian Hammers <ch@debian.org> Wed, 31 Mar 2004 23:43:33 +0200
-
-mysql-dfsg (4.0.18-2) unstable; urgency=low
-
- * Added a "2>/dev/null" to a "which" command as there are two
- "which" versions in Debian of which one needs it. Closes: #235363
-
- -- Christian Hammers <ch@debian.org> Tue, 2 Mar 2004 23:31:28 +0100
-
-mysql-dfsg (4.0.18-1) unstable; urgency=low
-
- * New upstream version.
- * Should now compile and run on ia64 (thanks to Thorsten Werner and
- David Mosberger-Tang). Closes: #226863 #228834
- * Converted init scripts to invoce-rc.d (thanks to Erich Schubert).
- Closes: 232118
- * Secondlast upload changed logfile location. Closes: #182655
- * Updated Brasilian translation (thanks to Andre Luis Lopes). Closes:
- #219847
-
- -- Christian Hammers <ch@debian.org> Tue, 17 Feb 2004 23:44:58 +0100
-
-mysql-dfsg (4.0.17-2) unstable; urgency=low
-
- * Improved manpage for mysqldumpslow.1 (thanks to Anthony DeRobertis).
- Closes: #231039
- * Improved stopping of crashed daemons in init script (thanks to
- Matthias Urlichs). Closes: #230327
-
- -- Christian Hammers <ch@debian.org> Mon, 9 Feb 2004 21:54:29 +0100
-
-mysql-dfsg (4.0.17-1) unstable; urgency=low
-
- * Made logging into /var/log/mysql/ the default. Closes: #225206
-
- * New upstream version. Closes: #225028
- * Turned on a 25MB query cache by default (thanks to Cyril Bouthors).
- Closes: #226789
- * Updated russian translation (thanks to Ilgiz Kalmetev). Closes: #219263
- * Upstream fixes the problem that AND was not commutative (thanks for
- Iain D Broadfoot for mentioning). Closes: #227927
- * Fixed minor typo in my.cnf comments (thanks to James Renken).
- Closes: #221496
- * Better documents regex. Closes: #214952
- * Fixed minor germanism in debconf template (thanks to Marc Haber).
- Closes: #224148
- * Added explaining comment to my.cnf regarding quoted passwords
- (Thanks to Patrick von der Hagen). Closes: #224906
- * Changed "find -exec" to "find -print0 | xargs -0" in preinst to
- speed it up. Thanks to Cyril Bouthors. Closes: #220229
-
- -- Christian Hammers <ch@debian.org> Sun, 18 Jan 2004 16:16:25 +0100
-
-mysql-dfsg (4.0.16-2) unstable; urgency=low
-
- * Tried to repair undefined weak symbols by adding a little Makefile
- patch. Closes: #215973
-
- -- Christian Hammers <ch@debian.org> Mon, 27 Oct 2003 22:52:10 +0100
-
-mysql-dfsg (4.0.16-1) unstable; urgency=low
-
- * New upstream release.
- (Mostly little memory problems and other bugfixes it seems)
- * Replaced "." by ":" in chown calls to comply with the env setting
- "_POSIX2_VERSION=2000112" (thanks to Robert Luberda). Closes: #217399
- * Adjusted syntax in my.cnf to 4.x standard (thanks to Guillaume Plessis).
- Closes: #217273
- * Improved README.Debian password instructions (thanks to Levi Waldron).
- Closes: #215046
- * Improved NIS warning debconf-template (thanks to Jeff Breidenbach).
- Closes: #215791
- * Explicitly added libssl-dev to the libmysqlclient-dev package as it
- is needed for mysql_config and the libmysqlclient package only depends
- on libssl which has no unnumbered .so version (thanks to Simon Peter
- and Davor Ocelic). Closes: #214436, #216162
- * Added "-lwrap" to "mysql_config --libmysqld-libs" and filed it as
- upstream bug #1650 (thanks to Noah Levitt). Closes: #214636
-
- -- Christian Hammers <ch@debian.org> Sat, 25 Oct 2003 01:09:27 +0200
-
-mysql-dfsg (4.0.15a-1) unstable; urgency=low
-
- * Same package as 4.0.15-2 but I could not convince the Debian
- installer to move the packages out of incoming.
-
- -- Christian Hammers <ch@debian.org> Tue, 7 Oct 2003 15:10:26 +0200
-
-mysql-dfsg (4.0.15-2) unstable; urgency=low
-
- * Updated package description (thanks to Adrian Bunk). Closes: #210988
- * Fixed small typos in manpages (thanks to Nicolas Francois).
- Closes: #211983
- * More updates to package description (thanks to Matthias Lutz/ddtp).
- Closes: #213456
- * Updated standards to 3.6.1.
- * Closes "new 4.0.15 available" bug. Closes: #213349
- * Updated README.Debian with notes regarding the MySQL manual section
- "2.4 Post-installation Setup and Testing" (thanks to Daniel B.).
- Closes: #210841
-
- -- Christian Hammers <ch@debian.org> Fri, 3 Oct 2003 15:59:39 +0200
-
-mysql-dfsg (4.0.15-1) unstable; urgency=high
-
- * SECURITY:
- Users who are able to use the "ALTER TABLE" command on the "mysql"
- database may be able to exploit this vulnerability to gain a shell with
- the privileges of the mysql server (usually running as the 'mysql' user).
- Closes: #210403
- * Fixes small description typos (thanks to Oscar Jarkvik).
- * Updated Brazilian Portuguese debconf translation. (thanks to Andre Luis
- Lopes). Closes: 208030
- * Replaced depricated '.' by ':' in chown (thanks to Matt Zimmerman).
- * Fixed manpage typo (thanks to Marc Lehmann). Closes: #207090
-
- -- Christian Hammers <ch@debian.org> Fri, 3 Oct 2003 15:59:35 +0200
-
-mysql-dfsg (4.0.14-1) unstable; urgency=low
-
- * New upstream version.
-
- -- Christian Hammers <ch@debian.org> Sun, 24 Aug 2003 16:40:36 +0200
-
-mysql-dfsg (4.0.13-3) unstable; urgency=low
-
- * Now start mysqld as default unless you choose not when configurig
- with debconf priority low. So packages depending on the server when
- installing can access it. Thanks Matt Zimmermann (Closes: #200277)
- * Made mysql-server de-installable if the config and database files were
- removed by hand before. Thanks to Ard van Breemen (Closes: #200304)
-
- -- Christian Hammers <ch@debian.org> Tue, 8 Jul 2003 22:30:40 +0200
-
-mysql-dfsg (4.0.13-2) unstable; urgency=low
-
- * Added "nice" option for mysqld_safe to give mysqld a different priority.
- Submitted to upstream as MySQL Bug #627. Closes: #192087
- * Fixed possible unbound variable in init script. Closes: #194621
- * Fixed french debconf translation (thx Christian Perrier) Closes: #194739
- * Get rid of automake1.5 (for Eric Dorland).
-
- -- Christian Hammers <ch@debian.org> Wed, 11 Jun 2003 18:58:32 +0200
-
-mysql-dfsg (4.0.13-1) unstable; urgency=medium
-
- * New upstream version.
- !!! Fixes a very bad natural join bug which justifies the urgency=medium.
- !!! http://bugs.mysql.com/bug.php?id=291
- * Fixed mysql_fix_privileges manpage (Frederic Briere) Closes: #191776
- * preinst: "which" is more chatty normal executable than as builtin.
- (Thanks to David B Harris). Closes: #188659
-
- -- Christian Hammers <ch@debian.org> Tue, 6 May 2003 22:03:45 +0200
-
-mysql-dfsg (4.0.12-3) unstable; urgency=medium
-
- * Reincluded new way of creating my debian-sys-maint user from
- an old release from experimental. Now works again with old
- and new privilege table format. (Thanks to Vincent Danjean
- for spotting the problem) Closes: #188201
- * Reincluded hurd build dependency fix from 3.23 branch.
- (Thanks to Robert Millan). Closes: #185929
- * Fixed soname in libmysqlclient-dev. Closes: #188160
- * Remove /var/log/mysql/ when purging the package. Closes: #188064
- * Removed /usr/share/doc/mysql/ from mysql-server. Closes: #188066
- * Let group "adm" be able to read logfiles. Closes: #188067
- * Do not call usermod on every upgrade. Closes: #188248
- (Thanks to Philippe Troin for the last three)
- * Fixed mysql-server.preinst so that it works on shells where
- which is a builtin, too. (Thanks to Erich Schubert) Closes: #181525
-
- -- Christian Hammers <ch@debian.org> Fri, 11 Apr 2003 11:32:45 +0200
-
-mysql-dfsg (4.0.12-2) unstable; urgency=low
-
- *
- * NEW MAJOR UPSTREAM RELEASE:
- *
- MySQL 4 has finally been declared as 'stable'. Hurray! Read changelogs.
- Thanks to all testers, esp. Jose Luis Tallon, of the versions
- that were in the "experimental" section before.
- * Modified postinst script to run mysql_fix_privileges on every update.
- IMPORTANT: Please report if this breaks anything, it is not supposed to.
- * Wrote a SSL-MINI-HOWTO.txt!
- * Added zlib1g-dev to libmysqlclient12-dev. Closes: 186656
- * Changed section of libmysqlclient12-dev to libdevel.
- * Added even more selfwritten manpages.
- * Fixed typos.
-
- -- Christian Hammers <ch@debian.org> Sun, 6 Apr 2003 13:47:32 +0200
-
-mysql-dfsg (4.0.10.gamma-1) experimental; urgency=low
-
- * New upstream version.
- * They merged some of my patches from debian/patches. Whoa!
- * This release should fix the error-logfile problem where mysqld
- keeps the error.log open while logrotate removes it.
-
- -- Christian Hammers <ch@debian.org> Wed, 12 Feb 2003 22:39:48 +0100
-
-mysql-dfsg (4.0.9.gamma-1) experimental; urgency=low
-
- * New upstream version.
- * Updated the GNU autoconf files to make building on MIPS work.
- See bug #176829.
-
- -- Christian Hammers <ch@debian.org> Wed, 29 Jan 2003 22:07:44 +0100
-
-mysql-dfsg (4.0.8.gamma-1) experimental; urgency=low
-
- * New upstream release.
- * Improved logging of init script. Closes: #174790
- * We have now libmysqlclient.so.12 instead of .11.
-
- -- Christian Hammers <ch@debian.org> Thu, 9 Jan 2003 20:14:11 +0100
-
-mysql-dfsg (4.0.7.gamma-1) experimental; urgency=high
-
- * SECURITY: This version fixes an upstream security release that is only
- present in the 4.x branch which is currently only in the
- experimental distribution and therefore will not get a DSA.
- * New upstream release.
-
- -- Christian Hammers <ch@debian.org> Sat, 28 Dec 2002 15:51:39 +0100
-
-mysql-dfsg (4.0.6.gamma-2) experimental; urgency=low
-
- * Added --system to addgroup. Closes: #173866
-
- -- Christian Hammers <ch@debian.org> Sat, 21 Dec 2002 15:28:26 +0100
-
-mysql-dfsg (4.0.6.gamma-1) experimental; urgency=low
-
- * New upstream version. Now Gamma!
- * There are no longer changes to the .orig.tar.gz neccessary to make diff
- happy. docs/ has still to be deleted, although, as it is non-free.
- * Incorporated patches from unstable.
- * Added mysqlmanager and a couple of other new scripts.
- * Enabled libmysqld embedded server library.
- * Enabled SSL and Virtual-IO support.
- (CORBA based MySQL-FS seems to be not existing..)
-
- -- Christian Hammers <ch@debian.org> Fri, 20 Dec 2002 22:30:51 +0100
-
-mysql-dfsg (4.0.5a.beta-3) experimental; urgency=low
-
- * Modified postinst to work with old and new mysql.user table format
- and fixed spelling typo in postinst. Thanks to Roger Aich.
- * Updated config.{guess,sub} to make the mipsel porters happy.
- Thanks to Ryan Murray. Closes: #173553
-
- -- Christian Hammers <ch@debian.org> Wed, 18 Dec 2002 15:56:34 +0100
-
-mysql-dfsg (4.0.5a.beta-2) experimental; urgency=low
-
- * Upstream removed option "--skip-gemini". So did I. Closes: 173142
-
- -- Christian Hammers <ch@debian.org> Tue, 17 Dec 2002 10:35:49 +0100
-
-mysql-dfsg (4.0.5a.beta-1) experimental; urgency=low
-
- * First 4.x experimental package due to continuous user requests :-)
- Please test and report!
- * upstream: safe_mysqld has been renamed to mysqld_safe
- * upstream: new library soname version libmysqlclient.so.11
- * Renamed libmysqlclientXX-dev to libmysqlclient-dev as I don't plan to
- support more than one development environment and this makes the
- dependencies easier.
- * FIXME: Skipped parts of the debian/patches/alpha patch as the global.h
- is not existing.
- * FIXME: How to get rid this? Old ltconfig patch already applied.
- "lintian: binary-or-shlib-defines-rpath ./usr/bin/mysql /usr/lib/mysql"
-
- -- Christian Hammers <ch@debian.org> Sun, 1 Dec 2002 18:32:32 +0100
-
-mysql-dfsg (3.23.53-4) unstable; urgency=medium
-
- * Fixed errno.h problem. Closes: #168533, #168535
-
- -- Christian Hammers <ch@debian.org> Sun, 10 Nov 2002 18:32:08 +0100
-
-mysql-dfsg (3.23.53-3) unstable; urgency=medium
-
- * Changed automake build-dep to unversioned automake1.4. Closes: #166391
- * Fixed description. Closes: #167270
- (Thanks to Soren Boll Overgaard)
-
- -- Christian Hammers <ch@debian.org> Tue, 5 Nov 2002 01:25:01 +0100
-
-mysql-dfsg (3.23.53-2) unstable; urgency=low
-
- * Reverted user creation in init scripts. Closes: #166432
- (Thanks to Birzan George Cristian)
-
- -- Christian Hammers <ch@debian.org> Thu, 31 Oct 2002 15:36:25 +0100
-
-mysql-dfsg (3.23.53-1) unstable; urgency=low
-
- * New upstream release.
-
- -- Christian Hammers <ch@debian.org> Thu, 24 Oct 2002 23:04:16 +0200
-
-mysql-dfsg (3.23.52-3) unstable; urgency=low
-
- * Substituted the first-install 'debian-sys-maint' user creation by
- something ANSI SQL compliant. Closes: #163497
- (Thanks to Karl Hammar)
- * Tightend dependency to debhelper (>= 4.0.12) to be sure that
- debconf-utils gets installed, too, as I use dh_installdebconf.
- * Fixed upstream manpage bug in mysqldump.1. Closes: #159779
- (Thanks to Colin Watson)
- * Added comment about MIN_WORD_LEN to mysql-server.README.Debian
- (Thanks to Philipp Dreimann)
- * Added a dependency for zlib1g-dev to libmysqlclient10-dev.
- (Thanks to Jordi Mallach)
-
- -- Christian Hammers <ch@debian.org> Sun, 15 Sep 2002 17:14:44 +0200
-
-mysql-dfsg (3.23.52-2) unstable; urgency=low
-
- * Fixed typo in preinst scripts.
- * Removed bashism in init script.
- * Fixed ambiguous debconf example. Closes: #158884
-
- -- Christian Hammers <ch@debian.org> Fri, 30 Aug 2002 00:51:29 +0200
-
-mysql-dfsg (3.23.52-1) unstable; urgency=low
-
- * New upstream version. Closes: #157731
- * Clearified the meaning of the debian-sys-maint special user in the
- README.Debian file. Closes: #153702
- * Wrote some words regarding the skip-networking in README.Debian.
- Closes: #157038
- * Added dependency to passwd.
- * Fixes typo and unnecessarily complication in is_mysql_alive().
- * Added check for /etc/mysql/my.cnf in init script.
-
- -- Christian Hammers <ch@debian.org> Tue, 27 Aug 2002 01:53:32 +0200
-
-mysql-dfsg (3.23.51-4) unstable; urgency=low
-
- * Added a compressed "nm mysqld" output to allow people to trace
- core dumps with /usr/bin/resolve_stack_dump as suggested in the
- INSTALL-SOURCE file. Thanks to atudor@labs.agilent.com for the hint.
-
- -- Christian Hammers <ch@debian.org> Wed, 24 Jul 2002 20:44:55 +0200
-
-mysql-dfsg (3.23.51-3) unstable; urgency=low
-
- * Corrected copyright file: the MySQL client library is licenced under
- the LGPL-2 not the GPL. From version 4.x it actually will be GPL this
- is why parts of http://www.mysql.com/ already say so. Closes: #153591
- * Corrected german translation.
- Thanks to Roland Rosenfeld <roland@spinnaker.de>. Closes: #151903
-
- -- Christian Hammers <ch@debian.org> Thu, 11 Jul 2002 20:32:28 +0200
-
-mysql-dfsg (3.23.51-2) unstable; urgency=low
-
- * Improved NIS tolerance in preinst script.
-
- -- Christian Hammers <ch@debian.org> Sun, 7 Jul 2002 04:43:28 +0200
-
-mysql-dfsg (3.23.51-1) unstable; urgency=medium
-
- * New upstream version.
- * I applied a patch that fixes a binary imcompatibility in
- the shared libary libmysqlclient.so.10 between 3.23.50 and
- some versions earlier. Upstream has been contacted and asked
- for clarification. Closes: #149952
- * Added support for NIS i.e. it shows a warning and fails if the
- needed 'mysql' user does not exists but works if it does.
- Closes: #143282, #147869
- * Substituted $0 in init scripts by something really weird so that
- "./S20mysql restart" works now, too. (BTW: S20? install file-rc!!!)
- Closes: #148658
- * Now postinst works even if /etc/init.d/mysql is removed. Closes: #151021
- * Decided to leave "set +x" in postinst but wrote comment. Closes: #151022
-
- -- Christian Hammers <ch@debian.org> Sun, 7 Jul 2002 04:43:25 +0200
-
-mysql-dfsg (3.23.50-1) unstable; urgency=medium
-
- * New upstream version.
- Fixes a very annoying and important bug that lets all mysql programs
- including perl scripts etc. segfault when using the read_default_group()
- function. 3.23.50 is currently a pre-release and expected to be released
- next week. I plan to propose it for woody as soon as its stability has
- been proven. The following bug reports are all regarding this issue.
- Closes: #144960, #145322, #136798, #138143,
-
- -- Christian Hammers <ch@debian.org> Sat, 18 May 2002 21:14:01 +0200
-
-mysql-dfsg (3.23.49x-1) unstable; urgency=low
-
- * I had to split the package to seperate the manual as it is not GPL
- like the rest of the software and docs but under a license that
- e.g. forbids selling printed versions.
- .
- The upstream authors were contacted a while ago but did not like to
- change the situation.
- .
- The names of the resulting packages have not changed as the manual
- already was in a seperate mysql-doc package due to it's size.
- The source packages are now splitted from one "mysql" to
- "mysql-dfsg" in main and "mysql-nonfree" in non-free.
- * No code change!
- The "x" at the end of the version number ist just to be able to
- upload a new source package. ("a" was already taken by upstream
- for their binary upload correction)
-
- -- Christian Hammers <ch@debian.org> Wed, 8 May 2002 02:01:41 +0200
-
-mysql (3.23.49-8) unstable; urgency=low
-
- * Substituted $0 in init script to let e.g. "/etc# ./init.d/mysql restart"
- works, too. Closes: #141555
-
- -- Christian Hammers <ch@debian.org> Sun, 7 Apr 2002 15:00:44 +0200
-
-mysql (3.23.49-7) unstable; urgency=low
-
- * The Makefiles are totally broken for the --enable-local-infile
- option. I now patched libmysql/libmysql.c#mysql_init() manually.
- Closes: #138347
-
- -- Christian Hammers <ch@debian.org> Fri, 29 Mar 2002 23:55:15 +0100
-
-mysql (3.23.49-6) unstable; urgency=low
-
- * Moved mysqlcheck from server to client package. Closes: #139799
- * Added manpage for mysqlhotcopy. Regarding: #87097
- * Added 'sharedscripts' directive to the logrotate script.
- * Replaced grep by /usr/bin/getent to let the group/user checking work
- on NIS/LDAP systems, too. Closes: #115677, #101529
-
- -- Christian Hammers <ch@debian.org> Fri, 22 Mar 2002 22:40:51 +0100
-
-mysql (3.23.49-5) unstable; urgency=low
-
- * Added skip-innodb to default my.cnf.
- * Enabled --enable-local-infile, it seems to be a new option that
- defaults to disable a formerly enabled feaure. Closes: #137115
-
- -- Christian Hammers <ch@debian.org> Sat, 16 Mar 2002 00:29:10 +0100
-
-mysql (3.23.49-4) unstable; urgency=medium
-
- * Recompiled against fixed libz.
-
- * Enabled --enable-local-infile, it seems to be a new option that
- defaults to disable a formerly enabled feaure. Closes: #137115
- * Fixed README.compile_on_potato. Closes: #136529
- * Now a ext3 .jounal file in /var/lib/mysql does not prevent the
- installation (happens when creating a jounal on an already mounted
- partition). Closes: #137146
-
- -- Christian Hammers <ch@debian.org> Wed, 13 Mar 2002 13:34:24 +0100
-
-mysql (3.23.49-3) unstable; urgency=low
-
- * Added Russian translation. Closes: #135846
- * Fixed installation of .info documents. Closes: #135030
-
- -- Christian Hammers <ch@debian.org> Wed, 27 Feb 2002 23:36:35 +0100
-
-mysql (3.23.49-2) unstable; urgency=low
-
- * Updated french translation and split template files. Closes: #134754
- * Fixed a small debian.cnf related bug in mysql-server.postinst.
-
- -- Christian Hammers <ch@debian.org> Tue, 19 Feb 2002 23:13:58 +0100
-
-mysql (3.23.49-1) unstable; urgency=low
-
- * New upstream release.
- (Mainly InnoDB related fixes)
- * Exported a $HOME variable in the scripts so that /root/.my.cnf
- is not read anymore. This will avoid problems when admins put
- only passwords but no usernames in this file. Closes: #132048
- * New debian-sys-maint password algorithm (now ~96bit :-)) Closes: #133863
- * Recreating debian-sys-main pwd on every install to help people who
- accidently delete user or password files...
- * Added /var/log/mysql so that user can put the binary logs in there as
- mysql cannot write the .001 etc files itself in /var/log which is
- owned by root.
-
- -- Christian Hammers <ch@debian.org> Thu, 14 Feb 2002 22:17:45 +0100
-
-mysql (3.23.47-6) unstable; urgency=low
-
- * Dropped a sentence about the new debian-sys-maint user in the
- debconf note and updated the README.Debian. Related: #132048
- * Added more french translation. Closes: #132390
-
- -- Christian Hammers <ch@debian.org> Wed, 6 Feb 2002 09:41:29 +0100
-
-mysql (3.23.47-5) unstable; urgency=low
-
- * Fixed grammar error in template. Closes: #132238
- * Really fixed typo in logrotate script. Closes: #131711
-
- -- Christian Hammers <ch@debian.org> Tue, 5 Feb 2002 14:20:08 +0100
-
-mysql (3.23.47-4) unstable; urgency=medium
-
- * Fixes typo in postinst that let init script fail. Closes: #131743
- * Fixed bashism bug that failed on ash. Closes: #131697
- * Fixed typo in logrotate script. Closes: #131711
-
- -- Christian Hammers <ch@debian.org> Thu, 31 Jan 2002 23:58:46 +0100
-
-mysql (3.23.47-3) unstable; urgency=low
-
- * Added new Debian specific mysql user called 'debian-sys-maint' which
- is used for pinging the server status, flushing the logs or shutting
- down the server in maintenance scripts. The credentials of this user
- are stored in the UID0-only readable file /etc/mysql/debian.cnf.
- Closes: #129887, #130326, #99274
- * Fixed unintended server startup at boottime. Closes: #122676, #130105
- * New upstream fixes command line parsing bug: Closes: #128473
- * Fixed manpage headers to let apropos work: Closes: #119122
- * Added "status" options for /etc/init.d/mysql. Closes: #129020
-
- -- Christian Hammers <ch@debian.org> Sun, 27 Jan 2002 19:46:11 +0100
-
-mysql (3.23.47-2) unstable; urgency=low
-
- * Enhanced init scripts by using mysqladmin instead of kill $pid.
- Thanks to Aaron Brick.
-
- -- Christian Hammers <ch@debian.org> Fri, 18 Jan 2002 01:42:23 +0100
-
-mysql (3.23.47-1) unstable; urgency=low
-
- * New upstream release.
- * Updated brazilian translation of debconf descriptions. Closes: #123332
-
- -- Christian Hammers <ch@debian.org> Sun, 6 Jan 2002 21:11:17 +0100
-
-mysql (3.23.46-3) unstable; urgency=low
-
- * Fixed bug in postinst where a script was accidently called with
- "bash -c <script> -IN_RPM" prevting the first argument to take effect
- and then leading to failures on hosts with unresolvable hostnames.
- Closes: #126147
- * Small changes and comments in postinst.
-
- -- Christian Hammers <ch@debian.org> Sat, 22 Dec 2001 14:03:02 +0100
-
-mysql (3.23.46-2) unstable; urgency=low
-
- * Start/stop behaviour now configurable via debconf. Closes: #112174
-
- -- Christian Hammers <ch@debian.org> Sun, 9 Dec 2001 21:38:54 +0100
-
-mysql (3.23.46-1) unstable; urgency=low
-
- * New upstream release.
- Only few fixes, mainly innodb related.
-
- -- Christian Hammers <ch@debian.org> Sun, 2 Dec 2001 03:08:48 +0100
-
-mysql (3.23.45-1) unstable; urgency=low
-
- * New upstream version.
- Only few fixes, mainly innodb related.
- * Added debconf note regarding the skip-networking option.
-
- -- Christian Hammers <ch@debian.org> Sun, 25 Nov 2001 16:50:37 +0100
-
-mysql (3.23.44-2) unstable; urgency=low
-
- * Finally removed debconf toggled "skip-networking" line add/remove
- code for /etc/mysql/my.cnf. I don't like editing a file that's tagged
- as configuration file.
- I disabled networking by default for security reasons. Better ideas?
-
- -- Christian Hammers <ch@debian.org> Fri, 16 Nov 2001 02:11:02 +0100
-
-mysql (3.23.44-1) unstable; urgency=low
-
- * New upstream release.
- - fixes replication bug (core dump)
- * Made description better english :) Thanks to D. Welton.
-
- -- Christian Hammers <ch@debian.org> Sun, 11 Nov 2001 15:44:07 +0100
-
-mysql (3.23.43-4) unstable; urgency=low
-
- * Disabled statically linking.
-
- -- Christian Hammers <ch@debian.org> Sat, 10 Nov 2001 03:15:56 +0100
-
-mysql (3.23.43-3) unstable; urgency=low
-
- * Changed compiler settings after one user reported instabilities.
- See #116631 for more information.
-
- -- Christian Hammers <ch@debian.org> Tue, 30 Oct 2001 21:39:17 +0100
-
-mysql (3.23.43-2) unstable; urgency=low
-
- * Patched sparc mutexes again. Closes: #113430
-
- -- Christian Hammers <ch@debian.org> Sun, 7 Oct 2001 15:09:00 +0200
-
-mysql (3.23.43-1) unstable; urgency=low
-
- * New upstream version.
- - Fixed some unlikely(sic!) bugs and core dumps.
- - Fixed a bug with BDB tables and UNIQUE columns that are NULL.
- - [more minor bugs were fixed; see changelog]
- * Adjusted build depends on libwrap0 for IA-64. Closes: #114582
- * Added the mysqlcheck binary. Closes: #114490
- * Fixed rules for arm architecture. Closes: #88186
- * Renamed mysql_print_defaults to the original name my_print_defaults.
- Isn't as descriptive but else I'd have to patch too much. Closes: #114492
-
- -- Christian Hammers <ch@debian.org> Fri, 5 Oct 2001 22:24:40 +0200
-
-mysql (3.23.42-2) unstable; urgency=low
-
- * Applied patch for m68k compile. Closes: #112904
-
- -- Christian Hammers <ch@debian.org> Sun, 23 Sep 2001 21:32:57 +0200
-
-mysql (3.23.42-1) unstable; urgency=low
-
- * New upstream releae.
- Fixes critical bug with InnoDB and large BLOBs.
-
- -- Christian Hammers <ch@debian.org> Tue, 18 Sep 2001 22:25:47 +0200
-
-mysql (3.23.41-2) unstable; urgency=low
-
- * Fixed shlibs.local problem. Closes: #111573
- * Replaced emacs by sensible-editor in mysqlbug.sh. Thanks Hans Ginzel.
-
- -- Christian Hammers <ch@debian.org> Sun, 9 Sep 2001 17:16:42 +0200
-
-mysql (3.23.41-1) unstable; urgency=low
-
- * New upstream release
- * Fixed build problem on ia64. Closes: #110624
-
- -- Christian Hammers <ch@debian.org> Tue, 14 Aug 2001 23:20:35 +0200
-
-mysql (3.23.40-1) unstable; urgency=low
-
- * New upstream release
-
- -- Christian Hammers <ch@debian.org> Sun, 5 Aug 2001 19:46:18 +0200
-
-mysql (3.23.39-5) unstable; urgency=low
-
- * Added debconf template for brazil. Closes: #106934, #106752
- * Tightened dependencies on debconf.
- * Adjusted mysql.err permissions in logrotate script to 0600. Closes: #105672
-
- -- Christian Hammers <ch@debian.org> Mon, 30 Jul 2001 00:10:12 +0200
-
-mysql (3.23.39-4.1) unstable; urgency=low
-
- * Maintainer-requested NMU.
- * Fixing thread mutexes on Sparc and Alpha
- (closes: Bug#101783)
- * Added --enable-assembler for sparc. This should
- allow mysql on sparc to use assembler versions of
- some string functions (read: should speed up a bit).
-
- -- Christopher C. Chimelis <chris@debian.org> Fri, 13 Jul 2001 15:09:30 -0400
-
-mysql (3.23.39-4) unstable; urgency=low
-
- * Porting fixes.
-
- -- Christian Hammers <ch@debian.org> Mon, 9 Jul 2001 17:56:54 +0200
-
-mysql (3.23.39-3.1) unstable; urgency=low
-
- * NMU (for porting)
- * Update config.sub and config.guess for hppa, sh & s390.
- * Add --with-client-ldflags=-lstdc++ to configure line. Closes: #100884
-
- -- Matthew Wilcox <willy@debian.org> Sun, 8 Jul 2001 19:26:59 -0600
-
-mysql (3.23.39-3) unstable; urgency=low
-
- * Disabled berkeley-db on sparc again. Mutexes aren't working again :-(
-
- -- Christian Hammers <ch@debian.org> Sat, 7 Jul 2001 18:30:08 +0200
-
-mysql (3.23.39-2) unstable; urgency=low
-
- * Bugfixed the m68k mutex patch. Thanks to Michael Fedrowitz. Closes: #103145
- * Removed config.cache files in bdb/ and innobase/. Closes: #103143
-
- -- Christian Hammers <ch@debian.org> Wed, 4 Jul 2001 22:06:58 +0200
-
-mysql (3.23.39-1) unstable; urgency=low
-
- * New upstream release. Minor bugfixes only.
-
- -- Christian Hammers <ch@debian.org> Thu, 14 Jun 2001 13:53:03 +0200
-
-mysql (3.23.38-4) unstable; urgency=low
-
- * Added logcheck files. Closes: #99131
- (I can't let the usermod away since I don't know of an easy way to
- retrive "passwd" information in a shell script considering that
- people use different storage methods like LDAP/NIS instead of passwd.)
-
- -- Christian Hammers <ch@debian.org> Fri, 8 Jun 2001 21:04:25 +0200
-
-mysql (3.23.38-3) unstable; urgency=low
-
- * Explicit pointet to /root/.my.cnf to let /etc/init.d/mysql stop
- work in sudo environments with $HOME!=/root work, too. Closes: #98324
- * Removes empty /etc/mysql on purge. Closes: #98164
-
- -- Christian Hammers <ch@debian.org> Tue, 22 May 2001 10:13:06 +0200
-
-mysql (3.23.38-2) unstable; urgency=low
-
- * Added depends to libdbd-mysql-perl for mysql-server. Closes: #94306
-
- -- Christian Hammers <ch@debian.org> Sat, 19 May 2001 19:43:26 +0200
-
-mysql (3.23.38-1) unstable; urgency=low
-
- * New upstream release.
- * Added Build-Depends to procps. Closes: #96768
-
- -- Christian Hammers <ch@debian.org> Sun, 13 May 2001 17:30:15 +0200
-
-mysql (3.23.37-5) unstable; urgency=low
-
- * Applied mutex patch for bdb support on m68k.
- Thanks to Michael Fedrowitz for the patch.
-
- -- Christian Hammers <ch@debian.org> Mon, 7 May 2001 12:30:40 +0200
-
-mysql (3.23.37-4) unstable; urgency=low
-
- * Enable bdb support for m68k architecture.
-
- -- Christian Hammers <ch@debian.org> Sat, 5 May 2001 16:47:36 +0200
-
-mysql (3.23.37-3) unstable; urgency=low
-
- * Added thread-safe client library. Thanks to Shane Wegner. Closes: #95441
-
- -- Christian Hammers <ch@debian.org> Sat, 28 Apr 2001 09:45:00 -0400
-
-mysql (3.23.37-2) unstable; urgency=low
-
- * Added sparc to the list of BDB supporting architectures after some
- tests on vore.debian.org and mails with Ben Collons.
-
- -- Christian Hammers <ch@debian.org> Fri, 27 Apr 2001 09:30:09 -0400
-
-mysql (3.23.37-1) unstable; urgency=low
-
- * New upstream version.
- * Added gemini table support.
- * Does anybody know how to enable SSL?
- * Fixed ARM compilation problem. Closes: #88186
-
- -- Christian Hammers <ch@debian.org> Sat, 21 Apr 2001 11:48:46 -0400
-
-mysql (3.23.36-2) unstable; urgency=low
-
- * Added patch by Christopher C. Chimelis <chris@debian.org> to make
- Berkeley db3 work again on Alpha architecture. Closes: #92787
-
- -- Christian Hammers <ch@debian.org> Tue, 3 Apr 2001 23:41:46 +0200
-
-mysql (3.23.36-1) unstable; urgency=high
-
- * New upstream version.
- * SECURITY FIX: One could place database tables outside the database
- directory by using '..' in one of the mysql helper programs where the
- table name was not checked correctly. This could lead to root compromise
- if the server would be running as root else you could at least do bad
- things as user mysql.
- * upstream: Fixed bug when thread creation failed.
- * upstream: Fixed problem in Innobase with non-latin1 charsets
- * upstream: Fixed a core-dump bug when using very complex query with DISTINGT
- * upstream: many others so called minor bugs...
- * fixes bug in init script. Closes: #90257
- (this report was agains some older problem that has been fixed too in .33)
-
- -- Christian Hammers <ch@debian.org> Fri, 30 Mar 2001 02:55:12 +0200
-
-mysql (3.23.35-1) unstable; urgency=medium
-
- * New upstream relase.
- * Fixes problem in ORDER BY clause. People using 3.33.34 should upgrade!
- * Includes innobase support.
- (Hope this is not such a catastrophe like berkeley db...)
-
- -- Christian Hammers <ch@debian.org> Fri, 16 Mar 2001 23:30:30 +0100
-
-mysql (3.23.33-3) unstable; urgency=low
-
- * Forgot #!/bin/sh at top of mysql-doc.postinst. Closes: #89801
-
- -- Christian Hammers <ch@vore.debian.org> Thu, 15 Mar 2001 20:38:35 -0500
-
-mysql (3.23.33-2) unstable; urgency=low
-
- * Added some missing scripts and manpages. Closes: #84068
- * Added dependency to perl-5.6. Closes: #81942
- * Added french templates somewhen ago. Closes: #83790
- * Added patch to get db3 working on Alpha. Closes: #86033
- Thanks to Christopher C. Chimelis <chris@debian.org>. The patch
- itself is included as debian/patch.alpha, too.
-
- -- Christian Hammers <ch@debian.org> Sun, 18 Feb 2001 06:40:40 +0100
-
-mysql (3.23.33-1) unstable; urgency=high
-
- * Fixes two security bugs that allowes crashing the server and maybe
- gaining the UID of the process that is linked against libmysqlclient!
-
- -- Christian Hammers <ch@debian.org> Tue, 13 Feb 2001 23:01:18 +0100
-
-mysql (3.23.32-1) unstable; urgency=low
-
- * New upstream releaes.
- (just minor fixes)
- * Added french and german debconf templates.
-
- -- Christian Hammers <ch@debian.org> Sun, 4 Feb 2001 17:27:07 +0100
-
-mysql (3.23.31-1) unstable; urgency=high
-
- * New upstream release.
- * Fixes security bug that was announced at BUGTRAQ mailing list.
- (Disappointingly not by mysql.com!). And allows a buffer overflow
- and therefore access to the mysql UID and all databases when already
- having a valid account. Closes: #82881
-
- -- Christian Hammers <ch@debian.org> Sat, 20 Jan 2001 11:14:36 +0100
-
-mysql (3.23.30-2) unstable; urgency=low
-
- * Recompiled with new dpkg-dev.
-
- -- Christian Hammers <ch@debian.org> Sun, 14 Jan 2001 22:20:55 +0100
-
-mysql (3.23.30-1) unstable; urgency=low
-
- * New upstream release.
-
- -- Christian Hammers <ch@debian.org> Sun, 7 Jan 2001 22:10:18 +0100
-
-mysql (3.23.28-10) testing unstable; urgency=low
-
- * I must upload to "testing" to get it into woody, right?!
-
- -- Christian Hammers <ch@debian.org> Fri, 29 Dec 2000 14:43:57 +0100
-
-mysql (3.23.28-9) unstable; urgency=low
-
- * Made it a replacement for libmysqlclient9.
-
- -- Christian Hammers <ch@westend.com> Mon, 25 Dec 2000 19:15:04 +0100
-
-mysql (3.23.28-8) unstable; urgency=low
-
- * Applied patch from a user to get the skip-networking option working!
- Approved from a mysql employee but please test anyways.
- This finally: Closes: #79672, #78634, #79660, #79658
-
- -- Christian Hammers <ch@debian.org> Sat, 16 Dec 2000 14:01:36 +0100
-
-mysql (3.23.28-6) unstable; urgency=medium
-
- * Fixed error in postinst. Closes: #79392, #79400, #79451, #79550
- * Added .info files again on user request. Closes: #78988, #75737
-
- -- Christian Hammers <ch@debian.org> Wed, 13 Dec 2000 21:18:24 +0100
-
-mysql (3.23.28-5) unstable; urgency=low
-
- * Fixed a stupid bug in mysql-server.postinst regarding the
- configuration of skip-networking. Closes: #78639, 78634
- * Used patched bdb which hopefully enables mutexes on Alpha. Closes: #78197
- * Added dependency to adduser. Closes: #76798
-
- -- Christian Hammers <ch@debian.org> Sun, 10 Dec 2000 16:55:48 +0100
-
-mysql (3.23.28-4) unstable; urgency=low
-
- [never uploaded]
- * Fixed a stupid bug in mysql-server.postinst regarding the
- configuration of skip-networking. Closes: #78639, 78634
- * Used patched bdb which hopefully enables mutexes on Alpha. Closes: #78197
-
- -- Christian Hammers <ch@debian.org> Sun, 3 Dec 2000 17:49:44 +0100
-
-mysql (3.23.28-3) unstable; urgency=low
-
- * This time really fixed m68k build error. Closes: #78235
-
- -- Christian Hammers <ch@debian.org> Sun, 3 Dec 2000 15:02:55 +0100
-
-mysql (3.23.28-2) unstable; urgency=low
-
- * Adjusted rules file to make it buildable on m86k. Closes: #78235
-
- -- Christian Hammers <ch@debian.org> Fri, 1 Dec 2000 20:07:26 +0100
-
-mysql (3.23.28-1) unstable; urgency=low
-
- * New upstream vesrion. Now gamma!
- * Changed umask of mysql.log making it o-rw
- * Disabled listening on network reachable TCP ports by default due to
- security considerations.
-
- -- Christian Hammers <ch@debian.org> Thu, 23 Nov 2000 20:12:50 +0100
-
-mysql (3.23.27-1) unstable; urgency=low
-
- * New upstream version.
- * Closes: #75711
-
- -- Christian Hammers <ch@debian.org> Sun, 29 Oct 2000 14:29:51 +0100
-
-mysql (3.23.25-4) unstable; urgency=low
-
- * Recompiled to get rid of the dependency for zlib1 (libc5).
- Closes: #74952, #74939
-
- -- Christian Hammers <ch@debian.org> Tue, 17 Oct 2000 14:34:52 +0200
-
-mysql (3.23.25-3.1) unstable; urgency=low
-
- * Maintainer-approved NMU.
- * Includes patch to fix and enable db3 support on Alpha.
- * Enable support for thread mutexes in db3 on sparc
- (it works after all, according to Ben Collins)
- * Removed atomic_ functions for Alpha since they are no
- longer supported in the current glibc in woody.
- * Cleaned up rules file a bit.
-
- -- Christopher C. Chimelis <chris@debian.org> Sat, 14 Oct 2000 04:22:02 -0400
-
-mysql (3.23.25-3) unstable; urgency=low
-
- * Upstream decided not to include my_config.h,my_dir.h into the installed
- header files. As this file contains at least informative material
- and more important is checked by several autoconf scripts I
- included it by hand again.
- * Made building of berkeley db conditional to architecture until
- I get response whether it works on sparc/alpha now.
-
- -- Christian Hammers <ch@debian.org> Wed, 11 Oct 2000 23:58:38 +0200
-
-mysql (3.23.25-2) unstable; urgency=medium
-
- * Last build went terrible wrong.. Here's the changelog again:
- * New upstream release.
- * Shared library version was raised from 9 to 10.
- Maintainers of packets using libmysqlclient9 must recompile!
-
- -- Christian Hammers <ch@debian.org> Wed, 11 Oct 2000 01:16:34 +0200
-
-mysql (3.23.25-1) unstable; urgency=low
-
- * New upstream release.
- * Shared library version was raised from 9 to 10.
- Maintainers of packets using libmysqlclient9 must recompile!
-
- -- Christian Hammers <ch@debian.org> Sat, 7 Oct 2000 18:21:51 +0200
-
-mysql (3.23.24-2) unstable; urgency=low
-
- * Applied upstream patch regarding quoting of mysqldump.
- * Updated to db-3.1.17-patched (from www.mysql.com)
-
- -- Christian Hammers <ch@debian.org> Fri, 15 Sep 2000 18:58:14 +0200
-
-mysql (3.23.24-1) unstable; urgency=medium
-
- * New upstream version with some important fixes.
- * upstream: Last version corrupted CHAR/VARCHAR/BLOB columns with
- chararacters above ASCII 128! Check and repair all these tables.
- * upstream: fixed small memory leak
- * upstream: fixed problem with BDB tables and reading on unique
- (not primary) key.
- * Disabled BDB tables on all architectures except i386 due to many
- bug reports (see #71206). -> HELP APPRECIATED <-
-
- -- Christian Hammers <ch@debian.org> Tue, 12 Sep 2000 06:18:54 +0200
-
-mysql (3.23.23-2) unstable; urgency=low
-
- * Strange... "nohup nice" gives differnet results and let therefore
- crash safe_mysqld when starting up. Apparently it seems to be
- kernel dependand. Now fixed by another conditional. This
- more or less Closes: #71057
- * This bug was reported (accidently) in the following identical reports:
- Closes: #71253, #71254, #71257, #71258, #71259, #71262, #71266, #71267
- Closes: #71268, #71271, #71275, #71277, #71278, #71283, #71291
-
- -- Christian Hammers <ch@debian.org> Sat, 9 Sep 2000 20:13:50 +0200
-
-mysql (3.23.23-1) unstable; urgency=low
-
- * New upstream version. Feature freeze!
- * Fixed source build problem. Closes: #70707
-
- -- Christian Hammers <ch@debian.org> Thu, 31 Aug 2000 10:03:35 +0200
-
-mysql (3.23.22b-1) unstable; urgency=low
-
- * Reorganised docs. Now we have several small html files instead of
- one with almost 2M. Closes: 70431
- * Removed pdf,ps and html from source package shrinked it about 3M
- (therefore the .orig.tar.gz is called 3.23.22b!)
- * -> Last upload failed due to problems at the FTP site so here the
- -> changelog again:
- * Fixes memory leak, commit/rollback, reserved word "MASTER" ...
- * Added Berkeley DB3 source code to the Debian diff to be able to
- compile with bdb transaction support! (Great feature!!!)
- * Upstream correction of error message. Closes: #68939
- * Upstream correction of reserved word "source".
-
- -- Christian Hammers <ch@debian.org> Fri, 25 Aug 2000 19:21:24 +0200
-
-mysql (3.23.22-1) unstable; urgency=low
-
- * New upstream version.
- * Fixes memory leak, commit/rollback, reserved word "MASTER" ...
- * Added Berkeley DB3 source code to the Debian diff to be able to
- compile with bdb transaction support! (Great feature!!!)
- * Upstream correction of error message. Closes: #68939
- * Upstream correction of reserved word "source".
-
- -- Christian Hammers <ch@debian.org> Sun, 20 Aug 2000 09:05:48 +0200
-
-mysql (3.23.21-4) unstable; urgency=low
-
- * Added libmysqlclient9.shlibs and shlibs.local file. Closes: #68669
-
- -- Christian Hammers <ch@debian.org> Wed, 9 Aug 2000 14:22:49 +0200
-
-mysql (3.23.21-3) unstable; urgency=low
-
- * Let "/etc/init.d/mysql restart" wait until the pid has been
- removed before (but max 6 seconds) before restarting. Closes: 65070
- * Added build dependencies.
-
- -- Christian Hammers <ch@debian.org> Sun, 30 Jul 2000 16:16:48 +0200
-
-mysql (3.23.21-2) unstable; urgency=low
-
- * Typo in safe_mysqld prevents start.
-
- -- Christian Hammers <ch@debian.org> Sat, 29 Jul 2000 13:40:50 +0200
-
-mysql (3.23.21-1) unstable; urgency=low
-
- * New upstream version.
-
- -- Christian Hammers <ch@debian.org> Mon, 10 Jul 2000 22:54:17 +0200
-
-mysql (3.23.20-1) unstable; urgency=low
-
- * MySQL finally got fully GPL'ed! This means that there is only one
- souce package and only main/* binary packages from now on.
- * Fixed symlink in libmysqlclient9-dev. Closes: 66452
- * Apart from that the usual bug fixes for BETA software.
-
- -- Christian Hammers <ch@debian.org> Mon, 3 Jul 2000 20:05:38 +0200
-
-mysql-pd (3.23.16-1) unstable; urgency=low
-
- * New upstream release. (Actually a brand new upstream branch!)
- * Added mysql-common package as the configuration file can be used
- by all versions of the mysql client library.
- Did some more package reorganisations, too. See README.Debian file!
- * libmysqlclient.so raised major version from 6 to 9.
- * Minor beautifications in the debian/ directory.
-
- -- Christian Hammers <ch@debian.org> Sat, 27 May 2000 20:30:01 +0200
-
-mysql-gpl (3.22.30-2) frozen unstable; urgency=low
-
- * Fixed path in libmysqlclient.la. Closes: #58875
-
- -- Christian Hammers <ch@debian.org> Sat, 25 Jan 2020 20:27:29 -0700
-
-mysql-gpl (3.22.30-1) frozen unstable; urgency=low
-
- * A small change in the libmysqlclient6 causes mysqladmin to print an
- shared library error when displaying the defaults. Everything else
- works fine so this error wasn't detected untill now. Closes: #58033
- * TcX released a new MySQL version that includes another security patch,
- this time against mysqlaccess. The author told me that it would be
- fine if I just included the new .c in this source since I don't want
- go to 3.22.32 in frozen.
- * ->Release Manager: Although the version number increased there is
- no new coded except for the shared library. The rest is the same
- as in mysql-server and mysql-client.
-
- -- Christian Hammers <ch@debian.org> Tue, 15 Feb 2000 23:26:54 +0100
-
-mysql-gpl (3.22.29-1) unstable; urgency=low
-
- * New upstream version.
-
- -- Christian Hammers <ch@debian.org> Thu, 6 Jan 2000 20:37:23 +0100
-
-mysql-gpl (3.22.27a-3) unstable; urgency=low
-
- * Use system readline instead of bundled version. Closes: #50069
- Any objections ?
-
- -- Christian Hammers <ch@debian.org> Sun, 14 Nov 1999 18:09:48 +0100
-
-mysql-gpl (3.22.27a-2) unstable; urgency=low
-
- * Now building mysql-gpl-doc in binary-indep.
-
- -- Christian Hammers <ch@debian.org> Sat, 23 Oct 1999 04:22:36 +0200
-
-mysql-gpl (3.22.27a-1) unstable; urgency=low
-
- * Adjusted version number to allow new orig.tar.gz.
- The old seems broken :-( People reported compilation problems.
- * Changed mysql-gpl-doc to "Architecture: all".
-
- -- Christian Hammers <ch@debian.org> Sun, 17 Oct 1999 13:01:35 +0200
-
-mysql-gpl (3.22.27-1) unstable; urgency=low
-
- * New upstream release. Fixes charset problem.
-
- -- Christian Hammers <ch@debian.org> Mon, 11 Oct 1999 18:01:40 +0200
-
-mysql-gpl (3.22.26a-1) unstable; urgency=low
-
- * New upstream version. Just some small bug fixes.
- * FHS compliance.
-
- -- Christian Hammers <ch@debian.org> Sun, 3 Oct 1999 10:16:14 +0200
-
-mysql-gpl (3.22.25-2) unstable; urgency=low
-
- * Added conflict to all old mysql-dev packages. (fixes: #42966)
-
- -- Christian Hammers <ch@debian.org> Sun, 15 Aug 1999 11:35:46 +0200
-
-mysql-gpl (3.22.25-1) unstable; urgency=low
-
- * New upstream version. (We are waiting for 3.23.x !)
- * Fixes some upstream small bugs.
-
- -- Christian Hammers <ch@debian.org> Sun, 18 Jul 1999 22:02:06 +0200
-
-mysql-gpl (3.22.23b-4) unstable; urgency=low
-
- * Rebuild for new perl.
-
- -- Christian Hammers <ch@debian.org> Thu, 8 Jul 1999 01:09:57 +0200
-
-mysql-gpl (3.22.23b-3) unstable; urgency=low
-
- * libmysqlclient had the wrong socket path.
-
- -- Christian Hammers <ch@debian.org> Sun, 03 Jul 1999 23:13:30 +0200
-
-mysql-gpl (3.22.23b-2) unstable; urgency=low
-
- * Missed one replace tag to an very old version of mysql-devel.
-
- -- Christian Hammers <ch@debian.org> Sun, 27 Jun 1999 19:13:30 +0200
-
-mysql-gpl (3.22.23b-1) unstable; urgency=low
-
- * New upstream minor version.
- * Cleaned up the dependencies a bit.
-
- -- Christian Hammers <ch@debian.org> Sun, 27 Jun 1999 19:13:30 +0200
-
-mysql-gpl (3.22.22-1) unstable; urgency=low
-
- * New upstream version. (closes Bug#36493,37340)
- * New maintainer upload.
- * Package reorganisation: We prepare for the GPL'ed server which will
- * be released soon and make the structure more clear to the user.
-
- -- Christian Hammers <ch@debian.org> Mon, 3 May 1999 20:43:41 +0200
-
-mysql (3.22.21-1) unstable; urgency=low
-
- * Never released. TcX was too fast :-)
-
- -- Christian Hammers <ch@debian.org> Tue, 20 Apr 1999 17:22:04 +0200
-
-mysql-freebits (3.21.33b-3) unstable; urgency=low
-
- * Recompile with libncurses
-
- -- Scott Hanson <shanson@debian.org> Sat, 31 Oct 1998 15:04:39 +0100
-
-mysql-freebits (3.21.33b-2) unstable; urgency=low
-
- * Recompile with libstdc++2.9 (fixes #27792)
-
- -- Scott Hanson <shanson@debian.org> Mon, 12 Oct 1998 18:47:25 +0200
-
-mysql-freebits (3.21.33b-1) unstable; urgency=low
-
- * New upstream version (probably the last for 3.21)
-
- -- Scott Hanson <shanson@debian.org> Tue, 8 Sep 1998 18:59:37 +0200
-
-mysql-freebits (3.21.33-4) unstable; urgency=low
-
- * Separate out non-free source files, move mysql-base, mysql-dev, and
- * mysql-doc to main distribution
- * Locale files /usr/share/mysql/ now in server, not base; therefore...
- * Add conflict to mysql-server <=3.21.33-3
-
- -- Scott Hanson <shanson@debian.org> Fri, 31 Jul 1998 19:16:08 +0200
-
-mysql (3.21.33-3) unstable; urgency=low
-
- * Release to unstable with moved socket (fixes #24574)
- * Add conflict to old libdbd-mysql-perl package
-
- -- Scott Hanson <shanson@debian.org> Wed, 22 Jul 1998 22:17:43 +0200
-
-mysql (3.21.33-2) experimental; urgency=low
-
- * Move socket from /tmp to /var/run (see #24574)
- * Release to experimental, since this breaks everything statically
- * linked to libmysqlclient!
-
- -- Scott Hanson <shanson@debian.org> Wed, 15 Jul 1998 19:37:01 +0200
-
-mysql (3.21.33-1) unstable; urgency=low
-
- * New upstream release
-
- -- Scott Hanson <shanson@debian.org> Sun, 12 Jul 1998 08:18:18 +0200
-
-mysql (3.21.32a-1) unstable; urgency=low
-
- * New upstream release
- * Lintian bugs: ldconfig, missing manpage, call to perl5
- * Lintian bug shlib-with-non-pic-code _not_ yet fixed
-
- -- Scott Hanson <shanson@debian.org> Sat, 4 Jul 1998 07:57:13 +0200
-
-mysql (3.21.31-1) unstable frozen; urgency=low
-
- * New upstream release for hamm and slink (bug fixes only)
- * Fix unsecure use of temp file in mysqlbug (fixes #23606)
- * Added brief licensing information to control file
-
- -- Scott Hanson <shanson@debian.org> Tue, 16 Jun 1998 10:52:44 +0200
-
-mysql (3.21.30-3) unstable; urgency=low
-
- * Restore missing shared library dependencies for mysql-server
-
- -- Scott Hanson <shanson@debian.org> Mon, 15 Jun 1998 07:51:58 +0200
-
-mysql (3.21.30-2) unstable; urgency=low
-
- * Simplify debian/rules (fixes #17662)
- * Edit manual.texi to add "Debian notes" to documentation
- * Add note about passwords on command line (fixes #16471)
- * Add note about getting privleges for users (fixes #22891)
- * Correct "Possible license changes" heading (fixes #22711)
- * Add uninstalled header files to /usr/doc/mysql-dev/examples (fixes #22627)
- * Add udf_example.cc to /usr/doc/mysql-dev/examples (fixes #22710)
-
- -- Scott Hanson <shanson@debian.org> Sun, 7 Jun 1998 13:05:37 +0200
-
-mysql (3.21.30-1) unstable; urgency=low
-
- * Stable upstream release
-
- -- Scott Hanson <shanson@debian.org> Tue, 12 May 1998 22:13:25 +0200
-
-mysql (3.21.29gamma-1) unstable; urgency=low
-
- * New upstream release
- * Do not create 'mysql' subdirectory for libs and headers (fixes #19020)
- * Remove 'CXX=gcc' flag from configure (g++ now standard)
-
- -- Scott Hanson <shanson@debian.org> Sun, 12 Apr 1998 18:38:03 +0200
-
-mysql (3.21.28gamma-1) unstable; urgency=low
-
- * New upstream release
- * Unstable-only release; hamm stays at 3.21.25 for now
-
- -- Scott Hanson <shanson@debian.org> Thu, 2 Apr 1998 21:33:51 +0200
-
-mysql (3.21.25gamma-3) unstable frozen; urgency=low
-
- * Have mysql-base suggest perl >= 5.004 for mysqlaccess (fixes #19593)
- * Fix shlibs to refer to mysql-base rather than the no-longer-existant mysql
-
- -- Scott Hanson <shanson@debian.org> Thu, 26 Mar 1998 18:22:59 +0100
-
-mysql (3.21.25gamma-2) unstable; urgency=low
-
- * Restore libmysqlclient.so symlink to mysql-dev (fixes #19036)
-
- -- Scott Hanson <shanson@debian.org> Sun, 8 Mar 1998 10:46:43 +0100
-
-mysql (3.21.25gamma-1) unstable; urgency=low
-
- * Check if running as root in init.d script (fixes #18577)
- * New upstream release
-
- -- Scott Hanson <shanson@debian.org> Fri, 27 Feb 1998 20:01:30 +0100
-
-mysql (3.21.24gamma-1) unstable; urgency=low
-
- * New upstream release
-
- -- Scott Hanson <shanson@debian.org> Mon, 23 Feb 1998 08:14:17 +0100
-
-mysql (3.21.23beta-3) unstable; urgency=low
-
- * Squashed errors found by lintian
-
- -- Scott Hanson <shanson@debian.org> Tue, 17 Feb 1998 20:19:01 +0100
-
-mysql (3.21.23beta-2) unstable; urgency=low
-
- * Fixed overlaps with old mysql package (fixes #17843)
-
- -- Scott Hanson <shanson@debian.org> Thu, 5 Feb 1998 22:55:00 +0100
-
-mysql (3.21.23beta-1) unstable; urgency=low
-
- * New upstream release
- * Fix include lines in mysql.h (fixes #17827)
- * Move /usr/include/mysql to mysql-dev
-
- -- Scott Hanson <shanson@debian.org> Wed, 4 Feb 1998 19:59:14 +0100
-
-mysql (3.21.22beta-3) unstable; urgency=low
-
- * Correct descriptions in control file (fixes #17698)
- * Clean up output of shutdown script
-
- -- Scott Hanson <shanson@debian.org> Sat, 31 Jan 1998 19:04:29 +0100
-
-mysql (3.21.22beta-2) unstable; urgency=low
-
- * Split out mysql-dev and mysql-bench subpackages
-
- -- Scott Hanson <shanson@debian.org> Wed, 28 Jan 1998 19:52:27 +0100
-
-mysql (3.21.22beta-1) unstable; urgency=low
-
- * New upstream release
-
- -- Scott Hanson <shanson@debian.org> Wed, 28 Jan 1998 18:59:09 +0100
-
-mysql (3.21.21a.beta-2) unstable; urgency=low
-
- * Compile with libpthreads from libc6-dev_2.0.6-3 rather than statically
- linking to patched libpthreads (see changes to 3.20.29-2)
-
- -- Scott Hanson <shanson@debian.org> Sun, 25 Jan 1998 13:17:15 +0100
-
-mysql (3.21.21a.beta-1) unstable; urgency=low
-
- * Put initial database, mysql_install_db, safe_mysqld, isamlog and
- isamchk in mysql-server
- * Correct upstream release number so source packages are correctly built
-
- -- Scott Hanson <shanson@debian.org> Mon, 19 Jan 1998 07:52:48 +0100
-
-mysql (3.21.21.beta-1) unstable; urgency=low
-
- * Use debhelper where possible in rules
- * Split binary packages into mysql-base, mysql-client, mysql-doc
- * New upstream release
-
- -- Scott Hanson <shanson@debian.org> Thu, 15 Jan 1998 08:12:17 +0100
-
-mysql (3.21.19.beta-1) unstable; urgency=low
-
- * Offer to set root password in mysql_install_db
- * Kill `pidof mysqld` on shutdown rather than use mysqladmin
- * New upstream version
-
- -- Scott Hanson <shanson@debian.org> Fri, 9 Jan 1998 20:06:35 +0100
-
-mysql (3.21.17a.beta-2) unstable; urgency=low
-
- * Remove perl stuff (it's going back into libdbd-mysql-perl)
- * Remove conflict with libdbd-mysql-perl
- * Do not compress *html files (fixes #16314)
-
- -- Scott Hanson <shanson@debian.org> Tue, 30 Dec 1997 07:34:20 +0100
-
-mysql (3.21.17a.beta-1) unstable; urgency=low
-
- * Add conflict to libdbd-mysql-perl
- * Use --pid-file option to place pid file in /var/run rather than patching
- * Add install-info to postinst and postrm
- * Add filename to message shown by mysql_install_db (fixes #16621)
- * New upstream version
-
- -- Scott Hanson <shanson@debian.org> Sun, 21 Dec 1997 19:41:45 +0100
-
-mysql (3.20.32a-5) unstable; urgency=low
-
- * Move mysqld to /usr/lib/mysql, per policy discussion
- * Adjust makefiles so perl libs get installed
-
- -- Scott Hanson <shanson@debian.org> Wed, 3 Dec 1997 22:37:45 +0100
-
-mysql (3.20.32a-4) unstable; urgency=low
-
- * Move mysqld to /usr/sbin to comply with FSSTND
-
- -- Scott Hanson <shanson@debian.org> Mon, 3 Nov 1997 20:12:29 +0100
-
-mysql (3.20.32a-3) unstable; urgency=low
-
- * Comment out tests in mysql_install_db... for real this time!
-
- -- Scott Hanson <shanson@debian.org> Mon, 3 Nov 1997 07:32:53 +0100
-
-mysql (3.20.32a-2) unstable; urgency=low
-
- * Comment out tests in mysql_install_db (fixes #14304)
-
- -- Scott Hanson <shanson@debian.org> Sat, 1 Nov 1997 18:45:25 +0100
-
-mysql (3.20.32a-1) unstable; urgency=low
-
- * New upstream version
-
- -- Scott Hanson <shanson@debian.org> Wed, 29 Oct 1997 07:11:42 +0100
-
-mysql (3.20.29-2) unstable; urgency=low
-
- * New maintainer
- * Statically link mysqld to patched glibc-2.0.5 libpthread
- (works around #13586; see README.debian.glibc-2.0.5)
- * Conflict with libpthread0 (fixes #13448)
- * Don't link libg++, avoiding problems with glibc libpthread
-
- -- Scott Hanson <shanson@debian.org> Thu, 16 Oct 1997 19:25:23 +0200
-
-mysql (3.20.29-1) unstable; urgency=low
-
- * New upstream version
- * Recompiled with libc6
- * Include mysql-faq_toc.html (fixes #10885)
- * Reworked /etc/init.d/mysql script (thanks to Heiko)
- * Remove file /usr/lib/libmysqlclient.so.4 when package is removed.
- * Use absolute path specification for conffile
- * Use /usr/bin/perl instead of /bin/perl (fixes #10654)
- * Do not depend on mysql (fixes #12427)
- * Installed missing manpage for Mysql perl module
- * Don't use debstd anymore
- * Pristine source
- * Set section to `non-free/devel'
- * Upgraded to standards version 2.3.0.0
-
- -- Christian Schwarz <schwarz@debian.org> Fri, 12 Sep 1997 02:12:58 +0200
-
-mysql (3.20.16beta-2) unstable; urgency=low
-
- * Uses /usr/bin/perl instead of /bin/perl (fixes bug #9731)
- * Don't run mysqld with --log option
- * Don't install regex manual pages
- * Suggest package mysql-manual
- * Fixed typo in changelog
- * Upgrade to policy 2.1.3.2
-
- -- Christian Schwarz <schwarz@debian.org> Sun, 11 May 1997 14:19:26 +0200
-
-mysql (3.20.16beta-1) unstable; urgency=low
-
- * Initial Release.
-
- -- Christian Schwarz <schwarz@debian.org> Sat, 12 Apr 1997 13:51:28 +0200
diff --git a/debian/compat b/debian/compat
deleted file mode 100644
index b8626c4cff2..00000000000
--- a/debian/compat
+++ /dev/null
@@ -1 +0,0 @@
-4
diff --git a/debian/control.in b/debian/control.in
deleted file mode 100644
index 8206728e6d7..00000000000
--- a/debian/control.in
+++ /dev/null
@@ -1,353 +0,0 @@
-Source: mysql-@MYSQL_BRANDED_BASE_VERSION@
-Section: misc
-Priority: optional
-Maintainer: Monty Taylor <mtaylor@mysql.com>
-Uploaders: Mads Martin Joergensen <mads@mysql.com>, MySQL Build Team <build-private@mysql.com>
-Build-Depends: libtool (>= 1.4.2-7), g++ (>= 4:3.3.5-3), procps | hurd, debhelper (>= 4.1.16), file (>= 3.28-1), libncurses5-dev (>= 5.0-6), perl (>= 5.6.0), libwrap0-dev (>= 7.6-8.3), zlib1g-dev (>= 1:1.1.3-5), libreadline5-dev | libreadline-dev, psmisc, po-debconf, chrpath, automake1.8, doxygen, gs, dpatch, gawk, bison
-Standards-Version: 3.7.2
-
-Package: libmysqlclient@SHARED_LIB_MAJOR_VERSION@off
-Section: libs
-Architecture: any
-Depends: mysql-common (>= ${Source-Version}), ${shlibs:Depends}
-Description: mysql database client library
- The MySQL(TM) software delivers a very fast, multi-threaded, multi-user,
- and robust SQL (Structured Query Language) database server. MySQL Server
- is intended for mission-critical, heavy-load production systems as well
- as for embedding into mass-deployed software. MySQL is a trademark of
- MySQL AB.
- .
- The MySQL software has Dual Licensing, which means you can use the MySQL
- software free of charge under the GNU General Public License
- (http://www.gnu.org/licenses/). You can also purchase commercial MySQL
- licenses from MySQL AB if you do not wish to be bound by the terms of
- the GPL. See the chapter "Licensing and Support" in the manual for
- further info.
- .
- The MySQL web site (http://www.mysql.com/) provides the latest
- news and information about the MySQL software. Also please see the
- documentation and the manual for more information.
- .
- This package contains the shared libraries (*.so*) which certain
- languages and applications need to dynamically load and use MySQL.
-
-Package: libmysqlclient@SHARED_LIB_MAJOR_VERSION@-dev
-Architecture: any
-Section: libdevel
-Depends: libmysqlclient@SHARED_LIB_MAJOR_VERSION@ (>= ${Source-Version}), zlib1g-dev, ${shlibs:Depends}
-Conflicts: libmysqlclient14-dev, libmysqlclient12-dev, libmysqlclient10-dev
-Provides: libmysqlclient-dev
-Description: mysql database development files
- The MySQL(TM) software delivers a very fast, multi-threaded, multi-user,
- and robust SQL (Structured Query Language) database server. MySQL Server
- is intended for mission-critical, heavy-load production systems as well
- as for embedding into mass-deployed software. MySQL is a trademark of
- MySQL AB.
- .
- The MySQL software has Dual Licensing, which means you can use the MySQL
- software free of charge under the GNU General Public License
- (http://www.gnu.org/licenses/). You can also purchase commercial MySQL
- licenses from MySQL AB if you do not wish to be bound by the terms of
- the GPL. See the chapter "Licensing and Support" in the manual for
- further info.
- .
- The MySQL web site (http://www.mysql.com/) provides the latest
- news and information about the MySQL software. Also please see the
- documentation and the manual for more information.
- .
- This package contains the development header files and libraries
- necessary to develop MySQL client applications.
-
-Package: libndbclient@NDB_SHARED_LIB_MAJOR_VERSION@
-Section: libs
-Architecture: any
-Depends: mysql-common (>= ${Source-Version}), libmysqlclient@SHARED_LIB_MAJOR_VERSION@, ${shlibs:Depends}
-Description: mysql cluster NdbApi library
- The MySQL(TM) software delivers a very fast, multi-threaded, multi-user,
- and robust SQL (Structured Query Language) database server. MySQL Server
- is intended for mission-critical, heavy-load production systems as well
- as for embedding into mass-deployed software. MySQL is a trademark of
- MySQL AB.
- .
- The MySQL software has Dual Licensing, which means you can use the MySQL
- software free of charge under the GNU General Public License
- (http://www.gnu.org/licenses/). You can also purchase commercial MySQL
- licenses from MySQL AB if you do not wish to be bound by the terms of
- the GPL. See the chapter "Licensing and Support" in the manual for
- further info.
- .
- The MySQL web site (http://www.mysql.com/) provides the latest
- news and information about the MySQL software. Also please see the
- documentation and the manual for more information.
- .
- This package contains the shared libraries (*.so*) which certain
- languages and applications need to dynamically load and use MySQL NdbApi.
-
-Package: libndbclient@NDB_SHARED_LIB_MAJOR_VERSION@-dev
-Architecture: any
-Section: libdevel
-Depends: libndbclient@NDB_SHARED_LIB_MAJOR_VERSION@ (>= ${Source-Version}), zlib1g-dev, ${shlibs:Depends}
-Provides: libndbclient-dev
-Description: mysql cluster NdbApi development files
- The MySQL(TM) software delivers a very fast, multi-threaded, multi-user,
- and robust SQL (Structured Query Language) database server. MySQL Server
- is intended for mission-critical, heavy-load production systems as well
- as for embedding into mass-deployed software. MySQL is a trademark of
- MySQL AB.
- .
- The MySQL software has Dual Licensing, which means you can use the MySQL
- software free of charge under the GNU General Public License
- (http://www.gnu.org/licenses/). You can also purchase commercial MySQL
- licenses from MySQL AB if you do not wish to be bound by the terms of
- the GPL. See the chapter "Licensing and Support" in the manual for
- further info.
- .
- The MySQL web site (http://www.mysql.com/) provides the latest
- news and information about the MySQL software. Also please see the
- documentation and the manual for more information.
- .
- This package contains the development header files and libraries
- necessary to develop NdbApi client applications.
-
-Package: mysql-common
-Section: misc
-Architecture: all
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Conflicts: mysql-common-@MYSQL_BRANDED_PREVIOUS_BASE_VERSION@
-Provides: mysql-common-@MYSQL_BRANDED_PREVIOUS_BASE_VERSION@
-Replaces: mysql-common-@MYSQL_BRANDED_PREVIOUS_BASE_VERSION@
-Description: mysql database common files (e.g. /etc/mysql/my.cnf)
- The MySQL(TM) software delivers a very fast, multi-threaded, multi-user,
- and robust SQL (Structured Query Language) database server. MySQL Server
- is intended for mission-critical, heavy-load production systems as well
- as for embedding into mass-deployed software. MySQL is a trademark of
- MySQL AB.
- .
- The MySQL software has Dual Licensing, which means you can use the MySQL
- software free of charge under the GNU General Public License
- (http://www.gnu.org/licenses/). You can also purchase commercial MySQL
- licenses from MySQL AB if you do not wish to be bound by the terms of
- the GPL. See the chapter "Licensing and Support" in the manual for
- further info.
- .
- The MySQL web site (http://www.mysql.com/) provides the latest
- news and information about the MySQL software. Also please see the
- documentation and the manual for more information.
- .
- This package includes files needed by all versions of the client library.
-
-Package: mysql-client-@MYSQL_BRANDED_BASE_VERSION@
-Architecture: any
-Depends: debianutils (>=1.6), libdbi-perl, libdbd-mysql-perl (>= 1.2202), mysql-common (>= ${Source-Version}), libmysqlclient@SHARED_LIB_MAJOR_VERSION@ (>= ${Source-Version}), ${perl:Depends}, ${shlibs:Depends}, ${misc:Depends}
-Provides: virtual-mysql-client, mysql-client, mysql-client-@MYSQL_BRANDED_PREVIOUS_BASE_VERSION@
-Conflicts: mysql-client (<< ${Source-Version}), mysql-client-@MYSQL_BRANDED_PREVIOUS_BASE_VERSION@
-Replaces: mysql-client (<< ${Source-Version}), mysql-server, mysql-client-@MYSQL_BRANDED_PREVIOUS_BASE_VERSION@
-Description: mysql database client binaries
- The MySQL(TM) software delivers a very fast, multi-threaded, multi-user,
- and robust SQL (Structured Query Language) database server. MySQL Server
- is intended for mission-critical, heavy-load production systems as well
- as for embedding into mass-deployed software. MySQL is a trademark of
- MySQL AB.
- .
- The MySQL software has Dual Licensing, which means you can use the MySQL
- software free of charge under the GNU General Public License
- (http://www.gnu.org/licenses/). You can also purchase commercial MySQL
- licenses from MySQL AB if you do not wish to be bound by the terms of
- the GPL. See the chapter "Licensing and Support" in the manual for
- further info.
- .
- The MySQL web site (http://www.mysql.com/) provides the latest
- news and information about the MySQL software. Also please see the
- documentation and the manual for more information.
- .
- This package contains the standard MySQL clients and administration tools.
-
-Package: mysql-server-@MYSQL_BRANDED_BASE_VERSION@
-Architecture: any
-Suggests: tinyca
-Recommends: mailx
-Pre-Depends: mysql-common (>= ${Source-Version}), adduser (>= 3.40)
-Depends: mysql-client-@MYSQL_BRANDED_BASE_VERSION@ (>= ${Source-Version}), libdbi-perl, perl (>= 5.6), ${shlibs:Depends}, ${misc:Depends}, psmisc, passwd, lsb-base (>= 3.0-10)
-Conflicts: mysql-server (<< ${Source-Version}), mysql-server-@MYSQL_BRANDED_PREVIOUS_BASE_VERSION@ (<< 5.0.26-3)
-Provides: mysql-server, virtual-mysql-server, mysql-server-@MYSQL_BRANDED_PREVIOUS_BASE_VERSION@
-Replaces: mysql-server (<< ${Source-Version}), mysql-server-@MYSQL_BRANDED_PREVIOUS_BASE_VERSION@
-Description: mysql database server binaries
- The MySQL(TM) software delivers a very fast, multi-threaded, multi-user,
- and robust SQL (Structured Query Language) database server. MySQL Server
- is intended for mission-critical, heavy-load production systems as well
- as for embedding into mass-deployed software. MySQL is a trademark of
- MySQL AB.
- .
- The MySQL software has Dual Licensing, which means you can use the MySQL
- software free of charge under the GNU General Public License
- (http://www.gnu.org/licenses/). You can also purchase commercial MySQL
- licenses from MySQL AB if you do not wish to be bound by the terms of
- the GPL. See the chapter "Licensing and Support" in the manual for
- further info.
- .
- The MySQL web site (http://www.mysql.com/) provides the latest
- news and information about the MySQL software. Also please see the
- documentation and the manual for more information.
- .
- This package includes the MySQL server binary (incl. InnoDB) as well
- as related utilities to run and administrate a MySQL server.
- .
- If you want to access and work with the database, you have to install
- package mysql-client-@MYSQL_BRANDED_BASE_VERSION@ as well!
-
-Package: mysql-test-@MYSQL_BRANDED_BASE_VERSION@
-Architecture: any
-Pre-Depends: mysql-common (>= ${Source-Version})
-Depends: mysql-client-@MYSQL_BRANDED_BASE_VERSION@ (>= ${Source-Version}), libdbd-mysql-perl, perl (>= 5.6), ${shlibs:Depends}, ${misc:Depends}
-Description: MySQL - test suite
- The MySQL(TM) software delivers a very fast, multi-threaded, multi-user,
- and robust SQL (Structured Query Language) database server. MySQL Server
- is intended for mission-critical, heavy-load production systems as well
- as for embedding into mass-deployed software. MySQL is a trademark of
- MySQL AB.
- .
- The MySQL software has Dual Licensing, which means you can use the MySQL
- software free of charge under the GNU General Public License
- (http://www.gnu.org/licenses/). You can also purchase commercial MySQL
- licenses from MySQL AB if you do not wish to be bound by the terms of
- the GPL. See the chapter "Licensing and Support" in the manual for
- further info.
- .
- The MySQL web site (http://www.mysql.com/) provides the latest
- news and information about the MySQL software. Also please see the
- documentation and the manual for more information.
- .
- This package contains the MySQL regression test suite.
-
-Package: mysql-storage-@MYSQL_BRANDED_BASE_VERSION@
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: MySQL - ndbcluster storage engine
- The MySQL(TM) software delivers a very fast, multi-threaded, multi-user,
- and robust SQL (Structured Query Language) database server. MySQL Server
- is intended for mission-critical, heavy-load production systems as well
- as for embedding into mass-deployed software. MySQL is a trademark of
- MySQL AB.
- .
- The MySQL software has Dual Licensing, which means you can use the MySQL
- software free of charge under the GNU General Public License
- (http://www.gnu.org/licenses/). You can also purchase commercial MySQL
- licenses from MySQL AB if you do not wish to be bound by the terms of
- the GPL. See the chapter "Licensing and Support" in the manual for
- further info.
- .
- The MySQL web site (http://www.mysql.com/) provides the latest
- news and information about the MySQL software. Also please see the
- documentation and the manual for more information.
- .
- This package contains the ndbcluster storage engine.
- It is necessary to have this package installed on all
- computers that should store ndbcluster table data.
- Note that this storage engine can only be used in conjunction
- with the MySQL Max server.
-
-Package: mysql-management-@MYSQL_BRANDED_BASE_VERSION@
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: MySQL - ndbcluster storage engine management
- The MySQL(TM) software delivers a very fast, multi-threaded, multi-user,
- and robust SQL (Structured Query Language) database server. MySQL Server
- is intended for mission-critical, heavy-load production systems as well
- as for embedding into mass-deployed software. MySQL is a trademark of
- MySQL AB.
- .
- The MySQL software has Dual Licensing, which means you can use the MySQL
- software free of charge under the GNU General Public License
- (http://www.gnu.org/licenses/). You can also purchase commercial MySQL
- licenses from MySQL AB if you do not wish to be bound by the terms of
- the GPL. See the chapter "Licensing and Support" in the manual for
- further info.
- .
- The MySQL web site (http://www.mysql.com/) provides the latest
- news and information about the MySQL software. Also please see the
- documentation and the manual for more information.
- .
- This package contains ndbcluster storage engine management.
- It is necessary to have this package installed on at least
- one computer in the cluster.
-
-Package: mysql-tools-@MYSQL_BRANDED_BASE_VERSION@
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: MySQL - ndbcluster storage engine basic tools
- The MySQL(TM) software delivers a very fast, multi-threaded, multi-user,
- and robust SQL (Structured Query Language) database server. MySQL Server
- is intended for mission-critical, heavy-load production systems as well
- as for embedding into mass-deployed software. MySQL is a trademark of
- MySQL AB.
- .
- The MySQL software has Dual Licensing, which means you can use the MySQL
- software free of charge under the GNU General Public License
- (http://www.gnu.org/licenses/). You can also purchase commercial MySQL
- licenses from MySQL AB if you do not wish to be bound by the terms of
- the GPL. See the chapter "Licensing and Support" in the manual for
- further info.
- .
- The MySQL web site (http://www.mysql.com/) provides the latest
- news and information about the MySQL software. Also please see the
- documentation and the manual for more information.
- .
- This package contains ndbcluster storage engine basic tools.
-
-Package: mysql-extra-@MYSQL_BRANDED_BASE_VERSION@
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: MySQL - ndbcluster storage engine extra tools
- The MySQL(TM) software delivers a very fast, multi-threaded, multi-user,
- and robust SQL (Structured Query Language) database server. MySQL Server
- is intended for mission-critical, heavy-load production systems as well
- as for embedding into mass-deployed software. MySQL is a trademark of
- MySQL AB.
- .
- The MySQL software has Dual Licensing, which means you can use the MySQL
- software free of charge under the GNU General Public License
- (http://www.gnu.org/licenses/). You can also purchase commercial MySQL
- licenses from MySQL AB if you do not wish to be bound by the terms of
- the GPL. See the chapter "Licensing and Support" in the manual for
- further info.
- .
- The MySQL web site (http://www.mysql.com/) provides the latest
- news and information about the MySQL software. Also please see the
- documentation and the manual for more information.
- .
- This package contains some extra ndbcluster storage engine tools for
- the advanced user.
- .
- They should be used with caution
-
-
-Package: mysql-server-@MYSQL_BRANDED_PREVIOUS_BASE_VERSION@
-Architecture: any
-Section: oldlibs
-Priority: extra
-Depends: mysql-server-@MYSQL_BRANDED_BASE_VERSION@
-Description: mysql database server (transitional package)
- MySQL is a fast, stable and true multi-user, multi-threaded SQL database
- server. SQL (Structured Query Language) is the most popular database query
- language in the world. The main goals of MySQL are speed, robustness and
- ease of use.
- .
- This is an empty transitional package and can safely be removed.
-
-Package: mysql-server
-Architecture: all
-Depends: mysql-server-@MYSQL_BRANDED_BASE_VERSION@
-Description: mysql database server (meta package depending on the latest version)
- This is an empty package that depends on the current "best" version of
- mysql-server (currently mysql-server-@MYSQL_BRANDED_BASE_VERSION@), as determined by the MySQL
- maintainers. Install this package if in doubt about which MySQL version
- you want, as this is the one we consider to be in the best shape.
-
-Package: mysql-client
-Architecture: all
-Depends: mysql-client-@MYSQL_BRANDED_BASE_VERSION@
-Description: mysql database client (meta package depending on the latest version)
- This is an empty package that depends on the current "best" version of
- mysql-client (currently mysql-client-@MYSQL_BRANDED_BASE_VERSION@), as determined by the MySQL
- maintainers. Install this package if in doubt about which MySQL version
- you want, as this is the one we consider to be in the best shape.
diff --git a/debian/copyright b/debian/copyright
deleted file mode 100644
index f3c7b8624ca..00000000000
--- a/debian/copyright
+++ /dev/null
@@ -1,139 +0,0 @@
-The Debian package of MySQL was first debianzed on 1997-04-12 by Christian
-Schwarz <schwarz@debian.org> and ist maintained since 1999-04-20 by
-Christian Hammers <ch@debian.org>.
-
-It can be downloaded from http://www.mysql.com/
-
-Copyright:
-
-According to the file "COPYING" all parts of this package are licenced
-under the terms of the GNU GPL Version 2 of which a copy is available
-in /usr/share/common-licenses.
-
-To allow free software with other licences than the GPL to link against the
-shared library, special terms for "derived works" are defined in the file
-"EXCEPTIONS-CLIENT" which is quoted below.
-
-More information can be found on http://www.mysql.com/company/legal/licensing/
-
-The manual had to be removed as it is not free in the sense of the
-Debian Free Software Guidelines (DFSG).
-
--------------------------------------------------------------------------
-
-
-Appendix I MySQL FLOSS License Exception
-****************************************
-
- Version 0.3, 10 February 2005
-
-The MySQL AB Exception for Free/Libre and Open Source Software-only
-Applications Using MySQL Client Libraries (the "FLOSS Exception").
-
-Exception Intent
-================
-
-We want specified Free/Libre and Open Source Software ("FLOSS")
-applications to be able to use specified GPL-licensed MySQL client
-libraries (the "Program") despite the fact that not all FLOSS licenses
-are compatible with version 2 of the GNU General Public License (the
-"GPL").
-
-Legal Terms and Conditions
-==========================
-
-As a special exception to the terms and conditions of version 2.0 of the
-GPL:
-
- 1. You are free to distribute a Derivative Work that is formed
- entirely from the Program and one or more works (each, a "FLOSS
- Work") licensed under one or more of the licenses listed below in
- section 1, as long as:
-
- a. You obey the GPL in all respects for the Program and the
- Derivative Work, except for identifiable sections of the
- Derivative Work which are not derived from the Program, and
- which can reasonably be considered independent and separate
- works in themselves,
-
- b. all identifiable sections of the Derivative Work which are not
- derived from the Program, and which can reasonably be
- considered independent and separate works in themselves,
-
- i
- are distributed subject to one of the FLOSS licenses
- listed below, and
-
- ii
- the object code or executable form of those sections are
- accompanied by the complete corresponding
- machine-readable source code for those sections on the
- same medium and under the same FLOSS license as the
- corresponding object code or executable forms of those
- sections, and
-
- c. any works which are aggregated with the Program or with a
- Derivative Work on a volume of a storage or distribution
- medium in accordance with the GPL, can reasonably be
- considered independent and separate works in themselves which
- are not derivatives of either the Program, a Derivative Work
- or a FLOSS Work.
-
- If the above conditions are not met, then the Program may only be
- copied, modified, distributed or used under the terms and
- conditions of the GPL or another valid licensing option from MySQL
- AB.
-
- 2. FLOSS License List
-
- *License name* *Version(s)/Copyright Date*
- Academic Free License 2.0
- Apache Software License 1.0/1.1/2.0
- Apple Public Source License 2.0
- Artistic license From Perl 5.8.0
- BSD license "July 22 1999"
- Common Public License 1.0
- GNU Library or "Lesser" General Public 2.0/2.1
- License (LGPL)
- Jabber Open Source License 1.0
- MIT license -
- Mozilla Public License (MPL) 1.0/1.1
- Open Software License 2.0
- OpenSSL license (with original SSLeay "2003" ("1998")
- license)
- PHP License 3.0
- Python license (CNRI Python License) -
- Python Software Foundation License 2.1.1
- Sleepycat License "1999"
- W3C License "2001"
- X11 License "2001"
- Zlib/libpng License -
- Zope Public License 2.0
-
- Due to the many variants of some of the above licenses, we require
- that any version follow the 2003 version of the Free Software
- Foundation's Free Software Definition
- (`http://www.gnu.org/philosophy/free-sw.html') or version 1.9 of
- the Open Source Definition by the Open Source Initiative
- (`http://www.opensource.org/docs/definition.php').
-
- 3. Definitions
-
- a. Terms used, but not defined, herein shall have the meaning
- provided in the GPL.
-
- b. Derivative Work means a derivative work under copyright law.
-
- 4. Applicability This FLOSS Exception applies to all Programs that
- contain a notice placed by MySQL AB saying that the Program may be
- distributed under the terms of this FLOSS Exception. If you
- create or distribute a work which is a Derivative Work of both the
- Program and any other work licensed under the GPL, then this FLOSS
- Exception is not available for that work; thus, you must remove
- the FLOSS Exception notice from that work and comply with the GPL
- in all respects, including by retaining all GPL notices. You may
- choose to redistribute a copy of the Program exclusively under the
- terms of the GPL by removing the FLOSS Exception notice from that
- copy of the Program, provided that the copy has never been
- modified by you or any third party.
-
diff --git a/debian/copyright.more b/debian/copyright.more
deleted file mode 100644
index b7ac36bc9fa..00000000000
--- a/debian/copyright.more
+++ /dev/null
@@ -1,60 +0,0 @@
-#
-# Some random bits of interest.
-#
-
-#
-# Arjen about OpenSSL
-#
-http://bugs.mysql.com/?id=6924
-Updated by: Arjen Lentz
-Date: 2005-11-05
-
-Linking with the client library is covered by the FLOSS exception which
-includes OpenSSL now. So that's clean. Indeed, the OpenSSL is not
-compliant with the FSF free software guidelines, however it *is*
-compliant with the OSI guidelines. And that's good enough for us.
-Christian is correct in saying that the author of a GPL app that links
-with MySQL may find themselves in a licensing headache (or may not
-realize that OpenSSL is involved) but that is their responsibility.
-The MySQL client can be linked with a number of other licenses, it
-would not be feasible for MySQL to take over the responsibility for
-"the next level" of how combinations of licenses work out. There are
-too many possibilities, and combinations of more just 2 licenses.
-
-
-#
-# Steve Langasek about OpenSSL vs libmysqlclient
-#
-Subject: Bug#291945: eleventh-hour transition for mysql-using packages related to apache
-Date: Sat, 12 Feb 2005 00:39:58 -0800
-From: Steve Langasek <vorlon@debian.org>
-
-> > > > that's great to hear! i'm cc'ing the relevant wishlist bug i have open
-> > > > against mysql-server. christian: any chance of getting an openssl enabled
-> > > > version of the mysql-client and mysql-server packages?
-
-> > > Yes, I will re-enable openssl in the next upload.
-
-> > Please make sure this does not introduce an openssl dependency to
-> > libmysqlclient itself; just because MySQL AB have granted a license
-> > exception for OpenSSL does not mean everyone who links to libmysqlclient
-> > has done so.
-
-> > I know of at least one GPL-without-exception package that is now using
-> > libmysqlclient12 in Debian.
-
-> Nice, so we should check that any linked GPL library directly (obviuolsy) or
-> indirectly (with N=1,2,3... levels of indirection) linked against
-> openssl adds the exception.
-
-No, we should simply not be linking libmysqlclient against OpenSSL. The
-exemption was needed because there exists software that uses both
-libmysqlclient and libssl, but making libmysqlclient itself use libssl just
-because we now have the exemption will cause licensing problems for
-applications which currently do *not* depend on libssl.
-
-> This is a great reason to move asap all possible programs to gnutls,
-> indeed.
-
-There are plenty of reasons to move software to gnutls, but doing so is
-non-trivial.
diff --git a/debian/defs.mk.in b/debian/defs.mk.in
deleted file mode 100644
index dd2c44313be..00000000000
--- a/debian/defs.mk.in
+++ /dev/null
@@ -1,14 +0,0 @@
-MYSQL_BUILD_OPTS=--with-comment='MySQL Server (custom)' --with-server-suffix='-custom'
-MYSQL_BUILD_CXXFLAGS=-DBIG_JOINS=1 -felide-constructors -fno-rtti -O2
-MYSQL_BUILD_CFLAGS=-DBIG_JOINS=1 -O2
-MYSQL_BUILD_CC=gcc
-MYSQL_BUILD_CXX=gcc
-# we re-write state into this file. MYSQL_BASE_VERSION might get a suffix added
-# by debian/rules which could result in a nasty loop. VER is there to hold the
-# original unadorned version from autoconf
-MYSQL_BASE_VERSION=@MYSQL_BASE_VERSION@
-MYSQL_PREVIOUS_BASE_VERSION=@MYSQL_PREVIOUS_BASE_VERSION@
-MYSQL_BRANDED_BASE_VERSION=@MYSQL_BRANDED_BASE_VERSION@
-MYSQL_BRANDED_PREVIOUS_BASE_VERSION=@MYSQL_BRANDED_PREVIOUS_BASE_VERSION@
-SHARED_LIB_MAJOR_VERSION=@SHARED_LIB_MAJOR_VERSION@
-NDB_SHARED_LIB_MAJOR_VERSION=@NDB_SHARED_LIB_MAJOR_VERSION@
diff --git a/debian/libmysqlclientSLIB-dev.README.Maintainer.in b/debian/libmysqlclientSLIB-dev.README.Maintainer.in
deleted file mode 100644
index 56b4088cbfb..00000000000
--- a/debian/libmysqlclientSLIB-dev.README.Maintainer.in
+++ /dev/null
@@ -1,4 +0,0 @@
-The examples directory includes files that might be needed by some
-developers:
-- header files not installed by default
-- the example file udf_example.cc
diff --git a/debian/libmysqlclientSLIB-dev.dirs.in b/debian/libmysqlclientSLIB-dev.dirs.in
deleted file mode 100644
index f6ad2870431..00000000000
--- a/debian/libmysqlclientSLIB-dev.dirs.in
+++ /dev/null
@@ -1,2 +0,0 @@
-usr/include/
-usr/lib/
diff --git a/debian/libmysqlclientSLIB-dev.docs.in b/debian/libmysqlclientSLIB-dev.docs.in
deleted file mode 100644
index eccf2c9c565..00000000000
--- a/debian/libmysqlclientSLIB-dev.docs.in
+++ /dev/null
@@ -1 +0,0 @@
-EXCEPTIONS-CLIENT
diff --git a/debian/libmysqlclientSLIB-dev.examples.in b/debian/libmysqlclientSLIB-dev.examples.in
deleted file mode 100644
index f1649c311c4..00000000000
--- a/debian/libmysqlclientSLIB-dev.examples.in
+++ /dev/null
@@ -1 +0,0 @@
-sql/udf_example.c
diff --git a/debian/libmysqlclientSLIB-dev.files.in b/debian/libmysqlclientSLIB-dev.files.in
deleted file mode 100644
index e396b59b92f..00000000000
--- a/debian/libmysqlclientSLIB-dev.files.in
+++ /dev/null
@@ -1,6 +0,0 @@
-usr/bin/mysql_config
-usr/include/*
-usr/lib/libmysqlclient.a
-usr/lib/libmysqlclient.la
-usr/lib/mysql
-usr/share/man/man1/mysql_config.1
diff --git a/debian/libmysqlclientSLIB-dev.links.in b/debian/libmysqlclientSLIB-dev.links.in
deleted file mode 100644
index 4a24953a06b..00000000000
--- a/debian/libmysqlclientSLIB-dev.links.in
+++ /dev/null
@@ -1,2 +0,0 @@
-usr/lib/libmysqlclient.so.15 usr/lib/libmysqlclient.so
-usr/lib/libmysqlclient_r.so.15 usr/lib/libmysqlclient_r.so
diff --git a/debian/libmysqlclientSLIBoff.README.Debian.in b/debian/libmysqlclientSLIBoff.README.Debian.in
deleted file mode 100644
index 26549106092..00000000000
--- a/debian/libmysqlclientSLIBoff.README.Debian.in
+++ /dev/null
@@ -1,30 +0,0 @@
-* Crashs on systems with Cyrix or other old i486 CPUs
-=====================================================
-
-As reported http://bugs.mysql.com/bug.php?id=21765 MySQL will segfault on very
-old CPUs that do not have support for the "cpuid" instruction.
-
-
-
-* Self-build binaries that are linked against libmysqlclient15 MUST be rebuild!
-===============================================================================
-
-This only affects binaries that are build on a Debian unstable/testing system
-before 2006-03-31 or version 5.0.19. "objdump -T myprogram | grep MYSQL_5.0"
-will give a couple of lines output in such a case.
-
-Until now libmysqlclient.so.15 had versioned symbols provided by a Debian
-patch. Now MySQL finally decided to adopt this patch but sadly chosed a
-different symbol name.
-
-Binaries linked against the old version of the library with my symbol name will
-not run with the new version with MySQL's symbol name ("version `MYSQL_5.0' not
-found"). The actual name /usr/lib/libmysqlclient.so.15 must stay because else
-binaries coming from systems other than Debian would never run on a Debian
-server.
-
-So the Debian package had to be renamed from "libmysqlclient15" to
-"libmysqlclient15off" and do now conflict with their former version.
-
--- 2006-03-14, Christian Hammers <ch@debian.org>
-
diff --git a/debian/libmysqlclientSLIBoff.dirs.in b/debian/libmysqlclientSLIBoff.dirs.in
deleted file mode 100644
index 2964de6141b..00000000000
--- a/debian/libmysqlclientSLIBoff.dirs.in
+++ /dev/null
@@ -1 +0,0 @@
-usr/lib/
diff --git a/debian/libmysqlclientSLIBoff.docs.in b/debian/libmysqlclientSLIBoff.docs.in
deleted file mode 100644
index eccf2c9c565..00000000000
--- a/debian/libmysqlclientSLIBoff.docs.in
+++ /dev/null
@@ -1 +0,0 @@
-EXCEPTIONS-CLIENT
diff --git a/debian/libmysqlclientSLIBoff.files.in b/debian/libmysqlclientSLIBoff.files.in
deleted file mode 100644
index 5162b7b9639..00000000000
--- a/debian/libmysqlclientSLIBoff.files.in
+++ /dev/null
@@ -1 +0,0 @@
-usr/lib/libmysqlclient*.so.*
diff --git a/debian/libmysqlclientSLIBoff.postinst.in b/debian/libmysqlclientSLIBoff.postinst.in
deleted file mode 100644
index 29d3b86f978..00000000000
--- a/debian/libmysqlclientSLIBoff.postinst.in
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/bash -e
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
-
-# vim: ts=4
-
-
diff --git a/debian/libndbclientNLIB-dev.dirs.in b/debian/libndbclientNLIB-dev.dirs.in
deleted file mode 100644
index 4a854656b34..00000000000
--- a/debian/libndbclientNLIB-dev.dirs.in
+++ /dev/null
@@ -1,3 +0,0 @@
-usr/include/mysql/storage/ndb/
-usr/include/
-usr/lib/
diff --git a/debian/libndbclientNLIB-dev.files.in b/debian/libndbclientNLIB-dev.files.in
deleted file mode 100644
index 995eb2c71fb..00000000000
--- a/debian/libndbclientNLIB-dev.files.in
+++ /dev/null
@@ -1,3 +0,0 @@
-usr/include/mysql/storage/ndb/*
-usr/lib/libndbclient.a
-usr/lib/libndbclient.la
diff --git a/debian/libndbclientNLIB-dev.links.in b/debian/libndbclientNLIB-dev.links.in
deleted file mode 100644
index 4e0bf17ebd5..00000000000
--- a/debian/libndbclientNLIB-dev.links.in
+++ /dev/null
@@ -1 +0,0 @@
-usr/lib/libndbclient.so.4 usr/lib/libndbclient.so
diff --git a/debian/libndbclientNLIB.README.Debian.in b/debian/libndbclientNLIB.README.Debian.in
deleted file mode 100644
index 26549106092..00000000000
--- a/debian/libndbclientNLIB.README.Debian.in
+++ /dev/null
@@ -1,30 +0,0 @@
-* Crashs on systems with Cyrix or other old i486 CPUs
-=====================================================
-
-As reported http://bugs.mysql.com/bug.php?id=21765 MySQL will segfault on very
-old CPUs that do not have support for the "cpuid" instruction.
-
-
-
-* Self-build binaries that are linked against libmysqlclient15 MUST be rebuild!
-===============================================================================
-
-This only affects binaries that are build on a Debian unstable/testing system
-before 2006-03-31 or version 5.0.19. "objdump -T myprogram | grep MYSQL_5.0"
-will give a couple of lines output in such a case.
-
-Until now libmysqlclient.so.15 had versioned symbols provided by a Debian
-patch. Now MySQL finally decided to adopt this patch but sadly chosed a
-different symbol name.
-
-Binaries linked against the old version of the library with my symbol name will
-not run with the new version with MySQL's symbol name ("version `MYSQL_5.0' not
-found"). The actual name /usr/lib/libmysqlclient.so.15 must stay because else
-binaries coming from systems other than Debian would never run on a Debian
-server.
-
-So the Debian package had to be renamed from "libmysqlclient15" to
-"libmysqlclient15off" and do now conflict with their former version.
-
--- 2006-03-14, Christian Hammers <ch@debian.org>
-
diff --git a/debian/libndbclientNLIB.dirs.in b/debian/libndbclientNLIB.dirs.in
deleted file mode 100644
index 2964de6141b..00000000000
--- a/debian/libndbclientNLIB.dirs.in
+++ /dev/null
@@ -1 +0,0 @@
-usr/lib/
diff --git a/debian/libndbclientNLIB.files.in b/debian/libndbclientNLIB.files.in
deleted file mode 100644
index f212e302299..00000000000
--- a/debian/libndbclientNLIB.files.in
+++ /dev/null
@@ -1 +0,0 @@
-usr/lib/libndbclient*.so.*
diff --git a/debian/libndbclientNLIB.postinst.in b/debian/libndbclientNLIB.postinst.in
deleted file mode 100644
index 29d3b86f978..00000000000
--- a/debian/libndbclientNLIB.postinst.in
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/bash -e
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
-
-# vim: ts=4
-
-
diff --git a/debian/mysql-client-BASE.NEWS.in b/debian/mysql-client-BASE.NEWS.in
deleted file mode 100644
index 272621ff48d..00000000000
--- a/debian/mysql-client-BASE.NEWS.in
+++ /dev/null
@@ -1,6 +0,0 @@
-mysql-dfsg-5.0 (5.0.24a-2) unstable; urgency=low
-
- This package now includes "mysqlreport" from hackmysql.com which generates
- a friendly report on the performance relevant variables from SHOW STATUS.
-
- -- Christian Hammers <ch@debian.org> Sun, 3 Sep 2006 16:26:41 +0200
diff --git a/debian/mysql-client-BASE.README.Debian.in b/debian/mysql-client-BASE.README.Debian.in
deleted file mode 100644
index b245638f9c9..00000000000
--- a/debian/mysql-client-BASE.README.Debian.in
+++ /dev/null
@@ -1,4 +0,0 @@
-FAQ:
-
-Q: My <tab> completition is gone, why?
-A: You have "no-auto-rehash" in the "[mysql]" section of /etc/mysql/my.cnf!
diff --git a/debian/mysql-client-BASE.dirs.in b/debian/mysql-client-BASE.dirs.in
deleted file mode 100644
index 63c303b03fc..00000000000
--- a/debian/mysql-client-BASE.dirs.in
+++ /dev/null
@@ -1,2 +0,0 @@
-usr/bin/
-usr/share/man/man1/
diff --git a/debian/mysql-client-BASE.docs.in b/debian/mysql-client-BASE.docs.in
deleted file mode 100644
index 5bb6d569f28..00000000000
--- a/debian/mysql-client-BASE.docs.in
+++ /dev/null
@@ -1,2 +0,0 @@
-README
-EXCEPTIONS-CLIENT
diff --git a/debian/mysql-client-BASE.files.in b/debian/mysql-client-BASE.files.in
deleted file mode 100644
index 3e3373b071c..00000000000
--- a/debian/mysql-client-BASE.files.in
+++ /dev/null
@@ -1,17 +0,0 @@
-usr/bin/msql2mysql
-usr/bin/mysql
-usr/bin/mysql_find_rows
-usr/bin/mysql_waitpid
-usr/bin/mysqlaccess
-usr/bin/mysqladmin
-usr/bin/mysqlbinlog
-usr/bin/mysqlcheck
-usr/bin/mysqldump
-usr/bin/mysqlimport
-usr/bin/mysqlshow
-usr/share/lintian/overrides/mysql-client-@MYSQL_BRANDED_BASE_VERSION@
-usr/share/man/man1/mysql.1
-usr/share/man/man1/mysqlaccess.1
-usr/share/man/man1/mysqladmin.1
-usr/share/man/man1/mysqldump.1
-usr/share/man/man1/mysqlshow.1
diff --git a/debian/mysql-client-BASE.lintian-overrides.in b/debian/mysql-client-BASE.lintian-overrides.in
deleted file mode 100644
index 9de261e2154..00000000000
--- a/debian/mysql-client-BASE.lintian-overrides.in
+++ /dev/null
@@ -1 +0,0 @@
-mysql-client-@MYSQL_BRANDED_BASE_VERSION@: package-has-a-duplicate-relation
diff --git a/debian/mysql-common.README.Debian.in b/debian/mysql-common.README.Debian.in
deleted file mode 100644
index ab7d01defe1..00000000000
--- a/debian/mysql-common.README.Debian.in
+++ /dev/null
@@ -1,20 +0,0 @@
-[passwords]
-If you change the password of the root user (which is strongly recommended)
-you have to create a personal mysql config file in order to let cron run
-the /etc/cron.daily script without asking you for the password.
-The /root/.my.cnf file should be chmod 0600 (-rw------- root root .my.cnf)
-and have the following content:
-[mysqladmin]
-user = root
-password = <secret>
-
-[more than one process]
-Note that the shutdown script cannot use the pid number stored in
-/var/run, since it is for the first mysqld thread, but we need to kill
-the most recent thread to shutdown the server. The upstream developers
-are aware of this bug. When maintaining your database, you should use
-mysqladmin with your password to shutdown and reload the server rather
-than /etc/init.d/mysql.
-
-Scott Hanson and Christian Hammers
-<shanson@debian.org> <ch@debian.org>
diff --git a/debian/mysql-common.dirs.in b/debian/mysql-common.dirs.in
deleted file mode 100644
index a5a88ede9c1..00000000000
--- a/debian/mysql-common.dirs.in
+++ /dev/null
@@ -1 +0,0 @@
-etc/mysql/conf.d/
diff --git a/debian/mysql-common.files.in b/debian/mysql-common.files.in
deleted file mode 100644
index c052beb0027..00000000000
--- a/debian/mysql-common.files.in
+++ /dev/null
@@ -1,2 +0,0 @@
-etc/mysql/my.cnf
-usr/share/mysql-common/internal-use-only
diff --git a/debian/mysql-common.postrm.in b/debian/mysql-common.postrm.in
deleted file mode 100644
index 3ca45870165..00000000000
--- a/debian/mysql-common.postrm.in
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-
-if [ "$1" = "purge" ]; then
- rmdir /etc/mysql 2>/dev/null || true
-fi
-
-#DEBHELPER#
diff --git a/debian/mysql-common.preinst.in b/debian/mysql-common.preinst.in
deleted file mode 100644
index 362990bd130..00000000000
--- a/debian/mysql-common.preinst.in
+++ /dev/null
@@ -1,215 +0,0 @@
-#!/bin/bash -e
-#
-# summary of how this script can be called:
-# * <new-preinst> install
-# * <new-preinst> install <old-version>
-# * <new-preinst> upgrade <old-version>
-# * <old-preinst> abort-upgrade <new-version>
-#
-
-if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi
-${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 }
-
-export PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin
-
-# Try to stop the server in a sane way. If it does not success let the admin
-# do it himself. No database directories should be removed while the server
-# is running! Another mysqld in e.g. a different chroot is fine for us.
-stop_server() {
- if [ ! -x /etc/init.d/mysql ]; then return; fi
-
- set +e
- if [ -x /usr/sbin/invoke-rc.d ]; then
- cmd="invoke-rc.d mysql stop"
- else
- cmd="/etc/init.d/mysql stop"
- fi
- $cmd
- errno=$?
- set -e
-
- # 0=ok, 100=no init script (fresh install)
- if [ "$errno" != 0 -a "$errno" != 100 ]; then
- echo "${cmd/ */} returned $errno" 1>&2
- echo "There is a MySQL server running, but we failed in our attempts to stop it." 1>&2
- echo "Stop it yourself and try again!" 1>&2
- exit 1
- fi
-}
-
-start_server() {
- if [ ! -x /etc/init.d/mysql ]; then return; fi
-
- set +e
- if [ -x /usr/sbin/invoke-rc.d ]; then
- cmd="invoke-rc.d mysql start"
- else
- cmd="/etc/init.d/mysql start"
- fi
- $cmd
- set -e
-}
-
-##### here's a bunch of helper functions for converting database formats ######
-
-cvt_get_param(){
- /usr/sbin/mysqld --print-defaults \
- | tr " " "\n" \
- | grep -- "--$1" \
- | tail -n 1 \
- | cut -d= -f2
-}
-
-cvt_setup_stuff(){
- mytmp=`mktemp -d -t mysql-ISAM-convert.XXXXXX`
- cvt_log="$mytmp/conversion.log"
- if [ ! -d "$mytmp" ]; then
- echo "can't create temporary directory, oh well." >&2
- exit 1
- fi
-
- chgrp mysql $mytmp
- chmod g+rwx $mytmp
- cvt_socket=${mytmp}/mysql.sock
-
- cvt_mysqld="mysqld --skip-grant-tables --skip-networking --socket $cvt_socket"
- cvt_mysql="mysql --socket $cvt_socket"
- cvt_mysqladmin="mysqladmin --socket $cvt_socket"
-}
-
-cvt_get_databases(){
- echo fetching database list ... >&2
- $cvt_mysql -e 'show databases' | sed -n -e '2,$p'
-}
-
-cvt_get_tables(){
- echo querying tables in $1 ... >&2
- $cvt_mysql $1 -e 'show table status' | sed -n -e '2,$p' | \
- cut -f 1,2 | grep -w 'ISAM$' | cut -f 1
-}
-
-cvt_convert_table(){
- echo converting $1.$2 ... >&2
- $cvt_mysql $1 -e "alter table $2 type=MyISAM"
-}
-
-cvt_wait_for_server(){
- local count
- echo -n waiting for server startup.. >&2
- while ! $cvt_mysql </dev/null >/dev/null 2>&1; do
- echo -n . >&2
- sleep 1
- count=".$count"
- if [ -f $mytmp/mysql.done ]; then
- echo "sorry... looks like the server crashed :(" >&2
- return 1
- elif [ "$count" = "...................." ]; then
- echo "sorry... looks like the server didn't start :(" >&2
- return 1
- fi
- done
- echo ok. >&2
-}
-
-cvt_wait_for_exit(){
- local count
- echo -n waiting for server shutdown.. >&2
- while [ ! -f $mytmp/mysql.done ]; do
- echo -n . >&2
- sleep 1
- count=".$count"
- if [ "$count" = "...................." ]; then
- echo "hrm... guess it never started?" >&2
- return 0
- fi
- done
- echo ok. >&2
-}
-
-cvt_cleanup(){
- local mysql_kids
- rm -rf $mytmp
- # kill any mysqld child processes left over. there *shouldn't* be any,
- # but let's not take chances with that
- mysql_kids=`ps o 'pid command' --ppid $$ | grep -E '^[[:digit:]]+ mysqld ' | cut -d' ' -f1`
- if [ "$mysql_kids" ]; then
- echo "strange, some mysql processes left around. killing them now." >&2
- kill $mysql_kids
- sleep 10
- mysql_kids=`ps o 'pid command' --ppid $$ | grep -E '^[[:digit:]]+ mysqld ' | cut -d' ' -f1`
- if [ "$mysql_kids" ]; then
- echo "okay, they're really not getting the hint..." >&2
- kill -9 $mysql_kids
- fi
- fi
-}
-
-################################ main() ##########################
-
-# test if upgrading from non conffile state
-if [ "$1" = "upgrade" ] && [ -x /usr/sbin/mysqld ]; then
- cvt_datadir=`cvt_get_param datadir`
- # test for ISAM tables, which we must convert NOW
- if [ -n "`find $cvt_datadir -name '*.ISM' 2>/dev/null`" ]; then
- pidfile=`cvt_get_param pid-file`
- if [ "$pidfile" ] && [ -f "$pidfile" ]; then
- server_pid=`cat $pidfile`
- if [ "$server_pid" ] && ps $server_pid >/dev/null 2>&1; then
- server_running="yes"
- fi
- fi
- # to be sure
- stop_server
-
- set +e
- cat << EOF >&2
-----------------------------------------
-WARNING WARNING WARNING
-----------------------------------------
-
-It has been detected that are are using ISAM format on some of your
-mysql database tables. This format has been deprecated and no longer
-supported. to prevent these databases from essentially disappearing,
-an attempt at format conversion will now be made. please check after
-your upgrade that all tables are present and accounted for.
-
-apologies for the noise, but we thought you'd appreciate it :)
-
-----------------------------------------
-WARNING WARNING WARNING
-----------------------------------------
-EOF
- cvt_setup_stuff
- ($cvt_mysqld >$cvt_log 2>&1; touch $mytmp/mysql.done ) &
-
- if cvt_wait_for_server; then
- dbs=`cvt_get_databases`
- for db in $dbs; do
- tables=`cvt_get_tables $db`
- for tbl in $tables; do
- cvt_convert_table $db $tbl
- done
- done
- else
- cvt_error="yes"
- fi
-
- echo shutting down server... >&2
- $cvt_mysqladmin shutdown
- cvt_wait_for_exit
- echo "all done!" >&2
- if [ ! "$cvt_error" = "yes" ]; then
- cvt_cleanup
- else
- echo "you might want to look in $mytmp..." >&2
- fi
-
- if [ "$server_running" ]; then
- start_server
- fi
-
- set -e
- fi
-fi
-
-exit 0
diff --git a/debian/mysql-extra-BASE.dirs.in b/debian/mysql-extra-BASE.dirs.in
deleted file mode 100644
index e7724817552..00000000000
--- a/debian/mysql-extra-BASE.dirs.in
+++ /dev/null
@@ -1 +0,0 @@
-usr/bin
diff --git a/debian/mysql-extra-BASE.files.in b/debian/mysql-extra-BASE.files.in
deleted file mode 100644
index 2ecc73d3f2e..00000000000
--- a/debian/mysql-extra-BASE.files.in
+++ /dev/null
@@ -1,3 +0,0 @@
-usr/bin/ndb_drop_index
-usr/bin/ndb_drop_table
-usr/bin/ndb_delete_all
diff --git a/debian/mysql-management-BASE.dirs.in b/debian/mysql-management-BASE.dirs.in
deleted file mode 100644
index 236670a2d0f..00000000000
--- a/debian/mysql-management-BASE.dirs.in
+++ /dev/null
@@ -1 +0,0 @@
-usr/sbin
diff --git a/debian/mysql-management-BASE.files.in b/debian/mysql-management-BASE.files.in
deleted file mode 100644
index f828b13bd5f..00000000000
--- a/debian/mysql-management-BASE.files.in
+++ /dev/null
@@ -1 +0,0 @@
-usr/sbin/ndb_mgmd
diff --git a/debian/mysql-management-BASE.mysql-management.init.in b/debian/mysql-management-BASE.mysql-management.init.in
deleted file mode 100644
index 8b3f6e25f4b..00000000000
--- a/debian/mysql-management-BASE.mysql-management.init.in
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/bin/bash
-#
-### BEGIN INIT INFO
-# Provides: mysql-ndb-mgm
-# Required-Start: $syslog
-# Required-Stop: $syslog mysql
-# Should-Start: $local_fs $remote_fs $network $named $time
-# Should-Stop: $local_fs $remote_fs $network $named $time
-# Default-Start: 2 3 4 5
-# Default-Stop: 0 1 6
-# Short-Description: Start and stop the mysql database cluster management daemon
-# Description: Controls the MySQL NDB Management Node daemon "ndb_mgmd".
-### END INIT INFO
-#
-set -e
-set -u
-${DEBIAN_SCRIPT_DEBUG:+ set -v -x}
-
-# Variables
-SELF=$(cd $(dirname $0); pwd -P)/$(basename $0)
-DAEMON=/usr/sbin/ndb_mgmd
-CONF=/etc/mysql/ndb_mgmd.cnf
-export HOME=/etc/mysql/
-
-# Safeguard (relative paths, core dumps..)
-cd /
-umask 077
-
-# Exit *silently* if we're not supposed to be started.
-#
-# The Debian scripts should execute these scripts to stop and start
-# the daemon when upgrading if it is started. On the other hand it should
-# remain silently if the server has not even been configured.
-# See /usr/share/doc/mysql-server-*/README.Debian for more information.
-test -x $DAEMON || exit 0
-test -r $CONF || exit 0
-. /lib/lsb/init-functions
-
-#
-# main()
-#
-case "${1:-''}" in
- 'start')
- # Start daemon
- log_daemon_msg "Starting MySQL NDB Management Node" "ndb_mgmd"
- # --pid-file does not work as the daemon forks itself with $PID=$PID+1
- if start-stop-daemon \
- --start \
- --exec $DAEMON \
- --user mysql \
- -- \
- -f $CONF
- then
- log_end_msg 0
- else
- log_end_msg 1
- log_warning_msg "Please take a look at the syslog."
- exit 1
- fi
- ;;
-
- 'stop')
- log_daemon_msg "Stopping MySQL NDB Management Node" "ndb_mgmd"
- if start-stop-daemon \
- --stop \
- --oknodo \
- --exec $DAEMON
- then
- log_end_msg 0
- else
- log_end_msg 1
- exit 1
- fi
- ;;
-
- 'restart'|'force-reload')
- set +e; $SELF stop; set -e
- $SELF start
- ;;
-
- *)
- echo "Usage: $SELF start|stop|restart|force-reload"
- exit 1
- ;;
-esac
-
diff --git a/debian/mysql-server-BASE.NEWS.in b/debian/mysql-server-BASE.NEWS.in
deleted file mode 100644
index 9884e2694e7..00000000000
--- a/debian/mysql-server-BASE.NEWS.in
+++ /dev/null
@@ -1,10 +0,0 @@
-mysql-dfsg-5.0 (5.0.18-9) unstable; urgency=low
-
- Rotation of the binary logs is now configured in /etc/mysql/my.cnf with
- "expire-logs-days" which defaults to 20 days. The old file
- /etc/mysql/debian-log-rotate.conf should be removed together with
- /etc/cron.daily/mysql-server after this value has been adjusted. Note that
- the old variable defined the number of files whereas the new one defines
- a time span in days.
-
- -- Christian Hammers <ch@debian.org> Tue, 24 Jan 2006 22:18:21 +0100
diff --git a/debian/mysql-server-BASE.README.Debian.in b/debian/mysql-server-BASE.README.Debian.in
deleted file mode 100644
index ca9eca271c0..00000000000
--- a/debian/mysql-server-BASE.README.Debian.in
+++ /dev/null
@@ -1,125 +0,0 @@
-
-* REMEMBER TO SET THE ROOT PASSWORD !!!
-============================================================================
-
-* MYSQL WON'T INSTALL?
-======================
-MySQL will only install if you have a non-numeric hostname that is resolvable
-via the /etc/hosts file. E.g. if the "hostname" command returns "myhostname"
-then there must be a line like "10.0.0.1 myhostname".
-
-On upgrades from MySQL 3.23, as shipped with Debian Woody, symlinks in place of
-/var/lib/mysql or /var/log/mysql gets accidently removed and have manually be
-restored.
-
-* MYSQL WON'T START OR STOP?
-============================
-You may never ever delete the special mysql user "debian-sys-maint". This
-user together with the credentials in /etc/mysql/debian.cnf are used by the
-init scripts to stop the server as they would require knowledge of the mysql
-root users password else.
-So in most of the times you can fix the situation by making sure that the
-debian.cnf file contains the right password, e.g. by setting a new one
-(remember to do a "flush privileges" then).
-
-* WHAT TO DO AFTER UPGRADES:
-============================
- - running mysql_upgrade to be able to make use of possibly added new
- privilege columns. This script does not give any use more rights.
-
-* WHAT TO DO AFTER INSTALLATION:
-================================
-The MySQL manual describes certain steps to do at this stage in a separate
-chapter. They are not necessary as the Debian packages does them
-automatically.
-
-The only thing that is left over for the admin is
- - setting the *passwords* !!!
- - creating new users and databases
- - read the rest of this text
-
-* DOWNGRADING TO 4.0 or 4.1:
-============================
-Unsupported. Period.
-But if you do and get problems or make interesting experiences, mail me, it
-might help others.
-Ok, if you really want, I would recommend to "mysqldump --opt" all tables,
-then purge 4.1, delete /var/lib/mysql, install 4.0 and insert the dumps. Be
-carefully, though, with the "mysql" table, you might not simply overwrite that
-one as the password for the mysql "debian-sys-maint" user is stored in
-/etc/mysql/debian.cnf and needed by /etc/init.d/ to start mysql and check if
-it's alive.
-
-* SOME APPLICATION CAN NO LONGER CONNECT:
-=========================================
-This application is probably linked against libmysqlclient12 or below and
-somebody has created a mysql user with new-style passwords.
-The old_passwords option which forces backwards compatibility, can be set
-in /etc/mysql/conf.d/old_passwords.conf.
-If that does not help, the password can be set manually, the application that
-inserted the user should be changed or the application that tries to connect
-should be updated to libmysqlclient14 or -15.
-Read http://dev.mysql.com/doc/refman/5.0/en/old-client.html
-
-* NETWORKING:
-=============
-For security reasons, the Debian package has enabled networking only on the
-loop-back device using "bind-address" in /etc/mysql/my.cnf. Check with
-"netstat -tlnp" where it is listening. If your connection is aborted
-immediately see if "mysqld: all" or similar is in /etc/hosts.allow and read
-hosts_access(5).
-
-* WHERE IS THE DOCUMENTATION?:
-==============================
-Unfortunately due to licensing restrictions, debian currently not able
-to provide the mysql-doc package in any format. For the most up to date
-documentation, please go to http://dev.mysql.com/doc.
-
-* PASSWORDS:
-============
-It is strongly recommended to set a password for the mysql root user (which
-is NOT the same as the "normal" root user) with the command:
- /usr/bin/mysqladmin -u root password 'enter-your-good-new-password-here'
-If you already had a password set add " -p " before "-u" to the line above.
-
-If you are tired to type the password in every time or want to automate your
-scripts you can store it in the file $HOME/.my.cnf. It should be chmod 0600
-(-rw------- username username .my.cnf) to ensure that nobody else can read
-it. Every other configuration parameter can be stored there, too. You will
-find an example below and more information in the MySQL manual in
-/usr/share/doc/mysql-doc or www.mysql.com.
-
-ATTENTION: It is necessary, that a .my.cnf from root always contains a "user"
-line wherever there is a "password" line, else, the Debian maintenance
-scripts, that use /etc/mysql/debian.cnf, will use the username
-"debian-sys-maint" but the password that is in root's .my.cnf. Also note,
-that every change you make in the /root/.my.cnf will affect the mysql cron
-script, too.
-
- # an example of $HOME/.my.cnf
- [client]
- user = your-mysql-username
- password = enter-your-good-new-password-here
-
-* BIG_ROWS FOR EVEN MORE ROWS IN A TABLE:
-=========================================
-If you ever run out of rows in a table there is the possibility of building
-the package with "-DBIG_ROWS" which, according to a MySQL employee on
-packagers@lists.mysql.com should lead to a 64bit row index (I guess > 2^32
-rows) but also to an approx. 5% performance loss.
-
-* NDB CLUSTER ENGINE:
-=====================
-NDB is the shared-nothing cluster engine since MySQL-4.1.
-This package contains the all three components, the mysql backend, the NDB
-Data Node and the NDB Management Node. The init scripts of the cluster
-daemons will silently exit unless their configuration is provided:
- mysql-ndb: needs "ndb-connectstring" in /etc/mysql/my.cnf
- mysql-ndb-mgm: needs /etc/mysql/ndb_mgmd.cnf
-
-* EXPIRE_LOGS_DAYS AND LOG_BIN:
-===============================
-Having expire_logs_days enabled but log-bin not crashes the server. Using both
-or none of those options is safe. To prevent this happening during the nightly
-log rotation via /etc/logrotate.d/mysql the initscript checks for malicious
-combination of options. This is Debian bug #368547 and MySQL bug #17733.
diff --git a/debian/mysql-server-BASE.config.in b/debian/mysql-server-BASE.config.in
deleted file mode 100644
index c89c6127dc2..00000000000
--- a/debian/mysql-server-BASE.config.in
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/bash -e
-
-. /usr/share/debconf/confmodule
-
-if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi
-${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 }
-
-CNF=/etc/mysql/my.cnf
-
-# Beware that there are two ypwhich one of them needs the 2>/dev/null!
-if test -n "`which ypwhich 2>/dev/null`" && ypwhich >/dev/null 2>&1; then
- db_input high mysql-server-@MYSQL_BRANDED_BASE_VERSION@/nis_warning || true
- db_go
-fi
-
-# only ask this question on fresh installs and during "reconfiguration".
-# there is also an additional check for empty root passwords in the
-# postinst script when the tools are available for us to use.
-if [ "$1" = "configure" ] && [ -z "$2" ] || [ "$1" = "reconfigure" ]; then
- db_input medium mysql-server/root_password || true
- db_go
-fi
-
-# If this is an upgrade of an already existing installation ask the user if
-# we may use the backwards incompatible but more secure password format.
-# This should not be shown at dpkg-reconfigure and except for the dist-upgrade,
-# config files are for the admin only!
-# Read: If mysql was already installed but not from Etch and it was either 4.0
-# or had old_passwords enabled before then the system is affected.
-if [ "$1" = "configure" ] &&
- [ -f $CNF ] &&
- (
- [ ! -f /var/lib/mysql/debian-4.1.flag ] ||
- egrep -q -i '^[[:space:]]*old.passwords[[:space:]]*=[[:space:]]*(1|true)' $CNF
- )
-then
- db_input medium mysql-server-@MYSQL_BRANDED_BASE_VERSION@/need_sarge_compat || true
- db_go
-fi
diff --git a/debian/mysql-server-BASE.dirs.in b/debian/mysql-server-BASE.dirs.in
deleted file mode 100644
index 62ce062ac84..00000000000
--- a/debian/mysql-server-BASE.dirs.in
+++ /dev/null
@@ -1,13 +0,0 @@
-etc/init.d
-etc/logrotate.d
-usr/bin
-usr/lib
-usr/lib/mysql
-usr/sbin
-usr/share/man/man8
-usr/share/info
-usr/share/mysql
-usr/lib/pkgconfig
-var/run/mysqld
-var/lib/mysql-upgrade
-var/lib/mysql-cluster
diff --git a/debian/mysql-server-BASE.docs.in b/debian/mysql-server-BASE.docs.in
deleted file mode 100644
index d624701bb8f..00000000000
--- a/debian/mysql-server-BASE.docs.in
+++ /dev/null
@@ -1,2 +0,0 @@
-EXCEPTIONS-CLIENT
-debian/copyright.more
diff --git a/debian/mysql-server-BASE.files.in b/debian/mysql-server-BASE.files.in
deleted file mode 100644
index ff79ca73aa7..00000000000
--- a/debian/mysql-server-BASE.files.in
+++ /dev/null
@@ -1,47 +0,0 @@
-usr/bin/my_print_defaults
-usr/bin/myisam_ftdump
-usr/bin/myisamchk
-usr/bin/myisamlog
-usr/bin/myisampack
-usr/bin/mysql_convert_table_format
-usr/bin/mysql_fix_extensions
-usr/bin/mysql_fix_privilege_tables
-usr/bin/mysql_install_db
-usr/bin/mysql_secure_installation
-usr/bin/mysql_setpermission
-usr/bin/mysql_tzinfo_to_sql
-usr/bin/mysql_upgrade
-usr/bin/mysql_zap
-usr/bin/mysqlbug
-usr/bin/mysqld_multi
-usr/bin/mysqld_safe
-usr/bin/mysqldumpslow
-usr/bin/mysqlhotcopy
-usr/bin/mysqltest
-usr/bin/perror
-usr/bin/replace
-usr/bin/resolve_stack_dump
-usr/bin/resolveip
-usr/sbin/mysqld
-usr/sbin/mysqlmanager
-usr/lib/mysql/mysqld.sym
-usr/share/lintian/overrides/mysql-server-@MYSQL_BRANDED_BASE_VERSION@
-usr/share/info/mysql.info
-usr/share/man/man1/mysqlman.1
-usr/share/man/man1/my_print_defaults.1
-usr/share/man/man1/myisam_ftdump.1
-usr/share/man/man1/myisamchk.1
-usr/share/man/man1/myisamlog.1
-usr/share/man/man1/myisampack.1
-usr/share/man/man8/mysqld.8
-usr/share/man/man1/mysqld_multi.1
-usr/share/man/man1/mysqld_safe.1
-usr/share/man/man1/mysql_fix_privilege_tables.1
-usr/share/man/man1/mysql_install_db.1
-usr/share/man/man1/mysqlhotcopy.1
-usr/share/man/man8/mysqlmanager.8
-usr/share/man/man1/mysql_upgrade.1
-usr/share/man/man1/mysql_tzinfo_to_sql.1
-usr/share/man/man1/mysql_zap.1
-usr/share/man/man1/perror.1
-usr/share/man/man1/replace.1
diff --git a/debian/mysql-server-BASE.links.in b/debian/mysql-server-BASE.links.in
deleted file mode 100644
index b023931144d..00000000000
--- a/debian/mysql-server-BASE.links.in
+++ /dev/null
@@ -1 +0,0 @@
-usr/bin/mysqld_safe usr/bin/safe_mysqld
diff --git a/debian/mysql-server-BASE.lintian-overrides.in b/debian/mysql-server-BASE.lintian-overrides.in
deleted file mode 100644
index 7eceabc1aec..00000000000
--- a/debian/mysql-server-BASE.lintian-overrides.in
+++ /dev/null
@@ -1,4 +0,0 @@
-mysql-server-@MYSQL_BRANDED_BASE_VERSION@: possible-bashism-in-maintainer-script postinst:81 'p{("a".."z","A".."Z",0..9)[int(rand(62))]}'
-mysql-server-@MYSQL_BRANDED_BASE_VERSION@: possible-bashism-in-maintainer-script preinst:33 '${cmd/ */}'
-mysql-server-@MYSQL_BRANDED_BASE_VERSION@: statically-linked-binary ./usr/bin/mysql_tzinfo_to_sql
-mysql-server-@MYSQL_BRANDED_BASE_VERSION@: statically-linked-binary ./usr/sbin/mysqld
diff --git a/debian/mysql-server-BASE.logcheck.ignore.paranoid.in b/debian/mysql-server-BASE.logcheck.ignore.paranoid.in
deleted file mode 100644
index 61231af32fc..00000000000
--- a/debian/mysql-server-BASE.logcheck.ignore.paranoid.in
+++ /dev/null
@@ -1,10 +0,0 @@
-/etc/init.d/mysql\[[0-9]+\]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists\!$
-/etc/init.d/mysql\[[0-9]+\]: '/usr/bin/mysqladmin --defaults-(extra-)?file=/etc/mysql/debian.cnf ping' resulted in$
-mysqld\[[0-9]+\]: $
-mysqld\[[0-9]+\]: Support MySQL by buying support/licenses at http://shop.mysql.com$
-mysqld\[[0-9]+\]: Version: .* socket: '/var/run/mysqld/mysqld.sock' port: 3306$
-mysqld\[[0-9]+\]: Warning: Ignoring user change to 'mysql' because the user was set to 'mysql' earlier on the command line$
-mysqld_safe\[[0-9]+\]: started$
-mysqld_safe\[[0-9]+\]: Support MySQL by buying support/licenses at http://shop.mysql.com *$
-usermod\[[0-9]+\]: change user `mysql' GID from `([0-9]+)' to `\1'$
-usermod\[[0-9]+\]: change user `mysql' shell from `/bin/false' to `/bin/false'$
diff --git a/debian/mysql-server-BASE.logcheck.ignore.server.in b/debian/mysql-server-BASE.logcheck.ignore.server.in
deleted file mode 100644
index 3a7de17f3f8..00000000000
--- a/debian/mysql-server-BASE.logcheck.ignore.server.in
+++ /dev/null
@@ -1,31 +0,0 @@
-/etc/init.d/mysql\[[0-9]+\]: [0-9]+ processes alive and '/usr/bin/mysqladmin --defaults-(extra-)?file=/etc/mysql/debian.cnf ping' resulted in$
-/etc/init.d/mysql\[[0-9]+\]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists\!$
-/etc/init.d/mysql\[[0-9]+\]: '/usr/bin/mysqladmin --defaults-(extra-)?file=/etc/mysql/debian.cnf ping' resulted in$
-mysqld\[[0-9]+\]: ?$
-mysqld\[[0-9]+\]: .*InnoDB: Shutdown completed
-mysqld\[[0-9]+\]: .*InnoDB: Started;
-mysqld\[[0-9]+\]: .*InnoDB: Starting shutdown\.\.\.$
-mysqld\[[0-9]+\]: .*\[Note\] /usr/sbin/mysqld: Normal shutdown$
-mysqld\[[0-9]+\]: .*\[Note\] /usr/sbin/mysqld: ready for connections\.$
-mysqld\[[0-9]+\]: .*\[Note\] /usr/sbin/mysqld: Shutdown complete$
-mysqld\[[0-9]+\]: Support MySQL by buying support/licenses at http://shop.mysql.com$
-mysqld\[[0-9]+\]: /usr/sbin/mysqld: ready for connections\.$
-mysqld\[[0-9]+\]: .*/usr/sbin/mysqld: Shutdown Complete$
-mysqld\[[0-9]+\]: Version: .* socket
-mysqld\[[0-9]+\]: Warning: Ignoring user change to 'mysql' because the user was set to 'mysql' earlier on the command line$
-mysqld_safe\[[0-9]+\]: ?$
-mysqld_safe\[[0-9]+\]: able to use the new GRANT command!$
-mysqld_safe\[[0-9]+\]: ended$
-mysqld_safe\[[0-9]+\]: http://www.mysql.com$
-mysqld_safe\[[0-9]+\]: NOTE: If you are upgrading from a MySQL <= 3.22.10 you should run$
-mysqld_safe\[[0-9]+\]: PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !$
-mysqld_safe\[[0-9]+\]: Please report any problems with the /usr/bin/mysqlbug script!$
-mysqld_safe\[[0-9]+\]: See the manual for more instructions.$
-mysqld_safe\[[0-9]+\]: started$
-mysqld_safe\[[0-9]+\]: Support MySQL by buying support/licenses at
-mysqld_safe\[[0-9]+\]: The latest information about MySQL is available on the web at$
-mysqld_safe\[[0-9]+\]: the /usr/bin/mysql_fix_privilege_tables. Otherwise you will not be$
-mysqld_safe\[[0-9]+\]: To do so, start the server, then issue the following commands:$
-mysqld_safe\[[0-9]+\]: /usr/bin/mysqladmin -u root password 'new-password'$
-usermod\[[0-9]+\]: change user `mysql' GID from `([0-9]+)' to `\1'$
-usermod\[[0-9]+\]: change user `mysql' shell from `/bin/false' to `/bin/false'$
diff --git a/debian/mysql-server-BASE.logcheck.ignore.workstation.in b/debian/mysql-server-BASE.logcheck.ignore.workstation.in
deleted file mode 100644
index 3a7de17f3f8..00000000000
--- a/debian/mysql-server-BASE.logcheck.ignore.workstation.in
+++ /dev/null
@@ -1,31 +0,0 @@
-/etc/init.d/mysql\[[0-9]+\]: [0-9]+ processes alive and '/usr/bin/mysqladmin --defaults-(extra-)?file=/etc/mysql/debian.cnf ping' resulted in$
-/etc/init.d/mysql\[[0-9]+\]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists\!$
-/etc/init.d/mysql\[[0-9]+\]: '/usr/bin/mysqladmin --defaults-(extra-)?file=/etc/mysql/debian.cnf ping' resulted in$
-mysqld\[[0-9]+\]: ?$
-mysqld\[[0-9]+\]: .*InnoDB: Shutdown completed
-mysqld\[[0-9]+\]: .*InnoDB: Started;
-mysqld\[[0-9]+\]: .*InnoDB: Starting shutdown\.\.\.$
-mysqld\[[0-9]+\]: .*\[Note\] /usr/sbin/mysqld: Normal shutdown$
-mysqld\[[0-9]+\]: .*\[Note\] /usr/sbin/mysqld: ready for connections\.$
-mysqld\[[0-9]+\]: .*\[Note\] /usr/sbin/mysqld: Shutdown complete$
-mysqld\[[0-9]+\]: Support MySQL by buying support/licenses at http://shop.mysql.com$
-mysqld\[[0-9]+\]: /usr/sbin/mysqld: ready for connections\.$
-mysqld\[[0-9]+\]: .*/usr/sbin/mysqld: Shutdown Complete$
-mysqld\[[0-9]+\]: Version: .* socket
-mysqld\[[0-9]+\]: Warning: Ignoring user change to 'mysql' because the user was set to 'mysql' earlier on the command line$
-mysqld_safe\[[0-9]+\]: ?$
-mysqld_safe\[[0-9]+\]: able to use the new GRANT command!$
-mysqld_safe\[[0-9]+\]: ended$
-mysqld_safe\[[0-9]+\]: http://www.mysql.com$
-mysqld_safe\[[0-9]+\]: NOTE: If you are upgrading from a MySQL <= 3.22.10 you should run$
-mysqld_safe\[[0-9]+\]: PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !$
-mysqld_safe\[[0-9]+\]: Please report any problems with the /usr/bin/mysqlbug script!$
-mysqld_safe\[[0-9]+\]: See the manual for more instructions.$
-mysqld_safe\[[0-9]+\]: started$
-mysqld_safe\[[0-9]+\]: Support MySQL by buying support/licenses at
-mysqld_safe\[[0-9]+\]: The latest information about MySQL is available on the web at$
-mysqld_safe\[[0-9]+\]: the /usr/bin/mysql_fix_privilege_tables. Otherwise you will not be$
-mysqld_safe\[[0-9]+\]: To do so, start the server, then issue the following commands:$
-mysqld_safe\[[0-9]+\]: /usr/bin/mysqladmin -u root password 'new-password'$
-usermod\[[0-9]+\]: change user `mysql' GID from `([0-9]+)' to `\1'$
-usermod\[[0-9]+\]: change user `mysql' shell from `/bin/false' to `/bin/false'$
diff --git a/debian/mysql-server-BASE.mysql-server.logrotate.in b/debian/mysql-server-BASE.mysql-server.logrotate.in
deleted file mode 100644
index d32bef50588..00000000000
--- a/debian/mysql-server-BASE.mysql-server.logrotate.in
+++ /dev/null
@@ -1,28 +0,0 @@
-# - I put everything in one block and added sharedscripts, so that mysql gets
-# flush-logs'd only once.
-# Else the binary logs would automatically increase by n times every day.
-# - The error log is obsolete, messages go to syslog now.
-/var/log/mysql.log /var/log/mysql/mysql.log /var/log/mysql/mysql-slow.log {
- daily
- rotate 7
- missingok
- create 640 mysql adm
- compress
- sharedscripts
- postrotate
- test -x /usr/bin/mysqladmin || exit 0
-
- # If this fails, check debian.conf!
- export HOME=/etc/mysql/my.cnf
- MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf"
- if [ -z "`$MYADMIN ping 2>/dev/null`" ]; then
- # Really no mysqld or rather a missing debian-sys-maint user?
- # If this occurs and is not a error please report a bug.
- if ps cax | grep -q mysqld; then
- exit 1
- fi
- else
- $MYADMIN flush-logs
- fi
- endscript
-}
diff --git a/debian/mysql-server-BASE.postinst.in b/debian/mysql-server-BASE.postinst.in
deleted file mode 100644
index 19ae1892de8..00000000000
--- a/debian/mysql-server-BASE.postinst.in
+++ /dev/null
@@ -1,276 +0,0 @@
-#!/bin/bash -e
-
-. /usr/share/debconf/confmodule
-
-if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi
-${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 }
-
-export PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin
-
-# This command can be used as pipe to syslog. With "-s" it also logs to stderr.
-ERR_LOGGER="logger -p daemon.err -t mysqld_safe -i"
-
-invoke() {
- if [ -x /usr/sbin/invoke-rc.d ]; then
- invoke-rc.d mysql $1
- else
- /etc/init.d/mysql $1
- fi
-}
-
-MYSQL_BOOTSTRAP="/usr/sbin/mysqld --bootstrap --user=mysql --skip-grant-tables --skip-bdb --skip-innodb "
-
-test_mysql_access() {
- mysql --no-defaults -u root -h localhost </dev/null >/dev/null 2>&1
-}
-
-# call with $1 = "online" to connect to the server, otherwise it bootstraps
-set_mysql_rootpw() {
- # forget we ever saw the password. don't use reset to keep the seen status
- db_set mysql-server/root_password ""
-
- tfile=`mktemp`
- if [ ! -f "$tfile" ]; then
- return 1
- fi
-
- # this avoids us having to call "test" or "[" on $rootpw
- cat << EOF > $tfile
-USE mysql;
-UPDATE user SET password=PASSWORD("$rootpw") WHERE user='root';
-FLUSH PRIVILEGES;
-EOF
- if grep -q 'PASSWORD("")' $tfile; then
- retval=0
- elif [ "$1" = "online" ]; then
- mysql --no-defaults -u root -h localhost <$tfile >/dev/null
- retval=$?
- else
- $MYSQL_BOOTSTRAP <$tfile
- retval=$?
- fi
- rm -f $tfile
- return $retval
-}
-
-# This is necessary because mysql_install_db removes the pid file in /var/run
-# and because changed configuration options should take effect immediately.
-# In case the server wasn't running at all it should be ok if the stop
-# script fails. I can't tell at this point because of the cleaned /var/run.
-set +e; invoke stop; set -e
-
-case "$1" in
- configure)
- mysql_cnf=/etc/mysql/my.cnf
- mysql_datadir=/usr/share/mysql
- mysql_statedir=/var/lib/mysql
- mysql_rundir=/var/run/mysqld
- mysql_logdir=/var/log
- mysql_cfgdir=/etc/mysql
- mysql_newlogdir=/var/log/mysql
- mysql_upgradedir=/var/lib/mysql-upgrade
-
- # first things first, if the following symlink exists, it is a preserved
- # copy the old data dir from a mysql upgrade that would have otherwise
- # been replaced by an empty mysql dir. this should restore it.
- for dir in DATADIR LOGDIR; do
- if [ "$dir" = "DATADIR" ]; then targetdir=$mysql_statedir; else targetdir=$mysql_newlogdir; fi
- savelink="$mysql_upgradedir/$dir.link"
- if [ -L "$savelink" ]; then
- # If the targetdir was a symlink before we upgraded it is supposed
- # to be either still be present or not existing anymore now.
- if [ -L "$targetdir" ]; then
- rm "$savelink"
- elif [ ! -d "$targetdir" ]; then
- mv "$savelink" "$targetdir"
- else
- # this should never even happen, but just in case...
- mysql_tmp=`mktemp -d -t mysql-symlink-restore-XXXXXX`
- echo "this is very strange! see $mysql_tmp/README..." >&2
- mv "$targetdir" "$mysql_tmp"
- cat << EOF > "$mysql_tmp/README"
-
-if you're reading this, it's most likely because you had replaced /var/lib/mysql
-with a symlink, then upgraded to a new version of mysql, and then dpkg
-removed your symlink (see #182747 and others). the mysql packages noticed
-that this happened, and as a workaround have restored it. however, because
-/var/lib/mysql seems to have been re-created in the meantime, and because
-we don't want to rm -rf something we don't know as much about, we're going
-to leave this unexpected directory here. if your database looks normal,
-and this is not a symlink to your database, you should be able to blow
-this all away.
-
-EOF
- fi
- fi
- rmdir $mysql_upgradedir 2>/dev/null || true
- done
-
- # Ensure the existence and right permissions for the database and
- # log files.
- if [ ! -d "$mysql_statedir" -a ! -L "$mysql_statedir" ]; then mkdir "$mysql_statedir"; fi
- if [ ! -d "$mysql_statedir/mysql" -a ! -L "$mysql_statedir/mysql" ]; then mkdir "$mysql_statedir/mysql"; fi
- if [ ! -d "$mysql_newlogdir" -a ! -L "$mysql_newlogdir" ]; then mkdir "$mysql_newlogdir"; fi
- # When creating an ext3 jounal on an already mounted filesystem like e.g.
- # /var/lib/mysql, you get a .journal file that is not modifyable by chown.
- # The mysql_datadir must not be writable by the mysql user under any
- # circumstances as it contains scripts that are executed by root.
- set +e
- chown -R 0.0 $mysql_datadir
- chown -R mysql $mysql_statedir
- chown -R mysql $mysql_rundir
- chown -R mysql:adm $mysql_newlogdir; chmod 2750 $mysql_newlogdir;
- for i in log err; do
- touch $mysql_logdir/mysql.$i
- chown mysql:adm $mysql_logdir/mysql.$i
- chmod 0640 $mysql_logdir/mysql.$i
- done
- set -e
-
- # This is important to avoid dataloss when there is a removed
- # mysql-server version from Woody lying around which used the same
- # data directory and then somewhen gets purged by the admin.
- db_set mysql-server/postrm_remove_database false || true
-
- # So that mysql-server (4.0) can check if it's safe to install.
- touch $mysql_statedir/debian-@VER@.flag
-
- # On dist-upgrades, we ensure that the old_password setting is updated
- # before passwords are changed. Except for that config files are taboo!
- db_get mysql-server-@MYSQL_BRANDED_BASE_VERSION@/need_sarge_compat_done || true
- if [ "$RET" = "false" ]; then
- db_get mysql-server-@MYSQL_BRANDED_BASE_VERSION@/need_sarge_compat
- echo -e "# created by debconf but save to be edited\n[mysqld]\nold_passwords = $RET" > /etc/mysql/conf.d/old_passwords.cnf
- fi
- db_set mysql-server-@MYSQL_BRANDED_BASE_VERSION@/need_sarge_compat_done true
-
- # initiate databases. Output is not allowed by debconf :-(
- # Debian: beware of the bashisms...
- # Debian: can safely run on upgrades with existing databases
- set +e
- /bin/bash /usr/bin/mysql_install_db --rpm 2>&1 | $ERR_LOGGER
- if [ "$?" != "0" ]; then
- echo "ATTENTION: An error has occured. More info is in the syslog!"
- fi
- set -e
-
- ## On every reconfiguration the maintenance user is recreated.
- #
- # - It is easier to regenerate the password every time but as people
- # use fancy rsync scripts and file alteration monitors, the existing
- # password is used and existing files not touched.
- # - The mysqld statement is like that in mysql_install_db because the
- # server is not already running. This has some implications:
- # - The amount of newlines and semicolons in the query is important!
- # - GRANT is not possible with --skipt-grant-tables and "INSERT
- # (user,host..) VALUES" is not --ansi compliant
- # - The echo is just for readability. ash's buildin has no "-e" so use /bin/echo.
- # - The Super_priv, Show_db_priv, Create_tmp_table_priv and Lock_tables_priv
- # may not be present as old Woody 3.23 databases did not have it and the
- # admin might not already have run mysql_upgrade which adds them.
- # As the binlog cron scripts to need at least the Super_priv, I do first
- # the old query which always succeeds and then the new which may or may not.
-
- # recreate the credentials file if not present or without mysql_upgrade stanza
- dc=$mysql_cfgdir/debian.cnf;
- if [ -e "$dc" -a -n "`fgrep mysql_upgrade $dc 2>/dev/null`" ]; then
- pass="`sed -n 's/password *= *// p' $dc | head -n 1`"
- else
- pass=`perl -e 'print map{("a".."z","A".."Z",0..9)[int(rand(62))]}(1..16)'`;
- if [ ! -d "$mysql_cfgdir" ]; then install -o 0 -g 0 -m 0755 -d $mysql_cfgdir; fi
- cat /dev/null > $dc
- echo "# Automatically generated for Debian scripts. DO NOT TOUCH!" >>$dc
- echo "[client]" >>$dc
- echo "host = localhost" >>$dc
- echo "user = debian-sys-maint" >>$dc
- echo "password = $pass" >>$dc
- echo "socket = $mysql_rundir/mysqld.sock" >>$dc
- echo "[mysql_upgrade]" >>$dc
- echo "user = debian-sys-maint" >>$dc
- echo "password = $pass" >>$dc
- echo "socket = $mysql_rundir/mysqld.sock" >>$dc
- echo "basedir = /usr" >>$dc
- fi
- # If this dir chmod go+w then the admin did it. But this file should not.
- chown 0:0 $dc
- chmod 0600 $dc
-
- # update privilege and timezone tables
- password_column_fix_query=`/bin/echo -e \
- "USE mysql\n" \
- "ALTER TABLE user CHANGE password Password varchar(41) collate utf8_bin NOT NULL default ''"`;
- replace_query=`/bin/echo -e \
- "USE mysql\n" \
- "REPLACE INTO user SET " \
- " host='localhost', user='debian-sys-maint', password=password('$pass'), " \
- " Select_priv='Y', Insert_priv='Y', Update_priv='Y', Delete_priv='Y', " \
- " Create_priv='Y', Drop_priv='Y', Reload_priv='Y', Shutdown_priv='Y', " \
- " Process_priv='Y', File_priv='Y', Grant_priv='Y', References_priv='Y', " \
- " Index_priv='Y', Alter_priv='Y' __EXTRA_PRIVS__"`;
- extra_privs=`/bin/echo -e \
- ", Show_db_priv='Y' " \
- ", Super_priv='Y' " \
- ", Create_tmp_table_priv='Y' " \
- ", Lock_tables_priv='Y' " \
- ", Execute_priv='Y' " \
- ", Repl_slave_priv='Y' " \
- ", Repl_client_priv='Y' "`;
-
- # Upgrade password column format before the root password gets set.
- echo "$password_column_fix_query" | $MYSQL_BOOTSTRAP 2>&1 | $ERR_LOGGER
-
- db_get mysql-server/root_password && rootpw="$RET"
- if ! set_mysql_rootpw; then
- password_error="yes"
- fi
-
- echo "$replace_query" | sed "s/__EXTRA_PRIVS__//" | $MYSQL_BOOTSTRAP 2>&1 | $ERR_LOGGER
- set +e
- echo "$replace_query" | sed "s/__EXTRA_PRIVS__/$extra_privs/" | $MYSQL_BOOTSTRAP 2>&1 | $ERR_LOGGER
- set -e
- mysql_tzinfo_to_sql /usr/share/zoneinfo/ 2>&1 | egrep -v 'Skipping it.$' | $MYSQL_BOOTSTRAP 2>&1 | $ERR_LOGGER
-
- # The Sarge package "mysql-server" which used to include the mysqld daemon
- # may still be in unselected-configured state (i.e. after a remove but not
- # purge) in which case its now obsolete cronscript has to be moved away.
- for i in /etc/cron.daily/mysql-server /etc/cron.daily/mysql-server-41 /etc/mysql/debian-log-rotate.conf; do
- if [ -f $i ]; then mv $i $i.dpkg-old; fi
- done
- ;;
-
- abort-upgrade|abort-remove|abort-configure)
- ;;
-
- *)
- echo "postinst called with unknown argument '$1'" 1>&2
- exit 1
- ;;
-esac
-
-#DEBHELPER#
-
-# here we check to see if we can connect as root without a password
-# this should catch upgrades from previous verisons where the root
-# password wasn't set. if there is a password, or if the connection
-# fails for any other reason, nothing happens.
-if [ "$1" = "configure" ]; then
- if test_mysql_access; then
- db_input medium mysql-server/root_password || true
- db_go
- db_get mysql-server/root_password && rootpw="$RET"
-
- if ! set_mysql_rootpw "online"; then
- password_error="yes"
- fi
- fi
-
- if [ "$password_error" = "yes" ]; then
- db_input high mysql-server/error_setting_password || true
- db_go
- fi
-
-fi
-
-db_stop # in case invoke failes
-
-exit 0
diff --git a/debian/mysql-server-BASE.postrm.in b/debian/mysql-server-BASE.postrm.in
deleted file mode 100644
index 8021068d87a..00000000000
--- a/debian/mysql-server-BASE.postrm.in
+++ /dev/null
@@ -1,92 +0,0 @@
-#!/bin/bash -e
-
-. /usr/share/debconf/confmodule
-
-if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi
-${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 }
-
-MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf"
-
-# Try to stop the server in a sane way. If it does not success let the admin
-# do it himself. No database directories should be removed while the server
-# is running!
-stop_server() {
- set +e
- if [ -x /usr/sbin/invoke-rc.d ]; then
- invoke-rc.d mysql stop
- else
- /etc/init.d/mysql stop
- fi
- errno=$?
- set -e
-
- if [ "$?" != 0 ]; then
- echo "Trying to stop the MySQL server resulted in exitcode $?." 1>&2
- echo "Stop it yourself and try again!" 1>&2
- exit 1
- fi
-}
-
-case "$1" in
- purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
- if [ -n "`$MYADMIN ping 2>/dev/null`" ]; then
- stop_server
- sleep 2
- fi
- ;;
- *)
- echo "postrm called with unknown argument '$1'" 1>&2
- exit 1
- ;;
-esac
-
-#
-# - Do NOT purge logs or data if another mysql-sever* package is installed (#307473)
-# - Remove the mysql user only after all his owned files are purged.
-#
-if [ "$1" = "purge" -a ! \( -x /usr/sbin/mysqld -o -L /usr/sbin/mysqld \) ]; then
- # we remove the mysql user only after all his owned files are purged
- rm -f /var/log/mysql.{log,err}{,.0,.[1234567].gz}
- rm -rf /var/log/mysql
-
- db_input high mysql-server-@MYSQL_BRANDED_BASE_VERSION@/postrm_remove_databases || true
- db_go
- db_get mysql-server-@MYSQL_BRANDED_BASE_VERSION@/postrm_remove_databases || true
- if [ "$RET" = "true" ]; then
- # never remove the debian.cnf when the databases are still existing
- # else we ran into big trouble on the next install!
- rm -f /etc/mysql/conf.d/old_passwords.cnf
- rm -f /etc/mysql/debian.cnf
- rm -rf /var/lib/mysql
- rm -rf /var/run/mysqld
- userdel mysql || true
- fi
-
- # (normally) Automatically added by dh_installinit
- if [ "$1" = "purge" ] ; then
- update-rc.d mysql remove >/dev/null || exit 0
- fi
- # (normally) End automatically added section
-fi
-
-# (normally) Automatically added by dh_installdebconf
-if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
- . /usr/share/debconf/confmodule
- db_purge
-fi
-# (normally) End automatically added section
-
-# (normally) Automatically added by dh_installinit
-if [ "$1" = "purge" ] ; then
- update-rc.d mysql-ndb-mgm remove >/dev/null || exit 0
-fi
-# (normally) End automatically added section
-# (normally) Automatically added by dh_installinit
-if [ "$1" = "purge" ] ; then
- update-rc.d mysql-ndb remove >/dev/null || exit 0
-fi
-# (normally) End automatically added section
-
-# no DEBHELPER here, "update-rc.d remove" fails if mysql-server-@MYSQL_BRANDED_BASE_VERSION@ is installed
-
-exit 0
diff --git a/debian/mysql-server-BASE.preinst.in b/debian/mysql-server-BASE.preinst.in
deleted file mode 100644
index 529867f98e0..00000000000
--- a/debian/mysql-server-BASE.preinst.in
+++ /dev/null
@@ -1,167 +0,0 @@
-#!/bin/bash -e
-#
-# summary of how this script can be called:
-# * <new-preinst> install
-# * <new-preinst> install <old-version>
-# * <new-preinst> upgrade <old-version>
-# * <old-preinst> abort-upgrade <new-version>
-#
-
-. /usr/share/debconf/confmodule
-
-if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi
-${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 }
-
-export PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin
-MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf"
-DATADIR=/var/lib/mysql
-LOGDIR=/var/log/mysql
-UPGRADEDIR=/var/lib/mysql-upgrade
-
-# Try to stop the server in a sane way. If it does not success let the admin
-# do it himself. No database directories should be removed while the server
-# is running! Another mysqld in e.g. a different chroot is fine for us.
-stop_server() {
- if [ ! -x /etc/init.d/mysql ]; then return; fi
-
- set +e
- if [ -x /usr/sbin/invoke-rc.d ]; then
- cmd="invoke-rc.d mysql stop"
- else
- cmd="/etc/init.d/mysql stop"
- fi
- $cmd
- errno=$?
- set -e
-
- # 0=ok, 100=no init script (fresh install)
- if [ "$errno" != 0 -a "$errno" != 100 ]; then
- echo "${cmd/ */} returned $errno" 1>&2
- echo "There is a MySQL server running, but we failed in our attempts to stop it." 1>&2
- echo "Stop it yourself and try again!" 1>&2
- db_stop
- exit 1
- fi
-}
-
-################################ main() ##########################
-
-this_version=@VER@
-
-# Safe the user from stupidities.
-show_downgrade_warning=0
-for i in `ls $DATADIR/debian-*.flag 2>/dev/null`; do
- found_version=`echo $i | sed 's/.*debian-\([0-9\.]\+\).flag/\1/'`
- if dpkg --compare-versions "$this_version" '<<' "$found_version"; then
- show_downgrade_warning=1
- break;
- fi
-done
-if [ "$show_downgrade_warning" = 1 ]; then
- db_fset mysql-server-$this_version/really_downgrade seen false || true
- db_input medium mysql-server-$this_version/really_downgrade || true
- db_go
- db_get mysql-server-$this_version/really_downgrade || true
- if [ "$RET" = "true" ]; then
- rm -f $DATADIR/debian-*.flag
- touch $DATADIR/debian-$this_version.flag
- else
- echo "Aborting downgrade from (at least) $found_version to $this_version." 1>&2
- db_stop
- exit 1
- fi
-fi
-
-# to be sure
-stop_server
-
-# If we use NIS then errors should be tolerated. It's up to the
-# user to ensure that the mysql user is correctly setup.
-# Beware that there are two ypwhich one of them needs the 2>/dev/null!
-if test -n "`which ypwhich 2>/dev/null`" && ypwhich >/dev/null 2>&1; then
- set +e
-fi
-
-#
-# Now we have to ensure the following state:
-# /etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false
-# /etc/group: mysql:x:101:
-#
-# Sadly there could any state be present on the system so we have to
-# modify everything carefully i.e. not doing a chown before creating
-# the user etc...
-#
-
-# creating mysql group if he isn't already there
-if ! getent group mysql >/dev/null; then
- # Adding system group: mysql.
- addgroup --system mysql >/dev/null
-fi
-
-# creating mysql user if he isn't already there
-if ! getent passwd mysql >/dev/null; then
- # Adding system user: mysql.
- adduser \
- --system \
- --disabled-login \
- --ingroup mysql \
- --home $DATADIR \
- --gecos "MySQL Server" \
- --shell /bin/false \
- mysql >/dev/null
-fi
-
-# end of NIS tolerance zone
-set -e
-
-# if there's a symlink, let's store where it's pointing, because otherwise
-# it's going to be lost in some situations
-for dir in DATADIR LOGDIR; do
- checkdir=`eval echo "$"$dir`
- if [ -L "$checkdir" ]; then
- mkdir -p "$UPGRADEDIR"
- cp -d "$checkdir" "$UPGRADEDIR/$dir.link"
- fi
-done
-
-# creating mysql home directory
-if [ ! -d $DATADIR -a ! -L $DATADIR ]; then
- mkdir $DATADIR
-fi
-
-# checking disc space
-if LC_ALL=C BLOCKSIZE= df --portability $DATADIR/. | tail -n 1 | awk '{ exit ($4>1000) }'; then
- echo "ERROR: There's not enough space in $DATADIR/" 1>&2
- db_stop
- exit 1
-fi
-
-# Since the home directory was created before putting the user into
-# the mysql group and moreover we cannot guarantee that the
-# permissions were correctly *before* calling this script, we fix them now.
-# In case we use NIS and no mysql user is present then this script should
-# better fail now than later..
-# The "set +e" is necessary as e.g. a ".journal" of a ext3 partition is
-# not chgrp'able (#318435).
-set +e
-chown mysql:mysql $DATADIR
-find $DATADIR -follow -not -group mysql -print0 2>/dev/null \
- | xargs -0 --no-run-if-empty chgrp mysql
-set -e
-
-# Some files below /etc/ were possibly in the mysql-server-4.1/sarge package
-# before. They get overwritten by current ones to avoid unnecessary dpkg questions.
-while read md5 file; do
- if [ "`md5sum $file 2>/dev/null`" = "$md5 $file" ]; then
- cp /usr/share/mysql-common/internal-use-only/`echo $file | sed 's°/°_°g'` $file
- fi
-done <<EOT
-6691f2fdc5c6d27ff0260eb79813e1bc /etc/init.d/mysql
-b53b9552d44661361d39157c3c7c51d3 /etc/logrotate.d/mysql-server
-EOT
-
-db_stop
-
-#DEBHELPER#
-
-exit 0
diff --git a/debian/mysql-server-BASE.prerm.in b/debian/mysql-server-BASE.prerm.in
deleted file mode 100644
index 03e9ea37420..00000000000
--- a/debian/mysql-server-BASE.prerm.in
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/bash -e
-
-. /usr/share/debconf/confmodule
-
-if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi
-${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 }
-
-#DEBHELPER#
diff --git a/debian/mysql-server-BASE.templates.in b/debian/mysql-server-BASE.templates.in
deleted file mode 100644
index 888f61345bf..00000000000
--- a/debian/mysql-server-BASE.templates.in
+++ /dev/null
@@ -1,71 +0,0 @@
-Template: mysql-server-@MYSQL_BRANDED_BASE_VERSION@/really_downgrade
-Type: boolean
-Default: false
-_Description: Do you really want to downgrade?
- WARNING: The file /var/lib/mysql/debian-*.flag exists. This indicates that a
- mysql-server package with a higher version has been installed before.
- It can not be guaranteed that this version can use its data.
-
-Template: mysql-server-@MYSQL_BRANDED_BASE_VERSION@/nis_warning
-Type: note
-_Description: Important note for NIS/YP users!
- To use mysql you must install an equivalent user and group to the
- following and ensure yourself that /var/lib/mysql has the right
- permissions (the uid/gid may be different).
- .
- /etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false
- .
- /etc/group: mysql:x:101:
- .
- /var/lib/mysql: drwxr-xr-x mysql mysql
-
-Template: mysql-server-@MYSQL_BRANDED_BASE_VERSION@/postrm_remove_databases
-Type: boolean
-Default: false
-_Description: Remove the databases used by all MySQL versions?
- The script is about to remove the data directory /var/lib/mysql.
- If it is planned to just install a higher MySQL version or if a different
- mysql-server package is already using it, the data should be kept.
-
-Template: mysql-server-@MYSQL_BRANDED_BASE_VERSION@/start_on_boot
-Type: boolean
-Default: true
-_Description: Should MySQL start on boot?
- The MySQL can start automatically on boot time or only if you manually
- type '/etc/init.d/mysql start'.
-
-Template: mysql-server/root_password
-Type: password
-_Description: New password for MySQL "root" user:
- It is highly recommended that you set a password for the MySQL administrative
- "root" user.
- .
- If you do not provide a password no changes will be made to the account.
-
-Template: mysql-server/error_setting_password
-Type: error
-_Description: Unable to set password for MySQL "root" user
- It seems an error occurred while setting the password for the MySQL
- administrative user. This may have happened because the user already
- has a password, or because there was a problem communicating with the
- MySQL server.
- .
- When installation finishes, you should verify that the account
- is properly protected with a password (see README.Debian for more
- information).
-
-Template: mysql-server-@MYSQL_BRANDED_BASE_VERSION@/need_sarge_compat
-Type: boolean
-Default: false
-_Description: Support MySQL connections from hosts running Debian "sarge" or older?
- The way passwords were stored was not very secure. This has been improved
- with the drawback that clients (e.g. PHP) from hosts running Debian 3.1 Sarge
- will not be able to connect to account which are new or whose password have
- been changed. See /usr/share/doc/mysql-server-@MYSQL_BRANDED_BASE_VERSION@/README.Debian.
-
-Template: mysql-server-@MYSQL_BRANDED_BASE_VERSION@/need_sarge_compat_done
-Type: boolean
-Default: false
-Description: for internal use
- Only internally used.
-
diff --git a/debian/mysql-server-PREV.preinst.in b/debian/mysql-server-PREV.preinst.in
deleted file mode 100644
index 7440c476f55..00000000000
--- a/debian/mysql-server-PREV.preinst.in
+++ /dev/null
@@ -1,191 +0,0 @@
-#!/bin/bash -e
-#
-# summary of how this script can be called:
-# * <new-preinst> install
-# * <new-preinst> install <old-version>
-# * <new-preinst> upgrade <old-version>
-# * <old-preinst> abort-upgrade <new-version>
-#
-
-if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi
-${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 }
-
-export PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin
-
-# Try to stop the server in a sane way. If it does not success let the admin
-# do it himself. No database directories should be removed while the server
-# is running! Another mysqld in e.g. a different chroot is fine for us.
-stop_server() {
- if [ ! -x /etc/init.d/mysql ]; then return; fi
-
- set +e
- if [ -x /usr/sbin/invoke-rc.d ]; then
- cmd="invoke-rc.d mysql stop"
- else
- cmd="/etc/init.d/mysql stop"
- fi
- $cmd
- errno=$?
- set -e
-
- # 0=ok, 100=no init script (fresh install)
- if [ "$errno" != 0 -a "$errno" != 100 ]; then
- echo "${cmd/ */} returned $errno" 1>&2
- echo "There is a MySQL server running, but we failed in our attempts to stop it." 1>&2
- echo "Stop it yourself and try again!" 1>&2
- exit 1
- fi
-}
-
-##### here's a bunch of helper functions for converting database formats ######
-
-cvt_get_param(){
- /usr/sbin/mysqld --print-defaults \
- | tr " " "\n" \
- | grep -- "--$1" \
- | tail -n 1 \
- | cut -d= -f2
-}
-
-cvt_setup_stuff(){
- mytmp=`mktemp -d -t mysql-ISAM-convert.XXXXXX`
- cvt_log="$mytmp/conversion.log"
- if [ ! -d "$mytmp" ]; then
- echo "can't create temporary directory, oh well." >&2
- exit 1
- fi
-
- chgrp mysql $mytmp
- chmod g+rwx $mytmp
- cvt_socket=${mytmp}/mysql.sock
-
- cvt_mysqld="mysqld --skip-grant-tables --skip-networking --socket $cvt_socket"
- cvt_mysql="mysql --socket $cvt_socket"
- cvt_mysqladmin="mysqladmin --socket $cvt_socket"
-}
-
-cvt_get_databases(){
- echo fetching database list ... >&2
- $cvt_mysql -e 'show databases' | sed -n -e '2,$p'
-}
-
-cvt_get_tables(){
- echo querying tables in $1 ... >&2
- $cvt_mysql $1 -e 'show table status' | sed -n -e '2,$p' | \
- cut -f 1,2 | grep -w 'ISAM$' | cut -f 1
-}
-
-cvt_convert_table(){
- echo converting $1.$2 ... >&2
- $cvt_mysql $1 -e "alter table $2 type=MyISAM"
-}
-
-cvt_wait_for_server(){
- local count
- echo -n waiting for server startup.. >&2
- while ! $cvt_mysql </dev/null >/dev/null 2>&1; do
- echo -n . >&2
- sleep 1
- count=".$count"
- if [ -f $mytmp/mysql.done ]; then
- echo "sorry... looks like the server crashed :(" >&2
- return 1
- elif [ "$count" = "...................." ]; then
- echo "sorry... looks like the server didn't start :(" >&2
- return 1
- fi
- done
- echo ok. >&2
-}
-
-cvt_wait_for_exit(){
- local count
- echo -n waiting for server shutdown.. >&2
- while [ ! -f $mytmp/mysql.done ]; do
- echo -n . >&2
- sleep 1
- count=".$count"
- if [ "$count" = "...................." ]; then
- echo "hrm... guess it never started?" >&2
- return 0
- fi
- done
- echo ok. >&2
-}
-
-cvt_cleanup(){
- local mysql_kids
- rm -rf $mytmp
- # kill any mysqld child processes left over. there *shouldn't* be any,
- # but let's not take chances with that
- mysql_kids=`ps o 'pid command' --ppid $$ | grep -E '^[[:digit:]]+ mysqld ' | cut -d' ' -f1`
- if [ "$mysql_kids" ]; then
- echo "strange, some mysql processes left around. killing them now." >&2
- kill $mysql_kids
- sleep 10
- mysql_kids=`ps o 'pid command' --ppid $$ | grep -E '^[[:digit:]]+ mysqld ' | cut -d' ' -f1`
- if [ "$mysql_kids" ]; then
- echo "okay, they're really not getting the hint..." >&2
- kill -9 $mysql_kids
- fi
- fi
-}
-
-################################ main() ##########################
-
-# to be sure
-stop_server
-
-# test if upgrading from non conffile state
-if [ "$1" = "upgrade" ] && [ -x /usr/sbin/mysqld ]; then
- cvt_datadir=`cvt_get_param datadir`
- # test for ISAM tables, which we must convert NOW
- if [ -n "`find $cvt_datadir -name '*.ISM' 2>/dev/null`" ]; then
- set +e
- cat << EOF >&2
-----------------------------------------
-WARNING WARNING WARNING
-----------------------------------------
-
-It has been detected that are are using ISAM format on some of your
-mysql database tables. This format has been deprecated and no longer
-supported. to prevent these databases from essentially disappearing,
-an attempt at format conversion will now be made. please check after
-your upgrade that all tables are present and accounted for.
-
-apologies for the noise, but we thought you'd appreciate it :)
-
-----------------------------------------
-WARNING WARNING WARNING
-----------------------------------------
-EOF
- cvt_setup_stuff
- ($cvt_mysqld >$cvt_log 2>&1; touch $mytmp/mysql.done ) &
-
- if cvt_wait_for_server; then
- dbs=`cvt_get_databases`
- for db in $dbs; do
- tables=`cvt_get_tables $db`
- for tbl in $tables; do
- cvt_convert_table $db $tbl
- done
- done
- else
- cvt_error="yes"
- fi
-
- echo shutting down server... >&2
- $cvt_mysqladmin shutdown
- cvt_wait_for_exit
- echo "all done!" >&2
- if [ ! "$cvt_error" = "yes" ]; then
- cvt_cleanup
- else
- echo "you might want to look in $mytmp..." >&2
- fi
-
- set -e
- fi
-fi
-
-exit 0
diff --git a/debian/mysql-server.preinst.in b/debian/mysql-server.preinst.in
deleted file mode 100644
index 7440c476f55..00000000000
--- a/debian/mysql-server.preinst.in
+++ /dev/null
@@ -1,191 +0,0 @@
-#!/bin/bash -e
-#
-# summary of how this script can be called:
-# * <new-preinst> install
-# * <new-preinst> install <old-version>
-# * <new-preinst> upgrade <old-version>
-# * <old-preinst> abort-upgrade <new-version>
-#
-
-if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi
-${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 }
-
-export PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin
-
-# Try to stop the server in a sane way. If it does not success let the admin
-# do it himself. No database directories should be removed while the server
-# is running! Another mysqld in e.g. a different chroot is fine for us.
-stop_server() {
- if [ ! -x /etc/init.d/mysql ]; then return; fi
-
- set +e
- if [ -x /usr/sbin/invoke-rc.d ]; then
- cmd="invoke-rc.d mysql stop"
- else
- cmd="/etc/init.d/mysql stop"
- fi
- $cmd
- errno=$?
- set -e
-
- # 0=ok, 100=no init script (fresh install)
- if [ "$errno" != 0 -a "$errno" != 100 ]; then
- echo "${cmd/ */} returned $errno" 1>&2
- echo "There is a MySQL server running, but we failed in our attempts to stop it." 1>&2
- echo "Stop it yourself and try again!" 1>&2
- exit 1
- fi
-}
-
-##### here's a bunch of helper functions for converting database formats ######
-
-cvt_get_param(){
- /usr/sbin/mysqld --print-defaults \
- | tr " " "\n" \
- | grep -- "--$1" \
- | tail -n 1 \
- | cut -d= -f2
-}
-
-cvt_setup_stuff(){
- mytmp=`mktemp -d -t mysql-ISAM-convert.XXXXXX`
- cvt_log="$mytmp/conversion.log"
- if [ ! -d "$mytmp" ]; then
- echo "can't create temporary directory, oh well." >&2
- exit 1
- fi
-
- chgrp mysql $mytmp
- chmod g+rwx $mytmp
- cvt_socket=${mytmp}/mysql.sock
-
- cvt_mysqld="mysqld --skip-grant-tables --skip-networking --socket $cvt_socket"
- cvt_mysql="mysql --socket $cvt_socket"
- cvt_mysqladmin="mysqladmin --socket $cvt_socket"
-}
-
-cvt_get_databases(){
- echo fetching database list ... >&2
- $cvt_mysql -e 'show databases' | sed -n -e '2,$p'
-}
-
-cvt_get_tables(){
- echo querying tables in $1 ... >&2
- $cvt_mysql $1 -e 'show table status' | sed -n -e '2,$p' | \
- cut -f 1,2 | grep -w 'ISAM$' | cut -f 1
-}
-
-cvt_convert_table(){
- echo converting $1.$2 ... >&2
- $cvt_mysql $1 -e "alter table $2 type=MyISAM"
-}
-
-cvt_wait_for_server(){
- local count
- echo -n waiting for server startup.. >&2
- while ! $cvt_mysql </dev/null >/dev/null 2>&1; do
- echo -n . >&2
- sleep 1
- count=".$count"
- if [ -f $mytmp/mysql.done ]; then
- echo "sorry... looks like the server crashed :(" >&2
- return 1
- elif [ "$count" = "...................." ]; then
- echo "sorry... looks like the server didn't start :(" >&2
- return 1
- fi
- done
- echo ok. >&2
-}
-
-cvt_wait_for_exit(){
- local count
- echo -n waiting for server shutdown.. >&2
- while [ ! -f $mytmp/mysql.done ]; do
- echo -n . >&2
- sleep 1
- count=".$count"
- if [ "$count" = "...................." ]; then
- echo "hrm... guess it never started?" >&2
- return 0
- fi
- done
- echo ok. >&2
-}
-
-cvt_cleanup(){
- local mysql_kids
- rm -rf $mytmp
- # kill any mysqld child processes left over. there *shouldn't* be any,
- # but let's not take chances with that
- mysql_kids=`ps o 'pid command' --ppid $$ | grep -E '^[[:digit:]]+ mysqld ' | cut -d' ' -f1`
- if [ "$mysql_kids" ]; then
- echo "strange, some mysql processes left around. killing them now." >&2
- kill $mysql_kids
- sleep 10
- mysql_kids=`ps o 'pid command' --ppid $$ | grep -E '^[[:digit:]]+ mysqld ' | cut -d' ' -f1`
- if [ "$mysql_kids" ]; then
- echo "okay, they're really not getting the hint..." >&2
- kill -9 $mysql_kids
- fi
- fi
-}
-
-################################ main() ##########################
-
-# to be sure
-stop_server
-
-# test if upgrading from non conffile state
-if [ "$1" = "upgrade" ] && [ -x /usr/sbin/mysqld ]; then
- cvt_datadir=`cvt_get_param datadir`
- # test for ISAM tables, which we must convert NOW
- if [ -n "`find $cvt_datadir -name '*.ISM' 2>/dev/null`" ]; then
- set +e
- cat << EOF >&2
-----------------------------------------
-WARNING WARNING WARNING
-----------------------------------------
-
-It has been detected that are are using ISAM format on some of your
-mysql database tables. This format has been deprecated and no longer
-supported. to prevent these databases from essentially disappearing,
-an attempt at format conversion will now be made. please check after
-your upgrade that all tables are present and accounted for.
-
-apologies for the noise, but we thought you'd appreciate it :)
-
-----------------------------------------
-WARNING WARNING WARNING
-----------------------------------------
-EOF
- cvt_setup_stuff
- ($cvt_mysqld >$cvt_log 2>&1; touch $mytmp/mysql.done ) &
-
- if cvt_wait_for_server; then
- dbs=`cvt_get_databases`
- for db in $dbs; do
- tables=`cvt_get_tables $db`
- for tbl in $tables; do
- cvt_convert_table $db $tbl
- done
- done
- else
- cvt_error="yes"
- fi
-
- echo shutting down server... >&2
- $cvt_mysqladmin shutdown
- cvt_wait_for_exit
- echo "all done!" >&2
- if [ ! "$cvt_error" = "yes" ]; then
- cvt_cleanup
- else
- echo "you might want to look in $mytmp..." >&2
- fi
-
- set -e
- fi
-fi
-
-exit 0
diff --git a/debian/mysql-storage-BASE.dirs.in b/debian/mysql-storage-BASE.dirs.in
deleted file mode 100644
index 236670a2d0f..00000000000
--- a/debian/mysql-storage-BASE.dirs.in
+++ /dev/null
@@ -1 +0,0 @@
-usr/sbin
diff --git a/debian/mysql-storage-BASE.files.in b/debian/mysql-storage-BASE.files.in
deleted file mode 100644
index 126c17cb802..00000000000
--- a/debian/mysql-storage-BASE.files.in
+++ /dev/null
@@ -1 +0,0 @@
-usr/sbin/ndbd
diff --git a/debian/mysql-storage-BASE.mysql-storage.init.in b/debian/mysql-storage-BASE.mysql-storage.init.in
deleted file mode 100644
index 32ec82c6244..00000000000
--- a/debian/mysql-storage-BASE.mysql-storage.init.in
+++ /dev/null
@@ -1,85 +0,0 @@
-#!/bin/bash
-#
-### BEGIN INIT INFO
-# Provides: mysql-ndb
-# Required-Start: $syslog mysql mysql-ndb-mgm
-# Required-Stop: $syslog mysql mysql-ndb-mgm
-# Should-Start: $local_fs $remote_fs $network $named $time
-# Should-Stop: $local_fs $remote_fs $network $named $time
-# Default-Start: 2 3 4 5
-# Default-Stop: 0 1 6
-# Short-Description: Start and stop the mysql database cluster server daemon
-# Description: Controls the MySQL NDB Data Node daemon "ndbd".
-### END INIT INFO
-#
-set -e
-set -u
-${DEBIAN_SCRIPT_DEBUG:+ set -v -x}
-
-# Variables
-SELF=$(cd $(dirname $0); pwd -P)/$(basename $0)
-DAEMON=/usr/sbin/ndbd
-CONF=/etc/mysql/my.cnf
-export HOME=/etc/mysql/
-
-# Safeguard (relative paths, core dumps..)
-cd /
-umask 077
-
-# Exit *silently* if we're not supposed to be started.
-#
-# The Debian scripts should execute these scripts to stop and start
-# the daemon when upgrading if it is started. On the other hand it should
-# remain silently if the server has not even been configured.
-# See /usr/share/doc/mysql-server-*/README.Debian for more information.
-test -x $DAEMON || exit 0
-if $DAEMON --help | grep -q '^ndb-connectstring.*No default value'; then exit 0; fi
-. /lib/lsb/init-functions
-
-#
-# main()
-#
-case "${1:-''}" in
- 'start')
- # Start daemon
- # Creatign a PID file does not work as the master process forks
- # a child with different PID and then terminates itself.
- log_daemon_msg "Starting MySQL NDB Data Node" "ndbd"
- if start-stop-daemon \
- --start \
- --exec $DAEMON \
- --user mysql
- then
- log_end_msg 0
- else
- log_end_msg 1
- log_warning_msg "Please take a look at the syslog."
- exit 1
- fi
- ;;
-
- 'stop')
- log_daemon_msg "Stopping MySQL NDB Data Node" "ndbd"
- if start-stop-daemon \
- --stop \
- --oknodo \
- --exec $DAEMON
- then
- log_end_msg 0
- else
- log_end_msg 1
- exit 1
- fi
- ;;
-
- 'restart'|'force-reload')
- set +e; $SELF stop; set -e
- $SELF start
- ;;
-
- *)
- echo "Usage: $SELF start|stop|restart|force-reload"
- exit 1
- ;;
-esac
-
diff --git a/debian/mysql-test-BASE.dirs.in b/debian/mysql-test-BASE.dirs.in
deleted file mode 100644
index b1eee9d9a12..00000000000
--- a/debian/mysql-test-BASE.dirs.in
+++ /dev/null
@@ -1,2 +0,0 @@
-usr/bin
-usr/share/mysql/mysql-test
diff --git a/debian/mysql-test-BASE.files.in b/debian/mysql-test-BASE.files.in
deleted file mode 100644
index a6d4841b074..00000000000
--- a/debian/mysql-test-BASE.files.in
+++ /dev/null
@@ -1,2 +0,0 @@
-usr/share/mysql-test/*
-usr/bin/mysql_client_test
diff --git a/debian/mysql-tools-BASE.dirs.in b/debian/mysql-tools-BASE.dirs.in
deleted file mode 100644
index 00b2ed2562d..00000000000
--- a/debian/mysql-tools-BASE.dirs.in
+++ /dev/null
@@ -1,2 +0,0 @@
-usr/bin
-usr/share/mysql
diff --git a/debian/mysql-tools-BASE.files.in b/debian/mysql-tools-BASE.files.in
deleted file mode 100644
index d2f37a570be..00000000000
--- a/debian/mysql-tools-BASE.files.in
+++ /dev/null
@@ -1,13 +0,0 @@
-usr/bin/ndb_mgm
-usr/bin/ndb_restore
-usr/bin/ndb_waiter
-usr/bin/ndb_select_all
-usr/bin/ndb_select_count
-usr/bin/ndb_desc
-usr/bin/ndb_show_tables
-usr/bin/ndb_test_platform
-usr/bin/ndb_config
-usr/bin/ndb_error_reporter
-usr/bin/ndb_size
-
-
diff --git a/debian/po/POTFILES.in.in b/debian/po/POTFILES.in.in
deleted file mode 100644
index 01e1e87fc55..00000000000
--- a/debian/po/POTFILES.in.in
+++ /dev/null
@@ -1 +0,0 @@
-[type: gettext/rfc822deb] mysql-server-@MYSQL_BRANDED_BASE_VERSION@.templates
diff --git a/debian/po/ca.po b/debian/po/ca.po
deleted file mode 100644
index 9dc1fc0de77..00000000000
--- a/debian/po/ca.po
+++ /dev/null
@@ -1,290 +0,0 @@
-# mysql-dfsg (debconf) translation to Catalan.
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-# Aleix Badia i Bosch <abadia@ica.es> 2004
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: mysql-dfsg-4.1\n"
-"Report-Msgid-Bugs-To: ch@debian.org\n"
-"POT-Creation-Date: 2007-02-16 22:27+0100\n"
-"PO-Revision-Date: 2004-01-31 19:20GMT\n"
-"Last-Translator: Aleix Badia i Bosch <abadia@ica.es>\n"
-"Language-Team: Debian L10n Catalan <debian-l10n-catalan@lists.debian.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=ISO-8859-1\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:1001
-msgid "Do you really want to downgrade?"
-msgstr ""
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:1001
-msgid ""
-"WARNING: The file /var/lib/mysql/debian-*.flag exists. This indicates that a "
-"mysql-server package with a higher version has been installed before. It can "
-"not be guaranteed that this version can use its data."
-msgstr ""
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "Important note for NIS/YP users!"
-msgstr "Nota important pels usuaris de NIS/YP"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-#, fuzzy
-msgid ""
-"To use mysql you must install an equivalent user and group to the following "
-"and ensure yourself that /var/lib/mysql has the right permissions (the uid/"
-"gid may be different)."
-msgstr ""
-"Per utilitzar la base de dades de MySQL heu d'afegir un usuari i grup "
-"equivalent al següent i assegurar-vos que el directori /var/lib/mysql tingui "
-"els permisos correctes."
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid ""
-"/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-msgstr ""
-"/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "/etc/group: mysql:x:101:"
-msgstr "/etc/group: mysql:x:101:"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "/var/lib/mysql: drwxr-xr-x mysql mysql"
-msgstr "/var/lib/mysql: drwxr-xr-x mysql mysql"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:3001
-msgid "Remove the databases used by all MySQL versions?"
-msgstr ""
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:3001
-msgid ""
-"The script is about to remove the data directory /var/lib/mysql. If it is "
-"planned to just install a higher MySQL version or if a different mysql-"
-"server package is already using it, the data should be kept."
-msgstr ""
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:4001
-msgid "Should MySQL start on boot?"
-msgstr "Voleu que el MySQL s'iniciï a l'arrencada ?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:4001
-#, fuzzy
-msgid ""
-"The MySQL can start automatically on boot time or only if you manually type "
-"'/etc/init.d/mysql start'."
-msgstr ""
-"El MySQL es pot executar a l'arrencada o només si executeu manualment '/etc/"
-"init.d/mysql start'. Seleccioneu 'sí' si voleu que s'inicialitzi "
-"automàticament."
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid "New password for MySQL \"root\" user:"
-msgstr ""
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid ""
-"It is highly recommended that you set a password for the MySQL "
-"administrative \"root\" user."
-msgstr ""
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid ""
-"If you do not provide a password no changes will be made to the account."
-msgstr ""
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid "Unable to set password for MySQL \"root\" user"
-msgstr ""
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid ""
-"It seems an error occurred while setting the password for the MySQL "
-"administrative user. This may have happened because the user already has a "
-"password, or because there was a problem communicating with the MySQL server."
-msgstr ""
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid ""
-"When installation finishes, you should verify that the account is properly "
-"protected with a password (see README.Debian for more information)."
-msgstr ""
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:7001
-msgid "Support MySQL connections from hosts running Debian \"sarge\" or older?"
-msgstr ""
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:7001
-msgid ""
-"The way passwords were stored was not very secure. This has been improved "
-"with the drawback that clients (e.g. PHP) from hosts running Debian 3.1 "
-"Sarge will not be able to connect to account which are new or whose password "
-"have been changed. See /usr/share/doc/mysql-server-5.0/README.Debian."
-msgstr ""
-
-#, fuzzy
-#~ msgid "Please also read http://www.mysql.com/doc/en/Upgrade.html"
-#~ msgstr ""
-#~ "Feu una ullada al document: http://www.mysql.com/doc/en/Upgrade.html"
-
-#, fuzzy
-#~ msgid ""
-#~ "MySQL will only install if you have a non-numeric hostname that is "
-#~ "resolvable via the /etc/hosts file. E.g. if the \"hostname\" command "
-#~ "returns \"myhostname\" then there must be a line like \"10.0.0.1 "
-#~ "myhostname\"."
-#~ msgstr ""
-#~ "El MySQL només s'instal·la en cas de tenir un nom d'ordinador central que "
-#~ "no sigui numèric i que es pugui resoldre a través del fitxer /etc/hosts. "
-#~ "Ex. si l'ordre \"hostname\" retorna \"myhostname\", llavors hi ha d'haver "
-#~ "una línia com la següent \"10.0.0.1 myhostname\"."
-
-#, fuzzy
-#~ msgid ""
-#~ "A new mysql user \"debian-sys-maint\" will be created. This mysql account "
-#~ "is used in the start/stop and cron scripts. Don't delete."
-#~ msgstr ""
-#~ "Es crea un nou usuari de mysql \"debian-sys-maint\". S'utilitza per les "
-#~ "seqüències d'inicialització i aturada del cron, no el suprimiu."
-
-#, fuzzy
-#~ msgid ""
-#~ "Please remember to set a PASSWORD for the MySQL root user! If you use a /"
-#~ "root/.my.cnf, always write the \"user\" and the \"password\" lines in "
-#~ "there, never only the password!"
-#~ msgstr ""
-#~ "Recordeu posar una contrasenya al superusuari del MySQL. Si utilitzeu un "
-#~ "fitxer /root/.my.cnf, escriviu sempre allà les línies \"user\" i "
-#~ "\"password\".; mai només la contrasenya. Per a més informació feu una "
-#~ "ullada a /usr/share/doc/mysql-server/README.Debian."
-
-#, fuzzy
-#~ msgid ""
-#~ "Should I remove all databases below /var/lib/mysql as you are purging the "
-#~ "mysql-server package?"
-#~ msgstr ""
-#~ "Voleu suprimir totes les bases de dades en purgar el paquet mysql-server ?"
-
-#~ msgid ""
-#~ "Networking is disabled by default for security reasons. You can enable it "
-#~ "by commenting out the skip-networking option in /etc/mysql/my.cnf."
-#~ msgstr ""
-#~ "La xarxa està inhabilitada per defecte per a raons de seguretat. La podeu "
-#~ "habilitar descomentant l'opció de skip-networking del fitxer /etc/mysql/"
-#~ "my.cnf."
-
-#~ msgid "security and update notice"
-#~ msgstr "Avís de seguretat i actualització"
-
-#~ msgid "Please run mysql_fix_privilege_tables !"
-#~ msgstr "Executeu mysql_fix_privilege_tables"
-
-#~ msgid ""
-#~ "I will ensure secure permissions of /var/lib/mysql by replacing GIDs "
-#~ "other than root and mysql with mysql."
-#~ msgstr ""
-#~ "S'asseguren els permisos de seguretat de /var/lib/mysql canviant a mysql "
-#~ "tots els GIDs diferents a root i mysql."
-
-#~ msgid ""
-#~ "Instructions how to enable SSL support are in /usr/share/doc/mysql-server/"
-#~ msgstr ""
-#~ "Per habilitar el suport de SSL podeu seguir les instruccions de /usr/"
-#~ "share/doc/mysql-server/"
-
-#~ msgid "mysql_fix_privileges_tables will be executed"
-#~ msgstr "s'executa mysql_fix_privileges_tables"
-
-#~ msgid ""
-#~ "The latest MySQL versions have an enhanced, more fine grained, privilege "
-#~ "system. To make use of it, some new fields must be added to the tables "
-#~ "in the \"mysql\" database. This is done by the "
-#~ "mysql_fix_privilege_tables script during this upgrade regardless of if "
-#~ "the server is currently running or not!"
-#~ msgstr ""
-#~ "Les últimes versions de MySQL tenen un sistema de privilegis més "
-#~ "elaborat. Per utilitzar-lo cal afegir nous camps a les taules de la base "
-#~ "de dades \"mysql\". Aquesta tasca la realitza la seqüència "
-#~ "mysql_fix_privilege_tables durant l'actualització independentment de si "
-#~ "el servidor s'està executant o no!"
-
-#~ msgid ""
-#~ "This script is not supposed to give any user more rights that he had "
-#~ "before, if you encounter such a case, please contact me."
-#~ msgstr ""
-#~ "Aquesta seqüència no assigna privilegis d'usuari diferents als que ja "
-#~ "tenia, en cas que us trobéssiu en aquesta situació, poseu-vos en contacte "
-#~ "amb mi."
-
-#~ msgid ""
-#~ "Should I remove everything below /var/lib/mysql when you purge the mysql-"
-#~ "server package with the \"dpkg --purge mysql-server\" command (i.e. "
-#~ "remove everything including the configuration) somewhen? (default is not)"
-#~ msgstr ""
-#~ "Voleu suprimir tots els continguts de /var/lib/mysql quan es purgui el "
-#~ "paquet mysql-server amb l'ordre \"dpkg --purge mysql-server\". (ex. "
-#~ "suprimir-ho tot inclòs la configuració) ? (per defecte no)"
-
-#~ msgid "Make MySQL reachable via network?"
-#~ msgstr "Voleu fer accessible el MySQL via xarxa ?"
-
-#~ msgid ""
-#~ "Should MySQL listen on a network reachable TCP port? This is not "
-#~ "necessary for use on a single computer and could be a security problem."
-#~ msgstr ""
-#~ "Voleu que el MySQL escolti a un port TCP accessible des de la xarxa ? "
-#~ "Aquesta opció no és imprescindible en ordinadors aïllats i podria "
-#~ "provocar un problema de seguretat."
-
-#~ msgid "Enable chroot mode?"
-#~ msgstr "Permetre el mode chroot ?"
-
-#~ msgid ""
-#~ "MySQL is able to jail itself into the /var/lib/mysql_jail directory so "
-#~ "that users cannot modify any files outside this directory. This improves "
-#~ "resistence against crackers, too, as they are not able to modify system "
-#~ "files."
-#~ msgstr ""
-#~ "El MySQL es pot executar en una entorn tancat al directori /var/lib/"
-#~ "mysql_jail perquè els usuaris no puguin modificar cap fitxer fora del "
-#~ "directori.Aquesta opció també augmenta la seguretat envers els crackers, "
-#~ "jaque no poden modificar els fitxers del sistema."
diff --git a/debian/po/cs.po b/debian/po/cs.po
deleted file mode 100644
index 33e4f213bb2..00000000000
--- a/debian/po/cs.po
+++ /dev/null
@@ -1,259 +0,0 @@
-#
-# Translators, if you are not familiar with the PO format, gettext
-# documentation is worth reading, especially sections dedicated to
-# this format, e.g. by running:
-# info -n '(gettext)PO Files'
-# info -n '(gettext)Header Entry'
-#
-# Some information specific to po-debconf are available at
-# /usr/share/doc/po-debconf/README-trans
-# or http://www.debian.org/intl/l10n/po-debconf/README-trans
-#
-# Developers do not need to manually edit POT or PO files.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: mysql-dfsg-5.0\n"
-"Report-Msgid-Bugs-To: ch@debian.org\n"
-"POT-Creation-Date: 2007-02-16 22:27+0100\n"
-"PO-Revision-Date: 2007-02-18 12:49+0100\n"
-"Last-Translator: Miroslav Kure <kurem@debian.cz>\n"
-"Language-Team: Czech <debian-l10n-czech@lists.debian.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:1001
-msgid "Do you really want to downgrade?"
-msgstr "Opravdu chcete degradovat?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:1001
-msgid ""
-"WARNING: The file /var/lib/mysql/debian-*.flag exists. This indicates that a "
-"mysql-server package with a higher version has been installed before. It can "
-"not be guaranteed that this version can use its data."
-msgstr ""
-"VAROVÃNÃ: Existuje soubor /var/lib/mysql/debian-*.flag, což znamená, že již "
-"byl instalován balíÄek mysql-server s vyšší verzí. Nemůžeme zaruÄit, zda "
-"tato verze umí použít data z novÄ›jšího balíÄku."
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "Important note for NIS/YP users!"
-msgstr "Důležitá poznámka pro uživatele NIS/YP!"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid ""
-"To use mysql you must install an equivalent user and group to the following "
-"and ensure yourself that /var/lib/mysql has the right permissions (the uid/"
-"gid may be different)."
-msgstr ""
-"Abyste mohli mysql používat, musíte do následujících souborů přidat "
-"ekvivalentního uživatele a skupinu a zajistit, že /var/lib/mysql má správná "
-"práva (uid/gid se mohou lišit)."
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid ""
-"/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-msgstr ""
-"/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "/etc/group: mysql:x:101:"
-msgstr "/etc/group: mysql:x:101:"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "/var/lib/mysql: drwxr-xr-x mysql mysql"
-msgstr "/var/lib/mysql: drwxr-xr-x mysql mysql"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:3001
-msgid "Remove the databases used by all MySQL versions?"
-msgstr "Odstranit databáze používané všemi verzemi MySQL?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:3001
-msgid ""
-"The script is about to remove the data directory /var/lib/mysql. If it is "
-"planned to just install a higher MySQL version or if a different mysql-"
-"server package is already using it, the data should be kept."
-msgstr ""
-"Skript se chystá odstranit datový adresář /var/lib/mysql. Jestliže pouze "
-"plánujete nainstalovat novější verzi MySQL, nebo pokud tato data souběžně "
-"využívá jiný balík mysql-server, měli byste data ponechat."
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:4001
-msgid "Should MySQL start on boot?"
-msgstr "Má se MySQL spustit při startu systému?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:4001
-msgid ""
-"The MySQL can start automatically on boot time or only if you manually type "
-"'/etc/init.d/mysql start'."
-msgstr ""
-"MySQL se může spouÅ¡tÄ›t automaticky pÅ™i startu systému, nebo ruÄnÄ› příkazem '/"
-"etc/init.d/mysql start'."
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid "New password for MySQL \"root\" user:"
-msgstr "Nové heslo MySQL uživatele \"root\":"
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid ""
-"It is highly recommended that you set a password for the MySQL "
-"administrative \"root\" user."
-msgstr "Nastavit heslo u správcovského úÄtu \"root\" je silnÄ› doporuÄeno."
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid ""
-"If you do not provide a password no changes will be made to the account."
-msgstr "Nezadáte-li heslo, žádné zmÄ›ny se s úÄtem neprovedou."
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid "Unable to set password for MySQL \"root\" user"
-msgstr "Nelze nastavit heslo MySQL uživatele \"root\""
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid ""
-"It seems an error occurred while setting the password for the MySQL "
-"administrative user. This may have happened because the user already has a "
-"password, or because there was a problem communicating with the MySQL server."
-msgstr ""
-"Během nastavování hesla pro správcovského uživatele MySQL se vyskytla chyba. "
-"To se mohlo stát třeba proto, protože uživatel již měl neslo nastaveno, nebo "
-"protože nastal problém v komunikaci s MySQL serverem."
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid ""
-"When installation finishes, you should verify that the account is properly "
-"protected with a password (see README.Debian for more information)."
-msgstr ""
-"Po skonÄení instalace byste mÄ›li ověřit, že je úÄet chránÄ›n heslem (více "
-"informací naleznete v souboru README.Debian)."
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:7001
-msgid "Support MySQL connections from hosts running Debian \"sarge\" or older?"
-msgstr ""
-"Podporovat MySQL pÅ™ipojení z poÄítaÄů používajících Debian Sarge nebo starší?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:7001
-msgid ""
-"The way passwords were stored was not very secure. This has been improved "
-"with the drawback that clients (e.g. PHP) from hosts running Debian 3.1 "
-"Sarge will not be able to connect to account which are new or whose password "
-"have been changed. See /usr/share/doc/mysql-server-5.0/README.Debian."
-msgstr ""
-"Způsob, jakým se dříve ukládala hesla, nebyl příliÅ¡ bezpeÄný. To se nyní "
-"změnilo, ale nevýhodou je, že se klienti z Debianu 3.1 Sarge nebudou moci "
-"pÅ™ipojit na nové úÄty, nebo na úÄty, u nichž se zmÄ›nilo heslo. Podrobnosti "
-"viz /usr/share/doc/mysql-server-5.0/README.Debian."
-
-#~ msgid "Cannot upgrade if ISAM tables are present!"
-#~ msgstr "Aktualizace nelze provést pokud jsou přítomny tabulky ISAM!"
-
-#~ msgid ""
-#~ "Recent versions of MySQL can no longer use the old ISAM table format and "
-#~ "it is necessary to convert your tables to e.g. MyISAM before upgrading by "
-#~ "using \"mysql_convert_table_format\" or \"ALTER TABLE x ENGINE=MyISAM\". "
-#~ "The installation of mysql-server-5.0 will now abort. In case your old "
-#~ "mysql-server-4.1 gets removed nevertheless just reinstall it to convert "
-#~ "those tables."
-#~ msgstr ""
-#~ "Poslední verze MySQL již nemohou používat starý formát tabulek ISAM a "
-#~ "před aktualizací je nutné převést tyto tabulky např. do formátu MyISAM "
-#~ "pomocí \"mysql_convert_table_format\" nebo \"ALTER TABLE x ENGINE=MyISAM"
-#~ "\". Instalace mysql-server-5.0 se nyní přeruší. V případě, že se mezitím "
-#~ "odinstaloval původní mysql-server-4.1, jednoduše jej znovu nainstalujte a "
-#~ "tabulky pÅ™eveÄte."
-
-#~ msgid "Update Hints"
-#~ msgstr "Poznámky k aktualizaci"
-
-#~ msgid ""
-#~ "You have to run \"mysql_upgrade\" after the upgrade, else tables can be "
-#~ "corrupted! This script also enhances the privilege tables but is not "
-#~ "supposed to give any user more rights that he had before,"
-#~ msgstr ""
-#~ "Po aktualizaci ještě musíte spustit \"mysql_upgrade\", protože jinak by "
-#~ "se tabulky mohly narušit! Tento skript také rozšiřuje tabulky privilegií, "
-#~ "ovšem neměl by uživatelům přidat více práv, než měli dosud."
-
-#~ msgid "Please also read http://www.mysql.com/doc/en/Upgrade.html"
-#~ msgstr "Také si pÅ™eÄtÄ›te http://www.mysql.com/doc/en/Upgrade.html"
-
-#~ msgid ""
-#~ "MySQL will only install if you have a non-numeric hostname that is "
-#~ "resolvable via the /etc/hosts file. E.g. if the \"hostname\" command "
-#~ "returns \"myhostname\" then there must be a line like \"10.0.0.1 "
-#~ "myhostname\"."
-#~ msgstr ""
-#~ "MySQL se nainstaluje pouze v případě, že používáte nenumerické jméno "
-#~ "poÄítaÄe, které se dá pÅ™eložit pÅ™es soubor /etc/hosts. NapÅ™. když příkaz "
-#~ "\"hostname\" vrátí \"diamond\", tak v /etc/hosts musí existovat obdobný "
-#~ "řádek jako \"10.0.0.1 diamond\"."
-
-#~ msgid ""
-#~ "A new mysql user \"debian-sys-maint\" will be created. This mysql account "
-#~ "is used in the start/stop and cron scripts. Don't delete."
-#~ msgstr ""
-#~ "Bude vytvoÅ™en nový mysql uživatel \"debian-sys-maint\". Tento mysql úÄet "
-#~ "se používá ve startovacích, ukonÄovacích a cronových skriptech. Nemažte "
-#~ "jej."
-
-#~ msgid ""
-#~ "Please remember to set a PASSWORD for the MySQL root user! If you use a /"
-#~ "root/.my.cnf, always write the \"user\" and the \"password\" lines in "
-#~ "there, never only the password!"
-#~ msgstr ""
-#~ "Nezapomeňte nastavit heslo pro úÄet administrátora MySQL! Používáte-li /"
-#~ "root/.my.cnf, vždy zde zadejte jak řádek \"user\", tak řádek \"password"
-#~ "\". Nikdy zde nezadávejte jenom heslo!"
-
-#~ msgid ""
-#~ "See /usr/share/doc/mysql-server-5.0/README.Debian for more information."
-#~ msgstr ""
-#~ "Více informací naleznete v /usr/share/doc/mysql-server-5.0/README.Debian."
-
-#~ msgid ""
-#~ "Should I remove the complete /var/lib/mysql directory tree which is used "
-#~ "by all MySQL versions, not necessarily only the one you are about to "
-#~ "purge?"
-#~ msgstr ""
-#~ "Mám odstranit kompletní adresářový strom /var/lib/mysql, který se používá "
-#~ "pro všechny verze MySQL, tedy ne nutně pouze pro verzi, kterou se "
-#~ "chystáte vyÄistit?"
diff --git a/debian/po/da.po b/debian/po/da.po
deleted file mode 100644
index 5e93e3f7b33..00000000000
--- a/debian/po/da.po
+++ /dev/null
@@ -1,283 +0,0 @@
-#
-# Translators, if you are not familiar with the PO format, gettext
-# documentation is worth reading, especially sections dedicated to
-# this format, e.g. by running:
-# info -n '(gettext)PO Files'
-# info -n '(gettext)Header Entry'
-# Some information specific to po-debconf are available at
-# /usr/share/doc/po-debconf/README-trans
-# or http://www.debian.org/intl/l10n/po-debconf/README-trans#
-# Developers do not need to manually edit POT or PO files.
-#
-# Claus Hindsgaul <claus_h@image.dk>, 2005, 2006.
-# Claus Hindsgaul <claus.hindsgaul@gmail.com>, 2006, 2007.
-msgid ""
-msgstr ""
-"Project-Id-Version: mysql-dfsg-4.1\n"
-"Report-Msgid-Bugs-To: ch@debian.org\n"
-"POT-Creation-Date: 2007-02-16 22:27+0100\n"
-"PO-Revision-Date: 2007-02-18 10:42+0100\n"
-"Last-Translator: Claus Hindsgaul <claus.hindsgaul@gmail.com>\n"
-"Language-Team: Danish\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=ISO-8859-1\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: KBabel 1.11.4\n"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:1001
-msgid "Do you really want to downgrade?"
-msgstr "Ønsker du virkelig at nedgradere?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:1001
-msgid ""
-"WARNING: The file /var/lib/mysql/debian-*.flag exists. This indicates that a "
-"mysql-server package with a higher version has been installed before. It can "
-"not be guaranteed that this version can use its data."
-msgstr ""
-"Advarsel: Filen /var/lib/mysql/debian-*.flag eksisterer. Det tyder på at der "
-"tidligere har været installeret en højere version af mysql-server-pakken. "
-"Det kan ikke garanteres at denne version kan benytte data fra den højere "
-"version."
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "Important note for NIS/YP users!"
-msgstr "Vigtig bemærkning for NIS/YP-brugere!"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid ""
-"To use mysql you must install an equivalent user and group to the following "
-"and ensure yourself that /var/lib/mysql has the right permissions (the uid/"
-"gid may be different)."
-msgstr ""
-"For at kunne bruge mysql skal du installere en bruger og en gruppe, der "
-"svarer til nedenstående, og sikre dig at /var/lib/mysql har de rigtige "
-"adgangsrettigheder (uid/gid kan afvige)."
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-msgstr "etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "/etc/group: mysql:x:101:"
-msgstr "/etc/group: mysql:x:101:"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "/var/lib/mysql: drwxr-xr-x mysql mysql"
-msgstr "/var/lib/mysql: drwxr-xr-x mysql mysql"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:3001
-msgid "Remove the databases used by all MySQL versions?"
-msgstr "Fjern de databaser, der benyttes af samtlige MySQL-versioner?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:3001
-msgid ""
-"The script is about to remove the data directory /var/lib/mysql. If it is "
-"planned to just install a higher MySQL version or if a different mysql-"
-"server package is already using it, the data should be kept."
-msgstr ""
-"Scriptet skal til at fjerne datamappen /var/lib/mysql. Hvis du regner "
-"medblot at installere en højere MySQL-version, eller hvis der allerede kører "
-"en anden MySQL-serverpakke, bør dataene bevares."
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:4001
-msgid "Should MySQL start on boot?"
-msgstr "Skal MySQL startes under systemopstart?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:4001
-msgid ""
-"The MySQL can start automatically on boot time or only if you manually type "
-"'/etc/init.d/mysql start'."
-msgstr ""
-"MySQL kan enten startes op under systemopstarten eller kun hvis du manuelt "
-"skriver '/etc/init.d/mysql start'."
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid "New password for MySQL \"root\" user:"
-msgstr "Ny adgangskode for MySQL's \"root\"-bruger:"
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid ""
-"It is highly recommended that you set a password for the MySQL "
-"administrative \"root\" user."
-msgstr ""
-"Det anbefales kraftigt, at du sætter en adgangskode for MySQL's "
-"administrationsbruger \"root\"."
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid "If you do not provide a password no changes will be made to the account."
-msgstr "Hvis du ikke angiver en adgangskode, vil kontoen ikke blive ændret."
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid "Unable to set password for MySQL \"root\" user"
-msgstr "Kunne ikke sætte adgangskoden for MySQL's \"root\"-bruger"
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid ""
-"It seems an error occurred while setting the password for the MySQL "
-"administrative user. This may have happened because the user already has a "
-"password, or because there was a problem communicating with the MySQL server."
-msgstr ""
-"Det lader til, at der opstod en fejl, da adgangskoden for MySQL's "
-"administrationsbruger skulle ændres. Dette kan være sket, fordi brugeren "
-"allerede har en adgangskode, eller fordi der var problemer med at "
-"kommunikere med MySQL-serveren."
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid ""
-"When installation finishes, you should verify that the account is properly "
-"protected with a password (see README.Debian for more information)."
-msgstr ""
-"Når installationen afsluttes, bør du tjekke at kontoen er ordentligt "
-"beskyttet med en adgangskode (se README.Debian for yderligere oplysninger)."
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:7001
-msgid "Support MySQL connections from hosts running Debian \"sarge\" or older?"
-msgstr "Understøt MySQL-forbindelser fra maskiner, der kører Debian \"Sarge\" eller ældre?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:7001
-msgid ""
-"The way passwords were stored was not very secure. This has been improved "
-"with the drawback that clients (e.g. PHP) from hosts running Debian 3.1 "
-"Sarge will not be able to connect to account which are new or whose password "
-"have been changed. See /usr/share/doc/mysql-server-5.0/README.Debian."
-msgstr ""
-"Den måde, adgangskoder blev gemt på tidligere, var ikke ret sikker. Dette er "
-"blevet forbedret med den bivirkning, at klienter (f.eks. PHP) fra maskiner, "
-"der kører Debian 3.1 Sarge ikke vil kunne forbindes til en konto, der er ny, "
-"eller hvis adgangskode er blevet ændret. Se /usr/share/doc/mysql-server-5.0/"
-"README.Debian."
-
-#~ msgid "Cannot upgrade if ISAM tables are present!"
-#~ msgstr "Kan ikke opgradere hvis der er ISAM-tabeller!"
-
-#~ msgid ""
-#~ "Recent versions of MySQL can no longer use the old ISAM table format and "
-#~ "it is necessary to convert your tables to e.g. MyISAM before upgrading by "
-#~ "using \"mysql_convert_table_format\" or \"ALTER TABLE x ENGINE=MyISAM\". "
-#~ "The installation of mysql-server-5.0 will now abort. In case your old "
-#~ "mysql-server-4.1 gets removed nevertheless just reinstall it to convert "
-#~ "those tables."
-#~ msgstr ""
-#~ "Nyere versioner af MySQL kan ikke længere benytte det gamle ISAM-"
-#~ "tabelformat, og det er derfor nødvendigt at konvertere dine tabeller til "
-#~ "f.eks. MyISAM forud for opgraderingen med \"mysql_convert_table_format\" "
-#~ "eller \"ALTER TABLE x ENGINE=MyISAM\". Installationen af mysql-server-5.0 "
-#~ "afbrydes nu. Skulle din gamle mysql-server-4.1 alligevel bliver "
-#~ "afinstalleret, så geninstallér den blot og konverter tabellerne."
-
-#~ msgid "Update Hints"
-#~ msgstr "Opdateringstips"
-
-#~ msgid ""
-#~ "You have to run \"mysql_upgrade\" after the upgrade, else tables can be "
-#~ "corrupted! This script also enhances the privilege tables but is not "
-#~ "supposed to give any user more rights that he had before,"
-#~ msgstr ""
-#~ "Du skal køre \"mysql_upgrade\" efter opgraderingen, da tabellerne eller "
-#~ "kan blive ødelagt! Dette script forbedrer også rettighedstabellerne, men "
-#~ "burde ikke give nogen bruger flere rettigheder, end han havde tidligere,"
-
-#~ msgid "Please also read http://www.mysql.com/doc/en/Upgrade.html"
-#~ msgstr "Læs også http://www.mysql.com/doc/en/Upgrade.html"
-
-#~ msgid "Install Hints"
-#~ msgstr "Installationstips"
-
-#~ msgid ""
-#~ "On upgrades from MySQL 3.23, as shipped with Debian Woody, symlinks in "
-#~ "place of /var/lib/mysql or /var/log/mysql gets accidently removed and "
-#~ "have manually be restored."
-#~ msgstr ""
-#~ "Ved opgraderinger fra MySQL 3.23, der fulgte med Debian Woody, kan de "
-#~ "symbolske /var/lib/mysql or /var/log/mysql blive fjernet ved et uheld, og "
-#~ "må genskabes manuelt."
-
-#~ msgid ""
-#~ "MySQL will only install if you have a non-numeric hostname that is "
-#~ "resolvable via the /etc/hosts file. E.g. if the \"hostname\" command "
-#~ "returns \"myhostname\" then there must be a line like \"10.0.0.1 "
-#~ "myhostname\"."
-#~ msgstr ""
-#~ "MySQL vil kun blive installeret, hvis du har et ikke-numerisk værtsnavn, "
-#~ "som kan slås op i filen /ets/hosts. Hvis f.eks. kommandoen \"hostname\" "
-#~ "svarer med \"mitvaertsnavn\", skal du have en linje a'la \"10.0.0.1 "
-#~ "mitvaertsnavn\" i /etc/hosts."
-
-#~ msgid ""
-#~ "A new mysql user \"debian-sys-maint\" will be created. This mysql account "
-#~ "is used in the start/stop and cron scripts. Don't delete."
-#~ msgstr ""
-#~ "Det vil blive oprettet en ny mysql-bruger, \"debian-sys-maint\". Denne "
-#~ "mysql-konto bruges i start/stop-cron-scripterne. Slet den ikke."
-
-#~ msgid ""
-#~ "Please remember to set a PASSWORD for the MySQL root user! If you use a /"
-#~ "root/.my.cnf, always write the \"user\" and the \"password\" lines in "
-#~ "there, never only the password!"
-#~ msgstr ""
-#~ "Husk at sætte en ADGANGSKODE for MySQLs root-bruger! Hvis du bruger en /"
-#~ "etc/.my.cnf, så skriv altid \"user\"- og \"password\"-linjer ind her, "
-#~ "ikke kun adgangskoden!"
-
-#~ msgid ""
-#~ "See /usr/share/doc/mysql-server-5.0/README.Debian for more information."
-#~ msgstr ""
-#~ "Se /usr/share/doc/mysql-server-5.0/README.Debian for yderligere "
-#~ "oplysninger."
-
-#~ msgid ""
-#~ "Should I remove the complete /var/lib/mysql directory tree which is used "
-#~ "by all MySQL versions, not necessarily only the one you are about to "
-#~ "purge?"
-#~ msgstr ""
-#~ "Skal jeg fjerne hele mappetræet /var/lib/mysql, som benyttes af alle "
-#~ "MySQL-versioner, ikke kun den version, du er ved at slette?"
-
-#~ msgid ""
-#~ "Rarely, e.g. on new major versions, the privilege system is improved. To "
-#~ "make use of it mysql_fix_privilege_tables must be executed manually. The "
-#~ "script is not supposed to give any user more rights that he had before,"
-#~ msgstr ""
-#~ "En sjælden gang imellem, f.eks. ved nye hovedversioner, sker det at "
-#~ "rettighedssystemet forbedres. For at gøre brug af dette, skal "
-#~ "mysql_fix_privilege_tables køres manuelt. Scriptet vil ikke give nogen "
-#~ "bruger flere rettigheder, end vedkommende havde tidligere,"
-
diff --git a/debian/po/de.po b/debian/po/de.po
deleted file mode 100644
index 60c9a984622..00000000000
--- a/debian/po/de.po
+++ /dev/null
@@ -1,195 +0,0 @@
-# translation of mysql-dfsg-5.0_5.0.32-6_de.po to german
-#
-# Translators, if you are not familiar with the PO format, gettext
-# documentation is worth reading, especially sections dedicated to
-# this format, e.g. by running:
-# info -n '(gettext)PO Files'
-# info -n '(gettext)Header Entry'
-# Some information specific to po-debconf are available at
-# /usr/share/doc/po-debconf/README-trans
-# or http://www.debian.org/intl/l10n/po-debconf/README-trans#
-# Developers do not need to manually edit POT or PO files.
-#
-# Alwin Meschede <ameschede@gmx.de>, 2006, 2007.
-msgid ""
-msgstr ""
-"Project-Id-Version: mysql-dfsg-5.0_5.0.32-6_de\n"
-"Report-Msgid-Bugs-To: ch@debian.org\n"
-"POT-Creation-Date: 2007-02-16 22:27+0100\n"
-"PO-Revision-Date: 2007-02-19 12:23+0100\n"
-"Last-Translator: Alwin Meschede <ameschede@gmx.de>\n"
-"Language-Team: german <debian-l10n-german@lists.debian.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: KBabel 1.11.4\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:1001
-msgid "Do you really want to downgrade?"
-msgstr "Möchten Sie wirklich eine ältere Version einspielen?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:1001
-msgid ""
-"WARNING: The file /var/lib/mysql/debian-*.flag exists. This indicates that a "
-"mysql-server package with a higher version has been installed before. It can "
-"not be guaranteed that this version can use its data."
-msgstr ""
-"WARNUNG: Die Datei /var/lib/mysql/debian-*.flag existiert. Dies zeigt an, "
-"dass früher ein MySQL-Server-Paket mit einer höheren Version installiert "
-"worden war. Es kann nicht garantiert werden, dass diese Version dessen Daten "
-"benutzen kann."
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "Important note for NIS/YP users!"
-msgstr "Wichtige Anmerkung für NIS/YP-Benutzer!"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid ""
-"To use mysql you must install an equivalent user and group to the following "
-"and ensure yourself that /var/lib/mysql has the right permissions (the uid/"
-"gid may be different)."
-msgstr ""
-"Um MySQL benutzen zu können, müssen Sie einen zum folgenden Eintrag "
-"äquivalenten Benutzer und Gruppe einrichten, und sich vergewissern, dass /"
-"var/lib/mysql die richtigen Rechte hat (die UID/GID dürfen sich "
-"unterscheiden)."
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-msgstr "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "/etc/group: mysql:x:101:"
-msgstr "/etc/group: mysql:x:101:"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "/var/lib/mysql: drwxr-xr-x mysql mysql"
-msgstr "/var/lib/mysql: drwxr-xr-x mysql mysql"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:3001
-msgid "Remove the databases used by all MySQL versions?"
-msgstr "Die von allen MySQL-Versionen benutzten Datenbanken entfernen?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:3001
-msgid ""
-"The script is about to remove the data directory /var/lib/mysql. If it is "
-"planned to just install a higher MySQL version or if a different mysql-"
-"server package is already using it, the data should be kept."
-msgstr ""
-"Dieses Skript wird das Daten-Verzeichnis /var/lib/mysql entfernen. Falls "
-"geplant ist, nur eine höhere Version von MySQL zu installieren oder ein "
-"anderes mysql-server-Paket dieses bereits benutzt, sollten die Daten "
-"behalten werden."
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:4001
-msgid "Should MySQL start on boot?"
-msgstr "Soll MySQL automatisch beim Booten starten?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:4001
-msgid ""
-"The MySQL can start automatically on boot time or only if you manually type "
-"'/etc/init.d/mysql start'."
-msgstr ""
-"Der MySQL-Dienst kann entweder beim Systemstart oder nur nach der Eingabe "
-"von /etc/init.d/mysql start gestartet werden."
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid "New password for MySQL \"root\" user:"
-msgstr "Neues Passwort für den MySQL »root«-Benutzer:"
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid ""
-"It is highly recommended that you set a password for the MySQL "
-"administrative \"root\" user."
-msgstr ""
-"Es wird nachdrücklich empfohlen für den administrativen MySQL »root«-Benutzer "
-"ein Passwort zu setzen."
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid "If you do not provide a password no changes will be made to the account."
-msgstr ""
-"Falls Sie kein Passwort angeben, werden keine Änderungen am Konto "
-"vorgenommen."
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid "Unable to set password for MySQL \"root\" user"
-msgstr "Konnte für den MySQL-»root«-Benutzer kein Passwort setzen"
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid ""
-"It seems an error occurred while setting the password for the MySQL "
-"administrative user. This may have happened because the user already has a "
-"password, or because there was a problem communicating with the MySQL server."
-msgstr ""
-"Es scheint, dass beim Passwort setzen für den administrativen MySQL-Benutzer "
-"ein Fehler aufgetreten ist. Dies könnte daran liegen, dass der Benutzer "
-"bereits ein Passwort hat oder dass es ein Problem mit der Kommunikation mit "
-"dem MySQL-Server gibt."
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid ""
-"When installation finishes, you should verify that the account is properly "
-"protected with a password (see README.Debian for more information)."
-msgstr ""
-"Nach Ende der Installation sollten Sie überprüfen, ob das Konto angemessen "
-"mit einem Passwort geschützt ist (lesen Sie README.Debian für weitere "
-"Informationen)."
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:7001
-msgid "Support MySQL connections from hosts running Debian \"sarge\" or older?"
-msgstr ""
-"Sollen MySQL-Verbindungen von Rechnern mit Debian »Sarge« oder älter "
-"unterstützt werden?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:7001
-msgid ""
-"The way passwords were stored was not very secure. This has been improved "
-"with the drawback that clients (e.g. PHP) from hosts running Debian 3.1 "
-"Sarge will not be able to connect to account which are new or whose password "
-"have been changed. See /usr/share/doc/mysql-server-5.0/README.Debian."
-msgstr ""
-"Die Art, wie Passwörter bislang gespeichert wurden, war nicht sehr sicher. "
-"Dies wurde verbessert, allerdings werden Clients (z. B. PHP) von Hosts mit "
-"Debian 3.1 Sarge sich nicht mehr mit MySQL-Konten verbinden können, die neu "
-"angelegt werden oder deren Passwort geändert wird. Siehe auch /usr/share/doc/"
-"mysql-server-5.0/README.Debian."
-
diff --git a/debian/po/es.po b/debian/po/es.po
deleted file mode 100644
index ddbb77d9607..00000000000
--- a/debian/po/es.po
+++ /dev/null
@@ -1,288 +0,0 @@
-# mysql-dfsg-5 translation to spanish
-# Copyright (C) 2005 Software in the Public Interest, SPI Inc.
-# This file is distributed under the same license as the XXXX package.
-#
-# Changes:
-# - Initial translation
-# Jesus Aneiros , 2006
-# - Updated
-# Javier Fernandez-Sanguino, 2006
-# - Revision
-# Nacho Barrientos Arias
-# Fernando Cerezal
-# David Martínez Moreno
-# Ricardo Mones
-# Carlos Galisteo
-# Javier Fernandez-Sanguino
-#
-#
-# Traductores, si no conoce el formato PO, merece la pena leer la
-# documentación de gettext, especialmente las secciones dedicadas a este
-# formato, por ejemplo ejecutando:
-# info -n '(gettext)PO Files'
-# info -n '(gettext)Header Entry'
-#
-# Equipo de traducción al español, por favor lean antes de traducir
-# los siguientes documentos:
-#
-# - El proyecto de traducción de Debian al español
-# http://www.debian.org/intl/spanish/
-# especialmente las notas y normas de traducción en
-# http://www.debian.org/intl/spanish/notas
-#
-# - La guía de traducción de po's de debconf:
-# /usr/share/doc/po-debconf/README-trans
-# o http://www.debian.org/intl/l10n/po-debconf/README-trans
-#
-# Si tiene dudas o consultas sobre esta traducción consulte con el último
-# traductor (campo Last-Translator) y ponga en copia a la lista de
-# traducción de Debian al español (<debian-l10n-spanish@lists.debian.org>)
-msgid ""
-msgstr ""
-"Project-Id-Version: mysql-dfsg-5.0_5.0.24-3\n"
-"Report-Msgid-Bugs-To: ch@debian.org\n"
-"POT-Creation-Date: 2007-02-16 22:27+0100\n"
-"PO-Revision-Date: 2007-02-18 12:20+0100\n"
-"Last-Translator: Javier Fernández-Sanguino <jfs@debian.org>\n"
-"Language-Team: Debian l10 Spanish <debian-l10n-spanish@lists.debian.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:1001
-msgid "Do you really want to downgrade?"
-msgstr "¿Desea realmente instalar una versión anterior?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:1001
-msgid ""
-"WARNING: The file /var/lib/mysql/debian-*.flag exists. This indicates that a "
-"mysql-server package with a higher version has been installed before. It can "
-"not be guaranteed that this version can use its data."
-msgstr ""
-"ATENCIÓN: El archivo /var/lib/mysql/debian-*.flag existe. Esto indica que ya "
-"se instaló una versión superior del paquete mysql-server. No se puede "
-"garantizar que esta versión pueda usar sus datos."
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "Important note for NIS/YP users!"
-msgstr "¡Nota importante para los usuarios de NIS/YP!"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid ""
-"To use mysql you must install an equivalent user and group to the following "
-"and ensure yourself that /var/lib/mysql has the right permissions (the uid/"
-"gid may be different)."
-msgstr ""
-"Para utilizar mysql debe instalar un usuario y grupo equivalente al "
-"siguiente y asegurarse de que /var/lib/mysql tiene los permisos correctos "
-"(los valores del «uid» y del «gid» pueden ser diferentes)."
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid ""
-"/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-msgstr ""
-"/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "/etc/group: mysql:x:101:"
-msgstr "/etc/group: mysql:x:101:"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "/var/lib/mysql: drwxr-xr-x mysql mysql"
-msgstr "/var/lib/mysql: drwxr-xr-x mysql mysql"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:3001
-msgid "Remove the databases used by all MySQL versions?"
-msgstr ""
-"¿Eliminar las bases de datos utilizadas por todas las versiones de MySQL?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:3001
-msgid ""
-"The script is about to remove the data directory /var/lib/mysql. If it is "
-"planned to just install a higher MySQL version or if a different mysql-"
-"server package is already using it, the data should be kept."
-msgstr ""
-"Este guión va a eliminar el directorio de datos «/var/lib/mysql». Debería "
-"mantener los datos si tiene planificado instalar una versión de MySQL "
-"superior o ya hay un paquete «mysql-server» que los está utilizando."
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:4001
-msgid "Should MySQL start on boot?"
-msgstr "¿Debería ejecutarse MySQL al iniciarse el sistema?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:4001
-msgid ""
-"The MySQL can start automatically on boot time or only if you manually type "
-"'/etc/init.d/mysql start'."
-msgstr ""
-"MySQL puede iniciarse en el momento de arranque del sistema o solamente si "
-"se escribe «/etc/init.d/mysql start»."
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid "New password for MySQL \"root\" user:"
-msgstr "Nueva cContraseña para el usuario «root» de MySQL:"
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid ""
-"It is highly recommended that you set a password for the MySQL "
-"administrative \"root\" user."
-msgstr ""
-"Se recomienda que configure una contraseña para el usuario "
-"«root» (administrador) de MySQL."
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid ""
-"If you do not provide a password no changes will be made to the account."
-msgstr "No se hará ningún cambio en la cuenta si no introduce una contraseña."
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid "Unable to set password for MySQL \"root\" user"
-msgstr "No se pudo fijar la contraseña para el usuario «root» de MySQL"
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid ""
-"It seems an error occurred while setting the password for the MySQL "
-"administrative user. This may have happened because the user already has a "
-"password, or because there was a problem communicating with the MySQL server."
-msgstr ""
-"Parece que se produjo un error mientras intentaba fijar la contraseña para "
-"el usuario administrador de MySQL. Esto puede haber sucedido porque el "
-"usuario ya tenía una contraseña o porque se produjo un error de comunicación "
-"con el servidor MySQL."
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid ""
-"When installation finishes, you should verify that the account is properly "
-"protected with a password (see README.Debian for more information)."
-msgstr ""
-"Debería confirmar que la contraseña está correctamente protegida con una "
-"contraseña cuando termine la instalación (consulte el fichero README.Debian "
-"si desea más información)."
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:7001
-msgid "Support MySQL connections from hosts running Debian \"sarge\" or older?"
-msgstr "¿Soportar las conexiones MySQL establecidadas desde sistemas que ejecutan Debian Sarge o versiones anteriores?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:7001
-msgid ""
-"The way passwords were stored was not very secure. This has been improved "
-"with the drawback that clients (e.g. PHP) from hosts running Debian 3.1 "
-"Sarge will not be able to connect to account which are new or whose password "
-"have been changed. See /usr/share/doc/mysql-server-5.0/README.Debian."
-msgstr ""
-"No era muy segura la forma en la que se almacenaban las contraseñas antes. "
-"Este problema se ha mejorado con el inconveniente, sin embargo, de que "
-"clientes (por ejemplo, PHP) que ejecutan Debian 3.1 «Sarge» no podrán "
-"conectarse a cuentas que son nuevas o a las que se le haya cambiado la "
-"contraseña. Para más información consulte «/usr/share/doc/mysql-server-5.0/"
-"README.Debian»."
-
-#~ msgid "Install Hints"
-#~ msgstr "Sugerencias para la instalación"
-
-#~ msgid ""
-#~ "On upgrades from MySQL 3.23, as shipped with Debian Woody, symlinks in "
-#~ "place of /var/lib/mysql or /var/log/mysql gets accidently removed and "
-#~ "have manually be restored."
-#~ msgstr ""
-#~ "Al actualizar a la versión de MySQL 3.23, la vrsión proporcionada en "
-#~ "Debian Woody, se eliminan de manera accidental, los enlaces simbólicos a "
-#~ "«/var/lib/mysql» o «/var/log/mysql» y tienen que restaurarse manualmente."
-
-#~ msgid ""
-#~ "MySQL will only install if you have a non-numeric hostname that is "
-#~ "resolvable via the /etc/hosts file. E.g. if the \"hostname\" command "
-#~ "returns \"myhostname\" then there must be a line like \"10.0.0.1 "
-#~ "myhostname\"."
-#~ msgstr ""
-#~ "Sólo se instalará MySQL si tiene un nombre de equipo que no sea una "
-#~ "dirección IP y pueda resolverse a través del archivo /etc/hosts. Por "
-#~ "ejemplo, si la orden «hostname» devuelve «MiNombreEquipo» entonces deberá "
-#~ "existir una línea «10.0.0.1 MiNombreEquipo» en dicho archivo."
-
-#~ msgid ""
-#~ "A new mysql user \"debian-sys-maint\" will be created. This mysql account "
-#~ "is used in the start/stop and cron scripts. Don't delete."
-#~ msgstr ""
-#~ "Se creará un nuevo usuario «debian-sys-maint». Esta cuenta de mysql se "
-#~ "utilizará en los scripts de inicio y parada y en los scripts «cron». No "
-#~ "la elimine."
-
-#~ msgid ""
-#~ "Please remember to set a PASSWORD for the MySQL root user! If you use a /"
-#~ "root/.my.cnf, always write the \"user\" and the \"password\" lines in "
-#~ "there, never only the password!"
-#~ msgstr ""
-#~ "¡Por favor, recuerde crear una CONTRASEÑA para el usuario «root» de "
-#~ "MySQL! ¡Si utiliza /root/.my.cnf debe escribir las líneas «user» y "
-#~ "«password» en dicho archivo, no incluya sólo la contraseña!"
-
-#~ msgid ""
-#~ "See /usr/share/doc/mysql-server-5.0/README.Debian for more information."
-#~ msgstr ""
-#~ "Revise /usr/share/doc/mysql-server-5.0/README.Debian para más información."
-
-#~ msgid ""
-#~ "Should I remove the complete /var/lib/mysql directory tree which is used "
-#~ "by all MySQL versions, not necessarily only the one you are about to "
-#~ "purge?"
-#~ msgstr ""
-#~ "¿Debería eliminar el árbol de directorio /var/lib/mysql completo? Tenga "
-#~ "en cuenta que lo utilizan todas las versiones de MySQL y no sólo la que "
-#~ "está a punto de purgar."
-
-#~ msgid "Cannot upgrade if ISAM tables are present!"
-#~ msgstr "¡No se puede actualizar si ya hay tablas ISAM!"
-
-#~ msgid ""
-#~ "Recent versions of MySQL can no longer use the old ISAM table format and "
-#~ "it is necessary to convert your tables to e.g. MyISAM before upgrading by "
-#~ "using \"mysql_convert_table_format\" or \"ALTER TABLE x ENGINE=MyISAM\". "
-#~ "The installation of mysql-server-5.0 will now abort. In case your old "
-#~ "mysql-server-4.1 gets removed nevertheless just reinstall it to convert "
-#~ "those tables."
-#~ msgstr ""
-#~ "Las versiones recientes de MySQL ya no soportan el antiguo formato de "
-#~ "tabla ISAM. Antes de realizar la actualización es necesario convertir sus "
-#~ "tablas a por ejemplo, MyISAM, usando «mysql_convert_table_format» o "
-#~ "«ALTER TABLE x ENGINE=MyISAM». Se va a interrumpir ahora la instalación "
-#~ "de mysql-server-5.0. Si aún así su mysql-server-4.1 se elimina aún así, "
-#~ "puede reinstalarlo para convertir ese tipo de tablas."
diff --git a/debian/po/eu.po b/debian/po/eu.po
deleted file mode 100644
index ce50519e8be..00000000000
--- a/debian/po/eu.po
+++ /dev/null
@@ -1,163 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Piarres BEobide <pi@beobide.net>, 2006.
-msgid ""
-msgstr ""
-"Project-Id-Version: mysql-dfsg-5.0_5.0.26-3-debconf_eu\n"
-"Report-Msgid-Bugs-To: ch@debian.org\n"
-"POT-Creation-Date: 2007-02-16 22:27+0100\n"
-"PO-Revision-Date: 2007-02-19 09:33+0100\n"
-"Last-Translator: Piarres Beobide <pi@beobide.net>\n"
-"Language-Team: Euskara <Librezale@librezale.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-"X-Generator: Pootle 0.10.1\n"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:1001
-msgid "Do you really want to downgrade?"
-msgstr "Benetan bertsio zaharragora itzuli nahi duzu?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:1001
-msgid ""
-"WARNING: The file /var/lib/mysql/debian-*.flag exists. This indicates that a "
-"mysql-server package with a higher version has been installed before. It can "
-"not be guaranteed that this version can use its data."
-msgstr "Oharra: /var/lib/mysql/debian-*.flag dago.. Honek aurretik bertsio berriagoko mysql-zerbitzari bat instalatu dela adierazten du. Ezin da ziurtatu bertsio honek datu horiek erabili ahal izango dituenik."
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "Important note for NIS/YP users!"
-msgstr "NIS/YP erabiltzaileentzat ohar garrantzitsua!"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid ""
-"To use mysql you must install an equivalent user and group to the following "
-"and ensure yourself that /var/lib/mysql has the right permissions (the uid/"
-"gid may be different)."
-msgstr ""
-"Mysql erabili ahal izateko beharrezko erabiltzaile eta taldea sortu eta /var/"
-"lib/mysql-ek beharrezko baimenak dituela ziurtatu behar duzu (uid/gid-a "
-"ezberdina izan daiteke)"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid ""
-"/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-msgstr ""
-"/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "/etc/group: mysql:x:101:"
-msgstr "/etc/group: mysql:x:101:"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "/var/lib/mysql: drwxr-xr-x mysql mysql"
-msgstr "/var/lib/mysql: drwxr-xr-x mysql mysql"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:3001
-msgid "Remove the databases used by all MySQL versions?"
-msgstr "MySQL bertsio guztiek erabilitako databaseak ezabatu?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:3001
-msgid ""
-"The script is about to remove the data directory /var/lib/mysql. If it is "
-"planned to just install a higher MySQL version or if a different mysql-"
-"server package is already using it, the data should be kept."
-msgstr "Script-a /var/lib/mysql data direktorioa ezabatzera doa. MySQL bertsio berriago bat instalatu behar bada edo beste mysql-server pakete bat berau erabiltzen ari bada, datuak mantendu egingo dira."
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:4001
-msgid "Should MySQL start on boot?"
-msgstr "Sistema abiaraztean MySQL abiarazi behar al da?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:4001
-msgid ""
-"The MySQL can start automatically on boot time or only if you manually type "
-"'/etc/init.d/mysql start'."
-msgstr "MySQL abiaraztean automatikoki abiarazi daiteke edo eskuz /etc/init.d/mysql start' eginaz."
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid "New password for MySQL \"root\" user:"
-msgstr "MySQL \"root\" erabiltzailearen pasahitz berria:"
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid ""
-"It is highly recommended that you set a password for the MySQL "
-"administrative \"root\" user."
-msgstr ""
-"Oso gomendagarria da MySQL administratzaile \"root\" erabiltzaileari "
-"pasahitz bat ezartzea."
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid ""
-"If you do not provide a password no changes will be made to the account."
-msgstr "Ez baduzu pasahitzik ezartzen ez da aldaketarik egingo kontuan."
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid "Unable to set password for MySQL \"root\" user"
-msgstr "Ezinda MySQL \"root\" erabiltzailearen pasahitza ezarri"
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid ""
-"It seems an error occurred while setting the password for the MySQL "
-"administrative user. This may have happened because the user already has a "
-"password, or because there was a problem communicating with the MySQL server."
-msgstr "Dirudienez errore bat gertatu da MySQL administratzaile kontuaren pasahitza ezartzean. Hau erabiltzaileak dagoeneko pasahitz bat duelako edo MySQL zerbitzariarekiko konexioan erroreak daudelako gertatu daiteke."
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid ""
-"When installation finishes, you should verify that the account is properly "
-"protected with a password (see README.Debian for more information)."
-msgstr ""
-"Instalazio amaitzean, kontua pasahitzez babesturik dagoela ziurtatu beharko "
-"zenuke (README.Debian irakurri xehetasun gehiagotarako)"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:7001
-msgid "Support MySQL connections from hosts running Debian \"sarge\" or older?"
-msgstr "Debian \"sarge\" edo zaharragoak erabiltzen duten ostalarietatik MySQL konexioak onartu?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:7001
-msgid ""
-"The way passwords were stored was not very secure. This has been improved "
-"with the drawback that clients (e.g. PHP) from hosts running Debian 3.1 "
-"Sarge will not be able to connect to account which are new or whose password "
-"have been changed. See /usr/share/doc/mysql-server-5.0/README.Debian."
-msgstr "Pasahitzak biltegiratzeko modua ez da oso ziurra. Hau hobetua izan da baina Debian 3.1 Sarge erabiltzaileak ezingo dira kontu berri edo pasahitza aldatu duten kontuetara konektatu. Begiratu /usr/share/doc/mysql-server-5.0/README.Debian argibide gehiagorako."
diff --git a/debian/po/fr.po b/debian/po/fr.po
deleted file mode 100644
index 51196a0cba8..00000000000
--- a/debian/po/fr.po
+++ /dev/null
@@ -1,204 +0,0 @@
-# translation of fr.po to French
-# Translators, if you are not familiar with the PO format, gettext
-# documentation is worth reading, especially sections dedicated to
-# this format, e.g. by running:
-# info -n '(gettext)PO Files'
-# info -n '(gettext)Header Entry'
-#
-# Some information specific to po-debconf are available at
-# /usr/share/doc/po-debconf/README-trans
-# or http://www.debian.org/intl/l10n/po-debconf/README-trans
-#
-# Developers do not need to manually edit POT or PO files.
-#
-# Christian Perrier <bubulle@debian.org>, 2004, 2006.
-msgid ""
-msgstr ""
-"Project-Id-Version: fr\n"
-"Report-Msgid-Bugs-To: ch@debian.org\n"
-"POT-Creation-Date: 2007-02-16 22:27+0100\n"
-"PO-Revision-Date: 2006-11-23 20:47+0100\n"
-"Last-Translator: Christian Perrier <bubulle@debian.org>\n"
-"Language-Team: French <debian-l10n-french@lists.debian.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=ISO-8859-15\n"
-"Content-Transfer-Encoding: 8bit\n"
-"debian.org>\n"
-"X-Generator: KBabel 1.11.4\n"
-"Plural-Forms: Plural-Forms: nplurals=2; plural=n>1;\n"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:1001
-msgid "Do you really want to downgrade?"
-msgstr "Faut-il vraiment revenir à la version précédente ?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:1001
-msgid ""
-"WARNING: The file /var/lib/mysql/debian-*.flag exists. This indicates that a "
-"mysql-server package with a higher version has been installed before. It can "
-"not be guaranteed that this version can use its data."
-msgstr ""
-"Un fichier /var/lib/mysql/debian-*.flag est présent. Cela indique qu'une "
-"version plus récente du paquet mysql-server a été précédemment installée. Il "
-"n'est pas garanti que cette version puisse en utiliser les données."
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "Important note for NIS/YP users!"
-msgstr "Note importante pour les utilisateurs NIS/YP"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid ""
-"To use mysql you must install an equivalent user and group to the following "
-"and ensure yourself that /var/lib/mysql has the right permissions (the uid/"
-"gid may be different)."
-msgstr ""
-"Pour utiliser MySQL, vous devez créer un utilisateur et un groupe similaires "
-"à ce qui suit et vérifier que /var/lib/mysql possède les permissions "
-"appropriées (les identifiants numériques de groupe et d'utilisateur, uid et "
-"gid, peuvent être différents)."
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid ""
-"/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-msgstr ""
-"/etc/passwd : mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "/etc/group: mysql:x:101:"
-msgstr "/etc/group : mysql:x:101:"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "/var/lib/mysql: drwxr-xr-x mysql mysql"
-msgstr "/var/lib/mysql : drwxr-xr-x mysql mysql"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:3001
-msgid "Remove the databases used by all MySQL versions?"
-msgstr "Supprimer les bases de données de toutes les versions de MySQL ?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:3001
-msgid ""
-"The script is about to remove the data directory /var/lib/mysql. If it is "
-"planned to just install a higher MySQL version or if a different mysql-"
-"server package is already using it, the data should be kept."
-msgstr ""
-"Les données du répertoire /var/lib/mysql seront supprimées. Si vous prévoyez "
-"d'installer une version plus récente de MySQL ou si un autre paquet mysql-"
-"server les utilise déjà, vous devriez les conserver."
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:4001
-msgid "Should MySQL start on boot?"
-msgstr "Faut-il lancer MySQL au démarrage ?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:4001
-msgid ""
-"The MySQL can start automatically on boot time or only if you manually type "
-"'/etc/init.d/mysql start'."
-msgstr ""
-"MySQL peut être lancé soit au démarrage, soit en entrant la commande « /etc/"
-"init.d/mysql start ». Choisissez cette option si vous voulez que MySQL soit "
-"lancé automatiquement."
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid "New password for MySQL \"root\" user:"
-msgstr "Mot de passe du superutilisateur de MySQL :"
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid ""
-"It is highly recommended that you set a password for the MySQL "
-"administrative \"root\" user."
-msgstr ""
-"Il est très fortement recommandé d'établir un mot de passe pour le compte "
-"d'administration de MySQL (« root »)."
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid ""
-"If you do not provide a password no changes will be made to the account."
-msgstr "Si ce champ est laissé vide, le mot de passe ne sera pas changé."
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid "Unable to set password for MySQL \"root\" user"
-msgstr ""
-"Impossible de changer le mot de passe de l'utilisateur « root » de MySQL"
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid ""
-"It seems an error occurred while setting the password for the MySQL "
-"administrative user. This may have happened because the user already has a "
-"password, or because there was a problem communicating with the MySQL server."
-msgstr ""
-"Une erreur semble s'être produite lors du changement de mot de passe du "
-"compte d'administration. Un mot de passe existait peut-être déjà ou il n'a "
-"pas été possible de communiquer avec le serveur MySQL."
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid ""
-"When installation finishes, you should verify that the account is properly "
-"protected with a password (see README.Debian for more information)."
-msgstr ""
-"À la fin de l'installation, veuillez vérifier que le compte possède bien un "
-"mot de passe (veuillez consulter le fichier README.Debian pour plus "
-"d'informations)."
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:7001
-msgid "Support MySQL connections from hosts running Debian \"sarge\" or older?"
-msgstr ""
-"Gérer les connexions d'hôtes qui utilisent les versions Debian « sarge » ou antérieures  ?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:7001
-msgid ""
-"The way passwords were stored was not very secure. This has been improved "
-"with the drawback that clients (e.g. PHP) from hosts running Debian 3.1 "
-"Sarge will not be able to connect to account which are new or whose password "
-"have been changed. See /usr/share/doc/mysql-server-5.0/README.Debian."
-msgstr ""
-"La méthode de stockage des mots de passe n'était pas très sûre dans les "
-"version précédentes de ce paquet. Cette méthode a été améliorée mais les "
-"modifications empêchent la connexion avec de nouveaux comptes ou des comptes "
-"dont le mot de passe a été modifié, pour les clients (p. ex. PHP) depuis des "
-"hôtes qui utilisent Debian 3.1 « sarge ». Veuillez consulter le fichier /usr/"
-"share/doc/mysql-server-5.0/README.Debian pour plus d'informations."
-
-#~ msgid "internal"
-#~ msgstr "interne"
-
-#~ msgid "Only internally used."
-#~ msgstr ""
-#~ "message utilisé en interne uniquement et que cet andouille de mainteneur "
-#~ "a marqué comme traduisible"
diff --git a/debian/po/gl.po b/debian/po/gl.po
deleted file mode 100644
index 44fd58872cc..00000000000
--- a/debian/po/gl.po
+++ /dev/null
@@ -1,279 +0,0 @@
-# Galician translation of mysql-dfsg-5.0's debconf templates
-# This file is distributed under the same license as the mysql-dfsg-5.0 package.
-# Jacobo Tarrio <jtarrio@debian.org>, 2006.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: mysql-dfsg-5.0\n"
-"Report-Msgid-Bugs-To: ch@debian.org\n"
-"POT-Creation-Date: 2007-02-16 22:27+0100\n"
-"PO-Revision-Date: 2007-02-18 15:42+0100\n"
-"Last-Translator: Jacobo Tarrio <jtarrio@debian.org>\n"
-"Language-Team: Galician <trasno@ceu.fi.udc.es>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:1001
-msgid "Do you really want to downgrade?"
-msgstr "¿Quere pasar a unha versión anterior?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:1001
-msgid ""
-"WARNING: The file /var/lib/mysql/debian-*.flag exists. This indicates that a "
-"mysql-server package with a higher version has been installed before. It can "
-"not be guaranteed that this version can use its data."
-msgstr ""
-"AVISO: O ficheiro /var/lib/mysql/debian-*.flag existe. Isto indica que se "
-"instalou antes un paquete mysql-server dunha versión maior. Non se pode "
-"garantir que esta versión poida empregar os seus datos."
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "Important note for NIS/YP users!"
-msgstr "Nota importante para usuarios de NIS/YP"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid ""
-"To use mysql you must install an equivalent user and group to the following "
-"and ensure yourself that /var/lib/mysql has the right permissions (the uid/"
-"gid may be different)."
-msgstr ""
-"Para empregar mysql debe instalar un usuario e grupo equivalentes aos "
-"seguintes e asegurarse de que /var/lib/mysql teña os permisos correctos (o "
-"uid/gid poden ser diferentes)."
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid ""
-"/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-msgstr ""
-"/etc/passwd: mysql:x:100:101:Servidor MySQL:/var/lib/mysql:/bin/false"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "/etc/group: mysql:x:101:"
-msgstr "/etc/group: mysql:x:101:"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "/var/lib/mysql: drwxr-xr-x mysql mysql"
-msgstr "/var/lib/mysql: drwxr-xr-x mysql mysql"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:3001
-msgid "Remove the databases used by all MySQL versions?"
-msgstr "¿Eliminar as bases de datos empregadas por tódalas versións de MySQL?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:3001
-msgid ""
-"The script is about to remove the data directory /var/lib/mysql. If it is "
-"planned to just install a higher MySQL version or if a different mysql-"
-"server package is already using it, the data should be kept."
-msgstr ""
-"O script vai eliminar o directorio de datos /var/lib/mysql. Se se planea "
-"instalar unha versión superior de MySQL ou se hai outro paquete mysql-server "
-"que o estean a empregar, debería conservar os datos."
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:4001
-msgid "Should MySQL start on boot?"
-msgstr "¿MySQL debería iniciarse co ordenador?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:4001
-msgid ""
-"The MySQL can start automatically on boot time or only if you manually type "
-"'/etc/init.d/mysql start'."
-msgstr ""
-"MySQL pode arrincar automaticamente ao iniciar o ordenador ou só se escribe "
-"\"/etc/init.d/mysql start\" a man."
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid "New password for MySQL \"root\" user:"
-msgstr "Novo contrasinal para o usuario \"root\" de MySQL"
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid ""
-"It is highly recommended that you set a password for the MySQL "
-"administrative \"root\" user."
-msgstr ""
-"Recoméndase encarecidamente que estabreza un contrasinal para o usuario "
-"administrativo \"root\" de MySQL."
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid ""
-"If you do not provide a password no changes will be made to the account."
-msgstr "Se non fornece un contrasinal non se ha facer ningún cambio na conta."
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid "Unable to set password for MySQL \"root\" user"
-msgstr "Non se puido establecer o contrasinal para o usuario \"root\" de MySQL"
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid ""
-"It seems an error occurred while setting the password for the MySQL "
-"administrative user. This may have happened because the user already has a "
-"password, or because there was a problem communicating with the MySQL server."
-msgstr ""
-"Semella que houbo un erro ao establecer o contrasinal para o usuario "
-"administrativo de MySQL. Puido ocorrer porque o usuario xa teña un "
-"contrasinal ou porque teña habido un problema ao se comunicar co servidor "
-"MySQL."
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid ""
-"When installation finishes, you should verify that the account is properly "
-"protected with a password (see README.Debian for more information)."
-msgstr ""
-"Ao rematar a instalación debería comprobar que a conta estea correctamente "
-"protexida cun contrsinal (consulte o ficheiro README.Debian para ter máis "
-"información)."
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:7001
-msgid "Support MySQL connections from hosts running Debian \"sarge\" or older?"
-msgstr ""
-"¿Soportar as conexións a MySQL de máquinas que empreguen Debian \"sarge\" ou "
-"anterior?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:7001
-msgid ""
-"The way passwords were stored was not very secure. This has been improved "
-"with the drawback that clients (e.g. PHP) from hosts running Debian 3.1 "
-"Sarge will not be able to connect to account which are new or whose password "
-"have been changed. See /usr/share/doc/mysql-server-5.0/README.Debian."
-msgstr ""
-"O xeito no que se armacenaban os contrasinais non era moi seguro. Isto "
-"mellorouse co inconveniente de que os clientes (por exemplo, PHP) das "
-"máquinas que executen Debian 3.1 Sarge non se han poder conectar a contas "
-"novas ou nas que se cambiara o contrasinal. Consulte /usr/share/doc/mysql-"
-"server-5.0/README.Debian."
-
-#~ msgid "Cannot upgrade if ISAM tables are present!"
-#~ msgstr "Non se pode actualizar se hai táboas ISAM presentes"
-
-#~ msgid ""
-#~ "Recent versions of MySQL can no longer use the old ISAM table format and "
-#~ "it is necessary to convert your tables to e.g. MyISAM before upgrading by "
-#~ "using \"mysql_convert_table_format\" or \"ALTER TABLE x ENGINE=MyISAM\". "
-#~ "The installation of mysql-server-5.0 will now abort. In case your old "
-#~ "mysql-server-4.1 gets removed nevertheless just reinstall it to convert "
-#~ "those tables."
-#~ msgstr ""
-#~ "As versións recentes de MySQL xa non poden empregar o antigo formato de "
-#~ "táboas ISAM e é necesario converter as táboas a, por exemplo, MyISAM "
-#~ "antes de actualizar, empregando \"mysql_convert_table_format\" ou \"ALTER "
-#~ "TABLE x ENGINE=MyISAM\". A instalación de mysql-server-5.0 hase abortar "
-#~ "agora. Se o seu antigo mysql-server-4.1 se elimina volva instalalo para "
-#~ "converter esas táboas."
-
-#~ msgid "Update Hints"
-#~ msgstr "Consellos de actualización"
-
-#~ msgid ""
-#~ "You have to run \"mysql_upgrade\" after the upgrade, else tables can be "
-#~ "corrupted! This script also enhances the privilege tables but is not "
-#~ "supposed to give any user more rights that he had before,"
-#~ msgstr ""
-#~ "Ten que executar \"mysql_upgrade\" trala actualización; se non o fai, as "
-#~ "táboas poden quedar corrompidas. Este script tamén mellora as táboas de "
-#~ "privilexios, pero non se supón que vaia dar a ningún usuario máis "
-#~ "dereitos dos que tiña antes."
-
-#~ msgid "Please also read http://www.mysql.com/doc/en/Upgrade.html"
-#~ msgstr "Lea tamén http://www.mysql.com/doc/en/Upgrade.html"
-
-#~ msgid "Install Hints"
-#~ msgstr "Consellos de instalación"
-
-#~ msgid ""
-#~ "On upgrades from MySQL 3.23, as shipped with Debian Woody, symlinks in "
-#~ "place of /var/lib/mysql or /var/log/mysql gets accidently removed and "
-#~ "have manually be restored."
-#~ msgstr ""
-#~ "Nas actualizacións desde MySQL 3.23, tal como se fornecía con Debian "
-#~ "Woody, as ligazóns simbólicas no lugar de /var/lib/mysql ou /var/log/"
-#~ "mysql quedan eliminadas por accidente e hai que as restaurar a man."
-
-#~ msgid ""
-#~ "MySQL will only install if you have a non-numeric hostname that is "
-#~ "resolvable via the /etc/hosts file. E.g. if the \"hostname\" command "
-#~ "returns \"myhostname\" then there must be a line like \"10.0.0.1 "
-#~ "myhostname\"."
-#~ msgstr ""
-#~ "MySQL só se ha instalar se ten un nome de máquina non numérico que se "
-#~ "poida resolver polo ficheiro /etc/hosts. Por exemplo, se a orde \"hostname"
-#~ "\" devolve \"omeuordenador\" ten que haber unha liña coma \"10.0.0.1 "
-#~ "omeuordenador\"."
-
-#~ msgid ""
-#~ "A new mysql user \"debian-sys-maint\" will be created. This mysql account "
-#~ "is used in the start/stop and cron scripts. Don't delete."
-#~ msgstr ""
-#~ "Hase crear un novo usuario de mysql, \"debian-sys-maint\". Esta conta de "
-#~ "mysql emprégase nos scripts de inicio/parada e de cron. Non o borre."
-
-#~ msgid ""
-#~ "Please remember to set a PASSWORD for the MySQL root user! If you use a /"
-#~ "root/.my.cnf, always write the \"user\" and the \"password\" lines in "
-#~ "there, never only the password!"
-#~ msgstr ""
-#~ "Lembre estabrecer sempre un contrasinal para o usuario administrador de "
-#~ "MySQL. Se emprega un ficheiro /root/.my.cnf escriba sempre nel as liñas "
-#~ "\"user\" e \"password\", nunca o contrasinal só."
-
-#~ msgid ""
-#~ "See /usr/share/doc/mysql-server-5.0/README.Debian for more information."
-#~ msgstr ""
-#~ "Consulte /usr/share/doc/mysql-server-5.0/README.Debian para máis "
-#~ "información."
-
-#~ msgid ""
-#~ "Should I remove the complete /var/lib/mysql directory tree which is used "
-#~ "by all MySQL versions, not necessarily only the one you are about to "
-#~ "purge?"
-#~ msgstr ""
-#~ "¿Débese eliminar a árbore completa de directorios de /var/lib/mysql que "
-#~ "se emprega en tódalas versións de MySQL, non só necesariamente na que vai "
-#~ "eliminar?"
-
-#~ msgid ""
-#~ "Rarely, e.g. on new major versions, the privilege system is improved. To "
-#~ "make use of it mysql_fix_privilege_tables must be executed manually. The "
-#~ "script is not supposed to give any user more rights that he had before,"
-#~ msgstr ""
-#~ "Moi de cando en vez, por exemplo nos cambios grandes de versión, "
-#~ "mellórase o sistema de privilexios. Para poder empregalo hai que executar "
-#~ "manualmente mysql_fix_privilege_tables. Suponse que o script non vai dar "
-#~ "a ningún usuario máis dereitos dos que xa tiña antes."
diff --git a/debian/po/it.po b/debian/po/it.po
deleted file mode 100644
index 9a8741c5e90..00000000000
--- a/debian/po/it.po
+++ /dev/null
@@ -1,184 +0,0 @@
-# Italian (it) translation of debconf templates for mysql-dfsg-5.0
-# Copyright (C) 2006 Software in the Public Interest
-# This file is distributed under the same license as the mysql-dfsg-5.0 package.
-# Luca Monducci <luca.mo@tiscali.it>, 2006, 2007.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: mysql-dfsg-5.0 5.0.32-6 italian debconf templates\n"
-"Report-Msgid-Bugs-To: ch@debian.org\n"
-"POT-Creation-Date: 2007-02-16 22:27+0100\n"
-"PO-Revision-Date: 2007-02-18 15:09+0100\n"
-"Last-Translator: Luca Monducci <luca.mo@tiscali.it>\n"
-"Language-Team: Italian <tp@lists.linux.it>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=ISO-8859-1\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:1001
-msgid "Do you really want to downgrade?"
-msgstr "Si vuole realmente degradare?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:1001
-msgid ""
-"WARNING: The file /var/lib/mysql/debian-*.flag exists. This indicates that a "
-"mysql-server package with a higher version has been installed before. It can "
-"not be guaranteed that this version can use its data."
-msgstr ""
-"ATTENZIONE: Esiste un file /var/lib/mysql/debian-*.flag. Questo indica che "
-"precedenza è stata installata una versione più recente del pacchetto mysql-"
-"server. Non si garantisce che la versione che si sta installando possa usare "
-"i dati."
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "Important note for NIS/YP users!"
-msgstr "Nota per gli utenti NIS/YP"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid ""
-"To use mysql you must install an equivalent user and group to the following "
-"and ensure yourself that /var/lib/mysql has the right permissions (the uid/"
-"gid may be different)."
-msgstr ""
-"Per usare mysql si deve installare un utente e un gruppo equivalenti ai "
-"seguenti e assicurarsi di avere su /var/lib/mysql i permessi corretti (uid e "
-"gid possono anche essere diversi)."
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid ""
-"/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-msgstr ""
-"/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "/etc/group: mysql:x:101:"
-msgstr "/etc/group: mysql:x:101:"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "/var/lib/mysql: drwxr-xr-x mysql mysql"
-msgstr "/var/lib/mysql: drwxr-xr-x mysql mysql"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:3001
-msgid "Remove the databases used by all MySQL versions?"
-msgstr "Eliminare i database usati da tutte le versioni di MySQL?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:3001
-msgid ""
-"The script is about to remove the data directory /var/lib/mysql. If it is "
-"planned to just install a higher MySQL version or if a different mysql-"
-"server package is already using it, the data should be kept."
-msgstr ""
-"Lo script sta per eliminare la directory con i dati /var/lib/mysql. Se ciò "
-"che si intende fare è un semplice aggiornamento a una nuova versione di "
-"MySQL oppure se è in uso un'altra di versione del pacchetto mysql-server, i "
-"dati non devono essere eliminati."
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:4001
-msgid "Should MySQL start on boot?"
-msgstr "Far partire MySQL all'avvio del sistema?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:4001
-msgid ""
-"The MySQL can start automatically on boot time or only if you manually type "
-"'/etc/init.d/mysql start'."
-msgstr ""
-"MySQL può partire automaticamente all'avvio del sistema oppure solo "
-"manualmente con il comando «/etc/init.d/mysql start»."
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid "New password for MySQL \"root\" user:"
-msgstr "Nuova password per l'utente «root» di MySQL:"
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid ""
-"It is highly recommended that you set a password for the MySQL "
-"administrative \"root\" user."
-msgstr ""
-"Si raccomanda d'impostare una password per l'utente d'amministrazione "
-"(«root») di MySQL."
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid ""
-"If you do not provide a password no changes will be made to the account."
-msgstr ""
-"Se non si fornisce la password non saranno fatte modifiche all'account."
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid "Unable to set password for MySQL \"root\" user"
-msgstr "Impossible impostare la password per l'utente «root» di MySQL"
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid ""
-"It seems an error occurred while setting the password for the MySQL "
-"administrative user. This may have happened because the user already has a "
-"password, or because there was a problem communicating with the MySQL server."
-msgstr ""
-"Pare che si sia verificato un errore durante l'impostazione della password "
-"per l'utente d'amministrazione di MySQL. Questo può essere dovuto al fatto "
-"che la password è già impostata oppure a un problema di comunicazione con il "
-"server MySQL."
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid ""
-"When installation finishes, you should verify that the account is properly "
-"protected with a password (see README.Debian for more information)."
-msgstr ""
-"Al termine dell'installazione si deve verificare che l'account root sia "
-"correttamente protetto da una password (si veda README.Debian per maggiori "
-"informazioni)."
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:7001
-msgid "Support MySQL connections from hosts running Debian \"sarge\" or older?"
-msgstr ""
-"Supportare connessioni MySQL da macchine con Debian \"sarge\" o precedente?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:7001
-msgid ""
-"The way passwords were stored was not very secure. This has been improved "
-"with the drawback that clients (e.g. PHP) from hosts running Debian 3.1 "
-"Sarge will not be able to connect to account which are new or whose password "
-"have been changed. See /usr/share/doc/mysql-server-5.0/README.Debian."
-msgstr ""
-"La modalità con la quale erano memorizzate le password in passato non era "
-"molto sicura; è stata migliorata con lo svantaggio che i client (per esempio "
-"PHP) presenti su una macchina con Debian 3.1 Sarge non saranno in grado di "
-"connettersi a un nuovo account oppure a un account la cui password sia stata "
-"cambiata. Si veda /usr/share/doc/mysql-server-5.0/README.Debian."
diff --git a/debian/po/ja.po b/debian/po/ja.po
deleted file mode 100644
index 14d97ed977b..00000000000
--- a/debian/po/ja.po
+++ /dev/null
@@ -1,278 +0,0 @@
-#
-# Translators, if you are not familiar with the PO format, gettext
-# documentation is worth reading, especially sections dedicated to
-# this format, e.g. by running:
-# info -n '(gettext)PO Files'
-# info -n '(gettext)Header Entry'
-#
-# Some information specific to po-debconf are available at
-# /usr/share/doc/po-debconf/README-trans
-# or http://www.debian.org/intl/l10n/po-debconf/README-trans
-#
-# Developers do not need to manually edit POT or PO files.
-#
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: mysql-dfsg-5.0 5.0.32-6\n"
-"Report-Msgid-Bugs-To: ch@debian.org\n"
-"POT-Creation-Date: 2007-02-16 22:27+0100\n"
-"PO-Revision-Date: 2007-02-18 22:25+0900\n"
-"Last-Translator: Hideki Yamane (Debian-JP) <henrich@debian.or.jp>\n"
-"Language-Team: Japanese <debian-japanese@lists.debian.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:1001
-msgid "Do you really want to downgrade?"
-msgstr "本当ã«ãƒ€ã‚¦ãƒ³ã‚°ãƒ¬ãƒ¼ãƒ‰ã—ã¾ã™ã‹?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:1001
-msgid ""
-"WARNING: The file /var/lib/mysql/debian-*.flag exists. This indicates that a "
-"mysql-server package with a higher version has been installed before. It can "
-"not be guaranteed that this version can use its data."
-msgstr ""
-"警告: /var/lib/mysql/debian-*.flag ファイルãŒå­˜åœ¨ã—ã¦ã„ã¾ã™ã€‚ã“ã‚Œã¯ã€ä»¥å‰ã«ã‚ˆ"
-"ã‚Šæ–°ã—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã® mysql-server パッケージãŒã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚Œã¦ã„ãŸã“ã¨ã‚’示"
-"ã—ã¾ã™ã€‚データをã“ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ä½¿ãˆã‚‹ã‹ã©ã†ã‹ã€ä¿è¨¼ã§ãã¾ã›ã‚“。"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "Important note for NIS/YP users!"
-msgstr "NIS/YP ユーザã¸é‡è¦ãªæ³¨æ„!"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid ""
-"To use mysql you must install an equivalent user and group to the following "
-"and ensure yourself that /var/lib/mysql has the right permissions (the uid/"
-"gid may be different)."
-msgstr ""
-"mysql を利用ã™ã‚‹ã«ã¯ 以下ã®ãƒ¦ãƒ¼ã‚¶ã¨ã‚°ãƒ«ãƒ¼ãƒ—を作æˆã—ã€/var/lib/mysql ãŒæ­£ã—ã„"
-"権é™ã«ãªã£ã¦ã„ã‚‹ã‹ã©ã†ã‹ã‚’確èªã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ (ãŠãらã uid/gid ãŒé•ã„ã¾"
-"ã™)。"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid ""
-"/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-msgstr ""
-"/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "/etc/group: mysql:x:101:"
-msgstr "/etc/group: mysql:x:101:"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "/var/lib/mysql: drwxr-xr-x mysql mysql"
-msgstr "/var/lib/mysql: drwxr-xr-x mysql mysql"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:3001
-msgid "Remove the databases used by all MySQL versions?"
-msgstr "å…¨ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã® MySQL ã§åˆ©ç”¨ã•ã‚Œã¦ã„るデータベースを削除ã—ã¾ã™ã‹?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:3001
-msgid ""
-"The script is about to remove the data directory /var/lib/mysql. If it is "
-"planned to just install a higher MySQL version or if a different mysql-"
-"server package is already using it, the data should be kept."
-msgstr ""
-"ã“ã®ã‚¹ã‚¯ãƒªãƒ—トã¯ãƒ‡ãƒ¼ã‚¿ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒª /var/lib/mysql を削除ã™ã‚‹ãŸã‚ã®ã‚‚ã®ã§"
-"ã™ã€‚å˜ã«æ–°ã—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã® MySQL をインストールã—よã†ã¨ã—ã¦ã„ã‚‹ã€ã‚ã‚‹ã„ã¯åˆ¥"
-"ã® mysql-server パッケージを既ã«ä½¿ã£ã¦ã„ã‚‹å ´åˆã€ãƒ‡ãƒ¼ã‚¿ã¯ä¿æŒã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾"
-"ã™ã€‚"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:4001
-msgid "Should MySQL start on boot?"
-msgstr "MySQL をシステム起動時ã«é–‹å§‹ã—ã¾ã™ã‹?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:4001
-msgid ""
-"The MySQL can start automatically on boot time or only if you manually type "
-"'/etc/init.d/mysql start'."
-msgstr ""
-"MySQL ã®èµ·å‹•æ–¹æ³•ã«ã¤ã„ã¦ã€ã‚·ã‚¹ãƒ†ãƒ èµ·å‹•æ™‚ã«è‡ªå‹•çš„ã«é–‹å§‹ã™ã‚‹ã‹ã€ã‚ã‚‹ã„㯠'/etc/"
-"init.d/mysql start' ã¨æ‰‹ã§å…¥åŠ›ã—ãŸæ™‚ã®ã¿èµ·å‹•ã™ã‚‹ã‹ã‚’é¸ã¹ã¾ã™ã€‚"
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid "New password for MySQL \"root\" user:"
-msgstr "MySQL ã® \"root\" ユーザã«å¯¾ã™ã‚‹æ–°ã—ã„パスワード:"
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid ""
-"It is highly recommended that you set a password for the MySQL "
-"administrative \"root\" user."
-msgstr ""
-"MySQL を管ç†ã™ã‚‹ \"root\" ユーザã®ãƒ‘スワードを設定ã™ã‚‹ã“ã¨ã‚’å¼·ããŠå‹§ã‚ã—ã¾"
-"ã™ã€‚"
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid ""
-"If you do not provide a password no changes will be made to the account."
-msgstr "パスワードを入力ã—ãªã„å ´åˆã€ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã«å¯¾ã—ã¦å¤‰æ›´ã¯åŠ ãˆã‚‰ã‚Œã¾ã›ã‚“。"
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid "Unable to set password for MySQL \"root\" user"
-msgstr "MySQL ã® \"root\" ユーザã®ãƒ‘スワードを設定ã§ãã¾ã›ã‚“"
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid ""
-"It seems an error occurred while setting the password for the MySQL "
-"administrative user. This may have happened because the user already has a "
-"password, or because there was a problem communicating with the MySQL server."
-msgstr ""
-"MySQL ã®ç®¡ç†è€…ユーザã«å¯¾ã—ã¦ãƒ‘スワードを設定ã—よã†ã¨ã—ãŸéš›ã€ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ãŸ"
-"よã†ã§ã™ã€‚ã“ã‚Œã¯æ—¢ã«ç®¡ç†è€…ユーザã«ãƒ‘スワードãŒè¨­å®šã•ã‚Œã¦ã„ãŸã‹ã€MySQL サーãƒ"
-"ã¨ã®æŽ¥ç¶šã«å•é¡ŒãŒã‚ã£ãŸãŸã‚ã ã¨æ€ã‚ã‚Œã¾ã™ã€‚"
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid ""
-"When installation finishes, you should verify that the account is properly "
-"protected with a password (see README.Debian for more information)."
-msgstr ""
-"インストールãŒçµ‚了ã—ãŸéš›ã€ã‚¢ã‚«ã‚¦ãƒ³ãƒˆãŒãƒ‘スワードã§ãã¡ã‚“ã¨ä¿è­·ã•ã‚Œã¦ã„ã‚‹ã‹ã©"
-"ã†ã‹ã‚’確èªã—ã¦ãã ã•ã„ (詳細ã«ã¤ã„ã¦ã¯ README.Debian ã‚’å‚ç…§ã—ã¦ãã ã•ã„)。"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:7001
-msgid "Support MySQL connections from hosts running Debian \"sarge\" or older?"
-msgstr ""
-"Debian \"Sarge\" ã‚ã‚‹ã„ã¯ãれよりもå¤ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒç¨¼åƒã—ã¦ã„るホストã‹ã‚‰ã® "
-"MySQL 接続をサãƒãƒ¼ãƒˆã—ã¾ã™ã‹?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:7001
-msgid ""
-"The way passwords were stored was not very secure. This has been improved "
-"with the drawback that clients (e.g. PHP) from hosts running Debian 3.1 "
-"Sarge will not be able to connect to account which are new or whose password "
-"have been changed. See /usr/share/doc/mysql-server-5.0/README.Debian."
-msgstr ""
-"パスワードã®ä¿å­˜æ–¹æ³•ã¯ã€ã‚ã¾ã‚Šå®‰å…¨ãªæ–¹æ³•ã§è¡Œã‚ã‚Œã¦ã„ã¾ã›ã‚“ã§ã—ãŸã€‚ã“ã‚Œã¯æ”¹å–„"
-"ã•ã‚Œã¾ã—ãŸãŒã€Debian 3.1 Sarge ãŒç¨¼åƒã—ã¦ã„るホストã‹ã‚‰ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ (PHP ãª"
-"ã©) ãŒæ–°ã—ã„アカウントやパスワードãŒå¤‰æ›´ã•ã‚ŒãŸã‚¢ã‚«ã‚¦ãƒ³ãƒˆã«ã¯æŽ¥ç¶šã§ããªããªã‚‹"
-"ã¨ã„ã†æ¬ ç‚¹ã‚‚ã§ã¦ã„ã¾ã™ã€‚詳細ã«ã¤ã„ã¦ã¯ /usr/share/doc/mysql-server-5.0/"
-"README.Debian ã‚’å‚ç…§ã—ã¦ãã ã•ã„。"
-
-#~ msgid "Cannot upgrade if ISAM tables are present!"
-#~ msgstr "ISAM テーブルãŒã‚ã‚‹å ´åˆã¯ã‚¢ãƒƒãƒ—グレードã§ãã¾ã›ã‚“!"
-
-#~ msgid ""
-#~ "Recent versions of MySQL can no longer use the old ISAM table format and "
-#~ "it is necessary to convert your tables to e.g. MyISAM before upgrading by "
-#~ "using \"mysql_convert_table_format\" or \"ALTER TABLE x ENGINE=MyISAM\". "
-#~ "The installation of mysql-server-5.0 will now abort. In case your old "
-#~ "mysql-server-4.1 gets removed nevertheless just reinstall it to convert "
-#~ "those tables."
-#~ msgstr ""
-#~ "MySQL ã®æœ€è¿‘ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ã¯ä»¥å‰ã® ISAM テーブル形å¼ã¯åˆ©ç”¨ã§ããªããªã£ã¦ã„"
-#~ "ã¾ã™ã€‚ãã®ãŸã‚ã€ä¾‹ãˆã° \"mysql_convert_table_format\" ã‚ã‚‹ã„㯠\"ALTER "
-#~ "TABLE x ENGINE=MyISAM\" ã¨ã—ã¦ã‚¢ãƒƒãƒ—グレードå‰ã« MyISAM ã«ã‚³ãƒ³ãƒãƒ¼ãƒˆã™ã‚‹ã“"
-#~ "ã¨ãªã©ãŒå¿…è¦ã§ã™ã€‚mysql-server-5.0 ã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã‚’中断ã—ã¾ã™ã€‚以å‰ã® "
-#~ "mysql-server-4.1 ãŒå‰Šé™¤ã•ã‚Œã¦ã—ã¾ã£ãŸå ´åˆã§ã‚ã£ã¦ã‚‚ã€ãƒ†ãƒ¼ãƒ–ルをコンãƒãƒ¼ãƒˆ"
-#~ "ã™ã‚‹ãŸã‚ã«å†ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã‚’ã—ã¦ãã ã•ã„。"
-
-#~ msgid "Install Hints"
-#~ msgstr "インストールã®ãƒ’ント"
-
-#~ msgid ""
-#~ "On upgrades from MySQL 3.23, as shipped with Debian Woody, symlinks in "
-#~ "place of /var/lib/mysql or /var/log/mysql gets accidently removed and "
-#~ "have manually be restored."
-#~ msgstr ""
-#~ "Debian Woody ã§ãƒªãƒªãƒ¼ã‚¹ã•ã‚ŒãŸ MySQL 3.23 ã‹ã‚‰ã®ã‚¢ãƒƒãƒ—グレードã§ã¯ã€/var/"
-#~ "lib/mysql ã‚ã‚‹ã„㯠/var/log/mysql ã®ä»£ã‚ã‚Šã«ã‚·ãƒ³ãƒœãƒªãƒƒã‚¯ãƒªãƒ³ã‚¯ã¯å¶ç„¶ã«ã‚‚削"
-#~ "除ã•ã‚Œã¦ã—ã¾ã£ã¦ã„ã‚‹ã®ã§ã€æ‰‹å‹•ã§ã®ãƒªã‚¹ãƒˆã‚¢ãŒå¿…è¦ã«ãªã‚Šã¾ã™ã€‚"
-
-#~ msgid ""
-#~ "MySQL will only install if you have a non-numeric hostname that is "
-#~ "resolvable via the /etc/hosts file. E.g. if the \"hostname\" command "
-#~ "returns \"myhostname\" then there must be a line like \"10.0.0.1 "
-#~ "myhostname\"."
-#~ msgstr ""
-#~ "MySQL 㯠/etc/hosts ファイル経由ã§è§£æ±ºã§ãる「数字ã®ã¿ã§æ§‹æˆã•ã‚Œã¦ãªã„ã€ãƒ›"
-#~ "ストåã®å ´åˆã®ã¿ã€ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚Œã¾ã™ã€‚ã¤ã¾ã‚Šã€\"hostname\" コマンド㌠"
-#~ "\"myhostname\" ã‚’è¿”ã™ãªã‚‰ã€\"10.0.0.1 myhostname\" ã¨ã„ã†è¡ŒãŒ /etc/hosts "
-#~ "ファイルã«ã‚ã‚‹ã¯ãšã§ã™ã€‚"
-
-#~ msgid ""
-#~ "A new mysql user \"debian-sys-maint\" will be created. This mysql account "
-#~ "is used in the start/stop and cron scripts. Don't delete."
-#~ msgstr ""
-#~ "æ–°è¦ã« mysql ユーザã¨ã—㦠\"debian-sys-maint\" ãŒä½œæˆã•ã‚Œã¾ã™ã€‚ã“ã® mysql "
-#~ "アカウント㯠start/stop 時㨠cron スクリプトã§åˆ©ç”¨ã•ã‚Œã¾ã™ã€‚消ã•ãªã„ã§ãã "
-#~ "ã•ã„。"
-
-#~ msgid ""
-#~ "Please remember to set a PASSWORD for the MySQL root user! If you use a /"
-#~ "root/.my.cnf, always write the \"user\" and the \"password\" lines in "
-#~ "there, never only the password!"
-#~ msgstr ""
-#~ "MySQL ã® root ユーザã«å¯¾ã—ã¦ã€Œãƒ‘スワードã®è¨­å®šã€ã‚’忘れãªã„ã§ãã ã•ã„! /"
-#~ "root/.my.cnf を使ã£ã¦ã„ã‚‹å ´åˆã€ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ä¸­ã® \"user\" 行㨠\"password"
-#~ "\" 行を記述ã—ã¦ãã ã•ã„。決ã—ã¦ãƒ‘スワードã ã‘ã§ã¯ã„ã‘ã¾ã›ã‚“!"
-
-#~ msgid ""
-#~ "See /usr/share/doc/mysql-server-5.0/README.Debian for more information."
-#~ msgstr ""
-#~ "詳細㯠/usr/share/doc/mysql-server-5.0/README.Debian ã‚’å‚ç…§ã—ã¦ãã ã•ã„。"
-
-#~ msgid ""
-#~ "Should I remove the complete /var/lib/mysql directory tree which is used "
-#~ "by all MySQL versions, not necessarily only the one you are about to "
-#~ "purge?"
-#~ msgstr ""
-#~ "ã“ã‚Œã‹ã‚‰ purge ã—よã†ã¨ã—ã¦ã„ã‚‹ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã ã‘ã§ã¯ç„¡ãã€å…¨ã¦ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã® "
-#~ "MySQL ㌠/var/lib/mysql ディレクトリを使用ã—ã¦ã„ã¾ã™ã€‚ã“ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‚’完"
-#~ "å…¨ã«å‰Šé™¤ã—ã¾ã™ã‹?"
-
-#~ msgid "Update Hints"
-#~ msgstr "æ›´æ–°ã®ãƒ’ント"
-
-#~ msgid ""
-#~ "Rarely, e.g. on new major versions, the privilege system is improved. To "
-#~ "make use of it mysql_fix_privilege_tables must be executed manually. The "
-#~ "script is not supposed to give any user more rights that he had before,"
-#~ msgstr ""
-#~ "ã¾ã‚Œã«ã€ã¤ã¾ã‚Šã¯æ–°ã—ã„メジャーãƒãƒ¼ã‚¸ãƒ§ãƒ³ã«ãŠã„ã¦ã€ç‰¹æ¨©ã‚·ã‚¹ãƒ†ãƒ ãŒæ”¹å–„ã•ã‚Œã¾"
-#~ "ã™ã€‚ã“れを行ã†ã«ã¯ã€mysql_fix_privilege_table を手動ã§å®Ÿè¡Œã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾"
-#~ "ã™ã€‚スクリプトã¯ã€ã©ã®ã‚ˆã†ãªãƒ¦ãƒ¼ã‚¶ã«å¯¾ã—ã¦ã‚‚ã€ä»¥å‰ã«ä¿æŒã—ã¦ã„ãŸä»¥ä¸Šã®æ¨©é™"
-#~ "を与ãˆã‚‹ã‚ˆã†ã«ã¯ãªã£ã¦ã„ã¾ã›ã‚“。"
-
-#~ msgid "Please also read http://www.mysql.com/doc/en/Upgrade.html"
-#~ msgstr "http://www.mysql.com/doc/ja/Upgrade.html ã‚‚å‚ç…§ã—ã¦ãã ã•ã„"
diff --git a/debian/po/nb.po b/debian/po/nb.po
deleted file mode 100644
index e7a58534863..00000000000
--- a/debian/po/nb.po
+++ /dev/null
@@ -1,179 +0,0 @@
-# translation of mysql_nb.po to Norwegian Bokmål
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-#
-# Bjørn Steensrud <bjornst@powertech.no>, 2007.
-msgid ""
-msgstr ""
-"Project-Id-Version: mysql_nb\n"
-"Report-Msgid-Bugs-To: ch@debian.org\n"
-"POT-Creation-Date: 2007-02-16 22:27+0100\n"
-"PO-Revision-Date: 2007-02-18 12:13+0100\n"
-"Last-Translator: Bjørn Steensrud <bjornst@powertech.no>\n"
-"Language-Team: Norwegian Bokmål <i18n-nb@lister.ping.uio.no>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: KBabel 1.11.2\n"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:1001
-msgid "Do you really want to downgrade?"
-msgstr "Er du sikker på at du vil nedgradere?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:1001
-msgid ""
-"WARNING: The file /var/lib/mysql/debian-*.flag exists. This indicates that a "
-"mysql-server package with a higher version has been installed before. It can "
-"not be guaranteed that this version can use its data."
-msgstr ""
-"ADVARSEL: Fila /var/lib/mysql/debian-*.flag finnes. Dette viser at en "
-"mysql-server-pakke med et høyere versjonsnummer har vært installert før. "
-"Det kan ikke garanteres at denne versjonen kan bruke data fra den høyere versjonen."
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "Important note for NIS/YP users!"
-msgstr "Viktig merknad for NIS/YP-brukere!"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid ""
-"To use mysql you must install an equivalent user and group to the following "
-"and ensure yourself that /var/lib/mysql has the right permissions (the uid/"
-"gid may be different)."
-msgstr ""
-"For å bruke MySQL må du installere en bruker og gruppe tilsvarende den "
-"nedenfor og se til at /var/lib/mysql har riktige rettigheter (uid/gid kan "
-"være forskjellig)."
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-msgstr "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "/etc/group: mysql:x:101:"
-msgstr "/etc/group: mysql:x:101:"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "/var/lib/mysql: drwxr-xr-x mysql mysql"
-msgstr "/var/lib/mysql: drwxr-xr-x mysql mysql"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:3001
-msgid "Remove the databases used by all MySQL versions?"
-msgstr "Skal databasene brukt av alle MySQL-versjoner fjernes?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:3001
-msgid ""
-"The script is about to remove the data directory /var/lib/mysql. If it is "
-"planned to just install a higher MySQL version or if a different mysql-"
-"server package is already using it, the data should be kept."
-msgstr ""
-"Dette skriptet skal til å fjerne data-mappa /var/lib/mysql. Denne mappa "
-"bør beholdes hvis det bare skal installeres en høyere MySQL-versjon, "
-"eller hvis en annen mysql-server-pakke allerede bruker den."
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:4001
-msgid "Should MySQL start on boot?"
-msgstr "Skal MySQL startes ved maskinoppstart?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:4001
-msgid ""
-"The MySQL can start automatically on boot time or only if you manually type "
-"'/etc/init.d/mysql start'."
-msgstr ""
-"MySQL kan startes automatisk når maskinen starter, eller bare hvis du "
-"skriver «/etc/init.d/mysql start»."
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid "New password for MySQL \"root\" user:"
-msgstr "Nytt passord for MySQLs «root»-bruker:"
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid ""
-"It is highly recommended that you set a password for the MySQL "
-"administrative \"root\" user."
-msgstr ""
-"Det anbefales sterkt at du oppgir et passord for den administrative "
-"«root»-brukeren i MySQl."
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid "If you do not provide a password no changes will be made to the account."
-msgstr "Hvis du ikke oppgir et passord blir det ikke gjort noen endringer med kontoen."
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid "Unable to set password for MySQL \"root\" user"
-msgstr "Klarer ikke angi passord for MySQLs «root»-bruker"
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid ""
-"It seems an error occurred while setting the password for the MySQL "
-"administrative user. This may have happened because the user already has a "
-"password, or because there was a problem communicating with the MySQL server."
-msgstr ""
-"Det ser ut til at det oppsto en feil mens det ble satt et passord for "
-"MySQLs administrative bruker. Dette kan være fordi brukeren allerede "
-"har et passord, eller fordi det var et kommunikasjonsproblem med "
-"MySQL-tjeneren."
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid ""
-"When installation finishes, you should verify that the account is properly "
-"protected with a password (see README.Debian for more information)."
-msgstr ""
-"Når installasjonen er ferdig bør det sjekkes at kontoen er ordentlig "
-"beskyttet med et passord (mer informasjon finnes i README.Debian)."
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:7001
-msgid "Support MySQL connections from hosts running Debian \"sarge\" or older?"
-msgstr ""
-"Skal MySQL-tilkoblinger støttes fra vertsmaskiner som kjører Debian «sarge» "
-"eller eldre?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:7001
-msgid ""
-"The way passwords were stored was not very secure. This has been improved "
-"with the drawback that clients (e.g. PHP) from hosts running Debian 3.1 "
-"Sarge will not be able to connect to account which are new or whose password "
-"have been changed. See /usr/share/doc/mysql-server-5.0/README.Debian."
-msgstr ""
-"Passord ble tidligere lagret på en lite sikker måte. Dette er nå forbedret, "
-"med den ulempen at klienter (f.eks. PHP) fra verter som kjører Debian 3.1 Sarge "
-"ikke vil kunne koble til en konto som er ny eller har fått endret passordet. "
-"Se /usr/share/doc/mysql-server-5.0/README.Debian."
-
diff --git a/debian/po/nl.po b/debian/po/nl.po
deleted file mode 100644
index 13b3e8c02b8..00000000000
--- a/debian/po/nl.po
+++ /dev/null
@@ -1,187 +0,0 @@
-# Dutch mysql-dfsg-5.0 po-debconf translation,
-# Copyright (C) 2006 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the mysql-dfsg-5.0 package.
-# Vincent Zweije <zweije@xs4all.nl>, 2006.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: mysql-dfsg-5.0 5.0.30-1\n"
-"Report-Msgid-Bugs-To: ch@debian.org\n"
-"POT-Creation-Date: 2007-02-16 22:27+0100\n"
-"PO-Revision-Date: 2006-02-19 10:20+0100\n"
-"Last-Translator: Thijs Kinkhorst <thijs@debian.org>\n"
-"Language-Team: Debian-Dutch <debian-l10n-dutch@lists.debian.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=utf-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:1001
-msgid "Do you really want to downgrade?"
-msgstr "Wilt u echt een oude versie herstellen?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:1001
-msgid ""
-"WARNING: The file /var/lib/mysql/debian-*.flag exists. This indicates that a "
-"mysql-server package with a higher version has been installed before. It can "
-"not be guaranteed that this version can use its data."
-msgstr ""
-"Waarschuwing: waarschijnlijk is een hogere versie van het mysql-server "
-"pakket geïnstalleerd geweest (het bestand /var/lib/mysql/debian-*.flag "
-"bestaat). Er is geen garantie dat de gegevensbestanden, bewerkt met die "
-"hogere versie, kunnen worden gebruikt met de versie van mysql die u nu "
-"installeert."
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "Important note for NIS/YP users!"
-msgstr "Belangrijke opmerking voor gebruikers van NIS/YP!"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid ""
-"To use mysql you must install an equivalent user and group to the following "
-"and ensure yourself that /var/lib/mysql has the right permissions (the uid/"
-"gid may be different)."
-msgstr ""
-"Om mysql te gebruiken dient u een gebruiker en groep aan te maken, "
-"gelijkwaardig aan onderstaand voorbeeld, en u dient ervoor te zorgen dat /"
-"var/lib/mysql de bijbehorende toegangsrechten heeft (uid en gid mogen anders "
-"zijn)."
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid ""
-"/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-msgstr ""
-"/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "/etc/group: mysql:x:101:"
-msgstr "/etc/group: mysql:x:101:"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "/var/lib/mysql: drwxr-xr-x mysql mysql"
-msgstr "/var/lib/mysql: drwxr-xr-x mysql mysql"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:3001
-msgid "Remove the databases used by all MySQL versions?"
-msgstr "Databases verwijderen die door alle MySQL versies worden gebruikt?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:3001
-msgid ""
-"The script is about to remove the data directory /var/lib/mysql. If it is "
-"planned to just install a higher MySQL version or if a different mysql-"
-"server package is already using it, the data should be kept."
-msgstr ""
-"Het script staat op het punt de datamap /var/lib/mysql te verwijderen. Als "
-"het plan alleen maar is om een hogere MySQL versie te installeren, of als "
-"een ander mysql-serverpakket de datamap al gebruikt, dan zou de data moeten "
-"worden behouden."
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:4001
-msgid "Should MySQL start on boot?"
-msgstr "Moet MySQL starten als de computer start?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:4001
-msgid ""
-"The MySQL can start automatically on boot time or only if you manually type "
-"'/etc/init.d/mysql start'."
-msgstr ""
-"MySQL kan automatisch starten bij het starten van de computer, of slechts "
-"wanneer u '/etc/init.d/mysql start' handmatig uitvoert."
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid "New password for MySQL \"root\" user:"
-msgstr "Nieuw wachtwoord voor de MySQL \"root\"-gebruiker:"
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid ""
-"It is highly recommended that you set a password for the MySQL "
-"administrative \"root\" user."
-msgstr ""
-"Het wordt sterk aangeraden een wachtwoord in te stellen voor de "
-"administratieve MySQL \"root\"-gebruiker."
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid ""
-"If you do not provide a password no changes will be made to the account."
-msgstr ""
-"Indien u geen wachtwoord opgeeft zal het account niet worden gewijzigd."
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid "Unable to set password for MySQL \"root\" user"
-msgstr "Kan het wachtwoord voor de MySQL \"root\"-gebruiker niet instellen"
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid ""
-"It seems an error occurred while setting the password for the MySQL "
-"administrative user. This may have happened because the user already has a "
-"password, or because there was a problem communicating with the MySQL server."
-msgstr ""
-"Er lijkt een fout te zijn opgetreden bij het instellen van het wachtwoord "
-"van de MySQL administratieve gebruiker. Dat kan komen doordat de gebruiker "
-"al een wachtwoord heeft, of omdat er een probleem was bij het communiceren "
-"met de MySQL server."
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid ""
-"When installation finishes, you should verify that the account is properly "
-"protected with a password (see README.Debian for more information)."
-msgstr ""
-"Wanneer de installatie klaar is, dient u te verifiëren dat het account "
-"netjes beschermd is met een wachtwoord (zie README.Debian voor meer "
-"informatie)."
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:7001
-msgid "Support MySQL connections from hosts running Debian \"sarge\" or older?"
-msgstr ""
-"Moet u MySQL-verbindingen accepteren van computers die Debian \"sarge\" "
-"of ouder draaien?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:7001
-msgid ""
-"The way passwords were stored was not very secure. This has been improved "
-"with the drawback that clients (e.g. PHP) from hosts running Debian 3.1 "
-"Sarge will not be able to connect to account which are new or whose password "
-"have been changed. See /usr/share/doc/mysql-server-5.0/README.Debian."
-msgstr ""
-"De wijze waarop wachtwoorden werden bewaard was niet erg veilig. Dit is "
-"verbeterd, maar helaas zullen programma's van computers die Debian 3.1 Sarge "
-"draaien, geen verbinding meer kunnen maken met accounts die nieuw zijn, of "
-"waarvan het wachtwoord is gewijzigd. Zie /usr/share/doc/mysql-server-5.0/"
-"README.Debian."
diff --git a/debian/po/pt.po b/debian/po/pt.po
deleted file mode 100644
index cb330e1932b..00000000000
--- a/debian/po/pt.po
+++ /dev/null
@@ -1,198 +0,0 @@
-# Portuguese translation for mysql-dfsg-5.0's debconf messages
-# Copyright (C) 2006 Miguel Figueiredo <elmig@debianpt.org>
-# This file is distributed under the same license as the mysql-dfsg-5.0 package.
-# Miguel Figueiredo <elmig@debianpt.org>
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: mysql-dfsg-5.0\n"
-"Report-Msgid-Bugs-To: ch@debian.org\n"
-"POT-Creation-Date: 2007-02-16 22:27+0100\n"
-"PO-Revision-Date: 2007-02-18 10:38+0000\n"
-"Last-Translator: Miguel Figueiredo <elmig@debianpt.org>\n"
-"Language-Team: Portuguese <traduz@debianpt.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:1001
-msgid "Do you really want to downgrade?"
-msgstr "Deseja mesmo fazer downgrade?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:1001
-msgid ""
-"WARNING: The file /var/lib/mysql/debian-*.flag exists. This indicates that a "
-"mysql-server package with a higher version has been installed before. It can "
-"not be guaranteed that this version can use its data."
-msgstr ""
-"AVISO: o ficheiro /var/lib/mysql/debian-*.flag existe. Isto significa que "
-"antes foi instalado um pacote mysql-server com número de versão superior. "
-"Não pode ser garantido que esta versão utilize esses dados."
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "Important note for NIS/YP users!"
-msgstr "Nota importante para utilizadores de NIS/YP!"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid ""
-"To use mysql you must install an equivalent user and group to the following "
-"and ensure yourself that /var/lib/mysql has the right permissions (the uid/"
-"gid may be different)."
-msgstr ""
-"Para utilizar mysql e instalar um utilizador e grupo equivalentes para o "
-"seguinte e assegurar-se que /var/lib/mysql têm as permissões correctas (o "
-"uid/gid podem ser diferentes)."
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid ""
-"/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-msgstr ""
-"/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "/etc/group: mysql:x:101:"
-msgstr "/etc/group: mysql:x:101:"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "/var/lib/mysql: drwxr-xr-x mysql mysql"
-msgstr "/var/lib/mysql: drwxr-xr-x mysql mysql"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:3001
-msgid "Remove the databases used by all MySQL versions?"
-msgstr "Remover as bases de dados utilizadas por todas as versões de MySQL?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:3001
-msgid ""
-"The script is about to remove the data directory /var/lib/mysql. If it is "
-"planned to just install a higher MySQL version or if a different mysql-"
-"server package is already using it, the data should be kept."
-msgstr ""
-"O script está prestes a remover o directório de dados /var/lib/mysql. Se o "
-"planeado é apenas instalar uma versão superior do MySQL ou se um pacote "
-"mysql-server diferente já os estão a utilizar, os dados devem ser mantidos."
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:4001
-msgid "Should MySQL start on boot?"
-msgstr "O MySQL deve iniciar no arranque?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:4001
-msgid ""
-"The MySQL can start automatically on boot time or only if you manually type "
-"'/etc/init.d/mysql start'."
-msgstr ""
-"O MySQL pode iniciar automaticamente no arranque ou apenas se digitar '/etc/"
-"init.d/mysql start'."
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid "New password for MySQL \"root\" user:"
-msgstr "Nova password para o utilizador \"root\" do MySQL:"
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid ""
-"It is highly recommended that you set a password for the MySQL "
-"administrative \"root\" user."
-msgstr ""
-"É fortemente recomendado que defina uma password para o utilizador "
-"administrativo \"root\" do MySQL."
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid ""
-"If you do not provide a password no changes will be made to the account."
-msgstr ""
-"Se não disponibilizar uma password não serão feitas alterações nesta conta."
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid "Unable to set password for MySQL \"root\" user"
-msgstr ""
-"Não foi possível definir a password para o utilizador \"root\" do MySQL"
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid ""
-"It seems an error occurred while setting the password for the MySQL "
-"administrative user. This may have happened because the user already has a "
-"password, or because there was a problem communicating with the MySQL server."
-msgstr ""
-"Parece que ocorreu um erro enquanto era definida a password para o "
-"utilizador administrativo do MySQL. Isto pode ter acontecido porque o "
-"utilizador já tem uma password, ou porque ocorreu um problema ao comunicar "
-"com o servidor MySQL."
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid ""
-"When installation finishes, you should verify that the account is properly "
-"protected with a password (see README.Debian for more information)."
-msgstr ""
-"Quando terminar a instalação, deve verificar se a conta está devidamente "
-"protegida com uma password (para mais informações veja README.Debian)."
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:7001
-msgid "Support MySQL connections from hosts running Debian \"sarge\" or older?"
-msgstr "Suportar ligações MySQL de máquinas que corram Debian \"sarge\" ou mais antigos?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:7001
-msgid ""
-"The way passwords were stored was not very secure. This has been improved "
-"with the drawback that clients (e.g. PHP) from hosts running Debian 3.1 "
-"Sarge will not be able to connect to account which are new or whose password "
-"have been changed. See /usr/share/doc/mysql-server-5.0/README.Debian."
-msgstr ""
-"O modo como as passwords eram guardadas não era muito seguro. Isto foi "
-"melhorado com o senão que clientes (e.g. PHP) e máquinas que corram Debian "
-"3.1 Sarge não irão conseguir ligar às contas que sejam novas ou cuja "
-"password foi alterada. Veja /usr/share/doc/mysql-server-5.0/README.Debian."
-
-#~ msgid "Cannot upgrade if ISAM tables are present!"
-#~ msgstr "Não é possível actualizar se estiverem presentes tabelas ISAM!"
-
-#~ msgid ""
-#~ "Recent versions of MySQL can no longer use the old ISAM table format and "
-#~ "it is necessary to convert your tables to e.g. MyISAM before upgrading by "
-#~ "using \"mysql_convert_table_format\" or \"ALTER TABLE x ENGINE=MyISAM\". "
-#~ "The installation of mysql-server-5.0 will now abort. In case your old "
-#~ "mysql-server-4.1 gets removed nevertheless just reinstall it to convert "
-#~ "those tables."
-#~ msgstr ""
-#~ "As versões recentes de MySQL já não podem utilizar o antigo formato de "
-#~ "tabelas ISAM e é por isso necessário converter as suas tabelas pra e.g. "
-#~ "MyISAM antes da actualização, utilizando \"mysql_convert_table_format\" "
-#~ "ou \"ALTER TABLE x ENGINE=MyISAM\". A instalação de mysql-server-5.0 irá "
-#~ "agora ser cancelada. Se o seu antigo mysql-server-4.1 for removido apenas "
-#~ "reinstale para converter essas tabelas."
diff --git a/debian/po/pt_BR.po b/debian/po/pt_BR.po
deleted file mode 100644
index 51557b006e6..00000000000
--- a/debian/po/pt_BR.po
+++ /dev/null
@@ -1,339 +0,0 @@
-# Brazilian Portuguese (pt_BR) debconf template translation for
-# Debian's mysql-dfsg source package.
-# Debian-BR Project <debian-l10n-portuguese@lists.debian.org>
-# André Luís Lopes, <andrelop@debian.org> , 2004
-# André Luís Lopes, <andrelop@debian.org> , 2006
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: mysql-dfsg-5.0\n"
-"Report-Msgid-Bugs-To: ch@debian.org\n"
-"POT-Creation-Date: 2007-02-16 22:27+0100\n"
-"PO-Revision-Date: 2006-12-19 20:32-0200\n"
-"Last-Translator: André Luís Lopes <andrelop@debian.org>\n"
-"Language-Team: Debian-BR Project <debian-l10n-portuguese@lists.debian.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:1001
-msgid "Do you really want to downgrade?"
-msgstr "Você realmente quer atualizar?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:1001
-msgid ""
-"WARNING: The file /var/lib/mysql/debian-*.flag exists. This indicates that a "
-"mysql-server package with a higher version has been installed before. It can "
-"not be guaranteed that this version can use its data."
-msgstr ""
-"AVISO: O arquivo /var/lib/mysql/debian-*.flag existe. Isso indica que um "
-"pacote mysql-server com uma versão maior foi instalado antes. Não há como "
-"garantir que esta versão poderá usar seus dados."
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "Important note for NIS/YP users!"
-msgstr "Aviso importante para usuários NIS/YP!"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid ""
-"To use mysql you must install an equivalent user and group to the following "
-"and ensure yourself that /var/lib/mysql has the right permissions (the uid/"
-"gid may be different)."
-msgstr ""
-"Para utilizar o MySQL, você deve instalar um usuário e um grupo equivalentes "
-"ao usuário e grupo a seguir para se certificar de que o diretório /var/lib/"
-"mysql possua as permissões correctas (o uid/gid podem ser diferentes)."
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid ""
-"/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-msgstr ""
-"/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "/etc/group: mysql:x:101:"
-msgstr "/etc/group: mysql:x:101:"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "/var/lib/mysql: drwxr-xr-x mysql mysql"
-msgstr "/var/lib/mysql: drwxr-xr-x mysql mysql"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:3001
-msgid "Remove the databases used by all MySQL versions?"
-msgstr "Remover as bases de dados utilizadas por todas as versões do MySQL?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:3001
-msgid ""
-"The script is about to remove the data directory /var/lib/mysql. If it is "
-"planned to just install a higher MySQL version or if a different mysql-"
-"server package is already using it, the data should be kept."
-msgstr ""
-"O script está prestes a remover o diretório de dados /var/lib/mysql. Caso "
-"seja planejado somente instalar uma versão mais nova do MySQL ou caso um "
-"pacote mysql-server diferente já os esteja usando, os dados devem ser "
-"mantidos."
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:4001
-msgid "Should MySQL start on boot?"
-msgstr "O MySQL deve ser iniciado na inicialização da máquina?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:4001
-msgid ""
-"The MySQL can start automatically on boot time or only if you manually type "
-"'/etc/init.d/mysql start'."
-msgstr ""
-"O MySQL pode ser iniciado automaticamente na inicialização da máquina ou "
-"apenas caso você use o comando '/etc/init.d/mysql start' manualmente."
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid "New password for MySQL \"root\" user:"
-msgstr "Nova senha para o usuário \"root\" do MySQL:"
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid ""
-"It is highly recommended that you set a password for the MySQL "
-"administrative \"root\" user."
-msgstr ""
-"É altamente recomendado que você defina uma senha para o usuário "
-"administrativo \"root\" do MySQL."
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid ""
-"If you do not provide a password no changes will be made to the account."
-msgstr "Caso você não forneça uma senha, nenhuma mudança será feita na conta."
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid "Unable to set password for MySQL \"root\" user"
-msgstr "Impossível definir senha para o usuário \"root\" do MySQL"
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid ""
-"It seems an error occurred while setting the password for the MySQL "
-"administrative user. This may have happened because the user already has a "
-"password, or because there was a problem communicating with the MySQL server."
-msgstr ""
-"Parece que um erro cocrreu durante a definição da senha para o usuário "
-"administrativo do MySQL. Isso pode ter acontecido devido ao usuário já "
-"possuir uma senha definida ou devido a ocorrência de um problema de "
-"comunicação com o servidor MySQL."
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid ""
-"When installation finishes, you should verify that the account is properly "
-"protected with a password (see README.Debian for more information)."
-msgstr ""
-"Quando a instalação finalizar, você deverá verificar se a conta está "
-"apropriadamente protegida com uma senha (consulte o arquivo README.Debian "
-"para maiores informações)."
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:7001
-msgid "Support MySQL connections from hosts running Debian \"sarge\" or older?"
-msgstr ""
-"Suportar conexões MySQL originadas de hosts executando o Debian \"sarge\" "
-"ou mais antigos ?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:7001
-msgid ""
-"The way passwords were stored was not very secure. This has been improved "
-"with the drawback that clients (e.g. PHP) from hosts running Debian 3.1 "
-"Sarge will not be able to connect to account which are new or whose password "
-"have been changed. See /usr/share/doc/mysql-server-5.0/README.Debian."
-msgstr ""
-"A maneira com que as senhas eram armazenadas não era muito segura. Isso foi "
-"melhorado, mas com o incômodo de que clientes (por exemplo, o PHP) em hosts "
-"executando o Debian 3.1 (Sarge) não serão capazes de conectar em contas "
-"novas ou para as quais as senhas tenham sido modificadas. Consulte /usr/"
-"share/doc/mysql-server-5.0/README.Debian."
-
-#~ msgid "internal"
-#~ msgstr "interno"
-
-#~ msgid "Only internally used."
-#~ msgstr "Somente utilizado internamente."
-
-#, fuzzy
-#~ msgid "Update Hints"
-#~ msgstr "Dicas de atualização"
-
-#, fuzzy
-#~ msgid ""
-#~ "Rarely, e.g. on new major versions, the privilege system is improved. To "
-#~ "make use of it mysql_fix_privilege_tables must be executed manually. The "
-#~ "script is not supposed to give any user more rights that he had before,"
-#~ msgstr ""
-#~ "Raramente, por exemplo, em novas versões maiores, o sistema de "
-#~ "privilégios é melhorado. Para fazer uso disso, o script "
-#~ "mysql_fix_privilege_tables deve ser executado manualmente. O script não "
-#~ "atribuirá a nenhum usuário mais direitos do que os mesmos já possuíam "
-#~ "anteriormente."
-
-#~ msgid "Please also read http://www.mysql.com/doc/en/Upgrade.html"
-#~ msgstr "Por favor, leia http://www.mysql.com/doc/en/Upgrade.html"
-
-#, fuzzy
-#~ msgid "Install Hints"
-#~ msgstr "Dicas de instalação"
-
-#, fuzzy
-#~ msgid ""
-#~ "MySQL will only install if you have a non-numeric hostname that is "
-#~ "resolvable via the /etc/hosts file. E.g. if the \"hostname\" command "
-#~ "returns \"myhostname\" then there must be a line like \"10.0.0.1 "
-#~ "myhostname\"."
-#~ msgstr ""
-#~ "O MySQL será instalado somente caso você possua um nome de host NÃO "
-#~ "NUMÉRICO que possa ser resolvido através do arquivo /etc/hosts, ou seja, "
-#~ "caso o comando \"hostname\" retorne \"myhostname\", uma linha como "
-#~ "\"10.0.0.1 myhostname\" deverá existir no arquivo /etc/hosts."
-
-#~ msgid ""
-#~ "A new mysql user \"debian-sys-maint\" will be created. This mysql account "
-#~ "is used in the start/stop and cron scripts. Don't delete."
-#~ msgstr ""
-#~ "Um novo usuário MySQL de nome \"debian-sys-maint\" será criado. Essa "
-#~ "conta MySQL é utilizada pelos scripts de inicialização/parada e pelos "
-#~ "scripts cron. Não remova esse usuário."
-
-#, fuzzy
-#~ msgid ""
-#~ "Please remember to set a PASSWORD for the MySQL root user! If you use a /"
-#~ "root/.my.cnf, always write the \"user\" and the \"password\" lines in "
-#~ "there, never only the password!"
-#~ msgstr ""
-#~ "Por favor, lembre-se de definir uma SENHA para o usuário root do MySQL ! "
-#~ "Caso você utilize um arquivo /root/.my.cnf, sempre inclua as linhas \"user"
-#~ "\" e \"password\" nesse arquivo, nunca somente a senha ! Consulte o "
-#~ "arquivo /usr/share/doc/mysql-server/README.Debian para mais informações."
-
-#~ msgid "Remove all databases?"
-#~ msgstr "Remover todas as bases de dados ?"
-
-#~ msgid ""
-#~ "Should I remove all databases below /var/lib/mysql as you are purging the "
-#~ "mysql-server package?"
-#~ msgstr ""
-#~ "Todas as base de dados sob o diretório /var/lib/mysql devem ser removidas "
-#~ "quando você remover o pacote pacote mysql-server ?"
-
-#~ msgid ""
-#~ "Networking is disabled by default for security reasons. You can enable it "
-#~ "by commenting out the skip-networking option in /etc/mysql/my.cnf."
-#~ msgstr ""
-#~ "O suporte ao funcionamento em rede está desativado por padrão por "
-#~ "questões de segurança. Você poderá ativá-lo comentando a opção 'skip-"
-#~ "networking' no arquivo /etc/mysql/my.cnf."
-
-#~ msgid "security and update notice"
-#~ msgstr "aviso de segurança e actualização"
-
-#~ msgid ""
-#~ "Should I remove everything below /var/lib/mysql when you purge the mysql-"
-#~ "server package with the \"dpkg --purge mysql-server\" command (i.e. "
-#~ "remove everything including the configuration) somewhen? (default is not)"
-#~ msgstr ""
-#~ "Devo remover tudo abaixo de /var/lib/mysql quando fizer o purge do pacote "
-#~ "mysql-server com o comando \"dpkg --purge mysql-server\" (ou seja, "
-#~ "remover tudo incluíndo a configuração)? (o padrão é não remover)"
-
-#~ msgid "Make MySQL reachable via network?"
-#~ msgstr "Fazer com que o MySQL seja acessível via rede?"
-
-#~ msgid ""
-#~ "Should MySQL listen on a network reachable TCP port? This is not "
-#~ "necessary for use on a single computer and could be a security problem."
-#~ msgstr ""
-#~ "O MySQL deve aguardar ligações numa porta TCP acessível via rede? Isto "
-#~ "não é necessário para uso num único computador e pode ser um problema de "
-#~ "segurança."
-
-#~ msgid "Enable chroot mode?"
-#~ msgstr "Activar o modo chroot?"
-
-#~ msgid ""
-#~ "MySQL is able to jail itself into the /var/lib/mysql_jail directory so "
-#~ "that users cannot modify any files outside this directory. This improves "
-#~ "resistence against crackers, too, as they are not able to modify system "
-#~ "files."
-#~ msgstr ""
-#~ "O MySQL é capaz de se prender no diretório /var/lib/mysql_jail, assim os "
-#~ "utilizadores não poderão modificar ficheiros fora deste directório. Isto "
-#~ "aumenta também a resistência contra crackers, pois eles não poderão "
-#~ "modificar arquivos de sistema."
-
-#~ msgid "Please run mysql_fix_privilege_tables !"
-#~ msgstr "Por favor execute mysql_fix_privilege_tables !"
-
-#~ msgid ""
-#~ "I will ensure secure permissions of /var/lib/mysql by replacing GIDs "
-#~ "other than root and mysql with mysql."
-#~ msgstr ""
-#~ "Permissões seguras para o diretório /var/lib/mysql serão asseguradas "
-#~ "substituíndo GIDs diferentes de root e mysql por mysql."
-
-#~ msgid ""
-#~ "Instructions how to enable SSL support are in /usr/share/doc/mysql-server/"
-#~ msgstr ""
-#~ "Instruções sobre como activar o suporte de SSL estão disponíveis no "
-#~ "directório /usr/share/doc/mysql-server/."
-
-#, fuzzy
-#~ msgid "mysql_fix_privileges_tables should be executed"
-#~ msgstr "mysql_fix_privileges_tables será executado"
-
-#, fuzzy
-#~ msgid ""
-#~ "The latest MySQL versions have an enhanced, more fine grained, privilege "
-#~ "system. To make use of it, some new fields must be added to the tables "
-#~ "in the \"mysql\" database. This will not happen automatically."
-#~ msgstr ""
-#~ "As últimas versões do MySQL possuem um sistema de privilégios melhorado e "
-#~ "mais refinado. Para utilizá-lo, alguns novos campos devem ser adicionados "
-#~ "as tabelas na base de dados \"mysql\". Isto é feito pelo script "
-#~ "mysql_fix_privileges_tables durante esta actualização independente do "
-#~ "servidor estar a correr ou não !"
-
-#~ msgid ""
-#~ "This script is not supposed to give any user more rights that he had "
-#~ "before, if you encounter such a case, please contact me."
-#~ msgstr ""
-#~ "Este script não deverá fornecer mais direitos a um utilizador além dos "
-#~ "quais ele já possua anteriormente. SE encontrar um caso desses, por favor "
-#~ "entre em contacto com o mantainer deste pacote Debian."
diff --git a/debian/po/ro.po b/debian/po/ro.po
deleted file mode 100644
index f344ab5eca0..00000000000
--- a/debian/po/ro.po
+++ /dev/null
@@ -1,193 +0,0 @@
-# Romanian translation of mysql-dfsg.
-# Copyright (C) 2006 THE mysql-dfsg'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the mysql-dfsg package.
-#
-# Stan Ioan-Eugen <stan.ieugen@gmail.com>, 2006.
-msgid ""
-msgstr ""
-"Project-Id-Version: po-debconf://mysql-dfsg\n"
-"Report-Msgid-Bugs-To: ch@debian.org\n"
-"POT-Creation-Date: 2007-02-16 22:27+0100\n"
-"PO-Revision-Date: 2006-12-20 21:27+0200\n"
-"Last-Translator: stan ioan-eugen <stan.ieugen@gmail.com>\n"
-"Language-Team: romanian <debian-l10n-romanian@lists.debian.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: KBabel 1.11.4\n"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:1001
-msgid "Do you really want to downgrade?"
-msgstr "Sunteţi sigur că doriţi să instalaţi o versiune mai veche?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:1001
-msgid ""
-"WARNING: The file /var/lib/mysql/debian-*.flag exists. This indicates that a "
-"mysql-server package with a higher version has been installed before. It can "
-"not be guaranteed that this version can use its data."
-msgstr ""
-"AVERTISMENT: Fişierul /var/lib/mysql/debian-*.flag există. Acest lucru "
-"indică faptul că anterior a fost instalată o versiune nouă a pachetului "
-"mysql-server. Nu se poate garanta că versiunea instalată acum poate folosi "
-"datele versiunii instalate anterior."
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "Important note for NIS/YP users!"
-msgstr "Notă importantă pentru utilizatorii NIS/YP!"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid ""
-"To use mysql you must install an equivalent user and group to the following "
-"and ensure yourself that /var/lib/mysql has the right permissions (the uid/"
-"gid may be different)."
-msgstr ""
-"Pentru a folosi mysql trebuie să adăugaţi un utilizator şi grup echivalent "
-"şi să vă asiguraţi că /var/lib/mysql are permisiunile stabilite corect (uid/"
-"gid pot aveavalori diferite)."
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid ""
-"/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-msgstr "/etc/passwd:\tmysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "/etc/group: mysql:x:101:"
-msgstr "/etc/group:\tmysql:x:101:"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "/var/lib/mysql: drwxr-xr-x mysql mysql"
-msgstr "/var/lib/mysql:\tdrwxr-xr-x\tmysql\tmysql"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:3001
-msgid "Remove the databases used by all MySQL versions?"
-msgstr "Doriţi să ştergeţi bazele de date folosite de toate versiune MySQL?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:3001
-msgid ""
-"The script is about to remove the data directory /var/lib/mysql. If it is "
-"planned to just install a higher MySQL version or if a different mysql-"
-"server package is already using it, the data should be kept."
-msgstr ""
-"Scriptul urmează să şteargă directorul de date /var/lib/mysql. Dacă plănuiţi "
-"doar să instalaţi o versiune nouă MySQL sau datele sunt folosite de către un "
-"alt pachet mysql-server, atunci ar trebui păstraţi datele."
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:4001
-msgid "Should MySQL start on boot?"
-msgstr "Doriţi ca MySQL să pornească la initializarea sistemului?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:4001
-msgid ""
-"The MySQL can start automatically on boot time or only if you manually type "
-"'/etc/init.d/mysql start'."
-msgstr ""
-"MySQL poate porni automat la iniţializarea sistemului sau doar dacă rulaţi "
-"comanda „/etc/init.d/mysql startâ€."
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid "New password for MySQL \"root\" user:"
-msgstr "Noua parolă pentru utilizatorul „root†al MySQL:"
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid ""
-"It is highly recommended that you set a password for the MySQL "
-"administrative \"root\" user."
-msgstr "Este recomandat să stabiliţi o parolă pentru utilizatorul administrativ „root†al MySQL."
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid ""
-"If you do not provide a password no changes will be made to the account."
-msgstr "Dacă nu introduceţi nici o parolă, nici o schimbare nu va fi luată în considerare."
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid "Unable to set password for MySQL \"root\" user"
-msgstr "Nu s-a putut stabili parola pentru utilizatorul „root†al MySQL"
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid ""
-"It seems an error occurred while setting the password for the MySQL "
-"administrative user. This may have happened because the user already has a "
-"password, or because there was a problem communicating with the MySQL server."
-msgstr "Se pare că a intervenit o eroare în stabilirea parolei pentru utilizatorul administrativ "
-"al MySQL. Acest lucru se poate întâmpla dacă utilizatorul are deja o parolă, sau a existat o "
-"problemă în comunicarea cu serverul MySQL."
-
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid ""
-"When installation finishes, you should verify that the account is properly "
-"protected with a password (see README.Debian for more information)."
-msgstr "După finalizarea instalării, ar trebui să verificaţi dacă contul este protejat"
-" cu o parolă (citiţi fişierul README.Debian pentru informaţii suplimentare)."
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:7001
-msgid "Support MySQL connections from hosts running Debian \"sarge\" or older?"
-msgstr "Suportaţi conexiuni MySQL de la staţii ce rulează sistemul Debian „sarge†sau mai vechi?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:7001
-msgid ""
-"The way passwords were stored was not very secure. This has been improved "
-"with the drawback that clients (e.g. PHP) from hosts running Debian 3.1 "
-"Sarge will not be able to connect to account which are new or whose password "
-"have been changed. See /usr/share/doc/mysql-server-5.0/README.Debian."
-msgstr "Modul în care erau păstrate parolele nu era foarte sigur. Acest lucru a fost îmbunătăţit"
-"cu dezajantajul că clienţii (de ex. PHP) de pe staţii ce rulează sistemul Debian 3.1 Sarge"
-"nu se vor putea conecta la conturi noi sau ale căror parole au fost schimbate. Citiţi "
-"/usr/share/doc/mysql-server-5.0/README.Debian."
-
-#~ msgid "Cannot upgrade if ISAM tables are present!"
-#~ msgstr "Nu se poate face actualizarea dacă sunt prezente tabele ISAM!"
-
-#~ msgid ""
-#~ "Recent versions of MySQL can no longer use the old ISAM table format and "
-#~ "it is necessary to convert your tables to e.g. MyISAM before upgrading by "
-#~ "using \"mysql_convert_table_format\" or \"ALTER TABLE x ENGINE=MyISAM\". "
-#~ "The installation of mysql-server-5.0 will now abort. In case your old "
-#~ "mysql-server-4.1 gets removed nevertheless just reinstall it to convert "
-#~ "those tables."
-#~ msgstr ""
-#~ "Versiunile recente MySQL nu mai pot folosi vechiul format de tabele ISAM "
-#~ "şieste necesar să convertiţi tabelele dumneavoastră de ex. la formatul "
-#~ "MyISAM înainte de a face actualizarea folosind comanda "
-#~ "„mysql_convert_table_format†sau „ALTER TABLE x ENGINE=MyISAMâ€. "
-#~ "Instalarea mysql-server-5.0 va eşua. În caz că ştergeţiversiunea "
-#~ "anterioară mysql-server-4.1 va trebui reinstalată pentru a converti "
-#~ "tabelele."
diff --git a/debian/po/ru.po b/debian/po/ru.po
deleted file mode 100644
index 1ab02e4437c..00000000000
--- a/debian/po/ru.po
+++ /dev/null
@@ -1,172 +0,0 @@
-# translation of mysql-dfsg-5.0_5.0.32-6_ru.po to Russian
-# Russian messages:
-# Translators, if you are not familiar with the PO format, gettext
-# documentation is worth reading, especially sections dedicated to
-# this format, e.g. by running:
-# info -n '(gettext)PO Files'
-# info -n '(gettext)Header Entry'#
-# Some information specific to po-debconf are available at
-# /usr/share/doc/po-debconf/README-trans
-# or http://www.debian.org/intl/l10n/po-debconf/README-trans#
-# Developers do not need to manually edit POT or PO files.
-# Ilgiz Kalmetev <translator@ilgiz.pp.ru>, 2003.
-# Yuriy Talakan' <yt@amur.elektra.ru>, 2005, 2006.
-# Yuriy Talakan' <yt@drsk.ru>, 2007.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: mysql-dfsg-5.0_5.0.32-6_ru\n"
-"Report-Msgid-Bugs-To: ch@debian.org\n"
-"POT-Creation-Date: 2007-02-16 22:27+0100\n"
-"PO-Revision-Date: 2007-02-19 11:28+0900\n"
-"Last-Translator: Yuriy Talakan' <yt@drsk.ru>\n"
-"Language-Team: Russian <debian-l10n-russian@lists.debian.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: KBabel 1.9.1\n"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:1001
-msgid "Do you really want to downgrade?"
-msgstr "Ð’Ñ‹ дейÑтвительно желаете понизить верÑию?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:1001
-msgid ""
-"WARNING: The file /var/lib/mysql/debian-*.flag exists. This indicates that a "
-"mysql-server package with a higher version has been installed before. It can "
-"not be guaranteed that this version can use its data."
-msgstr ""
-"Ð’ÐИМÐÐИЕ: Ðайден файл /var/lib/mysql/debian-*.flag. Это означает, что ранее "
-"был уÑтановлен пакет mysql-server более выÑокой верÑии. Ðевозможно "
-"гарантировать, что Ñ‚ÐµÐºÑƒÑ‰Ð°Ñ Ð²ÐµÑ€ÑÐ¸Ñ Ñможет иÑпользовать его данные."
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "Important note for NIS/YP users!"
-msgstr "Важное замечание Ð´Ð»Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»ÐµÐ¹ NIS/YP!"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid ""
-"To use mysql you must install an equivalent user and group to the following "
-"and ensure yourself that /var/lib/mysql has the right permissions (the uid/"
-"gid may be different)."
-msgstr ""
-"Чтобы иÑпользовать mysql, Ð’Ñ‹ должны уÑтановить Ñквивалентные Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ Ð¸ "
-"группу, как указано ниже и убедитьÑÑ, что /var/lib/mysql имеет правильные "
-"права (uid/gid могут отличатьÑÑ)."
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-msgstr "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "/etc/group: mysql:x:101:"
-msgstr "/etc/group: mysql:x:101:"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "/var/lib/mysql: drwxr-xr-x mysql mysql"
-msgstr "/var/lib/mysql: drwxr-xr-x mysql mysql"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:3001
-msgid "Remove the databases used by all MySQL versions?"
-msgstr "Удалить базы данных, иÑпользуемые вÑеми верÑиÑми MySQL?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:3001
-msgid ""
-"The script is about to remove the data directory /var/lib/mysql. If it is "
-"planned to just install a higher MySQL version or if a different mysql-"
-"server package is already using it, the data should be kept."
-msgstr "Сценарий ÑобираетÑÑ ÑƒÐ´Ð°Ð»Ð¸Ñ‚ÑŒ директорию данных /var/lib/mysql. ЕÑли планируетÑÑ ÑƒÑтановить новую верÑию MySQL или еÑÑ‚ÑŒ другие пакеты mysql-server, иÑпользующие Ñту директорию, то данные надо Ñохранить."
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:4001
-msgid "Should MySQL start on boot?"
-msgstr "ЗапуÑкать MySQL при загрузке ÑиÑтемы?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:4001
-msgid ""
-"The MySQL can start automatically on boot time or only if you manually type "
-"'/etc/init.d/mysql start'."
-msgstr ""
-"MySQL может запуÑкатьÑÑ Ð¿Ñ€Ð¸ загрузке ÑиÑтемы, либо только еÑли вы вручную "
-"введете команду '/etc/init.d/mysql start'. "
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid "New password for MySQL \"root\" user:"
-msgstr "Ðовый пароль Ð´Ð»Ñ MySQL Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ \"root\":"
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid ""
-"It is highly recommended that you set a password for the MySQL "
-"administrative \"root\" user."
-msgstr "Крайне рекомендуетÑÑ ÑƒÑтановить пароль Ð´Ð»Ñ Ð°Ð´Ð¼Ð¸Ð½Ð¸Ñтративного MySQL Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ \"root\"."
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid "If you do not provide a password no changes will be made to the account."
-msgstr "ЕÑли вы не зададите пароль, то ÑƒÑ‡ÐµÑ‚Ð½Ð°Ñ Ð·Ð°Ð¿Ð¸ÑÑŒ не будет изменена."
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid "Unable to set password for MySQL \"root\" user"
-msgstr "Ðевозможно задать пароль MySQL пользователю \"root\""
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid ""
-"It seems an error occurred while setting the password for the MySQL "
-"administrative user. This may have happened because the user already has a "
-"password, or because there was a problem communicating with the MySQL server."
-msgstr "Ð’ процеÑÑе Ð·Ð°Ð´Ð°Ð½Ð¸Ñ Ð¿Ð°Ñ€Ð¾Ð»Ñ Ð°Ð´Ð¼Ð¸Ð½Ð¸Ñтративного MySQL Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ Ð¿Ñ€Ð¾Ð¸Ð·Ð¾ÑˆÐ»Ð° ошибка. Это могло произойти еÑли у Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ ÑƒÐ¶Ðµ был задан пароль, или из-за проблем ÑÐ¾ÐµÐ´Ð¸Ð½ÐµÐ½Ð¸Ñ Ñ Ñервером MySQL."
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid ""
-"When installation finishes, you should verify that the account is properly "
-"protected with a password (see README.Debian for more information)."
-msgstr "Когда уÑтановка завершитÑÑ, вы должны убедитьÑÑ, что ÑƒÑ‡ÐµÑ‚Ð½Ð°Ñ Ð·Ð°Ð¿Ð¸ÑÑŒ защищена паролем (подробную информацию Ñм. в README.Debian)."
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:7001
-msgid "Support MySQL connections from hosts running Debian \"sarge\" or older?"
-msgstr "Ðужна поддержка подключений к MySQL Ñ Ð¼Ð°ÑˆÐ¸Ð½, работающих под Debian \"sarge\" или Ñтарше?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:7001
-msgid ""
-"The way passwords were stored was not very secure. This has been improved "
-"with the drawback that clients (e.g. PHP) from hosts running Debian 3.1 "
-"Sarge will not be able to connect to account which are new or whose password "
-"have been changed. See /usr/share/doc/mysql-server-5.0/README.Debian."
-msgstr "Метод Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð¿Ð°Ñ€Ð¾Ð»Ñ Ð±Ñ‹Ð» не очень безопаÑен. Это было Ñделано из-за того, клиенты (например, PHP) Ñ Ð¼Ð°ÑˆÐ¸Ð½, работающих под Debian 3.1 Sarge не Ñмогут подключитьÑÑ Ðº учетной запиÑи еÑли она новаÑ, или пароль был изменен. См. /usr/share/doc/mysql-server-5.0/README.Debian."
-
diff --git a/debian/po/sv.po b/debian/po/sv.po
deleted file mode 100644
index 54ef9246236..00000000000
--- a/debian/po/sv.po
+++ /dev/null
@@ -1,225 +0,0 @@
-# Translators, if you are not familiar with the PO format, gettext
-# documentation is worth reading, especially sections dedicated to
-# this format, e.g. by running:
-# info -n '(gettext)PO Files'
-# info -n '(gettext)Header Entry'
-# Some information specific to po-debconf are available at
-# /usr/share/doc/po-debconf/README-trans
-# or http://www.debian.org/intl/l10n/po-debconf/README-trans
-# Developers do not need to manually edit POT or PO files.
-# , fuzzy
-#
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: mysql-dfsg-5.0 5.0.21-3\n"
-"Report-Msgid-Bugs-To: ch@debian.org\n"
-"POT-Creation-Date: 2007-02-16 22:27+0100\n"
-"PO-Revision-Date: 2007-02-18 14:48+0100\n"
-"Last-Translator: Andreas Henriksson <andreas@fatal.se>\n"
-"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Poedit-Language: Swedish\n"
-"X-Poedit-Country: SWEDEN\n"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:1001
-msgid "Do you really want to downgrade?"
-msgstr "Vill du verkligen nedgradera?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:1001
-msgid "WARNING: The file /var/lib/mysql/debian-*.flag exists. This indicates that a mysql-server package with a higher version has been installed before. It can not be guaranteed that this version can use its data."
-msgstr "VARNING: Filen /var/lib/mysql/debian-*.flag existerar. Detta betyder att paketet mysql-server med högre versionsnummer har installerats tidigare. Det kan inte garanteras att denna version kan använda dess data."
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "Important note for NIS/YP users!"
-msgstr "Viktig notering för NIS/YP-användare!"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "To use mysql you must install an equivalent user and group to the following and ensure yourself that /var/lib/mysql has the right permissions (the uid/gid may be different)."
-msgstr "För att använda MySQL måste du installera en motsvarande användare och grupp till följande och se till att /var/lib/mysql har korrekta rättigheter satta (uid/gid kan vara olika)."
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-msgstr "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "/etc/group: mysql:x:101:"
-msgstr "/etc/group: mysql:x:101:"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "/var/lib/mysql: drwxr-xr-x mysql mysql"
-msgstr "/var/lib/mysql: drwxr-xr-x mysql mysql"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:3001
-msgid "Remove the databases used by all MySQL versions?"
-msgstr "Ta bort databaserna som används av alla MySQL-versioner?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:3001
-msgid "The script is about to remove the data directory /var/lib/mysql. If it is planned to just install a higher MySQL version or if a different mysql-server package is already using it, the data should be kept."
-msgstr "Scriptet kommer strax ta bort data-katalogen /var/lib/mysql. Om det planerade var att bara installera en högre MySQL-version eller om ett annan mysql-server paket redan använde det, skall datan sparas."
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:4001
-msgid "Should MySQL start on boot?"
-msgstr "Ska MySQL startas när systemet startar upp?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:4001
-msgid "The MySQL can start automatically on boot time or only if you manually type '/etc/init.d/mysql start'."
-msgstr "MySQL kan startas när systemet startas upp eller endast om du manuellt skriver '/etc/init.d/mysql start'."
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid "New password for MySQL \"root\" user:"
-msgstr "Nytt lösenord för MySQLs \"root\"-användare:"
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid "It is highly recommended that you set a password for the MySQL administrative \"root\" user."
-msgstr "Det är starkt rekommenderat att du sätter ett lösenord för MySQLs administrativa \"root\"-användare."
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid "If you do not provide a password no changes will be made to the account."
-msgstr "Om du inte anger ett lösenord kommer inga ändringar att göras för kontot."
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid "Unable to set password for MySQL \"root\" user"
-msgstr "Lyckades inte sätta lösenord för MySQLs \"root\"-användare"
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid "It seems an error occurred while setting the password for the MySQL administrative user. This may have happened because the user already has a password, or because there was a problem communicating with the MySQL server."
-msgstr "Det verkar som ett fel uppstod när det skulle sättas ett lösenord för MySQLs administrativa användare. Detta kan ha skett för att användaren redan har ett lösenord satt, eller på grund av problem med att kommunicera med MySQL-servern."
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid "When installation finishes, you should verify that the account is properly protected with a password (see README.Debian for more information)."
-msgstr "När installationen är klar, bör du kontrollera så att kontot är riktigt skyddat av ett lösenord (läs README.Debian för mer information)."
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:7001
-msgid "Support MySQL connections from hosts running Debian \"sarge\" or older?"
-msgstr "Behöver du MySQL-anslutningar från system som kör Debian \"Sarge\" eller äldre?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:7001
-msgid "The way passwords were stored was not very secure. This has been improved with the drawback that clients (e.g. PHP) from hosts running Debian 3.1 Sarge will not be able to connect to account which are new or whose password have been changed. See /usr/share/doc/mysql-server-5.0/README.Debian."
-msgstr "Sättet som lösenorden lagrades på var inte särskilt säkert. Detta har förbättrats på bekostnad av att klienter (t.ex. PHP) från system som kör Debian 3.1 Sarge inte kan ansluta till konton som är nya eller vars lösenord har ändrats. Se /usr/share/doc/mysql-server-5.0/README.Debian."
-
-#~ msgid "Cannot upgrade if ISAM tables are present!"
-#~ msgstr "Kan inte uppgradera om ISAM-tabeller finns!"
-#~ msgid ""
-#~ "Recent versions of MySQL can no longer use the old ISAM table format and "
-#~ "it is necessary to convert your tables to e.g. MyISAM before upgrading by "
-#~ "using \"mysql_convert_table_format\" or \"ALTER TABLE x ENGINE=MyISAM\". "
-#~ "The installation of mysql-server-5.0 will now abort. In case your old "
-#~ "mysql-server-4.1 gets removed nevertheless just reinstall it to convert "
-#~ "those tables."
-#~ msgstr ""
-#~ "Senaste versionerna av MySQL kan inte längre använda gamla ISAM-"
-#~ "tabellformatet och det är nödvändigt att konvertera dina tabeller till "
-#~ "exempelvis MyISAM före uppgradering med \"mysql_convert_table_format\" "
-#~ "eller \"ALTER TABLE x ENGINE=MyISAM\". Installationen av mysql-server-5.0 "
-#~ "kommer nu att avbrytas. Om ditt gamla mysql-server-4.1-paket tas bort är "
-#~ "det bara att installera om det för att konvertera de tabellerna."
-#~ msgid "Update Hints"
-#~ msgstr "Uppdateringstips"
-#~ msgid ""
-#~ "You have to run \"mysql_upgrade\" after the upgrade, else tables can be "
-#~ "corrupted! This script also enhances the privilege tables but is not "
-#~ "supposed to give any user more rights that he had before,"
-#~ msgstr ""
-#~ "Du måste köra \"mysql_upgrade\" efter uppgraderingen, annars kan "
-#~ "tabellerna vara skadade! Detta skript utökar även privilegietabellerna "
-#~ "men är inte tänkte att ge någon användare mer befogenhet än vad han hade "
-#~ "tidigare,"
-#~ msgid "Please also read http://www.mysql.com/doc/en/Upgrade.html"
-#~ msgstr "Läs även http://www.mysql.com/doc/en/Upgrade.html"
-#~ msgid "Install Hints"
-#~ msgstr "Installationstips"
-#~ msgid ""
-#~ "On upgrades from MySQL 3.23, as shipped with Debian Woody, symlinks in "
-#~ "place of /var/lib/mysql or /var/log/mysql gets accidently removed and "
-#~ "have manually be restored."
-#~ msgstr ""
-#~ "Vid uppgraderingar från MySQL 3.23 som skickades med Debian Woody har "
-#~ "symboliska länkar i /var/lib/mysql eller /var/log/mysql av misstag tagits "
-#~ "bort och måste manuellt återskapas."
-#~ msgid ""
-#~ "MySQL will only install if you have a non-numeric hostname that is "
-#~ "resolvable via the /etc/hosts file. E.g. if the \"hostname\" command "
-#~ "returns \"myhostname\" then there must be a line like \"10.0.0.1 "
-#~ "myhostname\"."
-#~ msgstr ""
-#~ "MySQL kan endast installeras om du har ett icke-numeriskt värdnamn som "
-#~ "kan slås upp via filen /etc/hosts. Exempelvis om kommandot \"hostname\" "
-#~ "returnerar \"mittnamn\" så bör det finnas en rad som liknar \"10.0.0.1 "
-#~ "mittnamn\"."
-#~ msgid ""
-#~ "A new mysql user \"debian-sys-maint\" will be created. This mysql account "
-#~ "is used in the start/stop and cron scripts. Don't delete."
-#~ msgstr ""
-#~ "En ny MySQL-användare kallad \"debian-sys-maint\" kommer att skapas. "
-#~ "Detta MySQL-konto används för start/stopp och cron-skript. Ta inte bort "
-#~ "det."
-#~ msgid ""
-#~ "Please remember to set a PASSWORD for the MySQL root user! If you use a /"
-#~ "root/.my.cnf, always write the \"user\" and the \"password\" lines in "
-#~ "there, never only the password!"
-#~ msgstr ""
-#~ "Tänk på att sätta ett LÖSENORD för MySQL:s root-användare! Om du "
-#~ "använder /root/.my.cnf, skriv då alltid en \"user\"-rad och en \"password"
-#~ "\"-rad i den, aldrig med endast lösenordet!"
-#~ msgid ""
-#~ "See /usr/share/doc/mysql-server-5.0/README.Debian for more information."
-#~ msgstr ""
-#~ "Se /usr/share/doc/mysql-server-5.0/README.Debian för mer information."
-#~ msgid ""
-#~ "Should I remove the complete /var/lib/mysql directory tree which is used "
-#~ "by all MySQL versions, not necessarily only the one you are about to "
-#~ "purge?"
-#~ msgstr ""
-#~ "Ska jag ta bort hela katalogträdet i /var/lib/mysql som används av alla "
-#~ "MySQL-versioner och inte bara för den som du nu kommer att rensa ut?"
-#~ msgid ""
-#~ "Rarely, e.g. on new major versions, the privilege system is improved. To "
-#~ "make use of it mysql_fix_privilege_tables must be executed manually. The "
-#~ "script is not supposed to give any user more rights that he had before,"
-#~ msgstr ""
-#~ "Sällan, exempelvis i nya större versioner, har behörighetssystemet "
-#~ "förbättrats. För att använda det måste skriptet "
-#~ "mysql_fix_privilege_tables köras manuellt. Skriptet är inte tänkt att ge "
-#~ "någon användare högre behörighet än han hade tidigare."
-
diff --git a/debian/po/templates.pot b/debian/po/templates.pot
deleted file mode 100644
index e4ec4e95ca5..00000000000
--- a/debian/po/templates.pot
+++ /dev/null
@@ -1,155 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"Report-Msgid-Bugs-To: ch@debian.org\n"
-"POT-Creation-Date: 2007-02-16 22:27+0100\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=CHARSET\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:1001
-msgid "Do you really want to downgrade?"
-msgstr ""
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:1001
-msgid ""
-"WARNING: The file /var/lib/mysql/debian-*.flag exists. This indicates that a "
-"mysql-server package with a higher version has been installed before. It can "
-"not be guaranteed that this version can use its data."
-msgstr ""
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "Important note for NIS/YP users!"
-msgstr ""
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid ""
-"To use mysql you must install an equivalent user and group to the following "
-"and ensure yourself that /var/lib/mysql has the right permissions (the uid/"
-"gid may be different)."
-msgstr ""
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid ""
-"/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-msgstr ""
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "/etc/group: mysql:x:101:"
-msgstr ""
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "/var/lib/mysql: drwxr-xr-x mysql mysql"
-msgstr ""
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:3001
-msgid "Remove the databases used by all MySQL versions?"
-msgstr ""
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:3001
-msgid ""
-"The script is about to remove the data directory /var/lib/mysql. If it is "
-"planned to just install a higher MySQL version or if a different mysql-"
-"server package is already using it, the data should be kept."
-msgstr ""
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:4001
-msgid "Should MySQL start on boot?"
-msgstr ""
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:4001
-msgid ""
-"The MySQL can start automatically on boot time or only if you manually type "
-"'/etc/init.d/mysql start'."
-msgstr ""
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid "New password for MySQL \"root\" user:"
-msgstr ""
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid ""
-"It is highly recommended that you set a password for the MySQL "
-"administrative \"root\" user."
-msgstr ""
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid ""
-"If you do not provide a password no changes will be made to the account."
-msgstr ""
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid "Unable to set password for MySQL \"root\" user"
-msgstr ""
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid ""
-"It seems an error occurred while setting the password for the MySQL "
-"administrative user. This may have happened because the user already has a "
-"password, or because there was a problem communicating with the MySQL server."
-msgstr ""
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid ""
-"When installation finishes, you should verify that the account is properly "
-"protected with a password (see README.Debian for more information)."
-msgstr ""
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:7001
-msgid "Support MySQL connections from hosts running Debian \"sarge\" or older?"
-msgstr ""
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:7001
-msgid ""
-"The way passwords were stored was not very secure. This has been improved "
-"with the drawback that clients (e.g. PHP) from hosts running Debian 3.1 "
-"Sarge will not be able to connect to account which are new or whose password "
-"have been changed. See /usr/share/doc/mysql-server-5.0/README.Debian."
-msgstr ""
diff --git a/debian/po/tr.po b/debian/po/tr.po
deleted file mode 100644
index 20b4df45b6e..00000000000
--- a/debian/po/tr.po
+++ /dev/null
@@ -1,290 +0,0 @@
-# Turkish translation of mysql-server.
-# This file is distributed under the same license as the mysql-server package.
-# Gürkan Aslan <gurkan@iaslan.com>, 2004
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: mysql-dfsg-4.1\n"
-"Report-Msgid-Bugs-To: ch@debian.org\n"
-"POT-Creation-Date: 2007-02-16 22:27+0100\n"
-"PO-Revision-Date: 2004-06-05 08:53+0300\n"
-"Last-Translator: Gürkan Aslan <gurkan@iaslan.com>\n"
-"Language-Team: Turkish <debian-l10n-turkish@lists.debian.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=1; plural=0;\n"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:1001
-msgid "Do you really want to downgrade?"
-msgstr ""
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:1001
-msgid ""
-"WARNING: The file /var/lib/mysql/debian-*.flag exists. This indicates that a "
-"mysql-server package with a higher version has been installed before. It can "
-"not be guaranteed that this version can use its data."
-msgstr ""
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "Important note for NIS/YP users!"
-msgstr "NIS/YP kullanıcıları için önemli not!"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid ""
-"To use mysql you must install an equivalent user and group to the following "
-"and ensure yourself that /var/lib/mysql has the right permissions (the uid/"
-"gid may be different)."
-msgstr ""
-"Mysql'i kullanmak için aşağıdakiyle eşdeğer bir kullanıcı ve grup "
-"tanımlamalı, ve /var/lib/mysql izinlerinin uygun şekilde ayarlandığından "
-"emin olmalısınız (uid/gid farklı olabilir)."
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid ""
-"/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-msgstr ""
-"/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "/etc/group: mysql:x:101:"
-msgstr "/etc/group: mysql:x:101:"
-
-#. Type: note
-#. Description
-#: ../mysql-server-5.0.templates:2001
-msgid "/var/lib/mysql: drwxr-xr-x mysql mysql"
-msgstr "/var/lib/mysql: drwxr-xr-x mysql mysql"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:3001
-msgid "Remove the databases used by all MySQL versions?"
-msgstr ""
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:3001
-msgid ""
-"The script is about to remove the data directory /var/lib/mysql. If it is "
-"planned to just install a higher MySQL version or if a different mysql-"
-"server package is already using it, the data should be kept."
-msgstr ""
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:4001
-msgid "Should MySQL start on boot?"
-msgstr "MySQL açılış sırasında başlatılsın mı?"
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:4001
-#, fuzzy
-msgid ""
-"The MySQL can start automatically on boot time or only if you manually type "
-"'/etc/init.d/mysql start'."
-msgstr ""
-"MySQL açılış sırasında veya '/etc/init.d/mysql start' komutunu vermeniz "
-"halinde elle başlatılabilir. Eğer açılışta otomatik olarak başlatılmasını "
-"istiyorsanız burada 'evet'i seçin."
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid "New password for MySQL \"root\" user:"
-msgstr ""
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid ""
-"It is highly recommended that you set a password for the MySQL "
-"administrative \"root\" user."
-msgstr ""
-
-#. Type: password
-#. Description
-#: ../mysql-server-5.0.templates:5001
-msgid ""
-"If you do not provide a password no changes will be made to the account."
-msgstr ""
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid "Unable to set password for MySQL \"root\" user"
-msgstr ""
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid ""
-"It seems an error occurred while setting the password for the MySQL "
-"administrative user. This may have happened because the user already has a "
-"password, or because there was a problem communicating with the MySQL server."
-msgstr ""
-
-#. Type: error
-#. Description
-#: ../mysql-server-5.0.templates:6001
-msgid ""
-"When installation finishes, you should verify that the account is properly "
-"protected with a password (see README.Debian for more information)."
-msgstr ""
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:7001
-msgid "Support MySQL connections from hosts running Debian \"sarge\" or older?"
-msgstr ""
-
-#. Type: boolean
-#. Description
-#: ../mysql-server-5.0.templates:7001
-msgid ""
-"The way passwords were stored was not very secure. This has been improved "
-"with the drawback that clients (e.g. PHP) from hosts running Debian 3.1 "
-"Sarge will not be able to connect to account which are new or whose password "
-"have been changed. See /usr/share/doc/mysql-server-5.0/README.Debian."
-msgstr ""
-
-#, fuzzy
-#~ msgid "Please also read http://www.mysql.com/doc/en/Upgrade.html"
-#~ msgstr "Lütfen http://www.mysql.com/doc/en/Upgrade.html belgesini okuyun"
-
-#, fuzzy
-#~ msgid ""
-#~ "MySQL will only install if you have a non-numeric hostname that is "
-#~ "resolvable via the /etc/hosts file. E.g. if the \"hostname\" command "
-#~ "returns \"myhostname\" then there must be a line like \"10.0.0.1 "
-#~ "myhostname\"."
-#~ msgstr ""
-#~ "MySQL sadece /etc/hosts dosyası yoluyla çözülebilir NUMERİK OLMAYAN bir "
-#~ "makine adına sahipseniz kurulacaktır. Örneğin, eğer \"hostname\" komutu "
-#~ "\"makinem\" ismini döndürüyorsa, bu dosya içinde \"10.0.0.1 makinem\" "
-#~ "gibi bir satır olmalıdır."
-
-#, fuzzy
-#~ msgid ""
-#~ "A new mysql user \"debian-sys-maint\" will be created. This mysql account "
-#~ "is used in the start/stop and cron scripts. Don't delete."
-#~ msgstr ""
-#~ "Yeni mysql kullanıcısı \"debian-sys-maint\" yaratılacak. Bu hesap, "
-#~ "başlangıç betiklerinde ve cron içinde kullanılıyor. Bu hesabı silmeyin."
-
-#, fuzzy
-#~ msgid ""
-#~ "Please remember to set a PASSWORD for the MySQL root user! If you use a /"
-#~ "root/.my.cnf, always write the \"user\" and the \"password\" lines in "
-#~ "there, never only the password!"
-#~ msgstr ""
-#~ "Lütfen MySQL root kullanıcısı için bir PAROLA girmeyi unutmayın! Eğer /"
-#~ "root/.my.cnf kullanıyorsanız, \"user\" ve \"password\" satırlarını her "
-#~ "zaman buraya ekleyin, sadece parolayı değil! Daha fazla bilgi için /usr/"
-#~ "share/doc/mysql-server/README.Debian dosyasını okuyun."
-
-#, fuzzy
-#~ msgid ""
-#~ "Should I remove all databases below /var/lib/mysql as you are purging the "
-#~ "mysql-server package?"
-#~ msgstr ""
-#~ "mysql-server paketi kaldırıldıktan sonra bütün veritabanları silinsin mi?"
-
-#~ msgid ""
-#~ "Networking is disabled by default for security reasons. You can enable it "
-#~ "by commenting out the skip-networking option in /etc/mysql/my.cnf."
-#~ msgstr ""
-#~ "Ağ, öntanımlı olarak güvenlik gerekçeleriyle devre dışı bırakıldı. Bu "
-#~ "özelliği /etc/mysql/my.cnf dosyası içindeki \"skip-networking\" "
-#~ "seçeneğini kaldırarak etkinleştirebilirsiniz."
-
-#~ msgid "security and update notice"
-#~ msgstr "güvenlik ve güncelleme duyurusu"
-
-#~ msgid ""
-#~ "Should I remove everything below /var/lib/mysql when you purge the mysql-"
-#~ "server package with the \"dpkg --purge mysql-server\" command (i.e. "
-#~ "remove everything including the configuration) somewhen? (default is not)"
-#~ msgstr ""
-#~ "mysql-server paketini temizlemek için \"dpkg --purge mysql-server\" "
-#~ "komutunu kullandığınızda (yani yapılandırma dahil herşeyi silmek) /var/"
-#~ "lib/mysql altındaki herşeyi sileyim mi? (öntanımlı cevap hayır'dır)."
-
-#~ msgid "Please run mysql_fix_privilege_tables !"
-#~ msgstr "Lütfen mysql_fix_privilege_tables komutunu çalıştırın!"
-
-#~ msgid ""
-#~ "I will ensure secure permissions of /var/lib/mysql by replacing GIDs "
-#~ "other than root and mysql with mysql."
-#~ msgstr ""
-#~ "/var/lib/mysql'in izinlerinin güvenli olmasını sağlamak amacıyla, buna "
-#~ "ait GID'leri root ve mysql'den farklı olacak şekilde değiştireceğim."
-
-#~ msgid ""
-#~ "Instructions how to enable SSL support are in /usr/share/doc/mysql-server/"
-#~ msgstr ""
-#~ "SSL desteğini nasıl etkinleştirebileceğinize ilişkin talimatlar /usr/"
-#~ "share/doc/mysql-server/ içinde."
-
-#~ msgid "mysql_fix_privileges_tables will be executed"
-#~ msgstr "mysql_fix_privileges_tables çalıştırılacak"
-
-#~ msgid ""
-#~ "The latest MySQL versions have an enhanced, more fine grained, privilege "
-#~ "system. To make use of it, some new fields must be added to the tables "
-#~ "in the \"mysql\" database. This is done by the "
-#~ "mysql_fix_privilege_tables script during this upgrade regardless of if "
-#~ "the server is currently running or not!"
-#~ msgstr ""
-#~ "En son MySQL sürümleri zenginleştirilmiş, daha ayrıntılandırılmış bir "
-#~ "ayrıcalık (privilege) sistemine sahiptir. Yeni sistemi kullanmak için, "
-#~ "\"mysql\" veritabanındaki tablolara bazı yeni alanlar eklenmelidir. Bu "
-#~ "işlem, sunucunun çalışıp çalışmamasına bağlı olmaksızın "
-#~ "mysql_fix_privilege_tables betiği tarafından bu yükseltme sırasında "
-#~ "yapılır."
-
-#~ msgid ""
-#~ "This script is not supposed to give any user more rights that he had "
-#~ "before, if you encounter such a case, please contact me."
-#~ msgstr ""
-#~ "Bu betiğin hiç bir kullanıcıya öncekinden daha fazla hak kazandırmadığı "
-#~ "varsayılıyor. Eğer bunun aksinde bir durumla karşılaşırsanız, lütfen "
-#~ "benimle bağlantıya geçin."
-
-#~ msgid "Make MySQL reachable via network?"
-#~ msgstr "MySQL network üzerinden ulaşılabilir olsun mu?"
-
-#~ msgid ""
-#~ "Should MySQL listen on a network reachable TCP port? This is not "
-#~ "necessary for use on a single computer and could be a security problem."
-#~ msgstr ""
-#~ "MySQL ağ üzerinde ulaşılabilen bir TCP portunu dinlesin mi? Tek olan bir "
-#~ "bilgisayar için bu ayar gerekli değildir ve bir güvenlik sorunu "
-#~ "oluÅŸturabilir."
-
-#~ msgid "Enable chroot mode?"
-#~ msgstr "chroot kipi etkinleÅŸtirilsin mi?"
-
-#~ msgid ""
-#~ "MySQL is able to jail itself into the /var/lib/mysql_jail directory so "
-#~ "that users cannot modify any files outside this directory. This improves "
-#~ "resistence against crackers, too, as they are not able to modify system "
-#~ "files."
-#~ msgstr ""
-#~ "MySQL kendini /var/lib/mysql_jail dizinine hapsederek kullanıcıların bu "
-#~ "dizin dışındaki hiç bir dosyayı değiştirmemesini sağlayabilir. Bu "
-#~ "düzenleme, sistem dosyalarını değiştirmelerini engelleyeceğinden, "
-#~ "cracker'lara karşı dayanıklılığı arttırır."
diff --git a/debian/rules b/debian/rules
deleted file mode 100755
index 123cccac3f9..00000000000
--- a/debian/rules
+++ /dev/null
@@ -1,405 +0,0 @@
-#!/usr/bin/make -f
-
-export SHELL = /bin/bash
-
-export DH_VERBOSE=1
-
-include debian/defs.mk
-
-changelog_values := $(shell dpkg-parsechangelog \
- | awk '/^(Version|Source|Distribution):/ {print $$2}')
-PKGSOURCE := $(word 1, $(changelog_values))
-PKGVERSION := $(word 2, $(changelog_values))
-PKGDISTRO := $(word 3, $(changelog_values))
-PKGFLAVOR := $(shell echo $(PKGSOURCE) | perl -nle 's/mysql-(.*?)-\d+.*/$$1/ && print ')
-
-ifeq ("x$(MYSQL_FLAVOR)","x")
- export MYSQL_FLAVOR=$(PKGFLAVOR)
-endif
-
-ifneq ("x$(MYSQL_FLAVOR)","x")
- MYSQL_BRANDED_BASE_VERSION:=$(MYSQL_FLAVOR)-$(MYSQL_BASE_VERSION)
- MYSQL_BRANDED_PREVIOUS_BASE_VERSION:=$(MYSQL_FLAVOR)-$(MYSQL_PREVIOUS_BASE_VERSION)
-else
- ifeq ( "$(MYSQL_BRANDED_BASE_VERSION)","@MYSQL_BRANDED_BASE_VERSION@" )
- MYSQL_BRANDED_BASE_VERSION:=$(MYSQL_BASE_VERSION)
- MYSQL_BRANDED_PREVIOUS_BASE_VERSION:=$(MYSQL_PREVIOUS_BASE_VERSION)
- else
- MYSQL_BRANDED_BASE_VERSION:=$(MYSQL_BRANDED_BASE_VERSION)
- MYSQL_BRANDED_PREVIOUS_BASE_VERSION:=$(MYSQL_BRANDED_PREVIOUS_BASE_VERSION)
- endif
-endif
-
-PACKAGE=mysql-$(MYSQL_BRANDED_BASE_VERSION)
-
-PWD=$(shell pwd)
-TMP=$(PWD)/debian/tmp/
-
-
-ARCH = $(shell dpkg-architecture -qDEB_BUILD_ARCH)
-
-DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-
-MAKE_J = $(shell if grep -q processor.*3 /proc/cpuinfo; then echo "-j 4"; else echo ""; fi )
-
-ifeq ($(findstring $(ARCH),i386 sparc),$(ARCH))
- USE_ASSEMBLER=--enable-assembler
-endif
-
-ifeq ($(findstring $(ARCH), arm),$(ARCH))
- FOMIT_FRAME_POINTER=
-else
- FOMIT_FRAME_POINTER=-fomit-frame-pointer
-endif
-
-# trying to raise stability on i386. See #116631
-# don't use it on ia64
-ifeq ($(findstring $(ARCH),i386),$(ARCH))
- FNO_EXCEPTIONS=-fno-exceptions
-endif
-
-# This causes seg11 crashes if LDAP is used for groups in /etc/nsswitch.conf
-# so it is disabled by default although, according to MySQL, it brings >10%
-# performance gain if enabled. See #299382.
-ifeq ($(STATIC_MYSQLD), 1)
- USE_STATIC_MYSQLD=--with-mysqld-ldflags=-all-static
-endif
-
-ifneq ("$(MYSQL_BUILD_TEST)","yes")
- MYSQL_BUILD_TEST=no
-endif
-
-control-file:
- @echo "## This file is autogenerated you want to edit control.in instead" > debian/control.tmp
- sed -e "s/@MYSQL_BASE_VERSION@/$(MYSQL_BASE_VERSION)/g" \
- -e "s/@MYSQL_BRANDED_BASE_VERSION@/$(MYSQL_BRANDED_BASE_VERSION)/g" \
- -e "s/@VERSIONSTRING@/$(VERSIONSTRING)/g" \
- -e "s/@MYSQL_PREVIOUS_BASE_VERSION@/$(MYSQL_PREVIOUS_BASE_VERSION)/g" \
- -e "s/@MYSQL_BRANDED_PREVIOUS_BASE_VERSION@/$(MYSQL_BRANDED_PREVIOUS_BASE_VERSION)/g" \
- -e "s/@MYSQL_SOURCE_BASE_VERSION@/$(MYSQL_SOURCE_BASE_VERSION)/g" \
- -e "s/@SHARED_LIB_MAJOR_VERSION@/$(SHARED_LIB_MAJOR_VERSION)/g" \
- -e "s/@NDB_SHARED_LIB_MAJOR_VERSION@/$(NDB_SHARED_LIB_MAJOR_VERSION)/g" \
- debian/control.in >> debian/control.tmp
- [ -e debian/control ] \
- && cmp -s debian/control debian/control.tmp \
- && rm -f debian/control.tmp && exit 0; \
- mv debian/control.tmp debian/control
-
-
-missing:
- ./BUILD/autorun.sh
-
-configure: configure-stamp
-configure-stamp:
- @echo "RULES.configure-stamp"
- dh_testdir
-
-ifneq ($(ARCH_OS),hurd)
- @if [ ! -d /proc/self ]; then echo "/proc IS NEEDED" 1>&2; exit 1; fi
-endif
-
- @cp debian/control debian/control.sav
- ( \
- CC="$(MYSQL_BUILD_CC)" \
- CXX="$(MYSQL_BUILD_CXX)" \
- BUILD_OPTS="${MYSQL_BUILD_OPTS:-''}" \
- CFLAGS="${MYSQL_BUILD_CFLAGS:-'-DBIG_JOINS=1 -O2'}" \
- CXXFLAGS="${MYSQL_BUILD_CXXFLAGS:-'-DBIG_JOINS=1 -felide-constructors -fno-rtti -O2'}" \
- ./configure \
- --build=${DEB_BUILD_GNU_TYPE} \
- --host=${DEB_HOST_GNU_TYPE} \
- \
- --prefix=/usr \
- --exec-prefix=/usr \
- --libexecdir=/usr/sbin \
- --datadir=/usr/share \
- --localstatedir=/var/lib/mysql \
- --includedir=/usr/include \
- --infodir=/usr/share/info \
- --mandir=/usr/share/man \
- \
- --with-comment="MySQL Server (custom build)" \
- --with-server-suffix="-custom" \
- \
- --enable-shared \
- --enable-thread-safe-client \
- $(USE_ASSEMBLER) \
- --enable-local-infile \
- \
- --with-big-tables \
- --with-unix-socket-path=/var/run/mysqld/mysqld.sock \
- --with-mysqld-user=mysql \
- $(USE_STATIC_MYSQLD) \
- --without-bench \
- --with-zlib-dir=bundled \
- --with-ssl \
- --with-readline \
- --with-extra-charsets=all \
- --with-innodb \
- --with-blackhole-storage-engine \
- --with-example-storage-engine \
- \
- --with-isam \
- --with-archive-storage-engine \
- --with-csv-storage-engine \
- --with-federated-storage-engine \
- --without-embedded-server \
- --with-ndbcluster \
- --with-ndb-shm \
- --without-ndb-sci \
- --without-ndb-test \
- --with-ndb-docs \
- $(MYSQL_BUILD_OPTS) \
- )
-
- @mv debian/control.sav debian/control
-
- touch configure-stamp
-
-
-build: build-stamp
-build-stamp: configure
- dh_testdir
-
- $(MAKE) $(MAKE_J)
-
- if [ -f sql/.libs/mysqld ] ; then \
- nm --numeric-sort sql/.libs/mysqld > sql/mysqld.sym ; \
- else \
- nm --numeric-sort sql/mysqld > sql/mysqld.sym ; \
- fi
-
-
- if [ "${MYSQL_BUILD_TEST}" != "no" ] ; then \
- ( cd mysql-test ;\
- MTR_BUILD_THREAD=auto ; \
- export MTR_BUILD_THREAD ; \
- perl ./mysql-test-run.pl --force --report-features ; \
- perl ./mysql-test-run.pl --force --ps-protocol ; \
- true ) \
- fi
-
-
- touch build-stamp
-
-stamp-control:
- # We have to prepare the various control files
-
- echo "in stamp-control - BASE_VER==$(MYSQL_BASE_VERSION)"
- # We have some naming inconsistencies here...
- for f in debian/*.in debian/po/POTFILES.in.in ; do \
- f2=`echo $$f | sed "s,BASE,$(MYSQL_BRANDED_BASE_VERSION),g;\
- s,PREV,$(MYSQL_BRANDED_PREVIOUS_BASE_VERSION),g;\
- s,NLIB,$(NDB_SHARED_LIB_MAJOR_VERSION),g;\
- s,SLIB,$(SHARED_LIB_MAJOR_VERSION),g;s,\.in$$,,"`; \
- if [ $$f2 != debian/control -a $$f2 != debian/Makefile ]; then \
- sed -e "s/@MYSQL_BASE_VERSION@/$(MYSQL_BASE_VERSION)/g" \
- -e "s/@MYSQL_BRANDED_BASE_VERSION@/$(MYSQL_BRANDED_BASE_VERSION)/g" \
- -e "s/@VERSIONSTRING@/$(VERSIONSTRING)/g" \
- -e "s/@PRIORITY@/$(PRIORITY)/g" \
- -e "s/@MYSQL_PREVIOUS_BASE_VERSION@/$(MYSQL_PREVIOUS_BASE_VERSION)/g" \
- -e "s/@MYSQL_BRANDED_PREVIOUS_BASE_VERSION@/$(MYSQL_BRANDED_PREVIOUS_BASE_VERSION)/g" \
- -e "s/@MYSQL_SOURCE_BASE_VERSION@/$(MYSQL_SOURCE_BASE_VERSION)/g" \
- -e "s/@SHARED_LIB_MAJOR_VERSION@/$(SHARED_LIB_MAJOR_VERSION)/g" \
- -e "s/@NDB_SHARED_LIB_MAJOR_VERSION@/$(NDB_SHARED_LIB_MAJOR_VERSION)/g" \
- -e "s,@SCRIPTDIR@,/$(scriptdir),g" \
- -e "s,@INFO@,$(findstring info, $(doc_dependencies)),g" \
- <$$f >$$f2; \
- fi; \
- done
- echo "MYSQL_BUILD_OPTS=$(MYSQL_BUILD_OPTS)" >> debian/defs.mk
- echo "MYSQL_BUILD_CXXFLAGS=$(MYSQL_BUILD_CXXFLAGS)" >> debian/defs.mk
- echo "MYSQL_BUILD_CFLAGS=$(MYSQL_BUILD_CFLAGS)" >> debian/defs.mk
- echo "MYSQL_BUILD_CC=$(MYSQL_BUILD_CC)" >> debian/defs.mk
- echo "MYSQL_BUILD_CXX=$(MYSQL_BUILD_CXX)" >> debian/defs.mk
-
-
-# depending on two files we expect to be in the root
-# to protect from accidentally deleting a whole bunch of
-# files somewhere else.
-clean: configure.in Makefile.am control-file
-
- rm -f debian/mysql-server-$(MYSQL_BRANDED_BASE_VERSION).mysql.init
-
- # We depend on this later, and delete the results in the mean time
- $(MAKE) -f debian/rules stamp-control
- dh_testdir
- dh_testroot
- rm -f configure-stamp
- rm -f build-stamp
-
- cp debian/defs.mk debian/defs.mk.sav
- cp debian/control debian/control.sav
- -make distclean
- mv debian/defs.mk.sav debian/defs.mk
- mv debian/control.sav debian/control
-
- debconf-updatepo
-
- for f in debian/*.in; do \
- f2=`echo $$f | sed "s,BASE,$(MYSQL_BRANDED_BASE_VERSION),g;\
- s,PREV,$(MYSQL_BRANDED_PREVIOUS_BASE_VERSION),g;\
- s,NLIB,$(NDB_SHARED_LIB_MAJOR_VERSION),g;\
- s,SLIB,$(SHARED_LIB_MAJOR_VERSION),g;s,\.in$$,,"`; \
- if [ $$f2 != debian/control -a $$f2 != debian/Makefile -a $$f2 != debian/defs.mk ]; then \
- rm -f $$f2; \
- fi; \
- done
- rm -f po/POTFILES.in
-
- dh_clean -v
-
-
-
-install:
-install: build stamp-control
- @echo "RULES.install"
- dh_testdir
- dh_testroot
- dh_clean -k
- dh_installdirs
-
- # Sort of hackish way to make sure we have a init script
- # for dh_installinit
- cp support-files/mysql.server debian/mysql-server-$(MYSQL_BRANDED_BASE_VERSION).mysql.init
-
- mkdir -p $(TMP)/usr/lib/mysql/mysqld.sym
- cp sql/mysqld.sym $(TMP)/usr/lib/mysql/mysqld.sym
-
- # TODO: need real man pages!
- #for f in mysql mysqldump mysqlaccess mysqladmin mysqlshow myisam_ftdump myisamlog myisampack mysql_explain_log mysqld_multi mysqld_safe mysql_fix_privilege_tables mysql_upgrade mysql_tzinfo_to_sql mysql_zap perror replace safe_mysqld ; do touch $(TMP)/usr/share/man/man1/$$f.1 ; done
- #for f in mysqld mysqlmanager ; do touch $(TMP)/usr/share/man/man8/$$f.8 ; done
- # make install (trailing slash needed for innobase)
- $(MAKE) install DESTDIR=$(TMP)/
-
- # After installing, remove rpath to make lintian happy.
- set +e; \
- find ./debian/tmp/ -type f -print0 \
- | xargs -0 --no-run-if-empty chrpath -k 2>/dev/null \
- | fgrep RPATH= \
- | cut -d: -f 1 \
- | xargs --no-run-if-empty chrpath -d; \
- set -e
-
- # libmysqlclient: move shared libraries (but not the rest like libheap.a & co)
- mv $(TMP)/usr/lib/mysql/libmysqlclient* $(TMP)/usr/lib
- mv $(TMP)/usr/lib/mysql/libndbclient* $(TMP)/usr/lib
- perl -pi -e 's#/usr/lib/mysql#/usr/lib#' $(TMP)/usr/lib/libmysqlclient.la
- perl -pi -e 's#/usr/lib/mysql#/usr/lib#' $(TMP)/usr/lib/libmysqlclient_r.la
- perl -pi -e 's#/usr/lib/mysql#/usr/lib#' $(TMP)/usr/lib/libndbclient.la
-
- # Check if our beloved versioned symbols are really there
- if [ "`objdump -T $(TMP)/usr/lib/libmysqlclient.so.$(SHARED_LIB_MAJOR_VERSION).0.0 | grep -c libmysqlclient_$(SHARED_LIB_MAJOR_VERSION)`" -lt 500 ]; then \
- echo "ERROR: versioned symbols are absent"; \
- exit 1; \
- fi
- if [ "`objdump -T $(TMP)/usr/lib/libndbclient.so.$(NDB_SHARED_LIB_MAJOR_VERSION).0.0 | grep -c libndbclient_$(NDB_SHARED_LIB_MAJOR_VERSION)`" -lt 500 ]; then \
- echo "ERROR: versioned symbols are absent from libndbclient"; \
- exit 1; \
- fi
-
- # libmysqlclient-dev: forgotten header file since 3.23.25?
- cp include/my_config.h $(TMP)/usr/include/mysql/
- cp include/my_dir.h $(TMP)/usr/include/mysql/
-
- # mysql-common: We now provide our own config file.
- install -d $(TMP)/etc/mysql
- install -m 0644 debian/additions/my.cnf $(TMP)/etc/mysql/my.cnf
-
- pod2man scripts/mysqlhotcopy $(TMP)/usr/share/man/man1/mysqlhotcopy.1
-
- # mysql-server
- install -m 0755 scripts/mysqld_safe $(TMP)/usr/bin/mysqld_safe
- mkdir -p $(TMP)/usr/share/doc/mysql-server-$(MYSQL_BRANDED_BASE_VERSION)/examples
- mv $(TMP)/usr/share/mysql/*cnf $(TMP)/usr/share/doc/mysql-server-$(MYSQL_BRANDED_BASE_VERSION)/examples/
- rm -vf $(TMP)/usr/share/mysql/mi_test_all* \
- $(TMP)/usr/share/mysql/mysql-log-rotate \
- $(TMP)/usr/share/mysql/mysql.server \
- $(TMP)/usr/share/mysql/binary-configure
-
- # we can't install *.pl into /usr/bin - so we have to rename it.
- sed "s#filename => 'ndb_size.tmpl#filename => '/usr/share/mysql/ndb_size.tmpl#" < $(TMP)/usr/bin/ndb_size.pl > $(TMP)/usr/bin/ndb_size
- cp -a mysql-test $(TMP)/usr/share/mysql/
- cp -a sql-bench $(TMP)/usr/share/mysql/
- # lintian overrides
- mkdir -p $(TMP)/usr/share/lintian/overrides/
- cp debian/mysql-server-$(MYSQL_BRANDED_BASE_VERSION).lintian-overrides $(TMP)/usr/share/lintian/overrides/mysql-server-$(MYSQL_BRANDED_BASE_VERSION)
- cp debian/mysql-client-$(MYSQL_BRANDED_BASE_VERSION).lintian-overrides $(TMP)/usr/share/lintian/overrides/mysql-client-$(MYSQL_BRANDED_BASE_VERSION)
-
- # For 4.1 -> 5.0 transition
- d=$(TMP)/usr/share/mysql-common/internal-use-only/; \
- mkdir -p $$d; \
- cp debian/mysql-server-$(MYSQL_BRANDED_BASE_VERSION).mysql.init $$d/_etc_init.d_mysql; \
- cp debian/mysql-server-$(MYSQL_BRANDED_BASE_VERSION).mysql-server.logrotate $$d/_etc_logrotate.d_mysql-server; \
-
- dh_movefiles
-
-# Build architecture-independent files here.
-binary-indep: build install
- @echo "RULES.binary-indep"
- dh_testdir -i
- dh_testroot -i
- dh_installdebconf -i
- dh_installdocs -i
- dh_installexamples -i
- dh_installmenu -i
- dh_installlogrotate -i
- dh_installinit -i
- dh_installcron -i
- dh_installman -i
- dh_installinfo -i
- dh_installlogcheck -i
- dh_installchangelogs -i
- dh_link -i
- dh_compress -i
- dh_fixperms -i
- dh_installdeb -i
- dh_perl -i
- dh_gencontrol -i
- dh_md5sums -i
- dh_builddeb -i
-
-# Build architecture-dependent files here.
-binary-arch: build install
- @echo "RULES.binary-arch"
- dh_testdir
- dh_testroot
-
- dh_installdebconf -a
- dh_installdocs -a
- dh_installexamples -a
- dh_installmenu -a
- dh_installlogrotate -a --name mysql-server
- # Start mysql in runlevel 19 before 20 where apache, proftpd etc gets
- # started which might depend on a running database server.
- dh_installinit -a --name=mysql-storage -- defaults 19 21
- dh_installinit -a --name=mysql -- defaults 19 21
- dh_installinit -a --name=mysql-management -- defaults 20
- dh_installcron -a --name mysql-server
- dh_installman -a
- dh_installinfo -a
- dh_installlogcheck -a
- dh_installchangelogs -a
- dh_strip -a
- dh_link -a # .so muss nach .so.1.2.3 installier werden!
- dh_compress -a
- dh_fixperms -a
- dh_makeshlibs -a
- dh_makeshlibs -plibmysqlclient$(SHARED_LIB_MAJOR_VERSION) -V"libmysqlclient$(SHARED_LIB_MAJOR_VERSION) (>= $(PKGVERSION))"
- dh_makeshlibs -plibndbclient$(NDB_SHARED_LIB_MAJOR_VERSION) -V"libndbclient2 (>= $(PKGVERSION))"
- dh_installdeb -a
- dh_perl -a
- dh_shlibdeps -a -l debian/libmysqlclient$(SHARED_LIB_MAJOR_VERSION)/usr/lib -L libmysqlclient$(SHARED_LIB_MAJOR_VERSION)
- dh_shlibdeps -a -l debian/libndbclient$(NDB_SHARED_LIB_MAJOR_VERSION)/usr/lib -L libndbclient$(NDB_SHARED_LIB_MAJOR_VERSION)
- dh_gencontrol -a
- dh_md5sums -a
- dh_builddeb -a
-
-source diff:
- @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
-
-binary: binary-indep binary-arch
-.PHONY: clean stamp-control control-file configure build binary binary-indep binary-arch install
-
-# vim: ts=8
diff --git a/debian/source.lintian-overrides.in b/debian/source.lintian-overrides.in
deleted file mode 100644
index 22a9164cf66..00000000000
--- a/debian/source.lintian-overrides.in
+++ /dev/null
@@ -1,6 +0,0 @@
-maintainer-script-lacks-debhelper-token debian/mysql-server-@MYSQL_BRANDED_BASE_VERSION@.postinst
-maintainer-script-lacks-debhelper-token debian/mysql-server-@MYSQL_BRANDED_BASE_VERSION@.postrm
-outdated-autotools-helper-file bdb/dist/config.sub 2002-07-03
-outdated-autotools-helper-file bdb/dist/config.guess 2002-07-23
-bad-distribution-in-changes-file sarge
-bad-distribution-in-changes-file etch
diff --git a/debian/watch b/debian/watch
deleted file mode 100644
index 35a12186d19..00000000000
--- a/debian/watch
+++ /dev/null
@@ -1,3 +0,0 @@
-version=3
-opts="uversionmangle=s/-(rc|beta)/$1/" \
- ftp://ftp.mysql.com/pub/mysql/src/mysql-([\d\.]*(?:-beta|-rc)?).tar.gz debian
diff --git a/extra/comp_err.c b/extra/comp_err.c
index 3e540d8f481..f2d486487ff 100644
--- a/extra/comp_err.c
+++ b/extra/comp_err.c
@@ -167,6 +167,7 @@ int main(int argc, char *argv[])
DBUG_ENTER("main");
charsets_dir= DEFAULT_CHARSET_DIR;
+ my_umask_dir= 0777;
if (get_options(&argc, &argv))
DBUG_RETURN(1);
if (!(row_count= parse_input_file(TXTFILE, &error_head, &lang_head)))
diff --git a/include/config-win.h b/include/config-win.h
index 2e64e165630..07b316dcbab 100644
--- a/include/config-win.h
+++ b/include/config-win.h
@@ -21,6 +21,9 @@
/* We have to do this define before including windows.h to get the AWE API
functions */
#define _WIN32_WINNT 0x0500
+#else
+/* Get NT 4.0 functions */
+#define _WIN32_WINNT 0x0400
#endif
#if defined(_MSC_VER) && _MSC_VER >= 1400
diff --git a/include/my_base.h b/include/my_base.h
index 2b60ff552a4..cf0835f8a1e 100644
--- a/include/my_base.h
+++ b/include/my_base.h
@@ -188,6 +188,12 @@ enum ha_extra_function {
executed. This condition is unset by HA_EXTRA_NO_IGNORE_DUP_KEY.
*/
HA_EXTRA_INSERT_WITH_UPDATE,
+ /*
+ Orders MERGE handler to attach or detach its child tables. Used at
+ begin and end of a statement.
+ */
+ HA_EXTRA_ATTACH_CHILDREN,
+ HA_EXTRA_DETACH_CHILDREN
/* Inform handler that we will do a rename */
HA_EXTRA_PREPARE_FOR_RENAME
};
@@ -246,6 +252,8 @@ enum ha_base_keytype {
HA_BINARY_PACK_KEY | HA_FULLTEXT | HA_UNIQUE_CHECK | \
HA_SPATIAL | HA_NULL_ARE_EQUAL | HA_GENERATED_KEY)
+#define HA_KEY_HAS_PART_KEY_SEG 65536 /* Key contains partial segments */
+
/* Automatic bits in key-flag */
#define HA_SPACE_PACK_USED 4 /* Test for if SPACE_PACK used */
@@ -420,10 +428,12 @@ enum ha_base_keytype {
#define HA_ERR_RECORD_IS_THE_SAME 169
/* It is not possible to log this statement */
#define HA_ERR_LOGGING_IMPOSSIBLE 170
-#define HA_ERR_NEW_FILE 171 /* New file format */
-#define HA_ERR_INITIALIZATION 172 /* Error during initialization */
-#define HA_ERR_FILE_TOO_SHORT 173 /* File too short */
-#define HA_ERR_LAST 173 /* Copy of last error nr */
+#define HA_ERR_CORRUPT_EVENT 171 /* The event was corrupt, leading to
+ illegal data being read */
+#define HA_ERR_NEW_FILE 172 /* New file format */
+#define HA_ERR_INITIALIZATION 173 /* Error during initialization */
+#define HA_ERR_FILE_TOO_SHORT 174 /* File too short */
+#define HA_ERR_LAST 174 /* Copy of last error nr */
/* Number of different errors */
#define HA_ERR_ERRORS (HA_ERR_LAST - HA_ERR_FIRST + 1)
diff --git a/include/my_getopt.h b/include/my_getopt.h
index c74f3ed672e..14f8e6df95b 100644
--- a/include/my_getopt.h
+++ b/include/my_getopt.h
@@ -68,12 +68,15 @@ extern my_error_reporter my_getopt_error_reporter;
extern int handle_options (int *argc, char ***argv,
const struct my_option *longopts, my_get_one_option);
+extern void my_cleanup_options(const struct my_option *options);
extern void my_print_help(const struct my_option *options);
extern void my_print_variables(const struct my_option *options);
extern void my_getopt_register_get_addr(uchar ** (*func_addr)(const char *, uint,
const struct my_option *));
-ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *optp);
+ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *optp,
+ bool *fix);
+longlong getopt_ll_limit_value(longlong, const struct my_option *,bool *fix);
my_bool getopt_compare_strings(const char *s, const char *t, uint length);
C_MODE_END
diff --git a/include/my_global.h b/include/my_global.h
index 705c7b1768f..fe8e11abfd5 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -107,40 +107,40 @@
#define NETWARE_SET_SCREEN_MODE(A)
#endif
+/* Workaround for _LARGE_FILES and _LARGE_FILE_API incompatibility on AIX */
+#if defined(_AIX) && defined(_LARGE_FILE_API)
+#undef _LARGE_FILE_API
+#endif
+
/*
The macros below are used to allow build of Universal/fat binaries of
MySQL and MySQL applications under darwin.
*/
-#ifdef TARGET_FAT_BINARY
-# undef SIZEOF_CHARP
-# undef SIZEOF_INT
-# undef SIZEOF_LONG
-# undef SIZEOF_LONG_LONG
-# undef SIZEOF_OFF_T
-# undef SIZEOF_SHORT
-
-#if defined(__i386__)
-# undef WORDS_BIGENDIAN
-# define SIZEOF_CHARP 4
-# define SIZEOF_INT 4
-# define SIZEOF_LONG 4
-# define SIZEOF_LONG_LONG 8
-# define SIZEOF_OFF_T 8
-# define SIZEOF_SHORT 2
-
-#elif defined(__ppc__)
-# define WORDS_BIGENDIAN
-# define SIZEOF_CHARP 4
-# define SIZEOF_INT 4
-# define SIZEOF_LONG 4
-# define SIZEOF_LONG_LONG 8
-# define SIZEOF_OFF_T 8
-# define SIZEOF_SHORT 2
-
-#else
-# error Building FAT binary for an unknown architecture.
-#endif
-#endif /* TARGET_FAT_BINARY */
+#if defined(__APPLE__) && defined(__MACH__)
+# undef SIZEOF_CHARP
+# undef SIZEOF_SHORT
+# undef SIZEOF_INT
+# undef SIZEOF_LONG
+# undef SIZEOF_LONG_LONG
+# undef SIZEOF_OFF_T
+# undef WORDS_BIGENDIAN
+# define SIZEOF_SHORT 2
+# define SIZEOF_INT 4
+# define SIZEOF_LONG_LONG 8
+# define SIZEOF_OFF_T 8
+# if defined(__i386__) || defined(__ppc__)
+# define SIZEOF_CHARP 4
+# define SIZEOF_LONG 4
+# elif defined(__x86_64__) || defined(__ppc64__)
+# define SIZEOF_CHARP 8
+# define SIZEOF_LONG 8
+# else
+# error Building FAT binary for an unknown architecture.
+# endif
+# if defined(__ppc__) || defined(__ppc64__)
+# define WORDS_BIGENDIAN
+# endif
+#endif /* defined(__APPLE__) && defined(__MACH__) */
/*
@@ -856,8 +856,8 @@ typedef SOCKET_SIZE_TYPE size_socket;
#define DBL_MAX 1.79769313486231470e+308
#define FLT_MAX ((float)3.40282346638528860e+38)
#endif
-#ifndef SSIZE_MAX
-#define SSIZE_MAX ((~((size_t) 0)) / 2)
+#ifndef SIZE_T_MAX
+#define SIZE_T_MAX ~((size_t) 0)
#endif
#ifndef HAVE_FINITE
diff --git a/include/my_pthread.h b/include/my_pthread.h
index b61de3bf2ff..6ec745ff206 100644
--- a/include/my_pthread.h
+++ b/include/my_pthread.h
@@ -101,6 +101,7 @@ struct timespec {
void win_pthread_init(void);
int win_pthread_setspecific(void *A,void *B,uint length);
+int win_pthread_mutex_trylock(pthread_mutex_t *mutex);
int pthread_create(pthread_t *,pthread_attr_t *,pthread_handler,void *);
int pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr);
int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex);
@@ -156,7 +157,7 @@ void pthread_exit(void *a); /* was #define pthread_exit(A) ExitThread(A)*/
#define pthread_equal(A,B) ((A) == (B))
#define pthread_mutex_init(A,B) (InitializeCriticalSection(A),0)
#define pthread_mutex_lock(A) (EnterCriticalSection(A),0)
-#define pthread_mutex_trylock(A) (WaitForSingleObject((A), 0) == WAIT_TIMEOUT)
+#define pthread_mutex_trylock(A) win_pthread_mutex_trylock((A))
#define pthread_mutex_unlock(A) LeaveCriticalSection(A)
#define pthread_mutex_destroy(A) DeleteCriticalSection(A)
#define my_pthread_setprio(A,B) SetThreadPriority(GetCurrentThread(), (B))
@@ -484,7 +485,7 @@ typedef struct st_safe_mutex_info_t
int safe_mutex_init(safe_mutex_t *mp, const pthread_mutexattr_t *attr,
const char *file, uint line, const char *name);
-int safe_mutex_lock(safe_mutex_t *mp,const char *file, uint line);
+int safe_mutex_lock(safe_mutex_t *mp, my_bool try_lock, const char *file, uint line);
int safe_mutex_unlock(safe_mutex_t *mp,const char *file, uint line);
int safe_mutex_destroy(safe_mutex_t *mp,const char *file, uint line);
int safe_cond_wait(pthread_cond_t *cond, safe_mutex_t *mp,const char *file,
@@ -507,12 +508,12 @@ void safe_mutex_end(FILE *file);
#undef pthread_cond_timedwait
#undef pthread_mutex_trylock
#define pthread_mutex_init(A,B) safe_mutex_init((A),(B),__FILE__,__LINE__,#A)
-#define pthread_mutex_lock(A) safe_mutex_lock((A),__FILE__,__LINE__)
+#define pthread_mutex_lock(A) safe_mutex_lock((A), FALSE, __FILE__, __LINE__)
#define pthread_mutex_unlock(A) safe_mutex_unlock((A),__FILE__,__LINE__)
#define pthread_mutex_destroy(A) safe_mutex_destroy((A),__FILE__,__LINE__)
#define pthread_cond_wait(A,B) safe_cond_wait((A),(B),__FILE__,__LINE__)
#define pthread_cond_timedwait(A,B,C) safe_cond_timedwait((A),(B),(C),__FILE__,__LINE__)
-#define pthread_mutex_trylock(A) pthread_mutex_lock(A)
+#define pthread_mutex_trylock(A) safe_mutex_lock((A), TRUE, __FILE__, __LINE__)
#define pthread_mutex_t safe_mutex_t
#define safe_mutex_assert_owner(mp) \
DBUG_ASSERT((mp)->count > 0 && \
diff --git a/include/my_sys.h b/include/my_sys.h
index f8f3411f337..439670e34fc 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -710,6 +710,8 @@ extern WF_PACK *wf_comp(char * str);
extern int wf_test(struct wild_file_pack *wf_pack,const char *name);
extern void wf_end(struct wild_file_pack *buffer);
extern size_t strip_sp(char * str);
+extern my_bool array_append_string_unique(const char *str,
+ const char **array, size_t size);
extern void get_date(char * to,int timeflag,time_t use_time);
extern void soundex(CHARSET_INFO *, char * out_pntr, char * in_pntr,
pbool remove_garbage);
@@ -729,8 +731,10 @@ extern sig_handler my_set_alarm_variable(int signo);
extern void my_string_ptr_sort(uchar *base,uint items,size_t size);
extern void radixsort_for_str_ptr(uchar* base[], uint number_of_elements,
size_t size_of_element,uchar *buffer[]);
-extern qsort_t qsort2(void *base_ptr, size_t total_elems, size_t size,
- qsort2_cmp cmp, void *cmp_argument);
+extern qsort_t my_qsort(void *base_ptr, size_t total_elems, size_t size,
+ qsort_cmp cmp);
+extern qsort_t my_qsort2(void *base_ptr, size_t total_elems, size_t size,
+ qsort2_cmp cmp, void *cmp_argument);
extern qsort2_cmp get_ptr_compare(size_t);
void my_store_ptr(uchar *buff, size_t pack_length, my_off_t pos);
my_off_t my_get_ptr(uchar *ptr, size_t pack_length);
@@ -802,7 +806,7 @@ extern int get_index_dynamic(DYNAMIC_ARRAY *array, uchar * element);
#define dynamic_element(array,array_index,type) ((type)((array)->buffer) +(array_index))
#define push_dynamic(A,B) insert_dynamic((A),(B))
#define reset_dynamic(array) ((array)->elements= 0)
-#define sort_dynamic(A,cmp) qsort((A)->buffer, (A)->elements, (A)->size_of_element, (cmp))
+#define sort_dynamic(A,cmp) my_qsort((A)->buffer, (A)->elements, (A)->size_of_element, (cmp))
extern my_bool init_dynamic_string(DYNAMIC_STRING *str, const char *init_str,
size_t init_alloc,size_t alloc_increment);
diff --git a/include/myisammrg.h b/include/myisammrg.h
index eed50bebaee..cc6e6aac6cd 100644
--- a/include/myisammrg.h
+++ b/include/myisammrg.h
@@ -69,9 +69,12 @@ typedef struct st_myrg_info
uint merge_insert_method;
uint tables,options,reclength,keys;
my_bool cache_in_use;
+ /* If MERGE children attached to parent. See top comment in ha_myisammrg.cc */
+ my_bool children_attached;
LIST open_list;
QUEUE by_key;
ulong *rec_per_key_part; /* for sql optimizing */
+ pthread_mutex_t mutex;
} MYRG_INFO;
@@ -80,6 +83,13 @@ typedef struct st_myrg_info
extern int myrg_close(MYRG_INFO *file);
extern int myrg_delete(MYRG_INFO *file,const uchar *buff);
extern MYRG_INFO *myrg_open(const char *name,int mode,int wait_if_locked);
+extern MYRG_INFO *myrg_parent_open(const char *parent_name,
+ int (*callback)(void*, const char*),
+ void *callback_param);
+extern int myrg_attach_children(MYRG_INFO *m_info, int handle_locking,
+ MI_INFO *(*callback)(void*),
+ void *callback_param);
+extern int myrg_detach_children(MYRG_INFO *m_info);
extern int myrg_panic(enum ha_panic_function function);
extern int myrg_rfirst(MYRG_INFO *file,uchar *buf,int inx);
extern int myrg_rlast(MYRG_INFO *file,uchar *buf,int inx);
diff --git a/include/mysql.h b/include/mysql.h
index 68cce3196a0..d114afb6c93 100644
--- a/include/mysql.h
+++ b/include/mysql.h
@@ -557,16 +557,6 @@ unsigned long STDCALL mysql_real_escape_string(MYSQL *mysql,
char *to,const char *from,
unsigned long length);
void STDCALL mysql_debug(const char *debug);
-char * STDCALL mysql_odbc_escape_string(MYSQL *mysql,
- char *to,
- unsigned long to_length,
- const char *from,
- unsigned long from_length,
- void *param,
- char *
- (*extend_buffer)
- (void *, char *to,
- unsigned long *length));
void STDCALL myodbc_remove_escape(MYSQL *mysql,char *name);
unsigned int STDCALL mysql_thread_safe(void);
my_bool STDCALL mysql_embedded(void);
diff --git a/include/mysql_com.h b/include/mysql_com.h
index 938de607e3b..5bf0ace49aa 100644
--- a/include/mysql_com.h
+++ b/include/mysql_com.h
@@ -94,6 +94,7 @@ enum enum_server_command
#define TIMESTAMP_FLAG 1024 /* Field is a timestamp */
#define SET_FLAG 2048 /* field is a set */
#define NO_DEFAULT_VALUE_FLAG 4096 /* Field doesn't have default value */
+#define ON_UPDATE_NOW_FLAG 8192 /* Field is set to NOW on UPDATE */
#define NUM_FLAG 32768 /* Field is num (for clients) */
#define PART_KEY_FLAG 16384 /* Intern; Part of some key */
#define GROUP_FLAG 32768 /* Intern: Group field */
@@ -203,7 +204,7 @@ typedef struct st_net {
unsigned char reading_or_writing;
char save_char;
my_bool no_send_ok; /* For SPs and other things that do multiple stmts */
- my_bool no_send_eof; /* For SPs' first version read-only cursors */
+ my_bool unused; /* Please remove with the next incompatible ABI change */
my_bool compress;
/*
Set if OK packet is already sent, and we do not need to send error
@@ -392,14 +393,17 @@ typedef struct st_udf_args
typedef struct st_udf_init
{
- my_bool maybe_null; /* 1 if function can return NULL */
- unsigned int decimals; /* for real functions */
- unsigned long max_length; /* For string functions */
- char *ptr; /* free pointer for function data */
- /* 0 if result is independent of arguments */
- my_bool const_item;
+ my_bool maybe_null; /* 1 if function can return NULL */
+ unsigned int decimals; /* for real functions */
+ unsigned long max_length; /* For string functions */
+ char *ptr; /* free pointer for function data */
+ my_bool const_item; /* 1 if function always returns the same value */
void *extension;
} UDF_INIT;
+/*
+ TODO: add a notion for determinism of the UDF.
+ See Item_udf_func::update_used_tables ()
+*/
/* Constants when using compression */
#define NET_HEADER_SIZE 4 /* standard header size */
diff --git a/include/mysql_embed.h b/include/mysql_embed.h
index 7416283d83d..4a7fd3ef63c 100644
--- a/include/mysql_embed.h
+++ b/include/mysql_embed.h
@@ -21,7 +21,6 @@
/* TODO HF add #undef HAVE_VIO if we don't want client in embedded library */
#undef HAVE_PSTACK /* No stacktrace */
-#undef HAVE_DLOPEN /* No udf functions */
#undef HAVE_OPENSSL
#undef HAVE_SMEM /* No shared memory */
#undef HAVE_NDBCLUSTER_DB /* No NDB cluster */
diff --git a/include/mysql_h.ic b/include/mysql_h.ic
index 8b1c36fdaab..4bedb9e8050 100644
--- a/include/mysql_h.ic
+++ b/include/mysql_h.ic
@@ -54,7 +54,7 @@ typedef struct st_list LIST;
typedef struct st_mem_root MEM_ROOT;
# 258 "mysql.h"
typedef struct st_mysql MYSQL;
-# 664 "mysql.h"
+# 654 "mysql.h"
typedef struct st_mysql_bind MYSQL_BIND;
# 95 "mysql.h"
typedef struct st_mysql_field MYSQL_FIELD;
@@ -72,17 +72,17 @@ typedef struct st_mysql_res MYSQL_RES;
typedef char * * MYSQL_ROW;
# 145 "mysql.h"
typedef MYSQL_ROWS * MYSQL_ROW_OFFSET;
-# 693 "mysql.h"
+# 683 "mysql.h"
typedef struct st_mysql_stmt MYSQL_STMT;
# 52 "mysql/plugin.h"
typedef struct st_mysql_xid MYSQL_XID;
# 243 "mysql.h"
typedef struct character_set MY_CHARSET_INFO;
-# 187 "mysql_com.h"
+# 188 "mysql_com.h"
typedef struct st_net NET;
# 22 "typelib.h"
typedef struct st_typelib TYPELIB;
-# 177 "mysql_com.h"
+# 178 "mysql_com.h"
typedef struct st_vio Vio;
# 28 "my_list.h"
typedef int (* list_walk_action)(void *, void *);
@@ -92,7 +92,7 @@ typedef char my_bool;
typedef int my_socket;
# 128 "mysql.h"
typedef unsigned long long int my_ulonglong;
-# 214 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stddef.h"
+# 214 "/usr/lib/gcc/i486-linux-gnu/4.1.3/include/stddef.h"
typedef unsigned int size_t;
# 149 "mysql.h"
typedef struct embedded_query_result EMBEDDED_QUERY_RESULT;
@@ -102,13 +102,13 @@ typedef struct st_mysql_data MYSQL_DATA;
typedef struct st_mysql_ftparser_boolean_info MYSQL_FTPARSER_BOOLEAN_INFO;
# 557 "mysql/plugin.h"
typedef struct st_mysql_ftparser_param MYSQL_FTPARSER_PARAM;
-# 763 "mysql.h"
+# 753 "mysql.h"
typedef struct st_mysql_methods MYSQL_METHODS;
# 47 "mysql_time.h"
typedef struct st_mysql_time MYSQL_TIME;
-# 383 "mysql_com.h"
+# 384 "mysql_com.h"
typedef struct st_udf_args UDF_ARGS;
-# 397 "mysql_com.h"
+# 398 "mysql_com.h"
typedef struct st_udf_init UDF_INIT;
# 26 "my_alloc.h"
typedef struct st_used_mem USED_MEM;
@@ -130,7 +130,7 @@ struct __attribute__((aligned(__alignof__(unsigned int)), aligned(__alignof__(vo
unsigned int mbminlen;
unsigned int mbmaxlen;
};
-# 369 "mysql_com.h"
+# 370 "mysql_com.h"
struct __attribute__((aligned(__alignof__(unsigned long int)), aligned(__alignof__(double)))) rand_struct
{
unsigned long int seed1;
@@ -203,7 +203,7 @@ struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned
char * info_buffer;
void * extension;
};
-# 664 "mysql.h"
+# 654 "mysql.h"
struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned long int)))) st_mysql_bind
{
unsigned long int * length;
@@ -328,7 +328,7 @@ struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned
char last_error[256];
void * extension;
};
-# 763 "mysql.h"
+# 753 "mysql.h"
struct __attribute__((aligned(__alignof__(void *)))) st_mysql_methods
{
my_bool (* read_query_result)(MYSQL * mysql);
@@ -448,7 +448,7 @@ struct __attribute__((aligned(__alignof__(void *)))) st_mysql_show_var
char * value;
enum enum_mysql_show_type type;
};
-# 693 "mysql.h"
+# 683 "mysql.h"
struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned long long int)))) st_mysql_stmt
{
MEM_ROOT mem_root;
@@ -513,7 +513,7 @@ struct __attribute__((aligned(__alignof__(long int)))) st_mysql_xid
long int bqual_length;
char data[128];
};
-# 187 "mysql_com.h"
+# 188 "mysql_com.h"
struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned long int)))) st_net
{
Vio * vio;
@@ -538,7 +538,7 @@ struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned
unsigned char reading_or_writing;
char save_char;
my_bool no_send_ok;
- my_bool no_send_eof;
+ my_bool unused;
my_bool compress;
my_bool no_send_error;
unsigned char * query_cache_query;
@@ -558,7 +558,7 @@ struct __attribute__((aligned(__alignof__(unsigned int)), aligned(__alignof__(vo
char const * * type_names;
unsigned int * type_lengths;
};
-# 383 "mysql_com.h"
+# 384 "mysql_com.h"
struct __attribute__((aligned(__alignof__(unsigned int)), aligned(__alignof__(void *)))) st_udf_args
{
unsigned int arg_count;
@@ -570,7 +570,7 @@ struct __attribute__((aligned(__alignof__(unsigned int)), aligned(__alignof__(vo
unsigned long int * attribute_lengths;
void * extension;
};
-# 397 "mysql_com.h"
+# 398 "mysql_com.h"
struct __attribute__((aligned(__alignof__(unsigned long int)), aligned(__alignof__(void *)))) st_udf_init
{
my_bool maybe_null;
@@ -587,7 +587,7 @@ struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned
unsigned int left;
unsigned int size;
};
-# 380 "mysql_com.h"
+# 381 "mysql_com.h"
enum Item_result
{
STRING_RESULT = 0,
@@ -596,7 +596,7 @@ enum Item_result
ROW_RESULT = 3,
DECIMAL_RESULT = 4,
};
-# 321 "mysql_com.h"
+# 322 "mysql_com.h"
enum enum_cursor_type
{
CURSOR_TYPE_NO_CURSOR = 0,
@@ -604,7 +604,7 @@ enum enum_cursor_type
CURSOR_TYPE_FOR_UPDATE = 2,
CURSOR_TYPE_SCROLLABLE = 4,
};
-# 234 "mysql_com.h"
+# 235 "mysql_com.h"
enum enum_field_types
{
MYSQL_TYPE_DECIMAL = 0,
@@ -651,7 +651,7 @@ enum enum_ftparser_mode
MYSQL_FTPARSER_WITH_STOPWORDS = 1,
MYSQL_FTPARSER_FULL_BOOLEAN_INFO = 2,
};
-# 331 "mysql_com.h"
+# 332 "mysql_com.h"
enum enum_mysql_set_option
{
MYSQL_OPTION_MULTI_STATEMENTS_ON = 0,
@@ -671,7 +671,7 @@ enum enum_mysql_show_type
SHOW_FUNC = 8,
SHOW_DOUBLE = 9,
};
-# 594 "mysql.h"
+# 584 "mysql.h"
enum enum_mysql_stmt_state
{
MYSQL_STMT_INIT_DONE = 1,
@@ -723,14 +723,14 @@ enum enum_server_command
COM_DAEMON = 29,
COM_END = 30,
};
-# 740 "mysql.h"
+# 730 "mysql.h"
enum enum_stmt_attr_type
{
STMT_ATTR_UPDATE_MAX_LENGTH = 0,
STMT_ATTR_CURSOR_TYPE = 1,
STMT_ATTR_PREFETCH_ROWS = 2,
};
-# 296 "mysql_com.h"
+# 297 "mysql_com.h"
enum mysql_enum_shutdown_level
{
SHUTDOWN_DEFAULT = 0,
@@ -790,13 +790,13 @@ enum mysql_status
MYSQL_STATUS_GET_RESULT = 1,
MYSQL_STATUS_USE_RESULT = 2,
};
-# 438 "mysql_com.h"
+# 439 "mysql_com.h"
extern my_bool check_scramble(char const * reply, char const * message, unsigned char const * hash_stage2);
-# 431 "mysql_com.h"
+# 432 "mysql_com.h"
extern my_bool check_scramble_323(char const *, char const * message, unsigned long int * salt);
# 35 "typelib.h"
extern TYPELIB * copy_typelib(MEM_ROOT * root, TYPELIB * from);
-# 426 "mysql_com.h"
+# 427 "mysql_com.h"
extern void create_random_string(char * to, unsigned int, struct rand_struct * rand_st);
# 32 "typelib.h"
extern int find_type(char * x, TYPELIB const * typelib, unsigned int);
@@ -804,15 +804,15 @@ extern int find_type(char * x, TYPELIB const * typelib, unsigned int);
extern int find_type_or_exit(char const * x, TYPELIB * typelib, char const * option);
# 29 "typelib.h"
extern my_ulonglong find_typeset(char * x, TYPELIB * typelib, int * error_position);
-# 440 "mysql_com.h"
+# 441 "mysql_com.h"
extern void get_salt_from_password(unsigned char * res, char const * password);
-# 433 "mysql_com.h"
+# 434 "mysql_com.h"
extern void get_salt_from_password_323(unsigned long int * res, char const * password);
-# 446 "mysql_com.h"
+# 447 "mysql_com.h"
extern char * get_tty_password(char const * opt_message);
# 34 "typelib.h"
extern char const * get_type(TYPELIB * typelib, unsigned int);
-# 428 "mysql_com.h"
+# 429 "mysql_com.h"
extern void hash_password(unsigned long int * to, char const * password, unsigned int);
# 30 "my_list.h"
extern LIST * list_add(LIST * root, LIST * element);
@@ -828,47 +828,47 @@ extern unsigned int list_length(LIST *);
extern LIST * list_reverse(LIST * root);
# 36 "my_list.h"
extern int list_walk(LIST *, list_walk_action, unsigned char * argument);
-# 441 "mysql_com.h"
+# 442 "mysql_com.h"
extern void make_password_from_salt(char * to, unsigned char const * hash_stage2);
-# 434 "mysql_com.h"
+# 435 "mysql_com.h"
extern void make_password_from_salt_323(char * to, unsigned long int const * salt);
-# 436 "mysql_com.h"
+# 437 "mysql_com.h"
extern void make_scrambled_password(char * to, char const * password);
-# 429 "mysql_com.h"
+# 430 "mysql_com.h"
extern void make_scrambled_password_323(char * to, char const * password);
# 33 "typelib.h"
extern void make_type(char * to, unsigned int, TYPELIB * typelib);
-# 366 "mysql_com.h"
+# 367 "mysql_com.h"
extern int my_connect(my_socket, struct sockaddr const * name, unsigned int, unsigned int);
-# 343 "mysql_com.h"
-extern my_bool my_net_init(NET * net, Vio * vio);
# 344 "mysql_com.h"
+extern my_bool my_net_init(NET * net, Vio * vio);
+# 345 "mysql_com.h"
extern void my_net_local_init(NET * net);
-# 354 "mysql_com.h"
+# 355 "mysql_com.h"
extern unsigned long int my_net_read(NET * net);
-# 349 "mysql_com.h"
+# 350 "mysql_com.h"
extern my_bool my_net_write(NET * net, unsigned char const * packet, size_t);
-# 425 "mysql_com.h"
+# 426 "mysql_com.h"
extern double my_rnd(struct rand_struct *);
-# 452 "mysql_com.h"
+# 453 "mysql_com.h"
extern void my_thread_end(void);
-# 451 "mysql_com.h"
+# 452 "mysql_com.h"
extern my_bool my_thread_init(void);
-# 570 "mysql.h"
+# 560 "mysql.h"
extern void myodbc_remove_escape(MYSQL * mysql, char * name);
# 512 "mysql.h"
extern int mysql_add_slave(MYSQL * mysql, char const * host, unsigned int, char const * user, char const * passwd);
# 421 "mysql.h"
extern my_ulonglong mysql_affected_rows(MYSQL * mysql);
-# 836 "mysql.h"
+# 826 "mysql.h"
extern my_bool mysql_autocommit(MYSQL * mysql, my_bool);
# 437 "mysql.h"
extern my_bool mysql_change_user(MYSQL * mysql, char const * user, char const * passwd, char const * db);
# 429 "mysql.h"
extern char const * mysql_character_set_name(MYSQL * mysql);
-# 839 "mysql.h"
+# 829 "mysql.h"
extern void mysql_close(MYSQL * sock);
-# 834 "mysql.h"
+# 824 "mysql.h"
extern my_bool mysql_commit(MYSQL * mysql);
# 541 "mysql.h"
extern void mysql_data_seek(MYSQL_RES * result, my_ulonglong);
@@ -880,7 +880,7 @@ extern void mysql_disable_reads_from_master(MYSQL * mysql);
extern void mysql_disable_rpl_parse(MYSQL * mysql);
# 520 "mysql.h"
extern int mysql_dump_debug_info(MYSQL * mysql);
-# 572 "mysql.h"
+# 562 "mysql.h"
extern my_bool mysql_embedded(void);
# 497 "mysql.h"
extern void mysql_enable_reads_from_master(MYSQL * mysql);
@@ -890,7 +890,7 @@ extern void mysql_enable_rpl_parse(MYSQL * mysql);
extern my_bool mysql_eof(MYSQL_RES * res);
# 423 "mysql.h"
extern unsigned int mysql_errno(MYSQL * mysql);
-# 447 "mysql_com.h"
+# 448 "mysql_com.h"
extern char const * mysql_errno_to_sqlstate(unsigned int);
# 424 "mysql.h"
extern char const * mysql_error(MYSQL * mysql);
@@ -950,30 +950,28 @@ extern MYSQL_RES * mysql_list_fields(MYSQL * mysql, char const * table, char con
extern MYSQL_RES * mysql_list_processes(MYSQL * mysql);
# 536 "mysql.h"
extern MYSQL_RES * mysql_list_tables(MYSQL * mysql, char const * wild);
-# 579 "mysql.h"
+# 569 "mysql.h"
extern void mysql_manager_close(MYSQL_MANAGER * con);
-# 580 "mysql.h"
+# 570 "mysql.h"
extern int mysql_manager_command(MYSQL_MANAGER * con, char const * cmd, int);
-# 574 "mysql.h"
+# 564 "mysql.h"
extern MYSQL_MANAGER * mysql_manager_connect(MYSQL_MANAGER * con, char const * host, char const * user, char const * passwd, unsigned int);
-# 582 "mysql.h"
+# 572 "mysql.h"
extern int mysql_manager_fetch_line(MYSQL_MANAGER * con, char * res_buf, int);
-# 573 "mysql.h"
+# 563 "mysql.h"
extern MYSQL_MANAGER * mysql_manager_init(MYSQL_MANAGER * con);
# 456 "mysql.h"
extern my_bool mysql_master_query(MYSQL * mysql, char const * q, unsigned long int);
# 458 "mysql.h"
extern my_bool mysql_master_send_query(MYSQL * mysql, char const * q, unsigned long int);
-# 837 "mysql.h"
+# 827 "mysql.h"
extern my_bool mysql_more_results(MYSQL * mysql);
-# 838 "mysql.h"
+# 828 "mysql.h"
extern int mysql_next_result(MYSQL * mysql);
# 412 "mysql.h"
extern unsigned int mysql_num_fields(MYSQL_RES * res);
# 411 "mysql.h"
extern my_ulonglong mysql_num_rows(MYSQL_RES * res);
-# 560 "mysql.h"
-extern char * mysql_odbc_escape_string(MYSQL * mysql, char * to, unsigned long int, char const * from, unsigned long int, void * param, char * (* extend_buffer)(void *, char * to, unsigned long int * length));
# 538 "mysql.h"
extern int mysql_options(MYSQL * mysql, enum mysql_option, void const * arg);
# 527 "mysql.h"
@@ -984,7 +982,7 @@ extern unsigned int mysql_port;
extern int mysql_query(MYSQL * mysql, char const * q);
# 780 "mysql/plugin.h"
extern void mysql_query_cache_invalidate4(void * thd, char const * key, unsigned int, int);
-# 585 "mysql.h"
+# 575 "mysql.h"
extern my_bool mysql_read_query_result(MYSQL * mysql);
# 500 "mysql.h"
extern my_bool mysql_reads_from_master_enabled(MYSQL * mysql);
@@ -996,7 +994,7 @@ extern unsigned long int mysql_real_escape_string(MYSQL * mysql, char * to, char
extern int mysql_real_query(MYSQL * mysql, char const * q, unsigned long int);
# 521 "mysql.h"
extern int mysql_refresh(MYSQL * mysql, unsigned int);
-# 835 "mysql.h"
+# 825 "mysql.h"
extern my_bool mysql_rollback(MYSQL * mysql);
# 543 "mysql.h"
extern MYSQL_ROW_OFFSET mysql_row_seek(MYSQL_RES * result, MYSQL_ROW_OFFSET);
@@ -1038,59 +1036,59 @@ extern char const * mysql_sqlstate(MYSQL * mysql);
extern my_bool mysql_ssl_set(MYSQL * mysql, char const * key, char const * cert, char const * ca, char const * capath, char const * cipher);
# 528 "mysql.h"
extern char const * mysql_stat(MYSQL * mysql);
-# 830 "mysql.h"
+# 820 "mysql.h"
extern my_ulonglong mysql_stmt_affected_rows(MYSQL_STMT * stmt);
-# 808 "mysql.h"
+# 798 "mysql.h"
extern my_bool mysql_stmt_attr_get(MYSQL_STMT * stmt, enum enum_stmt_attr_type, void * attr);
-# 805 "mysql.h"
+# 795 "mysql.h"
extern my_bool mysql_stmt_attr_set(MYSQL_STMT * stmt, enum enum_stmt_attr_type, void const * attr);
-# 811 "mysql.h"
+# 801 "mysql.h"
extern my_bool mysql_stmt_bind_param(MYSQL_STMT * stmt, MYSQL_BIND * bnd);
-# 812 "mysql.h"
+# 802 "mysql.h"
extern my_bool mysql_stmt_bind_result(MYSQL_STMT * stmt, MYSQL_BIND * bnd);
-# 813 "mysql.h"
+# 803 "mysql.h"
extern my_bool mysql_stmt_close(MYSQL_STMT * stmt);
-# 828 "mysql.h"
+# 818 "mysql.h"
extern void mysql_stmt_data_seek(MYSQL_STMT * stmt, my_ulonglong);
-# 822 "mysql.h"
+# 812 "mysql.h"
extern unsigned int mysql_stmt_errno(MYSQL_STMT * stmt);
-# 823 "mysql.h"
+# 813 "mysql.h"
extern char const * mysql_stmt_error(MYSQL_STMT * stmt);
-# 798 "mysql.h"
+# 788 "mysql.h"
extern int mysql_stmt_execute(MYSQL_STMT * stmt);
-# 799 "mysql.h"
+# 789 "mysql.h"
extern int mysql_stmt_fetch(MYSQL_STMT * stmt);
-# 800 "mysql.h"
+# 790 "mysql.h"
extern int mysql_stmt_fetch_column(MYSQL_STMT * stmt, MYSQL_BIND * bind_arg, unsigned int, unsigned long int);
-# 832 "mysql.h"
+# 822 "mysql.h"
extern unsigned int mysql_stmt_field_count(MYSQL_STMT * stmt);
-# 815 "mysql.h"
+# 805 "mysql.h"
extern my_bool mysql_stmt_free_result(MYSQL_STMT * stmt);
-# 795 "mysql.h"
+# 785 "mysql.h"
extern MYSQL_STMT * mysql_stmt_init(MYSQL * mysql);
-# 831 "mysql.h"
+# 821 "mysql.h"
extern my_ulonglong mysql_stmt_insert_id(MYSQL_STMT * stmt);
-# 829 "mysql.h"
+# 819 "mysql.h"
extern my_ulonglong mysql_stmt_num_rows(MYSQL_STMT * stmt);
-# 804 "mysql.h"
+# 794 "mysql.h"
extern unsigned long int mysql_stmt_param_count(MYSQL_STMT * stmt);
-# 821 "mysql.h"
+# 811 "mysql.h"
extern MYSQL_RES * mysql_stmt_param_metadata(MYSQL_STMT * stmt);
-# 796 "mysql.h"
+# 786 "mysql.h"
extern int mysql_stmt_prepare(MYSQL_STMT * stmt, char const * query, unsigned long int);
-# 814 "mysql.h"
+# 804 "mysql.h"
extern my_bool mysql_stmt_reset(MYSQL_STMT * stmt);
-# 820 "mysql.h"
+# 810 "mysql.h"
extern MYSQL_RES * mysql_stmt_result_metadata(MYSQL_STMT * stmt);
-# 825 "mysql.h"
+# 815 "mysql.h"
extern MYSQL_ROW_OFFSET mysql_stmt_row_seek(MYSQL_STMT * stmt, MYSQL_ROW_OFFSET);
-# 827 "mysql.h"
+# 817 "mysql.h"
extern MYSQL_ROW_OFFSET mysql_stmt_row_tell(MYSQL_STMT * stmt);
-# 816 "mysql.h"
+# 806 "mysql.h"
extern my_bool mysql_stmt_send_long_data(MYSQL_STMT * stmt, unsigned int, char const * data, unsigned long int);
-# 824 "mysql.h"
+# 814 "mysql.h"
extern char const * mysql_stmt_sqlstate(MYSQL_STMT * stmt);
-# 803 "mysql.h"
+# 793 "mysql.h"
extern int mysql_stmt_store_result(MYSQL_STMT * stmt);
# 452 "mysql.h"
extern MYSQL_RES * mysql_store_result(MYSQL * mysql);
@@ -1100,7 +1098,7 @@ extern void mysql_thread_end(void);
extern unsigned long int mysql_thread_id(MYSQL * mysql);
# 403 "mysql.h"
extern my_bool mysql_thread_init(void);
-# 571 "mysql.h"
+# 561 "mysql.h"
extern unsigned int mysql_thread_safe(void);
# 699 "mysql/plugin.h"
extern int mysql_tmpfile(char const * prefix);
@@ -1110,25 +1108,25 @@ extern char * mysql_unix_port;
extern MYSQL_RES * mysql_use_result(MYSQL * mysql);
# 426 "mysql.h"
extern unsigned int mysql_warning_count(MYSQL * mysql);
-# 346 "mysql_com.h"
+# 347 "mysql_com.h"
extern void net_clear(NET * net, my_bool);
-# 345 "mysql_com.h"
+# 346 "mysql_com.h"
extern void net_end(NET * net);
-# 348 "mysql_com.h"
+# 349 "mysql_com.h"
extern my_bool net_flush(NET * net);
-# 353 "mysql_com.h"
+# 354 "mysql_com.h"
extern int net_real_write(NET * net, unsigned char const * packet, size_t);
-# 347 "mysql_com.h"
+# 348 "mysql_com.h"
extern my_bool net_realloc(NET * net, size_t);
-# 350 "mysql_com.h"
+# 351 "mysql_com.h"
extern my_bool net_write_command(NET * net, unsigned char, unsigned char const * header, size_t, unsigned char const * packet, size_t);
-# 442 "mysql_com.h"
+# 443 "mysql_com.h"
extern char * octet2hex(char * to, char const * str, unsigned int);
-# 423 "mysql_com.h"
+# 424 "mysql_com.h"
extern void randominit(struct rand_struct *, unsigned long int, unsigned long int);
-# 437 "mysql_com.h"
+# 438 "mysql_com.h"
extern void scramble(char * to, char const * message, char const * password);
-# 430 "mysql_com.h"
+# 431 "mysql_com.h"
extern void scramble_323(char * to, char const * message, char const * password);
# 37 "typelib.h"
extern TYPELIB sql_protocol_typelib;
diff --git a/include/mysql_version.h.in b/include/mysql_version.h.in
index dac7ca661d1..04a43f2c968 100644
--- a/include/mysql_version.h.in
+++ b/include/mysql_version.h.in
@@ -15,6 +15,7 @@
#define FRM_VER @DOT_FRM_VERSION@
#define MYSQL_VERSION_ID @MYSQL_VERSION_ID@
#define MYSQL_PORT @MYSQL_TCP_PORT@
+#define MYSQL_PORT_DEFAULT @MYSQL_TCP_PORT_DEFAULT@
#define MYSQL_UNIX_ADDR "@MYSQL_UNIX_ADDR@"
#define MYSQL_CONFIG_NAME "my"
#define MYSQL_COMPILATION_COMMENT "@COMPILATION_COMMENT@"
diff --git a/include/queues.h b/include/queues.h
index 4fd0f72484e..d01b73ba999 100644
--- a/include/queues.h
+++ b/include/queues.h
@@ -31,8 +31,8 @@ typedef struct st_queue {
void *first_cmp_arg;
uint elements;
uint max_elements;
- uint offset_to_key; /* compare is done on element+offset */
- int max_at_top; /* Set if queue_top gives max */
+ uint offset_to_key; /* compare is done on element+offset */
+ int max_at_top; /* Normally 1, set to -1 if queue_top gives max */
int (*compare)(void *, uchar *,uchar *);
uint auto_extent;
} QUEUE;
@@ -43,7 +43,7 @@ typedef struct st_queue {
#define queue_replaced(queue) _downheap(queue,1)
#define queue_set_cmp_arg(queue, set_arg) (queue)->first_cmp_arg= set_arg
#define queue_set_max_at_top(queue, set_arg) \
- (queue)->max_at_top= set_arg ? (-1 ^ 1) : 0
+ (queue)->max_at_top= set_arg ? -1 : 1
typedef int (*queue_compare)(void *,uchar *, uchar *);
int init_queue(QUEUE *queue,uint max_elements,uint offset_to_key,
diff --git a/include/sql_common.h b/include/sql_common.h
index 80504140fae..56e7305130f 100644
--- a/include/sql_common.h
+++ b/include/sql_common.h
@@ -36,8 +36,10 @@ cli_advanced_command(MYSQL *mysql, enum enum_server_command command,
const unsigned char *arg, ulong arg_length,
my_bool skip_check, MYSQL_STMT *stmt);
unsigned long cli_safe_read(MYSQL *mysql);
-void set_stmt_errmsg(MYSQL_STMT * stmt, const char *err, int errcode,
- const char *sqlstate);
+void net_clear_error(NET *net);
+void set_stmt_errmsg(MYSQL_STMT *stmt, NET *net);
+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);
#ifdef __cplusplus
}
diff --git a/libmysql/CMakeLists.txt b/libmysql/CMakeLists.txt
index 1e93a7668cc..8ed723ea419 100755
--- a/libmysql/CMakeLists.txt
+++ b/libmysql/CMakeLists.txt
@@ -75,7 +75,7 @@ SET(CLIENT_SOURCES ../mysys/array.c ../strings/bchange.c ../strings/bmove.c
../mysys/hash.c ../mysys/my_sleep.c ../mysys/default_modify.c
get_password.c ../strings/int2str.c ../strings/is_prefix.c
libmysql.c ../mysys/list.c ../strings/llstr.c ../mysys/my_rnd.c
- ../strings/longlong2str.c manager.c ../mysys/mf_cache.c
+ ../strings/longlong2str.c manager.c ../mysys/mf_arr_appstr.c ../mysys/mf_cache.c
../mysys/mf_dirname.c ../mysys/mf_fn_ext.c ../mysys/mf_format.c
../mysys/mf_iocache.c ../mysys/mf_iocache2.c ../mysys/mf_loadpath.c
../mysys/mf_pack.c ../mysys/mf_path.c ../mysys/mf_tempfile.c ../mysys/mf_unixpath.c
@@ -97,7 +97,7 @@ SET(CLIENT_SOURCES ../mysys/array.c ../strings/bchange.c ../strings/bmove.c
../strings/strmov.c ../strings/strnlen.c ../strings/strnmov.c ../strings/strtod.c
../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
+ ../vio/viossl.c ../vio/viosslfactories.c ../strings/xml.c ../mysys/mf_qsort.c
../mysys/my_getsystime.c ${LIB_SOURCES})
# Need to set USE_TLS for building the DLL, since __declspec(thread)
@@ -126,9 +126,6 @@ ENDIF(WIN32)
ADD_DEPENDENCIES(libmysql GenError)
TARGET_LINK_LIBRARIES(libmysql wsock32)
-ADD_EXECUTABLE(myTest mytest.c)
-TARGET_LINK_LIBRARIES(myTest libmysql)
-
IF(EMBED_MANIFESTS)
MYSQL_EMBED_MANIFEST("myTest" "asInvoker")
ENDIF(EMBED_MANIFESTS)
diff --git a/libmysql/Makefile.am b/libmysql/Makefile.am
index e5005553467..21f8f372d0f 100644
--- a/libmysql/Makefile.am
+++ b/libmysql/Makefile.am
@@ -31,7 +31,7 @@ include $(srcdir)/Makefile.shared
libmysqlclient_la_SOURCES = $(target_sources)
libmysqlclient_la_LIBADD = $(target_libadd) $(yassl_las)
libmysqlclient_la_LDFLAGS = $(target_ldflags)
-EXTRA_DIST = Makefile.shared libmysql.def dll.c mytest.c CMakeLists.txt
+EXTRA_DIST = Makefile.shared libmysql.def dll.c CMakeLists.txt
noinst_HEADERS = client_settings.h
link_sources:
diff --git a/libmysql/Makefile.shared b/libmysql/Makefile.shared
index 24ab76f4053..cbee8673164 100644
--- a/libmysql/Makefile.shared
+++ b/libmysql/Makefile.shared
@@ -59,7 +59,7 @@ mysysobjects1 = my_init.lo my_static.lo my_malloc.lo my_realloc.lo \
mf_pack.lo my_messnc.lo mf_dirname.lo mf_fn_ext.lo\
mf_wcomp.lo typelib.lo safemalloc.lo my_alloc.lo \
mf_format.lo mf_path.lo mf_unixpath.lo my_fopen.lo \
- my_symlink.lo my_fstream.lo \
+ my_symlink.lo my_fstream.lo mf_arr_appstr.lo \
mf_loadpath.lo my_pthread.lo my_thr_init.lo \
thr_mutex.lo mulalloc.lo string.lo \
default.lo default_modify.lo \
@@ -73,7 +73,7 @@ sqlobjects = net.lo
sql_cmn_objects = pack.lo client.lo my_time.lo
# Not needed in the minimum library
-mysysobjects2 = my_lib.lo
+mysysobjects2 = my_lib.lo mf_qsort.lo
mysysobjects = $(mysysobjects1) $(mysysobjects2)
target_libadd = $(mysysobjects) $(mystringsobjects) $(dbugobjects) \
$(sql_cmn_objects) $(vio_objects) $(sqlobjects)
diff --git a/libmysql/client_settings.h b/libmysql/client_settings.h
index a803ff8372f..f87e625771f 100644
--- a/libmysql/client_settings.h
+++ b/libmysql/client_settings.h
@@ -63,3 +63,7 @@ int cli_read_change_user_result(MYSQL *mysql, char *buff, const char *passwd);
int init_embedded_server(int argc, char **argv, char **groups);
void end_embedded_server();
#endif /*EMBEDDED_LIBRARY*/
+
+C_MODE_START
+extern int mysql_init_character_set(MYSQL *mysql);
+C_MODE_END
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index 74435a1eb57..bf5dd7d63eb 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -133,10 +133,23 @@ int STDCALL mysql_server_init(int argc __attribute__((unused)),
{
struct servent *serv_ptr;
char *env;
- if ((serv_ptr = getservbyname("mysql", "tcp")))
- mysql_port = (uint) ntohs((ushort) serv_ptr->s_port);
- if ((env = getenv("MYSQL_TCP_PORT")))
- mysql_port =(uint) atoi(env);
+
+ /*
+ if builder specifically requested a default port, use that
+ (even if it coincides with our factory default).
+ only if they didn't do we check /etc/services (and, failing
+ on that, fall back to the factory default of 3306).
+ either default can be overridden by the environment variable
+ MYSQL_TCP_PORT, which in turn can be overridden with command
+ line options.
+ */
+
+#if MYSQL_PORT_DEFAULT == 0
+ if ((serv_ptr = getservbyname("mysql", "tcp")))
+ mysql_port = (uint) ntohs((ushort) serv_ptr->s_port);
+#endif
+ if ((env = getenv("MYSQL_TCP_PORT")))
+ mysql_port =(uint) atoi(env);
}
#endif
}
@@ -673,9 +686,7 @@ int cli_read_change_user_result(MYSQL *mysql, char *buff, const char *passwd)
if (my_net_write(net, (uchar*) buff, SCRAMBLE_LENGTH_323 + 1) ||
net_flush(net))
{
- net->last_errno= CR_SERVER_LOST;
- strmov(net->sqlstate, unknown_sqlstate);
- strmov(net->last_error,ER(net->last_errno));
+ set_mysql_error(mysql, CR_SERVER_LOST, unknown_sqlstate);
return 1;
}
/* Read what server thinks about out new auth message report */
@@ -685,21 +696,33 @@ int cli_read_change_user_result(MYSQL *mysql, char *buff, const char *passwd)
return 0;
}
-
my_bool STDCALL mysql_change_user(MYSQL *mysql, const char *user,
const char *passwd, const char *db)
{
- char buff[512],*end=buff;
+ char buff[USERNAME_LENGTH+SCRAMBLED_PASSWORD_CHAR_LENGTH+NAME_LEN+2];
+ char *end= buff;
int rc;
+ CHARSET_INFO *saved_cs= mysql->charset;
+
DBUG_ENTER("mysql_change_user");
+ /* Get the connection-default character set. */
+
+ if (mysql_init_character_set(mysql))
+ {
+ mysql->charset= saved_cs;
+ DBUG_RETURN(TRUE);
+ }
+
+ /* Use an empty string instead of NULL. */
+
if (!user)
user="";
if (!passwd)
passwd="";
/* Store user into the buffer */
- end=strmov(end,user)+1;
+ end= strmake(end, user, USERNAME_LENGTH) + 1;
/* write scrambled password according to server capabilities */
if (passwd[0])
@@ -719,7 +742,15 @@ my_bool STDCALL mysql_change_user(MYSQL *mysql, const char *user,
else
*end++= '\0'; /* empty password */
/* Add database if needed */
- end= strmov(end, db ? db : "") + 1;
+ 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);
@@ -743,6 +774,11 @@ my_bool STDCALL mysql_change_user(MYSQL *mysql, const char *user,
mysql->passwd=my_strdup(passwd,MYF(MY_WME));
mysql->db= db ? my_strdup(db,MYF(MY_WME)) : 0;
}
+ else
+ {
+ mysql->charset= saved_cs;
+ }
+
DBUG_RETURN(rc);
}
@@ -823,8 +859,7 @@ my_bool handle_local_infile(MYSQL *mysql, const char *net_filename)
/* copy filename into local memory and allocate read buffer */
if (!(buf=my_malloc(packet_length, MYF(0))))
{
- strmov(net->sqlstate, unknown_sqlstate);
- strmov(net->last_error, ER(net->last_errno=CR_OUT_OF_MEMORY));
+ set_mysql_error(mysql, CR_OUT_OF_MEMORY, unknown_sqlstate);
DBUG_RETURN(1);
}
@@ -850,9 +885,7 @@ my_bool handle_local_infile(MYSQL *mysql, const char *net_filename)
{
DBUG_PRINT("error",
("Lost connection to MySQL server during LOAD DATA of local file"));
- strmov(net->sqlstate, unknown_sqlstate);
- net->last_errno=CR_SERVER_LOST;
- strmov(net->last_error,ER(net->last_errno));
+ set_mysql_error(mysql, CR_SERVER_LOST, unknown_sqlstate);
goto err;
}
}
@@ -860,9 +893,7 @@ my_bool handle_local_infile(MYSQL *mysql, const char *net_filename)
/* Send empty packet to mark end of file */
if (my_net_write(net, (const uchar*) "", 0) || net_flush(net))
{
- strmov(net->sqlstate, unknown_sqlstate);
- net->last_errno=CR_SERVER_LOST;
- sprintf(net->last_error,ER(net->last_errno),errno);
+ set_mysql_error(mysql, CR_SERVER_LOST, unknown_sqlstate);
goto err;
}
@@ -1363,9 +1394,7 @@ const char *cli_read_statistics(MYSQL *mysql)
mysql->net.read_pos[mysql->packet_length]=0; /* End of stat string */
if (!mysql->net.read_pos[0])
{
- strmov(mysql->net.sqlstate, unknown_sqlstate);
- mysql->net.last_errno=CR_WRONG_HOST_INFO;
- strmov(mysql->net.last_error, ER(mysql->net.last_errno));
+ set_mysql_error(mysql, CR_WRONG_HOST_INFO, unknown_sqlstate);
return mysql->net.last_error;
}
return (char*) mysql->net.read_pos;
@@ -1600,78 +1629,6 @@ mysql_real_escape_string(MYSQL *mysql, char *to,const char *from,
return escape_string_for_mysql(mysql->charset, to, 0, from, length);
}
-
-char * STDCALL
-mysql_odbc_escape_string(MYSQL *mysql,
- char *to, ulong to_length,
- const char *from, ulong from_length,
- void *param,
- char * (*extend_buffer)
- (void *, char *, ulong *))
-{
- char *to_end=to+to_length-5;
- const char *end;
-#ifdef USE_MB
- my_bool use_mb_flag=use_mb(mysql->charset);
-#endif
-
- for (end=from+from_length; from != end ; from++)
- {
- if (to >= to_end)
- {
- to_length = (ulong) (end-from)+512; /* We want this much more */
- if (!(to=(*extend_buffer)(param, to, &to_length)))
- return to;
- to_end=to+to_length-5;
- }
-#ifdef USE_MB
- {
- int l;
- if (use_mb_flag && (l = my_ismbchar(mysql->charset, from, end)))
- {
- while (l--)
- *to++ = *from++;
- from--;
- continue;
- }
- }
-#endif
- switch (*from) {
- case 0: /* Must be escaped for 'mysql' */
- *to++= '\\';
- *to++= '0';
- break;
- case '\n': /* Must be escaped for logs */
- *to++= '\\';
- *to++= 'n';
- break;
- case '\r':
- *to++= '\\';
- *to++= 'r';
- break;
- case '\\':
- *to++= '\\';
- *to++= '\\';
- break;
- case '\'':
- *to++= '\\';
- *to++= '\'';
- break;
- case '"': /* Better safe than sorry */
- *to++= '\\';
- *to++= '"';
- break;
- case '\032': /* This gives problems on Win32 */
- *to++= '\\';
- *to++= 'Z';
- break;
- default:
- *to++= *from;
- }
- }
- return to;
-}
-
void STDCALL
myodbc_remove_escape(MYSQL *mysql,char *name)
{
@@ -1811,24 +1768,17 @@ static my_bool my_realloc_str(NET *net, ulong length)
if (buf_length + length > net->max_packet)
{
res= net_realloc(net, buf_length + length);
+ if (res)
+ {
+ strmov(net->sqlstate, unknown_sqlstate);
+ strmov(net->last_error, ER(net->last_errno));
+ }
net->write_pos= net->buff+ buf_length;
}
DBUG_RETURN(res);
}
-/* Clear possible error statee of struct NET */
-
-static void net_clear_error(NET *net)
-{
- if (net->last_errno)
- {
- net->last_errno= 0;
- net->last_error[0]= '\0';
- strmov(net->sqlstate, not_error_sqlstate);
- }
-}
-
static void stmt_clear_error(MYSQL_STMT *stmt)
{
if (stmt->last_errno)
@@ -1839,18 +1789,21 @@ static void stmt_clear_error(MYSQL_STMT *stmt)
}
}
-/*
+/**
Set statement error code, sqlstate, and error message
from given errcode and sqlstate.
*/
-static void set_stmt_error(MYSQL_STMT * stmt, int errcode,
- const char *sqlstate)
+void set_stmt_error(MYSQL_STMT * stmt, int errcode,
+ const char *sqlstate, const char *err)
{
DBUG_ENTER("set_stmt_error");
DBUG_PRINT("enter", ("error: %d '%s'", errcode, ER(errcode)));
DBUG_ASSERT(stmt != 0);
+ if (err == 0)
+ err= ER(errcode);
+
stmt->last_errno= errcode;
strmov(stmt->last_error, ER(errcode));
strmov(stmt->sqlstate, sqlstate);
@@ -1859,21 +1812,24 @@ static void set_stmt_error(MYSQL_STMT * stmt, int errcode,
}
-/*
- Set statement error code, sqlstate, and error message.
+/**
+ Set statement error code, sqlstate, and error message from NET.
+
+ @param stmt a statement handle. Copy the error here.
+ @param net mysql->net. Source of the error.
*/
-void set_stmt_errmsg(MYSQL_STMT * stmt, const char *err, int errcode,
- const char *sqlstate)
+void set_stmt_errmsg(MYSQL_STMT *stmt, NET *net)
{
DBUG_ENTER("set_stmt_errmsg");
- DBUG_PRINT("enter", ("error: %d/%s '%s'", errcode, sqlstate, err));
+ DBUG_PRINT("enter", ("error: %d/%s '%s'", net->last_errno, net->sqlstate,
+ net->last_error));
DBUG_ASSERT(stmt != 0);
- stmt->last_errno= errcode;
- if (err && err[0])
- strmov(stmt->last_error, err);
- strmov(stmt->sqlstate, sqlstate);
+ stmt->last_errno= net->last_errno;
+ if (net->last_error && net->last_error[0])
+ strmov(stmt->last_error, net->last_error);
+ strmov(stmt->sqlstate, net->sqlstate);
DBUG_VOID_RETURN;
}
@@ -2048,7 +2004,7 @@ mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, ulong length)
if (!mysql)
{
/* mysql can be reset in mysql_close called from mysql_reconnect */
- set_stmt_error(stmt, CR_SERVER_LOST, unknown_sqlstate);
+ set_stmt_error(stmt, CR_SERVER_LOST, unknown_sqlstate, NULL);
DBUG_RETURN(1);
}
@@ -2086,23 +2042,20 @@ mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, ulong length)
stmt->state= MYSQL_STMT_INIT_DONE;
if (stmt_command(mysql, COM_STMT_CLOSE, buff, 4, stmt))
{
- set_stmt_errmsg(stmt, mysql->net.last_error, mysql->net.last_errno,
- mysql->net.sqlstate);
+ set_stmt_errmsg(stmt, &mysql->net);
DBUG_RETURN(1);
}
}
if (stmt_command(mysql, COM_STMT_PREPARE, (const uchar*) query, length, stmt))
{
- set_stmt_errmsg(stmt, mysql->net.last_error, mysql->net.last_errno,
- mysql->net.sqlstate);
+ set_stmt_errmsg(stmt, &mysql->net);
DBUG_RETURN(1);
}
if ((*mysql->methods->read_prepare_result)(mysql, stmt))
{
- set_stmt_errmsg(stmt, mysql->net.last_error, mysql->net.last_errno,
- mysql->net.sqlstate);
+ set_stmt_errmsg(stmt, &mysql->net);
DBUG_RETURN(1);
}
@@ -2117,7 +2070,7 @@ mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, ulong length)
(stmt->param_count +
stmt->field_count))))
{
- set_stmt_error(stmt, CR_OUT_OF_MEMORY, unknown_sqlstate);
+ set_stmt_error(stmt, CR_OUT_OF_MEMORY, unknown_sqlstate, NULL);
DBUG_RETURN(1);
}
stmt->bind= stmt->params + stmt->param_count;
@@ -2247,7 +2200,7 @@ mysql_stmt_result_metadata(MYSQL_STMT *stmt)
if (!(result=(MYSQL_RES*) my_malloc(sizeof(*result),
MYF(MY_WME | MY_ZEROFILL))))
{
- set_stmt_error(stmt, CR_OUT_OF_MEMORY, unknown_sqlstate);
+ set_stmt_error(stmt, CR_OUT_OF_MEMORY, unknown_sqlstate, NULL);
DBUG_RETURN(0);
}
@@ -2480,7 +2433,7 @@ static my_bool store_param(MYSQL_STMT *stmt, MYSQL_BIND *param)
*/
if ((my_realloc_str(net, *param->length)))
{
- set_stmt_error(stmt, net->last_errno, unknown_sqlstate);
+ set_stmt_errmsg(stmt, net);
DBUG_RETURN(1);
}
(*param->store_param_func)(net, param);
@@ -2502,7 +2455,7 @@ static my_bool execute(MYSQL_STMT *stmt, char *packet, ulong length)
5 /* execution flags */];
my_bool res;
DBUG_ENTER("execute");
- DBUG_DUMP("packet", packet, length);
+ DBUG_DUMP("packet", (uchar *) packet, length);
mysql->last_used_con= mysql;
int4store(buff, stmt->stmt_id); /* Send stmt id to server */
@@ -2517,7 +2470,7 @@ static my_bool execute(MYSQL_STMT *stmt, char *packet, ulong length)
stmt->insert_id= mysql->insert_id;
if (res)
{
- set_stmt_errmsg(stmt, net->last_error, net->last_errno, net->sqlstate);
+ set_stmt_errmsg(stmt, net);
DBUG_RETURN(1);
}
DBUG_RETURN(0);
@@ -2540,13 +2493,13 @@ int cli_stmt_execute(MYSQL_STMT *stmt)
if (!stmt->bind_param_done)
{
- set_stmt_error(stmt, CR_PARAMS_NOT_BOUND, unknown_sqlstate);
+ set_stmt_error(stmt, CR_PARAMS_NOT_BOUND, unknown_sqlstate, NULL);
DBUG_RETURN(1);
}
if (mysql->status != MYSQL_STATUS_READY ||
mysql->server_status & SERVER_MORE_RESULTS_EXISTS)
{
- set_stmt_error(stmt, CR_COMMANDS_OUT_OF_SYNC, unknown_sqlstate);
+ set_stmt_error(stmt, CR_COMMANDS_OUT_OF_SYNC, unknown_sqlstate, NULL);
DBUG_RETURN(1);
}
@@ -2555,7 +2508,7 @@ int cli_stmt_execute(MYSQL_STMT *stmt)
null_count= (stmt->param_count+7) /8;
if (my_realloc_str(net, null_count + 1))
{
- set_stmt_error(stmt, net->last_errno, unknown_sqlstate);
+ set_stmt_errmsg(stmt, net);
DBUG_RETURN(1);
}
bzero((char*) net->write_pos, null_count);
@@ -2568,7 +2521,7 @@ int cli_stmt_execute(MYSQL_STMT *stmt)
{
if (my_realloc_str(net, 2 * stmt->param_count))
{
- set_stmt_error(stmt, net->last_errno, unknown_sqlstate);
+ set_stmt_errmsg(stmt, net);
DBUG_RETURN(1);
}
/*
@@ -2591,7 +2544,7 @@ int cli_stmt_execute(MYSQL_STMT *stmt)
/* TODO: Look into avoding the following memdup */
if (!(param_data= my_memdup(net->buff, length, MYF(0))))
{
- set_stmt_error(stmt, CR_OUT_OF_MEMORY, unknown_sqlstate);
+ set_stmt_error(stmt, CR_OUT_OF_MEMORY, unknown_sqlstate, NULL);
DBUG_RETURN(1);
}
result= execute(stmt, param_data, length);
@@ -2655,20 +2608,19 @@ static int stmt_read_row_unbuffered(MYSQL_STMT *stmt, unsigned char **row)
*/
if (!mysql)
{
- set_stmt_error(stmt, CR_SERVER_LOST, unknown_sqlstate);
+ set_stmt_error(stmt, CR_SERVER_LOST, unknown_sqlstate, NULL);
return 1;
}
if (mysql->status != MYSQL_STATUS_GET_RESULT)
{
set_stmt_error(stmt, stmt->unbuffered_fetch_cancelled ?
CR_FETCH_CANCELED : CR_COMMANDS_OUT_OF_SYNC,
- unknown_sqlstate);
+ unknown_sqlstate, NULL);
goto error;
}
if ((*mysql->methods->unbuffered_fetch)(mysql, (char**) row))
{
- set_stmt_errmsg(stmt, mysql->net.last_error, mysql->net.last_errno,
- mysql->net.sqlstate);
+ set_stmt_errmsg(stmt, &mysql->net);
/*
If there was an error, there are no more pending rows:
reset statement status to not hang up in following
@@ -2729,7 +2681,7 @@ stmt_read_row_from_cursor(MYSQL_STMT *stmt, unsigned char **row)
buff, sizeof(buff), (uchar*) 0, 0,
1, NULL))
{
- set_stmt_errmsg(stmt, net->last_error, net->last_errno, net->sqlstate);
+ set_stmt_errmsg(stmt, net);
return 1;
}
if ((*mysql->methods->read_rows_from_cursor)(stmt))
@@ -2760,7 +2712,7 @@ static int
stmt_read_row_no_result_set(MYSQL_STMT *stmt __attribute__((unused)),
unsigned char **row __attribute__((unused)))
{
- set_stmt_error(stmt, CR_NO_RESULT_SET, unknown_sqlstate);
+ set_stmt_error(stmt, CR_NO_RESULT_SET, unknown_sqlstate, NULL);
return 1;
}
@@ -2810,7 +2762,7 @@ my_bool STDCALL mysql_stmt_attr_set(MYSQL_STMT *stmt,
}
return FALSE;
err_not_implemented:
- set_stmt_error(stmt, CR_NOT_IMPLEMENTED, unknown_sqlstate);
+ set_stmt_error(stmt, CR_NOT_IMPLEMENTED, unknown_sqlstate, NULL);
return TRUE;
}
@@ -3195,7 +3147,7 @@ my_bool STDCALL mysql_stmt_bind_param(MYSQL_STMT *stmt, MYSQL_BIND *my_bind)
{
if ((int) stmt->state < (int) MYSQL_STMT_PREPARE_DONE)
{
- set_stmt_error(stmt, CR_NO_PREPARE_STMT, unknown_sqlstate);
+ set_stmt_error(stmt, CR_NO_PREPARE_STMT, unknown_sqlstate, NULL);
DBUG_RETURN(1);
}
DBUG_RETURN(0);
@@ -3360,7 +3312,7 @@ mysql_stmt_send_long_data(MYSQL_STMT *stmt, uint param_number,
*/
if (param_number >= stmt->param_count)
{
- set_stmt_error(stmt, CR_INVALID_PARAMETER_NO, unknown_sqlstate);
+ set_stmt_error(stmt, CR_INVALID_PARAMETER_NO, unknown_sqlstate, NULL);
DBUG_RETURN(1);
}
@@ -3396,8 +3348,7 @@ mysql_stmt_send_long_data(MYSQL_STMT *stmt, uint param_number,
buff, sizeof(buff), (uchar*) data,
length, 1, NULL))
{
- set_stmt_errmsg(stmt, mysql->net.last_error,
- mysql->net.last_errno, mysql->net.sqlstate);
+ set_stmt_errmsg(stmt, &mysql->net);
DBUG_RETURN(1);
}
}
@@ -3860,7 +3811,20 @@ static void fetch_float_with_conversion(MYSQL_BIND *param, MYSQL_FIELD *field,
sprintf(buff, "%.*f", (int) field->decimals, value);
end= strend(buff);
}
- fetch_string_with_conversion(param, buff, (uint) (end - buff));
+
+ {
+ size_t length= end - buff;
+ if (field->flags & ZEROFILL_FLAG && length < field->length &&
+ field->length < MAX_DOUBLE_STRING_REP_LENGTH - 1)
+ {
+ bmove_upp((uchar*) buff + field->length, (uchar*) buff + length,
+ length);
+ bfill((char*) buff, field->length - length, '0');
+ length= field->length;
+ }
+ fetch_string_with_conversion(param, buff, length);
+ }
+
break;
}
}
@@ -4352,6 +4316,7 @@ static my_bool setup_one_fetch_function(MYSQL_BIND *param, MYSQL_FIELD *field)
case MYSQL_TYPE_STRING:
case MYSQL_TYPE_DECIMAL:
case MYSQL_TYPE_NEWDECIMAL:
+ case MYSQL_TYPE_NEWDATE:
DBUG_ASSERT(param->buffer_length != 0);
param->fetch_result= fetch_result_str;
break;
@@ -4424,6 +4389,7 @@ static my_bool setup_one_fetch_function(MYSQL_BIND *param, MYSQL_FIELD *field)
case MYSQL_TYPE_VAR_STRING:
case MYSQL_TYPE_STRING:
case MYSQL_TYPE_BIT:
+ case MYSQL_TYPE_NEWDATE:
param->skip_result= skip_result_string;
break;
default:
@@ -4451,7 +4417,7 @@ my_bool STDCALL mysql_stmt_bind_result(MYSQL_STMT *stmt, MYSQL_BIND *my_bind)
{
int errorcode= (int) stmt->state < (int) MYSQL_STMT_PREPARE_DONE ?
CR_NO_PREPARE_STMT : CR_NO_STMT_METADATA;
- set_stmt_error(stmt, errorcode, unknown_sqlstate);
+ set_stmt_error(stmt, errorcode, unknown_sqlstate, NULL);
DBUG_RETURN(1);
}
@@ -4631,12 +4597,12 @@ int STDCALL mysql_stmt_fetch_column(MYSQL_STMT *stmt, MYSQL_BIND *my_bind,
if ((int) stmt->state < (int) MYSQL_STMT_FETCH_DONE)
{
- set_stmt_error(stmt, CR_NO_DATA, unknown_sqlstate);
+ set_stmt_error(stmt, CR_NO_DATA, unknown_sqlstate, NULL);
return 1;
}
if (column >= stmt->field_count)
{
- set_stmt_error(stmt, CR_INVALID_PARAMETER_NO, unknown_sqlstate);
+ set_stmt_error(stmt, CR_INVALID_PARAMETER_NO, unknown_sqlstate, NULL);
DBUG_RETURN(1);
}
@@ -4679,10 +4645,10 @@ int cli_read_binary_rows(MYSQL_STMT *stmt)
NET *net;
DBUG_ENTER("cli_read_binary_rows");
-
+
if (!mysql)
{
- set_stmt_error(stmt, CR_SERVER_LOST, unknown_sqlstate);
+ set_stmt_error(stmt, CR_SERVER_LOST, unknown_sqlstate, NULL);
DBUG_RETURN(1);
}
@@ -4697,7 +4663,7 @@ int cli_read_binary_rows(MYSQL_STMT *stmt)
if (!(cur= (MYSQL_ROWS*) alloc_root(&result->alloc,
sizeof(MYSQL_ROWS) + pkt_len - 1)))
{
- set_stmt_error(stmt, CR_OUT_OF_MEMORY, unknown_sqlstate);
+ set_stmt_error(stmt, CR_OUT_OF_MEMORY, unknown_sqlstate, NULL);
goto err;
}
cur->data= (MYSQL_ROW) (cur+1);
@@ -4718,7 +4684,7 @@ int cli_read_binary_rows(MYSQL_STMT *stmt)
DBUG_RETURN(0);
}
}
- set_stmt_errmsg(stmt, net->last_error, net->last_errno, net->sqlstate);
+ set_stmt_errmsg(stmt, net);
err:
DBUG_RETURN(1);
@@ -4785,7 +4751,7 @@ int STDCALL mysql_stmt_store_result(MYSQL_STMT *stmt)
if ((int) stmt->state < (int) MYSQL_STMT_EXECUTE_DONE)
{
- set_stmt_error(stmt, CR_COMMANDS_OUT_OF_SYNC, unknown_sqlstate);
+ set_stmt_error(stmt, CR_COMMANDS_OUT_OF_SYNC, unknown_sqlstate, NULL);
DBUG_RETURN(1);
}
@@ -4805,13 +4771,13 @@ int STDCALL mysql_stmt_store_result(MYSQL_STMT *stmt)
if (cli_advanced_command(mysql, COM_STMT_FETCH, buff, sizeof(buff),
(uchar*) 0, 0, 1, NULL))
{
- set_stmt_errmsg(stmt, net->last_error, net->last_errno, net->sqlstate);
+ set_stmt_errmsg(stmt, net);
DBUG_RETURN(1);
}
}
else if (mysql->status != MYSQL_STATUS_GET_RESULT)
{
- set_stmt_error(stmt, CR_COMMANDS_OUT_OF_SYNC, unknown_sqlstate);
+ set_stmt_error(stmt, CR_COMMANDS_OUT_OF_SYNC, unknown_sqlstate, NULL);
DBUG_RETURN(1);
}
@@ -4992,8 +4958,7 @@ static my_bool reset_stmt_handle(MYSQL_STMT *stmt, uint flags)
if ((*mysql->methods->advanced_command)(mysql, COM_STMT_RESET, buff,
sizeof(buff), 0, 0, 0, NULL))
{
- set_stmt_errmsg(stmt, mysql->net.last_error, mysql->net.last_errno,
- mysql->net.sqlstate);
+ set_stmt_errmsg(stmt, &mysql->net);
stmt->state= MYSQL_STMT_INIT_DONE;
return 1;
}
@@ -5066,8 +5031,7 @@ my_bool STDCALL mysql_stmt_close(MYSQL_STMT *stmt)
int4store(buff, stmt->stmt_id);
if ((rc= stmt_command(mysql, COM_STMT_CLOSE, buff, 4, stmt)))
{
- set_stmt_errmsg(stmt, mysql->net.last_error, mysql->net.last_errno,
- mysql->net.sqlstate);
+ set_stmt_errmsg(stmt, &mysql->net);
}
}
}
@@ -5088,7 +5052,7 @@ my_bool STDCALL mysql_stmt_reset(MYSQL_STMT *stmt)
if (!stmt->mysql)
{
/* mysql can be reset in mysql_close called from mysql_reconnect */
- set_stmt_error(stmt, CR_SERVER_LOST, unknown_sqlstate);
+ set_stmt_error(stmt, CR_SERVER_LOST, unknown_sqlstate, NULL);
DBUG_RETURN(1);
}
/* Reset the client and server sides of the prepared statement */
@@ -5192,15 +5156,11 @@ int STDCALL mysql_next_result(MYSQL *mysql)
if (mysql->status != MYSQL_STATUS_READY)
{
- strmov(mysql->net.sqlstate, unknown_sqlstate);
- strmov(mysql->net.last_error,
- ER(mysql->net.last_errno=CR_COMMANDS_OUT_OF_SYNC));
+ set_mysql_error(mysql, CR_COMMANDS_OUT_OF_SYNC, unknown_sqlstate);
DBUG_RETURN(1);
}
- mysql->net.last_error[0]= 0;
- mysql->net.last_errno= 0;
- strmov(mysql->net.sqlstate, not_error_sqlstate);
+ net_clear_error(&mysql->net);
mysql->affected_rows= ~(my_ulonglong) 0;
if (mysql->last_used_con->server_status & SERVER_MORE_RESULTS_EXISTS)
diff --git a/libmysql/libmysql.def b/libmysql/libmysql.def
index 8c6b71d9553..81f86dc8726 100644
--- a/libmysql/libmysql.def
+++ b/libmysql/libmysql.def
@@ -78,7 +78,6 @@ EXPORTS
mysql_next_result
mysql_num_fields
mysql_num_rows
- mysql_odbc_escape_string
mysql_options
mysql_stmt_param_count
mysql_stmt_param_metadata
diff --git a/libmysql/mytest.c b/libmysql/mytest.c
deleted file mode 100644
index 2d5c576b72a..00000000000
--- a/libmysql/mytest.c
+++ /dev/null
@@ -1,175 +0,0 @@
-/*C4*/
-/****************************************************************/
-/* Author: Jethro Wright, III TS : 3/ 4/1998 9:15 */
-/* Date: 02/18/1998 */
-/* mytest.c : do some testing of the libmySQL.DLL.... */
-/* */
-/* History: */
-/* 02/18/1998 jw3 also sprach zarathustra.... */
-/****************************************************************/
-
-
-#include <windows.h>
-#include <stdio.h>
-#include <string.h>
-
-#include <mysql.h>
-
-#define DEFALT_SQL_STMT "SELECT * FROM db"
-#ifndef offsetof
-#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
-#endif
-
-
-/********************************************************
-**
-** main :-
-**
-********************************************************/
-
-int
-main( int argc, char * argv[] )
-{
-
- char szSQL[ 200 ], aszFlds[ 25 ][ 25 ], szDB[ 50 ] ;
- const char *pszT;
- int i, j, k, l, x ;
- MYSQL * myData ;
- MYSQL_RES * res ;
- MYSQL_FIELD * fd ;
- MYSQL_ROW row ;
-
- //....just curious....
- printf( "sizeof( MYSQL ) == %d\n", (int) sizeof( MYSQL ) ) ;
- if ( argc == 2 )
- {
- strcpy( szDB, argv[ 1 ] ) ;
- strcpy( szSQL, DEFALT_SQL_STMT ) ;
- if (!strcmp(szDB,"--debug"))
- {
- strcpy( szDB, "mysql" ) ;
- printf("Some mysql struct information (size and offset):\n");
- printf("net:\t%3d %3d\n",(int) sizeof(myData->net),
- (int) offsetof(MYSQL,net));
- printf("host:\t%3d %3d\n",(int) sizeof(myData->host),
- (int) offsetof(MYSQL,host));
- printf("port:\t%3d %3d\n", (int) sizeof(myData->port),
- (int) offsetof(MYSQL,port));
- printf("protocol_version:\t%3d %3d\n",
- (int) sizeof(myData->protocol_version),
- (int) offsetof(MYSQL,protocol_version));
- printf("thread_id:\t%3d %3d\n",(int) sizeof(myData->thread_id),
- (int) offsetof(MYSQL,thread_id));
- printf("affected_rows:\t%3d %3d\n",(int) sizeof(myData->affected_rows),
- (int) offsetof(MYSQL,affected_rows));
- printf("packet_length:\t%3d %3d\n",(int) sizeof(myData->packet_length),
- (int) offsetof(MYSQL,packet_length));
- printf("status:\t%3d %3d\n",(int) sizeof(myData->status),
- (int) offsetof(MYSQL,status));
- printf("fields:\t%3d %3d\n",(int) sizeof(myData->fields),
- (int) offsetof(MYSQL,fields));
- printf("field_alloc:\t%3d %3d\n",(int) sizeof(myData->field_alloc),
- (int) offsetof(MYSQL,field_alloc));
- printf("free_me:\t%3d %3d\n",(int) sizeof(myData->free_me),
- (int) offsetof(MYSQL,free_me));
- printf("options:\t%3d %3d\n",(int) sizeof(myData->options),
- (int) offsetof(MYSQL,options));
- puts("");
- }
- }
- else if ( argc > 2 ) {
- strcpy( szDB, argv[ 1 ] ) ;
- strcpy( szSQL, argv[ 2 ] ) ;
- }
- else {
- strcpy( szDB, "mysql" ) ;
- strcpy( szSQL, DEFALT_SQL_STMT ) ;
- }
- //....
-
- if ( (myData = mysql_init((MYSQL*) 0)) &&
- mysql_real_connect( myData, NULL, NULL, NULL, NULL, MYSQL_PORT,
- NULL, 0 ) )
- {
- myData->reconnect= 1;
- if ( mysql_select_db( myData, szDB ) < 0 ) {
- printf( "Can't select the %s database !\n", szDB ) ;
- mysql_close( myData ) ;
- return 2 ;
- }
- }
- else {
- printf( "Can't connect to the mysql server on port %d !\n",
- MYSQL_PORT ) ;
- mysql_close( myData ) ;
- return 1 ;
- }
- //....
- if ( ! mysql_query( myData, szSQL ) ) {
- res = mysql_store_result( myData ) ;
- i = (int) mysql_num_rows( res ) ; l = 1 ;
- printf( "Query: %s\nNumber of records found: %ld\n", szSQL, i ) ;
- //....we can get the field-specific characteristics here....
- for ( x = 0 ; fd = mysql_fetch_field( res ) ; x++ )
- strcpy( aszFlds[ x ], fd->name ) ;
- //....
- while ( row = mysql_fetch_row( res ) ) {
- j = mysql_num_fields( res ) ;
- printf( "Record #%ld:-\n", l++ ) ;
- for ( k = 0 ; k < j ; k++ )
- printf( " Fld #%d (%s): %s\n", k + 1, aszFlds[ k ],
- (((row[k]==NULL)||(!strlen(row[k])))?"NULL":row[k])) ;
- puts( "==============================\n" ) ;
- }
- mysql_free_result( res ) ;
- }
- else printf( "Couldn't execute %s on the server !\n", szSQL ) ;
- //....
- puts( "==== Diagnostic info ====" ) ;
- pszT = mysql_get_client_info() ;
- printf( "Client info: %s\n", pszT ) ;
- //....
- pszT = mysql_get_host_info( myData ) ;
- printf( "Host info: %s\n", pszT ) ;
- //....
- pszT = mysql_get_server_info( myData ) ;
- printf( "Server info: %s\n", pszT ) ;
- //....
- res = mysql_list_processes( myData ) ; l = 1 ;
- if (res)
- {
- for ( x = 0 ; fd = mysql_fetch_field( res ) ; x++ )
- strcpy( aszFlds[ x ], fd->name ) ;
- while ( row = mysql_fetch_row( res ) ) {
- j = mysql_num_fields( res ) ;
- printf( "Process #%ld:-\n", l++ ) ;
- for ( k = 0 ; k < j ; k++ )
- printf( " Fld #%d (%s): %s\n", k + 1, aszFlds[ k ],
- (((row[k]==NULL)||(!strlen(row[k])))?"NULL":row[k])) ;
- puts( "==============================\n" ) ;
- }
- }
- else
- {
- printf("Got error %s when retreiving processlist\n",mysql_error(myData));
- }
- //....
- res = mysql_list_tables( myData, "%" ) ; l = 1 ;
- for ( x = 0 ; fd = mysql_fetch_field( res ) ; x++ )
- strcpy( aszFlds[ x ], fd->name ) ;
- while ( row = mysql_fetch_row( res ) ) {
- j = mysql_num_fields( res ) ;
- printf( "Table #%ld:-\n", l++ ) ;
- for ( k = 0 ; k < j ; k++ )
- printf( " Fld #%d (%s): %s\n", k + 1, aszFlds[ k ],
- (((row[k]==NULL)||(!strlen(row[k])))?"NULL":row[k])) ;
- puts( "==============================\n" ) ;
- }
- //....
- pszT = mysql_stat( myData ) ;
- puts( pszT ) ;
- //....
- mysql_close( myData ) ;
- return 0 ;
-
-}
diff --git a/libmysqld/CMakeLists.txt b/libmysqld/CMakeLists.txt
index fb3316c303c..9fa7d46d466 100644
--- a/libmysqld/CMakeLists.txt
+++ b/libmysqld/CMakeLists.txt
@@ -22,7 +22,7 @@ IF(WIN32)
ADD_DEFINITIONS(-DUSE_TLS)
ENDIF(WIN32)
-ADD_DEFINITIONS(-DMYSQL_SERVER -DEMBEDDED_LIBRARY)
+ADD_DEFINITIONS(-DMYSQL_SERVER -DEMBEDDED_LIBRARY -DHAVE_DLOPEN)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/libmysqld
diff --git a/libmysqld/emb_qcache.cc b/libmysqld/emb_qcache.cc
index 17549bfa96b..6693627e05e 100644
--- a/libmysqld/emb_qcache.cc
+++ b/libmysqld/emb_qcache.cc
@@ -19,7 +19,7 @@
#include "emb_qcache.h"
#include "embedded_priv.h"
-void Querycache_stream::store_char(char c)
+void Querycache_stream::store_uchar(uchar c)
{
if (data_end == cur_data)
use_next_block(TRUE);
@@ -142,7 +142,7 @@ void Querycache_stream::store_safe_str(const char *str, uint str_len)
store_int(0);
}
-char Querycache_stream::load_char()
+uchar Querycache_stream::load_uchar()
{
if (cur_data == data_end)
use_next_block(FALSE);
@@ -301,8 +301,8 @@ uint emb_count_querycache_size(THD *thd)
*data->embedded_info->prev_ptr= NULL; // this marks the last record
cur_row= data->data;
n_rows= data->rows;
- /* n_fields + n_rows + (field_info + strlen * n_rows) * n_fields */
- result+= (uint) (4+8 + (42 + 4*n_rows)*data->fields);
+ /* n_fields + n_rows + field_info * n_fields */
+ result+= (uint) (4+8 + 42*data->fields);
for(; field < field_end; field++)
{
@@ -313,13 +313,23 @@ uint emb_count_querycache_size(THD *thd)
result+= field->def_length;
}
- for (; cur_row; cur_row=cur_row->next)
+ if (thd->protocol == &thd->protocol_binary)
{
- MYSQL_ROW col= cur_row->data;
- MYSQL_ROW col_end= col + data->fields;
- for (; col < col_end; col++)
- if (*col)
- result+= *(uint *)((*col) - sizeof(uint));
+ result+= (uint) (4*n_rows);
+ for (; cur_row; cur_row=cur_row->next)
+ result+= cur_row->length;
+ }
+ else
+ {
+ result+= (uint) (4*n_rows*data->fields);
+ for (; cur_row; cur_row=cur_row->next)
+ {
+ MYSQL_ROW col= cur_row->data;
+ MYSQL_ROW col_end= col + data->fields;
+ for (; col < col_end; col++)
+ if (*col)
+ result+= *(uint *)((*col) - sizeof(uint));
+ }
}
return result;
}
@@ -353,10 +363,10 @@ void emb_store_querycache_result(Querycache_stream *dst, THD *thd)
{
dst->store_int((uint)field->length);
dst->store_int((uint)field->max_length);
- dst->store_char((char)field->type);
+ dst->store_uchar((uchar)field->type);
dst->store_short((ushort)field->flags);
dst->store_short((ushort)field->charsetnr);
- dst->store_char((char)field->decimals);
+ dst->store_uchar((uchar)field->decimals);
dst->store_str(field->name, field->name_length);
dst->store_str(field->table, field->table_length);
dst->store_str(field->org_name, field->org_name_length);
@@ -366,14 +376,22 @@ void emb_store_querycache_result(Querycache_stream *dst, THD *thd)
dst->store_safe_str(field->def, field->def_length);
}
- for (; cur_row; cur_row=cur_row->next)
+ if (thd->protocol == &thd->protocol_binary)
{
- MYSQL_ROW col= cur_row->data;
- MYSQL_ROW col_end= col + data->fields;
- for (; col < col_end; col++)
+ for (; cur_row; cur_row=cur_row->next)
+ dst->store_str((char *) cur_row->data, cur_row->length);
+ }
+ else
+ {
+ for (; cur_row; cur_row=cur_row->next)
{
- uint len= *col ? *(uint *)((*col) - sizeof(uint)) : 0;
- dst->store_safe_str(*col, len);
+ MYSQL_ROW col= cur_row->data;
+ MYSQL_ROW col_end= col + data->fields;
+ for (; col < col_end; col++)
+ {
+ uint len= *col ? *(uint *)((*col) - sizeof(uint)) : 0;
+ dst->store_safe_str(*col, len);
+ }
}
}
DBUG_ASSERT(emb_count_querycache_size(thd) == dst->stored_size);
@@ -408,10 +426,10 @@ int emb_load_querycache_result(THD *thd, Querycache_stream *src)
{
field->length= src->load_int();
field->max_length= (unsigned int)src->load_int();
- field->type= (enum enum_field_types)src->load_char();
+ field->type= (enum enum_field_types)src->load_uchar();
field->flags= (unsigned int)src->load_short();
field->charsetnr= (unsigned int)src->load_short();
- field->decimals= (unsigned int)src->load_char();
+ field->decimals= src->load_uchar();
if (!(field->name= src->load_str(f_alloc, &field->name_length)) ||
!(field->table= src->load_str(f_alloc,&field->table_length)) ||
@@ -423,26 +441,43 @@ int emb_load_querycache_result(THD *thd, Querycache_stream *src)
goto err;
}
- row= (MYSQL_ROWS *)alloc_root(&data->alloc,
- (uint) (rows * sizeof(MYSQL_ROWS) +
- rows*(data->fields+1)*sizeof(char*)));
- end_row= row + rows;
- columns= (MYSQL_ROW)end_row;
-
data->rows= rows;
- data->data= row;
if (!rows)
goto return_ok;
+ if (thd->protocol == &thd->protocol_binary)
+ {
+ uint length;
+ row= (MYSQL_ROWS *)alloc_root(&data->alloc, rows * sizeof(MYSQL_ROWS));
+ end_row= row + rows;
+ data->data= row;
- for (prev_row= &row->next; row < end_row; prev_row= &row->next, row++)
+ for (prev_row= &row->next; row < end_row; prev_row= &row->next, row++)
+ {
+ *prev_row= row;
+ row->data= (MYSQL_ROW) src->load_str(&data->alloc, &length);
+ row->length= length;
+ }
+ }
+ else
{
- *prev_row= row;
- row->data= columns;
- MYSQL_ROW col_end= columns + data->fields;
- for (; columns < col_end; columns++)
- src->load_column(&data->alloc, columns);
+ row= (MYSQL_ROWS *)alloc_root(&data->alloc,
+ (uint) (rows * sizeof(MYSQL_ROWS) +
+ rows*(data->fields+1)*sizeof(char*)));
+ end_row= row + rows;
+ columns= (MYSQL_ROW)end_row;
- *(columns++)= NULL;
+ data->data= row;
+
+ for (prev_row= &row->next; row < end_row; prev_row= &row->next, row++)
+ {
+ *prev_row= row;
+ row->data= columns;
+ MYSQL_ROW col_end= columns + data->fields;
+ for (; columns < col_end; columns++)
+ src->load_column(&data->alloc, columns);
+
+ *(columns++)= NULL;
+ }
}
*prev_row= NULL;
data->embedded_info->prev_ptr= prev_row;
diff --git a/libmysqld/emb_qcache.h b/libmysqld/emb_qcache.h
index 6e320fbd967..a303273f7de 100644
--- a/libmysqld/emb_qcache.h
+++ b/libmysqld/emb_qcache.h
@@ -58,7 +58,7 @@ public:
data_end= cur_data + (block->used-headers_len);
}
- void store_char(char c);
+ void store_uchar(uchar c);
void store_short(ushort s);
void store_int(uint i);
void store_ll(ulonglong ll);
@@ -66,7 +66,7 @@ public:
void store_str(const char *str, uint str_len);
void store_safe_str(const char *str, uint str_len);
- char load_char();
+ uchar load_uchar();
ushort load_short();
uint load_int();
ulonglong load_ll();
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc
index 9c26febe627..2c4f49050b2 100644
--- a/libmysqld/lib_sql.cc
+++ b/libmysqld/lib_sql.cc
@@ -64,6 +64,7 @@ void embedded_get_error(MYSQL *mysql, MYSQL_DATA *data)
net->last_errno= ei->last_errno;
strmake(net->last_error, ei->info, sizeof(net->last_error));
memcpy(net->sqlstate, ei->sqlstate, sizeof(net->sqlstate));
+ mysql->server_status= ei->server_status;
my_free(data, MYF(0));
}
@@ -81,8 +82,7 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command,
/* Check that we are calling the client functions in right order */
if (mysql->status != MYSQL_STATUS_READY)
{
- strmov(net->last_error,
- ER(net->last_errno=CR_COMMANDS_OUT_OF_SYNC));
+ set_mysql_error(mysql, CR_COMMANDS_OUT_OF_SYNC, unknown_sqlstate);
return 1;
}
@@ -90,10 +90,11 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command,
thd->clear_error();
mysql->affected_rows= ~(my_ulonglong) 0;
mysql->field_count= 0;
- net->last_errno= 0;
+ net_clear_error(net);
thd->current_stmt= stmt;
thd->store_globals(); // Fix if more than one connect
+ lex_start(thd);
/*
We have to call free_old_query before we start to fill mysql->fields
for new query. In the case of embedded server we collect field data
@@ -111,7 +112,7 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command,
}
thd->net.no_send_error= 0;
- result= dispatch_command(command, thd, (char *) arg, arg_length + 1);
+ result= dispatch_command(command, thd, (char *) arg, arg_length);
thd->cur_data= 0;
if (!skip_check)
@@ -242,11 +243,12 @@ static my_bool emb_read_query_result(MYSQL *mysql)
mysql->warning_count= res->embedded_info->warning_count;
mysql->server_status= res->embedded_info->server_status;
mysql->field_count= res->fields;
- mysql->fields= res->embedded_info->fields_list;
- mysql->affected_rows= res->embedded_info->affected_rows;
- mysql->insert_id= res->embedded_info->insert_id;
- mysql->net.last_errno= 0;
- mysql->net.last_error[0]= 0;
+ if (!(mysql->fields= res->embedded_info->fields_list))
+ {
+ mysql->affected_rows= res->embedded_info->affected_rows;
+ mysql->insert_id= res->embedded_info->insert_id;
+ }
+ net_clear_error(&mysql->net);
mysql->info= 0;
if (res->embedded_info->info[0])
@@ -288,7 +290,7 @@ static int emb_stmt_execute(MYSQL_STMT *stmt)
if (res)
{
NET *net= &stmt->mysql->net;
- set_stmt_errmsg(stmt, net->last_error, net->last_errno, net->sqlstate);
+ set_stmt_errmsg(stmt, net);
DBUG_RETURN(1);
}
DBUG_RETURN(0);
@@ -299,14 +301,12 @@ int emb_read_binary_rows(MYSQL_STMT *stmt)
MYSQL_DATA *data;
if (!(data= emb_read_rows(stmt->mysql, 0, 0)))
{
- set_stmt_errmsg(stmt, stmt->mysql->net.last_error,
- stmt->mysql->net.last_errno, stmt->mysql->net.sqlstate);
+ set_stmt_errmsg(stmt, &stmt->mysql->net);
return 1;
}
stmt->result= *data;
my_free((char *) data, MYF(0));
- set_stmt_errmsg(stmt, stmt->mysql->net.last_error,
- stmt->mysql->net.last_errno, stmt->mysql->net.sqlstate);
+ set_stmt_errmsg(stmt, &stmt->mysql->net);
return 0;
}
@@ -320,16 +320,14 @@ int emb_read_rows_from_cursor(MYSQL_STMT *stmt)
if (res->embedded_info->last_errno)
{
embedded_get_error(mysql, res);
- set_stmt_errmsg(stmt, mysql->net.last_error,
- mysql->net.last_errno, mysql->net.sqlstate);
+ set_stmt_errmsg(stmt, &mysql->net);
return 1;
}
thd->cur_data= res;
mysql->warning_count= res->embedded_info->warning_count;
mysql->server_status= res->embedded_info->server_status;
- mysql->net.last_errno= 0;
- mysql->net.last_error[0]= 0;
+ net_clear_error(&mysql->net);
return emb_read_binary_rows(stmt);
}
@@ -551,7 +549,6 @@ void end_embedded_server()
{
my_free((char*) copy_arguments_ptr, MYF(MY_ALLOW_ZERO_PTR));
copy_arguments_ptr=0;
- release_ddl_log();
clean_up(0);
}
@@ -586,6 +583,7 @@ void *create_embedded_thd(int client_flag)
fprintf(stderr,"store_globals failed.\n");
goto err;
}
+ lex_start(thd);
/* TODO - add init_connect command execution */
@@ -1034,6 +1032,7 @@ void net_send_error_packet(THD *thd, uint sql_errno, const char *err)
ei->last_errno= sql_errno;
strmake(ei->info, err, sizeof(ei->info)-1);
strmov(ei->sqlstate, mysql_errno_to_sqlstate(sql_errno));
+ ei->server_status= thd->server_status;
thd->cur_data= 0;
}
diff --git a/libmysqld/libmysqld.def b/libmysqld/libmysqld.def
index 78ff08e510a..2aa75c0b23c 100644
--- a/libmysqld/libmysqld.def
+++ b/libmysqld/libmysqld.def
@@ -78,7 +78,6 @@ EXPORTS
mysql_next_result
mysql_num_fields
mysql_num_rows
- mysql_odbc_escape_string
mysql_options
mysql_ping
mysql_query
diff --git a/mysql-test/Makefile.am b/mysql-test/Makefile.am
index eb31e9057cc..79d11c857ab 100644
--- a/mysql-test/Makefile.am
+++ b/mysql-test/Makefile.am
@@ -44,6 +44,7 @@ dist-hook:
$(distdir)/std_data/ndb_backup51 \
$(distdir)/std_data/ndb_backup51_data_be \
$(distdir)/std_data/ndb_backup51_data_le \
+ $(distdir)/std_data/parts \
$(distdir)/lib
-$(INSTALL_DATA) $(srcdir)/t/*.def $(distdir)/t
$(INSTALL_DATA) $(srcdir)/t/*.test $(distdir)/t
@@ -71,6 +72,7 @@ dist-hook:
$(INSTALL_DATA) $(srcdir)/std_data/ndb_backup51/BACKUP* $(distdir)/std_data/ndb_backup51
$(INSTALL_DATA) $(srcdir)/std_data/ndb_backup51_data_be/BACKUP* $(distdir)/std_data/ndb_backup51_data_be
$(INSTALL_DATA) $(srcdir)/std_data/ndb_backup51_data_le/BACKUP* $(distdir)/std_data/ndb_backup51_data_le
+ $(INSTALL_DATA) $(srcdir)/std_data/parts/part_* $(distdir)/std_data/parts
$(INSTALL_DATA) $(srcdir)/lib/*.pl $(distdir)/lib
-rm -rf `find $(distdir)/suite -type d -name SCCS` $(distdir)/suite/row_lock
@@ -86,6 +88,7 @@ install-data-local:
$(DESTDIR)$(testdir)/std_data/ndb_backup51 \
$(DESTDIR)$(testdir)/std_data/ndb_backup51_data_be \
$(DESTDIR)$(testdir)/std_data/ndb_backup51_data_le \
+ $(DESTDIR)$(testdir)/std_data/parts \
$(DESTDIR)$(testdir)/lib
$(INSTALL_DATA) $(srcdir)/README $(DESTDIR)$(testdir)
-$(INSTALL_DATA) $(srcdir)/t/*.def $(DESTDIR)$(testdir)/t
@@ -118,6 +121,7 @@ install-data-local:
$(INSTALL_DATA) $(srcdir)/std_data/ndb_backup51/BACKUP* $(DESTDIR)$(testdir)/std_data/ndb_backup51
$(INSTALL_DATA) $(srcdir)/std_data/ndb_backup51_data_be/BACKUP* $(DESTDIR)$(testdir)/std_data/ndb_backup51_data_be
$(INSTALL_DATA) $(srcdir)/std_data/ndb_backup51_data_le/BACKUP* $(DESTDIR)$(testdir)/std_data/ndb_backup51_data_le
+ $(INSTALL_DATA) $(srcdir)/std_data/parts/part_* $(DESTDIR)$(testdir)/std_data/parts
$(INSTALL_DATA) $(srcdir)/lib/*.pl $(DESTDIR)$(testdir)/lib
for f in `(cd $(srcdir); find suite -type f | egrep -v 'SCCS|row_lock')`; \
do \
@@ -154,6 +158,7 @@ SUFFIXES = .sh
-e 's!@''PERL''@!@PERL@!' \
-e 's!@''VERSION''@!@VERSION@!' \
-e 's!@''MYSQL_TCP_PORT''@!@MYSQL_TCP_PORT@!' \
+ -e 's!@''MYSQL_TCP_PORT_DEFAULT''@!@MYSQL_TCP_PORT_DEFAULT@!' \
-e 's!@''MYSQL_BASE_VERSION''@!@MYSQL_BASE_VERSION@!' \
-e 's!@''MYSQL_UNIX_ADDR''@!@MYSQL_UNIX_ADDR@!' \
-e 's!@''MYSQL_TCP_PORT''@!@MYSQL_TCP_PORT@!' \
diff --git a/mysql-test/extra/binlog_tests/blackhole.test b/mysql-test/extra/binlog_tests/blackhole.test
index 1ca59955d76..df2295af4ff 100644
--- a/mysql-test/extra/binlog_tests/blackhole.test
+++ b/mysql-test/extra/binlog_tests/blackhole.test
@@ -134,6 +134,15 @@ drop table t1,t2,t3;
# table
#
CREATE TABLE t1(a INT) ENGINE=BLACKHOLE;
+# NOTE: After exchanging open_ltable() by open_and_lock_tables() in
+# handle_delayed_insert() to fix problems with MERGE tables (Bug#26379),
+# problems with INSERT DELAYED and BLACKHOLE popped up. open_ltable()
+# does not check if the binlogging capabilities of the statement and the
+# table match. So the below used to succeed. But since INSERT DELAYED
+# switches to row-based logging in mixed-mode and BLACKHOLE cannot do
+# row-based logging, it could not really work. Until this problem is
+# correctly fixed, we have that error here.
+--error ER_BINLOG_LOGGING_IMPOSSIBLE
INSERT DELAYED INTO t1 VALUES(1);
DROP TABLE t1;
diff --git a/mysql-test/extra/binlog_tests/ctype_cp932.test b/mysql-test/extra/binlog_tests/ctype_cp932.test
index 0839f5d43aa..3deeea13997 100644
--- a/mysql-test/extra/binlog_tests/ctype_cp932.test
+++ b/mysql-test/extra/binlog_tests/ctype_cp932.test
@@ -8,6 +8,10 @@ drop table if exists t3;
drop table if exists t4;
--enable_warnings
+SET @test_character_set= 'cp932';
+SET @test_collation= 'cp932_japanese_ci';
+-- source include/ctype_common.inc
+
set names cp932;
set character_set_database = cp932;
diff --git a/mysql-test/extra/binlog_tests/database.test b/mysql-test/extra/binlog_tests/database.test
new file mode 100644
index 00000000000..11a8f53a6d7
--- /dev/null
+++ b/mysql-test/extra/binlog_tests/database.test
@@ -0,0 +1,15 @@
+source include/have_log_bin.inc;
+source include/not_embedded.inc;
+
+# Checking that the drop of a database does not replicate anything in
+# addition to the drop of the database
+
+reset master;
+create database testing_1;
+use testing_1;
+create table t1 (a int);
+create function sf1 (a int) returns int return a+1;
+create trigger tr1 before insert on t1 for each row insert into t2 values (2*new.a);
+create procedure sp1 (a int) insert into t1 values(a);
+drop database testing_1;
+source include/show_binlog_events.inc;
diff --git a/mysql-test/extra/binlog_tests/mix_innodb_myisam_side_effects.test b/mysql-test/extra/binlog_tests/mix_innodb_myisam_side_effects.test
new file mode 100644
index 00000000000..03514bfdb55
--- /dev/null
+++ b/mysql-test/extra/binlog_tests/mix_innodb_myisam_side_effects.test
@@ -0,0 +1,298 @@
+# the file to be sourced from binlog.binlog_mix_innodb_myisam
+
+#
+# Bug #27417 thd->no_trans_update.stmt lost value inside of SF-exec-stack
+# bug #28960 non-trans temp table changes with insert .. select
+# not binlogged after rollback
+#
+# testing appearence of insert into temp_table in binlog.
+# There are two branches of execution that require different setup.
+
+# checking binlog content filled with row-based events due to
+# a used stored function modifies non-transactional table
+
+## send_eof() branch
+
+# prepare
+
+create temporary table tt (a int unique);
+create table ti (a int) engine=innodb;
+reset master;
+show master status;
+
+# action
+
+begin;
+insert into ti values (1);
+insert into ti values (2) ;
+insert into tt select * from ti;
+rollback;
+
+# check
+
+select count(*) from tt /* 2 */;
+show master status;
+source include/show_binlog_events.inc;
+select count(*) from ti /* zero */;
+insert into ti select * from tt;
+select * from ti /* that is what slave would miss - bug#28960 */;
+
+
+## send_error() branch
+delete from ti;
+delete from tt where a=1;
+reset master;
+show master status;
+
+# action
+
+begin;
+insert into ti values (1);
+insert into ti values (2) /* to make the dup error in the following */;
+--error ER_DUP_ENTRY
+insert into tt select * from ti /* one affected and error */;
+rollback;
+
+# check
+
+show master status;
+source include/show_binlog_events.inc; # nothing in binlog with row bilog format
+select count(*) from ti /* zero */;
+insert into ti select * from tt;
+select * from tt /* that is what otherwise slave missed - the bug */;
+
+drop table ti;
+
+
+#
+# Bug #27417 thd->no_trans_update.stmt lost value inside of SF-exec-stack
+#
+# Testing asserts: if there is a side effect of modifying non-transactional
+# table thd->no_trans_update.stmt must be TRUE;
+# the assert is active with debug build
+#
+
+--disable_warnings
+drop function if exists bug27417;
+drop table if exists t1,t2;
+--enable_warnings
+# side effect table
+CREATE TABLE t1 (a int NOT NULL auto_increment primary key) ENGINE=MyISAM;
+# target tables
+CREATE TABLE t2 (a int NOT NULL auto_increment, PRIMARY KEY (a));
+
+delimiter |;
+create function bug27417(n int)
+RETURNS int(11)
+begin
+ insert into t1 values (null);
+ return n;
+end|
+delimiter ;|
+
+reset master;
+
+# execute
+
+insert into t2 values (bug27417(1));
+insert into t2 select bug27417(2);
+reset master;
+
+--error ER_DUP_ENTRY
+insert into t2 values (bug27417(2));
+source include/show_binlog_events.inc; #only (!) with fixes for #23333 will show there is the query
+select count(*) from t1 /* must be 3 */;
+
+reset master;
+select count(*) from t2;
+delete from t2 where a=bug27417(3);
+select count(*) from t2 /* nothing got deleted */;
+source include/show_binlog_events.inc; # the query must be in regardless of #23333
+select count(*) from t1 /* must be 5 */;
+
+--enable_info
+delete t2 from t2 where t2.a=bug27417(100) /* must not affect t2 */;
+--disable_info
+select count(*) from t1 /* must be 7 */;
+
+# function bug27417 remains for the following testing of bug#23333
+drop table t1,t2;
+
+#
+# Bug#23333 using the patch (and the test) for bug#27471
+# throughout the bug tests
+# t1 - non-trans side effects gatherer;
+# t2 - transactional table;
+#
+CREATE TABLE t1 (a int NOT NULL auto_increment primary key) ENGINE=MyISAM;
+CREATE TABLE t2 (a int, PRIMARY KEY (a)) ENGINE=InnoDB;
+CREATE TABLE t3 (a int, PRIMARY KEY (a), b int unique) ENGINE=MyISAM;
+CREATE TABLE t4 (a int, PRIMARY KEY (a), b int unique) ENGINE=Innodb;
+CREATE TABLE t5 (a int, PRIMARY KEY (a)) ENGINE=InnoDB;
+
+
+#
+# INSERT
+#
+
+# prepare
+
+ insert into t2 values (1);
+ reset master;
+
+# execute
+
+ --error ER_DUP_ENTRY
+ insert into t2 values (bug27417(1));
+
+# check
+
+ source include/show_binlog_events.inc; # must be event of the query
+ select count(*) from t1 /* must be 1 */;
+
+#
+# INSERT SELECT
+#
+
+# prepare
+ delete from t1;
+ delete from t2;
+ insert into t2 values (2);
+ reset master;
+
+# execute
+
+ --error ER_DUP_ENTRY
+ insert into t2 select bug27417(1) union select bug27417(2);
+
+# check
+
+ source include/show_binlog_events.inc; # must be events of the query
+ select count(*) from t1 /* must be 2 */;
+
+#
+# UPDATE inc multi-update
+#
+
+# prepare
+ delete from t1;
+ insert into t3 values (1,1),(2,3),(3,4);
+ reset master;
+
+# execute
+ --error ER_DUP_ENTRY
+ update t3 set b=b+bug27417(1);
+
+# check
+ source include/show_binlog_events.inc; # must be events of the query
+ select count(*) from t1 /* must be 2 */;
+
+## multi_update::send_eof() branch
+
+# prepare
+ delete from t3;
+ delete from t4;
+ insert into t3 values (1,1);
+ insert into t4 values (1,1),(2,2);
+
+ reset master;
+
+# execute
+ --error ER_DUP_ENTRY
+ UPDATE t4,t3 SET t4.a=t3.a + bug27417(1) /* top level non-ta table */;
+
+# check
+ source include/show_binlog_events.inc; # the offset must denote there is the query
+ select count(*) from t1 /* must be 4 */;
+
+## send_error() branch of multi_update
+
+# prepare
+ delete from t1;
+ delete from t3;
+ delete from t4;
+ insert into t3 values (1,1),(2,2);
+ insert into t4 values (1,1),(2,2);
+
+ reset master;
+
+# execute
+ --error ER_DUP_ENTRY
+ UPDATE t3,t4 SET t3.a=t4.a + bug27417(1);
+
+# check
+ select count(*) from t1 /* must be 1 */;
+
+# cleanup
+ drop table t4;
+
+
+#
+# DELETE incl multi-delete
+#
+
+# prepare
+ delete from t1;
+ delete from t2;
+ delete from t3;
+ insert into t2 values (1);
+ insert into t3 values (1,1);
+ create trigger trg_del before delete on t2 for each row
+ insert into t3 values (bug27417(1), 2);
+ reset master;
+
+# execute
+ --error ER_DUP_ENTRY
+ delete from t2;
+# check
+ source include/show_binlog_events.inc; # the offset must denote there is the query
+ select count(*) from t1 /* must be 1 */;
+
+# cleanup
+ drop trigger trg_del;
+
+# prepare
+ delete from t1;
+ delete from t2;
+ delete from t5;
+ create trigger trg_del_t2 after delete on t2 for each row
+ insert into t1 values (1);
+ insert into t2 values (2),(3);
+ insert into t5 values (1),(2);
+ reset master;
+
+# execute
+ --error ER_DUP_ENTRY
+ delete t2.* from t2,t5 where t2.a=t5.a + 1;
+
+# check
+ source include/show_binlog_events.inc; # must be events of the query
+ select count(*) from t1 /* must be 1 */;
+
+
+#
+# LOAD DATA
+#
+
+# prepare
+ delete from t1;
+ create table t4 (a int default 0, b int primary key) engine=innodb;
+ insert into t4 values (0, 17);
+ reset master;
+
+# execute
+ --error ER_DUP_ENTRY
+ load data infile '../std_data_ln/rpl_loaddata.dat' into table t4 (a, @b) set b= @b + bug27417(2);
+# check
+ select * from t4;
+ select count(*) from t1 /* must be 2 */;
+ source include/show_binlog_events.inc; # must be events of the query
+
+#
+# bug#23333 cleanup
+#
+
+
+drop trigger trg_del_t2;
+drop table t1,t2,t3,t4,t5;
+drop function bug27417;
diff --git a/mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test b/mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test
index 26b1e6d5ba0..cdd828305dc 100644
--- a/mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test
+++ b/mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test
@@ -1,16 +1,22 @@
#############################################################
+# Author: Chuck
+#############################################################
# Purpose: To test having extra columns on the master WL#3915
# engine inspecific sourced part
#############################################################
-
+# Change Author: Jeb
+# Change: Cleanup and extend testing
+#############################################################
# TODO: partition specific
# -- source include/have_partition.inc
+# Note: Will be done in different test due to NDB using this
+# test case.
+############################################################
########### Clean up ################
--disable_warnings
--disable_query_log
-DROP TABLE IF EXISTS t1,t2,t3,t4,t31;
-
+DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t10,t11,t12,t13,t14,t15,t16,t17,t18,t31;
--enable_query_log
--enable_warnings
@@ -70,154 +76,87 @@ DROP TABLE IF EXISTS t1,t2,t3,t4,t31;
#VARCHAR(M)
#
-
-connection master;
-eval CREATE TABLE t1 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20),
- f5 FLOAT DEFAULT '2.00')
- ENGINE=$engine_type;
-
-sync_slave_with_master;
-alter table t1 drop f5;
-
-connection master;
-INSERT into t1 values (1, 1, 1, 'first', 1.0);
-
- sync_slave_with_master;
---replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 #
---query_vertical show slave status;
- select * from t1 order by f3;
-
-connection master;
-DROP TABLE t1;
-eval CREATE TABLE t1 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20),
- f5 FLOAT DEFAULT '2.00',
- f6 CHAR(4) DEFAULT 'TEST')
- ENGINE=$engine_type;
-
-sync_slave_with_master;
-alter table t1 drop f5, drop f6;
-
-connection master;
-INSERT into t1 values (1, 1, 1, 'first', 1.0, 'yksi');
-
- sync_slave_with_master;
---replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 #
---query_vertical show slave status;
- select * from t1 order by f3;
-
-connection master;
-DROP TABLE t1;
-eval CREATE TABLE t1 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20),
- f5 FLOAT DEFAULT '2.00',
- f6 CHAR(4) DEFAULT 'TEST',
- f7 INT DEFAULT '0')
- ENGINE=$engine_type;
-
-sync_slave_with_master;
-alter table t1 drop f5, drop f6, drop f7;
-
-connection master;
-INSERT into t1 values (1, 1, 1, 'first', 1.0, 'yksi', 1);
- sync_slave_with_master;
---replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 #
---query_vertical show slave status;
- select * from t1 order by f3;
-
-connection master;
-DROP TABLE t1;
-eval CREATE TABLE t1 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20),
- f5 FLOAT DEFAULT '2.00',
- f6 CHAR(4) DEFAULT 'TEST',
- f7 INT DEFAULT '0',
- f8 TEXT)
- ENGINE=$engine_type;
-
-sync_slave_with_master;
-alter table t1 drop f5, drop f6, drop f7, drop f8;
-
-connection master;
-INSERT into t1 values (1, 1, 1, 'first', 1.0, 'yksi', 1, 'lounge of happiness');
- sync_slave_with_master;
---replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 #
---query_vertical show slave status;
- select * from t1 order by f3;
-
-connection master;
-DROP TABLE t1;
-eval CREATE TABLE t1 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20),
- f5 FLOAT DEFAULT '2.00',
- f6 CHAR(4) DEFAULT 'TEST',
- f7 INT DEFAULT '0',
- f8 TEXT,
- f9 LONGBLOB)
- ENGINE=$engine_type;
-
-sync_slave_with_master;
-alter table t1 drop f5, drop f6, drop f7, drop f8, drop f9;
-
-connection master;
-INSERT into t1 values (1, 1, 1, 'first', 1.0, 'yksi', 1, 'lounge of happiness', 'very fat blob');
- sync_slave_with_master;
---replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 #
---query_vertical show slave status;
- select * from t1 order by f3;
-
+let $binformat = `SHOW VARIABLES LIKE '%binlog_format%'`;
+--echo
+--echo ***********************************************************
+--echo ***********************************************************
+--echo ***************** Start of Testing ************************
+--echo ***********************************************************
+--echo ***********************************************************
+--echo * This test format == $binformat and engine == $engine_type
+--echo ***********************************************************
+--echo ***********************************************************
+--echo
+--echo ***** Testing more columns on the Master *****
+--echo
connection master;
-DROP TABLE t1;
eval CREATE TABLE t1 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20),
- f5 FLOAT DEFAULT '2.00',
- f6 CHAR(4) DEFAULT 'TEST',
- f7 INT DEFAULT '0',
- f8 TEXT,
- f9 LONGBLOB,
- f10 BIT(63))
- ENGINE=$engine_type;
-
+ /* extra */
+ f5 FLOAT DEFAULT '2.00',
+ f6 CHAR(4) DEFAULT 'TEST',
+ f7 INT DEFAULT '0',
+ f8 TEXT,
+ f9 LONGBLOB,
+ f10 BIT(63),
+ f11 VARBINARY(64))ENGINE=$engine_type;
+--echo
+--echo * Alter Table on Slave and drop columns f5 through f11 *
+--echo
sync_slave_with_master;
-alter table t1 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10;
+alter table t1 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11;
+--echo
+--echo * Insert data in Master then update and delete some rows*
+--echo
connection master;
-INSERT into t1 values (1, 1, 1, 'first', 1.0, 'yksi', 1, 'lounge of happiness', 'very fat blob', b'01010101010101');
- sync_slave_with_master;
---replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 #
---query_vertical show slave status;
- select * from t1 order by f3;
+let $j= 50;
+--disable_query_log
+while ($j)
+{
+ eval INSERT INTO t1 VALUES ($j, $j, $j, 'second', 2.0, 'kaks', 2,
+ 'got stolen from the paradise',
+ 'very fat blob', b'01010101010101',
+ 0x123456);
+ dec $j;
+}
+let $j= 30;
+while ($j)
+{
+ eval update t1 set f4= 'next' where f1=$j;
+ dec $j;
+ dec $j;
+ eval delete from t1 where f1=$j;
+ dec $j;
+}
+--enable_query_log
-connection master;
-DROP TABLE t1;
- eval CREATE TABLE t1 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20),
- /* extra */
- f5 FLOAT DEFAULT '2.00',
- f6 CHAR(4) DEFAULT 'TEST',
- f7 INT DEFAULT '0',
- f8 TEXT,
- f9 LONGBLOB,
- f10 BIT(63),
- f11 VARBINARY(64))
- ENGINE=$engine_type;
+--echo * Select count and 20 rows from Master *
+--echo
+SELECT COUNT(*) FROM t1;
+--echo
+SELECT f1,f2,f3,f4,f5,f6,f7,f8,f9,
+ hex(f10),hex(f11) FROM t1 ORDER BY f3 LIMIT 20;
#connection slave;
- sync_slave_with_master;
- alter table t1 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11;
-
-connection master;
-
- INSERT into t1 values (1, 1, 1, 'first', 1.0, 'yksi', 1, 'lounge of happiness', 'very fat blob', b'01010101010101', 0x123456);
- INSERT into t1 values (2, 2, 2, 'second', 2.0, 'kaks', 2, 'got stolen from the paradise', 'very fat blob', b'01010101010101', 0x123456), (3, 3, 3, 'third', 3.0, 'kolm', 3, 'got stolen from the paradise', 'very fat blob', b'01010101010101', 0x123456);
- update t1 set f4= 'next' where f1=1;
- delete from t1 where f1=1;
-
- select * from t1 order by f3;
-
+sync_slave_with_master;
+--echo
+--echo * Select count and 20 rows from Slave *
+--echo
+SELECT COUNT(*) FROM t1;
+--echo
+SELECT * FROM t1 ORDER BY f3 LIMIT 20;
-#connection slave;
- sync_slave_with_master;
---replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 #
+--echo
+--echo * Show Slave Status *
+--echo
+--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
--query_vertical show slave status;
- select * from t1 order by f3;
-
+--echo
### Altering table def scenario
+--echo
+--echo ***** Testing Altering table def scenario *****
+--echo
connection master;
@@ -232,7 +171,7 @@ connection master;
f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0',
f12 SET('a', 'b', 'c') default 'b')
ENGINE=$engine_type;
-
+--echo
eval CREATE TABLE t3 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20),
/* extra */
f5 DOUBLE DEFAULT '2.00',
@@ -243,7 +182,7 @@ connection master;
f12 SET('a', 'b', 'c') default 'b')
ENGINE=$engine_type;
-
+--echo
# no ENUM and SET
eval CREATE TABLE t4 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20),
/* extra */
@@ -256,7 +195,7 @@ connection master;
f11 CHAR(255))
ENGINE=$engine_type;
-
+--echo
eval CREATE TABLE t31 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20),
/* extra */
@@ -293,7 +232,9 @@ connection master;
f34 VARBINARY(1025),
f35 VARCHAR(257)
) ENGINE=$engine_type;
-
+--echo
+--echo ** Alter tables on slave and drop columns **
+--echo
#connection slave;
sync_slave_with_master;
alter table t2 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11, drop
@@ -308,8 +249,8 @@ f12;
drop f26, drop f27, drop f28, drop f29, drop f30, drop f31, drop f32,
drop f33, drop f34, drop f35;
-
-
+--echo
+--echo ** Insert Data into Master **
connection master;
INSERT into t2 set f1=1, f2=1, f3=1, f4='first', f8='f8: medium size blob', f10='f10:
some var char';
@@ -458,7 +399,10 @@ binary data';
/*f34 VARBINARY(1025),*/ '3333 minus 3',
/*f35 VARCHAR(257),*/ NULL
);
-
+--echo
+--echo ** Sync slave with master **
+--echo ** Do selects from tables **
+--echo
#connection slave;
sync_slave_with_master;
@@ -466,27 +410,36 @@ binary data';
select * from t2 order by f1;
select * from t3 order by f1;
select * from t4 order by f1;
- select * from t31 order by f1;
+ select * from t31 order by f3;
connection master;
-
+--echo
+--echo ** Do updates master **
+--echo
update t31 set f5=555555555555555 where f3=6;
update t31 set f2=2 where f3=2;
update t31 set f1=NULL where f3=1;
update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3;
+--echo
+--echo ** Delete from Master **
+--echo
+
delete from t1;
delete from t2;
delete from t3;
delete from t4;
delete from t31;
+--echo
+--echo ** Check slave status **
+--echo
#connection slave;
sync_slave_with_master;
select * from t31;
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 #
+--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
--query_vertical show slave status;
#### Clean Up ####
@@ -496,11 +449,600 @@ connection master;
--disable_query_log
DROP TABLE t1,t2,t3,t4,t31;
+######################################################
#connection slave;
sync_slave_with_master;
--enable_query_log
--enable_warnings
+--echo
+--echo ****************************************
+--echo * columns in master at middle of table *
+--echo * Expect: Proper error message *
+--echo ****************************************
+--echo
+--echo ** Stop and Reset Slave **
+--echo
+STOP SLAVE;
+RESET SLAVE;
+--echo
+--echo ** create table slave side **
+eval CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5)
+ ) ENGINE=$engine_type;
+
+--echo
+--echo ** Connect to master and create table **
+--echo
+--connection master
+eval CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233',
+ c CHAR(5), e INT DEFAULT '1')ENGINE=$engine_type;
+RESET MASTER;
+
+--echo
+--echo *** Start Slave ***
+connection slave;
+START SLAVE;
+
+--echo
+--echo *** Master Data Insert ***
+connection master;
+set @b1 = 'b1b1b1b1';
+set @b1 = concat(@b1,@b1);
+INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT),
+ (2,@b1,DEFAULT,'JOE',DEFAULT),
+ (3,@b1,DEFAULT,'QA',DEFAULT);
+
+--echo
+--echo ********************************************
+--echo *** Expect slave to fail with Error 1523 ***
+--echo ********************************************
+--echo
+connection slave;
+wait_for_slave_to_stop;
+--replace_result $MASTER_MYPORT MASTER_PORT
+--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
+--query_vertical SHOW SLAVE STATUS
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
+START SLAVE;
+
+--echo
+--echo *** Drop t10 ***
+connection master;
+DROP TABLE t10;
+sync_slave_with_master;
+
+############################################
+############## Continued ###################
+############################################
+--echo
+--echo *********************************************
+--echo * More columns in master at middle of table *
+--echo * Expect: Proper error message *
+--echo *********************************************
+--echo
+--echo *** Create t11 on slave ***
+STOP SLAVE;
+RESET SLAVE;
+
+eval CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254)
+ ) ENGINE=$engine_type;
+
+--echo
+--echo *** Create t11 on Master ***
+connection master;
+eval CREATE TABLE t11 (a INT KEY, b BLOB, f TEXT,
+ c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE=$engine_type;
+
+RESET MASTER;
+
+--echo
+--echo *** Start Slave ***
+connection slave;
+START SLAVE;
+
+--echo
+--echo *** Master Data Insert ***
+connection master;
+set @b1 = 'b1b1b1b1';
+set @b1 = concat(@b1,@b1);
+INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT),
+ (2,@b1,'Testing is cool','JOE',DEFAULT),
+ (3,@b1,DEFAULT,'QA',DEFAULT);
+
+--echo
+--echo ********************************************
+--echo *** Expect slave to fail with Error 1523 ***
+--echo ********************************************
+--echo
+connection slave;
+wait_for_slave_to_stop;
+--replace_result $MASTER_MYPORT MASTER_PORT
+--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
+--query_vertical SHOW SLAVE STATUS
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
+START SLAVE;
+
+--echo
+--echo *** Drop t11 ***
+connection master;
+DROP TABLE t11;
+sync_slave_with_master;
+
+############################################
+############## Continued ###################
+############################################
+--echo
+--echo *********************************************
+--echo * More columns in master at middle of table *
+--echo * Expect: This one should pass blob-text *
+--echo *********************************************
+--echo
+--echo *** Create t12 on slave ***
+STOP SLAVE;
+RESET SLAVE;
+eval CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB
+ ) ENGINE=$engine_type;
+
+--echo
+--echo *** Create t12 on Master ***
+connection master;
+eval CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT,
+ c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE=$engine_type;
+
+RESET MASTER;
+
+--echo
+--echo *** Start Slave ***
+connection slave;
+START SLAVE;
+
+--echo
+--echo *** Master Data Insert ***
+connection master;
+set @b1 = 'b1b1b1b1';
+set @b1 = concat(@b1,@b1);
+INSERT INTO t12 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT),
+ (2,@b1,'JOE',DEFAULT,DEFAULT),
+ (3,@b1,'QA',DEFAULT,DEFAULT);
+--echo
+SELECT a,hex(b),f,c,e FROM t12 ORDER BY a;
+
+--echo
+--echo *** Select on Slave ***
+sync_slave_with_master;
+SELECT a,hex(b),c FROM t12 ORDER BY a;
+
+--echo
+--echo *** Drop t12 ***
+connection master;
+DROP TABLE t12;
+sync_slave_with_master;
+
+############################################
+############## Continued ###################
+############################################
+--echo
+--echo ****************************************************
+--echo * - Alter Master adding columns at middle of table *
+--echo * Expect: columns added *
+--echo ****************************************************
+--echo
+--echo
+--echo *** Create t14 on slave ***
+STOP SLAVE;
+RESET SLAVE;
+eval CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
+ ) ENGINE=$engine_type;
+
+--echo
+--echo *** Create t14 on Master ***
+connection master;
+eval CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
+ c6 INT DEFAULT '1',
+ c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
+ )ENGINE=$engine_type;
+
+RESET MASTER;
+
+--echo
+--echo *** Start Slave ***
+connection slave;
+START SLAVE;
+
+--echo
+--echo *** Master Data Insert ***
+connection master;
+ALTER TABLE t14 ADD COLUMN c2 DECIMAL(8,2) AFTER c1;
+ALTER TABLE t14 ADD COLUMN c3 TEXT AFTER c2;
+--echo
+set @b1 = 'b1b1b1b1';
+set @b1 = concat(@b1,@b1);
+INSERT INTO t14 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle',DEFAULT,DEFAULT),
+ (2,2.00,'This Test Should work',@b1,'JOE',DEFAULT,DEFAULT),
+ (3,3.00,'If is does not, I will open a bug',@b1,'QA',DEFAULT,DEFAULT);
+--echo
+--replace_column 7 CURRENT_TIMESTAMP
+SELECT c1,c2,c3,hex(c4),c5,c6,c7 FROM t14 ORDER BY c1;
+
+--echo
+--echo *** Select on Slave ****
+sync_slave_with_master;
+SELECT c1,c2,c3,hex(c4),c5 FROM t14 ORDER BY c1;
+
+####################################################
+--echo
+--echo ****************************************************
+--echo * - Alter Master Dropping columns from the middle. *
+--echo * Expect: columns dropped *
+--echo ****************************************************
+--echo
+--echo *** connect to master and drop columns ***
+connection master;
+ALTER TABLE t14 DROP COLUMN c2;
+ALTER TABLE t14 DROP COLUMN c7;
+--echo
+--echo *** Select from Master ***
+SELECT c1,c3,hex(c4),c5,c6 FROM t14 ORDER BY c1;
+--echo
+
+--echo ************
+--echo * Bug30415 *
+--echo ************
+# Uncomment below once fixed
+
+#--echo *** Select from Slave ***
+#sync_slave_with_master;
+#SELECT c1,c2,c3,hex(c4),c5 FROM t14 ORDER BY c1;
+
+# Bug30415
+# Remove below once fixed
+#***************************
+connection slave;
+wait_for_slave_to_stop;
+--replace_result $MASTER_MYPORT MASTER_PORT
+--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
+--query_vertical SHOW SLAVE STATUS
+#***************************
+
+STOP SLAVE;
+RESET SLAVE;
+
+--echo
+--echo *** Drop t14 ***
+DROP TABLE t14;
+
+connection master;
+DROP TABLE t14;
+RESET MASTER;
+
+connection slave;
+START SLAVE;
+
+#################################################
+--echo
+--echo *************************************************
+--echo * - Alter Master adding columns at end of table *
+--echo * Expect: Error 1054 *
+--echo *************************************************
+--echo
+--echo *** Create t15 on slave ***
+STOP SLAVE;
+RESET SLAVE;
+eval CREATE TABLE t15 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
+ ) ENGINE=$engine_type;
+
+--echo
+--echo *** Create t15 on Master ***
+connection master;
+eval CREATE TABLE t15 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
+ c6 INT DEFAULT '1',
+ c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
+ )ENGINE=$engine_type;
+
+RESET MASTER;
+
+--echo
+--echo *** Start Slave ***
+connection slave;
+START SLAVE;
+
+--echo
+--echo *** Master Data Insert ***
+connection master;
+ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7;
+set @b1 = 'b1b1b1b1';
+set @b1 = concat(@b1,@b1);
+INSERT INTO t15 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT,3.00),
+ (2,@b1,'JOE',DEFAULT,DEFAULT,3.00),
+ (3,@b1,'QA',DEFAULT,DEFAULT,3.00);
+--replace_column 5 CURRENT_TIMESTAMP
+SELECT c1,hex(c4),c5,c6,c7,c2 FROM t15 ORDER BY c1;
+
+--echo
+--echo ********************************************
+--echo *** Expect slave to fail with Error 1054 ***
+--echo ********************************************
+--echo
+connection slave;
+wait_for_slave_to_stop;
+--replace_result $MASTER_MYPORT MASTER_PORT
+--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
+--query_vertical SHOW SLAVE STATUS
+STOP SLAVE;
+RESET SLAVE;
+
+--echo
+--echo *** Drop t15 ***
+DROP TABLE t15;
+
+connection master;
+DROP TABLE t15;
+RESET MASTER;
+
+connection slave;
+START SLAVE;
+
+####################################################
+--echo
+--echo ************************************************
+--echo * - Create index on Master column not on slave *
+--echo * Expect:Warning *
+--echo ************************************************
+--echo
+--echo *** Create t16 on slave ***
+STOP SLAVE;
+RESET SLAVE;
+eval CREATE TABLE t16 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
+ ) ENGINE=$engine_type;
+
+--echo
+--echo *** Create t16 on Master ***
+connection master;
+eval CREATE TABLE t16 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
+ c6 INT DEFAULT '1',
+ c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
+ )ENGINE=$engine_type;
+
+RESET MASTER;
+
+--echo
+--echo *** Start Slave ***
+connection slave;
+START SLAVE;
+
+--echo
+--echo *** Master Create Index and Data Insert ***
+connection master;
+CREATE INDEX part_of_c6 ON t16 (c6);
+set @b1 = 'b1b1b1b1';
+set @b1 = concat(@b1,@b1);
+INSERT INTO t16 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT),
+ (2,@b1,'JOE',2,DEFAULT),
+ (3,@b1,'QA',3,DEFAULT);
+--replace_column 5 CURRENT_TIMESTAMP
+SELECT c1,hex(c4),c5,c6,c7 FROM t16 ORDER BY c1;
+
+# Uncomment the below when bug 30434 is patched
+
+#--echo *** Select on Slave ****
+#sync_slave_with_master;
+#SELECT c1,hex(c4),c5 FROM t16 ORDER BY c1;
+#
+#--echo *** Drop t16 ***
+#connection master;
+#DROP TABLE t16;
+#sync_slave_with_master;
+
+# Remove the below when bug 30434 is patched
+#*******************************************
+--echo
+--echo *****************
+--echo *** BUG 30434 ***
+--echo *****************
+--echo
+connection slave;
+wait_for_slave_to_stop;
+--replace_result $MASTER_MYPORT MASTER_PORT
+--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
+--query_vertical SHOW SLAVE STATUS
+STOP SLAVE;
+RESET SLAVE;
+
+--echo
+--echo *** Drop t16 ***
+DROP TABLE t16;
+
+connection master;
+DROP TABLE t16;
+RESET MASTER;
+
+connection slave;
+START SLAVE;
+#*******************************************
+
+####################################################
+--echo
+--echo *****************************************************
+--echo * - Delete rows using column on Master not on slave *
+--echo * Expect: Rows Deleted *
+--echo *****************************************************
+--echo
+--echo *** Create t17 on slave ***
+STOP SLAVE;
+RESET SLAVE;
+eval CREATE TABLE t17 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
+ ) ENGINE=$engine_type;
+
+--echo
+--echo *** Create t17 on Master ***
+connection master;
+eval CREATE TABLE t17 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
+ c6 INT DEFAULT '1',
+ c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
+ )ENGINE=$engine_type;
+
+RESET MASTER;
+
+--echo
+--echo *** Start Slave ***
+connection slave;
+START SLAVE;
+
+--echo
+--echo *** Master Data Insert ***
+connection master;
+set @b1 = 'b1b1b1b1';
+set @b1 = concat(@b1,@b1);
+INSERT INTO t17 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT),
+ (2,@b1,'JOE',2,DEFAULT),
+ (3,@b1,'QA',3,DEFAULT);
+--replace_column 5 CURRENT_TIMESTAMP
+SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1;
+
+--echo
+--echo ** Select * from Slave **
+sync_slave_with_master;
+SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1;
+
+--echo
+--echo ** Delete from master **
+connection master;
+DELETE FROM t17 WHERE c6 = 3;
+--replace_column 5 CURRENT_TIMESTAMP
+SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1;
+
+--echo
+--echo ** Check slave **
+sync_slave_with_master;
+SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1;
+
+
+connection master;
+DROP TABLE t17;
+sync_slave_with_master;
+--echo
+
+####################################################
+--echo
+--echo *****************************************************
+--echo * - Update row using column on Master not on slave *
+--echo * Expect: Rows updated *
+--echo *****************************************************
+--echo
+--echo ** Bug30674 **
+--echo
+--echo *** Create t18 on slave ***
+--echo
+
+STOP SLAVE;
+RESET SLAVE;
+eval CREATE TABLE t18 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
+ ) ENGINE=$engine_type;
+
+--echo
+--echo *** Create t18 on Master ***
+connection master;
+eval CREATE TABLE t18 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
+ c6 INT DEFAULT '1',
+ c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
+ )ENGINE=$engine_type;
+
+RESET MASTER;
+
+--echo
+--echo *** Start Slave ***
+connection slave;
+START SLAVE;
+
+--echo
+--echo *** Master Data Insert ***
+connection master;
+set @b1 = 'b1b1b1b1';
+set @b1 = concat(@b1,@b1);
+
+INSERT INTO t18 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT),
+ (2,@b1,'JOE',2,DEFAULT),
+ (3,@b1,'QA',3,DEFAULT);
+--replace_column 5 CURRENT_TIMESTAMP
+SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1;
+
+--echo
+--echo ** Select * from Slave **
+sync_slave_with_master;
+SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1;
+
+--echo
+--echo ** update from master **
+connection master;
+#######################################
+# This test should be uncommented
+# once bug30674 is patched
+#######################################
+
+#***************************
+#UPDATE t18 SET c5 = 'TEST' WHERE c6 = 3;
+#***************************
+
+--replace_column 5 CURRENT_TIMESTAMP
+SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1;
+
+--echo
+--echo ** Check slave **
+sync_slave_with_master;
+SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1;
+
+connection master;
+DROP TABLE t18;
+sync_slave_with_master;
+--echo
+
+####################################################
+--echo
+--echo *****************************************************
+--echo * - Insert UUID column on Master not on slave *
+--echo * Expect: Rows inserted *
+--echo *****************************************************
+--echo
+--echo *** Create t5 on slave ***
+STOP SLAVE;
+RESET SLAVE;
+eval CREATE TABLE t5 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
+ ) ENGINE=$engine_type;
+
+--echo
+--echo *** Create t5 on Master ***
+connection master;
+eval CREATE TABLE t5 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
+ c6 LONG,
+ c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
+ )ENGINE=$engine_type;
+
+RESET MASTER;
+
+--echo
+--echo *** Start Slave ***
+connection slave;
+START SLAVE;
+
+--echo
+--echo *** Master Data Insert ***
+connection master;
+set @b1 = 'b1b1b1b1';
+INSERT INTO t5 () VALUES(1,@b1,'Kyle',UUID(),DEFAULT),
+ (2,@b1,'JOE',UUID(),DEFAULT),
+ (3,@b1,'QA',UUID(),DEFAULT);
+--replace_column 4 UUID 5 TIME
+SELECT c1,hex(c4),c5,c6,c7 FROM t5 ORDER BY c1;
+
+--echo
+--echo ** Select * from Slave **
+sync_slave_with_master;
+SELECT c1,hex(c4),c5 FROM t5 ORDER BY c1;
+
+connection master;
+DROP TABLE t5;
+sync_slave_with_master;
+--echo
-# END of the tests
+# END of 5.1 tests case
diff --git a/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test b/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test
index a4ac55cc2e8..6fa2c9ac1b5 100644
--- a/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test
+++ b/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test
@@ -10,7 +10,7 @@
########### Clean up ################
--disable_warnings
--disable_query_log
-DROP TABLE IF EXISTS t1, t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17;
+DROP TABLE IF EXISTS t1, t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t14a,t15,t16,t17;
--enable_query_log
--enable_warnings
@@ -662,6 +662,68 @@ sync_slave_with_master;
--replace_column 7 CURRENT_TIMESTAMP
SELECT * FROM t14 ORDER BY c1;
+####################################################
+# - Alter Master drop column at end of table #
+# Expect: column dropped #
+####################################################
+
+--echo *** Create t14a on slave ***
+STOP SLAVE;
+RESET SLAVE;
+eval CREATE TABLE t14a (c1 INT KEY, c4 BLOB, c5 CHAR(5),
+ c6 INT DEFAULT '1',
+ c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
+ )ENGINE=$engine_type;
+
+--echo *** Create t14a on Master ***
+connection master;
+eval CREATE TABLE t14a (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
+ ) ENGINE=$engine_type;
+RESET MASTER;
+
+--echo *** Start Slave ***
+connection slave;
+START SLAVE;
+
+--echo *** Master Data Insert ***
+connection master;
+set @b1 = 'b1b1b1b1';
+set @b1 = concat(@b1,@b1);
+INSERT INTO t14a () VALUES(1,@b1,'Kyle'),
+ (2,@b1,'JOE'),
+ (3,@b1,'QA');
+
+SELECT * FROM t14a ORDER BY c1;
+--echo *** Select on Slave ****
+sync_slave_with_master;
+--replace_column 5 CURRENT_TIMESTAMP
+SELECT * FROM t14a ORDER BY c1;
+STOP SLAVE;
+RESET SLAVE;
+
+--echo *** Master Drop c5 ***
+connection master;
+ALTER TABLE t14a DROP COLUMN c5;
+RESET MASTER;
+
+--echo *** Start Slave ***
+connection slave;
+START SLAVE;
+
+--echo *** Master Data Insert ***
+connection master;
+set @b1 = 'b1b1b1b1';
+set @b1 = concat(@b1,@b1);
+
+INSERT INTO t14a () VALUES(4,@b1),
+ (5,@b1),
+ (6,@b1);
+SELECT * FROM t14a ORDER BY c1;
+
+--echo *** Select on Slave ****
+sync_slave_with_master;
+--replace_column 5 CURRENT_TIMESTAMP
+SELECT * FROM t14a ORDER BY c1;
####################################################
# - Alter Master Dropping columns from the middle. #
@@ -736,7 +798,7 @@ connection slave;
--replace_result $MASTER_MYPORT MASTER_PORT
--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
--query_vertical SHOW SLAVE STATUS
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
--echo *** Try to insert in master ****
@@ -744,6 +806,8 @@ connection master;
INSERT INTO t15 () VALUES(5,2.00,'Replication Testing',@b1,'Buda',2);
SELECT * FROM t15 ORDER BY c1;
+#SHOW BINLOG EVENTS;
+
--echo *** Try to select from slave ****
sync_slave_with_master;
--replace_column 7 CURRENT_TIMESTAMP
@@ -856,7 +920,10 @@ sync_slave_with_master;
#### Clean Up ####
--disable_warnings
--disable_query_log
-DROP TABLE IF EXISTS t1, t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17;
+connection master;
+DROP TABLE IF EXISTS t1, t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t14a,t15,t16,t17;
+sync_slave_with_master;
+connection master;
--enable_query_log
--enable_warnings
diff --git a/mysql-test/extra/rpl_tests/rpl_row_basic.test b/mysql-test/extra/rpl_tests/rpl_row_basic.test
index 6de254d9931..c35a53f15bc 100644
--- a/mysql-test/extra/rpl_tests/rpl_row_basic.test
+++ b/mysql-test/extra/rpl_tests/rpl_row_basic.test
@@ -215,11 +215,36 @@ sync_slave_with_master;
--echo --- on slave ---
SELECT * FROM t8 ORDER BY a;
-#
-# Test conflicting operations when changing in a table referenced by a
-# foreign key. We'll reuse the above table and just add a table that
-# references it.
-#
+# BUG#31552: Replication breaks when deleting rows from out-of-sync
+# table without PK
+
+--echo **** Test for BUG#31552 ****
+
+--echo **** On Master ****
+# Clean up t1 so that we can use it.
+connection master;
+DELETE FROM t1;
+sync_slave_with_master;
+
+# Just to get a clean binary log
+source include/reset_master_and_slave.inc;
+
+--echo **** On Master ****
+connection master;
+INSERT INTO t1 VALUES ('K','K'), ('L','L'), ('M','M');
+--echo **** On Master ****
+sync_slave_with_master;
+DELETE FROM t1 WHERE C1 = 'L';
+
+connection master;
+DELETE FROM t1;
+query_vertical SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
+sync_slave_with_master;
+let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1);
+disable_query_log;
+eval SELECT "$last_error" AS Last_SQL_Error;
+enable_query_log;
+query_vertical SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
#
# cleanup
@@ -227,3 +252,4 @@ SELECT * FROM t8 ORDER BY a;
connection master;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8;
+sync_slave_with_master;
diff --git a/mysql-test/extra/rpl_tests/rpl_row_charset.test b/mysql-test/extra/rpl_tests/rpl_row_charset.test
index a21ed5bb841..c1eccff9bd5 100644
--- a/mysql-test/extra/rpl_tests/rpl_row_charset.test
+++ b/mysql-test/extra/rpl_tests/rpl_row_charset.test
@@ -38,7 +38,7 @@ show create database mysqltest3;
connection master;
use mysqltest2;
-create table t1 (a int auto_increment primary key, b varchar(100));
+--eval create table t1 (a int auto_increment primary key, b varchar(100))engine=$engine_type;
set character_set_client=cp850, collation_connection=latin2_croatian_ci;
insert into t1 (b) values(@@character_set_server);
insert into t1 (b) values(@@collation_server);
@@ -146,13 +146,15 @@ set collation_server=9999998;
select "--- --3943--" as "";
use test;
-CREATE TABLE t1 (c1 VARBINARY(255), c2 VARBINARY(255));
+--eval CREATE TABLE t1 (c1 VARBINARY(255), c2 VARBINARY(255))ENGINE=$engine_type;
SET CHARACTER_SET_CLIENT=koi8r,
CHARACTER_SET_CONNECTION=cp1251,
CHARACTER_SET_RESULTS=koi8r;
INSERT INTO t1 (c1, c2) VALUES ('îÕ, ÚÁ ÒÙÂÁÌËÕ','îÕ, ÚÁ ÒÙÂÁÌËÕ');
+SET SQL_BIG_SELECTS=1;
select hex(c1), hex(c2) from t1;
sync_slave_with_master;
+SET SQL_BIG_SELECTS=1;
select hex(c1), hex(c2) from t1;
connection master;
diff --git a/mysql-test/extra/rpl_tests/rpl_truncate_helper.test b/mysql-test/extra/rpl_tests/rpl_truncate_helper.test
index 64a8de7c6a0..76db74acfa1 100644
--- a/mysql-test/extra/rpl_tests/rpl_truncate_helper.test
+++ b/mysql-test/extra/rpl_tests/rpl_truncate_helper.test
@@ -1,17 +1,16 @@
-
---disable_query_log
---disable_warnings
connection slave;
STOP SLAVE;
+source include/wait_for_slave_to_stop.inc;
connection master;
+--disable_warnings
DROP TABLE IF EXISTS t1;
-RESET MASTER;
+--enable_warnings
connection slave;
+--disable_warnings
DROP TABLE IF EXISTS t1;
+--enable_warnings
RESET SLAVE;
START SLAVE;
---enable_warnings
---enable_query_log
--echo **** On Master ****
connection master;
@@ -38,3 +37,6 @@ connection master;
DROP TABLE t1;
let $SERVER_VERSION=`select version()`;
source include/show_binlog_events.inc;
+
+connection master;
+RESET MASTER;
diff --git a/mysql-test/include/ctype_common.inc b/mysql-test/include/ctype_common.inc
index 202c508a9c9..89b7ceb0c72 100644
--- a/mysql-test/include/ctype_common.inc
+++ b/mysql-test/include/ctype_common.inc
@@ -51,6 +51,17 @@ SELECT c1 as want1result from t1 where c1 like 'locatio%';
SELECT c1 as want1result from t1 where c1 like 'location%';
DROP TABLE t1;
+#
+# Bug #31070: crash during conversion of charsets
+# Bug #32726: crash with cast in order by clause and cp932 charset
+#
+create table t1 (a set('a') not null);
+insert into t1 values (),();
+select cast(a as char(1)) from t1;
+select a sounds like a from t1;
+select 1 from t1 order by cast(a as char(1));
+drop table t1;
+
DROP DATABASE d1;
# Restore settings
USE test;
diff --git a/mysql-test/include/ctype_regex.inc b/mysql-test/include/ctype_regex.inc
new file mode 100644
index 00000000000..0e6b4c41607
--- /dev/null
+++ b/mysql-test/include/ctype_regex.inc
@@ -0,0 +1,42 @@
+#
+# To test a desired collation, set session.collation_connection to
+# this collation before including this file
+#
+
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+
+#
+# Create a table with two varchar(64) null-able column,
+# using current values of
+# @@character_set_connection and @@collation_connection.
+#
+
+create table t1 as
+select repeat(' ', 64) as s1, repeat(' ',64) as s2
+union
+select null, null;
+show create table t1;
+delete from t1;
+
+insert into t1 values('aaa','aaa');
+insert into t1 values('aaa|qqq','qqq');
+insert into t1 values('gheis','^[^a-dXYZ]+$');
+insert into t1 values('aab','^aa?b');
+insert into t1 values('Baaan','^Ba*n');
+insert into t1 values('aaa','qqq|aaa');
+insert into t1 values('qqq','qqq|aaa');
+
+insert into t1 values('bbb','qqq|aaa');
+insert into t1 values('bbb','qqq');
+insert into t1 values('aaa','aba');
+
+insert into t1 values(null,'abc');
+insert into t1 values('def',null);
+insert into t1 values(null,null);
+insert into t1 values('ghi','ghi[');
+
+select HIGH_PRIORITY s1 regexp s2 from t1;
+
+drop table t1;
diff --git a/mysql-test/include/gis_keys.inc b/mysql-test/include/gis_keys.inc
new file mode 100644
index 00000000000..c75311f062a
--- /dev/null
+++ b/mysql-test/include/gis_keys.inc
@@ -0,0 +1,46 @@
+--source include/have_geometry.inc
+
+#
+# Spatial objects with keys
+#
+
+#
+# Bug #30825: Problems when putting a non-spatial index on a GIS column
+#
+
+CREATE TABLE t1 (p POINT);
+CREATE TABLE t2 (p POINT, INDEX(p));
+INSERT INTO t1 VALUES (POINTFROMTEXT('POINT(1 2)'));
+INSERT INTO t2 VALUES (POINTFROMTEXT('POINT(1 2)'));
+
+# no index, returns 1 as expected
+SELECT COUNT(*) FROM t1 WHERE p=POINTFROMTEXT('POINT(1 2)');
+
+# with index, returns 1 as expected
+# EXPLAIN shows that the index is not used though
+# due to the "most rows covered anyway, so a scan is more effective" rule
+EXPLAIN
+SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)');
+SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)');
+
+# adding another row to the table so that
+# the "most rows covered" rule doesn't kick in anymore
+# now EXPLAIN shows the index used on the table
+# and we're getting the wrong result again
+INSERT INTO t1 VALUES (POINTFROMTEXT('POINT(1 2)'));
+INSERT INTO t2 VALUES (POINTFROMTEXT('POINT(1 2)'));
+EXPLAIN
+SELECT COUNT(*) FROM t1 WHERE p=POINTFROMTEXT('POINT(1 2)');
+SELECT COUNT(*) FROM t1 WHERE p=POINTFROMTEXT('POINT(1 2)');
+
+EXPLAIN
+SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)');
+SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)');
+
+EXPLAIN
+SELECT COUNT(*) FROM t2 IGNORE INDEX(p) WHERE p=POINTFROMTEXT('POINT(1 2)');
+SELECT COUNT(*) FROM t2 IGNORE INDEX(p) WHERE p=POINTFROMTEXT('POINT(1 2)');
+
+DROP TABLE t1, t2;
+
+--echo End of 5.0 tests
diff --git a/mysql-test/include/handler.inc b/mysql-test/include/handler.inc
index 437dd6ced4d..485b2e881d3 100644
--- a/mysql-test/include/handler.inc
+++ b/mysql-test/include/handler.inc
@@ -498,3 +498,197 @@ handler t1_alias read a next;
handler t1_alias READ a next where inexistent > 0;
handler t1_alias close;
drop table t1;
+
+#
+# Bug#21587 FLUSH TABLES causes server crash when used with HANDLER statements
+#
+
+--disable_warnings
+drop table if exists t1,t2;
+--enable_warnings
+create table t1 (c1 int);
+create table t2 (c1 int);
+insert into t1 values (1);
+insert into t2 values (2);
+--echo connection: default
+handler t1 open;
+handler t1 read first;
+connect (flush,localhost,root,,);
+connection flush;
+--echo connection: flush
+--send flush tables;
+connection default;
+--echo connection: default
+let $wait_condition=
+ select count(*) = 1 from information_schema.processlist
+ where state = "Flushing tables";
+--source include/wait_condition.inc
+handler t2 open;
+handler t2 read first;
+handler t1 read next;
+handler t1 close;
+handler t2 close;
+connection flush;
+reap;
+connection default;
+drop table t1,t2;
+disconnect flush;
+
+#
+# Bug#31409 RENAME TABLE causes server crash or deadlock when used with HANDLER statements
+#
+
+--disable_warnings
+drop table if exists t1,t2;
+--enable_warnings
+create table t1 (c1 int);
+--echo connection: default
+handler t1 open;
+handler t1 read first;
+connect (flush,localhost,root,,);
+connection flush;
+--echo connection: flush
+--send rename table t1 to t2;
+connection default;
+--echo connection: default
+let $wait_condition=
+ select count(*) = 1 from information_schema.processlist
+ where state = "Waiting for table" and info = "rename table t1 to t2";
+--source include/wait_condition.inc
+handler t2 open;
+handler t2 read first;
+--error ER_NO_SUCH_TABLE
+handler t1 read next;
+handler t1 close;
+handler t2 close;
+connection flush;
+reap;
+connection default;
+drop table t2;
+disconnect flush;
+
+#
+# Bug#30882 Dropping a temporary table inside a stored function may cause a server crash
+#
+# Test HANDLER statements in conjunction with temporary tables. While the temporary table
+# is open by a HANDLER, no other statement can access it.
+#
+
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+create temporary table t1 (a int, b char(1), key a(a), key b(a,b));
+insert into t1 values (0,"a"),(1,"b"),(2,"c"),(3,"d"),(4,"e"),
+ (5,"f"),(6,"g"),(7,"h"),(8,"i"),(9,"j");
+select a,b from t1;
+handler t1 open as a1;
+handler a1 read a first;
+handler a1 read a next;
+handler a1 read a next;
+--error ER_CANT_REOPEN_TABLE
+select a,b from t1;
+handler a1 read a prev;
+handler a1 read a prev;
+handler a1 read a=(6) where b="g";
+handler a1 close;
+select a,b from t1;
+handler t1 open as a2;
+handler a2 read a first;
+handler a2 read a last;
+handler a2 read a prev;
+handler a2 close;
+drop table t1;
+
+#
+# Bug#31397 Inconsistent drop table behavior of handler tables.
+#
+
+--disable_warnings
+drop table if exists t1,t2;
+--enable_warnings
+create table t1 (a int);
+handler t1 open as t1_alias;
+drop table t1;
+create table t1 (a int);
+handler t1 open as t1_alias;
+flush tables;
+drop table t1;
+create table t1 (a int);
+handler t1 open as t1_alias;
+handler t1_alias close;
+drop table t1;
+create table t1 (a int);
+handler t1 open as t1_alias;
+handler t1_alias read first;
+drop table t1;
+--error ER_UNKNOWN_TABLE
+handler t1_alias read next;
+
+# Test that temporary tables associated with handlers are properly dropped.
+
+create table t1 (a int);
+create temporary table t2 (a int, key(a));
+handler t1 open as a1;
+handler t2 open as a2;
+handler a2 read a first;
+drop table t1, t2;
+--error ER_UNKNOWN_TABLE
+handler a2 read a next;
+--error ER_UNKNOWN_TABLE
+handler a1 close;
+
+# Alter table drop handlers
+
+create table t1 (a int, key(a));
+create table t2 like t1;
+handler t1 open as a1;
+handler t2 open as a2;
+handler a1 read a first;
+handler a2 read a first;
+alter table t1 add b int;
+--error ER_UNKNOWN_TABLE
+handler a1 close;
+handler a2 close;
+drop table t1, t2;
+
+# Rename table drop handlers
+
+create table t1 (a int, key(a));
+handler t1 open as a1;
+handler a1 read a first;
+rename table t1 to t2;
+--error ER_UNKNOWN_TABLE
+handler a1 read a first;
+drop table t2;
+
+# Optimize table drop handlers
+
+create table t1 (a int, key(a));
+create table t2 like t1;
+handler t1 open as a1;
+handler t2 open as a2;
+handler a1 read a first;
+handler a2 read a first;
+optimize table t1;
+--error ER_UNKNOWN_TABLE
+handler a1 close;
+handler a2 close;
+drop table t1, t2;
+
+# Flush tables causes handlers reopen
+
+create table t1 (a int, b char(1), key a(a), key b(a,b));
+insert into t1 values (0,"a"),(1,"b"),(2,"c"),(3,"d"),(4,"e"),
+ (5,"f"),(6,"g"),(7,"h"),(8,"i"),(9,"j");
+handler t1 open;
+handler t1 read a first;
+handler t1 read a next;
+flush tables;
+handler t1 read a next;
+handler t1 read a next;
+flush tables with read lock;
+handler t1 read a next;
+unlock tables;
+drop table t1;
+--error ER_UNKNOWN_TABLE
+handler t1 read a next;
diff --git a/mysql-test/include/innodb_rollback_on_timeout.inc b/mysql-test/include/innodb_rollback_on_timeout.inc
index 73c7374c79e..6be47397e4b 100644
--- a/mysql-test/include/innodb_rollback_on_timeout.inc
+++ b/mysql-test/include/innodb_rollback_on_timeout.inc
@@ -2,6 +2,10 @@
# Bug #24200: Provide backwards compatibility mode for 4.x "rollback on
# transaction timeout"
#
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+
show variables like 'innodb_rollback_on_timeout';
create table t1 (a int unsigned not null primary key) engine = innodb;
insert into t1 values (1);
diff --git a/mysql-test/include/mix1.inc b/mysql-test/include/mix1.inc
index e2a22303d9d..3005e67935b 100644
--- a/mysql-test/include/mix1.inc
+++ b/mysql-test/include/mix1.inc
@@ -29,6 +29,7 @@ eval SET SESSION STORAGE_ENGINE = $engine_type;
--disable_warnings
drop table if exists t1,t2,t3,t1m,t1i,t2m,t2i,t4;
+drop procedure if exists p1;
--enable_warnings
@@ -723,6 +724,19 @@ set @@sort_buffer_size=default;
DROP TABLE t1,t2;
#
+# Bug #32815: query with ORDER BY and a possible ref_or_null access
+#
+
+CREATE TABLE t1 (id int, type char(6), d int, INDEX idx(id,d)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES
+ (191, 'member', 1), (NULL, 'member', 3), (NULL, 'member', 4), (201, 'member', 2);
+
+EXPLAIN SELECT * FROM t1 WHERE id=191 OR id IS NULL ORDER BY d;
+SELECT * FROM t1 WHERE id=191 OR id IS NULL ORDER BY d;
+
+DROP TABLE t1;
+
+
# Test of behaviour with CREATE ... SELECT
#
@@ -1019,6 +1033,64 @@ SELECT * FROM t1 ORDER BY b DESC, a ASC;
DROP TABLE t1;
+###########################################################################
+
+--echo
+--echo #
+--echo # Bug#27610: ALTER TABLE ROW_FORMAT=... does not rebuild the table.
+--echo #
+
+--echo
+--echo # - prepare;
+--echo
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+--echo
+
+CREATE TABLE t1(c INT)
+ ENGINE = InnoDB
+ ROW_FORMAT = COMPACT;
+
+--echo
+--echo # - initial check;
+--echo
+
+SELECT table_schema, table_name, row_format
+FROM INFORMATION_SCHEMA.TABLES
+WHERE table_schema = DATABASE() AND table_name = 't1';
+
+--echo
+--echo # - change ROW_FORMAT and check;
+--echo
+
+ALTER TABLE t1 ROW_FORMAT = REDUNDANT;
+
+--echo
+
+SELECT table_schema, table_name, row_format
+FROM INFORMATION_SCHEMA.TABLES
+WHERE table_schema = DATABASE() AND table_name = 't1';
+
+--echo
+--echo # - that's it, cleanup.
+--echo
+
+DROP TABLE t1;
+
+###########################################################################
+
+#
+# Bug #31137: Assertion failed: primary_key_no == -1 || primary_key_no == 0
+#
+create table t1(a char(10) not null, unique key aa(a(1)),
+ b char(4) not null, unique key bb(b(4))) engine=innodb;
+desc t1;
+show create table t1;
+drop table t1;
+
--echo End of 5.0 tests
# Fix for BUG#19243 "wrong LAST_INSERT_ID() after ON DUPLICATE KEY
@@ -1146,4 +1218,169 @@ select @b:=f2 from t1;
select if(@a=@b,"ok","wrong");
drop table t1;
+#
+# Bug #31310: Locked rows silently skipped in read-committed isolation level.
+#
+
+connect (con1,localhost,root,,);
+connect (con2,localhost,root,,);
+SET SESSION AUTOCOMMIT = 0;
+SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
+--echo # Switch to connection con1
+connection con1;
+
+eval
+CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(256))
+ENGINE = $engine_type;
+INSERT INTO t1 VALUES (1,2);
+
+--echo # 1. test for locking:
+
+BEGIN;
+--enable_info
+UPDATE t1 SET b = 12 WHERE a = 1;
+--disable_info
+SELECT * FROM t1;
+
+--echo # Switch to connection con2
+connection con2;
+
+--enable_info
+--disable_abort_on_error
+--error ER_LOCK_WAIT_TIMEOUT
+UPDATE t1 SET b = 21 WHERE a = 1;
+--disable_info
+
+--echo # Switch to connection con1
+connection con1;
+SELECT * FROM t1;
+ROLLBACK;
+
+--echo # 2. test for serialized update:
+
+CREATE TABLE t2 (a INT);
+
+TRUNCATE t1;
+INSERT INTO t1 VALUES (1,'init');
+
+DELIMITER |;
+CREATE PROCEDURE p1()
+BEGIN
+ UPDATE t1 SET b = CONCAT(b, '+con2') WHERE a = 1;
+ INSERT INTO t2 VALUES ();
+END|
+DELIMITER ;|
+
+BEGIN;
+--enable_info
+UPDATE t1 SET b = CONCAT(b, '+con1') WHERE a = 1;
+--disable_info
+SELECT * FROM t1;
+
+--echo # Switch to connection con2
+connection con2;
+
+--send CALL p1;
+
+--echo # Switch to connection con1
+connection con1;
+SELECT * FROM t1;
+COMMIT;
+
+let $bug31310 = 1;
+while ($bug31310)
+{
+ let $bug31310= `SELECT 1 - COUNT(*) FROM t2`;
+}
+
+SELECT * FROM t1;
+
+--echo # Switch to connection con2
+connection con2;
+SELECT * FROM t1;
+
+--echo # Switch to connection con1
+connection con1;
+
+--echo # 3. test for updated key column:
+
+TRUNCATE t1;
+TRUNCATE t2;
+
+INSERT INTO t1 VALUES (1,'init');
+
+BEGIN;
+--enable_info
+UPDATE t1 SET a = 2, b = CONCAT(b, '+con1') WHERE a = 1;
+--disable_info
+SELECT * FROM t1;
+
+--echo # Switch to connection con2
+connection con2;
+
+--send CALL p1;
+
+--echo # Switch to connection con1
+connection con1;
+SELECT * FROM t1;
+COMMIT;
+
+let $bug31310 = 1;
+while ($bug31310)
+{
+ let $bug31310= `SELECT 1 - COUNT(*) FROM t2`;
+}
+
+SELECT * FROM t1;
+
+--echo # Switch to connection con2
+connection con2;
+SELECT * FROM t1;
+
+connection default;
+disconnect con1;
+disconnect con2;
+DROP PROCEDURE p1;
+DROP TABLE t1, t2;
+# Bug#30747 Create table with identical constraint names behaves incorrectly
+#
+
+if ($test_foreign_keys)
+{
+ CREATE TABLE t1 (a INT NOT NULL, b INT NOT NULL, PRIMARY KEY (a,b)) engine=innodb;
+ --error ER_WRONG_FK_DEF
+ CREATE TABLE t2 (c INT NOT NULL, d INT NOT NULL, PRIMARY KEY (c,d),
+ CONSTRAINT c2 FOREIGN KEY f2 (c) REFERENCES t1 (a,b) ON UPDATE NO ACTION) engine=innodb;
+ --error ER_WRONG_FK_DEF
+ CREATE TABLE t2 (c INT NOT NULL, d INT NOT NULL, PRIMARY KEY (c,d),
+ CONSTRAINT c2 FOREIGN KEY (c) REFERENCES t1 (a,b) ON UPDATE NO ACTION) engine=innodb;
+ CREATE TABLE t2 (c INT NOT NULL, d INT NOT NULL, PRIMARY KEY (c,d),
+ CONSTRAINT c1 FOREIGN KEY c2 (c) REFERENCES t1 (a) ON DELETE NO ACTION,
+ CONSTRAINT c2 FOREIGN KEY (c) REFERENCES t1 (a) ON UPDATE NO ACTION) engine=innodb;
+ ALTER TABLE t2 DROP FOREIGN KEY c2;
+ DROP TABLE t2;
+ --error ER_WRONG_FK_DEF
+ CREATE TABLE t2 (c INT NOT NULL, d INT NOT NULL, PRIMARY KEY (c,d),
+ FOREIGN KEY (c) REFERENCES t1 (a,k) ON UPDATE NO ACTION) engine=innodb;
+ --error ER_WRONG_FK_DEF
+ CREATE TABLE t2 (c INT NOT NULL, d INT NOT NULL, PRIMARY KEY (c,d),
+ FOREIGN KEY f1 (c) REFERENCES t1 (a,k) ON UPDATE NO ACTION) engine=innodb;
+ CREATE TABLE t2 (c INT NOT NULL, d INT NOT NULL, PRIMARY KEY (c,d),
+ CONSTRAINT c1 FOREIGN KEY f1 (c) REFERENCES t1 (a) ON DELETE NO ACTION,
+ CONSTRAINT c2 FOREIGN KEY (c) REFERENCES t1 (a) ON UPDATE NO ACTION,
+ FOREIGN KEY f3 (c) REFERENCES t1 (a) ON UPDATE NO ACTION,
+ FOREIGN KEY (c) REFERENCES t1 (a) ON UPDATE NO ACTION) engine=innodb;
+ SHOW CREATE TABLE t2;
+ DROP TABLE t2;
+ DROP TABLE t1;
+}
+
+#
+# Bug #26447: "ALTER TABLE .. ORDER" does not work with InnoDB and
+# auto_increment keys
+#
+create table t1 (a int auto_increment primary key) engine=innodb;
+alter table t1 order by a;
+drop table t1;
+
--echo End of 5.1 tests
diff --git a/mysql-test/include/partition_1.inc b/mysql-test/include/partition_1.inc
deleted file mode 100644
index b0094db2efe..00000000000
--- a/mysql-test/include/partition_1.inc
+++ /dev/null
@@ -1,750 +0,0 @@
--- source include/have_partition.inc
-
-# include/partition_1.inc
-#
-# Partitionong tests
-#
-# Attention: The variable
-# $engine -- Storage engine to be tested.
-# must be set within the script sourcing this file.
-#
---disable_abort_on_error
-SET AUTOCOMMIT= 1;
-
-##### Disabled testcases, because of open bugs #####
---echo
---echo #------------------------------------------------------------------------
---echo # There are several testcases disabled because ouf the open bugs
---echo # #15407 , #15408 , #15890 , #15961 , #13447 , #15966 , #15968, #16370
---echo #------------------------------------------------------------------------
-# Bug#15407 Partitions: crash if subpartition
-let $fixed_bug15407= 0;
-# Bug#15408 Partitions: subpartition names are not unique
-let $fixed_bug15408= 0;
-# Bug#15890 Partitions: Strange interpretation of partition number
-let $fixed_bug15890= 0;
-# Bug#15961 Partitions: Creation of subpart. table without subpart. rule not rejected
-let $fixed_bug15961= 0;
-# Bug#13447 Partitions: crash with alter table
-let $fixed_bug13447= 0;
-# Bug#15966 Partitions: crash if session default engine <> engine used in create table
-let $fixed_bug15966= 0;
-# Bug#15968 Partitions: crash when INSERT with f1 = -1 into PARTITION BY HASH(f1)
-let $fixed_bug15968= 0;
-# Bug #16370 Partitions: subpartitions names not mentioned in SHOW CREATE TABLE output
-let $fixed_bug16370= 0;
-
-##### Option, for displaying files #####
-#
-# Attention: Displaying the directory content via "ls $MYSQLTEST_VARDIR/master-data/test/t*"
-# is probably not portable.
-# let $ls= 0; disables the execution of "ls ....."
-let $ls= 0;
-
-################################################################################
-# Partitioning syntax
-#
-# CREATE TABLE .... (column-list ..)
-# PARTITION BY
-# KEY '(' ( column-list ) ')'
-# | RANGE '(' ( expr ) ')'
-# | LIST '(' ( expr ) ')'
-# | HASH '(' ( expr ) ')'
-# [PARTITIONS num ]
-# [SUBPARTITION BY
-# KEY '(' ( column-list ) ')'
-# | HASH '(' ( expr ) ')'
-# [SUBPARTITIONS num ]
-# ]
-# [ '('
-# ( PARTITION logical-name
-# [ VALUES LESS THAN '(' ( expr | MAX_VALUE ) ')' ]
-# [ VALUES IN '(' (expr)+ ')' ]
-# [ TABLESPACE tablespace-name ]
-# [ [ STORAGE ] ENGINE [ '=' ] storage-engine-name ]
-# [ NODEGROUP nodegroup-id ]
-# [ '('
-# ( SUBPARTITION logical-name
-# [ TABLESPACE tablespace-name ]
-# [ STORAGE ENGINE = storage-engine-name ]
-# [ NODEGROUP nodegroup-id ]
-# )+
-# ')'
-# )+
-# ')'
-# ]
-################################################################################
-
---echo
---echo #------------------------------------------------------------------------
---echo # 0. Setting of auxiliary variables + Creation of an auxiliary table
---echo # needed in all testcases
---echo #------------------------------------------------------------------------
-let $max_row= `SELECT @max_row`;
-let $max_row_div2= `SELECT @max_row DIV 2`;
-let $max_row_div3= `SELECT @max_row DIV 3`;
-let $max_row_div4= `SELECT @max_row DIV 4`;
-let $max_int_4= 2147483647;
---disable_warnings
-DROP TABLE IF EXISTS t0_template;
---enable_warnings
-CREATE TABLE t0_template ( f1 INTEGER, f2 char(20), PRIMARY KEY(f1))
-ENGINE = MEMORY;
---echo # Logging of <max_row> INSERTs into t0_template suppressed
---disable_query_log
-let $num= $max_row;
-while ($num)
-{
- eval INSERT INTO t0_template SET f1 = $num, f2 = '---$num---';
-
- dec $num;
-}
---enable_query_log
-
---echo
---echo #------------------------------------------------------------------------
---echo # 1. Some syntax checks
---echo #------------------------------------------------------------------------
---echo # 1.1 Subpartioned table without subpartitioning rule must be rejected
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_warnings
-if ($fixed_bug15961)
-{
-# Bug#15961 Partitions: Creation of subpart. table without subpart. rule not rejected
---error 9999
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1)
-( PARTITION part1 VALUES LESS THAN (1000) (SUBPARTITION subpart11));
-}
---echo # FIXME Implement testcases, where it is checked that all create and
---echo # alter table statements
---echo # - with missing mandatory parameters are rejected
---echo # - with optional parameters are accepted
---echo # - with wrong combinations of optional parameters are rejected
---echo # - ............
-
---echo
---echo #------------------------------------------------------------------------
---echo # 2. Checks where the engine is assigned on all supported (CREATE TABLE
---echo # statement) positions + basic operations on the tables
---echo # Storage engine mixups are currently (2005-12-23) not supported
---echo #------------------------------------------------------------------------
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_warnings
-
---echo # 2.1 non partitioned table (for comparison)
-eval CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) ENGINE = $engine;
-# MLML Full size (as check of check routine)
---source include/partition_10.inc
-DROP TABLE t1;
-#
---echo # 2.2 Assignment of storage engine just after column list only
-eval CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) ENGINE = $engine
- PARTITION BY HASH(f1) PARTITIONS 2;
---source include/partition_10.inc
-DROP TABLE t1;
-#
---echo # 2.3 Assignment of storage engine just after partition or subpartition
---echo # name only
-eval CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
- PARTITION BY HASH(f1)
- ( PARTITION part1 STORAGE ENGINE = $engine,
- PARTITION part2 STORAGE ENGINE = $engine
- );
---source include/partition_10.inc
-DROP TABLE t1;
-eval CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
- PARTITION BY RANGE(f1)
- SUBPARTITION BY HASH(f1)
- ( PARTITION part1 VALUES LESS THAN ($max_row_div2)
- (SUBPARTITION subpart11 STORAGE ENGINE = $engine,
- SUBPARTITION subpart12 STORAGE ENGINE = $engine),
- PARTITION part2 VALUES LESS THAN ($max_int_4)
- (SUBPARTITION subpart21 STORAGE ENGINE = $engine,
- SUBPARTITION subpart22 STORAGE ENGINE = $engine)
- );
---source include/partition_10.inc
-DROP TABLE t1;
-#
---echo # 2.4 Some but not all named partitions or subpartitions get a storage
---echo # engine assigned
-eval CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
- PARTITION BY HASH(f1)
- ( PARTITION part1 STORAGE ENGINE = $engine,
- PARTITION part2
- );
---source include/partition_10.inc
-DROP TABLE t1;
-eval CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
- PARTITION BY HASH(f1)
- ( PARTITION part1 ,
- PARTITION part2 STORAGE ENGINE = $engine
- );
---source include/partition_10.inc
-DROP TABLE t1;
-eval CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
- PARTITION BY RANGE(f1)
- SUBPARTITION BY HASH(f1)
- ( PARTITION part1 VALUES LESS THAN ($max_row_div2)
- (SUBPARTITION subpart11,
- SUBPARTITION subpart12 STORAGE ENGINE = $engine),
- PARTITION part2 VALUES LESS THAN ($max_int_4)
- (SUBPARTITION subpart21 STORAGE ENGINE = $engine,
- SUBPARTITION subpart22 STORAGE ENGINE = $engine)
- );
---source include/partition_10.inc
-DROP TABLE t1;
-eval CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
- PARTITION BY RANGE(f1)
- SUBPARTITION BY HASH(f1)
- ( PARTITION part1 VALUES LESS THAN ($max_row_div2)
- (SUBPARTITION subpart11 STORAGE ENGINE = $engine,
- SUBPARTITION subpart12 STORAGE ENGINE = $engine),
- PARTITION part2 VALUES LESS THAN ($max_int_4)
- (SUBPARTITION subpart21,
- SUBPARTITION subpart22 )
- );
---source include/partition_10.inc
-DROP TABLE t1;
-#
---echo # 2.5 Storage engine assignment after partition name + after name of
---echo # subpartitions belonging to another partition
-eval CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
- PARTITION BY RANGE(f1)
- SUBPARTITION BY HASH(f1)
- ( PARTITION part1 VALUES LESS THAN ($max_row_div2) ENGINE = $engine
- (SUBPARTITION subpart11,
- SUBPARTITION subpart12),
- PARTITION part2 VALUES LESS THAN ($max_int_4)
- (SUBPARTITION subpart21 STORAGE ENGINE = $engine,
- SUBPARTITION subpart22 STORAGE ENGINE = $engine)
- );
---source include/partition_10.inc
-DROP TABLE t1;
-eval CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
- PARTITION BY RANGE(f1)
- SUBPARTITION BY HASH(f1)
- ( PARTITION part1 VALUES LESS THAN ($max_row_div2)
- (SUBPARTITION subpart11 STORAGE ENGINE = $engine,
- SUBPARTITION subpart12 STORAGE ENGINE = $engine),
- PARTITION part2 VALUES LESS THAN ($max_int_4) ENGINE = $engine
- (SUBPARTITION subpart21,
- SUBPARTITION subpart22)
- );
---source include/partition_10.inc
-DROP TABLE t1;
-#
---echo # 2.6 Precedence of storage engine assignments
---echo # 2.6.1 Storage engine assignment after column list + after partition
---echo # or subpartition name
-eval CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) ENGINE = $engine
- PARTITION BY HASH(f1)
- ( PARTITION part1 STORAGE ENGINE = $engine,
- PARTITION part2 STORAGE ENGINE = $engine
- );
---source include/partition_10.inc
-DROP TABLE t1;
-eval CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) ENGINE = $engine
- PARTITION BY RANGE(f1)
- SUBPARTITION BY HASH(f1)
- ( PARTITION part1 VALUES LESS THAN ($max_row_div2)
- (SUBPARTITION subpart11 STORAGE ENGINE = $engine,
- SUBPARTITION subpart12 STORAGE ENGINE = $engine),
- PARTITION part2 VALUES LESS THAN ($max_int_4)
- (SUBPARTITION subpart21 STORAGE ENGINE = $engine,
- SUBPARTITION subpart22 STORAGE ENGINE = $engine)
- );
---source include/partition_10.inc
-DROP TABLE t1;
---echo # 2.6.2 Storage engine assignment after partition name + after
---echo # subpartition name
-# in partition part + in sub partition part
-eval CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
- PARTITION BY RANGE(f1)
- SUBPARTITION BY HASH(f1)
- ( PARTITION part1 VALUES LESS THAN ($max_row_div2) STORAGE ENGINE = $engine
- (SUBPARTITION subpart11 STORAGE ENGINE = $engine,
- SUBPARTITION subpart12 STORAGE ENGINE = $engine),
- PARTITION part2 VALUES LESS THAN ($max_int_4)
- (SUBPARTITION subpart21 STORAGE ENGINE = $engine,
- SUBPARTITION subpart22 STORAGE ENGINE = $engine)
- );
---source include/partition_10.inc
-DROP TABLE t1;
-
---echo # 2.7 Session default engine differs from engine used within create table
-eval SET SESSION storage_engine=$engine_other;
-if ($fixed_bug15966)
-{
-# Bug#15966 Partitions: crash if session default engine <> engine used in create table
-eval CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) ( PARTITION part1 ENGINE = $engine);
---source include/partition_10.inc
-DROP TABLE t1;
-# Bug#15966 Partitions: crash if session default engine <> engine used in create table
-eval CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
- PARTITION BY RANGE(f1)
- SUBPARTITION BY HASH(f1)
- ( PARTITION part1 VALUES LESS THAN (1000)
- (SUBPARTITION subpart11 STORAGE ENGINE = $engine,
- SUBPARTITION subpart12 STORAGE ENGINE = $engine));
---source include/partition_10.inc
-DROP TABLE t1;
-}
-eval SET SESSION storage_engine=$engine;
-
-
---echo
---echo #------------------------------------------------------------------------
---echo # 3. Check assigning the number of partitions and subpartitions
---echo # with and without named partitions/subpartitions
---echo #------------------------------------------------------------------------
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_warnings
---echo # 3.1 (positive) without partition/subpartition number assignment
---echo # 3.1.1 no partition number, no named partitions
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1);
---source include/partition_10.inc
-DROP TABLE t1;
---echo # 3.1.2 no partition number, named partitions
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) (PARTITION part1, PARTITION part2);
---source include/partition_10.inc
-DROP TABLE t1;
-# Attention: Several combinations are impossible
-# If subpartitioning exists
-# - partitioning algorithm must be RANGE or LIST
-# This implies the assignment of named partitions.
-# - subpartitioning algorithm must be HASH or KEY
---echo # 3.1.3 variations on no partition/subpartition number, named partitions,
---echo # different subpartitions are/are not named
-#
-# Partition name -- "properties"
-# part1 -- first/non last
-# part2 -- non first/non last
-# part3 -- non first/ last
-#
-# Testpattern:
-# named subpartitions in
-# Partition part1 part2 part3
-# N N N
-# N N Y
-# N Y N
-# N Y Y
-# Y N N
-# Y N Y
-# Y Y N
-# Y Y Y
---disable_query_log
-let $part0= CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1);
-#
-eval SET @aux = '(PARTITION part1 VALUES LESS THAN ($max_row_div2),';
-let $part1_N= `SELECT @AUX`;
-eval SET @aux = '(PARTITION part1 VALUES LESS THAN ($max_row_div2)
-(SUBPARTITION subpart11 , SUBPARTITION subpart12 ),';
-let $part1_Y= `SELECT @AUX`;
-#
-eval SET @aux = 'PARTITION part2 VALUES LESS THAN ($max_row),';
-let $part2_N= `SELECT @AUX`;
-eval SET @aux = 'PARTITION part2 VALUES LESS THAN ($max_row)
-(SUBPARTITION subpart21 , SUBPARTITION subpart22 ),';
-let $part2_Y= `SELECT @AUX`;
-#
-eval SET @aux = 'PARTITION part3 VALUES LESS THAN ($max_int_4))';
-let $part3_N= `SELECT @AUX`;
-eval SET @aux = 'PARTITION part3 VALUES LESS THAN ($max_int_4)
-(SUBPARTITION subpart31 , SUBPARTITION subpart32 ))';
-let $part3_Y= `SELECT @AUX`;
---enable_query_log
-
-eval $part0 $part1_N $part2_N $part3_N ;
-DROP TABLE t1;
-# Bug#15407 Partitions: crash if subpartition
-if ($fixed_bug15407)
-{
-eval $part0 $part1_N $part2_N $part3_Y ;
---source include/partition_10.inc
-DROP TABLE t1;
-eval $part0 $part1_N $part2_Y $part3_N ;
---source include/partition_10.inc
-DROP TABLE t1;
-eval $part0 $part1_N $part2_Y $part3_Y ;
---source include/partition_10.inc
-DROP TABLE t1;
-eval $part0 $part1_Y $part2_N $part3_N ;
---source include/partition_10.inc
-DROP TABLE t1;
-eval $part0 $part1_Y $part2_N $part3_Y ;
---source include/partition_10.inc
-DROP TABLE t1;
-eval $part0 $part1_Y $part2_Y $part3_N ;
---source include/partition_10.inc
-DROP TABLE t1;
-}
-eval $part0 $part1_Y $part2_Y $part3_Y ;
---source include/partition_10.inc
-DROP TABLE t1;
-
---echo # 3.2 partition/subpartition numbers good and bad values and notations
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_warnings
---echo # 3.2.1 partition/subpartition numbers INTEGER notation
-# ML: "positive/negative" is my private judgement. It need no to correspond
-# with the server response.
-# (positive) number = 2
-let $part_number= 2;
---source include/partition_11.inc
-# (positive) special case number = 1
-let $part_number= 1;
---source include/partition_11.inc
-# (negative) 0 is non sense
-let $part_number= 0;
---source include/partition_11.inc
-# (negative) -1 is non sense
-let $part_number= -1;
---source include/partition_11.inc
-# (negative) 1000000 is too huge
-let $part_number= 1000000;
---source include/partition_11.inc
-
-if ($fixed_bug15890)
-{
---echo # 3.2.2 partition/subpartition numbers DECIMAL notation
-# (positive) number = 2.0
-let $part_number= 2.0;
---source include/partition_11.inc
-# (negative) -2.0 is non sense
-let $part_number= -2.0;
---source include/partition_11.inc
-# (negative) case number = 0.0 is non sense
-let $part_number= 0.0;
---source include/partition_11.inc
-# Bug#15890 Partitions: Strange interpretation of partition number
-# (negative) number = 1.5 is non sense
-let $part_number= 1.5;
---source include/partition_11.inc
-# (negative) number is too huge
-let $part_number= 999999999999999999999999999999.999999999999999999999999999999;
---source include/partition_11.inc
-# (negative) number is nearly zero
-let $part_number= 0.000000000000000000000000000001;
---source include/partition_11.inc
-
---echo # 3.2.3 partition/subpartition numbers FLOAT notation
-##### FLOAT notation
-# (positive) number = 2.0E+0
-let $part_number= 2.0E+0;
---source include/partition_11.inc
-# Bug#15890 Partitions: Strange interpretation of partition number
-# (positive) number = 0.2E+1
-let $part_number= 0.2E+1;
---source include/partition_11.inc
-# (negative) -2.0E+0 is non sense
-let $part_number= -2.0E+0;
---source include/partition_11.inc
-# (negative) 0.15E+1 is non sense
-let $part_number= 0.15E+1;
---source include/partition_11.inc
-# (negative) 0.0E+300 is zero
-let $part_number= 0.0E+300;
---source include/partition_11.inc
-# Bug#15890 Partitions: Strange interpretation of partition number
-# (negative) 1E+300 is too huge
-let $part_number= 1E+300;
---source include/partition_11.inc
-# (negative) 1E-300 is nearly zero
-let $part_number= 1E-300;
---source include/partition_11.inc
-}
-
---echo # 3.2.4 partition/subpartition numbers STRING notation
-##### STRING notation
-# (negative?) case number = '2'
-let $part_number= '2';
---source include/partition_11.inc
-# (negative?) case number = '2.0'
-let $part_number= '2.0';
---source include/partition_11.inc
-# (negative?) case number = '0.2E+1'
-let $part_number= '0.2E+1';
---source include/partition_11.inc
-# (negative) Strings starts with digit, but 'A' follows
-let $part_number= '2A';
---source include/partition_11.inc
-# (negative) Strings starts with 'A', but digit follows
-let $part_number= 'A2';
---source include/partition_11.inc
-# (negative) empty string
-let $part_number= '';
---source include/partition_11.inc
-# (negative) string without any digits
-let $part_number= 'GARBAGE';
---source include/partition_11.inc
-
---echo # 3.2.5 partition/subpartition numbers other notations
-# (negative) Strings starts with digit, but 'A' follows
-let $part_number= 2A;
---source include/partition_11.inc
-# (negative) Strings starts with 'A', but digit follows
-let $part_number= A2;
---source include/partition_11.inc
-# (negative) string without any digits
-let $part_number= GARBAGE;
---source include/partition_11.inc
-
-# (negative?) double quotes
-let $part_number= "2";
---source include/partition_11.inc
-# (negative) Strings starts with digit, but 'A' follows
-let $part_number= "2A";
---source include/partition_11.inc
-# (negative) Strings starts with 'A', but digit follows
-let $part_number= "A2";
---source include/partition_11.inc
-# (negative) string without any digits
-let $part_number= "GARBAGE";
---source include/partition_11.inc
-
---echo # 3.3 Mixups of assigned partition/subpartition numbers and names
---echo # 3.3.1 (positive) number of partition/subpartition
---echo # = number of named partition/subpartition
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) PARTITIONS 2 ( PARTITION part1, PARTITION part2 ) ;
-SHOW CREATE TABLE t1;
-DROP TABLE t1;
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) PARTITIONS 2
-SUBPARTITION BY HASH(f1) SUBPARTITIONS 2
-( PARTITION part1 VALUES LESS THAN (1000)
- (SUBPARTITION subpart11, SUBPARTITION subpart12),
- PARTITION part2 VALUES LESS THAN (2147483647)
- (SUBPARTITION subpart21, SUBPARTITION subpart22)
-);
---source include/partition_layout.inc
-DROP TABLE t1;
---echo # 3.3.2 (positive) number of partition/subpartition ,
---echo # 0 (= no) named partition/subpartition
---echo # already checked above
---echo # 3.3.3 (negative) number of partitions/subpartitions
---echo # > number of named partitions/subpartitions
---error 1064
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) PARTITIONS 2 ( PARTITION part1 ) ;
-# Wrong number of named subpartitions in first partition
---error 1064
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1)
-SUBPARTITION BY HASH(f1) SUBPARTITIONS 2
-( PARTITION part1 VALUES LESS THAN (1000)
- (SUBPARTITION subpart11 ),
- PARTITION part2 VALUES LESS THAN (2147483647)
- (SUBPARTITION subpart21, SUBPARTITION subpart22)
-);
-# Wrong number of named subpartitions in non first/non last partition
---error 1064
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1)
-SUBPARTITION BY HASH(f1) SUBPARTITIONS 2
-( PARTITION part1 VALUES LESS THAN (1000)
- (SUBPARTITION subpart11, SUBPARTITION subpart12),
- PARTITION part2 VALUES LESS THAN (2000)
- (SUBPARTITION subpart21 ),
- PARTITION part3 VALUES LESS THAN (2147483647)
- (SUBPARTITION subpart31, SUBPARTITION subpart32)
-);
-# Wrong number of named subpartitions in last partition
---error 1064
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) PARTITIONS 2
-SUBPARTITION BY HASH(f1) SUBPARTITIONS 2
-( PARTITION part1 VALUES LESS THAN (1000)
- (SUBPARTITION subpart11, SUBPARTITION subpart12),
- PARTITION part2 VALUES LESS THAN (2147483647)
- (SUBPARTITION subpart21 )
-);
---echo # 3.3.4 (negative) number of partitions < number of named partitions
---error 1064
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) PARTITIONS 1 ( PARTITION part1, PARTITION part2 ) ;
-# Wrong number of named subpartitions in first partition
---error 1064
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1)
-SUBPARTITION BY HASH(f1) SUBPARTITIONS 1
-( PARTITION part1 VALUES LESS THAN (1000)
- (SUBPARTITION subpart11, SUBPARTITION subpart12),
- PARTITION part2 VALUES LESS THAN (2147483647)
- (SUBPARTITION subpart21, SUBPARTITION subpart22)
-);
-# Wrong number of named subpartitions in non first/non last partition
---error 1064
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1)
-SUBPARTITION BY HASH(f1) SUBPARTITIONS 1
-( PARTITION part1 VALUES LESS THAN (1000)
- (SUBPARTITION subpart11, SUBPARTITION subpart12),
- PARTITION part2 VALUES LESS THAN (2000)
- (SUBPARTITION subpart21 ),
- PARTITION part3 VALUES LESS THAN (2147483647)
- (SUBPARTITION subpart31, SUBPARTITION subpart32)
-);
-# Wrong number of named subpartitions in last partition
---error 1064
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1)
-SUBPARTITION BY HASH(f1) SUBPARTITIONS 1
-( PARTITION part1 VALUES LESS THAN (1000)
- (SUBPARTITION subpart11, SUBPARTITION subpart12),
- PARTITION part2 VALUES LESS THAN (2147483647)
- (SUBPARTITION subpart21, SUBPARTITION subpart22)
-);
-
-
---echo
---echo #------------------------------------------------------------------------
---echo # 4. Checks of logical partition/subpartition name
---echo # file name clashes during CREATE TABLE
---echo #------------------------------------------------------------------------
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_warnings
-
---echo # 4.1 (negative) A partition name used more than once
---error ER_SAME_NAME_PARTITION
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) (PARTITION part1, PARTITION part1);
-#
-if ($fixed_bug15408)
-{
-# Bug#15408 Partitions: subpartition names are not unique
---error ER_SAME_NAME_PARTITION
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1)
-SUBPARTITION BY HASH(f1)
-( PARTITION part1 VALUES LESS THAN (1000)
- (SUBPARTITION subpart11, SUBPARTITION subpart11)
-);
-}
---echo # FIXME Implement testcases with filename problems
---echo # existing file of other table --- partition/subpartition file name
---echo # partition/subpartition file name --- file of the same table
-
---echo
---echo #------------------------------------------------------------------------
---echo # 5. Alter table experiments
---echo #------------------------------------------------------------------------
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_warnings
---echo # 5.1 alter table add partition
---echo # 5.1.1 (negative) add partition to non partitioned table
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20));
---source include/partition_layout.inc
-# MyISAM gets ER_PARTITION_MGMT_ON_NONPARTITIONED and NDB 1005
-# The error code of NDB differs, because all NDB tables are partitioned even
-# if the CREATE TABLE does not contain a partitioning clause.
---error ER_PARTITION_MGMT_ON_NONPARTITIONED,1005
-ALTER TABLE t1 ADD PARTITION (PARTITION part1);
---source include/partition_layout.inc
-DROP TABLE t1;
-
---echo # 5.1.2 Add one partition to a table with one partition
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1);
---source include/partition_layout.inc
-eval INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND $max_row_div2 - 1;
---disable_query_log
-eval SELECT $engine = 'NDB' INTO @aux;
-let $my_exit= `SELECT @aux`;
-if ($my_exit)
-{
- exit;
-}
---enable_query_log
-ALTER TABLE t1 ADD PARTITION (PARTITION part1);
---source include/partition_12.inc
-DROP TABLE t1;
-
---echo # 5.1.3 Several times add one partition to a table with some partitions
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) (PARTITION part1, PARTITION part3);
---source include/partition_layout.inc
-eval INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND $max_row_div2 - 1;
-# Partition name before first existing partition name
-ALTER TABLE t1 ADD PARTITION (PARTITION part0);
---source include/partition_12.inc
-DELETE FROM t1;
-eval INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND $max_row_div2 - 1;
-# Partition name between existing partition names
-ALTER TABLE t1 ADD PARTITION (PARTITION part2);
---source include/partition_12.inc
-DELETE FROM t1;
-eval INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND $max_row_div2 - 1;
-if ($fixed_bug13447)
-{
-# Partition name after all existing partition names
-# Bug#13447 Partitions: crash with alter table
-ALTER TABLE t1 ADD PARTITION (PARTITION part4);
-}
---source include/partition_12.inc
-DROP TABLE t1;
-
---echo # 5.1.4 Add several partitions to a table with some partitions
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) (PARTITION part1, PARTITION part3);
---source include/partition_layout.inc
-eval INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND $max_row_div2 - 1;
-if ($fixed_bug13447)
-{
-# Bug#13447 Partitions: crash with alter table
-ALTER TABLE t1 ADD PARTITION (PARTITION part0, PARTITION part2, PARTITION part4);
-}
---source include/partition_12.inc
-DROP TABLE t1;
-
---echo # 5.1.5 (negative) Add partitions to a table with some partitions
---echo # clash on new and already existing partition names
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) (PARTITION part1, PARTITION part2, PARTITION part3);
-# Clash on first/non last partition name
---error ER_SAME_NAME_PARTITION
-ALTER TABLE t1 ADD PARTITION (PARTITION part1);
-# Clash on non first/non last partition name
---error ER_SAME_NAME_PARTITION
-ALTER TABLE t1 ADD PARTITION (PARTITION part2);
-# Clash on non first/last partition name
---error ER_SAME_NAME_PARTITION
-ALTER TABLE t1 ADD PARTITION (PARTITION part3);
-# Clash on all partition names
---error ER_SAME_NAME_PARTITION
-ALTER TABLE t1 ADD PARTITION (PARTITION part1, PARTITION part2, PARTITION part3);
-DROP TABLE t1;
-
-# FIXME Is there any way to add a subpartition to an already existing partition
-
---echo # 5.2 alter table add subpartition
---echo # 5.2.1 Add one subpartition to a table with subpartitioning rule and
---echo # no explicit defined subpartitions
-eval CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1)
-SUBPARTITION BY HASH(f1)
-(PARTITION part1 VALUES LESS THAN ($max_row_div2));
-if ($fixed_bug16370)
-{
---source include/partition_layout.inc
-}
-eval INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND $max_row_div2 - 1;
-eval ALTER TABLE t1 ADD PARTITION (PARTITION part2 VALUES LESS THAN ($max_int_4)
- (SUBPARTITION subpart21));
-if ($fixed_bug16370)
-{
---source include/partition_12.inc
-}
-DROP TABLE t1;
-DROP TABLE if exists t0_template;
diff --git a/mysql-test/include/ps_query.inc b/mysql-test/include/ps_query.inc
index e96d666eaec..ae6027a0e07 100644
--- a/mysql-test/include/ps_query.inc
+++ b/mysql-test/include/ps_query.inc
@@ -434,8 +434,8 @@ execute stmt1 ;
let $1= 3 ;
while ($1)
{
- prepare stmt1 from ' SELECT a as ccc from t1 where a+1=
- (SELECT 1+ccc from t1 where ccc+1=a+1 and a=1) ';
+ prepare stmt1 from ' SELECT a as ccc from t1 outr where a+1=
+ (SELECT 1+outr.a from t1 where outr.a+1=a+1 and a=1) ';
execute stmt1 ;
deallocate prepare stmt1 ;
dec $1 ;
diff --git a/mysql-test/include/reset_master_and_slave.inc b/mysql-test/include/reset_master_and_slave.inc
new file mode 100644
index 00000000000..c2d4120ddc9
--- /dev/null
+++ b/mysql-test/include/reset_master_and_slave.inc
@@ -0,0 +1,10 @@
+--echo **** Resetting master and slave ****
+connection slave;
+STOP SLAVE;
+source include/wait_for_slave_to_stop.inc;
+RESET SLAVE;
+connection master;
+RESET MASTER;
+connection slave;
+START SLAVE;
+source include/wait_for_slave_to_start.inc;
diff --git a/mysql-test/include/wait_for_slave_sql_error.inc b/mysql-test/include/wait_for_slave_sql_error.inc
new file mode 100644
index 00000000000..6780edbe2f0
--- /dev/null
+++ b/mysql-test/include/wait_for_slave_sql_error.inc
@@ -0,0 +1,33 @@
+###################################################
+#Author: Sven
+#Date: 2007-10-09
+#Purpose: Wait until the slave has an error in the
+# sql thread, as indicated by
+# "SHOW SLAVE STATUS", or at most 30
+# seconds.
+#Details:
+# 1) Fill in and setup variables
+# 2) loop, looking for sql error on slave
+# 3) If it loops too long, die.
+####################################################
+connection slave;
+let $row_number= 1;
+let $run= 1;
+let $counter= 300;
+
+while ($run)
+{
+ let $sql_result= query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, $row_number);
+ let $run= `SELECT '$sql_result' = '0'`;
+ if ($run) {
+ real_sleep 0.1;
+ if (!$counter){
+ --echo "Failed while waiting for slave to produce an error in its sql thread"
+ --replace_result $MASTER_MYPORT MASTER_PORT
+ --replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 #
+ query_vertical SHOW SLAVE STATUS;
+ exit;
+ }
+ dec $counter;
+ }
+}
diff --git a/mysql-test/include/windows.inc b/mysql-test/include/windows.inc
index 3d64efbafc7..88553d8aa59 100644
--- a/mysql-test/include/windows.inc
+++ b/mysql-test/include/windows.inc
@@ -1,4 +1,5 @@
---require r/windows.require
-disable_query_log;
-select convert(@@version_compile_os using latin1) IN ("Win32","Win64","Windows") as "TRUE";
-enable_query_log;
+if (`select convert(@@version_compile_os using latin1) IN ("Win32","Win64","Windows") = 0`)
+{
+ skip Need windows;
+}
+
diff --git a/mysql-test/lib/mtr_cases.pl b/mysql-test/lib/mtr_cases.pl
index ba7fcb8ce10..0d705104303 100644
--- a/mysql-test/lib/mtr_cases.pl
+++ b/mysql-test/lib/mtr_cases.pl
@@ -28,6 +28,24 @@ sub collect_one_test_case ($$$$$$$$$);
sub mtr_options_from_test_file($$);
+my $do_test;
+my $skip_test;
+
+sub init_pattern {
+ my ($from, $what)= @_;
+ if ( $from =~ /^[a-z0-9]$/ ) {
+ # Does not contain any regex, make the pattern match
+ # beginning of string
+ $from= "^$from";
+ }
+ # Check that pattern is a valid regex
+ eval { "" =~/$from/; 1 } or
+ mtr_error("Invalid regex '$from' passed to $what\nPerl says: $@");
+ return $from;
+}
+
+
+
##############################################################################
#
# Collect information about test cases we are to run
@@ -35,6 +53,9 @@ sub mtr_options_from_test_file($$);
##############################################################################
sub collect_test_cases ($) {
+ $do_test= init_pattern($::opt_do_test, "--do-test");
+ $skip_test= init_pattern($::opt_skip_test, "--skip-test");
+
my $suites= shift; # Semicolon separated list of test suites
my $cases = []; # Array of hash
@@ -48,13 +69,14 @@ sub collect_test_cases ($) {
{
# Check that the tests specified was found
# in at least one suite
- foreach my $tname ( @::opt_cases )
+ foreach my $test_name_spec ( @::opt_cases )
{
my $found= 0;
+ my ($sname, $tname, $extension)= split_testname($test_name_spec);
foreach my $test ( @$cases )
{
- if ( $test->{'name'} eq $tname ||
- mtr_match_extension($test->{'name'}, $tname) )
+ # test->{name} is always in suite.name format
+ if ( $test->{name} =~ /.*\.$tname/ )
{
$found= 1;
}
@@ -144,6 +166,45 @@ sub collect_test_cases ($) {
}
+# Valid extensions and their corresonding component id
+my %exts = ( 'test' => 'mysqld',
+ 'imtest' => 'im'
+ );
+
+
+# Returns (suitename, testname, extension)
+sub split_testname {
+ my ($test_name)= @_;
+
+ # Get rid of directory part and split name on .'s
+ my @parts= split(/\./, basename($test_name));
+
+ if (@parts == 1){
+ # Only testname given, ex: alias
+ return (undef , $parts[0], undef);
+ } elsif (@parts == 2) {
+ # Either testname.test or suite.testname given
+ # Ex. main.alias or alias.test
+
+ if (defined $exts{$parts[1]})
+ {
+ return (undef , $parts[0], $parts[1]);
+ }
+ else
+ {
+ return ($parts[0], $parts[1], undef);
+ }
+
+ } elsif (@parts == 3) {
+ # Fully specified suitename.testname.test
+ # ex main.alias.test
+ return ( $parts[0], $parts[1], $parts[2]);
+ }
+
+ mtr_error("Illegal format of test name: $test_name");
+}
+
+
sub collect_one_suite($$)
{
my $suite= shift; # Test suite name
@@ -151,19 +212,43 @@ sub collect_one_suite($$)
mtr_verbose("Collecting: $suite");
- my $testdir;
- my $resdir;
+ my $combination_file= "combinations";
+ my $combinations = [];
- if ( $suite eq "main" )
+ my $suitedir= "$::glob_mysql_test_dir"; # Default
+ my $combination_file= "$::glob_mysql_test_dir/$combination_file";
+ if ( $suite ne "main" )
{
- $testdir= "$::glob_mysql_test_dir/t";
- $resdir= "$::glob_mysql_test_dir/r";
+ $suitedir= mtr_path_exists("$suitedir/suite/$suite",
+ "$suitedir/$suite");
+ mtr_verbose("suitedir: $suitedir");
+ $combination_file= "$suitedir/$combination_file";
+ }
+
+ my $testdir= "$suitedir/t";
+ my $resdir= "$suitedir/r";
+
+ if (!@::opt_combination)
+ {
+ # Read combinations file
+ if ( open(COMB,$combination_file) )
+ {
+ while (<COMB>)
+ {
+ chomp;
+ s/\ +/ /g;
+ push (@$combinations, $_) unless ($_ eq '');
+ }
+ close COMB;
+ }
}
else
{
- $testdir= "$::glob_mysql_test_dir/suite/$suite/t";
- $resdir= "$::glob_mysql_test_dir/suite/$suite/r";
+ # take the combination from command-line
+ @$combinations = @::opt_combination;
}
+ # Remember last element position
+ my $begin_index = $#{@$cases} + 1;
# ----------------------------------------------------------------------
# Build a hash of disabled testcases for this suite
@@ -192,77 +277,55 @@ sub collect_one_suite($$)
if ( @::opt_cases )
{
- # Collect in specified order, no sort
- foreach my $tname2 ( @::opt_cases )
+ # Collect in specified order
+ foreach my $test_name_spec ( @::opt_cases )
{
- my $tname= $tname2; # Don't modify @::opt_cases !
- my $elem= undef;
- my $component_id= undef;
-
- # Get rid of directory part (path). Leave the extension since it is used
- # to understand type of the test.
-
- $tname = basename($tname);
+ my ($sname, $tname, $extension)= split_testname($test_name_spec);
- # Get rid of suite part
- $tname =~ s/^$suite\.//;
-
- # Check if the extenstion has been specified.
-
- if ( mtr_match_extension($tname, "test") )
- {
- $elem= $tname;
- $tname=~ s/\.test$//;
- $component_id= 'mysqld';
- }
- elsif ( mtr_match_extension($tname, "imtest") )
- {
- $elem= $tname;
- $tname =~ s/\.imtest$//;
- $component_id= 'im';
- }
+ # The test name parts have now been defined
+ #print " suite_name: $sname\n";
+ #print " tname: $tname\n";
+ #print " extension: $extension\n";
- # If target component is known, check that the specified test case
- # exists.
- #
- # Otherwise, try to guess the target component.
+ # Check cirrect suite if suitename is defined
+ next if (defined $sname and $suite ne $sname);
- if ( $component_id )
+ my $component_id;
+ if ( defined $extension )
{
- if ( ! -f "$testdir/$elem")
+ my $full_name= "$testdir/$tname.$extension";
+ # Extension was specified, check if the test exists
+ if ( ! -f $full_name)
{
- mtr_error("Test case $tname ($testdir/$elem) is not found");
+ # This is only an error if suite was specified, otherwise it
+ # could exist in another suite
+ mtr_error("Test '$full_name' was not found in suite '$sname'")
+ if $sname;
+
+ next;
}
+ $component_id= $exts{$extension};
}
else
{
- my $mysqld_test_exists = -f "$testdir/$tname.test";
- my $im_test_exists = -f "$testdir/$tname.imtest";
+ # No extension was specified
+ my ($ext, $component);
+ while (($ext, $component)= each %exts) {
+ my $full_name= "$testdir/$tname.$ext";
- if ( $mysqld_test_exists and $im_test_exists )
- {
- mtr_error("Ambiguous test case name ($tname)");
- }
- elsif ( ! $mysqld_test_exists and ! $im_test_exists )
- {
- # Silently skip, could exist in another suite
- next;
- }
- elsif ( $mysqld_test_exists )
- {
- $elem= "$tname.test";
- $component_id= 'mysqld';
- }
- elsif ( $im_test_exists )
- {
- $elem= "$tname.imtest";
- $component_id= 'im';
- }
+ if ( ! -f $full_name ) {
+ next;
+ }
+ $component_id= $component;
+ $extension= $ext;
+ }
+ # Test not found here, could exist in other suite
+ next unless $component_id;
}
collect_one_test_case($testdir,$resdir,$suite,$tname,
- $elem,$cases,\%disabled,$component_id,
- $suite_opts);
+ "$tname.$extension",$cases,\%disabled,
+ $component_id,$suite_opts);
}
}
else
@@ -288,8 +351,7 @@ sub collect_one_suite($$)
}
# Skip tests that does not match the --do-test= filter
- next if $::opt_do_test and
- ! defined mtr_match_prefix($elem,$::opt_do_test);
+ next if ($do_test and not $tname =~ /$do_test/o);
collect_one_test_case($testdir,$resdir,$suite,$tname,
$elem,$cases,\%disabled,$component_id,
@@ -298,6 +360,78 @@ sub collect_one_suite($$)
closedir TESTDIR;
}
+ # ----------------------------------------------------------------------
+ # Proccess combinations only if new tests were added
+ # ----------------------------------------------------------------------
+ if (0 and $combinations && $begin_index <= $#{@$cases})
+ {
+ my $end_index = $#{@$cases};
+ my $is_copy;
+ # Keep original master/slave options
+ my @orig_opts;
+ for (my $idx = $begin_index; $idx <= $end_index; $idx++)
+ {
+ foreach my $param (('master_opt','slave_opt','slave_mi'))
+ {
+ @{$orig_opts[$idx]{$param}} = @{$cases->[$idx]->{$param}};
+ }
+ }
+ my $comb_index = 1;
+ # Copy original test cases
+ foreach my $comb_set (@$combinations)
+ {
+ for (my $idx = $begin_index; $idx <= $end_index; $idx++)
+ {
+ my $test = $cases->[$idx];
+ my $copied_test = {};
+ foreach my $param (keys %{$test})
+ {
+ # Scalar. Copy as is.
+ $copied_test->{$param} = $test->{$param};
+ # Array. Copy reference instead itself
+ if ($param =~ /(master_opt|slave_opt|slave_mi)/)
+ {
+ my $new_arr = [];
+ @$new_arr = @{$orig_opts[$idx]{$param}};
+ $copied_test->{$param} = $new_arr;
+ }
+ elsif ($param =~ /(comment|combinations)/)
+ {
+ $copied_test->{$param} = '';
+ }
+ }
+ if ($is_copy)
+ {
+ push(@$cases, $copied_test);
+ $test = $cases->[$#{@$cases}];
+ }
+ foreach my $comb_opt (split(/ /,$comb_set))
+ {
+ push(@{$test->{'master_opt'}},$comb_opt);
+ push(@{$test->{'slave_opt'}},$comb_opt);
+ # Enable rpl if added option is --binlog-format and test case supports that
+ if ($comb_opt =~ /^--binlog-format=.+$/)
+ {
+ my @opt_pairs = split(/=/, $comb_opt);
+ if ($test->{'binlog_format'} =~ /^$opt_pairs[1]$/ || $test->{'binlog_format'} eq '')
+ {
+ $test->{'skip'} = 0;
+ $test->{'comment'} = '';
+ }
+ else
+ {
+ $test->{'skip'} = 1;
+ $test->{'comment'} = "Requiring binlog format '$test->{'binlog_format'}'";;
+ }
+ }
+ }
+ $test->{'combination'} = $comb_set;
+ }
+ $is_copy = 1;
+ $comb_index++;
+ }
+ }
+
return $cases;
}
@@ -333,7 +467,7 @@ sub collect_one_test_case($$$$$$$$$) {
my $tinfo= {};
- $tinfo->{'name'}= "$suite.$tname";
+ $tinfo->{'name'}= basename($suite) . ".$tname";
$tinfo->{'result_file'}= "$resdir/$tname.result";
$tinfo->{'component_id'} = $component_id;
push(@$cases, $tinfo);
@@ -342,7 +476,7 @@ sub collect_one_test_case($$$$$$$$$) {
# Skip some tests but include in list, just mark them to skip
# ----------------------------------------------------------------------
- if ( $::opt_skip_test and defined mtr_match_prefix($tname,$::opt_skip_test) )
+ if ( $skip_test and $tname =~ /$skip_test/o )
{
$tinfo->{'skip'}= 1;
return;
diff --git a/mysql-test/lib/mtr_report.pl b/mysql-test/lib/mtr_report.pl
index 82eef03c24f..ec7fa2687a7 100644
--- a/mysql-test/lib/mtr_report.pl
+++ b/mysql-test/lib/mtr_report.pl
@@ -196,7 +196,7 @@ sub mtr_report_stats ($) {
"of what went wrong.\n",
"If you want to report this error, please read first ",
"the documentation at\n",
- "http://www.mysql.com/doc/en/MySQL_test_suite.html\n";
+ "http://dev.mysql.com/doc/mysql/en/mysql-test-suite.html\n";
}
if (!$::opt_extern)
{
@@ -234,6 +234,7 @@ sub mtr_report_stats ($) {
"\\[ERROR\\]",
"^Error:", "^==.* at 0x",
"InnoDB: Warning",
+ "InnoDB: Error",
"^safe_mutex:",
"missing DBUG_RETURN",
"mysqld: Warning",
@@ -335,18 +336,33 @@ sub mtr_report_stats ($) {
/\QError in Log_event::read_log_event(): 'Sanity check failed', data_len: 258, event_type: 49\E/ or
/Statement is not safe to log in statement format/ or
+ # test case for Bug#bug29807 copies a stray frm into database
+ /InnoDB: Error: table `test`.`bug29807` does not exist in the InnoDB internal/ or
+ /Cannot find or open table test\/bug29807 from/ or
+
+ # innodb foreign key tests that fail in ALTER or RENAME produce this
+ /InnoDB: Error: in ALTER TABLE `test`.`t[12]`/ or
+ /InnoDB: Error: in RENAME TABLE table `test`.`t1`/ or
+ /InnoDB: Error: table `test`.`t[12]` does not exist in the InnoDB internal/ or
+
# Test case for Bug#14233 produces the following warnings:
/Stored routine 'test'.'bug14233_1': invalid value in column mysql.proc/ or
/Stored routine 'test'.'bug14233_2': invalid value in column mysql.proc/ or
/Stored routine 'test'.'bug14233_3': invalid value in column mysql.proc/ or
- # BUG#29807 - innodb_mysql.test: Cannot find table test/t2
- # from the internal data dictionary
- /Cannot find table test\/bug29807 from the internal data dictionary/ or
-
# BUG#29839 - lowercase_table3.test: Cannot find table test/T1
# from the internal data dictiona
- /Cannot find table test\/BUG29839 from the internal data dictionary/
+ /Cannot find table test\/BUG29839 from the internal data dictionary/ or
+ # BUG#32080 - Excessive warnings on Solaris: setrlimit could not
+ # change the size of core files
+ /setrlimit could not change the size of core files to 'infinity'/ or
+
+ # rpl_extrColmaster_*.test, the slave thread produces warnings
+ # when it get updates to a table that has more columns on the
+ # master
+ /Slave: Unknown column 'c7' in 't15' Error_code: 1054/ or
+ /Slave: Can't DROP 'c7'.* 1091/ or
+ /Slave: Key column 'c6'.* 1072/
)
{
next; # Skip these lines
diff --git a/mysql-test/mysql-test-run-shell.sh b/mysql-test/mysql-test-run-shell.sh
index 54323c878a9..ea8ce1b76d4 100644
--- a/mysql-test/mysql-test-run-shell.sh
+++ b/mysql-test/mysql-test-run-shell.sh
@@ -23,7 +23,16 @@ USE_MANAGER=0
MY_TZ=GMT-3
TZ=$MY_TZ; export TZ # for UNIX_TIMESTAMP tests to work
LOCAL_SOCKET=@MYSQL_UNIX_ADDR@
-MYSQL_TCP_PORT=@MYSQL_TCP_PORT@
+
+if [ -z "$MYSQL_TCP_PORT" ]; then
+ MYSQL_TCP_PORT=@MYSQL_TCP_PORT@
+ if [ @MYSQL_TCP_PORT_DEFAULT@ -eq 0 ]; then
+ ESP=`getent services mysql/tcp`
+ if [ $? -eq 0 ]; then
+ MYSQL_TCP_PORT=`echo "$ESP"|sed -e's-^[a-z]*[ ]*\([0-9]*\)/[a-z]*$-\1-g'`
+ fi
+ fi
+fi
umask 022
@@ -981,7 +990,7 @@ show_failed_diff ()
$DIFF -c $result_file $reject_file
echo "-------------------------------------------------------"
echo "Please follow the instructions outlined at"
- echo "http://dev.mysql.com/doc/mysql/en/reporting-mysqltest-bugs.html"
+ echo "http://forge.mysql.com/wiki/MySQL_Internals_Porting#Debugging_a_MySQL_Server"
echo "to find the reason to this problem and how to report this."
echo ""
fi
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 234744e46d0..bb2d91143f0 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -164,6 +164,8 @@ our $opt_bench= 0;
our $opt_small_bench= 0;
our $opt_big_test= 0;
+our @opt_combination;
+
our @opt_extra_mysqld_opt;
our @opt_extra_mysqltest_opt;
@@ -256,13 +258,13 @@ our $opt_timer= 1;
our $opt_user;
-our $opt_valgrind= 0;
-our $opt_valgrind_mysqld= 0;
-our $opt_valgrind_mysqltest= 0;
-our $default_valgrind_options= "--show-reachable=yes";
-our $opt_valgrind_options;
-our $opt_valgrind_path;
-our $opt_callgrind;
+my $opt_valgrind= 0;
+my $opt_valgrind_mysqld= 0;
+my $opt_valgrind_mysqltest= 0;
+my @default_valgrind_args= ("--show-reachable=yes");
+my @valgrind_args;
+my $opt_valgrind_path;
+my $opt_callgrind;
our $opt_stress= "";
our $opt_stress_suite= "main";
@@ -462,6 +464,19 @@ sub main () {
#
##############################################################################
+#
+# When an option is no longer used by this program, it must be explicitly
+# ignored or else it will be passed through to mysqld. GetOptions will call
+# this subroutine once for each such option on the command line. See
+# Getopt::Long documentation.
+#
+
+sub warn_about_removed_option {
+ my ($option, $value, $hash_value) = @_;
+
+ warn "WARNING: This option is no longer used, and is ignored: --$option\n";
+}
+
sub command_line_setup () {
# These are defaults for things that are set on the command line
@@ -498,6 +513,15 @@ sub command_line_setup () {
# Read the command line
# Note: Keep list, and the order, in sync with usage at end of this file
+ # Options that are no longer used must still be processed, because all
+ # unprocessed options are passed directly to mysqld. The user will be
+ # warned that the option is being ignored.
+ #
+ # Put the complete option string here. For example, to remove the --suite
+ # option, remove it from GetOptions() below and put 'suite|suites=s' here.
+ my @removed_options = (
+ );
+
Getopt::Long::Configure("pass_through");
GetOptions(
# Control what engine/variation to run
@@ -530,6 +554,7 @@ sub command_line_setup () {
'skip-im' => \$opt_skip_im,
'skip-test=s' => \$opt_skip_test,
'big-test' => \$opt_big_test,
+ 'combination=s' => \@opt_combination,
# Specify ports
'master_port=i' => \$opt_master_myport,
@@ -578,7 +603,18 @@ sub command_line_setup () {
'valgrind|valgrind-all' => \$opt_valgrind,
'valgrind-mysqltest' => \$opt_valgrind_mysqltest,
'valgrind-mysqld' => \$opt_valgrind_mysqld,
- 'valgrind-options=s' => \$opt_valgrind_options,
+ 'valgrind-options=s' => sub {
+ my ($opt, $value)= @_;
+ # Deprecated option unless it's what we know pushbuild uses
+ if ($value eq "--gen-suppressions=all --show-reachable=yes") {
+ push(@valgrind_args, $_) for (split(' ', $value));
+ return;
+ }
+ die("--valgrind-options=s is deprecated. Use ",
+ "--valgrind-option=s, to be specified several",
+ " times if necessary");
+ },
+ 'valgrind-option=s' => \@valgrind_args,
'valgrind-path=s' => \$opt_valgrind_path,
'callgrind' => \$opt_callgrind,
@@ -618,6 +654,9 @@ sub command_line_setup () {
'suite-timeout=i' => \$opt_suite_timeout,
'warnings|log-warnings' => \$opt_warnings,
+ # Options which are no longer used
+ (map { $_ => \&warn_about_removed_option } @removed_options),
+
'help|h' => \$opt_usage,
) or usage("Can't read options");
@@ -981,7 +1020,7 @@ sub command_line_setup () {
# --------------------------------------------------------------------------
# Check valgrind arguments
# --------------------------------------------------------------------------
- if ( $opt_valgrind or $opt_valgrind_path or defined $opt_valgrind_options)
+ if ( $opt_valgrind or $opt_valgrind_path or @valgrind_args)
{
mtr_report("Turning on valgrind for all executables");
$opt_valgrind= 1;
@@ -1006,29 +1045,32 @@ sub command_line_setup () {
$opt_valgrind_mysqld= 1;
# Set special valgrind options unless options passed on command line
- $opt_valgrind_options="--trace-children=yes"
- unless defined $opt_valgrind_options;
+ push(@valgrind_args, "--trace-children=yes")
+ unless @valgrind_args;
}
if ( $opt_valgrind )
{
# Set valgrind_options to default unless already defined
- $opt_valgrind_options=$default_valgrind_options
- unless defined $opt_valgrind_options;
+ push(@valgrind_args, @default_valgrind_args)
+ unless @valgrind_args;
- mtr_report("Running valgrind with options \"$opt_valgrind_options\"");
+ mtr_report("Running valgrind with options \"",
+ join(" ", @valgrind_args), "\"");
}
if ( ! $opt_testcase_timeout )
{
$opt_testcase_timeout= $default_testcase_timeout;
$opt_testcase_timeout*= 10 if $opt_valgrind;
+ $opt_testcase_timeout*= 10 if ($opt_debug and $glob_win32);
}
if ( ! $opt_suite_timeout )
{
$opt_suite_timeout= $default_suite_timeout;
$opt_suite_timeout*= 6 if $opt_valgrind;
+ $opt_suite_timeout*= 6 if ($opt_debug and $glob_win32);
}
if ( ! $opt_user )
@@ -1345,6 +1387,7 @@ sub datadir_list_setup () {
sub collect_mysqld_features () {
my $found_variable_list_start= 0;
+ my $tmpdir= tempdir(CLEANUP => 0); # Directory removed by this function
#
# Execute "mysqld --help --verbose" to get a list
@@ -1355,7 +1398,7 @@ sub collect_mysqld_features () {
#
# --datadir must exist, mysqld will chdir into it
#
- my $list= `$exe_mysqld --no-defaults --datadir=$path_language --language=$path_language --skip-grant-tables --verbose --help`;
+ my $list= `$exe_mysqld --no-defaults --datadir=$tmpdir --language=$path_language --skip-grant-tables --verbose --help`;
foreach my $line (split('\n', $list))
{
@@ -1410,7 +1453,7 @@ sub collect_mysqld_features () {
}
}
}
-
+ rmtree($tmpdir);
mtr_error("Could not find version of MySQL") unless $mysql_version_id;
mtr_error("Could not find variabes list") unless $found_variable_list_start;
@@ -2084,6 +2127,22 @@ sub environment_setup () {
($lib_example_plugin ? "--plugin_dir=" . dirname($lib_example_plugin) : "");
# ----------------------------------------------------
+ # Setup env so childs can execute myisampack and myisamchk
+ # ----------------------------------------------------
+ $ENV{'MYISAMCHK'}= mtr_native_path(mtr_exe_exists(
+ vs_config_dirs('storage/myisam', 'myisamchk'),
+ vs_config_dirs('myisam', 'myisamchk'),
+ "$path_client_bindir/myisamchk",
+ "$glob_basedir/storage/myisam/myisamchk",
+ "$glob_basedir/myisam/myisamchk"));
+ $ENV{'MYISAMPACK'}= mtr_native_path(mtr_exe_exists(
+ vs_config_dirs('storage/myisam', 'myisampack'),
+ vs_config_dirs('myisam', 'myisampack'),
+ "$path_client_bindir/myisampack",
+ "$glob_basedir/storage/myisam/myisampack",
+ "$glob_basedir/myisam/myisampack"));
+
+ # ----------------------------------------------------
# We are nice and report a bit about our settings
# ----------------------------------------------------
if (!$opt_extern)
@@ -3756,6 +3815,21 @@ sub mysqld_arguments ($$$$) {
mtr_add_arg($args, "%s--language=%s", $prefix, $path_language);
mtr_add_arg($args, "%s--tmpdir=$opt_tmpdir", $prefix);
+ # Increase default connect_timeout to avoid intermittent
+ # disconnects when test servers are put under load
+ # see BUG#28359
+ mtr_add_arg($args, "%s--connect-timeout=60", $prefix);
+
+
+ # When mysqld is run by a root user(euid is 0), it will fail
+ # to start unless we specify what user to run as. If not running
+ # as root it will be ignored, see BUG#30630
+ my $euid= $>;
+ if (!$glob_win32 and $euid == 0 and
+ grep(/^--user/, @$extra_opt, @opt_extra_mysqld_opt) == 0) {
+ mtr_add_arg($args, "%s--user=root");
+ }
+
if ( $opt_valgrind_mysqld )
{
mtr_add_arg($args, "%s--skip-safemalloc", $prefix);
@@ -5048,7 +5122,7 @@ sub valgrind_arguments {
}
# Add valgrind options, can be overriden by user
- mtr_add_arg($args, '%s', $_) for (split(' ', $opt_valgrind_options));
+ mtr_add_arg($args, '%s', $_) for (@valgrind_args);
mtr_add_arg($args, $$exe);
@@ -5121,16 +5195,22 @@ Options to control what test suites or cases to run
skip-ndb[cluster] Skip all tests that need cluster
skip-ndb[cluster]-slave Skip all tests that need a slave cluster
ndb-extra Run extra tests from ndb directory
- do-test=PREFIX Run test cases which name are prefixed with PREFIX
+ do-test=PREFIX or REGEX
+ Run test cases which name are prefixed with PREFIX
+ or fulfills REGEX
+ skip-test=PREFIX or REGEX
+ Skip test cases which name are prefixed with PREFIX
+ or fulfills REGEX
start-from=PREFIX Run test cases starting from test prefixed with PREFIX
suite[s]=NAME1,..,NAMEN Collect tests in suites from the comma separated
list of suite names.
The default is: "$opt_suites"
skip-rpl Skip the replication test cases.
skip-im Don't start IM, and skip the IM test cases
- skip-test=PREFIX Skip test cases which name are prefixed with PREFIX
big-test Set the environment variable BIG_TEST, which can be
checked from test cases.
+ combination="ARG1 .. ARG2" Specify a set of "mysqld" arguments for one
+ combination.
Options that specify ports
@@ -5186,12 +5266,14 @@ Options for coverage, profiling etc
gcov FIXME
gprof FIXME
valgrind Run the "mysqltest" and "mysqld" executables using
- valgrind with options($default_valgrind_options)
+ valgrind with default options
valgrind-all Synonym for --valgrind
valgrind-mysqltest Run the "mysqltest" and "mysql_client_test" executable
with valgrind
valgrind-mysqld Run the "mysqld" executable with valgrind
- valgrind-options=ARGS Options to give valgrind, replaces default options
+ valgrind-options=ARGS Deprecated, use --valgrind-option
+ valgrind-option=ARGS Option to give valgrind, replaces default option(s),
+ can be specified more then once
valgrind-path=[EXE] Path to the valgrind executable
callgrind Instruct valgrind to use callgrind
diff --git a/mysql-test/r/almost_full.result b/mysql-test/r/almost_full.result
new file mode 100644
index 00000000000..eb28f12fa51
--- /dev/null
+++ b/mysql-test/r/almost_full.result
@@ -0,0 +1,29 @@
+drop table if exists t1;
+set global myisam_data_pointer_size=2;
+CREATE TABLE t1 (a int auto_increment primary key not null, b longtext) ENGINE=MyISAM;
+DELETE FROM t1 WHERE a=1 or a=5;
+INSERT INTO t1 SET b=repeat('a',600);
+ERROR HY000: The table 't1' is full
+CHECK TABLE t1 EXTENDED;
+Table Op Msg_type Msg_text
+test.t1 check warning Datafile is almost full, 65448 of 65534 used
+test.t1 check status OK
+UPDATE t1 SET b=repeat('a', 800) where a=10;
+ERROR HY000: The table 't1' is full
+CHECK TABLE t1 EXTENDED;
+Table Op Msg_type Msg_text
+test.t1 check warning Datafile is almost full, 65448 of 65534 used
+test.t1 check status OK
+INSERT INTO t1 SET b=repeat('a',400);
+CHECK TABLE t1 EXTENDED;
+Table Op Msg_type Msg_text
+test.t1 check warning Datafile is almost full, 65448 of 65534 used
+test.t1 check status OK
+DELETE FROM t1 WHERE a=2 or a=6;
+UPDATE t1 SET b=repeat('a', 600) where a=11;
+CHECK TABLE t1 EXTENDED;
+Table Op Msg_type Msg_text
+test.t1 check warning Datafile is almost full, 65448 of 65534 used
+test.t1 check status OK
+drop table t1;
+set global myisam_data_pointer_size=default;
diff --git a/mysql-test/r/analyze.result b/mysql-test/r/analyze.result
index 7b476c3cca2..c3dbb846402 100644
--- a/mysql-test/r/analyze.result
+++ b/mysql-test/r/analyze.result
@@ -56,3 +56,11 @@ 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
drop table t1;
+End of 4.1 tests
+create table t1(a int);
+analyze table t1 extended;
+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 'extended' at line 1
+optimize table t1 extended;
+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 'extended' at line 1
+drop table t1;
+End of 5.0 tests
diff --git a/mysql-test/r/archive.result b/mysql-test/r/archive.result
index 36b013703d8..e9eb50fc805 100644
--- a/mysql-test/r/archive.result
+++ b/mysql-test/r/archive.result
@@ -2619,7 +2619,7 @@ auto fld1 companynr fld3 fld4 fld5 fld6
INSERT INTO t2 VALUES (2,011401,37,'breaking','dreaded','Steinberg','W');
INSERT INTO t2 VALUES (3,011402,37,'Romans','scholastics','jarring','');
INSERT INTO t2 VALUES (4,011403,37,'intercepted','audiology','tinily','');
-OPTIMIZE TABLE t2 EXTENDED;
+OPTIMIZE TABLE t2;
Table Op Msg_type Msg_text
test.t2 optimize status OK
SELECT * FROM t2;
@@ -11124,10 +11124,11 @@ auto fld1 companynr fld3 fld4 fld5 fld6
SELECT COUNT(auto) FROM t2;
COUNT(auto)
1213
-INSERT DELAYED INTO t2 VALUES (4,011403,37,'intercepted','audiology','tinily','');
+INSERT DELAYED INTO t2 VALUES (99999,011403,37,'the','delayed','insert','');
+INSERT INTO t2 VALUES (100000,000001,00,'after','delayed','insert','');
SELECT COUNT(auto) FROM t2;
COUNT(auto)
-1214
+1215
ALTER TABLE t2 DROP COLUMN fld6;
SHOW CREATE TABLE t2;
Table Create Table
@@ -11139,7 +11140,7 @@ t2 CREATE TABLE `t2` (
`fld4` char(35) NOT NULL DEFAULT '',
`fld5` char(35) NOT NULL DEFAULT ''
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1
-SELECT * FROM t2;
+SELECT * FROM t2 WHERE auto != 100000;
auto fld1 companynr fld3 fld4 fld5
1 000001 00 Omaha teethe neat
2 011401 37 breaking dreaded Steinberg
@@ -12354,7 +12355,7 @@ auto fld1 companynr fld3 fld4 fld5
2 011401 37 breaking dreaded Steinberg
3 011402 37 Romans scholastics jarring
4 011403 37 intercepted audiology tinily
-4 011403 37 intercepted audiology tinily
+99999 011403 37 the delayed insert
CREATE TABLE `t5` (
`a` int(11) NOT NULL auto_increment,
b char(12),
@@ -12664,7 +12665,7 @@ t6 CREATE TABLE `t6` (
`b` tinyblob,
`c` int(11) DEFAULT NULL,
KEY `a` (`a`)
-) ENGINE=ARCHIVE DEFAULT CHARSET=latin1
+) ENGINE=ARCHIVE AUTO_INCREMENT=36 DEFAULT CHARSET=latin1
DROP TABLE t1, t2, t4, t5, t6;
create table t1 (i int) engine=archive;
insert into t1 values (1);
@@ -12682,3 +12683,14 @@ check table t1 extended;
Table Op Msg_type Msg_text
test.t1 check status OK
drop table t1;
+CREATE TABLE t1(a VARCHAR(510)) ENGINE = ARCHIVE;
+INSERT INTO t1(a) VALUES ('');
+SELECT * FROM t1 ORDER BY a;
+DROP TABLE t1;
+CREATE TABLE t1(a INT NOT NULL AUTO_INCREMENT, b BLOB, KEY(a)) ENGINE=archive;
+INSERT INTO t1 VALUES (NULL, NULL),(NULL, NULL);
+FLUSH TABLE t1;
+SELECT * FROM t1 ORDER BY a;
+a b
+1 NULL
+2 NULL
diff --git a/mysql-test/r/bigint.result b/mysql-test/r/bigint.result
index 0d6cf8e7d30..4a5b8fcf4aa 100644
--- a/mysql-test/r/bigint.result
+++ b/mysql-test/r/bigint.result
@@ -170,6 +170,12 @@ t2.value64=t1.value64;
value64 value32 value64 value32
9223372036854775807 2 9223372036854775807 4
drop table t1, t2;
+create table t1 (sint64 bigint not null);
+insert into t1 values (-9223372036854775808);
+select * from t1;
+sint64
+-9223372036854775808
+drop table t1;
create table t1 select 1 as 'a';
show create table t1;
Table Create Table
diff --git a/mysql-test/r/binlog_unsafe.result b/mysql-test/r/binlog_unsafe.result
index 281bb475944..47284ed8bc3 100644
--- a/mysql-test/r/binlog_unsafe.result
+++ b/mysql-test/r/binlog_unsafe.result
@@ -5,9 +5,9 @@ CREATE TABLE t3 (b INT AUTO_INCREMENT PRIMARY KEY);
CREATE VIEW v1(a,b) AS SELECT a,b FROM t2,t3;
INSERT INTO t1 SELECT UUID();
Warnings:
-Warning 1591 Statement is not safe to log in statement format.
+Warning 1592 Statement is not safe to log in statement format.
SHOW WARNINGS;
Level Warning
-Code 1591
+Code 1592
Message Statement is not safe to log in statement format.
DROP TABLE t1,t2,t3;
diff --git a/mysql-test/r/case.result b/mysql-test/r/case.result
index 9ee64ee6dbd..d408a0b6153 100644
--- a/mysql-test/r/case.result
+++ b/mysql-test/r/case.result
@@ -1,4 +1,4 @@
-drop table if exists t1,t2;
+drop table if exists t1, t2;
select CASE "b" when "a" then 1 when "b" then 2 END;
CASE "b" when "a" then 1 when "b" then 2 END
2
@@ -200,3 +200,21 @@ CEMPNUM EMPMUM1 EMPNUM2
0.00 0 0.00
2.00 2 NULL
DROP TABLE t1,t2;
+End of 4.1 tests
+create table t1 (a int, b bigint unsigned);
+create table t2 (c int);
+insert into t1 (a, b) values (1,4572794622775114594), (2,18196094287899841997),
+(3,11120436154190595086);
+insert into t2 (c) values (1), (2), (3);
+select t1.a, (case t1.a when 0 then 0 else t1.b end) d from t1
+join t2 on t1.a=t2.c order by d;
+a d
+1 4572794622775114594
+3 11120436154190595086
+2 18196094287899841997
+select t1.a, (case t1.a when 0 then 0 else t1.b end) d from t1
+join t2 on t1.a=t2.c where b=11120436154190595086 order by d;
+a d
+3 11120436154190595086
+drop table t1, t2;
+End of 5.0 tests
diff --git a/mysql-test/r/cast.result b/mysql-test/r/cast.result
index afd0a5a990e..c1af92c5f8d 100644
--- a/mysql-test/r/cast.result
+++ b/mysql-test/r/cast.result
@@ -414,4 +414,28 @@ NULL
NULL
20070719
drop table t1;
+CREATE TABLE t1 (f1 DATE);
+INSERT INTO t1 VALUES ('2007-07-19'), (NULL);
+SELECT HOUR(f1),
+MINUTE(f1),
+SECOND(f1) FROM t1;
+HOUR(f1) MINUTE(f1) SECOND(f1)
+0 0 0
+NULL NULL NULL
+SELECT HOUR(CAST('2007-07-19' AS DATE)),
+MINUTE(CAST('2007-07-19' AS DATE)),
+SECOND(CAST('2007-07-19' AS DATE));
+HOUR(CAST('2007-07-19' AS DATE)) MINUTE(CAST('2007-07-19' AS DATE)) SECOND(CAST('2007-07-19' AS DATE))
+0 0 0
+SELECT HOUR(CAST(NULL AS DATE)),
+MINUTE(CAST(NULL AS DATE)),
+SECOND(CAST(NULL AS DATE));
+HOUR(CAST(NULL AS DATE)) MINUTE(CAST(NULL AS DATE)) SECOND(CAST(NULL AS DATE))
+NULL NULL NULL
+SELECT HOUR(NULL),
+MINUTE(NULL),
+SECOND(NULL);
+HOUR(NULL) MINUTE(NULL) SECOND(NULL)
+NULL NULL NULL
+DROP TABLE t1;
End of 5.0 tests
diff --git a/mysql-test/r/change_user.result b/mysql-test/r/change_user.result
new file mode 100644
index 00000000000..28b55dfd5e5
--- /dev/null
+++ b/mysql-test/r/change_user.result
@@ -0,0 +1,46 @@
+Bug#20023
+SELECT @@session.sql_big_selects;
+@@session.sql_big_selects
+1
+SELECT @@global.max_join_size;
+@@global.max_join_size
+18446744073709551615
+change_user
+SELECT @@session.sql_big_selects;
+@@session.sql_big_selects
+1
+SELECT @@global.max_join_size;
+@@global.max_join_size
+18446744073709551615
+SET @@global.max_join_size = 10000;
+SET @@session.max_join_size = default;
+change_user
+SELECT @@session.sql_big_selects;
+@@session.sql_big_selects
+0
+SET @@global.max_join_size = -1;
+SET @@session.max_join_size = default;
+change_user
+SELECT @@session.sql_big_selects;
+@@session.sql_big_selects
+1
+Bug#31418
+SELECT IS_FREE_LOCK('bug31418');
+IS_FREE_LOCK('bug31418')
+1
+SELECT IS_USED_LOCK('bug31418');
+IS_USED_LOCK('bug31418')
+NULL
+SELECT GET_LOCK('bug31418', 1);
+GET_LOCK('bug31418', 1)
+1
+SELECT IS_USED_LOCK('bug31418') = CONNECTION_ID();
+IS_USED_LOCK('bug31418') = CONNECTION_ID()
+1
+change_user
+SELECT IS_FREE_LOCK('bug31418');
+IS_FREE_LOCK('bug31418')
+1
+SELECT IS_USED_LOCK('bug31418');
+IS_USED_LOCK('bug31418')
+NULL
diff --git a/mysql-test/r/compress.result b/mysql-test/r/compress.result
index 68206c0dc0e..a71d840d229 100644
--- a/mysql-test/r/compress.result
+++ b/mysql-test/r/compress.result
@@ -611,11 +611,11 @@ id select_type table type possible_keys key key_len ref rows Extra
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 ALL period NULL NULL NULL 41810 Using filesort
+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 ALL period NULL NULL NULL 41810 Using filesort
+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
diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result
index b370fbf6fbe..0613c9ba488 100644
--- a/mysql-test/r/create.result
+++ b/mysql-test/r/create.result
@@ -438,7 +438,7 @@ explain t2;
Field Type Null Key Default Extra
a int(11) YES NULL
b bigint(11) NO 0
-c bigint(11) NO 0
+c bigint(11) unsigned NO 0
d date YES NULL
e varchar(1) NO
f datetime YES NULL
@@ -594,7 +594,7 @@ create table t1 (a int);
create table t1 select * from t1;
ERROR HY000: You can't specify target table 't1' for update in FROM clause
create table t2 union = (t1) select * from t1;
-ERROR HY000: You can't specify target table 't1' for update in FROM clause
+ERROR HY000: 'test.t2' is not BASE TABLE
flush tables with read lock;
unlock tables;
drop table t1;
@@ -1588,14 +1588,6 @@ CREATE DATABASE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
ERROR 42000: Incorrect database name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
DROP DATABASE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
ERROR 42000: Incorrect database name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
-RENAME DATABASE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa TO a;
-ERROR 42000: Unknown database 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
-RENAME DATABASE mysqltest TO aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
-ERROR 42000: Incorrect database name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
-create database mysqltest;
-RENAME DATABASE mysqltest TO aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
-ERROR 42000: Incorrect database name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
-drop database mysqltest;
USE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
ERROR 42000: Incorrect database name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
SHOW CREATE DATABASE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
@@ -1699,4 +1691,56 @@ ERROR 42000: Identifier name 'очень_очень_очень_очень_оче
drop view имÑ_вью_кодировке_утф8_длиной_больше_чем_42;
drop table имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48;
set names default;
+drop table if exists t1,t2,t3;
+drop function if exists f1;
+create function f1() returns int
+begin
+declare res int;
+create temporary table t3 select 1 i;
+set res:= (select count(*) from t1);
+drop temporary table t3;
+return res;
+end|
+create table t1 as select 1;
+create table t2 as select f1() from t1;
+drop table t1,t2;
+drop function f1;
+create table t1 like information_schema.processlist;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `ID` bigint(4) NOT NULL DEFAULT '0',
+ `USER` varchar(16) NOT NULL DEFAULT '',
+ `HOST` varchar(64) NOT NULL DEFAULT '',
+ `DB` varchar(64) DEFAULT NULL,
+ `COMMAND` varchar(16) NOT NULL DEFAULT '',
+ `TIME` bigint(7) NOT NULL DEFAULT '0',
+ `STATE` varchar(64) DEFAULT NULL,
+ `INFO` longtext
+) ENGINE=MyISAM DEFAULT CHARSET=utf8
+drop table t1;
+create temporary table t1 like information_schema.processlist;
+show create table t1;
+Table Create Table
+t1 CREATE TEMPORARY TABLE `t1` (
+ `ID` bigint(4) NOT NULL DEFAULT '0',
+ `USER` varchar(16) NOT NULL DEFAULT '',
+ `HOST` varchar(64) NOT NULL DEFAULT '',
+ `DB` varchar(64) DEFAULT NULL,
+ `COMMAND` varchar(16) NOT NULL DEFAULT '',
+ `TIME` bigint(7) NOT NULL DEFAULT '0',
+ `STATE` varchar(64) DEFAULT NULL,
+ `INFO` longtext
+) ENGINE=MyISAM DEFAULT CHARSET=utf8
+drop table t1;
+create table t1 like information_schema.character_sets;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `CHARACTER_SET_NAME` varchar(64) NOT NULL DEFAULT '',
+ `DEFAULT_COLLATE_NAME` varchar(64) NOT NULL DEFAULT '',
+ `DESCRIPTION` varchar(60) NOT NULL DEFAULT '',
+ `MAXLEN` bigint(3) NOT NULL DEFAULT '0'
+) ENGINE=MEMORY DEFAULT CHARSET=utf8
+drop table t1;
End of 5.1 tests
diff --git a/mysql-test/r/csv.result b/mysql-test/r/csv.result
index 86ba5002af8..b0033383f00 100644
--- a/mysql-test/r/csv.result
+++ b/mysql-test/r/csv.result
@@ -4929,7 +4929,7 @@ Note 1051 Unknown table 't2'
Note 1051 Unknown table 't3'
Note 1051 Unknown table 't4'
DROP TABLE IF EXISTS bug13894;
-CREATE TABLE bug13894 ( val integer ) ENGINE = CSV;
+CREATE TABLE bug13894 ( val integer not null ) ENGINE = CSV;
INSERT INTO bug13894 VALUES (5);
INSERT INTO bug13894 VALUES (10);
INSERT INTO bug13894 VALUES (11);
@@ -4949,7 +4949,7 @@ val
11
DROP TABLE bug13894;
DROP TABLE IF EXISTS bug14672;
-CREATE TABLE bug14672 (c1 integer) engine = CSV;
+CREATE TABLE bug14672 (c1 integer not null) engine = CSV;
INSERT INTO bug14672 VALUES (1), (2), (3);
SELECT * FROM bug14672;
c1
@@ -4975,7 +4975,7 @@ c1
4
5
DROP TABLE bug14672;
-CREATE TABLE test_concurrent_insert ( val integer ) ENGINE = CSV;
+CREATE TABLE test_concurrent_insert ( val integer not null ) ENGINE = CSV;
LOCK TABLES test_concurrent_insert READ LOCAL;
INSERT INTO test_concurrent_insert VALUES (1);
SELECT * FROM test_concurrent_insert;
@@ -4992,7 +4992,7 @@ val
2
UNLOCK TABLES;
DROP TABLE test_concurrent_insert;
-CREATE TABLE test_repair_table ( val integer ) ENGINE = CSV;
+CREATE TABLE test_repair_table ( val integer not null ) ENGINE = CSV;
CHECK TABLE test_repair_table;
Table Op Msg_type Msg_text
test.test_repair_table check status OK
@@ -5000,7 +5000,7 @@ REPAIR TABLE test_repair_table;
Table Op Msg_type Msg_text
test.test_repair_table repair status OK
DROP TABLE test_repair_table;
-CREATE TABLE test_repair_table2 ( val integer ) ENGINE = CSV;
+CREATE TABLE test_repair_table2 ( val integer not null ) ENGINE = CSV;
SELECT * from test_repair_table2;
val
Warnings:
@@ -5011,7 +5011,7 @@ CHECK TABLE test_repair_table2;
Table Op Msg_type Msg_text
test.test_repair_table2 check status OK
DROP TABLE test_repair_table2;
-CREATE TABLE test_repair_table3 ( val integer ) ENGINE = CSV;
+CREATE TABLE test_repair_table3 ( val integer not null ) ENGINE = CSV;
CHECK TABLE test_repair_table3;
Table Op Msg_type Msg_text
test.test_repair_table3 check error Corrupt
@@ -5114,7 +5114,7 @@ num magic_no company_name founded
1 0102 CORRECT 1876
1 0102 CORRECT2 1876
DROP TABLE test_repair_table5;
-create table t1 (a int) engine=csv;
+create table t1 (a int not null) engine=csv;
insert t1 values (1);
delete from t1;
affected rows: 1
@@ -5138,7 +5138,7 @@ insert t1 values (1),(2),(3),(4),(5);
truncate table t1;
affected rows: 0
drop table t1;
-create table t1 (v varchar(32));
+create table t1 (v varchar(32) not null);
insert into t1 values ('def'),('abc'),('hij'),('3r4f');
select * from t1;
v
@@ -5193,8 +5193,8 @@ select * from t1 where i between 2 and 4 and v in ('def','3r4f','lmn');
i v
4 3r4f
drop table t1;
-create table bug15205 (val int(11) default null) engine=csv;
-create table bug15205_2 (val int(11) default null) engine=csv;
+create table bug15205 (val int(11) not null) engine=csv;
+create table bug15205_2 (val int(11) not null) engine=csv;
select * from bug15205;
ERROR HY000: Can't get stat of './test/bug15205.CSV' (Errcode: 2)
select * from bug15205_2;
@@ -5205,8 +5205,8 @@ drop table bug15205;
drop table bug15205_2;
set names latin1;
create table t1 (
-c varchar(1),
-name varchar(64)
+c varchar(1) not null,
+name varchar(64) not null
) character set latin1 engine=csv;
insert into t1 values (0xC0,'LATIN CAPITAL LETTER A WITH GRAVE');
insert into t1 values (0xE0,'LATIN SMALL LETTER A WITH GRAVE');
@@ -5224,9 +5224,9 @@ FE þ LATIN SMALL LETTER THORN
FF ÿ LATIN SMALL LETTER Y WITH DIAERESIS
drop table t1;
End of 5.0 tests
-create table bug22080_1 (id int,string varchar(64)) Engine=CSV;
-create table bug22080_2 (id int,string varchar(64)) Engine=CSV;
-create table bug22080_3 (id int,string varchar(64)) Engine=CSV;
+create table bug22080_1 (id int not null,string varchar(64) not null) Engine=CSV;
+create table bug22080_2 (id int not null,string varchar(64) not null) Engine=CSV;
+create table bug22080_3 (id int not null,string varchar(64) not null) Engine=CSV;
insert into bug22080_1 values(1,'string');
insert into bug22080_1 values(2,'string');
insert into bug22080_1 values(3,'string');
@@ -5237,7 +5237,7 @@ check table bug22080_3;
Table Op Msg_type Msg_text
test.bug22080_3 check error Corrupt
drop tables bug22080_1,bug22080_2,bug22080_3;
-create table float_test (id float,string varchar(64)) Engine=CSV;
+create table float_test (id float not null,string varchar(64) not null) Engine=CSV;
insert into float_test values(1.0,'string');
insert into float_test values(2.23,'serg.g');
insert into float_test values(0.03,'string');
@@ -5254,14 +5254,14 @@ id string
9.67 string
drop table float_test;
CREATE TABLE `bug21328` (
-`col1` int(11) DEFAULT NULL,
-`col2` int(11) DEFAULT NULL,
-`col3` int(11) DEFAULT NULL
+`col1` int(11) NOT NULL,
+`col2` int(11) NOT NULL,
+`col3` int(11) NOT NULL
) ENGINE=CSV;
-insert into bug21328 values (1,NULL,NULL);
+insert into bug21328 values (1,0,0);
alter table bug21328 engine=myisam;
drop table bug21328;
-create table t1(a blob, b int) engine=csv;
+create table t1(a blob not null, b int not null) engine=csv;
insert into t1 values('a', 1);
flush tables;
update t1 set b=2;
@@ -5269,7 +5269,7 @@ select * from t1;
a b
a 2
drop table t1;
-create table t1(a int) engine=csv;
+create table t1(a int not null) engine=csv;
insert into t1 values(-1), (-123.34), (2), (-23);
select * from t1;
a
@@ -5281,7 +5281,7 @@ check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
drop table t1;
-create table t1(a int, b int) engine=csv;
+create table t1(a int not null, b int not null) engine=csv;
repair table t1;
Table Op Msg_type Msg_text
test.t1 repair Warning Data truncated for column 'a' at row 5
@@ -5299,7 +5299,7 @@ check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
drop table t1;
-create table t1(a int) engine=csv;
+create table t1(a int not null) engine=csv;
insert into t1 values (0), (1), (2);
delete from t1 limit 2;
check table t1;
@@ -5315,4 +5315,68 @@ test.t1 check status OK
select * from t1;
a
drop table t1;
+create table t1(a datetime not null) engine=csv;
+insert into t1 values();
+Warnings:
+Warning 1364 Field 'a' doesn't have a default value
+select * from t1;
+a
+0000-00-00 00:00:00
+drop table t1;
+create table t1(a set('foo','bar') not null) engine=csv;
+insert into t1 values();
+Warnings:
+Warning 1364 Field 'a' doesn't have a default value
+select * from t1;
+a
+
+drop table t1;
+create table t1(a varchar(32) not null) engine=csv;
+insert into t1 values();
+Warnings:
+Warning 1364 Field 'a' doesn't have a default value
+select * from t1;
+a
+
+drop table t1;
+create table t1(a int not null) engine=csv;
+insert into t1 values();
+Warnings:
+Warning 1364 Field 'a' doesn't have a default value
+select * from t1;
+a
+0
+drop table t1;
+create table t1(a blob not null) engine=csv;
+insert into t1 values();
+Warnings:
+Warning 1364 Field 'a' doesn't have a default value
+select * from t1;
+a
+
+drop table t1;
+create table t1(a bit(1) not null) engine=csv;
+insert into t1 values();
+Warnings:
+Warning 1364 Field 'a' doesn't have a default value
+select BIN(a) from t1;
+BIN(a)
+0
+drop table t1;
+create table t1(a enum('foo','bar') default null) engine=csv;
+ERROR 42000: The storage engine for the table doesn't support nullable columns
+create table t1(a enum('foo','bar') default 'foo') engine=csv;
+ERROR 42000: The storage engine for the table doesn't support nullable columns
+create table t1(a enum('foo','bar') default 'foo' not null) engine=csv;
+insert into t1 values();
+select * from t1;
+a
+foo
+drop table t1;
+CREATE TABLE t1(a INT) ENGINE=CSV;
+ERROR 42000: The storage engine for the table doesn't support nullable columns
+SHOW WARNINGS;
+Level Code Message
+Error 1178 The storage engine for the table doesn't support nullable columns
+Error 1005 Can't create table 'test.t1' (errno: 138)
End of 5.1 tests
diff --git a/mysql-test/r/ctype_big5.result b/mysql-test/r/ctype_big5.result
index 6d318a445f5..8103e9b856f 100644
--- a/mysql-test/r/ctype_big5.result
+++ b/mysql-test/r/ctype_big5.result
@@ -52,6 +52,23 @@ SELECT c1 as want1result from t1 where c1 like 'location%';
want1result
location
DROP TABLE t1;
+create table t1 (a set('a') not null);
+insert into t1 values (),();
+Warnings:
+Warning 1364 Field 'a' doesn't have a default value
+select cast(a as char(1)) from t1;
+cast(a as char(1))
+
+
+select a sounds like a from t1;
+a sounds like a
+1
+1
+select 1 from t1 order by cast(a as char(1));
+1
+1
+1
+drop table t1;
DROP DATABASE d1;
USE test;
SET character_set_server= @safe_character_set_server;
diff --git a/mysql-test/r/ctype_euckr.result b/mysql-test/r/ctype_euckr.result
index 6017bc07763..bb1b3f5995b 100644
--- a/mysql-test/r/ctype_euckr.result
+++ b/mysql-test/r/ctype_euckr.result
@@ -52,6 +52,23 @@ SELECT c1 as want1result from t1 where c1 like 'location%';
want1result
location
DROP TABLE t1;
+create table t1 (a set('a') not null);
+insert into t1 values (),();
+Warnings:
+Warning 1364 Field 'a' doesn't have a default value
+select cast(a as char(1)) from t1;
+cast(a as char(1))
+
+
+select a sounds like a from t1;
+a sounds like a
+1
+1
+select 1 from t1 order by cast(a as char(1));
+1
+1
+1
+drop table t1;
DROP DATABASE d1;
USE test;
SET character_set_server= @safe_character_set_server;
@@ -165,3 +182,44 @@ hex(a)
A2E6
FEF7
DROP TABLE t1;
+create table t1 (s1 varchar(5) character set euckr);
+insert into t1 values (0xA141);
+insert into t1 values (0xA15A);
+insert into t1 values (0xA161);
+insert into t1 values (0xA17A);
+insert into t1 values (0xA181);
+insert into t1 values (0xA1FE);
+insert into t1 values (0xA140);
+Warnings:
+Warning 1366 Incorrect string value: '\xA1@' for column 's1' at row 1
+insert into t1 values (0xA15B);
+Warnings:
+Warning 1366 Incorrect string value: '\xA1[' for column 's1' at row 1
+insert into t1 values (0xA160);
+Warnings:
+Warning 1366 Incorrect string value: '\xA1`' for column 's1' at row 1
+insert into t1 values (0xA17B);
+Warnings:
+Warning 1366 Incorrect string value: '\xA1{' for column 's1' at row 1
+insert into t1 values (0xA180);
+Warnings:
+Warning 1366 Incorrect string value: '\xA1\x80' for column 's1' at row 1
+insert into t1 values (0xA1FF);
+Warnings:
+Warning 1366 Incorrect string value: '\xA1\xFF' for column 's1' at row 1
+select hex(s1), hex(convert(s1 using utf8)) from t1 order by binary s1;
+hex(s1) hex(convert(s1 using utf8))
+
+
+
+
+
+
+A141 ECA2A5
+A15A ECA381
+A161 ECA382
+A17A ECA3A5
+A181 ECA3A6
+A1FE EFBFA2
+drop table t1;
+End of 5.0 tests
diff --git a/mysql-test/r/ctype_gb2312.result b/mysql-test/r/ctype_gb2312.result
index 314c336bab9..95246525368 100644
--- a/mysql-test/r/ctype_gb2312.result
+++ b/mysql-test/r/ctype_gb2312.result
@@ -52,6 +52,23 @@ SELECT c1 as want1result from t1 where c1 like 'location%';
want1result
location
DROP TABLE t1;
+create table t1 (a set('a') not null);
+insert into t1 values (),();
+Warnings:
+Warning 1364 Field 'a' doesn't have a default value
+select cast(a as char(1)) from t1;
+cast(a as char(1))
+
+
+select a sounds like a from t1;
+a sounds like a
+1
+1
+select 1 from t1 order by cast(a as char(1));
+1
+1
+1
+drop table t1;
DROP DATABASE d1;
USE test;
SET character_set_server= @safe_character_set_server;
diff --git a/mysql-test/r/ctype_gbk.result b/mysql-test/r/ctype_gbk.result
index 3f5d8b0d8c6..8437e34be1e 100644
--- a/mysql-test/r/ctype_gbk.result
+++ b/mysql-test/r/ctype_gbk.result
@@ -52,6 +52,23 @@ SELECT c1 as want1result from t1 where c1 like 'location%';
want1result
location
DROP TABLE t1;
+create table t1 (a set('a') not null);
+insert into t1 values (),();
+Warnings:
+Warning 1364 Field 'a' doesn't have a default value
+select cast(a as char(1)) from t1;
+cast(a as char(1))
+
+
+select a sounds like a from t1;
+a sounds like a
+1
+1
+select 1 from t1 order by cast(a as char(1));
+1
+1
+1
+drop table t1;
DROP DATABASE d1;
USE test;
SET character_set_server= @safe_character_set_server;
diff --git a/mysql-test/r/ctype_uca.result b/mysql-test/r/ctype_uca.result
index 889702e380c..92b76802d0b 100644
--- a/mysql-test/r/ctype_uca.result
+++ b/mysql-test/r/ctype_uca.result
@@ -2587,6 +2587,23 @@ SELECT c1 as want1result from t1 where c1 like 'location%';
want1result
location
DROP TABLE t1;
+create table t1 (a set('a') not null);
+insert into t1 values (),();
+Warnings:
+Warning 1364 Field 'a' doesn't have a default value
+select cast(a as char(1)) from t1;
+cast(a as char(1))
+
+
+select a sounds like a from t1;
+a sounds like a
+1
+1
+select 1 from t1 order by cast(a as char(1));
+1
+1
+1
+drop table t1;
DROP DATABASE d1;
USE test;
SET character_set_server= @safe_character_set_server;
@@ -2754,4 +2771,49 @@ a
c
ch
drop table t1;
+set collation_connection=ucs2_unicode_ci;
+drop table if exists t1;
+create table t1 as
+select repeat(' ', 64) as s1, repeat(' ',64) as s2
+union
+select null, null;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `s1` varchar(64) CHARACTER SET ucs2 COLLATE ucs2_unicode_ci DEFAULT NULL,
+ `s2` varchar(64) CHARACTER SET ucs2 COLLATE ucs2_unicode_ci DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+delete from t1;
+insert into t1 values('aaa','aaa');
+insert into t1 values('aaa|qqq','qqq');
+insert into t1 values('gheis','^[^a-dXYZ]+$');
+insert into t1 values('aab','^aa?b');
+insert into t1 values('Baaan','^Ba*n');
+insert into t1 values('aaa','qqq|aaa');
+insert into t1 values('qqq','qqq|aaa');
+insert into t1 values('bbb','qqq|aaa');
+insert into t1 values('bbb','qqq');
+insert into t1 values('aaa','aba');
+insert into t1 values(null,'abc');
+insert into t1 values('def',null);
+insert into t1 values(null,null);
+insert into t1 values('ghi','ghi[');
+select HIGH_PRIORITY s1 regexp s2 from t1;
+s1 regexp s2
+1
+1
+1
+1
+1
+1
+1
+0
+0
+0
+NULL
+NULL
+NULL
+NULL
+drop table t1;
+set names utf8;
End for 5.0 tests
diff --git a/mysql-test/r/ctype_ucs.result b/mysql-test/r/ctype_ucs.result
index 1097486f185..bd76f2a859f 100644
--- a/mysql-test/r/ctype_ucs.result
+++ b/mysql-test/r/ctype_ucs.result
@@ -811,6 +811,20 @@ quote(name)
????????
????????????????
drop table bug20536;
+set names ucs2;
+ERROR 42000: Variable 'character_set_client' can't be set to the value of 'ucs2'
+set names ucs2 collate ucs2_bin;
+ERROR 42000: Variable 'character_set_client' can't be set to the value of 'ucs2'
+set character_set_client= ucs2;
+ERROR 42000: Variable 'character_set_client' can't be set to the value of 'ucs2'
+set character_set_client= concat('ucs', substr('2', 1));
+ERROR 42000: Variable 'character_set_client' can't be set to the value of 'ucs2'
+CREATE TABLE t1(a TEXT CHARSET ucs2 COLLATE ucs2_unicode_ci);
+INSERT INTO t1 VALUES('abcd');
+SELECT * FROM t1 WHERE MATCH(a) AGAINST ('+abcd' IN BOOLEAN MODE);
+a
+abcd
+DROP TABLE t1;
End of 4.1 tests
CREATE TABLE t1 (a varchar(64) character set ucs2, b decimal(10,3));
INSERT INTO t1 VALUES ("1.1", 0), ("2.1", 0);
@@ -922,4 +936,52 @@ ERROR HY000: Illegal mix of collations (ascii_general_ci,IMPLICIT) and (ucs2_gen
select * from t1 where a=if(b<10,_ucs2 0x0062,_ucs2 0x00C0);
ERROR HY000: Illegal mix of collations (ascii_general_ci,IMPLICIT) and (ucs2_general_ci,COERCIBLE) for operation '='
drop table t1;
+set collation_connection=ucs2_general_ci;
+drop table if exists t1;
+create table t1 as
+select repeat(' ', 64) as s1, repeat(' ',64) as s2
+union
+select null, null;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `s1` varchar(64) CHARACTER SET ucs2 DEFAULT NULL,
+ `s2` varchar(64) CHARACTER SET ucs2 DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+delete from t1;
+insert into t1 values('aaa','aaa');
+insert into t1 values('aaa|qqq','qqq');
+insert into t1 values('gheis','^[^a-dXYZ]+$');
+insert into t1 values('aab','^aa?b');
+insert into t1 values('Baaan','^Ba*n');
+insert into t1 values('aaa','qqq|aaa');
+insert into t1 values('qqq','qqq|aaa');
+insert into t1 values('bbb','qqq|aaa');
+insert into t1 values('bbb','qqq');
+insert into t1 values('aaa','aba');
+insert into t1 values(null,'abc');
+insert into t1 values('def',null);
+insert into t1 values(null,null);
+insert into t1 values('ghi','ghi[');
+select HIGH_PRIORITY s1 regexp s2 from t1;
+s1 regexp s2
+1
+1
+1
+1
+1
+1
+1
+0
+0
+0
+NULL
+NULL
+NULL
+NULL
+drop table t1;
+set names latin1;
+select hex(char(0x41 using ucs2));
+hex(char(0x41 using ucs2))
+0041
End of 5.0 tests
diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result
index 715dfb1b7d8..5c90c3b5e0b 100644
--- a/mysql-test/r/ctype_utf8.result
+++ b/mysql-test/r/ctype_utf8.result
@@ -267,6 +267,51 @@ b
select * from t1 where a = 'b' and a != 'b';
a
drop table t1;
+set collation_connection=utf8_general_ci;
+drop table if exists t1;
+create table t1 as
+select repeat(' ', 64) as s1, repeat(' ',64) as s2
+union
+select null, null;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `s1` varchar(64) CHARACTER SET utf8 DEFAULT NULL,
+ `s2` varchar(64) CHARACTER SET utf8 DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+delete from t1;
+insert into t1 values('aaa','aaa');
+insert into t1 values('aaa|qqq','qqq');
+insert into t1 values('gheis','^[^a-dXYZ]+$');
+insert into t1 values('aab','^aa?b');
+insert into t1 values('Baaan','^Ba*n');
+insert into t1 values('aaa','qqq|aaa');
+insert into t1 values('qqq','qqq|aaa');
+insert into t1 values('bbb','qqq|aaa');
+insert into t1 values('bbb','qqq');
+insert into t1 values('aaa','aba');
+insert into t1 values(null,'abc');
+insert into t1 values('def',null);
+insert into t1 values(null,null);
+insert into t1 values('ghi','ghi[');
+select HIGH_PRIORITY s1 regexp s2 from t1;
+s1 regexp s2
+1
+1
+1
+1
+1
+1
+1
+0
+0
+0
+NULL
+NULL
+NULL
+NULL
+drop table t1;
+set names utf8;
set names utf8;
select 'ваÑÑ' rlike '[[:<:]]ваÑÑ[[:>:]]';
'ваÑÑ' rlike '[[:<:]]ваÑÑ[[:>:]]'
@@ -1538,12 +1583,12 @@ char(53647 using utf8)
Ñ
select char(0xff,0x8f using utf8);
char(0xff,0x8f using utf8)
-ÿ
+
Warnings:
Warning 1300 Invalid utf8 character string: 'FF8F'
select convert(char(0xff,0x8f) using utf8);
convert(char(0xff,0x8f) using utf8)
-ÿ
+
Warnings:
Warning 1300 Invalid utf8 character string: 'FF8F'
set sql_mode=traditional;
@@ -1730,3 +1775,41 @@ i
1
н1234567890
DROP TABLE t1, t2;
+set sql_mode=traditional;
+select hex(char(0xFF using utf8));
+hex(char(0xFF using utf8))
+NULL
+Warnings:
+Error 1300 Invalid utf8 character string: 'FF'
+select hex(convert(0xFF using utf8));
+hex(convert(0xFF using utf8))
+NULL
+Warnings:
+Error 1300 Invalid utf8 character string: 'FF'
+select hex(_utf8 0x616263FF);
+ERROR HY000: Invalid utf8 character string: 'FF'
+select hex(_utf8 X'616263FF');
+ERROR HY000: Invalid utf8 character string: 'FF'
+select hex(_utf8 B'001111111111');
+ERROR HY000: Invalid utf8 character string: 'FF'
+select (_utf8 X'616263FF');
+ERROR HY000: Invalid utf8 character string: 'FF'
+set sql_mode=default;
+select hex(char(0xFF using utf8));
+hex(char(0xFF using utf8))
+
+Warnings:
+Warning 1300 Invalid utf8 character string: 'FF'
+select hex(convert(0xFF using utf8));
+hex(convert(0xFF using utf8))
+
+Warnings:
+Warning 1300 Invalid utf8 character string: 'FF'
+select hex(_utf8 0x616263FF);
+ERROR HY000: Invalid utf8 character string: 'FF'
+select hex(_utf8 X'616263FF');
+ERROR HY000: Invalid utf8 character string: 'FF'
+select hex(_utf8 B'001111111111');
+ERROR HY000: Invalid utf8 character string: 'FF'
+select (_utf8 X'616263FF');
+ERROR HY000: Invalid utf8 character string: 'FF'
diff --git a/mysql-test/r/date_formats.result b/mysql-test/r/date_formats.result
index c1c8b7b060e..fbe46e9fa21 100644
--- a/mysql-test/r/date_formats.result
+++ b/mysql-test/r/date_formats.result
@@ -478,7 +478,7 @@ str_to_date(a,b)
create table t2 select str_to_date(a,b) from t1;
describe t2;
Field Type Null Key Default Extra
-str_to_date(a,b) binary(29) YES NULL
+str_to_date(a,b) datetime YES NULL
select str_to_date("2003-01-02 10:11:12.0012", "%Y-%m-%d %H:%i:%S.%f") as f1,
str_to_date("2003-01-02 10:11:12.0012", "%Y-%m-%d %H:%i:%S") as f2,
str_to_date("2003-01-02", "%Y-%m-%d") as f3,
diff --git a/mysql-test/r/ddl_i18n_koi8r.result b/mysql-test/r/ddl_i18n_koi8r.result
index 3d38319df21..fbaf2f2fd4a 100644
--- a/mysql-test/r/ddl_i18n_koi8r.result
+++ b/mysql-test/r/ddl_i18n_koi8r.result
@@ -29,7 +29,8 @@ v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI
SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v1'|
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION
-NULL mysqltest1 v1 SELECT 'ÔÅÓÔ' AS c1, ËÏÌ AS c2 NONE YES root@localhost DEFINER koi8r koi8r_general_ci
+NULL mysqltest1 v1 SELECT 'ÔÅÓÔ' AS c1, ËÏÌ AS c2
+FROM t1 NONE YES root@localhost DEFINER koi8r koi8r_general_ci
SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v2'|
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION
@@ -68,7 +69,8 @@ v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI
SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v1'|
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION
-NULL mysqltest1 v1 SELECT 'ÔÅÓÔ' AS c1, ËÏÌ AS c2 NONE YES root@localhost DEFINER koi8r koi8r_general_ci
+NULL mysqltest1 v1 SELECT 'ÔÅÓÔ' AS c1, ËÏÌ AS c2
+FROM t1 NONE YES root@localhost DEFINER koi8r koi8r_general_ci
SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v2'|
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION
diff --git a/mysql-test/r/ddl_i18n_utf8.result b/mysql-test/r/ddl_i18n_utf8.result
index b8e690bfeb7..d0f176c1985 100644
--- a/mysql-test/r/ddl_i18n_utf8.result
+++ b/mysql-test/r/ddl_i18n_utf8.result
@@ -29,7 +29,8 @@ v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI
SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v1'|
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION
-NULL mysqltest1 v1 SELECT 'теÑÑ‚' AS c1, кол AS c2 NONE YES root@localhost DEFINER utf8 utf8_general_ci
+NULL mysqltest1 v1 SELECT 'теÑÑ‚' AS c1, кол AS c2
+FROM t1 NONE YES root@localhost DEFINER utf8 utf8_general_ci
SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v2'|
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION
@@ -68,7 +69,8 @@ v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI
SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v1'|
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION
-NULL mysqltest1 v1 SELECT 'теÑÑ‚' AS c1, кол AS c2 NONE YES root@localhost DEFINER utf8 utf8_general_ci
+NULL mysqltest1 v1 SELECT 'теÑÑ‚' AS c1, кол AS c2
+FROM t1 NONE YES root@localhost DEFINER utf8 utf8_general_ci
SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v2'|
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION
diff --git a/mysql-test/r/delayed.result b/mysql-test/r/delayed.result
index fb8dc9af71a..bcda6ddb6ab 100644
--- a/mysql-test/r/delayed.result
+++ b/mysql-test/r/delayed.result
@@ -73,13 +73,13 @@ a
13
DROP TABLE t1;
SET @bug20627_old_auto_increment_offset=
-@@auto_increment_offset= 2;
+@@auto_increment_offset;
SET @bug20627_old_auto_increment_increment=
-@@auto_increment_increment= 3;
+@@auto_increment_increment;
SET @bug20627_old_session_auto_increment_offset=
-@@session.auto_increment_offset= 4;
+@@session.auto_increment_offset;
SET @bug20627_old_session_auto_increment_increment=
-@@session.auto_increment_increment= 5;
+@@session.auto_increment_increment;
SET @@auto_increment_offset= 2;
SET @@auto_increment_increment= 3;
SET @@session.auto_increment_offset= 4;
@@ -116,13 +116,13 @@ SET @@session.auto_increment_offset=
SET @@session.auto_increment_increment=
@bug20627_old_session_auto_increment_increment;
SET @bug20830_old_auto_increment_offset=
-@@auto_increment_offset= 2;
+@@auto_increment_offset;
SET @bug20830_old_auto_increment_increment=
-@@auto_increment_increment= 3;
+@@auto_increment_increment;
SET @bug20830_old_session_auto_increment_offset=
-@@session.auto_increment_offset= 4;
+@@session.auto_increment_offset;
SET @bug20830_old_session_auto_increment_increment=
-@@session.auto_increment_increment= 5;
+@@session.auto_increment_increment;
SET @@auto_increment_offset= 2;
SET @@auto_increment_increment= 3;
SET @@session.auto_increment_offset= 4;
@@ -250,8 +250,38 @@ SELECT HEX(a) FROM t1;
HEX(a)
1
DROP TABLE t1;
-CREATE TABLE t1(c1 INT) ENGINE=MyISAM;
-CREATE TABLE t2(c1 INT) ENGINE=MERGE UNION=(t1);
-INSERT DELAYED INTO t2 VALUES(1);
-ERROR HY000: Table storage engine for 't2' doesn't have this option
-DROP TABLE t1, t2;
+CREATE TABLE t1 (a INT);
+INSERT DELAYED INTO t1 SET b= b();
+ERROR 42S22: Unknown column 'b' in 'field list'
+DROP TABLE t1;
+End of 5.0 tests
+DROP TABLE IF EXISTS t1,t2;
+SET SQL_MODE='NO_AUTO_VALUE_ON_ZERO';
+CREATE TABLE `t1` (
+`id` int(11) PRIMARY KEY auto_increment,
+`f1` varchar(10) NOT NULL UNIQUE
+);
+INSERT DELAYED INTO t1 VALUES(0,"test1");
+SELECT * FROM t1;
+id f1
+0 test1
+SET SQL_MODE='PIPES_AS_CONCAT';
+INSERT DELAYED INTO t1 VALUES(0,'a' || 'b');
+SELECT * FROM t1;
+id f1
+0 test1
+1 ab
+SET SQL_MODE='ERROR_FOR_DIVISION_BY_ZERO,STRICT_ALL_TABLES';
+INSERT DELAYED INTO t1 VALUES(mod(1,0),"test3");
+ERROR 22012: Division by 0
+CREATE TABLE t2 (
+`id` int(11) PRIMARY KEY auto_increment,
+`f1` date
+);
+SET SQL_MODE='NO_ZERO_DATE,STRICT_ALL_TABLES,NO_ZERO_IN_DATE';
+INSERT DELAYED INTO t2 VALUES (0,'0000-00-00');
+ERROR 22007: Incorrect date value: '0000-00-00' for column 'f1' at row 1
+INSERT DELAYED INTO t2 VALUES (0,'2007-00-00');
+ERROR 22007: Incorrect date value: '2007-00-00' for column 'f1' at row 1
+DROP TABLE t1,t2;
+End of 5.1 tests
diff --git a/mysql-test/r/delete.result b/mysql-test/r/delete.result
index 5084498c01c..eb93c69d960 100644
--- a/mysql-test/r/delete.result
+++ b/mysql-test/r/delete.result
@@ -271,3 +271,11 @@ a
DROP TABLE t1, t2;
DROP DATABASE db1;
DROP DATABASE db2;
+CREATE FUNCTION f1() RETURNS INT RETURN 1;
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (0);
+DELETE FROM t1 ORDER BY (f1(10)) LIMIT 1;
+ERROR 42000: Incorrect number of arguments for FUNCTION test.f1; expected 0, got 1
+DROP TABLE t1;
+DROP FUNCTION f1;
+End of 5.0 tests
diff --git a/mysql-test/r/derived.result b/mysql-test/r/derived.result
index 7da82ada121..306c51fb8cf 100644
--- a/mysql-test/r/derived.result
+++ b/mysql-test/r/derived.result
@@ -326,7 +326,8 @@ id select_type table type possible_keys key key_len ref rows Extra
2 DERIVED t2 index PRIMARY PRIMARY 4 NULL 2 Using where; Using index
drop table t2;
CREATE TABLE `t1` ( `itemid` int(11) NOT NULL default '0', `grpid` varchar(15) NOT NULL default '', `vendor` int(11) NOT NULL default '0', `date_` date NOT NULL default '0000-00-00', `price` decimal(12,2) NOT NULL default '0.00', PRIMARY KEY (`itemid`,`grpid`,`vendor`,`date_`), KEY `itemid` (`itemid`,`vendor`), KEY `itemid_2` (`itemid`,`date_`));
-insert into t1 values (128, 'rozn', 2, now(), 10),(128, 'rozn', 1, now(), 10);
+insert into t1 values (128, 'rozn', 2, curdate(), 10),
+(128, 'rozn', 1, curdate(), 10);
SELECT MIN(price) min, MAX(price) max, AVG(price) avg FROM (SELECT SUBSTRING( MAX(concat(date_,";",price)), 12) price FROM t1 WHERE itemid=128 AND grpid='rozn' GROUP BY itemid, grpid, vendor) lastprices;
min max avg
10.00 10.00 10
diff --git a/mysql-test/r/drop.result b/mysql-test/r/drop.result
index ff11905aa34..71d6fcc7cd0 100644
--- a/mysql-test/r/drop.result
+++ b/mysql-test/r/drop.result
@@ -85,3 +85,10 @@ select 1;
1
unlock tables;
End of 5.0 tests
+create database mysql_test;
+create table mysql_test.t1(f1 int);
+create table mysql_test.`#sql-347f_7` (f1 int);
+create table mysql_test.`#sql-347f_8` (f1 int);
+drop table mysql_test.`#sql-347f_8`;
+drop database mysql_test;
+End of 5.1 tests
diff --git a/mysql-test/r/events_bugs.result b/mysql-test/r/events_bugs.result
index 3c9e6384c64..b91e7e88d64 100644
--- a/mysql-test/r/events_bugs.result
+++ b/mysql-test/r/events_bugs.result
@@ -3,6 +3,10 @@ drop database if exists mysqltest_db1;
drop database if exists mysqltest_db2;
create database events_test;
use events_test;
+select * from information_schema.global_variables where variable_name like 'event_scheduler';
+VARIABLE_NAME VARIABLE_VALUE
+EVENT_SCHEDULER ON
+SET GLOBAL event_scheduler = 'OFF';
CREATE EVENT lower_case ON SCHEDULE EVERY 1 MINUTE DO SELECT 1;
CREATE EVENT Lower_case ON SCHEDULE EVERY 2 MINUTE DO SELECT 2;
ERROR HY000: Event 'Lower_case' already exists
@@ -31,7 +35,7 @@ create event e_55 on schedule at 10000101000000 do drop table t;
ERROR HY000: Incorrect AT value: '10000101000000'
create event e_55 on schedule at 20000101000000 do drop table t;
Warnings:
-Note 1587 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was dropped immediately after creation.
+Note 1588 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was dropped immediately after creation.
show events;
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
create event e_55 on schedule at 20200101000000 starts 10000101000000 do drop table t;
@@ -457,22 +461,22 @@ CREATE EVENT e4 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00'
DO
SELECT 1;
Warnings:
-Note 1587 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was dropped immediately after creation.
+Note 1588 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was dropped immediately after creation.
CREATE EVENT e4 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00'
ENDS '1999-01-02 00:00:00' DISABLE
DO
SELECT 1;
Warnings:
-Note 1587 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was dropped immediately after creation.
+Note 1588 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was dropped immediately after creation.
CREATE EVENT e4 ON SCHEDULE AT '1999-01-01 00:00:00' DO
SELECT 1;
Warnings:
-Note 1587 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was dropped immediately after creation.
+Note 1588 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was dropped immediately after creation.
CREATE EVENT e4 ON SCHEDULE AT '1999-01-01 00:00:00' DISABLE
DO
SELECT 1;
Warnings:
-Note 1587 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was dropped immediately after creation.
+Note 1588 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was dropped immediately after creation.
SHOW EVENTS;
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
events_test e1 root@localhost +05:00 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
@@ -482,19 +486,19 @@ The following should succeed giving a warning.
ALTER EVENT e1 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00'
ENDS '1999-01-02 00:00:00' ON COMPLETION PRESERVE;
Warnings:
-Note 1543 Event execution time is in the past. Event has been disabled
+Note 1544 Event execution time is in the past. Event has been disabled
CREATE EVENT e4 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00'
ENDS '1999-01-02 00:00:00' ON COMPLETION PRESERVE
DO
SELECT 1;
Warnings:
-Note 1543 Event execution time is in the past. Event has been disabled
+Note 1544 Event execution time is in the past. Event has been disabled
CREATE EVENT e5 ON SCHEDULE AT '1999-01-01 00:00:00'
ON COMPLETION PRESERVE
DO
SELECT 1;
Warnings:
-Note 1543 Event execution time is in the past. Event has been disabled
+Note 1544 Event execution time is in the past. Event has been disabled
The following should succeed without warnings.
ALTER EVENT e2 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00';
ALTER EVENT e3 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00'
@@ -610,7 +614,6 @@ id ev_nm ev_cnt
6 ev_sched_1823 6
DROP TABLE event_log;
SET GLOBAL event_scheduler = OFF;
-DROP DATABASE events_test;
SET GLOBAL event_scheduler= ON;
CREATE EVENT bug28641 ON SCHEDULE AT '2038.01.18 03:00:00'
DO BEGIN
@@ -618,3 +621,105 @@ SELECT 1;
END;|
SET GLOBAL event_scheduler= OFF;
DROP EVENT bug28641;
+
+#####################################################################
+#
+# BUG#31111: --read-only crashes MySQL (events fail to load).
+#
+#####################################################################
+
+DROP USER mysqltest_u1@localhost;
+DROP EVENT IF EXISTS e1;
+DROP EVENT IF EXISTS e2;
+
+GRANT EVENT ON *.* TO mysqltest_u1@localhost;
+
+SET GLOBAL READ_ONLY = 1;
+
+#
+# Connection: u1_con (mysqltest_u1@localhost/events_test).
+#
+
+CREATE EVENT e1 ON SCHEDULE AT '2020-01-01 00:00:00' DO SET @a = 1;
+ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement
+
+ALTER EVENT e1 COMMENT 'comment';
+ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement
+
+DROP EVENT e1;
+ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement
+
+#
+# Connection: root_con (root@localhost/events_test).
+#
+
+CREATE EVENT e1 ON SCHEDULE AT '2020-01-01 00:00:00' DO SET @a = 1;
+
+ALTER EVENT e1 COMMENT 'comment';
+
+DROP EVENT e1;
+
+SET GLOBAL READ_ONLY = 0;
+
+#
+# Connection: u1_con (mysqltest_u1@localhost/test).
+#
+
+CREATE EVENT e1 ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 SECOND DO SET @a = 1;
+CREATE EVENT e2 ON SCHEDULE EVERY 1 SECOND DO SET @a = 1;
+
+SELECT
+event_name,
+last_executed IS NULL,
+definer
+FROM INFORMATION_SCHEMA.EVENTS
+WHERE event_schema = 'events_test';
+event_name last_executed IS NULL definer
+e1 1 mysqltest_u1@localhost
+e2 1 mysqltest_u1@localhost
+
+#
+# Connection: root_con (root@localhost/events_test).
+#
+
+SET GLOBAL READ_ONLY = 1;
+
+SET GLOBAL EVENT_SCHEDULER = ON;
+
+# Waiting for the event scheduler to execute and drop event e1...
+
+# Waiting for the event scheduler to execute and update event e2...
+
+SET GLOBAL EVENT_SCHEDULER = OFF;
+
+SELECT
+event_name,
+last_executed IS NULL,
+definer
+FROM INFORMATION_SCHEMA.EVENTS
+WHERE event_schema = 'events_test';
+event_name last_executed IS NULL definer
+e2 0 mysqltest_u1@localhost
+
+DROP EVENT e1;
+ERROR HY000: Unknown event 'e1'
+
+# Cleanup.
+
+DROP EVENT e2;
+
+SET GLOBAL READ_ONLY = 0;
+
+#
+# Connection: default
+#
+
+DROP USER mysqltest_u1@localhost;
+
+#####################################################################
+#
+# End of BUG#31111.
+#
+#####################################################################
+
+DROP DATABASE events_test;
diff --git a/mysql-test/r/events_scheduling.result b/mysql-test/r/events_scheduling.result
index d45bffcd7ff..033136ba354 100644
--- a/mysql-test/r/events_scheduling.result
+++ b/mysql-test/r/events_scheduling.result
@@ -78,10 +78,10 @@ FROM INFORMATION_SCHEMA.EVENTS
WHERE EVENT_SCHEMA=DATABASE() AND EVENT_NAME='event_2';
IF(TIME_TO_SEC(TIMEDIFF(ENDS,STARTS))=6, 'OK', 'ERROR')
OK
-SELECT IF(LAST_EXECUTED-ENDS < 3, 'OK', 'ERROR')
+SELECT IF(LAST_EXECUTED-ENDS <= 0, 'OK', 'ERROR')
FROM INFORMATION_SCHEMA.EVENTS
WHERE EVENT_SCHEMA=DATABASE() AND EVENT_NAME='event_2';
-IF(LAST_EXECUTED-ENDS < 3, 'OK', 'ERROR')
+IF(LAST_EXECUTED-ENDS <= 0, 'OK', 'ERROR')
OK
"Already dropped because ended. Therefore an error."
DROP EVENT event_3;
diff --git a/mysql-test/r/events_trans.result b/mysql-test/r/events_trans.result
index 984e22a2c1a..16ec64b4c50 100644
--- a/mysql-test/r/events_trans.result
+++ b/mysql-test/r/events_trans.result
@@ -63,7 +63,7 @@ begin work;
insert into t1 (a) values ("OK: create event if not exists");
create event if not exists e1 on schedule every 2 day do select 2;
Warnings:
-Note 1536 Event 'e1' already exists
+Note 1537 Event 'e1' already exists
rollback work;
select * from t1;
a
diff --git a/mysql-test/r/explain.result b/mysql-test/r/explain.result
index 6f348447fbb..2ce8b8c384f 100644
--- a/mysql-test/r/explain.result
+++ b/mysql-test/r/explain.result
@@ -87,3 +87,23 @@ Warnings:
Note 1003 select '1' AS `f1`,'1' AS `f2` from `test`.`t1` having 1
drop view v1;
drop table t1;
+CREATE TABLE t1(c INT);
+INSERT INTO t1 VALUES (),();
+CREATE TABLE t2 (b INT,
+KEY(b),KEY(b),KEY(b),KEY(b),KEY(b),
+KEY(b),KEY(b),KEY(b),KEY(b),KEY(b),
+KEY(b),KEY(b),KEY(b),KEY(b),KEY(b),
+KEY(b),KEY(b),KEY(b),KEY(b),KEY(b),
+KEY(b),KEY(b),KEY(b),KEY(b),KEY(b),
+KEY(b),KEY(b),KEY(b),KEY(b),KEY(b),
+KEY(b),KEY(b),KEY(b),KEY(b),KEY(b),
+KEY(b),KEY(b),KEY(b),KEY(b),KEY(b));
+INSERT INTO t2 VALUES (),(),();
+EXPLAIN SELECT 1 FROM
+(SELECT 1 FROM t2,t1 WHERE b < c GROUP BY 1 LIMIT 1) AS d2;
+id select_type table type possible_keys key key_len ref rows Extra
+X X X X X X X X X const row not found
+X X X X X X X X X
+X X X X X X X X X Range checked for each record (index map: 0xFFFFFFFFFF)
+DROP TABLE t2;
+DROP TABLE t1;
diff --git a/mysql-test/r/federated.result b/mysql-test/r/federated.result
index 8f1fe20ea3b..00287338459 100644
--- a/mysql-test/r/federated.result
+++ b/mysql-test/r/federated.result
@@ -1955,6 +1955,117 @@ a
2
DROP TABLE federated.t1;
DROP TABLE federated.t1;
+create table t1 (a varchar(256));
+drop view if exists v1;
+create view v1 as select a from t1;
+create table t1
+(a varchar(256)) engine=federated
+connection='mysql://root@127.0.0.1:SLAVE_PORT/test/v1';
+select 1 from t1 order by a;
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+drop table t1;
+drop table t1;
+drop view v1;
End of 5.1 tests
DROP TABLE IF EXISTS federated.t1;
DROP DATABASE IF EXISTS federated;
diff --git a/mysql-test/r/federated_server.result b/mysql-test/r/federated_server.result
index 0905aabb075..32717b4f0e3 100644
--- a/mysql-test/r/federated_server.result
+++ b/mysql-test/r/federated_server.result
@@ -253,6 +253,14 @@ drop user guest_usage@localhost;
drop user guest_select@localhost;
drop table federated.t1;
drop server 's1';
+create server 's1' foreign data wrapper 'mysql' options (port 3306);
+alter server 's1' options
+(host 'localhost', database '', user '',
+password '', socket '', owner '', port 3306);
+alter server 's1' options
+(host 'localhost', database 'database1', user '',
+password '', socket '', owner '', port 3306);
+drop server 's1';
# End of 5.1 tests
use test;
create procedure p1 ()
@@ -262,7 +270,7 @@ DECLARE e INT DEFAULT 0;
DECLARE i INT;
DECLARE CONTINUE HANDLER FOR SQLEXCEPTION SET e = e + 1;
SET i = sleep(5);
-WHILE v < 20000 do
+WHILE v < 10000 do
CREATE SERVER s
FOREIGN DATA WRAPPER mysql
OPTIONS (USER 'Remote', HOST '192.168.1.106', DATABASE 'test');
diff --git a/mysql-test/r/flush.result b/mysql-test/r/flush.result
index dcbffd6f7c8..f1b6c471943 100644
--- a/mysql-test/r/flush.result
+++ b/mysql-test/r/flush.result
@@ -55,6 +55,23 @@ flush tables with read lock;
insert into t2 values(1);
unlock tables;
drop table t1, t2;
+drop table if exists t1, t2;
+set session low_priority_updates=1;
+create table t1 (a int);
+create table t2 (b int);
+lock tables t1 write;
+flush tables with read lock;
+ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+unlock tables;
+lock tables t1 read, t2 write;
+flush tables with read lock;
+ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+unlock tables;
+lock tables t1 read;
+flush tables with read lock;
+unlock tables;
+drop table t1, t2;
+set session low_priority_updates=default;
End of 5.0 tests
set @old_general_log= @@general_log;
set @old_read_only= @@read_only;
diff --git a/mysql-test/r/fulltext.result b/mysql-test/r/fulltext.result
index 96ebb9bf254..c3fa427127b 100644
--- a/mysql-test/r/fulltext.result
+++ b/mysql-test/r/fulltext.result
@@ -476,6 +476,12 @@ ALTER TABLE t1 DISABLE KEYS;
SELECT * FROM t1 WHERE MATCH(a) AGAINST('test');
ERROR HY000: Can't find FULLTEXT index matching the column list
DROP TABLE t1;
+CREATE TABLE t1(a TEXT);
+INSERT INTO t1 VALUES(' aaaaa aaaa');
+SELECT * FROM t1 WHERE MATCH(a) AGAINST ('"aaaa"' IN BOOLEAN MODE);
+a
+ aaaaa aaaa
+DROP TABLE t1;
CREATE TABLE t1(a VARCHAR(20), FULLTEXT(a));
INSERT INTO t1 VALUES('Offside'),('City Of God');
SELECT a FROM t1 WHERE MATCH a AGAINST ('+city of*' IN BOOLEAN MODE);
diff --git a/mysql-test/r/func_gconcat.result b/mysql-test/r/func_gconcat.result
index b17c5e5409c..d257e526abf 100644
--- a/mysql-test/r/func_gconcat.result
+++ b/mysql-test/r/func_gconcat.result
@@ -825,4 +825,55 @@ id group_concat(b.name)
1 óra,óra
2 óra,óra
drop table t1;
+create table t1(a bit not null);
+insert into t1 values (), (), ();
+Warnings:
+Warning 1364 Field 'a' doesn't have a default value
+select group_concat(distinct a) from t1;
+group_concat(distinct a)
+0
+select group_concat(distinct a order by a) from t1;
+group_concat(distinct a order by a)
+0
+drop table t1;
+create table t1(a bit(2) not null);
+insert into t1 values (1), (0), (0), (3), (1);
+select group_concat(distinct a) from t1;
+group_concat(distinct a)
+1,0,3
+select group_concat(distinct a order by a) from t1;
+group_concat(distinct a order by a)
+0,1,3
+select group_concat(distinct a order by a desc) from t1;
+group_concat(distinct a order by a desc)
+3,1,0
+drop table t1;
+create table t1(a bit(2), b varchar(10), c bit);
+insert into t1 values (1, 'a', 0), (0, 'b', 1), (0, 'c', 0), (3, 'd', 1),
+(1, 'e', 1), (3, 'f', 1), (0, 'g', 1);
+select group_concat(distinct a, c) from t1;
+group_concat(distinct a, c)
+10,01,00,31,11
+select group_concat(distinct a, c order by a) from t1;
+group_concat(distinct a, c order by a)
+00,01,11,10,31
+select group_concat(distinct a, c) from t1;
+group_concat(distinct a, c)
+10,01,00,31,11
+select group_concat(distinct a, c order by a, c) from t1;
+group_concat(distinct a, c order by a, c)
+00,01,10,11,31
+select group_concat(distinct a, c order by a desc, c desc) from t1;
+group_concat(distinct a, c order by a desc, c desc)
+31,11,10,01,00
+drop table t1;
+create table t1 (f1 char(20));
+insert into t1 values (''),('');
+select group_concat(distinct f1) from t1;
+group_concat(distinct f1)
+
+select group_concat(f1) from t1;
+group_concat(f1)
+,
+drop table t1;
End of 5.0 tests
diff --git a/mysql-test/r/func_group.result b/mysql-test/r/func_group.result
index fce01ffd171..abf717091af 100644
--- a/mysql-test/r/func_group.result
+++ b/mysql-test/r/func_group.result
@@ -1368,4 +1368,34 @@ SELECT MIN(a), MIN(b) FROM t5 WHERE a = 1 and b > 1;
MIN(a) MIN(b)
1 2
DROP TABLE t1, t2, t3, t4, t5;
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 values (),(),();
+SELECT (SELECT SLEEP(0) FROM t1 ORDER BY AVG(DISTINCT a) ) as x FROM t1
+GROUP BY x;
+x
+0
+SELECT 1 FROM t1 GROUP BY (SELECT SLEEP(0) FROM t1 ORDER BY AVG(DISTINCT a) );
+1
+1
+DROP TABLE t1;
+CREATE TABLE t1 (a int, b date NOT NULL, KEY k1 (a,b));
+SELECT MIN(b) FROM t1 WHERE a=1 AND b>'2007-08-01';
+MIN(b)
+NULL
+DROP TABLE t1;
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2),(3),(4);
+SET SQL_MODE=ONLY_FULL_GROUP_BY;
+SELECT a FROM t1 HAVING COUNT(*)>2;
+ERROR 42000: Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause
+SELECT COUNT(*), a FROM t1;
+ERROR 42000: Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause
+SET SQL_MODE=DEFAULT;
+SELECT a FROM t1 HAVING COUNT(*)>2;
+a
+1
+SELECT COUNT(*), a FROM t1;
+COUNT(*) a
+4 1
+DROP TABLE t1;
End of 5.0 tests
diff --git a/mysql-test/r/func_in.result b/mysql-test/r/func_in.result
index 4f64d39ccc0..80fa8f17a2a 100644
--- a/mysql-test/r/func_in.result
+++ b/mysql-test/r/func_in.result
@@ -564,4 +564,9 @@ explain select f2 from t2 where f2 in (1,'b');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 index t2f2 t2f2 5 NULL 3 Using where; Using index
drop table t1, t2;
+create table t1 (a time, key(a));
+insert into t1 values (),(),(),(),(),(),(),(),(),();
+select a from t1 where a not in (a,a,a) group by a;
+a
+drop table t1;
End of 5.1 tests
diff --git a/mysql-test/r/func_math.result b/mysql-test/r/func_math.result
index e2e93796afe..6a476d12896 100644
--- a/mysql-test/r/func_math.result
+++ b/mysql-test/r/func_math.result
@@ -369,4 +369,42 @@ mod(5, cast(-2 as unsigned)) mod(5, 18446744073709551614) mod(5, -2)
select pow(cast(-2 as unsigned), 5), pow(18446744073709551614, 5), pow(-2, 5);
pow(cast(-2 as unsigned), 5) pow(18446744073709551614, 5) pow(-2, 5)
2.1359870359209e+96 2.1359870359209e+96 -32
+CREATE TABLE t1 (a timestamp, b varchar(20), c bit(1));
+INSERT INTO t1 VALUES('1998-09-23', 'str1', 1), ('2003-03-25', 'str2', 0);
+SELECT a DIV 900 y FROM t1 GROUP BY y;
+y
+22201025555
+22255916666
+SELECT DISTINCT a DIV 900 y FROM t1;
+y
+22201025555
+22255916666
+SELECT b DIV 900 y FROM t1 GROUP BY y;
+y
+0
+SELECT c DIV 900 y FROM t1 GROUP BY y;
+y
+0
+DROP TABLE t1;
+CREATE TABLE t1(a LONGBLOB);
+INSERT INTO t1 VALUES('1'),('2'),('3');
+SELECT DISTINCT (a DIV 254576881) FROM t1;
+(a DIV 254576881)
+0
+SELECT (a DIV 254576881) FROM t1 UNION ALL
+SELECT (a DIV 254576881) FROM t1;
+(a DIV 254576881)
+0
+0
+0
+0
+0
+0
+DROP TABLE t1;
+CREATE TABLE t1(a SET('a','b','c'));
+INSERT INTO t1 VALUES ('a');
+SELECT a DIV 2 FROM t1 UNION SELECT a DIV 2 FROM t1;
+a DIV 2
+0
+DROP TABLE t1;
End of 5.0 tests
diff --git a/mysql-test/r/func_misc.result b/mysql-test/r/func_misc.result
index 39bf1470afe..745a340ec94 100644
--- a/mysql-test/r/func_misc.result
+++ b/mysql-test/r/func_misc.result
@@ -1,4 +1,4 @@
-DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t1, t2;
select format(1.5555,0),format(123.5555,1),format(1234.5555,2),format(12345.55555,3),format(123456.5555,4),format(1234567.5555,5),format("12345.2399",2);
format(1.5555,0) format(123.5555,1) format(1234.5555,2) format(12345.55555,3) format(123456.5555,4) format(1234567.5555,5) format("12345.2399",2)
2 123.6 1,234.56 12,345.556 123,456.5555 1,234,567.55550 12,345.24
@@ -190,6 +190,46 @@ ERROR 21000: Operand should contain 1 column(s)
drop table table_26093;
drop function func_26093_a;
drop function func_26093_b;
+SELECT NAME_CONST('test', NOW());
+ERROR HY000: Incorrect arguments to NAME_CONST
+SELECT NAME_CONST('test', UPPER('test'));
+ERROR HY000: Incorrect arguments to NAME_CONST
+SELECT NAME_CONST('test', NULL);
+test
+NULL
+SELECT NAME_CONST('test', 1);
+test
+1
+SELECT NAME_CONST('test', -1);
+test
+-1
+SELECT NAME_CONST('test', 1.0);
+test
+1.0
+SELECT NAME_CONST('test', -1.0);
+test
+-1.0
+SELECT NAME_CONST('test', 'test');
+test
+test
+CREATE TABLE t1 (a int);
+INSERT INTO t1 VALUES (5), (2);
+SELECT NAME_CONST(x,2) FROM (SELECT a x FROM t1) t;
+ERROR HY000: Incorrect arguments to NAME_CONST
+DROP TABLE t1;
+CREATE TABLE t1(a INT);
+INSERT INTO t1 VALUES (), (), ();
+SELECT NAME_CONST(a, '1') FROM t1;
+ERROR HY000: Incorrect arguments to NAME_CONST
+SET INSERT_ID= NAME_CONST(a, a);
+ERROR HY000: Incorrect arguments to NAME_CONST
+DROP TABLE t1;
+create table t1 (a int not null);
+insert into t1 values (-1), (-2);
+select min(a) from t1 group by inet_ntoa(a);
+min(a)
+-2
+drop table t1;
End of 5.0 tests
select connection_id() > 0;
connection_id() > 0
diff --git a/mysql-test/r/func_regexp.result b/mysql-test/r/func_regexp.result
index 4e35c2a1348..9d85b1d3e7f 100644
--- a/mysql-test/r/func_regexp.result
+++ b/mysql-test/r/func_regexp.result
@@ -1,5 +1,17 @@
drop table if exists t1;
-create table t1 (s1 char(64),s2 char(64));
+set names latin1;
+drop table if exists t1;
+create table t1 as
+select repeat(' ', 64) as s1, repeat(' ',64) as s2
+union
+select null, null;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `s1` varchar(64) DEFAULT NULL,
+ `s2` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+delete from t1;
insert into t1 values('aaa','aaa');
insert into t1 values('aaa|qqq','qqq');
insert into t1 values('gheis','^[^a-dXYZ]+$');
@@ -98,3 +110,8 @@ R2
R3
deallocate prepare stmt1;
drop table t1;
+End of 4.1 tests
+SELECT 1 REGEXP NULL;
+1 REGEXP NULL
+NULL
+End of 5.0 tests
diff --git a/mysql-test/r/func_sapdb.result b/mysql-test/r/func_sapdb.result
index b7dbfc670a8..942073e3fbd 100644
--- a/mysql-test/r/func_sapdb.result
+++ b/mysql-test/r/func_sapdb.result
@@ -93,6 +93,9 @@ makedate(9999,365)
select makedate(9999,366);
makedate(9999,366)
NULL
+select makedate(100,1);
+makedate(100,1)
+0100-01-01
select addtime("1997-12-31 23:59:59.999999", "1 1:1:1.000002");
addtime("1997-12-31 23:59:59.999999", "1 1:1:1.000002")
1998-01-02 01:01:01.000001
@@ -196,7 +199,7 @@ f2 datetime YES NULL
f3 time YES NULL
f4 time YES NULL
f5 time YES NULL
-f6 time NO 00:00:00
+f6 time YES NULL
f7 datetime YES NULL
f8 date YES NULL
f9 time YES NULL
diff --git a/mysql-test/r/func_set.result b/mysql-test/r/func_set.result
index 5f6ddb020f2..4dd11cafdcd 100644
--- a/mysql-test/r/func_set.result
+++ b/mysql-test/r/func_set.result
@@ -73,3 +73,33 @@ find_in_set(binary 'a', 'A,B,C')
select find_in_set('1','3,1,');
find_in_set('1','3,1,')
2
+End of 4.1 tests
+SELECT INTERVAL(0.0, NULL);
+INTERVAL(0.0, NULL)
+1
+SELECT INTERVAL(0.0, CAST(NULL AS DECIMAL));
+INTERVAL(0.0, CAST(NULL AS DECIMAL))
+1
+SELECT INTERVAL(0.0, CAST(DATE(NULL) AS DECIMAL));
+INTERVAL(0.0, CAST(DATE(NULL) AS DECIMAL))
+1
+SELECT INTERVAL(0.0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+INTERVAL(0.0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL)
+8
+SELECT INTERVAL(0.0, CAST(NULL AS DECIMAL), CAST(NULL AS DECIMAL),
+CAST(NULL AS DECIMAL), CAST(NULL AS DECIMAL), CAST(NULL AS DECIMAL),
+CAST(NULL AS DECIMAL), CAST(NULL AS DECIMAL), CAST(NULL AS DECIMAL));
+INTERVAL(0.0, CAST(NULL AS DECIMAL), CAST(NULL AS DECIMAL),
+CAST(NULL AS DECIMAL), CAST(NULL AS DECIMAL), CAST(NULL AS DECIMAL),
+CAST(NULL AS DECIMAL), CAST(NULL AS DECIMAL), CAST(NULL AS DECIMAL))
+8
+SELECT INTERVAL(0.0, CAST(DATE(NULL) AS DECIMAL), CAST(DATE(NULL) AS DECIMAL),
+CAST(DATE(NULL) AS DECIMAL), CAST(DATE(NULL) AS DECIMAL),
+CAST(DATE(NULL) AS DECIMAL), CAST(DATE(NULL) AS DECIMAL),
+CAST(DATE(NULL) AS DECIMAL), CAST(DATE(NULL) AS DECIMAL));
+INTERVAL(0.0, CAST(DATE(NULL) AS DECIMAL), CAST(DATE(NULL) AS DECIMAL),
+CAST(DATE(NULL) AS DECIMAL), CAST(DATE(NULL) AS DECIMAL),
+CAST(DATE(NULL) AS DECIMAL), CAST(DATE(NULL) AS DECIMAL),
+CAST(DATE(NULL) AS DECIMAL), CAST(DATE(NULL) AS DECIMAL))
+8
+End of 5.0 tests
diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result
index 6fbb9c811a7..6f6edd5112b 100644
--- a/mysql-test/r/func_str.result
+++ b/mysql-test/r/func_str.result
@@ -722,11 +722,11 @@ Warning 1265 Data truncated for column 'format(130,10)' at row 1
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `bin(130)` varchar(64) NOT NULL DEFAULT '',
- `oct(130)` varchar(64) NOT NULL DEFAULT '',
- `conv(130,16,10)` varchar(64) NOT NULL DEFAULT '',
+ `bin(130)` varchar(64) DEFAULT NULL,
+ `oct(130)` varchar(64) DEFAULT NULL,
+ `conv(130,16,10)` varchar(64) DEFAULT NULL,
`hex(130)` varchar(6) NOT NULL DEFAULT '',
- `char(130)` varbinary(1) NOT NULL DEFAULT '',
+ `char(130)` varbinary(4) NOT NULL DEFAULT '',
`format(130,10)` varchar(4) NOT NULL DEFAULT '',
`left(_latin2'a',1)` varchar(1) CHARACTER SET latin2 NOT NULL DEFAULT '',
`right(_latin2'a',1)` varchar(1) CHARACTER SET latin2 NOT NULL DEFAULT '',
@@ -1316,6 +1316,18 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
Warnings:
Note 1003 select decode('',_latin1'zxcv') AS `enc` from `test`.`t1`
drop table t1;
+create table t1 (a bigint not null)engine=myisam;
+insert into t1 set a = 1024*1024*1024*4;
+delete from t1 order by (inet_ntoa(a)) desc limit 10;
+drop table t1;
+create table t1 (a char(36) not null)engine=myisam;
+insert ignore into t1 set a = ' ';
+insert ignore into t1 set a = ' ';
+select * from t1 order by (oct(a));
+a
+
+
+drop table t1;
End of 4.1 tests
create table t1 (d decimal default null);
insert into t1 values (null);
@@ -2486,4 +2498,14 @@ SUBSTR(a,1,len)
ba
DROP TABLE t1;
+CREATE TABLE t1 AS SELECT CHAR(0x414243) as c1;
+SELECT HEX(c1) from t1;
+HEX(c1)
+414243
+DROP TABLE t1;
+CREATE VIEW v1 AS SELECT CHAR(0x414243) as c1;
+SELECT HEX(c1) from v1;
+HEX(c1)
+414243
+DROP VIEW v1;
End of 5.0 tests
diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result
index 3105bc3b578..5e3726a06d6 100644
--- a/mysql-test/r/func_time.result
+++ b/mysql-test/r/func_time.result
@@ -1027,6 +1027,15 @@ fmtddate field2
Sep-4 12:00AM abcd
DROP TABLE testBug8868;
SET NAMES DEFAULT;
+CREATE TABLE t1 (
+a TIMESTAMP
+);
+INSERT INTO t1 VALUES (now()), (now());
+SELECT 1 FROM t1 ORDER BY MAKETIME(1, 1, a);
+1
+1
+1
+DROP TABLE t1;
(select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 DAY)),'%H') As H)
union
(select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 DAY)),'%H') As H);
@@ -1237,6 +1246,18 @@ select concat(a,ifnull(min(date_format(now(), '%Y-%m-%d')),' ull')) from t1;
ERROR HY000: Illegal mix of collations (ascii_general_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation 'concat'
set lc_time_names=en_US;
drop table t1;
+select DATE_ADD('20071108181000', INTERVAL 1 DAY);
+DATE_ADD('20071108181000', INTERVAL 1 DAY)
+2007-11-09 18:10:00
+select DATE_ADD(20071108181000, INTERVAL 1 DAY);
+DATE_ADD(20071108181000, INTERVAL 1 DAY)
+2007-11-09 18:10:00
+select DATE_ADD('20071108', INTERVAL 1 DAY);
+DATE_ADD('20071108', INTERVAL 1 DAY)
+2007-11-09
+select DATE_ADD(20071108, INTERVAL 1 DAY);
+DATE_ADD(20071108, INTERVAL 1 DAY)
+2007-11-09
End of 5.0 tests
select date_sub("0050-01-01 00:00:01",INTERVAL 2 SECOND);
date_sub("0050-01-01 00:00:01",INTERVAL 2 SECOND)
diff --git a/mysql-test/r/gis-rtree.result b/mysql-test/r/gis-rtree.result
index 6e3aebe8d47..f8e0085bf59 100644
--- a/mysql-test/r/gis-rtree.result
+++ b/mysql-test/r/gis-rtree.result
@@ -167,7 +167,7 @@ count(*)
150
EXPLAIN SELECT fid, AsText(g) FROM t1 WHERE Within(g, GeomFromText('Polygon((140 140,160 140,160 160,140 160,140 140))'));
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range g g 32 NULL 8 Using where
+1 SIMPLE t1 range g g 34 NULL 8 Using where
SELECT fid, AsText(g) FROM t1 WHERE Within(g, GeomFromText('Polygon((140 140,160 140,160 160,140 160,140 140))'));
fid AsText(g)
1 LINESTRING(150 150,150 150)
@@ -301,7 +301,7 @@ count(*)
EXPLAIN SELECT fid, AsText(g) FROM t2 WHERE Within(g,
GeomFromText('Polygon((40 40,60 40,60 60,40 60,40 40))'));
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range g g 32 NULL 4 Using where
+1 SIMPLE t2 range g g 34 NULL 4 Using where
SELECT fid, AsText(g) FROM t2 WHERE Within(g,
GeomFromText('Polygon((40 40,60 40,60 60,40 60,40 40))'));
fid AsText(g)
@@ -1425,6 +1425,37 @@ CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 check status OK
DROP TABLE t1;
+create table t1 (a geometry not null, spatial index(a));
+insert into t1 values (PointFromWKB(POINT(1.1517219314031e+164, 131072)));
+insert into t1 values (PointFromWKB(POINT(9.1248812352444e+192, 2.9740338169556e+284)));
+insert into t1 values (PointFromWKB(POINT(4.7783097267365e-299, -0)));
+insert into t1 values (PointFromWKB(POINT(1.49166814624e-154, 2.0880974297595e-53)));
+insert into t1 values (PointFromWKB(POINT(4.0917382598702e+149, 1.2024538023802e+111)));
+insert into t1 values (PointFromWKB(POINT(2.0349165139404e+236, 2.9993936277913e-241)));
+insert into t1 values (PointFromWKB(POINT(2.5243548967072e-29, 1.2024538023802e+111)));
+insert into t1 values (PointFromWKB(POINT(0, 6.9835074892995e-251)));
+insert into t1 values (PointFromWKB(POINT(2.0880974297595e-53, 3.1050361846014e+231)));
+insert into t1 values (PointFromWKB(POINT(2.8728483499323e-188, 2.4600631144627e+260)));
+insert into t1 values (PointFromWKB(POINT(3.0517578125e-05, 2.0349165139404e+236)));
+insert into t1 values (PointFromWKB(POINT(1.1517219314031e+164, 1.1818212630766e-125)));
+insert into t1 values (PointFromWKB(POINT(2.481040258324e-265, 5.7766220027675e-275)));
+insert into t1 values (PointFromWKB(POINT(2.0880974297595e-53, 2.5243548967072e-29)));
+insert into t1 values (PointFromWKB(POINT(5.7766220027675e-275, 9.9464647281957e+86)));
+insert into t1 values (PointFromWKB(POINT(2.2181357552967e+130, 3.7857669957337e-270)));
+insert into t1 values (PointFromWKB(POINT(4.5767114681874e-246, 3.6893488147419e+19)));
+insert into t1 values (PointFromWKB(POINT(4.5767114681874e-246, 3.7537584144024e+255)));
+insert into t1 values (PointFromWKB(POINT(3.7857669957337e-270, 1.8033161362863e-130)));
+insert into t1 values (PointFromWKB(POINT(0, 5.8774717541114e-39)));
+insert into t1 values (PointFromWKB(POINT(1.1517219314031e+164, 2.2761049594727e-159)));
+insert into t1 values (PointFromWKB(POINT(6.243497100632e+144, 3.7857669957337e-270)));
+insert into t1 values (PointFromWKB(POINT(3.7857669957337e-270, 2.6355494858076e-82)));
+insert into t1 values (PointFromWKB(POINT(2.0349165139404e+236, 3.8518598887745e-34)));
+insert into t1 values (PointFromWKB(POINT(4.6566128730774e-10, 2.0880974297595e-53)));
+insert into t1 values (PointFromWKB(POINT(2.0880974297595e-53, 1.8827498946116e-183)));
+insert into t1 values (PointFromWKB(POINT(1.8033161362863e-130, 9.1248812352444e+192)));
+insert into t1 values (PointFromWKB(POINT(4.7783097267365e-299, 2.2761049594727e-159)));
+insert into t1 values (PointFromWKB(POINT(1.94906280228e+289, 1.2338789709327e-178)));
+drop table t1;
CREATE TABLE t1(foo GEOMETRY NOT NULL, SPATIAL INDEX(foo) );
INSERT INTO t1(foo) VALUES (NULL);
ERROR 23000: Column 'foo' cannot be null
diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result
index 7b4b02f3ff3..73fb9cc69e0 100644
--- a/mysql-test/r/gis.result
+++ b/mysql-test/r/gis.result
@@ -680,7 +680,7 @@ def test t1 t1 g g 255 4294967295 0 Y 144 0 63
g
select asbinary(g) from t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def asbinary(g) 252 16777216 0 Y 128 0 63
+def asbinary(g) 252 4294967295 0 Y 128 0 63
asbinary(g)
drop table t1;
create table t1 (a TEXT, b GEOMETRY NOT NULL, SPATIAL KEY(b));
@@ -736,6 +736,44 @@ SELECT * FROM t1;
a
NULL
DROP TABLE t1;
+CREATE TABLE `t1` ( `col9` set('a'), `col89` date);
+INSERT INTO `t1` VALUES ('','0000-00-00');
+select geomfromtext(col9,col89) as a from t1;
+a
+NULL
+DROP TABLE t1;
+CREATE TABLE t1 (
+geomdata polygon NOT NULL,
+SPATIAL KEY index_geom (geomdata)
+) ENGINE=MyISAM DEFAULT CHARSET=latin2 DELAY_KEY_WRITE=1 ROW_FORMAT=FIXED;
+CREATE TABLE t2 (
+geomdata polygon NOT NULL,
+SPATIAL KEY index_geom (geomdata)
+) ENGINE=MyISAM DEFAULT CHARSET=latin2 DELAY_KEY_WRITE=1 ROW_FORMAT=FIXED;
+CREATE TABLE t3
+select
+aswkb(ws.geomdata) AS geomdatawkb
+from
+t1 ws
+union
+select
+aswkb(ws.geomdata) AS geomdatawkb
+from
+t2 ws;
+describe t3;
+Field Type Null Key Default Extra
+geomdatawkb longblob YES NULL
+drop table t1;
+drop table t2;
+drop table t3;
+create table t1(col1 geometry default null,col15 geometrycollection not
+null,spatial index(col15),index(col1(15)))engine=myisam;
+insert into t1 set col15 = GeomFromText('POINT(6 5)');
+insert into t1 set col15 = GeomFromText('POINT(6 5)');
+check table t1 extended;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+drop table t1;
End of 4.1 tests
create table t1 (s1 geometry not null,s2 char(100));
create trigger t1_bu before update on t1 for each row set new.s1 = null;
@@ -889,6 +927,51 @@ drop table t1, t2;
SELECT 1;
1
1
+CREATE TABLE t1 (p POINT);
+CREATE TABLE t2 (p POINT, INDEX(p));
+INSERT INTO t1 VALUES (POINTFROMTEXT('POINT(1 2)'));
+INSERT INTO t2 VALUES (POINTFROMTEXT('POINT(1 2)'));
+SELECT COUNT(*) FROM t1 WHERE p=POINTFROMTEXT('POINT(1 2)');
+COUNT(*)
+1
+EXPLAIN
+SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)');
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 system p NULL NULL NULL 1
+SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)');
+COUNT(*)
+1
+INSERT INTO t1 VALUES (POINTFROMTEXT('POINT(1 2)'));
+INSERT INTO t2 VALUES (POINTFROMTEXT('POINT(1 2)'));
+EXPLAIN
+SELECT COUNT(*) FROM t1 WHERE p=POINTFROMTEXT('POINT(1 2)');
+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 COUNT(*) FROM t1 WHERE p=POINTFROMTEXT('POINT(1 2)');
+COUNT(*)
+2
+EXPLAIN
+SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)');
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 ref p p 28 const 1 Using where
+SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)');
+COUNT(*)
+2
+EXPLAIN
+SELECT COUNT(*) FROM t2 IGNORE INDEX(p) WHERE p=POINTFROMTEXT('POINT(1 2)');
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 ALL NULL NULL NULL NULL 2 Using where
+SELECT COUNT(*) FROM t2 IGNORE INDEX(p) WHERE p=POINTFROMTEXT('POINT(1 2)');
+COUNT(*)
+2
+DROP TABLE t1, t2;
+End of 5.0 tests
+create table `t1` (`col002` point)engine=myisam;
+insert into t1 values (),(),();
+select min(`col002`) from t1 union select `col002` from t1;
+min(`col002`)
+NULL
+drop table t1;
End of 5.0 tests
create table t1 (f1 tinyint(1), f2 char(1), f3 varchar(1), f4 geometry, f5 datetime);
create view v1 as select * from t1;
diff --git a/mysql-test/r/grant.result b/mysql-test/r/grant.result
index 0d4dad39882..c46f29b787f 100644
--- a/mysql-test/r/grant.result
+++ b/mysql-test/r/grant.result
@@ -529,7 +529,7 @@ Db char(64) NO PRI
User char(16) NO PRI
Table_name char(64) NO PRI
Grantor char(77) NO MUL
-Timestamp timestamp NO CURRENT_TIMESTAMP
+Timestamp timestamp NO CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP
Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') NO
Column_priv set('Select','Insert','Update','References') NO
use test;
@@ -1194,6 +1194,7 @@ ERROR 42000: SELECT command denied to user 'mysqltest_2'@'localhost' for table '
DROP DATABASE mysqltest1;
DROP DATABASE mysqltest2;
DROP USER mysqltest_1@localhost;
+DROP USER mysqltest_2@localhost;
use test;
CREATE TABLE t1 (f1 int, f2 int);
INSERT INTO t1 VALUES(1,1), (2,2);
@@ -1210,6 +1211,10 @@ SELECT * FROM test.t1;
f1 f2
1 1
2 2
+REVOKE UPDATE (f1) ON `test`.`t1` FROM 'mysqltest_1'@'localhost';
+REVOKE SELECT ON `test`.* FROM 'mysqltest_1'@'localhost';
+REVOKE ALL ON db27878.* FROM 'mysqltest_1'@'localhost';
+DROP USER mysqltest_1@localhost;
DROP DATABASE db27878;
use test;
DROP TABLE t1;
@@ -1223,3 +1228,61 @@ drop user юзер_юзер@localhost;
grant select on test.* to очень_длинный_юзер@localhost;
ERROR HY000: String 'очень_длинный_юзер' is too long for user name (should be no longer than 16)
set names default;
+create database mysqltest;
+use mysqltest;
+grant create on mysqltest.* to mysqltest@localhost;
+create table t1 (i INT);
+insert into t1 values (1);
+ERROR 42000: INSERT command denied to user 'mysqltest'@'localhost' for table 't1'
+create table t2 (i INT);
+create table t4 (i INT);
+grant select, insert on mysqltest.t2 to mysqltest@localhost;
+grant insert on mysqltest.t4 to mysqltest@localhost;
+grant create, insert on mysqltest.t5 to mysqltest@localhost;
+grant create, insert on mysqltest.t6 to mysqltest@localhost;
+flush privileges;
+insert into t2 values (1);
+create table if not exists t1 select * from t2;
+ERROR 42000: INSERT command denied to user 'mysqltest'@'localhost' for table 't1'
+create table if not exists t3 select * from t2;
+ERROR 42000: INSERT command denied to user 'mysqltest'@'localhost' for table 't3'
+create table if not exists t4 select * from t2;
+Warnings:
+Note 1050 Table 't4' already exists
+create table if not exists t5 select * from t2;
+create table t6 select * from t2;
+create table t7 select * from t2;
+ERROR 42000: INSERT command denied to user 'mysqltest'@'localhost' for table 't7'
+create table t4 select * from t2;
+ERROR 42S01: Table 't4' already exists
+create table t1 select * from t2;
+ERROR 42000: INSERT command denied to user 'mysqltest'@'localhost' for table 't1'
+drop table t1,t2,t4,t5,t6;
+revoke create on mysqltest.* from mysqltest@localhost;
+revoke select, insert on mysqltest.t2 from mysqltest@localhost;
+revoke insert on mysqltest.t4 from mysqltest@localhost;
+revoke create, insert on mysqltest.t5 from mysqltest@localhost;
+revoke create, insert on mysqltest.t6 from mysqltest@localhost;
+drop user mysqltest@localhost;
+drop database mysqltest;
+use test;
+FLUSH PRIVILEGES without procs_priv table.
+RENAME TABLE mysql.procs_priv TO mysql.procs_gone;
+FLUSH PRIVILEGES;
+Warnings:
+Error 1146 Table 'mysql.procs_priv' doesn't exist
+Error 1548 Cannot load from mysql.mysql.procs_priv. The table is probably corrupted
+Assigning privileges without procs_priv table.
+CREATE DATABASE mysqltest1;
+CREATE PROCEDURE mysqltest1.test() SQL SECURITY DEFINER
+SELECT 1;
+GRANT EXECUTE ON FUNCTION mysqltest1.test TO mysqltest_1@localhost;
+ERROR 42S02: Table 'mysql.procs_priv' doesn't exist
+GRANT ALL PRIVILEGES ON test.* TO mysqltest_1@localhost;
+CALL mysqltest1.test();
+1
+1
+DROP DATABASE mysqltest1;
+RENAME TABLE mysql.procs_gone TO mysql.procs_priv;
+FLUSH PRIVILEGES;
+End of 5.1 tests
diff --git a/mysql-test/r/grant2.result b/mysql-test/r/grant2.result
index 21bad4fddcb..b94de265d0c 100644
--- a/mysql-test/r/grant2.result
+++ b/mysql-test/r/grant2.result
@@ -422,4 +422,22 @@ revoke all privileges, grant option from mysqltest_1@localhost;
revoke all privileges, grant option from mysqltest_2@localhost;
drop user mysqltest_1@localhost;
drop user mysqltest_2@localhost;
+CREATE DATABASE db1;
+USE db1;
+CREATE TABLE t1 (a INT, b INT);
+INSERT INTO t1 VALUES (1,1),(2,2);
+CREATE TABLE t2 (b INT, c INT);
+INSERT INTO t2 VALUES (1,100),(2,200);
+GRANT SELECT ON t1 TO mysqltest1@localhost;
+GRANT SELECT (b) ON t2 TO mysqltest1@localhost;
+USE db1;
+SELECT c FROM t2;
+ERROR 42000: SELECT command denied to user 'mysqltest1'@'localhost' for column 'c' in table 't2'
+SELECT * FROM t2;
+ERROR 42000: SELECT command denied to user 'mysqltest1'@'localhost' for column 'c' in table 't2'
+SELECT * FROM t1 JOIN t2 USING (b);
+ERROR 42000: SELECT command denied to user 'mysqltest1'@'localhost' for column 'c' in table 't2'
+DROP TABLE db1.t1, db1.t2;
+DROP USER mysqltest1@localhost;
+DROP DATABASE db1;
End of 5.0 tests
diff --git a/mysql-test/r/grant3.result b/mysql-test/r/grant3.result
index 6193c4fd49d..cc7f46855b2 100644
--- a/mysql-test/r/grant3.result
+++ b/mysql-test/r/grant3.result
@@ -16,3 +16,125 @@ delete from mysql.db where user like 'mysqltest\_%';
delete from mysql.tables_priv where user like 'mysqltest\_%';
delete from mysql.columns_priv where user like 'mysqltest\_%';
flush privileges;
+grant select on test.* to CUser@localhost;
+grant select on test.* to CUser@LOCALHOST;
+flush privileges;
+SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
+user host
+CUser LOCALHOST
+CUser localhost
+SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser' order by 1,2;
+user host db select_priv
+CUser LOCALHOST test Y
+CUser localhost test Y
+REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'LOCALHOST';
+flush privileges;
+SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
+user host
+CUser LOCALHOST
+CUser localhost
+SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser' order by 1,2;
+user host db select_priv
+CUser localhost test Y
+REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'localhost';
+flush privileges;
+SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
+user host
+CUser LOCALHOST
+CUser localhost
+SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser' order by 1,2;
+user host db select_priv
+DROP USER CUser@localhost;
+DROP USER CUser@LOCALHOST;
+create table t1 (a int);
+grant select on test.t1 to CUser@localhost;
+grant select on test.t1 to CUser@LOCALHOST;
+flush privileges;
+SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
+user host
+CUser LOCALHOST
+CUser localhost
+SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
+user host db Table_name Table_priv Column_priv
+CUser LOCALHOST test t1 Select
+CUser localhost test t1 Select
+REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'LOCALHOST';
+flush privileges;
+SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
+user host
+CUser LOCALHOST
+CUser localhost
+SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
+user host db Table_name Table_priv Column_priv
+CUser localhost test t1 Select
+REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'localhost';
+flush privileges;
+SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
+user host
+CUser LOCALHOST
+CUser localhost
+SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
+user host db Table_name Table_priv Column_priv
+DROP USER CUser@localhost;
+DROP USER CUser@LOCALHOST;
+grant select(a) on test.t1 to CUser@localhost;
+grant select(a) on test.t1 to CUser@LOCALHOST;
+flush privileges;
+SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
+user host
+CUser LOCALHOST
+CUser localhost
+SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
+user host db Table_name Table_priv Column_priv
+CUser LOCALHOST test t1 Select
+CUser localhost test t1 Select
+REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'LOCALHOST';
+flush privileges;
+SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
+user host
+CUser LOCALHOST
+CUser localhost
+SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
+user host db Table_name Table_priv Column_priv
+CUser localhost test t1 Select
+REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'localhost';
+flush privileges;
+SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
+user host
+CUser LOCALHOST
+CUser localhost
+SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
+user host db Table_name Table_priv Column_priv
+DROP USER CUser@localhost;
+DROP USER CUser@LOCALHOST;
+drop table t1;
+grant select on test.* to CUser2@localhost;
+grant select on test.* to CUser2@LOCALHOST;
+flush privileges;
+SELECT user, host FROM mysql.user where user = 'CUser2' order by 1,2;
+user host
+CUser2 LOCALHOST
+CUser2 localhost
+SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser2' order by 1,2;
+user host db select_priv
+CUser2 LOCALHOST test Y
+CUser2 localhost test Y
+REVOKE SELECT ON test.* FROM 'CUser2'@'LOCALHOST';
+flush privileges;
+SELECT user, host FROM mysql.user where user = 'CUser2' order by 1,2;
+user host
+CUser2 LOCALHOST
+CUser2 localhost
+SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser2' order by 1,2;
+user host db select_priv
+CUser2 localhost test Y
+REVOKE SELECT ON test.* FROM 'CUser2'@'localhost';
+flush privileges;
+SELECT user, host FROM mysql.user where user = 'CUser2' order by 1,2;
+user host
+CUser2 LOCALHOST
+CUser2 localhost
+SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser2' order by 1,2;
+user host db select_priv
+DROP USER CUser2@localhost;
+DROP USER CUser2@LOCALHOST;
diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result
index 2faf7832aca..1472fdfdd7a 100644
--- a/mysql-test/r/group_by.result
+++ b/mysql-test/r/group_by.result
@@ -1064,6 +1064,71 @@ select t1.f1,t.* from t1, t1 t group by 1;
ERROR 42000: 'test.t.f1' isn't in GROUP BY
drop table t1;
SET SQL_MODE = '';
+CREATE TABLE t1(
+id INT AUTO_INCREMENT PRIMARY KEY,
+c1 INT NOT NULL,
+c2 INT NOT NULL,
+UNIQUE KEY (c2,c1));
+INSERT INTO t1(c1,c2) VALUES (5,1), (4,1), (3,5), (2,3), (1,3);
+SELECT * FROM t1 ORDER BY c1;
+id c1 c2
+5 1 3
+4 2 3
+3 3 5
+2 4 1
+1 5 1
+SELECT * FROM t1 GROUP BY id ORDER BY c1;
+id c1 c2
+5 1 3
+4 2 3
+3 3 5
+2 4 1
+1 5 1
+SELECT * FROM t1 GROUP BY id ORDER BY id DESC;
+id c1 c2
+5 1 3
+4 2 3
+3 3 5
+2 4 1
+1 5 1
+SELECT * FROM t1 GROUP BY c2 ,c1, id ORDER BY c2, c1;
+id c1 c2
+2 4 1
+1 5 1
+5 1 3
+4 2 3
+3 3 5
+SELECT * FROM t1 GROUP BY c2, c1, id ORDER BY c2 DESC, c1;
+id c1 c2
+3 3 5
+5 1 3
+4 2 3
+2 4 1
+1 5 1
+SELECT * FROM t1 GROUP BY c2, c1, id ORDER BY c2 DESC, c1 DESC;
+id c1 c2
+3 3 5
+4 2 3
+5 1 3
+1 5 1
+2 4 1
+SELECT * FROM t1 GROUP BY c2 ORDER BY c2, c1;
+id c1 c2
+1 5 1
+4 2 3
+3 3 5
+SELECT * FROM t1 GROUP BY c2 ORDER BY c2 DESC, c1;
+id c1 c2
+3 3 5
+4 2 3
+1 5 1
+SELECT * FROM t1 GROUP BY c2 ORDER BY c2 DESC, c1 DESC;
+id c1 c2
+3 3 5
+4 2 3
+1 5 1
+DROP TABLE t1;
+End of 5.0 tests
CREATE TABLE t1 (a INT, b INT,
PRIMARY KEY (a),
KEY i2(a,b));
@@ -1093,10 +1158,156 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 144
EXPLAIN SELECT a FROM t1 IGNORE INDEX FOR GROUP BY (PRIMARY,i2) GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL PRIMARY 4 NULL 144 Using index; Using filesort
+1 SIMPLE t1 index NULL PRIMARY 4 NULL 144 Using index
EXPLAIN SELECT a FROM t1 IGNORE INDEX FOR ORDER BY (PRIMARY,i2) ORDER BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL PRIMARY 4 NULL 144 Using index; Using filesort
+1 SIMPLE t1 index NULL PRIMARY 4 NULL 144 Using index
+SELECT a FROM t1 IGNORE INDEX FOR ORDER BY (PRIMARY,i2) ORDER BY a;
+a
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
EXPLAIN SELECT a FROM t1 IGNORE INDEX FOR ORDER BY (PRIMARY)
IGNORE INDEX FOR GROUP BY (i2) GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
diff --git a/mysql-test/r/group_min_max.result b/mysql-test/r/group_min_max.result
index 02b1459afd0..103a7f5515a 100644
--- a/mysql-test/r/group_min_max.result
+++ b/mysql-test/r/group_min_max.result
@@ -2299,8 +2299,7 @@ Handler_read_next 0
FLUSH STATUS;
DELETE FROM t3 WHERE (SELECT (SELECT MAX(b) FROM t1 GROUP BY a HAVING a < 2) x
FROM t1) > 10000;
-Warnings:
-Error 1242 Subquery returns more than 1 row
+ERROR 21000: Subquery returns more than 1 row
SHOW STATUS LIKE 'handler_read__e%';
Variable_name Value
Handler_read_key 8
@@ -2327,3 +2326,49 @@ a
2
4
DROP TABLE t1;
+CREATE TABLE t1 (a INT, b INT);
+INSERT INTO t1 (a, b) VALUES (1,1), (1,2), (1,3);
+INSERT INTO t1 SELECT a + 1, b FROM t1;
+INSERT INTO t1 SELECT a + 2, b FROM t1;
+EXPLAIN
+SELECT a, MIN(b), MAX(b) FROM t1 GROUP BY a ORDER BY a DESC;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 12 Using temporary; Using filesort
+SELECT a, MIN(b), MAX(b) FROM t1 GROUP BY a ORDER BY a DESC;
+a MIN(b) MAX(b)
+4 1 3
+3 1 3
+2 1 3
+1 1 3
+CREATE INDEX break_it ON t1 (a, b);
+EXPLAIN
+SELECT a, MIN(b), MAX(b) FROM t1 GROUP BY a ORDER BY a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range NULL break_it 10 NULL 7 Using index for group-by
+SELECT a, MIN(b), MAX(b) FROM t1 GROUP BY a ORDER BY a;
+a MIN(b) MAX(b)
+1 1 3
+2 1 3
+3 1 3
+4 1 3
+EXPLAIN
+SELECT a, MIN(b), MAX(b) FROM t1 GROUP BY a ORDER BY a DESC;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range NULL break_it 10 NULL 7 Using index for group-by; Using temporary; Using filesort
+SELECT a, MIN(b), MAX(b) FROM t1 GROUP BY a ORDER BY a DESC;
+a MIN(b) MAX(b)
+4 1 3
+3 1 3
+2 1 3
+1 1 3
+EXPLAIN
+SELECT a, MIN(b), MAX(b), AVG(b) FROM t1 GROUP BY a ORDER BY a DESC;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 index NULL break_it 10 NULL 12 Using index
+SELECT a, MIN(b), MAX(b), AVG(b) FROM t1 GROUP BY a ORDER BY a DESC;
+a MIN(b) MAX(b) AVG(b)
+4 1 3 2.0000
+3 1 3 2.0000
+2 1 3 2.0000
+1 1 3 2.0000
+DROP TABLE t1;
diff --git a/mysql-test/r/handler_innodb.result b/mysql-test/r/handler_innodb.result
index 98b8922bc5f..9d269f78d10 100644
--- a/mysql-test/r/handler_innodb.result
+++ b/mysql-test/r/handler_innodb.result
@@ -535,3 +535,196 @@ handler t1_alias READ a next where inexistent > 0;
ERROR 42S22: Unknown column 'inexistent' in 'field list'
handler t1_alias close;
drop table t1;
+drop table if exists t1,t2;
+create table t1 (c1 int);
+create table t2 (c1 int);
+insert into t1 values (1);
+insert into t2 values (2);
+connection: default
+handler t1 open;
+handler t1 read first;
+c1
+1
+connection: flush
+flush tables;;
+connection: default
+handler t2 open;
+handler t2 read first;
+c1
+2
+handler t1 read next;
+c1
+1
+handler t1 close;
+handler t2 close;
+drop table t1,t2;
+drop table if exists t1,t2;
+create table t1 (c1 int);
+connection: default
+handler t1 open;
+handler t1 read first;
+c1
+connection: flush
+rename table t1 to t2;;
+connection: default
+handler t2 open;
+handler t2 read first;
+c1
+handler t1 read next;
+ERROR 42S02: Table 'test.t1' doesn't exist
+handler t1 close;
+handler t2 close;
+drop table t2;
+drop table if exists t1;
+create temporary table t1 (a int, b char(1), key a(a), key b(a,b));
+insert into t1 values (0,"a"),(1,"b"),(2,"c"),(3,"d"),(4,"e"),
+(5,"f"),(6,"g"),(7,"h"),(8,"i"),(9,"j");
+select a,b from t1;
+a b
+0 a
+1 b
+2 c
+3 d
+4 e
+5 f
+6 g
+7 h
+8 i
+9 j
+handler t1 open as a1;
+handler a1 read a first;
+a b
+0 a
+handler a1 read a next;
+a b
+1 b
+handler a1 read a next;
+a b
+2 c
+select a,b from t1;
+ERROR HY000: Can't reopen table: 'a1'
+handler a1 read a prev;
+a b
+1 b
+handler a1 read a prev;
+a b
+0 a
+handler a1 read a=(6) where b="g";
+a b
+6 g
+handler a1 close;
+select a,b from t1;
+a b
+0 a
+1 b
+2 c
+3 d
+4 e
+5 f
+6 g
+7 h
+8 i
+9 j
+handler t1 open as a2;
+handler a2 read a first;
+a b
+0 a
+handler a2 read a last;
+a b
+9 j
+handler a2 read a prev;
+a b
+8 i
+handler a2 close;
+drop table t1;
+drop table if exists t1,t2;
+create table t1 (a int);
+handler t1 open as t1_alias;
+drop table t1;
+create table t1 (a int);
+handler t1 open as t1_alias;
+flush tables;
+drop table t1;
+create table t1 (a int);
+handler t1 open as t1_alias;
+handler t1_alias close;
+drop table t1;
+create table t1 (a int);
+handler t1 open as t1_alias;
+handler t1_alias read first;
+a
+drop table t1;
+handler t1_alias read next;
+ERROR 42S02: Unknown table 't1_alias' in HANDLER
+create table t1 (a int);
+create temporary table t2 (a int, key(a));
+handler t1 open as a1;
+handler t2 open as a2;
+handler a2 read a first;
+a
+drop table t1, t2;
+handler a2 read a next;
+ERROR 42S02: Unknown table 'a2' in HANDLER
+handler a1 close;
+ERROR 42S02: Unknown table 'a1' in HANDLER
+create table t1 (a int, key(a));
+create table t2 like t1;
+handler t1 open as a1;
+handler t2 open as a2;
+handler a1 read a first;
+a
+handler a2 read a first;
+a
+alter table t1 add b int;
+handler a1 close;
+ERROR 42S02: Unknown table 'a1' in HANDLER
+handler a2 close;
+drop table t1, t2;
+create table t1 (a int, key(a));
+handler t1 open as a1;
+handler a1 read a first;
+a
+rename table t1 to t2;
+handler a1 read a first;
+ERROR 42S02: Unknown table 'a1' in HANDLER
+drop table t2;
+create table t1 (a int, key(a));
+create table t2 like t1;
+handler t1 open as a1;
+handler t2 open as a2;
+handler a1 read a first;
+a
+handler a2 read a first;
+a
+optimize table t1;
+Table Op Msg_type Msg_text
+test.t1 optimize status OK
+handler a1 close;
+ERROR 42S02: Unknown table 'a1' in HANDLER
+handler a2 close;
+drop table t1, t2;
+create table t1 (a int, b char(1), key a(a), key b(a,b));
+insert into t1 values (0,"a"),(1,"b"),(2,"c"),(3,"d"),(4,"e"),
+(5,"f"),(6,"g"),(7,"h"),(8,"i"),(9,"j");
+handler t1 open;
+handler t1 read a first;
+a b
+0 a
+handler t1 read a next;
+a b
+1 b
+flush tables;
+handler t1 read a next;
+a b
+0 a
+handler t1 read a next;
+a b
+1 b
+flush tables with read lock;
+handler t1 read a next;
+a b
+0 a
+unlock tables;
+drop table t1;
+handler t1 read a next;
+ERROR 42S02: Unknown table 't1' in HANDLER
diff --git a/mysql-test/r/handler_myisam.result b/mysql-test/r/handler_myisam.result
index 464b775b795..0b27b07c4d2 100644
--- a/mysql-test/r/handler_myisam.result
+++ b/mysql-test/r/handler_myisam.result
@@ -535,3 +535,196 @@ handler t1_alias READ a next where inexistent > 0;
ERROR 42S22: Unknown column 'inexistent' in 'field list'
handler t1_alias close;
drop table t1;
+drop table if exists t1,t2;
+create table t1 (c1 int);
+create table t2 (c1 int);
+insert into t1 values (1);
+insert into t2 values (2);
+connection: default
+handler t1 open;
+handler t1 read first;
+c1
+1
+connection: flush
+flush tables;;
+connection: default
+handler t2 open;
+handler t2 read first;
+c1
+2
+handler t1 read next;
+c1
+1
+handler t1 close;
+handler t2 close;
+drop table t1,t2;
+drop table if exists t1,t2;
+create table t1 (c1 int);
+connection: default
+handler t1 open;
+handler t1 read first;
+c1
+connection: flush
+rename table t1 to t2;;
+connection: default
+handler t2 open;
+handler t2 read first;
+c1
+handler t1 read next;
+ERROR 42S02: Table 'test.t1' doesn't exist
+handler t1 close;
+handler t2 close;
+drop table t2;
+drop table if exists t1;
+create temporary table t1 (a int, b char(1), key a(a), key b(a,b));
+insert into t1 values (0,"a"),(1,"b"),(2,"c"),(3,"d"),(4,"e"),
+(5,"f"),(6,"g"),(7,"h"),(8,"i"),(9,"j");
+select a,b from t1;
+a b
+0 a
+1 b
+2 c
+3 d
+4 e
+5 f
+6 g
+7 h
+8 i
+9 j
+handler t1 open as a1;
+handler a1 read a first;
+a b
+0 a
+handler a1 read a next;
+a b
+1 b
+handler a1 read a next;
+a b
+2 c
+select a,b from t1;
+ERROR HY000: Can't reopen table: 'a1'
+handler a1 read a prev;
+a b
+1 b
+handler a1 read a prev;
+a b
+0 a
+handler a1 read a=(6) where b="g";
+a b
+6 g
+handler a1 close;
+select a,b from t1;
+a b
+0 a
+1 b
+2 c
+3 d
+4 e
+5 f
+6 g
+7 h
+8 i
+9 j
+handler t1 open as a2;
+handler a2 read a first;
+a b
+0 a
+handler a2 read a last;
+a b
+9 j
+handler a2 read a prev;
+a b
+8 i
+handler a2 close;
+drop table t1;
+drop table if exists t1,t2;
+create table t1 (a int);
+handler t1 open as t1_alias;
+drop table t1;
+create table t1 (a int);
+handler t1 open as t1_alias;
+flush tables;
+drop table t1;
+create table t1 (a int);
+handler t1 open as t1_alias;
+handler t1_alias close;
+drop table t1;
+create table t1 (a int);
+handler t1 open as t1_alias;
+handler t1_alias read first;
+a
+drop table t1;
+handler t1_alias read next;
+ERROR 42S02: Unknown table 't1_alias' in HANDLER
+create table t1 (a int);
+create temporary table t2 (a int, key(a));
+handler t1 open as a1;
+handler t2 open as a2;
+handler a2 read a first;
+a
+drop table t1, t2;
+handler a2 read a next;
+ERROR 42S02: Unknown table 'a2' in HANDLER
+handler a1 close;
+ERROR 42S02: Unknown table 'a1' in HANDLER
+create table t1 (a int, key(a));
+create table t2 like t1;
+handler t1 open as a1;
+handler t2 open as a2;
+handler a1 read a first;
+a
+handler a2 read a first;
+a
+alter table t1 add b int;
+handler a1 close;
+ERROR 42S02: Unknown table 'a1' in HANDLER
+handler a2 close;
+drop table t1, t2;
+create table t1 (a int, key(a));
+handler t1 open as a1;
+handler a1 read a first;
+a
+rename table t1 to t2;
+handler a1 read a first;
+ERROR 42S02: Unknown table 'a1' in HANDLER
+drop table t2;
+create table t1 (a int, key(a));
+create table t2 like t1;
+handler t1 open as a1;
+handler t2 open as a2;
+handler a1 read a first;
+a
+handler a2 read a first;
+a
+optimize table t1;
+Table Op Msg_type Msg_text
+test.t1 optimize status Table is already up to date
+handler a1 close;
+ERROR 42S02: Unknown table 'a1' in HANDLER
+handler a2 close;
+drop table t1, t2;
+create table t1 (a int, b char(1), key a(a), key b(a,b));
+insert into t1 values (0,"a"),(1,"b"),(2,"c"),(3,"d"),(4,"e"),
+(5,"f"),(6,"g"),(7,"h"),(8,"i"),(9,"j");
+handler t1 open;
+handler t1 read a first;
+a b
+0 a
+handler t1 read a next;
+a b
+1 b
+flush tables;
+handler t1 read a next;
+a b
+0 a
+handler t1 read a next;
+a b
+1 b
+flush tables with read lock;
+handler t1 read a next;
+a b
+0 a
+unlock tables;
+drop table t1;
+handler t1 read a next;
+ERROR 42S02: Unknown table 't1' in HANDLER
diff --git a/mysql-test/r/heap_btree.result b/mysql-test/r/heap_btree.result
index ab4b892170a..9db03855c01 100644
--- a/mysql-test/r/heap_btree.result
+++ b/mysql-test/r/heap_btree.result
@@ -307,6 +307,13 @@ UNIQUE USING BTREE(c1)
) ENGINE= MEMORY DEFAULT CHARSET= utf8;
INSERT INTO t1 VALUES('1'), ('2');
DROP TABLE t1;
+CREATE TABLE t1 (a INT, KEY USING BTREE(a)) ENGINE=MEMORY;
+INSERT INTO t1 VALUES(1),(2),(2);
+DELETE FROM t1 WHERE a=2;
+SELECT * FROM t1;
+a
+1
+DROP TABLE t1;
End of 4.1 tests
CREATE TABLE t1(val INT, KEY USING BTREE(val)) ENGINE=memory;
INSERT INTO t1 VALUES(0);
@@ -321,4 +328,12 @@ DROP TABLE t1;
CREATE TABLE t1 (a INT, UNIQUE USING BTREE(a)) ENGINE=MEMORY;
INSERT INTO t1 VALUES(NULL),(NULL);
DROP TABLE t1;
+create table t1(a varchar(255), b varchar(255),
+key using btree (a,b)) engine=memory;
+insert into t1 values (1, 1), (3, 3), (2, 2), (NULL, 1), (NULL, NULL), (0, 0);
+select * from t1 where a is null;
+a b
+NULL NULL
+NULL 1
+drop table t1;
End of 5.0 tests
diff --git a/mysql-test/r/index_merge_myisam.result b/mysql-test/r/index_merge_myisam.result
index 9d7d06f7f1b..1827871861e 100644
--- a/mysql-test/r/index_merge_myisam.result
+++ b/mysql-test/r/index_merge_myisam.result
@@ -342,6 +342,8 @@ create table t4 (a int);
insert into t4 values (1),(4),(3);
set @save_join_buffer_size=@@join_buffer_size;
set join_buffer_size= 4000;
+Warnings:
+Warning 1292 Truncated incorrect join_buffer_size value: '4000'
explain select max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5)
from t0 as A force index(i1,i2), t0 as B force index (i1,i2)
where (A.key1 < 500000 or A.key2 < 3)
diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result
index 885acf5c744..0cb4b10a789 100644
--- a/mysql-test/r/information_schema.result
+++ b/mysql-test/r/information_schema.result
@@ -387,10 +387,14 @@ Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_par
select * from information_schema.views where TABLE_NAME like "v%";
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION
NULL test v0 select schema_name from information_schema.schemata NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
-NULL test v1 select table_name from information_schema.tables NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
-NULL test v2 select column_name from information_schema.columns NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
-NULL test v3 select CHARACTER_SET_NAME from information_schema.character_sets NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
-NULL test v4 select COLLATION_NAME from information_schema.collations NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
+NULL test v1 select table_name from information_schema.tables
+where table_name="v1" NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
+NULL test v2 select column_name from information_schema.columns
+where table_name="v2" NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
+NULL test v3 select CHARACTER_SET_NAME from information_schema.character_sets
+where CHARACTER_SET_NAME like "latin1%" NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
+NULL test v4 select COLLATION_NAME from information_schema.collations
+where COLLATION_NAME like "latin1%" NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
drop view v0, v1, v2, v3, v4;
create table t1 (a int);
grant select,update,insert on t1 to mysqltest_1@localhost;
@@ -578,7 +582,7 @@ proc sql_data_access enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL
proc is_deterministic enum('YES','NO')
proc security_type enum('INVOKER','DEFINER')
proc param_list blob
-proc returns char(64)
+proc returns longblob
proc body longblob
proc definer char(77)
proc created timestamp
@@ -1137,11 +1141,13 @@ DROP FUNCTION func2;
select column_type, group_concat(table_schema, '.', table_name), count(*) as num
from information_schema.columns where
table_schema='information_schema' and
-(column_type = 'varchar(7)' or column_type = 'varchar(20)')
+(column_type = 'varchar(7)' or column_type = 'varchar(20)'
+ or column_type = 'varchar(27)')
group by column_type order by num;
column_type group_concat(table_schema, '.', table_name) num
+varchar(27) information_schema.COLUMNS 1
varchar(7) information_schema.ROUTINES,information_schema.VIEWS 2
-varchar(20) information_schema.COLUMNS,information_schema.FILES,information_schema.FILES,information_schema.PLUGINS,information_schema.PLUGINS,information_schema.PLUGINS 6
+varchar(20) information_schema.FILES,information_schema.FILES,information_schema.PLUGINS,information_schema.PLUGINS,information_schema.PLUGINS 5
create table t1(f1 char(1) not null, f2 char(9) not null)
default character set utf8;
select CHARACTER_MAXIMUM_LENGTH, CHARACTER_OCTET_LENGTH from
@@ -1466,6 +1472,10 @@ f7 datetime NO NULL
f8 datetime YES 2006-01-01 00:00:00
drop table t1;
End of 5.0 tests.
+show fields from information_schema.table_names;
+ERROR 42S02: Unknown table 'table_names' in information_schema
+show keys from information_schema.table_names;
+ERROR 42S02: Unknown table 'table_names' in information_schema
select * from information_schema.engines WHERE ENGINE="MyISAM";
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
MyISAM DEFAULT Default engine as of MySQL 3.23 with great performance NO NO NO
@@ -1540,4 +1550,73 @@ count(*)
select count(*) from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='' AND TABLE_NAME='nonexisting';
count(*)
0
+CREATE VIEW v1
+AS SELECT *
+FROM INFORMATION_SCHEMA.TABLES;
+SELECT VIEW_DEFINITION FROM INFORMATION_SCHEMA.VIEWS where TABLE_NAME = 'v1';
+VIEW_DEFINITION
+SELECT *
+FROM INFORMATION_SCHEMA.TABLES
+DROP VIEW v1;
+SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA
+WHERE SCHEMA_NAME ='information_schema';
+SCHEMA_NAME
+information_schema
+SELECT TABLE_COLLATION FROM INFORMATION_SCHEMA.TABLES
+WHERE TABLE_SCHEMA='mysql' and TABLE_NAME= 'db';
+TABLE_COLLATION
+utf8_bin
+select * from information_schema.columns where table_schema = NULL;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT
+select * from `information_schema`.`COLUMNS` where `TABLE_NAME` = NULL;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT
+select * from `information_schema`.`KEY_COLUMN_USAGE` where `TABLE_SCHEMA` = NULL;
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME
+select * from `information_schema`.`KEY_COLUMN_USAGE` where `TABLE_NAME` = NULL;
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME
+select * from `information_schema`.`PARTITIONS` where `TABLE_SCHEMA` = NULL;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME
+select * from `information_schema`.`PARTITIONS` where `TABLE_NAME` = NULL;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME
+select * from `information_schema`.`REFERENTIAL_CONSTRAINTS` where `CONSTRAINT_SCHEMA` = NULL;
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME UNIQUE_CONSTRAINT_CATALOG UNIQUE_CONSTRAINT_SCHEMA UNIQUE_CONSTRAINT_NAME MATCH_OPTION UPDATE_RULE DELETE_RULE TABLE_NAME REFERENCED_TABLE_NAME
+select * from `information_schema`.`REFERENTIAL_CONSTRAINTS` where `TABLE_NAME` = NULL;
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME UNIQUE_CONSTRAINT_CATALOG UNIQUE_CONSTRAINT_SCHEMA UNIQUE_CONSTRAINT_NAME MATCH_OPTION UPDATE_RULE DELETE_RULE TABLE_NAME REFERENCED_TABLE_NAME
+select * from information_schema.schemata where schema_name = NULL;
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
+select * from `information_schema`.`STATISTICS` where `TABLE_SCHEMA` = NULL;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT
+select * from `information_schema`.`STATISTICS` where `TABLE_NAME` = NULL;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT
+select * from information_schema.tables where table_schema = NULL;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT
+select * from information_schema.tables where table_catalog = NULL;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT
+select * from information_schema.tables where table_name = NULL;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT
+select * from `information_schema`.`TABLE_CONSTRAINTS` where `TABLE_SCHEMA` = NULL;
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE
+select * from `information_schema`.`TABLE_CONSTRAINTS` where `TABLE_NAME` = NULL;
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE
+select * from `information_schema`.`TRIGGERS` where `EVENT_OBJECT_SCHEMA` = NULL;
+TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
+select * from `information_schema`.`TRIGGERS` where `EVENT_OBJECT_TABLE` = NULL;
+TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
+select * from `information_schema`.`VIEWS` where `TABLE_SCHEMA` = NULL;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION
+select * from `information_schema`.`VIEWS` where `TABLE_NAME` = NULL;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION
+explain extended select 1 from information_schema.tables;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE tables ALL NULL NULL NULL NULL NULL NULL Skip_open_table; Scanned all databases
+Warnings:
+Note 1003 select 1 AS `1` from `information_schema`.`tables`
+use information_schema;
+show events;
+Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
+show events from information_schema;
+Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
+show events where Db= 'information_schema';
+Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
+use test;
End of 5.1 tests.
diff --git a/mysql-test/r/information_schema_db.result b/mysql-test/r/information_schema_db.result
index 51f7694ab68..2da4e305b01 100644
--- a/mysql-test/r/information_schema_db.result
+++ b/mysql-test/r/information_schema_db.result
@@ -141,7 +141,7 @@ Warnings:
Warning 1356 View 'testdb_1.v7' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
show fields from testdb_1.v7;
Field Type Null Key Default Extra
-f1 null YES NULL
+f1 char(4) YES NULL
Warnings:
Note 1449 There is no 'no_such_user'@'no_such_host' registered
create table t3 (f1 char(4), f2 char(4));
@@ -161,7 +161,7 @@ View Create View character_set_client collation_connection
v6 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `testdb_1`.`v6` AS select `testdb_1`.`t1`.`f1` AS `f1` from `testdb_1`.`t1` latin1 latin1_swedish_ci
show fields from testdb_1.v7;
Field Type Null Key Default Extra
-f1 null YES NULL
+f1 char(4) YES NULL
Warnings:
Note 1449 There is no 'no_such_user'@'no_such_host' registered
show create view testdb_1.v7;
@@ -189,7 +189,7 @@ show create view v4;
ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
show fields from v4;
Field Type Null Key Default Extra
-f1 null YES NULL
+f1 char(4) YES NULL
f2 char(4) YES NULL
show fields from v2;
Field Type Null Key Default Extra
diff --git a/mysql-test/r/innodb-semi-consistent.result b/mysql-test/r/innodb-semi-consistent.result
new file mode 100644
index 00000000000..f1139390f20
--- /dev/null
+++ b/mysql-test/r/innodb-semi-consistent.result
@@ -0,0 +1,37 @@
+drop table if exists t1;
+set session transaction isolation level read committed;
+create table t1(a int not null) engine=innodb DEFAULT CHARSET=latin1;
+insert into t1 values (1),(2),(3),(4),(5),(6),(7);
+set autocommit=0;
+select * from t1 where a=3 lock in share mode;
+a
+3
+set session transaction isolation level read committed;
+set autocommit=0;
+update t1 set a=10 where a=5;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+commit;
+update t1 set a=10 where a=5;
+select * from t1 where a=2 for update;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+select * from t1 where a=2 limit 1 for update;
+a
+2
+update t1 set a=11 where a=6;
+update t1 set a=12 where a=2;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+update t1 set a=13 where a=1;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+commit;
+update t1 set a=14 where a=1;
+commit;
+select * from t1;
+a
+14
+2
+3
+4
+10
+11
+7
+drop table t1;
diff --git a/mysql-test/r/innodb-ucs2.result b/mysql-test/r/innodb-ucs2.result
index a1c73c912b2..b6bff7d5f42 100644
--- a/mysql-test/r/innodb-ucs2.result
+++ b/mysql-test/r/innodb-ucs2.result
@@ -1,3 +1,4 @@
+drop table if exists t1, t2;
create table t1 (
a int, b char(10), c char(10), filler char(10), primary key(a, b(2)), unique key (a, c(2))
) character set utf8 engine = innodb;
diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result
index e7910ee9e32..0ca4ffc943e 100644
--- a/mysql-test/r/innodb.result
+++ b/mysql-test/r/innodb.result
@@ -472,43 +472,6 @@ a b
3 3
drop table t1,t2;
CREATE TABLE t1 (
-id int(11) NOT NULL auto_increment,
-ggid varchar(32) binary DEFAULT '' NOT NULL,
-email varchar(64) DEFAULT '' NOT NULL,
-passwd varchar(32) binary DEFAULT '' NOT NULL,
-PRIMARY KEY (id),
-UNIQUE ggid (ggid)
-) ENGINE=innodb;
-insert into t1 (ggid,passwd) values ('test1','xxx');
-insert into t1 (ggid,passwd) values ('test2','yyy');
-insert into t1 (ggid,passwd) values ('test2','this will fail');
-ERROR 23000: Duplicate entry 'test2' for key 'ggid'
-insert into t1 (ggid,id) values ('this will fail',1);
-ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
-select * from t1 where ggid='test1';
-id ggid email passwd
-1 test1 xxx
-select * from t1 where passwd='xxx';
-id ggid email passwd
-1 test1 xxx
-select * from t1 where id=2;
-id ggid email passwd
-2 test2 yyy
-replace into t1 (ggid,id) values ('this will work',1);
-replace into t1 (ggid,passwd) values ('test2','this will work');
-update t1 set id=100,ggid='test2' where id=1;
-ERROR 23000: Duplicate entry 'test2' for key 'ggid'
-select * from t1;
-id ggid email passwd
-1 this will work
-4 test2 this will work
-select * from t1 where id=1;
-id ggid email passwd
-1 this will work
-select * from t1 where id=999;
-id ggid email passwd
-drop table t1;
-CREATE TABLE t1 (
user_name varchar(12),
password text,
subscribed char(1),
@@ -962,7 +925,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL b 4 NULL # Using index
explain select a,b from t1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL b 4 NULL # Using index
+1 SIMPLE t1 index NULL PRIMARY 4 NULL #
explain select a,b,c from t1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL #
@@ -1086,6 +1049,19 @@ n d
1 30
2 20
drop table t1,t2;
+drop table if exists t1, t2;
+CREATE TABLE t1 (a int, PRIMARY KEY (a));
+CREATE TABLE t2 (a int, PRIMARY KEY (a)) ENGINE=InnoDB;
+create trigger trg_del_t2 after delete on t2 for each row
+insert into t1 values (1);
+insert into t1 values (1);
+insert into t2 values (1),(2);
+delete t2 from t2;
+ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
+select count(*) from t2 /* must be 2 as restored after rollback caused by the error */;
+count(*)
+2
+drop table t1, t2;
create table t1 (a int, b int) engine=innodb;
insert into t1 values(20,null);
select t2.b, ifnull(t2.b,"this is null") from t1 as t2 left join t1 as t3 on
@@ -1177,14 +1153,14 @@ UPDATE t1 set a=a+100 where b between 2 and 3 and a < 1000;
SELECT * from t1;
a b
1 1
-102 2
-103 3
4 4
5 5
6 6
7 7
8 8
9 9
+102 2
+103 3
drop table t1;
CREATE TABLE t1 (a int not null primary key, b int not null, key (b)) engine=innodb;
CREATE TABLE t2 (a int not null primary key, b int not null, key (b)) engine=innodb;
@@ -1208,7 +1184,6 @@ a b
update t1,t2 set t1.a=t1.a+100 where t1.a=101;
select * from t1;
a b
-201 1
102 2
103 3
104 4
@@ -1220,10 +1195,11 @@ a b
110 10
111 11
112 12
+201 1
update t1,t2 set t1.b=t1.b+10 where t1.b=2;
select * from t1;
a b
-201 1
+102 12
103 3
104 4
105 5
@@ -1233,34 +1209,34 @@ a b
109 9
110 10
111 11
-102 12
112 12
+201 1
update t1,t2 set t1.b=t1.b+2,t2.b=t1.b+10 where t1.b between 3 and 5 and t1.a=t2.a+100;
select * from t1;
a b
-201 1
+102 12
103 5
104 6
-106 6
105 7
+106 6
107 7
108 8
109 9
110 10
111 11
-102 12
112 12
+201 1
select * from t2;
a b
1 1
2 2
+3 13
+4 14
+5 15
6 6
7 7
8 8
9 9
-3 13
-4 14
-5 15
drop table t1,t2;
CREATE TABLE t2 ( NEXT_T BIGINT NOT NULL PRIMARY KEY) ENGINE=MyISAM;
CREATE TABLE t1 ( B_ID INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
@@ -1311,11 +1287,11 @@ insert into t1 (id) values (null),(null),(null),(null),(null);
update t1 set fk=69 where fk is null order by id limit 1;
SELECT * from t1;
id fk
+1 69
2 NULL
3 NULL
4 NULL
5 NULL
-1 69
drop table t1;
create table t1 (a int not null, b int not null, key (a));
insert into t1 values (1,1),(1,2),(1,3),(3,1),(3,2),(3,3),(3,1),(3,2),(3,3),(2,1),(2,2),(2,3);
@@ -1754,10 +1730,10 @@ Variable_name Value
Innodb_rows_deleted 70
show status like "Innodb_rows_inserted";
Variable_name Value
-Innodb_rows_inserted 1083
+Innodb_rows_inserted 1082
show status like "Innodb_rows_updated";
Variable_name Value
-Innodb_rows_updated 886
+Innodb_rows_updated 885
show status like "Innodb_row_lock_waits";
Variable_name Value
Innodb_row_lock_waits 0
@@ -1792,6 +1768,8 @@ show variables like "innodb_thread_concurrency";
Variable_name Value
innodb_thread_concurrency 8
set global innodb_thread_concurrency=1001;
+Warnings:
+Warning 1292 Truncated incorrect thread_concurrency value: '1001'
show variables like "innodb_thread_concurrency";
Variable_name Value
innodb_thread_concurrency 1000
@@ -1811,6 +1789,8 @@ show variables like "innodb_concurrency_tickets";
Variable_name Value
innodb_concurrency_tickets 1000
set global innodb_concurrency_tickets=0;
+Warnings:
+Warning 1292 Truncated incorrect concurrency_tickets value: '0'
show variables like "innodb_concurrency_tickets";
Variable_name Value
innodb_concurrency_tickets 1
@@ -2444,8 +2424,8 @@ insert into t1 (b) values (1);
replace into t1 (b) values (2), (1), (3);
select * from t1;
a b
-3 1
2 2
+3 1
4 3
truncate table t1;
insert into t1 (b) values (1);
@@ -2454,8 +2434,8 @@ replace into t1 (b) values (1);
replace into t1 (b) values (3);
select * from t1;
a b
-3 1
2 2
+3 1
4 3
drop table t1;
create table t1 (rowid int not null auto_increment, val int not null,primary
@@ -3189,3 +3169,52 @@ c25 CHAR(255), c26 CHAR(255), c27 CHAR(255), c28 CHAR(255),
c29 CHAR(255), c30 CHAR(255), c31 CHAR(255), c32 CHAR(255)
) ENGINE = InnoDB;
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. You have to change some columns to TEXT or BLOBs
+DROP TABLE IF EXISTS t1;
+Warnings:
+Note 1051 Unknown table 't1'
+CREATE TABLE t1(
+id BIGINT(20) NOT NULL AUTO_INCREMENT PRIMARY KEY
+) ENGINE=InnoDB;
+INSERT INTO t1 VALUES(-10);
+SELECT * FROM t1;
+id
+-10
+INSERT INTO t1 VALUES(NULL);
+SELECT * FROM t1;
+id
+-10
+1
+DROP TABLE t1;
+SET TX_ISOLATION='read-committed';
+SET AUTOCOMMIT=0;
+DROP TABLE IF EXISTS t1, t2;
+Warnings:
+Note 1051 Unknown table 't1'
+Note 1051 Unknown table 't2'
+CREATE TABLE t1 ( a int ) ENGINE=InnoDB;
+CREATE TABLE t2 LIKE t1;
+SELECT * FROM t2;
+a
+SET TX_ISOLATION='read-committed';
+SET AUTOCOMMIT=0;
+INSERT INTO t1 VALUES (1);
+COMMIT;
+SELECT * FROM t1 WHERE a=1;
+a
+1
+SET TX_ISOLATION='read-committed';
+SET AUTOCOMMIT=0;
+SELECT * FROM t2;
+a
+SET TX_ISOLATION='read-committed';
+SET AUTOCOMMIT=0;
+INSERT INTO t1 VALUES (2);
+COMMIT;
+SELECT * FROM t1 WHERE a=2;
+a
+2
+SELECT * FROM t1 WHERE a=2;
+a
+2
+DROP TABLE t1;
+DROP TABLE t2;
diff --git a/mysql-test/r/innodb_autoinc_lock_mode_zero.result b/mysql-test/r/innodb_autoinc_lock_mode_zero.result
new file mode 100644
index 00000000000..3d016684338
--- /dev/null
+++ b/mysql-test/r/innodb_autoinc_lock_mode_zero.result
@@ -0,0 +1,39 @@
+drop table if exists t1;
+CREATE TABLE t1 (
+id int(11) NOT NULL auto_increment,
+ggid varchar(32) binary DEFAULT '' NOT NULL,
+email varchar(64) DEFAULT '' NOT NULL,
+passwd varchar(32) binary DEFAULT '' NOT NULL,
+PRIMARY KEY (id),
+UNIQUE ggid (ggid)
+) ENGINE=innodb;
+insert into t1 (ggid,passwd) values ('test1','xxx');
+insert into t1 (ggid,passwd) values ('test2','yyy');
+insert into t1 (ggid,passwd) values ('test2','this will fail');
+ERROR 23000: Duplicate entry 'test2' for key 'ggid'
+insert into t1 (ggid,id) values ('this will fail',1);
+ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
+select * from t1 where ggid='test1';
+id ggid email passwd
+1 test1 xxx
+select * from t1 where passwd='xxx';
+id ggid email passwd
+1 test1 xxx
+select * from t1 where id=2;
+id ggid email passwd
+2 test2 yyy
+replace into t1 (ggid,id) values ('this will work',1);
+replace into t1 (ggid,passwd) values ('test2','this will work');
+update t1 set id=100,ggid='test2' where id=1;
+ERROR 23000: Duplicate entry 'test2' for key 'ggid'
+select * from t1;
+id ggid email passwd
+1 this will work
+3 test2 this will work
+select * from t1 where id=1;
+id ggid email passwd
+1 this will work
+select * from t1 where id=999;
+id ggid email passwd
+drop table t1;
+End of tests
diff --git a/mysql-test/r/innodb_gis.result b/mysql-test/r/innodb_gis.result
index 7f54a78087b..ef8bdcc5f3e 100644
--- a/mysql-test/r/innodb_gis.result
+++ b/mysql-test/r/innodb_gis.result
@@ -546,5 +546,44 @@ Overlaps(@horiz1, @point2)
0
DROP TABLE t1;
End of 5.0 tests
+CREATE TABLE t1 (p POINT);
+CREATE TABLE t2 (p POINT, INDEX(p));
+INSERT INTO t1 VALUES (POINTFROMTEXT('POINT(1 2)'));
+INSERT INTO t2 VALUES (POINTFROMTEXT('POINT(1 2)'));
+SELECT COUNT(*) FROM t1 WHERE p=POINTFROMTEXT('POINT(1 2)');
+COUNT(*)
+1
+EXPLAIN
+SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)');
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 ref p p 28 const 1 Using where
+SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)');
+COUNT(*)
+1
+INSERT INTO t1 VALUES (POINTFROMTEXT('POINT(1 2)'));
+INSERT INTO t2 VALUES (POINTFROMTEXT('POINT(1 2)'));
+EXPLAIN
+SELECT COUNT(*) FROM t1 WHERE p=POINTFROMTEXT('POINT(1 2)');
+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 COUNT(*) FROM t1 WHERE p=POINTFROMTEXT('POINT(1 2)');
+COUNT(*)
+2
+EXPLAIN
+SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)');
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 ref p p 28 const 1 Using where
+SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)');
+COUNT(*)
+2
+EXPLAIN
+SELECT COUNT(*) FROM t2 IGNORE INDEX(p) WHERE p=POINTFROMTEXT('POINT(1 2)');
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 ALL NULL NULL NULL NULL 2 Using where
+SELECT COUNT(*) FROM t2 IGNORE INDEX(p) WHERE p=POINTFROMTEXT('POINT(1 2)');
+COUNT(*)
+2
+DROP TABLE t1, t2;
+End of 5.0 tests
create table t1 (g geometry not null, spatial gk(g)) engine=innodb;
ERROR HY000: The used table type doesn't support SPATIAL indexes
diff --git a/mysql-test/r/innodb_mysql.result b/mysql-test/r/innodb_mysql.result
index 73aaa23679f..87cf1acc10c 100644
--- a/mysql-test/r/innodb_mysql.result
+++ b/mysql-test/r/innodb_mysql.result
@@ -2,6 +2,7 @@ set global innodb_support_xa=default;
set session innodb_support_xa=default;
SET SESSION STORAGE_ENGINE = InnoDB;
drop table if exists t1,t2,t3,t1m,t1i,t2m,t2i,t4;
+drop procedure if exists p1;
create table t1 (
c_id int(11) not null default '0',
org_id int(11) default null,
@@ -354,13 +355,13 @@ EXPLAIN
SELECT COUNT(*) FROM t2 LEFT JOIN t1 ON t2.fkey = t1.id
WHERE t1.name LIKE 'A%';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index PRIMARY,name name 23 NULL 3 Using where; Using index
+1 SIMPLE t1 index PRIMARY,name PRIMARY 4 NULL 3 Using where
1 SIMPLE t2 ref fkey fkey 5 test.t1.id 1 Using where; Using index
EXPLAIN
SELECT COUNT(*) FROM t2 LEFT JOIN t1 ON t2.fkey = t1.id
WHERE t1.name LIKE 'A%' OR FALSE;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 index NULL fkey 5 NULL 5 Using index
+1 SIMPLE t2 index NULL PRIMARY 4 NULL 5
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.fkey 1 Using where
DROP TABLE t1,t2;
CREATE TABLE t1 (
@@ -390,6 +391,7 @@ id select_type table type possible_keys key key_len ref rows Extra
SELECT DISTINCT t1.name, t1.dept FROM t1 WHERE t1.name='rs5';
name dept
DROP TABLE t1;
+drop table if exists t1;
show variables like 'innodb_rollback_on_timeout';
Variable_name Value
innodb_rollback_on_timeout OFF
@@ -452,6 +454,7 @@ tes 1234
drop table test;
set global query_cache_type=@save_qcache_type;
set global query_cache_size=@save_qcache_size;
+drop table if exists t1;
show variables like 'innodb_rollback_on_timeout';
Variable_name Value
innodb_rollback_on_timeout OFF
@@ -674,6 +677,8 @@ INSERT INTO t1(b,c) SELECT b,c FROM t2;
UPDATE t2 SET c='2007-01-03';
INSERT INTO t1(b,c) SELECT b,c FROM t2;
set @@sort_buffer_size=8192;
+Warnings:
+Warning 1292 Truncated incorrect sort_buffer_size value: '8192'
SELECT COUNT(*) FROM t1;
COUNT(*)
3072
@@ -776,6 +781,7 @@ EXPLAIN SELECT SQL_BIG_RESULT b, SUM(c) FROM t1 GROUP BY b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 128 Using filesort
DROP TABLE t1;
+drop table if exists t1;
show variables like 'innodb_rollback_on_timeout';
Variable_name Value
innodb_rollback_on_timeout OFF
@@ -1262,11 +1268,11 @@ select_type SIMPLE
table t1
type index
possible_keys NULL
-key b
-key_len 5
+key PRIMARY
+key_len 4
ref NULL
rows 3
-Extra Using index; Using filesort
+Extra Using filesort
SELECT * FROM t1 ORDER BY b ASC, a DESC;
a b
1 1
@@ -1278,17 +1284,78 @@ select_type SIMPLE
table t1
type index
possible_keys NULL
-key b
-key_len 5
+key PRIMARY
+key_len 4
ref NULL
rows 3
-Extra Using index; Using filesort
+Extra Using filesort
SELECT * FROM t1 ORDER BY b DESC, a ASC;
a b
2 2
3 2
1 1
DROP TABLE t1;
+
+#
+# Bug#27610: ALTER TABLE ROW_FORMAT=... does not rebuild the table.
+#
+
+# - prepare;
+
+DROP TABLE IF EXISTS t1;
+
+CREATE TABLE t1(c INT)
+ENGINE = InnoDB
+ROW_FORMAT = COMPACT;
+
+# - initial check;
+
+SELECT table_schema, table_name, row_format
+FROM INFORMATION_SCHEMA.TABLES
+WHERE table_schema = DATABASE() AND table_name = 't1';
+table_schema table_name row_format
+test t1 Compact
+
+# - change ROW_FORMAT and check;
+
+ALTER TABLE t1 ROW_FORMAT = REDUNDANT;
+
+SELECT table_schema, table_name, row_format
+FROM INFORMATION_SCHEMA.TABLES
+WHERE table_schema = DATABASE() AND table_name = 't1';
+table_schema table_name row_format
+test t1 Redundant
+
+# - that's it, cleanup.
+
+DROP TABLE t1;
+create table t1(a char(10) not null, unique key aa(a(1)),
+b char(4) not null, unique key bb(b(4))) engine=innodb;
+desc t1;
+Field Type Null Key Default Extra
+a char(10) NO UNI NULL
+b char(4) NO PRI NULL
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` char(10) NOT NULL,
+ `b` char(4) NOT NULL,
+ UNIQUE KEY `bb` (`b`),
+ UNIQUE KEY `aa` (`a`(1))
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+drop table t1;
+CREATE TABLE t1 (id int, type char(6), d int, INDEX idx(id,d)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES
+(191, 'member', 1), (NULL, 'member', 3), (NULL, 'member', 4), (201, 'member', 2);
+EXPLAIN SELECT * FROM t1 WHERE id=191 OR id IS NULL ORDER BY d;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL idx NULL NULL NULL 3 Using where; Using filesort
+SELECT * FROM t1 WHERE id=191 OR id IS NULL ORDER BY d;
+id type d
+191 member 1
+NULL member 3
+NULL member 4
+DROP TABLE t1;
End of 5.0 tests
CREATE TABLE `t2` (
`k` int(11) NOT NULL auto_increment,
@@ -1421,4 +1488,125 @@ select if(@a=@b,"ok","wrong");
if(@a=@b,"ok","wrong")
ok
drop table t1;
+SET SESSION AUTOCOMMIT = 0;
+SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
+# Switch to connection con1
+CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(256))
+ENGINE = InnoDB;
+INSERT INTO t1 VALUES (1,2);
+# 1. test for locking:
+BEGIN;
+UPDATE t1 SET b = 12 WHERE a = 1;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+a b
+1 12
+# Switch to connection con2
+UPDATE t1 SET b = 21 WHERE a = 1;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+# Switch to connection con1
+SELECT * FROM t1;
+a b
+1 12
+ROLLBACK;
+# 2. test for serialized update:
+CREATE TABLE t2 (a INT);
+TRUNCATE t1;
+INSERT INTO t1 VALUES (1,'init');
+CREATE PROCEDURE p1()
+BEGIN
+UPDATE t1 SET b = CONCAT(b, '+con2') WHERE a = 1;
+INSERT INTO t2 VALUES ();
+END|
+BEGIN;
+UPDATE t1 SET b = CONCAT(b, '+con1') WHERE a = 1;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+a b
+1 init+con1
+# Switch to connection con2
+CALL p1;;
+# Switch to connection con1
+SELECT * FROM t1;
+a b
+1 init+con1
+COMMIT;
+SELECT * FROM t1;
+a b
+1 init+con1
+# Switch to connection con2
+SELECT * FROM t1;
+a b
+1 init+con1+con2
+# Switch to connection con1
+# 3. test for updated key column:
+TRUNCATE t1;
+TRUNCATE t2;
+INSERT INTO t1 VALUES (1,'init');
+BEGIN;
+UPDATE t1 SET a = 2, b = CONCAT(b, '+con1') WHERE a = 1;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+a b
+2 init+con1
+# Switch to connection con2
+CALL p1;;
+# Switch to connection con1
+SELECT * FROM t1;
+a b
+2 init+con1
+COMMIT;
+SELECT * FROM t1;
+a b
+2 init+con1
+# Switch to connection con2
+SELECT * FROM t1;
+a b
+2 init+con1
+DROP PROCEDURE p1;
+DROP TABLE t1, t2;
+CREATE TABLE t1 (a INT NOT NULL, b INT NOT NULL, PRIMARY KEY (a,b)) engine=innodb;
+CREATE TABLE t2 (c INT NOT NULL, d INT NOT NULL, PRIMARY KEY (c,d),
+CONSTRAINT c2 FOREIGN KEY f2 (c) REFERENCES t1 (a,b) ON UPDATE NO ACTION) engine=innodb;
+ERROR 42000: Incorrect foreign key definition for 'f2': Key reference and table reference don't match
+CREATE TABLE t2 (c INT NOT NULL, d INT NOT NULL, PRIMARY KEY (c,d),
+CONSTRAINT c2 FOREIGN KEY (c) REFERENCES t1 (a,b) ON UPDATE NO ACTION) engine=innodb;
+ERROR 42000: Incorrect foreign key definition for 'c2': Key reference and table reference don't match
+CREATE TABLE t2 (c INT NOT NULL, d INT NOT NULL, PRIMARY KEY (c,d),
+CONSTRAINT c1 FOREIGN KEY c2 (c) REFERENCES t1 (a) ON DELETE NO ACTION,
+CONSTRAINT c2 FOREIGN KEY (c) REFERENCES t1 (a) ON UPDATE NO ACTION) engine=innodb;
+ALTER TABLE t2 DROP FOREIGN KEY c2;
+DROP TABLE t2;
+CREATE TABLE t2 (c INT NOT NULL, d INT NOT NULL, PRIMARY KEY (c,d),
+FOREIGN KEY (c) REFERENCES t1 (a,k) ON UPDATE NO ACTION) engine=innodb;
+ERROR 42000: Incorrect foreign key definition for 'foreign key without name': Key reference and table reference don't match
+CREATE TABLE t2 (c INT NOT NULL, d INT NOT NULL, PRIMARY KEY (c,d),
+FOREIGN KEY f1 (c) REFERENCES t1 (a,k) ON UPDATE NO ACTION) engine=innodb;
+ERROR 42000: Incorrect foreign key definition for 'f1': Key reference and table reference don't match
+CREATE TABLE t2 (c INT NOT NULL, d INT NOT NULL, PRIMARY KEY (c,d),
+CONSTRAINT c1 FOREIGN KEY f1 (c) REFERENCES t1 (a) ON DELETE NO ACTION,
+CONSTRAINT c2 FOREIGN KEY (c) REFERENCES t1 (a) ON UPDATE NO ACTION,
+FOREIGN KEY f3 (c) REFERENCES t1 (a) ON UPDATE NO ACTION,
+FOREIGN KEY (c) REFERENCES t1 (a) ON UPDATE NO ACTION) engine=innodb;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c` int(11) NOT NULL,
+ `d` int(11) NOT NULL,
+ PRIMARY KEY (`c`,`d`),
+ CONSTRAINT `c1` FOREIGN KEY (`c`) REFERENCES `t1` (`a`) ON DELETE NO ACTION,
+ CONSTRAINT `c2` FOREIGN KEY (`c`) REFERENCES `t1` (`a`) ON UPDATE NO ACTION,
+ CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`c`) REFERENCES `t1` (`a`) ON UPDATE NO ACTION,
+ CONSTRAINT `t2_ibfk_2` FOREIGN KEY (`c`) REFERENCES `t1` (`a`) ON UPDATE NO ACTION
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+DROP TABLE t2;
+DROP TABLE t1;
+create table t1 (a int auto_increment primary key) engine=innodb;
+alter table t1 order by a;
+Warnings:
+Warning 1105 ORDER BY ignored as there is a user-defined clustered index in the table 't1'
+drop table t1;
End of 5.1 tests
diff --git a/mysql-test/r/innodb_timeout_rollback.result b/mysql-test/r/innodb_timeout_rollback.result
index b25a2bbd815..e2da6ba8af7 100644
--- a/mysql-test/r/innodb_timeout_rollback.result
+++ b/mysql-test/r/innodb_timeout_rollback.result
@@ -1,3 +1,4 @@
+drop table if exists t1;
show variables like 'innodb_rollback_on_timeout';
Variable_name Value
innodb_rollback_on_timeout ON
diff --git a/mysql-test/r/insert.result b/mysql-test/r/insert.result
index 8dbba4d454a..919aff4bfb7 100644
--- a/mysql-test/r/insert.result
+++ b/mysql-test/r/insert.result
@@ -499,4 +499,138 @@ i
2
2
DROP TABLE t1, t2;
+CREATE TABLE t1 (
+a char(20) NOT NULL,
+b char(7) DEFAULT NULL,
+c char(4) DEFAULT NULL
+);
+INSERT INTO t1(a,b,c) VALUES (9.999999e+0, 9.999999e+0, 9.999e+0);
+INSERT INTO t1(a,b,c) VALUES (1.225e-05, 1.225e-05, 1.225e-05);
+Warnings:
+Warning 1265 Data truncated for column 'c' at row 1
+INSERT INTO t1(a,b) VALUES (1.225e-04, 1.225e-04);
+INSERT INTO t1(a,b) VALUES (1.225e-01, 1.225e-01);
+INSERT INTO t1(a,b) VALUES (1.225877e-01, 1.225877e-01);
+INSERT INTO t1(a,b) VALUES (1.225e+01, 1.225e+01);
+INSERT INTO t1(a,b,c) VALUES (1.225e+01, 1.225e+01, 1.225e+01);
+INSERT INTO t1(a,b) VALUES (1.225e+05, 1.225e+05);
+INSERT INTO t1(a,b) VALUES (1.225e+10, 1.225e+10);
+INSERT INTO t1(a,b) VALUES (1.225e+15, 1.225e+15);
+INSERT INTO t1(a,b) VALUES (5000000e+0, 5000000e+0);
+INSERT INTO t1(a,b) VALUES (1.25e+78, 1.25e+78);
+INSERT INTO t1(a,b) VALUES (1.25e-94, 1.25e-94);
+INSERT INTO t1(a,b) VALUES (1.25e+203, 1.25e+203);
+INSERT INTO t1(a,b) VALUES (1.25e-175, 1.25e-175);
+INSERT INTO t1(a,c) VALUES (1.225e+0, 1.225e+0);
+INSERT INTO t1(a,c) VALUES (1.37e+0, 1.37e+0);
+INSERT INTO t1(a,c) VALUES (-1.37e+0, -1.37e+0);
+Warnings:
+Warning 1265 Data truncated for column 'c' at row 1
+INSERT INTO t1(a,c) VALUES (1.87e-3, 1.87e-3);
+Warnings:
+Warning 1265 Data truncated for column 'c' at row 1
+INSERT INTO t1(a,c) VALUES (-1.87e-2, -1.87e-2);
+Warnings:
+Warning 1265 Data truncated for column 'c' at row 1
+INSERT INTO t1(a,c) VALUES (5000e+0, 5000e+0);
+INSERT INTO t1(a,c) VALUES (-5000e+0, -5000e+0);
+Warnings:
+Warning 1265 Data truncated for column 'c' at row 1
+SELECT * FROM t1;
+a b c
+9.999999 10 10
+1.225e-05 1.2e-05 1e-0
+0.0001225 0.00012 NULL
+0.1225 0.1225 NULL
+0.1225877 0.12259 NULL
+12.25 12.25 NULL
+12.25 12.25 12.2
+122500 122500 NULL
+12250000000 1.2e+10 NULL
+1.225e+15 1.2e+15 NULL
+5000000 5000000 NULL
+1.25e+78 1.2e+78 NULL
+1.25e-94 1.2e-94 NULL
+1.25e+203 1e+203 NULL
+1.25e-175 1e-175 NULL
+1.225 NULL 1.23
+1.37 NULL 1.37
+-1.37 NULL -1.3
+0.00187 NULL 0.00
+-0.0187 NULL -0.0
+5000 NULL 5000
+-5000 NULL -500
+DROP TABLE t1;
+CREATE TABLE t1 (
+a char(20) NOT NULL,
+b char(7) DEFAULT NULL,
+c char(5)
+);
+INSERT INTO t1(a,b,c) VALUES (9.999999e+0, 9.999999e+0, 9.999e+0);
+INSERT INTO t1(a,b,c) VALUES (1.225e-05, 1.225e-05, 1.225e-05);
+INSERT INTO t1(a,b) VALUES (1.225e-04, 1.225e-04);
+INSERT INTO t1(a,b) VALUES (1.225e-01, 1.225e-01);
+INSERT INTO t1(a,b) VALUES (1.225877e-01, 1.225877e-01);
+INSERT INTO t1(a,b) VALUES (1.225e+01, 1.225e+01);
+INSERT INTO t1(a,b,c) VALUES (1.225e+01, 1.225e+01, 1.225e+01);
+INSERT INTO t1(a,b) VALUES (1.225e+05, 1.225e+05);
+INSERT INTO t1(a,b) VALUES (1.225e+10, 1.225e+10);
+INSERT INTO t1(a,b) VALUES (1.225e+15, 1.225e+15);
+INSERT INTO t1(a,b) VALUES (5000000e+0, 5000000e+0);
+INSERT INTO t1(a,b) VALUES (1.25e+78, 1.25e+78);
+INSERT INTO t1(a,b) VALUES (1.25e-94, 1.25e-94);
+INSERT INTO t1(a,b) VALUES (1.25e+203, 1.25e+203);
+INSERT INTO t1(a,b) VALUES (1.25e-175, 1.25e-175);
+INSERT INTO t1(a,c) VALUES (1.225e+0, 1.225e+0);
+INSERT INTO t1(a,c) VALUES (1.37e+0, 1.37e+0);
+INSERT INTO t1(a,c) VALUES (-1.37e+0, -1.37e+0);
+INSERT INTO t1(a,c) VALUES (1.87e-3, 1.87e-3);
+INSERT INTO t1(a,c) VALUES (-1.87e-2, -1.87e-2);
+Warnings:
+Warning 1265 Data truncated for column 'c' at row 1
+INSERT INTO t1(a,c) VALUES (5000e+0, 5000e+0);
+INSERT INTO t1(a,c) VALUES (-5000e+0, -5000e+0);
+SELECT * FROM t1;
+a b c
+9.999999 10 9.999
+1.225e-05 1.2e-05 1e-05
+0.0001225 0.00012 NULL
+0.1225 0.1225 NULL
+0.1225877 0.12259 NULL
+12.25 12.25 NULL
+12.25 12.25 12.25
+122500 122500 NULL
+12250000000 1.2e+10 NULL
+1.225e+15 1.2e+15 NULL
+5000000 5000000 NULL
+1.25e+78 1.2e+78 NULL
+1.25e-94 1.2e-94 NULL
+1.25e+203 1e+203 NULL
+1.25e-175 1e-175 NULL
+1.225 NULL 1.225
+1.37 NULL 1.37
+-1.37 NULL -1.37
+0.00187 NULL 0.002
+-0.0187 NULL -0.01
+5000 NULL 5000
+-5000 NULL -5000
+DROP TABLE t1;
+CREATE TABLE t (a CHAR(10),b INT);
+INSERT INTO t VALUES (),(),();
+INSERT INTO t(a) SELECT rand() FROM t;
+DROP TABLE t;
+CREATE TABLE t1 (c1 INT NOT NULL);
+INSERT INTO t1 VALUES(4188.32999999999992724042385816574096679687500),
+('4188.32999999999992724042385816574096679687500'), (4188);
+SELECT * FROM t1;
+c1
+4188
+4188
+4188
+CREATE TABLE t2 (c1 BIGINT);
+INSERT INTO t2 VALUES('15449237462.0000000000');
+SELECT * FROM t2;
+c1
+15449237462
+DROP TABLE t1, t2;
End of 5.0 tests.
diff --git a/mysql-test/r/insert_select.result b/mysql-test/r/insert_select.result
index 2604e4bf648..780e91ea73f 100644
--- a/mysql-test/r/insert_select.result
+++ b/mysql-test/r/insert_select.result
@@ -816,3 +816,15 @@ id prev_id join_id
3 2 0
4 3 0
DROP TABLE t1,t2;
+#
+# Bug#30384: Having SQL_BUFFER_RESULT option in the
+# CREATE .. KEY(..) .. SELECT led to creating corrupted index.
+#
+create table t1(f1 int);
+insert into t1 values(1),(2),(3);
+create table t2 (key(f1)) engine=myisam select sql_buffer_result f1 from t1;
+check table t2 extended;
+Table Op Msg_type Msg_text
+test.t2 check status OK
+drop table t1,t2;
+##################################################################
diff --git a/mysql-test/r/join.result b/mysql-test/r/join.result
index fcb141a3510..9b799fccf06 100644
--- a/mysql-test/r/join.result
+++ b/mysql-test/r/join.result
@@ -897,4 +897,168 @@ select '^^: The above should be ~= 20 + cost(select * from t1). Value less than
Z
^^: The above should be ~= 20 + cost(select * from t1). Value less than 20 is an error
drop table t1, t2;
+CREATE TABLE t1 (a INT PRIMARY KEY, b INT);
+CREATE TABLE t2 (c INT PRIMARY KEY, d INT);
+INSERT INTO t1 VALUES(1,NULL),(2,NULL),(3,NULL),(4,NULL);
+INSERT INTO t1 SELECT a + 4, b FROM t1;
+INSERT INTO t1 SELECT a + 8, b FROM t1;
+INSERT INTO t1 SELECT a + 16, b FROM t1;
+INSERT INTO t1 SELECT a + 32, b FROM t1;
+INSERT INTO t1 SELECT a + 64, b FROM t1;
+INSERT INTO t2 SELECT a, b FROM t1;
+EXPLAIN SELECT * FROM t1 JOIN t2 ON b=c ORDER BY a LIMIT 2;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 index NULL PRIMARY 4 NULL 2
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.b 1
+EXPLAIN SELECT * FROM t1 JOIN t2 ON a=c ORDER BY a LIMIT 2;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 index PRIMARY PRIMARY 4 NULL 2
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.a 1
+SELECT * FROM t1 JOIN t2 ON b=c ORDER BY a LIMIT 2;
+a b c d
+SELECT * FROM t1 JOIN t2 ON a=c ORDER BY a LIMIT 2;
+a b c d
+1 NULL 1 NULL
+2 NULL 2 NULL
+EXPLAIN SELECT * FROM t1 JOIN t2 ON b=c ORDER BY a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 128 Using filesort
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.b 1
+EXPLAIN SELECT * FROM t1 JOIN t2 ON a=c ORDER BY a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 128 Using filesort
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.a 1
+SELECT * FROM t1 JOIN t2 ON b=c ORDER BY a;
+a b c d
+SELECT * FROM t1 JOIN t2 ON a=c ORDER BY a;
+a b c d
+1 NULL 1 NULL
+2 NULL 2 NULL
+3 NULL 3 NULL
+4 NULL 4 NULL
+5 NULL 5 NULL
+6 NULL 6 NULL
+7 NULL 7 NULL
+8 NULL 8 NULL
+9 NULL 9 NULL
+10 NULL 10 NULL
+11 NULL 11 NULL
+12 NULL 12 NULL
+13 NULL 13 NULL
+14 NULL 14 NULL
+15 NULL 15 NULL
+16 NULL 16 NULL
+17 NULL 17 NULL
+18 NULL 18 NULL
+19 NULL 19 NULL
+20 NULL 20 NULL
+21 NULL 21 NULL
+22 NULL 22 NULL
+23 NULL 23 NULL
+24 NULL 24 NULL
+25 NULL 25 NULL
+26 NULL 26 NULL
+27 NULL 27 NULL
+28 NULL 28 NULL
+29 NULL 29 NULL
+30 NULL 30 NULL
+31 NULL 31 NULL
+32 NULL 32 NULL
+33 NULL 33 NULL
+34 NULL 34 NULL
+35 NULL 35 NULL
+36 NULL 36 NULL
+37 NULL 37 NULL
+38 NULL 38 NULL
+39 NULL 39 NULL
+40 NULL 40 NULL
+41 NULL 41 NULL
+42 NULL 42 NULL
+43 NULL 43 NULL
+44 NULL 44 NULL
+45 NULL 45 NULL
+46 NULL 46 NULL
+47 NULL 47 NULL
+48 NULL 48 NULL
+49 NULL 49 NULL
+50 NULL 50 NULL
+51 NULL 51 NULL
+52 NULL 52 NULL
+53 NULL 53 NULL
+54 NULL 54 NULL
+55 NULL 55 NULL
+56 NULL 56 NULL
+57 NULL 57 NULL
+58 NULL 58 NULL
+59 NULL 59 NULL
+60 NULL 60 NULL
+61 NULL 61 NULL
+62 NULL 62 NULL
+63 NULL 63 NULL
+64 NULL 64 NULL
+65 NULL 65 NULL
+66 NULL 66 NULL
+67 NULL 67 NULL
+68 NULL 68 NULL
+69 NULL 69 NULL
+70 NULL 70 NULL
+71 NULL 71 NULL
+72 NULL 72 NULL
+73 NULL 73 NULL
+74 NULL 74 NULL
+75 NULL 75 NULL
+76 NULL 76 NULL
+77 NULL 77 NULL
+78 NULL 78 NULL
+79 NULL 79 NULL
+80 NULL 80 NULL
+81 NULL 81 NULL
+82 NULL 82 NULL
+83 NULL 83 NULL
+84 NULL 84 NULL
+85 NULL 85 NULL
+86 NULL 86 NULL
+87 NULL 87 NULL
+88 NULL 88 NULL
+89 NULL 89 NULL
+90 NULL 90 NULL
+91 NULL 91 NULL
+92 NULL 92 NULL
+93 NULL 93 NULL
+94 NULL 94 NULL
+95 NULL 95 NULL
+96 NULL 96 NULL
+97 NULL 97 NULL
+98 NULL 98 NULL
+99 NULL 99 NULL
+100 NULL 100 NULL
+101 NULL 101 NULL
+102 NULL 102 NULL
+103 NULL 103 NULL
+104 NULL 104 NULL
+105 NULL 105 NULL
+106 NULL 106 NULL
+107 NULL 107 NULL
+108 NULL 108 NULL
+109 NULL 109 NULL
+110 NULL 110 NULL
+111 NULL 111 NULL
+112 NULL 112 NULL
+113 NULL 113 NULL
+114 NULL 114 NULL
+115 NULL 115 NULL
+116 NULL 116 NULL
+117 NULL 117 NULL
+118 NULL 118 NULL
+119 NULL 119 NULL
+120 NULL 120 NULL
+121 NULL 121 NULL
+122 NULL 122 NULL
+123 NULL 123 NULL
+124 NULL 124 NULL
+125 NULL 125 NULL
+126 NULL 126 NULL
+127 NULL 127 NULL
+128 NULL 128 NULL
+DROP TABLE IF EXISTS t1,t2;
End of 5.0 tests.
diff --git a/mysql-test/r/join_outer_innodb.result b/mysql-test/r/join_outer_innodb.result
index e8a2d6f668b..24a11b12b03 100644
--- a/mysql-test/r/join_outer_innodb.result
+++ b/mysql-test/r/join_outer_innodb.result
@@ -8,12 +8,12 @@ EXPLAIN
SELECT COUNT(*) FROM t2 LEFT JOIN t1 ON t2.fkey = t1.id
WHERE t1.name LIKE 'A%';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index PRIMARY,name name 23 NULL 3 Using where; Using index
+1 SIMPLE t1 index PRIMARY,name PRIMARY 4 NULL 3 Using where
1 SIMPLE t2 ref fkey fkey 5 test.t1.id 1 Using where; Using index
EXPLAIN
SELECT COUNT(*) FROM t2 LEFT JOIN t1 ON t2.fkey = t1.id
WHERE t1.name LIKE 'A%' OR FALSE;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 index NULL fkey 5 NULL 5 Using index
+1 SIMPLE t2 index NULL PRIMARY 4 NULL 5
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.fkey 1 Using where
DROP TABLE t1,t2;
diff --git a/mysql-test/r/key.result b/mysql-test/r/key.result
index a2bed75a709..fcc09a0244d 100644
--- a/mysql-test/r/key.result
+++ b/mysql-test/r/key.result
@@ -530,3 +530,77 @@ ORDER BY c.b, c.d
a b c d e f g h i j a b c d
2 2 1 2004-11-30 12:00:00 1 0 0 0 0 0 2 3388000 -553000 NULL
DROP TABLE t1, t2;
+create table t1(a int not null, key aa(a),
+b char(10) not null, unique key bb(b(1)),
+c char(4) not null, unique key cc(c));
+desc t1;
+Field Type Null Key Default Extra
+a int(11) NO MUL NULL
+b char(10) NO UNI NULL
+c char(4) NO PRI NULL
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) NOT NULL,
+ `b` char(10) NOT NULL,
+ `c` char(4) NOT NULL,
+ UNIQUE KEY `cc` (`c`),
+ UNIQUE KEY `bb` (`b`(1)),
+ KEY `aa` (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t1;
+create table t1(a int not null, key aa(a),
+b char(10) not null, unique key bb(b(1)),
+c char(4) not null);
+desc t1;
+Field Type Null Key Default Extra
+a int(11) NO MUL NULL
+b char(10) NO UNI NULL
+c char(4) NO NULL
+alter table t1 add unique key cc(c);
+desc t1;
+Field Type Null Key Default Extra
+a int(11) NO MUL NULL
+b char(10) NO UNI NULL
+c char(4) NO PRI NULL
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) NOT NULL,
+ `b` char(10) NOT NULL,
+ `c` char(4) NOT NULL,
+ UNIQUE KEY `cc` (`c`),
+ UNIQUE KEY `bb` (`b`(1)),
+ KEY `aa` (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t1;
+End of 5.0 tests
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 (a INT PRIMARY KEY AUTO_INCREMENT);
+INSERT INTO t1 VALUES (), (), ();
+SELECT 1 AS c1
+FROM t1
+ORDER BY (
+SELECT 1 AS c2
+FROM t1
+GROUP BY GREATEST(LAST_INSERT_ID(), t1.a) ASC
+LIMIT 1);
+c1
+1
+1
+1
+DROP TABLE t1;
+CREATE TABLE t1 (a INT, b INT, INDEX (a,b));
+INSERT INTO t1 (a, b)
+VALUES
+(1,1), (1,2), (1,3), (1,4), (1,5),
+(2,2), (2,3), (2,1), (3,1), (4,1), (4,2), (4,3), (4,4), (4,5), (4,6);
+EXPLAIN SELECT 1 FROM t1 AS t1_outer WHERE
+(SELECT max(b) FROM t1 GROUP BY a HAVING a < 2) > 12;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
+2 SUBQUERY t1 range NULL a 5 NULL 8 Using index for group-by
+SELECT 1 as RES FROM t1 AS t1_outer WHERE
+(SELECT max(b) FROM t1 GROUP BY a HAVING a < 2) > 12;
+RES
+DROP TABLE t1;
diff --git a/mysql-test/r/key_cache.result b/mysql-test/r/key_cache.result
index 08d8059f61b..9ada5dc0784 100644
--- a/mysql-test/r/key_cache.result
+++ b/mysql-test/r/key_cache.result
@@ -276,6 +276,8 @@ Variable_name Value
Key_blocks_unused KEY_BLOCKS_UNUSED
set global keycache2.key_buffer_size=0;
set global keycache3.key_buffer_size=100;
+Warnings:
+Warning 1292 Truncated incorrect key_buffer_size value: '100'
set global keycache3.key_buffer_size=0;
create table t1 (mytext text, FULLTEXT (mytext));
insert t1 values ('aaabbb');
diff --git a/mysql-test/r/kill.result b/mysql-test/r/kill.result
index a08be429a83..3ea5bbd20bc 100644
--- a/mysql-test/r/kill.result
+++ b/mysql-test/r/kill.result
@@ -125,3 +125,14 @@ drop function bug27563;
drop procedure proc27563;
PREPARE stmt FROM 'EXPLAIN SELECT * FROM t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40 WHERE a1=a2 AND a2=a3 AND a3=a4 AND a4=a5 AND a5=a6 AND a6=a7 AND a7=a8 AND a8=a9 AND a9=a10 AND a10=a11 AND a11=a12 AND a12=a13 AND a13=a14 AND a14=a15 AND a15=a16 AND a16=a17 AND a17=a18 AND a18=a19 AND a19=a20 AND a20=a21 AND a21=a22 AND a22=a23 AND a23=a24 AND a24=a25 AND a25=a26 AND a26=a27 AND a27=a28 AND a28=a29 AND a29=a30 AND a30=a31 AND a31=a32 AND a32=a33 AND a33=a34 AND a34=a35 AND a35=a36 AND a36=a37 AND a37=a38 AND a38=a39 AND a39=a40 ';
EXECUTE stmt;
+#
+# Bug#19723: kill of active connection yields different error code
+# depending on platform.
+#
+
+# Connection: con2.
+KILL CONNECTION_ID();
+# CR_SERVER_LOST, CR_SERVER_GONE_ERROR, depending on the timing
+# of close of the connection socket
+SELECT 1;
+Got one of the listed errors
diff --git a/mysql-test/r/log_state.result b/mysql-test/r/log_state.result
index 3a3ef584ce3..8ecfe3b2094 100644
--- a/mysql-test/r/log_state.result
+++ b/mysql-test/r/log_state.result
@@ -175,3 +175,78 @@ SET GLOBAL slow_query_log = ON;
SET GLOBAL READ_ONLY = OFF;
SET GLOBAL general_log = @old_general_log_state;
SET GLOBAL slow_query_log = @old_slow_log_state;
+SET @old_general_log_state = @@global.general_log;
+SET @old_slow_log_state = @@global.slow_query_log;
+SHOW VARIABLES LIKE 'general_log';
+Variable_name Value
+general_log ON
+SHOW VARIABLES LIKE 'log';
+Variable_name Value
+log ON
+SELECT @@general_log, @@log;
+@@general_log @@log
+1 1
+SET GLOBAL log = 0;
+SHOW VARIABLES LIKE 'general_log';
+Variable_name Value
+general_log OFF
+SHOW VARIABLES LIKE 'log';
+Variable_name Value
+log OFF
+SELECT @@general_log, @@log;
+@@general_log @@log
+0 0
+SET GLOBAL general_log = 1;
+SHOW VARIABLES LIKE 'general_log';
+Variable_name Value
+general_log ON
+SHOW VARIABLES LIKE 'log';
+Variable_name Value
+log ON
+SELECT @@general_log, @@log;
+@@general_log @@log
+1 1
+SHOW VARIABLES LIKE 'slow_query_log';
+Variable_name Value
+slow_query_log OFF
+SHOW VARIABLES LIKE 'log_slow_queries';
+Variable_name Value
+log_slow_queries OFF
+SELECT @@slow_query_log, @@log_slow_queries;
+@@slow_query_log @@log_slow_queries
+0 0
+SET GLOBAL log_slow_queries = 0;
+SHOW VARIABLES LIKE 'slow_query_log';
+Variable_name Value
+slow_query_log OFF
+SHOW VARIABLES LIKE 'log_slow_queries';
+Variable_name Value
+log_slow_queries OFF
+SELECT @@slow_query_log, @@log_slow_queries;
+@@slow_query_log @@log_slow_queries
+0 0
+SET GLOBAL slow_query_log = 1;
+SHOW VARIABLES LIKE 'slow_query_log';
+Variable_name Value
+slow_query_log ON
+SHOW VARIABLES LIKE 'log_slow_queries';
+Variable_name Value
+log_slow_queries ON
+SELECT @@slow_query_log, @@log_slow_queries;
+@@slow_query_log @@log_slow_queries
+1 1
+SET GLOBAL general_log = @old_general_log_state;
+SET GLOBAL slow_query_log = @old_slow_log_state;
+set @old_general_log_file= @@global.general_log_file;
+set @old_slow_query_log_file= @@global.slow_query_log_file;
+set global general_log_file= concat('/not exiting path/log.maste', 'r');
+ERROR 42000: Variable 'general_log_file' can't be set to the value of '/not exiting path/log.master'
+set global general_log_file= NULL;
+ERROR 42000: Variable 'general_log_file' can't be set to the value of 'NULL'
+set global slow_query_log_file= concat('/not exiting path/log.maste', 'r');
+ERROR 42000: Variable 'slow_query_log_file' can't be set to the value of '/not exiting path/log.master'
+set global slow_query_log_file= NULL;
+ERROR 42000: Variable 'slow_query_log_file' can't be set to the value of 'NULL'
+set global general_log_file= @old_general_log_file;
+set global slow_query_log_file= @old_slow_query_log_file;
+End of 5.1 tests
diff --git a/mysql-test/r/log_tables.result b/mysql-test/r/log_tables.result
index 5e18e1273c0..0a7634df85a 100644
--- a/mysql-test/r/log_tables.result
+++ b/mysql-test/r/log_tables.result
@@ -42,20 +42,20 @@ show create table mysql.general_log;
Table Create Table
general_log CREATE TABLE `general_log` (
`event_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- `user_host` mediumtext,
- `thread_id` int(11) DEFAULT NULL,
- `server_id` int(11) DEFAULT NULL,
- `command_type` varchar(64) DEFAULT NULL,
- `argument` mediumtext
+ `user_host` mediumtext NOT NULL,
+ `thread_id` int(11) NOT NULL,
+ `server_id` int(11) NOT NULL,
+ `command_type` varchar(64) NOT NULL,
+ `argument` mediumtext NOT NULL
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='General log'
show fields from mysql.general_log;
Field Type Null Key Default Extra
-event_time timestamp NO CURRENT_TIMESTAMP
-user_host mediumtext YES NULL
-thread_id int(11) YES NULL
-server_id int(11) YES NULL
-command_type varchar(64) YES NULL
-argument mediumtext YES NULL
+event_time timestamp NO CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP
+user_host mediumtext NO NULL
+thread_id int(11) NO NULL
+server_id int(11) NO NULL
+command_type varchar(64) NO NULL
+argument mediumtext NO NULL
show create table mysql.slow_log;
Table Create Table
slow_log CREATE TABLE `slow_log` (
@@ -65,24 +65,24 @@ slow_log CREATE TABLE `slow_log` (
`lock_time` time NOT NULL,
`rows_sent` int(11) NOT NULL,
`rows_examined` int(11) NOT NULL,
- `db` varchar(512) DEFAULT NULL,
- `last_insert_id` int(11) DEFAULT NULL,
- `insert_id` int(11) DEFAULT NULL,
- `server_id` int(11) DEFAULT NULL,
+ `db` varchar(512) NOT NULL,
+ `last_insert_id` int(11) NOT NULL,
+ `insert_id` int(11) NOT NULL,
+ `server_id` int(11) NOT NULL,
`sql_text` mediumtext NOT NULL
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log'
show fields from mysql.slow_log;
Field Type Null Key Default Extra
-start_time timestamp NO CURRENT_TIMESTAMP
+start_time timestamp NO CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP
user_host mediumtext NO NULL
query_time time NO NULL
lock_time time NO NULL
rows_sent int(11) NO NULL
rows_examined int(11) NO NULL
-db varchar(512) YES NULL
-last_insert_id int(11) YES NULL
-insert_id int(11) YES NULL
-server_id int(11) YES NULL
+db varchar(512) NO NULL
+last_insert_id int(11) NO NULL
+insert_id int(11) NO NULL
+server_id int(11) NO NULL
sql_text mediumtext NO NULL
flush logs;
flush tables;
@@ -141,11 +141,11 @@ show create table mysql.general_log;
Table Create Table
general_log CREATE TABLE `general_log` (
`event_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- `user_host` mediumtext,
- `thread_id` int(11) DEFAULT NULL,
- `server_id` int(11) DEFAULT NULL,
- `command_type` varchar(64) DEFAULT NULL,
- `argument` mediumtext
+ `user_host` mediumtext NOT NULL,
+ `thread_id` int(11) NOT NULL,
+ `server_id` int(11) NOT NULL,
+ `command_type` varchar(64) NOT NULL,
+ `argument` mediumtext NOT NULL
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='General log'
show create table mysql.slow_log;
Table Create Table
@@ -156,10 +156,10 @@ slow_log CREATE TABLE `slow_log` (
`lock_time` time NOT NULL,
`rows_sent` int(11) NOT NULL,
`rows_examined` int(11) NOT NULL,
- `db` varchar(512) DEFAULT NULL,
- `last_insert_id` int(11) DEFAULT NULL,
- `insert_id` int(11) DEFAULT NULL,
- `server_id` int(11) DEFAULT NULL,
+ `db` varchar(512) NOT NULL,
+ `last_insert_id` int(11) NOT NULL,
+ `insert_id` int(11) NOT NULL,
+ `server_id` int(11) NOT NULL,
`sql_text` mediumtext NOT NULL
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log'
alter table mysql.general_log engine=myisam;
@@ -168,11 +168,11 @@ show create table mysql.general_log;
Table Create Table
general_log CREATE TABLE `general_log` (
`event_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- `user_host` mediumtext,
- `thread_id` int(11) DEFAULT NULL,
- `server_id` int(11) DEFAULT NULL,
- `command_type` varchar(64) DEFAULT NULL,
- `argument` mediumtext
+ `user_host` mediumtext NOT NULL,
+ `thread_id` int(11) NOT NULL,
+ `server_id` int(11) NOT NULL,
+ `command_type` varchar(64) NOT NULL,
+ `argument` mediumtext NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='General log'
show create table mysql.slow_log;
Table Create Table
@@ -183,10 +183,10 @@ slow_log CREATE TABLE `slow_log` (
`lock_time` time NOT NULL,
`rows_sent` int(11) NOT NULL,
`rows_examined` int(11) NOT NULL,
- `db` varchar(512) DEFAULT NULL,
- `last_insert_id` int(11) DEFAULT NULL,
- `insert_id` int(11) DEFAULT NULL,
- `server_id` int(11) DEFAULT NULL,
+ `db` varchar(512) NOT NULL,
+ `last_insert_id` int(11) NOT NULL,
+ `insert_id` int(11) NOT NULL,
+ `server_id` int(11) NOT NULL,
`sql_text` mediumtext NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Slow log'
set global general_log='ON';
@@ -241,11 +241,11 @@ use mysql;
CREATE TABLE `general_log` (
`event_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
ON UPDATE CURRENT_TIMESTAMP,
-`user_host` mediumtext,
-`thread_id` int(11) DEFAULT NULL,
-`server_id` int(11) DEFAULT NULL,
-`command_type` varchar(64) DEFAULT NULL,
-`argument` mediumtext
+`user_host` mediumtext NOT NULL,
+`thread_id` int(11) NOT NULL,
+`server_id` int(11) NOT NULL,
+`command_type` varchar(64) NOT NULL,
+`argument` mediumtext NOT NULL
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='General log';
CREATE TABLE `slow_log` (
`start_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
@@ -255,10 +255,10 @@ ON UPDATE CURRENT_TIMESTAMP,
`lock_time` time NOT NULL,
`rows_sent` int(11) NOT NULL,
`rows_examined` int(11) NOT NULL,
-`db` varchar(512) DEFAULT NULL,
-`last_insert_id` int(11) DEFAULT NULL,
-`insert_id` int(11) DEFAULT NULL,
-`server_id` int(11) DEFAULT NULL,
+`db` varchar(512) NOT NULL,
+`last_insert_id` int(11) NOT NULL,
+`insert_id` int(11) NOT NULL,
+`server_id` int(11) NOT NULL,
`sql_text` mediumtext NOT NULL
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log';
set global general_log='ON';
@@ -270,6 +270,10 @@ use mysql;
lock tables general_log read local, help_category read local;
ERROR HY000: You can't use locks with log tables.
unlock tables;
+drop table if exists mysql.renamed_general_log;
+drop table if exists mysql.renamed_slow_log;
+drop table if exists mysql.general_log_new;
+drop table if exists mysql.slow_log_new;
use mysql;
RENAME TABLE general_log TO renamed_general_log;
ERROR HY000: Cannot rename 'general_log'. When logging enabled, rename to/from log table must rename two tables: the log table to an archive table and another table back to 'general_log'
@@ -399,9 +403,9 @@ My own slow query sleep(2)
My own slow query 0
SELECT * FROM mysql.slow_log WHERE seq >= 2 LIMIT 3;
start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text seq
-START_TIME USER_HOST QUERY_TIME 00:00:00 1 0 test NULL NULL 1 SELECT "My own slow query", sleep(2) 2
-START_TIME USER_HOST QUERY_TIME 00:00:00 1 0 test NULL NULL 1 SELECT "My own slow query", sleep(2) 3
-START_TIME USER_HOST QUERY_TIME 00:00:00 1 0 test NULL NULL 1 SELECT "My own slow query", sleep(2) 4
+START_TIME USER_HOST QUERY_TIME 00:00:00 1 0 test 0 0 1 SELECT "My own slow query", sleep(2) 2
+START_TIME USER_HOST QUERY_TIME 00:00:00 1 0 test 0 0 1 SELECT "My own slow query", sleep(2) 3
+START_TIME USER_HOST QUERY_TIME 00:00:00 1 0 test 0 0 1 SELECT "My own slow query", sleep(2) 4
SET GLOBAL slow_query_log = 0;
SET SESSION long_query_time =@old_long_query_time;
FLUSH LOGS;
@@ -601,3 +605,247 @@ DROP PROCEDURE IF EXISTS `db_17876.archiveGeneralLog`;
DROP DATABASE IF EXISTS `db_17876`;
SET GLOBAL general_log = @old_general_log_state;
SET GLOBAL slow_query_log = @old_slow_log_state;
+select CONNECTION_ID() into @thread_id;
+truncate table mysql.general_log;
+set @old_general_log_state = @@global.general_log;
+set global general_log = on;
+set @lparam = "000 001 002 003 004 005 006 007 008 009"
+ "010 011 012 013 014 015 016 017 018 019"
+ "020 021 022 023 024 025 026 027 028 029"
+ "030 031 032 033 034 035 036 037 038 039"
+ "040 041 042 043 044 045 046 047 048 049"
+ "050 051 052 053 054 055 056 057 058 059"
+ "060 061 062 063 064 065 066 067 068 069"
+ "070 071 072 073 074 075 076 077 078 079"
+ "080 081 082 083 084 085 086 087 088 089"
+ "090 091 092 093 094 095 096 097 098 099"
+ "100 101 102 103 104 105 106 107 108 109"
+ "110 111 112 113 114 115 116 117 118 119"
+ "120 121 122 123 124 125 126 127 128 129"
+ "130 131 132 133 134 135 136 137 138 139"
+ "140 141 142 143 144 145 146 147 148 149"
+ "150 151 152 153 154 155 156 157 158 159"
+ "160 161 162 163 164 165 166 167 168 169"
+ "170 171 172 173 174 175 176 177 178 179"
+ "180 181 182 183 184 185 186 187 188 189"
+ "190 191 192 193 194 195 196 197 198 199"
+ "200 201 202 203 204 205 206 207 208 209"
+ "210 211 212 213 214 215 216 217 218 219"
+ "220 221 222 223 224 225 226 227 228 229"
+ "230 231 232 233 234 235 236 237 238 239"
+ "240 241 242 243 244 245 246 247 248 249"
+ "250 251 252 253 254 255 256 257 258 259"
+ "260 261 262 263 264 265 266 267 268 269"
+ "270 271 272 273 274 275 276 277 278 279"
+ "280 281 282 283 284 285 286 287 288 289"
+ "290 291 292 293 294 295 296 297 298 299"
+ "300 301 302 303 304 305 306 307 308 309"
+ "310 311 312 313 314 315 316 317 318 319"
+ "320 321 322 323 324 325 326 327 328 329"
+ "330 331 332 333 334 335 336 337 338 339"
+ "340 341 342 343 344 345 346 347 348 349"
+ "350 351 352 353 354 355 356 357 358 359"
+ "360 361 362 363 364 365 366 367 368 369"
+ "370 371 372 373 374 375 376 377 378 379"
+ "380 381 382 383 384 385 386 387 388 389"
+ "390 391 392 393 394 395 396 397 398 399"
+ "400 401 402 403 404 405 406 407 408 409"
+ "410 411 412 413 414 415 416 417 418 419"
+ "420 421 422 423 424 425 426 427 428 429"
+ "430 431 432 433 434 435 436 437 438 439"
+ "440 441 442 443 444 445 446 447 448 449"
+ "450 451 452 453 454 455 456 457 458 459"
+ "460 461 462 463 464 465 466 467 468 469"
+ "470 471 472 473 474 475 476 477 478 479"
+ "480 481 482 483 484 485 486 487 488 489"
+ "490 491 492 493 494 495 496 497 498 499"
+ "500 501 502 503 504 505 506 507 508 509"
+ "510 511 512 513 514 515 516 517 518 519"
+ "520 521 522 523 524 525 526 527 528 529"
+ "530 531 532 533 534 535 536 537 538 539"
+ "540 541 542 543 544 545 546 547 548 549"
+ "550 551 552 553 554 555 556 557 558 559"
+ "560 561 562 563 564 565 566 567 568 569"
+ "570 571 572 573 574 575 576 577 578 579"
+ "580 581 582 583 584 585 586 587 588 589"
+ "590 591 592 593 594 595 596 597 598 599"
+ "600 601 602 603 604 605 606 607 608 609"
+ "610 611 612 613 614 615 616 617 618 619"
+ "620 621 622 623 624 625 626 627 628 629"
+ "630 631 632 633 634 635 636 637 638 639"
+ "640 641 642 643 644 645 646 647 648 649"
+ "650 651 652 653 654 655 656 657 658 659"
+ "660 661 662 663 664 665 666 667 668 669"
+ "670 671 672 673 674 675 676 677 678 679"
+ "680 681 682 683 684 685 686 687 688 689"
+ "690 691 692 693 694 695 696 697 698 699"
+ "700 701 702 703 704 705 706 707 708 709"
+ "710 711 712 713 714 715 716 717 718 719"
+ "720 721 722 723 724 725 726 727 728 729"
+ "730 731 732 733 734 735 736 737 738 739"
+ "740 741 742 743 744 745 746 747 748 749"
+ "750 751 752 753 754 755 756 757 758 759"
+ "760 761 762 763 764 765 766 767 768 769"
+ "770 771 772 773 774 775 776 777 778 779"
+ "780 781 782 783 784 785 786 787 788 789"
+ "790 791 792 793 794 795 796 797 798 799"
+ "800 801 802 803 804 805 806 807 808 809"
+ "810 811 812 813 814 815 816 817 818 819"
+ "820 821 822 823 824 825 826 827 828 829"
+ "830 831 832 833 834 835 836 837 838 839"
+ "840 841 842 843 844 845 846 847 848 849"
+ "850 851 852 853 854 855 856 857 858 859"
+ "860 861 862 863 864 865 866 867 868 869"
+ "870 871 872 873 874 875 876 877 878 879"
+ "880 881 882 883 884 885 886 887 888 889"
+ "890 891 892 893 894 895 896 897 898 899"
+ "900 901 902 903 904 905 906 907 908 909"
+ "910 911 912 913 914 915 916 917 918 919"
+ "920 921 922 923 924 925 926 927 928 929"
+ "930 931 932 933 934 935 936 937 938 939"
+ "940 941 942 943 944 945 946 947 948 949"
+ "950 951 952 953 954 955 956 957 958 959"
+ "960 961 962 963 964 965 966 967 968 969"
+ "970 971 972 973 974 975 976 977 978 979"
+ "980 981 982 983 984 985 986 987 988 989"
+ "990 991 992 993 994 995 996 997 998 999";
+prepare long_query from "select ? as long_query";
+execute long_query using @lparam;
+set global general_log = off;
+select command_type, argument from mysql.general_log where thread_id = @thread_id;
+command_type argument
+Query set @lparam = "000 001 002 003 004 005 006 007 008 009"
+ "010 011 012 013 014 015 016 017 018 019"
+ "020 021 022 023 024 025 026 027 028 029"
+ "030 031 032 033 034 035 036 037 038 039"
+ "040 041 042 043 044 045 046 047 048 049"
+ "050 051 052 053 054 055 056 057 058 059"
+ "060 061 062 063 064 065 066 067 068 069"
+ "070 071 072 073 074 075 076 077 078 079"
+ "080 081 082 083 084 085 086 087 088 089"
+ "090 091 092 093 094 095 096 097 098 099"
+ "100 101 102 103 104 105 106 107 108 109"
+ "110 111 112 113 114 115 116 117 118 119"
+ "120 121 122 123 124 125 126 127 128 129"
+ "130 131 132 133 134 135 136 137 138 139"
+ "140 141 142 143 144 145 146 147 148 149"
+ "150 151 152 153 154 155 156 157 158 159"
+ "160 161 162 163 164 165 166 167 168 169"
+ "170 171 172 173 174 175 176 177 178 179"
+ "180 181 182 183 184 185 186 187 188 189"
+ "190 191 192 193 194 195 196 197 198 199"
+ "200 201 202 203 204 205 206 207 208 209"
+ "210 211 212 213 214 215 216 217 218 219"
+ "220 221 222 223 224 225 226 227 228 229"
+ "230 231 232 233 234 235 236 237 238 239"
+ "240 241 242 243 244 245 246 247 248 249"
+ "250 251 252 253 254 255 256 257 258 259"
+ "260 261 262 263 264 265 266 267 268 269"
+ "270 271 272 273 274 275 276 277 278 279"
+ "280 281 282 283 284 285 286 287 288 289"
+ "290 291 292 293 294 295 296 297 298 299"
+ "300 301 302 303 304 305 306 307 308 309"
+ "310 311 312 313 314 315 316 317 318 319"
+ "320 321 322 323 324 325 326 327 328 329"
+ "330 331 332 333 334 335 336 337 338 339"
+ "340 341 342 343 344 345 346 347 348 349"
+ "350 351 352 353 354 355 356 357 358 359"
+ "360 361 362 363 364 365 366 367 368 369"
+ "370 371 372 373 374 375 376 377 378 379"
+ "380 381 382 383 384 385 386 387 388 389"
+ "390 391 392 393 394 395 396 397 398 399"
+ "400 401 402 403 404 405 406 407 408 409"
+ "410 411 412 413 414 415 416 417 418 419"
+ "420 421 422 423 424 425 426 427 428 429"
+ "430 431 432 433 434 435 436 437 438 439"
+ "440 441 442 443 444 445 446 447 448 449"
+ "450 451 452 453 454 455 456 457 458 459"
+ "460 461 462 463 464 465 466 467 468 469"
+ "470 471 472 473 474 475 476 477 478 479"
+ "480 481 482 483 484 485 486 487 488 489"
+ "490 491 492 493 494 495 496 497 498 499"
+ "500 501 502 503 504 505 506 507 508 509"
+ "510 511 512 513 514 515 516 517 518 519"
+ "520 521 522 523 524 525 526 527 528 529"
+ "530 531 532 533 534 535 536 537 538 539"
+ "540 541 542 543 544 545 546 547 548 549"
+ "550 551 552 553 554 555 556 557 558 559"
+ "560 561 562 563 564 565 566 567 568 569"
+ "570 571 572 573 574 575 576 577 578 579"
+ "580 581 582 583 584 585 586 587 588 589"
+ "590 591 592 593 594 595 596 597 598 599"
+ "600 601 602 603 604 605 606 607 608 609"
+ "610 611 612 613 614 615 616 617 618 619"
+ "620 621 622 623 624 625 626 627 628 629"
+ "630 631 632 633 634 635 636 637 638 639"
+ "640 641 642 643 644 645 646 647 648 649"
+ "650 651 652 653 654 655 656 657 658 659"
+ "660 661 662 663 664 665 666 667 668 669"
+ "670 671 672 673 674 675 676 677 678 679"
+ "680 681 682 683 684 685 686 687 688 689"
+ "690 691 692 693 694 695 696 697 698 699"
+ "700 701 702 703 704 705 706 707 708 709"
+ "710 711 712 713 714 715 716 717 718 719"
+ "720 721 722 723 724 725 726 727 728 729"
+ "730 731 732 733 734 735 736 737 738 739"
+ "740 741 742 743 744 745 746 747 748 749"
+ "750 751 752 753 754 755 756 757 758 759"
+ "760 761 762 763 764 765 766 767 768 769"
+ "770 771 772 773 774 775 776 777 778 779"
+ "780 781 782 783 784 785 786 787 788 789"
+ "790 791 792 793 794 795 796 797 798 799"
+ "800 801 802 803 804 805 806 807 808 809"
+ "810 811 812 813 814 815 816 817 818 819"
+ "820 821 822 823 824 825 826 827 828 829"
+ "830 831 832 833 834 835 836 837 838 839"
+ "840 841 842 843 844 845 846 847 848 849"
+ "850 851 852 853 854 855 856 857 858 859"
+ "860 861 862 863 864 865 866 867 868 869"
+ "870 871 872 873 874 875 876 877 878 879"
+ "880 881 882 883 884 885 886 887 888 889"
+ "890 891 892 893 894 895 896 897 898 899"
+ "900 901 902 903 904 905 906 907 908 909"
+ "910 911 912 913 914 915 916 917 918 919"
+ "920 921 922 923 924 925 926 927 928 929"
+ "930 931 932 933 934 935 936 937 938 939"
+ "940 941 942 943 944 945 946 947 948 949"
+ "950 951 952 953 954 955 956 957 958 959"
+ "960 961 962 963 964 965 966 967 968 969"
+ "970 971 972 973 974 975 976 977 978 979"
+ "980 981 982 983 984 985 986 987 988 989"
+ "990 991 992 993 994 995 996 997 998 999"
+Query prepare long_query from "select ? as long_query"
+Prepare select ? as long_query
+Query execute long_query using @lparam
+Execute select '000 001 002 003 004 005 006 007 008 009010 011 012 013 014 015 016 017 018 019020 021 022 023 024 025 026 027 028 029030 031 032 033 034 035 036 037 038 039040 041 042 043 044 045 046 047 048 049050 051 052 053 054 055 056 057 058 059060 061 062 063 064 065 066 067 068 069070 071 072 073 074 075 076 077 078 079080 081 082 083 084 085 086 087 088 089090 091 092 093 094 095 096 097 098 099100 101 102 103 104 105 106 107 108 109110 111 112 113 114 115 116 117 118 119120 121 122 123 124 125 126 127 128 129130 131 132 133 134 135 136 137 138 139140 141 142 143 144 145 146 147 148 149150 151 152 153 154 155 156 157 158 159160 161 162 163 164 165 166 167 168 169170 171 172 173 174 175 176 177 178 179180 181 182 183 184 185 186 187 188 189190 191 192 193 194 195 196 197 198 199200 201 202 203 204 205 206 207 208 209210 211 212 213 214 215 216 217 218 219220 221 222 223 224 225 226 227 228 229230 231 232 233 234 235 236 237 238 239240 241 242 243 244 245 246 247 248 249250 251 252 253 254 255 256 257 258 259260 261 262 263 264 265 266 267 268 269270 271 272 273 274 275 276 277 278 279280 281 282 283 284 285 286 287 288 289290 291 292 293 294 295 296 297 298 299300 301 302 303 304 305 306 307 308 309310 311 312 313 314 315 316 317 318 319320 321 322 323 324 325 326 327 328 329330 331 332 333 334 335 336 337 338 339340 341 342 343 344 345 346 347 348 349350 351 352 353 354 355 356 357 358 359360 361 362 363 364 365 366 367 368 369370 371 372 373 374 375 376 377 378 379380 381 382 383 384 385 386 387 388 389390 391 392 393 394 395 396 397 398 399400 401 402 403 404 405 406 407 408 409410 411 412 413 414 415 416 417 418 419420 421 422 423 424 425 426 427 428 429430 431 432 433 434 435 436 437 438 439440 441 442 443 444 445 446 447 448 449450 451 452 453 454 455 456 457 458 459460 461 462 463 464 465 466 467 468 469470 471 472 473 474 475 476 477 478 479480 481 482 483 484 485 486 487 488 489490 491 492 493 494 495 496 497 498 499500 501 502 503 504 505 506 507 508 509510 511 512 513 514 515 516 517 518 519520 521 522 523 524 525 526 527 528 529530 531 532 533 534 535 536 537 538 539540 541 542 543 544 545 546 547 548 549550 551 552 553 554 555 556 557 558 559560 561 562 563 564 565 566 567 568 569570 571 572 573 574 575 576 577 578 579580 581 582 583 584 585 586 587 588 589590 591 592 593 594 595 596 597 598 599600 601 602 603 604 605 606 607 608 609610 611 612 613 614 615 616 617 618 619620 621 622 623 624 625 626 627 628 629630 631 632 633 634 635 636 637 638 639640 641 642 643 644 645 646 647 648 649650 651 652 653 654 655 656 657 658 659660 661 662 663 664 665 666 667 668 669670 671 672 673 674 675 676 677 678 679680 681 682 683 684 685 686 687 688 689690 691 692 693 694 695 696 697 698 699700 701 702 703 704 705 706 707 708 709710 711 712 713 714 715 716 717 718 719720 721 722 723 724 725 726 727 728 729730 731 732 733 734 735 736 737 738 739740 741 742 743 744 745 746 747 748 749750 751 752 753 754 755 756 757 758 759760 761 762 763 764 765 766 767 768 769770 771 772 773 774 775 776 777 778 779780 781 782 783 784 785 786 787 788 789790 791 792 793 794 795 796 797 798 799800 801 802 803 804 805 806 807 808 809810 811 812 813 814 815 816 817 818 819820 821 822 823 824 825 826 827 828 829830 831 832 833 834 835 836 837 838 839840 841 842 843 844 845 846 847 848 849850 851 852 853 854 855 856 857 858 859860 861 862 863 864 865 866 867 868 869870 871 872 873 874 875 876 877 878 879880 881 882 883 884 885 886 887 888 889890 891 892 893 894 895 896 897 898 899900 901 902 903 904 905 906 907 908 909910 911 912 913 914 915 916 917 918 919920 921 922 923 924 925 926 927 928 929930 931 932 933 934 935 936 937 938 939940 941 942 943 944 945 946 947 948 949950 951 952 953 954 955 956 957 958 959960 961 962 963 964 965 966 967 968 969970 971 972 973 974 975 976 977 978 979980 981 982 983 984 985 986 987 988 989990 991 992 993 994 995 996 997 998 999' as long_query
+Query set global general_log = off
+deallocate prepare long_query;
+set global general_log = @old_general_log_state;
+SET @old_slow_log_state = @@global.slow_query_log;
+SET SESSION long_query_time = 0;
+SET GLOBAL slow_query_log = ON;
+FLUSH LOGS;
+TRUNCATE TABLE mysql.slow_log;
+CREATE TABLE t1 (f1 SERIAL,f2 INT, f3 INT, PRIMARY KEY(f1), KEY(f2));
+INSERT INTO t1 VALUES (1,1,1);
+INSERT INTO t1 VALUES (2,2,2);
+INSERT INTO t1 VALUES (3,3,3);
+INSERT INTO t1 VALUES (4,4,4);
+SELECT SQL_NO_CACHE 'Bug#31700 - SCAN',f1,f2,f3,SLEEP(1.1) FROM t1 WHERE f3=4;
+Bug#31700 - SCAN f1 f2 f3 SLEEP(1.1)
+Bug#31700 - SCAN 4 4 4 0
+SELECT SQL_NO_CACHE 'Bug#31700 - KEY', f1,f2,f3,SLEEP(1.1) FROM t1 WHERE f2=3;
+Bug#31700 - KEY f1 f2 f3 SLEEP(1.1)
+Bug#31700 - KEY 3 3 3 0
+SELECT SQL_NO_CACHE 'Bug#31700 - PK', f1,f2,f3,SLEEP(1.1) FROM t1 WHERE f1=2;
+Bug#31700 - PK f1 f2 f3 SLEEP(1.1)
+Bug#31700 - PK 2 2 2 0
+SELECT start_time, rows_examined, rows_sent, sql_text FROM mysql.slow_log WHERE sql_text LIKE '%Bug#31700%' ORDER BY start_time;
+start_time rows_examined rows_sent sql_text
+TIMESTAMP 4 1 SELECT SQL_NO_CACHE 'Bug#31700 - SCAN',f1,f2,f3,SLEEP(1.1) FROM t1 WHERE f3=4
+TIMESTAMP 1 1 SELECT SQL_NO_CACHE 'Bug#31700 - KEY', f1,f2,f3,SLEEP(1.1) FROM t1 WHERE f2=3
+TIMESTAMP 1 1 SELECT SQL_NO_CACHE 'Bug#31700 - PK', f1,f2,f3,SLEEP(1.1) FROM t1 WHERE f1=2
+DROP TABLE t1;
+TRUNCATE TABLE mysql.slow_log;
+SET GLOBAL slow_query_log = @old_slow_log_state;
+SET SESSION long_query_time =@old_long_query_time;
diff --git a/mysql-test/r/lowercase_view.result b/mysql-test/r/lowercase_view.result
index 3653461c6b8..c37dc41c495 100644
--- a/mysql-test/r/lowercase_view.result
+++ b/mysql-test/r/lowercase_view.result
@@ -119,7 +119,7 @@ create table t1Aa (col1 int);
create view v1Aa as select col1 from t1Aa as AaA;
show create view v1AA;
View Create View character_set_client collation_connection
-v1aa CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1aa` AS select `aaa`.`col1` AS `col1` from `t1aa` `AaA` latin1 latin1_swedish_ci
+v1aa CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1aa` AS select `aaa`.`col1` AS `col1` from `t1aa` `aaa` latin1 latin1_swedish_ci
drop view v1AA;
select Aaa.col1 from t1Aa as AaA;
col1
@@ -128,6 +128,23 @@ drop view v1AA;
create view v1Aa as select AaA.col1 from t1Aa as AaA;
show create view v1AA;
View Create View character_set_client collation_connection
-v1aa CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1aa` AS select `aaa`.`col1` AS `col1` from `t1aa` `AaA` latin1 latin1_swedish_ci
+v1aa CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1aa` AS select `aaa`.`col1` AS `col1` from `t1aa` `aaa` latin1 latin1_swedish_ci
drop view v1AA;
drop table t1Aa;
+CREATE TABLE t1 (a int, b int);
+select X.a from t1 AS X group by X.b having (X.a = 1);
+a
+select X.a from t1 AS X group by X.b having (x.a = 1);
+a
+select X.a from t1 AS X group by X.b having (x.b = 1);
+a
+CREATE OR REPLACE VIEW v1 AS
+select X.a from t1 AS X group by X.b having (X.a = 1);
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `x`.`a` AS `a` from `t1` `x` group by `x`.`b` having (`x`.`a` = 1) latin1 latin1_swedish_ci
+SELECT * FROM v1;
+a
+DROP VIEW v1;
+DROP TABLE t1;
+End of 5.0 tests.
diff --git a/mysql-test/r/merge-big.result b/mysql-test/r/merge-big.result
new file mode 100644
index 00000000000..82fedc1df73
--- /dev/null
+++ b/mysql-test/r/merge-big.result
@@ -0,0 +1,77 @@
+drop table if exists t1,t2,t3,t4,t5,t6;
+#
+# Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE
+# corrupts a MERGE table
+# Problem #3
+#
+CREATE TABLE t1 (c1 INT) ENGINE= MyISAM;
+LOCK TABLE t1 WRITE;
+# connection con1
+SET SESSION debug="+d,sleep_open_and_lock_after_open";
+INSERT INTO t1 VALUES (1);
+# connection default
+# Let INSERT go into thr_multi_lock().
+# Kick INSERT out of thr_multi_lock().
+FLUSH TABLES;
+# Let INSERT go through open_tables() where it sleeps.
+# Unlock and close table and wait for con1 to close too.
+FLUSH TABLES;
+# This should give no result.
+SELECT * FROM t1;
+c1
+UNLOCK TABLES;
+# connection con1
+SET SESSION debug="-d,sleep_open_and_lock_after_open";
+# connection default
+DROP TABLE t1;
+#
+# Extra tests for Bug#26379 - Combination of FLUSH TABLE and
+# REPAIR TABLE corrupts a MERGE table
+#
+CREATE TABLE t1 (c1 INT);
+CREATE TABLE t2 (c1 INT);
+CREATE TABLE t3 (c1 INT);
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (2);
+INSERT INTO t3 VALUES (3);
+#
+# CREATE ... SELECT
+# try to access parent from another thread.
+#
+# connection con1
+SET SESSION debug="+d,sleep_create_select_before_lock";
+CREATE TABLE t4 (c1 INT) ENGINE=MRG_MYISAM UNION=(t1,t2)
+INSERT_METHOD=FIRST SELECT * FROM t3;
+# connection default
+# Now try to access the parent.
+# If 3 is in table, SELECT had to wait.
+SELECT * FROM t4 ORDER BY c1;
+c1
+1
+2
+3
+# connection con1
+SET SESSION debug="-d,sleep_create_select_before_lock";
+# connection default
+# Cleanup for next test.
+DROP TABLE t4;
+DELETE FROM t1 WHERE c1 != 1;
+#
+# CREATE ... SELECT
+# try to access child from another thread.
+#
+# connection con1
+SET SESSION debug="+d,sleep_create_select_before_lock";
+CREATE TABLE t4 (c1 INT) ENGINE=MRG_MYISAM UNION=(t1,t2)
+INSERT_METHOD=FIRST SELECT * FROM t3;
+# connection default
+# Now try to access a child.
+# If 3 is in table, SELECT had to wait.
+SELECT * FROM t1 ORDER BY c1;
+c1
+1
+3
+# connection con1
+SET SESSION debug="-d,sleep_create_select_before_lock";
+# connection default
+DROP TABLE t1, t2, t3, t4;
diff --git a/mysql-test/r/merge.result b/mysql-test/r/merge.result
index 1b78d9827e7..c1bd0670e0e 100644
--- a/mysql-test/r/merge.result
+++ b/mysql-test/r/merge.result
@@ -586,9 +586,7 @@ insert into t1 values (1);
insert into t2 values (2);
create temporary table t3 (a int not null) ENGINE=MERGE UNION=(t1,t2);
select * from t3;
-a
-1
-2
+ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
create temporary table t4 (a int not null);
create temporary table t5 (a int not null);
insert into t4 values (1);
@@ -599,6 +597,54 @@ a
1
2
drop table t6, t3, t1, t2, t4, t5;
+create temporary table t1 (a int not null);
+create temporary table t2 (a int not null);
+insert into t1 values (1);
+insert into t2 values (2);
+create table t3 (a int not null) ENGINE=MERGE UNION=(t1,t2);
+select * from t3;
+ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
+drop table t3, t2, t1;
+create table t1 (a int not null);
+create temporary table t2 (a int not null);
+insert into t1 values (1);
+insert into t2 values (2);
+create table t3 (a int not null) ENGINE=MERGE UNION=(t1,t2);
+select * from t3;
+ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
+drop table t3;
+create temporary table t3 (a int not null) ENGINE=MERGE UNION=(t1,t2);
+select * from t3;
+ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
+drop table t3, t2, t1;
+# CREATE...SELECT is not implemented for MERGE tables.
+CREATE TEMPORARY TABLE t1 (c1 INT NOT NULL);
+CREATE TEMPORARY TABLE t2 (c1 INT NOT NULL);
+CREATE TABLE t3 (c1 INT NOT NULL);
+INSERT INTO t3 VALUES (3), (33);
+LOCK TABLES t3 READ;
+CREATE TEMPORARY TABLE t4 (c1 INT NOT NULL) ENGINE=MERGE UNION=(t1,t2)
+INSERT_METHOD=LAST SELECT * FROM t3;
+ERROR HY000: 'test.t4' is not BASE TABLE
+SELECT * FROM t4;
+ERROR HY000: Table 't4' was not locked with LOCK TABLES
+UNLOCK TABLES;
+CREATE TEMPORARY TABLE t4 (c1 INT NOT NULL) ENGINE=MERGE UNION=(t1,t2)
+INSERT_METHOD=LAST;
+INSERT INTO t4 SELECT * FROM t3;
+# Alter temporary MERGE table.
+ALTER TABLE t4 UNION=(t1);
+LOCK TABLES t4 WRITE;
+# Alter temporary MERGE table under LOCk tables.
+ALTER TABLE t4 UNION=(t1,t2);
+UNLOCK TABLES;
+# MERGE table and function.
+CREATE FUNCTION f1 () RETURNS INT RETURN (SELECT max(c1) FROM t3);
+SELECT * FROM t4 WHERE c1 < f1();
+c1
+3
+DROP FUNCTION f1;
+DROP TABLE t4, t3, t2, t1;
CREATE TABLE t1 (
fileset_id tinyint(3) unsigned NOT NULL default '0',
file_code varchar(32) NOT NULL default '',
@@ -652,11 +698,11 @@ create table t2 (a int);
insert into t1 values (0);
insert into t2 values (1);
create table t3 engine=merge union=(t1, t2) select * from t1;
-ERROR HY000: You can't specify target table 't1' for update in FROM clause
+ERROR HY000: 'test.t3' is not BASE TABLE
create table t3 engine=merge union=(t1, t2) select * from t2;
-ERROR HY000: You can't specify target table 't2' for update in FROM clause
+ERROR HY000: 'test.t3' is not BASE TABLE
create table t3 engine=merge union=(t1, t2) select (select max(a) from t2);
-ERROR HY000: You can't specify target table 't2' for update in FROM clause
+ERROR HY000: 'test.t3' is not BASE TABLE
drop table t1, t2;
create table t1 (
a double(14,4),
@@ -786,7 +832,7 @@ ERROR HY000: Unable to open underlying table which is differently defined or of
DROP TABLE t1, t2;
CREATE TABLE t2(a INT) ENGINE=MERGE UNION=(t3);
SELECT * FROM t2;
-ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
+ERROR 42S02: Table 'test.t3' doesn't exist
DROP TABLE t2;
CREATE TABLE t1(a INT, b TEXT);
CREATE TABLE tm1(a TEXT, b INT) ENGINE=MERGE UNION=(t1);
@@ -851,20 +897,17 @@ drop table t2;
drop table t1;
CREATE TABLE tm1(a INT) ENGINE=MERGE UNION=(t1, t2);
SELECT * FROM tm1;
-ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
+ERROR 42S02: Table 'test.t1' doesn't exist
CHECK TABLE tm1;
Table Op Msg_type Msg_text
-test.tm1 check Error Table 'test.t1' is differently defined or of non-MyISAM type or doesn't exist
-test.tm1 check Error Table 'test.t2' is differently defined or of non-MyISAM type or doesn't exist
-test.tm1 check Error Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
+test.tm1 check Error Table 'test.t1' doesn't exist
test.tm1 check error Corrupt
CREATE TABLE t1(a INT);
SELECT * FROM tm1;
-ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
+ERROR 42S02: Table 'test.t2' doesn't exist
CHECK TABLE tm1;
Table Op Msg_type Msg_text
-test.tm1 check Error Table 'test.t2' is differently defined or of non-MyISAM type or doesn't exist
-test.tm1 check Error Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
+test.tm1 check Error Table 'test.t2' doesn't exist
test.tm1 check error Corrupt
CREATE TABLE t2(a BLOB);
SELECT * FROM tm1;
@@ -881,4 +924,1065 @@ CHECK TABLE tm1;
Table Op Msg_type Msg_text
test.tm1 check status OK
DROP TABLE tm1, t1, t2;
+CREATE TABLE t1(c1 INT);
+CREATE TABLE t2 (c1 INT) ENGINE=MERGE UNION=(t1) INSERT_METHOD=FIRST;
+CREATE TABLE IF NOT EXISTS t1 SELECT * FROM t2;
+ERROR HY000: You can't specify target table 't1' for update in FROM clause
+DROP TABLE t1, t2;
+CREATE TABLE t1 (id INT NOT NULL, ref INT NOT NULL, INDEX (id)) ENGINE=MyISAM;
+CREATE TABLE t2 LIKE t1;
+INSERT INTO t2 (id, ref) VALUES (1,3), (2,1), (3,2), (4,5), (4,4);
+INSERT INTO t1 SELECT * FROM t2;
+INSERT INTO t1 SELECT * FROM t2;
+CREATE TABLE t3 (id INT NOT NULL, ref INT NOT NULL, INDEX (id)) ENGINE=MERGE
+UNION(t1);
+SELECT * FROM t3 AS a INNER JOIN t3 AS b USING (id) WHERE a.ref < b.ref;
+id ref ref
+4 4 5
+4 4 5
+4 4 5
+4 4 5
+SELECT * FROM t3;
+id ref
+1 3
+2 1
+3 2
+4 5
+4 4
+1 3
+2 1
+3 2
+4 5
+4 4
+DELETE FROM a USING t3 AS a INNER JOIN t3 AS b USING (id) WHERE a.ref < b.ref;
+SELECT * FROM t3;
+id ref
+1 3
+2 1
+3 2
+4 5
+1 3
+2 1
+3 2
+4 5
+DROP TABLE t1, t2, t3;
End of 5.0 tests
+create table t1 (c1 int, index(c1));
+create table t2 (c1 int, index(c1)) engine=merge union=(t1);
+insert into t1 values (1);
+flush tables;
+select * from t2;
+c1
+1
+flush tables;
+truncate table t1;
+insert into t1 values (1);
+flush tables;
+select * from t2;
+c1
+1
+truncate table t1;
+insert into t1 values (1);
+drop table t1,t2;
+#
+# Extra tests for TRUNCATE.
+#
+# Truncate MERGE table.
+CREATE TABLE t1 (c1 INT, INDEX(c1));
+CREATE TABLE t2 (c1 INT, INDEX(c1));
+CREATE TABLE t3 (c1 INT, INDEX(c1)) ENGINE=MRG_MYISAM UNION=(t1,t2);
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (2);
+SELECT * FROM t3;
+c1
+1
+2
+TRUNCATE TABLE t3;
+SELECT * FROM t3;
+c1
+#
+# Truncate child table.
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (2);
+TRUNCATE TABLE t1;
+SELECT * FROM t3;
+c1
+2
+#
+# Truncate MERGE table under locked tables.
+LOCK TABLE t1 WRITE, t2 WRITE, t3 WRITE;
+INSERT INTO t1 VALUES (1);
+TRUNCATE TABLE t3;
+ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+SELECT * FROM t3;
+c1
+1
+2
+#
+# Truncate child table under locked tables.
+TRUNCATE TABLE t1;
+ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+SELECT * FROM t3;
+c1
+1
+2
+UNLOCK TABLES;
+DROP TABLE t1, t2, t3;
+#
+# Truncate temporary MERGE table.
+CREATE TEMPORARY TABLE t1 (c1 INT, INDEX(c1));
+CREATE TEMPORARY TABLE t2 (c1 INT, INDEX(c1));
+CREATE TEMPORARY TABLE t3 (c1 INT, INDEX(c1)) ENGINE=MRG_MYISAM UNION=(t1,t2);
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (2);
+SELECT * FROM t3;
+c1
+1
+2
+TRUNCATE TABLE t3;
+SELECT * FROM t3;
+c1
+#
+# Truncate temporary child table.
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (2);
+TRUNCATE TABLE t1;
+SELECT * FROM t3;
+c1
+2
+#
+# Truncate temporary MERGE table under locked tables.
+INSERT INTO t1 VALUES (1);
+CREATE TABLE t4 (c1 INT, INDEX(c1));
+LOCK TABLE t4 WRITE;
+TRUNCATE TABLE t3;
+ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+SELECT * FROM t3;
+c1
+1
+2
+#
+# Truncate temporary child table under locked tables.
+TRUNCATE TABLE t1;
+ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+SELECT * FROM t3;
+c1
+1
+2
+UNLOCK TABLES;
+DROP TABLE t1, t2, t3, t4;
+CREATE TABLE t1 (c1 INT) ENGINE= MyISAM;
+CREATE TABLE t2 (c1 INT) ENGINE= MRG_MYISAM UNION= (t1) INSERT_METHOD= LAST;
+REPAIR TABLE t1;
+INSERT INTO t2 VALUES (1);
+Table Op Msg_type Msg_text
+test.t1 repair status OK
+DROP TABLE t1, t2;
+CREATE TABLE t1 (c1 INT) ENGINE= MyISAM;
+CREATE TABLE t2 (c1 INT) ENGINE= MRG_MYISAM UNION= (t1) INSERT_METHOD= LAST;
+LOCK TABLE t1 WRITE;
+INSERT INTO t2 VALUES (1);
+REPAIR TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 repair status OK
+UNLOCK TABLES;
+DROP TABLE t1, t2;
+CREATE TABLE t1 (c1 INT) ENGINE= MyISAM;
+LOCK TABLE t1 WRITE;
+INSERT INTO t1 VALUES (1);
+FLUSH TABLES;
+FLUSH TABLES;
+SELECT * FROM t1;
+c1
+UNLOCK TABLES;
+DROP TABLE t1;
+#
+# Extra tests for Bug#26379 - Combination of FLUSH TABLE and
+# REPAIR TABLE corrupts a MERGE table
+#
+# CREATE ... SELECT is disabled for MERGE tables.
+#
+CREATE TABLE t1(c1 INT);
+INSERT INTO t1 VALUES (1);
+CREATE TABLE t2 (c1 INT) ENGINE=MRG_MYISAM UNION=(t1) INSERT_METHOD=LAST;
+CREATE TABLE t3 ENGINE=MRG_MYISAM INSERT_METHOD=LAST SELECT * FROM t2;
+ERROR HY000: Table 't3' is read only
+SHOW CREATE TABLE t3;
+ERROR 42S02: Table 'test.t3' doesn't exist
+CREATE TABLE t3 ENGINE=MRG_MYISAM UNION=(t1) INSERT_METHOD=LAST
+SELECT * FROM t2;
+ERROR HY000: 'test.t3' is not BASE TABLE
+SHOW CREATE TABLE t3;
+ERROR 42S02: Table 'test.t3' doesn't exist
+DROP TABLE t1, t2;
+#
+# CREATE ... LIKE
+#
+# 1. Create like.
+CREATE TABLE t1 (c1 INT);
+CREATE TABLE t2 (c1 INT);
+CREATE TABLE t3 (c1 INT) ENGINE=MRG_MYISAM UNION=(t1,t2)
+INSERT_METHOD=LAST;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (2);
+INSERT INTO t3 VALUES (3);
+CREATE TABLE t4 LIKE t3;
+SHOW CREATE TABLE t4;
+Table Create Table
+t4 CREATE TABLE `t4` (
+ `c1` int(11) DEFAULT NULL
+) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=()
+INSERT INTO t4 VALUES (4);
+ERROR HY000: Table 't4' is read only
+DROP TABLE t4;
+#
+# 1. Create like with locked tables.
+LOCK TABLES t3 WRITE, t2 WRITE, t1 WRITE;
+CREATE TABLE t4 LIKE t3;
+SHOW CREATE TABLE t4;
+ERROR HY000: Table 't4' was not locked with LOCK TABLES
+INSERT INTO t4 VALUES (4);
+ERROR HY000: Table 't4' was not locked with LOCK TABLES
+UNLOCK TABLES;
+SHOW CREATE TABLE t4;
+Table Create Table
+t4 CREATE TABLE `t4` (
+ `c1` int(11) DEFAULT NULL
+) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=()
+INSERT INTO t4 VALUES (4);
+ERROR HY000: Table 't4' is read only
+DROP TABLE t4;
+#
+# Rename child.
+#
+# 1. Normal rename of non-MERGE table.
+CREATE TABLE t4 (c1 INT);
+INSERT INTO t4 VALUES (4);
+SELECT * FROM t4 ORDER BY c1;
+c1
+4
+RENAME TABLE t4 TO t5;
+SELECT * FROM t5 ORDER BY c1;
+c1
+4
+RENAME TABLE t5 TO t4;
+SELECT * FROM t4 ORDER BY c1;
+c1
+4
+DROP TABLE t4;
+#
+# 2. Normal rename.
+SELECT * FROM t3 ORDER BY c1;
+c1
+1
+2
+3
+RENAME TABLE t2 TO t5;
+SELECT * FROM t3 ORDER BY c1;
+ERROR 42S02: Table 'test.t2' doesn't exist
+RENAME TABLE t5 TO t2;
+SELECT * FROM t3 ORDER BY c1;
+c1
+1
+2
+3
+#
+# 3. Normal rename with locked tables.
+LOCK TABLES t1 WRITE, t2 WRITE, t3 WRITE;
+SELECT * FROM t3 ORDER BY c1;
+c1
+1
+2
+3
+RENAME TABLE t2 TO t5;
+ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+SELECT * FROM t3 ORDER BY c1;
+c1
+1
+2
+3
+RENAME TABLE t5 TO t2;
+ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+SELECT * FROM t3 ORDER BY c1;
+c1
+1
+2
+3
+UNLOCK TABLES;
+#
+# 4. Alter table rename.
+ALTER TABLE t2 RENAME TO t5;
+SELECT * FROM t3 ORDER BY c1;
+ERROR 42S02: Table 'test.t2' doesn't exist
+ALTER TABLE t5 RENAME TO t2;
+SELECT * FROM t3 ORDER BY c1;
+c1
+1
+2
+3
+#
+# 5. Alter table rename with locked tables.
+LOCK TABLES t1 WRITE, t2 WRITE, t3 WRITE;
+ALTER TABLE t2 RENAME TO t5;
+SELECT * FROM t3 ORDER BY c1;
+ERROR HY000: Table 't3' was not locked with LOCK TABLES
+ALTER TABLE t5 RENAME TO t2;
+ERROR HY000: Table 't5' was not locked with LOCK TABLES
+UNLOCK TABLES;
+ALTER TABLE t5 RENAME TO t2;
+SELECT * FROM t3 ORDER BY c1;
+c1
+1
+2
+3
+#
+# Rename parent.
+#
+# 1. Normal rename with locked tables.
+LOCK TABLES t1 WRITE, t2 WRITE, t3 WRITE;
+SELECT * FROM t3 ORDER BY c1;
+c1
+1
+2
+3
+RENAME TABLE t3 TO t5;
+ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+SELECT * FROM t3 ORDER BY c1;
+c1
+1
+2
+3
+RENAME TABLE t5 TO t3;
+ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+SELECT * FROM t3 ORDER BY c1;
+c1
+1
+2
+3
+#
+# 5. Alter table rename with locked tables.
+ALTER TABLE t3 RENAME TO t5;
+SELECT * FROM t5 ORDER BY c1;
+ERROR HY000: Table 't5' was not locked with LOCK TABLES
+ALTER TABLE t5 RENAME TO t3;
+ERROR HY000: Table 't5' was not locked with LOCK TABLES
+UNLOCK TABLES;
+ALTER TABLE t5 RENAME TO t3;
+SELECT * FROM t3 ORDER BY c1;
+c1
+1
+2
+3
+DROP TABLE t1, t2, t3;
+#
+# Drop locked tables.
+#
+# 1. Drop parent.
+CREATE TABLE t1 (c1 INT, INDEX(c1));
+CREATE TABLE t2 (c1 INT, INDEX(c1)) ENGINE=MRG_MYISAM UNION=(t1)
+INSERT_METHOD=LAST;
+LOCK TABLES t1 WRITE, t2 WRITE;
+INSERT INTO t1 VALUES (1);
+DROP TABLE t2;
+SELECT * FROM t2;
+ERROR HY000: Table 't2' was not locked with LOCK TABLES
+SELECT * FROM t1;
+c1
+1
+UNLOCK TABLES;
+# 2. Drop child.
+CREATE TABLE t2 (c1 INT, INDEX(c1)) ENGINE=MRG_MYISAM UNION=(t1)
+INSERT_METHOD=LAST;
+LOCK TABLES t1 WRITE, t2 WRITE;
+INSERT INTO t1 VALUES (1);
+DROP TABLE t1;
+SELECT * FROM t2;
+ERROR 42S02: Table 'test.t1' doesn't exist
+SELECT * FROM t1;
+ERROR 42S02: Table 'test.t1' doesn't exist
+UNLOCK TABLES;
+DROP TABLE t2;
+#
+# ALTER TABLE. Change child list.
+#
+CREATE TABLE t1 (c1 INT, INDEX(c1));
+CREATE TABLE t2 (c1 INT, INDEX(c1));
+CREATE TABLE t3 (c1 INT, INDEX(c1));
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (2);
+INSERT INTO t3 VALUES (3);
+CREATE TABLE t4 (c1 INT, INDEX(c1)) ENGINE=MRG_MYISAM UNION=(t3,t2)
+INSERT_METHOD=LAST;
+# Shrink child list.
+ALTER TABLE t4 UNION=(t3);
+SHOW CREATE TABLE t4;
+Table Create Table
+t4 CREATE TABLE `t4` (
+ `c1` int(11) DEFAULT NULL,
+ KEY `c1` (`c1`)
+) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`t3`)
+SELECT * FROM t4 ORDER BY c1;
+c1
+3
+# Extend child list.
+ALTER TABLE t4 UNION=(t3,t2);
+SHOW CREATE TABLE t4;
+Table Create Table
+t4 CREATE TABLE `t4` (
+ `c1` int(11) DEFAULT NULL,
+ KEY `c1` (`c1`)
+) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`t3`,`t2`)
+SELECT * FROM t4 ORDER BY c1;
+c1
+2
+3
+#
+# ALTER TABLE under LOCK TABLES. Change child list.
+#
+LOCK TABLES t4 WRITE, t3 WRITE, t2 WRITE;
+# Shrink child list.
+ALTER TABLE t4 UNION=(t3);
+ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+# Extend child list within locked tables.
+ALTER TABLE t4 UNION=(t3,t2);
+ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+# Extend child list beyond locked tables.
+ALTER TABLE t4 UNION=(t3,t2,t1);
+ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+SHOW CREATE TABLE t4;
+Table Create Table
+t4 CREATE TABLE `t4` (
+ `c1` int(11) DEFAULT NULL,
+ KEY `c1` (`c1`)
+) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`t3`,`t2`)
+SELECT * FROM t4 ORDER BY c1;
+c1
+2
+3
+UNLOCK TABLES;
+DROP TABLE t4;
+#
+# ALTER TABLE under LOCK TABLES. Grave change, table re-creation.
+#
+CREATE TABLE t4 (c1 INT, INDEX(c1)) ENGINE=MRG_MYISAM UNION=(t1,t2,t3)
+INSERT_METHOD=LAST;
+# Lock parent first and then children.
+LOCK TABLES t4 WRITE, t3 WRITE, t2 WRITE, t1 WRITE;
+ALTER TABLE t4 DROP INDEX c1, ADD UNIQUE INDEX (c1);
+SELECT * FROM t4 ORDER BY c1;
+c1
+1
+2
+3
+ALTER TABLE t2 DROP INDEX c1, ADD UNIQUE INDEX (c1);
+SELECT * FROM t4 ORDER BY c1;
+c1
+1
+2
+3
+UNLOCK TABLES;
+# Lock children first and then parent.
+LOCK TABLES t1 WRITE, t2 WRITE, t3 WRITE, t4 WRITE;
+ALTER TABLE t4 DROP INDEX c1, ADD UNIQUE INDEX (c1);
+SELECT * FROM t4 ORDER BY c1;
+c1
+1
+2
+3
+ALTER TABLE t2 DROP INDEX c1, ADD UNIQUE INDEX (c1);
+SELECT * FROM t4 ORDER BY c1;
+c1
+1
+2
+3
+UNLOCK TABLES;
+# Lock parent between children.
+LOCK TABLES t3 WRITE, t2 WRITE, t4 WRITE, t1 WRITE;
+ALTER TABLE t4 DROP INDEX c1, ADD UNIQUE INDEX (c1);
+SELECT * FROM t4 ORDER BY c1;
+c1
+1
+2
+3
+ALTER TABLE t2 DROP INDEX c1, ADD UNIQUE INDEX (c1);
+SELECT * FROM t4 ORDER BY c1;
+c1
+1
+2
+3
+UNLOCK TABLES;
+DROP TABLE t1, t2, t3, t4;
+#
+# ALTER TABLE under LOCK TABLES. Simple change, no re-creation.
+#
+CREATE TABLE t1 (c1 INT);
+CREATE TABLE t2 (c1 INT);
+CREATE TABLE t3 (c1 INT);
+CREATE TABLE t4 (c1 INT) ENGINE=MRG_MYISAM UNION=(t1,t2,t3)
+INSERT_METHOD=LAST;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (2);
+INSERT INTO t3 VALUES (3);
+# Lock parent first and then children.
+LOCK TABLES t4 WRITE, t3 WRITE, t2 WRITE, t1 WRITE;
+ALTER TABLE t4 ALTER COLUMN c1 SET DEFAULT 44;
+SELECT * FROM t4 ORDER BY c1;
+c1
+1
+2
+3
+ALTER TABLE t2 ALTER COLUMN c1 SET DEFAULT 22;
+SELECT * FROM t4 ORDER BY c1;
+c1
+1
+2
+3
+UNLOCK TABLES;
+# Lock children first and then parent.
+LOCK TABLES t1 WRITE, t2 WRITE, t3 WRITE, t4 WRITE;
+ALTER TABLE t4 ALTER COLUMN c1 SET DEFAULT 44;
+SELECT * FROM t4 ORDER BY c1;
+c1
+1
+2
+3
+ALTER TABLE t2 ALTER COLUMN c1 SET DEFAULT 22;
+SELECT * FROM t4 ORDER BY c1;
+c1
+1
+2
+3
+UNLOCK TABLES;
+# Lock parent between children.
+LOCK TABLES t3 WRITE, t2 WRITE, t4 WRITE, t1 WRITE;
+ALTER TABLE t4 ALTER COLUMN c1 SET DEFAULT 44;
+SELECT * FROM t4 ORDER BY c1;
+c1
+1
+2
+3
+ALTER TABLE t2 ALTER COLUMN c1 SET DEFAULT 22;
+SELECT * FROM t4 ORDER BY c1;
+c1
+1
+2
+3
+UNLOCK TABLES;
+#
+# FLUSH TABLE under LOCK TABLES.
+#
+# Lock parent first and then children.
+LOCK TABLES t4 WRITE, t3 WRITE, t2 WRITE, t1 WRITE;
+FLUSH TABLE t4;
+SELECT * FROM t4 ORDER BY c1;
+c1
+1
+2
+3
+FLUSH TABLE t2;
+SELECT * FROM t4 ORDER BY c1;
+c1
+1
+2
+3
+FLUSH TABLES;
+SELECT * FROM t4 ORDER BY c1;
+c1
+1
+2
+3
+UNLOCK TABLES;
+# Lock children first and then parent.
+LOCK TABLES t1 WRITE, t2 WRITE, t3 WRITE, t4 WRITE;
+FLUSH TABLE t4;
+SELECT * FROM t4 ORDER BY c1;
+c1
+1
+2
+3
+FLUSH TABLE t2;
+SELECT * FROM t4 ORDER BY c1;
+c1
+1
+2
+3
+FLUSH TABLES;
+SELECT * FROM t4 ORDER BY c1;
+c1
+1
+2
+3
+UNLOCK TABLES;
+# Lock parent between children.
+LOCK TABLES t3 WRITE, t2 WRITE, t4 WRITE, t1 WRITE;
+FLUSH TABLE t4;
+SELECT * FROM t4 ORDER BY c1;
+c1
+1
+2
+3
+FLUSH TABLE t2;
+SELECT * FROM t4 ORDER BY c1;
+c1
+1
+2
+3
+FLUSH TABLES;
+SELECT * FROM t4 ORDER BY c1;
+c1
+1
+2
+3
+UNLOCK TABLES;
+#
+# Triggers
+#
+# Trigger on parent
+DELETE FROM t4 WHERE c1 = 4;
+CREATE TRIGGER t4_ai AFTER INSERT ON t4 FOR EACH ROW SET @a=1;
+SET @a=0;
+INSERT INTO t4 VALUES (4);
+SELECT @a;
+@a
+1
+SELECT * FROM t4 ORDER BY c1;
+c1
+1
+2
+3
+4
+DROP TRIGGER t4_ai;
+# Trigger on parent under LOCK TABLES
+LOCK TABLES t3 WRITE, t2 WRITE, t4 WRITE, t1 WRITE;
+CREATE TRIGGER t4_ai AFTER INSERT ON t4 FOR EACH ROW SET @a=1;
+SET @a=0;
+INSERT INTO t4 VALUES (4);
+SELECT @a;
+@a
+1
+SELECT * FROM t4 ORDER BY c1;
+c1
+1
+2
+3
+4
+4
+DROP TRIGGER t4_ai;
+UNLOCK TABLES;
+#
+# Trigger on child
+DELETE FROM t4 WHERE c1 = 4;
+CREATE TRIGGER t3_ai AFTER INSERT ON t3 FOR EACH ROW SET @a=1;
+SET @a=0;
+INSERT INTO t4 VALUES (4);
+SELECT @a;
+@a
+0
+INSERT INTO t3 VALUES (33);
+SELECT @a;
+@a
+1
+SELECT * FROM t4 ORDER BY c1;
+c1
+1
+2
+3
+4
+33
+DROP TRIGGER t3_ai;
+# Trigger on child under LOCK TABLES
+LOCK TABLES t3 WRITE, t2 WRITE, t4 WRITE, t1 WRITE;
+CREATE TRIGGER t3_ai AFTER INSERT ON t3 FOR EACH ROW SET @a=1;
+SET @a=0;
+INSERT INTO t4 VALUES (4);
+SELECT @a;
+@a
+0
+INSERT INTO t3 VALUES (33);
+SELECT @a;
+@a
+1
+SELECT * FROM t4 ORDER BY c1;
+c1
+1
+2
+3
+4
+4
+33
+33
+DELETE FROM t4 WHERE c1 = 33;
+DROP TRIGGER t3_ai;
+#
+# Trigger with table use on child
+DELETE FROM t4 WHERE c1 = 4;
+CREATE TRIGGER t3_ai AFTER INSERT ON t3 FOR EACH ROW INSERT INTO t2 VALUES(22);
+INSERT INTO t4 VALUES (4);
+SELECT * FROM t4 ORDER BY c1;
+c1
+1
+2
+3
+4
+INSERT INTO t3 VALUES (33);
+SELECT * FROM t4 ORDER BY c1;
+c1
+1
+2
+3
+4
+22
+33
+DELETE FROM t4 WHERE c1 = 22;
+DELETE FROM t4 WHERE c1 = 33;
+DROP TRIGGER t3_ai;
+# Trigger with table use on child under LOCK TABLES
+LOCK TABLES t3 WRITE, t2 WRITE, t4 WRITE, t1 WRITE;
+CREATE TRIGGER t3_ai AFTER INSERT ON t3 FOR EACH ROW INSERT INTO t2 VALUES(22);
+INSERT INTO t4 VALUES (4);
+SELECT * FROM t4 ORDER BY c1;
+c1
+1
+2
+3
+4
+4
+INSERT INTO t3 VALUES (33);
+SELECT * FROM t4 ORDER BY c1;
+c1
+1
+2
+3
+4
+4
+22
+33
+DROP TRIGGER t3_ai;
+DELETE FROM t4 WHERE c1 = 22;
+DELETE FROM t4 WHERE c1 = 33;
+UNLOCK TABLES;
+#
+# Repair
+#
+REPAIR TABLE t4;
+Table Op Msg_type Msg_text
+test.t4 repair note The storage engine for the table doesn't support repair
+REPAIR TABLE t2;
+Table Op Msg_type Msg_text
+test.t2 repair status OK
+SELECT * FROM t4 ORDER BY c1;
+c1
+1
+2
+3
+4
+4
+LOCK TABLES t3 WRITE, t2 WRITE, t4 WRITE, t1 WRITE;
+REPAIR TABLE t4;
+Table Op Msg_type Msg_text
+test.t4 repair note The storage engine for the table doesn't support repair
+REPAIR TABLE t2;
+Table Op Msg_type Msg_text
+test.t2 repair status OK
+SELECT * FROM t4 ORDER BY c1;
+c1
+1
+2
+3
+4
+4
+UNLOCK TABLES;
+#
+# Optimize
+#
+OPTIMIZE TABLE t4;
+Table Op Msg_type Msg_text
+test.t4 optimize note The storage engine for the table doesn't support optimize
+OPTIMIZE TABLE t2;
+Table Op Msg_type Msg_text
+test.t2 optimize status OK
+SELECT * FROM t4 ORDER BY c1;
+c1
+1
+2
+3
+4
+4
+LOCK TABLES t3 WRITE, t2 WRITE, t4 WRITE, t1 WRITE;
+OPTIMIZE TABLE t4;
+Table Op Msg_type Msg_text
+test.t4 optimize note The storage engine for the table doesn't support optimize
+OPTIMIZE TABLE t2;
+Table Op Msg_type Msg_text
+test.t2 optimize status Table is already up to date
+SELECT * FROM t4 ORDER BY c1;
+c1
+1
+2
+3
+4
+4
+UNLOCK TABLES;
+#
+# Checksum
+#
+CHECKSUM TABLE t4;
+Table Checksum
+test.t4 46622073
+CHECKSUM TABLE t2;
+Table Checksum
+test.t2 3700403066
+SELECT * FROM t4 ORDER BY c1;
+c1
+1
+2
+3
+4
+4
+LOCK TABLES t3 WRITE, t2 WRITE, t4 WRITE, t1 WRITE;
+CHECKSUM TABLE t4;
+Table Checksum
+test.t4 46622073
+CHECKSUM TABLE t2;
+Table Checksum
+test.t2 3700403066
+SELECT * FROM t4 ORDER BY c1;
+c1
+1
+2
+3
+4
+4
+UNLOCK TABLES;
+#
+# Insert delayed
+#
+INSERT DELAYED INTO t4 VALUES(44);
+DELETE FROM t4 WHERE c1 = 44;
+INSERT DELAYED INTO t3 VALUES(33);
+SELECT * FROM t4 ORDER BY c1;
+c1
+1
+2
+3
+4
+4
+33
+LOCK TABLES t3 WRITE, t2 WRITE, t4 WRITE, t1 WRITE;
+INSERT DELAYED INTO t4 VALUES(444);
+Got one of the listed errors
+INSERT DELAYED INTO t3 VALUES(333);
+Got one of the listed errors
+SELECT * FROM t4 ORDER BY c1;
+c1
+1
+2
+3
+4
+4
+33
+UNLOCK TABLES;
+DROP TABLE t1, t2, t3, t4;
+#
+# Recursive inclusion of merge tables in their union clauses.
+#
+CREATE TABLE t1 (c1 INT, INDEX(c1));
+CREATE TABLE t2 (c1 INT, INDEX(c1)) ENGINE=MRG_MYISAM UNION=(t1)
+INSERT_METHOD=LAST;
+CREATE TABLE t3 (c1 INT, INDEX(c1)) ENGINE=MRG_MYISAM UNION=(t2,t1)
+INSERT_METHOD=LAST;
+ALTER TABLE t2 UNION=(t3,t1);
+SELECT * FROM t2;
+ERROR HY000: Table 't3' is differently defined or of non-MyISAM type or doesn't exist
+DROP TABLE t1, t2, t3;
+CREATE TABLE t1 (c1 INT) ENGINE= MyISAM;
+CREATE TABLE t2 (c1 INT) ENGINE= MyISAM;
+CREATE TABLE t3 (c1 INT) ENGINE= MRG_MYISAM UNION= (t1, t2);
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (2);
+SELECT * FROM t3;
+c1
+1
+2
+TRUNCATE TABLE t1;
+SELECT * FROM t3;
+c1
+2
+DROP TABLE t1, t2, t3;
+CREATE TABLE t1 (id INTEGER, grp TINYINT, id_rev INTEGER);
+SET @rnd_max= 2147483647;
+SET @rnd= RAND();
+SET @id = CAST(@rnd * @rnd_max AS UNSIGNED);
+SET @id_rev= @rnd_max - @id;
+SET @grp= CAST(127.0 * @rnd AS UNSIGNED);
+INSERT INTO t1 (id, grp, id_rev) VALUES (@id, @grp, @id_rev);
+SET @rnd= RAND();
+SET @id = CAST(@rnd * @rnd_max AS UNSIGNED);
+SET @id_rev= @rnd_max - @id;
+SET @grp= CAST(127.0 * @rnd AS UNSIGNED);
+INSERT INTO t1 (id, grp, id_rev) VALUES (@id, @grp, @id_rev);
+SET @rnd= RAND();
+SET @id = CAST(@rnd * @rnd_max AS UNSIGNED);
+SET @id_rev= @rnd_max - @id;
+SET @grp= CAST(127.0 * @rnd AS UNSIGNED);
+INSERT INTO t1 (id, grp, id_rev) VALUES (@id, @grp, @id_rev);
+SET @rnd= RAND();
+SET @id = CAST(@rnd * @rnd_max AS UNSIGNED);
+SET @id_rev= @rnd_max - @id;
+SET @grp= CAST(127.0 * @rnd AS UNSIGNED);
+INSERT INTO t1 (id, grp, id_rev) VALUES (@id, @grp, @id_rev);
+SET @rnd= RAND();
+SET @id = CAST(@rnd * @rnd_max AS UNSIGNED);
+SET @id_rev= @rnd_max - @id;
+SET @grp= CAST(127.0 * @rnd AS UNSIGNED);
+INSERT INTO t1 (id, grp, id_rev) VALUES (@id, @grp, @id_rev);
+SET @rnd= RAND();
+SET @id = CAST(@rnd * @rnd_max AS UNSIGNED);
+SET @id_rev= @rnd_max - @id;
+SET @grp= CAST(127.0 * @rnd AS UNSIGNED);
+INSERT INTO t1 (id, grp, id_rev) VALUES (@id, @grp, @id_rev);
+SET @rnd= RAND();
+SET @id = CAST(@rnd * @rnd_max AS UNSIGNED);
+SET @id_rev= @rnd_max - @id;
+SET @grp= CAST(127.0 * @rnd AS UNSIGNED);
+INSERT INTO t1 (id, grp, id_rev) VALUES (@id, @grp, @id_rev);
+SET @rnd= RAND();
+SET @id = CAST(@rnd * @rnd_max AS UNSIGNED);
+SET @id_rev= @rnd_max - @id;
+SET @grp= CAST(127.0 * @rnd AS UNSIGNED);
+INSERT INTO t1 (id, grp, id_rev) VALUES (@id, @grp, @id_rev);
+SET @rnd= RAND();
+SET @id = CAST(@rnd * @rnd_max AS UNSIGNED);
+SET @id_rev= @rnd_max - @id;
+SET @grp= CAST(127.0 * @rnd AS UNSIGNED);
+INSERT INTO t1 (id, grp, id_rev) VALUES (@id, @grp, @id_rev);
+SET @rnd= RAND();
+SET @id = CAST(@rnd * @rnd_max AS UNSIGNED);
+SET @id_rev= @rnd_max - @id;
+SET @grp= CAST(127.0 * @rnd AS UNSIGNED);
+INSERT INTO t1 (id, grp, id_rev) VALUES (@id, @grp, @id_rev);
+set @@read_buffer_size=2*1024*1024;
+CREATE TABLE t2 SELECT * FROM t1;
+INSERT INTO t1 (id, grp, id_rev) SELECT id, grp, id_rev FROM t2;
+INSERT INTO t2 (id, grp, id_rev) SELECT id, grp, id_rev FROM t1;
+INSERT INTO t1 (id, grp, id_rev) SELECT id, grp, id_rev FROM t2;
+INSERT INTO t2 (id, grp, id_rev) SELECT id, grp, id_rev FROM t1;
+INSERT INTO t1 (id, grp, id_rev) SELECT id, grp, id_rev FROM t2;
+CREATE TABLE t3 (id INTEGER, grp TINYINT, id_rev INTEGER)
+ENGINE= MRG_MYISAM UNION= (t1, t2);
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+130
+SELECT COUNT(*) FROM t2;
+COUNT(*)
+80
+SELECT COUNT(*) FROM t3;
+COUNT(*)
+210
+SELECT COUNT(DISTINCT a1.id) FROM t3 AS a1, t3 AS a2
+WHERE a1.id = a2.id GROUP BY a2.grp;
+TRUNCATE TABLE t1;
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+0
+SELECT COUNT(*) FROM t2;
+COUNT(*)
+80
+SELECT COUNT(*) FROM t3;
+COUNT(*)
+80
+DROP TABLE t1, t2, t3;
+CREATE TABLE t1 (c1 INT) ENGINE=MyISAM;
+CREATE TABLE t2 (c1 INT) ENGINE=MRG_MYISAM UNION=(t1) INSERT_METHOD=LAST;
+INSERT INTO t2 VALUES (1);
+SELECT * FROM t2;
+c1
+1
+LOCK TABLES t2 WRITE, t1 WRITE;
+FLUSH TABLES;
+REPAIR TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 repair status OK
+CHECK TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+REPAIR TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 repair status OK
+UNLOCK TABLES;
+CHECK TABLE t1 EXTENDED;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+LOCK TABLES t2 WRITE, t1 WRITE;
+REPAIR TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 repair status OK
+CHECK TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+REPAIR TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 repair status OK
+UNLOCK TABLES;
+CHECK TABLE t1 EXTENDED;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+DROP TABLE t1, t2;
+CREATE TABLE t1 ( a INT ) ENGINE=MyISAM;
+CREATE TABLE m1 ( a INT ) ENGINE=MRG_MYISAM UNION=(t1);
+LOCK TABLES t1 WRITE, m1 WRITE;
+FLUSH TABLE t1;
+UNLOCK TABLES;
+DROP TABLE m1, t1;
+CREATE TABLE t1 ( a INT ) ENGINE=MyISAM;
+CREATE TABLE m1 ( a INT ) ENGINE=MRG_MYISAM UNION=(t1);
+LOCK TABLES m1 WRITE, t1 WRITE;
+FLUSH TABLE t1;
+UNLOCK TABLES;
+DROP TABLE m1, t1;
+CREATE TABLE t1 (c1 INT, c2 INT) ENGINE= MyISAM;
+CREATE TABLE t2 (c1 INT, c2 INT) ENGINE= MyISAM;
+CREATE TABLE t3 (c1 INT, c2 INT) ENGINE= MRG_MYISAM UNION(t1, t2);
+INSERT INTO t1 VALUES (1, 1);
+INSERT INTO t2 VALUES (2, 2);
+SELECT * FROM t3;
+c1 c2
+1 1
+2 2
+ALTER TABLE t1 ENGINE= MEMORY;
+INSERT INTO t1 VALUES (0, 0);
+SELECT * FROM t3;
+ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
+DROP TABLE t1, t2, t3;
+CREATE TABLE t1 (c1 INT, KEY(c1));
+CREATE TABLE t2 (c1 INT, KEY(c1)) ENGINE=MRG_MYISAM UNION=(t1)
+INSERT_METHOD=FIRST;
+LOCK TABLE t1 WRITE, t2 WRITE;
+FLUSH TABLES t2, t1;
+OPTIMIZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 optimize status Table is already up to date
+FLUSH TABLES t1;
+UNLOCK TABLES;
+FLUSH TABLES;
+INSERT INTO t1 VALUES (1);
+LOCK TABLE t1 WRITE, t2 WRITE;
+FLUSH TABLES t2, t1;
+OPTIMIZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 optimize status OK
+FLUSH TABLES t1;
+UNLOCK TABLES;
+DROP TABLE t1, t2;
+CREATE TABLE t1 (ID INT) ENGINE=MYISAM;
+CREATE TABLE m1 (ID INT) ENGINE=MRG_MYISAM UNION=(t1) INSERT_METHOD=FIRST;
+INSERT INTO t1 VALUES ();
+INSERT INTO m1 VALUES ();
+LOCK TABLE t1 WRITE, m1 WRITE;
+FLUSH TABLES m1, t1;
+OPTIMIZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 optimize status OK
+FLUSH TABLES m1, t1;
+UNLOCK TABLES;
+DROP TABLE t1, m1;
diff --git a/mysql-test/r/merge_innodb.result b/mysql-test/r/merge_innodb.result
new file mode 100644
index 00000000000..f6057d279b1
--- /dev/null
+++ b/mysql-test/r/merge_innodb.result
@@ -0,0 +1,37 @@
+DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
+CREATE TABLE t1 (c1 varchar(100)) ENGINE=MyISAM;
+CREATE TABLE t2 (c1 varchar(100)) ENGINE=MyISAM;
+CREATE TABLE t3 (c1 varchar(100)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES ('Ann'), ('Alice');
+INSERT INTO t2 VALUES ('Bob'), ('Brian');
+INSERT INTO t3 VALUES ('Chris'), ('Charlie');
+CREATE TABLE t4 (c1 varchar(100)) ENGINE=MRG_MYISAM UNION=(t1,t2)
+INSERT_METHOD=LAST;
+CREATE TABLE t5 (c1 varchar(100)) ENGINE=MRG_MYISAM UNION=(t1,t3)
+INSERT_METHOD=LAST;
+SELECT * FROM t5;
+ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
+SELECT * FROM t4;
+c1
+Ann
+Alice
+Bob
+Brian
+ALTER TABLE t2 ENGINE=InnoDB;
+SELECT * FROM t4;
+ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
+DELETE FROM t2 LIMIT 1;
+SELECT * FROM t4;
+ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
+INSERT INTO t4 VALUES ('Beware');
+ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
+SELECT * FROM t4;
+ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
+SELECT * FROM t2;
+c1
+Brian
+SELECT * FROM t1;
+c1
+Ann
+Alice
+DROP TABLE t1, t2, t3, t4, t5;
diff --git a/mysql-test/r/metadata.result b/mysql-test/r/metadata.result
index 4a776b6a253..76c6ae7d034 100644
--- a/mysql-test/r/metadata.result
+++ b/mysql-test/r/metadata.result
@@ -21,7 +21,7 @@ def test t1 t1 g g 5 4 0 Y 32768 3 63
def test t1 t1 h h 246 7 0 Y 0 4 63
def test t1 t1 i i 13 4 0 Y 32864 0 63
def test t1 t1 j j 10 10 0 Y 128 0 63
-def test t1 t1 k k 7 19 0 N 1249 0 63
+def test t1 t1 k k 7 19 0 N 9441 0 63
def test t1 t1 l l 12 19 0 Y 128 0 63
def test t1 t1 m m 254 1 0 Y 256 0 8
def test t1 t1 n n 254 3 0 Y 2048 0 8
diff --git a/mysql-test/r/multi_update.result b/mysql-test/r/multi_update.result
index 55e47756312..0bc01e95d2d 100644
--- a/mysql-test/r/multi_update.result
+++ b/mysql-test/r/multi_update.result
@@ -614,6 +614,7 @@ CREATE TABLE `t2` (
`b` int(11) default NULL,
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
+set @sav_binlog_format= @@session.binlog_format;
set @@session.binlog_format= mixed;
insert into t1 values (1,1),(2,2);
insert into t2 values (1,1),(4,4);
@@ -626,7 +627,7 @@ a b
4 4
show master status /* there must be the UPDATE query event */;
File Position Binlog_Do_DB Binlog_Ignore_DB
-master-bin.000001 197
+master-bin.000001 268
delete from t1;
delete from t2;
insert into t1 values (1,2),(3,4),(4,4);
@@ -636,6 +637,24 @@ UPDATE t2,t1 SET t2.a=t2.b where t2.a=t1.a;
ERROR 23000: Duplicate entry '4' for key 'PRIMARY'
show master status /* there must be the UPDATE query event */;
File Position Binlog_Do_DB Binlog_Ignore_DB
-master-bin.000001 212
+master-bin.000001 283
drop table t1, t2;
+set @@session.binlog_format= @sav_binlog_format;
+drop table if exists t1, t2, t3;
+CREATE TABLE t1 (a int, PRIMARY KEY (a));
+CREATE TABLE t2 (a int, PRIMARY KEY (a));
+CREATE TABLE t3 (a int, PRIMARY KEY (a)) ENGINE=MyISAM;
+create trigger trg_del_t3 before delete on t3 for each row insert into t1 values (1);
+insert into t2 values (1),(2);
+insert into t3 values (1),(2);
+reset master;
+delete t3.* from t2,t3 where t2.a=t3.a;
+ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
+select count(*) from t1 /* must be 1 */;
+count(*)
+1
+select count(*) from t3 /* must be 1 */;
+count(*)
+1
+drop table t1, t2, t3;
end of tests
diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result
index cb9c3355f7a..9c861b446a4 100644
--- a/mysql-test/r/myisam.result
+++ b/mysql-test/r/myisam.result
@@ -606,24 +606,6 @@ select count(*) from t1 where a is null;
count(*)
2
drop table t1;
-create table t1 (c1 int, index(c1));
-create table t2 (c1 int, index(c1)) engine=merge union=(t1);
-insert into t1 values (1);
-flush tables;
-select * from t2;
-c1
-1
-flush tables;
-truncate table t1;
-insert into t1 values (1);
-flush tables;
-select * from t2;
-c1
-1
-truncate table t1;
-ERROR HY000: MyISAM table 't1' is in use (most likely by a MERGE table). Try FLUSH TABLES.
-insert into t1 values (1);
-drop table t1,t2;
create table t1 (c1 int, c2 varchar(4) not null default '',
key(c2(3))) default charset=utf8;
insert into t1 values (1,'A'), (2, 'B'), (3, 'A');
@@ -1794,6 +1776,61 @@ SELECT a FROM t1 FORCE INDEX (inx) WHERE a=1;
a
1
DROP TABLE t1;
+CREATE TABLE t1 (c1 INT, c2 INT, UNIQUE INDEX (c1), INDEX (c2)) ENGINE=MYISAM;
+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 Fixed 0 # # # 1024 # # # # # # #
+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 MyISAM 10 Fixed 1 # # # 3072 # # # # # # #
+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 MyISAM 10 Fixed 1 # # # 3072 # # # # # # #
+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 MyISAM 10 Fixed 1 # # # 3072 # # # # # # #
+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 MyISAM 10 Fixed 1 # # # 3072 # # # # # # #
+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 MyISAM 10 Fixed 1 # # # 3072 # # # # # # #
+# Enable keys with parallel repair
+SET @@myisam_repair_threads=2;
+ALTER TABLE t1 DISABLE KEYS;
+ALTER TABLE t1 ENABLE KEYS;
+SET @@myisam_repair_threads=1;
+CHECK TABLE t1 EXTENDED;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+DROP TABLE t1;
+CREATE TABLE t1 (id int NOT NULL, ref int NOT NULL, INDEX (id)) ENGINE=MyISAM;
+CREATE TABLE t2 LIKE t1;
+INSERT INTO t2 (id, ref) VALUES (1,3), (2,1), (3,2), (4,5), (4,4);
+INSERT INTO t1 SELECT * FROM t2;
+SELECT * FROM t1 AS a INNER JOIN t1 AS b USING (id) WHERE a.ref < b.ref;
+id ref ref
+4 4 5
+SELECT * FROM t1;
+id ref
+1 3
+2 1
+3 2
+4 5
+4 4
+DELETE FROM a USING t1 AS a INNER JOIN t1 AS b USING (id) WHERE a.ref < b.ref;
+SELECT * FROM t1;
+id ref
+1 3
+2 1
+3 2
+4 5
+DROP TABLE t1, t2;
End of 5.0 tests
create table t1 (a int not null, key `a` (a) key_block_size=1024);
show create table t1;
diff --git a/mysql-test/r/myisampack.result b/mysql-test/r/myisampack.result
new file mode 100644
index 00000000000..5f39d318234
--- /dev/null
+++ b/mysql-test/r/myisampack.result
@@ -0,0 +1,29 @@
+CREATE TABLE t1(c1 DOUBLE, c2 DOUBLE, c3 DOUBLE, c4 DOUBLE, c5 DOUBLE,
+c6 DOUBLE, c7 DOUBLE, c8 DOUBLE, c9 DOUBLE, a INT PRIMARY KEY);
+INSERT INTO t1 VALUES
+(-3.31168791059336e-06,-3.19054655887874e-06,-1.06528081684847e-05,-1.227278240089e-06,-1.66718069164799e-06,-2.59038972510885e-06,-2.83145227805303e-06,-4.09678491270648e-07,-2.22610091291797e-06,6),
+(0.0030743000272545,2.53222044316438e-05,2.78674650061845e-05,1.95914465544536e-05,1.7347572525984e-05,1.87513810069614e-05,1.69882826885005e-05,2.44449336987598e-05,1.89914629921774e-05,9),
+(2.85229319423495e-05,3.05970988282259e-05,3.77161100113133e-05,2.3055238978766e-05,2.08241267364615e-05,2.28009504270553e-05,2.12070165658947e-05,2.84350091565409e-05,2.3366822910704e-05,3),
+(0,0,0,0,0,0,0,0,0,12),
+(3.24544577570754e-05,3.44619021870993e-05,4.37561613201124e-05,2.57556808726748e-05,2.3195354640561e-05,2.58532400758869e-05,2.34934241667179e-05,3.1621640063232e-05,2.58229982746189e-05,19),
+(2.53222044316438e-05,0.00445071933455582,2.97447268116016e-05,2.12379514059868e-05,1.86777776502663e-05,2.0170058676712e-05,1.8946030385445e-05,2.66040037173511e-05,2.09161899668946e-05,20),
+(3.03462382611645e-05,3.26517930083994e-05,3.5242025468662e-05,2.53219745106391e-05,2.24384532945004e-05,2.4052346047657e-05,2.23865572957053e-05,3.1634313969082e-05,2.48285463481801e-05,21),
+(1.95914465544536e-05,2.12379514059868e-05,2.27808649037128e-05,0.000341724375366877,1.4512761275113e-05,1.56475828693953e-05,1.44372366441415e-05,2.07952121981765e-05,1.61488256935919e-05,28),
+(1.7347572525984e-05,1.86777776502663e-05,2.04116907052727e-05,1.4512761275113e-05,0.000432162526082388,1.38116514014465e-05,1.2712914948904e-05,1.82503165178506e-05,1.43043075345922e-05,30),
+(1.68339762136661e-05,1.77836497166611e-05,2.36328309295222e-05,1.30183423732016e-05,1.18674654241553e-05,1.32467273128652e-05,1.24581739117775e-05,1.55624190959406e-05,1.33010638508213e-05,31),
+(1.89643062824415e-05,2.06997140070717e-05,2.29045490159364e-05,1.57918175731019e-05,1.39864987449492e-05,1.50580274578455e-05,1.45908734129609e-05,1.95329296993327e-05,1.5814709481221e-05,32),
+(1.69882826885005e-05,1.8946030385445e-05,2.00820439721439e-05,1.44372366441415e-05,1.2712914948904e-05,1.35209686474184e-05,0.00261563314789896,1.78285095864627e-05,1.46699314500019e-05,34),
+(2.0278186540684e-05,2.18923409729654e-05,2.39981539939738e-05,1.71774589459438e-05,1.54654355357383e-05,1.62731485707636e-05,1.49253140625051e-05,2.18229800160297e-05,1.71923561673718e-05,35),
+(2.44449336987598e-05,2.66040037173511e-05,2.84860148925308e-05,2.07952121981765e-05,1.82503165178506e-05,1.97667730441441e-05,1.78285095864627e-05,0.00166478601822712,2.0299952103232e-05,36),
+(1.89914629921774e-05,2.09161899668946e-05,2.26026841007872e-05,1.61488256935919e-05,1.43043075345922e-05,1.52609063290127e-05,1.46699314500019e-05,2.0299952103232e-05,0.00306670170971682,39),
+(0,0,0,0,0,0,0,0,0,41),
+(0,0,0,0,0,0,0,0,0,17),
+(0,0,0,0,0,0,0,0,0,18),
+(2.51880677333017e-05,2.63051795435778e-05,2.79874748974906e-05,2.02888886670845e-05,1.8178636318197e-05,1.91308527003585e-05,1.83260023644133e-05,2.4422300558171e-05,1.96411467520551e-05,44),
+(2.22402118719591e-05,2.37546284320705e-05,2.58463051055541e-05,1.83391609130854e-05,1.6300720519646e-05,1.74559091886791e-05,1.63733785575587e-05,2.26616253279828e-05,1.79541237435621e-05,45),
+(3.01092775359837e-05,3.23865212934412e-05,4.09444584045994e-05,0,2.15470966302776e-05,2.39082636344032e-05,2.28296706429177e-05,2.9007671511595e-05,2.44201138973326e-05,46);
+FLUSH TABLES;
+CHECK TABLE t1 EXTENDED;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+DROP TABLE t1;
diff --git a/mysql-test/r/mysql.result b/mysql-test/r/mysql.result
index 4e39fb28454..a4d96c1c243 100644
--- a/mysql-test/r/mysql.result
+++ b/mysql-test/r/mysql.result
@@ -178,5 +178,14 @@ ERROR at line 1: DELIMITER cannot contain a backslash character
1
1
1
+This is a file starting with UTF8 BOM 0xEFBBBF
+This is a file starting with UTF8 BOM 0xEFBBBF
End of 5.0 tests
WARNING: --server-arg option not supported in this configuration.
+Warning (Code 1286): Unknown table engine 'nonexistent'
+Warning (Code 1266): Using storage engine MyISAM for table 't2'
+Warning (Code 1286): Unknown table engine 'nonexistent2'
+Warning (Code 1266): Using storage engine MyISAM for table 't2'
+Error (Code 1050): Table 't2' already exists
+drop tables t1, t2;
+End of tests
diff --git a/mysql-test/r/mysql_comments.result b/mysql-test/r/mysql_comments.result
new file mode 100644
index 00000000000..7f1c0b50c5e
--- /dev/null
+++ b/mysql-test/r/mysql_comments.result
@@ -0,0 +1,62 @@
+drop table if exists t1;
+drop function if exists foofct;
+drop procedure if exists empty;
+drop procedure if exists foosp;
+drop procedure if exists nicesp;
+drop trigger if exists t1_empty;
+drop trigger if exists t1_bi;
+"Pass 1 : --disable-comments"
+1
+1
+2
+2
+foofct("call 1")
+call 1
+Function sql_mode Create Function character_set_client collation_connection Database Collation
+foofct CREATE DEFINER=`root`@`localhost` FUNCTION `foofct`(x char(20)) RETURNS char(20) CHARSET latin1\nreturn\n\n\n\nx latin1 latin1_swedish_ci latin1_swedish_ci
+foofct("call 2")
+call 2
+Function sql_mode Create Function character_set_client collation_connection Database Collation
+foofct CREATE DEFINER=`root`@`localhost` FUNCTION `foofct`(x char(20)) RETURNS char(20) CHARSET latin1\nbegin\n \n \n \n\n \n\n \n return x;\nend latin1 latin1_swedish_ci latin1_swedish_ci
+Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
+empty CREATE DEFINER=`root`@`localhost` PROCEDURE `empty`()\nbegin\nend latin1 latin1_swedish_ci latin1_swedish_ci
+id data
+foo 42
+Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
+foosp CREATE DEFINER=`root`@`localhost` PROCEDURE `foosp`()\ninsert into test.t1\n\n\n\n\n \n\n \n values ("foo", 42) latin1 latin1_swedish_ci latin1_swedish_ci
+Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
+nicesp CREATE DEFINER=`root`@`localhost` PROCEDURE `nicesp`(a int)\nbegin\n \n declare b int;\n declare c float;\n\n \n \n\n \nend latin1 latin1_swedish_ci latin1_swedish_ci
+Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation
+t1_empty CREATE DEFINER=`root`@`localhost` trigger t1_empty after delete on t1\nfor each row\nbegin\nend latin1 latin1_swedish_ci latin1_swedish_ci
+Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation
+t1_bi CREATE DEFINER=`root`@`localhost` trigger t1_bi before insert on t1\nfor each row\nbegin\n\n\n\n \n declare b int;\n declare c float;\n\n \n \n\n \n set NEW.data := 12;\nend latin1 latin1_swedish_ci latin1_swedish_ci
+id data
+trig 12
+"Pass 2 : --enable-comments"
+1
+1
+2
+2
+foofct("call 1")
+call 1
+Function sql_mode Create Function character_set_client collation_connection Database Collation
+foofct CREATE DEFINER=`root`@`localhost` FUNCTION `foofct`(x char(20)) RETURNS char(20) CHARSET latin1\nreturn\n-- comment 1a\n# comment 1b\n/* comment 1c */\nx # after body, on same line latin1 latin1_swedish_ci latin1_swedish_ci
+foofct("call 2")
+call 2
+Function sql_mode Create Function character_set_client collation_connection Database Collation
+foofct CREATE DEFINER=`root`@`localhost` FUNCTION `foofct`(x char(20)) RETURNS char(20) CHARSET latin1\nbegin\n -- comment 1a\n # comment 1b\n /*\n comment 1c\n */\n\n -- empty line below\n\n -- empty line above\n return x;\nend latin1 latin1_swedish_ci latin1_swedish_ci
+Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
+empty CREATE DEFINER=`root`@`localhost` PROCEDURE `empty`()\nbegin\nend latin1 latin1_swedish_ci latin1_swedish_ci
+id data
+foo 42
+Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
+foosp CREATE DEFINER=`root`@`localhost` PROCEDURE `foosp`()\ninsert into test.t1\n## These comments are part of the procedure body, and should be kept.\n# Comment 2a\n-- Comment 2b\n/* Comment 2c */\n -- empty line below\n\n -- empty line above\n values ("foo", 42) # comment 3, still part of the body latin1 latin1_swedish_ci latin1_swedish_ci
+Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
+nicesp CREATE DEFINER=`root`@`localhost` PROCEDURE `nicesp`(a int)\nbegin\n -- declare some variables here\n declare b int;\n declare c float;\n\n -- do more stuff here\n -- commented nicely and so on\n\n -- famous last words ...\nend latin1 latin1_swedish_ci latin1_swedish_ci
+Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation
+t1_empty CREATE DEFINER=`root`@`localhost` trigger t1_empty after delete on t1\nfor each row\nbegin\nend latin1 latin1_swedish_ci latin1_swedish_ci
+Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation
+t1_bi CREATE DEFINER=`root`@`localhost` trigger t1_bi before insert on t1\nfor each row\nbegin\n# comment 1a\n-- comment 1b\n/*\n comment 1c\n*/\n -- declare some variables here\n declare b int;\n declare c float;\n\n -- do more stuff here\n -- commented nicely and so on\n\n -- famous last words ...\n set NEW.data := 12;\nend latin1 latin1_swedish_ci latin1_swedish_ci
+id data
+trig 12
+End of 5.0 tests
diff --git a/mysql-test/r/mysqlbinlog.result b/mysql-test/r/mysqlbinlog.result
index f10ae4b4df5..e6485720c49 100644
--- a/mysql-test/r/mysqlbinlog.result
+++ b/mysql-test/r/mysqlbinlog.result
@@ -326,6 +326,30 @@ flush logs;
drop table t1;
1
drop table t1;
+shell> mysqlbinlog std_data/corrupt-relay-bin.000624 > var/tmp/bug31793.sql
End of 5.0 tests
flush logs;
+BUG#31611: Security risk with BINLOG statement
+SET BINLOG_FORMAT=ROW;
+CREATE DATABASE mysqltest1;
+CREATE USER untrusted@localhost;
+GRANT SELECT ON mysqltest1.* TO untrusted@localhost;
+SHOW GRANTS FOR untrusted@localhost;
+Grants for untrusted@localhost
+GRANT USAGE ON *.* TO 'untrusted'@'localhost'
+GRANT SELECT ON `mysqltest1`.* TO 'untrusted'@'localhost'
+USE mysqltest1;
+CREATE TABLE t1 (a INT, b CHAR(64));
+flush logs;
+INSERT INTO t1 VALUES (1,USER());
+flush logs;
+mysqlbinlog var/log/master-bin.000017 > var/tmp/bug31611.sql
+mysql mysqltest1 -uuntrusted < var/tmp/bug31611.sql
+INSERT INTO t1 VALUES (1,USER());
+ERROR 42000: INSERT command denied to user 'untrusted'@'localhost' for table 't1'
+SELECT * FROM t1;
+a b
+1 root@localhost
+DROP DATABASE mysqltest1;
+DROP USER untrusted@localhost;
End of 5.1 tests
diff --git a/mysql-test/r/mysqlcheck.result b/mysql-test/r/mysqlcheck.result
index b8ada0adff9..047b2662b1b 100644
--- a/mysql-test/r/mysqlcheck.result
+++ b/mysql-test/r/mysqlcheck.result
@@ -1,4 +1,4 @@
-DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t1, `t``1`, `t 1`;
drop view if exists v1;
drop database if exists client_test_db;
mysql.columns_priv OK
@@ -57,4 +57,27 @@ test.t1 OK
test.t1 OK
drop view v1;
drop table t1;
+create table `t``1`(a int);
+create table `t 1`(a int);
+test.t 1 OK
+test.t`1 OK
+drop table `t``1`, `t 1`;
End of 5.0 tests
+create table t1(a int);
+create view v1 as select * from t1;
+show tables;
+Tables_in_test
+t1
+v1
+show tables;
+Tables_in_test
+t1
+#mysql50#v-1
+v1
+show tables;
+Tables_in_test
+t1
+v1
+v-1
+drop view v1, `v-1`;
+drop table t1;
diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result
index e7fca6341e7..6d0e1aaab29 100644
--- a/mysql-test/r/mysqldump.result
+++ b/mysql-test/r/mysqldump.result
@@ -3805,6 +3805,28 @@ c1
2
DROP TABLE t1,t2;
#
+# Bug#29815: new option for suppressing last line of mysqldump:
+# "Dump completed on"
+#
+# --skip-dump-date:
+--
+
+
+
+-- Dump completed
+# --dump-date:
+--
+
+
+
+-- Dump completed on DATE
+# --dump-date (default):
+--
+
+
+
+-- Dump completed on DATE
+#
# End of 5.0 tests
#
drop table if exists t1;
@@ -4190,5 +4212,24 @@ TRUNCATE mysql.event;
SHOW EVENTS;
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
#
+# Bug#31113 mysqldump 5.1 can't handle a dash ("-") in database names
+#
+create database `test-database`;
+use `test-database`;
+create table test (a int);
+DROP TABLE IF EXISTS `test`;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+CREATE TABLE `test` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+SET character_set_client = @saved_cs_client;
+LOCK TABLES `test` WRITE;
+/*!40000 ALTER TABLE `test` DISABLE KEYS */;
+/*!40000 ALTER TABLE `test` ENABLE KEYS */;
+UNLOCK TABLES;
+drop database `test-database`;
+use test;
+#
# End of 5.1 tests
#
diff --git a/mysql-test/r/mysqlslap.result b/mysql-test/r/mysqlslap.result
index dfe721d10d2..9207dd48d0e 100644
--- a/mysql-test/r/mysqlslap.result
+++ b/mysql-test/r/mysqlslap.result
@@ -211,3 +211,9 @@ COMMIT;
COMMIT;
SHOW TABLES;
DROP SCHEMA IF EXISTS `mysqlslap`;
+#
+# Bug #29985: mysqlslap -- improper handling of resultsets in SPROCs
+#
+DROP PROCEDURE IF EXISTS p1;
+CREATE PROCEDURE p1() SELECT 1;
+DROP PROCEDURE p1;
diff --git a/mysql-test/r/mysqltest.result b/mysql-test/r/mysqltest.result
index d03e21b1bb0..a7df1a523cf 100644
--- a/mysql-test/r/mysqltest.result
+++ b/mysql-test/r/mysqltest.result
@@ -722,4 +722,7 @@ a int(11) YES NULL
b varchar(255) YES NULL
c datetime YES NULL
drop table t1;
+mysqltest: At line 1: change user failed: Unknown database 'inexistent'
+mysqltest: At line 1: change user failed: Access denied for user 'inexistent'@'localhost' (using password: NO)
+mysqltest: At line 1: change user failed: Access denied for user 'root'@'localhost' (using password: YES)
End of tests
diff --git a/mysql-test/r/named_pipe.result b/mysql-test/r/named_pipe.result
new file mode 100644
index 00000000000..eb93c5f6344
--- /dev/null
+++ b/mysql-test/r/named_pipe.result
@@ -0,0 +1,2153 @@
+drop table if exists t1,t2,t3,t4;
+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` <> _latin1''))
+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;
+CREATE TABLE t1 (
+cont_nr int(11) NOT NULL auto_increment,
+ver_nr int(11) NOT NULL default '0',
+aufnr int(11) NOT NULL default '0',
+username varchar(50) NOT NULL default '',
+hdl_nr int(11) NOT NULL default '0',
+eintrag date NOT NULL default '0000-00-00',
+st_klasse varchar(40) NOT NULL default '',
+st_wert varchar(40) NOT NULL default '',
+st_zusatz varchar(40) NOT NULL default '',
+st_bemerkung varchar(255) NOT NULL default '',
+kunden_art varchar(40) NOT NULL default '',
+mcbs_knr int(11) default NULL,
+mcbs_aufnr int(11) NOT NULL default '0',
+schufa_status char(1) default '?',
+bemerkung text,
+wirknetz text,
+wf_igz int(11) NOT NULL default '0',
+tarifcode varchar(80) default NULL,
+recycle char(1) default NULL,
+sim varchar(30) default NULL,
+mcbs_tpl varchar(30) default NULL,
+emp_nr int(11) NOT NULL default '0',
+laufzeit int(11) default NULL,
+hdl_name varchar(30) default NULL,
+prov_hdl_nr int(11) NOT NULL default '0',
+auto_wirknetz varchar(50) default NULL,
+auto_billing varchar(50) default NULL,
+touch timestamp NOT NULL,
+kategorie varchar(50) default NULL,
+kundentyp varchar(20) NOT NULL default '',
+sammel_rech_msisdn varchar(30) NOT NULL default '',
+p_nr varchar(9) NOT NULL default '',
+suffix char(3) NOT NULL default '',
+PRIMARY KEY (cont_nr),
+KEY idx_aufnr(aufnr),
+KEY idx_hdl_nr(hdl_nr),
+KEY idx_st_klasse(st_klasse),
+KEY ver_nr(ver_nr),
+KEY eintrag_idx(eintrag),
+KEY emp_nr_idx(emp_nr),
+KEY wf_igz(wf_igz),
+KEY touch(touch),
+KEY hdl_tag(eintrag,hdl_nr),
+KEY prov_hdl_nr(prov_hdl_nr),
+KEY mcbs_aufnr(mcbs_aufnr),
+KEY kundentyp(kundentyp),
+KEY p_nr(p_nr,suffix)
+) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (3359356,405,3359356,'Mustermann Musterfrau',52500,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1485525,2122316,'+','','N',1909160,'MobilComSuper92000D2',NULL,NULL,'MS9ND2',3,24,'MobilCom Shop Koeln',52500,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
+INSERT INTO t1 VALUES (3359357,468,3359357,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1503580,2139699,'+','','P',1909171,'MobilComSuper9D1T10SFreisprech(Akquise)',NULL,NULL,'MS9NS1',327,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
+INSERT INTO t1 VALUES (3359358,407,3359358,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1501358,2137473,'N','','N',1909159,'MobilComSuper92000D2',NULL,NULL,'MS9ND2',325,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
+INSERT INTO t1 VALUES (3359359,468,3359359,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1507831,2143894,'+','','P',1909162,'MobilComSuper9D1T10SFreisprech(Akquise)',NULL,NULL,'MS9NS1',327,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
+INSERT INTO t1 VALUES (3359360,0,0,'Mustermann Musterfrau',29674907,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1900169997,2414578,'+',NULL,'N',1909148,'',NULL,NULL,'RV99066_2',20,NULL,'POS',29674907,NULL,NULL,20010202105916,'Mobilfunk','','','97317481','007');
+INSERT INTO t1 VALUES (3359361,406,3359361,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag storniert','','(7001-84):Storno, Kd. möchte nicht mehr','privat',NULL,0,'+','','P',1909150,'MobilComSuper92000D1(Akquise)',NULL,NULL,'MS9ND1',325,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
+INSERT INTO t1 VALUES (3359362,406,3359362,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1509984,2145874,'+','','P',1909154,'MobilComSuper92000D1(Akquise)',NULL,NULL,'MS9ND1',327,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
+SELECT ELT(FIELD(kundentyp,'PP','PPA','PG','PGA','FK','FKA','FP','FPA','K','KA','V','VA',''), 'Privat (Private Nutzung)','Privat (Private Nutzung) Sitz im Ausland','Privat (geschaeftliche Nutzung)','Privat (geschaeftliche Nutzung) Sitz im Ausland','Firma (Kapitalgesellschaft)','Firma (Kapitalgesellschaft) Sitz im Ausland','Firma (Personengesellschaft)','Firma (Personengesellschaft) Sitz im Ausland','oeff. rechtl. Koerperschaft','oeff. rechtl. Koerperschaft Sitz im Ausland','Eingetragener Verein','Eingetragener Verein Sitz im Ausland','Typ unbekannt') AS Kundentyp ,kategorie FROM t1 WHERE hdl_nr < 2000000 AND kategorie IN ('Prepaid','Mobilfunk') AND st_klasse = 'Workflow' GROUP BY kundentyp ORDER BY kategorie;
+Kundentyp kategorie
+Privat (Private Nutzung) Mobilfunk
+Warnings:
+Warning 1052 Column 'kundentyp' in group statement is ambiguous
+drop table t1;
diff --git a/mysql-test/r/no-threads.result b/mysql-test/r/no-threads.result
index 50e52138be8..aefecd0f7bc 100644
--- a/mysql-test/r/no-threads.result
+++ b/mysql-test/r/no-threads.result
@@ -4,3 +4,6 @@ select 1+1;
select 1+2;
1+2
3
+SHOW GLOBAL VARIABLES LIKE 'thread_handling';
+Variable_name Value
+thread_handling no-threads
diff --git a/mysql-test/r/null.result b/mysql-test/r/null.result
index bf9d9764db2..345c9b07b98 100644
--- a/mysql-test/r/null.result
+++ b/mysql-test/r/null.result
@@ -1,4 +1,4 @@
-drop table if exists t1;
+drop table if exists t1, t2;
select null,\N,isnull(null),isnull(1/0),isnull(1/0 = null),ifnull(null,1),ifnull(null,"TRUE"),ifnull("TRUE","ERROR"),1/0 is null,1 is not null;
NULL NULL isnull(null) isnull(1/0) isnull(1/0 = null) ifnull(null,1) ifnull(null,"TRUE") ifnull("TRUE","ERROR") 1/0 is null 1 is not null
NULL NULL 1 1 1 1 TRUE TRUE 1 1
@@ -320,3 +320,26 @@ bug19145c CREATE TABLE `bug19145c` (
drop table bug19145a;
drop table bug19145b;
drop table bug19145c;
+# End of 4.1 tests
+#
+# Bug #31471: decimal_bin_size: Assertion `scale >= 0 &&
+# precision > 0 && scale <= precision'
+#
+CREATE TABLE t1 (a DECIMAL (1, 0) ZEROFILL, b DECIMAL (1, 0) ZEROFILL);
+INSERT INTO t1 (a, b) VALUES (0, 0);
+CREATE TABLE t2 SELECT IFNULL(a, b) FROM t1;
+DESCRIBE t2;
+Field Type Null Key Default Extra
+IFNULL(a, b) decimal(1,0) unsigned YES NULL
+DROP TABLE t2;
+CREATE TABLE t2 SELECT IFNULL(a, NULL) FROM t1;
+DESCRIBE t2;
+Field Type Null Key Default Extra
+IFNULL(a, NULL) decimal(1,0) YES NULL
+DROP TABLE t2;
+CREATE TABLE t2 SELECT IFNULL(NULL, b) FROM t1;
+DESCRIBE t2;
+Field Type Null Key Default Extra
+IFNULL(NULL, b) decimal(1,0) YES NULL
+DROP TABLE t1, t2;
+# End of 5.0 tests
diff --git a/mysql-test/r/olap.result b/mysql-test/r/olap.result
index 67c45b698ce..4540c9d5218 100644
--- a/mysql-test/r/olap.result
+++ b/mysql-test/r/olap.result
@@ -715,3 +715,22 @@ a SUM(a)
4 4
NULL 14
DROP TABLE t1;
+#
+# Bug#31095: Unexpected NULL constant caused server crash.
+#
+create table t1(a int);
+insert into t1 values (1),(2),(3);
+select count(a) from t1 group by null with rollup;
+count(a)
+3
+3
+drop table t1;
+##############################################################
+CREATE TABLE t1(a INT);
+INSERT INTO t1 VALUES(0);
+SELECT 1 FROM t1 GROUP BY (DATE(NULL)) WITH ROLLUP;
+1
+1
+1
+DROP TABLE t1;
+End of 5.0 tests
diff --git a/mysql-test/r/order_by.result b/mysql-test/r/order_by.result
index ff4882d6cd8..3d0f4915d0a 100644
--- a/mysql-test/r/order_by.result
+++ b/mysql-test/r/order_by.result
@@ -1131,3 +1131,288 @@ id c3
186 14
196 14
DROP TABLE t1,t2;
+CREATE TABLE t1 (
+a INT,
+b INT,
+PRIMARY KEY (a),
+KEY ab(a, b)
+);
+INSERT INTO t1 VALUES (1,1),(2,2),(3,3),(4,4);
+INSERT INTO t1 SELECT a + 4, b + 4 FROM t1;
+INSERT INTO t1 SELECT a + 8, b + 8 FROM t1;
+INSERT INTO t1 SELECT a +16, b +16 FROM t1;
+INSERT INTO t1 SELECT a +32, b +32 FROM t1;
+INSERT INTO t1 SELECT a +64, b +64 FROM t1;
+EXPLAIN SELECT a FROM t1 IGNORE INDEX FOR GROUP BY (a, ab) GROUP BY a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range NULL ab 4 NULL 10 Using index for group-by
+SELECT a FROM t1 IGNORE INDEX FOR GROUP BY (a, ab) GROUP BY a;
+a
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+SELECT @tmp_tables_after = @tmp_tables_before ;
+@tmp_tables_after = @tmp_tables_before
+1
+EXPLAIN SELECT a FROM t1 IGNORE INDEX FOR ORDER BY (a, ab) ORDER BY a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 index NULL PRIMARY 4 NULL 128 Using index
+SELECT a FROM t1 IGNORE INDEX FOR ORDER BY (a, ab) ORDER BY a;
+a
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+SELECT @tmp_tables_after = @tmp_tables_before;
+@tmp_tables_after = @tmp_tables_before
+1
+DROP TABLE t1;
diff --git a/mysql-test/r/outfile_loaddata.result b/mysql-test/r/outfile_loaddata.result
new file mode 100644
index 00000000000..4a9bdcf412d
--- /dev/null
+++ b/mysql-test/r/outfile_loaddata.result
@@ -0,0 +1,103 @@
+DROP TABLE IF EXISTS t1, t2;
+#
+# Bug#31663 FIELDS TERMINATED BY special character
+#
+CREATE TABLE t1 (i1 int, i2 int, c1 VARCHAR(256), c2 VARCHAR(256));
+INSERT INTO t1 VALUES (101, 202, '-r-', '=raker=');
+# FIELDS TERMINATED BY 'raker', warning:
+SELECT * INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/bug31663.txt' FIELDS TERMINATED BY 'raker' FROM t1;
+Warnings:
+Warning 1475 First character of the FIELDS TERMINATED string is ambiguous; please use non-optional and non-empty FIELDS ENCLOSED BY
+SELECT LOAD_FILE('MYSQLTEST_VARDIR/tmp/bug31663.txt');
+LOAD_FILE('MYSQLTEST_VARDIR/tmp/bug31663.txt')
+101raker202raker-r-raker=raker=
+
+CREATE TABLE t2 SELECT * FROM t1;
+LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug31663.txt' INTO TABLE t2 FIELDS TERMINATED BY 'raker';
+Warnings:
+Warning 1262 Row 1 was truncated; it contained more data than there were input columns
+SELECT * FROM t2;
+i1 i2 c1 c2
+101 202 -r- =raker=
+101 202 -r- =
+DROP TABLE t2;
+# Only numeric fields, FIELDS TERMINATED BY 'r', no warnings:
+SELECT i1, i2 INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/bug31663.txt' FIELDS TERMINATED BY 'r' FROM t1;
+SELECT LOAD_FILE('MYSQLTEST_VARDIR/tmp/bug31663.txt');
+LOAD_FILE('MYSQLTEST_VARDIR/tmp/bug31663.txt')
+101r202
+
+CREATE TABLE t2 SELECT i1, i2 FROM t1;
+LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug31663.txt' INTO TABLE t2 FIELDS TERMINATED BY 'r';
+SELECT i1, i2 FROM t2;
+i1 i2
+101 202
+101 202
+DROP TABLE t2;
+# FIELDS TERMINATED BY '0', warning:
+SELECT * INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/bug31663.txt' FIELDS TERMINATED BY '0' FROM t1;
+Warnings:
+Warning 1475 First character of the FIELDS TERMINATED string is ambiguous; please use non-optional and non-empty FIELDS ENCLOSED BY
+SELECT LOAD_FILE('MYSQLTEST_VARDIR/tmp/bug31663.txt');
+LOAD_FILE('MYSQLTEST_VARDIR/tmp/bug31663.txt')
+10102020-r-0=raker=
+
+CREATE TABLE t2 SELECT * FROM t1;
+LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug31663.txt' INTO TABLE t2 FIELDS TERMINATED BY '0';
+Warnings:
+Warning 1262 Row 1 was truncated; it contained more data than there were input columns
+SELECT * FROM t2;
+i1 i2 c1 c2
+101 202 -r- =raker=
+1 1 2 2
+DROP TABLE t2;
+# FIELDS OPTIONALLY ENCLOSED BY '"' TERMINATED BY '0', warning:
+SELECT * INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/bug31663.txt' FIELDS OPTIONALLY ENCLOSED BY '"' TERMINATED BY '0' FROM t1;
+Warnings:
+Warning 1475 First character of the FIELDS TERMINATED string is ambiguous; please use non-optional and non-empty FIELDS ENCLOSED BY
+SELECT LOAD_FILE('MYSQLTEST_VARDIR/tmp/bug31663.txt');
+LOAD_FILE('MYSQLTEST_VARDIR/tmp/bug31663.txt')
+10102020"-r-"0"=raker="
+
+CREATE TABLE t2 SELECT * FROM t1;
+LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug31663.txt' INTO TABLE t2 FIELDS OPTIONALLY ENCLOSED BY '"' TERMINATED BY '0';
+Warnings:
+Warning 1262 Row 1 was truncated; it contained more data than there were input columns
+SELECT * FROM t2;
+i1 i2 c1 c2
+101 202 -r- =raker=
+1 1 2 2
+DROP TABLE t2;
+# Only string fields, FIELDS OPTIONALLY ENCLOSED BY '"' TERMINATED BY '0', no warnings:
+SELECT c1, c2 INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/bug31663.txt' FIELDS OPTIONALLY ENCLOSED BY '"' TERMINATED BY '0' FROM t1;
+SELECT LOAD_FILE('MYSQLTEST_VARDIR/tmp/bug31663.txt');
+LOAD_FILE('MYSQLTEST_VARDIR/tmp/bug31663.txt')
+"-r-"0"=raker="
+
+CREATE TABLE t2 SELECT c1, c2 FROM t1;
+LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug31663.txt' INTO TABLE t2 FIELDS OPTIONALLY ENCLOSED BY '"' TERMINATED BY '0';
+SELECT c1, c2 FROM t2;
+c1 c2
+-r- =raker=
+-r- =raker=
+DROP TABLE t2;
+DROP TABLE t1;
+#
+# Bug#32533: SELECT INTO OUTFILE never escapes multibyte character
+#
+CREATE TABLE t1 (c1 VARCHAR(256));
+INSERT INTO t1 VALUES (0xC3);
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+C3
+SELECT * INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/bug32533.txt' FIELDS ENCLOSED BY 0xC3 FROM t1;
+TRUNCATE t1;
+SELECT HEX(LOAD_FILE('MYSQLTEST_VARDIR/tmp/bug32533.txt'));
+HEX(LOAD_FILE('MYSQLTEST_VARDIR/tmp/bug32533.txt'))
+C35CC3C30A
+LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug32533.txt' INTO TABLE t1 FIELDS ENCLOSED BY 0xC3;
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+C3
+DROP TABLE t1;
+# End of 5.0 tests.
diff --git a/mysql-test/r/packet.result b/mysql-test/r/packet.result
index dfb5595e02d..df0d9ff9adc 100644
--- a/mysql-test/r/packet.result
+++ b/mysql-test/r/packet.result
@@ -1,7 +1,15 @@
set global max_allowed_packet=100;
+Warnings:
+Warning 1292 Truncated incorrect max_allowed_packet value: '100'
set max_allowed_packet=100;
+Warnings:
+Warning 1292 Truncated incorrect max_allowed_packet value: '100'
set global net_buffer_length=100;
+Warnings:
+Warning 1292 Truncated incorrect net_buffer_length value: '100'
set net_buffer_length=100;
+Warnings:
+Warning 1292 Truncated incorrect net_buffer_length value: '100'
SELECT length("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") as len;
len
1024
diff --git a/mysql-test/r/parser.result b/mysql-test/r/parser.result
index 76326f65f08..ef53f227ec0 100644
--- a/mysql-test/r/parser.result
+++ b/mysql-test/r/parser.result
@@ -484,3 +484,46 @@ select atan(10, 20 "p2");
ERROR 42000: Incorrect parameters in the call to native function 'atan'
select atan(10 AS p1, 20 AS p2);
ERROR 42000: Incorrect parameters in the call to native function 'atan'
+DROP TABLE IF EXISTS t1;
+SELECT STR_TO_DATE('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE;
+STR_TO_DATE('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE
+NULL
+SELECT STR_TO_DATE('10:00 PM', '%h:%i %p') + INTERVAL (INTERVAL(1,2,3) + 1) MINUTE;
+STR_TO_DATE('10:00 PM', '%h:%i %p') + INTERVAL (INTERVAL(1,2,3) + 1) MINUTE
+NULL
+SELECT "1997-12-31 23:59:59" + INTERVAL 1 SECOND;
+"1997-12-31 23:59:59" + INTERVAL 1 SECOND
+1998-01-01 00:00:00
+SELECT 1 + INTERVAL(1,0,1,2) + 1;
+1 + INTERVAL(1,0,1,2) + 1
+4
+SELECT INTERVAL(1^1,0,1,2) + 1;
+INTERVAL(1^1,0,1,2) + 1
+2
+SELECT INTERVAL(1,0+1,2,3) * 5.5;
+INTERVAL(1,0+1,2,3) * 5.5
+5.5
+SELECT INTERVAL(3,3,1+3,4+4) / 0.5;
+INTERVAL(3,3,1+3,4+4) / 0.5
+2.0000
+SELECT (INTERVAL(1,0,1,2) + 5) * 7 + INTERVAL(1,0,1,2) / 2;
+(INTERVAL(1,0,1,2) + 5) * 7 + INTERVAL(1,0,1,2) / 2
+50.0000
+SELECT INTERVAL(1,0,1,2) + 1, 5 * INTERVAL(1,0,1,2);
+INTERVAL(1,0,1,2) + 1 5 * INTERVAL(1,0,1,2)
+3 10
+SELECT INTERVAL(0,(1*5)/2) + INTERVAL(5,4,3);
+INTERVAL(0,(1*5)/2) + INTERVAL(5,4,3)
+2
+SELECT 1^1 + INTERVAL 1+1 SECOND & 1 + INTERVAL 1+1 SECOND;
+1^1 + INTERVAL 1+1 SECOND & 1 + INTERVAL 1+1 SECOND
+NULL
+SELECT 1%2 - INTERVAL 1^1 SECOND | 1%2 - INTERVAL 1^1 SECOND;
+1%2 - INTERVAL 1^1 SECOND | 1%2 - INTERVAL 1^1 SECOND
+NULL
+CREATE TABLE t1 (a INT, b DATETIME);
+INSERT INTO t1 VALUES (INTERVAL(3,2,1) + 1, "1997-12-31 23:59:59" + INTERVAL 1 SECOND);
+SELECT * FROM t1 WHERE a = INTERVAL(3,2,1) + 1;
+a b
+3 1998-01-01 00:00:00
+DROP TABLE t1;
diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result
index 5d985d053fc..a361a8f6bcc 100644
--- a/mysql-test/r/partition.result
+++ b/mysql-test/r/partition.result
@@ -1,4 +1,32 @@
drop table if exists t1;
+CREATE TABLE t1 (
+d DATE NOT NULL
+)
+PARTITION BY RANGE( YEAR(d) ) (
+PARTITION p0 VALUES LESS THAN (1960),
+PARTITION p1 VALUES LESS THAN (1970),
+PARTITION p2 VALUES LESS THAN (1980),
+PARTITION p3 VALUES LESS THAN (1990)
+);
+ALTER TABLE t1 ADD PARTITION (
+PARTITION `p5` VALUES LESS THAN (2010)
+COMMENT 'APSTART \' APEND'
+);
+SELECT * FROM t1 LIMIT 1;
+d
+DROP TABLE t1;
+create table t1 (id int auto_increment, s1 int, primary key (id));
+insert into t1 values (null,1);
+insert into t1 values (null,6);
+select * from t1;
+id s1
+1 1
+2 6
+alter table t1 partition by range (id) (
+partition p0 values less than (3),
+partition p1 values less than maxvalue
+);
+drop table t1;
create table t1 (a int)
partition by key(a)
partitions 0.2+e1;
@@ -33,11 +61,6 @@ call pz();
call pz();
drop procedure pz;
drop table t1;
-create table t1 (a int)
-engine = csv
-partition by list (a)
-(partition p0 values in (null));
-ERROR HY000: Engine cannot be used in partitioned tables
create table t1 (a bigint)
partition by range (a)
(partition p0 values less than (0xFFFFFFFFFFFFFFFF),
@@ -68,11 +91,6 @@ a
18446744073709551614
drop table t1;
create table t1 (a int)
-engine = csv
-partition by list (a)
-(partition p0 values in (null));
-ERROR HY000: Engine cannot be used in partitioned tables
-create table t1 (a int)
partition by key(a)
(partition p0 engine = MEMORY);
drop table t1;
@@ -271,6 +289,13 @@ select * from t1 where a = 4;
a b
4 4
drop table t1;
+CREATE TABLE t1 (c1 INT, c2 INT, PRIMARY KEY USING BTREE (c1,c2)) ENGINE=MEMORY
+PARTITION BY KEY(c2,c1) PARTITIONS 4;
+INSERT INTO t1 VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6);
+SELECT * FROM t1 WHERE c1 = 4;
+c1 c2
+4 4
+DROP TABLE t1;
CREATE TABLE t1 (a int)
PARTITION BY LIST (a)
PARTITIONS 1
@@ -319,18 +344,6 @@ analyze table t1;
Table Op Msg_type Msg_text
test.t1 analyze status OK
drop table t1;
-CREATE TABLE `t1` (
-`id` int(11) default NULL
-) ENGINE=BLACKHOLE DEFAULT CHARSET=latin1 PARTITION BY HASH (id) ;
-SELECT * FROM t1;
-id
-drop table t1;
-CREATE TABLE `t1` (
-`id` int(11) default NULL
-) ENGINE=BLACKHOLE DEFAULT CHARSET=latin1 PARTITION BY HASH (id) ;
-SELECT * FROM t1;
-id
-drop table t1;
create table t1
(a int)
partition by range (a)
@@ -709,7 +722,7 @@ partition by range (a)
alter table t1 add partition (partition p1 values in (2));
ERROR HY000: Only LIST PARTITIONING can use VALUES IN in partition definition
alter table t1 add partition (partition p1);
-ERROR HY000: RANGE PARTITIONING requires definition of VALUES LESS THAN for each partition
+ERROR HY000: Syntax error: RANGE PARTITIONING requires definition of VALUES LESS THAN for each partition
drop table t1;
create table t1 (a int)
partition by list (a)
@@ -717,7 +730,7 @@ partition by list (a)
alter table t1 add partition (partition p1 values less than (2));
ERROR HY000: Only RANGE PARTITIONING can use VALUES LESS THAN in partition definition
alter table t1 add partition (partition p1);
-ERROR HY000: LIST PARTITIONING requires definition of VALUES IN for each partition
+ERROR HY000: Syntax error: LIST PARTITIONING requires definition of VALUES IN for each partition
drop table t1;
create table t1 (a int)
partition by hash (a)
@@ -1050,18 +1063,6 @@ OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize note The storage engine for the table doesn't support optimize
drop table t1;
-create database db99;
-use db99;
-create table t1 (a int not null)
-engine=archive
-partition by list (a)
-(partition p0 values in (1), partition p1 values in (2));
-insert into t1 values (1), (2);
-create index inx on t1 (a);
-alter table t1 add partition (partition p2 values in (3));
-alter table t1 drop partition p2;
-use test;
-drop database db99;
drop procedure if exists mysqltest_1;
create table t1 (a int)
partition by list (a)
@@ -1259,6 +1260,10 @@ INSERT INTO t1 SELECT a + 8, b FROM t1;
ALTER TABLE t1 ADD PARTITION (PARTITION p1 VALUES LESS THAN (64));
ALTER TABLE t1 DROP PARTITION p1;
DROP TABLE t1;
+create table t (s1 int) engine=myisam partition by key (s1);
+create trigger t_ad after delete on t for each row insert into t values (old.s1);
+insert into t values (1);
+drop table t;
USE mysql;
SET GLOBAL general_log = 0;
ALTER TABLE general_log ENGINE = MyISAM;
@@ -1267,4 +1272,149 @@ ALTER TABLE general_log PARTITION BY RANGE (TO_DAYS(event_time))
ERROR HY000: Incorrect usage of PARTITION and log table
ALTER TABLE general_log ENGINE = CSV;
SET GLOBAL general_log = default;
+use test;
+create table t2 (b int);
+create table t1 (b int)
+PARTITION BY RANGE (t2.b) (
+PARTITION p1 VALUES LESS THAN (10),
+PARTITION p2 VALUES LESS THAN (20)
+) select * from t2;
+ERROR 42S22: Unknown column 't2.b' in 'partition function'
+create table t1 (a int)
+PARTITION BY RANGE (b) (
+PARTITION p1 VALUES LESS THAN (10),
+PARTITION p2 VALUES LESS THAN (20)
+) select * from t2;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (b) (PARTITION p1 VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION p2 VALUES LESS THAN (20) ENGINE = MyISAM) */
+drop table t1, t2;
+create table t1
+(s1 timestamp on update current_timestamp, s2 int)
+partition by key(s1) partitions 3;
+insert into t1 values (null,null);
+drop table t1;
+create table t1 (
+c0 int,
+c1 bigint,
+c2 set('sweet'),
+key (c2,c1,c0),
+key(c0)
+) engine=myisam partition by hash (month(c0)) partitions 5;
+insert ignore into t1 set c0 = -6502262, c1 = 3992917, c2 = 35019;
+insert ignore into t1 set c0 = 241221, c1 = -6862346, c2 = 56644;
+select c1 from t1 group by (select c0 from t1 limit 1);
+c1
+-6862346
+drop table t1;
+CREATE TABLE t1(a int)
+PARTITION BY RANGE (a) (
+PARTITION p1 VALUES LESS THAN (10),
+PARTITION p2 VALUES LESS THAN (20)
+);
+ALTER TABLE t1 OPTIMIZE PARTITION p1 EXTENDED;
+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 'EXTENDED' at line 1
+ALTER TABLE t1 ANALYZE PARTITION p1 EXTENDED;
+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 'EXTENDED' at line 1
+DROP TABLE t1;
+CREATE TABLE t1 (s1 BIGINT UNSIGNED)
+PARTITION BY RANGE (s1) (
+PARTITION p0 VALUES LESS THAN (0),
+PARTITION p1 VALUES LESS THAN (1),
+PARTITION p2 VALUES LESS THAN (18446744073709551615)
+);
+INSERT INTO t1 VALUES (0), (18446744073709551614);
+INSERT INTO t1 VALUES (18446744073709551615);
+ERROR HY000: Table has no partition for value 18446744073709551615
+DROP TABLE t1;
+CREATE TABLE t1 (s1 BIGINT UNSIGNED)
+PARTITION BY RANGE (s1) (
+PARTITION p0 VALUES LESS THAN (0),
+PARTITION p1 VALUES LESS THAN (1),
+PARTITION p2 VALUES LESS THAN (18446744073709551614),
+PARTITION p3 VALUES LESS THAN MAXVALUE
+);
+INSERT INTO t1 VALUES (-1), (0), (18446744073709551613),
+(18446744073709551614), (18446744073709551615);
+Warnings:
+Warning 1264 Out of range value for column 's1' at row 1
+SELECT * FROM t1;
+s1
+0
+0
+18446744073709551613
+18446744073709551614
+18446744073709551615
+SELECT * FROM t1 WHERE s1 = 0;
+s1
+0
+0
+SELECT * FROM t1 WHERE s1 = 18446744073709551614;
+s1
+18446744073709551614
+SELECT * FROM t1 WHERE s1 = 18446744073709551615;
+s1
+18446744073709551615
+DROP TABLE t1;
+CREATE TABLE t1 (s1 BIGINT UNSIGNED)
+PARTITION BY RANGE (s1) (
+PARTITION p0 VALUES LESS THAN (0),
+PARTITION p1 VALUES LESS THAN (1),
+PARTITION p2 VALUES LESS THAN (18446744073709551615),
+PARTITION p3 VALUES LESS THAN MAXVALUE
+);
+DROP TABLE t1;
+CREATE TABLE t1
+(int_column INT, char_column CHAR(5),
+PRIMARY KEY(char_column,int_column))
+PARTITION BY KEY(char_column,int_column)
+PARTITIONS 101;
+INSERT INTO t1 (int_column, char_column) VALUES
+( 39868 ,'zZZRW'),
+( 545592 ,'zZzSD'),
+( 4936 ,'zzzsT'),
+( 9274 ,'ZzZSX'),
+( 970185 ,'ZZzTN'),
+( 786036 ,'zZzTO'),
+( 37240 ,'zZzTv'),
+( 313801 ,'zzzUM'),
+( 782427 ,'ZZZva'),
+( 907955 ,'zZZvP'),
+( 453491 ,'zzZWV'),
+( 756594 ,'ZZZXU'),
+( 718061 ,'ZZzZH');
+SELECT * FROM t1 ORDER BY char_column DESC;
+int_column char_column
+718061 ZZzZH
+756594 ZZZXU
+453491 zzZWV
+907955 zZZvP
+782427 ZZZva
+313801 zzzUM
+37240 zZzTv
+786036 zZzTO
+970185 ZZzTN
+9274 ZzZSX
+4936 zzzsT
+545592 zZzSD
+39868 zZZRW
+DROP TABLE t1;
+CREATE TABLE t1(id MEDIUMINT NOT NULL AUTO_INCREMENT,
+user CHAR(25), PRIMARY KEY(id))
+PARTITION BY RANGE(id)
+SUBPARTITION BY hash(id) subpartitions 2
+(PARTITION pa1 values less than (10),
+PARTITION pa2 values less than (20),
+PARTITION pa11 values less than MAXVALUE);
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `id` mediumint(9) NOT NULL AUTO_INCREMENT,
+ `user` char(25) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM AUTO_INCREMENT=16 DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (id) SUBPARTITION BY HASH (id) SUBPARTITIONS 2 (PARTITION pa1 VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION pa2 VALUES LESS THAN (20) ENGINE = MyISAM, PARTITION pa11 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */
+drop table t1;
End of 5.1 tests
diff --git a/mysql-test/r/partition_02myisam.result b/mysql-test/r/partition_02myisam.result
deleted file mode 100644
index 55263e4f8ce..00000000000
--- a/mysql-test/r/partition_02myisam.result
+++ /dev/null
@@ -1,1725 +0,0 @@
-SET SESSION storage_engine='MYISAM';
-SET @max_row = 200;
-SET AUTOCOMMIT= 1;
-
-#------------------------------------------------------------------------
-# There are several testcases disabled because ouf the open bugs
-# #15407 , #15408 , #15890 , #15961 , #13447 , #15966 , #15968, #16370
-#------------------------------------------------------------------------
-
-#------------------------------------------------------------------------
-# 0. Setting of auxiliary variables + Creation of an auxiliary table
-# needed in all testcases
-#------------------------------------------------------------------------
-DROP TABLE IF EXISTS t0_template;
-CREATE TABLE t0_template ( f1 INTEGER, f2 char(20), PRIMARY KEY(f1))
-ENGINE = MEMORY;
-# Logging of <max_row> INSERTs into t0_template suppressed
-
-#------------------------------------------------------------------------
-# 1. Some syntax checks
-#------------------------------------------------------------------------
-# 1.1 Subpartioned table without subpartitioning rule must be rejected
-DROP TABLE IF EXISTS t1;
-# FIXME Implement testcases, where it is checked that all create and
-# alter table statements
-# - with missing mandatory parameters are rejected
-# - with optional parameters are accepted
-# - with wrong combinations of optional parameters are rejected
-# - ............
-
-#------------------------------------------------------------------------
-# 2. Checks where the engine is assigned on all supported (CREATE TABLE
-# statement) positions + basic operations on the tables
-# Storage engine mixups are currently (2005-12-23) not supported
-#------------------------------------------------------------------------
-DROP TABLE IF EXISTS t1;
-# 2.1 non partitioned table (for comparison)
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) ENGINE = 'MYISAM';
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) DEFAULT NULL,
- `f2` char(20) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-UPDATE t1 SET f1 = f1 + 200
-WHERE f1 BETWEEN 100 - 50 AND 100 + 50;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 )
-AS my_value FROM t1;
-my_value
-1
-DELETE FROM t1
-WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200;
-SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SET f1 = 0 , f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######';
-my_value
-1
-INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######';
-my_value
-1
-UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ'
- WHERE f1 = 0 AND f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-my_value
-1
-DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
-my_value
-1
-TRUNCATE t1;
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-DROP TABLE t1;
-# 2.2 Assignment of storage engine just after column list only
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) ENGINE = 'MYISAM'
-PARTITION BY HASH(f1) PARTITIONS 2;
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) DEFAULT NULL,
- `f2` char(20) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f1) PARTITIONS 2 */
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-UPDATE t1 SET f1 = f1 + 200
-WHERE f1 BETWEEN 100 - 50 AND 100 + 50;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 )
-AS my_value FROM t1;
-my_value
-1
-DELETE FROM t1
-WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200;
-SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SET f1 = 0 , f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######';
-my_value
-1
-INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######';
-my_value
-1
-UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ'
- WHERE f1 = 0 AND f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-my_value
-1
-DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
-my_value
-1
-TRUNCATE t1;
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-DROP TABLE t1;
-# 2.3 Assignment of storage engine just after partition or subpartition
-# name only
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1)
-( PARTITION part1 STORAGE ENGINE = 'MYISAM',
-PARTITION part2 STORAGE ENGINE = 'MYISAM'
-);
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) DEFAULT NULL,
- `f2` char(20) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f1) (PARTITION part1 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM) */
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-UPDATE t1 SET f1 = f1 + 200
-WHERE f1 BETWEEN 100 - 50 AND 100 + 50;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 )
-AS my_value FROM t1;
-my_value
-1
-DELETE FROM t1
-WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200;
-SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SET f1 = 0 , f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######';
-my_value
-1
-INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######';
-my_value
-1
-UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ'
- WHERE f1 = 0 AND f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-my_value
-1
-DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
-my_value
-1
-TRUNCATE t1;
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-DROP TABLE t1;
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1)
-SUBPARTITION BY HASH(f1)
-( PARTITION part1 VALUES LESS THAN (100)
-(SUBPARTITION subpart11 STORAGE ENGINE = 'MYISAM',
-SUBPARTITION subpart12 STORAGE ENGINE = 'MYISAM'),
-PARTITION part2 VALUES LESS THAN (2147483647)
-(SUBPARTITION subpart21 STORAGE ENGINE = 'MYISAM',
-SUBPARTITION subpart22 STORAGE ENGINE = 'MYISAM')
-);
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) DEFAULT NULL,
- `f2` char(20) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) (PARTITION part1 VALUES LESS THAN (100) (SUBPARTITION subpart11 ENGINE = MyISAM, SUBPARTITION subpart12 ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (2147483647) (SUBPARTITION subpart21 ENGINE = MyISAM, SUBPARTITION subpart22 ENGINE = MyISAM)) */
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-UPDATE t1 SET f1 = f1 + 200
-WHERE f1 BETWEEN 100 - 50 AND 100 + 50;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 )
-AS my_value FROM t1;
-my_value
-1
-DELETE FROM t1
-WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200;
-SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SET f1 = 0 , f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######';
-my_value
-1
-INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######';
-my_value
-1
-UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ'
- WHERE f1 = 0 AND f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-my_value
-1
-DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
-my_value
-1
-TRUNCATE t1;
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-DROP TABLE t1;
-# 2.4 Some but not all named partitions or subpartitions get a storage
-# engine assigned
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1)
-( PARTITION part1 STORAGE ENGINE = 'MYISAM',
-PARTITION part2
-);
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) DEFAULT NULL,
- `f2` char(20) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f1) (PARTITION part1 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM) */
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-UPDATE t1 SET f1 = f1 + 200
-WHERE f1 BETWEEN 100 - 50 AND 100 + 50;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 )
-AS my_value FROM t1;
-my_value
-1
-DELETE FROM t1
-WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200;
-SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SET f1 = 0 , f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######';
-my_value
-1
-INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######';
-my_value
-1
-UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ'
- WHERE f1 = 0 AND f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-my_value
-1
-DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
-my_value
-1
-TRUNCATE t1;
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-DROP TABLE t1;
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1)
-( PARTITION part1 ,
-PARTITION part2 STORAGE ENGINE = 'MYISAM'
-);
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) DEFAULT NULL,
- `f2` char(20) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f1) (PARTITION part1 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM) */
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-UPDATE t1 SET f1 = f1 + 200
-WHERE f1 BETWEEN 100 - 50 AND 100 + 50;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 )
-AS my_value FROM t1;
-my_value
-1
-DELETE FROM t1
-WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200;
-SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SET f1 = 0 , f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######';
-my_value
-1
-INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######';
-my_value
-1
-UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ'
- WHERE f1 = 0 AND f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-my_value
-1
-DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
-my_value
-1
-TRUNCATE t1;
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-DROP TABLE t1;
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1)
-SUBPARTITION BY HASH(f1)
-( PARTITION part1 VALUES LESS THAN (100)
-(SUBPARTITION subpart11,
-SUBPARTITION subpart12 STORAGE ENGINE = 'MYISAM'),
-PARTITION part2 VALUES LESS THAN (2147483647)
-(SUBPARTITION subpart21 STORAGE ENGINE = 'MYISAM',
-SUBPARTITION subpart22 STORAGE ENGINE = 'MYISAM')
-);
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) DEFAULT NULL,
- `f2` char(20) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) (PARTITION part1 VALUES LESS THAN (100) (SUBPARTITION subpart11 ENGINE = MyISAM, SUBPARTITION subpart12 ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (2147483647) (SUBPARTITION subpart21 ENGINE = MyISAM, SUBPARTITION subpart22 ENGINE = MyISAM)) */
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-UPDATE t1 SET f1 = f1 + 200
-WHERE f1 BETWEEN 100 - 50 AND 100 + 50;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 )
-AS my_value FROM t1;
-my_value
-1
-DELETE FROM t1
-WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200;
-SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SET f1 = 0 , f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######';
-my_value
-1
-INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######';
-my_value
-1
-UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ'
- WHERE f1 = 0 AND f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-my_value
-1
-DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
-my_value
-1
-TRUNCATE t1;
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-DROP TABLE t1;
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1)
-SUBPARTITION BY HASH(f1)
-( PARTITION part1 VALUES LESS THAN (100)
-(SUBPARTITION subpart11 STORAGE ENGINE = 'MYISAM',
-SUBPARTITION subpart12 STORAGE ENGINE = 'MYISAM'),
-PARTITION part2 VALUES LESS THAN (2147483647)
-(SUBPARTITION subpart21,
-SUBPARTITION subpart22 )
-);
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) DEFAULT NULL,
- `f2` char(20) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) (PARTITION part1 VALUES LESS THAN (100) (SUBPARTITION subpart11 ENGINE = MyISAM, SUBPARTITION subpart12 ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (2147483647) (SUBPARTITION subpart21 ENGINE = MyISAM, SUBPARTITION subpart22 ENGINE = MyISAM)) */
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-UPDATE t1 SET f1 = f1 + 200
-WHERE f1 BETWEEN 100 - 50 AND 100 + 50;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 )
-AS my_value FROM t1;
-my_value
-1
-DELETE FROM t1
-WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200;
-SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SET f1 = 0 , f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######';
-my_value
-1
-INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######';
-my_value
-1
-UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ'
- WHERE f1 = 0 AND f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-my_value
-1
-DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
-my_value
-1
-TRUNCATE t1;
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-DROP TABLE t1;
-# 2.5 Storage engine assignment after partition name + after name of
-# subpartitions belonging to another partition
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1)
-SUBPARTITION BY HASH(f1)
-( PARTITION part1 VALUES LESS THAN (100) ENGINE = 'MYISAM'
-(SUBPARTITION subpart11,
-SUBPARTITION subpart12),
-PARTITION part2 VALUES LESS THAN (2147483647)
-(SUBPARTITION subpart21 STORAGE ENGINE = 'MYISAM',
-SUBPARTITION subpart22 STORAGE ENGINE = 'MYISAM')
-);
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) DEFAULT NULL,
- `f2` char(20) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) (PARTITION part1 VALUES LESS THAN (100) (SUBPARTITION subpart11 ENGINE = MyISAM, SUBPARTITION subpart12 ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (2147483647) (SUBPARTITION subpart21 ENGINE = MyISAM, SUBPARTITION subpart22 ENGINE = MyISAM)) */
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-UPDATE t1 SET f1 = f1 + 200
-WHERE f1 BETWEEN 100 - 50 AND 100 + 50;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 )
-AS my_value FROM t1;
-my_value
-1
-DELETE FROM t1
-WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200;
-SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SET f1 = 0 , f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######';
-my_value
-1
-INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######';
-my_value
-1
-UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ'
- WHERE f1 = 0 AND f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-my_value
-1
-DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
-my_value
-1
-TRUNCATE t1;
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-DROP TABLE t1;
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1)
-SUBPARTITION BY HASH(f1)
-( PARTITION part1 VALUES LESS THAN (100)
-(SUBPARTITION subpart11 STORAGE ENGINE = 'MYISAM',
-SUBPARTITION subpart12 STORAGE ENGINE = 'MYISAM'),
-PARTITION part2 VALUES LESS THAN (2147483647) ENGINE = 'MYISAM'
-(SUBPARTITION subpart21,
-SUBPARTITION subpart22)
-);
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) DEFAULT NULL,
- `f2` char(20) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) (PARTITION part1 VALUES LESS THAN (100) (SUBPARTITION subpart11 ENGINE = MyISAM, SUBPARTITION subpart12 ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (2147483647) (SUBPARTITION subpart21 ENGINE = MyISAM, SUBPARTITION subpart22 ENGINE = MyISAM)) */
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-UPDATE t1 SET f1 = f1 + 200
-WHERE f1 BETWEEN 100 - 50 AND 100 + 50;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 )
-AS my_value FROM t1;
-my_value
-1
-DELETE FROM t1
-WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200;
-SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SET f1 = 0 , f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######';
-my_value
-1
-INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######';
-my_value
-1
-UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ'
- WHERE f1 = 0 AND f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-my_value
-1
-DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
-my_value
-1
-TRUNCATE t1;
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-DROP TABLE t1;
-# 2.6 Precedence of storage engine assignments
-# 2.6.1 Storage engine assignment after column list + after partition
-# or subpartition name
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) ENGINE = 'MYISAM'
-PARTITION BY HASH(f1)
-( PARTITION part1 STORAGE ENGINE = 'MYISAM',
-PARTITION part2 STORAGE ENGINE = 'MYISAM'
-);
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) DEFAULT NULL,
- `f2` char(20) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f1) (PARTITION part1 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM) */
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-UPDATE t1 SET f1 = f1 + 200
-WHERE f1 BETWEEN 100 - 50 AND 100 + 50;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 )
-AS my_value FROM t1;
-my_value
-1
-DELETE FROM t1
-WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200;
-SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SET f1 = 0 , f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######';
-my_value
-1
-INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######';
-my_value
-1
-UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ'
- WHERE f1 = 0 AND f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-my_value
-1
-DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
-my_value
-1
-TRUNCATE t1;
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-DROP TABLE t1;
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) ENGINE = 'MYISAM'
-PARTITION BY RANGE(f1)
-SUBPARTITION BY HASH(f1)
-( PARTITION part1 VALUES LESS THAN (100)
-(SUBPARTITION subpart11 STORAGE ENGINE = 'MYISAM',
-SUBPARTITION subpart12 STORAGE ENGINE = 'MYISAM'),
-PARTITION part2 VALUES LESS THAN (2147483647)
-(SUBPARTITION subpart21 STORAGE ENGINE = 'MYISAM',
-SUBPARTITION subpart22 STORAGE ENGINE = 'MYISAM')
-);
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) DEFAULT NULL,
- `f2` char(20) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) (PARTITION part1 VALUES LESS THAN (100) (SUBPARTITION subpart11 ENGINE = MyISAM, SUBPARTITION subpart12 ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (2147483647) (SUBPARTITION subpart21 ENGINE = MyISAM, SUBPARTITION subpart22 ENGINE = MyISAM)) */
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-UPDATE t1 SET f1 = f1 + 200
-WHERE f1 BETWEEN 100 - 50 AND 100 + 50;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 )
-AS my_value FROM t1;
-my_value
-1
-DELETE FROM t1
-WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200;
-SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SET f1 = 0 , f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######';
-my_value
-1
-INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######';
-my_value
-1
-UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ'
- WHERE f1 = 0 AND f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-my_value
-1
-DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
-my_value
-1
-TRUNCATE t1;
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-DROP TABLE t1;
-# 2.6.2 Storage engine assignment after partition name + after
-# subpartition name
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1)
-SUBPARTITION BY HASH(f1)
-( PARTITION part1 VALUES LESS THAN (100) STORAGE ENGINE = 'MYISAM'
-(SUBPARTITION subpart11 STORAGE ENGINE = 'MYISAM',
-SUBPARTITION subpart12 STORAGE ENGINE = 'MYISAM'),
-PARTITION part2 VALUES LESS THAN (2147483647)
-(SUBPARTITION subpart21 STORAGE ENGINE = 'MYISAM',
-SUBPARTITION subpart22 STORAGE ENGINE = 'MYISAM')
-);
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) DEFAULT NULL,
- `f2` char(20) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) (PARTITION part1 VALUES LESS THAN (100) (SUBPARTITION subpart11 ENGINE = MyISAM, SUBPARTITION subpart12 ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (2147483647) (SUBPARTITION subpart21 ENGINE = MyISAM, SUBPARTITION subpart22 ENGINE = MyISAM)) */
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-UPDATE t1 SET f1 = f1 + 200
-WHERE f1 BETWEEN 100 - 50 AND 100 + 50;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 )
-AS my_value FROM t1;
-my_value
-1
-DELETE FROM t1
-WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200;
-SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SET f1 = 0 , f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######';
-my_value
-1
-INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######';
-my_value
-1
-UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ'
- WHERE f1 = 0 AND f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-my_value
-1
-DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
-my_value
-1
-TRUNCATE t1;
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-DROP TABLE t1;
-# 2.7 Session default engine differs from engine used within create table
-SET SESSION storage_engine='MEMORY';
-SET SESSION storage_engine='MYISAM';
-
-#------------------------------------------------------------------------
-# 3. Check assigning the number of partitions and subpartitions
-# with and without named partitions/subpartitions
-#------------------------------------------------------------------------
-DROP TABLE IF EXISTS t1;
-# 3.1 (positive) without partition/subpartition number assignment
-# 3.1.1 no partition number, no named partitions
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1);
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) DEFAULT NULL,
- `f2` char(20) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f1) */
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-UPDATE t1 SET f1 = f1 + 200
-WHERE f1 BETWEEN 100 - 50 AND 100 + 50;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 )
-AS my_value FROM t1;
-my_value
-1
-DELETE FROM t1
-WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200;
-SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SET f1 = 0 , f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######';
-my_value
-1
-INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######';
-my_value
-1
-UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ'
- WHERE f1 = 0 AND f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-my_value
-1
-DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
-my_value
-1
-TRUNCATE t1;
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-DROP TABLE t1;
-# 3.1.2 no partition number, named partitions
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) (PARTITION part1, PARTITION part2);
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) DEFAULT NULL,
- `f2` char(20) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f1) (PARTITION part1 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM) */
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-UPDATE t1 SET f1 = f1 + 200
-WHERE f1 BETWEEN 100 - 50 AND 100 + 50;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 )
-AS my_value FROM t1;
-my_value
-1
-DELETE FROM t1
-WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200;
-SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SET f1 = 0 , f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######';
-my_value
-1
-INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######';
-my_value
-1
-UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ'
- WHERE f1 = 0 AND f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-my_value
-1
-DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
-my_value
-1
-TRUNCATE t1;
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-DROP TABLE t1;
-# 3.1.3 variations on no partition/subpartition number, named partitions,
-# different subpartitions are/are not named
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1) (PARTITION part1 VALUES LESS THAN (100), PARTITION part2 VALUES LESS THAN (200), PARTITION part3 VALUES LESS THAN (2147483647)) ;
-DROP TABLE t1;
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1) (PARTITION part1 VALUES LESS THAN (100)
-(SUBPARTITION subpart11 , SUBPARTITION subpart12 ), PARTITION part2 VALUES LESS THAN (200)
-(SUBPARTITION subpart21 , SUBPARTITION subpart22 ), PARTITION part3 VALUES LESS THAN (2147483647)
-(SUBPARTITION subpart31 , SUBPARTITION subpart32 )) ;
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) DEFAULT NULL,
- `f2` char(20) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) (PARTITION part1 VALUES LESS THAN (100) (SUBPARTITION subpart11 ENGINE = MyISAM, SUBPARTITION subpart12 ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (200) (SUBPARTITION subpart21 ENGINE = MyISAM, SUBPARTITION subpart22 ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (2147483647) (SUBPARTITION subpart31 ENGINE = MyISAM, SUBPARTITION subpart32 ENGINE = MyISAM)) */
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-UPDATE t1 SET f1 = f1 + 200
-WHERE f1 BETWEEN 100 - 50 AND 100 + 50;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 )
-AS my_value FROM t1;
-my_value
-1
-DELETE FROM t1
-WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200;
-SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SET f1 = 0 , f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######';
-my_value
-1
-INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######';
-my_value
-1
-UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ'
- WHERE f1 = 0 AND f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-my_value
-1
-DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
-my_value
-1
-TRUNCATE t1;
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-DROP TABLE t1;
-# 3.2 partition/subpartition numbers good and bad values and notations
-DROP TABLE IF EXISTS t1;
-# 3.2.1 partition/subpartition numbers INTEGER notation
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) PARTITIONS 2;
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) DEFAULT NULL,
- `f2` char(20) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f1) PARTITIONS 2 */
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-UPDATE t1 SET f1 = f1 + 200
-WHERE f1 BETWEEN 100 - 50 AND 100 + 50;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 )
-AS my_value FROM t1;
-my_value
-1
-DELETE FROM t1
-WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200;
-SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SET f1 = 0 , f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######';
-my_value
-1
-INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######';
-my_value
-1
-UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ'
- WHERE f1 = 0 AND f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-my_value
-1
-DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
-my_value
-1
-TRUNCATE t1;
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-DROP TABLE t1;
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1)
-SUBPARTITIONS 2
-(PARTITION part1 VALUES LESS THAN (100), PARTITION part2 VALUES LESS THAN (2147483647));
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) DEFAULT NULL,
- `f2` char(20) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) SUBPARTITIONS 2 (PARTITION part1 VALUES LESS THAN (100) ENGINE = MyISAM, PARTITION part2 VALUES LESS THAN (2147483647) ENGINE = MyISAM) */
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-UPDATE t1 SET f1 = f1 + 200
-WHERE f1 BETWEEN 100 - 50 AND 100 + 50;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 )
-AS my_value FROM t1;
-my_value
-1
-DELETE FROM t1
-WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200;
-SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SET f1 = 0 , f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######';
-my_value
-1
-INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######';
-my_value
-1
-UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ'
- WHERE f1 = 0 AND f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-my_value
-1
-DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
-my_value
-1
-TRUNCATE t1;
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-DROP TABLE t1;
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) PARTITIONS 1;
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) DEFAULT NULL,
- `f2` char(20) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f1) PARTITIONS 1 */
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-UPDATE t1 SET f1 = f1 + 200
-WHERE f1 BETWEEN 100 - 50 AND 100 + 50;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 )
-AS my_value FROM t1;
-my_value
-1
-DELETE FROM t1
-WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200;
-SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SET f1 = 0 , f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######';
-my_value
-1
-INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######';
-my_value
-1
-UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ'
- WHERE f1 = 0 AND f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-my_value
-1
-DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
-my_value
-1
-TRUNCATE t1;
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-DROP TABLE t1;
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1)
-SUBPARTITIONS 1
-(PARTITION part1 VALUES LESS THAN (100), PARTITION part2 VALUES LESS THAN (2147483647));
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) DEFAULT NULL,
- `f2` char(20) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) SUBPARTITIONS 1 (PARTITION part1 VALUES LESS THAN (100) ENGINE = MyISAM, PARTITION part2 VALUES LESS THAN (2147483647) ENGINE = MyISAM) */
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-UPDATE t1 SET f1 = f1 + 200
-WHERE f1 BETWEEN 100 - 50 AND 100 + 50;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 )
-AS my_value FROM t1;
-my_value
-1
-DELETE FROM t1
-WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200;
-SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SET f1 = 0 , f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######';
-my_value
-1
-INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######';
-my_value
-1
-UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ'
- WHERE f1 = 0 AND f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-my_value
-1
-DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
-my_value
-1
-TRUNCATE t1;
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-DROP TABLE t1;
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) PARTITIONS 0;
-ERROR HY000: Number of partitions = 0 is not an allowed value
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1)
-SUBPARTITIONS 0
-(PARTITION part1 VALUES LESS THAN (100), PARTITION part2 VALUES LESS THAN (2147483647));
-ERROR HY000: Number of subpartitions = 0 is not an allowed value
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) PARTITIONS -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 2
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1)
-SUBPARTITIONS -1
-(PARTITION part1 VALUES LESS THAN (100), PARTITION part2 VALUES LESS THAN (2147483647));
-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
-(PARTITION part1 VALUES LESS THAN (100), PARTITION part2 VALUES LESS THAN (21' at line 3
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) PARTITIONS 1000000;
-ERROR HY000: Too many partitions (including subpartitions) were defined
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1)
-SUBPARTITIONS 1000000
-(PARTITION part1 VALUES LESS THAN (100), PARTITION part2 VALUES LESS THAN (2147483647));
-ERROR HY000: Too many partitions (including subpartitions) were defined
-# 3.2.4 partition/subpartition numbers STRING notation
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) PARTITIONS '2';
-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 ''2'' at line 2
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1)
-SUBPARTITIONS '2'
-(PARTITION part1 VALUES LESS THAN (100), PARTITION part2 VALUES LESS THAN (2147483647));
-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 ''2'
-(PARTITION part1 VALUES LESS THAN (100), PARTITION part2 VALUES LESS THAN (2' at line 3
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) PARTITIONS '2.0';
-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 ''2.0'' at line 2
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1)
-SUBPARTITIONS '2.0'
-(PARTITION part1 VALUES LESS THAN (100), PARTITION part2 VALUES LESS THAN (2147483647));
-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 ''2.0'
-(PARTITION part1 VALUES LESS THAN (100), PARTITION part2 VALUES LESS THAN ' at line 3
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) PARTITIONS '0.2E+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 ''0.2E+1'' at line 2
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1)
-SUBPARTITIONS '0.2E+1'
-(PARTITION part1 VALUES LESS THAN (100), PARTITION part2 VALUES LESS THAN (2147483647));
-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 ''0.2E+1'
-(PARTITION part1 VALUES LESS THAN (100), PARTITION part2 VALUES LESS TH' at line 3
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) PARTITIONS '2A';
-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 ''2A'' at line 2
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1)
-SUBPARTITIONS '2A'
-(PARTITION part1 VALUES LESS THAN (100), PARTITION part2 VALUES LESS THAN (2147483647));
-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 ''2A'
-(PARTITION part1 VALUES LESS THAN (100), PARTITION part2 VALUES LESS THAN (' at line 3
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) PARTITIONS 'A2';
-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 ''A2'' at line 2
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1)
-SUBPARTITIONS 'A2'
-(PARTITION part1 VALUES LESS THAN (100), PARTITION part2 VALUES LESS THAN (2147483647));
-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 ''A2'
-(PARTITION part1 VALUES LESS THAN (100), PARTITION part2 VALUES LESS THAN (' at line 3
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) PARTITIONS '';
-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 2
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1)
-SUBPARTITIONS ''
-(PARTITION part1 VALUES LESS THAN (100), PARTITION part2 VALUES LESS THAN (2147483647));
-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 '''
-(PARTITION part1 VALUES LESS THAN (100), PARTITION part2 VALUES LESS THAN (21' at line 3
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) PARTITIONS 'GARBAGE';
-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 ''GARBAGE'' at line 2
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1)
-SUBPARTITIONS 'GARBAGE'
-(PARTITION part1 VALUES LESS THAN (100), PARTITION part2 VALUES LESS THAN (2147483647));
-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 ''GARBAGE'
-(PARTITION part1 VALUES LESS THAN (100), PARTITION part2 VALUES LESS T' at line 3
-# 3.2.5 partition/subpartition numbers other notations
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) PARTITIONS 2A;
-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 '2A' at line 2
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1)
-SUBPARTITIONS 2A
-(PARTITION part1 VALUES LESS THAN (100), PARTITION part2 VALUES LESS THAN (2147483647));
-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 '2A
-(PARTITION part1 VALUES LESS THAN (100), PARTITION part2 VALUES LESS THAN (21' at line 3
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) PARTITIONS A2;
-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 'A2' at line 2
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1)
-SUBPARTITIONS A2
-(PARTITION part1 VALUES LESS THAN (100), PARTITION part2 VALUES LESS THAN (2147483647));
-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 'A2
-(PARTITION part1 VALUES LESS THAN (100), PARTITION part2 VALUES LESS THAN (21' at line 3
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) PARTITIONS GARBAGE;
-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 'GARBAGE' at line 2
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1)
-SUBPARTITIONS GARBAGE
-(PARTITION part1 VALUES LESS THAN (100), PARTITION part2 VALUES LESS THAN (2147483647));
-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 'GARBAGE
-(PARTITION part1 VALUES LESS THAN (100), PARTITION part2 VALUES LESS THA' at line 3
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) PARTITIONS "2";
-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 '"2"' at line 2
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1)
-SUBPARTITIONS "2"
-(PARTITION part1 VALUES LESS THAN (100), PARTITION part2 VALUES LESS THAN (2147483647));
-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 '"2"
-(PARTITION part1 VALUES LESS THAN (100), PARTITION part2 VALUES LESS THAN (2' at line 3
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) PARTITIONS "2A";
-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 '"2A"' at line 2
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1)
-SUBPARTITIONS "2A"
-(PARTITION part1 VALUES LESS THAN (100), PARTITION part2 VALUES LESS THAN (2147483647));
-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 '"2A"
-(PARTITION part1 VALUES LESS THAN (100), PARTITION part2 VALUES LESS THAN (' at line 3
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) PARTITIONS "A2";
-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 '"A2"' at line 2
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1)
-SUBPARTITIONS "A2"
-(PARTITION part1 VALUES LESS THAN (100), PARTITION part2 VALUES LESS THAN (2147483647));
-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 '"A2"
-(PARTITION part1 VALUES LESS THAN (100), PARTITION part2 VALUES LESS THAN (' at line 3
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) PARTITIONS "GARBAGE";
-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 '"GARBAGE"' at line 2
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1)
-SUBPARTITIONS "GARBAGE"
-(PARTITION part1 VALUES LESS THAN (100), PARTITION part2 VALUES LESS THAN (2147483647));
-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 '"GARBAGE"
-(PARTITION part1 VALUES LESS THAN (100), PARTITION part2 VALUES LESS T' at line 3
-# 3.3 Mixups of assigned partition/subpartition numbers and names
-# 3.3.1 (positive) number of partition/subpartition
-# = number of named partition/subpartition
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) PARTITIONS 2 ( PARTITION part1, PARTITION part2 ) ;
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) DEFAULT NULL,
- `f2` char(20) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f1) (PARTITION part1 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM) */
-DROP TABLE t1;
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) PARTITIONS 2
-SUBPARTITION BY HASH(f1) SUBPARTITIONS 2
-( PARTITION part1 VALUES LESS THAN (1000)
-(SUBPARTITION subpart11, SUBPARTITION subpart12),
-PARTITION part2 VALUES LESS THAN (2147483647)
-(SUBPARTITION subpart21, SUBPARTITION subpart22)
-);
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) DEFAULT NULL,
- `f2` char(20) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) (PARTITION part1 VALUES LESS THAN (1000) (SUBPARTITION subpart11 ENGINE = MyISAM, SUBPARTITION subpart12 ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (2147483647) (SUBPARTITION subpart21 ENGINE = MyISAM, SUBPARTITION subpart22 ENGINE = MyISAM)) */
-DROP TABLE t1;
-# 3.3.2 (positive) number of partition/subpartition ,
-# 0 (= no) named partition/subpartition
-# already checked above
-# 3.3.3 (negative) number of partitions/subpartitions
-# > number of named partitions/subpartitions
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) PARTITIONS 2 ( PARTITION part1 ) ;
-ERROR 42000: Wrong number of partitions defined, mismatch with previous setting near ')' at line 2
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1)
-SUBPARTITION BY HASH(f1) SUBPARTITIONS 2
-( PARTITION part1 VALUES LESS THAN (1000)
-(SUBPARTITION subpart11 ),
-PARTITION part2 VALUES LESS THAN (2147483647)
-(SUBPARTITION subpart21, SUBPARTITION subpart22)
-);
-ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '),
-PARTITION part2 VALUES LESS THAN (2147483647)
-(SUBPARTITION subpart21, SUBPAR' at line 5
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1)
-SUBPARTITION BY HASH(f1) SUBPARTITIONS 2
-( PARTITION part1 VALUES LESS THAN (1000)
-(SUBPARTITION subpart11, SUBPARTITION subpart12),
-PARTITION part2 VALUES LESS THAN (2000)
-(SUBPARTITION subpart21 ),
-PARTITION part3 VALUES LESS THAN (2147483647)
-(SUBPARTITION subpart31, SUBPARTITION subpart32)
-);
-ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '),
-PARTITION part3 VALUES LESS THAN (2147483647)
-(SUBPARTITION subpart31, SUBPAR' at line 7
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) PARTITIONS 2
-SUBPARTITION BY HASH(f1) SUBPARTITIONS 2
-( PARTITION part1 VALUES LESS THAN (1000)
-(SUBPARTITION subpart11, SUBPARTITION subpart12),
-PARTITION part2 VALUES LESS THAN (2147483647)
-(SUBPARTITION subpart21 )
-);
-ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near ')
-)' at line 7
-# 3.3.4 (negative) number of partitions < number of named partitions
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) PARTITIONS 1 ( PARTITION part1, PARTITION part2 ) ;
-ERROR 42000: Wrong number of partitions defined, mismatch with previous setting near ')' at line 2
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1)
-SUBPARTITION BY HASH(f1) SUBPARTITIONS 1
-( PARTITION part1 VALUES LESS THAN (1000)
-(SUBPARTITION subpart11, SUBPARTITION subpart12),
-PARTITION part2 VALUES LESS THAN (2147483647)
-(SUBPARTITION subpart21, SUBPARTITION subpart22)
-);
-ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '),
-PARTITION part2 VALUES LESS THAN (2147483647)
-(SUBPARTITION subpart21, SUBPAR' at line 5
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1)
-SUBPARTITION BY HASH(f1) SUBPARTITIONS 1
-( PARTITION part1 VALUES LESS THAN (1000)
-(SUBPARTITION subpart11, SUBPARTITION subpart12),
-PARTITION part2 VALUES LESS THAN (2000)
-(SUBPARTITION subpart21 ),
-PARTITION part3 VALUES LESS THAN (2147483647)
-(SUBPARTITION subpart31, SUBPARTITION subpart32)
-);
-ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '),
-PARTITION part2 VALUES LESS THAN (2000)
-(SUBPARTITION subpart21 ' at line 5
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1)
-SUBPARTITION BY HASH(f1) SUBPARTITIONS 1
-( PARTITION part1 VALUES LESS THAN (1000)
-(SUBPARTITION subpart11, SUBPARTITION subpart12),
-PARTITION part2 VALUES LESS THAN (2147483647)
-(SUBPARTITION subpart21, SUBPARTITION subpart22)
-);
-ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '),
-PARTITION part2 VALUES LESS THAN (2147483647)
-(SUBPARTITION subpart21, SUBPAR' at line 5
-
-#------------------------------------------------------------------------
-# 4. Checks of logical partition/subpartition name
-# file name clashes during CREATE TABLE
-#------------------------------------------------------------------------
-DROP TABLE IF EXISTS t1;
-# 4.1 (negative) A partition name used more than once
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) (PARTITION part1, PARTITION part1);
-ERROR HY000: Duplicate partition name part1
-# FIXME Implement testcases with filename problems
-# existing file of other table --- partition/subpartition file name
-# partition/subpartition file name --- file of the same table
-
-#------------------------------------------------------------------------
-# 5. Alter table experiments
-#------------------------------------------------------------------------
-DROP TABLE IF EXISTS t1;
-# 5.1 alter table add partition
-# 5.1.1 (negative) add partition to non partitioned table
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20));
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) DEFAULT NULL,
- `f2` char(20) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1
-ALTER TABLE t1 ADD PARTITION (PARTITION part1);
-Got one of the listed errors
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) DEFAULT NULL,
- `f2` char(20) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1
-DROP TABLE t1;
-# 5.1.2 Add one partition to a table with one partition
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1);
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) DEFAULT NULL,
- `f2` char(20) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f1) */
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 100 - 1;
-ALTER TABLE t1 ADD PARTITION (PARTITION part1);
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) DEFAULT NULL,
- `f2` char(20) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f1) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM) */
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 100 AND 200;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-UPDATE t1 SET f1 = f1 + 200
-WHERE f1 BETWEEN 100 - 50 AND 100 + 50;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 )
-AS my_value FROM t1;
-my_value
-1
-DELETE FROM t1
-WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200;
-SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SET f1 = 0 , f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######';
-my_value
-1
-INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######';
-my_value
-1
-UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ'
- WHERE f1 = 0 AND f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-my_value
-1
-DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
-my_value
-1
-TRUNCATE t1;
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-DROP TABLE t1;
-# 5.1.3 Several times add one partition to a table with some partitions
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) (PARTITION part1, PARTITION part3);
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) DEFAULT NULL,
- `f2` char(20) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f1) (PARTITION part1 ENGINE = MyISAM, PARTITION part3 ENGINE = MyISAM) */
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 100 - 1;
-ALTER TABLE t1 ADD PARTITION (PARTITION part0);
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) DEFAULT NULL,
- `f2` char(20) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f1) (PARTITION part1 ENGINE = MyISAM, PARTITION part3 ENGINE = MyISAM, PARTITION part0 ENGINE = MyISAM) */
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 100 AND 200;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-UPDATE t1 SET f1 = f1 + 200
-WHERE f1 BETWEEN 100 - 50 AND 100 + 50;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 )
-AS my_value FROM t1;
-my_value
-1
-DELETE FROM t1
-WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200;
-SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SET f1 = 0 , f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######';
-my_value
-1
-INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######';
-my_value
-1
-UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ'
- WHERE f1 = 0 AND f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-my_value
-1
-DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
-my_value
-1
-TRUNCATE t1;
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-DELETE FROM t1;
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 100 - 1;
-ALTER TABLE t1 ADD PARTITION (PARTITION part2);
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) DEFAULT NULL,
- `f2` char(20) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f1) (PARTITION part1 ENGINE = MyISAM, PARTITION part3 ENGINE = MyISAM, PARTITION part0 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM) */
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 100 AND 200;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-UPDATE t1 SET f1 = f1 + 200
-WHERE f1 BETWEEN 100 - 50 AND 100 + 50;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 )
-AS my_value FROM t1;
-my_value
-1
-DELETE FROM t1
-WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200;
-SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SET f1 = 0 , f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######';
-my_value
-1
-INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######';
-my_value
-1
-UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ'
- WHERE f1 = 0 AND f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-my_value
-1
-DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
-my_value
-1
-TRUNCATE t1;
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-DELETE FROM t1;
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 100 - 1;
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) DEFAULT NULL,
- `f2` char(20) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f1) (PARTITION part1 ENGINE = MyISAM, PARTITION part3 ENGINE = MyISAM, PARTITION part0 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM) */
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 100 AND 200;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-UPDATE t1 SET f1 = f1 + 200
-WHERE f1 BETWEEN 100 - 50 AND 100 + 50;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 )
-AS my_value FROM t1;
-my_value
-1
-DELETE FROM t1
-WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200;
-SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SET f1 = 0 , f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######';
-my_value
-1
-INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######';
-my_value
-1
-UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ'
- WHERE f1 = 0 AND f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-my_value
-1
-DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
-my_value
-1
-TRUNCATE t1;
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-DROP TABLE t1;
-# 5.1.4 Add several partitions to a table with some partitions
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) (PARTITION part1, PARTITION part3);
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) DEFAULT NULL,
- `f2` char(20) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f1) (PARTITION part1 ENGINE = MyISAM, PARTITION part3 ENGINE = MyISAM) */
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 100 - 1;
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) DEFAULT NULL,
- `f2` char(20) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f1) (PARTITION part1 ENGINE = MyISAM, PARTITION part3 ENGINE = MyISAM) */
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 100 AND 200;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-UPDATE t1 SET f1 = f1 + 200
-WHERE f1 BETWEEN 100 - 50 AND 100 + 50;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 )
-AS my_value FROM t1;
-my_value
-1
-DELETE FROM t1
-WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200;
-SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SET f1 = 0 , f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######';
-my_value
-1
-INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######';
-my_value
-1
-UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ'
- WHERE f1 = 0 AND f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-my_value
-1
-DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
-my_value
-1
-TRUNCATE t1;
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-DROP TABLE t1;
-# 5.1.5 (negative) Add partitions to a table with some partitions
-# clash on new and already existing partition names
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) (PARTITION part1, PARTITION part2, PARTITION part3);
-ALTER TABLE t1 ADD PARTITION (PARTITION part1);
-ERROR HY000: Duplicate partition name part1
-ALTER TABLE t1 ADD PARTITION (PARTITION part2);
-ERROR HY000: Duplicate partition name part2
-ALTER TABLE t1 ADD PARTITION (PARTITION part3);
-ERROR HY000: Duplicate partition name part3
-ALTER TABLE t1 ADD PARTITION (PARTITION part1, PARTITION part2, PARTITION part3);
-ERROR HY000: Duplicate partition name part1
-DROP TABLE t1;
-# 5.2 alter table add subpartition
-# 5.2.1 Add one subpartition to a table with subpartitioning rule and
-# no explicit defined subpartitions
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1)
-SUBPARTITION BY HASH(f1)
-(PARTITION part1 VALUES LESS THAN (100));
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 100 - 1;
-ALTER TABLE t1 ADD PARTITION (PARTITION part2 VALUES LESS THAN (2147483647)
-(SUBPARTITION subpart21));
-DROP TABLE t1;
-DROP TABLE if exists t0_template;
diff --git a/mysql-test/r/partition_archive.result b/mysql-test/r/partition_archive.result
new file mode 100644
index 00000000000..5c84b41e81b
--- /dev/null
+++ b/mysql-test/r/partition_archive.result
@@ -0,0 +1,91 @@
+drop database if exists db99;
+drop table if exists t1;
+create database db99;
+use db99;
+create table t1 (a int not null)
+engine=archive
+partition by list (a)
+(partition p0 values in (1), partition p1 values in (2));
+insert into t1 values (1), (2);
+create index inx on t1 (a);
+alter table t1 add partition (partition p2 values in (3));
+alter table t1 drop partition p2;
+use test;
+drop database db99;
+create table t1 (f1 integer) engine= ARCHIVE partition by list(f1)
+(
+partition p1 values in (1),
+partition p2 values in (NULL),
+partition p3 values in (2),
+partition p4 values in (3),
+partition p5 values in (4)
+);
+insert into t1 values (1),(2),(3),(4),(null);
+select * from t1;
+f1
+1
+NULL
+2
+3
+4
+select * from t1 where f1 < 3;
+f1
+1
+2
+drop table t1;
+CREATE TABLE t1 (
+a int not null,
+b int not null,
+c int not null) engine=ARCHIVE
+partition by hash (a + 2)
+partitions 3
+(partition x1 tablespace ts1,
+partition x2 tablespace ts2,
+partition x3 tablespace ts3);
+insert into t1 values (1,1,1);
+insert into t1 values (2,1,1);
+insert into t1 values (3,1,1);
+insert into t1 values (4,1,1);
+insert into t1 values (5,1,1);
+select * from t1;
+a b c
+1 1 1
+4 1 1
+2 1 1
+5 1 1
+3 1 1
+drop table t1;
+create table t1 (a int) engine=archive partition by hash(a);
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (a) */
+drop table t1;
+CREATE TABLE t1(id MEDIUMINT NOT NULL AUTO_INCREMENT,
+f1 VARCHAR(25),
+PRIMARY KEY(id)) ENGINE=ARCHIVE
+PARTITION BY RANGE(id)
+SUBPARTITION BY hash(id) subpartitions 2
+(PARTITION pa1 values less than (10),
+PARTITION pa2 values less than (20),
+PARTITION pa3 values less than (30),
+PARTITION pa4 values less than (40),
+PARTITION pa5 values less than (50),
+PARTITION pa6 values less than (60),
+PARTITION pa7 values less than (70),
+PARTITION pa8 values less than (80),
+PARTITION pa9 values less than (90),
+PARTITION pa10 values less than (100),
+PARTITION pa11 values less than MAXVALUE);
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `id` mediumint(9) NOT NULL AUTO_INCREMENT,
+ `f1` varchar(25) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=ARCHIVE AUTO_INCREMENT=101 DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (id) SUBPARTITION BY HASH (id) SUBPARTITIONS 2 (PARTITION pa1 VALUES LESS THAN (10) ENGINE = ARCHIVE, PARTITION pa2 VALUES LESS THAN (20) ENGINE = ARCHIVE, PARTITION pa3 VALUES LESS THAN (30) ENGINE = ARCHIVE, PARTITION pa4 VALUES LESS THAN (40) ENGINE = ARCHIVE, PARTITION pa5 VALUES LESS THAN (50) ENGINE = ARCHIVE, PARTITION pa6 VALUES LESS THAN (60) ENGINE = ARCHIVE, PARTITION pa7 VALUES LESS THAN (70) ENGINE = ARCHIVE, PARTITION pa8 VALUES LESS THAN (80) ENGINE = ARCHIVE, PARTITION pa9 VALUES LESS THAN (90) ENGINE = ARCHIVE, PARTITION pa10 VALUES LESS THAN (100) ENGINE = ARCHIVE, PARTITION pa11 VALUES LESS THAN MAXVALUE ENGINE = ARCHIVE) */
+select count(*) from t1;
+count(*)
+100
+drop table t1;
diff --git a/mysql-test/r/partition_blackhole.result b/mysql-test/r/partition_blackhole.result
new file mode 100644
index 00000000000..225cc1886fd
--- /dev/null
+++ b/mysql-test/r/partition_blackhole.result
@@ -0,0 +1,7 @@
+DROP TABLE IF EXISTS t1;
+CREATE TABLE `t1` (
+`id` int(11) default NULL
+) ENGINE=BLACKHOLE DEFAULT CHARSET=latin1 PARTITION BY HASH (id) ;
+SELECT * FROM t1;
+id
+DROP TABLE t1;
diff --git a/mysql-test/r/partition_csv.result b/mysql-test/r/partition_csv.result
new file mode 100644
index 00000000000..b5e1dcd9541
--- /dev/null
+++ b/mysql-test/r/partition_csv.result
@@ -0,0 +1,15 @@
+drop table if exists t1;
+create table t1 (a int)
+engine = csv
+partition by list (a)
+(partition p0 values in (null));
+ERROR HY000: Engine cannot be used in partitioned tables
+USE mysql;
+SET GLOBAL general_log = 0;
+ALTER TABLE general_log ENGINE = MyISAM;
+ALTER TABLE general_log PARTITION BY RANGE (TO_DAYS(event_time))
+(PARTITION p0 VALUES LESS THAN (733144),
+PARTITION p1 VALUES LESS THAN (3000000));
+ERROR HY000: Incorrect usage of PARTITION and log table
+ALTER TABLE general_log ENGINE = CSV;
+SET GLOBAL general_log = 1;
diff --git a/mysql-test/r/partition_datatype.result b/mysql-test/r/partition_datatype.result
new file mode 100644
index 00000000000..c6506178b03
--- /dev/null
+++ b/mysql-test/r/partition_datatype.result
@@ -0,0 +1,282 @@
+drop table if exists t1;
+create table t1 (a tinyint not null) partition by key (a);
+insert into t1 values (2);
+select * from t1 where a = 2;
+a
+2
+drop table t1;
+create table t1 (a smallint not null) partition by key (a);
+insert into t1 values (2);
+select * from t1 where a = 2;
+a
+2
+drop table t1;
+create table t1 (a mediumint not null) partition by key (a);
+insert into t1 values (2);
+select * from t1 where a = 2;
+a
+2
+drop table t1;
+create table t1 (a int not null) partition by key (a);
+insert into t1 values (2);
+select * from t1 where a = 2;
+a
+2
+drop table t1;
+create table t1 (a bigint not null) partition by key (a);
+insert into t1 values (2);
+select * from t1 where a = 2;
+a
+2
+drop table t1;
+create table t1 (a float not null) partition by key (a);
+insert into t1 values (2.1);
+select * from t1 where a = 2.1;
+a
+drop table t1;
+create table t1 (a double not null) partition by key (a);
+insert into t1 values (2.1);
+select * from t1 where a = 2.1;
+a
+2.1
+drop table t1;
+create table t1 (a decimal not null) partition by key (a);
+insert into t1 values (2.1);
+Warnings:
+Note 1265 Data truncated for column 'a' at row 1
+select * from t1 where a = 2.1;
+a
+drop table t1;
+create table t1 (a date not null) partition by key (a);
+insert into t1 values ('2001-01-01');
+select * from t1 where a = '2001-01-01';
+a
+2001-01-01
+drop table t1;
+create table t1 (a datetime not null) partition by key (a);
+insert into t1 values ('2001-01-01 01:02:03');
+select * from t1 where a = '2001-01-01 01:02:03';
+a
+2001-01-01 01:02:03
+drop table t1;
+create table t1 (a timestamp not null) partition by key (a);
+insert into t1 values ('2001-01-01 01:02:03');
+select * from t1 where a = '2001-01-01 01:02:03';
+a
+2001-01-01 01:02:03
+drop table t1;
+create table t1 (a time not null) partition by key (a);
+insert into t1 values ('01:02:03');
+select * from t1 where a = '01:02:03';
+a
+01:02:03
+drop table t1;
+create table t1 (a year not null) partition by key (a);
+insert into t1 values ('2001');
+select * from t1 where a = '2001';
+a
+2001
+drop table t1;
+create table t1 (a varchar(10) character set utf8 not null) partition by key (a);
+insert into t1 values ('abc');
+select * from t1 where a = 'abc';
+a
+abc
+drop table t1;
+create table t1 (a varchar(300) character set utf8 not null) partition by key (a);
+insert into t1 values ('abc');
+select * from t1 where a = 'abc';
+a
+abc
+drop table t1;
+create table t1 (a varchar(10) character set latin1 not null) partition by key (a);
+insert into t1 values ('abc');
+select * from t1 where a = 'abc';
+a
+abc
+drop table t1;
+create table t1 (a varchar(300) character set latin1 not null) partition by key (a);
+insert into t1 values ('abc');
+select * from t1 where a = 'abc';
+a
+abc
+drop table t1;
+create table t1 (a char(10) character set utf8 not null) partition by key (a);
+insert into t1 values ('abc');
+select * from t1 where a = 'abc';
+a
+abc
+drop table t1;
+create table t1 (a char(10) character set latin1 not null) partition by key (a);
+insert into t1 values ('abc');
+select * from t1 where a = 'abc';
+a
+abc
+drop table t1;
+create table t1 (a enum('y','n') not null) partition by key (a);
+insert into t1 values ('y');
+select * from t1 where a = 'y';
+a
+y
+drop table t1;
+create table t1 (a set('y','n') not null) partition by key (a);
+insert into t1 values ('y');
+select * from t1 where a = 'y';
+a
+y
+drop table t1;
+create table t1 (a tinyint) partition by key (a);
+insert into t1 values (2);
+select * from t1 where a = 2;
+a
+2
+drop table t1;
+create table t1 (a smallint) partition by key (a);
+insert into t1 values (2);
+select * from t1 where a = 2;
+a
+2
+drop table t1;
+create table t1 (a mediumint) partition by key (a);
+insert into t1 values (2);
+select * from t1 where a = 2;
+a
+2
+drop table t1;
+create table t1 (a int) partition by key (a);
+insert into t1 values (2);
+select * from t1 where a = 2;
+a
+2
+drop table t1;
+create table t1 (a bigint) partition by key (a);
+insert into t1 values (2);
+select * from t1 where a = 2;
+a
+2
+drop table t1;
+create table t1 (a float) partition by key (a);
+insert into t1 values (2.1);
+select * from t1 where a = 2.1;
+a
+drop table t1;
+create table t1 (a double) partition by key (a);
+insert into t1 values (2.1);
+select * from t1 where a = 2.1;
+a
+2.1
+drop table t1;
+create table t1 (a decimal) partition by key (a);
+insert into t1 values (2.1);
+Warnings:
+Note 1265 Data truncated for column 'a' at row 1
+select * from t1 where a = 2.1;
+a
+drop table t1;
+create table t1 (a date) partition by key (a);
+insert into t1 values ('2001-01-01');
+select * from t1 where a = '2001-01-01';
+a
+2001-01-01
+drop table t1;
+create table t1 (a datetime) partition by key (a);
+insert into t1 values ('2001-01-01 01:02:03');
+select * from t1 where a = '2001-01-01 01:02:03';
+a
+2001-01-01 01:02:03
+drop table t1;
+create table t1 (a timestamp null) partition by key (a);
+insert into t1 values ('2001-01-01 01:02:03');
+select * from t1 where a = '2001-01-01 01:02:03';
+a
+2001-01-01 01:02:03
+drop table t1;
+create table t1 (a time) partition by key (a);
+insert into t1 values ('01:02:03');
+select * from t1 where a = '01:02:03';
+a
+01:02:03
+drop table t1;
+create table t1 (a year) partition by key (a);
+insert into t1 values ('2001');
+select * from t1 where a = '2001';
+a
+2001
+drop table t1;
+create table t1 (a varchar(10) character set utf8) partition by key (a);
+insert into t1 values ('abc');
+select * from t1 where a = 'abc';
+a
+abc
+drop table t1;
+create table t1 (a varchar(300) character set utf8) partition by key (a);
+insert into t1 values ('abc');
+select * from t1 where a = 'abc';
+a
+abc
+drop table t1;
+create table t1 (a varchar(10) character set latin1) partition by key (a);
+insert into t1 values ('abc');
+select * from t1 where a = 'abc';
+a
+abc
+drop table t1;
+create table t1 (a varchar(300) character set latin1) partition by key (a);
+insert into t1 values ('abc');
+select * from t1 where a = 'abc';
+a
+abc
+drop table t1;
+create table t1 (a char(10) character set utf8) partition by key (a);
+insert into t1 values ('abc');
+select * from t1 where a = 'abc';
+a
+abc
+drop table t1;
+create table t1 (a char(10) character set latin1) partition by key (a);
+insert into t1 values ('abc');
+select * from t1 where a = 'abc';
+a
+abc
+drop table t1;
+create table t1 (a enum('y','n')) partition by key (a);
+insert into t1 values ('y');
+select * from t1 where a = 'y';
+a
+y
+drop table t1;
+create table t1 (a set('y','n')) partition by key (a);
+insert into t1 values ('y');
+select * from t1 where a = 'y';
+a
+y
+drop table t1;
+create table t1 (a varchar(65531)) partition by key (a);
+insert into t1 values ('bbbb');
+insert into t1 values ('aaaa');
+select * from t1 where a = 'aaa%';
+a
+select * from t1 where a like 'aaa%';
+a
+aaaa
+drop table t1;
+create table t1 (a varchar(65532)) partition by key (a);
+insert into t1 values ('bbbb');
+insert into t1 values ('aaaa');
+select * from t1 where a = 'aaa%';
+a
+select * from t1 where a like 'aaa%';
+a
+aaaa
+drop table t1;
+create table t1 (a varchar(65533) not null) partition by key (a);
+insert into t1 values ('aaaa');
+select * from t1 where a = 'aaa%';
+a
+drop table t1;
+create table t1 (a varchar(65533)) partition by key (a);
+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
+create table t1 (a varchar(65534) not null) partition by key (a);
+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
+create table t1 (a varchar(65535)) partition by key (a);
+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
diff --git a/mysql-test/r/partition_error.result b/mysql-test/r/partition_error.result
index 7952c8df609..46532cb32ab 100644
--- a/mysql-test/r/partition_error.result
+++ b/mysql-test/r/partition_error.result
@@ -1,4 +1,13 @@
drop table if exists t1;
+CREATE TABLE t1 (
+a int
+)
+PARTITION BY RANGE (a)
+(
+PARTITION p0 VALUES LESS THAN (1),
+PARTITION p1 VALU ES LESS THAN (2)
+);
+ERROR HY000: Syntax error: RANGE PARTITIONING requires definition of VALUES LESS THAN for each partition
partition by list (a)
partitions 3
(partition x1 values in (1,2,9,4) tablespace ts1,
@@ -351,7 +360,7 @@ partition by range (a)
partitions 2
(partition x1 values less than (4),
partition x2);
-ERROR HY000: RANGE PARTITIONING requires definition of VALUES LESS THAN for each partition
+ERROR HY000: Syntax error: RANGE PARTITIONING requires definition of VALUES LESS THAN for each partition
CREATE TABLE t1 (
a int not null,
b int not null,
@@ -531,7 +540,7 @@ partition by list (a)
partitions 2
(partition x1 values in (4),
partition x2);
-ERROR HY000: LIST PARTITIONING requires definition of VALUES IN for each partition
+ERROR HY000: Syntax error: LIST PARTITIONING requires definition of VALUES IN for each partition
CREATE TABLE t1 (
a int not null,
b int not null,
@@ -551,7 +560,7 @@ partition by list (a)
partitions 2
(partition x1 values in (4,6),
partition x2);
-ERROR HY000: LIST PARTITIONING requires definition of VALUES IN for each partition
+ERROR HY000: Syntax error: LIST PARTITIONING requires definition of VALUES IN for each partition
CREATE TABLE t1 (
a int not null,
b int not null,
diff --git a/mysql-test/r/partition_hash.result b/mysql-test/r/partition_hash.result
index 9a82a36d902..94fefe77a77 100644
--- a/mysql-test/r/partition_hash.result
+++ b/mysql-test/r/partition_hash.result
@@ -1,4 +1,16 @@
drop table if exists t1;
+CREATE TABLE t1 (c1 INT)
+PARTITION BY HASH (c1)
+PARTITIONS 15;
+INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
+ALTER TABLE t1 COALESCE PARTITION 13;
+DROP TABLE t1;
+CREATE TABLE t1 (c1 INT)
+PARTITION BY LINEAR HASH (c1)
+PARTITIONS 5;
+INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
+ALTER TABLE t1 COALESCE PARTITION 3;
+DROP TABLE t1;
create table t1 (a int unsigned)
partition by hash(a div 2)
partitions 4;
@@ -183,3 +195,6 @@ c1 c2 c3
182 abc 2002-11-09
184 abc 2002-11-22
drop table t1;
+CREATE TABLE t1 (c1 INT) ENGINE=MyISAM PARTITION BY HASH(c1) PARTITIONS 1;
+INSERT DELAYED INTO t1 VALUES (1);
+DROP TABLE t1;
diff --git a/mysql-test/r/partition_innodb.result b/mysql-test/r/partition_innodb.result
index 8282cfc212a..5cbe34c94ca 100644
--- a/mysql-test/r/partition_innodb.result
+++ b/mysql-test/r/partition_innodb.result
@@ -1,3 +1,15 @@
+# Bug#32948
+CREATE TABLE t1 (c1 INT, PRIMARY KEY (c1)) ENGINE=INNODB;
+CREATE TABLE t2 (c1 INT, PRIMARY KEY (c1),
+FOREIGN KEY (c1) REFERENCES t1 (c1)
+ON DELETE CASCADE)
+ENGINE=INNODB;
+ALTER TABLE t1 PARTITION BY HASH(c1) PARTITIONS 5;
+ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails
+ALTER TABLE t1 ENGINE=MyISAM;
+ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails
+DROP TABLE t2;
+DROP TABLE t1;
create table t1 (a int) engine=innodb partition by hash(a) ;
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
@@ -129,3 +141,23 @@ insert into t1 (time, first_name, last_name) values ('2007-02-07', 'Q', 'Robert'
SELECT * FROM t1 WHERE first_name='Andy' OR last_name='Jake';
id time first_name last_name
drop table t1;
+CREATE TABLE t1 (a DOUBLE NOT NULL, KEY(a)) ENGINE=InnoDB
+PARTITION BY KEY(a) PARTITIONS 10;
+INSERT INTO t1 VALUES(1),(2);
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+2
+DROP TABLE t1;
+create table t1 (int_column int, char_column char(5))
+PARTITION BY RANGE (int_column) subpartition by key (char_column) subpartitions 2
+(PARTITION p1 VALUES LESS THAN (5) ENGINE = InnoDB);
+alter table t1 PARTITION BY RANGE (int_column)
+subpartition by key (char_column) subpartitions 2
+(PARTITION p1 VALUES LESS THAN (5) ENGINE = myisam);
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `int_column` int(11) DEFAULT NULL,
+ `char_column` char(5) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (int_column) SUBPARTITION BY KEY (char_column) SUBPARTITIONS 2 (PARTITION p1 VALUES LESS THAN (5) ENGINE = MyISAM) */
+drop table t1;
diff --git a/mysql-test/r/partition_mgm.result b/mysql-test/r/partition_mgm.result
index 04ac603fea7..9ef220028b3 100644
--- a/mysql-test/r/partition_mgm.result
+++ b/mysql-test/r/partition_mgm.result
@@ -17,12 +17,6 @@ t1 CREATE TABLE `t1` (
`f_date` date DEFAULT NULL,
`f_varchar` varchar(30) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) PARTITIONS 2 */
-hello/master-data/test/t1#P#p0.MYD
-hello/master-data/test/t1#P#p0.MYI
-hello/master-data/test/t1#P#p1.MYD
-hello/master-data/test/t1#P#p1.MYI
-hello/master-data/test/t1.frm
-hello/master-data/test/t1.par
ALTER TABLE t1 COALESCE PARTITION 1;
SHOW CREATE TABLE t1;
Table Create Table
@@ -30,10 +24,6 @@ t1 CREATE TABLE `t1` (
`f_date` date DEFAULT NULL,
`f_varchar` varchar(30) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) PARTITIONS 1 */
-hello/master-data/test/t1#P#p0.MYD
-hello/master-data/test/t1#P#p0.MYI
-hello/master-data/test/t1.frm
-hello/master-data/test/t1.par
drop table t1;
create table t1 (a int)
partition by list (a)
diff --git a/mysql-test/r/partition_range.result b/mysql-test/r/partition_range.result
index a61006e87a4..4da79704ec3 100644
--- a/mysql-test/r/partition_range.result
+++ b/mysql-test/r/partition_range.result
@@ -1,4 +1,4 @@
-drop table if exists t1;
+drop table if exists t1, t2;
create table t1 (a int unsigned)
partition by range (a)
(partition pnull values less than (0),
diff --git a/mysql-test/r/partition_symlink.result b/mysql-test/r/partition_symlink.result
new file mode 100644
index 00000000000..20e841d2e0e
--- /dev/null
+++ b/mysql-test/r/partition_symlink.result
@@ -0,0 +1,83 @@
+DROP TABLE IF EXISTS t1;
+DROP DATABASE IF EXISTS mysqltest2;
+# Creating two non colliding tables mysqltest2.t1 and test.t1
+# test.t1 have partitions in mysqltest2-directory!
+# user root:
+CREATE USER mysqltest_1@localhost;
+CREATE DATABASE mysqltest2;
+USE mysqltest2;
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (0);
+# user mysqltest_1:
+USE test;
+CREATE TABLE t1 (a INT)
+PARTITION BY LIST (a) (
+PARTITION p0 VALUES IN (0)
+DATA DIRECTORY 'MYSQLTEST_VARDIR/master-data/mysqltest2'
+ INDEX DIRECTORY 'MYSQLTEST_VARDIR/master-data/mysqltest2',
+PARTITION p1 VALUES IN (1)
+DATA DIRECTORY 'MYSQLTEST_VARDIR/master-data/test'
+ INDEX DIRECTORY 'MYSQLTEST_VARDIR/master-data/test',
+PARTITION p2 VALUES IN (2)
+);
+# without the patch for bug#32091 this would create
+# files mysqltest2/t1.MYD + .MYI and possible overwrite
+# the mysqltest2.t1 table (depending on bug#32111)
+ALTER TABLE t1 REMOVE PARTITIONING;
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1;
+a
+1
+# user root:
+USE mysqltest2;
+FLUSH TABLES;
+# if the patch works, this should be different
+# and before the patch they were the same!
+SELECT * FROM t1;
+a
+0
+USE test;
+SELECT * FROM t1;
+a
+1
+DROP TABLE t1;
+DROP DATABASE mysqltest2;
+# test that symlinks can not overwrite files when CREATE TABLE
+# user root:
+CREATE DATABASE mysqltest2;
+USE mysqltest2;
+CREATE TABLE t1 (a INT)
+PARTITION BY LIST (a) (
+PARTITION p0 VALUES IN (0)
+DATA DIRECTORY 'MYSQLTEST_VARDIR/master-data/mysqltest2'
+ INDEX DIRECTORY 'MYSQLTEST_VARDIR/master-data/mysqltest2',
+PARTITION p1 VALUES IN (1)
+DATA DIRECTORY 'MYSQLTEST_VARDIR/master-data/test'
+ INDEX DIRECTORY 'MYSQLTEST_VARDIR/master-data/test'
+ );
+# user mysqltest_1:
+USE test;
+CREATE TABLE t1 (a INT)
+PARTITION BY LIST (a) (
+PARTITION p0 VALUES IN (0)
+DATA DIRECTORY 'MYSQLTEST_VARDIR/master-data/mysqltest2'
+ INDEX DIRECTORY 'MYSQLTEST_VARDIR/master-data/mysqltest2',
+PARTITION p1 VALUES IN (1)
+DATA DIRECTORY 'MYSQLTEST_VARDIR/master-data/test'
+ INDEX DIRECTORY 'MYSQLTEST_VARDIR/master-data/test'
+ );
+Got one of the listed errors
+CREATE TABLE t1 (a INT)
+PARTITION BY LIST (a) (
+PARTITION p0 VALUES IN (0)
+DATA DIRECTORY 'MYSQLTEST_VARDIR/master-data/test'
+ INDEX DIRECTORY 'MYSQLTEST_VARDIR/master-data/test',
+PARTITION p1 VALUES IN (1)
+DATA DIRECTORY 'MYSQLTEST_VARDIR/master-data/mysqltest2'
+ INDEX DIRECTORY 'MYSQLTEST_VARDIR/master-data/mysqltest2'
+ );
+Got one of the listed errors
+# user root (cleanup):
+DROP DATABASE mysqltest2;
+USE test;
+DROP USER mysqltest_1@localhost;
diff --git a/mysql-test/r/plugin.result b/mysql-test/r/plugin.result
index 8628acecf55..e4af1535775 100644
--- a/mysql-test/r/plugin.result
+++ b/mysql-test/r/plugin.result
@@ -17,3 +17,13 @@ UNINSTALL PLUGIN EXAMPLE;
ERROR 42000: PLUGIN EXAMPLE does not exist
UNINSTALL PLUGIN non_exist;
ERROR 42000: PLUGIN non_exist does not exist
+#
+# Bug#32034: check_func_enum() does not check correct values but set it
+# to impossible int val
+#
+INSTALL PLUGIN example SONAME 'ha_example.so';
+SET GLOBAL example_enum_var= e1;
+SET GLOBAL example_enum_var= e2;
+SET GLOBAL example_enum_var= impossible;
+ERROR 42000: Variable 'enum_var' can't be set to the value of 'impossible'
+UNINSTALL PLUGIN example;
diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result
index edac68a88d6..a6b07bfc127 100644
--- a/mysql-test/r/ps.result
+++ b/mysql-test/r/ps.result
@@ -807,6 +807,8 @@ select @@max_prepared_stmt_count;
@@max_prepared_stmt_count
0
set global max_prepared_stmt_count=10000000000000000;
+Warnings:
+Warning 1292 Truncated incorrect max_prepared_stmt_count value: '10000000000000000'
select @@max_prepared_stmt_count;
@@max_prepared_stmt_count
1048576
@@ -1143,6 +1145,11 @@ a
13
DEALLOCATE PREPARE st1;
DROP TABLE t1;
+create table t1 (a int, b tinyint);
+prepare st1 from 'update t1 set b= (str_to_date(a, a))';
+execute st1;
+deallocate prepare st1;
+drop table t1;
End of 4.1 tests.
create table t1 (a varchar(20));
insert into t1 values ('foo');
@@ -2680,4 +2687,21 @@ t1 CREATE TABLE `t1` (
KEY `c` (`c`(10))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
+drop table if exists t1, t2;
+create table t1 (a int, b int);
+create table t2 like t1;
+insert into t1 (a, b) values (1,1), (1,2), (1,3), (1,4), (1,5),
+(2,2), (2,3), (2,1), (3,1), (4,1), (4,2), (4,3), (4,4), (4,5), (4,6);
+insert into t2 select a, max(b) from t1 group by a;
+prepare stmt from "delete from t2 where (select (select max(b) from t1 group
+by a having a < 2) x from t1) > 10000";
+delete from t2 where (select (select max(b) from t1 group
+by a having a < 2) x from t1) > 10000;
+ERROR 21000: Subquery returns more than 1 row
+execute stmt;
+ERROR 21000: Subquery returns more than 1 row
+execute stmt;
+ERROR 21000: Subquery returns more than 1 row
+deallocate prepare stmt;
+drop table t1, t2;
End of 5.1 tests.
diff --git a/mysql-test/r/ps_2myisam.result b/mysql-test/r/ps_2myisam.result
index 3ffebbdf1e4..769c22a40d1 100644
--- a/mysql-test/r/ps_2myisam.result
+++ b/mysql-test/r/ps_2myisam.result
@@ -63,7 +63,7 @@ def test t9 t9 c11 c11 246 9 6 Y 0 4 63
def test t9 t9 c12 c12 246 10 6 Y 0 4 63
def test t9 t9 c13 c13 10 10 10 Y 128 0 63
def test t9 t9 c14 c14 12 19 19 Y 128 0 63
-def test t9 t9 c15 c15 7 19 19 N 1249 0 63
+def test t9 t9 c15 c15 7 19 19 N 9441 0 63
def test t9 t9 c16 c16 11 8 8 Y 128 0 63
def test t9 t9 c17 c17 13 4 4 Y 32864 0 63
def test t9 t9 c18 c18 1 4 1 Y 32768 0 63
@@ -783,20 +783,20 @@ a b
2 two
3 three
4 four
-prepare stmt1 from ' SELECT a as ccc from t1 where a+1=
- (SELECT 1+ccc from t1 where ccc+1=a+1 and a=1) ';
+prepare stmt1 from ' SELECT a as ccc from t1 outr where a+1=
+ (SELECT 1+outr.a from t1 where outr.a+1=a+1 and a=1) ';
execute stmt1 ;
ccc
1
deallocate prepare stmt1 ;
-prepare stmt1 from ' SELECT a as ccc from t1 where a+1=
- (SELECT 1+ccc from t1 where ccc+1=a+1 and a=1) ';
+prepare stmt1 from ' SELECT a as ccc from t1 outr where a+1=
+ (SELECT 1+outr.a from t1 where outr.a+1=a+1 and a=1) ';
execute stmt1 ;
ccc
1
deallocate prepare stmt1 ;
-prepare stmt1 from ' SELECT a as ccc from t1 where a+1=
- (SELECT 1+ccc from t1 where ccc+1=a+1 and a=1) ';
+prepare stmt1 from ' SELECT a as ccc from t1 outr where a+1=
+ (SELECT 1+outr.a from t1 where outr.a+1=a+1 and a=1) ';
execute stmt1 ;
ccc
1
@@ -2973,11 +2973,13 @@ Warnings:
Note 1265 Data truncated for column 'c13' at row 1
Warning 1265 Data truncated for column 'c17' at row 1
Warnings:
+Note 1265 Data truncated for column 'c13' at row 1
Warning 1265 Data truncated for column 'c17' at row 1
Warnings:
Note 1265 Data truncated for column 'c13' at row 1
Warning 1265 Data truncated for column 'c17' at row 1
Warnings:
+Note 1265 Data truncated for column 'c13' at row 1
Warning 1265 Data truncated for column 'c17' at row 1
Warnings:
Note 1265 Data truncated for column 'c13' at row 1
@@ -3011,7 +3013,6 @@ Warning 1265 Data truncated for column 'c15' at row 1
Warning 1264 Out of range value for column 'c16' at row 1
Warning 1264 Out of range value for column 'c17' at row 1
Warnings:
-Note 1265 Data truncated for column 'c13' at row 1
Warning 1265 Data truncated for column 'c15' at row 1
Warning 1264 Out of range value for column 'c16' at row 1
Warning 1264 Out of range value for column 'c17' at row 1
diff --git a/mysql-test/r/ps_3innodb.result b/mysql-test/r/ps_3innodb.result
index 2a11564504a..5d176f86192 100644
--- a/mysql-test/r/ps_3innodb.result
+++ b/mysql-test/r/ps_3innodb.result
@@ -63,7 +63,7 @@ def test t9 t9 c11 c11 246 9 6 Y 0 4 63
def test t9 t9 c12 c12 246 10 6 Y 0 4 63
def test t9 t9 c13 c13 10 10 10 Y 128 0 63
def test t9 t9 c14 c14 12 19 19 Y 128 0 63
-def test t9 t9 c15 c15 7 19 19 N 1249 0 63
+def test t9 t9 c15 c15 7 19 19 N 9441 0 63
def test t9 t9 c16 c16 11 8 8 Y 128 0 63
def test t9 t9 c17 c17 13 4 4 Y 32864 0 63
def test t9 t9 c18 c18 1 4 1 Y 32768 0 63
@@ -783,20 +783,20 @@ a b
2 two
3 three
4 four
-prepare stmt1 from ' SELECT a as ccc from t1 where a+1=
- (SELECT 1+ccc from t1 where ccc+1=a+1 and a=1) ';
+prepare stmt1 from ' SELECT a as ccc from t1 outr where a+1=
+ (SELECT 1+outr.a from t1 where outr.a+1=a+1 and a=1) ';
execute stmt1 ;
ccc
1
deallocate prepare stmt1 ;
-prepare stmt1 from ' SELECT a as ccc from t1 where a+1=
- (SELECT 1+ccc from t1 where ccc+1=a+1 and a=1) ';
+prepare stmt1 from ' SELECT a as ccc from t1 outr where a+1=
+ (SELECT 1+outr.a from t1 where outr.a+1=a+1 and a=1) ';
execute stmt1 ;
ccc
1
deallocate prepare stmt1 ;
-prepare stmt1 from ' SELECT a as ccc from t1 where a+1=
- (SELECT 1+ccc from t1 where ccc+1=a+1 and a=1) ';
+prepare stmt1 from ' SELECT a as ccc from t1 outr where a+1=
+ (SELECT 1+outr.a from t1 where outr.a+1=a+1 and a=1) ';
execute stmt1 ;
ccc
1
@@ -2956,11 +2956,13 @@ Warnings:
Note 1265 Data truncated for column 'c13' at row 1
Warning 1265 Data truncated for column 'c17' at row 1
Warnings:
+Note 1265 Data truncated for column 'c13' at row 1
Warning 1265 Data truncated for column 'c17' at row 1
Warnings:
Note 1265 Data truncated for column 'c13' at row 1
Warning 1265 Data truncated for column 'c17' at row 1
Warnings:
+Note 1265 Data truncated for column 'c13' at row 1
Warning 1265 Data truncated for column 'c17' at row 1
Warnings:
Note 1265 Data truncated for column 'c13' at row 1
@@ -2994,7 +2996,6 @@ Warning 1265 Data truncated for column 'c15' at row 1
Warning 1264 Out of range value for column 'c16' at row 1
Warning 1264 Out of range value for column 'c17' at row 1
Warnings:
-Note 1265 Data truncated for column 'c13' at row 1
Warning 1265 Data truncated for column 'c15' at row 1
Warning 1264 Out of range value for column 'c16' at row 1
Warning 1264 Out of range value for column 'c17' at row 1
diff --git a/mysql-test/r/ps_4heap.result b/mysql-test/r/ps_4heap.result
index e56e771564c..121e02fbe53 100644
--- a/mysql-test/r/ps_4heap.result
+++ b/mysql-test/r/ps_4heap.result
@@ -64,7 +64,7 @@ def test t9 t9 c11 c11 246 9 6 Y 0 4 63
def test t9 t9 c12 c12 246 10 6 Y 0 4 63
def test t9 t9 c13 c13 10 10 10 Y 128 0 63
def test t9 t9 c14 c14 12 19 19 Y 128 0 63
-def test t9 t9 c15 c15 7 19 19 N 1249 0 63
+def test t9 t9 c15 c15 7 19 19 N 9441 0 63
def test t9 t9 c16 c16 11 8 8 Y 128 0 63
def test t9 t9 c17 c17 13 4 4 Y 32864 0 63
def test t9 t9 c18 c18 1 4 1 Y 32768 0 63
@@ -784,20 +784,20 @@ a b
2 two
3 three
4 four
-prepare stmt1 from ' SELECT a as ccc from t1 where a+1=
- (SELECT 1+ccc from t1 where ccc+1=a+1 and a=1) ';
+prepare stmt1 from ' SELECT a as ccc from t1 outr where a+1=
+ (SELECT 1+outr.a from t1 where outr.a+1=a+1 and a=1) ';
execute stmt1 ;
ccc
1
deallocate prepare stmt1 ;
-prepare stmt1 from ' SELECT a as ccc from t1 where a+1=
- (SELECT 1+ccc from t1 where ccc+1=a+1 and a=1) ';
+prepare stmt1 from ' SELECT a as ccc from t1 outr where a+1=
+ (SELECT 1+outr.a from t1 where outr.a+1=a+1 and a=1) ';
execute stmt1 ;
ccc
1
deallocate prepare stmt1 ;
-prepare stmt1 from ' SELECT a as ccc from t1 where a+1=
- (SELECT 1+ccc from t1 where ccc+1=a+1 and a=1) ';
+prepare stmt1 from ' SELECT a as ccc from t1 outr where a+1=
+ (SELECT 1+outr.a from t1 where outr.a+1=a+1 and a=1) ';
execute stmt1 ;
ccc
1
@@ -2957,11 +2957,13 @@ Warnings:
Note 1265 Data truncated for column 'c13' at row 1
Warning 1265 Data truncated for column 'c17' at row 1
Warnings:
+Note 1265 Data truncated for column 'c13' at row 1
Warning 1265 Data truncated for column 'c17' at row 1
Warnings:
Note 1265 Data truncated for column 'c13' at row 1
Warning 1265 Data truncated for column 'c17' at row 1
Warnings:
+Note 1265 Data truncated for column 'c13' at row 1
Warning 1265 Data truncated for column 'c17' at row 1
Warnings:
Note 1265 Data truncated for column 'c13' at row 1
@@ -2995,7 +2997,6 @@ Warning 1265 Data truncated for column 'c15' at row 1
Warning 1264 Out of range value for column 'c16' at row 1
Warning 1264 Out of range value for column 'c17' at row 1
Warnings:
-Note 1265 Data truncated for column 'c13' at row 1
Warning 1265 Data truncated for column 'c15' at row 1
Warning 1264 Out of range value for column 'c16' at row 1
Warning 1264 Out of range value for column 'c17' at row 1
diff --git a/mysql-test/r/ps_5merge.result b/mysql-test/r/ps_5merge.result
index 2f51b65152c..c0182bdc81b 100644
--- a/mysql-test/r/ps_5merge.result
+++ b/mysql-test/r/ps_5merge.result
@@ -106,7 +106,7 @@ def test t9 t9 c11 c11 246 9 6 Y 0 4 63
def test t9 t9 c12 c12 246 10 6 Y 0 4 63
def test t9 t9 c13 c13 10 10 10 Y 128 0 63
def test t9 t9 c14 c14 12 19 19 Y 128 0 63
-def test t9 t9 c15 c15 7 19 19 N 1249 0 63
+def test t9 t9 c15 c15 7 19 19 N 9441 0 63
def test t9 t9 c16 c16 11 8 8 Y 128 0 63
def test t9 t9 c17 c17 13 4 4 Y 32864 0 63
def test t9 t9 c18 c18 1 4 1 Y 32768 0 63
@@ -826,20 +826,20 @@ a b
2 two
3 three
4 four
-prepare stmt1 from ' SELECT a as ccc from t1 where a+1=
- (SELECT 1+ccc from t1 where ccc+1=a+1 and a=1) ';
+prepare stmt1 from ' SELECT a as ccc from t1 outr where a+1=
+ (SELECT 1+outr.a from t1 where outr.a+1=a+1 and a=1) ';
execute stmt1 ;
ccc
1
deallocate prepare stmt1 ;
-prepare stmt1 from ' SELECT a as ccc from t1 where a+1=
- (SELECT 1+ccc from t1 where ccc+1=a+1 and a=1) ';
+prepare stmt1 from ' SELECT a as ccc from t1 outr where a+1=
+ (SELECT 1+outr.a from t1 where outr.a+1=a+1 and a=1) ';
execute stmt1 ;
ccc
1
deallocate prepare stmt1 ;
-prepare stmt1 from ' SELECT a as ccc from t1 where a+1=
- (SELECT 1+ccc from t1 where ccc+1=a+1 and a=1) ';
+prepare stmt1 from ' SELECT a as ccc from t1 outr where a+1=
+ (SELECT 1+outr.a from t1 where outr.a+1=a+1 and a=1) ';
execute stmt1 ;
ccc
1
@@ -2893,11 +2893,13 @@ Warnings:
Note 1265 Data truncated for column 'c13' at row 1
Warning 1265 Data truncated for column 'c17' at row 1
Warnings:
+Note 1265 Data truncated for column 'c13' at row 1
Warning 1265 Data truncated for column 'c17' at row 1
Warnings:
Note 1265 Data truncated for column 'c13' at row 1
Warning 1265 Data truncated for column 'c17' at row 1
Warnings:
+Note 1265 Data truncated for column 'c13' at row 1
Warning 1265 Data truncated for column 'c17' at row 1
Warnings:
Note 1265 Data truncated for column 'c13' at row 1
@@ -2931,7 +2933,6 @@ Warning 1265 Data truncated for column 'c15' at row 1
Warning 1264 Out of range value for column 'c16' at row 1
Warning 1264 Out of range value for column 'c17' at row 1
Warnings:
-Note 1265 Data truncated for column 'c13' at row 1
Warning 1265 Data truncated for column 'c15' at row 1
Warning 1264 Out of range value for column 'c16' at row 1
Warning 1264 Out of range value for column 'c17' at row 1
@@ -3127,7 +3128,7 @@ def test t9 t9 c11 c11 246 9 6 Y 0 4 63
def test t9 t9 c12 c12 246 10 6 Y 0 4 63
def test t9 t9 c13 c13 10 10 10 Y 128 0 63
def test t9 t9 c14 c14 12 19 19 Y 128 0 63
-def test t9 t9 c15 c15 7 19 19 N 1249 0 63
+def test t9 t9 c15 c15 7 19 19 N 9441 0 63
def test t9 t9 c16 c16 11 8 8 Y 128 0 63
def test t9 t9 c17 c17 13 4 4 Y 32864 0 63
def test t9 t9 c18 c18 1 4 1 Y 32768 0 63
@@ -3847,20 +3848,20 @@ a b
2 two
3 three
4 four
-prepare stmt1 from ' SELECT a as ccc from t1 where a+1=
- (SELECT 1+ccc from t1 where ccc+1=a+1 and a=1) ';
+prepare stmt1 from ' SELECT a as ccc from t1 outr where a+1=
+ (SELECT 1+outr.a from t1 where outr.a+1=a+1 and a=1) ';
execute stmt1 ;
ccc
1
deallocate prepare stmt1 ;
-prepare stmt1 from ' SELECT a as ccc from t1 where a+1=
- (SELECT 1+ccc from t1 where ccc+1=a+1 and a=1) ';
+prepare stmt1 from ' SELECT a as ccc from t1 outr where a+1=
+ (SELECT 1+outr.a from t1 where outr.a+1=a+1 and a=1) ';
execute stmt1 ;
ccc
1
deallocate prepare stmt1 ;
-prepare stmt1 from ' SELECT a as ccc from t1 where a+1=
- (SELECT 1+ccc from t1 where ccc+1=a+1 and a=1) ';
+prepare stmt1 from ' SELECT a as ccc from t1 outr where a+1=
+ (SELECT 1+outr.a from t1 where outr.a+1=a+1 and a=1) ';
execute stmt1 ;
ccc
1
@@ -5914,11 +5915,13 @@ Warnings:
Note 1265 Data truncated for column 'c13' at row 1
Warning 1265 Data truncated for column 'c17' at row 1
Warnings:
+Note 1265 Data truncated for column 'c13' at row 1
Warning 1265 Data truncated for column 'c17' at row 1
Warnings:
Note 1265 Data truncated for column 'c13' at row 1
Warning 1265 Data truncated for column 'c17' at row 1
Warnings:
+Note 1265 Data truncated for column 'c13' at row 1
Warning 1265 Data truncated for column 'c17' at row 1
Warnings:
Note 1265 Data truncated for column 'c13' at row 1
@@ -5952,7 +5955,6 @@ Warning 1265 Data truncated for column 'c15' at row 1
Warning 1264 Out of range value for column 'c16' at row 1
Warning 1264 Out of range value for column 'c17' at row 1
Warnings:
-Note 1265 Data truncated for column 'c13' at row 1
Warning 1265 Data truncated for column 'c15' at row 1
Warning 1264 Out of range value for column 'c16' at row 1
Warning 1264 Out of range value for column 'c17' at row 1
diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result
index b3a98a94728..ce5ae57c125 100644
--- a/mysql-test/r/query_cache.result
+++ b/mysql-test/r/query_cache.result
@@ -1650,86 +1650,23 @@ a (select count(*) from t2)
3 0
4 0
drop table t1,t2;
-DROP DATABASE IF EXISTS bug30269;
-FLUSH STATUS;
-CREATE DATABASE bug30269;
-USE bug30269;
-CREATE TABLE test1 (id int, name varchar(23));
-CREATE VIEW view1 AS SELECT * FROM test1;
-INSERT INTO test1 VALUES (5, 'testit');
-GRANT SELECT (id) ON TABLE bug30269.test1 TO 'bug30269'@'localhost';
-GRANT SELECT ON TABLE bug30269.view1 TO 'bug30269'@'localhost';
-set global query_cache_size= 81920;
-USE bug30269;
-show status like 'Qcache_queries_in_cache';
-Variable_name Value
-Qcache_queries_in_cache 0
-# Select statement not stored in query cache because of column privileges.
-SELECT id FROM test1 WHERE id>2;
-id
-5
-show status like 'Qcache_queries_in_cache';
-Variable_name Value
-Qcache_queries_in_cache 0
-SELECT id FROM view1 WHERE id>2;
-id
-5
-show status like 'Qcache_queries_in_cache';
-Variable_name Value
-Qcache_queries_in_cache 1
-DROP DATABASE bug30269;
-DROP USER 'bug30269'@'localhost';
set GLOBAL query_cache_type=default;
set GLOBAL query_cache_limit=default;
set GLOBAL query_cache_min_res_unit=default;
set GLOBAL query_cache_size=default;
End of 5.0 tests
-drop database if exists db1;
-drop database if exists db2;
-set GLOBAL query_cache_size=15*1024*1024;
-create database db1;
-use db1;
-create table t1(c1 int)engine=myisam;
-insert into t1(c1) values (1);
-select * from db1.t1 f;
-c1
+CREATE TABLE t1 (a ENUM('rainbow'));
+INSERT INTO t1 VALUES (),(),(),(),();
+SELECT 1 FROM t1 GROUP BY (SELECT 1 FROM t1 ORDER BY AVG(LAST_INSERT_ID()));
1
-show status like 'Qcache_queries_in_cache';
-Variable_name Value
-Qcache_queries_in_cache 1
-rename schema db1 to db2;
-show status like 'Qcache_queries_in_cache';
-Variable_name Value
-Qcache_queries_in_cache 0
-drop database db2;
-set global query_cache_size=default;
-drop database if exists db1;
-drop database if exists db3;
-set GLOBAL query_cache_size=15*1024*1024;
-create database db1;
-create database db3;
-use db1;
-create table t1(c1 int) engine=myisam;
-use db3;
-create table t1(c1 int) engine=myisam;
-use db1;
-insert into t1(c1) values (1);
-use mysql;
-select * from db1.t1;
-c1
1
-select c1+1 from db1.t1;
-c1+1
-2
-select * from db3.t1;
-c1
-show status like 'Qcache_queries_in_cache';
-Variable_name Value
-Qcache_queries_in_cache 3
-rename schema db1 to db2;
-show status like 'Qcache_queries_in_cache';
-Variable_name Value
-Qcache_queries_in_cache 1
-drop database db2;
-drop database db3;
+DROP TABLE t1;
+CREATE TABLE t1 (a LONGBLOB);
+INSERT INTO t1 SET a = 'aaaa';
+INSERT INTO t1 SET a = 'aaaa';
+SELECT 1 FROM t1 GROUP BY
+(SELECT LAST_INSERT_ID() FROM t1 ORDER BY MIN(a) ASC LIMIT 1);
+1
+1
+DROP TABLE t1;
End of 5.1 tests
diff --git a/mysql-test/r/query_cache_notembedded.result b/mysql-test/r/query_cache_notembedded.result
index 05ef28a3180..ec78c2267d2 100644
--- a/mysql-test/r/query_cache_notembedded.result
+++ b/mysql-test/r/query_cache_notembedded.result
@@ -347,3 +347,36 @@ drop table t1;
drop function f1;
set GLOBAL query_cache_size=0;
SET GLOBAL log_bin_trust_function_creators = 0;
+DROP DATABASE IF EXISTS bug30269;
+FLUSH STATUS;
+CREATE DATABASE bug30269;
+USE bug30269;
+CREATE TABLE test1 (id int, name varchar(23));
+CREATE VIEW view1 AS SELECT * FROM test1;
+INSERT INTO test1 VALUES (5, 'testit');
+GRANT SELECT (id) ON TABLE bug30269.test1 TO 'bug30269'@'localhost';
+GRANT SELECT ON TABLE bug30269.view1 TO 'bug30269'@'localhost';
+set global query_cache_size= 81920;
+USE bug30269;
+show status like 'Qcache_queries_in_cache';
+Variable_name Value
+Qcache_queries_in_cache 0
+# Select statement not stored in query cache because of column privileges.
+SELECT id FROM test1 WHERE id>2;
+id
+5
+show status like 'Qcache_queries_in_cache';
+Variable_name Value
+Qcache_queries_in_cache 0
+SELECT id FROM view1 WHERE id>2;
+id
+5
+show status like 'Qcache_queries_in_cache';
+Variable_name Value
+Qcache_queries_in_cache 1
+DROP DATABASE bug30269;
+DROP USER 'bug30269'@'localhost';
+set GLOBAL query_cache_type=default;
+set GLOBAL query_cache_limit=default;
+set GLOBAL query_cache_min_res_unit=default;
+set GLOBAL query_cache_size=default;
diff --git a/mysql-test/r/range.result b/mysql-test/r/range.result
index 108264b3bf2..92db6d8429f 100644
--- a/mysql-test/r/range.result
+++ b/mysql-test/r/range.result
@@ -1135,6 +1135,24 @@ item started price
A1 2005-11-01 08:00:00 1000.000
A1 2005-11-15 00:00:00 2000.000
DROP TABLE t1;
+
+BUG#32198 "Comparison of DATE with DATETIME still not using indexes correctly"
+
+CREATE TABLE t1 (
+id int(11) NOT NULL auto_increment,
+dateval date default NULL,
+PRIMARY KEY (id),
+KEY dateval (dateval)
+) AUTO_INCREMENT=173;
+INSERT INTO t1 VALUES
+(1,'2007-01-01'),(2,'2007-01-02'),(3,'2007-01-03'),(4,'2007-01-04'),
+(5,'2007-01-05'),(6,'2007-01-06'),(7,'2007-01-07'),(8,'2007-01-08'),
+(9,'2007-01-09'),(10,'2007-01-10'),(11,'2007-01-11');
+This must use range access:
+explain select * from t1 where dateval >= '2007-01-01 00:00:00' and dateval <= '2007-01-02 23:59:59';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range dateval dateval 4 NULL 2 Using where
+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, filler char(100));
diff --git a/mysql-test/r/renamedb.result b/mysql-test/r/renamedb.result
index b22322fbe8d..ff8f89592fc 100644
--- a/mysql-test/r/renamedb.result
+++ b/mysql-test/r/renamedb.result
@@ -1,33 +1,12 @@
-drop database if exists testdb1;
-create database testdb1 default character set latin2;
-use testdb1;
-create table t1 (a int);
-insert into t1 values (1),(2),(3);
-show create database testdb1;
-Database Create Database
-testdb1 CREATE DATABASE `testdb1` /*!40100 DEFAULT CHARACTER SET latin2 */
-show tables;
-Tables_in_testdb1
-t1
rename database testdb1 to testdb2;
-show create database testdb1;
-ERROR 42000: Unknown database 'testdb1'
-show create database testdb2;
-Database Create Database
-testdb2 CREATE DATABASE `testdb2` /*!40100 DEFAULT CHARACTER SET latin2 */
-select database();
-database()
-testdb2
-show tables;
-Tables_in_testdb2
-t1
-select a from t1 order by a;
-a
-1
-2
-3
-drop database testdb2;
-create database testdb1;
-rename database testdb1 to testdb1;
-ERROR HY000: Can't create database 'testdb1'; database exists
-drop database testdb1;
+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 'database testdb1 to testdb2' at line 1
+ALTER DATABASE wrong UPGRADE DATA DIRECTORY NAME;
+ERROR HY000: Incorrect usage of ALTER DATABASE UPGRADE DATA DIRECTORY NAME and name
+ALTER DATABASE `#mysql41#not-supported` UPGRADE DATA DIRECTORY NAME;
+ERROR HY000: Incorrect usage of ALTER DATABASE UPGRADE DATA DIRECTORY NAME and name
+ALTER DATABASE `#mysql51#not-yet` UPGRADE DATA DIRECTORY NAME;
+ERROR HY000: Incorrect usage of ALTER DATABASE UPGRADE DATA DIRECTORY NAME and name
+ALTER DATABASE `#mysql50#` UPGRADE DATA DIRECTORY NAME;
+ERROR HY000: Incorrect usage of ALTER DATABASE UPGRADE DATA DIRECTORY NAME and name
+ALTER DATABASE `#mysql50#upgrade-me` UPGRADE DATA DIRECTORY NAME;
+ERROR 42000: Unknown database '#mysql50#upgrade-me'
diff --git a/mysql-test/r/repair.result b/mysql-test/r/repair.result
index 7fc09c43f4b..8c0671ad740 100644
--- a/mysql-test/r/repair.result
+++ b/mysql-test/r/repair.result
@@ -88,6 +88,33 @@ test.t1 repair status OK
SET myisam_repair_threads=@@global.myisam_repair_threads;
SET myisam_sort_buffer_size=@@global.myisam_sort_buffer_size;
DROP TABLE t1;
+CREATE TABLE t1(a CHAR(255), KEY(a));
+SET myisam_sort_buffer_size=4496;
+INSERT INTO t1 VALUES
+('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
+('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
+('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
+('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
+('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
+('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
+('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
+('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
+('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
+('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
+('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
+('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
+('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
+('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
+('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
+('0'),('0'),('0'),('0'),('0'),('0'),('0');
+SET myisam_repair_threads=2;
+REPAIR TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 repair status OK
+SET myisam_repair_threads=@@global.myisam_repair_threads;
+SET myisam_sort_buffer_size=@@global.myisam_sort_buffer_size;
+DROP TABLE t1;
+End of 4.1 tests
DROP TABLE IF EXISTS tt1;
CREATE TEMPORARY TABLE tt1 (c1 INT);
REPAIR TABLE tt1 USE_FRM;
diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result
index ed61cfffa6b..2f305f6ec5d 100644
--- a/mysql-test/r/select.result
+++ b/mysql-test/r/select.result
@@ -607,11 +607,11 @@ id select_type table type possible_keys key key_len ref rows Extra
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 ALL period NULL NULL NULL 41810 Using filesort
+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 ALL period NULL NULL NULL 41810 Using filesort
+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
@@ -2827,6 +2827,14 @@ 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 '',
@@ -3233,40 +3241,40 @@ 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;
+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';
+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';
+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';
+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';
+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';
+select * from t1 where f2 <= '2005-09-3a' order by f2;
f1 f2
1 2005-01-01
2 2005-09-01
-3 2005-09-30
Warnings:
Warning 1292 Incorrect date value: '2005-09-3a' for column 'f2' at row 1
drop table t1;
@@ -4062,25 +4070,249 @@ 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 1474 Name ' ' has become ''
-SELECT `` FROM v1;
-
+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
-CREATE VIEW v2 AS SELECT 1 AS ` `;
Warnings:
-Warning 1474 Name ' ' has become ''
-SELECT `` FROM v2;
-
+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
-CREATE VIEW v3 AS SELECT 1 AS ` x`;
Warnings:
-Warning 1466 Leading spaces are removed from name ' x'
-SELECT `x` FROM v3;
-x
+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
-DROP VIEW v1, v2, v3;
+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;
+
End of 5.0 tests
create table t1(a INT, KEY (a));
INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
diff --git a/mysql-test/r/shm.result b/mysql-test/r/shm.result
new file mode 100644
index 00000000000..b42de1e0f70
--- /dev/null
+++ b/mysql-test/r/shm.result
@@ -0,0 +1,2155 @@
+drop table if exists t1,t2,t3,t4;
+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` <> _latin1''))
+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;
+CREATE TABLE t1 (
+cont_nr int(11) NOT NULL auto_increment,
+ver_nr int(11) NOT NULL default '0',
+aufnr int(11) NOT NULL default '0',
+username varchar(50) NOT NULL default '',
+hdl_nr int(11) NOT NULL default '0',
+eintrag date NOT NULL default '0000-00-00',
+st_klasse varchar(40) NOT NULL default '',
+st_wert varchar(40) NOT NULL default '',
+st_zusatz varchar(40) NOT NULL default '',
+st_bemerkung varchar(255) NOT NULL default '',
+kunden_art varchar(40) NOT NULL default '',
+mcbs_knr int(11) default NULL,
+mcbs_aufnr int(11) NOT NULL default '0',
+schufa_status char(1) default '?',
+bemerkung text,
+wirknetz text,
+wf_igz int(11) NOT NULL default '0',
+tarifcode varchar(80) default NULL,
+recycle char(1) default NULL,
+sim varchar(30) default NULL,
+mcbs_tpl varchar(30) default NULL,
+emp_nr int(11) NOT NULL default '0',
+laufzeit int(11) default NULL,
+hdl_name varchar(30) default NULL,
+prov_hdl_nr int(11) NOT NULL default '0',
+auto_wirknetz varchar(50) default NULL,
+auto_billing varchar(50) default NULL,
+touch timestamp NOT NULL,
+kategorie varchar(50) default NULL,
+kundentyp varchar(20) NOT NULL default '',
+sammel_rech_msisdn varchar(30) NOT NULL default '',
+p_nr varchar(9) NOT NULL default '',
+suffix char(3) NOT NULL default '',
+PRIMARY KEY (cont_nr),
+KEY idx_aufnr(aufnr),
+KEY idx_hdl_nr(hdl_nr),
+KEY idx_st_klasse(st_klasse),
+KEY ver_nr(ver_nr),
+KEY eintrag_idx(eintrag),
+KEY emp_nr_idx(emp_nr),
+KEY wf_igz(wf_igz),
+KEY touch(touch),
+KEY hdl_tag(eintrag,hdl_nr),
+KEY prov_hdl_nr(prov_hdl_nr),
+KEY mcbs_aufnr(mcbs_aufnr),
+KEY kundentyp(kundentyp),
+KEY p_nr(p_nr,suffix)
+) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (3359356,405,3359356,'Mustermann Musterfrau',52500,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1485525,2122316,'+','','N',1909160,'MobilComSuper92000D2',NULL,NULL,'MS9ND2',3,24,'MobilCom Shop Koeln',52500,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
+INSERT INTO t1 VALUES (3359357,468,3359357,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1503580,2139699,'+','','P',1909171,'MobilComSuper9D1T10SFreisprech(Akquise)',NULL,NULL,'MS9NS1',327,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
+INSERT INTO t1 VALUES (3359358,407,3359358,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1501358,2137473,'N','','N',1909159,'MobilComSuper92000D2',NULL,NULL,'MS9ND2',325,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
+INSERT INTO t1 VALUES (3359359,468,3359359,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1507831,2143894,'+','','P',1909162,'MobilComSuper9D1T10SFreisprech(Akquise)',NULL,NULL,'MS9NS1',327,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
+INSERT INTO t1 VALUES (3359360,0,0,'Mustermann Musterfrau',29674907,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1900169997,2414578,'+',NULL,'N',1909148,'',NULL,NULL,'RV99066_2',20,NULL,'POS',29674907,NULL,NULL,20010202105916,'Mobilfunk','','','97317481','007');
+INSERT INTO t1 VALUES (3359361,406,3359361,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag storniert','','(7001-84):Storno, Kd. möchte nicht mehr','privat',NULL,0,'+','','P',1909150,'MobilComSuper92000D1(Akquise)',NULL,NULL,'MS9ND1',325,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
+INSERT INTO t1 VALUES (3359362,406,3359362,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1509984,2145874,'+','','P',1909154,'MobilComSuper92000D1(Akquise)',NULL,NULL,'MS9ND1',327,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
+SELECT ELT(FIELD(kundentyp,'PP','PPA','PG','PGA','FK','FKA','FP','FPA','K','KA','V','VA',''), 'Privat (Private Nutzung)','Privat (Private Nutzung) Sitz im Ausland','Privat (geschaeftliche Nutzung)','Privat (geschaeftliche Nutzung) Sitz im Ausland','Firma (Kapitalgesellschaft)','Firma (Kapitalgesellschaft) Sitz im Ausland','Firma (Personengesellschaft)','Firma (Personengesellschaft) Sitz im Ausland','oeff. rechtl. Koerperschaft','oeff. rechtl. Koerperschaft Sitz im Ausland','Eingetragener Verein','Eingetragener Verein Sitz im Ausland','Typ unbekannt') AS Kundentyp ,kategorie FROM t1 WHERE hdl_nr < 2000000 AND kategorie IN ('Prepaid','Mobilfunk') AND st_klasse = 'Workflow' GROUP BY kundentyp ORDER BY kategorie;
+Kundentyp kategorie
+Privat (Private Nutzung) Mobilfunk
+Warnings:
+Warning 1052 Column 'kundentyp' in group statement is ambiguous
+drop table t1;
+mysqld is alive
+End of 5.0 tests.
diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result
index 04a5253e6a8..ff32d2a1512 100644
--- a/mysql-test/r/show_check.result
+++ b/mysql-test/r/show_check.result
@@ -979,7 +979,7 @@ def COLUMNS CHARACTER_SET_NAME CHARACTER_SET_NAME 253 192 0 Y 0 0 33
def COLUMNS COLLATION_NAME COLLATION_NAME 253 192 0 Y 0 0 33
def COLUMNS COLUMN_TYPE COLUMN_TYPE 252 589815 7 N 17 0 33
def COLUMNS COLUMN_KEY COLUMN_KEY 253 9 3 N 1 0 33
-def COLUMNS EXTRA EXTRA 253 60 0 N 1 0 33
+def COLUMNS EXTRA EXTRA 253 81 0 N 1 0 33
def COLUMNS PRIVILEGES PRIVILEGES 253 240 31 N 1 0 33
def COLUMNS COLUMN_COMMENT COLUMN_COMMENT 253 765 0 N 1 0 33
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT
@@ -998,7 +998,7 @@ def COLUMNS COLUMN_TYPE Type 252 589815 7 N 17 0 33
def COLUMNS IS_NULLABLE Null 253 9 2 N 1 0 33
def COLUMNS COLUMN_KEY Key 253 9 3 N 1 0 33
def COLUMNS COLUMN_DEFAULT Default 252 589815 0 Y 16 0 33
-def COLUMNS EXTRA Extra 253 60 0 N 1 0 33
+def COLUMNS EXTRA Extra 253 81 0 N 1 0 33
Field Type Null Key Default Extra
c int(11) NO PRI NULL
----------------------------------------------------------------
diff --git a/mysql-test/r/skip_grants.result b/mysql-test/r/skip_grants.result
index 6bb8cbea2f1..bf0f16a174f 100644
--- a/mysql-test/r/skip_grants.result
+++ b/mysql-test/r/skip_grants.result
@@ -72,3 +72,15 @@ count(*)
select count(*) from information_schema.USER_PRIVILEGES;
count(*)
0
+CREATE FUNCTION a RETURNS STRING SONAME '';
+ERROR HY000: Can't initialize function 'a'; UDFs are unavailable with the --skip-grant-tables option
+DROP FUNCTION a;
+ERROR 42000: FUNCTION test.a does not exist
+End of 5.0 tests
+#
+# Bug#29817 Queries with UDF fail with non-descriptive error
+# if mysql.proc is missing
+#
+select no_such_function(1);
+ERROR 42000: FUNCTION test.no_such_function does not exist
+End of 5.1 tests
diff --git a/mysql-test/r/sp-code.result b/mysql-test/r/sp-code.result
index b2bcfff0fdb..018173e723d 100644
--- a/mysql-test/r/sp-code.result
+++ b/mysql-test/r/sp-code.result
@@ -155,11 +155,11 @@ Pos Instruction
0 stmt 9 "drop temporary table if exists sudoku..."
1 stmt 1 "create temporary table sudoku_work ( ..."
2 stmt 1 "create temporary table sudoku_schedul..."
-3 stmt 95 "call sudoku_init()"
+3 stmt 94 "call sudoku_init()"
4 jump_if_not 7(8) p_naive@0
5 stmt 4 "update sudoku_work set cnt = 0 where ..."
6 jump 8
-7 stmt 95 "call sudoku_count()"
+7 stmt 94 "call sudoku_count()"
8 stmt 6 "insert into sudoku_schedule (row,col)..."
9 set v_scounter@2 0
10 set v_i@3 1
diff --git a/mysql-test/r/sp-error.result b/mysql-test/r/sp-error.result
index 2e0d437aeb6..b81f8ea64c9 100644
--- a/mysql-test/r/sp-error.result
+++ b/mysql-test/r/sp-error.result
@@ -142,7 +142,10 @@ declare c cursor for insert into test.t1 values ("foo", 42);
open c;
close c;
end|
-ERROR 42000: Cursor statement must be a SELECT
+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 'insert into test.t1 values ("foo", 42);
+open c;
+close c;
+end' at line 3
create procedure p()
begin
declare x int;
@@ -1223,7 +1226,7 @@ ERROR 42S02: Unknown table 'c' in field list
drop procedure bug15091;
drop function if exists bug16896;
create aggregate function bug16896() returns int return 1;
-ERROR 42000: AGGREGATE is not supported for stored functions
+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 '() returns int return 1' at line 1
DROP PROCEDURE IF EXISTS bug14702;
CREATE IF NOT EXISTS PROCEDURE bug14702()
BEGIN
@@ -1425,7 +1428,6 @@ create function bug20701() returns varchar(25) binary return "test";
ERROR 42000: This version of MySQL doesn't yet support 'return value collation'
create function bug20701() returns varchar(25) return "test";
drop function bug20701;
-End of 5.1 tests
create procedure proc_26503_error_1()
begin
retry:
@@ -1478,3 +1480,102 @@ end
until true end repeat retry;
end//
ERROR 42000: LEAVE with no matching label: retry
+drop procedure if exists proc_28360;
+drop function if exists func_28360;
+CREATE PROCEDURE proc_28360()
+BEGIN
+ALTER DATABASE `#mysql50#upgrade-me` UPGRADE DATA DIRECTORY NAME;
+END//
+ERROR HY000: Can't drop or alter a DATABASE from within another stored routine
+CREATE FUNCTION func_28360() RETURNS int
+BEGIN
+ALTER DATABASE `#mysql50#upgrade-me` UPGRADE DATA DIRECTORY NAME;
+RETURN 0;
+END//
+ERROR HY000: Can't drop or alter a DATABASE from within another stored routine
+DROP PROCEDURE IF EXISTS p1;
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE c char(100);
+DECLARE cur1 CURSOR FOR SHOW TABLES;
+OPEN cur1;
+FETCH cur1 INTO c;
+select c;
+CLOSE cur1;
+END|
+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 'SHOW TABLES;
+OPEN cur1;
+FETCH cur1 INTO c;
+select c;
+CLOSE cur1;
+END' at line 4
+DROP DATABASE IF EXISTS mysqltest;
+CREATE DATABASE mysqltest;
+USE mysqltest;
+DROP DATABASE mysqltest;
+SELECT inexistent(), 1 + ,;
+ERROR 42000: FUNCTION inexistent does not exist
+SELECT inexistent();
+ERROR 42000: FUNCTION inexistent does not exist
+SELECT .inexistent();
+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
+SELECT ..inexistent();
+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 '.inexistent()' at line 1
+USE test;
+create function f1() returns int
+begin
+set @test = 1, password = password('foo');
+return 1;
+end|
+ERROR HY000: Not allowed to set autocommit from a stored function or trigger
+create trigger t1
+before insert on t2 for each row set password = password('foo');|
+ERROR HY000: Not allowed to set autocommit from a stored function or trigger
+drop function if exists f1;
+drop function if exists f2;
+drop table if exists t1, t2;
+create function f1() returns int
+begin
+drop temporary table t1;
+return 1;
+end|
+create temporary table t1 as select f1();
+ERROR HY000: Can't reopen table: 't1'
+create function f2() returns int
+begin
+create temporary table t2 as select f1();
+return 1;
+end|
+create temporary table t1 as select f2();
+ERROR HY000: Can't reopen table: 't1'
+drop function f1;
+drop function f2;
+create function f1() returns int
+begin
+drop temporary table t2,t1;
+return 1;
+end|
+create function f2() returns int
+begin
+create temporary table t2 as select f1();
+return 1;
+end|
+create temporary table t1 as select f2();
+ERROR HY000: Can't reopen table: 't2'
+drop function f1;
+drop function f2;
+create temporary table t2(a int);
+select * from t2;
+a
+create function f2() returns int
+begin
+drop temporary table t2;
+return 1;
+end|
+select f2();
+f2()
+1
+drop function f2;
+drop table t2;
+ERROR 42S02: Unknown table 't2'
+End of 5.1 tests
diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result
index 55b27b0a733..68aa278585f 100644
--- a/mysql-test/r/sp.result
+++ b/mysql-test/r/sp.result
@@ -4914,7 +4914,7 @@ create table t3 as select * from v1|
show create table t3|
Table Create Table
t3 CREATE TABLE `t3` (
- `j` bigint(11) DEFAULT NULL
+ `j` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
select * from t3|
j
@@ -5670,7 +5670,7 @@ drop function if exists pi;
create function pi() returns varchar(50)
return "pie, my favorite desert.";
Warnings:
-Note 1584 This function 'pi' has the same name as a native function
+Note 1585 This function 'pi' has the same name as a native function
SET @save_sql_mode=@@sql_mode;
SET SQL_MODE='IGNORE_SPACE';
select pi(), pi ();
@@ -5719,15 +5719,15 @@ use test;
create function `database`() returns varchar(50)
return "Stored function database";
Warnings:
-Note 1584 This function 'database' has the same name as a native function
+Note 1585 This function 'database' has the same name as a native function
create function `current_user`() returns varchar(50)
return "Stored function current_user";
Warnings:
-Note 1584 This function 'current_user' has the same name as a native function
+Note 1585 This function 'current_user' has the same name as a native function
create function md5(x varchar(50)) returns varchar(50)
return "Stored function md5";
Warnings:
-Note 1584 This function 'md5' has the same name as a native function
+Note 1585 This function 'md5' has the same name as a native function
SET SQL_MODE='IGNORE_SPACE';
select database(), database ();
database() database ()
@@ -6620,4 +6620,295 @@ DROP TABLE t1;
DROP PROCEDURE p1;
DROP PROCEDURE p2;
+
+#
+# Bug#31035.
+#
+
+#
+# - Prepare.
+#
+
+DROP TABLE IF EXISTS t1;
+DROP FUNCTION IF EXISTS f1;
+DROP FUNCTION IF EXISTS f2;
+DROP FUNCTION IF EXISTS f3;
+DROP FUNCTION IF EXISTS f4;
+
+#
+# - Create required objects.
+#
+
+CREATE TABLE t1(c1 INT);
+
+INSERT INTO t1 VALUES (1), (2), (3);
+
+CREATE FUNCTION f1()
+RETURNS INT
+NOT DETERMINISTIC
+RETURN 1;
+
+CREATE FUNCTION f2(p INT)
+RETURNS INT
+NOT DETERMINISTIC
+RETURN 1;
+
+CREATE FUNCTION f3()
+RETURNS INT
+DETERMINISTIC
+RETURN 1;
+
+CREATE FUNCTION f4(p INT)
+RETURNS INT
+DETERMINISTIC
+RETURN 1;
+
+#
+# - Check.
+#
+
+SELECT f1() AS a FROM t1 GROUP BY a;
+a
+1
+
+SELECT f2(@a) AS a FROM t1 GROUP BY a;
+a
+1
+
+SELECT f3() AS a FROM t1 GROUP BY a;
+a
+1
+
+SELECT f4(0) AS a FROM t1 GROUP BY a;
+a
+1
+
+SELECT f4(@a) AS a FROM t1 GROUP BY a;
+a
+1
+
+#
+# - Cleanup.
+#
+
+DROP TABLE t1;
+DROP FUNCTION f1;
+DROP FUNCTION f2;
+DROP FUNCTION f3;
+DROP FUNCTION f4;
+
+#
+# Bug#31191.
+#
+
+#
+# - Prepare.
+#
+
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t2;
+DROP FUNCTION IF EXISTS f1;
+
+#
+# - Create required objects.
+#
+
+CREATE TABLE t1 (
+id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
+barcode INT(8) UNSIGNED ZEROFILL nOT NULL,
+PRIMARY KEY (id),
+UNIQUE KEY barcode (barcode)
+);
+
+INSERT INTO t1 (id, barcode) VALUES (1, 12345678);
+INSERT INTO t1 (id, barcode) VALUES (2, 12345679);
+
+CREATE TABLE test.t2 (
+id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
+barcode BIGINT(11) UNSIGNED ZEROFILL NOT NULL,
+PRIMARY KEY (id)
+);
+
+INSERT INTO test.t2 (id, barcode) VALUES (1, 12345106708);
+INSERT INTO test.t2 (id, barcode) VALUES (2, 12345106709);
+
+CREATE FUNCTION f1(p INT(8))
+RETURNS BIGINT(11) UNSIGNED
+READS SQL DATA
+RETURN FLOOR(p/1000)*1000000 + 100000 + FLOOR((p MOD 1000)/10)*100 + (p MOD 10);
+
+#
+# - Check.
+#
+
+SELECT DISTINCT t1.barcode, f1(t1.barcode)
+FROM t1
+INNER JOIN t2
+ON f1(t1.barcode) = t2.barcode
+WHERE t1.barcode=12345678;
+barcode f1(t1.barcode)
+12345678 12345106708
+
+#
+# - Cleanup.
+#
+
+DROP TABLE t1;
+DROP TABLE t2;
+DROP FUNCTION f1;
+
+#
+# Bug#31226.
+#
+
+#
+# - Prepare.
+#
+
+DROP TABLE IF EXISTS t1;
+DROP FUNCTION IF EXISTS f1;
+
+#
+# - Create required objects.
+#
+
+CREATE TABLE t1(id INT);
+
+INSERT INTO t1 VALUES (1), (2), (3);
+
+CREATE FUNCTION f1()
+RETURNS DATETIME
+NOT DETERMINISTIC NO SQL
+RETURN NOW();
+
+#
+# - Check.
+#
+
+SELECT f1() FROM t1 GROUP BY 1;
+f1()
+<timestamp>
+
+#
+# - Cleanup.
+#
+
+DROP TABLE t1;
+DROP FUNCTION f1;
+
+DROP PROCEDURE IF EXISTS db28318_a.t1;
+DROP PROCEDURE IF EXISTS db28318_b.t2;
+DROP DATABASE IF EXISTS db28318_a;
+DROP DATABASE IF EXISTS db28318_b;
+CREATE DATABASE db28318_a;
+CREATE DATABASE db28318_b;
+CREATE PROCEDURE db28318_a.t1() SELECT "db28318_a.t1";
+CREATE PROCEDURE db28318_b.t2() CALL t1();
+use db28318_a;
+CALL db28318_b.t2();
+ERROR 42000: PROCEDURE db28318_b.t1 does not exist
+DROP PROCEDURE db28318_a.t1;
+DROP PROCEDURE db28318_b.t2;
+DROP DATABASE db28318_a;
+DROP DATABASE db28318_b;
+use test;
End of 5.0 tests
+
+#
+# Bug#20550.
+#
+
+#
+# - Prepare.
+#
+
+DROP VIEW IF EXISTS v1;
+DROP VIEW IF EXISTS v2;
+DROP FUNCTION IF EXISTS f1;
+DROP FUNCTION IF EXISTS f2;
+
+#
+# - Create required objects.
+#
+
+CREATE FUNCTION f1() RETURNS VARCHAR(65525) RETURN 'Hello';
+
+CREATE FUNCTION f2() RETURNS TINYINT RETURN 1;
+
+CREATE VIEW v1 AS SELECT f1();
+
+CREATE VIEW v2 AS SELECT f2();
+
+#
+# - Check.
+#
+
+SELECT DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'v1';
+DATA_TYPE
+varchar
+
+SELECT DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'v2';
+DATA_TYPE
+tinyint
+
+#
+# - Cleanup.
+#
+
+DROP FUNCTION f1;
+DROP FUNCTION f2;
+DROP VIEW v1;
+DROP VIEW v2;
+
+#
+# - Bug#24923: prepare.
+#
+
+DROP FUNCTION IF EXISTS f1;
+
+#
+# - Bug#24923: create required objects.
+#
+
+CREATE FUNCTION f1(p INT)
+RETURNS ENUM ('Very_long_enum_element_identifier',
+'Another_very_long_enum_element_identifier')
+BEGIN
+CASE p
+WHEN 1 THEN
+RETURN 'Very_long_enum_element_identifier';
+ELSE
+RETURN 'Another_very_long_enum_element_identifier';
+END CASE;
+END|
+
+#
+# - Bug#24923: check.
+#
+
+SELECT f1(1);
+f1(1)
+Very_long_enum_element_identifier
+
+SELECT f1(2);
+f1(2)
+Another_very_long_enum_element_identifier
+
+SHOW CREATE FUNCTION f1;
+Function sql_mode Create Function character_set_client collation_connection Database Collation
+f1 CREATE DEFINER=`root`@`localhost` FUNCTION `f1`(p INT) RETURNS enum('Very_long_enum_element_identifier','Another_very_long_enum_element_identifier') CHARSET latin1
+BEGIN
+CASE p
+WHEN 1 THEN
+RETURN 'Very_long_enum_element_identifier';
+ELSE
+RETURN 'Another_very_long_enum_element_identifier';
+END CASE;
+END latin1 latin1_swedish_ci latin1_swedish_ci
+#
+# - Bug#24923: cleanup.
+#
+
+DROP FUNCTION f1;
+
+End of 5.1 tests
diff --git a/mysql-test/r/sp_gis.result b/mysql-test/r/sp_gis.result
index b0960dec647..7a76507754f 100644
--- a/mysql-test/r/sp_gis.result
+++ b/mysql-test/r/sp_gis.result
@@ -7,11 +7,11 @@ return 1;
create function x() returns int
return 2;
Warnings:
-Note 1584 This function 'x' has the same name as a native function
+Note 1585 This function 'x' has the same name as a native function
create function y() returns int
return 3;
Warnings:
-Note 1584 This function 'y' has the same name as a native function
+Note 1585 This function 'y' has the same name as a native function
select a();
a()
1
diff --git a/mysql-test/r/ssl.result b/mysql-test/r/ssl.result
index 1f1a6ec9e22..3622fb51c99 100644
--- a/mysql-test/r/ssl.result
+++ b/mysql-test/r/ssl.result
@@ -608,11 +608,11 @@ id select_type table type possible_keys key key_len ref rows Extra
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 ALL period NULL NULL NULL 41810 Using filesort
+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 ALL period NULL NULL NULL 41810 Using filesort
+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
diff --git a/mysql-test/r/ssl_compress.result b/mysql-test/r/ssl_compress.result
index e77fcefeafd..3018fce5cad 100644
--- a/mysql-test/r/ssl_compress.result
+++ b/mysql-test/r/ssl_compress.result
@@ -611,11 +611,11 @@ id select_type table type possible_keys key key_len ref rows Extra
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 ALL period NULL NULL NULL 41810 Using filesort
+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 ALL period NULL NULL NULL 41810 Using filesort
+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
diff --git a/mysql-test/r/status.result b/mysql-test/r/status.result
index db75044ee5d..c95b09597fc 100644
--- a/mysql-test/r/status.result
+++ b/mysql-test/r/status.result
@@ -8,6 +8,8 @@ VARIABLE_NAME VARIABLE_VALUE
TABLE_LOCKS_IMMEDIATE 2
TABLE_LOCKS_WAITED 0
SET SQL_LOG_BIN=0;
+set @old_general_log = @@global.general_log;
+set global general_log = 'OFF';
drop table if exists t1;
create table t1(n int) engine=myisam;
insert into t1 values(1);
@@ -20,6 +22,7 @@ show status like 'Table_locks_waited';
Variable_name Value
Table_locks_waited 1
drop table t1;
+set global general_log = @old_general_log;
select 1;
1
1
diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result
index f5a28b73509..209f67e5386 100644
--- a/mysql-test/r/subselect.result
+++ b/mysql-test/r/subselect.result
@@ -77,10 +77,9 @@ ERROR HY000: Incorrect usage of PROCEDURE and subquery
SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE((SELECT 1));
ERROR HY000: Incorrect parameters to procedure 'ANALYSE'
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NULL;
-a
+ERROR 42S22: Unknown column 'a' in 'field list'
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NOT NULL;
-a
-1
+ERROR 42S22: Unknown column 'a' in 'field list'
SELECT (SELECT 1,2,3) = ROW(1,2,3);
(SELECT 1,2,3) = ROW(1,2,3)
1
@@ -1307,7 +1306,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 index NULL PRIMARY 4 NULL 4 100.00 Using where; Using index
2 DEPENDENT SUBQUERY t1 unique_subquery PRIMARY PRIMARY 4 func 1 100.00 Using where
Warnings:
-Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` where <in_optimizer>(`test`.`t2`.`a`,<exists>(<primary_index_lookup>(<cache>(`test`.`t2`.`a`) in t1 on PRIMARY where (`test`.`t1`.`b` <> 30))))
+Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` where <in_optimizer>(`test`.`t2`.`a`,<exists>(<primary_index_lookup>(<cache>(`test`.`t2`.`a`) in t1 on PRIMARY where ((`test`.`t1`.`b` <> 30) and (<cache>(`test`.`t2`.`a`) = `test`.`t1`.`a`)))))
select * from t2 where t2.a in (select t1.a from t1,t3 where t1.b=t3.a);
a
2
@@ -1315,8 +1314,8 @@ a
explain extended select * from t2 where t2.a in (select t1.a from t1,t3 where t1.b=t3.a);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 index NULL PRIMARY 4 NULL 4 100.00 Using where; Using index
-2 DEPENDENT SUBQUERY t1 eq_ref PRIMARY PRIMARY 4 func 1 100.00 Using where
-2 DEPENDENT SUBQUERY t3 eq_ref PRIMARY PRIMARY 4 test.t1.b 1 100.00 Using where; Using index
+2 DEPENDENT SUBQUERY t1 eq_ref PRIMARY PRIMARY 4 func 1 100.00
+2 DEPENDENT SUBQUERY t3 eq_ref PRIMARY PRIMARY 4 test.t1.b 1 100.00 Using index
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` where <in_optimizer>(`test`.`t2`.`a`,<exists>(select 1 AS `Not_used` from `test`.`t1` join `test`.`t3` where ((`test`.`t3`.`a` = `test`.`t1`.`b`) and (<cache>(`test`.`t2`.`a`) = `test`.`t1`.`a`))))
drop table t1, t2, t3;
@@ -1334,9 +1333,9 @@ a
explain extended select * from t2 where t2.a in (select a from t1);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 index NULL a 5 NULL 4 100.00 Using where; Using index
-2 DEPENDENT SUBQUERY t1 index_subquery a a 5 func 1001 100.00 Using index
+2 DEPENDENT SUBQUERY t1 index_subquery a a 5 func 1001 100.00 Using index; Using where
Warnings:
-Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` where <in_optimizer>(`test`.`t2`.`a`,<exists>(<index_lookup>(<cache>(`test`.`t2`.`a`) in t1 on a)))
+Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` where <in_optimizer>(`test`.`t2`.`a`,<exists>(<index_lookup>(<cache>(`test`.`t2`.`a`) in t1 on a where (<cache>(`test`.`t2`.`a`) = `test`.`t1`.`a`))))
select * from t2 where t2.a in (select a from t1 where t1.b <> 30);
a
2
@@ -1346,7 +1345,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 index NULL a 5 NULL 4 100.00 Using where; Using index
2 DEPENDENT SUBQUERY t1 index_subquery a a 5 func 1001 100.00 Using index; Using where
Warnings:
-Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` where <in_optimizer>(`test`.`t2`.`a`,<exists>(<index_lookup>(<cache>(`test`.`t2`.`a`) in t1 on a where (`test`.`t1`.`b` <> 30))))
+Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` where <in_optimizer>(`test`.`t2`.`a`,<exists>(<index_lookup>(<cache>(`test`.`t2`.`a`) in t1 on a where ((`test`.`t1`.`b` <> 30) and (<cache>(`test`.`t2`.`a`) = `test`.`t1`.`a`)))))
select * from t2 where t2.a in (select t1.a from t1,t3 where t1.b=t3.a);
a
2
@@ -1373,7 +1372,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 index NULL a 5 NULL 4 100.00 Using where; Using index
2 DEPENDENT SUBQUERY t1 index_subquery a a 5 func 1001 100.00 Using index; Using where
Warnings:
-Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` where <in_optimizer>(`test`.`t2`.`a`,<exists>(<index_lookup>(<cache>(`test`.`t2`.`a`) in t1 on a where (`test`.`t1`.`b` <> 30))))
+Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` where <in_optimizer>(`test`.`t2`.`a`,<exists>(<index_lookup>(<cache>(`test`.`t2`.`a`) in t1 on a where ((`test`.`t1`.`b` <> 30) and (<cache>(`test`.`t2`.`a`) = `test`.`t1`.`a`)))))
drop table t1, t2, t3;
create table t1 (a int, b int);
create table t2 (a int, b int);
@@ -1737,7 +1736,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 12 100.00 Using where
2 DEPENDENT SUBQUERY t1 unique_subquery PRIMARY PRIMARY 4 func 1 100.00 Using index; Using where
Warnings:
-Note 1003 select `test`.`t1`.`id` AS `id`,`test`.`t1`.`text` AS `text` from `test`.`t1` where (not(<in_optimizer>(`test`.`t1`.`id`,<exists>(<primary_index_lookup>(<cache>(`test`.`t1`.`id`) in t1 on PRIMARY where (`test`.`t1`.`id` < 8))))))
+Note 1003 select `test`.`t1`.`id` AS `id`,`test`.`t1`.`text` AS `text` from `test`.`t1` where (not(<in_optimizer>(`test`.`t1`.`id`,<exists>(<primary_index_lookup>(<cache>(`test`.`t1`.`id`) in t1 on PRIMARY where ((`test`.`t1`.`id` < 8) and (<cache>(`test`.`t1`.`id`) = `test`.`t1`.`id`)))))))
explain extended select * from t1 as tt where not exists (select id from t1 where id < 8 and (id = tt.id or id is null) having id is not null);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY tt ALL NULL NULL NULL NULL 12 100.00 Using where
@@ -2304,24 +2303,27 @@ drop table t1,t2;
CREATE TABLE t1 ( a int, b int );
CREATE TABLE t2 ( c int, d int );
INSERT INTO t1 VALUES (1,2), (2,3), (3,4);
-SELECT a AS abc, b FROM t1 WHERE b = (SELECT MIN(b) FROM t1 WHERE a=abc);
+SELECT a AS abc, b FROM t1 outr WHERE b =
+(SELECT MIN(b) FROM t1 WHERE a=outr.a);
abc b
1 2
2 3
3 4
-INSERT INTO t2 SELECT a AS abc, b FROM t1 WHERE b = (SELECT MIN(b) FROM t1 WHERE a=abc);
+INSERT INTO t2 SELECT a AS abc, b FROM t1 outr WHERE b =
+(SELECT MIN(b) FROM t1 WHERE a=outr.a);
select * from t2;
c d
1 2
2 3
3 4
-CREATE TABLE t3 SELECT a AS abc, b FROM t1 WHERE b = (SELECT MIN(b) FROM t1 WHERE a=abc);
+CREATE TABLE t3 SELECT a AS abc, b FROM t1 outr WHERE b =
+(SELECT MIN(b) FROM t1 WHERE a=outr.a);
select * from t3;
abc b
1 2
2 3
3 4
-prepare stmt1 from "INSERT INTO t2 SELECT a AS abc, b FROM t1 WHERE b = (SELECT MIN(b) FROM t1 WHERE a=abc);";
+prepare stmt1 from "INSERT INTO t2 SELECT a AS abc, b FROM t1 outr WHERE b = (SELECT MIN(b) FROM t1 WHERE a=outr.a);";
execute stmt1;
deallocate prepare stmt1;
select * from t2;
@@ -2333,7 +2335,7 @@ c d
2 3
3 4
drop table t3;
-prepare stmt1 from "CREATE TABLE t3 SELECT a AS abc, b FROM t1 WHERE b = (SELECT MIN(b) FROM t1 WHERE a=abc);";
+prepare stmt1 from "CREATE TABLE t3 SELECT a AS abc, b FROM t1 outr WHERE b = (SELECT MIN(b) FROM t1 WHERE a=outr.a);";
execute stmt1;
select * from t3;
abc b
@@ -2515,7 +2517,9 @@ INSERT INTO t1 VALUES ('ASM','American Samoa','Oceania','Polynesia',199.00,0,680
INSERT INTO t1 VALUES ('ATF','French Southern territories','Antarctica','Antarctica',7780.00,0,0,NULL,0.00,NULL,'Terres australes françaises','Nonmetropolitan Territory of France','Jacques Chirac',NULL,'TF');
INSERT INTO t1 VALUES ('UMI','United States Minor Outlying Islands','Oceania','Micronesia/Caribbean',16.00,0,0,NULL,0.00,NULL,'United States Minor Outlying Islands','Dependent Territory of the US','George W. Bush',NULL,'UM');
/*!40000 ALTER TABLE t1 ENABLE KEYS */;
-SELECT DISTINCT Continent AS c FROM t1 WHERE Code <> SOME ( SELECT Code FROM t1 WHERE Continent = c AND Population < 200);
+SELECT DISTINCT Continent AS c FROM t1 outr WHERE
+Code <> SOME ( SELECT Code FROM t1 WHERE Continent = outr.Continent AND
+Population < 200);
c
Oceania
drop table t1;
@@ -3558,22 +3562,19 @@ SELECT sql_no_cache * FROM t1 WHERE NOT EXISTS
(SELECT i FROM t1) UNION
(SELECT i FROM t1)
);
-i
+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 'UNION
+(SELECT i FROM t1)
+)' at line 3
SELECT * FROM t1
WHERE NOT EXISTS (((SELECT i FROM t1) UNION (SELECT i FROM t1)));
-i
+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 'UNION (SELECT i FROM t1)))' at line 2
explain select ((select t11.i from t1 t11) union (select t12.i from t1 t12))
from t1;
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 'union (select t12.i from t1 t12))
from t1' at line 1
explain select * from t1 where not exists
((select t11.i from t1 t11) union (select t12.i from t1 t12));
-id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 system NULL NULL NULL NULL 0 const row not found
-2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL No tables used
-3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL no matching row in const table
-4 UNION t12 system NULL NULL NULL NULL 0 const row not found
-NULL UNION RESULT <union2,4> ALL NULL NULL NULL NULL NULL
+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 'union (select t12.i from t1 t12))' at line 2
DROP TABLE t1;
CREATE TABLE t1 (a VARCHAR(250), b INT auto_increment, PRIMARY KEY (b));
insert into t1 (a) values (FLOOR(rand() * 100));
@@ -3666,6 +3667,8 @@ CREATE TABLE t1 (a int, b int auto_increment, PRIMARY KEY (b));
CREATE TABLE t2 (x int auto_increment, y int, z int,
PRIMARY KEY (x), FOREIGN KEY (y) REFERENCES t1 (b));
SET SESSION sort_buffer_size = 32 * 1024;
+Warnings:
+Warning 1292 Truncated incorrect sort_buffer_size value: '32768'
SELECT SQL_NO_CACHE COUNT(*)
FROM (SELECT a, b, (SELECT x FROM t2 WHERE y=b ORDER BY z DESC LIMIT 1) c
FROM t1) t;
@@ -4101,6 +4104,8 @@ INSERT INTO `t1` VALUES ('asdf','2007-02-08 01:11:26');
INSERT INTO `t2` VALUES ('abcdefghijk');
INSERT INTO `t2` VALUES ('asdf');
SET session sort_buffer_size=8192;
+Warnings:
+Warning 1292 Truncated incorrect sort_buffer_size value: '8192'
SELECT (SELECT 1 FROM t1 WHERE t1.a=t2.a ORDER BY t1.b LIMIT 1) AS d1 FROM t2;
d1
1
@@ -4139,6 +4144,144 @@ SELECT (SELECT SUM(t1.a) FROM t2 WHERE a=1) FROM t1;
(SELECT SUM(t1.a) FROM t2 WHERE a=1)
3
DROP TABLE t1,t2;
+CREATE TABLE t1 (a1 INT, a2 INT);
+CREATE TABLE t2 (b1 INT, b2 INT);
+INSERT INTO t1 VALUES (100, 200);
+INSERT INTO t1 VALUES (101, 201);
+INSERT INTO t2 VALUES (101, 201);
+INSERT INTO t2 VALUES (103, 203);
+SELECT ((a1,a2) IN (SELECT * FROM t2 WHERE b2 > 0)) IS NULL FROM t1;
+((a1,a2) IN (SELECT * FROM t2 WHERE b2 > 0)) IS NULL
+0
+0
+DROP TABLE t1, t2;
+CREATE TABLE t1 (s1 BINARY(5), s2 VARBINARY(5));
+INSERT INTO t1 VALUES (0x41,0x41), (0x42,0x42), (0x43,0x43);
+SELECT s1, s2 FROM t1 WHERE s2 IN (SELECT s1 FROM t1);
+s1 s2
+SELECT s1, s2 FROM t1 WHERE (s2, 10) IN (SELECT s1, 10 FROM t1);
+s1 s2
+CREATE INDEX I1 ON t1 (s1);
+CREATE INDEX I2 ON t1 (s2);
+SELECT s1, s2 FROM t1 WHERE s2 IN (SELECT s1 FROM t1);
+s1 s2
+SELECT s1, s2 FROM t1 WHERE (s2, 10) IN (SELECT s1, 10 FROM t1);
+s1 s2
+TRUNCATE t1;
+INSERT INTO t1 VALUES (0x41,0x41);
+SELECT * FROM t1 WHERE s1 = (SELECT s2 FROM t1);
+s1 s2
+DROP TABLE t1;
+CREATE TABLE t1 (a1 VARBINARY(2) NOT NULL DEFAULT '0', PRIMARY KEY (a1));
+CREATE TABLE t2 (a2 BINARY(2) default '0', INDEX (a2));
+CREATE TABLE t3 (a3 BINARY(2) default '0');
+INSERT INTO t1 VALUES (1),(2),(3),(4);
+INSERT INTO t2 VALUES (1),(2),(3);
+INSERT INTO t3 VALUES (1),(2),(3);
+SELECT LEFT(t2.a2, 1) FROM t2,t3 WHERE t3.a3=t2.a2;
+LEFT(t2.a2, 1)
+1
+2
+3
+SELECT t1.a1, t1.a1 in (SELECT t2.a2 FROM t2,t3 WHERE t3.a3=t2.a2) FROM t1;
+a1 t1.a1 in (SELECT t2.a2 FROM t2,t3 WHERE t3.a3=t2.a2)
+1 0
+2 0
+3 0
+4 0
+DROP TABLE t1,t2,t3;
+CREATE TABLE t1 (a1 BINARY(3) PRIMARY KEY, b1 VARBINARY(3));
+CREATE TABLE t2 (a2 VARBINARY(3) PRIMARY KEY);
+CREATE TABLE t3 (a3 VARBINARY(3) PRIMARY KEY);
+INSERT INTO t1 VALUES (1,10), (2,20), (3,30), (4,40);
+INSERT INTO t2 VALUES (2), (3), (4), (5);
+INSERT INTO t3 VALUES (10), (20), (30);
+SELECT LEFT(t1.a1,1) FROM t1,t3 WHERE t1.b1=t3.a3;
+LEFT(t1.a1,1)
+1
+2
+3
+SELECT a2 FROM t2 WHERE t2.a2 IN (SELECT t1.a1 FROM t1,t3 WHERE t1.b1=t3.a3);
+a2
+DROP TABLE t1, t2, t3;
+CREATE TABLE t1 (a CHAR(1), b VARCHAR(10));
+INSERT INTO t1 VALUES ('a', 'aa');
+INSERT INTO t1 VALUES ('a', 'aaa');
+SELECT a,b FROM t1 WHERE b IN (SELECT a FROM t1);
+a b
+CREATE INDEX I1 ON t1 (a);
+CREATE INDEX I2 ON t1 (b);
+EXPLAIN SELECT a,b FROM t1 WHERE b IN (SELECT a FROM t1);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using where
+2 DEPENDENT SUBQUERY t1 index_subquery I1 I1 2 func 2 Using index; Using where
+SELECT a,b FROM t1 WHERE b IN (SELECT a FROM t1);
+a b
+CREATE TABLE t2 (a VARCHAR(1), b VARCHAR(10));
+INSERT INTO t2 SELECT * FROM t1;
+CREATE INDEX I1 ON t2 (a);
+CREATE INDEX I2 ON t2 (b);
+EXPLAIN SELECT a,b FROM t2 WHERE b IN (SELECT a FROM t2);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using where
+2 DEPENDENT SUBQUERY t2 index_subquery I1 I1 4 func 2 Using index; Using where
+SELECT a,b FROM t2 WHERE b IN (SELECT a FROM t2);
+a b
+EXPLAIN
+SELECT a,b FROM t1 WHERE b IN (SELECT a FROM t1 WHERE LENGTH(a)<500);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using where
+2 DEPENDENT SUBQUERY t1 index_subquery I1 I1 2 func 2 Using index; Using where
+SELECT a,b FROM t1 WHERE b IN (SELECT a FROM t1 WHERE LENGTH(a)<500);
+a b
+DROP TABLE t1,t2;
+CREATE TABLE t1(a INT, b INT);
+INSERT INTO t1 VALUES (1,1), (1,2), (2,3), (2,4);
+EXPLAIN
+SELECT a AS out_a, MIN(b) FROM t1
+WHERE b > (SELECT MIN(b) FROM t1 WHERE a = out_a)
+GROUP BY a;
+ERROR 42S22: Unknown column 'out_a' in 'where clause'
+SELECT a AS out_a, MIN(b) FROM t1
+WHERE b > (SELECT MIN(b) FROM t1 WHERE a = out_a)
+GROUP BY a;
+ERROR 42S22: Unknown column 'out_a' in 'where clause'
+EXPLAIN
+SELECT a AS out_a, MIN(b) FROM t1 t1_outer
+WHERE b > (SELECT MIN(b) FROM t1 WHERE a = t1_outer.a)
+GROUP BY a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1_outer ALL NULL NULL NULL NULL 4 Using where; Using temporary; Using filesort
+2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 4 Using where
+SELECT a AS out_a, MIN(b) FROM t1 t1_outer
+WHERE b > (SELECT MIN(b) FROM t1 WHERE a = t1_outer.a)
+GROUP BY a;
+out_a MIN(b)
+1 2
+2 4
+DROP TABLE t1;
+CREATE TABLE t1 (a INT);
+CREATE TABLE t2 (a INT);
+INSERT INTO t1 VALUES (1),(2);
+INSERT INTO t2 VALUES (1),(2);
+SELECT 2 FROM t1 WHERE EXISTS ((SELECT 1 FROM t2 WHERE t1.a=t2.a));
+2
+2
+2
+EXPLAIN EXTENDED
+SELECT 2 FROM t1 WHERE EXISTS ((SELECT 1 FROM t2 WHERE t1.a=t2.a));
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 Using where
+2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 100.00 Using where
+Warnings:
+Note 1276 Field or reference 'test.t1.a' of SELECT #2 was resolved in SELECT #1
+Note 1003 select 2 AS `2` from `test`.`t1` where exists(select 1 AS `1` from `test`.`t2` where (`test`.`t1`.`a` = `test`.`t2`.`a`))
+EXPLAIN EXTENDED
+SELECT 2 FROM t1 WHERE EXISTS ((SELECT 1 FROM t2 WHERE t1.a=t2.a) UNION
+(SELECT 1 FROM t2 WHERE t1.a = t2.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 'UNION
+(SELECT 1 FROM t2 WHERE t1.a = t2.a))' at line 2
+DROP TABLE t1,t2;
End of 5.0 tests.
CREATE TABLE t1 (a int, b int);
INSERT INTO t1 VALUES (2,22),(1,11),(2,22);
diff --git a/mysql-test/r/subselect3.result b/mysql-test/r/subselect3.result
index 2f3ea31a2a4..ac492caf89a 100644
--- a/mysql-test/r/subselect3.result
+++ b/mysql-test/r/subselect3.result
@@ -757,6 +757,6 @@ a
EXPLAIN SELECT a FROM t1 WHERE a NOT IN (SELECT a FROM t2);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 4 Using where
-2 DEPENDENT SUBQUERY t2 unique_subquery PRIMARY PRIMARY 4 func 1 Using index
+2 DEPENDENT SUBQUERY t2 unique_subquery PRIMARY PRIMARY 4 func 1 Using index; Using where
DROP TABLE t1;
End of 5.0 tests
diff --git a/mysql-test/r/subselect_notembedded.result b/mysql-test/r/subselect_notembedded.result
index 44ae055425e..90aadcae398 100644
--- a/mysql-test/r/subselect_notembedded.result
+++ b/mysql-test/r/subselect_notembedded.result
@@ -1,3 +1,104 @@
purge master logs before (select adddate(current_timestamp(), interval -4 day));
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 'select adddate(current_timestamp(), interval -4 day))' at line 1
purge master logs before adddate(current_timestamp(), interval -4 day);
+create table t1(a int,b int,key(a),key(b));
+insert into t1(a,b) values (1,2),(2,1),(2,3),(3,4),(5,4),(5,5),
+(6,7),(7,4),(5,3);
+select sum(a),a from t1 where a> (
+select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+select sum(a) from t1 where a> ( select sum(a) from t1
+)group by b limit 1)group by b limit 1
+)group by b limit 1)group by b limit 1)group by b limit 1
+)group by b limit 1)group by b limit 1)group by b limit 1
+)group by b limit 1)group by b limit 1)group by b limit 1)
+group by a;
+sum(a) a
+select sum(a),a from t1 where a> (
+select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+select sum(a) from t1
+)group by b limit 1)group by b limit 1)group by b limit 1
+)group by b limit 1)group by b limit 1)group by b limit 1
+)group by b limit 1)group by b limit 1)group by b limit 1
+)group by b limit 1)group by b limit 1)group by b limit 1
+)group by b limit 1)group by b limit 1)group by b limit 1
+)group by b limit 1)group by b limit 1)group by b limit 1
+)group by b limit 1)group by b limit 1)group by b limit 1
+)group by b limit 1)group by b limit 1)group by b limit 1
+)group by b limit 1)group by b limit 1)group by b limit 1
+)group by b limit 1)group by b limit 1)group by b limit 1)
+group by a;
+ERROR HY000: Thread stack overrun detected
+explain select sum(a),a from t1 where a> (
+select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+select sum(a) from t1 where a> ( select sum(a) from t1
+)group by b limit 1)group by b limit 1
+)group by b limit 1)group by b limit 1)group by b limit 1
+)group by b limit 1)group by b limit 1)group by b limit 1
+)group by b limit 1)group by b limit 1)group by b limit 1)
+group by a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 index a a 5 NULL 9 Using where; Using index
+2 SUBQUERY t1 index a b 5 NULL 9 Using where; Using filesort
+3 SUBQUERY t1 index a b 5 NULL 9 Using where; Using filesort
+4 SUBQUERY t1 index a b 5 NULL 9 Using where; Using filesort
+5 SUBQUERY t1 index a b 5 NULL 9 Using where; Using filesort
+6 SUBQUERY t1 index a b 5 NULL 9 Using where; Using filesort
+7 SUBQUERY t1 index a b 5 NULL 9 Using where; Using filesort
+8 SUBQUERY t1 index a b 5 NULL 9 Using where; Using filesort
+9 SUBQUERY t1 index a b 5 NULL 9 Using where; Using filesort
+10 SUBQUERY t1 index a b 5 NULL 9 Using where; Using filesort
+11 SUBQUERY t1 index a b 5 NULL 9 Using where; Using filesort
+12 SUBQUERY t1 range a a 5 NULL 1 Using where; Using temporary; Using filesort
+13 SUBQUERY t1 index NULL a 5 NULL 9 Using index
+explain select sum(a),a from t1 where a> (
+select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+select sum(a) from t1
+)group by b limit 1)group by b limit 1)group by b limit 1
+)group by b limit 1)group by b limit 1)group by b limit 1
+)group by b limit 1)group by b limit 1)group by b limit 1
+)group by b limit 1)group by b limit 1)group by b limit 1
+)group by b limit 1)group by b limit 1)group by b limit 1
+)group by b limit 1)group by b limit 1)group by b limit 1
+)group by b limit 1)group by b limit 1)group by b limit 1
+)group by b limit 1)group by b limit 1)group by b limit 1
+)group by b limit 1)group by b limit 1)group by b limit 1
+)group by b limit 1)group by b limit 1)group by b limit 1)
+group by a;
+ERROR HY000: Thread stack overrun detected
+drop table t1;
diff --git a/mysql-test/r/symlink.result b/mysql-test/r/symlink.result
index aba60f757c6..4eece9d5b5a 100644
--- a/mysql-test/r/symlink.result
+++ b/mysql-test/r/symlink.result
@@ -99,6 +99,12 @@ t1 CREATE TABLE `t1` (
`b` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
+CREATE TABLE t1(a INT)
+DATA DIRECTORY='TEST_DIR/master-data/mysql'
+INDEX DIRECTORY='TEST_DIR/master-data/mysql';
+RENAME TABLE t1 TO user;
+ERROR HY000: Can't create/write to file 'TEST_DIR/master-data/mysql/user.MYI' (Errcode: 17)
+DROP TABLE t1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
diff --git a/mysql-test/r/system_mysql_db.result b/mysql-test/r/system_mysql_db.result
index 7696afdf06d..d1aff0fa657 100644
--- a/mysql-test/r/system_mysql_db.result
+++ b/mysql-test/r/system_mysql_db.result
@@ -196,7 +196,7 @@ proc CREATE TABLE `proc` (
`is_deterministic` enum('YES','NO') NOT NULL DEFAULT 'NO',
`security_type` enum('INVOKER','DEFINER') NOT NULL DEFAULT 'DEFINER',
`param_list` blob NOT NULL,
- `returns` char(64) NOT NULL DEFAULT '',
+ `returns` longblob NOT NULL,
`body` longblob NOT NULL,
`definer` char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
@@ -240,11 +240,11 @@ show create table general_log;
Table Create Table
general_log CREATE TABLE `general_log` (
`event_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- `user_host` mediumtext,
- `thread_id` int(11) DEFAULT NULL,
- `server_id` int(11) DEFAULT NULL,
- `command_type` varchar(64) DEFAULT NULL,
- `argument` mediumtext
+ `user_host` mediumtext NOT NULL,
+ `thread_id` int(11) NOT NULL,
+ `server_id` int(11) NOT NULL,
+ `command_type` varchar(64) NOT NULL,
+ `argument` mediumtext NOT NULL
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='General log'
show create table slow_log;
Table Create Table
@@ -255,10 +255,10 @@ slow_log CREATE TABLE `slow_log` (
`lock_time` time NOT NULL,
`rows_sent` int(11) NOT NULL,
`rows_examined` int(11) NOT NULL,
- `db` varchar(512) DEFAULT NULL,
- `last_insert_id` int(11) DEFAULT NULL,
- `insert_id` int(11) DEFAULT NULL,
- `server_id` int(11) DEFAULT NULL,
+ `db` varchar(512) NOT NULL,
+ `last_insert_id` int(11) NOT NULL,
+ `insert_id` int(11) NOT NULL,
+ `server_id` int(11) NOT NULL,
`sql_text` mediumtext NOT NULL
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log'
show tables;
diff --git a/mysql-test/r/trigger.result b/mysql-test/r/trigger.result
index 189722bfe9b..8b384dfdc4e 100644
--- a/mysql-test/r/trigger.result
+++ b/mysql-test/r/trigger.result
@@ -1978,3 +1978,42 @@ a
1
drop table table_25411_a;
drop table table_25411_b;
+DROP TRIGGER IF EXISTS trg;
+SHOW CREATE TRIGGER trg;
+ERROR HY000: Trigger does not exist
+drop table if exists t1;
+create table t1 (i int, j int);
+create trigger t1_bi before insert on t1 for each row begin end;
+create trigger t1_bi before insert on t1 for each row begin end;
+ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
+drop trigger t1_bi;
+drop trigger t1_bi;
+ERROR HY000: Trigger does not exist
+lock tables t1 read;
+create trigger t1_bi before insert on t1 for each row begin end;
+ERROR HY000: Table 't1' was locked with a READ lock and can't be updated
+create trigger t1_bi before insert on t1 for each row begin end;
+ERROR HY000: Table 't1' was locked with a READ lock and can't be updated
+drop trigger t1_bi;
+ERROR HY000: Trigger does not exist
+unlock tables;
+create trigger t1_bi before insert on t1 for each row begin end;
+lock tables t1 read;
+create trigger t1_bi before insert on t1 for each row begin end;
+ERROR HY000: Table 't1' was locked with a READ lock and can't be updated
+drop trigger t1_bi;
+ERROR HY000: Table 't1' was locked with a READ lock and can't be updated
+unlock tables;
+drop trigger t1_bi;
+lock tables t1 write;
+create trigger b1_bi before insert on t1 for each row set new.i = new.i + 10;
+insert into t1 values (10, 10);
+drop trigger b1_bi;
+insert into t1 values (10, 10);
+select * from t1;
+i j
+20 10
+10 10
+unlock tables;
+drop table t1;
+End of 5.1 tests.
diff --git a/mysql-test/r/trigger-grant.result b/mysql-test/r/trigger_notembedded.result
index 14b8c98f2fa..d56f83993a6 100644
--- a/mysql-test/r/trigger-grant.result
+++ b/mysql-test/r/trigger_notembedded.result
@@ -448,3 +448,4 @@ DROP TABLE t1;
DROP DATABASE mysqltest_db1;
USE test;
End of 5.0 tests.
+End of 5.1 tests.
diff --git a/mysql-test/r/type_bit.result b/mysql-test/r/type_bit.result
index dc8ab079ad8..fee0df9ab02 100644
--- a/mysql-test/r/type_bit.result
+++ b/mysql-test/r/type_bit.result
@@ -269,6 +269,8 @@ a+0 b+0
56 379
68 454
set @@max_length_for_sort_data=0;
+Warnings:
+Warning 1292 Truncated incorrect max_length_for_sort_data value: '0'
select a+0, b+0 from t1 where a > 40 and a < 70 order by 2;
a+0 b+0
57 135
@@ -672,6 +674,16 @@ COUNT(DISTINCT b,c)
2
2
DROP TABLE t2;
+CREATE TABLE t1(a BIT(13), KEY(a));
+INSERT INTO t1(a) VALUES
+(65535),(65525),(65535),(65535),(65535),(65535),(65535),(65535),(65535),(65535);
+EXPLAIN SELECT 1 FROM t1 GROUP BY a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range NULL a 3 NULL 6 Using index for group-by
+SELECT 1 FROM t1 GROUP BY a;
+1
+1
+DROP TABLE t1;
End of 5.0 tests
create table t1(a bit(7));
insert into t1 values(0x40);
diff --git a/mysql-test/r/type_bit_innodb.result b/mysql-test/r/type_bit_innodb.result
index 97331408b40..a9c3cae1770 100644
--- a/mysql-test/r/type_bit_innodb.result
+++ b/mysql-test/r/type_bit_innodb.result
@@ -269,6 +269,8 @@ a+0 b+0
56 379
68 454
set @@max_length_for_sort_data=0;
+Warnings:
+Warning 1292 Truncated incorrect max_length_for_sort_data value: '0'
select a+0, b+0 from t1 where a > 40 and a < 70 order by 2;
a+0 b+0
57 135
diff --git a/mysql-test/r/type_blob.result b/mysql-test/r/type_blob.result
index 869efb535e6..c98c8c5b68c 100644
--- a/mysql-test/r/type_blob.result
+++ b/mysql-test/r/type_blob.result
@@ -807,4 +807,18 @@ set @@sql_mode='TRADITIONAL';
create table t1 (a text default '');
ERROR 42000: BLOB/TEXT column 'a' can't have a default value
set @@sql_mode='';
+CREATE TABLE t (c TEXT CHARSET ASCII);
+INSERT INTO t (c) VALUES (REPEAT('1',65537));
+Warnings:
+Warning 1265 Data truncated for column 'c' at row 1
+INSERT INTO t (c) VALUES (REPEAT('2',65536));
+Warnings:
+Warning 1265 Data truncated for column 'c' at row 1
+INSERT INTO t (c) VALUES (REPEAT('3',65535));
+SELECT LENGTH(c), CHAR_LENGTH(c) FROM t;
+LENGTH(c) CHAR_LENGTH(c)
+65535 65535
+65535 65535
+65535 65535
+DROP TABLE t;
End of 5.0 tests
diff --git a/mysql-test/r/type_date.result b/mysql-test/r/type_date.result
index d6a01727813..5921991bf50 100644
--- a/mysql-test/r/type_date.result
+++ b/mysql-test/r/type_date.result
@@ -145,3 +145,126 @@ d dt ts
0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00
2001-11-11 2001-11-11 00:00:00 2001-11-11 00:00:00
drop table t1;
+CREATE TABLE t1 (
+a INT
+);
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (NULL);
+SELECT str_to_date( '', a ) FROM t1;
+str_to_date( '', a )
+0000-00-00 00:00:00
+NULL
+DROP TABLE t1;
+CREATE TABLE t1 (a DATE, b int, PRIMARY KEY (a,b));
+INSERT INTO t1 VALUES (DATE(NOW()), 1);
+SELECT COUNT(*) FROM t1 WHERE a = NOW();
+COUNT(*)
+0
+EXPLAIN SELECT COUNT(*) FROM t1 WHERE a = NOW();
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+INSERT INTO t1 VALUES (DATE(NOW()), 2);
+SELECT COUNT(*) FROM t1 WHERE a = NOW();
+COUNT(*)
+0
+EXPLAIN SELECT COUNT(*) FROM t1 WHERE a = NOW();
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+SELECT COUNT(*) FROM t1 WHERE a = NOW() AND b = 1;
+COUNT(*)
+0
+EXPLAIN SELECT COUNT(*) FROM t1 WHERE a = NOW() AND b = 1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+ALTER TABLE t1 DROP PRIMARY KEY;
+SELECT COUNT(*) FROM t1 WHERE a = NOW();
+COUNT(*)
+0
+EXPLAIN SELECT COUNT(*) FROM t1 WHERE a = NOW();
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where
+DROP TABLE t1;
+CREATE TABLE t1 (a DATE);
+CREATE TABLE t2 (a DATE);
+CREATE INDEX i ON t1 (a);
+INSERT INTO t1 VALUES ('0000-00-00'),('0000-00-00');
+INSERT INTO t2 VALUES ('0000-00-00'),('0000-00-00');
+SELECT * FROM t1 WHERE a = '0000-00-00';
+a
+0000-00-00
+0000-00-00
+SELECT * FROM t2 WHERE a = '0000-00-00';
+a
+0000-00-00
+0000-00-00
+SET SQL_MODE=TRADITIONAL;
+EXPLAIN SELECT * FROM t1 WHERE a = '0000-00-00';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref i i 4 const 1 Using where; Using index
+Warnings:
+Warning 1292 Incorrect date value: '0000-00-00' for column 'a' at row 1
+Warning 1292 Incorrect date value: '0000-00-00' for column 'a' at row 1
+SELECT * FROM t1 WHERE a = '0000-00-00';
+a
+0000-00-00
+0000-00-00
+Warnings:
+Warning 1292 Incorrect date value: '0000-00-00' for column 'a' at row 1
+Warning 1292 Incorrect date value: '0000-00-00' for column 'a' at row 1
+SELECT * FROM t2 WHERE a = '0000-00-00';
+a
+0000-00-00
+0000-00-00
+Warnings:
+Warning 1292 Incorrect date value: '0000-00-00' for column 'a' at row 1
+Warning 1292 Incorrect date value: '0000-00-00' for column 'a' at row 1
+INSERT INTO t1 VALUES ('0000-00-00');
+ERROR 22007: Incorrect date value: '0000-00-00' for column 'a' at row 1
+SET SQL_MODE=DEFAULT;
+DROP TABLE t1,t2;
+CREATE TABLE t1 (a DATE);
+CREATE TABLE t2 (a DATE);
+CREATE INDEX i ON t1 (a);
+INSERT INTO t1 VALUES ('1000-00-00'),('1000-00-00');
+INSERT INTO t2 VALUES ('1000-00-00'),('1000-00-00');
+SELECT * FROM t1 WHERE a = '1000-00-00';
+a
+1000-00-00
+1000-00-00
+SELECT * FROM t2 WHERE a = '1000-00-00';
+a
+1000-00-00
+1000-00-00
+SET SQL_MODE=TRADITIONAL;
+EXPLAIN SELECT * FROM t1 WHERE a = '1000-00-00';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref i i 4 const 1 Using where; Using index
+Warnings:
+Warning 1292 Incorrect date value: '1000-00-00' for column 'a' at row 1
+Warning 1292 Incorrect date value: '1000-00-00' for column 'a' at row 1
+SELECT * FROM t1 WHERE a = '1000-00-00';
+a
+1000-00-00
+1000-00-00
+Warnings:
+Warning 1292 Incorrect date value: '1000-00-00' for column 'a' at row 1
+Warning 1292 Incorrect date value: '1000-00-00' for column 'a' at row 1
+SELECT * FROM t2 WHERE a = '1000-00-00';
+a
+1000-00-00
+1000-00-00
+Warnings:
+Warning 1292 Incorrect date value: '1000-00-00' for column 'a' at row 1
+Warning 1292 Incorrect date value: '1000-00-00' for column 'a' at row 1
+INSERT INTO t1 VALUES ('1000-00-00');
+ERROR 22007: Incorrect date value: '1000-00-00' for column 'a' at row 1
+SET SQL_MODE=DEFAULT;
+DROP TABLE t1,t2;
+End of 5.0 tests
+create table t1 (a date, primary key (a))engine=memory;
+insert into t1 values ('0000-01-01'), ('0000-00-01'), ('0001-01-01');
+select * from t1 where a between '0000-00-01' and '0000-00-02';
+a
+0000-00-01
+drop table t1;
+End of 5.1 tests
diff --git a/mysql-test/r/type_datetime.result b/mysql-test/r/type_datetime.result
index ffe4bac142d..d485c468a39 100644
--- a/mysql-test/r/type_datetime.result
+++ b/mysql-test/r/type_datetime.result
@@ -59,6 +59,8 @@ t
drop table t1;
CREATE TABLE t1 (a timestamp, b date, c time, d datetime);
insert into t1 (b,c,d) values(now(),curtime(),now());
+Warnings:
+Note 1265 Data truncated for column 'b' at row 1
select date_format(a,"%Y-%m-%d")=b,right(a+0,6)=c+0,a=d+0 from t1;
date_format(a,"%Y-%m-%d")=b right(a+0,6)=c+0 a=d+0
1 1 1
@@ -427,6 +429,138 @@ f1
Warnings:
Warning 1292 Incorrect datetime value: '2007010100000' for column 'f1' at row 1
drop table t1;
+#
+# Bug#27216: functions with parameters of different date types may
+# return wrong type of the result.
+#
+create table t1 (f1 date, f2 datetime, f3 varchar(20));
+create table t2 as select coalesce(f1,f1) as f4 from t1;
+desc t2;
+Field Type Null Key Default Extra
+f4 date YES NULL
+create table t3 as select coalesce(f1,f2) as f4 from t1;
+desc t3;
+Field Type Null Key Default Extra
+f4 datetime YES NULL
+create table t4 as select coalesce(f2,f2) as f4 from t1;
+desc t4;
+Field Type Null Key Default Extra
+f4 datetime YES NULL
+create table t5 as select coalesce(f1,f3) as f4 from t1;
+desc t5;
+Field Type Null Key Default Extra
+f4 varbinary(20) YES NULL
+create table t6 as select coalesce(f2,f3) as f4 from t1;
+desc t6;
+Field Type Null Key Default Extra
+f4 varbinary(20) YES NULL
+create table t7 as select coalesce(makedate(1997,1),f2) as f4 from t1;
+desc t7;
+Field Type Null Key Default Extra
+f4 datetime YES NULL
+create table t8 as select coalesce(cast('01-01-01' as datetime),f2) as f4
+from t1;
+desc t8;
+Field Type Null Key Default Extra
+f4 datetime YES NULL
+create table t9 as select case when 1 then cast('01-01-01' as date)
+when 0 then cast('01-01-01' as date) end as f4 from t1;
+desc t9;
+Field Type Null Key Default Extra
+f4 date YES NULL
+create table t10 as select case when 1 then cast('01-01-01' as datetime)
+when 0 then cast('01-01-01' as datetime) end as f4 from t1;
+desc t10;
+Field Type Null Key Default Extra
+f4 datetime YES NULL
+create table t11 as select if(1, cast('01-01-01' as datetime),
+cast('01-01-01' as date)) as f4 from t1;
+desc t11;
+Field Type Null Key Default Extra
+f4 datetime YES NULL
+create table t12 as select least(cast('01-01-01' as datetime),
+cast('01-01-01' as date)) as f4 from t1;
+desc t12;
+Field Type Null Key Default Extra
+f4 datetime YES NULL
+create table t13 as select ifnull(cast('01-01-01' as datetime),
+cast('01-01-01' as date)) as f4 from t1;
+desc t13;
+Field Type Null Key Default Extra
+f4 datetime YES NULL
+drop tables t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13;
+###################################################################
+create table t1 (f1 time);
+insert into t1 set f1 = '45:44:44';
+insert into t1 set f1 = '15:44:44';
+select * from t1 where (convert(f1,datetime)) != 1;
+f1
+15:44:44
+Warnings:
+Warning 1292 Incorrect datetime value: '0000-00-00 45:44:44'
+drop table t1;
+create table t1 (a tinyint);
+insert into t1 values (), (), ();
+select sum(a) from t1 group by convert(a, datetime);
+sum(a)
+NULL
+drop table t1;
+create table t1 (id int(10) not null, cur_date datetime not null);
+create table t2 (id int(10) not null, cur_date date not null);
+insert into t1 (id, cur_date) values (1, '2007-04-25 18:30:22');
+insert into t2 (id, cur_date) values (1, '2007-04-25');
+explain extended
+select * from t1
+where id in (select id from t1 as x1 where (t1.cur_date is null));
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
+Warnings:
+Note 1276 Field or reference 'test.t1.cur_date' of SELECT #2 was resolved in SELECT #1
+Note 1003 select '1' AS `id`,'2007-04-25 18:30:22' AS `cur_date` from `test`.`t1` where <in_optimizer>('1',<exists>(select 1 AS `Not_used` from `test`.`t1` `x1` where 0))
+select * from t1
+where id in (select id from t1 as x1 where (t1.cur_date is null));
+id cur_date
+explain extended
+select * from t2
+where id in (select id from t2 as x1 where (t2.cur_date is null));
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
+Warnings:
+Note 1276 Field or reference 'test.t2.cur_date' of SELECT #2 was resolved in SELECT #1
+Note 1003 select '1' AS `id`,'2007-04-25' AS `cur_date` from `test`.`t2` where <in_optimizer>('1',<exists>(select 1 AS `Not_used` from `test`.`t2` `x1` where 0))
+select * from t2
+where id in (select id from t2 as x1 where (t2.cur_date is null));
+id cur_date
+insert into t1 (id, cur_date) values (2, '2007-04-26 18:30:22');
+insert into t2 (id, cur_date) values (2, '2007-04-26');
+explain extended
+select * from t1
+where id in (select id from t1 as x1 where (t1.cur_date is null));
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 Using where
+2 DEPENDENT SUBQUERY x1 ALL NULL NULL NULL NULL 2 100.00 Using where
+Warnings:
+Note 1276 Field or reference 'test.t1.cur_date' of SELECT #2 was resolved in SELECT #1
+Note 1003 select `test`.`t1`.`id` AS `id`,`test`.`t1`.`cur_date` AS `cur_date` from `test`.`t1` where <in_optimizer>(`test`.`t1`.`id`,<exists>(select 1 AS `Not_used` from `test`.`t1` `x1` where ((`test`.`t1`.`cur_date` = 0) and (<cache>(`test`.`t1`.`id`) = `test`.`x1`.`id`))))
+select * from t1
+where id in (select id from t1 as x1 where (t1.cur_date is null));
+id cur_date
+explain extended
+select * from t2
+where id in (select id from t2 as x1 where (t2.cur_date is null));
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 2 100.00 Using where
+2 DEPENDENT SUBQUERY x1 ALL NULL NULL NULL NULL 2 100.00 Using where
+Warnings:
+Note 1276 Field or reference 'test.t2.cur_date' of SELECT #2 was resolved in SELECT #1
+Note 1003 select `test`.`t2`.`id` AS `id`,`test`.`t2`.`cur_date` AS `cur_date` from `test`.`t2` where <in_optimizer>(`test`.`t2`.`id`,<exists>(select 1 AS `Not_used` from `test`.`t2` `x1` where ((`test`.`t2`.`cur_date` = 0) and (<cache>(`test`.`t2`.`id`) = `test`.`x1`.`id`))))
+select * from t2
+where id in (select id from t2 as x1 where (t2.cur_date is null));
+id cur_date
+drop table t1,t2;
+End of 5.0 tests
set @org_mode=@@sql_mode;
create table t1 (da date default '1962-03-03 23:33:34', dt datetime default '1962-03-03');
Warnings:
diff --git a/mysql-test/r/type_decimal.result b/mysql-test/r/type_decimal.result
index efac8cbe580..e37a398d22e 100644
--- a/mysql-test/r/type_decimal.result
+++ b/mysql-test/r/type_decimal.result
@@ -683,6 +683,7 @@ select * from t1;
a b
123.12345 123.1
drop table t1;
+End of 4.1 tests
CREATE TABLE t1
(EMPNUM CHAR(3) NOT NULL,
HOURS DECIMAL(5));
@@ -799,3 +800,93 @@ SELECT ROUND(qty,3), dps, ROUND(qty,dps) FROM t1;
ROUND(qty,3) dps ROUND(qty,dps)
1.133 3 1.133
DROP TABLE t1;
+SELECT 1 % .123456789123456789123456789123456789123456789123456789123456789123456789123456789 AS '%';
+%
+0.012345687012345687012345687012345687012345687012345687012345687012345687000000000
+SELECT MOD(1, .123456789123456789123456789123456789123456789123456789123456789123456789123456789) AS 'MOD()';
+MOD()
+0.012345687012345687012345687012345687012345687012345687012345687012345687000000000
+create table t1 (f1 decimal(6,6),f2 decimal(6,6) zerofill);
+insert into t1 values (-0.123456,0.123456);
+select group_concat(f1),group_concat(f2) from t1;
+group_concat(f1) group_concat(f2)
+-0.123456 0.123456
+drop table t1;
+create table t1 (
+ua_id decimal(22,0) not null,
+ua_invited_by_id decimal(22,0) default NULL,
+primary key(ua_id)
+);
+insert into t1 values (123, NULL), (456, NULL);
+this must not produce error 1048:
+select * from t1 where ua_invited_by_id not in (select ua_id from t1);
+ua_id ua_invited_by_id
+drop table t1;
+DROP TABLE IF EXISTS t3;
+DROP TABLE IF EXISTS t4;
+CREATE TABLE t1( a NUMERIC, b INT );
+INSERT INTO t1 VALUES (123456, 40), (123456, 40);
+SELECT TRUNCATE( a, b ) AS c FROM t1 ORDER BY c;
+c
+123456
+123456
+SELECT ROUND( a, b ) AS c FROM t1 ORDER BY c;
+c
+123456
+123456
+SELECT ROUND( a, 100 ) AS c FROM t1 ORDER BY c;
+c
+123456.000000000000000000000000000000
+123456.000000000000000000000000000000
+CREATE TABLE t2( a NUMERIC, b INT );
+INSERT INTO t2 VALUES (123456, 100);
+SELECT TRUNCATE( a, b ) AS c FROM t2 ORDER BY c;
+c
+123456
+SELECT ROUND( a, b ) AS c FROM t2 ORDER BY c;
+c
+123456
+CREATE TABLE t3( a DECIMAL, b INT );
+INSERT INTO t3 VALUES (123456, 40), (123456, 40);
+SELECT TRUNCATE( a, b ) AS c FROM t3 ORDER BY c;
+c
+123456
+123456
+SELECT ROUND( a, b ) AS c FROM t3 ORDER BY c;
+c
+123456
+123456
+SELECT ROUND( a, 100 ) AS c FROM t3 ORDER BY c;
+c
+123456.000000000000000000000000000000
+123456.000000000000000000000000000000
+CREATE TABLE t4( a DECIMAL, b INT );
+INSERT INTO t4 VALUES (123456, 40), (123456, 40);
+SELECT TRUNCATE( a, b ) AS c FROM t4 ORDER BY c;
+c
+123456
+123456
+SELECT ROUND( a, b ) AS c FROM t4 ORDER BY c;
+c
+123456
+123456
+SELECT ROUND( a, 100 ) AS c FROM t4 ORDER BY c;
+c
+123456.000000000000000000000000000000
+123456.000000000000000000000000000000
+delete from t1;
+INSERT INTO t1 VALUES (1234567890, 20), (999.99, 5);
+Warnings:
+Note 1265 Data truncated for column 'a' at row 2
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` decimal(10,0) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+select round(a,b) as c from t1 order by c;
+c
+1000
+1234567890
+DROP TABLE t1, t2, t3, t4;
+End of 5.0 tests
diff --git a/mysql-test/r/type_float.result b/mysql-test/r/type_float.result
index 33ad3928835..6fbc8268a64 100644
--- a/mysql-test/r/type_float.result
+++ b/mysql-test/r/type_float.result
@@ -344,6 +344,22 @@ create table t1 (s1 float(0,2));
ERROR 42000: For float(M,D), double(M,D) or decimal(M,D), M must be >= D (column 's1').
create table t1 (s1 float(1,2));
ERROR 42000: For float(M,D), double(M,D) or decimal(M,D), M must be >= D (column 's1').
+CREATE TABLE t1 (
+f1 real zerofill,
+f2 double zerofill,
+f3 float zerofill);
+INSERT INTO t1 VALUES ( 0.314152e+1, 0.314152e+1, 0.314152e+1);
+PREPARE stmt1 FROM 'select f1, f2, f3 FROM t1';
+select f1, f2, f3 FROM t1;
+f1 f2 f3
+0000000000000003.14152 0000000000000003.14152 000003.14152
+select f1, f2, f3 FROM t1;
+f1 f2 f3
+0000000000000003.14152 0000000000000003.14152 000003.14152
+EXECUTE stmt1;
+f1 f2 f3
+0000000000000003.14152 0000000000000003.14152 000003.14152
+DROP TABLE t1;
create table t1 (f1 double(200, 0));
insert into t1 values (1e199), (-1e199);
insert into t1 values (1e200), (-1e200);
diff --git a/mysql-test/r/type_newdecimal.result b/mysql-test/r/type_newdecimal.result
index 24be10a7a29..71be41b106f 100644
--- a/mysql-test/r/type_newdecimal.result
+++ b/mysql-test/r/type_newdecimal.result
@@ -1509,6 +1509,26 @@ SELECT 1 FROM t1 GROUP BY @b := @a, @b;
1
1
DROP TABLE t1;
+CREATE TABLE t1 SELECT 0.123456789012345678901234567890123456 AS f1;
+Warnings:
+Note 1265 Data truncated for column 'f1' at row 1
+DESC t1;
+Field Type Null Key Default Extra
+f1 decimal(31,30) NO 0.000000000000000000000000000000
+SELECT f1 FROM t1;
+f1
+0.123456789012345678901234567890
+DROP TABLE t1;
+CREATE TABLE t1 SELECT 123451234512345123451234512345123451234512345.678906789067890678906789067890678906789067890 AS f1;
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 1
+DESC t1;
+Field Type Null Key Default Extra
+f1 decimal(59,30) NO 0.000000000000000000000000000000
+SELECT f1 FROM t1;
+f1
+99999999999999999999999999999.999999999999999999999999999999
+DROP TABLE t1;
End of 5.0 tests
select cast(143.481 as decimal(4,1));
cast(143.481 as decimal(4,1))
diff --git a/mysql-test/r/type_ranges.result b/mysql-test/r/type_ranges.result
index 149f0d2dca5..6e08067d8a4 100644
--- a/mysql-test/r/type_ranges.result
+++ b/mysql-test/r/type_ranges.result
@@ -57,7 +57,7 @@ ushort smallint(5) unsigned zerofill NULL NO MUL 00000 #
umedium mediumint(8) unsigned NULL NO MUL 0 #
ulong int(11) unsigned NULL NO MUL 0 #
ulonglong bigint(13) unsigned NULL NO MUL 0 #
-time_stamp timestamp NULL NO CURRENT_TIMESTAMP #
+time_stamp timestamp NULL NO CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP #
date_field date NULL YES NULL #
time_field time NULL YES NULL #
date_time datetime NULL YES NULL #
@@ -225,7 +225,7 @@ ushort smallint(5) unsigned zerofill NULL NO 00000 #
umedium mediumint(8) unsigned NULL NO MUL 0 #
ulong int(11) unsigned NULL NO MUL 0 #
ulonglong bigint(13) unsigned NULL NO MUL 0 #
-time_stamp timestamp NULL NO CURRENT_TIMESTAMP #
+time_stamp timestamp NULL NO CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP #
date_field char(10) latin1_swedish_ci YES NULL #
time_field time NULL YES NULL #
date_time datetime NULL YES NULL #
diff --git a/mysql-test/r/type_timestamp.result b/mysql-test/r/type_timestamp.result
index 7caf7e78fe9..596dcbf432c 100644
--- a/mysql-test/r/type_timestamp.result
+++ b/mysql-test/r/type_timestamp.result
@@ -251,7 +251,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
show columns from t1;
Field Type Null Key Default Extra
-t1 timestamp NO 2003-01-01 00:00:00
+t1 timestamp NO 2003-01-01 00:00:00 on update CURRENT_TIMESTAMP
t2 datetime YES NULL
drop table t1;
create table t1 (t1 timestamp default now() on update now(), t2 datetime);
@@ -276,7 +276,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
show columns from t1;
Field Type Null Key Default Extra
-t1 timestamp NO CURRENT_TIMESTAMP
+t1 timestamp NO CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP
t2 datetime YES NULL
drop table t1;
create table t1 (t1 timestamp, t2 datetime, t3 timestamp);
@@ -302,7 +302,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
show columns from t1;
Field Type Null Key Default Extra
-t1 timestamp NO CURRENT_TIMESTAMP
+t1 timestamp NO CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP
t2 datetime YES NULL
t3 timestamp NO 0000-00-00 00:00:00
drop table t1;
@@ -328,7 +328,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
show columns from t1;
Field Type Null Key Default Extra
-t1 timestamp NO CURRENT_TIMESTAMP
+t1 timestamp NO CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP
t2 datetime YES NULL
truncate table t1;
insert into t1 values ('2004-04-01 00:00:00', '2004-04-01 00:00:00');
diff --git a/mysql-test/r/udf.result b/mysql-test/r/udf.result
index f1e47905f5d..15410ac2039 100644
--- a/mysql-test/r/udf.result
+++ b/mysql-test/r/udf.result
@@ -11,7 +11,7 @@ RETURNS STRING SONAME "UDF_EXAMPLE_LIB";
CREATE AGGREGATE FUNCTION avgcost
RETURNS REAL SONAME "UDF_EXAMPLE_LIB";
select myfunc_double();
-ERROR HY000: myfunc_double must have at least one argument
+ERROR HY000: Can't initialize function 'myfunc_double'; myfunc_double must have at least one argument
select myfunc_double(1);
myfunc_double(1)
49.00
@@ -24,26 +24,26 @@ select myfunc_int();
myfunc_int()
0
select lookup();
-ERROR HY000: Wrong arguments to lookup; Use the source
+ERROR HY000: Can't initialize function 'lookup'; Wrong arguments to lookup; Use the source
select lookup("127.0.0.1");
lookup("127.0.0.1")
127.0.0.1
select lookup(127,0,0,1);
-ERROR HY000: Wrong arguments to lookup; Use the source
+ERROR HY000: Can't initialize function 'lookup'; Wrong arguments to lookup; Use the source
select lookup("localhost");
lookup("localhost")
127.0.0.1
select reverse_lookup();
-ERROR HY000: Wrong number of arguments to reverse_lookup; Use the source
+ERROR HY000: Can't initialize function 'reverse_lookup'; Wrong number of arguments to reverse_lookup; Use the source
select reverse_lookup("127.0.0.1");
select reverse_lookup(127,0,0,1);
select reverse_lookup("localhost");
reverse_lookup("localhost")
NULL
select avgcost();
-ERROR HY000: wrong number of arguments: AVGCOST() requires two arguments
+ERROR HY000: Can't initialize function 'avgcost'; wrong number of arguments: AVGCOST() requires two arguments
select avgcost(100,23.76);
-ERROR HY000: wrong argument type: AVGCOST() requires an INT and a REAL
+ERROR HY000: Can't initialize function 'avgcost'; wrong argument type: AVGCOST() requires an INT and a REAL
create table t1(sum int, price float(24));
insert into t1 values(100, 50.00), (100, 100.00);
select avgcost(sum, price) from t1;
@@ -95,10 +95,10 @@ FR
DROP TABLE bug19904;
CREATE DEFINER=CURRENT_USER() FUNCTION should_not_parse
RETURNS STRING SONAME "should_not_parse.so";
-ERROR HY000: Incorrect usage of SONAME and DEFINER
+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 'RETURNS STRING SONAME "should_not_parse.so"' at line 2
CREATE DEFINER=someone@somewhere FUNCTION should_not_parse
RETURNS STRING SONAME "should_not_parse.so";
-ERROR HY000: Incorrect usage of SONAME and DEFINER
+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 'RETURNS STRING SONAME "should_not_parse.so"' at line 2
create table t1(f1 int);
insert into t1 values(1),(2);
explain select myfunc_int(f1) from t1 order by 1;
@@ -214,7 +214,7 @@ DROP FUNCTION IF EXISTS metaphon;
CREATE FUNCTION metaphon(a int) RETURNS int
return 0;
CREATE FUNCTION metaphon RETURNS STRING SONAME "UDF_EXAMPLE_LIB";
-ERROR HY000: Function 'metaphon' already exists
+DROP FUNCTION metaphon;
DROP FUNCTION metaphon;
CREATE FUNCTION metaphon RETURNS STRING SONAME "UDF_EXAMPLE_LIB";
CREATE FUNCTION metaphon(a int) RETURNS int
@@ -334,6 +334,13 @@ Qcache_queries_in_cache 0
drop table t1;
drop function metaphon;
set GLOBAL query_cache_size=default;
+DROP DATABASE IF EXISTS mysqltest;
+CREATE DATABASE mysqltest;
+USE mysqltest;
+DROP DATABASE mysqltest;
+CREATE FUNCTION metaphon RETURNS STRING SONAME "UDF_EXAMPLE_LIB";
+DROP FUNCTION metaphon;
+USE test;
CREATE TABLE const_len_bug (
str_const varchar(4000),
result1 varchar(4000),
@@ -358,4 +365,31 @@ DROP FUNCTION check_const_len;
DROP PROCEDURE check_const_len_sp;
DROP TRIGGER check_const_len_trigger;
DROP TABLE const_len_bug;
+CREATE FUNCTION sequence RETURNS INTEGER SONAME "UDF_EXAMPLE_LIB";
+CREATE TABLE t1 (a INT);
+CREATE TABLE t2 (a INT PRIMARY KEY);
+INSERT INTO t1 VALUES (4),(3),(2),(1);
+INSERT INTO t2 SELECT * FROM t1;
+SELECT sequence() AS seq, a FROM t1 ORDER BY seq ASC;
+seq a
+1 4
+2 3
+3 2
+4 1
+SELECT sequence() AS seq, a FROM t1 ORDER BY seq DESC;
+seq a
+4 1
+3 2
+2 3
+1 4
+SELECT * FROM t1 WHERE a = sequence();
+a
+SELECT * FROM t2 WHERE a = sequence();
+a
+1
+2
+3
+4
+DROP FUNCTION sequence;
+DROP TABLE t1,t2;
End of 5.0 tests.
diff --git a/mysql-test/r/upgrade.result b/mysql-test/r/upgrade.result
index 76e0359c405..adf81efe8e3 100644
--- a/mysql-test/r/upgrade.result
+++ b/mysql-test/r/upgrade.result
@@ -59,3 +59,28 @@ drop table `txu@0023p@0023p1`;
drop table `txu#p#p1`;
truncate t1;
drop table t1;
+drop database if exists `tabc`;
+drop database if exists `a-b-c`;
+create database `tabc` default character set latin2;
+create table tabc.t1 (a int);
+FLUSH TABLES;
+show databases like '%a-b-c%';
+Database (%a-b-c%)
+#mysql50#a-b-c
+ALTER DATABASE `#mysql50#a-b-c` UPGRADE DATA DIRECTORY NAME;
+show databases like '%a-b-c%';
+Database (%a-b-c%)
+a-b-c
+show create database `a-b-c`;
+Database Create Database
+a-b-c CREATE DATABASE `a-b-c` /*!40100 DEFAULT CHARACTER SET latin2 */
+show tables in `a-b-c`;
+Tables_in_a-b-c
+t1
+show create table `a-b-c`.`t1`;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin2
+drop database `a-b-c`;
+drop database `tabc`;
diff --git a/mysql-test/r/user_var.result b/mysql-test/r/user_var.result
index 6fd7b39f226..2cd132ce03c 100644
--- a/mysql-test/r/user_var.result
+++ b/mysql-test/r/user_var.result
@@ -353,3 +353,21 @@ select @a:=f4, count(f4) from t1 group by 1 desc;
2.6 1
1.6 4
drop table t1;
+create table t1 (f1 int);
+insert into t1 values (2), (1);
+select @i := f1 as j from t1 order by 1;
+j
+1
+2
+drop table t1;
+create table t1(a int);
+insert into t1 values(5),(4),(4),(3),(2),(2),(2),(1);
+set @rownum := 0;
+set @rank := 0;
+set @prev_score := NULL;
+select @rownum := @rownum + 1 as row,
+@rank := IF(@prev_score!=a, @rownum, @rank) as rank,
+@prev_score := a as score
+from t1 order by score desc;
+drop table t1;
+End of 5.1 tests
diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result
index 19b48efe6b4..e57f82aca26 100644
--- a/mysql-test/r/variables.result
+++ b/mysql-test/r/variables.result
@@ -279,6 +279,8 @@ NET_READ_TIMEOUT 600
NET_RETRY_COUNT 10
NET_WRITE_TIMEOUT 500
set net_buffer_length=1;
+Warnings:
+Warning 1292 Truncated incorrect net_buffer_length value: '1'
show variables like 'net_buffer_length';
Variable_name Value
net_buffer_length 1024
@@ -286,6 +288,8 @@ select * from information_schema.session_variables where variable_name like 'net
VARIABLE_NAME VARIABLE_VALUE
NET_BUFFER_LENGTH 1024
set net_buffer_length=2000000000;
+Warnings:
+Warning 1292 Truncated incorrect net_buffer_length value: '2000000000'
show variables like 'net_buffer_length';
Variable_name Value
net_buffer_length 1048576
@@ -310,14 +314,14 @@ show variables like '%alloc%';
Variable_name Value
query_alloc_block_size 8192
query_prealloc_size 8192
-range_alloc_block_size 2048
+range_alloc_block_size 4096
transaction_alloc_block_size 8192
transaction_prealloc_size 4096
select * from information_schema.session_variables where variable_name like '%alloc%' order by 1;
VARIABLE_NAME VARIABLE_VALUE
QUERY_ALLOC_BLOCK_SIZE 8192
QUERY_PREALLOC_SIZE 8192
-RANGE_ALLOC_BLOCK_SIZE 2048
+RANGE_ALLOC_BLOCK_SIZE 4096
TRANSACTION_ALLOC_BLOCK_SIZE 8192
TRANSACTION_PREALLOC_SIZE 4096
set @@range_alloc_block_size=1024*16;
@@ -349,14 +353,14 @@ show variables like '%alloc%';
Variable_name Value
query_alloc_block_size 8192
query_prealloc_size 8192
-range_alloc_block_size 2048
+range_alloc_block_size 4096
transaction_alloc_block_size 8192
transaction_prealloc_size 4096
select * from information_schema.session_variables where variable_name like '%alloc%' order by 1;
VARIABLE_NAME VARIABLE_VALUE
QUERY_ALLOC_BLOCK_SIZE 8192
QUERY_PREALLOC_SIZE 8192
-RANGE_ALLOC_BLOCK_SIZE 2048
+RANGE_ALLOC_BLOCK_SIZE 4096
TRANSACTION_ALLOC_BLOCK_SIZE 8192
TRANSACTION_PREALLOC_SIZE 4096
SELECT @@version LIKE 'non-existent';
@@ -414,6 +418,8 @@ select @@autocommit, @@big_tables;
@@autocommit @@big_tables
1 1
set global binlog_cache_size=100;
+Warnings:
+Warning 1292 Truncated incorrect binlog_cache_size value: '100'
set bulk_insert_buffer_size=100;
set character set cp1251_koi8;
set character set default;
@@ -442,6 +448,8 @@ set global flush_time=100;
set insert_id=1;
set interactive_timeout=100;
set join_buffer_size=100;
+Warnings:
+Warning 1292 Truncated incorrect join_buffer_size value: '100'
set last_insert_id=1;
set global local_infile=1;
set long_query_time=0.000001;
@@ -454,12 +462,20 @@ select @@long_query_time;
100.000001
set low_priority_updates=1;
set max_allowed_packet=100;
+Warnings:
+Warning 1292 Truncated incorrect max_allowed_packet value: '100'
set global max_binlog_cache_size=100;
+Warnings:
+Warning 1292 Truncated incorrect max_binlog_cache_size value: '100'
set global max_binlog_size=100;
+Warnings:
+Warning 1292 Truncated incorrect max_binlog_size value: '100'
set global max_connect_errors=100;
set global max_connections=100;
set global max_delayed_threads=100;
set max_heap_table_size=100;
+Warnings:
+Warning 1292 Truncated incorrect max_heap_table_size value: '100'
set max_join_size=100;
set max_sort_length=100;
set max_tmp_tables=100;
@@ -470,17 +486,25 @@ select @@max_user_connections;
set global max_write_lock_count=100;
set myisam_sort_buffer_size=100;
set net_buffer_length=100;
+Warnings:
+Warning 1292 Truncated incorrect net_buffer_length value: '100'
set net_read_timeout=100;
set net_write_timeout=100;
set global query_cache_limit=100;
set global query_cache_size=100;
set global query_cache_type=demand;
set read_buffer_size=100;
+Warnings:
+Warning 1292 Truncated incorrect read_buffer_size value: '100'
set read_rnd_buffer_size=100;
+Warnings:
+Warning 1292 Truncated incorrect read_rnd_buffer_size value: '100'
set global rpl_recovery_rank=100;
set global server_id=100;
set global slow_launch_time=100;
set sort_buffer_size=100;
+Warnings:
+Warning 1292 Truncated incorrect sort_buffer_size value: '100'
set @@max_sp_recursion_depth=10;
select @@max_sp_recursion_depth;
@@max_sp_recursion_depth
@@ -520,6 +544,8 @@ set storage_engine=myisam;
set global thread_cache_size=100;
set timestamp=1, timestamp=default;
set tmp_table_size=100;
+Warnings:
+Warning 1292 Truncated incorrect tmp_table_size value: '100'
set tx_isolation="READ-COMMITTED";
set wait_timeout=100;
set log_warnings=1;
@@ -689,6 +715,8 @@ SELECT * FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME LIKE 'MYI
VARIABLE_NAME VARIABLE_VALUE
MYISAM_DATA_POINTER_SIZE 7
SET GLOBAL table_open_cache=-1;
+Warnings:
+Warning 1292 Truncated incorrect table_open_cache value: '0'
SHOW VARIABLES LIKE 'table_open_cache';
Variable_name Value
table_open_cache 1
@@ -797,6 +825,9 @@ set @@query_prealloc_size = @test;
select @@query_prealloc_size = @test;
@@query_prealloc_size = @test
1
+set global sql_mode=repeat('a',80);
+ERROR 42000: Variable 'sql_mode' can't be set to the value of 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
+End of 4.1 tests
create table t1 (a int);
select a into @x from t1;
Warnings:
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result
index 8a926d44f5f..2971af7347d 100644
--- a/mysql-test/r/view.result
+++ b/mysql-test/r/view.result
@@ -625,7 +625,7 @@ drop table t1;
create table t1 (a int, b int);
create view v1 as select a, sum(b) from t1 group by a;
select b from v1 use index (some_index) where b=1;
-ERROR 42000: Key 'some_index' doesn't exist in table 'v1'
+ERROR HY000: Incorrect usage of index hints and VIEW
drop view v1;
drop table t1;
create table t1 (col1 char(5),col2 char(5));
@@ -2701,27 +2701,26 @@ CREATE TABLE t1(
fName varchar(25) NOT NULL,
lName varchar(25) NOT NULL,
DOB date NOT NULL,
+test_date date NOT NULL,
uID int unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY);
-INSERT INTO t1(fName, lName, DOB) VALUES
-('Hank', 'Hill', '1964-09-29'),
-('Tom', 'Adams', '1908-02-14'),
-('Homer', 'Simpson', '1968-03-05');
+INSERT INTO t1(fName, lName, DOB, test_date) VALUES
+('Hank', 'Hill', '1964-09-29', '2007-01-01'),
+('Tom', 'Adams', '1908-02-14', '2007-01-01'),
+('Homer', 'Simpson', '1968-03-05', '2007-01-01');
CREATE VIEW v1 AS
-SELECT (year(now())-year(DOB)) AS Age
+SELECT (year(test_date)-year(DOB)) AS Age
FROM t1 HAVING Age < 75;
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select (year(now()) - year(`t1`.`DOB`)) AS `Age` from `t1` having (`Age` < 75) latin1 latin1_swedish_ci
-set timestamp=1136066400;
-SELECT (year(now())-year(DOB)) AS Age FROM t1 HAVING Age < 75;
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select (year(`t1`.`test_date`) - year(`t1`.`DOB`)) AS `Age` from `t1` having (`Age` < 75) latin1 latin1_swedish_ci
+SELECT (year(test_date)-year(DOB)) AS Age FROM t1 HAVING Age < 75;
Age
-42
-38
-set timestamp=1136066400;
+43
+39
SELECT * FROM v1;
Age
-42
-38
+43
+39
DROP VIEW v1;
DROP TABLE t1;
CREATE TABLE t1 (id int NOT NULL PRIMARY KEY, a char(6) DEFAULT 'xxx');
@@ -3559,6 +3558,45 @@ table_name is_updatable
v1 NO
drop view v1;
drop table t1;
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2);
+CREATE VIEW v1 AS SELECT * FROM t1;
+SELECT * FROM v1 USE KEY(non_existant);
+ERROR HY000: Incorrect usage of index hints and VIEW
+SELECT * FROM v1 FORCE KEY(non_existant);
+ERROR HY000: Incorrect usage of index hints and VIEW
+SELECT * FROM v1 IGNORE KEY(non_existant);
+ERROR HY000: Incorrect usage of index hints and VIEW
+DROP VIEW v1;
+DROP TABLE t1;
+CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b INT NOT NULL DEFAULT 0,
+PRIMARY KEY(a), KEY (b));
+INSERT INTO t1 VALUES (),(),(),(),(),(),(),(),(),(),(),(),(),(),();
+CREATE VIEW v1 AS SELECT * FROM t1 FORCE KEY (PRIMARY,b) ORDER BY a;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1` FORCE INDEX (PRIMARY) FORCE INDEX (`b`) order by `t1`.`a` latin1 latin1_swedish_ci
+EXPLAIN SELECT * FROM v1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 index NULL PRIMARY 4 NULL 15
+CREATE VIEW v2 AS SELECT * FROM t1 USE KEY () ORDER BY a;
+SHOW CREATE VIEW v2;
+View Create View character_set_client collation_connection
+v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1` USE INDEX () order by `t1`.`a` latin1 latin1_swedish_ci
+EXPLAIN SELECT * FROM v2;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 15 Using filesort
+CREATE VIEW v3 AS SELECT * FROM t1 IGNORE KEY (b) ORDER BY a;
+SHOW CREATE VIEW v3;
+View Create View character_set_client collation_connection
+v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v3` AS select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1` IGNORE INDEX (`b`) order by `t1`.`a` latin1 latin1_swedish_ci
+EXPLAIN SELECT * FROM v3;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 15 Using filesort
+DROP VIEW v1;
+DROP VIEW v2;
+DROP VIEW v3;
+DROP TABLE t1;
End of 5.0 tests.
DROP DATABASE IF EXISTS `d-1`;
CREATE DATABASE `d-1`;
@@ -3579,4 +3617,47 @@ DROP TABLE `t-2`;
DROP VIEW `v-2`;
DROP DATABASE `d-1`;
USE test;
+
+#
+# Bug#26676: VIEW using old table schema in a session.
+#
+
+DROP VIEW IF EXISTS v1;
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1(c1 INT, c2 INT);
+INSERT INTO t1 VALUES (1, 2), (3, 4);
+
+SELECT * FROM t1;
+c1 c2
+1 2
+3 4
+
+CREATE VIEW v1 AS SELECT * FROM t1;
+
+SELECT * FROM v1;
+c1 c2
+1 2
+3 4
+
+ALTER TABLE t1 ADD COLUMN c3 INT AFTER c2;
+
+SELECT * FROM t1;
+c1 c2 c3
+1 2 NULL
+3 4 NULL
+
+SELECT * FROM v1;
+c1 c2
+1 2
+3 4
+
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`c1` AS `c1`,`t1`.`c2` AS `c2` from `t1` latin1 latin1_swedish_ci
+
+DROP VIEW v1;
+DROP TABLE t1;
+
+# End of test case for Bug#26676.
+
End of 5.1 tests.
diff --git a/mysql-test/r/view_grant.result b/mysql-test/r/view_grant.result
index 49c98d8e03f..c301953f508 100644
--- a/mysql-test/r/view_grant.result
+++ b/mysql-test/r/view_grant.result
@@ -778,15 +778,60 @@ GRANT CREATE VIEW ON db26813.v2 TO u26813@localhost;
GRANT DROP, CREATE VIEW ON db26813.v3 TO u26813@localhost;
GRANT SELECT ON db26813.t1 TO u26813@localhost;
ALTER VIEW v1 AS SELECT f2 FROM t1;
-ERROR 42000: CREATE VIEW command denied to user 'u26813'@'localhost' for table 'v1'
+ERROR 42000: Access denied; you need the SUPER privilege for this operation
ALTER VIEW v2 AS SELECT f2 FROM t1;
-ERROR 42000: DROP command denied to user 'u26813'@'localhost' for table 'v2'
+ERROR 42000: Access denied; you need the SUPER privilege for this operation
ALTER VIEW v3 AS SELECT f2 FROM t1;
+ERROR 42000: Access denied; you need the SUPER privilege for this operation
SHOW CREATE VIEW v3;
View Create View character_set_client collation_connection
-v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v3` AS select `t1`.`f2` AS `f2` from `t1` latin1 latin1_swedish_ci
+v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v3` AS select `t1`.`f1` AS `f1` from `t1` latin1 latin1_swedish_ci
DROP USER u26813@localhost;
DROP DATABASE db26813;
+#
+# Bug#29908: A user can gain additional access through the ALTER VIEW.
+#
+CREATE DATABASE mysqltest_29908;
+USE mysqltest_29908;
+CREATE TABLE t1(f1 INT, f2 INT);
+CREATE USER u29908_1@localhost;
+CREATE DEFINER = u29908_1@localhost VIEW v1 AS SELECT f1 FROM t1;
+CREATE DEFINER = u29908_1@localhost SQL SECURITY INVOKER VIEW v2 AS
+SELECT f1 FROM t1;
+GRANT DROP, CREATE VIEW, SHOW VIEW ON mysqltest_29908.v1 TO u29908_1@localhost;
+GRANT DROP, CREATE VIEW, SHOW VIEW ON mysqltest_29908.v2 TO u29908_1@localhost;
+GRANT SELECT ON mysqltest_29908.t1 TO u29908_1@localhost;
+CREATE USER u29908_2@localhost;
+GRANT DROP, CREATE VIEW ON mysqltest_29908.v1 TO u29908_2@localhost;
+GRANT DROP, CREATE VIEW, SHOW VIEW ON mysqltest_29908.v2 TO u29908_2@localhost;
+GRANT SELECT ON mysqltest_29908.t1 TO u29908_2@localhost;
+ALTER VIEW v1 AS SELECT f2 FROM t1;
+ERROR 42000: Access denied; you need the SUPER privilege for this operation
+ALTER VIEW v2 AS SELECT f2 FROM t1;
+ERROR 42000: Access denied; you need the SUPER privilege for this operation
+SHOW CREATE VIEW v2;
+View Create View character_set_client collation_connection
+v2 CREATE ALGORITHM=UNDEFINED DEFINER=`u29908_1`@`localhost` SQL SECURITY INVOKER VIEW `v2` AS select `t1`.`f1` AS `f1` from `t1` latin1 latin1_swedish_ci
+ALTER VIEW v1 AS SELECT f2 FROM t1;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`u29908_1`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f2` AS `f2` from `t1` latin1 latin1_swedish_ci
+ALTER VIEW v2 AS SELECT f2 FROM t1;
+SHOW CREATE VIEW v2;
+View Create View character_set_client collation_connection
+v2 CREATE ALGORITHM=UNDEFINED DEFINER=`u29908_1`@`localhost` SQL SECURITY INVOKER VIEW `v2` AS select `t1`.`f2` AS `f2` from `t1` latin1 latin1_swedish_ci
+ALTER VIEW v1 AS SELECT f1 FROM t1;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`u29908_1`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` latin1 latin1_swedish_ci
+ALTER VIEW v2 AS SELECT f1 FROM t1;
+SHOW CREATE VIEW v2;
+View Create View character_set_client collation_connection
+v2 CREATE ALGORITHM=UNDEFINED DEFINER=`u29908_1`@`localhost` SQL SECURITY INVOKER VIEW `v2` AS select `t1`.`f1` AS `f1` from `t1` latin1 latin1_swedish_ci
+DROP USER u29908_1@localhost;
+DROP USER u29908_2@localhost;
+DROP DATABASE mysqltest_29908;
+#######################################################################
DROP DATABASE IF EXISTS mysqltest1;
DROP DATABASE IF EXISTS mysqltest2;
CREATE DATABASE mysqltest1;
@@ -893,6 +938,8 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`no_such`@`user_1` SQL SECURITY DEFINER VI
Warnings:
Warning 1356 View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
ALTER ALGORITHM=MERGE VIEW v1 AS SELECT * FROM t1;
+Warnings:
+Note 1449 There is no 'no_such'@'user_1' registered
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=MERGE DEFINER=`no_such`@`user_1` SQL SECURITY DEFINER VIEW `v1` AS select `test`.`t1`.`i` AS `i` from `t1` latin1 latin1_swedish_ci
diff --git a/mysql-test/r/windows.result b/mysql-test/r/windows.result
index c97d3dd8867..e58a891838a 100644
--- a/mysql-test/r/windows.result
+++ b/mysql-test/r/windows.result
@@ -19,6 +19,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL No tables used
End of 5.0 tests.
+drop procedure if exists proc_1;
create procedure proc_1() install plugin my_plug soname '\\root\\some_plugin.dll';
call proc_1();
ERROR HY000: No paths allowed for shared library
diff --git a/mysql-test/r/windows_shm.result b/mysql-test/r/windows_shm.result
deleted file mode 100644
index c60049bece8..00000000000
--- a/mysql-test/r/windows_shm.result
+++ /dev/null
@@ -1,2 +0,0 @@
-mysqld is alive
-End of 5.0 tests.
diff --git a/mysql-test/r/xml.result b/mysql-test/r/xml.result
index a1f2c80e766..56c884343e3 100644
--- a/mysql-test/r/xml.result
+++ b/mysql-test/r/xml.result
@@ -647,32 +647,32 @@ select extractValue('<a>a','/a');
extractValue('<a>a','/a')
NULL
Warnings:
-Warning 1524 Incorrect XML value: 'parse error at line 1 pos 5: unexpected END-OF-INPUT'
+Warning 1525 Incorrect XML value: 'parse error at line 1 pos 5: unexpected END-OF-INPUT'
select extractValue('<a>a<','/a');
extractValue('<a>a<','/a')
NULL
Warnings:
-Warning 1524 Incorrect XML value: 'parse error at line 1 pos 6: END-OF-INPUT unexpected (ident or '/' wanted)'
+Warning 1525 Incorrect XML value: 'parse error at line 1 pos 6: END-OF-INPUT unexpected (ident or '/' wanted)'
select extractValue('<a>a</','/a');
extractValue('<a>a</','/a')
NULL
Warnings:
-Warning 1524 Incorrect XML value: 'parse error at line 1 pos 7: END-OF-INPUT unexpected (ident wanted)'
+Warning 1525 Incorrect XML value: 'parse error at line 1 pos 7: END-OF-INPUT unexpected (ident wanted)'
select extractValue('<a>a</a','/a');
extractValue('<a>a</a','/a')
NULL
Warnings:
-Warning 1524 Incorrect XML value: 'parse error at line 1 pos 8: END-OF-INPUT unexpected ('>' wanted)'
+Warning 1525 Incorrect XML value: 'parse error at line 1 pos 8: END-OF-INPUT unexpected ('>' wanted)'
select extractValue('<a>a</a></b>','/a');
extractValue('<a>a</a></b>','/a')
NULL
Warnings:
-Warning 1524 Incorrect XML value: 'parse error at line 1 pos 12: '</b>' unexpected (END-OF-INPUT wanted)'
+Warning 1525 Incorrect XML value: 'parse error at line 1 pos 12: '</b>' unexpected (END-OF-INPUT wanted)'
select extractValue('<a b=>a</a>','/a');
extractValue('<a b=>a</a>','/a')
NULL
Warnings:
-Warning 1524 Incorrect XML value: 'parse error at line 1 pos 7: '>' unexpected (ident or string wanted)'
+Warning 1525 Incorrect XML value: 'parse error at line 1 pos 7: '>' unexpected (ident or string wanted)'
select extractValue('<e>1</e>','position()');
ERROR HY000: XPATH syntax error: ''
select extractValue('<e>1</e>','last()');
@@ -723,17 +723,17 @@ select extractValue('<zot><tim0><01>10:39:15</01><02>140</02></tim0></zot>','//*
extractValue('<zot><tim0><01>10:39:15</01><02>140</02></tim0></zot>','//*')
NULL
Warnings:
-Warning 1524 Incorrect XML value: 'parse error at line 1 pos 13: unknown token unexpected (ident or '/' wanted)'
+Warning 1525 Incorrect XML value: 'parse error at line 1 pos 13: unknown token unexpected (ident or '/' wanted)'
select extractValue('<.>test</.>','//*');
extractValue('<.>test</.>','//*')
NULL
Warnings:
-Warning 1524 Incorrect XML value: 'parse error at line 1 pos 2: unknown token unexpected (ident or '/' wanted)'
+Warning 1525 Incorrect XML value: 'parse error at line 1 pos 2: unknown token unexpected (ident or '/' wanted)'
select extractValue('<->test</->','//*');
extractValue('<->test</->','//*')
NULL
Warnings:
-Warning 1524 Incorrect XML value: 'parse error at line 1 pos 2: unknown token unexpected (ident or '/' wanted)'
+Warning 1525 Incorrect XML value: 'parse error at line 1 pos 2: unknown token unexpected (ident or '/' wanted)'
select extractValue('<:>test</:>','//*');
extractValue('<:>test</:>','//*')
test
@@ -1012,3 +1012,21 @@ select ExtractValue('<a>a</a>', '/a[@x=@y0123456789_0123456789_0123456789_012345
ERROR HY000: XPATH error: comparison of two nodesets is not supported: '=@y0123456789_0123456789_0123456'
select ExtractValue('<a>a</a>', '/a[@x=$y0123456789_0123456789_0123456789_0123456789]');
ERROR HY000: Unknown XPATH variable at: '$y0123456789_0123456789_01234567'
+select updatexml(NULL, 1, 1), updatexml(1, NULL, 1), updatexml(1, 1, NULL);
+updatexml(NULL, 1, 1) updatexml(1, NULL, 1) updatexml(1, 1, NULL)
+NULL NULL NULL
+select updatexml(NULL, NULL, 1), updatexml(1, NULL, NULL),
+updatexml(NULL, 1, NULL);
+updatexml(NULL, NULL, 1) updatexml(1, NULL, NULL) updatexml(NULL, 1, NULL)
+NULL NULL NULL
+select updatexml(NULL, NULL, NULL);
+updatexml(NULL, NULL, NULL)
+NULL
+CREATE TABLE t1(a INT NOT NULL);
+INSERT INTO t1 VALUES (0), (0);
+SELECT 1 FROM t1 ORDER BY(UPDATEXML(a, '1', '1'));
+1
+1
+1
+DROP TABLE t1;
+End of 5.1 tests
diff --git a/mysql-test/std_data/corrupt-relay-bin.000624 b/mysql-test/std_data/corrupt-relay-bin.000624
new file mode 100644
index 00000000000..21b4901211c
--- /dev/null
+++ b/mysql-test/std_data/corrupt-relay-bin.000624
Binary files differ
diff --git a/mysql-test/suite/binlog/r/binlog_database.result b/mysql-test/suite/binlog/r/binlog_database.result
new file mode 100644
index 00000000000..7deffb86244
--- /dev/null
+++ b/mysql-test/suite/binlog/r/binlog_database.result
@@ -0,0 +1,56 @@
+set binlog_format=statement;
+reset master;
+create database testing_1;
+use testing_1;
+create table t1 (a int);
+create function sf1 (a int) returns int return a+1;
+create trigger tr1 before insert on t1 for each row insert into t2 values (2*new.a);
+create procedure sp1 (a int) insert into t1 values(a);
+drop database testing_1;
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # create database testing_1
+master-bin.000001 # Query # # use `testing_1`; create table t1 (a int)
+master-bin.000001 # Query # # use `testing_1`; CREATE DEFINER=`root`@`localhost` function sf1 (a int) returns int return a+1
+master-bin.000001 # Query # # use `testing_1`; CREATE DEFINER=`root`@`localhost` trigger tr1 before insert on t1 for each row insert into t2 values (2*new.a)
+master-bin.000001 # Query # # use `testing_1`; CREATE DEFINER=`root`@`localhost` procedure sp1 (a int) insert into t1 values(a)
+master-bin.000001 # Query # # drop database testing_1
+set binlog_format=mixed;
+reset master;
+create database testing_1;
+use testing_1;
+create table t1 (a int);
+create function sf1 (a int) returns int return a+1;
+create trigger tr1 before insert on t1 for each row insert into t2 values (2*new.a);
+create procedure sp1 (a int) insert into t1 values(a);
+drop database testing_1;
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # create database testing_1
+master-bin.000001 # Query # # use `testing_1`; create table t1 (a int)
+master-bin.000001 # Query # # use `testing_1`; CREATE DEFINER=`root`@`localhost` function sf1 (a int) returns int return a+1
+master-bin.000001 # Query # # use `testing_1`; CREATE DEFINER=`root`@`localhost` trigger tr1 before insert on t1 for each row insert into t2 values (2*new.a)
+master-bin.000001 # Query # # use `testing_1`; CREATE DEFINER=`root`@`localhost` procedure sp1 (a int) insert into t1 values(a)
+master-bin.000001 # Query # # drop database testing_1
+set binlog_format=row;
+reset master;
+create database testing_1;
+use testing_1;
+create table t1 (a int);
+create function sf1 (a int) returns int return a+1;
+create trigger tr1 before insert on t1 for each row insert into t2 values (2*new.a);
+create procedure sp1 (a int) insert into t1 values(a);
+drop database testing_1;
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # create database testing_1
+master-bin.000001 # Query # # use `testing_1`; create table t1 (a int)
+master-bin.000001 # Query # # use `testing_1`; CREATE DEFINER=`root`@`localhost` function sf1 (a int) returns int return a+1
+master-bin.000001 # Query # # use `testing_1`; CREATE DEFINER=`root`@`localhost` trigger tr1 before insert on t1 for each row insert into t2 values (2*new.a)
+master-bin.000001 # Query # # use `testing_1`; CREATE DEFINER=`root`@`localhost` procedure sp1 (a int) insert into t1 values(a)
+master-bin.000001 # Query # # drop database testing_1
+show databases;
+Database
+information_schema
+mysql
+test
diff --git a/mysql-test/suite/binlog/r/binlog_killed.result b/mysql-test/suite/binlog/r/binlog_killed.result
index ba4f38fb4c1..72fda535b6f 100644
--- a/mysql-test/suite/binlog/r/binlog_killed.result
+++ b/mysql-test/suite/binlog/r/binlog_killed.result
@@ -9,4 +9,135 @@ insert into t2 values (null, null), (null, get_lock("a", 10));
select @result /* must be zero either way */;
@result
0
+select RELEASE_LOCK("a");
+RELEASE_LOCK("a")
+1
+delete from t1;
+delete from t2;
+insert into t1 values (1,1),(2,2);
+begin;
+update t1 set b=11 where a=2;
+begin;
+update t1 set b=b+10;
+kill query ID;
+rollback;
+rollback;
+select * from t1 order by a /* must be the same as before (1,1),(2,2) */;
+a b
+1 1
+2 2
+begin;
+delete from t1 where a=2;
+begin;
+delete from t1 where a=2;
+kill query ID;
+rollback;
+rollback;
+select * from t1 order by a /* must be the same as before (1,1),(2,2) */;
+a b
+1 1
+2 2
+drop table if exists t4;
+create table t4 (a int, b int) engine=innodb;
+insert into t4 values (3, 3);
+begin;
+insert into t1 values (3, 3);
+begin;
+insert into t1 select * from t4 for update;
+kill query ID;
+rollback;
+rollback;
+select * from t1 /* must be the same as before (1,1),(2,2) */;
+a b
+1 1
+2 2
+drop table t4;
+create table t4 (a int, b int) ENGINE=MyISAM /* for killing update and delete */;
+create function bug27563(n int)
+RETURNS int(11)
+DETERMINISTIC
+begin
+if @b > 0 then
+select get_lock("a", 20) into @a;
+else
+set @b= 1;
+end if;
+return n;
+end|
+delete from t4;
+insert into t4 values (1,1), (1,1);
+reset master;
+select get_lock("a", 20);
+get_lock("a", 20)
+1
+set @b= 0;
+update t4 set b=b + bug27563(b);
+select count(*) FROM INFORMATION_SCHEMA.PROCESSLIST where state='User lock';
+count(*)
+1
+kill query ID;
+ERROR 70100: Query execution was interrupted
+select * from t4 order by b /* must be (1,1), (1,2) */;
+a b
+1 1
+1 2
+select @b /* must be 1 at the end of a stmt calling bug27563() */;
+@b
+1
+must have the update query event more to FD
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # User var # # @`b`=0
+master-bin.000001 # Query # # use `test`; update t4 set b=b + bug27563(b)
+select
+(@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
+is not null;
+(@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
+is not null
+1
+select 0 /* must return 0 to mean the killed query is in */;
+0
+0
+select RELEASE_LOCK("a");
+RELEASE_LOCK("a")
+1
+delete from t4;
+insert into t4 values (1,1), (2,2);
+reset master;
+select get_lock("a", 20);
+get_lock("a", 20)
+1
+set @b= 0;
+delete from t4 where b=bug27563(1) or b=bug27563(2);
+select count(*) FROM INFORMATION_SCHEMA.PROCESSLIST where state='User lock';
+count(*)
+1
+kill query ID;
+ERROR 70100: Query execution was interrupted
+select count(*) from t4 /* must be 1 */;
+count(*)
+1
+select @b /* must be 1 at the end of a stmt calling bug27563() */;
+@b
+1
+must have the delete query event more to FD
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # User var # # @`b`=0
+master-bin.000001 # Query # # use `test`; delete from t4 where b=bug27563(1) or b=bug27563(2)
+select
+(@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
+is not null;
+(@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
+is not null
+1
+select 0 /* must return 0 to mean the killed query is in */;
+0
+0
+select RELEASE_LOCK("a");
+RELEASE_LOCK("a")
+1
+drop table t4;
+drop function bug27563;
drop table t1,t2,t3;
+end of the tests
diff --git a/mysql-test/suite/binlog/r/binlog_killed_simulate.result b/mysql-test/suite/binlog/r/binlog_killed_simulate.result
new file mode 100644
index 00000000000..f6a5ddade51
--- /dev/null
+++ b/mysql-test/suite/binlog/r/binlog_killed_simulate.result
@@ -0,0 +1,33 @@
+drop table if exists t1,t2;
+create table t1 (a int) engine=MyISAM;
+insert into t1 set a=1;
+reset master;
+update t1 set a=2 /* will be "killed" after work has been done */;
+select
+(@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
+is not null;
+(@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
+is not null
+1
+select 1 /* must return 1 as query completed before got killed*/;
+1
+1
+create table t2 (a int, b int) ENGINE=MyISAM;
+reset master;
+load data infile '../std_data_ln/rpl_loaddata.dat' into table t2 /* will be "killed" in the middle */;
+ERROR 70100: Query execution was interrupted
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Begin_load_query # # ;file_id=1;block_len=12
+master-bin.000001 # Execute_load_query # # use `test`; load data infile '../std_data_ln/rpl_loaddata.dat' into table t2 /* will be "killed" in the middle */ ;file_id=1
+select
+(@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
+is not null;
+(@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
+is not null
+1
+select 0 /* must return 0 to mean the killed query is in */;
+0
+0
+drop table t1,t2;
+end of the tests
diff --git a/mysql-test/suite/binlog/r/binlog_row_ctype_cp932.result b/mysql-test/suite/binlog/r/binlog_row_ctype_cp932.result
index ef9f76b7d9c..655100203b5 100644
--- a/mysql-test/suite/binlog/r/binlog_row_ctype_cp932.result
+++ b/mysql-test/suite/binlog/r/binlog_row_ctype_cp932.result
@@ -2,6 +2,80 @@ drop table if exists t1;
drop table if exists t2;
drop table if exists t3;
drop table if exists t4;
+SET @test_character_set= 'cp932';
+SET @test_collation= 'cp932_japanese_ci';
+SET @safe_character_set_server= @@character_set_server;
+SET @safe_collation_server= @@collation_server;
+SET character_set_server= @test_character_set;
+SET collation_server= @test_collation;
+CREATE DATABASE d1;
+USE d1;
+CREATE TABLE t1 (c CHAR(10), KEY(c));
+SHOW FULL COLUMNS FROM t1;
+Field Type Collation Null Key Default Extra Privileges Comment
+c char(10) cp932_japanese_ci YES MUL NULL
+INSERT INTO t1 VALUES ('aaa'),('aaaa'),('aaaaa');
+SELECT c as want3results FROM t1 WHERE c LIKE 'aaa%';
+want3results
+aaa
+aaaa
+aaaaa
+DROP TABLE t1;
+CREATE TABLE t1 (c1 varchar(15), KEY c1 (c1(2)));
+SHOW FULL COLUMNS FROM t1;
+Field Type Collation Null Key Default Extra Privileges Comment
+c1 varchar(15) cp932_japanese_ci YES MUL NULL
+INSERT INTO t1 VALUES ('location'),('loberge'),('lotre'),('boabab');
+SELECT c1 as want3results from t1 where c1 like 'l%';
+want3results
+location
+loberge
+lotre
+SELECT c1 as want3results from t1 where c1 like 'lo%';
+want3results
+location
+loberge
+lotre
+SELECT c1 as want1result from t1 where c1 like 'loc%';
+want1result
+location
+SELECT c1 as want1result from t1 where c1 like 'loca%';
+want1result
+location
+SELECT c1 as want1result from t1 where c1 like 'locat%';
+want1result
+location
+SELECT c1 as want1result from t1 where c1 like 'locati%';
+want1result
+location
+SELECT c1 as want1result from t1 where c1 like 'locatio%';
+want1result
+location
+SELECT c1 as want1result from t1 where c1 like 'location%';
+want1result
+location
+DROP TABLE t1;
+create table t1 (a set('a') not null);
+insert into t1 values (),();
+Warnings:
+Warning 1364 Field 'a' doesn't have a default value
+select cast(a as char(1)) from t1;
+cast(a as char(1))
+
+
+select a sounds like a from t1;
+a sounds like a
+1
+1
+select 1 from t1 order by cast(a as char(1));
+1
+1
+1
+drop table t1;
+DROP DATABASE d1;
+USE test;
+SET character_set_server= @safe_character_set_server;
+SET collation_server= @safe_collation_server;
set names cp932;
set character_set_database = cp932;
CREATE TABLE t1(c1 CHAR(1)) DEFAULT CHARACTER SET = cp932;
diff --git a/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result b/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result
index 6ac942176c7..f69d5717a1f 100644
--- a/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result
+++ b/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result
@@ -413,3 +413,236 @@ select
@a like "%#%error_code=0%ROLLBACK/*!*/;%ROLLBACK /* added by mysqlbinlog */;%" @a not like "%#%error_code=%error_code=%"
1 1
drop table t1, t2;
+create temporary table tt (a int unique);
+create table ti (a int) engine=innodb;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 106
+begin;
+insert into ti values (1);
+insert into ti values (2) ;
+insert into tt select * from ti;
+rollback;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+select count(*) from tt /* 2 */;
+count(*)
+2
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 395
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # use `test`; BEGIN
+master-bin.000001 # Table_map # # table_id: # (test.ti)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.ti)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # use `test`; ROLLBACK
+select count(*) from ti /* zero */;
+count(*)
+0
+insert into ti select * from tt;
+select * from ti /* that is what slave would miss - bug#28960 */;
+a
+1
+2
+delete from ti;
+delete from tt where a=1;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 106
+begin;
+insert into ti values (1);
+insert into ti values (2) /* to make the dup error in the following */;
+insert into tt select * from ti /* one affected and error */;
+ERROR 23000: Duplicate entry '2' for key 'a'
+rollback;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 106
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+select count(*) from ti /* zero */;
+count(*)
+0
+insert into ti select * from tt;
+select * from tt /* that is what otherwise slave missed - the bug */;
+a
+1
+2
+drop table ti;
+drop function if exists bug27417;
+drop table if exists t1,t2;
+CREATE TABLE t1 (a int NOT NULL auto_increment primary key) ENGINE=MyISAM;
+CREATE TABLE t2 (a int NOT NULL auto_increment, PRIMARY KEY (a));
+create function bug27417(n int)
+RETURNS int(11)
+begin
+insert into t1 values (null);
+return n;
+end|
+reset master;
+insert into t2 values (bug27417(1));
+insert into t2 select bug27417(2);
+reset master;
+insert into t2 values (bug27417(2));
+ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Intvar # # INSERT_ID=3
+master-bin.000001 # Query # # use `test`; insert into t2 values (bug27417(2))
+select count(*) from t1 /* must be 3 */;
+count(*)
+3
+reset master;
+select count(*) from t2;
+count(*)
+2
+delete from t2 where a=bug27417(3);
+select count(*) from t2 /* nothing got deleted */;
+count(*)
+2
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Intvar # # INSERT_ID=4
+master-bin.000001 # Query # # use `test`; delete from t2 where a=bug27417(3)
+select count(*) from t1 /* must be 5 */;
+count(*)
+5
+delete t2 from t2 where t2.a=bug27417(100) /* must not affect t2 */;
+affected rows: 0
+select count(*) from t1 /* must be 7 */;
+count(*)
+7
+drop table t1,t2;
+CREATE TABLE t1 (a int NOT NULL auto_increment primary key) ENGINE=MyISAM;
+CREATE TABLE t2 (a int, PRIMARY KEY (a)) ENGINE=InnoDB;
+CREATE TABLE t3 (a int, PRIMARY KEY (a), b int unique) ENGINE=MyISAM;
+CREATE TABLE t4 (a int, PRIMARY KEY (a), b int unique) ENGINE=Innodb;
+CREATE TABLE t5 (a int, PRIMARY KEY (a)) ENGINE=InnoDB;
+insert into t2 values (1);
+reset master;
+insert into t2 values (bug27417(1));
+ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Intvar # # INSERT_ID=1
+master-bin.000001 # Query # # use `test`; insert into t2 values (bug27417(1))
+master-bin.000001 # Query # # use `test`; ROLLBACK
+select count(*) from t1 /* must be 1 */;
+count(*)
+1
+delete from t1;
+delete from t2;
+insert into t2 values (2);
+reset master;
+insert into t2 select bug27417(1) union select bug27417(2);
+ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Intvar # # INSERT_ID=2
+master-bin.000001 # Query # # use `test`; insert into t2 select bug27417(1) union select bug27417(2)
+master-bin.000001 # Query # # use `test`; ROLLBACK
+select count(*) from t1 /* must be 2 */;
+count(*)
+2
+delete from t1;
+insert into t3 values (1,1),(2,3),(3,4);
+reset master;
+update t3 set b=b+bug27417(1);
+ERROR 23000: Duplicate entry '4' for key 'b'
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Intvar # # INSERT_ID=4
+master-bin.000001 # Query # # use `test`; update t3 set b=b+bug27417(1)
+select count(*) from t1 /* must be 2 */;
+count(*)
+2
+delete from t3;
+delete from t4;
+insert into t3 values (1,1);
+insert into t4 values (1,1),(2,2);
+reset master;
+UPDATE t4,t3 SET t4.a=t3.a + bug27417(1) /* top level non-ta table */;
+ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Intvar # # INSERT_ID=6
+master-bin.000001 # Query # # use `test`; UPDATE t4,t3 SET t4.a=t3.a + bug27417(1) /* top level non-ta table */
+master-bin.000001 # Query # # use `test`; ROLLBACK
+select count(*) from t1 /* must be 4 */;
+count(*)
+4
+delete from t1;
+delete from t3;
+delete from t4;
+insert into t3 values (1,1),(2,2);
+insert into t4 values (1,1),(2,2);
+reset master;
+UPDATE t3,t4 SET t3.a=t4.a + bug27417(1);
+ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
+select count(*) from t1 /* must be 1 */;
+count(*)
+1
+drop table t4;
+delete from t1;
+delete from t2;
+delete from t3;
+insert into t2 values (1);
+insert into t3 values (1,1);
+create trigger trg_del before delete on t2 for each row
+insert into t3 values (bug27417(1), 2);
+reset master;
+delete from t2;
+ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Intvar # # INSERT_ID=9
+master-bin.000001 # Query # # use `test`; delete from t2
+master-bin.000001 # Query # # use `test`; ROLLBACK
+select count(*) from t1 /* must be 1 */;
+count(*)
+1
+drop trigger trg_del;
+delete from t1;
+delete from t2;
+delete from t5;
+create trigger trg_del_t2 after delete on t2 for each row
+insert into t1 values (1);
+insert into t2 values (2),(3);
+insert into t5 values (1),(2);
+reset master;
+delete t2.* from t2,t5 where t2.a=t5.a + 1;
+ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # use `test`; delete t2.* from t2,t5 where t2.a=t5.a + 1
+master-bin.000001 # Query # # use `test`; ROLLBACK
+select count(*) from t1 /* must be 1 */;
+count(*)
+1
+delete from t1;
+create table t4 (a int default 0, b int primary key) engine=innodb;
+insert into t4 values (0, 17);
+reset master;
+load data infile '../std_data_ln/rpl_loaddata.dat' into table t4 (a, @b) set b= @b + bug27417(2);
+ERROR 23000: Duplicate entry '17' for key 'PRIMARY'
+select * from t4;
+a b
+0 17
+select count(*) from t1 /* must be 2 */;
+count(*)
+2
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Intvar # # INSERT_ID=10
+master-bin.000001 # Begin_load_query # # ;file_id=1;block_len=12
+master-bin.000001 # Intvar # # INSERT_ID=10
+master-bin.000001 # Execute_load_query # # use `test`; load data infile '../std_data_ln/rpl_loaddata.dat' into table t4 (a, @b) set b= @b + bug27417(2) ;file_id=1
+master-bin.000001 # Query # # use `test`; ROLLBACK
+drop trigger trg_del_t2;
+drop table t1,t2,t3,t4,t5;
+drop function bug27417;
diff --git a/mysql-test/suite/binlog/r/binlog_stm_blackhole.result b/mysql-test/suite/binlog/r/binlog_stm_blackhole.result
index a1c83ffc73d..a79642a9204 100644
--- a/mysql-test/suite/binlog/r/binlog_stm_blackhole.result
+++ b/mysql-test/suite/binlog/r/binlog_stm_blackhole.result
@@ -124,6 +124,7 @@ master-bin.000001 # Query # # use `test`; replace into t1 select * from t3
drop table t1,t2,t3;
CREATE TABLE t1(a INT) ENGINE=BLACKHOLE;
INSERT DELAYED INTO t1 VALUES(1);
+ERROR HY000: Binary logging not possible. Message: Row-based format required for this statement, but not allowed by this combination of engines
DROP TABLE t1;
CREATE TABLE t1(a INT, b INT) ENGINE=BLACKHOLE;
DELETE FROM t1 WHERE a=10;
diff --git a/mysql-test/suite/binlog/r/binlog_stm_ctype_cp932.result b/mysql-test/suite/binlog/r/binlog_stm_ctype_cp932.result
index ef9f76b7d9c..655100203b5 100755
--- a/mysql-test/suite/binlog/r/binlog_stm_ctype_cp932.result
+++ b/mysql-test/suite/binlog/r/binlog_stm_ctype_cp932.result
@@ -2,6 +2,80 @@ drop table if exists t1;
drop table if exists t2;
drop table if exists t3;
drop table if exists t4;
+SET @test_character_set= 'cp932';
+SET @test_collation= 'cp932_japanese_ci';
+SET @safe_character_set_server= @@character_set_server;
+SET @safe_collation_server= @@collation_server;
+SET character_set_server= @test_character_set;
+SET collation_server= @test_collation;
+CREATE DATABASE d1;
+USE d1;
+CREATE TABLE t1 (c CHAR(10), KEY(c));
+SHOW FULL COLUMNS FROM t1;
+Field Type Collation Null Key Default Extra Privileges Comment
+c char(10) cp932_japanese_ci YES MUL NULL
+INSERT INTO t1 VALUES ('aaa'),('aaaa'),('aaaaa');
+SELECT c as want3results FROM t1 WHERE c LIKE 'aaa%';
+want3results
+aaa
+aaaa
+aaaaa
+DROP TABLE t1;
+CREATE TABLE t1 (c1 varchar(15), KEY c1 (c1(2)));
+SHOW FULL COLUMNS FROM t1;
+Field Type Collation Null Key Default Extra Privileges Comment
+c1 varchar(15) cp932_japanese_ci YES MUL NULL
+INSERT INTO t1 VALUES ('location'),('loberge'),('lotre'),('boabab');
+SELECT c1 as want3results from t1 where c1 like 'l%';
+want3results
+location
+loberge
+lotre
+SELECT c1 as want3results from t1 where c1 like 'lo%';
+want3results
+location
+loberge
+lotre
+SELECT c1 as want1result from t1 where c1 like 'loc%';
+want1result
+location
+SELECT c1 as want1result from t1 where c1 like 'loca%';
+want1result
+location
+SELECT c1 as want1result from t1 where c1 like 'locat%';
+want1result
+location
+SELECT c1 as want1result from t1 where c1 like 'locati%';
+want1result
+location
+SELECT c1 as want1result from t1 where c1 like 'locatio%';
+want1result
+location
+SELECT c1 as want1result from t1 where c1 like 'location%';
+want1result
+location
+DROP TABLE t1;
+create table t1 (a set('a') not null);
+insert into t1 values (),();
+Warnings:
+Warning 1364 Field 'a' doesn't have a default value
+select cast(a as char(1)) from t1;
+cast(a as char(1))
+
+
+select a sounds like a from t1;
+a sounds like a
+1
+1
+select 1 from t1 order by cast(a as char(1));
+1
+1
+1
+drop table t1;
+DROP DATABASE d1;
+USE test;
+SET character_set_server= @safe_character_set_server;
+SET collation_server= @safe_collation_server;
set names cp932;
set character_set_database = cp932;
CREATE TABLE t1(c1 CHAR(1)) DEFAULT CHARACTER SET = cp932;
diff --git a/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result b/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result
index 5ef36861c30..c15478bc826 100644
--- a/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result
+++ b/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result
@@ -380,7 +380,8 @@ select
@a like "%#%error_code=0%ROLLBACK/*!*/;%ROLLBACK /* added by mysqlbinlog */;%" @a not like "%#%error_code=%error_code=%"
1 1
drop table t1, t2;
-create table tt (a int unique);
+set @@session.binlog_format=statement;
+create temporary table tt (a int unique);
create table ti (a int) engine=innodb;
reset master;
show master status;
@@ -399,18 +400,18 @@ count(*)
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 515
-show binlog events from 106;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Query 1 # use `test`; BEGIN
-master-bin.000001 # Query 1 # use `test`; insert into ti values (1)
-master-bin.000001 # Query 1 # use `test`; insert into ti values (2)
-master-bin.000001 # Query 1 # use `test`; insert into tt select * from ti
-master-bin.000001 # Query 1 # use `test`; ROLLBACK
+master-bin.000001 # Query # # use `test`; BEGIN
+master-bin.000001 # Query # # use `test`; insert into ti values (1)
+master-bin.000001 # Query # # use `test`; insert into ti values (2)
+master-bin.000001 # Query # # use `test`; insert into tt select * from ti
+master-bin.000001 # Query # # use `test`; ROLLBACK
select count(*) from ti /* zero */;
count(*)
0
insert into ti select * from tt;
-select * from ti /* that is what slave would miss - a bug */;
+select * from ti /* that is what slave would miss - bug#28960 */;
a
1
2
@@ -431,13 +432,13 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 589
-show binlog events from 106;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Query 1 # use `test`; BEGIN
-master-bin.000001 # Query 1 # use `test`; insert into ti values (1)
-master-bin.000001 # Query 1 # use `test`; insert into ti values (2) /* to make the dup error in the following */
-master-bin.000001 # Query 1 # use `test`; insert into tt select * from ti /* one affected and error */
-master-bin.000001 # Query 1 # use `test`; ROLLBACK
+master-bin.000001 # Query # # use `test`; BEGIN
+master-bin.000001 # Query # # use `test`; insert into ti values (1)
+master-bin.000001 # Query # # use `test`; insert into ti values (2) /* to make the dup error in the following */
+master-bin.000001 # Query # # use `test`; insert into tt select * from ti /* one affected and error */
+master-bin.000001 # Query # # use `test`; ROLLBACK
select count(*) from ti /* zero */;
count(*)
0
@@ -446,7 +447,7 @@ select * from tt /* that is what otherwise slave missed - the bug */;
a
1
2
-drop table ti,tt;
+drop table ti;
drop function if exists bug27417;
drop table if exists t1,t2;
CREATE TABLE t1 (a int NOT NULL auto_increment primary key) ENGINE=MyISAM;
@@ -463,6 +464,10 @@ insert into t2 select bug27417(2);
reset master;
insert into t2 values (bug27417(2));
ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Intvar # # INSERT_ID=3
+master-bin.000001 # Query # # use `test`; insert into t2 values (bug27417(2))
select count(*) from t1 /* must be 3 */;
count(*)
3
@@ -474,6 +479,10 @@ delete from t2 where a=bug27417(3);
select count(*) from t2 /* nothing got deleted */;
count(*)
2
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Intvar # # INSERT_ID=4
+master-bin.000001 # Query # # use `test`; delete from t2 where a=bug27417(3)
select count(*) from t1 /* must be 5 */;
count(*)
5
@@ -482,6 +491,134 @@ affected rows: 0
select count(*) from t1 /* must be 7 */;
count(*)
7
-drop function bug27417;
drop table t1,t2;
+CREATE TABLE t1 (a int NOT NULL auto_increment primary key) ENGINE=MyISAM;
+CREATE TABLE t2 (a int, PRIMARY KEY (a)) ENGINE=InnoDB;
+CREATE TABLE t3 (a int, PRIMARY KEY (a), b int unique) ENGINE=MyISAM;
+CREATE TABLE t4 (a int, PRIMARY KEY (a), b int unique) ENGINE=Innodb;
+CREATE TABLE t5 (a int, PRIMARY KEY (a)) ENGINE=InnoDB;
+insert into t2 values (1);
+reset master;
+insert into t2 values (bug27417(1));
+ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Intvar # # INSERT_ID=1
+master-bin.000001 # Query # # use `test`; insert into t2 values (bug27417(1))
+master-bin.000001 # Query # # use `test`; ROLLBACK
+select count(*) from t1 /* must be 1 */;
+count(*)
+1
+delete from t1;
+delete from t2;
+insert into t2 values (2);
+reset master;
+insert into t2 select bug27417(1) union select bug27417(2);
+ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Intvar # # INSERT_ID=2
+master-bin.000001 # Query # # use `test`; insert into t2 select bug27417(1) union select bug27417(2)
+master-bin.000001 # Query # # use `test`; ROLLBACK
+select count(*) from t1 /* must be 2 */;
+count(*)
+2
+delete from t1;
+insert into t3 values (1,1),(2,3),(3,4);
+reset master;
+update t3 set b=b+bug27417(1);
+ERROR 23000: Duplicate entry '4' for key 'b'
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Intvar # # INSERT_ID=4
+master-bin.000001 # Query # # use `test`; update t3 set b=b+bug27417(1)
+select count(*) from t1 /* must be 2 */;
+count(*)
+2
+delete from t3;
+delete from t4;
+insert into t3 values (1,1);
+insert into t4 values (1,1),(2,2);
+reset master;
+UPDATE t4,t3 SET t4.a=t3.a + bug27417(1) /* top level non-ta table */;
+ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Intvar # # INSERT_ID=6
+master-bin.000001 # Query # # use `test`; UPDATE t4,t3 SET t4.a=t3.a + bug27417(1) /* top level non-ta table */
+master-bin.000001 # Query # # use `test`; ROLLBACK
+select count(*) from t1 /* must be 4 */;
+count(*)
+4
+delete from t1;
+delete from t3;
+delete from t4;
+insert into t3 values (1,1),(2,2);
+insert into t4 values (1,1),(2,2);
+reset master;
+UPDATE t3,t4 SET t3.a=t4.a + bug27417(1);
+ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
+select count(*) from t1 /* must be 1 */;
+count(*)
+1
+drop table t4;
+delete from t1;
+delete from t2;
+delete from t3;
+insert into t2 values (1);
+insert into t3 values (1,1);
+create trigger trg_del before delete on t2 for each row
+insert into t3 values (bug27417(1), 2);
+reset master;
+delete from t2;
+ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Intvar # # INSERT_ID=9
+master-bin.000001 # Query # # use `test`; delete from t2
+master-bin.000001 # Query # # use `test`; ROLLBACK
+select count(*) from t1 /* must be 1 */;
+count(*)
+1
+drop trigger trg_del;
+delete from t1;
+delete from t2;
+delete from t5;
+create trigger trg_del_t2 after delete on t2 for each row
+insert into t1 values (1);
+insert into t2 values (2),(3);
+insert into t5 values (1),(2);
+reset master;
+delete t2.* from t2,t5 where t2.a=t5.a + 1;
+ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # use `test`; delete t2.* from t2,t5 where t2.a=t5.a + 1
+master-bin.000001 # Query # # use `test`; ROLLBACK
+select count(*) from t1 /* must be 1 */;
+count(*)
+1
+delete from t1;
+create table t4 (a int default 0, b int primary key) engine=innodb;
+insert into t4 values (0, 17);
+reset master;
+load data infile '../std_data_ln/rpl_loaddata.dat' into table t4 (a, @b) set b= @b + bug27417(2);
+ERROR 23000: Duplicate entry '17' for key 'PRIMARY'
+select * from t4;
+a b
+0 17
+select count(*) from t1 /* must be 2 */;
+count(*)
+2
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Intvar # # INSERT_ID=10
+master-bin.000001 # Begin_load_query # # ;file_id=1;block_len=12
+master-bin.000001 # Intvar # # INSERT_ID=10
+master-bin.000001 # Execute_load_query # # use `test`; load data infile '../std_data_ln/rpl_loaddata.dat' into table t4 (a, @b) set b= @b + bug27417(2) ;file_id=1
+master-bin.000001 # Query # # use `test`; ROLLBACK
+drop trigger trg_del_t2;
+drop table t1,t2,t3,t4,t5;
+drop function bug27417;
+set @@session.binlog_format=@@global.binlog_format;
end of tests
diff --git a/mysql-test/suite/binlog/t/binlog_database.test b/mysql-test/suite/binlog/t/binlog_database.test
new file mode 100644
index 00000000000..ee236b4e5ea
--- /dev/null
+++ b/mysql-test/suite/binlog/t/binlog_database.test
@@ -0,0 +1,12 @@
+# A wrapper to test that dropping a database is binlogged
+# correctly. We test all three modes in the same file to avoid
+# unecessary server restarts.
+
+set binlog_format=statement;
+source extra/binlog_tests/database.test;
+set binlog_format=mixed;
+source extra/binlog_tests/database.test;
+set binlog_format=row;
+source extra/binlog_tests/database.test;
+
+show databases;
diff --git a/mysql-test/suite/binlog/t/binlog_killed.test b/mysql-test/suite/binlog/t/binlog_killed.test
index 6c0b4b46a4e..e5f7288b17c 100644
--- a/mysql-test/suite/binlog/t/binlog_killed.test
+++ b/mysql-test/suite/binlog/t/binlog_killed.test
@@ -55,194 +55,277 @@ enable_result_log;
select @result /* must be zero either way */;
-# the functions are either *insensitive* to killing or killing can cause
-# strange problmes with the error propagation out of SF's stack
-# Bug#27563, Bug#27565, BUG#24971
-#
-# TODO: use if's block as regression test for the bugs or remove
-#
-if (0)
-{
-delimiter |;
-create function bug27563()
-RETURNS int(11)
-DETERMINISTIC
-begin
- select get_lock("a", 10) into @a;
- return 1;
-end|
-delimiter ;|
-# the function is sensitive to killing requiring innodb though with wrong client error
-# TO FIX in BUG#27565; TODO: remove --error 1105 afterwards
-delimiter |;
-create function bug27565()
-RETURNS int(11)
-DETERMINISTIC
-begin
- select a from t1 where a=1 into @a for update;
- return 1;
-end|
-delimiter ;|
+--remove_file $MYSQLTEST_VARDIR/tmp/kill_query_calling_sp.binlog
+connection con1;
+select RELEASE_LOCK("a");
-reset master;
+#
+# bug#27571 asynchronous setting mysql_`query`::error and Query_log_e::error_code
+#
+# checking that killing inside of select loops is safe as before
+# killing after the loop can be only simulated - another test
-### ta table case: killing causes rollback
+delete from t1;
+delete from t2;
+insert into t1 values (1,1),(2,2);
-# A. autocommit ON
+#
+# simple update
+#
connection con1;
-select get_lock("a", 20);
+begin; update t1 set b=11 where a=2;
connection con2;
let $ID= `select connection_id()`;
-send insert into t1 values (bug27563(),1);
+begin;
+send update t1 set b=b+10;
connection con1;
+--replace_result $ID ID
eval kill query $ID;
+rollback;
+
+# Bug #32148 killi query may be ineffective
+# forced to comment out the test's outcome
+# and mask out ineffective ER_QUERY_INTERRUPTED
+# todo1: revert back upon fixing bug#32148
+# todo2: the tests need refining in that
+# killing should wait till the victim requested
+# its lock (wait_condition available in 5.1 tests)
connection con2;
-# todo (re-record test): after bugs 27563,27565 got fixed affected rows will report zero
---enable_info
-# todo: remove 0 return after fixing Bug#27563
--error 0,ER_QUERY_INTERRUPTED
-reap; ### pb: wrong error
---disable_info
-###--replace_column 2 # 5 #
-### show binlog events from 98 /* nothing in binlog unless Bug#27563 */;
-show master status /* must be only FD event unless Bug#27563 */;
-select count(*) from t1 /* must be zero unless Bug#27563 */;
-
-# M. multi-statement-ta
+reap;
+rollback;
+select * from t1 order by a /* must be the same as before (1,1),(2,2) */;
+
+#
+# multi update
+# commented out as Bug #31807 multi-update,delete killing does not report with ER_QUERY_INTERRUPTED
+# in the way
+#
+# connection con1;
+# begin; update t1 set b=b+10;
+
+# connection con2;
+# send update t1 as t_1,t1 as t_2 set t_1.b=11 where t_2.a=2;
+
+# connection con1;
+# --replace_result $ID ID
+# eval kill query $ID;
+# rollback;
+
+# disable_abort_on_error;
+
+# connection con2;
+# --error HY000,ER_QUERY_INTERRUPTED
+# reap;
+# select * from t1 /* must be the same as before (1,1),(2,2) */;
+
+# enable_abort_on_error;
+#
+# simple delete
+#
+connection con1;
+begin; delete from t1 where a=2;
+
connection con2;
let $ID= `select connection_id()`;
begin;
-send insert into t1 values (bug27563(),1);
+send delete from t1 where a=2;
connection con1;
+--replace_result $ID ID
eval kill query $ID;
+rollback;
+
connection con2;
-# todo (re-record test): after bugs 27563,27565 got fixed affected rows will report zero
---enable_info
-# todo: remove 0 return after fixing Bug#27563
--error 0,ER_QUERY_INTERRUPTED
reap;
---disable_info
-select count(*) from t1 /* must be zero unless Bug#27563 */;
-commit;
+rollback;
+# todo1,2 above
+select * from t1 order by a /* must be the same as before (1,1),(2,2) */;
-### non-ta table case: killing must be recorded in binlog
+#
+# multi delete
+# the same as for multi-update
+#
+# connection con1;
+# begin; delete from t1 where a=2;
-reset master;
+# connection con2;
+# send delete t1 from t1 where t1.a=2;
+
+# connection con1;
+# --replace_result $ID ID
+# eval kill query $ID;
+# rollback;
+
+# connection con2;
+# --error 0,ER_QUERY_INTERRUPTED
+# reap;
+# select * from t1 /* must be the same as before (1,1),(2,2) */;
+#
+# insert select
+#
+connection con1;
+--disable_warnings
+drop table if exists t4;
+--enable_warnings
+create table t4 (a int, b int) engine=innodb;
+insert into t4 values (3, 3);
+begin; insert into t1 values (3, 3);
connection con2;
let $ID= `select connection_id()`;
-send insert into t2 values (bug27563(),1);
+begin;
+send insert into t1 select * from t4 for update;
connection con1;
+--replace_result $ID ID
eval kill query $ID;
+rollback;
connection con2;
-# todo: remove 0 return after fixing Bug#27563
--error 0,ER_QUERY_INTERRUPTED
reap;
-select count(*) from t2 /* must be one */;
-#show binlog events from 98 /* must have the insert on non-ta table */;
-show master status /* must have the insert event more to FD */;
-# the value of the error flag of KILLED_QUERY is tested further
+# todo 1,2 above
+rollback;
+select * from t1 /* must be the same as before (1,1),(2,2) */;
-connection con1;
-select RELEASE_LOCK("a");
+drop table t4; # cleanup for the sub-case
-### test with effective killing of SF()
+###
+## non-ta table case: killing must be recorded in binlog
+###
+create table t4 (a int, b int) ENGINE=MyISAM /* for killing update and delete */;
-delete from t1;
-delete from t2;
-insert into t1 values (1,1);
-insert into t2 values (1,1);
+delimiter |;
+create function bug27563(n int)
+RETURNS int(11)
+DETERMINISTIC
+begin
+ if @b > 0 then
+ select get_lock("a", 20) into @a;
+ else
+ set @b= 1;
+ end if;
+ return n;
+end|
+delimiter ;|
+
+#
+# update
+#
-#
-# Bug#27565
-# test where KILL is propagated as error to the top level
-# still another bug with the error message to the user
-# todo: fix reexecute the result file after fixing
-#
-begin; update t1 set b=0 where a=1;
+delete from t4;
+insert into t4 values (1,1), (1,1);
+reset master;
+connection con1;
+select get_lock("a", 20);
connection con2;
let $ID= `select connection_id()`;
-send update t2 set b=bug27565()-1 where a=1;
+set @b= 0;
+send update t4 set b=b + bug27563(b);
connection con1;
+let $wait_condition= select count(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST where state='User lock';
+source include/wait_condition.inc;
+select count(*) FROM INFORMATION_SCHEMA.PROCESSLIST where state='User lock';
+
+--replace_result $ID ID
eval kill query $ID;
-commit;
connection con2;
-# todo: fix Bug #27565 killed query of SF() is not reported correctly and
-# remove 1105 (wrong)
-#--error ER_QUERY_INTERRUPTED
---error 1105,ER_QUERY_INTERRUPTED
-reap; ### pb: wrong error
-select * from t1 /* must be: (1,0) */;
-select * from t2 /* must be as before: (1,1) */;
+--error ER_QUERY_INTERRUPTED
+reap;
+select * from t4 order by b /* must be (1,1), (1,2) */;
+select @b /* must be 1 at the end of a stmt calling bug27563() */;
+--echo must have the update query event more to FD
+source include/show_binlog_events.inc;
-## bug#22725 with effective and propagating killing
-#
-# top-level ta-table
+# a proof the query is binlogged with an error
+
+--exec $MYSQL_BINLOG --start-position=106 $MYSQLTEST_VARDIR/log/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+eval select
+(@a:=load_file("$MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
+is not null;
+--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
+let $error_code= `select @a like "%#%error_code=0%" /* must return 0*/`;
+eval select $error_code /* must return 0 to mean the killed query is in */;
+
+# cleanup for the sub-case
connection con1;
-delete from t3;
+select RELEASE_LOCK("a");
+--remove_file $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog
+
+#
+# delete
+#
+
+delete from t4;
+insert into t4 values (1,1), (2,2);
reset master;
-begin; update t1 set b=0 where a=1;
+connection con1;
+select get_lock("a", 20);
connection con2;
let $ID= `select connection_id()`;
-# the query won't perform completely since the function gets interrupted
-send insert into t3 values (0,0),(1,bug27565());
+set @b= 0;
+send delete from t4 where b=bug27563(1) or b=bug27563(2);
connection con1;
+let $wait_condition= select count(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST where state='User lock';
+source include/wait_condition.inc;
+select count(*) FROM INFORMATION_SCHEMA.PROCESSLIST where state='User lock';
+--replace_result $ID ID
eval kill query $ID;
-rollback;
connection con2;
-# todo: fix Bug #27565 killed query of SF() is not reported correctly and
-# remove 1105 (wrong)
-#--error ER_QUERY_INTERRUPTED
---error 1105,ER_QUERY_INTERRUPTED
-reap; ### pb: wrong error
-select count(*) from t3 /* must be zero */;
-show master status /* nothing in binlog */;
-
-# top-level non-ta-table
-connection con1;
-delete from t2;
-reset master;
-begin; update t1 set b=0 where a=1;
+--error ER_QUERY_INTERRUPTED
+reap;
+select count(*) from t4 /* must be 1 */;
+select @b /* must be 1 at the end of a stmt calling bug27563() */;
+--echo must have the delete query event more to FD
+source include/show_binlog_events.inc;
-connection con2;
-let $ID= `select connection_id()`;
-# the query won't perform completely since the function gets intrurrupted
-send insert into t2 values (0,0),(1,bug27565()) /* non-ta t2 */;
+# a proof the query is binlogged with an error
+
+--exec $MYSQL_BINLOG --start-position=106 $MYSQLTEST_VARDIR/log/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+eval select
+(@a:=load_file("$MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
+is not null;
+--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
+let $error_code= `select @a like "%#%error_code=0%" /* must return 0*/`;
+eval select $error_code /* must return 0 to mean the killed query is in */;
+# cleanup for the sub-case
connection con1;
-eval kill query $ID;
-rollback;
+select RELEASE_LOCK("a");
+--remove_file $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog
-connection con2;
-# todo: fix Bug #27565 killed query of SF() is not reported correctly and
-# remove 1105 (wrong)
-#--error ER_QUERY_INTERRUPTED
---error 1105,ER_QUERY_INTERRUPTED
-reap; ### pb: wrong error
+drop table t4;
-select count(*) from t2 /* count must be one */;
-show master status /* insert into non-ta must be in binlog */;
+#
+# load data - see simulation tests
+#
+
+
+# bug#27571 cleanup
drop function bug27563;
-drop function bug27565;
-}
-system rm $MYSQLTEST_VARDIR/tmp/kill_query_calling_sp.binlog ;
+
+#
+# common cleanup
+#
drop table t1,t2,t3;
+--echo end of the tests
diff --git a/mysql-test/suite/binlog/t/binlog_killed_simulate-master.opt b/mysql-test/suite/binlog/t/binlog_killed_simulate-master.opt
new file mode 100644
index 00000000000..90c70ecee29
--- /dev/null
+++ b/mysql-test/suite/binlog/t/binlog_killed_simulate-master.opt
@@ -0,0 +1 @@
+--loose-debug=d,simulate_kill_bug27571
diff --git a/mysql-test/suite/binlog/t/binlog_killed_simulate.test b/mysql-test/suite/binlog/t/binlog_killed_simulate.test
new file mode 100644
index 00000000000..2121a90dc8c
--- /dev/null
+++ b/mysql-test/suite/binlog/t/binlog_killed_simulate.test
@@ -0,0 +1,69 @@
+-- source include/have_debug.inc
+-- source include/have_binlog_format_mixed_or_statement.inc
+#
+# bug#27571 asynchronous setting mysql_$query()'s local error and
+# Query_log_event::error_code
+#
+
+--disable_warnings
+drop table if exists t1,t2;
+--enable_warnings
+
+#
+# Checking that killing upon successful row-loop does not affect binlogging
+#
+
+create table t1 (a int) engine=MyISAM;
+insert into t1 set a=1;
+reset master;
+
+update t1 set a=2 /* will be "killed" after work has been done */;
+
+# a proof the query is binlogged with no error
+#todo: introduce a suite private macro that provides numeric values
+# for some constants like the offset of the first real event
+# that is different between severs versions.
+--exec $MYSQL_BINLOG --start-position=106 $MYSQLTEST_VARDIR/log/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+eval select
+(@a:=load_file("$MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
+is not null;
+--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
+let $error_code= `select @a like "%#%error_code=0%" /* must return 1 */`;
+eval select $error_code /* must return 1 as query completed before got killed*/;
+
+# cleanup for the sub-case
+system rm $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog;
+
+
+#
+# Checking that killing inside of row-loop for LOAD DATA into
+# non-transactional table affects binlogging
+#
+
+create table t2 (a int, b int) ENGINE=MyISAM;
+reset master;
+--error ER_QUERY_INTERRUPTED
+load data infile '../std_data_ln/rpl_loaddata.dat' into table t2 /* will be "killed" in the middle */;
+
+
+# a proof the query is binlogged with an error
+
+source include/show_binlog_events.inc;
+
+--exec $MYSQL_BINLOG --start-position=98 $MYSQLTEST_VARDIR/log/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+eval select
+(@a:=load_file("$MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
+is not null;
+--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
+let $error_code= `select @a like "%#%error_code=0%" /* must return 0*/`;
+eval select $error_code /* must return 0 to mean the killed query is in */;
+
+# cleanup for the sub-case
+system rm $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog;
+
+
+drop table t1,t2;
+
+--echo end of the tests
diff --git a/mysql-test/suite/binlog/t/binlog_row_mix_innodb_myisam.test b/mysql-test/suite/binlog/t/binlog_row_mix_innodb_myisam.test
index 7b7753a487e..3148cc50fd0 100644
--- a/mysql-test/suite/binlog/t/binlog_row_mix_innodb_myisam.test
+++ b/mysql-test/suite/binlog/t/binlog_row_mix_innodb_myisam.test
@@ -31,3 +31,5 @@ eval select
@a like "%#%error_code=0%ROLLBACK/*!*/;%ROLLBACK /* added by mysqlbinlog */;%",
@a not like "%#%error_code=%error_code=%";
drop table t1, t2;
+
+-- source extra/binlog_tests/mix_innodb_myisam_side_effects.test
diff --git a/mysql-test/suite/binlog/t/binlog_stm_mix_innodb_myisam.test b/mysql-test/suite/binlog/t/binlog_stm_mix_innodb_myisam.test
index 1815f3deb34..e7149e03b87 100644
--- a/mysql-test/suite/binlog/t/binlog_stm_mix_innodb_myisam.test
+++ b/mysql-test/suite/binlog/t/binlog_stm_mix_innodb_myisam.test
@@ -24,123 +24,9 @@ eval select
drop table t1, t2;
-#
-# Bug #27417 thd->no_trans_update.stmt lost value inside of SF-exec-stack
-# bug #28960 non-trans temp table changes with insert .. select
-# not binlogged after rollback
-#
-# testing appearence of insert into temp_table in binlog.
-# There are two branches of execution that require different setup.
+set @@session.binlog_format=statement;
+-- source extra/binlog_tests/mix_innodb_myisam_side_effects.test
+set @@session.binlog_format=@@global.binlog_format;
-## send_eof() branch
-
-# prepare
-
-create table tt (a int unique);
-create table ti (a int) engine=innodb;
-reset master;
-show master status;
-
-# action
-
-begin;
-insert into ti values (1);
-insert into ti values (2) ;
-insert into tt select * from ti;
-rollback;
-
-# check
-
-select count(*) from tt /* 2 */;
-show master status;
---replace_column 2 # 5 #
-show binlog events from 106;
-select count(*) from ti /* zero */;
-insert into ti select * from tt;
-select * from ti /* that is what slave would miss - a bug */;
-
-
-## send_error() branch
-delete from ti;
-delete from tt where a=1;
-reset master;
-show master status;
-
-# action
-
-begin;
-insert into ti values (1);
-insert into ti values (2) /* to make the dup error in the following */;
---error ER_DUP_ENTRY
-insert into tt select * from ti /* one affected and error */;
-rollback;
-
-# check
-
-show master status;
---replace_column 2 # 5 #
-show binlog events from 106;
-select count(*) from ti /* zero */;
-insert into ti select * from tt;
-select * from tt /* that is what otherwise slave missed - the bug */;
-
-drop table ti,tt;
-
-
-#
-# Bug #27417 thd->no_trans_update.stmt lost value inside of SF-exec-stack
-#
-# Testing asserts: if there is a side effect of modifying non-transactional
-# table thd->no_trans_update.stmt must be TRUE;
-# the assert is active with debug build
-#
-
---disable_warnings
-drop function if exists bug27417;
-drop table if exists t1,t2;
---enable_warnings
-# side effect table
-CREATE TABLE t1 (a int NOT NULL auto_increment primary key) ENGINE=MyISAM;
-# target tables
-CREATE TABLE t2 (a int NOT NULL auto_increment, PRIMARY KEY (a));
-
-delimiter |;
-create function bug27417(n int)
-RETURNS int(11)
-begin
- insert into t1 values (null);
- return n;
-end|
-delimiter ;|
-
-reset master;
-
-# execute
-
-insert into t2 values (bug27417(1));
-insert into t2 select bug27417(2);
-reset master;
-
---error ER_DUP_ENTRY
-insert into t2 values (bug27417(2));
-#TODO: Andrei: enable this test after 23333 is pushed
-#show master status; /* only (!) with fixes for #23333 will show there is the query */;
-select count(*) from t1 /* must be 3 */;
-
-reset master;
-select count(*) from t2;
-delete from t2 where a=bug27417(3);
-select count(*) from t2 /* nothing got deleted */;
-#TODO: Andrei: enable this test after 23333 is pushed
-#show master status; /* the query must be in regardless of #23333 */;
-select count(*) from t1 /* must be 5 */;
-
---enable_info
-delete t2 from t2 where t2.a=bug27417(100) /* must not affect t2 */;
---disable_info
-select count(*) from t1 /* must be 7 */;
-
-drop function bug27417;
-drop table t1,t2;
--echo end of tests
diff --git a/mysql-test/suite/binlog/t/disabled.def b/mysql-test/suite/binlog/t/disabled.def
index 888298bbb09..a6e73fa31d8 100644
--- a/mysql-test/suite/binlog/t/disabled.def
+++ b/mysql-test/suite/binlog/t/disabled.def
@@ -9,3 +9,4 @@
# Do not use any TAB characters for whitespace.
#
##############################################################################
+binlog_multi_engine : Bug#32663 binlog_multi_engine.test fails randomly
diff --git a/mysql-test/suite/funcs_1/datadict/datadict_master.inc b/mysql-test/suite/funcs_1/datadict/datadict_master.inc
index ee94f7cb318..73a23d6d377 100644
--- a/mysql-test/suite/funcs_1/datadict/datadict_master.inc
+++ b/mysql-test/suite/funcs_1/datadict/datadict_master.inc
@@ -199,7 +199,7 @@ select s.catalog_name, s.schema_name, s.default_character_set_name,
--source suite/funcs_1/datadict/datadict_bug_12777.inc
select * from columns;
select * from character_sets;
-select sum(id) from collations;
+select sum(id) from collations where collation_name <> 'utf8_general_cs';
select collation_name, character_set_name into @x,@y
from collation_character_set_applicability limit 1;
select @x, @y;
@@ -1660,13 +1660,14 @@ connect (u_6_401017, localhost, u_6_401017, , test);
use information_schema;
-select * from collation_character_set_applicability;
+select * from collation_character_set_applicability
+where collation_name <> 'utf8_general_cs';
select * from schemata;
select table_name from tables;
--source suite/funcs_1/datadict/datadict_bug_12777.inc
select table_name, column_name, column_type from columns;
select character_set_name from character_sets;
-select collation_name from collations;
+select collation_name from collations where collation_name <> 'utf8_general_cs';
select routine_name, routine_type from routines;
select table_name, index_name from statistics;
select table_name from views;
@@ -1926,7 +1927,7 @@ let $message= Testcase 3.2.3.2:;
# the USAGE privilege.
################################################################################
-SELECT * FROM collations;
+SELECT * FROM collations where collation_name <> 'utf8_general_cs';
# -------------------------------------------------------------------------------------------------------
let $message= Testcase 3.2.3.3:;
@@ -1973,7 +1974,8 @@ let $message= Testcase 3.2.4.2:;
# and update with expected results afterwards.
################################################################################
-SELECT * FROM collation_character_set_applicability;
+SELECT * FROM collation_character_set_applicability
+where collation_name <> 'utf8_general_cs';
# -------------------------------------------------------------------------------------------------------
let $message= Testcase 3.2.4.3:;
diff --git a/mysql-test/suite/funcs_1/datadict/datadict_priv.inc b/mysql-test/suite/funcs_1/datadict/datadict_priv.inc
index 36143e1526e..8256b51949e 100644
--- a/mysql-test/suite/funcs_1/datadict/datadict_priv.inc
+++ b/mysql-test/suite/funcs_1/datadict/datadict_priv.inc
@@ -103,5 +103,8 @@ eval CREATE TABLE new_$table AS SELECT * FROM $table;
--error ER_DBACCESS_DENIED_ERROR
DROP DATABASE information_schema;
---error ER_DBACCESS_DENIED_ERROR
+--error ER_PARSE_ERROR
RENAME DATABASE information_schema TO info_schema;
+
+--error ER_DBACCESS_DENIED_ERROR
+ALTER DATABASE information_schema UPGRADE DATA DIRECTORY NAME;
diff --git a/mysql-test/suite/funcs_1/datadict/datadict_show_schema.inc b/mysql-test/suite/funcs_1/datadict/datadict_show_schema.inc
index 260119f030f..35060cefbf8 100644
--- a/mysql-test/suite/funcs_1/datadict/datadict_show_schema.inc
+++ b/mysql-test/suite/funcs_1/datadict/datadict_show_schema.inc
@@ -35,8 +35,9 @@ eval select table_name, index_schema, index_name, index_type
where table_schema like '$dbname%';
--replace_result $SERVER_NAME <SERVER_NAME>
+--sorted_result
eval select *
- from information_schema.user_privileges order by grantee, privilege_type;
+ from information_schema.user_privileges;
# where grantee="'u_6_401013'@'%'";
eval select *
diff --git a/mysql-test/suite/funcs_1/datadict/datadict_tables.inc b/mysql-test/suite/funcs_1/datadict/datadict_tables.inc
index 14e39c083b0..9712f0a9c1c 100644
--- a/mysql-test/suite/funcs_1/datadict/datadict_tables.inc
+++ b/mysql-test/suite/funcs_1/datadict/datadict_tables.inc
@@ -28,8 +28,8 @@ eval $dd_part1 tables $dd_part2;
--source suite/funcs_1/datadict/datadict_bug_12777.inc
eval $dd_part1 columns $dd_part2;
eval $dd_part1 character_sets $dd_part2;
-eval $dd_part1 collations $dd_part2;
-eval $dd_part1 collation_character_set_applicability $dd_part2;
+eval $dd_part1 collations where collation_name <> 'utf8_general_cs' $dd_part2;
+eval $dd_part1 collation_character_set_applicability where collation_name <> 'utf8_general_cs' $dd_part2;
--replace_column 16 <Created> 17 <Last_Altered>
eval $dd_part1 routines $dd_part2;
eval $dd_part1 statistics $dd_part2;
diff --git a/mysql-test/suite/funcs_1/datadict/processlist_val.inc b/mysql-test/suite/funcs_1/datadict/processlist_val.inc
index da2c2950095..62e5d95f875 100644
--- a/mysql-test/suite/funcs_1/datadict/processlist_val.inc
+++ b/mysql-test/suite/funcs_1/datadict/processlist_val.inc
@@ -94,14 +94,25 @@ connect (ddicttestuser1,localhost,ddicttestuser1,ddictpass,information_schema);
--echo ----- switch to connection default (user = root) -----
connection default;
# - We have now a second connection.
-# - important values in second connection
+# First working phase for this connection is "Connect".
+# This is a very short phase and the likelihood to meet it is
+# - nearly zero on average boxes with low parallel load
+# - around some percent on weak or overloaded boxes
+# (Bug#32153 Status output differs - scheduling ?)
+# Therefore we poll till we reach the long lasting phase with:
# - USER = ddicttestuser1
# - HOST = 'localhost'
# - DB = 'information_schema'
# - Command = 'Sleep'
-# - TIME = 0, I hope the testing machines are all time fast enough
+# - TIME >= 0 Overloaded boxes can cause that we do not hit TIME = 0.
# - State IS NULL
# - INFO must be empty
+#
+let $wait_condition= SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST
+ WHERE COMMAND = 'Sleep' AND TIME > 0;
+--source include/wait_condition.inc
+#
+# Expect to hit TIME = 1.
--replace_column 1 <ID>
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
# Change the SQL command (affects content of INFO)
@@ -109,25 +120,19 @@ SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
SHOW FULL PROCESSLIST;
#
--echo # Sleep some time
-# The value of TIME must increase after some sleeps.
-# So poll till TIME changes.
-let $run= 10;
-while ($run)
-{
- dec $run;
- if (`SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST
- WHERE ID = @my_proclist_id + 1 AND TIME > 0`)
- {
- let $run= 0;
- }
- --real_sleep 0.2
-}
-# Either we have now reached TIME = 1 or we fail with unexpected result.
-# Expect to see now TIME = 1
+# The value of TIME must increase and reach 2 after some sleeps.
+let $wait_timeout= 2;
+let $wait_condition= SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST
+ WHERE TIME > 1;
+--source include/wait_condition.inc
+#
+# Expect to hit TIME = 2.
--replace_column 1 <ID>
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
--replace_column 1 <ID>
SHOW FULL PROCESSLIST;
+#
+#
# The second connection must have an ID = my ID + 1;
SELECT ID = @my_proclist_id + 1 FROM INFORMATION_SCHEMA.PROCESSLIST
WHERE USER = 'ddicttestuser1';
@@ -150,6 +155,12 @@ SHOW FULL PROCESSLIST;
--echo
--echo ----- establish connection con2 (user = ddicttestuser1) ------
connect (con2,localhost,ddicttestuser1,ddictpass,information_schema);
+#
+# If the testing box is under heavy load we might see connection ddicttestuser1
+# within the short phase INFO = 'SHOW FULL PROCESSLIST' and STATE = 'Writing to net'.
+let $wait_condition= SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST
+ WHERE COMMAND = 'Sleep';
+--source include/wait_condition.inc
--replace_column 1 <ID> 6 <TIME>
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
--replace_column 1 <ID> 6 <TIME>
@@ -183,24 +194,17 @@ connection default;
# - USER = ddicttestuser1
# - HOST = 'localhost'
# - DB = 'information_schema'
-# - Command = 'Query'
+# - Command = 'Query'(run without --ps-protocol)/'Execute' (run --ps-protocol)
# - TIME = 1, Attention: check with TIME = 0 is not stable
# - State IS NULL
# - INFO = "SELECT sleep(2.5),'Command time'"
--echo # Sleep some time
-# The command must be at some time in work by the server.
+# The command must be after some time in work by the server.
# So poll till INFO is no more NULL and TIME > 0.
-let $run= 10;
-while ($run)
-{
- dec $run;
- if (`SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST
- WHERE INFO IS NOT NULL AND TIME > 0`)
- {
- let $run= 0;
- }
- --real_sleep 0.2
-}
+let $wait_condition= SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST
+ WHERE INFO IS NOT NULL AND TIME > 0;
+--source include/wait_condition.inc
+#
# Expect to see TIME = 1
--replace_column 1 <ID>
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
@@ -208,20 +212,13 @@ SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
SHOW FULL PROCESSLIST;
#
--echo # Sleep some time
-# The value of TIME must increase after some sleeps therefore
-# poll till TIME changes
-let $run= 10;
-while ($run)
-{
- dec $run;
- if (`SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST
- WHERE ID = @my_proclist_id + 1 AND TIME > 1`)
- {
- let $run= 0;
- }
- --real_sleep 0.2
-}
-# Either we have now reached TIME = 2 or we fail with unexpected result.
+# The value of TIME must increase and reach 2 after some sleeps.
+let $wait_timeout= 2;
+let $wait_condition= SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST
+ WHERE TIME > 1;
+--source include/wait_condition.inc
+#
+# Expect to see TIME = 2
--replace_column 1 <ID>
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
--replace_column 1 <ID>
@@ -248,19 +245,14 @@ send SELECT sleep(2),'BEGIN this is the representative of a very long statement.
--echo ----- switch to connection default (user = root) -----
connection default;
--echo # Sleep some time
-# The command must be at some time in work by the server.
-# So poll till INFO is no more NULL.
-let $run= 10;
-while ($run)
-{
- dec $run;
- if (`SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST
- WHERE INFO IS NOT NULL`)
- {
- let $run= 0;
- }
- --real_sleep 0.2
-}
+# The command must be after some time in work by the server.
+# There is a short phase with STATE IS NULL followed by a longer phase
+# with STATE = 'init'.
+# So poll till INFO is no more NULL AND STATE = 'init'.
+let $wait_condition= SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST
+ WHERE INFO IS NOT NULL AND STATE = 'init';
+--source include/wait_condition.inc
+#
# Expect to see that SELECT/SHOW PROCESSLIST can handle my statement monster.
--replace_column 1 <ID> 6 <TIME>
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
@@ -295,19 +287,12 @@ send SELECT COUNT(*) FROM test.t1;
--echo ----- switch to connection default (user = root) -----
connection default;
--echo # Sleep some time
-# The command must be at some time in work by the server.
+# The command must be after some time in work by the server.
# So poll till INFO is no more NULL.
-let $run= 10;
-while ($run)
-{
- dec $run;
- if (`SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST
- WHERE INFO IS NOT NULL`)
- {
- let $run= 0;
- }
- --real_sleep 0.2
-}
+let $wait_condition= SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST
+ WHERE INFO IS NOT NULL AND STATE = 'Locked';
+--source include/wait_condition.inc
+#
# Expect to see the state 'Locked' for the second connection because the SELECT
# collides with the WRITE TABLE LOCK.
--replace_column 1 <ID> 6 <TIME>
diff --git a/mysql-test/suite/funcs_1/r/a_processlist_priv_no_prot.result b/mysql-test/suite/funcs_1/r/a_processlist_priv_no_prot.result
index 13055b5543b..233544ec134 100644
--- a/mysql-test/suite/funcs_1/r/a_processlist_priv_no_prot.result
+++ b/mysql-test/suite/funcs_1/r/a_processlist_priv_no_prot.result
@@ -84,6 +84,8 @@ ERROR 42S02: Unknown table 'new_processlist' in information_schema
DROP DATABASE information_schema;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
RENAME DATABASE information_schema TO info_schema;
+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 'DATABASE information_schema TO info_schema' at line 1
+ALTER DATABASE information_schema UPGRADE DATA DIRECTORY NAME;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
####################################################################################
3 Switch to connection con100 (user=ddicttestuser1 with no PROCESS privilege):
@@ -149,6 +151,8 @@ ERROR 42S02: Unknown table 'new_processlist' in information_schema
DROP DATABASE information_schema;
ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema'
RENAME DATABASE information_schema TO info_schema;
+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 'DATABASE information_schema TO info_schema' at line 1
+ALTER DATABASE information_schema UPGRADE DATA DIRECTORY NAME;
ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema'
####################################################################################
4 Grant PROCESS privilege to ddicttestuser1
diff --git a/mysql-test/suite/funcs_1/r/a_processlist_val_no_prot.result b/mysql-test/suite/funcs_1/r/a_processlist_val_no_prot.result
index 9a7c9805b66..967c157f535 100644
--- a/mysql-test/suite/funcs_1/r/a_processlist_val_no_prot.result
+++ b/mysql-test/suite/funcs_1/r/a_processlist_val_no_prot.result
@@ -45,21 +45,21 @@ SELECT ID INTO @my_proclist_id FROM INFORMATION_SCHEMA.PROCESSLIST;
----- switch to connection default (user = root) -----
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
ID USER HOST DB COMMAND TIME STATE INFO
-<ID> ddicttestuser1 localhost information_schema Sleep 0 NULL
+<ID> ddicttestuser1 localhost information_schema Sleep 1 NULL
<ID> root localhost information_schema Query 0 preparing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
SHOW FULL PROCESSLIST;
Id User Host db Command Time State Info
<ID> root localhost information_schema Query 0 NULL SHOW FULL PROCESSLIST
-<ID> ddicttestuser1 localhost information_schema Sleep 0 NULL
+<ID> ddicttestuser1 localhost information_schema Sleep 1 NULL
# Sleep some time
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
ID USER HOST DB COMMAND TIME STATE INFO
-<ID> ddicttestuser1 localhost information_schema Sleep 1 NULL
+<ID> ddicttestuser1 localhost information_schema Sleep 2 NULL
<ID> root localhost information_schema Query 0 preparing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
SHOW FULL PROCESSLIST;
Id User Host db Command Time State Info
<ID> root localhost information_schema Query 0 NULL SHOW FULL PROCESSLIST
-<ID> ddicttestuser1 localhost information_schema Sleep 1 NULL
+<ID> ddicttestuser1 localhost information_schema Sleep 2 NULL
SELECT ID = @my_proclist_id + 1 FROM INFORMATION_SCHEMA.PROCESSLIST
WHERE USER = 'ddicttestuser1';
ID = @my_proclist_id + 1
diff --git a/mysql-test/suite/funcs_1/r/b_processlist_priv_ps.result b/mysql-test/suite/funcs_1/r/b_processlist_priv_ps.result
index b10a6c1a5d2..c37d47eaf97 100644
--- a/mysql-test/suite/funcs_1/r/b_processlist_priv_ps.result
+++ b/mysql-test/suite/funcs_1/r/b_processlist_priv_ps.result
@@ -84,6 +84,8 @@ ERROR 42S02: Unknown table 'new_processlist' in information_schema
DROP DATABASE information_schema;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
RENAME DATABASE information_schema TO info_schema;
+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 'DATABASE information_schema TO info_schema' at line 1
+ALTER DATABASE information_schema UPGRADE DATA DIRECTORY NAME;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
####################################################################################
3 Switch to connection con100 (user=ddicttestuser1 with no PROCESS privilege):
@@ -149,6 +151,8 @@ ERROR 42S02: Unknown table 'new_processlist' in information_schema
DROP DATABASE information_schema;
ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema'
RENAME DATABASE information_schema TO info_schema;
+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 'DATABASE information_schema TO info_schema' at line 1
+ALTER DATABASE information_schema UPGRADE DATA DIRECTORY NAME;
ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema'
####################################################################################
4 Grant PROCESS privilege to ddicttestuser1
diff --git a/mysql-test/suite/funcs_1/r/b_processlist_val_ps.result b/mysql-test/suite/funcs_1/r/b_processlist_val_ps.result
index db0a7750077..b4d8095125a 100644
--- a/mysql-test/suite/funcs_1/r/b_processlist_val_ps.result
+++ b/mysql-test/suite/funcs_1/r/b_processlist_val_ps.result
@@ -45,21 +45,21 @@ SELECT ID INTO @my_proclist_id FROM INFORMATION_SCHEMA.PROCESSLIST;
----- switch to connection default (user = root) -----
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
ID USER HOST DB COMMAND TIME STATE INFO
-<ID> ddicttestuser1 localhost information_schema Sleep 0 NULL
+<ID> ddicttestuser1 localhost information_schema Sleep 1 NULL
<ID> root localhost information_schema Execute 0 preparing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
SHOW FULL PROCESSLIST;
Id User Host db Command Time State Info
<ID> root localhost information_schema Query 0 NULL SHOW FULL PROCESSLIST
-<ID> ddicttestuser1 localhost information_schema Sleep 0 NULL
+<ID> ddicttestuser1 localhost information_schema Sleep 1 NULL
# Sleep some time
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
ID USER HOST DB COMMAND TIME STATE INFO
-<ID> ddicttestuser1 localhost information_schema Sleep 1 NULL
+<ID> ddicttestuser1 localhost information_schema Sleep 2 NULL
<ID> root localhost information_schema Execute 0 preparing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
SHOW FULL PROCESSLIST;
Id User Host db Command Time State Info
<ID> root localhost information_schema Query 0 NULL SHOW FULL PROCESSLIST
-<ID> ddicttestuser1 localhost information_schema Sleep 1 NULL
+<ID> ddicttestuser1 localhost information_schema Sleep 2 NULL
SELECT ID = @my_proclist_id + 1 FROM INFORMATION_SCHEMA.PROCESSLIST
WHERE USER = 'ddicttestuser1';
ID = @my_proclist_id + 1
diff --git a/mysql-test/suite/funcs_1/r/innodb__datadict.result b/mysql-test/suite/funcs_1/r/innodb__datadict.result
index 4ac0f2e16ea..76e699614c8 100644
--- a/mysql-test/suite/funcs_1/r/innodb__datadict.result
+++ b/mysql-test/suite/funcs_1/r/innodb__datadict.result
@@ -10,8 +10,9 @@
. *__datadict.test are started. This can be a result of showing e.g. maximum
. values of the number of rows of tables.
.
-. This .result file has been checked OK with Linux 5.0.23-bk,
-. ChangeSet@1.2211, 2006-06-28 10:11:43-07:00.
+. This .result file has been checked OK with Linux 5.0.48,
+. build tree ChangeSet@1.2477.6.3, 2007-07-30
+. except that the not fixed Bug#30020 causes a difference.
.
--------------------------------------------------------------------------------
@@ -20,11 +21,21 @@ FIXME: There are subtests that are switched off due to known bugs:
SELECT 1 AS "have_bug_11589";
have_bug_11589
1
+SELECT 1 AS "have_bug_30689";
+have_bug_30689
+1
There are some statements where the ps-protocol is switched off.
This may come from the bug listed below, ir from other problems.
Bug#11589: mysqltest, --ps-protocol, strange output, float/double/real with zerofill
--------------------------------------------------------------------------------
+
+Selects on INFORMATION_SCHEMA.VIEWS present incomplete
+content for the column VIEW_DEFINITION in cases where
+the view selects(=is based) on an INFORMATION_SCHEMA table.
+---> VIEWS vu and vu1
+Bug#30689 Wrong content in I_S.VIEWS.VIEW_DEFINITION if VIEW is based on I_S
+--------------------------------------------------------------------------------
SET @NO_REFRESH = IF( '' = '', 0, 1);
DROP DATABASE IF EXISTS test1;
CREATE DATABASE test1;
@@ -1035,7 +1046,8 @@ CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT
SELECT * FROM tables
-WHERE NOT( table_schema = 'information_schema');
+WHERE NOT( table_schema = 'information_schema')
+AND NOT (table_schema = 'mysql' AND table_name LIKE 'help_%');
TABLE_CATALOG NULL
TABLE_SCHEMA db_datadict
TABLE_NAME v1
@@ -1206,90 +1218,6 @@ CREATE_OPTIONS
TABLE_COMMENT General log
TABLE_CATALOG NULL
TABLE_SCHEMA mysql
-TABLE_NAME help_category
-TABLE_TYPE BASE TABLE
-ENGINE MyISAM
-VERSION 10
-ROW_FORMAT Fixed
-TABLE_ROWS 37
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME YYYY-MM-DD hh:mm:ss
-UPDATE_TIME YYYY-MM-DD hh:mm:ss
-CHECK_TIME YYYY-MM-DD hh:mm:ss
-TABLE_COLLATION utf8_general_ci
-CHECKSUM NULL
-CREATE_OPTIONS
-TABLE_COMMENT help categories
-TABLE_CATALOG NULL
-TABLE_SCHEMA mysql
-TABLE_NAME help_keyword
-TABLE_TYPE BASE TABLE
-ENGINE MyISAM
-VERSION 10
-ROW_FORMAT Fixed
-TABLE_ROWS 424
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME YYYY-MM-DD hh:mm:ss
-UPDATE_TIME YYYY-MM-DD hh:mm:ss
-CHECK_TIME YYYY-MM-DD hh:mm:ss
-TABLE_COLLATION utf8_general_ci
-CHECKSUM NULL
-CREATE_OPTIONS
-TABLE_COMMENT help keywords
-TABLE_CATALOG NULL
-TABLE_SCHEMA mysql
-TABLE_NAME help_relation
-TABLE_TYPE BASE TABLE
-ENGINE MyISAM
-VERSION 10
-ROW_FORMAT Fixed
-TABLE_ROWS 901
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME YYYY-MM-DD hh:mm:ss
-UPDATE_TIME YYYY-MM-DD hh:mm:ss
-CHECK_TIME YYYY-MM-DD hh:mm:ss
-TABLE_COLLATION utf8_general_ci
-CHECKSUM NULL
-CREATE_OPTIONS
-TABLE_COMMENT keyword-topic relation
-TABLE_CATALOG NULL
-TABLE_SCHEMA mysql
-TABLE_NAME help_topic
-TABLE_TYPE BASE TABLE
-ENGINE MyISAM
-VERSION 10
-ROW_FORMAT Dynamic
-TABLE_ROWS 479
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME YYYY-MM-DD hh:mm:ss
-UPDATE_TIME YYYY-MM-DD hh:mm:ss
-CHECK_TIME YYYY-MM-DD hh:mm:ss
-TABLE_COLLATION utf8_general_ci
-CHECKSUM NULL
-CREATE_OPTIONS
-TABLE_COMMENT help topics
-TABLE_CATALOG NULL
-TABLE_SCHEMA mysql
TABLE_NAME host
TABLE_TYPE BASE TABLE
ENGINE MyISAM
@@ -2338,9 +2266,9 @@ NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 1
NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
-NULL information_schema COLUMNS COLUMN_TYPE 15 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema COLUMNS COLUMN_TYPE 15 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema COLUMNS COLUMN_KEY 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
-NULL information_schema COLUMNS EXTRA 17 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select
+NULL information_schema COLUMNS EXTRA 17 NO varchar 27 81 NULL NULL utf8 utf8_general_ci varchar(27) select
NULL information_schema COLUMNS PRIVILEGES 18 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select
NULL information_schema COLUMNS COLUMN_COMMENT 19 NO varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select
NULL information_schema COLUMN_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select
@@ -2362,12 +2290,12 @@ NULL information_schema EVENTS EVENT_NAME 3 NO varchar 64 192 NULL NULL utf8 ut
NULL information_schema EVENTS DEFINER 4 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
NULL information_schema EVENTS TIME_ZONE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema EVENTS EVENT_BODY 6 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select
-NULL information_schema EVENTS EVENT_DEFINITION 7 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema EVENTS EVENT_DEFINITION 7 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema EVENTS EVENT_TYPE 8 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select
NULL information_schema EVENTS EXECUTE_AT 9 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS INTERVAL_VALUE 10 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select
NULL information_schema EVENTS INTERVAL_FIELD 11 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select
-NULL information_schema EVENTS SQL_MODE 12 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema EVENTS SQL_MODE 12 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema EVENTS STARTS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS ENDS 14 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS STATUS 15 NO varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select
@@ -2505,7 +2433,7 @@ NULL information_schema ROUTINES SQL_PATH 14 NULL YES varchar 64 192 NULL NULL u
NULL information_schema ROUTINES SECURITY_TYPE 15 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select
NULL information_schema ROUTINES CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema ROUTINES LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select
-NULL information_schema ROUTINES SQL_MODE 18 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema ROUTINES SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema ROUTINES ROUTINE_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema ROUTINES DEFINER 20 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
NULL information_schema ROUTINES CHARACTER_SET_CLIENT 21 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
@@ -2582,7 +2510,7 @@ NULL information_schema TRIGGERS EVENT_OBJECT_SCHEMA 6 NO varchar 64 192 NULL N
NULL information_schema TRIGGERS EVENT_OBJECT_TABLE 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) 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_CONDITION 9 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
-NULL information_schema TRIGGERS ACTION_STATEMENT 10 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema TRIGGERS ACTION_STATEMENT 10 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema TRIGGERS ACTION_ORIENTATION 11 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select
NULL information_schema TRIGGERS ACTION_TIMING 12 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select
NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_TABLE 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
@@ -2590,8 +2518,8 @@ NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_TABLE 14 NULL YES varchar
NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW 15 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema TRIGGERS CREATED 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
-NULL information_schema TRIGGERS SQL_MODE 18 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
-NULL information_schema TRIGGERS DEFINER 19 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema TRIGGERS SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema TRIGGERS DEFINER 19 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema TRIGGERS CHARACTER_SET_CLIENT 20 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema TRIGGERS COLLATION_CONNECTION 21 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema TRIGGERS DATABASE_COLLATION 22 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
@@ -2602,7 +2530,7 @@ NULL information_schema USER_PRIVILEGES IS_GRANTABLE 4 NO varchar 3 9 NULL NULL
NULL information_schema VIEWS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select
NULL information_schema VIEWS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema VIEWS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
-NULL information_schema VIEWS VIEW_DEFINITION 4 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema VIEWS VIEW_DEFINITION 4 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext 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 IS_UPDATABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema VIEWS DEFINER 7 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
@@ -2639,7 +2567,7 @@ NULL mysql columns_priv Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PR
NULL mysql columns_priv User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references
NULL mysql columns_priv Table_name 4 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
NULL mysql columns_priv Column_name 5 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
-NULL mysql columns_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
+NULL mysql columns_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL mysql columns_priv Column_priv 7 NO set 31 93 NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','References') select,insert,update,references
NULL mysql db Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references
NULL mysql db Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
@@ -2670,7 +2598,7 @@ NULL mysql event definer 4 NO char 77 231 NULL NULL utf8 utf8_bin char(77) se
NULL mysql event execute_at 5 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references
NULL mysql event interval_value 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
NULL mysql event interval_field 7 NULL YES enum 18 54 NULL NULL utf8 utf8_general_ci enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') select,insert,update,references
-NULL mysql event created 8 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
+NULL mysql event created 8 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL mysql event modified 9 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
NULL mysql event last_executed 10 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references
NULL mysql event starts 11 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references
@@ -2689,12 +2617,12 @@ NULL mysql func name 1 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI sel
NULL mysql func ret 2 0 NO tinyint NULL NULL 3 0 NULL NULL tinyint(1) select,insert,update,references
NULL mysql func dl 3 NO char 128 384 NULL NULL utf8 utf8_bin char(128) select,insert,update,references
NULL mysql func type 4 NULL NO enum 9 27 NULL NULL utf8 utf8_general_ci enum('function','aggregate') select,insert,update,references
-NULL mysql general_log event_time 1 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
-NULL mysql general_log user_host 2 NULL YES mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
-NULL mysql general_log thread_id 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
-NULL mysql general_log server_id 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
-NULL mysql general_log command_type 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
-NULL mysql general_log argument 6 NULL YES mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
+NULL mysql general_log event_time 1 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
+NULL mysql general_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
+NULL mysql general_log thread_id 3 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
+NULL mysql general_log server_id 4 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
+NULL mysql general_log command_type 5 NULL NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+NULL mysql general_log argument 6 NULL NO mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
NULL mysql help_category help_category_id 1 NULL NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned PRI select,insert,update,references
NULL mysql help_category name 2 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) UNI select,insert,update,references
NULL mysql help_category parent_category_id 3 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references
@@ -2747,10 +2675,10 @@ NULL mysql proc sql_data_access 6 CONTAINS_SQL NO enum 17 51 NULL NULL utf8 utf8
NULL mysql proc is_deterministic 7 NO NO enum 3 9 NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references
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 param_list 9 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references
-NULL mysql proc returns 10 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
+NULL mysql proc returns 10 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references
NULL mysql proc body 11 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references
NULL mysql proc definer 12 NO char 77 231 NULL NULL utf8 utf8_bin char(77) select,insert,update,references
-NULL mysql proc created 13 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
+NULL mysql proc created 13 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL mysql proc modified 14 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
NULL mysql proc sql_mode 15 NO set 431 1293 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') select,insert,update,references
NULL mysql proc comment 16 NO char 64 192 NULL NULL utf8 utf8_bin char(64) select,insert,update,references
@@ -2765,7 +2693,7 @@ NULL mysql procs_priv Routine_name 4 NO char 64 192 NULL NULL utf8 utf8_bin cha
NULL mysql procs_priv Routine_type 5 NULL NO enum 9 27 NULL NULL utf8 utf8_bin enum('FUNCTION','PROCEDURE') 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
NULL mysql procs_priv Proc_priv 7 NO set 27 81 NULL NULL utf8 utf8_general_ci set('Execute','Alter Routine','Grant') select,insert,update,references
-NULL mysql procs_priv Timestamp 8 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
+NULL mysql procs_priv Timestamp 8 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL mysql servers Server_name 1 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) PRI select,insert,update,references
NULL mysql servers Host 2 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
NULL mysql servers Db 3 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
@@ -2775,23 +2703,23 @@ NULL mysql servers Port 6 0 NO int NULL NULL 10 0 NULL NULL int(4) select,inse
NULL mysql servers Socket 7 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
NULL mysql servers Wrapper 8 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
NULL mysql servers Owner 9 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
-NULL mysql slow_log start_time 1 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
+NULL mysql slow_log start_time 1 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL mysql slow_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
NULL mysql slow_log query_time 3 NULL NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references
NULL mysql slow_log lock_time 4 NULL NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references
NULL mysql slow_log rows_sent 5 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
NULL mysql slow_log rows_examined 6 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
-NULL mysql slow_log db 7 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select,insert,update,references
-NULL mysql slow_log last_insert_id 8 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
-NULL mysql slow_log insert_id 9 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
-NULL mysql slow_log server_id 10 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
+NULL mysql slow_log db 7 NULL NO varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select,insert,update,references
+NULL mysql slow_log last_insert_id 8 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
+NULL mysql slow_log insert_id 9 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
+NULL mysql slow_log server_id 10 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
NULL mysql slow_log sql_text 11 NULL NO mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
NULL mysql tables_priv Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references
NULL mysql tables_priv Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
NULL mysql tables_priv User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references
NULL mysql tables_priv Table_name 4 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
NULL mysql tables_priv Grantor 5 NO char 77 231 NULL NULL utf8 utf8_bin char(77) MUL select,insert,update,references
-NULL mysql tables_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
+NULL mysql tables_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL mysql tables_priv Table_priv 7 NO set 98 294 NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') select,insert,update,references
NULL mysql tables_priv Column_priv 8 NO set 31 93 NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','References') select,insert,update,references
NULL mysql time_zone Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI auto_increment select,insert,update,references
@@ -3103,7 +3031,7 @@ NULL test tb4 f217 42 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL N
NULL test tb4 f218 43 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references
NULL test tb4 f219 44 NULL YES time NULL NULL NULL NULL NULL NULL time select,insert,update,references
NULL test tb4 f220 45 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references
-NULL test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
+NULL test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL test tb4 f222 47 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references
NULL test tb4 f223 48 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references
NULL test tb4 f224 49 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references
@@ -3211,7 +3139,7 @@ binary binary Binary pseudo charset 1
geostd8 geostd8_general_ci GEOSTD8 Georgian 1
cp932 cp932_japanese_ci SJIS for Windows Japanese 2
eucjpms eucjpms_japanese_ci UJIS for Windows Japanese 3
-select sum(id) from collations;
+select sum(id) from collations where collation_name <> 'utf8_general_cs';
sum(id)
10840
select collation_name, character_set_name into @x,@y
@@ -3227,7 +3155,8 @@ END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh
select count(*) from routines;
count(*)
1
-select * from statistics;
+select * from statistics
+where not (table_schema = 'mysql' and table_name like 'help_%');
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT
NULL mysql columns_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE
NULL mysql columns_priv 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE
@@ -3241,14 +3170,6 @@ NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE
NULL mysql event 0 mysql PRIMARY 1 db A NULL NULL NULL BTREE
NULL mysql event 0 mysql PRIMARY 2 name A 0 NULL NULL BTREE
NULL mysql func 0 mysql PRIMARY 1 name A 0 NULL NULL BTREE
-NULL mysql help_category 0 mysql PRIMARY 1 help_category_id A 37 NULL NULL BTREE
-NULL mysql help_category 0 mysql name 1 name A 37 NULL NULL BTREE
-NULL mysql help_keyword 0 mysql PRIMARY 1 help_keyword_id A 424 NULL NULL BTREE
-NULL mysql help_keyword 0 mysql name 1 name A 424 NULL NULL BTREE
-NULL mysql help_relation 0 mysql PRIMARY 1 help_keyword_id A NULL NULL NULL BTREE
-NULL mysql help_relation 0 mysql PRIMARY 2 help_topic_id A 901 NULL NULL BTREE
-NULL mysql help_topic 0 mysql PRIMARY 1 help_topic_id A 479 NULL NULL BTREE
-NULL mysql help_topic 0 mysql name 1 name A 479 NULL NULL BTREE
NULL mysql host 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE
NULL mysql host 0 mysql PRIMARY 2 Db A 0 NULL NULL BTREE
NULL mysql ndb_binlog_index 0 mysql PRIMARY 1 epoch A 0 NULL NULL BTREE
@@ -3280,8 +3201,16 @@ NULL mysql user 0 mysql PRIMARY 2 User A 3 NULL NULL BTREE
select * from views;
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION
NULL db_datadict v1 SELECT * FROM information_schema.tables NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
-NULL db_datadict vu SELECT DISTINCT u, NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
-NULL db_datadict vu1 SELECT grantee AS u NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
+NULL db_datadict vu SELECT DISTINCT u,
+SUBSTRING( u, LENGTH(SUBSTRING_INDEX(u,'@',1))+3 )
+AS server,
+SUBSTRING( u, LENGTH(SUBSTRING_INDEX(u,'@',1))+3,
+LENGTH( SUBSTRING( u,
+LENGTH( SUBSTRING_INDEX(u, '@',1)) +3 )) - 1 )
+AS Server_Clean
+FROM db_datadict.vu1 NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
+NULL db_datadict vu1 SELECT grantee AS u
+FROM information_schema.user_privileges NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
select * from user_privileges order by grantee, privilege_type;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'127.0.0.1' NULL ALTER YES
@@ -3479,9 +3408,10 @@ NULL mysql PRIMARY NULL mysql user User 2 NULL NULL NULL NULL
select count(*) as max_recs from key_column_usage;
max_recs
45
-select max(cardinality) from statistics;
+select max(cardinality) from statistics
+where not (table_schema = 'mysql' and table_name like 'help_%');
max(cardinality)
-901
+393
select concat("View '",
table_name, "' is associated with the database '", table_schema, "'.")
AS "Who is Who for the Views"
@@ -3680,10 +3610,10 @@ NULL information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 NO varchar 64 192 N
SELECT * FROM character_sets LIMIT 1;
CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN
big5 big5_chinese_ci Big5 Traditional Chinese 2
-SELECT * FROM collations LIMIT 1;
+SELECT * FROM collations where collation_name <> 'utf8_general_cs' LIMIT 1;
COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN
big5_chinese_ci big5 1 Yes Yes 1
-SELECT * FROM collation_character_set_applicability LIMIT 1;
+SELECT * FROM collation_character_set_applicability where collation_name <> 'utf8_general_cs' LIMIT 1;
COLLATION_NAME CHARACTER_SET_NAME
big5_chinese_ci big5
SELECT * FROM routines LIMIT 1;
@@ -4371,7 +4301,8 @@ CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT
SELECT * FROM information_schema.tables
-WHERE NOT( table_schema = 'information_schema');
+WHERE NOT( table_schema = 'information_schema')
+AND NOT (table_schema = 'mysql' AND table_name LIKE 'help_%');
TABLE_CATALOG NULL
TABLE_SCHEMA db_datadict
TABLE_NAME v1
@@ -4542,90 +4473,6 @@ CREATE_OPTIONS
TABLE_COMMENT General log
TABLE_CATALOG NULL
TABLE_SCHEMA mysql
-TABLE_NAME help_category
-TABLE_TYPE BASE TABLE
-ENGINE MyISAM
-VERSION 10
-ROW_FORMAT Fixed
-TABLE_ROWS 37
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME YYYY-MM-DD hh:mm:ss
-UPDATE_TIME YYYY-MM-DD hh:mm:ss
-CHECK_TIME YYYY-MM-DD hh:mm:ss
-TABLE_COLLATION utf8_general_ci
-CHECKSUM NULL
-CREATE_OPTIONS
-TABLE_COMMENT help categories
-TABLE_CATALOG NULL
-TABLE_SCHEMA mysql
-TABLE_NAME help_keyword
-TABLE_TYPE BASE TABLE
-ENGINE MyISAM
-VERSION 10
-ROW_FORMAT Fixed
-TABLE_ROWS 424
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME YYYY-MM-DD hh:mm:ss
-UPDATE_TIME YYYY-MM-DD hh:mm:ss
-CHECK_TIME YYYY-MM-DD hh:mm:ss
-TABLE_COLLATION utf8_general_ci
-CHECKSUM NULL
-CREATE_OPTIONS
-TABLE_COMMENT help keywords
-TABLE_CATALOG NULL
-TABLE_SCHEMA mysql
-TABLE_NAME help_relation
-TABLE_TYPE BASE TABLE
-ENGINE MyISAM
-VERSION 10
-ROW_FORMAT Fixed
-TABLE_ROWS 901
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME YYYY-MM-DD hh:mm:ss
-UPDATE_TIME YYYY-MM-DD hh:mm:ss
-CHECK_TIME YYYY-MM-DD hh:mm:ss
-TABLE_COLLATION utf8_general_ci
-CHECKSUM NULL
-CREATE_OPTIONS
-TABLE_COMMENT keyword-topic relation
-TABLE_CATALOG NULL
-TABLE_SCHEMA mysql
-TABLE_NAME help_topic
-TABLE_TYPE BASE TABLE
-ENGINE MyISAM
-VERSION 10
-ROW_FORMAT Dynamic
-TABLE_ROWS 479
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME YYYY-MM-DD hh:mm:ss
-UPDATE_TIME YYYY-MM-DD hh:mm:ss
-CHECK_TIME YYYY-MM-DD hh:mm:ss
-TABLE_COLLATION utf8_general_ci
-CHECKSUM NULL
-CREATE_OPTIONS
-TABLE_COMMENT help topics
-TABLE_CATALOG NULL
-TABLE_SCHEMA mysql
TABLE_NAME host
TABLE_TYPE BASE TABLE
ENGINE MyISAM
@@ -5689,8 +5536,16 @@ NULL mysql columns_priv 0 mysql PRIMARY 5 Column_name A 0 NULL NULL BTREE
select * from information_schema.views limit 0, 5;
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION
NULL db_datadict v1 SELECT * FROM information_schema.tables NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
-NULL db_datadict vu SELECT DISTINCT u, NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
-NULL db_datadict vu1 SELECT grantee AS u NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
+NULL db_datadict vu SELECT DISTINCT u,
+SUBSTRING( u, LENGTH(SUBSTRING_INDEX(u,'@',1))+3 )
+AS server,
+SUBSTRING( u, LENGTH(SUBSTRING_INDEX(u,'@',1))+3,
+LENGTH( SUBSTRING( u,
+LENGTH( SUBSTRING_INDEX(u, '@',1)) +3 )) - 1 )
+AS Server_Clean
+FROM db_datadict.vu1 NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
+NULL db_datadict vu1 SELECT grantee AS u
+FROM information_schema.user_privileges NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
select * from information_schema.user_privileges limit 0, 5;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'localhost' NULL SELECT YES
@@ -5741,10 +5596,10 @@ COUNT(*)
SELECT COUNT(*) FROM information_schema. character_sets ;
COUNT(*)
36
-SELECT COUNT(*) FROM information_schema. collations ;
+SELECT COUNT(*) FROM information_schema. collations where collation_name <> 'utf8_general_cs' ;
COUNT(*)
127
-SELECT COUNT(*) FROM information_schema. collation_character_set_applicability ;
+SELECT COUNT(*) FROM information_schema. collation_character_set_applicability where collation_name <> 'utf8_general_cs' ;
COUNT(*)
128
SELECT COUNT(*) FROM information_schema. routines ;
@@ -5823,10 +5678,10 @@ utf8_esperanto_ci utf8
utf8_estonian_ci utf8
select routine_definition from routines;
routine_definition
-select * from statistics group by index_name asc limit 0, 5;
+select * from statistics where table_name not like 'help_%'
+group by index_name asc limit 0, 5;
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT
NULL mysql procs_priv 1 mysql Grantor 1 Grantor A NULL NULL NULL BTREE
-NULL mysql help_category 0 mysql name 1 name A 37 NULL NULL BTREE
NULL mysql columns_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE
NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE
select concat(table_schema, ', ', table_name, ', ', view_definition) view_info
@@ -5940,9 +5795,9 @@ NULL test latin1 latin1_swedish_ci NULL
NULL test1 latin1 latin1_swedish_ci NULL
select distinct grantee from user_privileges;
grantee
-'root'@'localhost'
-'root'@'<SERVER_NAME>'
'root'@'127.0.0.1'
+'root'@'<SERVER_NAME>'
+'root'@'localhost'
select all grantee from user_privileges order by grantee, privilege_type;
grantee
'root'@'127.0.0.1'
@@ -7499,7 +7354,7 @@ from information_schema.statistics
where table_schema like 'db_datadict%';
table_name index_schema index_name index_type
select *
-from information_schema.user_privileges order by grantee, privilege_type;
+from information_schema.user_privileges;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'127.0.0.1' NULL ALTER YES
'root'@'127.0.0.1' NULL ALTER ROUTINE YES
@@ -7650,7 +7505,7 @@ where table_schema like 'db_datadict%';
table_name index_schema index_name index_type
res_t_401013 db_datadict i_6_401013 BTREE
select *
-from information_schema.user_privileges order by grantee, privilege_type;
+from information_schema.user_privileges;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'127.0.0.1' NULL ALTER YES
'root'@'127.0.0.1' NULL ALTER ROUTINE YES
@@ -7787,7 +7642,7 @@ from information_schema.statistics
where table_schema like 'db_datadict%';
table_name index_schema index_name index_type
select *
-from information_schema.user_privileges order by grantee, privilege_type;
+from information_schema.user_privileges;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'127.0.0.1' NULL ALTER YES
'root'@'127.0.0.1' NULL ALTER ROUTINE YES
@@ -7892,7 +7747,7 @@ Testcase 3.2.1.14:
DROP DATABASE IF EXISTS db_datadict;
CREATE DATABASE db_datadict;
USE db_datadict;
-create table res_t_401014(f1 char(10), f2 text(25), f3 int);
+create table res_t_401014(f1 char(10), f2 varchar(25), f3 int);
create view res_v_401014 as select * from res_t_401014;
create procedure sp_6_401014() select 'db_datadict';
create function fn_6_401014() returns int return 0;
@@ -7915,10 +7770,10 @@ from information_schema.columns
where table_schema like 'db_datadict%';
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT
NULL db_datadict res_t_401014 f1 1 NULL YES char 10 10 NULL NULL latin1 latin1_swedish_ci char(10) select,insert,update,references
-NULL db_datadict res_t_401014 f2 2 NULL YES tinytext 255 255 NULL NULL latin1 latin1_swedish_ci tinytext select,insert,update,references
+NULL db_datadict res_t_401014 f2 2 NULL YES varchar 25 25 NULL NULL latin1 latin1_swedish_ci varchar(25) select,insert,update,references
NULL db_datadict res_t_401014 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
NULL db_datadict res_v_401014 f1 1 NULL YES char 10 10 NULL NULL latin1 latin1_swedish_ci char(10) select,insert,update,references
-NULL db_datadict res_v_401014 f2 2 NULL YES tinytext 255 255 NULL NULL latin1 latin1_swedish_ci tinytext select,insert,update,references
+NULL db_datadict res_v_401014 f2 2 NULL YES varchar 25 25 NULL NULL latin1 latin1_swedish_ci varchar(25) select,insert,update,references
NULL db_datadict res_v_401014 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
select table_schema, table_name, is_updatable
from information_schema.views
@@ -7936,7 +7791,7 @@ from information_schema.statistics
where table_schema like 'db_datadict%';
table_name index_schema index_name index_type
select *
-from information_schema.user_privileges order by grantee, privilege_type;
+from information_schema.user_privileges;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'127.0.0.1' NULL ALTER YES
'root'@'127.0.0.1' NULL ALTER ROUTINE YES
@@ -8037,7 +7892,7 @@ WHERE trigger_schema LIKE 'db_datadict%';
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
use db_datadict;
alter table res_t_401014 change f1 ff1 int;
-alter table res_t_401014 engine = innodb;
+alter table res_t_401014 engine = MEMORY;
alter table res_t_401014 change f3 f3_new bigint;
alter view res_v_401014 as select ff1 from res_t_401014;
alter procedure sp_6_401014 sql security invoker;
@@ -8055,14 +7910,14 @@ select table_catalog, table_schema, engine
from information_schema.tables
where table_schema like 'db_datadict%';
table_catalog table_schema engine
-NULL db_datadict InnoDB
+NULL db_datadict MEMORY
NULL db_datadict NULL
select *
from information_schema.columns
where table_schema like 'db_datadict%';
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT
NULL db_datadict res_t_401014 ff1 1 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
-NULL db_datadict res_t_401014 f2 2 NULL YES tinytext 255 255 NULL NULL latin1 latin1_swedish_ci tinytext select,insert,update,references
+NULL db_datadict res_t_401014 f2 2 NULL YES varchar 25 25 NULL NULL latin1 latin1_swedish_ci varchar(25) select,insert,update,references
NULL db_datadict res_t_401014 f3_new 3 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) select,insert,update,references
NULL db_datadict res_v_401014 ff1 1 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
select table_schema, table_name, is_updatable
@@ -8081,7 +7936,7 @@ from information_schema.statistics
where table_schema like 'db_datadict%';
table_name index_schema index_name index_type
select *
-from information_schema.user_privileges order by grantee, privilege_type;
+from information_schema.user_privileges;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'127.0.0.1' NULL ALTER YES
'root'@'127.0.0.1' NULL ALTER ROUTINE YES
@@ -8239,7 +8094,7 @@ where table_schema like 'db_datadict%';
table_name index_schema index_name index_type
res_t_401015 db_datadict i_6_401015 BTREE
select *
-from information_schema.user_privileges order by grantee, privilege_type;
+from information_schema.user_privileges;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'127.0.0.1' NULL ALTER YES
'root'@'127.0.0.1' NULL ALTER ROUTINE YES
@@ -8375,7 +8230,7 @@ from information_schema.statistics
where table_schema like 'db_datadict%';
table_name index_schema index_name index_type
select *
-from information_schema.user_privileges order by grantee, privilege_type;
+from information_schema.user_privileges;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'127.0.0.1' NULL ALTER YES
'root'@'127.0.0.1' NULL ALTER ROUTINE YES
@@ -8625,7 +8480,8 @@ ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_
FLUSH PRIVILEGES;
connect(localhost,u_6_401017,,test,MYSQL_PORT,MYSQL_SOCK);
use information_schema;
-select * from collation_character_set_applicability;
+select * from collation_character_set_applicability
+where collation_name <> 'utf8_general_cs';
COLLATION_NAME CHARACTER_SET_NAME
big5_chinese_ci big5
big5_bin big5
@@ -8831,7 +8687,7 @@ COLUMNS CHARACTER_SET_NAME varchar(64)
COLUMNS COLLATION_NAME varchar(64)
COLUMNS COLUMN_TYPE longtext
COLUMNS COLUMN_KEY varchar(3)
-COLUMNS EXTRA varchar(20)
+COLUMNS EXTRA varchar(27)
COLUMNS PRIVILEGES varchar(80)
COLUMNS COLUMN_COMMENT varchar(255)
COLUMN_PRIVILEGES GRANTEE varchar(81)
@@ -9407,7 +9263,7 @@ binary
geostd8
cp932
eucjpms
-select collation_name from collations;
+select collation_name from collations where collation_name <> 'utf8_general_cs';
collation_name
big5_chinese_ci
big5_bin
@@ -9772,7 +9628,7 @@ NULL information_schema collations SORTLEN 6 0 NO bigint NULL NULL 19 0 NULL NUL
Testcase 3.2.3.2:
--------------------------------------------------------------------------------
-SELECT * FROM collations;
+SELECT * FROM collations where collation_name <> 'utf8_general_cs';
COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN
big5_chinese_ci big5 1 Yes Yes 1
big5_bin big5 84 Yes 1
@@ -9934,7 +9790,8 @@ NULL information_schema collation_character_set_applicability CHARACTER_SET_NAME
Testcase 3.2.4.2:
--------------------------------------------------------------------------------
-SELECT * FROM collation_character_set_applicability;
+SELECT * FROM collation_character_set_applicability
+where collation_name <> 'utf8_general_cs';
COLLATION_NAME CHARACTER_SET_NAME
big5_chinese_ci big5
big5_bin big5
@@ -10247,9 +10104,9 @@ NUMERIC_PRECISION bigint(21) unsigned YES NULL
NUMERIC_SCALE bigint(21) unsigned YES NULL
CHARACTER_SET_NAME varchar(64) YES NULL
COLLATION_NAME varchar(64) YES NULL
-COLUMN_TYPE longtext NO
+COLUMN_TYPE longtext NO NULL
COLUMN_KEY varchar(3) NO
-EXTRA varchar(20) NO
+EXTRA varchar(27) NO
PRIVILEGES varchar(80) NO
COLUMN_COMMENT varchar(255) NO
SHOW CREATE TABLE columns;
@@ -10271,7 +10128,7 @@ COLUMNS CREATE TEMPORARY TABLE `COLUMNS` (
`COLLATION_NAME` varchar(64) DEFAULT NULL,
`COLUMN_TYPE` longtext NOT NULL,
`COLUMN_KEY` varchar(3) NOT NULL DEFAULT '',
- `EXTRA` varchar(20) NOT NULL DEFAULT '',
+ `EXTRA` varchar(27) NOT NULL DEFAULT '',
`PRIVILEGES` varchar(80) NOT NULL DEFAULT '',
`COLUMN_COMMENT` varchar(255) NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=utf8
@@ -10300,9 +10157,9 @@ NULL information_schema columns NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 1
NULL information_schema columns NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema columns CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema columns COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
-NULL information_schema columns COLUMN_TYPE 15 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema columns COLUMN_TYPE 15 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema columns COLUMN_KEY 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
-NULL information_schema columns EXTRA 17 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select
+NULL information_schema columns EXTRA 17 NO varchar 27 81 NULL NULL utf8 utf8_general_ci varchar(27) select
NULL information_schema columns PRIVILEGES 18 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select
NULL information_schema columns COLUMN_COMMENT 19 NO varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select
@@ -10355,9 +10212,9 @@ NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 1
NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
-NULL information_schema COLUMNS COLUMN_TYPE 15 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema COLUMNS COLUMN_TYPE 15 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema COLUMNS COLUMN_KEY 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
-NULL information_schema COLUMNS EXTRA 17 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select
+NULL information_schema COLUMNS EXTRA 17 NO varchar 27 81 NULL NULL utf8 utf8_general_ci varchar(27) select
NULL information_schema COLUMNS PRIVILEGES 18 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select
NULL information_schema COLUMNS COLUMN_COMMENT 19 NO varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select
NULL information_schema COLUMN_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select
@@ -10379,12 +10236,12 @@ NULL information_schema EVENTS EVENT_NAME 3 NO varchar 64 192 NULL NULL utf8 ut
NULL information_schema EVENTS DEFINER 4 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
NULL information_schema EVENTS TIME_ZONE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema EVENTS EVENT_BODY 6 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select
-NULL information_schema EVENTS EVENT_DEFINITION 7 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema EVENTS EVENT_DEFINITION 7 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema EVENTS EVENT_TYPE 8 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select
NULL information_schema EVENTS EXECUTE_AT 9 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS INTERVAL_VALUE 10 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select
NULL information_schema EVENTS INTERVAL_FIELD 11 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select
-NULL information_schema EVENTS SQL_MODE 12 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema EVENTS SQL_MODE 12 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema EVENTS STARTS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS ENDS 14 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS STATUS 15 NO varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select
@@ -10522,7 +10379,7 @@ NULL information_schema ROUTINES SQL_PATH 14 NULL YES varchar 64 192 NULL NULL u
NULL information_schema ROUTINES SECURITY_TYPE 15 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select
NULL information_schema ROUTINES CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema ROUTINES LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select
-NULL information_schema ROUTINES SQL_MODE 18 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema ROUTINES SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema ROUTINES ROUTINE_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema ROUTINES DEFINER 20 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
NULL information_schema ROUTINES CHARACTER_SET_CLIENT 21 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
@@ -10599,7 +10456,7 @@ NULL information_schema TRIGGERS EVENT_OBJECT_SCHEMA 6 NO varchar 64 192 NULL N
NULL information_schema TRIGGERS EVENT_OBJECT_TABLE 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) 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_CONDITION 9 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
-NULL information_schema TRIGGERS ACTION_STATEMENT 10 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema TRIGGERS ACTION_STATEMENT 10 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema TRIGGERS ACTION_ORIENTATION 11 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select
NULL information_schema TRIGGERS ACTION_TIMING 12 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select
NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_TABLE 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
@@ -10607,8 +10464,8 @@ NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_TABLE 14 NULL YES varchar
NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW 15 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema TRIGGERS CREATED 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
-NULL information_schema TRIGGERS SQL_MODE 18 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
-NULL information_schema TRIGGERS DEFINER 19 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema TRIGGERS SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema TRIGGERS DEFINER 19 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema TRIGGERS CHARACTER_SET_CLIENT 20 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema TRIGGERS COLLATION_CONNECTION 21 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema TRIGGERS DATABASE_COLLATION 22 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
@@ -10619,7 +10476,7 @@ NULL information_schema USER_PRIVILEGES IS_GRANTABLE 4 NO varchar 3 9 NULL NULL
NULL information_schema VIEWS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select
NULL information_schema VIEWS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema VIEWS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
-NULL information_schema VIEWS VIEW_DEFINITION 4 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema VIEWS VIEW_DEFINITION 4 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext 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 IS_UPDATABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema VIEWS DEFINER 7 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
@@ -10631,7 +10488,7 @@ NULL mysql columns_priv Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PR
NULL mysql columns_priv User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references
NULL mysql columns_priv Table_name 4 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
NULL mysql columns_priv Column_name 5 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
-NULL mysql columns_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
+NULL mysql columns_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL mysql columns_priv Column_priv 7 NO set 31 93 NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','References') select,insert,update,references
NULL mysql db Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references
NULL mysql db Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
@@ -10662,7 +10519,7 @@ NULL mysql event definer 4 NO char 77 231 NULL NULL utf8 utf8_bin char(77) se
NULL mysql event execute_at 5 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references
NULL mysql event interval_value 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
NULL mysql event interval_field 7 NULL YES enum 18 54 NULL NULL utf8 utf8_general_ci enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') select,insert,update,references
-NULL mysql event created 8 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
+NULL mysql event created 8 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL mysql event modified 9 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
NULL mysql event last_executed 10 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references
NULL mysql event starts 11 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references
@@ -10681,12 +10538,12 @@ NULL mysql func name 1 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI sel
NULL mysql func ret 2 0 NO tinyint NULL NULL 3 0 NULL NULL tinyint(1) select,insert,update,references
NULL mysql func dl 3 NO char 128 384 NULL NULL utf8 utf8_bin char(128) select,insert,update,references
NULL mysql func type 4 NULL NO enum 9 27 NULL NULL utf8 utf8_general_ci enum('function','aggregate') select,insert,update,references
-NULL mysql general_log event_time 1 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
-NULL mysql general_log user_host 2 NULL YES mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
-NULL mysql general_log thread_id 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
-NULL mysql general_log server_id 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
-NULL mysql general_log command_type 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
-NULL mysql general_log argument 6 NULL YES mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
+NULL mysql general_log event_time 1 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
+NULL mysql general_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
+NULL mysql general_log thread_id 3 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
+NULL mysql general_log server_id 4 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
+NULL mysql general_log command_type 5 NULL NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+NULL mysql general_log argument 6 NULL NO mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
NULL mysql help_category help_category_id 1 NULL NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned PRI select,insert,update,references
NULL mysql help_category name 2 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) UNI select,insert,update,references
NULL mysql help_category parent_category_id 3 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references
@@ -10739,10 +10596,10 @@ NULL mysql proc sql_data_access 6 CONTAINS_SQL NO enum 17 51 NULL NULL utf8 utf8
NULL mysql proc is_deterministic 7 NO NO enum 3 9 NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references
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 param_list 9 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references
-NULL mysql proc returns 10 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
+NULL mysql proc returns 10 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references
NULL mysql proc body 11 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references
NULL mysql proc definer 12 NO char 77 231 NULL NULL utf8 utf8_bin char(77) select,insert,update,references
-NULL mysql proc created 13 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
+NULL mysql proc created 13 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL mysql proc modified 14 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
NULL mysql proc sql_mode 15 NO set 431 1293 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') select,insert,update,references
NULL mysql proc comment 16 NO char 64 192 NULL NULL utf8 utf8_bin char(64) select,insert,update,references
@@ -10757,7 +10614,7 @@ NULL mysql procs_priv Routine_name 4 NO char 64 192 NULL NULL utf8 utf8_bin cha
NULL mysql procs_priv Routine_type 5 NULL NO enum 9 27 NULL NULL utf8 utf8_bin enum('FUNCTION','PROCEDURE') 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
NULL mysql procs_priv Proc_priv 7 NO set 27 81 NULL NULL utf8 utf8_general_ci set('Execute','Alter Routine','Grant') select,insert,update,references
-NULL mysql procs_priv Timestamp 8 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
+NULL mysql procs_priv Timestamp 8 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL mysql servers Server_name 1 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) PRI select,insert,update,references
NULL mysql servers Host 2 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
NULL mysql servers Db 3 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
@@ -10767,23 +10624,23 @@ NULL mysql servers Port 6 0 NO int NULL NULL 10 0 NULL NULL int(4) select,inse
NULL mysql servers Socket 7 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
NULL mysql servers Wrapper 8 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
NULL mysql servers Owner 9 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
-NULL mysql slow_log start_time 1 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
+NULL mysql slow_log start_time 1 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL mysql slow_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
NULL mysql slow_log query_time 3 NULL NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references
NULL mysql slow_log lock_time 4 NULL NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references
NULL mysql slow_log rows_sent 5 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
NULL mysql slow_log rows_examined 6 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
-NULL mysql slow_log db 7 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select,insert,update,references
-NULL mysql slow_log last_insert_id 8 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
-NULL mysql slow_log insert_id 9 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
-NULL mysql slow_log server_id 10 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
+NULL mysql slow_log db 7 NULL NO varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select,insert,update,references
+NULL mysql slow_log last_insert_id 8 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
+NULL mysql slow_log insert_id 9 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
+NULL mysql slow_log server_id 10 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
NULL mysql slow_log sql_text 11 NULL NO mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
NULL mysql tables_priv Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references
NULL mysql tables_priv Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
NULL mysql tables_priv User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references
NULL mysql tables_priv Table_name 4 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
NULL mysql tables_priv Grantor 5 NO char 77 231 NULL NULL utf8 utf8_bin char(77) MUL select,insert,update,references
-NULL mysql tables_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
+NULL mysql tables_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL mysql tables_priv Table_priv 7 NO set 98 294 NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') select,insert,update,references
NULL mysql tables_priv Column_priv 8 NO set 31 93 NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','References') select,insert,update,references
NULL mysql time_zone Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI auto_increment select,insert,update,references
@@ -11095,7 +10952,7 @@ NULL test tb4 f217 42 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL N
NULL test tb4 f218 43 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references
NULL test tb4 f219 44 NULL YES time NULL NULL NULL NULL NULL NULL time select,insert,update,references
NULL test tb4 f220 45 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references
-NULL test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
+NULL test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL test tb4 f222 47 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references
NULL test tb4 f223 48 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references
NULL test tb4 f224 49 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references
@@ -11197,9 +11054,9 @@ NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 1
NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
-NULL information_schema COLUMNS COLUMN_TYPE 15 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema COLUMNS COLUMN_TYPE 15 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema COLUMNS COLUMN_KEY 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
-NULL information_schema COLUMNS EXTRA 17 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select
+NULL information_schema COLUMNS EXTRA 17 NO varchar 27 81 NULL NULL utf8 utf8_general_ci varchar(27) select
NULL information_schema COLUMNS PRIVILEGES 18 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select
NULL information_schema COLUMNS COLUMN_COMMENT 19 NO varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select
NULL information_schema COLUMN_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select
@@ -11221,12 +11078,12 @@ NULL information_schema EVENTS EVENT_NAME 3 NO varchar 64 192 NULL NULL utf8 ut
NULL information_schema EVENTS DEFINER 4 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
NULL information_schema EVENTS TIME_ZONE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema EVENTS EVENT_BODY 6 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select
-NULL information_schema EVENTS EVENT_DEFINITION 7 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema EVENTS EVENT_DEFINITION 7 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema EVENTS EVENT_TYPE 8 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select
NULL information_schema EVENTS EXECUTE_AT 9 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS INTERVAL_VALUE 10 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select
NULL information_schema EVENTS INTERVAL_FIELD 11 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select
-NULL information_schema EVENTS SQL_MODE 12 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema EVENTS SQL_MODE 12 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema EVENTS STARTS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS ENDS 14 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS STATUS 15 NO varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select
@@ -11364,7 +11221,7 @@ NULL information_schema ROUTINES SQL_PATH 14 NULL YES varchar 64 192 NULL NULL u
NULL information_schema ROUTINES SECURITY_TYPE 15 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select
NULL information_schema ROUTINES CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema ROUTINES LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select
-NULL information_schema ROUTINES SQL_MODE 18 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema ROUTINES SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema ROUTINES ROUTINE_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema ROUTINES DEFINER 20 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
NULL information_schema ROUTINES CHARACTER_SET_CLIENT 21 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
@@ -11441,7 +11298,7 @@ NULL information_schema TRIGGERS EVENT_OBJECT_SCHEMA 6 NO varchar 64 192 NULL N
NULL information_schema TRIGGERS EVENT_OBJECT_TABLE 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) 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_CONDITION 9 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
-NULL information_schema TRIGGERS ACTION_STATEMENT 10 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema TRIGGERS ACTION_STATEMENT 10 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema TRIGGERS ACTION_ORIENTATION 11 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select
NULL information_schema TRIGGERS ACTION_TIMING 12 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select
NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_TABLE 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
@@ -11449,8 +11306,8 @@ NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_TABLE 14 NULL YES varchar
NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW 15 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema TRIGGERS CREATED 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
-NULL information_schema TRIGGERS SQL_MODE 18 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
-NULL information_schema TRIGGERS DEFINER 19 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema TRIGGERS SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema TRIGGERS DEFINER 19 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema TRIGGERS CHARACTER_SET_CLIENT 20 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema TRIGGERS COLLATION_CONNECTION 21 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema TRIGGERS DATABASE_COLLATION 22 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
@@ -11461,7 +11318,7 @@ NULL information_schema USER_PRIVILEGES IS_GRANTABLE 4 NO varchar 3 9 NULL NULL
NULL information_schema VIEWS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select
NULL information_schema VIEWS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema VIEWS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
-NULL information_schema VIEWS VIEW_DEFINITION 4 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema VIEWS VIEW_DEFINITION 4 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext 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 IS_UPDATABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema VIEWS DEFINER 7 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
@@ -11724,7 +11581,7 @@ NULL test tb4 f217 42 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL N
NULL test tb4 f218 43 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references
NULL test tb4 f219 44 NULL YES time NULL NULL NULL NULL NULL NULL time select,insert,update,references
NULL test tb4 f220 45 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references
-NULL test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
+NULL test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL test tb4 f222 47 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references
NULL test tb4 f223 48 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references
NULL test tb4 f224 49 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references
@@ -11769,9 +11626,9 @@ NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 1
NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
-NULL information_schema COLUMNS COLUMN_TYPE 15 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema COLUMNS COLUMN_TYPE 15 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema COLUMNS COLUMN_KEY 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
-NULL information_schema COLUMNS EXTRA 17 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select
+NULL information_schema COLUMNS EXTRA 17 NO varchar 27 81 NULL NULL utf8 utf8_general_ci varchar(27) select
NULL information_schema COLUMNS PRIVILEGES 18 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select
NULL information_schema COLUMNS COLUMN_COMMENT 19 NO varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select
NULL information_schema COLUMN_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select
@@ -11793,12 +11650,12 @@ NULL information_schema EVENTS EVENT_NAME 3 NO varchar 64 192 NULL NULL utf8 ut
NULL information_schema EVENTS DEFINER 4 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
NULL information_schema EVENTS TIME_ZONE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema EVENTS EVENT_BODY 6 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select
-NULL information_schema EVENTS EVENT_DEFINITION 7 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema EVENTS EVENT_DEFINITION 7 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema EVENTS EVENT_TYPE 8 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select
NULL information_schema EVENTS EXECUTE_AT 9 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS INTERVAL_VALUE 10 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select
NULL information_schema EVENTS INTERVAL_FIELD 11 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select
-NULL information_schema EVENTS SQL_MODE 12 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema EVENTS SQL_MODE 12 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema EVENTS STARTS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS ENDS 14 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS STATUS 15 NO varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select
@@ -11936,7 +11793,7 @@ NULL information_schema ROUTINES SQL_PATH 14 NULL YES varchar 64 192 NULL NULL u
NULL information_schema ROUTINES SECURITY_TYPE 15 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select
NULL information_schema ROUTINES CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema ROUTINES LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select
-NULL information_schema ROUTINES SQL_MODE 18 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema ROUTINES SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema ROUTINES ROUTINE_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema ROUTINES DEFINER 20 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
NULL information_schema ROUTINES CHARACTER_SET_CLIENT 21 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
@@ -12013,7 +11870,7 @@ NULL information_schema TRIGGERS EVENT_OBJECT_SCHEMA 6 NO varchar 64 192 NULL N
NULL information_schema TRIGGERS EVENT_OBJECT_TABLE 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) 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_CONDITION 9 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
-NULL information_schema TRIGGERS ACTION_STATEMENT 10 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema TRIGGERS ACTION_STATEMENT 10 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema TRIGGERS ACTION_ORIENTATION 11 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select
NULL information_schema TRIGGERS ACTION_TIMING 12 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select
NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_TABLE 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
@@ -12021,8 +11878,8 @@ NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_TABLE 14 NULL YES varchar
NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW 15 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema TRIGGERS CREATED 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
-NULL information_schema TRIGGERS SQL_MODE 18 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
-NULL information_schema TRIGGERS DEFINER 19 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema TRIGGERS SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema TRIGGERS DEFINER 19 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema TRIGGERS CHARACTER_SET_CLIENT 20 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema TRIGGERS COLLATION_CONNECTION 21 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema TRIGGERS DATABASE_COLLATION 22 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
@@ -12033,7 +11890,7 @@ NULL information_schema USER_PRIVILEGES IS_GRANTABLE 4 NO varchar 3 9 NULL NULL
NULL information_schema VIEWS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select
NULL information_schema VIEWS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema VIEWS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
-NULL information_schema VIEWS VIEW_DEFINITION 4 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema VIEWS VIEW_DEFINITION 4 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext 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 IS_UPDATABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema VIEWS DEFINER 7 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
@@ -12296,7 +12153,7 @@ NULL test tb4 f217 42 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL N
NULL test tb4 f218 43 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references
NULL test tb4 f219 44 NULL YES time NULL NULL NULL NULL NULL NULL time select,insert,update,references
NULL test tb4 f220 45 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references
-NULL test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
+NULL test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL test tb4 f222 47 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references
NULL test tb4 f223 48 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references
NULL test tb4 f224 49 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references
@@ -12441,7 +12298,7 @@ NULL information_schema COLUMNS NUMERIC_SCALE bigint NULL NULL NULL NULL bigint(
3.0000 information_schema COLUMNS COLLATION_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
1.0000 information_schema COLUMNS COLUMN_TYPE longtext 4294967295 4294967295 utf8 utf8_general_ci longtext
3.0000 information_schema COLUMNS COLUMN_KEY varchar 3 9 utf8 utf8_general_ci varchar(3)
-3.0000 information_schema COLUMNS EXTRA varchar 20 60 utf8 utf8_general_ci varchar(20)
+3.0000 information_schema COLUMNS EXTRA varchar 27 81 utf8 utf8_general_ci varchar(27)
3.0000 information_schema COLUMNS PRIVILEGES varchar 80 240 utf8 utf8_general_ci varchar(80)
3.0000 information_schema COLUMNS COLUMN_COMMENT varchar 255 765 utf8 utf8_general_ci varchar(255)
3.0000 information_schema COLUMN_PRIVILEGES GRANTEE varchar 81 243 utf8 utf8_general_ci varchar(81)
@@ -12823,7 +12680,7 @@ NULL mysql ndb_binlog_index schemaops bigint NULL NULL NULL NULL bigint(20) unsi
3.0000 mysql proc is_deterministic enum 3 9 utf8 utf8_general_ci enum('YES','NO')
3.0000 mysql proc security_type enum 7 21 utf8 utf8_general_ci enum('INVOKER','DEFINER')
1.0000 mysql proc param_list blob 65535 65535 NULL NULL blob
-3.0000 mysql proc returns char 64 192 utf8 utf8_general_ci char(64)
+1.0000 mysql proc returns longblob 4294967295 4294967295 NULL NULL longblob
1.0000 mysql proc body longblob 4294967295 4294967295 NULL NULL longblob
3.0000 mysql proc definer char 77 231 utf8 utf8_bin char(77)
NULL mysql proc created timestamp NULL NULL NULL NULL timestamp
@@ -13423,7 +13280,7 @@ SQL_PATH varchar(64) YES NULL
SECURITY_TYPE varchar(7) NO
CREATED datetime NO 0000-00-00 00:00:00
LAST_ALTERED datetime NO 0000-00-00 00:00:00
-SQL_MODE longtext NO
+SQL_MODE longtext NO NULL
ROUTINE_COMMENT varchar(64) NO
DEFINER varchar(77) NO
CHARACTER_SET_CLIENT varchar(32) NO
@@ -13484,7 +13341,7 @@ NULL information_schema routines SQL_PATH 14 NULL YES varchar 64 192 NULL NULL u
NULL information_schema routines SECURITY_TYPE 15 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select
NULL information_schema routines CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema routines LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select
-NULL information_schema routines SQL_MODE 18 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema routines SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema routines ROUTINE_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema routines DEFINER 20 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
NULL information_schema routines CHARACTER_SET_CLIENT 21 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
@@ -14336,7 +14193,7 @@ NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #
NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO#
NULL information_schema VIEWS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO#
SELECT * FROM information_schema.tables
-WHERE NOT( table_schema = 'information_schema');
+WHERE NOT( table_schema = 'information_schema') AND NOT (table_schema = 'mysql' AND table_name LIKE 'help_%');
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT
NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
NULL db_datadict tb2 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
@@ -14347,10 +14204,6 @@ NULL mysql db BASE TABLE MyISAM 10 Fixed 3 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-
NULL mysql event BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Events
NULL mysql func BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL User defined functions
NULL mysql general_log BASE TABLE CSV 10 Dynamic 1 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL General log
-NULL mysql help_category BASE TABLE MyISAM 10 Fixed 37 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help categories
-NULL mysql help_keyword BASE TABLE MyISAM 10 Fixed 424 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help keywords
-NULL mysql help_relation BASE TABLE MyISAM 10 Fixed 901 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL keyword-topic relation
-NULL mysql help_topic BASE TABLE MyISAM 10 Dynamic 479 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help topics
NULL mysql host BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Host privileges; Merged with database privileges
NULL mysql ndb_binlog_index BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
NULL mysql plugin BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL MySQL plugins
@@ -14397,7 +14250,7 @@ Field Type Null Key Default Extra
TABLE_CATALOG varchar(4096) YES NULL
TABLE_SCHEMA varchar(64) NO
TABLE_NAME varchar(64) NO
-VIEW_DEFINITION longtext NO
+VIEW_DEFINITION longtext NO NULL
CHECK_OPTION varchar(8) NO
IS_UPDATABLE varchar(3) NO
DEFINER varchar(77) NO
@@ -14432,7 +14285,7 @@ TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAUL
NULL information_schema views TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select
NULL information_schema views TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema views TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
-NULL information_schema views VIEW_DEFINITION 4 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema views VIEW_DEFINITION 4 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext 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 IS_UPDATABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema views DEFINER 7 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
@@ -14579,7 +14432,8 @@ TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_
root@localhost db_datadict_2
REVOKE SELECT ON db_datadict.tb_6_401402_1 FROM 'user_1'@'localhost';
-SELECT * FROM information_schema.statistics;
+SELECT * FROM information_schema.statistics
+WHERE NOT (table_schema = 'mysql' AND table_name LIKE 'help_%');
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT
NULL db_datadict tb_6_401402_1 0 db_datadict PRIMARY 1 f1 A 0 NULL NULL BTREE
NULL db_datadict tb_6_401402_1 1 db_datadict f2_ind 1 f2 A NULL NULL NULL YES BTREE
@@ -14601,14 +14455,6 @@ NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE
NULL mysql event 0 mysql PRIMARY 1 db A NULL NULL NULL BTREE
NULL mysql event 0 mysql PRIMARY 2 name A 0 NULL NULL BTREE
NULL mysql func 0 mysql PRIMARY 1 name A 0 NULL NULL BTREE
-NULL mysql help_category 0 mysql PRIMARY 1 help_category_id A 37 NULL NULL BTREE
-NULL mysql help_category 0 mysql name 1 name A 37 NULL NULL BTREE
-NULL mysql help_keyword 0 mysql PRIMARY 1 help_keyword_id A 424 NULL NULL BTREE
-NULL mysql help_keyword 0 mysql name 1 name A 424 NULL NULL BTREE
-NULL mysql help_relation 0 mysql PRIMARY 1 help_keyword_id A NULL NULL NULL BTREE
-NULL mysql help_relation 0 mysql PRIMARY 2 help_topic_id A 901 NULL NULL BTREE
-NULL mysql help_topic 0 mysql PRIMARY 1 help_topic_id A 479 NULL NULL BTREE
-NULL mysql help_topic 0 mysql name 1 name A 479 NULL NULL BTREE
NULL mysql host 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE
NULL mysql host 0 mysql PRIMARY 2 Db A 0 NULL NULL BTREE
NULL mysql ndb_binlog_index 0 mysql PRIMARY 1 epoch A 0 NULL NULL BTREE
@@ -15212,7 +15058,7 @@ EVENT_OBJECT_SCHEMA varchar(64) NO
EVENT_OBJECT_TABLE varchar(64) NO
ACTION_ORDER bigint(4) NO 0
ACTION_CONDITION longtext YES NULL
-ACTION_STATEMENT longtext NO
+ACTION_STATEMENT longtext NO NULL
ACTION_ORIENTATION varchar(9) NO
ACTION_TIMING varchar(6) NO
ACTION_REFERENCE_OLD_TABLE varchar(64) YES NULL
@@ -15220,8 +15066,8 @@ ACTION_REFERENCE_NEW_TABLE varchar(64) YES NULL
ACTION_REFERENCE_OLD_ROW varchar(3) NO
ACTION_REFERENCE_NEW_ROW varchar(3) NO
CREATED datetime YES NULL
-SQL_MODE longtext NO
-DEFINER longtext NO
+SQL_MODE longtext NO NULL
+DEFINER longtext NO NULL
CHARACTER_SET_CLIENT varchar(32) NO
COLLATION_CONNECTION varchar(32) NO
DATABASE_COLLATION varchar(32) NO
@@ -15271,7 +15117,7 @@ NULL information_schema triggers EVENT_OBJECT_SCHEMA 6 NO varchar 64 192 NULL N
NULL information_schema triggers EVENT_OBJECT_TABLE 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) 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_CONDITION 9 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
-NULL information_schema triggers ACTION_STATEMENT 10 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema triggers ACTION_STATEMENT 10 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema triggers ACTION_ORIENTATION 11 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select
NULL information_schema triggers ACTION_TIMING 12 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select
NULL information_schema triggers ACTION_REFERENCE_OLD_TABLE 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
@@ -15279,8 +15125,8 @@ NULL information_schema triggers ACTION_REFERENCE_NEW_TABLE 14 NULL YES varchar
NULL information_schema triggers ACTION_REFERENCE_OLD_ROW 15 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema triggers ACTION_REFERENCE_NEW_ROW 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema triggers CREATED 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
-NULL information_schema triggers SQL_MODE 18 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
-NULL information_schema triggers DEFINER 19 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema triggers SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema triggers DEFINER 19 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema triggers CHARACTER_SET_CLIENT 20 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema triggers COLLATION_CONNECTION 21 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema triggers DATABASE_COLLATION 22 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_03e.result b/mysql-test/suite/funcs_1/r/innodb_trig_03e.result
index 0ccb27b9a48..0b3c0098658 100644
--- a/mysql-test/suite/funcs_1/r/innodb_trig_03e.result
+++ b/mysql-test/suite/funcs_1/r/innodb_trig_03e.result
@@ -571,10 +571,8 @@ test_yesprivs@localhost
use priv_db;
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
-trg1_1 INSERT t1 set new.f1 = 'trig 1_1-yes' BEFORE NULL test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
select * from information_schema.triggers;
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
-NULL priv_db trg1_1 INSERT NULL priv_db t1 0 NULL set new.f1 = 'trig 1_1-yes' ROW BEFORE NULL NULL OLD NEW NULL test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
drop trigger trg1_1;
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
select current_user;
diff --git a/mysql-test/suite/funcs_1/r/innodb_views.result b/mysql-test/suite/funcs_1/r/innodb_views.result
index 48a97f80b14..b826f2a8449 100644
--- a/mysql-test/suite/funcs_1/r/innodb_views.result
+++ b/mysql-test/suite/funcs_1/r/innodb_views.result
@@ -169,6 +169,58 @@ insert into tb2 (f59,f60,f61) values (109,108,104);
INSERT INTO tb2 (f59,f60) VALUES( 299,899 );
INSERT INTO tb2 (f59,f60) VALUES( 242,79 );
INSERT INTO tb2 (f59,f60) VALUES( 424,89 );
+SELECT * FROM tb2 ORDER BY f59, f60, f61;
+f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109
+1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set
+2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set
+3 3 0000000003 0000000000000000000000000000000000000000000000000000000000000003 0000000003 0000000000000000000000000000000000000000000000000000000000000003 -3 2.200000000000000000000000000000 3 2.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494348e-38 1.17549e-38 1.175494354e-38 01.17549e-38 00000001.175494354e-38 01.17549e-38 00000001.175494354e-38 1000-01-03 838:59:56 1970-01-04 00:00:03 1970-01-04 00:00:03 1904 1904 1904 2enum 1set
+4 4 0000000004 0000000000000000000000000000000000000000000000000000000000000004 0000000004 0000000000000000000000000000000000000000000000000000000000000004 -2 3.300000000000000000000000000000 4 3.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494347e-38 1.17549e-38 1.175494355e-38 01.17549e-38 00000001.175494355e-38 01.17549e-38 00000001.175494355e-38 1000-01-04 838:59:55 1970-01-05 00:00:04 1970-01-05 00:00:04 1905 1905 1905 1enum 2set
+4 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+5 5 0000000005 0000000000000000000000000000000000000000000000000000000000000005 0000000005 0000000000000000000000000000000000000000000000000000000000000005 -1 4.400000000000000000000000000000 5 4.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494346e-38 1.17549e-38 1.175494356e-38 01.17549e-38 00000001.175494356e-38 01.17549e-38 00000001.175494356e-38 1000-01-05 838:59:54 1970-01-06 00:00:05 1970-01-06 00:00:05 1906 1906 1906 2enum 1set,2set
+6 6 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0 5.500000000000000000000000000000 6 5.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494345e-38 1.17549e-38 1.175494357e-38 01.17549e-38 00000001.175494357e-38 01.17549e-38 00000001.175494357e-38 1000-01-06 838:59:53 1970-01-07 00:00:06 1970-01-07 00:00:06 1907 1907 1907 1enum 1set
+7 7 0000000007 0000000000000000000000000000000000000000000000000000000000000007 0000000007 0000000000000000000000000000000000000000000000000000000000000007 1 6.600000000000000000000000000000 7 6.600000000000000000000000000000 0000000007 000000000000000000000000000000006.600000000000000000000000000000 0000000007 000000000000000000000000000000006.600000000000000000000000000000 -1.175494344e-38 1.175494358e-38 00000001.175494358e-38 00000001.175494358e-38 -1.175494344e-38 1.175494358e-38 00000001.175494358e-38 00000001.175494358e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494344e-38 1.17549e-38 1.175494358e-38 01.17549e-38 00000001.175494358e-38 01.17549e-38 00000001.175494358e-38 1000-01-07 838:59:52 1970-01-08 00:00:07 1970-01-08 00:00:07 1908 1908 1908 2enum 2set
+8 8 0000000008 0000000000000000000000000000000000000000000000000000000000000008 0000000008 0000000000000000000000000000000000000000000000000000000000000008 2 7.700000000000000000000000000000 8 7.700000000000000000000000000000 0000000008 000000000000000000000000000000007.700000000000000000000000000000 0000000008 000000000000000000000000000000007.700000000000000000000000000000 -1.175494343e-38 1.175494359e-38 00000001.175494359e-38 00000001.175494359e-38 -1.175494343e-38 1.175494359e-38 00000001.175494359e-38 00000001.175494359e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494343e-38 1.17549e-38 1.175494359e-38 01.17549e-38 00000001.175494359e-38 01.17549e-38 00000001.175494359e-38 1000-01-08 838:59:51 1970-01-09 00:00:08 1970-01-09 00:00:08 1909 1909 1909 1enum 1set,2set
+9 9 0000000009 0000000000000000000000000000000000000000000000000000000000000009 0000000009 0000000000000000000000000000000000000000000000000000000000000009 3 8.800000000000000000000000000000 9 8.800000000000000000000000000000 0000000009 000000000000000000000000000000008.800000000000000000000000000000 0000000009 000000000000000000000000000000008.800000000000000000000000000000 -1.175494342e-38 1.17549436e-38 000000001.17549436e-38 000000001.17549436e-38 -1.175494342e-38 1.17549436e-38 000000001.17549436e-38 000000001.17549436e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494342e-38 1.17549e-38 1.17549436e-38 01.17549e-38 000000001.17549436e-38 01.17549e-38 000000001.17549436e-38 1000-01-09 838:59:50 1970-01-10 00:00:09 1970-01-10 00:00:09 1910 1910 1910 2enum 1set
+10 10 0000000010 0000000000000000000000000000000000000000000000000000000000000010 0000000010 0000000000000000000000000000000000000000000000000000000000000010 4 9.900000000000000000000000000000 10 9.900000000000000000000000000000 0000000010 000000000000000000000000000000009.900000000000000000000000000000 0000000010 000000000000000000000000000000009.900000000000000000000000000000 -1.175494341e-38 1.175494361e-38 00000001.175494361e-38 00000001.175494361e-38 -1.175494341e-38 1.175494361e-38 00000001.175494361e-38 00000001.175494361e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494341e-38 1.17549e-38 1.175494361e-38 01.17549e-38 00000001.175494361e-38 01.17549e-38 00000001.175494361e-38 1000-01-10 838:59:49 1970-01-11 00:00:10 1970-01-11 00:00:10 1911 1911 1911 1enum 2set
+15 87 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+17 15 0000000016 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+19 18 0000000014 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+22 93 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+24 51654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+27 25 0000000026 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+29 28 0000000024 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+34 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+94 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+107 105 0000000106 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+107 105 0000000106 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+109 108 0000000104 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+109 108 0000000104 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+195 87 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+207 205 0000000206 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+209 208 0000000204 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+242 79 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+250 87895654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+292 93 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+299 899 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+321 NULL 0000000765 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+323 14376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+340 9984376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+394 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+424 89 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+441 16546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+660 876546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+987 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+2550 775654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+2760 985654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+3330 764376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+3410 996546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+7876 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+9112 NULL 0000008771 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+76710 226546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+569300 9114376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
Use test;
Testcase 3.3.1.1
@@ -203,27 +255,27 @@ f59 f60 f61
8 8 0000000008
9 9 0000000009
CREATE or REPLACE VIEW v1 AS select f59,f60,f61
-FROM test.tb2 limit 4,3;
-select * FROM v1 order by f59,f60,f61 limit 0,10;
+FROM test.tb2;
+select * FROM v1 order by f59,f60,f61 limit 4,3;
f59 f60 f61
+4 74 NULL
5 5 0000000005
6 6 0000000006
-7 7 0000000007
CREATE or REPLACE VIEW v1 AS select distinct f59
-FROM test.tb2 limit 4,3;
-select * FROM v1 order by f59 limit 0,10;
+FROM test.tb2;
+select * FROM v1 order by f59 limit 4,3;
f59
5
6
7
ALTER VIEW v1 AS select f59
-FROM test.tb2 limit 6,2;
-select * FROM v1 order by f59 limit 0,10;
+FROM test.tb2;
+select * FROM v1 order by f59 limit 6,2;
f59
+6
7
-8
CREATE or REPLACE VIEW v1 AS select f59
-from tb2 order by f59 limit 100;
+from tb2 order by f59;
select * FROM v1 order by f59 limit 0,10;
f59
1
@@ -237,7 +289,7 @@ f59
8
9
CREATE or REPLACE VIEW v1 AS select f59
-from tb2 order by f59 asc limit 100;
+from tb2 order by f59 asc;
select * FROM v1 limit 0,10;
f59
1
@@ -251,7 +303,7 @@ f59
8
9
CREATE or REPLACE VIEW v1 AS select f59
-from tb2 order by f59 desc limit 100;
+from tb2 order by f59 desc;
select * FROM v1 limit 0,10;
f59
569300
@@ -265,7 +317,7 @@ f59
987
660
CREATE or REPLACE VIEW v1 AS select f59
-from tb2 group by f59 limit 100;
+from tb2 group by f59;
select * FROM v1 order by f59 limit 0,10;
f59
1
@@ -279,7 +331,7 @@ f59
9
10
CREATE or REPLACE VIEW v1 AS select f59
-from tb2 group by f59 asc limit 100;
+from tb2 group by f59 asc;
select * FROM v1 order by f59 limit 0,10;
f59
1
@@ -293,7 +345,7 @@ f59
9
10
CREATE or REPLACE VIEW v1 AS select f59
-from tb2 group by f59 desc limit 100;
+from tb2 group by f59 desc;
select * FROM v1 order by f59 limit 0,10;
f59
1
@@ -307,7 +359,7 @@ f59
9
10
CREATE or REPLACE VIEW v1 AS (select f59 from tb2)
-union (select f59 from t1) limit 100;
+union (select f59 from t1);
select * FROM v1 order by f59 limit 0,10;
f59
1
@@ -495,8 +547,8 @@ DROP VIEW v1;
Testcase 3.3.1.3 + 3.1.1.4
--------------------------------------------------------------------------------
DROP VIEW IF EXISTS v1 ;
-CREATE VIEW v1 or REPLACE AS Select * from tb2 my_table limit 50;
-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 'or REPLACE AS Select * from tb2 my_table limit 50' at line 1
+CREATE VIEW v1 or REPLACE AS Select * from tb2 my_table;
+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 'or REPLACE AS Select * from tb2 my_table' at line 1
CREATE VIEW v1 WITH CASCADED CHECK OPTION AS Select *
from tb2 my_table limit 50;
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 'WITH CASCADED CHECK OPTION AS Select *
@@ -505,8 +557,8 @@ CREATE VIEW v1 WITH LOCAL CHECK OPTION AS Select *
from tb2 my_table limit 50;
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 'WITH LOCAL CHECK OPTION AS Select *
from tb2 my_table limit 50' at line 1
-SELECT * FROM tb2 my_table CREATE VIEW As v1 limit 100 ;
-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 'CREATE VIEW As v1 limit 100' at line 1
+SELECT * FROM tb2 my_table CREATE VIEW As v1;
+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 'CREATE VIEW As v1' at line 1
CREATE or REPLACE VIEW v1 Select f59, f60
from test.tb2 my_table where f59 = 250 ;
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 'Select f59, f60
@@ -581,8 +633,8 @@ Union ALL (Select from f1 t1);
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 'from f59 tb2)
Union ALL (Select from f1 t1)' at line 1
CREATE or REPLACE view v1 as Select f59, f60
-from tb2 by order f59 limit 100 ;
-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 'by order f59 limit 100' at line 2
+from tb2 by order f59;
+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 'by order f59' at line 2
CREATE or REPLACE view v1 as Select f59, f60
from tb2 by group f59 ;
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 'by group f59' at line 2
@@ -590,12 +642,12 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
Testcase 3.3.1.5
--------------------------------------------------------------------------------
DROP VIEW IF EXISTS v1 ;
-CREATE VIEW v1 SELECT * FROM tb2 limit 100 ;
-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 'SELECT * FROM tb2 limit 100' at line 1
-CREATE v1 AS SELECT * FROM tb2 limit 100 ;
-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 'v1 AS SELECT * FROM tb2 limit 100' at line 1
-VIEW v1 AS SELECT * FROM tb2 limit 100 ;
-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 'VIEW v1 AS SELECT * FROM tb2 limit 100' at line 1
+CREATE VIEW v1 SELECT * FROM tb2;
+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 'SELECT * FROM tb2' at line 1
+CREATE v1 AS SELECT * FROM tb2;
+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 'v1 AS SELECT * FROM tb2' at line 1
+VIEW v1 AS SELECT * FROM tb2;
+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 'VIEW v1 AS SELECT * FROM tb2' at line 1
CREATE VIEW v1 AS SELECT 1;
DROP VIEW v1;
VIEW v1 AS SELECT 1;
@@ -613,45 +665,43 @@ Testcase 3.3.1.6
--------------------------------------------------------------------------------
DROP VIEW IF EXISTS v1 ;
CREATE or REPLACE VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
CREATE or REPLACE ALGORITHM = UNDEFINED VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
CREATE or REPLACE ALGORITHM = MERGE VIEW v1
-as SELECT * from tb2 limit 100 ;
-Warnings:
-Warning 1354 View merge algorithm can't be used here for now (assumed undefined algorithm)
+as SELECT * from tb2;
CREATE or REPLACE ALGORITHM = TEMPTABLE VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
CREATE or REPLACE ALGORITHM = TEMPTABLE VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
CREATE or REPLACE = TEMPTABLE VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
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 '= TEMPTABLE VIEW v1
-as SELECT * from tb2 limit 100' at line 1
+as SELECT * from tb2' at line 1
CREATE or REPLACE ALGORITHM TEMPTABLE VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
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 'TEMPTABLE VIEW v1
-as SELECT * from tb2 limit 100' at line 1
+as SELECT * from tb2' at line 1
CREATE or REPLACE ALGORITHM = VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
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 'VIEW v1
-as SELECT * from tb2 limit 100' at line 1
+as SELECT * from tb2' at line 1
CREATE or REPLACE TEMPTABLE = ALGORITHM VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
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 'TEMPTABLE = ALGORITHM VIEW v1
-as SELECT * from tb2 limit 100' at line 1
+as SELECT * from tb2' at line 1
CREATE or REPLACE TEMPTABLE - ALGORITHM VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
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 'TEMPTABLE - ALGORITHM VIEW v1
-as SELECT * from tb2 limit 100' at line 1
+as SELECT * from tb2' at line 1
CREATE or REPLACE GARBAGE = TEMPTABLE VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
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 'GARBAGE = TEMPTABLE VIEW v1
-as SELECT * from tb2 limit 100' at line 1
+as SELECT * from tb2' at line 1
CREATE or REPLACE ALGORITHM = GARBAGE VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
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 'GARBAGE VIEW v1
-as SELECT * from tb2 limit 100' at line 1
+as SELECT * from tb2' at line 1
Drop view if exists v1 ;
CREATE or REPLACE VIEW v1
AS SELECT * from tb2 where f59 < 1;
@@ -677,7 +727,7 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
Testcase 3.3.1.7
--------------------------------------------------------------------------------
DROP VIEW IF EXISTS v1 ;
-Create view test.v1 AS Select * from test.tb2 limit 100 ;
+Create view test.v1 AS Select * from test.tb2;
Alter view test.v1 AS Select F59 from test. tb2 limit 100 ;
Drop view test.v1 ;
Create view v1 AS Select * from test.tb2 limit 100 ;
@@ -884,13 +934,13 @@ SELECT * FROM test.v1 order by f59,f60,f61,f62,f63,f64,f65;
f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109
1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set
2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set
-CREATE OR REPLACE VIEW test.v1 AS SELECT F59 FROM tb2 limit 10,100;
+CREATE OR REPLACE VIEW test.v1 AS SELECT F59 FROM tb2;
SHOW CREATE VIEW test.v1;
View Create View character_set_client collation_connection
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `tb2`.`f59` AS `F59` from `tb2` limit 10,100 latin1 latin1_swedish_ci
-SELECT * FROM test.v1 order by F59;
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `tb2`.`f59` AS `F59` from `tb2` latin1 latin1_swedish_ci
+SELECT * FROM test.v1 order by F59 limit 10,100;
F59
-4
+10
15
17
19
@@ -943,8 +993,8 @@ ERROR HY000: 'test.tb2' is not VIEW
Testcase 3.3.1.15
--------------------------------------------------------------------------------
Drop table if exists test.v1 ;
-CREATE OR REPLACE view test.v1 as select * from tb2 LIMIT 2;
-SELECT * FROM test.v1;
+CREATE OR REPLACE view test.v1 as select * from tb2;
+SELECT * FROM test.v1 ORDER BY f59,f60,f61 LIMIT 2;
f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109
1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set
2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set
@@ -1080,8 +1130,8 @@ ERROR HY000: View's SELECT and view's field list have different column counts
Testcase 3.3.1.21
--------------------------------------------------------------------------------
DROP VIEW IF EXISTS v1;
-CREATE VIEW test.v1( F59, F60 ) AS SELECT F59, F60 From tb2 LIMIT 2;
-SELECT * FROM test.v1 order by F59, F60 desc;
+CREATE VIEW test.v1( F59, F60 ) AS SELECT F59, F60 From tb2;
+SELECT * FROM test.v1 order by F59, F60 desc LIMIT 2;
F59 F60
1 1
2 2
@@ -1090,17 +1140,17 @@ Drop view if exists test.v1 ;
Testcase 3.3.1.22
--------------------------------------------------------------------------------
DROP VIEW IF EXISTS v1;
-CREATE VIEW test.v1( product ) AS SELECT f59*f60 From tb2 LIMIT 2;
-SELECT * FROM test.v1;
+CREATE VIEW test.v1( product ) AS SELECT f59*f60 From tb2;
+SELECT * FROM test.v1 WHERE product IS NOT NULL ORDER BY product LIMIT 2;
product
1
4
CREATE OR REPLACE VIEW test.v1( product ) AS SELECT 1*2;
-SELECT * FROM test.v1;
+SELECT * FROM test.v1 LIMIT 2;
product
2
CREATE OR REPLACE VIEW test.v1( product ) AS SELECT USER();
-SELECT * FROM test.v1;
+SELECT * FROM test.v1 LIMIT 2;
product
root@localhost
Drop view if exists test.v1 ;
@@ -1177,8 +1227,8 @@ DROP TEMPORARY TABLE t2;
Testcase 3.3.1.26
--------------------------------------------------------------------------------
DROP VIEW IF EXISTS v1;
-Create view test.v1 AS Select * from test.tb2 limit 2 ;
-Select * from test.v1;
+Create view test.v1 AS Select * from test.tb2;
+Select * from test.v1 order by f59, f60, f61 limit 2;
f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109
1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set
2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set
@@ -1188,9 +1238,9 @@ Testcase 3.3.1.27
--------------------------------------------------------------------------------
DROP VIEW IF EXISTS test.v1;
Drop VIEW IF EXISTS test.v1_1 ;
-Create view test.v1 AS Select * from test.tb2 limit 2 ;
+Create view test.v1 AS Select * from test.tb2;
Create view test.v1_1 AS Select F59 from test.v1 ;
-Select * from test.v1_1 order by F59 limit 20 ;
+Select * from test.v1_1 order by F59 limit 2;
F59
1
2
@@ -1737,29 +1787,29 @@ Drop view if exists test.v1 ;
Drop view if exists test.v1_main;
Drop view if exists test1.v1_1 ;
Drop database if exists test3 ;
-Create view test.v1 as Select f59, f60 FROM test.tb2 limit 20 ;
-Select * from test.v1 order by f59,f60;
+Create view test.v1 as Select f59, f60 FROM test.tb2;
+Select * from test.v1 order by f59,f60 limit 20;
f59 f60
1 1
2 2
3 3
4 4
+4 74
5 5
6 6
7 7
8 8
9 9
10 10
-250 87895654
-340 9984376
-441 16546
-660 876546
-2550 775654
-2760 985654
-3330 764376
-3410 996546
-76710 226546
-569300 9114376
+15 87
+17 15
+19 18
+22 93
+24 51654
+27 25
+29 28
+34 41
+94 74
Create table test1.t1 (f59 int,f60 int) ;
Insert into test1.t1 values (199,507) ;
Create view test1.v1_1 as Select f59,f60 from test1.t1 ;
@@ -9649,8 +9699,8 @@ WHERE v3_to_v1_options LIKE ' %' AND errno <> 0
ORDER BY v3_to_v1_options;
v3_to_v1_options statement v3_to_v1_violation errno
SELECT * FROM t1_results
-WHERE v3_to_v1_options LIKE 'WITH %'
-AND v3_to_v1_violation LIKE 'v3_%' AND errno = 0
+WHERE v3_to_v1_options LIKE 'WITH %'
+ AND v3_to_v1_violation LIKE 'v3_%' AND errno = 0
ORDER BY v3_to_v1_options;
v3_to_v1_options statement v3_to_v1_violation errno
SELECT * FROM t1_results
@@ -9670,17 +9720,17 @@ DROP TABLE t1_results;
Testcase 3.3.1.50 - 3.3.1.53
--------------------------------------------------------------------------------
DROP VIEW IF EXISTS test.v1;
-CREATE VIEW test.v1 AS SELECT * FROM test.tb2 limit 5 ;
-SELECT * FROM test.v1 order by f59 ;
+CREATE VIEW test.v1 AS SELECT * FROM test.tb2;
+SELECT * FROM test.v1 order by f59 limit 5;
f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109
1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set
2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set
3 3 0000000003 0000000000000000000000000000000000000000000000000000000000000003 0000000003 0000000000000000000000000000000000000000000000000000000000000003 -3 2.200000000000000000000000000000 3 2.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494348e-38 1.17549e-38 1.175494354e-38 01.17549e-38 00000001.175494354e-38 01.17549e-38 00000001.175494354e-38 1000-01-03 838:59:56 1970-01-04 00:00:03 1970-01-04 00:00:03 1904 1904 1904 2enum 1set
5 5 0000000005 0000000000000000000000000000000000000000000000000000000000000005 0000000005 0000000000000000000000000000000000000000000000000000000000000005 -1 4.400000000000000000000000000000 5 4.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494346e-38 1.17549e-38 1.175494356e-38 01.17549e-38 00000001.175494356e-38 01.17549e-38 00000001.175494356e-38 1000-01-05 838:59:54 1970-01-06 00:00:05 1970-01-06 00:00:05 1906 1906 1906 2enum 1set,2set
-100 4 0000000004 0000000000000000000000000000000000000000000000000000000000000004 0000000004 0000000000000000000000000000000000000000000000000000000000000004 -2 3.300000000000000000000000000000 4 3.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494347e-38 1.17549e-38 1.175494355e-38 01.17549e-38 00000001.175494355e-38 01.17549e-38 00000001.175494355e-38 1000-01-04 838:59:55 1970-01-05 00:00:04 1970-01-05 00:00:04 1905 1905 1905 1enum 2set
+6 6 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0 5.500000000000000000000000000000 6 5.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494345e-38 1.17549e-38 1.175494357e-38 01.17549e-38 00000001.175494357e-38 01.17549e-38 00000001.175494357e-38 1000-01-06 838:59:53 1970-01-07 00:00:06 1970-01-07 00:00:06 1907 1907 1907 1enum 1set
drop view test.v1 ;
-CREATE VIEW test.v1 AS SELECT F59,F61 FROM test.tb2 limit 50 ;
-SELECT * FROM test.v1 order by F59, F61 ;
+CREATE VIEW test.v1 AS SELECT F59,F61 FROM test.tb2;
+SELECT * FROM test.v1 order by F59, F61 limit 50;
F59 F61
1 0000000001
2 0000000002
@@ -9733,8 +9783,8 @@ F59 F61
76710 NULL
569300 NULL
drop view test.v1 ;
-CREATE VIEW test.v1 AS SELECT * FROM test.tb2 order by f59, f60, f61 limit 20 ;
-SELECT * FROM test.v1 order by f59,f60,f61 ;
+CREATE VIEW test.v1 AS SELECT * FROM test.tb2 order by f59, f60, f61;
+SELECT * FROM test.v1 order by f59,f60,f61 limit 20;
f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109
1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set
2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set
@@ -9757,8 +9807,8 @@ f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78
100 4 0000000004 0000000000000000000000000000000000000000000000000000000000000004 0000000004 0000000000000000000000000000000000000000000000000000000000000004 -2 3.300000000000000000000000000000 4 3.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494347e-38 1.17549e-38 1.175494355e-38 01.17549e-38 00000001.175494355e-38 01.17549e-38 00000001.175494355e-38 1000-01-04 838:59:55 1970-01-05 00:00:04 1970-01-05 00:00:04 1905 1905 1905 1enum 2set
100 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
drop view test.v1 ;
-CREATE VIEW test.v1 AS SELECT F59,f61 FROM test.tb2 limit 20 ;
-SELECT * FROM test.v1 order by f59,f61 desc limit 50;
+CREATE VIEW test.v1 AS SELECT F59,f61 FROM test.tb2;
+SELECT * FROM test.v1 order by f59,f61 desc limit 20;
F59 f61
1 0000000001
2 0000000002
@@ -9769,17 +9819,17 @@ F59 f61
8 0000000008
9 0000000009
10 0000000010
+15 NULL
+17 0000000016
+19 0000000014
+22 NULL
+24 NULL
+27 0000000026
+29 0000000024
+34 NULL
+94 NULL
100 0000000004
-250 NULL
-340 NULL
-441 NULL
-660 NULL
-2550 NULL
-2760 NULL
-3330 NULL
-3410 NULL
-76710 NULL
-569300 NULL
+100 NULL
drop view test.v1 ;
Testcase 3.3.1.54
@@ -9836,16 +9886,23 @@ f2
two
SET sql_mode = 'traditional,ansi';
CREATE OR REPLACE VIEW v1 AS
+SELECT f3 AS "pure column f3:", f1 + f3 AS "sum of columns f1 + f3 =",
+3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1):",
+'->' || CAST(f3 AS CHAR) || '<-'
+ AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR):"
+FROM t1 WHERE f1 = 2;
+CREATE OR REPLACE VIEW v1 AS
SELECT f3 AS "pure column f3: ", f1 + f3 AS "sum of columns f1 + f3 = ",
3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1): ",
'->' || CAST(f3 AS CHAR) || '<-'
AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): "
FROM t1 WHERE f1 = 2;
+ERROR 42000: Incorrect column name 'pure column f3: '
SELECT * FROM v1;
-pure column f3: 2.20000
-sum of columns f1 + f3 = 4.20000
-product of constants 3 * (- 0.11111E+1): -3.3333
-expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): ->2.20000<-
+pure column f3: 2.20000
+sum of columns f1 + f3 = 4.20000
+product of constants 3 * (- 0.11111E+1): -3.3333
+expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): ->2.20000<-
SET sql_mode = '';
Testcases 3.3.1.55 - 3.3.1.62
@@ -10413,9 +10470,9 @@ FIXME Is this a bug ?
EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
CAST(f2 AS CHAR) AS f2 FROM test1.v28;
DROP VIEW IF EXISTS test1.v28;
-CREATE OR REPLACE VIEW test1.v0 AS
+CREATE OR REPLACE VIEW test1.v0 AS
SELECT f1 as f2, f2 as f1 FROM test2.t1;
-CREATE OR REPLACE VIEW test2.v0 AS
+CREATE OR REPLACE VIEW test2.v0 AS
SELECT CAST('0001-01-01' AS DATE) as f1, f2 FROM test3.t1;
SHOW CREATE VIEW test1.v27;
SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
@@ -10874,7 +10931,7 @@ SET @variant5= 'CREATE VIEW v1 AS SELECT f61 FROM t1 HAVING f61 > 0';
SET @variant6= 'CREATE VIEW v1 AS SELECT (SELECT f60 FROM t2 WHERE f59=19) AS f61 FROM t1';
SET @variant7= 'CREATE VIEW v1 AS SELECT f61 FROM v2';
-Some server responses suffer from
+Some server responses suffer from
Bug#10773 Incorrect message is displayed while updating a view
--------------------------------------------------------------------------------
SET @variant8= 'CREATE VIEW v1 AS SELECT f59 AS f61 FROM t1 WHERE f60 IN (SELECT f59 FROM t1)';
@@ -10883,7 +10940,7 @@ CREATE ALGORITHM = TEMPTABLE VIEW v1 (f61) AS select f60 from t1;
INSERT INTO v1 VALUES (1002);
ERROR HY000: The target table v1 of the INSERT is not insertable-into
UPDATE v1 SET f61=1007;
-Got one of the listed errors
+ERROR HY000: The target table v1 of the UPDATE is not updatable
DELETE FROM v1;
ERROR HY000: The target table v1 of the DELETE is not updatable
DROP VIEW v1;
@@ -10891,7 +10948,7 @@ CREATE VIEW v1 AS SELECT f59 AS f61 FROM t1 WHERE f60 IN (SELECT f59 FROM t1);
INSERT INTO v1 VALUES (1002);
ERROR HY000: The target table v1 of the INSERT is not insertable-into
UPDATE v1 SET f61=1007;
-Got one of the listed errors
+ERROR HY000: The target table v1 of the UPDATE is not updatable
DELETE FROM v1;
ERROR HY000: The target table v1 of the DELETE is not updatable
DROP VIEW v1;
@@ -10899,7 +10956,7 @@ CREATE VIEW v1 AS SELECT f61 FROM v2;
INSERT INTO v1 VALUES (1002);
ERROR HY000: The target table v1 of the INSERT is not insertable-into
UPDATE v1 SET f61=1007;
-Got one of the listed errors
+ERROR HY000: The target table v1 of the UPDATE is not updatable
DELETE FROM v1;
ERROR HY000: The target table v1 of the DELETE is not updatable
DROP VIEW v1;
@@ -10907,7 +10964,7 @@ CREATE VIEW v1 AS SELECT (SELECT f60 FROM t2 WHERE f59=19) AS f61 FROM t1;
INSERT INTO v1 VALUES (1002);
ERROR HY000: The target table v1 of the INSERT is not insertable-into
UPDATE v1 SET f61=1007;
-Got one of the listed errors
+ERROR HY000: The target table v1 of the UPDATE is not updatable
DELETE FROM v1;
ERROR HY000: The target table v1 of the DELETE is not updatable
DROP VIEW v1;
@@ -10915,7 +10972,7 @@ CREATE VIEW v1 AS SELECT f61 FROM t1 HAVING f61 > 0;
INSERT INTO v1 VALUES (1002);
ERROR HY000: The target table v1 of the INSERT is not insertable-into
UPDATE v1 SET f61=1007;
-Got one of the listed errors
+ERROR HY000: The target table v1 of the UPDATE is not updatable
DELETE FROM v1;
ERROR HY000: The target table v1 of the DELETE is not updatable
DROP VIEW v1;
@@ -10923,7 +10980,7 @@ CREATE VIEW v1 AS SELECT f61 FROM t1 GROUP BY f61;
INSERT INTO v1 VALUES (1002);
ERROR HY000: The target table v1 of the INSERT is not insertable-into
UPDATE v1 SET f61=1007;
-Got one of the listed errors
+ERROR HY000: The target table v1 of the UPDATE is not updatable
DELETE FROM v1;
ERROR HY000: The target table v1 of the DELETE is not updatable
DROP VIEW v1;
@@ -10931,7 +10988,7 @@ CREATE VIEW v1 AS SELECT SUM(f59) AS f61 FROM t1;
INSERT INTO v1 VALUES (1002);
ERROR HY000: The target table v1 of the INSERT is not insertable-into
UPDATE v1 SET f61=1007;
-Got one of the listed errors
+ERROR HY000: The target table v1 of the UPDATE is not updatable
DELETE FROM v1;
ERROR HY000: The target table v1 of the DELETE is not updatable
DROP VIEW v1;
@@ -10939,7 +10996,7 @@ CREATE VIEW v1 AS SELECT DISTINCTROW(f61) FROM t1;
INSERT INTO v1 VALUES (1002);
ERROR HY000: The target table v1 of the INSERT is not insertable-into
UPDATE v1 SET f61=1007;
-Got one of the listed errors
+ERROR HY000: The target table v1 of the UPDATE is not updatable
DELETE FROM v1;
ERROR HY000: The target table v1 of the DELETE is not updatable
DROP VIEW v1;
@@ -10947,7 +11004,7 @@ CREATE VIEW v1 AS SELECT DISTINCT(f61) FROM t1;
INSERT INTO v1 VALUES (1002);
ERROR HY000: The target table v1 of the INSERT is not insertable-into
UPDATE v1 SET f61=1007;
-Got one of the listed errors
+ERROR HY000: The target table v1 of the UPDATE is not updatable
DELETE FROM v1;
ERROR HY000: The target table v1 of the DELETE is not updatable
DROP VIEW v1;
@@ -11116,9 +11173,9 @@ f1 f2 f4 report
4 NULL <------ 20 --------> t1 4
4 NULL <------ 20 --------> v1 4
ALTER TABLE t1 CHANGE COLUMN f1 f1 VARCHAR(30);
-INSERT INTO t1 SET f1 = '<------------- 30 ----------->',
+INSERT INTO t1 SET f1 = '<------------- 30 ----------->',
f4 = '<------ 20 -------->', report = 't1 5';
-INSERT INTO v1 SET f1 = '<------------- 30 ----------->',
+INSERT INTO v1 SET f1 = '<------------- 30 ----------->',
f4 = '<------ 20 -------->', report = 'v1 5';
DESCRIBE t1;
Field Type Null Key Default Extra
diff --git a/mysql-test/suite/funcs_1/r/memory__datadict.result b/mysql-test/suite/funcs_1/r/memory__datadict.result
index 2f9bbe6eafe..0a7c7f20437 100644
--- a/mysql-test/suite/funcs_1/r/memory__datadict.result
+++ b/mysql-test/suite/funcs_1/r/memory__datadict.result
@@ -10,8 +10,9 @@
. *__datadict.test are started. This can be a result of showing e.g. maximum
. values of the number of rows of tables.
.
-. This .result file has been checked OK with Linux 5.0.23-bk,
-. ChangeSet@1.2211, 2006-06-28 10:11:43-07:00.
+. This .result file has been checked OK with Linux 5.0.48,
+. build tree ChangeSet@1.2477.6.3, 2007-07-30
+. except that the not fixed Bug#30020 causes a difference.
.
--------------------------------------------------------------------------------
@@ -20,11 +21,21 @@ FIXME: There are subtests that are switched off due to known bugs:
SELECT 1 AS "have_bug_11589";
have_bug_11589
1
+SELECT 1 AS "have_bug_30689";
+have_bug_30689
+1
There are some statements where the ps-protocol is switched off.
This may come from the bug listed below, ir from other problems.
Bug#11589: mysqltest, --ps-protocol, strange output, float/double/real with zerofill
--------------------------------------------------------------------------------
+
+Selects on INFORMATION_SCHEMA.VIEWS present incomplete
+content for the column VIEW_DEFINITION in cases where
+the view selects(=is based) on an INFORMATION_SCHEMA table.
+---> VIEWS vu and vu1
+Bug#30689 Wrong content in I_S.VIEWS.VIEW_DEFINITION if VIEW is based on I_S
+--------------------------------------------------------------------------------
SET @NO_REFRESH = IF( '' = '', 0, 1);
DROP DATABASE IF EXISTS test1;
CREATE DATABASE test1;
@@ -1033,7 +1044,8 @@ CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT
SELECT * FROM tables
-WHERE NOT( table_schema = 'information_schema');
+WHERE NOT( table_schema = 'information_schema')
+AND NOT (table_schema = 'mysql' AND table_name LIKE 'help_%');
TABLE_CATALOG NULL
TABLE_SCHEMA db_datadict
TABLE_NAME v1
@@ -1204,90 +1216,6 @@ CREATE_OPTIONS
TABLE_COMMENT General log
TABLE_CATALOG NULL
TABLE_SCHEMA mysql
-TABLE_NAME help_category
-TABLE_TYPE BASE TABLE
-ENGINE MyISAM
-VERSION 10
-ROW_FORMAT Fixed
-TABLE_ROWS 37
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME YYYY-MM-DD hh:mm:ss
-UPDATE_TIME YYYY-MM-DD hh:mm:ss
-CHECK_TIME YYYY-MM-DD hh:mm:ss
-TABLE_COLLATION utf8_general_ci
-CHECKSUM NULL
-CREATE_OPTIONS
-TABLE_COMMENT help categories
-TABLE_CATALOG NULL
-TABLE_SCHEMA mysql
-TABLE_NAME help_keyword
-TABLE_TYPE BASE TABLE
-ENGINE MyISAM
-VERSION 10
-ROW_FORMAT Fixed
-TABLE_ROWS 424
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME YYYY-MM-DD hh:mm:ss
-UPDATE_TIME YYYY-MM-DD hh:mm:ss
-CHECK_TIME YYYY-MM-DD hh:mm:ss
-TABLE_COLLATION utf8_general_ci
-CHECKSUM NULL
-CREATE_OPTIONS
-TABLE_COMMENT help keywords
-TABLE_CATALOG NULL
-TABLE_SCHEMA mysql
-TABLE_NAME help_relation
-TABLE_TYPE BASE TABLE
-ENGINE MyISAM
-VERSION 10
-ROW_FORMAT Fixed
-TABLE_ROWS 901
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME YYYY-MM-DD hh:mm:ss
-UPDATE_TIME YYYY-MM-DD hh:mm:ss
-CHECK_TIME YYYY-MM-DD hh:mm:ss
-TABLE_COLLATION utf8_general_ci
-CHECKSUM NULL
-CREATE_OPTIONS
-TABLE_COMMENT keyword-topic relation
-TABLE_CATALOG NULL
-TABLE_SCHEMA mysql
-TABLE_NAME help_topic
-TABLE_TYPE BASE TABLE
-ENGINE MyISAM
-VERSION 10
-ROW_FORMAT Dynamic
-TABLE_ROWS 479
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME YYYY-MM-DD hh:mm:ss
-UPDATE_TIME YYYY-MM-DD hh:mm:ss
-CHECK_TIME YYYY-MM-DD hh:mm:ss
-TABLE_COLLATION utf8_general_ci
-CHECKSUM NULL
-CREATE_OPTIONS
-TABLE_COMMENT help topics
-TABLE_CATALOG NULL
-TABLE_SCHEMA mysql
TABLE_NAME host
TABLE_TYPE BASE TABLE
ENGINE MyISAM
@@ -2336,9 +2264,9 @@ NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 1
NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
-NULL information_schema COLUMNS COLUMN_TYPE 15 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema COLUMNS COLUMN_TYPE 15 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema COLUMNS COLUMN_KEY 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
-NULL information_schema COLUMNS EXTRA 17 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select
+NULL information_schema COLUMNS EXTRA 17 NO varchar 27 81 NULL NULL utf8 utf8_general_ci varchar(27) select
NULL information_schema COLUMNS PRIVILEGES 18 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select
NULL information_schema COLUMNS COLUMN_COMMENT 19 NO varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select
NULL information_schema COLUMN_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select
@@ -2360,12 +2288,12 @@ NULL information_schema EVENTS EVENT_NAME 3 NO varchar 64 192 NULL NULL utf8 ut
NULL information_schema EVENTS DEFINER 4 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
NULL information_schema EVENTS TIME_ZONE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema EVENTS EVENT_BODY 6 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select
-NULL information_schema EVENTS EVENT_DEFINITION 7 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema EVENTS EVENT_DEFINITION 7 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema EVENTS EVENT_TYPE 8 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select
NULL information_schema EVENTS EXECUTE_AT 9 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS INTERVAL_VALUE 10 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select
NULL information_schema EVENTS INTERVAL_FIELD 11 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select
-NULL information_schema EVENTS SQL_MODE 12 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema EVENTS SQL_MODE 12 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema EVENTS STARTS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS ENDS 14 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS STATUS 15 NO varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select
@@ -2503,7 +2431,7 @@ NULL information_schema ROUTINES SQL_PATH 14 NULL YES varchar 64 192 NULL NULL u
NULL information_schema ROUTINES SECURITY_TYPE 15 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select
NULL information_schema ROUTINES CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema ROUTINES LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select
-NULL information_schema ROUTINES SQL_MODE 18 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema ROUTINES SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema ROUTINES ROUTINE_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema ROUTINES DEFINER 20 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
NULL information_schema ROUTINES CHARACTER_SET_CLIENT 21 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
@@ -2580,7 +2508,7 @@ NULL information_schema TRIGGERS EVENT_OBJECT_SCHEMA 6 NO varchar 64 192 NULL N
NULL information_schema TRIGGERS EVENT_OBJECT_TABLE 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) 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_CONDITION 9 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
-NULL information_schema TRIGGERS ACTION_STATEMENT 10 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema TRIGGERS ACTION_STATEMENT 10 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema TRIGGERS ACTION_ORIENTATION 11 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select
NULL information_schema TRIGGERS ACTION_TIMING 12 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select
NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_TABLE 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
@@ -2588,8 +2516,8 @@ NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_TABLE 14 NULL YES varchar
NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW 15 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema TRIGGERS CREATED 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
-NULL information_schema TRIGGERS SQL_MODE 18 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
-NULL information_schema TRIGGERS DEFINER 19 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema TRIGGERS SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema TRIGGERS DEFINER 19 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema TRIGGERS CHARACTER_SET_CLIENT 20 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema TRIGGERS COLLATION_CONNECTION 21 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema TRIGGERS DATABASE_COLLATION 22 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
@@ -2600,7 +2528,7 @@ NULL information_schema USER_PRIVILEGES IS_GRANTABLE 4 NO varchar 3 9 NULL NULL
NULL information_schema VIEWS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select
NULL information_schema VIEWS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema VIEWS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
-NULL information_schema VIEWS VIEW_DEFINITION 4 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema VIEWS VIEW_DEFINITION 4 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext 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 IS_UPDATABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema VIEWS DEFINER 7 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
@@ -2637,7 +2565,7 @@ NULL mysql columns_priv Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PR
NULL mysql columns_priv User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references
NULL mysql columns_priv Table_name 4 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
NULL mysql columns_priv Column_name 5 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
-NULL mysql columns_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
+NULL mysql columns_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL mysql columns_priv Column_priv 7 NO set 31 93 NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','References') select,insert,update,references
NULL mysql db Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references
NULL mysql db Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
@@ -2668,7 +2596,7 @@ NULL mysql event definer 4 NO char 77 231 NULL NULL utf8 utf8_bin char(77) se
NULL mysql event execute_at 5 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references
NULL mysql event interval_value 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
NULL mysql event interval_field 7 NULL YES enum 18 54 NULL NULL utf8 utf8_general_ci enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') select,insert,update,references
-NULL mysql event created 8 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
+NULL mysql event created 8 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL mysql event modified 9 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
NULL mysql event last_executed 10 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references
NULL mysql event starts 11 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references
@@ -2687,12 +2615,12 @@ NULL mysql func name 1 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI sel
NULL mysql func ret 2 0 NO tinyint NULL NULL 3 0 NULL NULL tinyint(1) select,insert,update,references
NULL mysql func dl 3 NO char 128 384 NULL NULL utf8 utf8_bin char(128) select,insert,update,references
NULL mysql func type 4 NULL NO enum 9 27 NULL NULL utf8 utf8_general_ci enum('function','aggregate') select,insert,update,references
-NULL mysql general_log event_time 1 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
-NULL mysql general_log user_host 2 NULL YES mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
-NULL mysql general_log thread_id 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
-NULL mysql general_log server_id 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
-NULL mysql general_log command_type 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
-NULL mysql general_log argument 6 NULL YES mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
+NULL mysql general_log event_time 1 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
+NULL mysql general_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
+NULL mysql general_log thread_id 3 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
+NULL mysql general_log server_id 4 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
+NULL mysql general_log command_type 5 NULL NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+NULL mysql general_log argument 6 NULL NO mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
NULL mysql help_category help_category_id 1 NULL NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned PRI select,insert,update,references
NULL mysql help_category name 2 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) UNI select,insert,update,references
NULL mysql help_category parent_category_id 3 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references
@@ -2745,10 +2673,10 @@ NULL mysql proc sql_data_access 6 CONTAINS_SQL NO enum 17 51 NULL NULL utf8 utf8
NULL mysql proc is_deterministic 7 NO NO enum 3 9 NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references
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 param_list 9 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references
-NULL mysql proc returns 10 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
+NULL mysql proc returns 10 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references
NULL mysql proc body 11 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references
NULL mysql proc definer 12 NO char 77 231 NULL NULL utf8 utf8_bin char(77) select,insert,update,references
-NULL mysql proc created 13 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
+NULL mysql proc created 13 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL mysql proc modified 14 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
NULL mysql proc sql_mode 15 NO set 431 1293 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') select,insert,update,references
NULL mysql proc comment 16 NO char 64 192 NULL NULL utf8 utf8_bin char(64) select,insert,update,references
@@ -2763,7 +2691,7 @@ NULL mysql procs_priv Routine_name 4 NO char 64 192 NULL NULL utf8 utf8_bin cha
NULL mysql procs_priv Routine_type 5 NULL NO enum 9 27 NULL NULL utf8 utf8_bin enum('FUNCTION','PROCEDURE') 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
NULL mysql procs_priv Proc_priv 7 NO set 27 81 NULL NULL utf8 utf8_general_ci set('Execute','Alter Routine','Grant') select,insert,update,references
-NULL mysql procs_priv Timestamp 8 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
+NULL mysql procs_priv Timestamp 8 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL mysql servers Server_name 1 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) PRI select,insert,update,references
NULL mysql servers Host 2 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
NULL mysql servers Db 3 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
@@ -2773,23 +2701,23 @@ NULL mysql servers Port 6 0 NO int NULL NULL 10 0 NULL NULL int(4) select,inse
NULL mysql servers Socket 7 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
NULL mysql servers Wrapper 8 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
NULL mysql servers Owner 9 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
-NULL mysql slow_log start_time 1 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
+NULL mysql slow_log start_time 1 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL mysql slow_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
NULL mysql slow_log query_time 3 NULL NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references
NULL mysql slow_log lock_time 4 NULL NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references
NULL mysql slow_log rows_sent 5 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
NULL mysql slow_log rows_examined 6 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
-NULL mysql slow_log db 7 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select,insert,update,references
-NULL mysql slow_log last_insert_id 8 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
-NULL mysql slow_log insert_id 9 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
-NULL mysql slow_log server_id 10 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
+NULL mysql slow_log db 7 NULL NO varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select,insert,update,references
+NULL mysql slow_log last_insert_id 8 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
+NULL mysql slow_log insert_id 9 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
+NULL mysql slow_log server_id 10 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
NULL mysql slow_log sql_text 11 NULL NO mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
NULL mysql tables_priv Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references
NULL mysql tables_priv Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
NULL mysql tables_priv User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references
NULL mysql tables_priv Table_name 4 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
NULL mysql tables_priv Grantor 5 NO char 77 231 NULL NULL utf8 utf8_bin char(77) MUL select,insert,update,references
-NULL mysql tables_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
+NULL mysql tables_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL mysql tables_priv Table_priv 7 NO set 98 294 NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') select,insert,update,references
NULL mysql tables_priv Column_priv 8 NO set 31 93 NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','References') select,insert,update,references
NULL mysql time_zone Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI auto_increment select,insert,update,references
@@ -3087,7 +3015,7 @@ NULL test tb4 f217 42 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL N
NULL test tb4 f218 43 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references
NULL test tb4 f219 44 NULL YES time NULL NULL NULL NULL NULL NULL time select,insert,update,references
NULL test tb4 f220 45 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references
-NULL test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
+NULL test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL test tb4 f222 47 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references
NULL test tb4 f223 48 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references
NULL test tb4 f224 49 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references
@@ -3194,7 +3122,7 @@ binary binary Binary pseudo charset 1
geostd8 geostd8_general_ci GEOSTD8 Georgian 1
cp932 cp932_japanese_ci SJIS for Windows Japanese 2
eucjpms eucjpms_japanese_ci UJIS for Windows Japanese 3
-select sum(id) from collations;
+select sum(id) from collations where collation_name <> 'utf8_general_cs';
sum(id)
10840
select collation_name, character_set_name into @x,@y
@@ -3210,7 +3138,8 @@ END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh
select count(*) from routines;
count(*)
1
-select * from statistics;
+select * from statistics
+where not (table_schema = 'mysql' and table_name like 'help_%');
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT
NULL mysql columns_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE
NULL mysql columns_priv 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE
@@ -3224,14 +3153,6 @@ NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE
NULL mysql event 0 mysql PRIMARY 1 db A NULL NULL NULL BTREE
NULL mysql event 0 mysql PRIMARY 2 name A 0 NULL NULL BTREE
NULL mysql func 0 mysql PRIMARY 1 name A 0 NULL NULL BTREE
-NULL mysql help_category 0 mysql PRIMARY 1 help_category_id A 37 NULL NULL BTREE
-NULL mysql help_category 0 mysql name 1 name A 37 NULL NULL BTREE
-NULL mysql help_keyword 0 mysql PRIMARY 1 help_keyword_id A 424 NULL NULL BTREE
-NULL mysql help_keyword 0 mysql name 1 name A 424 NULL NULL BTREE
-NULL mysql help_relation 0 mysql PRIMARY 1 help_keyword_id A NULL NULL NULL BTREE
-NULL mysql help_relation 0 mysql PRIMARY 2 help_topic_id A 901 NULL NULL BTREE
-NULL mysql help_topic 0 mysql PRIMARY 1 help_topic_id A 479 NULL NULL BTREE
-NULL mysql help_topic 0 mysql name 1 name A 479 NULL NULL BTREE
NULL mysql host 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE
NULL mysql host 0 mysql PRIMARY 2 Db A 0 NULL NULL BTREE
NULL mysql ndb_binlog_index 0 mysql PRIMARY 1 epoch A 0 NULL NULL BTREE
@@ -3263,8 +3184,16 @@ NULL mysql user 0 mysql PRIMARY 2 User A 3 NULL NULL BTREE
select * from views;
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION
NULL db_datadict v1 SELECT * FROM information_schema.tables NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
-NULL db_datadict vu SELECT DISTINCT u, NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
-NULL db_datadict vu1 SELECT grantee AS u NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
+NULL db_datadict vu SELECT DISTINCT u,
+SUBSTRING( u, LENGTH(SUBSTRING_INDEX(u,'@',1))+3 )
+AS server,
+SUBSTRING( u, LENGTH(SUBSTRING_INDEX(u,'@',1))+3,
+LENGTH( SUBSTRING( u,
+LENGTH( SUBSTRING_INDEX(u, '@',1)) +3 )) - 1 )
+AS Server_Clean
+FROM db_datadict.vu1 NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
+NULL db_datadict vu1 SELECT grantee AS u
+FROM information_schema.user_privileges NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
select * from user_privileges order by grantee, privilege_type;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'127.0.0.1' NULL ALTER YES
@@ -3462,9 +3391,10 @@ NULL mysql PRIMARY NULL mysql user User 2 NULL NULL NULL NULL
select count(*) as max_recs from key_column_usage;
max_recs
45
-select max(cardinality) from statistics;
+select max(cardinality) from statistics
+where not (table_schema = 'mysql' and table_name like 'help_%');
max(cardinality)
-901
+393
select concat("View '",
table_name, "' is associated with the database '", table_schema, "'.")
AS "Who is Who for the Views"
@@ -3663,10 +3593,10 @@ NULL information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 NO varchar 64 192 N
SELECT * FROM character_sets LIMIT 1;
CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN
big5 big5_chinese_ci Big5 Traditional Chinese 2
-SELECT * FROM collations LIMIT 1;
+SELECT * FROM collations where collation_name <> 'utf8_general_cs' LIMIT 1;
COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN
big5_chinese_ci big5 1 Yes Yes 1
-SELECT * FROM collation_character_set_applicability LIMIT 1;
+SELECT * FROM collation_character_set_applicability where collation_name <> 'utf8_general_cs' LIMIT 1;
COLLATION_NAME CHARACTER_SET_NAME
big5_chinese_ci big5
SELECT * FROM routines LIMIT 1;
@@ -4354,7 +4284,8 @@ CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT
SELECT * FROM information_schema.tables
-WHERE NOT( table_schema = 'information_schema');
+WHERE NOT( table_schema = 'information_schema')
+AND NOT (table_schema = 'mysql' AND table_name LIKE 'help_%');
TABLE_CATALOG NULL
TABLE_SCHEMA db_datadict
TABLE_NAME v1
@@ -4525,90 +4456,6 @@ CREATE_OPTIONS
TABLE_COMMENT General log
TABLE_CATALOG NULL
TABLE_SCHEMA mysql
-TABLE_NAME help_category
-TABLE_TYPE BASE TABLE
-ENGINE MyISAM
-VERSION 10
-ROW_FORMAT Fixed
-TABLE_ROWS 37
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME YYYY-MM-DD hh:mm:ss
-UPDATE_TIME YYYY-MM-DD hh:mm:ss
-CHECK_TIME YYYY-MM-DD hh:mm:ss
-TABLE_COLLATION utf8_general_ci
-CHECKSUM NULL
-CREATE_OPTIONS
-TABLE_COMMENT help categories
-TABLE_CATALOG NULL
-TABLE_SCHEMA mysql
-TABLE_NAME help_keyword
-TABLE_TYPE BASE TABLE
-ENGINE MyISAM
-VERSION 10
-ROW_FORMAT Fixed
-TABLE_ROWS 424
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME YYYY-MM-DD hh:mm:ss
-UPDATE_TIME YYYY-MM-DD hh:mm:ss
-CHECK_TIME YYYY-MM-DD hh:mm:ss
-TABLE_COLLATION utf8_general_ci
-CHECKSUM NULL
-CREATE_OPTIONS
-TABLE_COMMENT help keywords
-TABLE_CATALOG NULL
-TABLE_SCHEMA mysql
-TABLE_NAME help_relation
-TABLE_TYPE BASE TABLE
-ENGINE MyISAM
-VERSION 10
-ROW_FORMAT Fixed
-TABLE_ROWS 901
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME YYYY-MM-DD hh:mm:ss
-UPDATE_TIME YYYY-MM-DD hh:mm:ss
-CHECK_TIME YYYY-MM-DD hh:mm:ss
-TABLE_COLLATION utf8_general_ci
-CHECKSUM NULL
-CREATE_OPTIONS
-TABLE_COMMENT keyword-topic relation
-TABLE_CATALOG NULL
-TABLE_SCHEMA mysql
-TABLE_NAME help_topic
-TABLE_TYPE BASE TABLE
-ENGINE MyISAM
-VERSION 10
-ROW_FORMAT Dynamic
-TABLE_ROWS 479
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME YYYY-MM-DD hh:mm:ss
-UPDATE_TIME YYYY-MM-DD hh:mm:ss
-CHECK_TIME YYYY-MM-DD hh:mm:ss
-TABLE_COLLATION utf8_general_ci
-CHECKSUM NULL
-CREATE_OPTIONS
-TABLE_COMMENT help topics
-TABLE_CATALOG NULL
-TABLE_SCHEMA mysql
TABLE_NAME host
TABLE_TYPE BASE TABLE
ENGINE MyISAM
@@ -5672,8 +5519,16 @@ NULL mysql columns_priv 0 mysql PRIMARY 5 Column_name A 0 NULL NULL BTREE
select * from information_schema.views limit 0, 5;
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION
NULL db_datadict v1 SELECT * FROM information_schema.tables NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
-NULL db_datadict vu SELECT DISTINCT u, NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
-NULL db_datadict vu1 SELECT grantee AS u NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
+NULL db_datadict vu SELECT DISTINCT u,
+SUBSTRING( u, LENGTH(SUBSTRING_INDEX(u,'@',1))+3 )
+AS server,
+SUBSTRING( u, LENGTH(SUBSTRING_INDEX(u,'@',1))+3,
+LENGTH( SUBSTRING( u,
+LENGTH( SUBSTRING_INDEX(u, '@',1)) +3 )) - 1 )
+AS Server_Clean
+FROM db_datadict.vu1 NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
+NULL db_datadict vu1 SELECT grantee AS u
+FROM information_schema.user_privileges NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
select * from information_schema.user_privileges limit 0, 5;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'localhost' NULL SELECT YES
@@ -5724,10 +5579,10 @@ COUNT(*)
SELECT COUNT(*) FROM information_schema. character_sets ;
COUNT(*)
36
-SELECT COUNT(*) FROM information_schema. collations ;
+SELECT COUNT(*) FROM information_schema. collations where collation_name <> 'utf8_general_cs' ;
COUNT(*)
127
-SELECT COUNT(*) FROM information_schema. collation_character_set_applicability ;
+SELECT COUNT(*) FROM information_schema. collation_character_set_applicability where collation_name <> 'utf8_general_cs' ;
COUNT(*)
128
SELECT COUNT(*) FROM information_schema. routines ;
@@ -5806,10 +5661,10 @@ utf8_esperanto_ci utf8
utf8_estonian_ci utf8
select routine_definition from routines;
routine_definition
-select * from statistics group by index_name asc limit 0, 5;
+select * from statistics where table_name not like 'help_%'
+group by index_name asc limit 0, 5;
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT
NULL mysql procs_priv 1 mysql Grantor 1 Grantor A NULL NULL NULL BTREE
-NULL mysql help_category 0 mysql name 1 name A 37 NULL NULL BTREE
NULL mysql columns_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE
NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE
select concat(table_schema, ', ', table_name, ', ', view_definition) view_info
@@ -5923,9 +5778,9 @@ NULL test latin1 latin1_swedish_ci NULL
NULL test1 latin1 latin1_swedish_ci NULL
select distinct grantee from user_privileges;
grantee
-'root'@'localhost'
-'root'@'<SERVER_NAME>'
'root'@'127.0.0.1'
+'root'@'<SERVER_NAME>'
+'root'@'localhost'
select all grantee from user_privileges order by grantee, privilege_type;
grantee
'root'@'127.0.0.1'
@@ -7482,7 +7337,7 @@ from information_schema.statistics
where table_schema like 'db_datadict%';
table_name index_schema index_name index_type
select *
-from information_schema.user_privileges order by grantee, privilege_type;
+from information_schema.user_privileges;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'127.0.0.1' NULL ALTER YES
'root'@'127.0.0.1' NULL ALTER ROUTINE YES
@@ -7633,7 +7488,7 @@ where table_schema like 'db_datadict%';
table_name index_schema index_name index_type
res_t_401013 db_datadict i_6_401013 HASH
select *
-from information_schema.user_privileges order by grantee, privilege_type;
+from information_schema.user_privileges;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'127.0.0.1' NULL ALTER YES
'root'@'127.0.0.1' NULL ALTER ROUTINE YES
@@ -7770,7 +7625,7 @@ from information_schema.statistics
where table_schema like 'db_datadict%';
table_name index_schema index_name index_type
select *
-from information_schema.user_privileges order by grantee, privilege_type;
+from information_schema.user_privileges;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'127.0.0.1' NULL ALTER YES
'root'@'127.0.0.1' NULL ALTER ROUTINE YES
@@ -7875,7 +7730,7 @@ Testcase 3.2.1.14:
DROP DATABASE IF EXISTS db_datadict;
CREATE DATABASE db_datadict;
USE db_datadict;
-create table res_t_401014(f1 char(10), f2 text(25), f3 int);
+create table res_t_401014(f1 char(10), f2 varchar(25), f3 int);
create view res_v_401014 as select * from res_t_401014;
create procedure sp_6_401014() select 'db_datadict';
create function fn_6_401014() returns int return 0;
@@ -7898,10 +7753,10 @@ from information_schema.columns
where table_schema like 'db_datadict%';
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT
NULL db_datadict res_t_401014 f1 1 NULL YES char 10 10 NULL NULL latin1 latin1_swedish_ci char(10) select,insert,update,references
-NULL db_datadict res_t_401014 f2 2 NULL YES tinytext 255 255 NULL NULL latin1 latin1_swedish_ci tinytext select,insert,update,references
+NULL db_datadict res_t_401014 f2 2 NULL YES varchar 25 25 NULL NULL latin1 latin1_swedish_ci varchar(25) select,insert,update,references
NULL db_datadict res_t_401014 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
NULL db_datadict res_v_401014 f1 1 NULL YES char 10 10 NULL NULL latin1 latin1_swedish_ci char(10) select,insert,update,references
-NULL db_datadict res_v_401014 f2 2 NULL YES tinytext 255 255 NULL NULL latin1 latin1_swedish_ci tinytext select,insert,update,references
+NULL db_datadict res_v_401014 f2 2 NULL YES varchar 25 25 NULL NULL latin1 latin1_swedish_ci varchar(25) select,insert,update,references
NULL db_datadict res_v_401014 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
select table_schema, table_name, is_updatable
from information_schema.views
@@ -7919,7 +7774,7 @@ from information_schema.statistics
where table_schema like 'db_datadict%';
table_name index_schema index_name index_type
select *
-from information_schema.user_privileges order by grantee, privilege_type;
+from information_schema.user_privileges;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'127.0.0.1' NULL ALTER YES
'root'@'127.0.0.1' NULL ALTER ROUTINE YES
@@ -8020,7 +7875,7 @@ WHERE trigger_schema LIKE 'db_datadict%';
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
use db_datadict;
alter table res_t_401014 change f1 ff1 int;
-alter table res_t_401014 engine = innodb;
+alter table res_t_401014 engine = MyISAM;
alter table res_t_401014 change f3 f3_new bigint;
alter view res_v_401014 as select ff1 from res_t_401014;
alter procedure sp_6_401014 sql security invoker;
@@ -8038,14 +7893,14 @@ select table_catalog, table_schema, engine
from information_schema.tables
where table_schema like 'db_datadict%';
table_catalog table_schema engine
-NULL db_datadict InnoDB
+NULL db_datadict MyISAM
NULL db_datadict NULL
select *
from information_schema.columns
where table_schema like 'db_datadict%';
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT
NULL db_datadict res_t_401014 ff1 1 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
-NULL db_datadict res_t_401014 f2 2 NULL YES tinytext 255 255 NULL NULL latin1 latin1_swedish_ci tinytext select,insert,update,references
+NULL db_datadict res_t_401014 f2 2 NULL YES varchar 25 25 NULL NULL latin1 latin1_swedish_ci varchar(25) select,insert,update,references
NULL db_datadict res_t_401014 f3_new 3 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) select,insert,update,references
NULL db_datadict res_v_401014 ff1 1 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
select table_schema, table_name, is_updatable
@@ -8064,7 +7919,7 @@ from information_schema.statistics
where table_schema like 'db_datadict%';
table_name index_schema index_name index_type
select *
-from information_schema.user_privileges order by grantee, privilege_type;
+from information_schema.user_privileges;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'127.0.0.1' NULL ALTER YES
'root'@'127.0.0.1' NULL ALTER ROUTINE YES
@@ -8222,7 +8077,7 @@ where table_schema like 'db_datadict%';
table_name index_schema index_name index_type
res_t_401015 db_datadict i_6_401015 BTREE
select *
-from information_schema.user_privileges order by grantee, privilege_type;
+from information_schema.user_privileges;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'127.0.0.1' NULL ALTER YES
'root'@'127.0.0.1' NULL ALTER ROUTINE YES
@@ -8358,7 +8213,7 @@ from information_schema.statistics
where table_schema like 'db_datadict%';
table_name index_schema index_name index_type
select *
-from information_schema.user_privileges order by grantee, privilege_type;
+from information_schema.user_privileges;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'127.0.0.1' NULL ALTER YES
'root'@'127.0.0.1' NULL ALTER ROUTINE YES
@@ -8608,7 +8463,8 @@ ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_
FLUSH PRIVILEGES;
connect(localhost,u_6_401017,,test,MYSQL_PORT,MYSQL_SOCK);
use information_schema;
-select * from collation_character_set_applicability;
+select * from collation_character_set_applicability
+where collation_name <> 'utf8_general_cs';
COLLATION_NAME CHARACTER_SET_NAME
big5_chinese_ci big5
big5_bin big5
@@ -8814,7 +8670,7 @@ COLUMNS CHARACTER_SET_NAME varchar(64)
COLUMNS COLLATION_NAME varchar(64)
COLUMNS COLUMN_TYPE longtext
COLUMNS COLUMN_KEY varchar(3)
-COLUMNS EXTRA varchar(20)
+COLUMNS EXTRA varchar(27)
COLUMNS PRIVILEGES varchar(80)
COLUMNS COLUMN_COMMENT varchar(255)
COLUMN_PRIVILEGES GRANTEE varchar(81)
@@ -9375,7 +9231,7 @@ binary
geostd8
cp932
eucjpms
-select collation_name from collations;
+select collation_name from collations where collation_name <> 'utf8_general_cs';
collation_name
big5_chinese_ci
big5_bin
@@ -9740,7 +9596,7 @@ NULL information_schema collations SORTLEN 6 0 NO bigint NULL NULL 19 0 NULL NUL
Testcase 3.2.3.2:
--------------------------------------------------------------------------------
-SELECT * FROM collations;
+SELECT * FROM collations where collation_name <> 'utf8_general_cs';
COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN
big5_chinese_ci big5 1 Yes Yes 1
big5_bin big5 84 Yes 1
@@ -9902,7 +9758,8 @@ NULL information_schema collation_character_set_applicability CHARACTER_SET_NAME
Testcase 3.2.4.2:
--------------------------------------------------------------------------------
-SELECT * FROM collation_character_set_applicability;
+SELECT * FROM collation_character_set_applicability
+where collation_name <> 'utf8_general_cs';
COLLATION_NAME CHARACTER_SET_NAME
big5_chinese_ci big5
big5_bin big5
@@ -10215,9 +10072,9 @@ NUMERIC_PRECISION bigint(21) unsigned YES NULL
NUMERIC_SCALE bigint(21) unsigned YES NULL
CHARACTER_SET_NAME varchar(64) YES NULL
COLLATION_NAME varchar(64) YES NULL
-COLUMN_TYPE longtext NO
+COLUMN_TYPE longtext NO NULL
COLUMN_KEY varchar(3) NO
-EXTRA varchar(20) NO
+EXTRA varchar(27) NO
PRIVILEGES varchar(80) NO
COLUMN_COMMENT varchar(255) NO
SHOW CREATE TABLE columns;
@@ -10239,7 +10096,7 @@ COLUMNS CREATE TEMPORARY TABLE `COLUMNS` (
`COLLATION_NAME` varchar(64) DEFAULT NULL,
`COLUMN_TYPE` longtext NOT NULL,
`COLUMN_KEY` varchar(3) NOT NULL DEFAULT '',
- `EXTRA` varchar(20) NOT NULL DEFAULT '',
+ `EXTRA` varchar(27) NOT NULL DEFAULT '',
`PRIVILEGES` varchar(80) NOT NULL DEFAULT '',
`COLUMN_COMMENT` varchar(255) NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=utf8
@@ -10268,9 +10125,9 @@ NULL information_schema columns NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 1
NULL information_schema columns NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema columns CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema columns COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
-NULL information_schema columns COLUMN_TYPE 15 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema columns COLUMN_TYPE 15 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema columns COLUMN_KEY 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
-NULL information_schema columns EXTRA 17 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select
+NULL information_schema columns EXTRA 17 NO varchar 27 81 NULL NULL utf8 utf8_general_ci varchar(27) select
NULL information_schema columns PRIVILEGES 18 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select
NULL information_schema columns COLUMN_COMMENT 19 NO varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select
@@ -10323,9 +10180,9 @@ NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 1
NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
-NULL information_schema COLUMNS COLUMN_TYPE 15 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema COLUMNS COLUMN_TYPE 15 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema COLUMNS COLUMN_KEY 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
-NULL information_schema COLUMNS EXTRA 17 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select
+NULL information_schema COLUMNS EXTRA 17 NO varchar 27 81 NULL NULL utf8 utf8_general_ci varchar(27) select
NULL information_schema COLUMNS PRIVILEGES 18 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select
NULL information_schema COLUMNS COLUMN_COMMENT 19 NO varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select
NULL information_schema COLUMN_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select
@@ -10347,12 +10204,12 @@ NULL information_schema EVENTS EVENT_NAME 3 NO varchar 64 192 NULL NULL utf8 ut
NULL information_schema EVENTS DEFINER 4 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
NULL information_schema EVENTS TIME_ZONE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema EVENTS EVENT_BODY 6 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select
-NULL information_schema EVENTS EVENT_DEFINITION 7 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema EVENTS EVENT_DEFINITION 7 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema EVENTS EVENT_TYPE 8 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select
NULL information_schema EVENTS EXECUTE_AT 9 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS INTERVAL_VALUE 10 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select
NULL information_schema EVENTS INTERVAL_FIELD 11 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select
-NULL information_schema EVENTS SQL_MODE 12 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema EVENTS SQL_MODE 12 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema EVENTS STARTS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS ENDS 14 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS STATUS 15 NO varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select
@@ -10490,7 +10347,7 @@ NULL information_schema ROUTINES SQL_PATH 14 NULL YES varchar 64 192 NULL NULL u
NULL information_schema ROUTINES SECURITY_TYPE 15 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select
NULL information_schema ROUTINES CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema ROUTINES LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select
-NULL information_schema ROUTINES SQL_MODE 18 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema ROUTINES SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema ROUTINES ROUTINE_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema ROUTINES DEFINER 20 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
NULL information_schema ROUTINES CHARACTER_SET_CLIENT 21 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
@@ -10567,7 +10424,7 @@ NULL information_schema TRIGGERS EVENT_OBJECT_SCHEMA 6 NO varchar 64 192 NULL N
NULL information_schema TRIGGERS EVENT_OBJECT_TABLE 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) 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_CONDITION 9 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
-NULL information_schema TRIGGERS ACTION_STATEMENT 10 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema TRIGGERS ACTION_STATEMENT 10 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema TRIGGERS ACTION_ORIENTATION 11 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select
NULL information_schema TRIGGERS ACTION_TIMING 12 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select
NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_TABLE 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
@@ -10575,8 +10432,8 @@ NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_TABLE 14 NULL YES varchar
NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW 15 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema TRIGGERS CREATED 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
-NULL information_schema TRIGGERS SQL_MODE 18 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
-NULL information_schema TRIGGERS DEFINER 19 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema TRIGGERS SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema TRIGGERS DEFINER 19 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema TRIGGERS CHARACTER_SET_CLIENT 20 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema TRIGGERS COLLATION_CONNECTION 21 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema TRIGGERS DATABASE_COLLATION 22 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
@@ -10587,7 +10444,7 @@ NULL information_schema USER_PRIVILEGES IS_GRANTABLE 4 NO varchar 3 9 NULL NULL
NULL information_schema VIEWS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select
NULL information_schema VIEWS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema VIEWS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
-NULL information_schema VIEWS VIEW_DEFINITION 4 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema VIEWS VIEW_DEFINITION 4 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext 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 IS_UPDATABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema VIEWS DEFINER 7 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
@@ -10599,7 +10456,7 @@ NULL mysql columns_priv Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PR
NULL mysql columns_priv User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references
NULL mysql columns_priv Table_name 4 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
NULL mysql columns_priv Column_name 5 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
-NULL mysql columns_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
+NULL mysql columns_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL mysql columns_priv Column_priv 7 NO set 31 93 NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','References') select,insert,update,references
NULL mysql db Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references
NULL mysql db Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
@@ -10630,7 +10487,7 @@ NULL mysql event definer 4 NO char 77 231 NULL NULL utf8 utf8_bin char(77) se
NULL mysql event execute_at 5 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references
NULL mysql event interval_value 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
NULL mysql event interval_field 7 NULL YES enum 18 54 NULL NULL utf8 utf8_general_ci enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') select,insert,update,references
-NULL mysql event created 8 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
+NULL mysql event created 8 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL mysql event modified 9 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
NULL mysql event last_executed 10 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references
NULL mysql event starts 11 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references
@@ -10649,12 +10506,12 @@ NULL mysql func name 1 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI sel
NULL mysql func ret 2 0 NO tinyint NULL NULL 3 0 NULL NULL tinyint(1) select,insert,update,references
NULL mysql func dl 3 NO char 128 384 NULL NULL utf8 utf8_bin char(128) select,insert,update,references
NULL mysql func type 4 NULL NO enum 9 27 NULL NULL utf8 utf8_general_ci enum('function','aggregate') select,insert,update,references
-NULL mysql general_log event_time 1 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
-NULL mysql general_log user_host 2 NULL YES mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
-NULL mysql general_log thread_id 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
-NULL mysql general_log server_id 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
-NULL mysql general_log command_type 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
-NULL mysql general_log argument 6 NULL YES mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
+NULL mysql general_log event_time 1 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
+NULL mysql general_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
+NULL mysql general_log thread_id 3 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
+NULL mysql general_log server_id 4 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
+NULL mysql general_log command_type 5 NULL NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+NULL mysql general_log argument 6 NULL NO mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
NULL mysql help_category help_category_id 1 NULL NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned PRI select,insert,update,references
NULL mysql help_category name 2 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) UNI select,insert,update,references
NULL mysql help_category parent_category_id 3 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references
@@ -10707,10 +10564,10 @@ NULL mysql proc sql_data_access 6 CONTAINS_SQL NO enum 17 51 NULL NULL utf8 utf8
NULL mysql proc is_deterministic 7 NO NO enum 3 9 NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references
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 param_list 9 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references
-NULL mysql proc returns 10 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
+NULL mysql proc returns 10 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references
NULL mysql proc body 11 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references
NULL mysql proc definer 12 NO char 77 231 NULL NULL utf8 utf8_bin char(77) select,insert,update,references
-NULL mysql proc created 13 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
+NULL mysql proc created 13 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL mysql proc modified 14 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
NULL mysql proc sql_mode 15 NO set 431 1293 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') select,insert,update,references
NULL mysql proc comment 16 NO char 64 192 NULL NULL utf8 utf8_bin char(64) select,insert,update,references
@@ -10725,7 +10582,7 @@ NULL mysql procs_priv Routine_name 4 NO char 64 192 NULL NULL utf8 utf8_bin cha
NULL mysql procs_priv Routine_type 5 NULL NO enum 9 27 NULL NULL utf8 utf8_bin enum('FUNCTION','PROCEDURE') 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
NULL mysql procs_priv Proc_priv 7 NO set 27 81 NULL NULL utf8 utf8_general_ci set('Execute','Alter Routine','Grant') select,insert,update,references
-NULL mysql procs_priv Timestamp 8 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
+NULL mysql procs_priv Timestamp 8 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL mysql servers Server_name 1 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) PRI select,insert,update,references
NULL mysql servers Host 2 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
NULL mysql servers Db 3 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
@@ -10735,23 +10592,23 @@ NULL mysql servers Port 6 0 NO int NULL NULL 10 0 NULL NULL int(4) select,inse
NULL mysql servers Socket 7 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
NULL mysql servers Wrapper 8 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
NULL mysql servers Owner 9 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
-NULL mysql slow_log start_time 1 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
+NULL mysql slow_log start_time 1 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL mysql slow_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
NULL mysql slow_log query_time 3 NULL NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references
NULL mysql slow_log lock_time 4 NULL NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references
NULL mysql slow_log rows_sent 5 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
NULL mysql slow_log rows_examined 6 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
-NULL mysql slow_log db 7 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select,insert,update,references
-NULL mysql slow_log last_insert_id 8 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
-NULL mysql slow_log insert_id 9 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
-NULL mysql slow_log server_id 10 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
+NULL mysql slow_log db 7 NULL NO varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select,insert,update,references
+NULL mysql slow_log last_insert_id 8 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
+NULL mysql slow_log insert_id 9 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
+NULL mysql slow_log server_id 10 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
NULL mysql slow_log sql_text 11 NULL NO mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
NULL mysql tables_priv Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references
NULL mysql tables_priv Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
NULL mysql tables_priv User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references
NULL mysql tables_priv Table_name 4 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
NULL mysql tables_priv Grantor 5 NO char 77 231 NULL NULL utf8 utf8_bin char(77) MUL select,insert,update,references
-NULL mysql tables_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
+NULL mysql tables_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL mysql tables_priv Table_priv 7 NO set 98 294 NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') select,insert,update,references
NULL mysql tables_priv Column_priv 8 NO set 31 93 NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','References') select,insert,update,references
NULL mysql time_zone Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI auto_increment select,insert,update,references
@@ -11049,7 +10906,7 @@ NULL test tb4 f217 42 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL N
NULL test tb4 f218 43 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references
NULL test tb4 f219 44 NULL YES time NULL NULL NULL NULL NULL NULL time select,insert,update,references
NULL test tb4 f220 45 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references
-NULL test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
+NULL test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL test tb4 f222 47 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references
NULL test tb4 f223 48 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references
NULL test tb4 f224 49 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references
@@ -11150,9 +11007,9 @@ NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 1
NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
-NULL information_schema COLUMNS COLUMN_TYPE 15 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema COLUMNS COLUMN_TYPE 15 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema COLUMNS COLUMN_KEY 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
-NULL information_schema COLUMNS EXTRA 17 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select
+NULL information_schema COLUMNS EXTRA 17 NO varchar 27 81 NULL NULL utf8 utf8_general_ci varchar(27) select
NULL information_schema COLUMNS PRIVILEGES 18 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select
NULL information_schema COLUMNS COLUMN_COMMENT 19 NO varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select
NULL information_schema COLUMN_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select
@@ -11174,12 +11031,12 @@ NULL information_schema EVENTS EVENT_NAME 3 NO varchar 64 192 NULL NULL utf8 ut
NULL information_schema EVENTS DEFINER 4 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
NULL information_schema EVENTS TIME_ZONE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema EVENTS EVENT_BODY 6 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select
-NULL information_schema EVENTS EVENT_DEFINITION 7 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema EVENTS EVENT_DEFINITION 7 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema EVENTS EVENT_TYPE 8 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select
NULL information_schema EVENTS EXECUTE_AT 9 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS INTERVAL_VALUE 10 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select
NULL information_schema EVENTS INTERVAL_FIELD 11 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select
-NULL information_schema EVENTS SQL_MODE 12 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema EVENTS SQL_MODE 12 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema EVENTS STARTS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS ENDS 14 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS STATUS 15 NO varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select
@@ -11317,7 +11174,7 @@ NULL information_schema ROUTINES SQL_PATH 14 NULL YES varchar 64 192 NULL NULL u
NULL information_schema ROUTINES SECURITY_TYPE 15 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select
NULL information_schema ROUTINES CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema ROUTINES LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select
-NULL information_schema ROUTINES SQL_MODE 18 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema ROUTINES SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema ROUTINES ROUTINE_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema ROUTINES DEFINER 20 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
NULL information_schema ROUTINES CHARACTER_SET_CLIENT 21 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
@@ -11394,7 +11251,7 @@ NULL information_schema TRIGGERS EVENT_OBJECT_SCHEMA 6 NO varchar 64 192 NULL N
NULL information_schema TRIGGERS EVENT_OBJECT_TABLE 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) 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_CONDITION 9 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
-NULL information_schema TRIGGERS ACTION_STATEMENT 10 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema TRIGGERS ACTION_STATEMENT 10 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema TRIGGERS ACTION_ORIENTATION 11 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select
NULL information_schema TRIGGERS ACTION_TIMING 12 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select
NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_TABLE 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
@@ -11402,8 +11259,8 @@ NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_TABLE 14 NULL YES varchar
NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW 15 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema TRIGGERS CREATED 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
-NULL information_schema TRIGGERS SQL_MODE 18 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
-NULL information_schema TRIGGERS DEFINER 19 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema TRIGGERS SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema TRIGGERS DEFINER 19 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema TRIGGERS CHARACTER_SET_CLIENT 20 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema TRIGGERS COLLATION_CONNECTION 21 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema TRIGGERS DATABASE_COLLATION 22 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
@@ -11414,7 +11271,7 @@ NULL information_schema USER_PRIVILEGES IS_GRANTABLE 4 NO varchar 3 9 NULL NULL
NULL information_schema VIEWS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select
NULL information_schema VIEWS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema VIEWS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
-NULL information_schema VIEWS VIEW_DEFINITION 4 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema VIEWS VIEW_DEFINITION 4 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext 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 IS_UPDATABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema VIEWS DEFINER 7 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
@@ -11663,7 +11520,7 @@ NULL test tb4 f217 42 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL N
NULL test tb4 f218 43 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references
NULL test tb4 f219 44 NULL YES time NULL NULL NULL NULL NULL NULL time select,insert,update,references
NULL test tb4 f220 45 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references
-NULL test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
+NULL test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL test tb4 f222 47 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references
NULL test tb4 f223 48 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references
NULL test tb4 f224 49 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references
@@ -11707,9 +11564,9 @@ NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 1
NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
-NULL information_schema COLUMNS COLUMN_TYPE 15 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema COLUMNS COLUMN_TYPE 15 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema COLUMNS COLUMN_KEY 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
-NULL information_schema COLUMNS EXTRA 17 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select
+NULL information_schema COLUMNS EXTRA 17 NO varchar 27 81 NULL NULL utf8 utf8_general_ci varchar(27) select
NULL information_schema COLUMNS PRIVILEGES 18 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select
NULL information_schema COLUMNS COLUMN_COMMENT 19 NO varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select
NULL information_schema COLUMN_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select
@@ -11731,12 +11588,12 @@ NULL information_schema EVENTS EVENT_NAME 3 NO varchar 64 192 NULL NULL utf8 ut
NULL information_schema EVENTS DEFINER 4 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
NULL information_schema EVENTS TIME_ZONE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema EVENTS EVENT_BODY 6 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select
-NULL information_schema EVENTS EVENT_DEFINITION 7 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema EVENTS EVENT_DEFINITION 7 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema EVENTS EVENT_TYPE 8 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select
NULL information_schema EVENTS EXECUTE_AT 9 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS INTERVAL_VALUE 10 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select
NULL information_schema EVENTS INTERVAL_FIELD 11 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select
-NULL information_schema EVENTS SQL_MODE 12 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema EVENTS SQL_MODE 12 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema EVENTS STARTS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS ENDS 14 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS STATUS 15 NO varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select
@@ -11874,7 +11731,7 @@ NULL information_schema ROUTINES SQL_PATH 14 NULL YES varchar 64 192 NULL NULL u
NULL information_schema ROUTINES SECURITY_TYPE 15 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select
NULL information_schema ROUTINES CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema ROUTINES LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select
-NULL information_schema ROUTINES SQL_MODE 18 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema ROUTINES SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema ROUTINES ROUTINE_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema ROUTINES DEFINER 20 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
NULL information_schema ROUTINES CHARACTER_SET_CLIENT 21 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
@@ -11951,7 +11808,7 @@ NULL information_schema TRIGGERS EVENT_OBJECT_SCHEMA 6 NO varchar 64 192 NULL N
NULL information_schema TRIGGERS EVENT_OBJECT_TABLE 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) 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_CONDITION 9 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
-NULL information_schema TRIGGERS ACTION_STATEMENT 10 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema TRIGGERS ACTION_STATEMENT 10 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema TRIGGERS ACTION_ORIENTATION 11 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select
NULL information_schema TRIGGERS ACTION_TIMING 12 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select
NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_TABLE 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
@@ -11959,8 +11816,8 @@ NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_TABLE 14 NULL YES varchar
NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW 15 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema TRIGGERS CREATED 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
-NULL information_schema TRIGGERS SQL_MODE 18 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
-NULL information_schema TRIGGERS DEFINER 19 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema TRIGGERS SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema TRIGGERS DEFINER 19 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema TRIGGERS CHARACTER_SET_CLIENT 20 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema TRIGGERS COLLATION_CONNECTION 21 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema TRIGGERS DATABASE_COLLATION 22 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
@@ -11971,7 +11828,7 @@ NULL information_schema USER_PRIVILEGES IS_GRANTABLE 4 NO varchar 3 9 NULL NULL
NULL information_schema VIEWS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select
NULL information_schema VIEWS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema VIEWS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
-NULL information_schema VIEWS VIEW_DEFINITION 4 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema VIEWS VIEW_DEFINITION 4 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext 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 IS_UPDATABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema VIEWS DEFINER 7 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
@@ -12220,7 +12077,7 @@ NULL test tb4 f217 42 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL N
NULL test tb4 f218 43 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references
NULL test tb4 f219 44 NULL YES time NULL NULL NULL NULL NULL NULL time select,insert,update,references
NULL test tb4 f220 45 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references
-NULL test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
+NULL test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL test tb4 f222 47 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references
NULL test tb4 f223 48 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references
NULL test tb4 f224 49 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references
@@ -12354,7 +12211,7 @@ NULL information_schema COLUMNS NUMERIC_SCALE bigint NULL NULL NULL NULL bigint(
3.0000 information_schema COLUMNS COLLATION_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
1.0000 information_schema COLUMNS COLUMN_TYPE longtext 4294967295 4294967295 utf8 utf8_general_ci longtext
3.0000 information_schema COLUMNS COLUMN_KEY varchar 3 9 utf8 utf8_general_ci varchar(3)
-3.0000 information_schema COLUMNS EXTRA varchar 20 60 utf8 utf8_general_ci varchar(20)
+3.0000 information_schema COLUMNS EXTRA varchar 27 81 utf8 utf8_general_ci varchar(27)
3.0000 information_schema COLUMNS PRIVILEGES varchar 80 240 utf8 utf8_general_ci varchar(80)
3.0000 information_schema COLUMNS COLUMN_COMMENT varchar 255 765 utf8 utf8_general_ci varchar(255)
3.0000 information_schema COLUMN_PRIVILEGES GRANTEE varchar 81 243 utf8 utf8_general_ci varchar(81)
@@ -12736,7 +12593,7 @@ NULL mysql ndb_binlog_index schemaops bigint NULL NULL NULL NULL bigint(20) unsi
3.0000 mysql proc is_deterministic enum 3 9 utf8 utf8_general_ci enum('YES','NO')
3.0000 mysql proc security_type enum 7 21 utf8 utf8_general_ci enum('INVOKER','DEFINER')
1.0000 mysql proc param_list blob 65535 65535 NULL NULL blob
-3.0000 mysql proc returns char 64 192 utf8 utf8_general_ci char(64)
+1.0000 mysql proc returns longblob 4294967295 4294967295 NULL NULL longblob
1.0000 mysql proc body longblob 4294967295 4294967295 NULL NULL longblob
3.0000 mysql proc definer char 77 231 utf8 utf8_bin char(77)
NULL mysql proc created timestamp NULL NULL NULL NULL timestamp
@@ -13321,7 +13178,7 @@ SQL_PATH varchar(64) YES NULL
SECURITY_TYPE varchar(7) NO
CREATED datetime NO 0000-00-00 00:00:00
LAST_ALTERED datetime NO 0000-00-00 00:00:00
-SQL_MODE longtext NO
+SQL_MODE longtext NO NULL
ROUTINE_COMMENT varchar(64) NO
DEFINER varchar(77) NO
CHARACTER_SET_CLIENT varchar(32) NO
@@ -13382,7 +13239,7 @@ NULL information_schema routines SQL_PATH 14 NULL YES varchar 64 192 NULL NULL u
NULL information_schema routines SECURITY_TYPE 15 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select
NULL information_schema routines CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema routines LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select
-NULL information_schema routines SQL_MODE 18 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema routines SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema routines ROUTINE_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema routines DEFINER 20 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
NULL information_schema routines CHARACTER_SET_CLIENT 21 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
@@ -14234,7 +14091,7 @@ NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #
NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO#
NULL information_schema VIEWS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO#
SELECT * FROM information_schema.tables
-WHERE NOT( table_schema = 'information_schema');
+WHERE NOT( table_schema = 'information_schema') AND NOT (table_schema = 'mysql' AND table_name LIKE 'help_%');
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT
NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
NULL db_datadict tb2 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
@@ -14245,10 +14102,6 @@ NULL mysql db BASE TABLE MyISAM 10 Fixed 3 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-
NULL mysql event BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Events
NULL mysql func BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL User defined functions
NULL mysql general_log BASE TABLE CSV 10 Dynamic 1 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL General log
-NULL mysql help_category BASE TABLE MyISAM 10 Fixed 37 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help categories
-NULL mysql help_keyword BASE TABLE MyISAM 10 Fixed 424 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help keywords
-NULL mysql help_relation BASE TABLE MyISAM 10 Fixed 901 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL keyword-topic relation
-NULL mysql help_topic BASE TABLE MyISAM 10 Dynamic 479 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help topics
NULL mysql host BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Host privileges; Merged with database privileges
NULL mysql ndb_binlog_index BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
NULL mysql plugin BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL MySQL plugins
@@ -14295,7 +14148,7 @@ Field Type Null Key Default Extra
TABLE_CATALOG varchar(4096) YES NULL
TABLE_SCHEMA varchar(64) NO
TABLE_NAME varchar(64) NO
-VIEW_DEFINITION longtext NO
+VIEW_DEFINITION longtext NO NULL
CHECK_OPTION varchar(8) NO
IS_UPDATABLE varchar(3) NO
DEFINER varchar(77) NO
@@ -14330,7 +14183,7 @@ TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAUL
NULL information_schema views TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select
NULL information_schema views TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema views TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
-NULL information_schema views VIEW_DEFINITION 4 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema views VIEW_DEFINITION 4 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext 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 IS_UPDATABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema views DEFINER 7 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
@@ -14477,7 +14330,8 @@ TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_
root@localhost db_datadict_2
REVOKE SELECT ON db_datadict.tb_6_401402_1 FROM 'user_1'@'localhost';
-SELECT * FROM information_schema.statistics;
+SELECT * FROM information_schema.statistics
+WHERE NOT (table_schema = 'mysql' AND table_name LIKE 'help_%');
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT
NULL db_datadict tb_6_401402_1 0 db_datadict PRIMARY 1 f1 A 0 NULL NULL BTREE
NULL db_datadict tb_6_401402_1 1 db_datadict f2_ind 1 f2 A NULL NULL NULL YES BTREE
@@ -14499,14 +14353,6 @@ NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE
NULL mysql event 0 mysql PRIMARY 1 db A NULL NULL NULL BTREE
NULL mysql event 0 mysql PRIMARY 2 name A 0 NULL NULL BTREE
NULL mysql func 0 mysql PRIMARY 1 name A 0 NULL NULL BTREE
-NULL mysql help_category 0 mysql PRIMARY 1 help_category_id A 37 NULL NULL BTREE
-NULL mysql help_category 0 mysql name 1 name A 37 NULL NULL BTREE
-NULL mysql help_keyword 0 mysql PRIMARY 1 help_keyword_id A 424 NULL NULL BTREE
-NULL mysql help_keyword 0 mysql name 1 name A 424 NULL NULL BTREE
-NULL mysql help_relation 0 mysql PRIMARY 1 help_keyword_id A NULL NULL NULL BTREE
-NULL mysql help_relation 0 mysql PRIMARY 2 help_topic_id A 901 NULL NULL BTREE
-NULL mysql help_topic 0 mysql PRIMARY 1 help_topic_id A 479 NULL NULL BTREE
-NULL mysql help_topic 0 mysql name 1 name A 479 NULL NULL BTREE
NULL mysql host 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE
NULL mysql host 0 mysql PRIMARY 2 Db A 0 NULL NULL BTREE
NULL mysql ndb_binlog_index 0 mysql PRIMARY 1 epoch A 0 NULL NULL BTREE
@@ -15110,7 +14956,7 @@ EVENT_OBJECT_SCHEMA varchar(64) NO
EVENT_OBJECT_TABLE varchar(64) NO
ACTION_ORDER bigint(4) NO 0
ACTION_CONDITION longtext YES NULL
-ACTION_STATEMENT longtext NO
+ACTION_STATEMENT longtext NO NULL
ACTION_ORIENTATION varchar(9) NO
ACTION_TIMING varchar(6) NO
ACTION_REFERENCE_OLD_TABLE varchar(64) YES NULL
@@ -15118,8 +14964,8 @@ ACTION_REFERENCE_NEW_TABLE varchar(64) YES NULL
ACTION_REFERENCE_OLD_ROW varchar(3) NO
ACTION_REFERENCE_NEW_ROW varchar(3) NO
CREATED datetime YES NULL
-SQL_MODE longtext NO
-DEFINER longtext NO
+SQL_MODE longtext NO NULL
+DEFINER longtext NO NULL
CHARACTER_SET_CLIENT varchar(32) NO
COLLATION_CONNECTION varchar(32) NO
DATABASE_COLLATION varchar(32) NO
@@ -15169,7 +15015,7 @@ NULL information_schema triggers EVENT_OBJECT_SCHEMA 6 NO varchar 64 192 NULL N
NULL information_schema triggers EVENT_OBJECT_TABLE 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) 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_CONDITION 9 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
-NULL information_schema triggers ACTION_STATEMENT 10 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema triggers ACTION_STATEMENT 10 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema triggers ACTION_ORIENTATION 11 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select
NULL information_schema triggers ACTION_TIMING 12 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select
NULL information_schema triggers ACTION_REFERENCE_OLD_TABLE 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
@@ -15177,8 +15023,8 @@ NULL information_schema triggers ACTION_REFERENCE_NEW_TABLE 14 NULL YES varchar
NULL information_schema triggers ACTION_REFERENCE_OLD_ROW 15 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema triggers ACTION_REFERENCE_NEW_ROW 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema triggers CREATED 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
-NULL information_schema triggers SQL_MODE 18 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
-NULL information_schema triggers DEFINER 19 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema triggers SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema triggers DEFINER 19 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema triggers CHARACTER_SET_CLIENT 20 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema triggers COLLATION_CONNECTION 21 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema triggers DATABASE_COLLATION 22 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
diff --git a/mysql-test/suite/funcs_1/r/memory_trig_03e.result b/mysql-test/suite/funcs_1/r/memory_trig_03e.result
index 78c07dc6d92..6078c48c8d7 100644
--- a/mysql-test/suite/funcs_1/r/memory_trig_03e.result
+++ b/mysql-test/suite/funcs_1/r/memory_trig_03e.result
@@ -571,10 +571,8 @@ test_yesprivs@localhost
use priv_db;
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
-trg1_1 INSERT t1 set new.f1 = 'trig 1_1-yes' BEFORE NULL test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
select * from information_schema.triggers;
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
-NULL priv_db trg1_1 INSERT NULL priv_db t1 0 NULL set new.f1 = 'trig 1_1-yes' ROW BEFORE NULL NULL OLD NEW NULL test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
drop trigger trg1_1;
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
select current_user;
diff --git a/mysql-test/suite/funcs_1/r/memory_views.result b/mysql-test/suite/funcs_1/r/memory_views.result
index 4bc0c4a3fa4..7d045e3412a 100644
--- a/mysql-test/suite/funcs_1/r/memory_views.result
+++ b/mysql-test/suite/funcs_1/r/memory_views.result
@@ -173,6 +173,58 @@ insert into tb2 (f59,f60,f61) values (109,108,104);
INSERT INTO tb2 (f59,f60) VALUES( 299,899 );
INSERT INTO tb2 (f59,f60) VALUES( 242,79 );
INSERT INTO tb2 (f59,f60) VALUES( 424,89 );
+SELECT * FROM tb2 ORDER BY f59, f60, f61;
+f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109
+1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set
+2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set
+3 3 0000000003 0000000000000000000000000000000000000000000000000000000000000003 0000000003 0000000000000000000000000000000000000000000000000000000000000003 -3 2.200000000000000000000000000000 3 2.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494348e-38 1.17549e-38 1.175494354e-38 01.17549e-38 00000001.175494354e-38 01.17549e-38 00000001.175494354e-38 1000-01-03 838:59:56 1970-01-04 00:00:03 1970-01-04 00:00:03 1904 1904 1904 2enum 1set
+4 4 0000000004 0000000000000000000000000000000000000000000000000000000000000004 0000000004 0000000000000000000000000000000000000000000000000000000000000004 -2 3.300000000000000000000000000000 4 3.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494347e-38 1.17549e-38 1.175494355e-38 01.17549e-38 00000001.175494355e-38 01.17549e-38 00000001.175494355e-38 1000-01-04 838:59:55 1970-01-05 00:00:04 1970-01-05 00:00:04 1905 1905 1905 1enum 2set
+4 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+5 5 0000000005 0000000000000000000000000000000000000000000000000000000000000005 0000000005 0000000000000000000000000000000000000000000000000000000000000005 -1 4.400000000000000000000000000000 5 4.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494346e-38 1.17549e-38 1.175494356e-38 01.17549e-38 00000001.175494356e-38 01.17549e-38 00000001.175494356e-38 1000-01-05 838:59:54 1970-01-06 00:00:05 1970-01-06 00:00:05 1906 1906 1906 2enum 1set,2set
+6 6 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0 5.500000000000000000000000000000 6 5.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494345e-38 1.17549e-38 1.175494357e-38 01.17549e-38 00000001.175494357e-38 01.17549e-38 00000001.175494357e-38 1000-01-06 838:59:53 1970-01-07 00:00:06 1970-01-07 00:00:06 1907 1907 1907 1enum 1set
+7 7 0000000007 0000000000000000000000000000000000000000000000000000000000000007 0000000007 0000000000000000000000000000000000000000000000000000000000000007 1 6.600000000000000000000000000000 7 6.600000000000000000000000000000 0000000007 000000000000000000000000000000006.600000000000000000000000000000 0000000007 000000000000000000000000000000006.600000000000000000000000000000 -1.175494344e-38 1.175494358e-38 00000001.175494358e-38 00000001.175494358e-38 -1.175494344e-38 1.175494358e-38 00000001.175494358e-38 00000001.175494358e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494344e-38 1.17549e-38 1.175494358e-38 01.17549e-38 00000001.175494358e-38 01.17549e-38 00000001.175494358e-38 1000-01-07 838:59:52 1970-01-08 00:00:07 1970-01-08 00:00:07 1908 1908 1908 2enum 2set
+8 8 0000000008 0000000000000000000000000000000000000000000000000000000000000008 0000000008 0000000000000000000000000000000000000000000000000000000000000008 2 7.700000000000000000000000000000 8 7.700000000000000000000000000000 0000000008 000000000000000000000000000000007.700000000000000000000000000000 0000000008 000000000000000000000000000000007.700000000000000000000000000000 -1.175494343e-38 1.175494359e-38 00000001.175494359e-38 00000001.175494359e-38 -1.175494343e-38 1.175494359e-38 00000001.175494359e-38 00000001.175494359e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494343e-38 1.17549e-38 1.175494359e-38 01.17549e-38 00000001.175494359e-38 01.17549e-38 00000001.175494359e-38 1000-01-08 838:59:51 1970-01-09 00:00:08 1970-01-09 00:00:08 1909 1909 1909 1enum 1set,2set
+9 9 0000000009 0000000000000000000000000000000000000000000000000000000000000009 0000000009 0000000000000000000000000000000000000000000000000000000000000009 3 8.800000000000000000000000000000 9 8.800000000000000000000000000000 0000000009 000000000000000000000000000000008.800000000000000000000000000000 0000000009 000000000000000000000000000000008.800000000000000000000000000000 -1.175494342e-38 1.17549436e-38 000000001.17549436e-38 000000001.17549436e-38 -1.175494342e-38 1.17549436e-38 000000001.17549436e-38 000000001.17549436e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494342e-38 1.17549e-38 1.17549436e-38 01.17549e-38 000000001.17549436e-38 01.17549e-38 000000001.17549436e-38 1000-01-09 838:59:50 1970-01-10 00:00:09 1970-01-10 00:00:09 1910 1910 1910 2enum 1set
+10 10 0000000010 0000000000000000000000000000000000000000000000000000000000000010 0000000010 0000000000000000000000000000000000000000000000000000000000000010 4 9.900000000000000000000000000000 10 9.900000000000000000000000000000 0000000010 000000000000000000000000000000009.900000000000000000000000000000 0000000010 000000000000000000000000000000009.900000000000000000000000000000 -1.175494341e-38 1.175494361e-38 00000001.175494361e-38 00000001.175494361e-38 -1.175494341e-38 1.175494361e-38 00000001.175494361e-38 00000001.175494361e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494341e-38 1.17549e-38 1.175494361e-38 01.17549e-38 00000001.175494361e-38 01.17549e-38 00000001.175494361e-38 1000-01-10 838:59:49 1970-01-11 00:00:10 1970-01-11 00:00:10 1911 1911 1911 1enum 2set
+15 87 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+17 15 0000000016 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+19 18 0000000014 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+22 93 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+24 51654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+27 25 0000000026 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+29 28 0000000024 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+34 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+94 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+107 105 0000000106 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+107 105 0000000106 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+109 108 0000000104 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+109 108 0000000104 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+195 87 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+207 205 0000000206 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+209 208 0000000204 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+242 79 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+250 87895654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+292 93 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+299 899 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+321 NULL 0000000765 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+323 14376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+340 9984376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+394 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+424 89 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+441 16546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+660 876546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+987 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+2550 775654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+2760 985654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+3330 764376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+3410 996546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+7876 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+9112 NULL 0000008771 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+76710 226546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+569300 9114376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
Use test;
Testcase 3.3.1.1
@@ -207,27 +259,27 @@ f59 f60 f61
8 8 0000000008
9 9 0000000009
CREATE or REPLACE VIEW v1 AS select f59,f60,f61
-FROM test.tb2 limit 4,3;
-select * FROM v1 order by f59,f60,f61 limit 0,10;
+FROM test.tb2;
+select * FROM v1 order by f59,f60,f61 limit 4,3;
f59 f60 f61
+4 74 NULL
5 5 0000000005
6 6 0000000006
-7 7 0000000007
CREATE or REPLACE VIEW v1 AS select distinct f59
-FROM test.tb2 limit 4,3;
-select * FROM v1 order by f59 limit 0,10;
+FROM test.tb2;
+select * FROM v1 order by f59 limit 4,3;
f59
5
6
7
ALTER VIEW v1 AS select f59
-FROM test.tb2 limit 6,2;
-select * FROM v1 order by f59 limit 0,10;
+FROM test.tb2;
+select * FROM v1 order by f59 limit 6,2;
f59
+6
7
-8
CREATE or REPLACE VIEW v1 AS select f59
-from tb2 order by f59 limit 100;
+from tb2 order by f59;
select * FROM v1 order by f59 limit 0,10;
f59
1
@@ -241,7 +293,7 @@ f59
8
9
CREATE or REPLACE VIEW v1 AS select f59
-from tb2 order by f59 asc limit 100;
+from tb2 order by f59 asc;
select * FROM v1 limit 0,10;
f59
1
@@ -255,7 +307,7 @@ f59
8
9
CREATE or REPLACE VIEW v1 AS select f59
-from tb2 order by f59 desc limit 100;
+from tb2 order by f59 desc;
select * FROM v1 limit 0,10;
f59
569300
@@ -269,7 +321,7 @@ f59
987
660
CREATE or REPLACE VIEW v1 AS select f59
-from tb2 group by f59 limit 100;
+from tb2 group by f59;
select * FROM v1 order by f59 limit 0,10;
f59
1
@@ -283,7 +335,7 @@ f59
9
10
CREATE or REPLACE VIEW v1 AS select f59
-from tb2 group by f59 asc limit 100;
+from tb2 group by f59 asc;
select * FROM v1 order by f59 limit 0,10;
f59
1
@@ -297,7 +349,7 @@ f59
9
10
CREATE or REPLACE VIEW v1 AS select f59
-from tb2 group by f59 desc limit 100;
+from tb2 group by f59 desc;
select * FROM v1 order by f59 limit 0,10;
f59
1
@@ -311,7 +363,7 @@ f59
9
10
CREATE or REPLACE VIEW v1 AS (select f59 from tb2)
-union (select f59 from t1) limit 100;
+union (select f59 from t1);
select * FROM v1 order by f59 limit 0,10;
f59
1
@@ -499,8 +551,8 @@ DROP VIEW v1;
Testcase 3.3.1.3 + 3.1.1.4
--------------------------------------------------------------------------------
DROP VIEW IF EXISTS v1 ;
-CREATE VIEW v1 or REPLACE AS Select * from tb2 my_table limit 50;
-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 'or REPLACE AS Select * from tb2 my_table limit 50' at line 1
+CREATE VIEW v1 or REPLACE AS Select * from tb2 my_table;
+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 'or REPLACE AS Select * from tb2 my_table' at line 1
CREATE VIEW v1 WITH CASCADED CHECK OPTION AS Select *
from tb2 my_table limit 50;
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 'WITH CASCADED CHECK OPTION AS Select *
@@ -509,8 +561,8 @@ CREATE VIEW v1 WITH LOCAL CHECK OPTION AS Select *
from tb2 my_table limit 50;
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 'WITH LOCAL CHECK OPTION AS Select *
from tb2 my_table limit 50' at line 1
-SELECT * FROM tb2 my_table CREATE VIEW As v1 limit 100 ;
-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 'CREATE VIEW As v1 limit 100' at line 1
+SELECT * FROM tb2 my_table CREATE VIEW As v1;
+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 'CREATE VIEW As v1' at line 1
CREATE or REPLACE VIEW v1 Select f59, f60
from test.tb2 my_table where f59 = 250 ;
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 'Select f59, f60
@@ -585,8 +637,8 @@ Union ALL (Select from f1 t1);
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 'from f59 tb2)
Union ALL (Select from f1 t1)' at line 1
CREATE or REPLACE view v1 as Select f59, f60
-from tb2 by order f59 limit 100 ;
-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 'by order f59 limit 100' at line 2
+from tb2 by order f59;
+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 'by order f59' at line 2
CREATE or REPLACE view v1 as Select f59, f60
from tb2 by group f59 ;
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 'by group f59' at line 2
@@ -594,12 +646,12 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
Testcase 3.3.1.5
--------------------------------------------------------------------------------
DROP VIEW IF EXISTS v1 ;
-CREATE VIEW v1 SELECT * FROM tb2 limit 100 ;
-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 'SELECT * FROM tb2 limit 100' at line 1
-CREATE v1 AS SELECT * FROM tb2 limit 100 ;
-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 'v1 AS SELECT * FROM tb2 limit 100' at line 1
-VIEW v1 AS SELECT * FROM tb2 limit 100 ;
-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 'VIEW v1 AS SELECT * FROM tb2 limit 100' at line 1
+CREATE VIEW v1 SELECT * FROM tb2;
+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 'SELECT * FROM tb2' at line 1
+CREATE v1 AS SELECT * FROM tb2;
+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 'v1 AS SELECT * FROM tb2' at line 1
+VIEW v1 AS SELECT * FROM tb2;
+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 'VIEW v1 AS SELECT * FROM tb2' at line 1
CREATE VIEW v1 AS SELECT 1;
DROP VIEW v1;
VIEW v1 AS SELECT 1;
@@ -617,45 +669,43 @@ Testcase 3.3.1.6
--------------------------------------------------------------------------------
DROP VIEW IF EXISTS v1 ;
CREATE or REPLACE VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
CREATE or REPLACE ALGORITHM = UNDEFINED VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
CREATE or REPLACE ALGORITHM = MERGE VIEW v1
-as SELECT * from tb2 limit 100 ;
-Warnings:
-Warning 1354 View merge algorithm can't be used here for now (assumed undefined algorithm)
+as SELECT * from tb2;
CREATE or REPLACE ALGORITHM = TEMPTABLE VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
CREATE or REPLACE ALGORITHM = TEMPTABLE VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
CREATE or REPLACE = TEMPTABLE VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
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 '= TEMPTABLE VIEW v1
-as SELECT * from tb2 limit 100' at line 1
+as SELECT * from tb2' at line 1
CREATE or REPLACE ALGORITHM TEMPTABLE VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
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 'TEMPTABLE VIEW v1
-as SELECT * from tb2 limit 100' at line 1
+as SELECT * from tb2' at line 1
CREATE or REPLACE ALGORITHM = VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
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 'VIEW v1
-as SELECT * from tb2 limit 100' at line 1
+as SELECT * from tb2' at line 1
CREATE or REPLACE TEMPTABLE = ALGORITHM VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
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 'TEMPTABLE = ALGORITHM VIEW v1
-as SELECT * from tb2 limit 100' at line 1
+as SELECT * from tb2' at line 1
CREATE or REPLACE TEMPTABLE - ALGORITHM VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
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 'TEMPTABLE - ALGORITHM VIEW v1
-as SELECT * from tb2 limit 100' at line 1
+as SELECT * from tb2' at line 1
CREATE or REPLACE GARBAGE = TEMPTABLE VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
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 'GARBAGE = TEMPTABLE VIEW v1
-as SELECT * from tb2 limit 100' at line 1
+as SELECT * from tb2' at line 1
CREATE or REPLACE ALGORITHM = GARBAGE VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
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 'GARBAGE VIEW v1
-as SELECT * from tb2 limit 100' at line 1
+as SELECT * from tb2' at line 1
Drop view if exists v1 ;
CREATE or REPLACE VIEW v1
AS SELECT * from tb2 where f59 < 1;
@@ -681,7 +731,7 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
Testcase 3.3.1.7
--------------------------------------------------------------------------------
DROP VIEW IF EXISTS v1 ;
-Create view test.v1 AS Select * from test.tb2 limit 100 ;
+Create view test.v1 AS Select * from test.tb2;
Alter view test.v1 AS Select F59 from test. tb2 limit 100 ;
Drop view test.v1 ;
Create view v1 AS Select * from test.tb2 limit 100 ;
@@ -888,13 +938,13 @@ SELECT * FROM test.v1 order by f59,f60,f61,f62,f63,f64,f65;
f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109
1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set
2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set
-CREATE OR REPLACE VIEW test.v1 AS SELECT F59 FROM tb2 limit 10,100;
+CREATE OR REPLACE VIEW test.v1 AS SELECT F59 FROM tb2;
SHOW CREATE VIEW test.v1;
View Create View character_set_client collation_connection
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `tb2`.`f59` AS `F59` from `tb2` limit 10,100 latin1 latin1_swedish_ci
-SELECT * FROM test.v1 order by F59;
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `tb2`.`f59` AS `F59` from `tb2` latin1 latin1_swedish_ci
+SELECT * FROM test.v1 order by F59 limit 10,100;
F59
-4
+10
15
17
19
@@ -947,8 +997,8 @@ ERROR HY000: 'test.tb2' is not VIEW
Testcase 3.3.1.15
--------------------------------------------------------------------------------
Drop table if exists test.v1 ;
-CREATE OR REPLACE view test.v1 as select * from tb2 LIMIT 2;
-SELECT * FROM test.v1;
+CREATE OR REPLACE view test.v1 as select * from tb2;
+SELECT * FROM test.v1 ORDER BY f59,f60,f61 LIMIT 2;
f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109
1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set
2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set
@@ -1084,8 +1134,8 @@ ERROR HY000: View's SELECT and view's field list have different column counts
Testcase 3.3.1.21
--------------------------------------------------------------------------------
DROP VIEW IF EXISTS v1;
-CREATE VIEW test.v1( F59, F60 ) AS SELECT F59, F60 From tb2 LIMIT 2;
-SELECT * FROM test.v1 order by F59, F60 desc;
+CREATE VIEW test.v1( F59, F60 ) AS SELECT F59, F60 From tb2;
+SELECT * FROM test.v1 order by F59, F60 desc LIMIT 2;
F59 F60
1 1
2 2
@@ -1094,17 +1144,17 @@ Drop view if exists test.v1 ;
Testcase 3.3.1.22
--------------------------------------------------------------------------------
DROP VIEW IF EXISTS v1;
-CREATE VIEW test.v1( product ) AS SELECT f59*f60 From tb2 LIMIT 2;
-SELECT * FROM test.v1;
+CREATE VIEW test.v1( product ) AS SELECT f59*f60 From tb2;
+SELECT * FROM test.v1 WHERE product IS NOT NULL ORDER BY product LIMIT 2;
product
1
4
CREATE OR REPLACE VIEW test.v1( product ) AS SELECT 1*2;
-SELECT * FROM test.v1;
+SELECT * FROM test.v1 LIMIT 2;
product
2
CREATE OR REPLACE VIEW test.v1( product ) AS SELECT USER();
-SELECT * FROM test.v1;
+SELECT * FROM test.v1 LIMIT 2;
product
root@localhost
Drop view if exists test.v1 ;
@@ -1181,8 +1231,8 @@ DROP TEMPORARY TABLE t2;
Testcase 3.3.1.26
--------------------------------------------------------------------------------
DROP VIEW IF EXISTS v1;
-Create view test.v1 AS Select * from test.tb2 limit 2 ;
-Select * from test.v1;
+Create view test.v1 AS Select * from test.tb2;
+Select * from test.v1 order by f59, f60, f61 limit 2;
f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109
1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set
2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set
@@ -1192,9 +1242,9 @@ Testcase 3.3.1.27
--------------------------------------------------------------------------------
DROP VIEW IF EXISTS test.v1;
Drop VIEW IF EXISTS test.v1_1 ;
-Create view test.v1 AS Select * from test.tb2 limit 2 ;
+Create view test.v1 AS Select * from test.tb2;
Create view test.v1_1 AS Select F59 from test.v1 ;
-Select * from test.v1_1 order by F59 limit 20 ;
+Select * from test.v1_1 order by F59 limit 2;
F59
1
2
@@ -1741,29 +1791,29 @@ Drop view if exists test.v1 ;
Drop view if exists test.v1_main;
Drop view if exists test1.v1_1 ;
Drop database if exists test3 ;
-Create view test.v1 as Select f59, f60 FROM test.tb2 limit 20 ;
-Select * from test.v1 order by f59,f60;
+Create view test.v1 as Select f59, f60 FROM test.tb2;
+Select * from test.v1 order by f59,f60 limit 20;
f59 f60
1 1
2 2
3 3
4 4
+4 74
5 5
6 6
7 7
8 8
9 9
10 10
-250 87895654
-340 9984376
-441 16546
-660 876546
-2550 775654
-2760 985654
-3330 764376
-3410 996546
-76710 226546
-569300 9114376
+15 87
+17 15
+19 18
+22 93
+24 51654
+27 25
+29 28
+34 41
+94 74
Create table test1.t1 (f59 int,f60 int) ;
Insert into test1.t1 values (199,507) ;
Create view test1.v1_1 as Select f59,f60 from test1.t1 ;
@@ -9654,8 +9704,8 @@ WHERE v3_to_v1_options LIKE ' %' AND errno <> 0
ORDER BY v3_to_v1_options;
v3_to_v1_options statement v3_to_v1_violation errno
SELECT * FROM t1_results
-WHERE v3_to_v1_options LIKE 'WITH %'
-AND v3_to_v1_violation LIKE 'v3_%' AND errno = 0
+WHERE v3_to_v1_options LIKE 'WITH %'
+ AND v3_to_v1_violation LIKE 'v3_%' AND errno = 0
ORDER BY v3_to_v1_options;
v3_to_v1_options statement v3_to_v1_violation errno
SELECT * FROM t1_results
@@ -9675,17 +9725,17 @@ DROP TABLE t1_results;
Testcase 3.3.1.50 - 3.3.1.53
--------------------------------------------------------------------------------
DROP VIEW IF EXISTS test.v1;
-CREATE VIEW test.v1 AS SELECT * FROM test.tb2 limit 5 ;
-SELECT * FROM test.v1 order by f59 ;
+CREATE VIEW test.v1 AS SELECT * FROM test.tb2;
+SELECT * FROM test.v1 order by f59 limit 5;
f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109
1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set
2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set
3 3 0000000003 0000000000000000000000000000000000000000000000000000000000000003 0000000003 0000000000000000000000000000000000000000000000000000000000000003 -3 2.200000000000000000000000000000 3 2.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494348e-38 1.17549e-38 1.175494354e-38 01.17549e-38 00000001.175494354e-38 01.17549e-38 00000001.175494354e-38 1000-01-03 838:59:56 1970-01-04 00:00:03 1970-01-04 00:00:03 1904 1904 1904 2enum 1set
5 5 0000000005 0000000000000000000000000000000000000000000000000000000000000005 0000000005 0000000000000000000000000000000000000000000000000000000000000005 -1 4.400000000000000000000000000000 5 4.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494346e-38 1.17549e-38 1.175494356e-38 01.17549e-38 00000001.175494356e-38 01.17549e-38 00000001.175494356e-38 1000-01-05 838:59:54 1970-01-06 00:00:05 1970-01-06 00:00:05 1906 1906 1906 2enum 1set,2set
-100 4 0000000004 0000000000000000000000000000000000000000000000000000000000000004 0000000004 0000000000000000000000000000000000000000000000000000000000000004 -2 3.300000000000000000000000000000 4 3.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494347e-38 1.17549e-38 1.175494355e-38 01.17549e-38 00000001.175494355e-38 01.17549e-38 00000001.175494355e-38 1000-01-04 838:59:55 1970-01-05 00:00:04 1970-01-05 00:00:04 1905 1905 1905 1enum 2set
+6 6 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0 5.500000000000000000000000000000 6 5.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494345e-38 1.17549e-38 1.175494357e-38 01.17549e-38 00000001.175494357e-38 01.17549e-38 00000001.175494357e-38 1000-01-06 838:59:53 1970-01-07 00:00:06 1970-01-07 00:00:06 1907 1907 1907 1enum 1set
drop view test.v1 ;
-CREATE VIEW test.v1 AS SELECT F59,F61 FROM test.tb2 limit 50 ;
-SELECT * FROM test.v1 order by F59, F61 ;
+CREATE VIEW test.v1 AS SELECT F59,F61 FROM test.tb2;
+SELECT * FROM test.v1 order by F59, F61 limit 50;
F59 F61
1 0000000001
2 0000000002
@@ -9738,8 +9788,8 @@ F59 F61
76710 NULL
569300 NULL
drop view test.v1 ;
-CREATE VIEW test.v1 AS SELECT * FROM test.tb2 order by f59, f60, f61 limit 20 ;
-SELECT * FROM test.v1 order by f59,f60,f61 ;
+CREATE VIEW test.v1 AS SELECT * FROM test.tb2 order by f59, f60, f61;
+SELECT * FROM test.v1 order by f59,f60,f61 limit 20;
f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109
1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set
2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set
@@ -9762,8 +9812,8 @@ f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78
100 4 0000000004 0000000000000000000000000000000000000000000000000000000000000004 0000000004 0000000000000000000000000000000000000000000000000000000000000004 -2 3.300000000000000000000000000000 4 3.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494347e-38 1.17549e-38 1.175494355e-38 01.17549e-38 00000001.175494355e-38 01.17549e-38 00000001.175494355e-38 1000-01-04 838:59:55 1970-01-05 00:00:04 1970-01-05 00:00:04 1905 1905 1905 1enum 2set
100 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
drop view test.v1 ;
-CREATE VIEW test.v1 AS SELECT F59,f61 FROM test.tb2 limit 20 ;
-SELECT * FROM test.v1 order by f59,f61 desc limit 50;
+CREATE VIEW test.v1 AS SELECT F59,f61 FROM test.tb2;
+SELECT * FROM test.v1 order by f59,f61 desc limit 20;
F59 f61
1 0000000001
2 0000000002
@@ -9774,17 +9824,17 @@ F59 f61
8 0000000008
9 0000000009
10 0000000010
+15 NULL
+17 0000000016
+19 0000000014
+22 NULL
+24 NULL
+27 0000000026
+29 0000000024
+34 NULL
+94 NULL
100 0000000004
-250 NULL
-340 NULL
-441 NULL
-660 NULL
-2550 NULL
-2760 NULL
-3330 NULL
-3410 NULL
-76710 NULL
-569300 NULL
+100 NULL
drop view test.v1 ;
Testcase 3.3.1.54
@@ -9841,16 +9891,23 @@ f2
two
SET sql_mode = 'traditional,ansi';
CREATE OR REPLACE VIEW v1 AS
+SELECT f3 AS "pure column f3:", f1 + f3 AS "sum of columns f1 + f3 =",
+3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1):",
+'->' || CAST(f3 AS CHAR) || '<-'
+ AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR):"
+FROM t1 WHERE f1 = 2;
+CREATE OR REPLACE VIEW v1 AS
SELECT f3 AS "pure column f3: ", f1 + f3 AS "sum of columns f1 + f3 = ",
3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1): ",
'->' || CAST(f3 AS CHAR) || '<-'
AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): "
FROM t1 WHERE f1 = 2;
+ERROR 42000: Incorrect column name 'pure column f3: '
SELECT * FROM v1;
-pure column f3: 2.20000
-sum of columns f1 + f3 = 4.20000
-product of constants 3 * (- 0.11111E+1): -3.3333
-expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): ->2.20000<-
+pure column f3: 2.20000
+sum of columns f1 + f3 = 4.20000
+product of constants 3 * (- 0.11111E+1): -3.3333
+expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): ->2.20000<-
SET sql_mode = '';
Testcases 3.3.1.55 - 3.3.1.62
@@ -10418,9 +10475,9 @@ FIXME Is this a bug ?
EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
CAST(f2 AS CHAR) AS f2 FROM test1.v28;
DROP VIEW IF EXISTS test1.v28;
-CREATE OR REPLACE VIEW test1.v0 AS
+CREATE OR REPLACE VIEW test1.v0 AS
SELECT f1 as f2, f2 as f1 FROM test2.t1;
-CREATE OR REPLACE VIEW test2.v0 AS
+CREATE OR REPLACE VIEW test2.v0 AS
SELECT CAST('0001-01-01' AS DATE) as f1, f2 FROM test3.t1;
SHOW CREATE VIEW test1.v27;
SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
@@ -10879,7 +10936,7 @@ SET @variant5= 'CREATE VIEW v1 AS SELECT f61 FROM t1 HAVING f61 > 0';
SET @variant6= 'CREATE VIEW v1 AS SELECT (SELECT f60 FROM t2 WHERE f59=19) AS f61 FROM t1';
SET @variant7= 'CREATE VIEW v1 AS SELECT f61 FROM v2';
-Some server responses suffer from
+Some server responses suffer from
Bug#10773 Incorrect message is displayed while updating a view
--------------------------------------------------------------------------------
SET @variant8= 'CREATE VIEW v1 AS SELECT f59 AS f61 FROM t1 WHERE f60 IN (SELECT f59 FROM t1)';
@@ -10888,7 +10945,7 @@ CREATE ALGORITHM = TEMPTABLE VIEW v1 (f61) AS select f60 from t1;
INSERT INTO v1 VALUES (1002);
ERROR HY000: The target table v1 of the INSERT is not insertable-into
UPDATE v1 SET f61=1007;
-Got one of the listed errors
+ERROR HY000: The target table v1 of the UPDATE is not updatable
DELETE FROM v1;
ERROR HY000: The target table v1 of the DELETE is not updatable
DROP VIEW v1;
@@ -10896,7 +10953,7 @@ CREATE VIEW v1 AS SELECT f59 AS f61 FROM t1 WHERE f60 IN (SELECT f59 FROM t1);
INSERT INTO v1 VALUES (1002);
ERROR HY000: The target table v1 of the INSERT is not insertable-into
UPDATE v1 SET f61=1007;
-Got one of the listed errors
+ERROR HY000: The target table v1 of the UPDATE is not updatable
DELETE FROM v1;
ERROR HY000: The target table v1 of the DELETE is not updatable
DROP VIEW v1;
@@ -10904,7 +10961,7 @@ CREATE VIEW v1 AS SELECT f61 FROM v2;
INSERT INTO v1 VALUES (1002);
ERROR HY000: The target table v1 of the INSERT is not insertable-into
UPDATE v1 SET f61=1007;
-Got one of the listed errors
+ERROR HY000: The target table v1 of the UPDATE is not updatable
DELETE FROM v1;
ERROR HY000: The target table v1 of the DELETE is not updatable
DROP VIEW v1;
@@ -10912,7 +10969,7 @@ CREATE VIEW v1 AS SELECT (SELECT f60 FROM t2 WHERE f59=19) AS f61 FROM t1;
INSERT INTO v1 VALUES (1002);
ERROR HY000: The target table v1 of the INSERT is not insertable-into
UPDATE v1 SET f61=1007;
-Got one of the listed errors
+ERROR HY000: The target table v1 of the UPDATE is not updatable
DELETE FROM v1;
ERROR HY000: The target table v1 of the DELETE is not updatable
DROP VIEW v1;
@@ -10920,7 +10977,7 @@ CREATE VIEW v1 AS SELECT f61 FROM t1 HAVING f61 > 0;
INSERT INTO v1 VALUES (1002);
ERROR HY000: The target table v1 of the INSERT is not insertable-into
UPDATE v1 SET f61=1007;
-Got one of the listed errors
+ERROR HY000: The target table v1 of the UPDATE is not updatable
DELETE FROM v1;
ERROR HY000: The target table v1 of the DELETE is not updatable
DROP VIEW v1;
@@ -10928,7 +10985,7 @@ CREATE VIEW v1 AS SELECT f61 FROM t1 GROUP BY f61;
INSERT INTO v1 VALUES (1002);
ERROR HY000: The target table v1 of the INSERT is not insertable-into
UPDATE v1 SET f61=1007;
-Got one of the listed errors
+ERROR HY000: The target table v1 of the UPDATE is not updatable
DELETE FROM v1;
ERROR HY000: The target table v1 of the DELETE is not updatable
DROP VIEW v1;
@@ -10936,7 +10993,7 @@ CREATE VIEW v1 AS SELECT SUM(f59) AS f61 FROM t1;
INSERT INTO v1 VALUES (1002);
ERROR HY000: The target table v1 of the INSERT is not insertable-into
UPDATE v1 SET f61=1007;
-Got one of the listed errors
+ERROR HY000: The target table v1 of the UPDATE is not updatable
DELETE FROM v1;
ERROR HY000: The target table v1 of the DELETE is not updatable
DROP VIEW v1;
@@ -10944,7 +11001,7 @@ CREATE VIEW v1 AS SELECT DISTINCTROW(f61) FROM t1;
INSERT INTO v1 VALUES (1002);
ERROR HY000: The target table v1 of the INSERT is not insertable-into
UPDATE v1 SET f61=1007;
-Got one of the listed errors
+ERROR HY000: The target table v1 of the UPDATE is not updatable
DELETE FROM v1;
ERROR HY000: The target table v1 of the DELETE is not updatable
DROP VIEW v1;
@@ -10952,7 +11009,7 @@ CREATE VIEW v1 AS SELECT DISTINCT(f61) FROM t1;
INSERT INTO v1 VALUES (1002);
ERROR HY000: The target table v1 of the INSERT is not insertable-into
UPDATE v1 SET f61=1007;
-Got one of the listed errors
+ERROR HY000: The target table v1 of the UPDATE is not updatable
DELETE FROM v1;
ERROR HY000: The target table v1 of the DELETE is not updatable
DROP VIEW v1;
@@ -11121,9 +11178,9 @@ f1 f2 f4 report
4 NULL <------ 20 --------> t1 4
4 NULL <------ 20 --------> v1 4
ALTER TABLE t1 CHANGE COLUMN f1 f1 VARCHAR(30);
-INSERT INTO t1 SET f1 = '<------------- 30 ----------->',
+INSERT INTO t1 SET f1 = '<------------- 30 ----------->',
f4 = '<------ 20 -------->', report = 't1 5';
-INSERT INTO v1 SET f1 = '<------------- 30 ----------->',
+INSERT INTO v1 SET f1 = '<------------- 30 ----------->',
f4 = '<------ 20 -------->', report = 'v1 5';
DESCRIBE t1;
Field Type Null Key Default Extra
diff --git a/mysql-test/suite/funcs_1/r/myisam__datadict.result b/mysql-test/suite/funcs_1/r/myisam__datadict.result
index d4571c5d718..29fcc8a378f 100644
--- a/mysql-test/suite/funcs_1/r/myisam__datadict.result
+++ b/mysql-test/suite/funcs_1/r/myisam__datadict.result
@@ -10,8 +10,9 @@
. *__datadict.test are started. This can be a result of showing e.g. maximum
. values of the number of rows of tables.
.
-. This .result file has been checked OK with Linux 5.0.23-bk,
-. ChangeSet@1.2211, 2006-06-28 10:11:43-07:00.
+. This .result file has been checked OK with Linux 5.0.48,
+. build tree ChangeSet@1.2477.6.3, 2007-07-30
+. except that the not fixed Bug#30020 causes a difference.
.
--------------------------------------------------------------------------------
@@ -20,11 +21,21 @@ FIXME: There are subtests that are switched off due to known bugs:
SELECT 1 AS "have_bug_11589";
have_bug_11589
1
+SELECT 1 AS "have_bug_30689";
+have_bug_30689
+1
There are some statements where the ps-protocol is switched off.
This may come from the bug listed below, ir from other problems.
Bug#11589: mysqltest, --ps-protocol, strange output, float/double/real with zerofill
--------------------------------------------------------------------------------
+
+Selects on INFORMATION_SCHEMA.VIEWS present incomplete
+content for the column VIEW_DEFINITION in cases where
+the view selects(=is based) on an INFORMATION_SCHEMA table.
+---> VIEWS vu and vu1
+Bug#30689 Wrong content in I_S.VIEWS.VIEW_DEFINITION if VIEW is based on I_S
+--------------------------------------------------------------------------------
SET @NO_REFRESH = IF( '' = '', 0, 1);
DROP DATABASE IF EXISTS test1;
CREATE DATABASE test1;
@@ -1063,7 +1074,8 @@ CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT
SELECT * FROM tables
-WHERE NOT( table_schema = 'information_schema');
+WHERE NOT( table_schema = 'information_schema')
+AND NOT (table_schema = 'mysql' AND table_name LIKE 'help_%');
TABLE_CATALOG NULL
TABLE_SCHEMA db_datadict
TABLE_NAME v1
@@ -1234,90 +1246,6 @@ CREATE_OPTIONS
TABLE_COMMENT General log
TABLE_CATALOG NULL
TABLE_SCHEMA mysql
-TABLE_NAME help_category
-TABLE_TYPE BASE TABLE
-ENGINE MyISAM
-VERSION 10
-ROW_FORMAT Fixed
-TABLE_ROWS 37
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME YYYY-MM-DD hh:mm:ss
-UPDATE_TIME YYYY-MM-DD hh:mm:ss
-CHECK_TIME YYYY-MM-DD hh:mm:ss
-TABLE_COLLATION utf8_general_ci
-CHECKSUM NULL
-CREATE_OPTIONS
-TABLE_COMMENT help categories
-TABLE_CATALOG NULL
-TABLE_SCHEMA mysql
-TABLE_NAME help_keyword
-TABLE_TYPE BASE TABLE
-ENGINE MyISAM
-VERSION 10
-ROW_FORMAT Fixed
-TABLE_ROWS 424
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME YYYY-MM-DD hh:mm:ss
-UPDATE_TIME YYYY-MM-DD hh:mm:ss
-CHECK_TIME YYYY-MM-DD hh:mm:ss
-TABLE_COLLATION utf8_general_ci
-CHECKSUM NULL
-CREATE_OPTIONS
-TABLE_COMMENT help keywords
-TABLE_CATALOG NULL
-TABLE_SCHEMA mysql
-TABLE_NAME help_relation
-TABLE_TYPE BASE TABLE
-ENGINE MyISAM
-VERSION 10
-ROW_FORMAT Fixed
-TABLE_ROWS 901
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME YYYY-MM-DD hh:mm:ss
-UPDATE_TIME YYYY-MM-DD hh:mm:ss
-CHECK_TIME YYYY-MM-DD hh:mm:ss
-TABLE_COLLATION utf8_general_ci
-CHECKSUM NULL
-CREATE_OPTIONS
-TABLE_COMMENT keyword-topic relation
-TABLE_CATALOG NULL
-TABLE_SCHEMA mysql
-TABLE_NAME help_topic
-TABLE_TYPE BASE TABLE
-ENGINE MyISAM
-VERSION 10
-ROW_FORMAT Dynamic
-TABLE_ROWS 479
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME YYYY-MM-DD hh:mm:ss
-UPDATE_TIME YYYY-MM-DD hh:mm:ss
-CHECK_TIME YYYY-MM-DD hh:mm:ss
-TABLE_COLLATION utf8_general_ci
-CHECKSUM NULL
-CREATE_OPTIONS
-TABLE_COMMENT help topics
-TABLE_CATALOG NULL
-TABLE_SCHEMA mysql
TABLE_NAME host
TABLE_TYPE BASE TABLE
ENGINE MyISAM
@@ -2366,9 +2294,9 @@ NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 1
NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
-NULL information_schema COLUMNS COLUMN_TYPE 15 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema COLUMNS COLUMN_TYPE 15 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema COLUMNS COLUMN_KEY 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
-NULL information_schema COLUMNS EXTRA 17 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select
+NULL information_schema COLUMNS EXTRA 17 NO varchar 27 81 NULL NULL utf8 utf8_general_ci varchar(27) select
NULL information_schema COLUMNS PRIVILEGES 18 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select
NULL information_schema COLUMNS COLUMN_COMMENT 19 NO varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select
NULL information_schema COLUMN_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select
@@ -2390,12 +2318,12 @@ NULL information_schema EVENTS EVENT_NAME 3 NO varchar 64 192 NULL NULL utf8 ut
NULL information_schema EVENTS DEFINER 4 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
NULL information_schema EVENTS TIME_ZONE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema EVENTS EVENT_BODY 6 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select
-NULL information_schema EVENTS EVENT_DEFINITION 7 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema EVENTS EVENT_DEFINITION 7 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema EVENTS EVENT_TYPE 8 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select
NULL information_schema EVENTS EXECUTE_AT 9 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS INTERVAL_VALUE 10 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select
NULL information_schema EVENTS INTERVAL_FIELD 11 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select
-NULL information_schema EVENTS SQL_MODE 12 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema EVENTS SQL_MODE 12 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema EVENTS STARTS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS ENDS 14 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS STATUS 15 NO varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select
@@ -2533,7 +2461,7 @@ NULL information_schema ROUTINES SQL_PATH 14 NULL YES varchar 64 192 NULL NULL u
NULL information_schema ROUTINES SECURITY_TYPE 15 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select
NULL information_schema ROUTINES CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema ROUTINES LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select
-NULL information_schema ROUTINES SQL_MODE 18 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema ROUTINES SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema ROUTINES ROUTINE_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema ROUTINES DEFINER 20 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
NULL information_schema ROUTINES CHARACTER_SET_CLIENT 21 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
@@ -2610,7 +2538,7 @@ NULL information_schema TRIGGERS EVENT_OBJECT_SCHEMA 6 NO varchar 64 192 NULL N
NULL information_schema TRIGGERS EVENT_OBJECT_TABLE 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) 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_CONDITION 9 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
-NULL information_schema TRIGGERS ACTION_STATEMENT 10 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema TRIGGERS ACTION_STATEMENT 10 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema TRIGGERS ACTION_ORIENTATION 11 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select
NULL information_schema TRIGGERS ACTION_TIMING 12 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select
NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_TABLE 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
@@ -2618,8 +2546,8 @@ NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_TABLE 14 NULL YES varchar
NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW 15 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema TRIGGERS CREATED 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
-NULL information_schema TRIGGERS SQL_MODE 18 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
-NULL information_schema TRIGGERS DEFINER 19 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema TRIGGERS SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema TRIGGERS DEFINER 19 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema TRIGGERS CHARACTER_SET_CLIENT 20 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema TRIGGERS COLLATION_CONNECTION 21 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema TRIGGERS DATABASE_COLLATION 22 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
@@ -2630,7 +2558,7 @@ NULL information_schema USER_PRIVILEGES IS_GRANTABLE 4 NO varchar 3 9 NULL NULL
NULL information_schema VIEWS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select
NULL information_schema VIEWS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema VIEWS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
-NULL information_schema VIEWS VIEW_DEFINITION 4 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema VIEWS VIEW_DEFINITION 4 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext 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 IS_UPDATABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema VIEWS DEFINER 7 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
@@ -2667,7 +2595,7 @@ NULL mysql columns_priv Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PR
NULL mysql columns_priv User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references
NULL mysql columns_priv Table_name 4 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
NULL mysql columns_priv Column_name 5 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
-NULL mysql columns_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
+NULL mysql columns_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL mysql columns_priv Column_priv 7 NO set 31 93 NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','References') select,insert,update,references
NULL mysql db Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references
NULL mysql db Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
@@ -2698,7 +2626,7 @@ NULL mysql event definer 4 NO char 77 231 NULL NULL utf8 utf8_bin char(77) se
NULL mysql event execute_at 5 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references
NULL mysql event interval_value 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
NULL mysql event interval_field 7 NULL YES enum 18 54 NULL NULL utf8 utf8_general_ci enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') select,insert,update,references
-NULL mysql event created 8 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
+NULL mysql event created 8 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL mysql event modified 9 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
NULL mysql event last_executed 10 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references
NULL mysql event starts 11 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references
@@ -2717,12 +2645,12 @@ NULL mysql func name 1 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI sel
NULL mysql func ret 2 0 NO tinyint NULL NULL 3 0 NULL NULL tinyint(1) select,insert,update,references
NULL mysql func dl 3 NO char 128 384 NULL NULL utf8 utf8_bin char(128) select,insert,update,references
NULL mysql func type 4 NULL NO enum 9 27 NULL NULL utf8 utf8_general_ci enum('function','aggregate') select,insert,update,references
-NULL mysql general_log event_time 1 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
-NULL mysql general_log user_host 2 NULL YES mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
-NULL mysql general_log thread_id 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
-NULL mysql general_log server_id 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
-NULL mysql general_log command_type 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
-NULL mysql general_log argument 6 NULL YES mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
+NULL mysql general_log event_time 1 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
+NULL mysql general_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
+NULL mysql general_log thread_id 3 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
+NULL mysql general_log server_id 4 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
+NULL mysql general_log command_type 5 NULL NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+NULL mysql general_log argument 6 NULL NO mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
NULL mysql help_category help_category_id 1 NULL NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned PRI select,insert,update,references
NULL mysql help_category name 2 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) UNI select,insert,update,references
NULL mysql help_category parent_category_id 3 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references
@@ -2775,10 +2703,10 @@ NULL mysql proc sql_data_access 6 CONTAINS_SQL NO enum 17 51 NULL NULL utf8 utf8
NULL mysql proc is_deterministic 7 NO NO enum 3 9 NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references
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 param_list 9 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references
-NULL mysql proc returns 10 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
+NULL mysql proc returns 10 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references
NULL mysql proc body 11 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references
NULL mysql proc definer 12 NO char 77 231 NULL NULL utf8 utf8_bin char(77) select,insert,update,references
-NULL mysql proc created 13 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
+NULL mysql proc created 13 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL mysql proc modified 14 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
NULL mysql proc sql_mode 15 NO set 431 1293 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') select,insert,update,references
NULL mysql proc comment 16 NO char 64 192 NULL NULL utf8 utf8_bin char(64) select,insert,update,references
@@ -2793,7 +2721,7 @@ NULL mysql procs_priv Routine_name 4 NO char 64 192 NULL NULL utf8 utf8_bin cha
NULL mysql procs_priv Routine_type 5 NULL NO enum 9 27 NULL NULL utf8 utf8_bin enum('FUNCTION','PROCEDURE') 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
NULL mysql procs_priv Proc_priv 7 NO set 27 81 NULL NULL utf8 utf8_general_ci set('Execute','Alter Routine','Grant') select,insert,update,references
-NULL mysql procs_priv Timestamp 8 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
+NULL mysql procs_priv Timestamp 8 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL mysql servers Server_name 1 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) PRI select,insert,update,references
NULL mysql servers Host 2 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
NULL mysql servers Db 3 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
@@ -2803,23 +2731,23 @@ NULL mysql servers Port 6 0 NO int NULL NULL 10 0 NULL NULL int(4) select,inse
NULL mysql servers Socket 7 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
NULL mysql servers Wrapper 8 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
NULL mysql servers Owner 9 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
-NULL mysql slow_log start_time 1 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
+NULL mysql slow_log start_time 1 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL mysql slow_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
NULL mysql slow_log query_time 3 NULL NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references
NULL mysql slow_log lock_time 4 NULL NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references
NULL mysql slow_log rows_sent 5 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
NULL mysql slow_log rows_examined 6 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
-NULL mysql slow_log db 7 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select,insert,update,references
-NULL mysql slow_log last_insert_id 8 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
-NULL mysql slow_log insert_id 9 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
-NULL mysql slow_log server_id 10 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
+NULL mysql slow_log db 7 NULL NO varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select,insert,update,references
+NULL mysql slow_log last_insert_id 8 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
+NULL mysql slow_log insert_id 9 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
+NULL mysql slow_log server_id 10 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
NULL mysql slow_log sql_text 11 NULL NO mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
NULL mysql tables_priv Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references
NULL mysql tables_priv Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
NULL mysql tables_priv User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references
NULL mysql tables_priv Table_name 4 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
NULL mysql tables_priv Grantor 5 NO char 77 231 NULL NULL utf8 utf8_bin char(77) MUL select,insert,update,references
-NULL mysql tables_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
+NULL mysql tables_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL mysql tables_priv Table_priv 7 NO set 98 294 NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') select,insert,update,references
NULL mysql tables_priv Column_priv 8 NO set 31 93 NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','References') select,insert,update,references
NULL mysql time_zone Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI auto_increment select,insert,update,references
@@ -3139,7 +3067,7 @@ NULL test tb4 f217 42 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL N
NULL test tb4 f218 43 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references
NULL test tb4 f219 44 NULL YES time NULL NULL NULL NULL NULL NULL time select,insert,update,references
NULL test tb4 f220 45 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references
-NULL test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
+NULL test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL test tb4 f222 47 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references
NULL test tb4 f223 48 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references
NULL test tb4 f224 49 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references
@@ -3264,7 +3192,7 @@ binary binary Binary pseudo charset 1
geostd8 geostd8_general_ci GEOSTD8 Georgian 1
cp932 cp932_japanese_ci SJIS for Windows Japanese 2
eucjpms eucjpms_japanese_ci UJIS for Windows Japanese 3
-select sum(id) from collations;
+select sum(id) from collations where collation_name <> 'utf8_general_cs';
sum(id)
10840
select collation_name, character_set_name into @x,@y
@@ -3280,7 +3208,8 @@ END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh
select count(*) from routines;
count(*)
1
-select * from statistics;
+select * from statistics
+where not (table_schema = 'mysql' and table_name like 'help_%');
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT
NULL mysql columns_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE
NULL mysql columns_priv 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE
@@ -3294,14 +3223,6 @@ NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE
NULL mysql event 0 mysql PRIMARY 1 db A NULL NULL NULL BTREE
NULL mysql event 0 mysql PRIMARY 2 name A 0 NULL NULL BTREE
NULL mysql func 0 mysql PRIMARY 1 name A 0 NULL NULL BTREE
-NULL mysql help_category 0 mysql PRIMARY 1 help_category_id A 37 NULL NULL BTREE
-NULL mysql help_category 0 mysql name 1 name A 37 NULL NULL BTREE
-NULL mysql help_keyword 0 mysql PRIMARY 1 help_keyword_id A 424 NULL NULL BTREE
-NULL mysql help_keyword 0 mysql name 1 name A 424 NULL NULL BTREE
-NULL mysql help_relation 0 mysql PRIMARY 1 help_keyword_id A NULL NULL NULL BTREE
-NULL mysql help_relation 0 mysql PRIMARY 2 help_topic_id A 901 NULL NULL BTREE
-NULL mysql help_topic 0 mysql PRIMARY 1 help_topic_id A 479 NULL NULL BTREE
-NULL mysql help_topic 0 mysql name 1 name A 479 NULL NULL BTREE
NULL mysql host 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE
NULL mysql host 0 mysql PRIMARY 2 Db A 0 NULL NULL BTREE
NULL mysql ndb_binlog_index 0 mysql PRIMARY 1 epoch A 0 NULL NULL BTREE
@@ -3333,8 +3254,16 @@ NULL mysql user 0 mysql PRIMARY 2 User A 3 NULL NULL BTREE
select * from views;
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION
NULL db_datadict v1 SELECT * FROM information_schema.tables NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
-NULL db_datadict vu SELECT DISTINCT u, NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
-NULL db_datadict vu1 SELECT grantee AS u NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
+NULL db_datadict vu SELECT DISTINCT u,
+SUBSTRING( u, LENGTH(SUBSTRING_INDEX(u,'@',1))+3 )
+AS server,
+SUBSTRING( u, LENGTH(SUBSTRING_INDEX(u,'@',1))+3,
+LENGTH( SUBSTRING( u,
+LENGTH( SUBSTRING_INDEX(u, '@',1)) +3 )) - 1 )
+AS Server_Clean
+FROM db_datadict.vu1 NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
+NULL db_datadict vu1 SELECT grantee AS u
+FROM information_schema.user_privileges NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
select * from user_privileges order by grantee, privilege_type;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'127.0.0.1' NULL ALTER YES
@@ -3532,9 +3461,10 @@ NULL mysql PRIMARY NULL mysql user User 2 NULL NULL NULL NULL
select count(*) as max_recs from key_column_usage;
max_recs
45
-select max(cardinality) from statistics;
+select max(cardinality) from statistics
+where not (table_schema = 'mysql' and table_name like 'help_%');
max(cardinality)
-901
+393
select concat("View '",
table_name, "' is associated with the database '", table_schema, "'.")
AS "Who is Who for the Views"
@@ -3733,10 +3663,10 @@ NULL information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 NO varchar 64 192 N
SELECT * FROM character_sets LIMIT 1;
CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN
big5 big5_chinese_ci Big5 Traditional Chinese 2
-SELECT * FROM collations LIMIT 1;
+SELECT * FROM collations where collation_name <> 'utf8_general_cs' LIMIT 1;
COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN
big5_chinese_ci big5 1 Yes Yes 1
-SELECT * FROM collation_character_set_applicability LIMIT 1;
+SELECT * FROM collation_character_set_applicability where collation_name <> 'utf8_general_cs' LIMIT 1;
COLLATION_NAME CHARACTER_SET_NAME
big5_chinese_ci big5
SELECT * FROM routines LIMIT 1;
@@ -4424,7 +4354,8 @@ CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT
SELECT * FROM information_schema.tables
-WHERE NOT( table_schema = 'information_schema');
+WHERE NOT( table_schema = 'information_schema')
+AND NOT (table_schema = 'mysql' AND table_name LIKE 'help_%');
TABLE_CATALOG NULL
TABLE_SCHEMA db_datadict
TABLE_NAME v1
@@ -4595,90 +4526,6 @@ CREATE_OPTIONS
TABLE_COMMENT General log
TABLE_CATALOG NULL
TABLE_SCHEMA mysql
-TABLE_NAME help_category
-TABLE_TYPE BASE TABLE
-ENGINE MyISAM
-VERSION 10
-ROW_FORMAT Fixed
-TABLE_ROWS 37
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME YYYY-MM-DD hh:mm:ss
-UPDATE_TIME YYYY-MM-DD hh:mm:ss
-CHECK_TIME YYYY-MM-DD hh:mm:ss
-TABLE_COLLATION utf8_general_ci
-CHECKSUM NULL
-CREATE_OPTIONS
-TABLE_COMMENT help categories
-TABLE_CATALOG NULL
-TABLE_SCHEMA mysql
-TABLE_NAME help_keyword
-TABLE_TYPE BASE TABLE
-ENGINE MyISAM
-VERSION 10
-ROW_FORMAT Fixed
-TABLE_ROWS 424
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME YYYY-MM-DD hh:mm:ss
-UPDATE_TIME YYYY-MM-DD hh:mm:ss
-CHECK_TIME YYYY-MM-DD hh:mm:ss
-TABLE_COLLATION utf8_general_ci
-CHECKSUM NULL
-CREATE_OPTIONS
-TABLE_COMMENT help keywords
-TABLE_CATALOG NULL
-TABLE_SCHEMA mysql
-TABLE_NAME help_relation
-TABLE_TYPE BASE TABLE
-ENGINE MyISAM
-VERSION 10
-ROW_FORMAT Fixed
-TABLE_ROWS 901
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME YYYY-MM-DD hh:mm:ss
-UPDATE_TIME YYYY-MM-DD hh:mm:ss
-CHECK_TIME YYYY-MM-DD hh:mm:ss
-TABLE_COLLATION utf8_general_ci
-CHECKSUM NULL
-CREATE_OPTIONS
-TABLE_COMMENT keyword-topic relation
-TABLE_CATALOG NULL
-TABLE_SCHEMA mysql
-TABLE_NAME help_topic
-TABLE_TYPE BASE TABLE
-ENGINE MyISAM
-VERSION 10
-ROW_FORMAT Dynamic
-TABLE_ROWS 479
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME YYYY-MM-DD hh:mm:ss
-UPDATE_TIME YYYY-MM-DD hh:mm:ss
-CHECK_TIME YYYY-MM-DD hh:mm:ss
-TABLE_COLLATION utf8_general_ci
-CHECKSUM NULL
-CREATE_OPTIONS
-TABLE_COMMENT help topics
-TABLE_CATALOG NULL
-TABLE_SCHEMA mysql
TABLE_NAME host
TABLE_TYPE BASE TABLE
ENGINE MyISAM
@@ -5742,8 +5589,16 @@ NULL mysql columns_priv 0 mysql PRIMARY 5 Column_name A 0 NULL NULL BTREE
select * from information_schema.views limit 0, 5;
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION
NULL db_datadict v1 SELECT * FROM information_schema.tables NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
-NULL db_datadict vu SELECT DISTINCT u, NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
-NULL db_datadict vu1 SELECT grantee AS u NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
+NULL db_datadict vu SELECT DISTINCT u,
+SUBSTRING( u, LENGTH(SUBSTRING_INDEX(u,'@',1))+3 )
+AS server,
+SUBSTRING( u, LENGTH(SUBSTRING_INDEX(u,'@',1))+3,
+LENGTH( SUBSTRING( u,
+LENGTH( SUBSTRING_INDEX(u, '@',1)) +3 )) - 1 )
+AS Server_Clean
+FROM db_datadict.vu1 NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
+NULL db_datadict vu1 SELECT grantee AS u
+FROM information_schema.user_privileges NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
select * from information_schema.user_privileges limit 0, 5;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'localhost' NULL SELECT YES
@@ -5794,10 +5649,10 @@ COUNT(*)
SELECT COUNT(*) FROM information_schema. character_sets ;
COUNT(*)
36
-SELECT COUNT(*) FROM information_schema. collations ;
+SELECT COUNT(*) FROM information_schema. collations where collation_name <> 'utf8_general_cs' ;
COUNT(*)
127
-SELECT COUNT(*) FROM information_schema. collation_character_set_applicability ;
+SELECT COUNT(*) FROM information_schema. collation_character_set_applicability where collation_name <> 'utf8_general_cs' ;
COUNT(*)
128
SELECT COUNT(*) FROM information_schema. routines ;
@@ -5876,10 +5731,10 @@ utf8_esperanto_ci utf8
utf8_estonian_ci utf8
select routine_definition from routines;
routine_definition
-select * from statistics group by index_name asc limit 0, 5;
+select * from statistics where table_name not like 'help_%'
+group by index_name asc limit 0, 5;
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT
NULL mysql procs_priv 1 mysql Grantor 1 Grantor A NULL NULL NULL BTREE
-NULL mysql help_category 0 mysql name 1 name A 37 NULL NULL BTREE
NULL mysql columns_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE
NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE
select concat(table_schema, ', ', table_name, ', ', view_definition) view_info
@@ -5993,9 +5848,9 @@ NULL test latin1 latin1_swedish_ci NULL
NULL test1 latin1 latin1_swedish_ci NULL
select distinct grantee from user_privileges;
grantee
-'root'@'localhost'
-'root'@'<SERVER_NAME>'
'root'@'127.0.0.1'
+'root'@'<SERVER_NAME>'
+'root'@'localhost'
select all grantee from user_privileges order by grantee, privilege_type;
grantee
'root'@'127.0.0.1'
@@ -7552,7 +7407,7 @@ from information_schema.statistics
where table_schema like 'db_datadict%';
table_name index_schema index_name index_type
select *
-from information_schema.user_privileges order by grantee, privilege_type;
+from information_schema.user_privileges;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'127.0.0.1' NULL ALTER YES
'root'@'127.0.0.1' NULL ALTER ROUTINE YES
@@ -7703,7 +7558,7 @@ where table_schema like 'db_datadict%';
table_name index_schema index_name index_type
res_t_401013 db_datadict i_6_401013 BTREE
select *
-from information_schema.user_privileges order by grantee, privilege_type;
+from information_schema.user_privileges;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'127.0.0.1' NULL ALTER YES
'root'@'127.0.0.1' NULL ALTER ROUTINE YES
@@ -7840,7 +7695,7 @@ from information_schema.statistics
where table_schema like 'db_datadict%';
table_name index_schema index_name index_type
select *
-from information_schema.user_privileges order by grantee, privilege_type;
+from information_schema.user_privileges;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'127.0.0.1' NULL ALTER YES
'root'@'127.0.0.1' NULL ALTER ROUTINE YES
@@ -7945,7 +7800,7 @@ Testcase 3.2.1.14:
DROP DATABASE IF EXISTS db_datadict;
CREATE DATABASE db_datadict;
USE db_datadict;
-create table res_t_401014(f1 char(10), f2 text(25), f3 int);
+create table res_t_401014(f1 char(10), f2 varchar(25), f3 int);
create view res_v_401014 as select * from res_t_401014;
create procedure sp_6_401014() select 'db_datadict';
create function fn_6_401014() returns int return 0;
@@ -7968,10 +7823,10 @@ from information_schema.columns
where table_schema like 'db_datadict%';
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT
NULL db_datadict res_t_401014 f1 1 NULL YES char 10 10 NULL NULL latin1 latin1_swedish_ci char(10) select,insert,update,references
-NULL db_datadict res_t_401014 f2 2 NULL YES tinytext 255 255 NULL NULL latin1 latin1_swedish_ci tinytext select,insert,update,references
+NULL db_datadict res_t_401014 f2 2 NULL YES varchar 25 25 NULL NULL latin1 latin1_swedish_ci varchar(25) select,insert,update,references
NULL db_datadict res_t_401014 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
NULL db_datadict res_v_401014 f1 1 NULL YES char 10 10 NULL NULL latin1 latin1_swedish_ci char(10) select,insert,update,references
-NULL db_datadict res_v_401014 f2 2 NULL YES tinytext 255 255 NULL NULL latin1 latin1_swedish_ci tinytext select,insert,update,references
+NULL db_datadict res_v_401014 f2 2 NULL YES varchar 25 25 NULL NULL latin1 latin1_swedish_ci varchar(25) select,insert,update,references
NULL db_datadict res_v_401014 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
select table_schema, table_name, is_updatable
from information_schema.views
@@ -7989,7 +7844,7 @@ from information_schema.statistics
where table_schema like 'db_datadict%';
table_name index_schema index_name index_type
select *
-from information_schema.user_privileges order by grantee, privilege_type;
+from information_schema.user_privileges;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'127.0.0.1' NULL ALTER YES
'root'@'127.0.0.1' NULL ALTER ROUTINE YES
@@ -8090,7 +7945,7 @@ WHERE trigger_schema LIKE 'db_datadict%';
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
use db_datadict;
alter table res_t_401014 change f1 ff1 int;
-alter table res_t_401014 engine = innodb;
+alter table res_t_401014 engine = MEMORY;
alter table res_t_401014 change f3 f3_new bigint;
alter view res_v_401014 as select ff1 from res_t_401014;
alter procedure sp_6_401014 sql security invoker;
@@ -8108,14 +7963,14 @@ select table_catalog, table_schema, engine
from information_schema.tables
where table_schema like 'db_datadict%';
table_catalog table_schema engine
-NULL db_datadict InnoDB
+NULL db_datadict MEMORY
NULL db_datadict NULL
select *
from information_schema.columns
where table_schema like 'db_datadict%';
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT
NULL db_datadict res_t_401014 ff1 1 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
-NULL db_datadict res_t_401014 f2 2 NULL YES tinytext 255 255 NULL NULL latin1 latin1_swedish_ci tinytext select,insert,update,references
+NULL db_datadict res_t_401014 f2 2 NULL YES varchar 25 25 NULL NULL latin1 latin1_swedish_ci varchar(25) select,insert,update,references
NULL db_datadict res_t_401014 f3_new 3 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) select,insert,update,references
NULL db_datadict res_v_401014 ff1 1 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
select table_schema, table_name, is_updatable
@@ -8134,7 +7989,7 @@ from information_schema.statistics
where table_schema like 'db_datadict%';
table_name index_schema index_name index_type
select *
-from information_schema.user_privileges order by grantee, privilege_type;
+from information_schema.user_privileges;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'127.0.0.1' NULL ALTER YES
'root'@'127.0.0.1' NULL ALTER ROUTINE YES
@@ -8292,7 +8147,7 @@ where table_schema like 'db_datadict%';
table_name index_schema index_name index_type
res_t_401015 db_datadict i_6_401015 BTREE
select *
-from information_schema.user_privileges order by grantee, privilege_type;
+from information_schema.user_privileges;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'127.0.0.1' NULL ALTER YES
'root'@'127.0.0.1' NULL ALTER ROUTINE YES
@@ -8428,7 +8283,7 @@ from information_schema.statistics
where table_schema like 'db_datadict%';
table_name index_schema index_name index_type
select *
-from information_schema.user_privileges order by grantee, privilege_type;
+from information_schema.user_privileges;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'127.0.0.1' NULL ALTER YES
'root'@'127.0.0.1' NULL ALTER ROUTINE YES
@@ -8678,7 +8533,8 @@ ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_
FLUSH PRIVILEGES;
connect(localhost,u_6_401017,,test,MYSQL_PORT,MYSQL_SOCK);
use information_schema;
-select * from collation_character_set_applicability;
+select * from collation_character_set_applicability
+where collation_name <> 'utf8_general_cs';
COLLATION_NAME CHARACTER_SET_NAME
big5_chinese_ci big5
big5_bin big5
@@ -8884,7 +8740,7 @@ COLUMNS CHARACTER_SET_NAME varchar(64)
COLUMNS COLLATION_NAME varchar(64)
COLUMNS COLUMN_TYPE longtext
COLUMNS COLUMN_KEY varchar(3)
-COLUMNS EXTRA varchar(20)
+COLUMNS EXTRA varchar(27)
COLUMNS PRIVILEGES varchar(80)
COLUMNS COLUMN_COMMENT varchar(255)
COLUMN_PRIVILEGES GRANTEE varchar(81)
@@ -9477,7 +9333,7 @@ binary
geostd8
cp932
eucjpms
-select collation_name from collations;
+select collation_name from collations where collation_name <> 'utf8_general_cs';
collation_name
big5_chinese_ci
big5_bin
@@ -9842,7 +9698,7 @@ NULL information_schema collations SORTLEN 6 0 NO bigint NULL NULL 19 0 NULL NUL
Testcase 3.2.3.2:
--------------------------------------------------------------------------------
-SELECT * FROM collations;
+SELECT * FROM collations where collation_name <> 'utf8_general_cs';
COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN
big5_chinese_ci big5 1 Yes Yes 1
big5_bin big5 84 Yes 1
@@ -10004,7 +9860,8 @@ NULL information_schema collation_character_set_applicability CHARACTER_SET_NAME
Testcase 3.2.4.2:
--------------------------------------------------------------------------------
-SELECT * FROM collation_character_set_applicability;
+SELECT * FROM collation_character_set_applicability
+where collation_name <> 'utf8_general_cs';
COLLATION_NAME CHARACTER_SET_NAME
big5_chinese_ci big5
big5_bin big5
@@ -10317,9 +10174,9 @@ NUMERIC_PRECISION bigint(21) unsigned YES NULL
NUMERIC_SCALE bigint(21) unsigned YES NULL
CHARACTER_SET_NAME varchar(64) YES NULL
COLLATION_NAME varchar(64) YES NULL
-COLUMN_TYPE longtext NO
+COLUMN_TYPE longtext NO NULL
COLUMN_KEY varchar(3) NO
-EXTRA varchar(20) NO
+EXTRA varchar(27) NO
PRIVILEGES varchar(80) NO
COLUMN_COMMENT varchar(255) NO
SHOW CREATE TABLE columns;
@@ -10341,7 +10198,7 @@ COLUMNS CREATE TEMPORARY TABLE `COLUMNS` (
`COLLATION_NAME` varchar(64) DEFAULT NULL,
`COLUMN_TYPE` longtext NOT NULL,
`COLUMN_KEY` varchar(3) NOT NULL DEFAULT '',
- `EXTRA` varchar(20) NOT NULL DEFAULT '',
+ `EXTRA` varchar(27) NOT NULL DEFAULT '',
`PRIVILEGES` varchar(80) NOT NULL DEFAULT '',
`COLUMN_COMMENT` varchar(255) NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=utf8
@@ -10370,9 +10227,9 @@ NULL information_schema columns NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 1
NULL information_schema columns NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema columns CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema columns COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
-NULL information_schema columns COLUMN_TYPE 15 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema columns COLUMN_TYPE 15 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema columns COLUMN_KEY 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
-NULL information_schema columns EXTRA 17 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select
+NULL information_schema columns EXTRA 17 NO varchar 27 81 NULL NULL utf8 utf8_general_ci varchar(27) select
NULL information_schema columns PRIVILEGES 18 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select
NULL information_schema columns COLUMN_COMMENT 19 NO varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select
@@ -10425,9 +10282,9 @@ NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 1
NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
-NULL information_schema COLUMNS COLUMN_TYPE 15 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema COLUMNS COLUMN_TYPE 15 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema COLUMNS COLUMN_KEY 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
-NULL information_schema COLUMNS EXTRA 17 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select
+NULL information_schema COLUMNS EXTRA 17 NO varchar 27 81 NULL NULL utf8 utf8_general_ci varchar(27) select
NULL information_schema COLUMNS PRIVILEGES 18 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select
NULL information_schema COLUMNS COLUMN_COMMENT 19 NO varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select
NULL information_schema COLUMN_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select
@@ -10449,12 +10306,12 @@ NULL information_schema EVENTS EVENT_NAME 3 NO varchar 64 192 NULL NULL utf8 ut
NULL information_schema EVENTS DEFINER 4 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
NULL information_schema EVENTS TIME_ZONE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema EVENTS EVENT_BODY 6 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select
-NULL information_schema EVENTS EVENT_DEFINITION 7 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema EVENTS EVENT_DEFINITION 7 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema EVENTS EVENT_TYPE 8 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select
NULL information_schema EVENTS EXECUTE_AT 9 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS INTERVAL_VALUE 10 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select
NULL information_schema EVENTS INTERVAL_FIELD 11 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select
-NULL information_schema EVENTS SQL_MODE 12 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema EVENTS SQL_MODE 12 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema EVENTS STARTS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS ENDS 14 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS STATUS 15 NO varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select
@@ -10592,7 +10449,7 @@ NULL information_schema ROUTINES SQL_PATH 14 NULL YES varchar 64 192 NULL NULL u
NULL information_schema ROUTINES SECURITY_TYPE 15 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select
NULL information_schema ROUTINES CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema ROUTINES LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select
-NULL information_schema ROUTINES SQL_MODE 18 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema ROUTINES SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema ROUTINES ROUTINE_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema ROUTINES DEFINER 20 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
NULL information_schema ROUTINES CHARACTER_SET_CLIENT 21 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
@@ -10669,7 +10526,7 @@ NULL information_schema TRIGGERS EVENT_OBJECT_SCHEMA 6 NO varchar 64 192 NULL N
NULL information_schema TRIGGERS EVENT_OBJECT_TABLE 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) 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_CONDITION 9 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
-NULL information_schema TRIGGERS ACTION_STATEMENT 10 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema TRIGGERS ACTION_STATEMENT 10 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema TRIGGERS ACTION_ORIENTATION 11 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select
NULL information_schema TRIGGERS ACTION_TIMING 12 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select
NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_TABLE 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
@@ -10677,8 +10534,8 @@ NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_TABLE 14 NULL YES varchar
NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW 15 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema TRIGGERS CREATED 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
-NULL information_schema TRIGGERS SQL_MODE 18 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
-NULL information_schema TRIGGERS DEFINER 19 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema TRIGGERS SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema TRIGGERS DEFINER 19 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema TRIGGERS CHARACTER_SET_CLIENT 20 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema TRIGGERS COLLATION_CONNECTION 21 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema TRIGGERS DATABASE_COLLATION 22 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
@@ -10689,7 +10546,7 @@ NULL information_schema USER_PRIVILEGES IS_GRANTABLE 4 NO varchar 3 9 NULL NULL
NULL information_schema VIEWS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select
NULL information_schema VIEWS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema VIEWS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
-NULL information_schema VIEWS VIEW_DEFINITION 4 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema VIEWS VIEW_DEFINITION 4 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext 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 IS_UPDATABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema VIEWS DEFINER 7 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
@@ -10701,7 +10558,7 @@ NULL mysql columns_priv Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PR
NULL mysql columns_priv User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references
NULL mysql columns_priv Table_name 4 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
NULL mysql columns_priv Column_name 5 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
-NULL mysql columns_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
+NULL mysql columns_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL mysql columns_priv Column_priv 7 NO set 31 93 NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','References') select,insert,update,references
NULL mysql db Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references
NULL mysql db Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
@@ -10732,7 +10589,7 @@ NULL mysql event definer 4 NO char 77 231 NULL NULL utf8 utf8_bin char(77) se
NULL mysql event execute_at 5 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references
NULL mysql event interval_value 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
NULL mysql event interval_field 7 NULL YES enum 18 54 NULL NULL utf8 utf8_general_ci enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') select,insert,update,references
-NULL mysql event created 8 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
+NULL mysql event created 8 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL mysql event modified 9 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
NULL mysql event last_executed 10 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references
NULL mysql event starts 11 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references
@@ -10751,12 +10608,12 @@ NULL mysql func name 1 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI sel
NULL mysql func ret 2 0 NO tinyint NULL NULL 3 0 NULL NULL tinyint(1) select,insert,update,references
NULL mysql func dl 3 NO char 128 384 NULL NULL utf8 utf8_bin char(128) select,insert,update,references
NULL mysql func type 4 NULL NO enum 9 27 NULL NULL utf8 utf8_general_ci enum('function','aggregate') select,insert,update,references
-NULL mysql general_log event_time 1 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
-NULL mysql general_log user_host 2 NULL YES mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
-NULL mysql general_log thread_id 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
-NULL mysql general_log server_id 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
-NULL mysql general_log command_type 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
-NULL mysql general_log argument 6 NULL YES mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
+NULL mysql general_log event_time 1 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
+NULL mysql general_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
+NULL mysql general_log thread_id 3 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
+NULL mysql general_log server_id 4 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
+NULL mysql general_log command_type 5 NULL NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+NULL mysql general_log argument 6 NULL NO mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
NULL mysql help_category help_category_id 1 NULL NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned PRI select,insert,update,references
NULL mysql help_category name 2 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) UNI select,insert,update,references
NULL mysql help_category parent_category_id 3 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references
@@ -10809,10 +10666,10 @@ NULL mysql proc sql_data_access 6 CONTAINS_SQL NO enum 17 51 NULL NULL utf8 utf8
NULL mysql proc is_deterministic 7 NO NO enum 3 9 NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references
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 param_list 9 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references
-NULL mysql proc returns 10 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
+NULL mysql proc returns 10 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references
NULL mysql proc body 11 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references
NULL mysql proc definer 12 NO char 77 231 NULL NULL utf8 utf8_bin char(77) select,insert,update,references
-NULL mysql proc created 13 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
+NULL mysql proc created 13 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL mysql proc modified 14 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
NULL mysql proc sql_mode 15 NO set 431 1293 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') select,insert,update,references
NULL mysql proc comment 16 NO char 64 192 NULL NULL utf8 utf8_bin char(64) select,insert,update,references
@@ -10827,7 +10684,7 @@ NULL mysql procs_priv Routine_name 4 NO char 64 192 NULL NULL utf8 utf8_bin cha
NULL mysql procs_priv Routine_type 5 NULL NO enum 9 27 NULL NULL utf8 utf8_bin enum('FUNCTION','PROCEDURE') 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
NULL mysql procs_priv Proc_priv 7 NO set 27 81 NULL NULL utf8 utf8_general_ci set('Execute','Alter Routine','Grant') select,insert,update,references
-NULL mysql procs_priv Timestamp 8 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
+NULL mysql procs_priv Timestamp 8 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL mysql servers Server_name 1 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) PRI select,insert,update,references
NULL mysql servers Host 2 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
NULL mysql servers Db 3 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
@@ -10837,23 +10694,23 @@ NULL mysql servers Port 6 0 NO int NULL NULL 10 0 NULL NULL int(4) select,inse
NULL mysql servers Socket 7 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
NULL mysql servers Wrapper 8 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
NULL mysql servers Owner 9 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
-NULL mysql slow_log start_time 1 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
+NULL mysql slow_log start_time 1 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL mysql slow_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
NULL mysql slow_log query_time 3 NULL NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references
NULL mysql slow_log lock_time 4 NULL NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references
NULL mysql slow_log rows_sent 5 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
NULL mysql slow_log rows_examined 6 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
-NULL mysql slow_log db 7 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select,insert,update,references
-NULL mysql slow_log last_insert_id 8 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
-NULL mysql slow_log insert_id 9 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
-NULL mysql slow_log server_id 10 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
+NULL mysql slow_log db 7 NULL NO varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select,insert,update,references
+NULL mysql slow_log last_insert_id 8 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
+NULL mysql slow_log insert_id 9 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
+NULL mysql slow_log server_id 10 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
NULL mysql slow_log sql_text 11 NULL NO mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
NULL mysql tables_priv Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references
NULL mysql tables_priv Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
NULL mysql tables_priv User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references
NULL mysql tables_priv Table_name 4 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
NULL mysql tables_priv Grantor 5 NO char 77 231 NULL NULL utf8 utf8_bin char(77) MUL select,insert,update,references
-NULL mysql tables_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
+NULL mysql tables_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL mysql tables_priv Table_priv 7 NO set 98 294 NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') select,insert,update,references
NULL mysql tables_priv Column_priv 8 NO set 31 93 NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','References') select,insert,update,references
NULL mysql time_zone Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI auto_increment select,insert,update,references
@@ -11173,7 +11030,7 @@ NULL test tb4 f217 42 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL N
NULL test tb4 f218 43 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references
NULL test tb4 f219 44 NULL YES time NULL NULL NULL NULL NULL NULL time select,insert,update,references
NULL test tb4 f220 45 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references
-NULL test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
+NULL test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL test tb4 f222 47 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references
NULL test tb4 f223 48 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references
NULL test tb4 f224 49 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references
@@ -11292,9 +11149,9 @@ NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 1
NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
-NULL information_schema COLUMNS COLUMN_TYPE 15 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema COLUMNS COLUMN_TYPE 15 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema COLUMNS COLUMN_KEY 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
-NULL information_schema COLUMNS EXTRA 17 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select
+NULL information_schema COLUMNS EXTRA 17 NO varchar 27 81 NULL NULL utf8 utf8_general_ci varchar(27) select
NULL information_schema COLUMNS PRIVILEGES 18 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select
NULL information_schema COLUMNS COLUMN_COMMENT 19 NO varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select
NULL information_schema COLUMN_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select
@@ -11316,12 +11173,12 @@ NULL information_schema EVENTS EVENT_NAME 3 NO varchar 64 192 NULL NULL utf8 ut
NULL information_schema EVENTS DEFINER 4 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
NULL information_schema EVENTS TIME_ZONE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema EVENTS EVENT_BODY 6 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select
-NULL information_schema EVENTS EVENT_DEFINITION 7 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema EVENTS EVENT_DEFINITION 7 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema EVENTS EVENT_TYPE 8 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select
NULL information_schema EVENTS EXECUTE_AT 9 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS INTERVAL_VALUE 10 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select
NULL information_schema EVENTS INTERVAL_FIELD 11 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select
-NULL information_schema EVENTS SQL_MODE 12 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema EVENTS SQL_MODE 12 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema EVENTS STARTS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS ENDS 14 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS STATUS 15 NO varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select
@@ -11459,7 +11316,7 @@ NULL information_schema ROUTINES SQL_PATH 14 NULL YES varchar 64 192 NULL NULL u
NULL information_schema ROUTINES SECURITY_TYPE 15 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select
NULL information_schema ROUTINES CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema ROUTINES LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select
-NULL information_schema ROUTINES SQL_MODE 18 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema ROUTINES SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema ROUTINES ROUTINE_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema ROUTINES DEFINER 20 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
NULL information_schema ROUTINES CHARACTER_SET_CLIENT 21 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
@@ -11536,7 +11393,7 @@ NULL information_schema TRIGGERS EVENT_OBJECT_SCHEMA 6 NO varchar 64 192 NULL N
NULL information_schema TRIGGERS EVENT_OBJECT_TABLE 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) 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_CONDITION 9 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
-NULL information_schema TRIGGERS ACTION_STATEMENT 10 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema TRIGGERS ACTION_STATEMENT 10 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema TRIGGERS ACTION_ORIENTATION 11 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select
NULL information_schema TRIGGERS ACTION_TIMING 12 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select
NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_TABLE 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
@@ -11544,8 +11401,8 @@ NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_TABLE 14 NULL YES varchar
NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW 15 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema TRIGGERS CREATED 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
-NULL information_schema TRIGGERS SQL_MODE 18 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
-NULL information_schema TRIGGERS DEFINER 19 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema TRIGGERS SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema TRIGGERS DEFINER 19 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema TRIGGERS CHARACTER_SET_CLIENT 20 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema TRIGGERS COLLATION_CONNECTION 21 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema TRIGGERS DATABASE_COLLATION 22 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
@@ -11556,7 +11413,7 @@ NULL information_schema USER_PRIVILEGES IS_GRANTABLE 4 NO varchar 3 9 NULL NULL
NULL information_schema VIEWS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select
NULL information_schema VIEWS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema VIEWS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
-NULL information_schema VIEWS VIEW_DEFINITION 4 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema VIEWS VIEW_DEFINITION 4 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext 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 IS_UPDATABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema VIEWS DEFINER 7 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
@@ -11827,7 +11684,7 @@ NULL test tb4 f217 42 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL N
NULL test tb4 f218 43 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references
NULL test tb4 f219 44 NULL YES time NULL NULL NULL NULL NULL NULL time select,insert,update,references
NULL test tb4 f220 45 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references
-NULL test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
+NULL test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL test tb4 f222 47 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references
NULL test tb4 f223 48 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references
NULL test tb4 f224 49 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references
@@ -11881,9 +11738,9 @@ NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 1
NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
-NULL information_schema COLUMNS COLUMN_TYPE 15 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema COLUMNS COLUMN_TYPE 15 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema COLUMNS COLUMN_KEY 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
-NULL information_schema COLUMNS EXTRA 17 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select
+NULL information_schema COLUMNS EXTRA 17 NO varchar 27 81 NULL NULL utf8 utf8_general_ci varchar(27) select
NULL information_schema COLUMNS PRIVILEGES 18 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select
NULL information_schema COLUMNS COLUMN_COMMENT 19 NO varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select
NULL information_schema COLUMN_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select
@@ -11905,12 +11762,12 @@ NULL information_schema EVENTS EVENT_NAME 3 NO varchar 64 192 NULL NULL utf8 ut
NULL information_schema EVENTS DEFINER 4 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
NULL information_schema EVENTS TIME_ZONE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema EVENTS EVENT_BODY 6 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select
-NULL information_schema EVENTS EVENT_DEFINITION 7 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema EVENTS EVENT_DEFINITION 7 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema EVENTS EVENT_TYPE 8 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select
NULL information_schema EVENTS EXECUTE_AT 9 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS INTERVAL_VALUE 10 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select
NULL information_schema EVENTS INTERVAL_FIELD 11 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select
-NULL information_schema EVENTS SQL_MODE 12 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema EVENTS SQL_MODE 12 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema EVENTS STARTS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS ENDS 14 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS STATUS 15 NO varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select
@@ -12048,7 +11905,7 @@ NULL information_schema ROUTINES SQL_PATH 14 NULL YES varchar 64 192 NULL NULL u
NULL information_schema ROUTINES SECURITY_TYPE 15 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select
NULL information_schema ROUTINES CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema ROUTINES LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select
-NULL information_schema ROUTINES SQL_MODE 18 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema ROUTINES SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema ROUTINES ROUTINE_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema ROUTINES DEFINER 20 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
NULL information_schema ROUTINES CHARACTER_SET_CLIENT 21 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
@@ -12125,7 +11982,7 @@ NULL information_schema TRIGGERS EVENT_OBJECT_SCHEMA 6 NO varchar 64 192 NULL N
NULL information_schema TRIGGERS EVENT_OBJECT_TABLE 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) 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_CONDITION 9 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
-NULL information_schema TRIGGERS ACTION_STATEMENT 10 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema TRIGGERS ACTION_STATEMENT 10 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema TRIGGERS ACTION_ORIENTATION 11 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select
NULL information_schema TRIGGERS ACTION_TIMING 12 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select
NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_TABLE 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
@@ -12133,8 +11990,8 @@ NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_TABLE 14 NULL YES varchar
NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW 15 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema TRIGGERS CREATED 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
-NULL information_schema TRIGGERS SQL_MODE 18 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
-NULL information_schema TRIGGERS DEFINER 19 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema TRIGGERS SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema TRIGGERS DEFINER 19 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema TRIGGERS CHARACTER_SET_CLIENT 20 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema TRIGGERS COLLATION_CONNECTION 21 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema TRIGGERS DATABASE_COLLATION 22 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
@@ -12145,7 +12002,7 @@ NULL information_schema USER_PRIVILEGES IS_GRANTABLE 4 NO varchar 3 9 NULL NULL
NULL information_schema VIEWS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select
NULL information_schema VIEWS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema VIEWS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
-NULL information_schema VIEWS VIEW_DEFINITION 4 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema VIEWS VIEW_DEFINITION 4 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext 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 IS_UPDATABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema VIEWS DEFINER 7 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
@@ -12416,7 +12273,7 @@ NULL test tb4 f217 42 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL N
NULL test tb4 f218 43 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references
NULL test tb4 f219 44 NULL YES time NULL NULL NULL NULL NULL NULL time select,insert,update,references
NULL test tb4 f220 45 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references
-NULL test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
+NULL test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL test tb4 f222 47 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references
NULL test tb4 f223 48 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references
NULL test tb4 f224 49 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references
@@ -12568,7 +12425,7 @@ NULL information_schema COLUMNS NUMERIC_SCALE bigint NULL NULL NULL NULL bigint(
3.0000 information_schema COLUMNS COLLATION_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
1.0000 information_schema COLUMNS COLUMN_TYPE longtext 4294967295 4294967295 utf8 utf8_general_ci longtext
3.0000 information_schema COLUMNS COLUMN_KEY varchar 3 9 utf8 utf8_general_ci varchar(3)
-3.0000 information_schema COLUMNS EXTRA varchar 20 60 utf8 utf8_general_ci varchar(20)
+3.0000 information_schema COLUMNS EXTRA varchar 27 81 utf8 utf8_general_ci varchar(27)
3.0000 information_schema COLUMNS PRIVILEGES varchar 80 240 utf8 utf8_general_ci varchar(80)
3.0000 information_schema COLUMNS COLUMN_COMMENT varchar 255 765 utf8 utf8_general_ci varchar(255)
3.0000 information_schema COLUMN_PRIVILEGES GRANTEE varchar 81 243 utf8 utf8_general_ci varchar(81)
@@ -12950,7 +12807,7 @@ NULL mysql ndb_binlog_index schemaops bigint NULL NULL NULL NULL bigint(20) unsi
3.0000 mysql proc is_deterministic enum 3 9 utf8 utf8_general_ci enum('YES','NO')
3.0000 mysql proc security_type enum 7 21 utf8 utf8_general_ci enum('INVOKER','DEFINER')
1.0000 mysql proc param_list blob 65535 65535 NULL NULL blob
-3.0000 mysql proc returns char 64 192 utf8 utf8_general_ci char(64)
+1.0000 mysql proc returns longblob 4294967295 4294967295 NULL NULL longblob
1.0000 mysql proc body longblob 4294967295 4294967295 NULL NULL longblob
3.0000 mysql proc definer char 77 231 utf8 utf8_bin char(77)
NULL mysql proc created timestamp NULL NULL NULL NULL timestamp
@@ -13575,7 +13432,7 @@ SQL_PATH varchar(64) YES NULL
SECURITY_TYPE varchar(7) NO
CREATED datetime NO 0000-00-00 00:00:00
LAST_ALTERED datetime NO 0000-00-00 00:00:00
-SQL_MODE longtext NO
+SQL_MODE longtext NO NULL
ROUTINE_COMMENT varchar(64) NO
DEFINER varchar(77) NO
CHARACTER_SET_CLIENT varchar(32) NO
@@ -13636,7 +13493,7 @@ NULL information_schema routines SQL_PATH 14 NULL YES varchar 64 192 NULL NULL u
NULL information_schema routines SECURITY_TYPE 15 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select
NULL information_schema routines CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema routines LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select
-NULL information_schema routines SQL_MODE 18 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema routines SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema routines ROUTINE_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema routines DEFINER 20 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
NULL information_schema routines CHARACTER_SET_CLIENT 21 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
@@ -14488,7 +14345,7 @@ NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #
NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO#
NULL information_schema VIEWS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO#
SELECT * FROM information_schema.tables
-WHERE NOT( table_schema = 'information_schema');
+WHERE NOT( table_schema = 'information_schema') AND NOT (table_schema = 'mysql' AND table_name LIKE 'help_%');
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT
NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
NULL db_datadict tb2 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
@@ -14499,10 +14356,6 @@ NULL mysql db BASE TABLE MyISAM 10 Fixed 3 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-
NULL mysql event BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Events
NULL mysql func BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL User defined functions
NULL mysql general_log BASE TABLE CSV 10 Dynamic 1 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL General log
-NULL mysql help_category BASE TABLE MyISAM 10 Fixed 37 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help categories
-NULL mysql help_keyword BASE TABLE MyISAM 10 Fixed 424 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help keywords
-NULL mysql help_relation BASE TABLE MyISAM 10 Fixed 901 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL keyword-topic relation
-NULL mysql help_topic BASE TABLE MyISAM 10 Dynamic 479 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help topics
NULL mysql host BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Host privileges; Merged with database privileges
NULL mysql ndb_binlog_index BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
NULL mysql plugin BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL MySQL plugins
@@ -14549,7 +14402,7 @@ Field Type Null Key Default Extra
TABLE_CATALOG varchar(4096) YES NULL
TABLE_SCHEMA varchar(64) NO
TABLE_NAME varchar(64) NO
-VIEW_DEFINITION longtext NO
+VIEW_DEFINITION longtext NO NULL
CHECK_OPTION varchar(8) NO
IS_UPDATABLE varchar(3) NO
DEFINER varchar(77) NO
@@ -14584,7 +14437,7 @@ TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAUL
NULL information_schema views TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select
NULL information_schema views TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema views TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
-NULL information_schema views VIEW_DEFINITION 4 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema views VIEW_DEFINITION 4 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext 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 IS_UPDATABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema views DEFINER 7 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
@@ -14731,7 +14584,8 @@ TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_
root@localhost db_datadict_2
REVOKE SELECT ON db_datadict.tb_6_401402_1 FROM 'user_1'@'localhost';
-SELECT * FROM information_schema.statistics;
+SELECT * FROM information_schema.statistics
+WHERE NOT (table_schema = 'mysql' AND table_name LIKE 'help_%');
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT
NULL db_datadict tb_6_401402_1 0 db_datadict PRIMARY 1 f1 A 0 NULL NULL BTREE
NULL db_datadict tb_6_401402_1 1 db_datadict f2_ind 1 f2 A NULL NULL NULL YES BTREE
@@ -14753,14 +14607,6 @@ NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE
NULL mysql event 0 mysql PRIMARY 1 db A NULL NULL NULL BTREE
NULL mysql event 0 mysql PRIMARY 2 name A 0 NULL NULL BTREE
NULL mysql func 0 mysql PRIMARY 1 name A 0 NULL NULL BTREE
-NULL mysql help_category 0 mysql PRIMARY 1 help_category_id A 37 NULL NULL BTREE
-NULL mysql help_category 0 mysql name 1 name A 37 NULL NULL BTREE
-NULL mysql help_keyword 0 mysql PRIMARY 1 help_keyword_id A 424 NULL NULL BTREE
-NULL mysql help_keyword 0 mysql name 1 name A 424 NULL NULL BTREE
-NULL mysql help_relation 0 mysql PRIMARY 1 help_keyword_id A NULL NULL NULL BTREE
-NULL mysql help_relation 0 mysql PRIMARY 2 help_topic_id A 901 NULL NULL BTREE
-NULL mysql help_topic 0 mysql PRIMARY 1 help_topic_id A 479 NULL NULL BTREE
-NULL mysql help_topic 0 mysql name 1 name A 479 NULL NULL BTREE
NULL mysql host 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE
NULL mysql host 0 mysql PRIMARY 2 Db A 0 NULL NULL BTREE
NULL mysql ndb_binlog_index 0 mysql PRIMARY 1 epoch A 0 NULL NULL BTREE
@@ -15364,7 +15210,7 @@ EVENT_OBJECT_SCHEMA varchar(64) NO
EVENT_OBJECT_TABLE varchar(64) NO
ACTION_ORDER bigint(4) NO 0
ACTION_CONDITION longtext YES NULL
-ACTION_STATEMENT longtext NO
+ACTION_STATEMENT longtext NO NULL
ACTION_ORIENTATION varchar(9) NO
ACTION_TIMING varchar(6) NO
ACTION_REFERENCE_OLD_TABLE varchar(64) YES NULL
@@ -15372,8 +15218,8 @@ ACTION_REFERENCE_NEW_TABLE varchar(64) YES NULL
ACTION_REFERENCE_OLD_ROW varchar(3) NO
ACTION_REFERENCE_NEW_ROW varchar(3) NO
CREATED datetime YES NULL
-SQL_MODE longtext NO
-DEFINER longtext NO
+SQL_MODE longtext NO NULL
+DEFINER longtext NO NULL
CHARACTER_SET_CLIENT varchar(32) NO
COLLATION_CONNECTION varchar(32) NO
DATABASE_COLLATION varchar(32) NO
@@ -15423,7 +15269,7 @@ NULL information_schema triggers EVENT_OBJECT_SCHEMA 6 NO varchar 64 192 NULL N
NULL information_schema triggers EVENT_OBJECT_TABLE 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) 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_CONDITION 9 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
-NULL information_schema triggers ACTION_STATEMENT 10 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema triggers ACTION_STATEMENT 10 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema triggers ACTION_ORIENTATION 11 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select
NULL information_schema triggers ACTION_TIMING 12 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select
NULL information_schema triggers ACTION_REFERENCE_OLD_TABLE 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
@@ -15431,8 +15277,8 @@ NULL information_schema triggers ACTION_REFERENCE_NEW_TABLE 14 NULL YES varchar
NULL information_schema triggers ACTION_REFERENCE_OLD_ROW 15 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema triggers ACTION_REFERENCE_NEW_ROW 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema triggers CREATED 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
-NULL information_schema triggers SQL_MODE 18 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
-NULL information_schema triggers DEFINER 19 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema triggers SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema triggers DEFINER 19 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema triggers CHARACTER_SET_CLIENT 20 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema triggers COLLATION_CONNECTION 21 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema triggers DATABASE_COLLATION 22 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_03e.result b/mysql-test/suite/funcs_1/r/myisam_trig_03e.result
index a51a79f9b88..58b3a37ee3f 100644
--- a/mysql-test/suite/funcs_1/r/myisam_trig_03e.result
+++ b/mysql-test/suite/funcs_1/r/myisam_trig_03e.result
@@ -571,10 +571,8 @@ test_yesprivs@localhost
use priv_db;
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
-trg1_1 INSERT t1 set new.f1 = 'trig 1_1-yes' BEFORE NULL test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
select * from information_schema.triggers;
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
-NULL priv_db trg1_1 INSERT NULL priv_db t1 0 NULL set new.f1 = 'trig 1_1-yes' ROW BEFORE NULL NULL OLD NEW NULL test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
drop trigger trg1_1;
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
select current_user;
diff --git a/mysql-test/suite/funcs_1/r/myisam_views.result b/mysql-test/suite/funcs_1/r/myisam_views.result
index 3f4ad45f79a..3e494f53a2d 100644
--- a/mysql-test/suite/funcs_1/r/myisam_views.result
+++ b/mysql-test/suite/funcs_1/r/myisam_views.result
@@ -191,6 +191,58 @@ insert into tb2 (f59,f60,f61) values (109,108,104);
INSERT INTO tb2 (f59,f60) VALUES( 299,899 );
INSERT INTO tb2 (f59,f60) VALUES( 242,79 );
INSERT INTO tb2 (f59,f60) VALUES( 424,89 );
+SELECT * FROM tb2 ORDER BY f59, f60, f61;
+f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117
+1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set
+2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set
+3 3 0000000003 0000000000000000000000000000000000000000000000000000000000000003 0000000003 0000000000000000000000000000000000000000000000000000000000000003 -3 2.200000000000000000000000000000 3 2.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494348e-38 1.17549e-38 1.175494354e-38 01.17549e-38 00000001.175494354e-38 01.17549e-38 00000001.175494354e-38 1000-01-03 838:59:56 1970-01-04 00:00:03 1970-01-04 00:00:03 1904 1904 1904 2enum 1set
+4 4 0000000004 0000000000000000000000000000000000000000000000000000000000000004 0000000004 0000000000000000000000000000000000000000000000000000000000000004 -2 3.300000000000000000000000000000 4 3.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494347e-38 1.17549e-38 1.175494355e-38 01.17549e-38 00000001.175494355e-38 01.17549e-38 00000001.175494355e-38 1000-01-04 838:59:55 1970-01-05 00:00:04 1970-01-05 00:00:04 1905 1905 1905 1enum 2set
+4 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+5 5 0000000005 0000000000000000000000000000000000000000000000000000000000000005 0000000005 0000000000000000000000000000000000000000000000000000000000000005 -1 4.400000000000000000000000000000 5 4.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494346e-38 1.17549e-38 1.175494356e-38 01.17549e-38 00000001.175494356e-38 01.17549e-38 00000001.175494356e-38 1000-01-05 838:59:54 1970-01-06 00:00:05 1970-01-06 00:00:05 1906 1906 1906 2enum 1set,2set
+6 6 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0 5.500000000000000000000000000000 6 5.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494345e-38 1.17549e-38 1.175494357e-38 01.17549e-38 00000001.175494357e-38 01.17549e-38 00000001.175494357e-38 1000-01-06 838:59:53 1970-01-07 00:00:06 1970-01-07 00:00:06 1907 1907 1907 1enum 1set
+7 7 0000000007 0000000000000000000000000000000000000000000000000000000000000007 0000000007 0000000000000000000000000000000000000000000000000000000000000007 1 6.600000000000000000000000000000 7 6.600000000000000000000000000000 0000000007 000000000000000000000000000000006.600000000000000000000000000000 0000000007 000000000000000000000000000000006.600000000000000000000000000000 -1.175494344e-38 1.175494358e-38 00000001.175494358e-38 00000001.175494358e-38 -1.175494344e-38 1.175494358e-38 00000001.175494358e-38 00000001.175494358e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494344e-38 1.17549e-38 1.175494358e-38 01.17549e-38 00000001.175494358e-38 01.17549e-38 00000001.175494358e-38 1000-01-07 838:59:52 1970-01-08 00:00:07 1970-01-08 00:00:07 1908 1908 1908 2enum 2set
+8 8 0000000008 0000000000000000000000000000000000000000000000000000000000000008 0000000008 0000000000000000000000000000000000000000000000000000000000000008 2 7.700000000000000000000000000000 8 7.700000000000000000000000000000 0000000008 000000000000000000000000000000007.700000000000000000000000000000 0000000008 000000000000000000000000000000007.700000000000000000000000000000 -1.175494343e-38 1.175494359e-38 00000001.175494359e-38 00000001.175494359e-38 -1.175494343e-38 1.175494359e-38 00000001.175494359e-38 00000001.175494359e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494343e-38 1.17549e-38 1.175494359e-38 01.17549e-38 00000001.175494359e-38 01.17549e-38 00000001.175494359e-38 1000-01-08 838:59:51 1970-01-09 00:00:08 1970-01-09 00:00:08 1909 1909 1909 1enum 1set,2set
+9 9 0000000009 0000000000000000000000000000000000000000000000000000000000000009 0000000009 0000000000000000000000000000000000000000000000000000000000000009 3 8.800000000000000000000000000000 9 8.800000000000000000000000000000 0000000009 000000000000000000000000000000008.800000000000000000000000000000 0000000009 000000000000000000000000000000008.800000000000000000000000000000 -1.175494342e-38 1.17549436e-38 000000001.17549436e-38 000000001.17549436e-38 -1.175494342e-38 1.17549436e-38 000000001.17549436e-38 000000001.17549436e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494342e-38 1.17549e-38 1.17549436e-38 01.17549e-38 000000001.17549436e-38 01.17549e-38 000000001.17549436e-38 1000-01-09 838:59:50 1970-01-10 00:00:09 1970-01-10 00:00:09 1910 1910 1910 2enum 1set
+10 10 0000000010 0000000000000000000000000000000000000000000000000000000000000010 0000000010 0000000000000000000000000000000000000000000000000000000000000010 4 9.900000000000000000000000000000 10 9.900000000000000000000000000000 0000000010 000000000000000000000000000000009.900000000000000000000000000000 0000000010 000000000000000000000000000000009.900000000000000000000000000000 -1.175494341e-38 1.175494361e-38 00000001.175494361e-38 00000001.175494361e-38 -1.175494341e-38 1.175494361e-38 00000001.175494361e-38 00000001.175494361e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494341e-38 1.17549e-38 1.175494361e-38 01.17549e-38 00000001.175494361e-38 01.17549e-38 00000001.175494361e-38 1000-01-10 838:59:49 1970-01-11 00:00:10 1970-01-11 00:00:10 1911 1911 1911 1enum 2set
+15 87 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+17 15 0000000016 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+19 18 0000000014 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+22 93 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+24 51654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+27 25 0000000026 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+29 28 0000000024 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+34 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+94 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+107 105 0000000106 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+107 105 0000000106 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+109 108 0000000104 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+109 108 0000000104 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+195 87 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+207 205 0000000206 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+209 208 0000000204 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+242 79 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+250 87895654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+292 93 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+299 899 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+321 NULL 0000000765 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+323 14376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+340 9984376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+394 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+424 89 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+441 16546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+660 876546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+987 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+2550 775654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+2760 985654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+3330 764376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+3410 996546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+7876 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+9112 NULL 0000008771 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+76710 226546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
+569300 9114376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
Use test;
Testcase 3.3.1.1
@@ -225,27 +277,27 @@ f59 f60 f61
8 8 0000000008
9 9 0000000009
CREATE or REPLACE VIEW v1 AS select f59,f60,f61
-FROM test.tb2 limit 4,3;
-select * FROM v1 order by f59,f60,f61 limit 0,10;
+FROM test.tb2;
+select * FROM v1 order by f59,f60,f61 limit 4,3;
f59 f60 f61
+4 74 NULL
5 5 0000000005
6 6 0000000006
-7 7 0000000007
CREATE or REPLACE VIEW v1 AS select distinct f59
-FROM test.tb2 limit 4,3;
-select * FROM v1 order by f59 limit 0,10;
+FROM test.tb2;
+select * FROM v1 order by f59 limit 4,3;
f59
5
6
7
ALTER VIEW v1 AS select f59
-FROM test.tb2 limit 6,2;
-select * FROM v1 order by f59 limit 0,10;
+FROM test.tb2;
+select * FROM v1 order by f59 limit 6,2;
f59
+6
7
-8
CREATE or REPLACE VIEW v1 AS select f59
-from tb2 order by f59 limit 100;
+from tb2 order by f59;
select * FROM v1 order by f59 limit 0,10;
f59
1
@@ -259,7 +311,7 @@ f59
8
9
CREATE or REPLACE VIEW v1 AS select f59
-from tb2 order by f59 asc limit 100;
+from tb2 order by f59 asc;
select * FROM v1 limit 0,10;
f59
1
@@ -273,7 +325,7 @@ f59
8
9
CREATE or REPLACE VIEW v1 AS select f59
-from tb2 order by f59 desc limit 100;
+from tb2 order by f59 desc;
select * FROM v1 limit 0,10;
f59
569300
@@ -287,7 +339,7 @@ f59
987
660
CREATE or REPLACE VIEW v1 AS select f59
-from tb2 group by f59 limit 100;
+from tb2 group by f59;
select * FROM v1 order by f59 limit 0,10;
f59
1
@@ -301,7 +353,7 @@ f59
9
10
CREATE or REPLACE VIEW v1 AS select f59
-from tb2 group by f59 asc limit 100;
+from tb2 group by f59 asc;
select * FROM v1 order by f59 limit 0,10;
f59
1
@@ -315,7 +367,7 @@ f59
9
10
CREATE or REPLACE VIEW v1 AS select f59
-from tb2 group by f59 desc limit 100;
+from tb2 group by f59 desc;
select * FROM v1 order by f59 limit 0,10;
f59
1
@@ -329,7 +381,7 @@ f59
9
10
CREATE or REPLACE VIEW v1 AS (select f59 from tb2)
-union (select f59 from t1) limit 100;
+union (select f59 from t1);
select * FROM v1 order by f59 limit 0,10;
f59
1
@@ -517,8 +569,8 @@ DROP VIEW v1;
Testcase 3.3.1.3 + 3.1.1.4
--------------------------------------------------------------------------------
DROP VIEW IF EXISTS v1 ;
-CREATE VIEW v1 or REPLACE AS Select * from tb2 my_table limit 50;
-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 'or REPLACE AS Select * from tb2 my_table limit 50' at line 1
+CREATE VIEW v1 or REPLACE AS Select * from tb2 my_table;
+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 'or REPLACE AS Select * from tb2 my_table' at line 1
CREATE VIEW v1 WITH CASCADED CHECK OPTION AS Select *
from tb2 my_table limit 50;
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 'WITH CASCADED CHECK OPTION AS Select *
@@ -527,8 +579,8 @@ CREATE VIEW v1 WITH LOCAL CHECK OPTION AS Select *
from tb2 my_table limit 50;
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 'WITH LOCAL CHECK OPTION AS Select *
from tb2 my_table limit 50' at line 1
-SELECT * FROM tb2 my_table CREATE VIEW As v1 limit 100 ;
-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 'CREATE VIEW As v1 limit 100' at line 1
+SELECT * FROM tb2 my_table CREATE VIEW As v1;
+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 'CREATE VIEW As v1' at line 1
CREATE or REPLACE VIEW v1 Select f59, f60
from test.tb2 my_table where f59 = 250 ;
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 'Select f59, f60
@@ -603,8 +655,8 @@ Union ALL (Select from f1 t1);
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 'from f59 tb2)
Union ALL (Select from f1 t1)' at line 1
CREATE or REPLACE view v1 as Select f59, f60
-from tb2 by order f59 limit 100 ;
-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 'by order f59 limit 100' at line 2
+from tb2 by order f59;
+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 'by order f59' at line 2
CREATE or REPLACE view v1 as Select f59, f60
from tb2 by group f59 ;
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 'by group f59' at line 2
@@ -612,12 +664,12 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
Testcase 3.3.1.5
--------------------------------------------------------------------------------
DROP VIEW IF EXISTS v1 ;
-CREATE VIEW v1 SELECT * FROM tb2 limit 100 ;
-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 'SELECT * FROM tb2 limit 100' at line 1
-CREATE v1 AS SELECT * FROM tb2 limit 100 ;
-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 'v1 AS SELECT * FROM tb2 limit 100' at line 1
-VIEW v1 AS SELECT * FROM tb2 limit 100 ;
-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 'VIEW v1 AS SELECT * FROM tb2 limit 100' at line 1
+CREATE VIEW v1 SELECT * FROM tb2;
+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 'SELECT * FROM tb2' at line 1
+CREATE v1 AS SELECT * FROM tb2;
+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 'v1 AS SELECT * FROM tb2' at line 1
+VIEW v1 AS SELECT * FROM tb2;
+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 'VIEW v1 AS SELECT * FROM tb2' at line 1
CREATE VIEW v1 AS SELECT 1;
DROP VIEW v1;
VIEW v1 AS SELECT 1;
@@ -635,45 +687,43 @@ Testcase 3.3.1.6
--------------------------------------------------------------------------------
DROP VIEW IF EXISTS v1 ;
CREATE or REPLACE VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
CREATE or REPLACE ALGORITHM = UNDEFINED VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
CREATE or REPLACE ALGORITHM = MERGE VIEW v1
-as SELECT * from tb2 limit 100 ;
-Warnings:
-Warning 1354 View merge algorithm can't be used here for now (assumed undefined algorithm)
+as SELECT * from tb2;
CREATE or REPLACE ALGORITHM = TEMPTABLE VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
CREATE or REPLACE ALGORITHM = TEMPTABLE VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
CREATE or REPLACE = TEMPTABLE VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
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 '= TEMPTABLE VIEW v1
-as SELECT * from tb2 limit 100' at line 1
+as SELECT * from tb2' at line 1
CREATE or REPLACE ALGORITHM TEMPTABLE VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
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 'TEMPTABLE VIEW v1
-as SELECT * from tb2 limit 100' at line 1
+as SELECT * from tb2' at line 1
CREATE or REPLACE ALGORITHM = VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
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 'VIEW v1
-as SELECT * from tb2 limit 100' at line 1
+as SELECT * from tb2' at line 1
CREATE or REPLACE TEMPTABLE = ALGORITHM VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
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 'TEMPTABLE = ALGORITHM VIEW v1
-as SELECT * from tb2 limit 100' at line 1
+as SELECT * from tb2' at line 1
CREATE or REPLACE TEMPTABLE - ALGORITHM VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
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 'TEMPTABLE - ALGORITHM VIEW v1
-as SELECT * from tb2 limit 100' at line 1
+as SELECT * from tb2' at line 1
CREATE or REPLACE GARBAGE = TEMPTABLE VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
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 'GARBAGE = TEMPTABLE VIEW v1
-as SELECT * from tb2 limit 100' at line 1
+as SELECT * from tb2' at line 1
CREATE or REPLACE ALGORITHM = GARBAGE VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
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 'GARBAGE VIEW v1
-as SELECT * from tb2 limit 100' at line 1
+as SELECT * from tb2' at line 1
Drop view if exists v1 ;
CREATE or REPLACE VIEW v1
AS SELECT * from tb2 where f59 < 1;
@@ -699,7 +749,7 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
Testcase 3.3.1.7
--------------------------------------------------------------------------------
DROP VIEW IF EXISTS v1 ;
-Create view test.v1 AS Select * from test.tb2 limit 100 ;
+Create view test.v1 AS Select * from test.tb2;
Alter view test.v1 AS Select F59 from test. tb2 limit 100 ;
Drop view test.v1 ;
Create view v1 AS Select * from test.tb2 limit 100 ;
@@ -906,13 +956,13 @@ SELECT * FROM test.v1 order by f59,f60,f61,f62,f63,f64,f65;
f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117
1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set
2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set
-CREATE OR REPLACE VIEW test.v1 AS SELECT F59 FROM tb2 limit 10,100;
+CREATE OR REPLACE VIEW test.v1 AS SELECT F59 FROM tb2;
SHOW CREATE VIEW test.v1;
View Create View character_set_client collation_connection
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `tb2`.`f59` AS `F59` from `tb2` limit 10,100 latin1 latin1_swedish_ci
-SELECT * FROM test.v1 order by F59;
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `tb2`.`f59` AS `F59` from `tb2` latin1 latin1_swedish_ci
+SELECT * FROM test.v1 order by F59 limit 10,100;
F59
-4
+10
15
17
19
@@ -965,8 +1015,8 @@ ERROR HY000: 'test.tb2' is not VIEW
Testcase 3.3.1.15
--------------------------------------------------------------------------------
Drop table if exists test.v1 ;
-CREATE OR REPLACE view test.v1 as select * from tb2 LIMIT 2;
-SELECT * FROM test.v1;
+CREATE OR REPLACE view test.v1 as select * from tb2;
+SELECT * FROM test.v1 ORDER BY f59,f60,f61 LIMIT 2;
f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117
1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set
2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set
@@ -1102,8 +1152,8 @@ ERROR HY000: View's SELECT and view's field list have different column counts
Testcase 3.3.1.21
--------------------------------------------------------------------------------
DROP VIEW IF EXISTS v1;
-CREATE VIEW test.v1( F59, F60 ) AS SELECT F59, F60 From tb2 LIMIT 2;
-SELECT * FROM test.v1 order by F59, F60 desc;
+CREATE VIEW test.v1( F59, F60 ) AS SELECT F59, F60 From tb2;
+SELECT * FROM test.v1 order by F59, F60 desc LIMIT 2;
F59 F60
1 1
2 2
@@ -1112,17 +1162,17 @@ Drop view if exists test.v1 ;
Testcase 3.3.1.22
--------------------------------------------------------------------------------
DROP VIEW IF EXISTS v1;
-CREATE VIEW test.v1( product ) AS SELECT f59*f60 From tb2 LIMIT 2;
-SELECT * FROM test.v1;
+CREATE VIEW test.v1( product ) AS SELECT f59*f60 From tb2;
+SELECT * FROM test.v1 WHERE product IS NOT NULL ORDER BY product LIMIT 2;
product
1
4
CREATE OR REPLACE VIEW test.v1( product ) AS SELECT 1*2;
-SELECT * FROM test.v1;
+SELECT * FROM test.v1 LIMIT 2;
product
2
CREATE OR REPLACE VIEW test.v1( product ) AS SELECT USER();
-SELECT * FROM test.v1;
+SELECT * FROM test.v1 LIMIT 2;
product
root@localhost
Drop view if exists test.v1 ;
@@ -1199,8 +1249,8 @@ DROP TEMPORARY TABLE t2;
Testcase 3.3.1.26
--------------------------------------------------------------------------------
DROP VIEW IF EXISTS v1;
-Create view test.v1 AS Select * from test.tb2 limit 2 ;
-Select * from test.v1;
+Create view test.v1 AS Select * from test.tb2;
+Select * from test.v1 order by f59, f60, f61 limit 2;
f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117
1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set
2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set
@@ -1210,9 +1260,9 @@ Testcase 3.3.1.27
--------------------------------------------------------------------------------
DROP VIEW IF EXISTS test.v1;
Drop VIEW IF EXISTS test.v1_1 ;
-Create view test.v1 AS Select * from test.tb2 limit 2 ;
+Create view test.v1 AS Select * from test.tb2;
Create view test.v1_1 AS Select F59 from test.v1 ;
-Select * from test.v1_1 order by F59 limit 20 ;
+Select * from test.v1_1 order by F59 limit 2;
F59
1
2
@@ -1759,29 +1809,29 @@ Drop view if exists test.v1 ;
Drop view if exists test.v1_main;
Drop view if exists test1.v1_1 ;
Drop database if exists test3 ;
-Create view test.v1 as Select f59, f60 FROM test.tb2 limit 20 ;
-Select * from test.v1 order by f59,f60;
+Create view test.v1 as Select f59, f60 FROM test.tb2;
+Select * from test.v1 order by f59,f60 limit 20;
f59 f60
1 1
2 2
3 3
4 4
+4 74
5 5
6 6
7 7
8 8
9 9
10 10
-250 87895654
-340 9984376
-441 16546
-660 876546
-2550 775654
-2760 985654
-3330 764376
-3410 996546
-76710 226546
-569300 9114376
+15 87
+17 15
+19 18
+22 93
+24 51654
+27 25
+29 28
+34 41
+94 74
Create table test1.t1 (f59 int,f60 int) ;
Insert into test1.t1 values (199,507) ;
Create view test1.v1_1 as Select f59,f60 from test1.t1 ;
@@ -9671,8 +9721,8 @@ WHERE v3_to_v1_options LIKE ' %' AND errno <> 0
ORDER BY v3_to_v1_options;
v3_to_v1_options statement v3_to_v1_violation errno
SELECT * FROM t1_results
-WHERE v3_to_v1_options LIKE 'WITH %'
-AND v3_to_v1_violation LIKE 'v3_%' AND errno = 0
+WHERE v3_to_v1_options LIKE 'WITH %'
+ AND v3_to_v1_violation LIKE 'v3_%' AND errno = 0
ORDER BY v3_to_v1_options;
v3_to_v1_options statement v3_to_v1_violation errno
SELECT * FROM t1_results
@@ -9692,17 +9742,17 @@ DROP TABLE t1_results;
Testcase 3.3.1.50 - 3.3.1.53
--------------------------------------------------------------------------------
DROP VIEW IF EXISTS test.v1;
-CREATE VIEW test.v1 AS SELECT * FROM test.tb2 limit 5 ;
-SELECT * FROM test.v1 order by f59 ;
+CREATE VIEW test.v1 AS SELECT * FROM test.tb2;
+SELECT * FROM test.v1 order by f59 limit 5;
f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117
1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set
2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set
3 3 0000000003 0000000000000000000000000000000000000000000000000000000000000003 0000000003 0000000000000000000000000000000000000000000000000000000000000003 -3 2.200000000000000000000000000000 3 2.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494348e-38 1.17549e-38 1.175494354e-38 01.17549e-38 00000001.175494354e-38 01.17549e-38 00000001.175494354e-38 1000-01-03 838:59:56 1970-01-04 00:00:03 1970-01-04 00:00:03 1904 1904 1904 2enum 1set
5 5 0000000005 0000000000000000000000000000000000000000000000000000000000000005 0000000005 0000000000000000000000000000000000000000000000000000000000000005 -1 4.400000000000000000000000000000 5 4.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494346e-38 1.17549e-38 1.175494356e-38 01.17549e-38 00000001.175494356e-38 01.17549e-38 00000001.175494356e-38 1000-01-05 838:59:54 1970-01-06 00:00:05 1970-01-06 00:00:05 1906 1906 1906 2enum 1set,2set
-100 4 0000000004 0000000000000000000000000000000000000000000000000000000000000004 0000000004 0000000000000000000000000000000000000000000000000000000000000004 -2 3.300000000000000000000000000000 4 3.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494347e-38 1.17549e-38 1.175494355e-38 01.17549e-38 00000001.175494355e-38 01.17549e-38 00000001.175494355e-38 1000-01-04 838:59:55 1970-01-05 00:00:04 1970-01-05 00:00:04 1905 1905 1905 1enum 2set
+6 6 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0 5.500000000000000000000000000000 6 5.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494345e-38 1.17549e-38 1.175494357e-38 01.17549e-38 00000001.175494357e-38 01.17549e-38 00000001.175494357e-38 1000-01-06 838:59:53 1970-01-07 00:00:06 1970-01-07 00:00:06 1907 1907 1907 1enum 1set
drop view test.v1 ;
-CREATE VIEW test.v1 AS SELECT F59,F61 FROM test.tb2 limit 50 ;
-SELECT * FROM test.v1 order by F59, F61 ;
+CREATE VIEW test.v1 AS SELECT F59,F61 FROM test.tb2;
+SELECT * FROM test.v1 order by F59, F61 limit 50;
F59 F61
1 0000000001
2 0000000002
@@ -9755,8 +9805,8 @@ F59 F61
76710 NULL
569300 NULL
drop view test.v1 ;
-CREATE VIEW test.v1 AS SELECT * FROM test.tb2 order by f59, f60, f61 limit 20 ;
-SELECT * FROM test.v1 order by f59,f60,f61 ;
+CREATE VIEW test.v1 AS SELECT * FROM test.tb2 order by f59, f60, f61;
+SELECT * FROM test.v1 order by f59,f60,f61 limit 20;
f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117
1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set
2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set
@@ -9779,8 +9829,8 @@ f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78
100 4 0000000004 0000000000000000000000000000000000000000000000000000000000000004 0000000004 0000000000000000000000000000000000000000000000000000000000000004 -2 3.300000000000000000000000000000 4 3.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494347e-38 1.17549e-38 1.175494355e-38 01.17549e-38 00000001.175494355e-38 01.17549e-38 00000001.175494355e-38 1000-01-04 838:59:55 1970-01-05 00:00:04 1970-01-05 00:00:04 1905 1905 1905 1enum 2set
100 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL
drop view test.v1 ;
-CREATE VIEW test.v1 AS SELECT F59,f61 FROM test.tb2 limit 20 ;
-SELECT * FROM test.v1 order by f59,f61 desc limit 50;
+CREATE VIEW test.v1 AS SELECT F59,f61 FROM test.tb2;
+SELECT * FROM test.v1 order by f59,f61 desc limit 20;
F59 f61
1 0000000001
2 0000000002
@@ -9791,17 +9841,17 @@ F59 f61
8 0000000008
9 0000000009
10 0000000010
+15 NULL
+17 0000000016
+19 0000000014
+22 NULL
+24 NULL
+27 0000000026
+29 0000000024
+34 NULL
+94 NULL
100 0000000004
-250 NULL
-340 NULL
-441 NULL
-660 NULL
-2550 NULL
-2760 NULL
-3330 NULL
-3410 NULL
-76710 NULL
-569300 NULL
+100 NULL
drop view test.v1 ;
Testcase 3.3.1.54
@@ -9858,16 +9908,23 @@ f2
two
SET sql_mode = 'traditional,ansi';
CREATE OR REPLACE VIEW v1 AS
+SELECT f3 AS "pure column f3:", f1 + f3 AS "sum of columns f1 + f3 =",
+3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1):",
+'->' || CAST(f3 AS CHAR) || '<-'
+ AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR):"
+FROM t1 WHERE f1 = 2;
+CREATE OR REPLACE VIEW v1 AS
SELECT f3 AS "pure column f3: ", f1 + f3 AS "sum of columns f1 + f3 = ",
3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1): ",
'->' || CAST(f3 AS CHAR) || '<-'
AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): "
FROM t1 WHERE f1 = 2;
+ERROR 42000: Incorrect column name 'pure column f3: '
SELECT * FROM v1;
-pure column f3: 2.20000
-sum of columns f1 + f3 = 4.20000
-product of constants 3 * (- 0.11111E+1): -3.3333
-expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): ->2.20000<-
+pure column f3: 2.20000
+sum of columns f1 + f3 = 4.20000
+product of constants 3 * (- 0.11111E+1): -3.3333
+expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): ->2.20000<-
SET sql_mode = '';
Testcases 3.3.1.55 - 3.3.1.62
@@ -10421,9 +10478,9 @@ FIXME Is this a bug ?
EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
CAST(f2 AS CHAR) AS f2 FROM test1.v21;
DROP VIEW IF EXISTS test1.v21;
-CREATE OR REPLACE VIEW test1.v0 AS
+CREATE OR REPLACE VIEW test1.v0 AS
SELECT f1 as f2, f2 as f1 FROM test2.t1;
-CREATE OR REPLACE VIEW test2.v0 AS
+CREATE OR REPLACE VIEW test2.v0 AS
SELECT CAST('0001-01-01' AS DATE) as f1, f2 FROM test3.t1;
SHOW CREATE VIEW test1.v20;
SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
@@ -10875,7 +10932,7 @@ SET @variant5= 'CREATE VIEW v1 AS SELECT f61 FROM t1 HAVING f61 > 0';
SET @variant6= 'CREATE VIEW v1 AS SELECT (SELECT f60 FROM t2 WHERE f59=19) AS f61 FROM t1';
SET @variant7= 'CREATE VIEW v1 AS SELECT f61 FROM v2';
-Some server responses suffer from
+Some server responses suffer from
Bug#10773 Incorrect message is displayed while updating a view
--------------------------------------------------------------------------------
SET @variant8= 'CREATE VIEW v1 AS SELECT f59 AS f61 FROM t1 WHERE f60 IN (SELECT f59 FROM t1)';
@@ -10884,7 +10941,7 @@ CREATE ALGORITHM = TEMPTABLE VIEW v1 (f61) AS select f60 from t1;
INSERT INTO v1 VALUES (1002);
ERROR HY000: The target table v1 of the INSERT is not insertable-into
UPDATE v1 SET f61=1007;
-Got one of the listed errors
+ERROR HY000: The target table v1 of the UPDATE is not updatable
DELETE FROM v1;
ERROR HY000: The target table v1 of the DELETE is not updatable
DROP VIEW v1;
@@ -10892,7 +10949,7 @@ CREATE VIEW v1 AS SELECT f59 AS f61 FROM t1 WHERE f60 IN (SELECT f59 FROM t1);
INSERT INTO v1 VALUES (1002);
ERROR HY000: The target table v1 of the INSERT is not insertable-into
UPDATE v1 SET f61=1007;
-Got one of the listed errors
+ERROR HY000: The target table v1 of the UPDATE is not updatable
DELETE FROM v1;
ERROR HY000: The target table v1 of the DELETE is not updatable
DROP VIEW v1;
@@ -10900,7 +10957,7 @@ CREATE VIEW v1 AS SELECT f61 FROM v2;
INSERT INTO v1 VALUES (1002);
ERROR HY000: The target table v1 of the INSERT is not insertable-into
UPDATE v1 SET f61=1007;
-Got one of the listed errors
+ERROR HY000: The target table v1 of the UPDATE is not updatable
DELETE FROM v1;
ERROR HY000: The target table v1 of the DELETE is not updatable
DROP VIEW v1;
@@ -10908,7 +10965,7 @@ CREATE VIEW v1 AS SELECT (SELECT f60 FROM t2 WHERE f59=19) AS f61 FROM t1;
INSERT INTO v1 VALUES (1002);
ERROR HY000: The target table v1 of the INSERT is not insertable-into
UPDATE v1 SET f61=1007;
-Got one of the listed errors
+ERROR HY000: The target table v1 of the UPDATE is not updatable
DELETE FROM v1;
ERROR HY000: The target table v1 of the DELETE is not updatable
DROP VIEW v1;
@@ -10916,7 +10973,7 @@ CREATE VIEW v1 AS SELECT f61 FROM t1 HAVING f61 > 0;
INSERT INTO v1 VALUES (1002);
ERROR HY000: The target table v1 of the INSERT is not insertable-into
UPDATE v1 SET f61=1007;
-Got one of the listed errors
+ERROR HY000: The target table v1 of the UPDATE is not updatable
DELETE FROM v1;
ERROR HY000: The target table v1 of the DELETE is not updatable
DROP VIEW v1;
@@ -10924,7 +10981,7 @@ CREATE VIEW v1 AS SELECT f61 FROM t1 GROUP BY f61;
INSERT INTO v1 VALUES (1002);
ERROR HY000: The target table v1 of the INSERT is not insertable-into
UPDATE v1 SET f61=1007;
-Got one of the listed errors
+ERROR HY000: The target table v1 of the UPDATE is not updatable
DELETE FROM v1;
ERROR HY000: The target table v1 of the DELETE is not updatable
DROP VIEW v1;
@@ -10932,7 +10989,7 @@ CREATE VIEW v1 AS SELECT SUM(f59) AS f61 FROM t1;
INSERT INTO v1 VALUES (1002);
ERROR HY000: The target table v1 of the INSERT is not insertable-into
UPDATE v1 SET f61=1007;
-Got one of the listed errors
+ERROR HY000: The target table v1 of the UPDATE is not updatable
DELETE FROM v1;
ERROR HY000: The target table v1 of the DELETE is not updatable
DROP VIEW v1;
@@ -10940,7 +10997,7 @@ CREATE VIEW v1 AS SELECT DISTINCTROW(f61) FROM t1;
INSERT INTO v1 VALUES (1002);
ERROR HY000: The target table v1 of the INSERT is not insertable-into
UPDATE v1 SET f61=1007;
-Got one of the listed errors
+ERROR HY000: The target table v1 of the UPDATE is not updatable
DELETE FROM v1;
ERROR HY000: The target table v1 of the DELETE is not updatable
DROP VIEW v1;
@@ -10948,7 +11005,7 @@ CREATE VIEW v1 AS SELECT DISTINCT(f61) FROM t1;
INSERT INTO v1 VALUES (1002);
ERROR HY000: The target table v1 of the INSERT is not insertable-into
UPDATE v1 SET f61=1007;
-Got one of the listed errors
+ERROR HY000: The target table v1 of the UPDATE is not updatable
DELETE FROM v1;
ERROR HY000: The target table v1 of the DELETE is not updatable
DROP VIEW v1;
@@ -11117,9 +11174,9 @@ f1 f2 f4 report
4 NULL <------ 20 --------> t1 4
4 NULL <------ 20 --------> v1 4
ALTER TABLE t1 CHANGE COLUMN f1 f1 VARCHAR(30);
-INSERT INTO t1 SET f1 = '<------------- 30 ----------->',
+INSERT INTO t1 SET f1 = '<------------- 30 ----------->',
f4 = '<------ 20 -------->', report = 't1 5';
-INSERT INTO v1 SET f1 = '<------------- 30 ----------->',
+INSERT INTO v1 SET f1 = '<------------- 30 ----------->',
f4 = '<------ 20 -------->', report = 'v1 5';
DESCRIBE t1;
Field Type Null Key Default Extra
diff --git a/mysql-test/suite/funcs_1/r/ndb__datadict.result b/mysql-test/suite/funcs_1/r/ndb__datadict.result
index ebb45bf6ea2..329375caf2e 100644
--- a/mysql-test/suite/funcs_1/r/ndb__datadict.result
+++ b/mysql-test/suite/funcs_1/r/ndb__datadict.result
@@ -10,8 +10,9 @@
. *__datadict.test are started. This can be a result of showing e.g. maximum
. values of the number of rows of tables.
.
-. This .result file has been checked OK with Linux 5.0.23-bk,
-. ChangeSet@1.2211, 2006-06-28 10:11:43-07:00.
+. This .result file has been checked OK with Linux 5.0.48,
+. build tree ChangeSet@1.2477.6.3, 2007-07-30
+. except that the not fixed Bug#30020 causes a difference.
.
--------------------------------------------------------------------------------
@@ -20,11 +21,21 @@ FIXME: There are subtests that are switched off due to known bugs:
SELECT 1 AS "have_bug_11589";
have_bug_11589
1
+SELECT 1 AS "have_bug_30689";
+have_bug_30689
+1
There are some statements where the ps-protocol is switched off.
This may come from the bug listed below, ir from other problems.
Bug#11589: mysqltest, --ps-protocol, strange output, float/double/real with zerofill
--------------------------------------------------------------------------------
+
+Selects on INFORMATION_SCHEMA.VIEWS present incomplete
+content for the column VIEW_DEFINITION in cases where
+the view selects(=is based) on an INFORMATION_SCHEMA table.
+---> VIEWS vu and vu1
+Bug#30689 Wrong content in I_S.VIEWS.VIEW_DEFINITION if VIEW is based on I_S
+--------------------------------------------------------------------------------
SET @NO_REFRESH = IF( '' = '', 0, 1);
DROP DATABASE IF EXISTS test1;
CREATE DATABASE test1;
@@ -720,7 +731,8 @@ CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT
SELECT * FROM tables
-WHERE NOT( table_schema = 'information_schema');
+WHERE NOT( table_schema = 'information_schema')
+AND NOT (table_schema = 'mysql' AND table_name LIKE 'help_%');
TABLE_CATALOG NULL
TABLE_SCHEMA db_datadict
TABLE_NAME v1
@@ -912,90 +924,6 @@ CREATE_OPTIONS
TABLE_COMMENT General log
TABLE_CATALOG NULL
TABLE_SCHEMA mysql
-TABLE_NAME help_category
-TABLE_TYPE BASE TABLE
-ENGINE MyISAM
-VERSION 10
-ROW_FORMAT Fixed
-TABLE_ROWS 37
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME YYYY-MM-DD hh:mm:ss
-UPDATE_TIME YYYY-MM-DD hh:mm:ss
-CHECK_TIME YYYY-MM-DD hh:mm:ss
-TABLE_COLLATION utf8_general_ci
-CHECKSUM NULL
-CREATE_OPTIONS
-TABLE_COMMENT help categories
-TABLE_CATALOG NULL
-TABLE_SCHEMA mysql
-TABLE_NAME help_keyword
-TABLE_TYPE BASE TABLE
-ENGINE MyISAM
-VERSION 10
-ROW_FORMAT Fixed
-TABLE_ROWS 424
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME YYYY-MM-DD hh:mm:ss
-UPDATE_TIME YYYY-MM-DD hh:mm:ss
-CHECK_TIME YYYY-MM-DD hh:mm:ss
-TABLE_COLLATION utf8_general_ci
-CHECKSUM NULL
-CREATE_OPTIONS
-TABLE_COMMENT help keywords
-TABLE_CATALOG NULL
-TABLE_SCHEMA mysql
-TABLE_NAME help_relation
-TABLE_TYPE BASE TABLE
-ENGINE MyISAM
-VERSION 10
-ROW_FORMAT Fixed
-TABLE_ROWS 901
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME YYYY-MM-DD hh:mm:ss
-UPDATE_TIME YYYY-MM-DD hh:mm:ss
-CHECK_TIME YYYY-MM-DD hh:mm:ss
-TABLE_COLLATION utf8_general_ci
-CHECKSUM NULL
-CREATE_OPTIONS
-TABLE_COMMENT keyword-topic relation
-TABLE_CATALOG NULL
-TABLE_SCHEMA mysql
-TABLE_NAME help_topic
-TABLE_TYPE BASE TABLE
-ENGINE MyISAM
-VERSION 10
-ROW_FORMAT Dynamic
-TABLE_ROWS 479
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME YYYY-MM-DD hh:mm:ss
-UPDATE_TIME YYYY-MM-DD hh:mm:ss
-CHECK_TIME YYYY-MM-DD hh:mm:ss
-TABLE_COLLATION utf8_general_ci
-CHECKSUM NULL
-CREATE_OPTIONS
-TABLE_COMMENT help topics
-TABLE_CATALOG NULL
-TABLE_SCHEMA mysql
TABLE_NAME host
TABLE_TYPE BASE TABLE
ENGINE MyISAM
@@ -1478,90 +1406,6 @@ CHECKSUM NULL
CREATE_OPTIONS
TABLE_COMMENT
TABLE_CATALOG NULL
-TABLE_SCHEMA test
-TABLE_NAME tb1
-TABLE_TYPE BASE TABLE
-ENGINE MyISAM
-VERSION 10
-ROW_FORMAT Dynamic
-TABLE_ROWS 10
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME YYYY-MM-DD hh:mm:ss
-UPDATE_TIME YYYY-MM-DD hh:mm:ss
-CHECK_TIME YYYY-MM-DD hh:mm:ss
-TABLE_COLLATION latin1_swedish_ci
-CHECKSUM NULL
-CREATE_OPTIONS
-TABLE_COMMENT
-TABLE_CATALOG NULL
-TABLE_SCHEMA test
-TABLE_NAME tb2
-TABLE_TYPE BASE TABLE
-ENGINE MyISAM
-VERSION 10
-ROW_FORMAT Dynamic
-TABLE_ROWS 54
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME YYYY-MM-DD hh:mm:ss
-UPDATE_TIME YYYY-MM-DD hh:mm:ss
-CHECK_TIME YYYY-MM-DD hh:mm:ss
-TABLE_COLLATION latin1_swedish_ci
-CHECKSUM NULL
-CREATE_OPTIONS
-TABLE_COMMENT
-TABLE_CATALOG NULL
-TABLE_SCHEMA test
-TABLE_NAME tb3
-TABLE_TYPE BASE TABLE
-ENGINE MyISAM
-VERSION 10
-ROW_FORMAT Dynamic
-TABLE_ROWS 11
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME YYYY-MM-DD hh:mm:ss
-UPDATE_TIME YYYY-MM-DD hh:mm:ss
-CHECK_TIME YYYY-MM-DD hh:mm:ss
-TABLE_COLLATION latin1_swedish_ci
-CHECKSUM NULL
-CREATE_OPTIONS
-TABLE_COMMENT
-TABLE_CATALOG NULL
-TABLE_SCHEMA test
-TABLE_NAME tb4
-TABLE_TYPE BASE TABLE
-ENGINE MyISAM
-VERSION 10
-ROW_FORMAT Dynamic
-TABLE_ROWS 10
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME YYYY-MM-DD hh:mm:ss
-UPDATE_TIME YYYY-MM-DD hh:mm:ss
-CHECK_TIME YYYY-MM-DD hh:mm:ss
-TABLE_COLLATION latin1_swedish_ci
-CHECKSUM NULL
-CREATE_OPTIONS
-TABLE_COMMENT
-TABLE_CATALOG NULL
TABLE_SCHEMA test4
TABLE_NAME t6
TABLE_TYPE BASE TABLE
@@ -1642,8 +1486,8 @@ NULL db_datadict latin1 SYSTEM VIEW MEMORY
NULL db_datadict latin1 SYSTEM VIEW MEMORY
NULL db_datadict latin1 SYSTEM VIEW MEMORY
NULL db_datadict latin1 SYSTEM VIEW MEMORY
-NULL db_datadict latin1 SYSTEM VIEW MEMORY
-NULL db_datadict latin1 SYSTEM VIEW MEMORY
+NULL db_datadict latin1 SYSTEM VIEW MyISAM
+NULL db_datadict latin1 SYSTEM VIEW MyISAM
NULL db_datadict latin1 SYSTEM VIEW MyISAM
NULL db_datadict latin1 SYSTEM VIEW MyISAM
NULL db_datadict latin1 SYSTEM VIEW MyISAM
@@ -1710,8 +1554,8 @@ NULL information_schema utf8 SYSTEM VIEW MEMORY
NULL information_schema utf8 SYSTEM VIEW MEMORY
NULL information_schema utf8 SYSTEM VIEW MEMORY
NULL information_schema utf8 SYSTEM VIEW MEMORY
-NULL information_schema utf8 SYSTEM VIEW MEMORY
-NULL information_schema utf8 SYSTEM VIEW MEMORY
+NULL information_schema utf8 SYSTEM VIEW MyISAM
+NULL information_schema utf8 SYSTEM VIEW MyISAM
NULL information_schema utf8 SYSTEM VIEW MyISAM
NULL information_schema utf8 SYSTEM VIEW MyISAM
NULL information_schema utf8 SYSTEM VIEW MyISAM
@@ -1778,8 +1622,8 @@ NULL mysql latin1 SYSTEM VIEW MEMORY
NULL mysql latin1 SYSTEM VIEW MEMORY
NULL mysql latin1 SYSTEM VIEW MEMORY
NULL mysql latin1 SYSTEM VIEW MEMORY
-NULL mysql latin1 SYSTEM VIEW MEMORY
-NULL mysql latin1 SYSTEM VIEW MEMORY
+NULL mysql latin1 SYSTEM VIEW MyISAM
+NULL mysql latin1 SYSTEM VIEW MyISAM
NULL mysql latin1 SYSTEM VIEW MyISAM
NULL mysql latin1 SYSTEM VIEW MyISAM
NULL mysql latin1 SYSTEM VIEW MyISAM
@@ -1846,8 +1690,8 @@ NULL test latin1 SYSTEM VIEW MEMORY
NULL test latin1 SYSTEM VIEW MEMORY
NULL test latin1 SYSTEM VIEW MEMORY
NULL test latin1 SYSTEM VIEW MEMORY
-NULL test latin1 SYSTEM VIEW MEMORY
-NULL test latin1 SYSTEM VIEW MEMORY
+NULL test latin1 SYSTEM VIEW MyISAM
+NULL test latin1 SYSTEM VIEW MyISAM
NULL test latin1 SYSTEM VIEW MyISAM
NULL test latin1 SYSTEM VIEW MyISAM
NULL test latin1 SYSTEM VIEW MyISAM
@@ -1914,8 +1758,8 @@ NULL test1 latin1 SYSTEM VIEW MEMORY
NULL test1 latin1 SYSTEM VIEW MEMORY
NULL test1 latin1 SYSTEM VIEW MEMORY
NULL test1 latin1 SYSTEM VIEW MEMORY
-NULL test1 latin1 SYSTEM VIEW MEMORY
-NULL test1 latin1 SYSTEM VIEW MEMORY
+NULL test1 latin1 SYSTEM VIEW MyISAM
+NULL test1 latin1 SYSTEM VIEW MyISAM
NULL test1 latin1 SYSTEM VIEW MyISAM
NULL test1 latin1 SYSTEM VIEW MyISAM
NULL test1 latin1 SYSTEM VIEW MyISAM
@@ -1982,8 +1826,8 @@ NULL test4 latin1 SYSTEM VIEW MEMORY
NULL test4 latin1 SYSTEM VIEW MEMORY
NULL test4 latin1 SYSTEM VIEW MEMORY
NULL test4 latin1 SYSTEM VIEW MEMORY
-NULL test4 latin1 SYSTEM VIEW MEMORY
-NULL test4 latin1 SYSTEM VIEW MEMORY
+NULL test4 latin1 SYSTEM VIEW MyISAM
+NULL test4 latin1 SYSTEM VIEW MyISAM
NULL test4 latin1 SYSTEM VIEW MyISAM
NULL test4 latin1 SYSTEM VIEW MyISAM
NULL test4 latin1 SYSTEM VIEW MyISAM
@@ -2023,7 +1867,7 @@ NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 1
NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
-NULL information_schema COLUMNS COLUMN_TYPE 15 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema COLUMNS COLUMN_TYPE 15 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema COLUMNS COLUMN_KEY 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema COLUMNS EXTRA 17 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select
NULL information_schema COLUMNS PRIVILEGES 18 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select
@@ -2047,12 +1891,12 @@ NULL information_schema EVENTS EVENT_NAME 3 NO varchar 64 192 NULL NULL utf8 ut
NULL information_schema EVENTS DEFINER 4 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
NULL information_schema EVENTS TIME_ZONE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema EVENTS EVENT_BODY 6 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select
-NULL information_schema EVENTS EVENT_DEFINITION 7 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema EVENTS EVENT_DEFINITION 7 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema EVENTS EVENT_TYPE 8 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select
NULL information_schema EVENTS EXECUTE_AT 9 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS INTERVAL_VALUE 10 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select
NULL information_schema EVENTS INTERVAL_FIELD 11 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select
-NULL information_schema EVENTS SQL_MODE 12 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema EVENTS SQL_MODE 12 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema EVENTS STARTS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS ENDS 14 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS STATUS 15 NO varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select
@@ -2190,7 +2034,7 @@ NULL information_schema ROUTINES SQL_PATH 14 NULL YES varchar 64 192 NULL NULL u
NULL information_schema ROUTINES SECURITY_TYPE 15 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select
NULL information_schema ROUTINES CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema ROUTINES LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select
-NULL information_schema ROUTINES SQL_MODE 18 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema ROUTINES SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema ROUTINES ROUTINE_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema ROUTINES DEFINER 20 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
NULL information_schema ROUTINES CHARACTER_SET_CLIENT 21 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
@@ -2267,7 +2111,7 @@ NULL information_schema TRIGGERS EVENT_OBJECT_SCHEMA 6 NO varchar 64 192 NULL N
NULL information_schema TRIGGERS EVENT_OBJECT_TABLE 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) 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_CONDITION 9 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
-NULL information_schema TRIGGERS ACTION_STATEMENT 10 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema TRIGGERS ACTION_STATEMENT 10 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema TRIGGERS ACTION_ORIENTATION 11 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select
NULL information_schema TRIGGERS ACTION_TIMING 12 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select
NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_TABLE 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
@@ -2275,8 +2119,8 @@ NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_TABLE 14 NULL YES varchar
NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW 15 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema TRIGGERS CREATED 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
-NULL information_schema TRIGGERS SQL_MODE 18 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
-NULL information_schema TRIGGERS DEFINER 19 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema TRIGGERS SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema TRIGGERS DEFINER 19 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema TRIGGERS CHARACTER_SET_CLIENT 20 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema TRIGGERS COLLATION_CONNECTION 21 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema TRIGGERS DATABASE_COLLATION 22 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
@@ -2287,7 +2131,7 @@ NULL information_schema USER_PRIVILEGES IS_GRANTABLE 4 NO varchar 3 9 NULL NULL
NULL information_schema VIEWS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select
NULL information_schema VIEWS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema VIEWS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
-NULL information_schema VIEWS VIEW_DEFINITION 4 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema VIEWS VIEW_DEFINITION 4 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext 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 IS_UPDATABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema VIEWS DEFINER 7 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
@@ -2869,7 +2713,7 @@ cp932 cp932_japanese_ci SJIS for Windows Japanese 2
eucjpms eucjpms_japanese_ci UJIS for Windows Japanese 3
select sum(id) from collations;
sum(id)
-10840
+11094
select collation_name, character_set_name into @x,@y
from collation_character_set_applicability limit 1;
select @x, @y;
@@ -2883,7 +2727,8 @@ END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh
select count(*) from routines;
count(*)
1
-select * from statistics;
+select * from statistics
+where not (table_schema = 'mysql' and table_name like 'help_%');
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT
NULL mysql user 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE
NULL mysql user 0 mysql PRIMARY 2 User A 3 NULL NULL BTREE
@@ -2899,14 +2744,6 @@ NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE
NULL mysql event 0 mysql PRIMARY 1 db A NULL NULL NULL BTREE
NULL mysql event 0 mysql PRIMARY 2 name A 0 NULL NULL BTREE
NULL mysql func 0 mysql PRIMARY 1 name A 0 NULL NULL BTREE
-NULL mysql help_category 0 mysql PRIMARY 1 help_category_id A 37 NULL NULL BTREE
-NULL mysql help_category 0 mysql name 1 name A 37 NULL NULL BTREE
-NULL mysql help_keyword 0 mysql PRIMARY 1 help_keyword_id A 424 NULL NULL BTREE
-NULL mysql help_keyword 0 mysql name 1 name A 424 NULL NULL BTREE
-NULL mysql help_relation 0 mysql PRIMARY 1 help_keyword_id A NULL NULL NULL BTREE
-NULL mysql help_relation 0 mysql PRIMARY 2 help_topic_id A 901 NULL NULL BTREE
-NULL mysql help_topic 0 mysql PRIMARY 1 help_topic_id A 479 NULL NULL BTREE
-NULL mysql help_topic 0 mysql name 1 name A 479 NULL NULL BTREE
NULL mysql host 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE
NULL mysql host 0 mysql PRIMARY 2 Db A 0 NULL NULL BTREE
NULL mysql ndb_apply_status 0 mysql PRIMARY 1 server_id NULL 0 NULL NULL HASH
@@ -3138,9 +2975,10 @@ NULL mysql PRIMARY NULL mysql time_zone_transition_type Transition_type_id 2 NUL
select count(*) as max_recs from key_column_usage;
max_recs
46
-select max(cardinality) from statistics;
+select max(cardinality) from statistics
+where not (table_schema = 'mysql' and table_name like 'help_%');
max(cardinality)
-901
+393
select concat("View '",
table_name, "' is associated with the database '", table_schema, "'.")
AS "Who is Who for the Views"
@@ -4031,7 +3869,8 @@ CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT
SELECT * FROM information_schema.tables
-WHERE NOT( table_schema = 'information_schema');
+WHERE NOT( table_schema = 'information_schema')
+AND NOT (table_schema = 'mysql' AND table_name LIKE 'help_%');
TABLE_CATALOG NULL
TABLE_SCHEMA db_datadict
TABLE_NAME v1
@@ -4223,90 +4062,6 @@ CREATE_OPTIONS
TABLE_COMMENT General log
TABLE_CATALOG NULL
TABLE_SCHEMA mysql
-TABLE_NAME help_category
-TABLE_TYPE BASE TABLE
-ENGINE MyISAM
-VERSION 10
-ROW_FORMAT Fixed
-TABLE_ROWS 37
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME YYYY-MM-DD hh:mm:ss
-UPDATE_TIME YYYY-MM-DD hh:mm:ss
-CHECK_TIME YYYY-MM-DD hh:mm:ss
-TABLE_COLLATION utf8_general_ci
-CHECKSUM NULL
-CREATE_OPTIONS
-TABLE_COMMENT help categories
-TABLE_CATALOG NULL
-TABLE_SCHEMA mysql
-TABLE_NAME help_keyword
-TABLE_TYPE BASE TABLE
-ENGINE MyISAM
-VERSION 10
-ROW_FORMAT Fixed
-TABLE_ROWS 424
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME YYYY-MM-DD hh:mm:ss
-UPDATE_TIME YYYY-MM-DD hh:mm:ss
-CHECK_TIME YYYY-MM-DD hh:mm:ss
-TABLE_COLLATION utf8_general_ci
-CHECKSUM NULL
-CREATE_OPTIONS
-TABLE_COMMENT help keywords
-TABLE_CATALOG NULL
-TABLE_SCHEMA mysql
-TABLE_NAME help_relation
-TABLE_TYPE BASE TABLE
-ENGINE MyISAM
-VERSION 10
-ROW_FORMAT Fixed
-TABLE_ROWS 901
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME YYYY-MM-DD hh:mm:ss
-UPDATE_TIME YYYY-MM-DD hh:mm:ss
-CHECK_TIME YYYY-MM-DD hh:mm:ss
-TABLE_COLLATION utf8_general_ci
-CHECKSUM NULL
-CREATE_OPTIONS
-TABLE_COMMENT keyword-topic relation
-TABLE_CATALOG NULL
-TABLE_SCHEMA mysql
-TABLE_NAME help_topic
-TABLE_TYPE BASE TABLE
-ENGINE MyISAM
-VERSION 10
-ROW_FORMAT Dynamic
-TABLE_ROWS 479
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME YYYY-MM-DD hh:mm:ss
-UPDATE_TIME YYYY-MM-DD hh:mm:ss
-CHECK_TIME YYYY-MM-DD hh:mm:ss
-TABLE_COLLATION utf8_general_ci
-CHECKSUM NULL
-CREATE_OPTIONS
-TABLE_COMMENT help topics
-TABLE_CATALOG NULL
-TABLE_SCHEMA mysql
TABLE_NAME host
TABLE_TYPE BASE TABLE
ENGINE MyISAM
@@ -4953,8 +4708,8 @@ NULL db_datadict latin1 SYSTEM VIEW MEMORY
NULL db_datadict latin1 SYSTEM VIEW MEMORY
NULL db_datadict latin1 SYSTEM VIEW MEMORY
NULL db_datadict latin1 SYSTEM VIEW MEMORY
-NULL db_datadict latin1 SYSTEM VIEW MEMORY
-NULL db_datadict latin1 SYSTEM VIEW MEMORY
+NULL db_datadict latin1 SYSTEM VIEW MyISAM
+NULL db_datadict latin1 SYSTEM VIEW MyISAM
NULL db_datadict latin1 SYSTEM VIEW MyISAM
NULL db_datadict latin1 SYSTEM VIEW MyISAM
NULL db_datadict latin1 SYSTEM VIEW MyISAM
@@ -5021,8 +4776,8 @@ NULL information_schema utf8 SYSTEM VIEW MEMORY
NULL information_schema utf8 SYSTEM VIEW MEMORY
NULL information_schema utf8 SYSTEM VIEW MEMORY
NULL information_schema utf8 SYSTEM VIEW MEMORY
-NULL information_schema utf8 SYSTEM VIEW MEMORY
-NULL information_schema utf8 SYSTEM VIEW MEMORY
+NULL information_schema utf8 SYSTEM VIEW MyISAM
+NULL information_schema utf8 SYSTEM VIEW MyISAM
NULL information_schema utf8 SYSTEM VIEW MyISAM
NULL information_schema utf8 SYSTEM VIEW MyISAM
NULL information_schema utf8 SYSTEM VIEW MyISAM
@@ -5089,8 +4844,8 @@ NULL mysql latin1 SYSTEM VIEW MEMORY
NULL mysql latin1 SYSTEM VIEW MEMORY
NULL mysql latin1 SYSTEM VIEW MEMORY
NULL mysql latin1 SYSTEM VIEW MEMORY
-NULL mysql latin1 SYSTEM VIEW MEMORY
-NULL mysql latin1 SYSTEM VIEW MEMORY
+NULL mysql latin1 SYSTEM VIEW MyISAM
+NULL mysql latin1 SYSTEM VIEW MyISAM
NULL mysql latin1 SYSTEM VIEW MyISAM
NULL mysql latin1 SYSTEM VIEW MyISAM
NULL mysql latin1 SYSTEM VIEW MyISAM
@@ -5157,8 +4912,8 @@ NULL test latin1 SYSTEM VIEW MEMORY
NULL test latin1 SYSTEM VIEW MEMORY
NULL test latin1 SYSTEM VIEW MEMORY
NULL test latin1 SYSTEM VIEW MEMORY
-NULL test latin1 SYSTEM VIEW MEMORY
-NULL test latin1 SYSTEM VIEW MEMORY
+NULL test latin1 SYSTEM VIEW MyISAM
+NULL test latin1 SYSTEM VIEW MyISAM
NULL test latin1 SYSTEM VIEW MyISAM
NULL test latin1 SYSTEM VIEW MyISAM
NULL test latin1 SYSTEM VIEW MyISAM
@@ -5225,8 +4980,8 @@ NULL test1 latin1 SYSTEM VIEW MEMORY
NULL test1 latin1 SYSTEM VIEW MEMORY
NULL test1 latin1 SYSTEM VIEW MEMORY
NULL test1 latin1 SYSTEM VIEW MEMORY
-NULL test1 latin1 SYSTEM VIEW MEMORY
-NULL test1 latin1 SYSTEM VIEW MEMORY
+NULL test1 latin1 SYSTEM VIEW MyISAM
+NULL test1 latin1 SYSTEM VIEW MyISAM
NULL test1 latin1 SYSTEM VIEW MyISAM
NULL test1 latin1 SYSTEM VIEW MyISAM
NULL test1 latin1 SYSTEM VIEW MyISAM
@@ -5293,8 +5048,8 @@ NULL test4 latin1 SYSTEM VIEW MEMORY
NULL test4 latin1 SYSTEM VIEW MEMORY
NULL test4 latin1 SYSTEM VIEW MEMORY
NULL test4 latin1 SYSTEM VIEW MEMORY
-NULL test4 latin1 SYSTEM VIEW MEMORY
-NULL test4 latin1 SYSTEM VIEW MEMORY
+NULL test4 latin1 SYSTEM VIEW MyISAM
+NULL test4 latin1 SYSTEM VIEW MyISAM
NULL test4 latin1 SYSTEM VIEW MyISAM
NULL test4 latin1 SYSTEM VIEW MyISAM
NULL test4 latin1 SYSTEM VIEW MyISAM
@@ -5394,19 +5149,19 @@ COUNT(*)
6
SELECT COUNT(*) FROM information_schema. tables ;
COUNT(*)
-68
+64
SELECT COUNT(*) FROM information_schema. columns ;
COUNT(*)
-832
+590
SELECT COUNT(*) FROM information_schema. character_sets ;
COUNT(*)
36
SELECT COUNT(*) FROM information_schema. collations ;
COUNT(*)
-127
+128
SELECT COUNT(*) FROM information_schema. collation_character_set_applicability ;
COUNT(*)
-128
+129
SELECT COUNT(*) FROM information_schema. routines ;
COUNT(*)
1
@@ -5459,10 +5214,10 @@ NULL test1 latin1
NULL test4 latin1
select count(*) as tot_tabs from tables;
tot_tabs
-65
+61
select count(*) as the_cols from columns;
the_cols
-807
+565
select max(maxlen) as the_max from character_sets;
the_max
3
@@ -5483,10 +5238,10 @@ utf8_esperanto_ci utf8
utf8_estonian_ci utf8
select routine_definition from routines;
routine_definition
-select * from statistics group by index_name asc limit 0, 5;
+select * from statistics where table_name not like 'help_%'
+group by index_name asc limit 0, 5;
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT
NULL mysql procs_priv 1 mysql Grantor 1 Grantor A NULL NULL NULL BTREE
-NULL mysql help_category 0 mysql name 1 name A 37 NULL NULL BTREE
NULL mysql user 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE
NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE
select concat(table_schema, ', ', table_name, ', ', view_definition) view_info
@@ -5600,9 +5355,9 @@ NULL test latin1 latin1_swedish_ci NULL
NULL test1 latin1 latin1_swedish_ci NULL
select distinct grantee from user_privileges;
grantee
-'root'@'localhost'
-'root'@'<SERVER_NAME>'
'root'@'127.0.0.1'
+'root'@'<SERVER_NAME>'
+'root'@'localhost'
select all grantee from user_privileges order by grantee, privilege_type;
grantee
'root'@'127.0.0.1'
@@ -7552,7 +7307,7 @@ Testcase 3.2.1.14:
DROP DATABASE IF EXISTS db_datadict;
CREATE DATABASE db_datadict;
USE db_datadict;
-create table res_t_401014(f1 char(10), f2 text(25), f3 int);
+create table res_t_401014(f1 char(10), f2 varchar(25), f3 int);
create view res_v_401014 as select * from res_t_401014;
create procedure sp_6_401014() select 'db_datadict';
create function fn_6_401014() returns int return 0;
@@ -7575,10 +7330,10 @@ from information_schema.columns
where table_schema like 'db_datadict%';
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT
NULL db_datadict res_t_401014 f1 1 NULL YES char 10 10 NULL NULL latin1 latin1_swedish_ci char(10) select,insert,update,references
-NULL db_datadict res_t_401014 f2 2 NULL YES tinytext 255 255 NULL NULL latin1 latin1_swedish_ci tinytext select,insert,update,references
+NULL db_datadict res_t_401014 f2 2 NULL YES varchar 25 25 NULL NULL latin1 latin1_swedish_ci varchar(25) select,insert,update,references
NULL db_datadict res_t_401014 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
NULL db_datadict res_v_401014 f1 1 NULL YES char 10 10 NULL NULL latin1 latin1_swedish_ci char(10) select,insert,update,references
-NULL db_datadict res_v_401014 f2 2 NULL YES tinytext 255 255 NULL NULL latin1 latin1_swedish_ci tinytext select,insert,update,references
+NULL db_datadict res_v_401014 f2 2 NULL YES varchar 25 25 NULL NULL latin1 latin1_swedish_ci varchar(25) select,insert,update,references
NULL db_datadict res_v_401014 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
select table_schema, table_name, is_updatable
from information_schema.views
@@ -7697,7 +7452,7 @@ WHERE trigger_schema LIKE 'db_datadict%';
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
use db_datadict;
alter table res_t_401014 change f1 ff1 int;
-alter table res_t_401014 engine = innodb;
+alter table res_t_401014 engine = MEMORY;
alter table res_t_401014 change f3 f3_new bigint;
alter view res_v_401014 as select ff1 from res_t_401014;
alter procedure sp_6_401014 sql security invoker;
@@ -7715,14 +7470,14 @@ select table_catalog, table_schema, engine
from information_schema.tables
where table_schema like 'db_datadict%';
table_catalog table_schema engine
-NULL db_datadict InnoDB
+NULL db_datadict MEMORY
NULL db_datadict NULL
select *
from information_schema.columns
where table_schema like 'db_datadict%';
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT
NULL db_datadict res_t_401014 ff1 1 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
-NULL db_datadict res_t_401014 f2 2 NULL YES tinytext 255 255 NULL NULL latin1 latin1_swedish_ci tinytext select,insert,update,references
+NULL db_datadict res_t_401014 f2 2 NULL YES varchar 25 25 NULL NULL latin1 latin1_swedish_ci varchar(25) select,insert,update,references
NULL db_datadict res_t_401014 f3_new 3 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) select,insert,update,references
NULL db_datadict res_v_401014 ff1 1 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
select table_schema, table_name, is_updatable
@@ -8363,6 +8118,7 @@ utf8_roman_ci utf8
utf8_persian_ci utf8
utf8_esperanto_ci utf8
utf8_hungarian_ci utf8
+utf8_general_cs utf8
ucs2_general_ci ucs2
ucs2_bin ucs2
ucs2_unicode_ci ucs2
@@ -9161,6 +8917,7 @@ utf8_roman_ci
utf8_persian_ci
utf8_esperanto_ci
utf8_hungarian_ci
+utf8_general_cs
ucs2_general_ci
ucs2_bin
ucs2_unicode_ci
@@ -9526,6 +9283,7 @@ utf8_roman_ci utf8 207 Yes 8
utf8_persian_ci utf8 208 Yes 8
utf8_esperanto_ci utf8 209 Yes 8
utf8_hungarian_ci utf8 210 Yes 8
+utf8_general_cs utf8 254 Yes 1
ucs2_general_ci ucs2 35 Yes Yes 1
ucs2_bin ucs2 90 Yes 1
ucs2_unicode_ci ucs2 128 Yes 8
@@ -9689,6 +9447,7 @@ utf8_roman_ci utf8
utf8_persian_ci utf8
utf8_esperanto_ci utf8
utf8_hungarian_ci utf8
+utf8_general_cs utf8
ucs2_general_ci ucs2
ucs2_bin ucs2
ucs2_unicode_ci ucs2
@@ -9924,7 +9683,7 @@ NUMERIC_PRECISION bigint(21) unsigned YES NULL
NUMERIC_SCALE bigint(21) unsigned YES NULL
CHARACTER_SET_NAME varchar(64) YES NULL
COLLATION_NAME varchar(64) YES NULL
-COLUMN_TYPE longtext NO
+COLUMN_TYPE longtext NO NULL
COLUMN_KEY varchar(3) NO
EXTRA varchar(20) NO
PRIVILEGES varchar(80) NO
@@ -9977,7 +9736,7 @@ NULL information_schema columns NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 1
NULL information_schema columns NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema columns CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema columns COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
-NULL information_schema columns COLUMN_TYPE 15 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema columns COLUMN_TYPE 15 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema columns COLUMN_KEY 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema columns EXTRA 17 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select
NULL information_schema columns PRIVILEGES 18 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select
@@ -10032,7 +9791,7 @@ NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 1
NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
-NULL information_schema COLUMNS COLUMN_TYPE 15 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema COLUMNS COLUMN_TYPE 15 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema COLUMNS COLUMN_KEY 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema COLUMNS EXTRA 17 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select
NULL information_schema COLUMNS PRIVILEGES 18 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select
@@ -10056,12 +9815,12 @@ NULL information_schema EVENTS EVENT_NAME 3 NO varchar 64 192 NULL NULL utf8 ut
NULL information_schema EVENTS DEFINER 4 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
NULL information_schema EVENTS TIME_ZONE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema EVENTS EVENT_BODY 6 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select
-NULL information_schema EVENTS EVENT_DEFINITION 7 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema EVENTS EVENT_DEFINITION 7 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema EVENTS EVENT_TYPE 8 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select
NULL information_schema EVENTS EXECUTE_AT 9 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS INTERVAL_VALUE 10 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select
NULL information_schema EVENTS INTERVAL_FIELD 11 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select
-NULL information_schema EVENTS SQL_MODE 12 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema EVENTS SQL_MODE 12 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema EVENTS STARTS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS ENDS 14 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS STATUS 15 NO varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select
@@ -10199,7 +9958,7 @@ NULL information_schema ROUTINES SQL_PATH 14 NULL YES varchar 64 192 NULL NULL u
NULL information_schema ROUTINES SECURITY_TYPE 15 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select
NULL information_schema ROUTINES CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema ROUTINES LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select
-NULL information_schema ROUTINES SQL_MODE 18 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema ROUTINES SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema ROUTINES ROUTINE_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema ROUTINES DEFINER 20 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
NULL information_schema ROUTINES CHARACTER_SET_CLIENT 21 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
@@ -10276,7 +10035,7 @@ NULL information_schema TRIGGERS EVENT_OBJECT_SCHEMA 6 NO varchar 64 192 NULL N
NULL information_schema TRIGGERS EVENT_OBJECT_TABLE 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) 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_CONDITION 9 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
-NULL information_schema TRIGGERS ACTION_STATEMENT 10 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema TRIGGERS ACTION_STATEMENT 10 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema TRIGGERS ACTION_ORIENTATION 11 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select
NULL information_schema TRIGGERS ACTION_TIMING 12 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select
NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_TABLE 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
@@ -10284,8 +10043,8 @@ NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_TABLE 14 NULL YES varchar
NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW 15 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema TRIGGERS CREATED 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
-NULL information_schema TRIGGERS SQL_MODE 18 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
-NULL information_schema TRIGGERS DEFINER 19 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema TRIGGERS SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema TRIGGERS DEFINER 19 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema TRIGGERS CHARACTER_SET_CLIENT 20 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema TRIGGERS COLLATION_CONNECTION 21 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema TRIGGERS DATABASE_COLLATION 22 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
@@ -10296,7 +10055,7 @@ NULL information_schema USER_PRIVILEGES IS_GRANTABLE 4 NO varchar 3 9 NULL NULL
NULL information_schema VIEWS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select
NULL information_schema VIEWS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema VIEWS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
-NULL information_schema VIEWS VIEW_DEFINITION 4 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema VIEWS VIEW_DEFINITION 4 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext 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 IS_UPDATABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema VIEWS DEFINER 7 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
@@ -10845,7 +10604,7 @@ NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 1
NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
-NULL information_schema COLUMNS COLUMN_TYPE 15 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema COLUMNS COLUMN_TYPE 15 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema COLUMNS COLUMN_KEY 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema COLUMNS EXTRA 17 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select
NULL information_schema COLUMNS PRIVILEGES 18 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select
@@ -10869,12 +10628,12 @@ NULL information_schema EVENTS EVENT_NAME 3 NO varchar 64 192 NULL NULL utf8 ut
NULL information_schema EVENTS DEFINER 4 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
NULL information_schema EVENTS TIME_ZONE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema EVENTS EVENT_BODY 6 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select
-NULL information_schema EVENTS EVENT_DEFINITION 7 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema EVENTS EVENT_DEFINITION 7 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema EVENTS EVENT_TYPE 8 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select
NULL information_schema EVENTS EXECUTE_AT 9 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS INTERVAL_VALUE 10 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select
NULL information_schema EVENTS INTERVAL_FIELD 11 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select
-NULL information_schema EVENTS SQL_MODE 12 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema EVENTS SQL_MODE 12 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema EVENTS STARTS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS ENDS 14 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS STATUS 15 NO varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select
@@ -11012,7 +10771,7 @@ NULL information_schema ROUTINES SQL_PATH 14 NULL YES varchar 64 192 NULL NULL u
NULL information_schema ROUTINES SECURITY_TYPE 15 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select
NULL information_schema ROUTINES CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema ROUTINES LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select
-NULL information_schema ROUTINES SQL_MODE 18 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema ROUTINES SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema ROUTINES ROUTINE_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema ROUTINES DEFINER 20 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
NULL information_schema ROUTINES CHARACTER_SET_CLIENT 21 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
@@ -11089,7 +10848,7 @@ NULL information_schema TRIGGERS EVENT_OBJECT_SCHEMA 6 NO varchar 64 192 NULL N
NULL information_schema TRIGGERS EVENT_OBJECT_TABLE 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) 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_CONDITION 9 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
-NULL information_schema TRIGGERS ACTION_STATEMENT 10 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema TRIGGERS ACTION_STATEMENT 10 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema TRIGGERS ACTION_ORIENTATION 11 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select
NULL information_schema TRIGGERS ACTION_TIMING 12 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select
NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_TABLE 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
@@ -11097,8 +10856,8 @@ NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_TABLE 14 NULL YES varchar
NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW 15 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema TRIGGERS CREATED 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
-NULL information_schema TRIGGERS SQL_MODE 18 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
-NULL information_schema TRIGGERS DEFINER 19 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema TRIGGERS SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema TRIGGERS DEFINER 19 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema TRIGGERS CHARACTER_SET_CLIENT 20 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema TRIGGERS COLLATION_CONNECTION 21 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema TRIGGERS DATABASE_COLLATION 22 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
@@ -11109,7 +10868,7 @@ NULL information_schema USER_PRIVILEGES IS_GRANTABLE 4 NO varchar 3 9 NULL NULL
NULL information_schema VIEWS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select
NULL information_schema VIEWS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema VIEWS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
-NULL information_schema VIEWS VIEW_DEFINITION 4 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema VIEWS VIEW_DEFINITION 4 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext 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 IS_UPDATABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema VIEWS DEFINER 7 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
@@ -11434,7 +11193,7 @@ NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 1
NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
-NULL information_schema COLUMNS COLUMN_TYPE 15 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema COLUMNS COLUMN_TYPE 15 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema COLUMNS COLUMN_KEY 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema COLUMNS EXTRA 17 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select
NULL information_schema COLUMNS PRIVILEGES 18 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select
@@ -11458,12 +11217,12 @@ NULL information_schema EVENTS EVENT_NAME 3 NO varchar 64 192 NULL NULL utf8 ut
NULL information_schema EVENTS DEFINER 4 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
NULL information_schema EVENTS TIME_ZONE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema EVENTS EVENT_BODY 6 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select
-NULL information_schema EVENTS EVENT_DEFINITION 7 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema EVENTS EVENT_DEFINITION 7 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema EVENTS EVENT_TYPE 8 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select
NULL information_schema EVENTS EXECUTE_AT 9 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS INTERVAL_VALUE 10 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select
NULL information_schema EVENTS INTERVAL_FIELD 11 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select
-NULL information_schema EVENTS SQL_MODE 12 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema EVENTS SQL_MODE 12 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema EVENTS STARTS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS ENDS 14 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS STATUS 15 NO varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select
@@ -11601,7 +11360,7 @@ NULL information_schema ROUTINES SQL_PATH 14 NULL YES varchar 64 192 NULL NULL u
NULL information_schema ROUTINES SECURITY_TYPE 15 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select
NULL information_schema ROUTINES CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema ROUTINES LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select
-NULL information_schema ROUTINES SQL_MODE 18 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema ROUTINES SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema ROUTINES ROUTINE_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema ROUTINES DEFINER 20 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
NULL information_schema ROUTINES CHARACTER_SET_CLIENT 21 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
@@ -11678,7 +11437,7 @@ NULL information_schema TRIGGERS EVENT_OBJECT_SCHEMA 6 NO varchar 64 192 NULL N
NULL information_schema TRIGGERS EVENT_OBJECT_TABLE 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) 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_CONDITION 9 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
-NULL information_schema TRIGGERS ACTION_STATEMENT 10 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema TRIGGERS ACTION_STATEMENT 10 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema TRIGGERS ACTION_ORIENTATION 11 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select
NULL information_schema TRIGGERS ACTION_TIMING 12 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select
NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_TABLE 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
@@ -11686,8 +11445,8 @@ NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_TABLE 14 NULL YES varchar
NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW 15 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema TRIGGERS CREATED 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
-NULL information_schema TRIGGERS SQL_MODE 18 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
-NULL information_schema TRIGGERS DEFINER 19 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema TRIGGERS SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema TRIGGERS DEFINER 19 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema TRIGGERS CHARACTER_SET_CLIENT 20 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema TRIGGERS COLLATION_CONNECTION 21 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema TRIGGERS DATABASE_COLLATION 22 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
@@ -11698,7 +11457,7 @@ NULL information_schema USER_PRIVILEGES IS_GRANTABLE 4 NO varchar 3 9 NULL NULL
NULL information_schema VIEWS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select
NULL information_schema VIEWS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema VIEWS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
-NULL information_schema VIEWS VIEW_DEFINITION 4 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema VIEWS VIEW_DEFINITION 4 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext 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 IS_UPDATABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema VIEWS DEFINER 7 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
@@ -13076,7 +12835,7 @@ SQL_PATH varchar(64) YES NULL
SECURITY_TYPE varchar(7) NO
CREATED datetime NO 0000-00-00 00:00:00
LAST_ALTERED datetime NO 0000-00-00 00:00:00
-SQL_MODE longtext NO
+SQL_MODE longtext NO NULL
ROUTINE_COMMENT varchar(64) NO
DEFINER varchar(77) NO
CHARACTER_SET_CLIENT varchar(32) NO
@@ -13137,7 +12896,7 @@ NULL information_schema routines SQL_PATH 14 NULL YES varchar 64 192 NULL NULL u
NULL information_schema routines SECURITY_TYPE 15 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select
NULL information_schema routines CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema routines LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select
-NULL information_schema routines SQL_MODE 18 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema routines SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema routines ROUTINE_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema routines DEFINER 20 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
NULL information_schema routines CHARACTER_SET_CLIENT 21 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
@@ -13845,15 +13604,15 @@ NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NUL
NULL db_datadict tb2 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL VIEW
-NULL test t1 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
-NULL test t10 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
-NULL test t11 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
-NULL test t2 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
-NULL test t3 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
-NULL test t4 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
-NULL test t7 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
-NULL test t8 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
-NULL test t9 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
+NULL test t1 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2
+NULL test t10 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2
+NULL test t11 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2
+NULL test t2 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2
+NULL test t3 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2
+NULL test t4 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2
+NULL test t7 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2
+NULL test t8 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2
+NULL test t9 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2
NULL test tb1 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
NULL test tb2 BASE TABLE MyISAM 10 Dynamic 54 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
NULL test tb3 BASE TABLE MyISAM 10 Dynamic 11 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
@@ -13894,15 +13653,15 @@ WHERE NOT( table_schema = 'information_schema');
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT
NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
-NULL test t1 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
-NULL test t10 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
-NULL test t11 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
-NULL test t2 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
-NULL test t3 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
-NULL test t4 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
-NULL test t7 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
-NULL test t8 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
-NULL test t9 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
+NULL test t1 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2
+NULL test t10 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2
+NULL test t11 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2
+NULL test t2 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2
+NULL test t3 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2
+NULL test t4 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2
+NULL test t7 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2
+NULL test t8 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2
+NULL test t9 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2
NULL test tb1 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
NULL test tb2 BASE TABLE MyISAM 10 Dynamic 54 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
NULL test tb3 BASE TABLE MyISAM 10 Dynamic 11 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
@@ -13943,15 +13702,15 @@ WHERE NOT( table_schema = 'information_schema');
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT
NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL VIEW
-NULL test t1 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
-NULL test t10 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
-NULL test t11 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
-NULL test t2 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
-NULL test t3 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
-NULL test t4 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
-NULL test t7 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
-NULL test t8 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
-NULL test t9 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
+NULL test t1 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2
+NULL test t10 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2
+NULL test t11 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2
+NULL test t2 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2
+NULL test t3 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2
+NULL test t4 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2
+NULL test t7 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2
+NULL test t8 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2
+NULL test t9 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2
NULL test tb1 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
NULL test tb2 BASE TABLE MyISAM 10 Dynamic 54 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
NULL test tb3 BASE TABLE MyISAM 10 Dynamic 11 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
@@ -13989,7 +13748,7 @@ NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #
NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO#
NULL information_schema VIEWS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO#
SELECT * FROM information_schema.tables
-WHERE NOT( table_schema = 'information_schema');
+WHERE NOT( table_schema = 'information_schema') AND NOT (table_schema = 'mysql' AND table_name LIKE 'help_%');
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT
NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
NULL db_datadict tb2 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
@@ -14001,10 +13760,6 @@ NULL mysql db BASE TABLE MyISAM 10 Fixed 3 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-
NULL mysql event BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Events
NULL mysql func BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL User defined functions
NULL mysql general_log BASE TABLE CSV 10 Dynamic 1 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL General log
-NULL mysql help_category BASE TABLE MyISAM 10 Fixed 37 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help categories
-NULL mysql help_keyword BASE TABLE MyISAM 10 Fixed 424 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help keywords
-NULL mysql help_relation BASE TABLE MyISAM 10 Fixed 901 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL keyword-topic relation
-NULL mysql help_topic BASE TABLE MyISAM 10 Dynamic 479 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help topics
NULL mysql host BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Host privileges; Merged with database privileges
NULL mysql ndb_apply_status BASE TABLE ndbcluster 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
NULL mysql ndb_binlog_index BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
@@ -14019,20 +13774,20 @@ NULL mysql time_zone_leap_second BASE TABLE MyISAM 10 Fixed 22 #ARL# #DL# #MDL#
NULL mysql time_zone_name BASE TABLE MyISAM 10 Fixed 6 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Time zone names
NULL mysql time_zone_transition BASE TABLE MyISAM 10 Fixed 393 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Time zone transitions
NULL mysql time_zone_transition_type BASE TABLE MyISAM 10 Fixed 31 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Time zone transition types
-NULL test t1 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
-NULL test t10 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
-NULL test t11 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
-NULL test t2 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
-NULL test t3 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
-NULL test t4 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
-NULL test t7 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
-NULL test t8 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
-NULL test t9 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
+NULL test t1 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2
+NULL test t10 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2
+NULL test t11 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2
+NULL test t2 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2
+NULL test t3 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2
+NULL test t4 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2
+NULL test t7 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2
+NULL test t8 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2
+NULL test t9 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2
NULL test tb1 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
NULL test tb2 BASE TABLE MyISAM 10 Dynamic 54 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
NULL test tb3 BASE TABLE MyISAM 10 Dynamic 11 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
NULL test tb4 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
-NULL test4 t6 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
+NULL test4 t6 BASE TABLE ndbcluster 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2
DROP USER 'user_1'@'localhost';
DROP USER 'user_2'@'localhost';
DROP USER 'user_3'@'localhost';
@@ -14050,7 +13805,7 @@ Field Type Null Key Default Extra
TABLE_CATALOG varchar(4096) YES NULL
TABLE_SCHEMA varchar(64) NO
TABLE_NAME varchar(64) NO
-VIEW_DEFINITION longtext NO
+VIEW_DEFINITION longtext NO NULL
CHECK_OPTION varchar(8) NO
IS_UPDATABLE varchar(3) NO
DEFINER varchar(77) NO
@@ -14085,7 +13840,7 @@ TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAUL
NULL information_schema views TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select
NULL information_schema views TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema views TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
-NULL information_schema views VIEW_DEFINITION 4 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema views VIEW_DEFINITION 4 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext 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 IS_UPDATABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema views DEFINER 7 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
@@ -14232,7 +13987,8 @@ TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_
root@localhost db_datadict_2
REVOKE SELECT ON db_datadict.tb_6_401402_1 FROM 'user_1'@'localhost';
-SELECT * FROM information_schema.statistics;
+SELECT * FROM information_schema.statistics
+WHERE NOT (table_schema = 'mysql' AND table_name LIKE 'help_%');
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT
NULL db_datadict tb_6_401402_1 0 db_datadict PRIMARY 1 f1 A 0 NULL NULL BTREE
NULL db_datadict tb_6_401402_1 1 db_datadict f2_ind 1 f2 A NULL NULL NULL YES BTREE
@@ -14256,14 +14012,6 @@ NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE
NULL mysql event 0 mysql PRIMARY 1 db A NULL NULL NULL BTREE
NULL mysql event 0 mysql PRIMARY 2 name A 0 NULL NULL BTREE
NULL mysql func 0 mysql PRIMARY 1 name A 0 NULL NULL BTREE
-NULL mysql help_category 0 mysql PRIMARY 1 help_category_id A 37 NULL NULL BTREE
-NULL mysql help_category 0 mysql name 1 name A 37 NULL NULL BTREE
-NULL mysql help_keyword 0 mysql PRIMARY 1 help_keyword_id A 424 NULL NULL BTREE
-NULL mysql help_keyword 0 mysql name 1 name A 424 NULL NULL BTREE
-NULL mysql help_relation 0 mysql PRIMARY 1 help_keyword_id A NULL NULL NULL BTREE
-NULL mysql help_relation 0 mysql PRIMARY 2 help_topic_id A 901 NULL NULL BTREE
-NULL mysql help_topic 0 mysql PRIMARY 1 help_topic_id A 479 NULL NULL BTREE
-NULL mysql help_topic 0 mysql name 1 name A 479 NULL NULL BTREE
NULL mysql host 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE
NULL mysql host 0 mysql PRIMARY 2 Db A 0 NULL NULL BTREE
NULL mysql ndb_apply_status 0 mysql PRIMARY 1 server_id NULL 0 NULL NULL HASH
@@ -14866,7 +14614,7 @@ EVENT_OBJECT_SCHEMA varchar(64) NO
EVENT_OBJECT_TABLE varchar(64) NO
ACTION_ORDER bigint(4) NO 0
ACTION_CONDITION longtext YES NULL
-ACTION_STATEMENT longtext NO
+ACTION_STATEMENT longtext NO NULL
ACTION_ORIENTATION varchar(9) NO
ACTION_TIMING varchar(6) NO
ACTION_REFERENCE_OLD_TABLE varchar(64) YES NULL
@@ -14874,8 +14622,8 @@ ACTION_REFERENCE_NEW_TABLE varchar(64) YES NULL
ACTION_REFERENCE_OLD_ROW varchar(3) NO
ACTION_REFERENCE_NEW_ROW varchar(3) NO
CREATED datetime YES NULL
-SQL_MODE longtext NO
-DEFINER longtext NO
+SQL_MODE longtext NO NULL
+DEFINER longtext NO NULL
CHARACTER_SET_CLIENT varchar(32) NO
COLLATION_CONNECTION varchar(32) NO
DATABASE_COLLATION varchar(32) NO
@@ -14925,7 +14673,7 @@ NULL information_schema triggers EVENT_OBJECT_SCHEMA 6 NO varchar 64 192 NULL N
NULL information_schema triggers EVENT_OBJECT_TABLE 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) 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_CONDITION 9 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
-NULL information_schema triggers ACTION_STATEMENT 10 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema triggers ACTION_STATEMENT 10 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema triggers ACTION_ORIENTATION 11 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select
NULL information_schema triggers ACTION_TIMING 12 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select
NULL information_schema triggers ACTION_REFERENCE_OLD_TABLE 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
@@ -14933,8 +14681,8 @@ NULL information_schema triggers ACTION_REFERENCE_NEW_TABLE 14 NULL YES varchar
NULL information_schema triggers ACTION_REFERENCE_OLD_ROW 15 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema triggers ACTION_REFERENCE_NEW_ROW 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema triggers CREATED 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
-NULL information_schema triggers SQL_MODE 18 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
-NULL information_schema triggers DEFINER 19 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema triggers SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema triggers DEFINER 19 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema triggers CHARACTER_SET_CLIENT 20 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema triggers COLLATION_CONNECTION 21 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema triggers DATABASE_COLLATION 22 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
diff --git a/mysql-test/suite/funcs_1/r/ndb_cursors.result b/mysql-test/suite/funcs_1/r/ndb_cursors.result
index cf65b615add..ac1eb46e974 100644
--- a/mysql-test/suite/funcs_1/r/ndb_cursors.result
+++ b/mysql-test/suite/funcs_1/r/ndb_cursors.result
@@ -75,7 +75,7 @@ Note 1265 Data truncated for column 'f45' at row 1
Note 1265 Data truncated for column 'f47' at row 1
Note 1265 Data truncated for column 'f49' at row 1
Note 1265 Data truncated for column 'f51' at row 1
-Error 1475 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
+Error 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb1.txt' into table tb1 ;
NOT YET IMPLEMENTED: cursor tests
diff --git a/mysql-test/suite/funcs_1/r/ndb_trig_0102.result b/mysql-test/suite/funcs_1/r/ndb_trig_0102.result
index 33deedd4b37..b67b0e2afe0 100644
--- a/mysql-test/suite/funcs_1/r/ndb_trig_0102.result
+++ b/mysql-test/suite/funcs_1/r/ndb_trig_0102.result
@@ -65,7 +65,7 @@ Warnings:
Note 1265 Data truncated for column 'f150' at row 1
Note 1265 Data truncated for column 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1
-Error 1475 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
+Error 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb3.txt' into table tb3 ;
Testcase: 3.5.1.1:
diff --git a/mysql-test/suite/funcs_1/r/ndb_trig_03.result b/mysql-test/suite/funcs_1/r/ndb_trig_03.result
index 35d1e341e8d..fa86acedcb7 100644
--- a/mysql-test/suite/funcs_1/r/ndb_trig_03.result
+++ b/mysql-test/suite/funcs_1/r/ndb_trig_03.result
@@ -65,7 +65,7 @@ Warnings:
Note 1265 Data truncated for column 'f150' at row 1
Note 1265 Data truncated for column 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1
-Error 1475 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
+Error 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb3.txt' into table tb3 ;
Testcase 3.5.3:
diff --git a/mysql-test/suite/funcs_1/r/ndb_trig_03e.result b/mysql-test/suite/funcs_1/r/ndb_trig_03e.result
index 505d2ed9f07..32757a844aa 100644
--- a/mysql-test/suite/funcs_1/r/ndb_trig_03e.result
+++ b/mysql-test/suite/funcs_1/r/ndb_trig_03e.result
@@ -571,10 +571,8 @@ test_yesprivs@localhost
use priv_db;
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
-trg1_1 INSERT t1 set new.f1 = 'trig 1_1-yes' BEFORE NULL test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
select * from information_schema.triggers;
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
-NULL priv_db trg1_1 INSERT NULL priv_db t1 0 NULL set new.f1 = 'trig 1_1-yes' ROW BEFORE NULL NULL OLD NEW NULL test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
drop trigger trg1_1;
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
select current_user;
diff --git a/mysql-test/suite/funcs_1/r/ndb_trig_0407.result b/mysql-test/suite/funcs_1/r/ndb_trig_0407.result
index e0c64f7598b..e21a2b312e4 100644
--- a/mysql-test/suite/funcs_1/r/ndb_trig_0407.result
+++ b/mysql-test/suite/funcs_1/r/ndb_trig_0407.result
@@ -65,7 +65,7 @@ Warnings:
Note 1265 Data truncated for column 'f150' at row 1
Note 1265 Data truncated for column 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1
-Error 1475 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
+Error 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb3.txt' into table tb3 ;
Testcase: 3.5:
diff --git a/mysql-test/suite/funcs_1/r/ndb_trig_08.result b/mysql-test/suite/funcs_1/r/ndb_trig_08.result
index 5b542a1a4c8..63bb50c37eb 100644
--- a/mysql-test/suite/funcs_1/r/ndb_trig_08.result
+++ b/mysql-test/suite/funcs_1/r/ndb_trig_08.result
@@ -65,7 +65,7 @@ Warnings:
Note 1265 Data truncated for column 'f150' at row 1
Note 1265 Data truncated for column 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1
-Error 1475 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
+Error 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb3.txt' into table tb3 ;
Testcase: 3.5:
diff --git a/mysql-test/suite/funcs_1/r/ndb_trig_09.result b/mysql-test/suite/funcs_1/r/ndb_trig_09.result
index 6cb05a1d3ff..623036fa28f 100644
--- a/mysql-test/suite/funcs_1/r/ndb_trig_09.result
+++ b/mysql-test/suite/funcs_1/r/ndb_trig_09.result
@@ -65,7 +65,7 @@ Warnings:
Note 1265 Data truncated for column 'f150' at row 1
Note 1265 Data truncated for column 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1
-Error 1475 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
+Error 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb3.txt' into table tb3 ;
Testcase 3.5.9.1/2:
diff --git a/mysql-test/suite/funcs_1/r/ndb_trig_1011ext.result b/mysql-test/suite/funcs_1/r/ndb_trig_1011ext.result
index 3d9db02a375..4d063ff2acf 100644
--- a/mysql-test/suite/funcs_1/r/ndb_trig_1011ext.result
+++ b/mysql-test/suite/funcs_1/r/ndb_trig_1011ext.result
@@ -65,7 +65,7 @@ Warnings:
Note 1265 Data truncated for column 'f150' at row 1
Note 1265 Data truncated for column 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1
-Error 1475 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
+Error 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb3.txt' into table tb3 ;
Testcase 3.5.10.1/2/3:
diff --git a/mysql-test/suite/funcs_1/r/ndb_views.result b/mysql-test/suite/funcs_1/r/ndb_views.result
index 73efd3309f9..1f8b00a695b 100644
--- a/mysql-test/suite/funcs_1/r/ndb_views.result
+++ b/mysql-test/suite/funcs_1/r/ndb_views.result
@@ -169,6 +169,58 @@ insert into tb2 (f59,f60,f61) values (109,108,104);
INSERT INTO tb2 (f59,f60) VALUES( 299,899 );
INSERT INTO tb2 (f59,f60) VALUES( 242,79 );
INSERT INTO tb2 (f59,f60) VALUES( 424,89 );
+SELECT * FROM tb2 ORDER BY f59, f60, f61;
+f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109
+1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set
+2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set
+3 3 0000000003 0000000000000000000000000000000000000000000000000000000000000003 0000000003 0000000000000000000000000000000000000000000000000000000000000003 -3 2.200000000000000000000000000000 3 2.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494348e-38 1.17549e-38 1.175494354e-38 01.17549e-38 00000001.175494354e-38 01.17549e-38 00000001.175494354e-38 1000-01-03 838:59:56 1970-01-04 00:00:03 1970-01-04 00:00:03 1904 1904 1904 2enum 1set
+4 4 0000000004 0000000000000000000000000000000000000000000000000000000000000004 0000000004 0000000000000000000000000000000000000000000000000000000000000004 -2 3.300000000000000000000000000000 4 3.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494347e-38 1.17549e-38 1.175494355e-38 01.17549e-38 00000001.175494355e-38 01.17549e-38 00000001.175494355e-38 1000-01-04 838:59:55 1970-01-05 00:00:04 1970-01-05 00:00:04 1905 1905 1905 1enum 2set
+4 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+5 5 0000000005 0000000000000000000000000000000000000000000000000000000000000005 0000000005 0000000000000000000000000000000000000000000000000000000000000005 -1 4.400000000000000000000000000000 5 4.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494346e-38 1.17549e-38 1.175494356e-38 01.17549e-38 00000001.175494356e-38 01.17549e-38 00000001.175494356e-38 1000-01-05 838:59:54 1970-01-06 00:00:05 1970-01-06 00:00:05 1906 1906 1906 2enum 1set,2set
+6 6 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0 5.500000000000000000000000000000 6 5.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494345e-38 1.17549e-38 1.175494357e-38 01.17549e-38 00000001.175494357e-38 01.17549e-38 00000001.175494357e-38 1000-01-06 838:59:53 1970-01-07 00:00:06 1970-01-07 00:00:06 1907 1907 1907 1enum 1set
+7 7 0000000007 0000000000000000000000000000000000000000000000000000000000000007 0000000007 0000000000000000000000000000000000000000000000000000000000000007 1 6.600000000000000000000000000000 7 6.600000000000000000000000000000 0000000007 000000000000000000000000000000006.600000000000000000000000000000 0000000007 000000000000000000000000000000006.600000000000000000000000000000 -1.175494344e-38 1.175494358e-38 00000001.175494358e-38 00000001.175494358e-38 -1.175494344e-38 1.175494358e-38 00000001.175494358e-38 00000001.175494358e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494344e-38 1.17549e-38 1.175494358e-38 01.17549e-38 00000001.175494358e-38 01.17549e-38 00000001.175494358e-38 1000-01-07 838:59:52 1970-01-08 00:00:07 1970-01-08 00:00:07 1908 1908 1908 2enum 2set
+8 8 0000000008 0000000000000000000000000000000000000000000000000000000000000008 0000000008 0000000000000000000000000000000000000000000000000000000000000008 2 7.700000000000000000000000000000 8 7.700000000000000000000000000000 0000000008 000000000000000000000000000000007.700000000000000000000000000000 0000000008 000000000000000000000000000000007.700000000000000000000000000000 -1.175494343e-38 1.175494359e-38 00000001.175494359e-38 00000001.175494359e-38 -1.175494343e-38 1.175494359e-38 00000001.175494359e-38 00000001.175494359e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494343e-38 1.17549e-38 1.175494359e-38 01.17549e-38 00000001.175494359e-38 01.17549e-38 00000001.175494359e-38 1000-01-08 838:59:51 1970-01-09 00:00:08 1970-01-09 00:00:08 1909 1909 1909 1enum 1set,2set
+9 9 0000000009 0000000000000000000000000000000000000000000000000000000000000009 0000000009 0000000000000000000000000000000000000000000000000000000000000009 3 8.800000000000000000000000000000 9 8.800000000000000000000000000000 0000000009 000000000000000000000000000000008.800000000000000000000000000000 0000000009 000000000000000000000000000000008.800000000000000000000000000000 -1.175494342e-38 1.17549436e-38 000000001.17549436e-38 000000001.17549436e-38 -1.175494342e-38 1.17549436e-38 000000001.17549436e-38 000000001.17549436e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494342e-38 1.17549e-38 1.17549436e-38 01.17549e-38 000000001.17549436e-38 01.17549e-38 000000001.17549436e-38 1000-01-09 838:59:50 1970-01-10 00:00:09 1970-01-10 00:00:09 1910 1910 1910 2enum 1set
+10 10 0000000010 0000000000000000000000000000000000000000000000000000000000000010 0000000010 0000000000000000000000000000000000000000000000000000000000000010 4 9.900000000000000000000000000000 10 9.900000000000000000000000000000 0000000010 000000000000000000000000000000009.900000000000000000000000000000 0000000010 000000000000000000000000000000009.900000000000000000000000000000 -1.175494341e-38 1.175494361e-38 00000001.175494361e-38 00000001.175494361e-38 -1.175494341e-38 1.175494361e-38 00000001.175494361e-38 00000001.175494361e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494341e-38 1.17549e-38 1.175494361e-38 01.17549e-38 00000001.175494361e-38 01.17549e-38 00000001.175494361e-38 1000-01-10 838:59:49 1970-01-11 00:00:10 1970-01-11 00:00:10 1911 1911 1911 1enum 2set
+15 87 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+17 15 0000000016 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+19 18 0000000014 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+22 93 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+24 51654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+27 25 0000000026 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+29 28 0000000024 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+34 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+94 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+107 105 0000000106 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+107 105 0000000106 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+109 108 0000000104 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+109 108 0000000104 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+195 87 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+207 205 0000000206 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+209 208 0000000204 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+242 79 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+250 87895654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+292 93 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+299 899 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+321 NULL 0000000765 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+323 14376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+340 9984376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+394 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+424 89 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+441 16546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+660 876546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+987 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+2550 775654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+2760 985654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+3330 764376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+3410 996546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+7876 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+9112 NULL 0000008771 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+76710 226546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+569300 9114376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
Use test;
Testcase 3.3.1.1
@@ -203,27 +255,27 @@ f59 f60 f61
8 8 0000000008
9 9 0000000009
CREATE or REPLACE VIEW v1 AS select f59,f60,f61
-FROM test.tb2 limit 4,3;
-select * FROM v1 order by f59,f60,f61 limit 0,10;
+FROM test.tb2;
+select * FROM v1 order by f59,f60,f61 limit 4,3;
f59 f60 f61
-10 10 0000000010
-19 18 0000000014
-24 51654 NULL
+4 74 NULL
+5 5 0000000005
+6 6 0000000006
CREATE or REPLACE VIEW v1 AS select distinct f59
-FROM test.tb2 limit 4,3;
-select * FROM v1 order by f59 limit 0,10;
+FROM test.tb2;
+select * FROM v1 order by f59 limit 4,3;
f59
-15
-107
-209
+5
+6
+7
ALTER VIEW v1 AS select f59
-FROM test.tb2 limit 6,2;
-select * FROM v1 order by f59 limit 0,10;
+FROM test.tb2;
+select * FROM v1 order by f59 limit 6,2;
f59
-10
-34
+6
+7
CREATE or REPLACE VIEW v1 AS select f59
-from tb2 order by f59 limit 100;
+from tb2 order by f59;
select * FROM v1 order by f59 limit 0,10;
f59
1
@@ -237,7 +289,7 @@ f59
8
9
CREATE or REPLACE VIEW v1 AS select f59
-from tb2 order by f59 asc limit 100;
+from tb2 order by f59 asc;
select * FROM v1 limit 0,10;
f59
1
@@ -251,7 +303,7 @@ f59
8
9
CREATE or REPLACE VIEW v1 AS select f59
-from tb2 order by f59 desc limit 100;
+from tb2 order by f59 desc;
select * FROM v1 limit 0,10;
f59
569300
@@ -265,7 +317,7 @@ f59
987
660
CREATE or REPLACE VIEW v1 AS select f59
-from tb2 group by f59 limit 100;
+from tb2 group by f59;
select * FROM v1 order by f59 limit 0,10;
f59
1
@@ -279,7 +331,7 @@ f59
9
10
CREATE or REPLACE VIEW v1 AS select f59
-from tb2 group by f59 asc limit 100;
+from tb2 group by f59 asc;
select * FROM v1 order by f59 limit 0,10;
f59
1
@@ -293,7 +345,7 @@ f59
9
10
CREATE or REPLACE VIEW v1 AS select f59
-from tb2 group by f59 desc limit 100;
+from tb2 group by f59 desc;
select * FROM v1 order by f59 limit 0,10;
f59
1
@@ -307,7 +359,7 @@ f59
9
10
CREATE or REPLACE VIEW v1 AS (select f59 from tb2)
-union (select f59 from t1) limit 100;
+union (select f59 from t1);
select * FROM v1 order by f59 limit 0,10;
f59
1
@@ -495,8 +547,8 @@ DROP VIEW v1;
Testcase 3.3.1.3 + 3.1.1.4
--------------------------------------------------------------------------------
DROP VIEW IF EXISTS v1 ;
-CREATE VIEW v1 or REPLACE AS Select * from tb2 my_table limit 50;
-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 'or REPLACE AS Select * from tb2 my_table limit 50' at line 1
+CREATE VIEW v1 or REPLACE AS Select * from tb2 my_table;
+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 'or REPLACE AS Select * from tb2 my_table' at line 1
CREATE VIEW v1 WITH CASCADED CHECK OPTION AS Select *
from tb2 my_table limit 50;
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 'WITH CASCADED CHECK OPTION AS Select *
@@ -505,8 +557,8 @@ CREATE VIEW v1 WITH LOCAL CHECK OPTION AS Select *
from tb2 my_table limit 50;
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 'WITH LOCAL CHECK OPTION AS Select *
from tb2 my_table limit 50' at line 1
-SELECT * FROM tb2 my_table CREATE VIEW As v1 limit 100 ;
-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 'CREATE VIEW As v1 limit 100' at line 1
+SELECT * FROM tb2 my_table CREATE VIEW As v1;
+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 'CREATE VIEW As v1' at line 1
CREATE or REPLACE VIEW v1 Select f59, f60
from test.tb2 my_table where f59 = 250 ;
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 'Select f59, f60
@@ -581,8 +633,8 @@ Union ALL (Select from f1 t1);
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 'from f59 tb2)
Union ALL (Select from f1 t1)' at line 1
CREATE or REPLACE view v1 as Select f59, f60
-from tb2 by order f59 limit 100 ;
-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 'by order f59 limit 100' at line 2
+from tb2 by order f59;
+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 'by order f59' at line 2
CREATE or REPLACE view v1 as Select f59, f60
from tb2 by group f59 ;
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 'by group f59' at line 2
@@ -590,12 +642,12 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
Testcase 3.3.1.5
--------------------------------------------------------------------------------
DROP VIEW IF EXISTS v1 ;
-CREATE VIEW v1 SELECT * FROM tb2 limit 100 ;
-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 'SELECT * FROM tb2 limit 100' at line 1
-CREATE v1 AS SELECT * FROM tb2 limit 100 ;
-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 'v1 AS SELECT * FROM tb2 limit 100' at line 1
-VIEW v1 AS SELECT * FROM tb2 limit 100 ;
-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 'VIEW v1 AS SELECT * FROM tb2 limit 100' at line 1
+CREATE VIEW v1 SELECT * FROM tb2;
+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 'SELECT * FROM tb2' at line 1
+CREATE v1 AS SELECT * FROM tb2;
+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 'v1 AS SELECT * FROM tb2' at line 1
+VIEW v1 AS SELECT * FROM tb2;
+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 'VIEW v1 AS SELECT * FROM tb2' at line 1
CREATE VIEW v1 AS SELECT 1;
DROP VIEW v1;
VIEW v1 AS SELECT 1;
@@ -613,45 +665,43 @@ Testcase 3.3.1.6
--------------------------------------------------------------------------------
DROP VIEW IF EXISTS v1 ;
CREATE or REPLACE VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
CREATE or REPLACE ALGORITHM = UNDEFINED VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
CREATE or REPLACE ALGORITHM = MERGE VIEW v1
-as SELECT * from tb2 limit 100 ;
-Warnings:
-Warning 1354 View merge algorithm can't be used here for now (assumed undefined algorithm)
+as SELECT * from tb2;
CREATE or REPLACE ALGORITHM = TEMPTABLE VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
CREATE or REPLACE ALGORITHM = TEMPTABLE VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
CREATE or REPLACE = TEMPTABLE VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
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 '= TEMPTABLE VIEW v1
-as SELECT * from tb2 limit 100' at line 1
+as SELECT * from tb2' at line 1
CREATE or REPLACE ALGORITHM TEMPTABLE VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
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 'TEMPTABLE VIEW v1
-as SELECT * from tb2 limit 100' at line 1
+as SELECT * from tb2' at line 1
CREATE or REPLACE ALGORITHM = VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
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 'VIEW v1
-as SELECT * from tb2 limit 100' at line 1
+as SELECT * from tb2' at line 1
CREATE or REPLACE TEMPTABLE = ALGORITHM VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
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 'TEMPTABLE = ALGORITHM VIEW v1
-as SELECT * from tb2 limit 100' at line 1
+as SELECT * from tb2' at line 1
CREATE or REPLACE TEMPTABLE - ALGORITHM VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
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 'TEMPTABLE - ALGORITHM VIEW v1
-as SELECT * from tb2 limit 100' at line 1
+as SELECT * from tb2' at line 1
CREATE or REPLACE GARBAGE = TEMPTABLE VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
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 'GARBAGE = TEMPTABLE VIEW v1
-as SELECT * from tb2 limit 100' at line 1
+as SELECT * from tb2' at line 1
CREATE or REPLACE ALGORITHM = GARBAGE VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
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 'GARBAGE VIEW v1
-as SELECT * from tb2 limit 100' at line 1
+as SELECT * from tb2' at line 1
Drop view if exists v1 ;
CREATE or REPLACE VIEW v1
AS SELECT * from tb2 where f59 < 1;
@@ -677,7 +727,7 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
Testcase 3.3.1.7
--------------------------------------------------------------------------------
DROP VIEW IF EXISTS v1 ;
-Create view test.v1 AS Select * from test.tb2 limit 100 ;
+Create view test.v1 AS Select * from test.tb2;
Alter view test.v1 AS Select F59 from test. tb2 limit 100 ;
Drop view test.v1 ;
Create view v1 AS Select * from test.tb2 limit 100 ;
@@ -884,24 +934,21 @@ SELECT * FROM test.v1 order by f59,f60,f61,f62,f63,f64,f65;
f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109
1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set
2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set
-CREATE OR REPLACE VIEW test.v1 AS SELECT F59 FROM tb2 limit 10,100;
+CREATE OR REPLACE VIEW test.v1 AS SELECT F59 FROM tb2;
SHOW CREATE VIEW test.v1;
View Create View character_set_client collation_connection
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `tb2`.`f59` AS `F59` from `tb2` limit 10,100 latin1 latin1_swedish_ci
-SELECT * FROM test.v1 order by F59;
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `tb2`.`f59` AS `F59` from `tb2` latin1 latin1_swedish_ci
+SELECT * FROM test.v1 order by F59 limit 10,100;
F59
-1
-2
-4
-4
-6
-7
-8
-9
+10
15
+17
+19
22
+24
27
29
+34
94
107
107
@@ -922,11 +969,14 @@ F59
441
500
500
+500
+660
987
2550
2760
3330
3410
+7876
9112
76710
569300
@@ -943,11 +993,11 @@ ERROR HY000: 'test.tb2' is not VIEW
Testcase 3.3.1.15
--------------------------------------------------------------------------------
Drop table if exists test.v1 ;
-CREATE OR REPLACE view test.v1 as select * from tb2 LIMIT 2;
-SELECT * FROM test.v1;
+CREATE OR REPLACE view test.v1 as select * from tb2;
+SELECT * FROM test.v1 ORDER BY f59,f60,f61 LIMIT 2;
f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109
-340 9984376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set
+2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set
Drop view test.v1 ;
Testcase 3.3.1.16 + 3.3.1.17
@@ -1080,27 +1130,27 @@ ERROR HY000: View's SELECT and view's field list have different column counts
Testcase 3.3.1.21
--------------------------------------------------------------------------------
DROP VIEW IF EXISTS v1;
-CREATE VIEW test.v1( F59, F60 ) AS SELECT F59, F60 From tb2 LIMIT 2;
-SELECT * FROM test.v1 order by F59, F60 desc;
+CREATE VIEW test.v1( F59, F60 ) AS SELECT F59, F60 From tb2;
+SELECT * FROM test.v1 order by F59, F60 desc LIMIT 2;
F59 F60
1 1
-340 9984376
+2 2
Drop view if exists test.v1 ;
Testcase 3.3.1.22
--------------------------------------------------------------------------------
DROP VIEW IF EXISTS v1;
-CREATE VIEW test.v1( product ) AS SELECT f59*f60 From tb2 LIMIT 2;
-SELECT * FROM test.v1;
+CREATE VIEW test.v1( product ) AS SELECT f59*f60 From tb2;
+SELECT * FROM test.v1 WHERE product IS NOT NULL ORDER BY product LIMIT 2;
product
-9
-25
+1
+4
CREATE OR REPLACE VIEW test.v1( product ) AS SELECT 1*2;
-SELECT * FROM test.v1;
+SELECT * FROM test.v1 LIMIT 2;
product
2
CREATE OR REPLACE VIEW test.v1( product ) AS SELECT USER();
-SELECT * FROM test.v1;
+SELECT * FROM test.v1 LIMIT 2;
product
root@localhost
Drop view if exists test.v1 ;
@@ -1177,23 +1227,23 @@ DROP TEMPORARY TABLE t2;
Testcase 3.3.1.26
--------------------------------------------------------------------------------
DROP VIEW IF EXISTS v1;
-Create view test.v1 AS Select * from test.tb2 limit 2 ;
-Select * from test.v1;
+Create view test.v1 AS Select * from test.tb2;
+Select * from test.v1 order by f59, f60, f61 limit 2;
f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109
-340 9984376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set
+2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set
Drop view test.v1 ;
Testcase 3.3.1.27
--------------------------------------------------------------------------------
DROP VIEW IF EXISTS test.v1;
Drop VIEW IF EXISTS test.v1_1 ;
-Create view test.v1 AS Select * from test.tb2 limit 2 ;
+Create view test.v1 AS Select * from test.tb2;
Create view test.v1_1 AS Select F59 from test.v1 ;
-Select * from test.v1_1 order by F59 limit 20 ;
+Select * from test.v1_1 order by F59 limit 2;
F59
1
-340
+2
Drop view test.v1 ;
Drop view test.v1_1 ;
@@ -1737,29 +1787,29 @@ Drop view if exists test.v1 ;
Drop view if exists test.v1_main;
Drop view if exists test1.v1_1 ;
Drop database if exists test3 ;
-Create view test.v1 as Select f59, f60 FROM test.tb2 limit 20 ;
-Select * from test.v1 order by f59,f60;
+Create view test.v1 as Select f59, f60 FROM test.tb2;
+Select * from test.v1 order by f59,f60 limit 20;
f59 f60
+1 1
2 2
3 3
+4 4
+4 74
5 5
6 6
+7 7
+8 8
9 9
10 10
+15 87
17 15
19 18
+22 93
24 51654
+27 25
+29 28
34 41
-107 105
-323 14376
-441 16546
-500 NULL
-500 NULL
-660 876546
-2550 775654
-3330 764376
-3410 996546
-7876 74
+94 74
Create table test1.t1 (f59 int,f60 int) ;
Insert into test1.t1 values (199,507) ;
Create view test1.v1_1 as Select f59,f60 from test1.t1 ;
@@ -9649,8 +9699,8 @@ WHERE v3_to_v1_options LIKE ' %' AND errno <> 0
ORDER BY v3_to_v1_options;
v3_to_v1_options statement v3_to_v1_violation errno
SELECT * FROM t1_results
-WHERE v3_to_v1_options LIKE 'WITH %'
-AND v3_to_v1_violation LIKE 'v3_%' AND errno = 0
+WHERE v3_to_v1_options LIKE 'WITH %'
+ AND v3_to_v1_violation LIKE 'v3_%' AND errno = 0
ORDER BY v3_to_v1_options;
v3_to_v1_options statement v3_to_v1_violation errno
SELECT * FROM t1_results
@@ -9670,17 +9720,17 @@ DROP TABLE t1_results;
Testcase 3.3.1.50 - 3.3.1.53
--------------------------------------------------------------------------------
DROP VIEW IF EXISTS test.v1;
-CREATE VIEW test.v1 AS SELECT * FROM test.tb2 limit 5 ;
-SELECT * FROM test.v1 order by f59 ;
+CREATE VIEW test.v1 AS SELECT * FROM test.tb2;
+SELECT * FROM test.v1 order by f59 limit 5;
f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109
1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set
-8 8 0000000008 0000000000000000000000000000000000000000000000000000000000000008 0000000008 0000000000000000000000000000000000000000000000000000000000000008 2 7.700000000000000000000000000000 8 7.700000000000000000000000000000 0000000008 000000000000000000000000000000007.700000000000000000000000000000 0000000008 000000000000000000000000000000007.700000000000000000000000000000 -1.175494343e-38 1.175494359e-38 00000001.175494359e-38 00000001.175494359e-38 -1.175494343e-38 1.175494359e-38 00000001.175494359e-38 00000001.175494359e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494343e-38 1.17549e-38 1.175494359e-38 01.17549e-38 00000001.175494359e-38 01.17549e-38 00000001.175494359e-38 1000-01-08 838:59:51 1970-01-09 00:00:08 1970-01-09 00:00:08 1909 1909 1909 1enum 1set,2set
-15 87 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
-340 9984376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
-2760 985654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
+2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set
+3 3 0000000003 0000000000000000000000000000000000000000000000000000000000000003 0000000003 0000000000000000000000000000000000000000000000000000000000000003 -3 2.200000000000000000000000000000 3 2.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494348e-38 1.17549e-38 1.175494354e-38 01.17549e-38 00000001.175494354e-38 01.17549e-38 00000001.175494354e-38 1000-01-03 838:59:56 1970-01-04 00:00:03 1970-01-04 00:00:03 1904 1904 1904 2enum 1set
+5 5 0000000005 0000000000000000000000000000000000000000000000000000000000000005 0000000005 0000000000000000000000000000000000000000000000000000000000000005 -1 4.400000000000000000000000000000 5 4.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494346e-38 1.17549e-38 1.175494356e-38 01.17549e-38 00000001.175494356e-38 01.17549e-38 00000001.175494356e-38 1000-01-05 838:59:54 1970-01-06 00:00:05 1970-01-06 00:00:05 1906 1906 1906 2enum 1set,2set
+6 6 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0 5.500000000000000000000000000000 6 5.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494345e-38 1.17549e-38 1.175494357e-38 01.17549e-38 00000001.175494357e-38 01.17549e-38 00000001.175494357e-38 1000-01-06 838:59:53 1970-01-07 00:00:06 1970-01-07 00:00:06 1907 1907 1907 1enum 1set
drop view test.v1 ;
-CREATE VIEW test.v1 AS SELECT F59,F61 FROM test.tb2 limit 50 ;
-SELECT * FROM test.v1 order by F59, F61 ;
+CREATE VIEW test.v1 AS SELECT F59,F61 FROM test.tb2;
+SELECT * FROM test.v1 order by F59, F61 limit 50;
F59 F61
1 0000000001
2 0000000002
@@ -9733,8 +9783,8 @@ F59 F61
76710 NULL
569300 NULL
drop view test.v1 ;
-CREATE VIEW test.v1 AS SELECT * FROM test.tb2 order by f59, f60, f61 limit 20 ;
-SELECT * FROM test.v1 order by f59,f60,f61 ;
+CREATE VIEW test.v1 AS SELECT * FROM test.tb2 order by f59, f60, f61;
+SELECT * FROM test.v1 order by f59,f60,f61 limit 20;
f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109
1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set
2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set
@@ -9757,29 +9807,29 @@ f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78
100 4 0000000004 0000000000000000000000000000000000000000000000000000000000000004 0000000004 0000000000000000000000000000000000000000000000000000000000000004 -2 3.300000000000000000000000000000 4 3.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494347e-38 1.17549e-38 1.175494355e-38 01.17549e-38 00000001.175494355e-38 01.17549e-38 00000001.175494355e-38 1000-01-04 838:59:55 1970-01-05 00:00:04 1970-01-05 00:00:04 1905 1905 1905 1enum 2set
100 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set
drop view test.v1 ;
-CREATE VIEW test.v1 AS SELECT F59,f61 FROM test.tb2 limit 20 ;
-SELECT * FROM test.v1 order by f59,f61 desc limit 50;
+CREATE VIEW test.v1 AS SELECT F59,f61 FROM test.tb2;
+SELECT * FROM test.v1 order by f59,f61 desc limit 20;
F59 f61
+1 0000000001
2 0000000002
3 0000000003
5 0000000005
6 0000000006
+7 0000000007
+8 0000000008
9 0000000009
10 0000000010
+15 NULL
17 0000000016
19 0000000014
+22 NULL
24 NULL
+27 0000000026
+29 0000000024
34 NULL
-107 0000000106
-323 NULL
-441 NULL
-500 0000000900
-500 0000000900
-660 NULL
-2550 NULL
-3330 NULL
-3410 NULL
-7876 NULL
+94 NULL
+100 0000000004
+100 NULL
drop view test.v1 ;
Testcase 3.3.1.54
@@ -9836,16 +9886,23 @@ f2
two
SET sql_mode = 'traditional,ansi';
CREATE OR REPLACE VIEW v1 AS
+SELECT f3 AS "pure column f3:", f1 + f3 AS "sum of columns f1 + f3 =",
+3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1):",
+'->' || CAST(f3 AS CHAR) || '<-'
+ AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR):"
+FROM t1 WHERE f1 = 2;
+CREATE OR REPLACE VIEW v1 AS
SELECT f3 AS "pure column f3: ", f1 + f3 AS "sum of columns f1 + f3 = ",
3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1): ",
'->' || CAST(f3 AS CHAR) || '<-'
AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): "
FROM t1 WHERE f1 = 2;
+ERROR 42000: Incorrect column name 'pure column f3: '
SELECT * FROM v1;
-pure column f3: 2.20000
-sum of columns f1 + f3 = 4.20000
-product of constants 3 * (- 0.11111E+1): -3.3333
-expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): ->2.20000<-
+pure column f3: 2.20000
+sum of columns f1 + f3 = 4.20000
+product of constants 3 * (- 0.11111E+1): -3.3333
+expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): ->2.20000<-
SET sql_mode = '';
Testcases 3.3.1.55 - 3.3.1.62
@@ -10412,9 +10469,9 @@ FIXME Is this a bug ?
EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
CAST(f2 AS CHAR) AS f2 FROM test1.v28;
DROP VIEW IF EXISTS test1.v28;
-CREATE OR REPLACE VIEW test1.v0 AS
+CREATE OR REPLACE VIEW test1.v0 AS
SELECT f1 as f2, f2 as f1 FROM test2.t1;
-CREATE OR REPLACE VIEW test2.v0 AS
+CREATE OR REPLACE VIEW test2.v0 AS
SELECT CAST('0001-01-01' AS DATE) as f1, f2 FROM test3.t1;
SHOW CREATE VIEW test1.v27;
SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
@@ -10873,7 +10930,7 @@ SET @variant5= 'CREATE VIEW v1 AS SELECT f61 FROM t1 HAVING f61 > 0';
SET @variant6= 'CREATE VIEW v1 AS SELECT (SELECT f60 FROM t2 WHERE f59=19) AS f61 FROM t1';
SET @variant7= 'CREATE VIEW v1 AS SELECT f61 FROM v2';
-Some server responses suffer from
+Some server responses suffer from
Bug#10773 Incorrect message is displayed while updating a view
--------------------------------------------------------------------------------
SET @variant8= 'CREATE VIEW v1 AS SELECT f59 AS f61 FROM t1 WHERE f60 IN (SELECT f59 FROM t1)';
@@ -10882,7 +10939,7 @@ CREATE ALGORITHM = TEMPTABLE VIEW v1 (f61) AS select f60 from t1;
INSERT INTO v1 VALUES (1002);
ERROR HY000: The target table v1 of the INSERT is not insertable-into
UPDATE v1 SET f61=1007;
-Got one of the listed errors
+ERROR HY000: The target table v1 of the UPDATE is not updatable
DELETE FROM v1;
ERROR HY000: The target table v1 of the DELETE is not updatable
DROP VIEW v1;
@@ -10890,7 +10947,7 @@ CREATE VIEW v1 AS SELECT f59 AS f61 FROM t1 WHERE f60 IN (SELECT f59 FROM t1);
INSERT INTO v1 VALUES (1002);
ERROR HY000: The target table v1 of the INSERT is not insertable-into
UPDATE v1 SET f61=1007;
-Got one of the listed errors
+ERROR HY000: The target table v1 of the UPDATE is not updatable
DELETE FROM v1;
ERROR HY000: The target table v1 of the DELETE is not updatable
DROP VIEW v1;
@@ -10898,7 +10955,7 @@ CREATE VIEW v1 AS SELECT f61 FROM v2;
INSERT INTO v1 VALUES (1002);
ERROR HY000: The target table v1 of the INSERT is not insertable-into
UPDATE v1 SET f61=1007;
-Got one of the listed errors
+ERROR HY000: The target table v1 of the UPDATE is not updatable
DELETE FROM v1;
ERROR HY000: The target table v1 of the DELETE is not updatable
DROP VIEW v1;
@@ -10906,7 +10963,7 @@ CREATE VIEW v1 AS SELECT (SELECT f60 FROM t2 WHERE f59=19) AS f61 FROM t1;
INSERT INTO v1 VALUES (1002);
ERROR HY000: The target table v1 of the INSERT is not insertable-into
UPDATE v1 SET f61=1007;
-Got one of the listed errors
+ERROR HY000: The target table v1 of the UPDATE is not updatable
DELETE FROM v1;
ERROR HY000: The target table v1 of the DELETE is not updatable
DROP VIEW v1;
@@ -10914,7 +10971,7 @@ CREATE VIEW v1 AS SELECT f61 FROM t1 HAVING f61 > 0;
INSERT INTO v1 VALUES (1002);
ERROR HY000: The target table v1 of the INSERT is not insertable-into
UPDATE v1 SET f61=1007;
-Got one of the listed errors
+ERROR HY000: The target table v1 of the UPDATE is not updatable
DELETE FROM v1;
ERROR HY000: The target table v1 of the DELETE is not updatable
DROP VIEW v1;
@@ -10922,7 +10979,7 @@ CREATE VIEW v1 AS SELECT f61 FROM t1 GROUP BY f61;
INSERT INTO v1 VALUES (1002);
ERROR HY000: The target table v1 of the INSERT is not insertable-into
UPDATE v1 SET f61=1007;
-Got one of the listed errors
+ERROR HY000: The target table v1 of the UPDATE is not updatable
DELETE FROM v1;
ERROR HY000: The target table v1 of the DELETE is not updatable
DROP VIEW v1;
@@ -10930,7 +10987,7 @@ CREATE VIEW v1 AS SELECT SUM(f59) AS f61 FROM t1;
INSERT INTO v1 VALUES (1002);
ERROR HY000: The target table v1 of the INSERT is not insertable-into
UPDATE v1 SET f61=1007;
-Got one of the listed errors
+ERROR HY000: The target table v1 of the UPDATE is not updatable
DELETE FROM v1;
ERROR HY000: The target table v1 of the DELETE is not updatable
DROP VIEW v1;
@@ -10938,7 +10995,7 @@ CREATE VIEW v1 AS SELECT DISTINCTROW(f61) FROM t1;
INSERT INTO v1 VALUES (1002);
ERROR HY000: The target table v1 of the INSERT is not insertable-into
UPDATE v1 SET f61=1007;
-Got one of the listed errors
+ERROR HY000: The target table v1 of the UPDATE is not updatable
DELETE FROM v1;
ERROR HY000: The target table v1 of the DELETE is not updatable
DROP VIEW v1;
@@ -10946,7 +11003,7 @@ CREATE VIEW v1 AS SELECT DISTINCT(f61) FROM t1;
INSERT INTO v1 VALUES (1002);
ERROR HY000: The target table v1 of the INSERT is not insertable-into
UPDATE v1 SET f61=1007;
-Got one of the listed errors
+ERROR HY000: The target table v1 of the UPDATE is not updatable
DELETE FROM v1;
ERROR HY000: The target table v1 of the DELETE is not updatable
DROP VIEW v1;
@@ -11115,9 +11172,9 @@ f1 f2 f4 report
4 NULL <------ 20 --------> t1 4
4 NULL <------ 20 --------> v1 4
ALTER TABLE t1 CHANGE COLUMN f1 f1 VARCHAR(30);
-INSERT INTO t1 SET f1 = '<------------- 30 ----------->',
+INSERT INTO t1 SET f1 = '<------------- 30 ----------->',
f4 = '<------ 20 -------->', report = 't1 5';
-INSERT INTO v1 SET f1 = '<------------- 30 ----------->',
+INSERT INTO v1 SET f1 = '<------------- 30 ----------->',
f4 = '<------ 20 -------->', report = 'v1 5';
DESCRIBE t1;
Field Type Null Key Default Extra
diff --git a/mysql-test/suite/funcs_1/t/disabled.def b/mysql-test/suite/funcs_1/t/disabled.def
index 6833178a353..47d50365968 100644
--- a/mysql-test/suite/funcs_1/t/disabled.def
+++ b/mysql-test/suite/funcs_1/t/disabled.def
@@ -13,3 +13,4 @@
innodb_storedproc: (changes of WL#2984, using storeproc_nn instead)
memory_storedproc: (changes of WL#2984, using storeproc_nn instead)
myisam_storedproc: (changes of WL#2984, using storeproc_nn instead)
+ndb__datadict: 2007-10-08 mleich Bug#31421 funcs_1: ndb__datadict fails, discrepancy between scripts and expected results
diff --git a/mysql-test/suite/funcs_1/views/views_master.inc b/mysql-test/suite/funcs_1/views/views_master.inc
index cb71fd7f790..6f07d4f38b3 100644
--- a/mysql-test/suite/funcs_1/views/views_master.inc
+++ b/mysql-test/suite/funcs_1/views/views_master.inc
@@ -1,4 +1,9 @@
#### suite/funcs_1/views/views_master.test
+#
+# Last Change:
+# 2007-10-05 mleich
+# 1. Fix for Bug#31237 Test "ndb_views" fails because of differing order ...
+# 2. Cleanup of test
let $message= ! Attention: The file with the expected results is not
| thoroughly checked.
@@ -13,7 +18,7 @@ let $message= ! Attention: The file with the expected results is not
# If this bug is fixed, please
# 1. set the following variable to 0
# 2. check, if the test passes
-# 3. remove the workarounds
+# 3. remove the workarounds
let $have_bug_11589= 1;
if ($have_bug_11589)
{
@@ -42,7 +47,7 @@ Bug#10713: mysqldump includes database in create view and referenced tables;
# MySQL has also added some vendor-specific enhancements to the standard
# SQL requirements.
-# FIXME (ML)
+# FIXME (mleich)
# - Alter all object names so that they follow the v/t/..<number> scheme or
# apply another method which prevents that customer data might be
# accidently modified
@@ -107,6 +112,12 @@ insert into tb2 (f59,f60,f61) values (109,108,104);
INSERT INTO tb2 (f59,f60) VALUES( 299,899 );
INSERT INTO tb2 (f59,f60) VALUES( 242,79 );
INSERT INTO tb2 (f59,f60) VALUES( 424,89 );
+if ($have_bug_11589)
+{
+--disable_ps_protocol
+}
+SELECT * FROM tb2 ORDER BY f59, f60, f61;
+--enable_ps_protocol
#
#
Use test;
@@ -155,52 +166,52 @@ Insert into t1 values (500,9866);
#(03)
CREATE or REPLACE VIEW v1 AS select f59,f60,f61
- FROM test.tb2 limit 4,3;
- select * FROM v1 order by f59,f60,f61 limit 0,10;
+ FROM test.tb2;
+ select * FROM v1 order by f59,f60,f61 limit 4,3;
#(04)
CREATE or REPLACE VIEW v1 AS select distinct f59
- FROM test.tb2 limit 4,3;
- select * FROM v1 order by f59 limit 0,10;
+ FROM test.tb2;
+ select * FROM v1 order by f59 limit 4,3;
#(05)
ALTER VIEW v1 AS select f59
- FROM test.tb2 limit 6,2;
- select * FROM v1 order by f59 limit 0,10;
+ FROM test.tb2;
+ select * FROM v1 order by f59 limit 6,2;
#(06)
CREATE or REPLACE VIEW v1 AS select f59
- from tb2 order by f59 limit 100;
+ from tb2 order by f59;
select * FROM v1 order by f59 limit 0,10;
#(07)
CREATE or REPLACE VIEW v1 AS select f59
- from tb2 order by f59 asc limit 100;
+ from tb2 order by f59 asc;
select * FROM v1 limit 0,10;
#(08)
CREATE or REPLACE VIEW v1 AS select f59
- from tb2 order by f59 desc limit 100;
+ from tb2 order by f59 desc;
select * FROM v1 limit 0,10;
#(09)
CREATE or REPLACE VIEW v1 AS select f59
- from tb2 group by f59 limit 100;
+ from tb2 group by f59;
select * FROM v1 order by f59 limit 0,10;
#(10)
CREATE or REPLACE VIEW v1 AS select f59
- from tb2 group by f59 asc limit 100;
+ from tb2 group by f59 asc;
select * FROM v1 order by f59 limit 0,10;
#(11)
CREATE or REPLACE VIEW v1 AS select f59
- from tb2 group by f59 desc limit 100;
+ from tb2 group by f59 desc;
select * FROM v1 order by f59 limit 0,10;
#(12)
CREATE or REPLACE VIEW v1 AS (select f59 from tb2)
- union (select f59 from t1) limit 100;
+ union (select f59 from t1);
select * FROM v1 order by f59 limit 0,10;
#(13)
@@ -260,12 +271,12 @@ CREATE TABLE t1 (f1 BIGINT) ;
# SELECT INTO is illegal
SET @x=0;
---error 1350
+--error ER_VIEW_SELECT_CLAUSE
CREATE or REPLACE VIEW v1 AS Select 1 INTO @x;
Select @x;
# Subquery in the FROM clause is illegal
---error 1349
+--error ER_VIEW_SELECT_DERIVED
CREATE or REPLACE VIEW v1 AS Select 1
FROM (SELECT 1 FROM t1) my_table;
@@ -282,23 +293,16 @@ SELECT @a ;
SELECT * FROM t1;
DROP TRIGGER tr1 ;
SET @a:=0 ;
---error 1347
+--error ER_WRONG_OBJECT
CREATE TRIGGER tr1 BEFORE INSERT ON v1 FOR EACH ROW SET @a:=1 ;
-# RENAME VIEW is not available even when we try it via rename table.
-# FIXME: Write a bug report for the ugly error message
-# 1017: Can't find file: './test/v1.frm' (errno: 2),
-# because the much more beautiful
-# 1347: 'test.v1' is not BASE TABLE
-# exists.
---replace_result '\\' '/'
-# MLML --error 1017
RENAME TABLE v1 TO v2;
---error 1064
+# RENAME VIEW is not available even when we try it via rename table.
+--error ER_PARSE_ERROR
RENAME VIEW v2 TO v1;
-#--error 1347
+#--error ER_WRONG_OBJECT
ALTER TABLE v2 RENAME AS v1;
---error 1064
+--error ER_PARSE_ERROR
ALTER VIEW v1 RENAME AS v2;
# VIEWs cannot contain a PRIMARY KEY or have an Index.
@@ -310,12 +314,12 @@ DROP VIEW IF EXISTS v2 ;
CREATE TABLE t1 ( f1 DATE, f2 BLOB, f3 DOUBLE );
CREATE VIEW v1 AS SELECT f1, f2, f3 FROM t1;
ALTER TABLE t1 ADD PRIMARY KEY(f1);
---error 1347
+--error ER_WRONG_OBJECT
ALTER TABLE v1 ADD PRIMARY KEY(f1);
---error 1064
+--error ER_PARSE_ERROR
ALTER VIEW v1 ADD PRIMARY KEY(f1);
CREATE INDEX t1_idx ON t1(f3);
---error 1347
+--error ER_WRONG_OBJECT
CREATE INDEX v1_idx ON v1(f3);
DROP TABLE t1;
DROP VIEW v1;
@@ -333,21 +337,21 @@ let $message= Testcase 3.3.1.3 + 3.1.1.4 ;
DROP VIEW IF EXISTS v1 ;
--enable_warnings
# REPLACE after VIEW name
---error 1064
-CREATE VIEW v1 or REPLACE AS Select * from tb2 my_table limit 50;
+--error ER_PARSE_ERROR
+CREATE VIEW v1 or REPLACE AS Select * from tb2 my_table;
# CHECK OPTION before AS SELECT
---error 1064
+--error ER_PARSE_ERROR
CREATE VIEW v1 WITH CASCADED CHECK OPTION AS Select *
from tb2 my_table limit 50;
# CHECK OPTION before AS SELECT
---error 1064
+--error ER_PARSE_ERROR
CREATE VIEW v1 WITH LOCAL CHECK OPTION AS Select *
from tb2 my_table limit 50;
# CREATE after SELECT
---error 1064
-SELECT * FROM tb2 my_table CREATE VIEW As v1 limit 100 ;
+--error ER_PARSE_ERROR
+SELECT * FROM tb2 my_table CREATE VIEW As v1;
# AS forgotten
---error 1064
+--error ER_PARSE_ERROR
CREATE or REPLACE VIEW v1 Select f59, f60
from test.tb2 my_table where f59 = 250 ;
# positive case
@@ -355,60 +359,60 @@ CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
FROM test.tb2 my_table WITH CASCADED CHECK OPTION;
DROP VIEW v1;
# REPLACE OR CREATE instead of CREATE OR REPLACE
---error 1064
+--error ER_PARSE_ERROR
REPLACE OR CREATE VIEW v1 AS SELECT F59, F60
FROM test.tb2 my_table WITH CASCADED CHECK OPTION;
# AS after SELECT
---error 1064
+--error ER_PARSE_ERROR
CREATE OR REPLACE VIEW v1 SELECT AS F59, F60
FROM test.tb2 my_table WITH CASCADED CHECK OPTION;
---error 1064
+--error ER_PARSE_ERROR
CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
FROM test.tb2 my_table CASCADED WITH CHECK OPTION;
# OPTION CHECK instead of CHECK OPTION
---error 1064
+--error ER_PARSE_ERROR
CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
FROM test.tb2 my_table WITH CASCADED OPTION CHECK;
# CHECK OPTION before WITH
---error 1064
+--error ER_PARSE_ERROR
CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
FROM test.tb2 my_table CHECK OPTION WITH CASCADED;
# CHECK OPTION before AS SELECT
---error 1064
+--error ER_PARSE_ERROR
CREATE OR REPLACE VIEW v1 WITH CASCADED CHECK OPTION
AS SELECT F59, F60 FROM test.tb2 my_table;
# VIEW <viewname> after AS SELECT
---error 1064
+--error ER_PARSE_ERROR
CREATE OR REPLACE AS SELECT F59, F60
FROM test.tb2 my_table VIEW v1 WITH CASCADED CHECK OPTION;
# VIEW <viewname> after CHECK OPTION
---error 1064
+--error ER_PARSE_ERROR
CREATE OR REPLACE AS SELECT F59, F60
FROM test.tb2 my_table WITH CASCADED CHECK OPTION VIEW v1;
# Variants with LOCAL CHECK OPTION
---error 1064
+--error ER_PARSE_ERROR
REPLACE OR CREATE VIEW v1 AS SELECT F59, F60
FROM test.tb2 my_table WITH LOCAL CHECK OPTION;
---error 1064
+--error ER_PARSE_ERROR
CREATE OR REPLACE VIEW v1 SELECT AS F59, F60
FROM test.tb2 my_table WITH LOCAL CHECK OPTION;
---error 1064
+--error ER_PARSE_ERROR
CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
FROM test.tb2 my_table LOCAL WITH CHECK OPTION;
---error 1064
+--error ER_PARSE_ERROR
CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
FROM test.tb2 my_table WITH LOCAL OPTION CHECK;
---error 1064
+--error ER_PARSE_ERROR
CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
FROM test.tb2 my_table CHECK OPTION WITH LOCAL;
---error 1064
+--error ER_PARSE_ERROR
CREATE OR REPLACE VIEW v1 WITH CASCADED CHECK OPTION
AS SELECT F59, F60 FROM test.tb2 my_table;
---error 1064
+--error ER_PARSE_ERROR
CREATE OR REPLACE AS SELECT F59, F60
FROM test.tb2 my_table VIEW v1 WITH LOCAL CHECK OPTION;
---error 1064
+--error ER_PARSE_ERROR
CREATE OR REPLACE AS SELECT F59, F60
FROM test.tb2 my_table WITH LOCAL CHECK OPTION VIEW v1;
@@ -419,15 +423,15 @@ CREATE table t1 (f1 int ,f2 int) ;
INSERT INTO t1 values (235, 22);
INSERT INTO t1 values (554, 11);
# SELECTs of UNION in braces
---error 1064
+--error ER_PARSE_ERROR
CREATE or REPLACE view v1 as (Select from f59 tb2)
Union ALL (Select from f1 t1);
# by before order
---error 1064
+--error ER_PARSE_ERROR
CREATE or REPLACE view v1 as Select f59, f60
-from tb2 by order f59 limit 100 ;
+from tb2 by order f59;
# by before group
---error 1064
+--error ER_PARSE_ERROR
CREATE or REPLACE view v1 as Select f59, f60
from tb2 by group f59 ;
@@ -442,24 +446,24 @@ let $message= Testcase 3.3.1.5 ;
--disable_warnings
DROP VIEW IF EXISTS v1 ;
--enable_warnings
---error 1064
-CREATE VIEW v1 SELECT * FROM tb2 limit 100 ;
---error 1064
-CREATE v1 AS SELECT * FROM tb2 limit 100 ;
---error 1064
-VIEW v1 AS SELECT * FROM tb2 limit 100 ;
+--error ER_PARSE_ERROR
+CREATE VIEW v1 SELECT * FROM tb2;
+--error ER_PARSE_ERROR
+CREATE v1 AS SELECT * FROM tb2;
+--error ER_PARSE_ERROR
+VIEW v1 AS SELECT * FROM tb2;
# positive case
CREATE VIEW v1 AS SELECT 1;
DROP VIEW v1;
---error 1064
+--error ER_PARSE_ERROR
VIEW v1 AS SELECT 1;
---error 1064
+--error ER_PARSE_ERROR
CREATE v1 AS SELECT 1;
---error 1064
+--error ER_PARSE_ERROR
CREATE VIEW AS SELECT 1;
---error 1064
+--error ER_PARSE_ERROR
CREATE VIEW v1 SELECT 1;
---error 1064
+--error ER_PARSE_ERROR
CREATE VIEW v1 AS ;
@@ -480,37 +484,37 @@ let $message= Testcase 3.3.1.6 ;
DROP VIEW IF EXISTS v1 ;
--enable_warnings
CREATE or REPLACE VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
CREATE or REPLACE ALGORITHM = UNDEFINED VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
CREATE or REPLACE ALGORITHM = MERGE VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
CREATE or REPLACE ALGORITHM = TEMPTABLE VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
CREATE or REPLACE ALGORITHM = TEMPTABLE VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
# negative test cases
---error 1064
+--error ER_PARSE_ERROR
CREATE or REPLACE = TEMPTABLE VIEW v1
-as SELECT * from tb2 limit 100 ;
---error 1064
+as SELECT * from tb2;
+--error ER_PARSE_ERROR
CREATE or REPLACE ALGORITHM TEMPTABLE VIEW v1
-as SELECT * from tb2 limit 100 ;
---error 1064
+as SELECT * from tb2;
+--error ER_PARSE_ERROR
CREATE or REPLACE ALGORITHM = VIEW v1
-as SELECT * from tb2 limit 100 ;
---error 1064
+as SELECT * from tb2;
+--error ER_PARSE_ERROR
CREATE or REPLACE TEMPTABLE = ALGORITHM VIEW v1
-as SELECT * from tb2 limit 100 ;
---error 1064
+as SELECT * from tb2;
+--error ER_PARSE_ERROR
CREATE or REPLACE TEMPTABLE - ALGORITHM VIEW v1
-as SELECT * from tb2 limit 100 ;
---error 1064
+as SELECT * from tb2;
+--error ER_PARSE_ERROR
CREATE or REPLACE GARBAGE = TEMPTABLE VIEW v1
-as SELECT * from tb2 limit 100 ;
---error 1064
+as SELECT * from tb2;
+--error ER_PARSE_ERROR
CREATE or REPLACE ALGORITHM = GARBAGE VIEW v1
-as SELECT * from tb2 limit 100 ;
+as SELECT * from tb2;
Drop view if exists v1 ;
CREATE or REPLACE VIEW v1
@@ -522,16 +526,16 @@ AS SELECT * from tb2 where f59 < 1 WITH CASCADED CHECK OPTION;
CREATE or REPLACE VIEW v1
AS SELECT * from tb2 where f59 < 1 WITH LOCAL CHECK OPTION;
# negative test cases
---error 1064
+--error ER_PARSE_ERROR
CREATE or REPLACE VIEW v1
AS SELECT * from tb2 where f59 < 1 WITH NO CHECK OPTION;
---error 1064
+--error ER_PARSE_ERROR
CREATE or REPLACE VIEW v1
AS SELECT * from tb2 where f59 < 1 CASCADED CHECK OPTION;
---error 1064
+--error ER_PARSE_ERROR
CREATE or REPLACE VIEW v1
AS SELECT * from tb2 where f59 < 1 WITH CASCADED OPTION;
---error 1064
+--error ER_PARSE_ERROR
CREATE or REPLACE VIEW v1
AS SELECT * from tb2 where f59 < 1 WITH CASCADED CHECK ;
@@ -543,12 +547,12 @@ let $message= Testcase 3.3.1.7 ;
# view names are accepted, at creation time, alteration time,
# and drop time.
###############################################################################
-# Note(ML): non-qualified view name means a view name without preceeding
-# database name
+# Note(mleich): non-qualified view name means a view name without preceeding
+# database name
--disable_warnings
DROP VIEW IF EXISTS v1 ;
--enable_warnings
-Create view test.v1 AS Select * from test.tb2 limit 100 ;
+Create view test.v1 AS Select * from test.tb2;
Alter view test.v1 AS Select F59 from test. tb2 limit 100 ;
Drop view test.v1 ;
Create view v1 AS Select * from test.tb2 limit 100 ;
@@ -561,11 +565,11 @@ let $message= Testcase 3.3.1.A0 ;
###############################################################################
# Testcase 3.3.1.A0: Ensure that view names are treated case sensitive.
###############################################################################
-# Note(ML): Maybe this test produces portability problems on Windows.
-# FIXME There should be a test outside this one checking the
-# creation of objects with cases sensitive names.
-# If we have this test the following sub testcase should
-# be deleted.
+# Note(mleich): Maybe this test produces portability problems on Windows.
+# FIXME There should be a test outside this one checking the
+# creation of objects with cases sensitive names.
+# If we have this test the following sub testcase should
+# be deleted.
--disable_warnings
DROP TABLE IF EXISTS t1 ;
DROP VIEW IF EXISTS v1 ;
@@ -576,8 +580,8 @@ INSERT INTO t1 VALUES(1111), (2222);
CREATE VIEW v1 AS SELECT * FROM t1 WHERE f1 = 1111;
# We get here the sql code
# - 0 on OS with cases sensitive view names (Example: UNIX)
-# - 1050 on OS without cases sensitive view names (Example: WINDOWS)
---error 0,1050
+# - ER_TABLE_EXISTS_ERROR on OS without cases sensitive view names (Example: WINDOWS)
+--error 0,ER_TABLE_EXISTS_ERROR
CREATE VIEW V1 AS SELECT * FROM t1 WHERE f1 = 2222;
SELECT * FROM v1;
# SELECT * FROM V1;
@@ -595,20 +599,20 @@ let $message= Testcase 3.3.1.8 ;
# that an appropriate error message is returned when the name
# is rejected.
###############################################################################
-# Note(ML): There could be more negative tests here, but I assume that the
-# server routines checking if a table or view name is acceptable are
-# heavily tested in tests checking the creation of tables.
---error 1064
+# Note(mleich): There could be more negative tests here, but I assume that the
+# server routines checking if a table or view name is acceptable
+# are heavily tested in tests checking the creation of tables.
+--error ER_PARSE_ERROR
Create view select AS Select * from test.tb2 limit 100;
---error 1064
+--error ER_PARSE_ERROR
Create view as AS Select * from test.tb2 limit 100;
---error 1064
+--error ER_PARSE_ERROR
Create view where AS Select * from test.tb2 limit 100;
---error 1064
+--error ER_PARSE_ERROR
Create view from AS Select * from test.tb2 limit 100;
---error 1064
+--error ER_PARSE_ERROR
Create view while AS Select * from test.tb2 limit 100;
---error 1064
+--error ER_PARSE_ERROR
Create view asdkj*(&*&&^ as Select * from test.tb2 limit 100 ;
--disable_warnings
Drop view if exists test.procedure ;
@@ -623,10 +627,11 @@ let $message= Testcase 3.3.1.9 ;
# Testcase 3.3.1.9: Ensure that a reference to a non-existent view is rejected
# with an appropriate error message
###############################################################################
-# Note(ML): The SELECT statement syntax does not contain any functionality to
-# claim, that the object after FROM must be a VIEW. SHOW's will be
-# checked in 3.3.11 Checks on SHOW, EXPLAIN, and DESCRIBE statements.
-# Let's check here a view based on a dropped view or table.
+# Note(mleich): The SELECT statement syntax does not contain any functionality
+# to claim, that the object after FROM must be a VIEW. SHOW's will
+# be checked in
+# 3.3.11 Checks on SHOW, EXPLAIN, and DESCRIBE statements.
+# Let's check here a view based on a dropped view or table.
--disable_warnings
Drop TABLE IF EXISTS t1 ;
Drop VIEW IF EXISTS v1;
@@ -640,32 +645,32 @@ CREATE VIEW v2 AS SELECT * FROM v1;
# Only negative cases, positive cases will be checked later:
DROP TABLE t1;
---error 1356
+--error ER_VIEW_INVALID
SELECT * FROM v1;
---error 1356
+--error ER_VIEW_INVALID
DELETE FROM v1;
---error 1356
+--error ER_VIEW_INVALID
UPDATE v1 SET f1 = 'aaaaa';
---error 1356
+--error ER_VIEW_INVALID
INSERT INTO v1 SET f1 = "fffff";
# v2 is based on v1, which is now invalid
---error 1356
+--error ER_VIEW_INVALID
SELECT * FROM v2;
---error 1356
+--error ER_VIEW_INVALID
DELETE FROM v2;
---error 1356
+--error ER_VIEW_INVALID
UPDATE v2 SET f1 = 'aaaaa';
---error 1356
+--error ER_VIEW_INVALID
INSERT INTO v2 SET f1 = "fffff";
DROP VIEW v1;
# v2 is based on v1, which is now dropped
---error 1356
+--error ER_VIEW_INVALID
SELECT * FROM v2;
---error 1356
+--error ER_VIEW_INVALID
DELETE FROM v2;
---error 1356
+--error ER_VIEW_INVALID
UPDATE v2 SET f1 = 'aaaaa';
---error 1356
+--error ER_VIEW_INVALID
INSERT INTO v2 SET f1 = "fffff";
DROP VIEW v2;
@@ -677,11 +682,11 @@ DROP VIEW IF EXISTS v1 ;
--enable_warnings
CREATE TABLE t1 (f1 FLOAT);
# Create a new VIEW based on itself
---error 1146
+--error ER_NO_SUCH_TABLE
CREATE VIEW v1 AS SELECT * FROM v1;
# Replace a valid VIEW with one new based on itself
CREATE VIEW v1 AS SELECT * FROM t1;
---error 1146
+--error ER_NO_SUCH_TABLE
CREATE or REPLACE VIEW v1 AS SELECT * FROM v1;
DROP VIEW v1;
@@ -697,9 +702,9 @@ let $message= Testcase 3.3.1.10 ;
Drop view if exists test.v1 ;
--enable_warnings
Create view test.v1 AS Select * from test.tb2 ;
---error 1050
+--error ER_TABLE_EXISTS_ERROR
Create view test.v1 AS Select F59 from test.tb2 ;
---error 1050
+--error ER_TABLE_EXISTS_ERROR
Create view v1 AS Select F59 from test.tb2 ;
@@ -710,18 +715,18 @@ let $message= Testcase 3.3.1.11 ;
# table with the same name in the same database.
###############################################################################
# The VIEW should get the same name like an already existing TABLE.
---error 1050
+--error ER_TABLE_EXISTS_ERROR
Create view test.tb2 AS Select f59,f60 from test.tb2 limit 100 ;
---error 1050
+--error ER_TABLE_EXISTS_ERROR
Create view tb2 AS Select f59,f60 from test.tb2 limit 100 ;
# The TABLE should get the same name like an already existing VIEW.
--disable_warnings
Drop view if exists test.v111 ;
--enable_warnings
Create view test.v111 as select * from tb2 limit 50;
---error 1050
+--error ER_TABLE_EXISTS_ERROR
Create table test.v111(f1 int );
---error 1050
+--error ER_TABLE_EXISTS_ERROR
Create table v111(f1 int );
DROP VIEW test.v111;
@@ -825,9 +830,9 @@ if ($have_bug_11589)
SELECT * FROM test.v1 order by f59,f60,f61,f62,f63,f64,f65;
--enable_ps_protocol
# Switch the SELECT but not the base table
-CREATE OR REPLACE VIEW test.v1 AS SELECT F59 FROM tb2 limit 10,100;
+CREATE OR REPLACE VIEW test.v1 AS SELECT F59 FROM tb2;
SHOW CREATE VIEW test.v1;
-SELECT * FROM test.v1 order by F59;
+SELECT * FROM test.v1 order by F59 limit 10,100;
Drop table test.t1 ;
Drop view test.v1 ;
@@ -839,9 +844,9 @@ let $message= Testcase 3.3.1.14 ;
# used to create a view using the name of an existing base
# table, it fails with an appropriate error message.
###############################################################################
---error 1347
+--error ER_WRONG_OBJECT
CREATE OR REPLACE VIEW test.tb2 AS SELECT * From tb2 LIMIT 2;
---error 1347
+--error ER_WRONG_OBJECT
CREATE OR REPLACE VIEW tb2 AS SELECT * From tb2 LIMIT 2;
@@ -856,12 +861,12 @@ let $message= Testcase 3.3.1.15 ;
--disable_warnings
Drop table if exists test.v1 ;
--enable_warnings
-CREATE OR REPLACE view test.v1 as select * from tb2 LIMIT 2;
+CREATE OR REPLACE view test.v1 as select * from tb2;
if ($have_bug_11589)
{
--disable_ps_protocol
}
-SELECT * FROM test.v1;
+SELECT * FROM test.v1 ORDER BY f59,f60,f61 LIMIT 2;
--enable_ps_protocol
Drop view test.v1 ;
@@ -880,8 +885,8 @@ let $message= Testcase 3.3.1.16 + 3.3.1.17 ;
Drop table if exists test.v1 ;
--enable_warnings
CREATE OR REPLACE VIEW v1 AS SELECT * From tb2;
-# Note(ML): The empty result is intended, because I want to compare
-# column names only
+# Note(mleich): The empty result is intended, because I want to compare
+# column names only.
SELECT * FROM tb2 WHERE 1 = 2;
SELECT * FROM v1 WHERE 1 = 2;
Drop view v1;
@@ -924,7 +929,7 @@ let $message= Testcase 3.3.1.18 ;
# from the underlying base table(s) rather than the view
# column names.
###############################################################################
-# Note(ML): The goal is to check the merge algorithm.
+# Note(mleich): The goal is to check the merge algorithm.
--disable_warnings
Drop view if exists v1 ;
Drop view if exists v1_1 ;
@@ -935,14 +940,14 @@ from test.tb2 limit 0,100 ;
Create view v1_1
as Select test.tb2.f59 as NewNameF1, test.tb2.f60 as NewNameF2
from tb2 limit 0,100 ;
---error 1054
+--error ER_BAD_FIELD_ERROR
SELECT NewNameF1,f60 FROM test.v1_1 ;
---error 1054
+--error ER_BAD_FIELD_ERROR
SELECT NewNameF1, v1_1.f60 FROM test.v1_1 ;
---error 1054
+--error ER_BAD_FIELD_ERROR
SELECT f59, f60 FROM test.v1 ;
Use test ;
---error 1054
+--error ER_BAD_FIELD_ERROR
SELECT F59 FROM v1 ;
@@ -974,14 +979,14 @@ SELECT * FROM v1;
# negative testcases (sometimes including the underlying SELECT)
# duplicate via alias in SELECT
SELECT f1, f2 AS f1 FROM t1;
---error 1060
+--error ER_DUP_FIELDNAME
CREATE OR REPLACE VIEW v1 AS SELECT f1, f2 AS f1 FROM t1;
# duplicate via JOIN SELECT
SELECT t1.f1, t2.f1 AS f1 FROM t1, t2;
---error 1060
+--error ER_DUP_FIELDNAME
CREATE OR REPLACE VIEW v1 AS SELECT t1.f1, t2.f1 AS f1 FROM t1, t2;
# duplicate via VIEW definition
---error 1060
+--error ER_DUP_FIELDNAME
CREATE OR REPLACE VIEW v1 (my_col, my_col) AS SELECT * FROM t1;
@@ -1000,13 +1005,13 @@ CREATE TABLE t1( f1 BIGINT, f2 DECIMAL(5,2));
CREATE OR REPLACE VIEW v1 (my_f1, my_f2) AS SELECT * FROM t1;
CREATE OR REPLACE VIEW v1 (my_f1, my_f2) AS SELECT f1, f2 FROM t1;
# negative cases, where we assign a wrong number of column names
---error 1353
+--error ER_VIEW_WRONG_LIST
CREATE OR REPLACE VIEW v1 (my_f1 ) AS SELECT * FROM t1;
---error 1353
+--error ER_VIEW_WRONG_LIST
CREATE OR REPLACE VIEW v1 (my_f1 ) AS SELECT f1, f2 FROM t1;
---error 1353
+--error ER_VIEW_WRONG_LIST
CREATE OR REPLACE VIEW v1 (my_f1, my_f2, my_f3) AS SELECT * FROM t1;
---error 1353
+--error ER_VIEW_WRONG_LIST
CREATE OR REPLACE VIEW v1 (my_f1, my_f2, my_f3) AS SELECT f1, f2 FROM t1;
@@ -1019,8 +1024,8 @@ let $message= Testcase 3.3.1.21 ;
--disable_warnings
DROP VIEW IF EXISTS v1;
--enable_warnings
-CREATE VIEW test.v1( F59, F60 ) AS SELECT F59, F60 From tb2 LIMIT 2;
-SELECT * FROM test.v1 order by F59, F60 desc;
+CREATE VIEW test.v1( F59, F60 ) AS SELECT F59, F60 From tb2;
+SELECT * FROM test.v1 order by F59, F60 desc LIMIT 2;
Drop view if exists test.v1 ;
@@ -1034,12 +1039,12 @@ let $message= Testcase 3.3.1.22 ;
--disable_warnings
DROP VIEW IF EXISTS v1;
--enable_warnings
-CREATE VIEW test.v1( product ) AS SELECT f59*f60 From tb2 LIMIT 2;
-SELECT * FROM test.v1;
+CREATE VIEW test.v1( product ) AS SELECT f59*f60 From tb2;
+SELECT * FROM test.v1 WHERE product IS NOT NULL ORDER BY product LIMIT 2;
CREATE OR REPLACE VIEW test.v1( product ) AS SELECT 1*2;
-SELECT * FROM test.v1;
+SELECT * FROM test.v1 LIMIT 2;
CREATE OR REPLACE VIEW test.v1( product ) AS SELECT USER();
-SELECT * FROM test.v1;
+SELECT * FROM test.v1 LIMIT 2;
Drop view if exists test.v1 ;
@@ -1053,18 +1058,18 @@ let $message= Testcase 3.3.1.23 + 3.3.1.24 ;
# a non-existent view fails, with an appropriate error
# message, at creation time.
###############################################################################
-# Note(ML): The SELECT statement syntax does not contain any functionality to
-# claim, that the object after FROM must be a VIEW.
-# Testcase 3.3.1.24 should be deleted.
+# Note(mleich): The SELECT statement syntax does not contain any functionality
+# to claim, that the object after FROM must be a VIEW.
+# Testcase 3.3.1.24 should be deleted.
USE test;
--disable_warnings
DROP TABLE IF EXISTS t1;
DROP VIEW IF EXISTS v1;
DROP VIEW IF EXISTS v2;
--enable_warnings
---error 1146
+--error ER_NO_SUCH_TABLE
CREATE VIEW test.v2 AS SELECT * FROM test.t1;
---error 1146
+--error ER_NO_SUCH_TABLE
CREATE VIEW v2 AS Select * from test.v1;
DROP VIEW IF EXISTS v2;
@@ -1075,8 +1080,8 @@ let $message= Testcase 3.3.1.25 ;
# Testcase 3.3.1.25: Ensure that a view cannot be based on one or more
# temporary tables.
###############################################################################
-# Note(ML): A temporary table hides permanent tables which have the same name.
-# So do not forget to drop the temporary table.
+# Note(mleich): A temporary table hides permanent tables which have the same
+# name. So do not forget to drop the temporary table.
--disable_warnings
DROP TABLE IF EXISTS t1_temp;
DROP TABLE IF EXISTS t2_temp;
@@ -1086,13 +1091,13 @@ Create table t1_temp(f59 char(10),f60 int) ;
Create temporary table t1_temp(f59 char(10),f60 int) ;
Insert into t1_temp values('FER',90);
Insert into t1_temp values('CAR',27);
---error 1352
+--error ER_VIEW_SELECT_TMPTABLE
Create view v1 as select * from t1_temp ;
Create temporary table t2_temp(f59 char(10),f60 int) ;
Insert into t2_temp values('AAA',11);
Insert into t2_temp values('BBB',22);
---error 1352
+--error ER_VIEW_SELECT_TMPTABLE
Create or replace view v1
as select t1_temp.f59,t2_temp.f59 from t1_temp,t2_temp ;
DROP temporary table t1_temp;
@@ -1110,34 +1115,34 @@ INSERT INTO t1 VALUES('A');
INSERT INTO t2 VALUES('t2');
INSERT INTO t2 VALUES('B');
# simple SELECT
---error 1352
+--error ER_VIEW_SELECT_TMPTABLE
CREATE OR REPLACE VIEW v1 AS SELECT f2 FROM t2;
# JOIN - temporary table first
---error 1352
+--error ER_VIEW_SELECT_TMPTABLE
CREATE OR REPLACE VIEW v1 AS SELECT * FROM t2, t1;
---error 1352
+--error ER_VIEW_SELECT_TMPTABLE
CREATE OR REPLACE VIEW v1 AS SELECT f2, f1 FROM t2, t1;
# JOIN - temporary table last
---error 1352
+--error ER_VIEW_SELECT_TMPTABLE
CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1, t2;
---error 1352
+--error ER_VIEW_SELECT_TMPTABLE
CREATE OR REPLACE VIEW v1 AS SELECT f1, f2 FROM t1, t2;
# UNION - temporary table first
---error 1352
+--error ER_VIEW_SELECT_TMPTABLE
CREATE OR REPLACE VIEW v1 AS SELECT * FROM t2 UNION SELECT * FROM t1;
---error 1352
+--error ER_VIEW_SELECT_TMPTABLE
CREATE OR REPLACE VIEW v1 AS SELECT f2 FROM t2 UNION SELECT f1 FROM t1;
# UNION - temporary table last
---error 1352
+--error ER_VIEW_SELECT_TMPTABLE
CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1 UNION SELECT * FROM t2;
---error 1352
+--error ER_VIEW_SELECT_TMPTABLE
CREATE OR REPLACE VIEW v1 AS SELECT f1 FROM t1 UNION SELECT f2 FROM t2;
# SUBQUERY - temporary table first
---error 1352
+--error ER_VIEW_SELECT_TMPTABLE
CREATE OR REPLACE VIEW v1 AS SELECT 1 FROM t2
WHERE f2 = ( SELECT f1 FROM t1 );
# SUBQUERY - temporary table last
---error 1352
+--error ER_VIEW_SELECT_TMPTABLE
CREATE OR REPLACE VIEW v1 AS SELECT 1 FROM t1
WHERE f1 = ( SELECT f2 FROM t2 );
DROP TABLE t1;
@@ -1153,12 +1158,12 @@ let $message= Testcase 3.3.1.26 ;
--disable_warnings
DROP VIEW IF EXISTS v1;
--enable_warnings
-Create view test.v1 AS Select * from test.tb2 limit 2 ;
+Create view test.v1 AS Select * from test.tb2;
if ($have_bug_11589)
{
--disable_ps_protocol
}
-Select * from test.v1;
+Select * from test.v1 order by f59, f60, f61 limit 2;
--enable_ps_protocol
Drop view test.v1 ;
@@ -1173,9 +1178,9 @@ let $message= Testcase 3.3.1.27 ;
DROP VIEW IF EXISTS test.v1;
Drop VIEW IF EXISTS test.v1_1 ;
--enable_warnings
-Create view test.v1 AS Select * from test.tb2 limit 2 ;
+Create view test.v1 AS Select * from test.tb2;
Create view test.v1_1 AS Select F59 from test.v1 ;
-Select * from test.v1_1 order by F59 limit 20 ;
+Select * from test.v1_1 order by F59 limit 2;
Drop view test.v1 ;
Drop view test.v1_1 ;
@@ -1223,7 +1228,8 @@ Create view test2.v2 AS Select F59 from test.v1 ;
Drop view if exists test.v1 ;
Drop view if exists test2.v2 ;
-# Note(ML): Testcase 3.3.1.30 (identical requirements like 3.3.1.26) omitted
+# Note(mleich): Testcase 3.3.1.30 (identical requirements like 3.3.1.26)
+# --> omitted
let $message= Testcase 3.3.1.31 ;
--source include/show_msg80.inc
@@ -1372,10 +1378,6 @@ let $message= Testcase 3.3.1.37 ;
# tables and/or views, some of which reside in the same
# database and some of which reside in one other database.
###############################################################################
-# (Bug Associated)
-# FIXME: ??? Bug number
-# FIXME: reimplement this test
-
use test;
--disable_warnings
Drop table if exists t1;
@@ -1407,8 +1409,8 @@ Drop view test.v1_main ;
let $message= Testcase 3.3.1.31 - 3.3.1.37 New Implementation ;
--source include/show_msg80.inc
###############################################################################
-# ML: The testcases 3.3.1.31 - 3.3.1.37 should be tested more systematic.
-# Ensure that a view can be based on a join of multiple
+# mleich: The testcases 3.3.1.31 - 3.3.1.37 should be tested more systematic.
+# Ensure that a view can be based on a join of multiple
# Testcase 3.3.1.31: tables within the same database
# Testcase 3.3.1.32: tables from another database.
# Testcase 3.3.1.33: views within the same database
@@ -1504,8 +1506,8 @@ Drop view if exists test.v1_main;
Drop view if exists test1.v1_1 ;
Drop database if exists test3 ;
--enable_warnings
-Create view test.v1 as Select f59, f60 FROM test.tb2 limit 20 ;
-Select * from test.v1 order by f59,f60;
+Create view test.v1 as Select f59, f60 FROM test.tb2;
+Select * from test.v1 order by f59,f60 limit 20;
Create table test1.t1 (f59 int,f60 int) ;
Insert into test1.t1 values (199,507) ;
@@ -1522,7 +1524,7 @@ Create view test3.v1_2 as Select f59,f60 from test3.t1 ;
Select * from test3.v1_2 ;
use test ;
-# ML: FIXME The SELECT should deliver at least one row.
+# mleich: FIXME The SELECT should deliver at least one row.
Create view v1_main
as SELECT test.tb2.f59 as f1, test1.v1_1.f59 as f2,
test3.v1_2.f59 as f3
@@ -1546,10 +1548,10 @@ let $message= Testcase 3.3.1.39 ;
--disable_warnings
Drop view if exists test.v1 ;
--enable_warnings
---error 1349
+--error ER_VIEW_SELECT_DERIVED
CREATE VIEW test.v1
AS Select f59 from (Select * FROM tb2 limit 20) tx ;
---error 1146
+--error ER_NO_SUCH_TABLE
SELECT * FROM test.v1 order by f59 ;
--disable_warnings
Drop view if exists test.v1 ;
@@ -1568,10 +1570,10 @@ Drop view if exists test.v1 ;
--enable_warnings
Set @var1 = 'ABC' ;
Set @var2 = 'XYZ' ;
---error 1351
+--error ER_VIEW_SELECT_VARIABLE
CREATE VIEW test.v1 AS SELECT @var1, @var2 ;
# System variables (name starts with '@@') are also not allowed
---error 1351
+--error ER_VIEW_SELECT_VARIABLE
CREATE VIEW test.v1 AS SELECT @@global.sort_buffer_size;
--disable_warnings
Drop view if exists test.v1 ;
@@ -1616,11 +1618,11 @@ let $message= Testcase 3.3.1.42 ;
--disable_warnings
Drop VIEW if exists test.v1 ;
--enable_warnings
---error 1064
+--error ER_PARSE_ERROR
CREATE TEMPORARY VIEW test.v1 AS
SELECT * FROM test.tb2 limit 2 ;
#(02)
---error 1064
+--error ER_PARSE_ERROR
CREATE OR REPLACE TEMPORARY VIEW test.v1 AS
SELECT * FROM test.tb2 limit 2 ;
@@ -1677,12 +1679,12 @@ let $message= Testcase 3.3.1.44 ;
# with an appropriate error message and do not affect the
# data in the underlying tables(s).
###############################################################################
-# ML: Maybe we need some more tests here.
+# mleich: Maybe we need some more tests here.
--disable_warnings
Drop view if exists test.v1 ;
--enable_warnings
-# Note(ML): The modification will fail, because the VIEW contains 'limit'
+# Note(mleich): The modification will fail, because the VIEW contains 'limit'
CREATE VIEW test.v1 AS SELECT f59,f60 FROM test.tb2 limit 100;
--error ER_NON_INSERTABLE_TABLE
@@ -1819,7 +1821,7 @@ Drop view if exists test.v1 ;
CREATE VIEW test.v1 AS SELECT f59,f60
FROM test.tb2 where f59 = 195 WITH CHECK OPTION ;
---error 1369
+--error ER_VIEW_CHECK_FAILED
UPDATE test.v1 SET f59 = 198 where f59=195 ;
SELECT * FROM test.v1 order by f59 ;
@@ -1844,14 +1846,14 @@ FROM test.tb2 where F59 = 0987 WITH LOCAL CHECK OPTION ;
CREATE VIEW test.v2 as SELECT * FROM test.v1 ;
# This UPDATE violates the definition of VIEW test.v1.
---error 1369
+--error ER_VIEW_CHECK_FAILED
UPDATE test.v1 SET F59 = 919 where f59 = 0987 ;
SELECT * FROM test.v1 order by f59 ;
-# ML: This UPDATE violates the definition of VIEW test.v1, but this
-# does not count, because the UPDATE runs on test.v2, which
-# is defined without any CHECK OPTION.
-# FIXME Does this testcase fit to 3.3.1.47 ?
+# mleich: This UPDATE violates the definition of VIEW test.v1, but this
+# does not count, because the UPDATE runs on test.v2, which
+# is defined without any CHECK OPTION.
+# FIXME Does this testcase fit to 3.3.1.47 ?
UPDATE test.v2 SET F59 = 9879 where f59 = 919 ;
SELECT * FROM tb2 where f59 = 9879 ;
@@ -1890,9 +1892,9 @@ INSERT INTO v1 VALUES('B',2);
SELECT * FROM v1 order by f1, f2;
# negative cases
--enable_info
---error 1369
+--error ER_VIEW_CHECK_FAILED
UPDATE v1 SET f2 = 4;
---error 1369
+--error ER_VIEW_CHECK_FAILED
INSERT INTO v1 VALUES('B',3);
--disable_info
# Bug#11771: View over InnoDB table, wrong result SELECT on VIEW,
@@ -1982,7 +1984,7 @@ let $message= Testcase 3.3.1.49A ;
# The annoying redundant
# eval INSERT INTO t1_results VALUES (@v3_to_v1_options,@statement,
# @v3_to_v1_violation,$mysql_errno);
-# could not be put into a file to be sourced because of
+# could not be put into a file to be sourced because of
# Bug#10267 mysqltest, wrong number of loops when a script is sourced
# within a loop
#
@@ -2066,7 +2068,7 @@ while ($num1)
SELECT * FROM v3;
SELECT * FROM t1;
DELETE FROM t1;
- # 2. DELETEs within v3
+ # 2. DELETEs within v3
# Outside v1 (0 to 10)
INSERT INTO t1 VALUES(16, 'sixteen');
# Inside v1 (0 to 10), Outside v2 ((0 to 10) AND (6 to 16) -> (6 to 10))
@@ -2242,7 +2244,7 @@ while ($num1)
SELECT * FROM t1_results ORDER BY v3_to_v1_options;
-let $message=
+let $message=
Plausibility checks for INSERTs and UPDATEs ( 4. and 5. above).
All following SELECTs must give ROW NOT FOUND ;
--source include/show_msg80.inc
@@ -2259,10 +2261,10 @@ SELECT * FROM t1_results
WHERE v3_to_v1_options LIKE ' %' AND errno <> 0
ORDER BY v3_to_v1_options;
# 3. There must be NO successful INSERT/UPDATE, when the toplevel VIEW v3 is
-# defined with any CHECK OPTION and the WHERE qualification of this VIEW is
+# defined with any CHECK OPTION and the WHERE qualification of this VIEW is
# violated. Expect ROW NOT FUND
SELECT * FROM t1_results
-WHERE v3_to_v1_options LIKE 'WITH %'
+WHERE v3_to_v1_options LIKE 'WITH %'
AND v3_to_v1_violation LIKE 'v3_%' AND errno = 0
ORDER BY v3_to_v1_options;
# 4. There must be NO successful INSERT/UPDATE, when the toplevel VIEW v3 is
@@ -2272,7 +2274,8 @@ SELECT * FROM t1_results
WHERE v3_to_v1_options LIKE 'WITH %' AND v3_to_v1_options NOT LIKE 'WITH LOCAL %'
AND v3_to_v1_violation NOT LIKE ' _ _ ' AND errno = 0
ORDER BY v3_to_v1_options;
-# 5. There must be NO failing INSERT/UPDATE getting a sql_errno <> 1369.
+# 5. There must be NO failing INSERT/UPDATE getting a
+# sql_errno <> 1369 (ER_VIEW_CHECK_FAILED).
SELECT * FROM t1_results
WHERE errno <> 0 AND errno <> 1369
ORDER BY v3_to_v1_options;
@@ -2294,12 +2297,12 @@ DROP VIEW IF EXISTS test.v1;
# that is semantically equivalent to CREATE VIEW <view name>
# AS SELECT * FROM <table name>.
###############################################################################
-CREATE VIEW test.v1 AS SELECT * FROM test.tb2 limit 5 ;
+CREATE VIEW test.v1 AS SELECT * FROM test.tb2;
if ($have_bug_11589)
{
--disable_ps_protocol
}
-SELECT * FROM test.v1 order by f59 ;
+SELECT * FROM test.v1 order by f59 limit 5;
--enable_ps_protocol
drop view test.v1 ;
###############################################################################
@@ -2309,8 +2312,8 @@ drop view test.v1 ;
# that is semantically equivalent to CREATE VIEW <view name>
# AS SELECT col1, col3 FROM <table name>.
###############################################################################
-CREATE VIEW test.v1 AS SELECT F59,F61 FROM test.tb2 limit 50 ;
-SELECT * FROM test.v1 order by F59, F61 ;
+CREATE VIEW test.v1 AS SELECT F59,F61 FROM test.tb2;
+SELECT * FROM test.v1 order by F59, F61 limit 50;
drop view test.v1 ;
###############################################################################
# Testcase 3.3.1.52: Ensure that a view that is a subset of every column and
@@ -2319,12 +2322,12 @@ drop view test.v1 ;
# that is semantically equivalent to CREATE VIEW <view name>
# AS SELECT * FROM <table name> WHERE ....
###############################################################################
-CREATE VIEW test.v1 AS SELECT * FROM test.tb2 order by f59, f60, f61 limit 20 ;
+CREATE VIEW test.v1 AS SELECT * FROM test.tb2 order by f59, f60, f61;
if ($have_bug_11589)
{
--disable_ps_protocol
}
-SELECT * FROM test.v1 order by f59,f60,f61 ;
+SELECT * FROM test.v1 order by f59,f60,f61 limit 20;
--enable_ps_protocol
drop view test.v1 ;
###############################################################################
@@ -2334,8 +2337,8 @@ drop view test.v1 ;
# definition that is semantically equivalent to CREATE VIEW
# <view name> AS SELECT col1, col3 FROM <table name> WHERE ..
###############################################################################
-CREATE VIEW test.v1 AS SELECT F59,f61 FROM test.tb2 limit 20 ;
-SELECT * FROM test.v1 order by f59,f61 desc limit 50;
+CREATE VIEW test.v1 AS SELECT F59,f61 FROM test.tb2;
+SELECT * FROM test.v1 order by f59,f61 desc limit 20;
drop view test.v1 ;
@@ -2370,10 +2373,10 @@ drop table test.t2 ;
drop view test.v1 ;
-# FIXME(ML): Implement an automatic check for 3.3.1.50 - 3.3.1.54
-# CREATE VIEW ... AS <SELECT ... FROM tb2 ...>
-# CREATE TEMPORARY TABLE ... AS <SELECT ... FROM tb2 ...>
-# Comparison of the VIEW with the temporary table
+# FIXME(mleich): Implement an automatic check for 3.3.1.50 - 3.3.1.54
+# CREATE VIEW ... AS <SELECT ... FROM tb2 ...>
+# CREATE TEMPORARY TABLE ... AS <SELECT ... FROM tb2 ...>
+# Comparison of the VIEW with the temporary table
let $message= Testcase 3.3.1.50 - 3.3.1.54 additional implementation;
--source include/show_msg80.inc
@@ -2412,6 +2415,15 @@ SELECT * FROM v1;
# 3.3.1.54
--vertical_results
SET sql_mode = 'traditional,ansi';
+# due to bug#32496 "no trailing blanks in identifier".
+CREATE OR REPLACE VIEW v1 AS
+SELECT f3 AS "pure column f3:", f1 + f3 AS "sum of columns f1 + f3 =",
+ 3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1):",
+ '->' || CAST(f3 AS CHAR) || '<-'
+ AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR):"
+FROM t1 WHERE f1 = 2;
+# This error is not conformant with ansi (see bug#32496). hhunger
+--error ER_WRONG_COLUMN_NAME
CREATE OR REPLACE VIEW v1 AS
SELECT f3 AS "pure column f3: ", f1 + f3 AS "sum of columns f1 + f3 = ",
3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1): ",
@@ -2704,7 +2716,7 @@ CREATE VIEW v1 AS SELECT f1 FROM t1;
# DROP VIEW
DROP VIEW v1;
---error 1051
+--error ER_BAD_TABLE_ERROR
DROP VIEW v1;
CREATE VIEW v1 AS SELECT f1 FROM t1;
@@ -2751,7 +2763,7 @@ while ($num1)
# DROP VIEW v1_top < |RESTRICD|CASCADE> must be successful.
eval $aux1 ;
# Check, that v1_top really no more exists + cleanup for the second sub test
- --error 1051
+ --error ER_BAD_TABLE_ERROR
DROP VIEW v1_top;
CREATE VIEW v1_top AS SELECT * FROM v1_base;
@@ -2781,8 +2793,8 @@ let $message= Testcase 3.3.1.69, 3.3.1.70, 3.3.1.A5 ;
# 3.3.1.A5 SHOW COLUMNS, SHOW FIELDS, DESCRIBE, EXPLAIN
# statement is executed
###############################################################################
-# Note(ML): There will be no non failing sub testcases with SHOW here.
-# They will be done in 3.3.11 ff.
+# Note(mleich): There will be no non failing sub testcases with SHOW here.
+# They will be done in 3.3.11 ff.
--disable_warnings
DROP TABLE IF EXISTS t1 ;
DROP VIEW IF EXISTS v1 ;
@@ -2793,24 +2805,24 @@ DROP VIEW v1 ;
# The negative tests:
# SELECT
---error 1146
+--error ER_NO_SUCH_TABLE
SELECT * FROM v1 ;
#
---error 1146
+--error ER_NO_SUCH_TABLE
SHOW CREATE VIEW v1 ;
---error 1146
+--error ER_NO_SUCH_TABLE
SHOW CREATE TABLE v1 ;
# Attention: Like is a filter. So we will get an empty result set here.
SHOW TABLE STATUS like 'v1' ;
SHOW TABLES LIKE 'v1';
---error 1146
+--error ER_NO_SUCH_TABLE
SHOW COLUMNS FROM v1;
---error 1146
+--error ER_NO_SUCH_TABLE
SHOW FIELDS FROM v1;
CHECK TABLE v1;
---error 1146
+--error ER_NO_SUCH_TABLE
DESCRIBE v1;
---error 1146
+--error ER_NO_SUCH_TABLE
EXPLAIN SELECT * FROM v1;
Use test;
@@ -2879,34 +2891,34 @@ eval EXPLAIN SELECT * FROM test3.v$toplevel;
# 1.2 Check the top level view when a base VIEW is dropped
DROP VIEW test3.v0;
eval SHOW CREATE VIEW test3.v$toplevel;
---error 1356
+--error ER_VIEW_INVALID
eval SELECT * FROM test3.v$toplevel;
---error 1356
+--error ER_VIEW_INVALID
eval EXPLAIN SELECT * FROM test3.v$toplevel;
# 2. Complicated nested VIEWs
# parameter @max_level = nesting level
# There is a limit(@join_limit = 61) for the number of tables which
-# could be joined. This limit will be reached, when we set
+# could be joined. This limit will be reached, when we set
# @max_level = @join_limit - 1 .
--disable_query_log
#++++++++++++++++++++++++++++++++++++++++++++++
# OBN - Reduced the value of join limit to 30
# Above seems to hang - FIXME
-# ML - Reason unclear why it hangs for OBN on innodb and memory.
-# Hypothesis: Maybe the consumption of virtual memory is high
-# and OBN's box performs excessive paging.
-# (RAM: OBN ~384MB RAM, ML 1 GB)
+# mleich - Reason unclear why it hangs for OBN on innodb and memory.
+# Hypothesis: Maybe the consumption of virtual memory is high
+# and OBN's box performs excessive paging.
+# (RAM: OBN ~384MB RAM, mleich 1 GB)
#++++++++++++++++++++++++++++++++++++++++++++++
let $message= FIXME - Setting join_limit to 28 - hangs for higher values;
--source include/show_msg.inc
# OBN - Reduced from 30 in 5.1.21 to avoid hitting the ndbcluster limit
-# of "ERROR HY000:RROR HY000: Got temporary error 4006 'Connect failure
-# - out of connection objects (increase MaxNoOfConcurrentTransactions)'
+# of "ERROR HY000: Got temporary error 4006 'Connect failure
+# - out of connection objects (increase MaxNoOfConcurrentTransactions)'
# from NDBCLUSTER " to early;
#SET @join_limit = 61;
-SET @join_limit = 28; # OBN - see above
+SET @join_limit = 28; # OBN - see above
SET @max_level = @join_limit - 1;
--enable_query_log
@@ -3042,9 +3054,9 @@ let $sublevel= `SELECT @max_level`;
eval CREATE VIEW test1.v$level AS SELECT f1, f2
FROM test3.t1 tab1 NATURAL JOIN test1.v$sublevel tab2;
eval SHOW CREATE VIEW test1.v$level;
-# the following line as written as '--eror 1116' and the command
+# the following line as written as '--eror ER_TOO_MANY_TABLES' and the command
# is successful so assuming no expected error was intended
-# --error 1116
+# --error ER_TOO_MANY_TABLES
eval SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
CAST(f2 AS CHAR) AS f2 FROM test1.v$level;
let $message= The output of following EXPLAIN is deactivated, because the result
@@ -3055,9 +3067,9 @@ if (1)
{
--disable_result_log
}
-# the following line as written as '--eror 1116' and the command
+# the following line as written as '--eror ER_TOO_MANY_TABLES' and the command
# is successful so assuming no expected error was intended
-# --error 1116
+# --error ER_TOO_MANY_TABLES
eval EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
CAST(f2 AS CHAR) AS f2 FROM test1.v$level;
if (1)
@@ -3070,10 +3082,10 @@ eval DROP VIEW IF EXISTS test1.v$level;
# and check the behaviour of the top level view.
# 2.3.1 Exchange numeric and string column
--disable_result_log
-CREATE OR REPLACE VIEW test1.v0 AS
+CREATE OR REPLACE VIEW test1.v0 AS
SELECT f1 as f2, f2 as f1 FROM test2.t1;
# 2.3.2 DATE instead of numeric
-CREATE OR REPLACE VIEW test2.v0 AS
+CREATE OR REPLACE VIEW test2.v0 AS
SELECT CAST('0001-01-01' AS DATE) as f1, f2 FROM test3.t1;
eval SHOW CREATE VIEW test1.v$toplevel;
eval SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
@@ -3536,25 +3548,25 @@ DELETE FROM t1;
#------------------------------------------------
INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
# UPDATE my_greeting - f1
---error 1348
+--error ER_NONUPDATEABLE_COLUMN
UPDATE v1 SET my_greeting = 'Hej' WHERE f1 = 1;
SELECT * from t1;
DELETE FROM t1;
INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
# UPDATE my_greeting - f2
---error 1348
+--error ER_NONUPDATEABLE_COLUMN
UPDATE v1 SET my_greeting = 'Hej' WHERE f2 = 'ABC';
SELECT * from t1;
DELETE FROM t1;
INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
# UPDATE my_greeting - my_greeting
---error 1348
+--error ER_NONUPDATEABLE_COLUMN
UPDATE v1 SET my_greeting = 'Hej' WHERE my_greeting = 'HELLO';
SELECT * from t1;
DELETE FROM t1;
INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
# UPDATE my_greeting - none
---error 1348
+--error ER_NONUPDATEABLE_COLUMN
UPDATE v1 SET my_greeting = 'Hej';
SELECT * from t1;
DELETE FROM t1;
@@ -3577,7 +3589,7 @@ DROP VIEW v1;
CREATE VIEW v1 AS SELECT f1, f2, f4 FROM t1;
# This INSERT must fail
---error 1423
+--error ER_NO_DEFAULT_FOR_VIEW_FIELD
INSERT INTO v1 SET f1 = 1;
SELECT * from t1;
DELETE FROM t1;
@@ -3630,10 +3642,10 @@ let $message= Testcases 3.3.2.7 - 3.3.2.9,
# Summary of 3.3.2.7 - 3.3.2.11
# Ensure that a view with a definition that includes
# UNION or UNION DISTINCT or UNION ALL or EXCEPT or INTERSECT
-# rejects any INSERT or UPDATE or DELETE statement with an
+# rejects any INSERT or UPDATE or DELETE statement with an
# appropriate error message
#
-# ML: I assume the type of the storage engine does not play any role.
+# mleich: I assume the type of the storage engine does not play any role.
###############################################################################
INSERT INTO tb2 (f59,f60,f61) VALUES (77,185,126) ;
INSERT INTO tb2 (f59,f60,f61) VALUES (59,58,54) ;
@@ -3668,9 +3680,9 @@ while ($num)
eval $aux;
--error ER_NON_INSERTABLE_TABLE
INSERT INTO v1 VALUES (3000);
- --error 1288
+ --error ER_NON_UPDATABLE_TABLE
UPDATE v1 SET f61 = 100 WHERE f61 = 32;
- --error 1288
+ --error ER_NON_UPDATABLE_TABLE
DELETE FROM v1;
DROP VIEW v1 ;
@@ -3771,13 +3783,17 @@ SET @variant7= 'CREATE VIEW v1 AS SELECT f61 FROM v2';
# but the error message
# ERROR 1093 (HY000) : You can't specify target table 'v1' for
# update in FORM clause"
-# is wrong. The server must deliver ERROR 1288.
+# is wrong.
+# The server must deliver ERROR 1288 (ER_NON_UPDATABLE_TABLE).
# Bug#10773 Incorrect message is displayed while updating a view
-# ML FIXME (remove the comment above, replace --error 1288,1093 with
-# --error 1288 and update the file with expected results)
-# when Bug#10773 is solved
+# mleich FIXME: Remove the comment above, replace
+# --error ER_NON_UPDATABLE_TABLE,ER_UPDATE_TABLE_USED
+# with
+# --error ER_NON_UPDATABLE_TABLE
+# and update the file with expected results when the
+# Bug#10773 is fixed.
# For a reference to a non-updateable view 3.3.2.19
-let $message= Some server responses suffer from
+let $message= Some server responses suffer from
Bug#10773 Incorrect message is displayed while updating a view;
--source include/show_msg80.inc
SET @variant8= 'CREATE VIEW v1 AS SELECT f59 AS f61 FROM t1 WHERE f60 IN (SELECT f59 FROM t1)';
@@ -3798,15 +3814,12 @@ while ($num)
--error ER_NON_INSERTABLE_TABLE
INSERT INTO v1 VALUES (1002);
- --error 1288, 1093
+ # --error ER_NON_UPDATABLE_TABLE, ER_UPDATE_TABLE_USED
+ --error ER_NON_UPDATABLE_TABLE
UPDATE v1 SET f61=1007;
- --error 1288
+ --error ER_NON_UPDATABLE_TABLE
DELETE FROM v1;
- # The following "--error 0" will be no more needed, when
- # Bug#12471: mysqltest, --error within loop affects wrong statement
- # is fixed.
- --error 0
DROP VIEW v1;
dec $num;
@@ -3827,7 +3840,7 @@ let $message= Testcases 3.3.A1;
#
# There is no specification of the intended behaviour within
# the MySQL manual. That means I assume the observed effects are
-# no bug as long we do not get a crash or obviously non
+# no bug as long we do not get a crash or obviously non
# reasonable results.
###############################################################################
--disable_warnings
@@ -3852,18 +3865,18 @@ SELECT * FROM v1 order by f1, report;
# 1. Name of one base table column is altered
ALTER TABLE t1 CHANGE COLUMN f4 f4x CHAR(5);
INSERT INTO t1 SET f1 = 0, f4x = 'ABC', report = 't1 1';
---error 1356
+--error ER_VIEW_INVALID
INSERT INTO v1 SET f1 = 0, f4 = 'ABC', report = 'v1 1';
---error 1054
+--error ER_BAD_FIELD_ERROR
INSERT INTO v1 SET f1 = 0, f4x = 'ABC', report = 'v1 1a';
---error 1356
+--error ER_VIEW_INVALID
INSERT INTO v1 SET f1 = 0, report = 'v1 1b';
DESCRIBE t1;
# Bug#12533 crash on DESCRIBE <view> after renaming base table column;
---error 1356
+--error ER_VIEW_INVALID
DESCRIBE v1;
SELECT * FROM t1 order by f1, report;
---error 1356
+--error ER_VIEW_INVALID
SELECT * FROM v1 order by f1, report;
ALTER TABLE t1 CHANGE COLUMN f4x f4 CHAR(5);
#
@@ -3894,11 +3907,11 @@ DESCRIBE v1;
SELECT * FROM t1 order by f1, report;
SELECT * FROM v1 order by f1, report;
#
-# 5. Type of one base table column altered numeric -> string
+# 5. Type of one base table column altered numeric -> string
ALTER TABLE t1 CHANGE COLUMN f1 f1 VARCHAR(30);
-INSERT INTO t1 SET f1 = '<------------- 30 ----------->',
+INSERT INTO t1 SET f1 = '<------------- 30 ----------->',
f4 = '<------ 20 -------->', report = 't1 5';
-INSERT INTO v1 SET f1 = '<------------- 30 ----------->',
+INSERT INTO v1 SET f1 = '<------------- 30 ----------->',
f4 = '<------ 20 -------->', report = 'v1 5';
DESCRIBE t1;
DESCRIBE v1;
@@ -3908,13 +3921,13 @@ SELECT * FROM v1 order by f1, report;
# 6. DROP of one base table column
ALTER TABLE t1 DROP COLUMN f2;
INSERT INTO t1 SET f1 = 'ABC', f4 = '<------ 20 -------->', report = 't1 6';
---error 1356
+--error ER_VIEW_INVALID
INSERT INTO v1 SET f1 = 'ABC', f4 = '<------ 20 -------->', report = 'v1 6';
DESCRIBE t1;
---error 1356
+--error ER_VIEW_INVALID
DESCRIBE v1;
SELECT * FROM t1 order by f1, report;
---error 1356
+--error ER_VIEW_INVALID
SELECT * FROM v1 order by f1, report;
#
# 7. Recreation of dropped base table column with the same data type like before
@@ -3945,7 +3958,7 @@ SELECT * FROM v1 order by f1, report;
ALTER TABLE t1 ADD COLUMN f3 NUMERIC(7,2);
INSERT INTO t1 SET f1 = 'ABC', f2 = -3.3E-4,
f3 = -2.2, f4 = '<------ 20 -------->', report = 't1 9';
---error 1054
+--error ER_BAD_FIELD_ERROR
INSERT INTO v1 SET f1 = 'ABC', f2 = -3.3E-4,
f3 = -2.2, f4 = '<------ 20 -------->', report = 'v1 9';
INSERT INTO v1 SET f1 = 'ABC', f2 = -3.3E-4,
diff --git a/mysql-test/suite/funcs_2/r/innodb_charset.result b/mysql-test/suite/funcs_2/r/innodb_charset.result
index 25b720af1da..09076145c44 100644
--- a/mysql-test/suite/funcs_2/r/innodb_charset.result
+++ b/mysql-test/suite/funcs_2/r/innodb_charset.result
@@ -737,7 +737,6 @@ a_ascii a_len
44 1
64 1
45 1
-60 1
65 1
46 1
66 1
@@ -779,17 +778,18 @@ a_ascii a_len
78 1
59 1
79 1
-7E 1
5A 1
7A 1
-5D 1
5B 1
5C 1
+5D 1
5E 1
5F 1
+60 1
7B 1
7C 1
7D 1
+7E 1
7F 1
80 1
81 1
diff --git a/mysql-test/suite/funcs_2/r/memory_charset.result b/mysql-test/suite/funcs_2/r/memory_charset.result
index 073b057d733..8536ac4a9b2 100644
--- a/mysql-test/suite/funcs_2/r/memory_charset.result
+++ b/mysql-test/suite/funcs_2/r/memory_charset.result
@@ -737,7 +737,6 @@ a_ascii a_len
44 1
64 1
45 1
-60 1
65 1
46 1
66 1
@@ -779,17 +778,18 @@ a_ascii a_len
78 1
59 1
79 1
-7E 1
5A 1
7A 1
-5D 1
5B 1
5C 1
+5D 1
5E 1
5F 1
+60 1
7B 1
7C 1
7D 1
+7E 1
7F 1
80 1
81 1
diff --git a/mysql-test/suite/funcs_2/r/myisam_charset.result b/mysql-test/suite/funcs_2/r/myisam_charset.result
index 50ed8aca2cc..698cce1be37 100644
--- a/mysql-test/suite/funcs_2/r/myisam_charset.result
+++ b/mysql-test/suite/funcs_2/r/myisam_charset.result
@@ -737,7 +737,6 @@ a_ascii a_len
44 1
64 1
45 1
-60 1
65 1
46 1
66 1
@@ -779,17 +778,18 @@ a_ascii a_len
78 1
59 1
79 1
-7E 1
5A 1
7A 1
-5D 1
5B 1
5C 1
+5D 1
5E 1
5F 1
+60 1
7B 1
7C 1
7D 1
+7E 1
7F 1
80 1
81 1
diff --git a/mysql-test/suite/funcs_2/r/ndb_charset.result b/mysql-test/suite/funcs_2/r/ndb_charset.result
index 7a5c63f71d6..0a4dba2e302 100644
--- a/mysql-test/suite/funcs_2/r/ndb_charset.result
+++ b/mysql-test/suite/funcs_2/r/ndb_charset.result
@@ -737,7 +737,6 @@ a_ascii a_len
44 1
64 1
45 1
-60 1
65 1
46 1
66 1
@@ -779,17 +778,18 @@ a_ascii a_len
78 1
59 1
79 1
-7E 1
5A 1
7A 1
-5D 1
5B 1
5C 1
+5D 1
5E 1
5F 1
+60 1
7B 1
7C 1
7D 1
+7E 1
7F 1
80 1
81 1
diff --git a/mysql-test/suite/manual/r/rpl_replication_delay.result b/mysql-test/suite/manual/r/rpl_replication_delay.result
new file mode 100644
index 00000000000..a8fa6ce8265
--- /dev/null
+++ b/mysql-test/suite/manual/r/rpl_replication_delay.result
@@ -0,0 +1,136 @@
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+show slave status /* Second_behind reports 0 */;;
+Slave_IO_State #
+Master_Host 127.0.0.1
+Master_User root
+Master_Port 9306
+Connect_Retry 1
+Master_Log_File master-bin.000001
+Read_Master_Log_Pos 106
+Relay_Log_File #
+Relay_Log_Pos #
+Relay_Master_Log_File master-bin.000001
+Slave_IO_Running Yes
+Slave_SQL_Running Yes
+Replicate_Do_DB
+Replicate_Ignore_DB
+Replicate_Do_Table
+Replicate_Ignore_Table
+Replicate_Wild_Do_Table
+Replicate_Wild_Ignore_Table
+Last_Errno 0
+Last_Error
+Skip_Counter 0
+Exec_Master_Log_Pos 106
+Relay_Log_Space #
+Until_Condition None
+Until_Log_File
+Until_Log_Pos 0
+Master_SSL_Allowed No
+Master_SSL_CA_File
+Master_SSL_CA_Path
+Master_SSL_Cert
+Master_SSL_Cipher
+Master_SSL_Key
+Seconds_Behind_Master 0
+Master_SSL_Verify_Server_Cert No
+Last_IO_Errno 0
+Last_IO_Error
+Last_SQL_Errno 0
+Last_SQL_Error
+drop table if exists t1;
+Warnings:
+Note 1051 Unknown table 't1'
+create table t1 (f1 int);
+flush logs /* contaminate rli->last_master_timestamp */;
+lock table t1 write;
+insert into t1 values (1);
+show slave status /* bug emulated: reports slave threads starting time about 3*3 not 3 secs */;;
+Slave_IO_State #
+Master_Host 127.0.0.1
+Master_User root
+Master_Port 9306
+Connect_Retry 1
+Master_Log_File master-bin.000001
+Read_Master_Log_Pos 367
+Relay_Log_File #
+Relay_Log_Pos #
+Relay_Master_Log_File master-bin.000001
+Slave_IO_Running Yes
+Slave_SQL_Running Yes
+Replicate_Do_DB
+Replicate_Ignore_DB
+Replicate_Do_Table
+Replicate_Ignore_Table
+Replicate_Wild_Do_Table
+Replicate_Wild_Ignore_Table
+Last_Errno 0
+Last_Error
+Skip_Counter 0
+Exec_Master_Log_Pos 279
+Relay_Log_Space #
+Until_Condition None
+Until_Log_File
+Until_Log_Pos 0
+Master_SSL_Allowed No
+Master_SSL_CA_File
+Master_SSL_CA_Path
+Master_SSL_Cert
+Master_SSL_Cipher
+Master_SSL_Key
+Seconds_Behind_Master 9
+Master_SSL_Verify_Server_Cert No
+Last_IO_Errno 0
+Last_IO_Error
+Last_SQL_Errno 0
+Last_SQL_Error
+unlock tables;
+flush logs /* this time rli->last_master_timestamp is not affected */;
+lock table t1 write;
+insert into t1 values (2);
+show slave status /* reports the correct diff with master query time about 3+3 secs */;;
+Slave_IO_State #
+Master_Host 127.0.0.1
+Master_User root
+Master_Port 9306
+Connect_Retry 1
+Master_Log_File master-bin.000001
+Read_Master_Log_Pos 455
+Relay_Log_File #
+Relay_Log_Pos #
+Relay_Master_Log_File master-bin.000001
+Slave_IO_Running Yes
+Slave_SQL_Running Yes
+Replicate_Do_DB
+Replicate_Ignore_DB
+Replicate_Do_Table
+Replicate_Ignore_Table
+Replicate_Wild_Do_Table
+Replicate_Wild_Ignore_Table
+Last_Errno 0
+Last_Error
+Skip_Counter 0
+Exec_Master_Log_Pos 367
+Relay_Log_Space #
+Until_Condition None
+Until_Log_File
+Until_Log_Pos 0
+Master_SSL_Allowed No
+Master_SSL_CA_File
+Master_SSL_CA_Path
+Master_SSL_Cert
+Master_SSL_Cipher
+Master_SSL_Key
+Seconds_Behind_Master 7
+Master_SSL_Verify_Server_Cert No
+Last_IO_Errno 0
+Last_IO_Error
+Last_SQL_Errno 0
+Last_SQL_Error
+unlock tables;
+drop table t1;
diff --git a/mysql-test/suite/manual/t/rpl_replication_delay-slave.opt b/mysql-test/suite/manual/t/rpl_replication_delay-slave.opt
new file mode 100644
index 00000000000..24a4c5952fe
--- /dev/null
+++ b/mysql-test/suite/manual/t/rpl_replication_delay-slave.opt
@@ -0,0 +1 @@
+--loose-debug=d,let_first_flush_log_change_timestamp
diff --git a/mysql-test/suite/manual/t/rpl_replication_delay.test b/mysql-test/suite/manual/t/rpl_replication_delay.test
new file mode 100644
index 00000000000..8230698c8f9
--- /dev/null
+++ b/mysql-test/suite/manual/t/rpl_replication_delay.test
@@ -0,0 +1,71 @@
+#
+# Testing replication delay reporting (bug#29309)
+# there is an unavoidable non-determinism in the test
+# please compare the results with the comments
+#
+
+
+source include/master-slave.inc;
+
+connection master;
+#connection slave;
+sync_slave_with_master;
+--replace_result $DEFAULT_MASTER_PORT DEFAULT_MASTER_PORT
+--replace_column 1 # 8 # 9 # 23 #
+--query_vertical show slave status /* Second_behind reports 0 */;
+sleep 3;
+
+### bug emulation
+
+connection master;
+drop table if exists t1;
+create table t1 (f1 int);
+sleep 3;
+
+#connection slave;
+sync_slave_with_master;
+flush logs /* contaminate rli->last_master_timestamp */;
+
+connection slave;
+lock table t1 write;
+
+connection master;
+insert into t1 values (1);
+
+sleep 3;
+
+connection slave;
+--replace_result $DEFAULT_MASTER_PORT DEFAULT_MASTER_PORT
+--replace_column 1 # 8 # 9 # 23 #
+--query_vertical show slave status /* bug emulated: reports slave threads starting time about 3*3 not 3 secs */;
+unlock tables;
+
+connection master;
+sync_slave_with_master;
+
+### bugfix
+
+
+connection slave;
+flush logs /* this time rli->last_master_timestamp is not affected */;
+lock table t1 write;
+
+connection master;
+insert into t1 values (2);
+sleep 3;
+
+connection slave;
+--replace_result $DEFAULT_MASTER_PORT DEFAULT_MASTER_PORT
+--replace_column 1 # 8 # 9 # 23 #
+--query_vertical show slave status /* reports the correct diff with master query time about 3+3 secs */;
+unlock tables;
+
+connection master;
+drop table t1;
+
+#connection slave;
+sync_slave_with_master;
+
+
+# End of tests
+
diff --git a/mysql-test/suite/ndb/r/ndb_condition_pushdown.result b/mysql-test/suite/ndb/r/ndb_condition_pushdown.result
index 8d1dcc4ef18..1d61e2c59c2 100644
--- a/mysql-test/suite/ndb/r/ndb_condition_pushdown.result
+++ b/mysql-test/suite/ndb/r/ndb_condition_pushdown.result
@@ -1888,5 +1888,27 @@ set engine_condition_pushdown = 1;
SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%');
fname lname
Young Foo
+drop table t1;
+create table t1 (a int, b int, c int, d int, primary key using hash(a))
+engine=ndbcluster;
+insert into t1 values (10,1,100,0+0x1111);
+insert into t1 values (20,2,200,0+0x2222);
+insert into t1 values (30,3,300,0+0x3333);
+insert into t1 values (40,4,400,0+0x4444);
+insert into t1 values (50,5,500,0+0x5555);
+set engine_condition_pushdown = on;
+select a,b,d from t1
+where b in (0,1,2,5)
+order by b;
+a b d
+10 1 4369
+20 2 8738
+50 5 21845
+a b d
+10 1 4369
+20 2 8738
+50 5 21845
+Warnings:
+Warning 4294 Scan filter is too large, discarded
set engine_condition_pushdown = @old_ecpd;
DROP TABLE t1,t2,t3,t4,t5;
diff --git a/mysql-test/suite/ndb/r/ndb_dd_basic.result b/mysql-test/suite/ndb/r/ndb_dd_basic.result
index 0ff28f889b7..f04905b8d13 100644
--- a/mysql-test/suite/ndb/r/ndb_dd_basic.result
+++ b/mysql-test/suite/ndb/r/ndb_dd_basic.result
@@ -8,20 +8,20 @@ INITIAL_SIZE 16M
UNDO_BUFFER_SIZE = 1M
ENGINE=MYISAM;
Warnings:
-Error 1477 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
+Error 1478 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
ALTER LOGFILE GROUP lg1
ADD UNDOFILE 'undofile02.dat'
INITIAL_SIZE = 4M
ENGINE=XYZ;
Warnings:
Warning 1286 Unknown table engine 'XYZ'
-Error 1477 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
+Error 1478 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
CREATE TABLESPACE ts1
ADD DATAFILE 'datafile.dat'
USE LOGFILE GROUP lg1
INITIAL_SIZE 12M;
Warnings:
-Error 1477 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
+Error 1478 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
set storage_engine=ndb;
CREATE LOGFILE GROUP lg1
ADD UNDOFILE 'undofile.dat'
diff --git a/mysql-test/suite/ndb/r/ndb_dd_ddl.result b/mysql-test/suite/ndb/r/ndb_dd_ddl.result
index 569769cfaef..d8d9e8631d5 100644
--- a/mysql-test/suite/ndb/r/ndb_dd_ddl.result
+++ b/mysql-test/suite/ndb/r/ndb_dd_ddl.result
@@ -16,7 +16,7 @@ ERROR HY000: Failed to create LOGFILE GROUP
SHOW WARNINGS;
Level Code Message
Error 1296 Got error 1514 'Currently there is a limit of one logfile group' from NDB
-Error 1527 Failed to create LOGFILE GROUP
+Error 1528 Failed to create LOGFILE GROUP
CREATE LOGFILE GROUP lg1
ADD UNDOFILE 'undofile.dat'
INITIAL_SIZE 1M
diff --git a/mysql-test/suite/ndb/r/ndb_gis.result b/mysql-test/suite/ndb/r/ndb_gis.result
index b401dee8054..6c44c6fb822 100644
--- a/mysql-test/suite/ndb/r/ndb_gis.result
+++ b/mysql-test/suite/ndb/r/ndb_gis.result
@@ -463,7 +463,7 @@ drop table t1;
End of 4.1 tests
CREATE TABLE t1 (name VARCHAR(100), square GEOMETRY);
Warnings:
-Error 1477 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
+Error 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))'));
INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))'));
INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))'));
@@ -1013,7 +1013,7 @@ drop table t1;
End of 4.1 tests
CREATE TABLE t1 (name VARCHAR(100), square GEOMETRY);
Warnings:
-Error 1477 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
+Error 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))'));
INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))'));
INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))'));
diff --git a/mysql-test/suite/ndb/r/ndb_lock_table.result b/mysql-test/suite/ndb/r/ndb_lock_table.result
new file mode 100644
index 00000000000..a0550273e1a
--- /dev/null
+++ b/mysql-test/suite/ndb/r/ndb_lock_table.result
@@ -0,0 +1,11 @@
+drop table if exists t1;
+create table t1 (a int) engine ndb;
+set autocommit=1;
+lock table t1 write;
+set autocommit=0;
+insert into t1 values (0);
+rollback;
+select * from t1;
+a
+unlock tables;
+drop table t1;
diff --git a/mysql-test/suite/ndb/r/ndb_multi.result b/mysql-test/suite/ndb/r/ndb_multi.result
index 2bc49bf9b45..17380b10fd7 100644
--- a/mysql-test/suite/ndb/r/ndb_multi.result
+++ b/mysql-test/suite/ndb/r/ndb_multi.result
@@ -121,3 +121,24 @@ show tables;
Tables_in_db
t2
drop database db;
+use test;
+create table `test`.`t1$EX`
+ (server_id int unsigned,
+master_server_id int unsigned,
+master_epoch bigint unsigned,
+count int unsigned,
+primary key(server_id, master_server_id,
+master_epoch, count))
+engine ndb;
+show tables like '%$%';
+Tables_in_test (%$%)
+t1$ex
+use test;
+show tables like '%$%';
+Tables_in_test (%$%)
+t1$ex
+drop table `test`.`t1$EX`;
+show tables like '%$%';
+Tables_in_test (%$%)
+show tables like '%$%';
+Tables_in_test (%$%)
diff --git a/mysql-test/suite/ndb/r/ndb_row_format.result b/mysql-test/suite/ndb/r/ndb_row_format.result
index ea495e7e9c5..eea0692dd92 100644
--- a/mysql-test/suite/ndb/r/ndb_row_format.result
+++ b/mysql-test/suite/ndb/r/ndb_row_format.result
@@ -8,7 +8,7 @@ ENGINE=NDB;
ERROR HY000: Can't create table 'test.t1' (errno: 138)
SHOW WARNINGS;
Level Code Message
-Error 1477 Table storage engine 'ndbcluster' does not support the create option 'Row format FIXED incompatible with variable sized attribute'
+Error 1478 Table storage engine 'ndbcluster' does not support the create option 'Row format FIXED incompatible with variable sized attribute'
Error 1005 Can't create table 'test.t1' (errno: 138)
CREATE TABLE t1
( a INT KEY,
diff --git a/mysql-test/suite/ndb/r/ndb_single_user.result b/mysql-test/suite/ndb/r/ndb_single_user.result
index 552629ae532..0a4f7cd0b5f 100644
--- a/mysql-test/suite/ndb/r/ndb_single_user.result
+++ b/mysql-test/suite/ndb/r/ndb_single_user.result
@@ -11,7 +11,7 @@ ERROR HY000: Failed to create LOGFILE GROUP
show warnings;
Level Code Message
Error 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB
-Error 1527 Failed to create LOGFILE GROUP
+Error 1528 Failed to create LOGFILE GROUP
create table t1 (a int key, b int unique, c int) engine ndb;
CREATE LOGFILE GROUP lg1
ADD UNDOFILE 'undofile.dat'
@@ -27,14 +27,14 @@ ERROR HY000: Failed to create TABLESPACE
show warnings;
Level Code Message
Error 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB
-Error 1527 Failed to create TABLESPACE
+Error 1528 Failed to create TABLESPACE
DROP LOGFILE GROUP lg1
ENGINE =NDB;
ERROR HY000: Failed to drop LOGFILE GROUP
show warnings;
Level Code Message
Error 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB
-Error 1528 Failed to drop LOGFILE GROUP
+Error 1529 Failed to drop LOGFILE GROUP
CREATE TABLESPACE ts1
ADD DATAFILE 'datafile.dat'
USE LOGFILE GROUP lg1
@@ -47,7 +47,7 @@ ERROR HY000: Failed to alter: DROP DATAFILE
show warnings;
Level Code Message
Error 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB
-Error 1532 Failed to alter: DROP DATAFILE
+Error 1533 Failed to alter: DROP DATAFILE
ALTER TABLESPACE ts1
DROP DATAFILE 'datafile.dat'
ENGINE NDB;
@@ -57,7 +57,7 @@ ERROR HY000: Failed to drop TABLESPACE
show warnings;
Level Code Message
Error 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB
-Error 1528 Failed to drop TABLESPACE
+Error 1529 Failed to drop TABLESPACE
DROP TABLESPACE ts1
ENGINE NDB;
DROP LOGFILE GROUP lg1
diff --git a/mysql-test/suite/ndb/r/ndb_update.result b/mysql-test/suite/ndb/r/ndb_update.result
index daea0e27a6a..ed51daee5cb 100644
--- a/mysql-test/suite/ndb/r/ndb_update.result
+++ b/mysql-test/suite/ndb/r/ndb_update.result
@@ -41,6 +41,14 @@ pk1 b c
10 0 0
12 2 2
14 1 1
+create unique index ib on t1(b);
+update t1 set c = 4 where pk1 = 12;
+update ignore t1 set b = 55 where pk1 = 14;
+select * from t1 order by pk1;
+pk1 b c
+10 0 0
+12 2 4
+14 55 1
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a int, b int, KEY (a, b)) ENGINE=ndbcluster;
CREATE TABLE t2 (a int, b int, UNIQUE KEY (a, b)) ENGINE=ndbcluster;
diff --git a/mysql-test/suite/ndb/r/ndb_update_no_read.result b/mysql-test/suite/ndb/r/ndb_update_no_read.result
new file mode 100644
index 00000000000..4373800d338
--- /dev/null
+++ b/mysql-test/suite/ndb/r/ndb_update_no_read.result
@@ -0,0 +1,75 @@
+DROP TABLE IF EXISTS t1;
+create table t1 (a int not null primary key, b int not null, c int,
+unique index_b (b) using hash)
+engine ndb;
+insert into t1 values (1,10,1),(2,9,1),(3,8,1),(4,7,1),(5,6,1),(6,5,2),(7,4,2),(8,3,2),
+(9,2,2),(10,1,2);
+update t1 set c = 111, b = 20 where a = 1;
+select * from t1 where a = 1 order by a;
+a b c
+1 20 111
+delete from t1 where a = 1;
+select * from t1 where a = 1 order by a;
+a b c
+update t1 set c = 12, b = 19 where b = 2;
+select * from t1 where b = 2 order by a;
+a b c
+delete from t1 where b = 19;
+select * from t1 where b = 19 order by a;
+a b c
+update t1 set c = 22 where a = 10 or a >= 10;
+select * from t1 order by a;
+a b c
+2 9 1
+3 8 1
+4 7 1
+5 6 1
+6 5 2
+7 4 2
+8 3 2
+10 1 22
+update t1 set c = 23 where a in (8,10);
+select * from t1 order by a;
+a b c
+2 9 1
+3 8 1
+4 7 1
+5 6 1
+6 5 2
+7 4 2
+8 3 23
+10 1 23
+update t1 set c = 23 where a in (7,8) or a >= 10;
+select * from t1 order by a;
+a b c
+2 9 1
+3 8 1
+4 7 1
+5 6 1
+6 5 2
+7 4 23
+8 3 23
+10 1 23
+update t1 set c = 11 where a = 3 or b = 7;
+select * from t1 where a = 3 or b = 7 order by a;
+a b c
+3 8 11
+4 7 11
+update t1 set a = 13, b = 20 where a = 3;
+select * from t1 where a = 13 order by a;
+a b c
+13 20 11
+update t1 set a = 12, b = 19 where b = 7;
+select * from t1 where b = 19 order by a;
+a b c
+12 19 11
+select * from t1 where b = 7 order by a;
+a b c
+update t1 set c = 12, b = 29 where a = 5 and b = 6;
+select * from t1 where b = 19 order by a;
+a b c
+12 19 11
+delete from t1 where b = 6 and c = 12;
+select * from t1 where b = 6 order by a;
+a b c
+drop table t1;
diff --git a/mysql-test/suite/ndb/r/partition_03ndb.result b/mysql-test/suite/ndb/r/partition_03ndb.result
deleted file mode 100644
index 28339cc7435..00000000000
--- a/mysql-test/suite/ndb/r/partition_03ndb.result
+++ /dev/null
@@ -1,1361 +0,0 @@
-SET SESSION storage_engine='NDB' ;
-SET @max_row = 200;
-SET AUTOCOMMIT= 1;
-#------------------------------------------------------------------------
-# 0. Creation of an auxiliary table needed in all testcases
-#------------------------------------------------------------------------
-DROP TABLE IF EXISTS t0_template;
-CREATE TABLE t0_template ( f1 INTEGER, f2 char(20), PRIMARY KEY(f1))
-ENGINE = MEMORY;
-# Logging of 200 INSERTs into t0_template suppressed
-#------------------------------------------------------------------------
-# 1. Some syntax checks
-#------------------------------------------------------------------------
-# 1.1 Subpartioned table without subpartitioning rule must be rejected
-DROP TABLE IF EXISTS t1;
-#------------------------------------------------------------------------
-# 2. Checks where the engine is set on all supported CREATE TABLE
-# statement positions + basic operations on the tables
-#------------------------------------------------------------------------
-DROP TABLE IF EXISTS t1;
-# 2.1 table (non partitioned) for comparison
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) ENGINE = 'NDB' ;
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) default NULL,
- `f2` char(20) default NULL
-) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY ()
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-UPDATE t1 SET f1 = f1 + 200
-WHERE f1 BETWEEN 100 - 50 AND 100 + 50;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 )
-AS my_value FROM t1;
-my_value
-1
-DELETE FROM t1
-WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200;
-SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SET f1 = 0 , f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######';
-my_value
-1
-INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######';
-my_value
-1
-UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ'
- WHERE f1 = 0 AND f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-my_value
-1
-DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
-my_value
-1
-TRUNCATE t1;
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-DROP TABLE t1;
-# 2.2 table with engine setting just after column list
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) ENGINE = 'NDB'
-PARTITION BY HASH(f1) PARTITIONS 2;
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) default NULL,
- `f2` char(20) default NULL
-) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH (f1) PARTITIONS 2
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-UPDATE t1 SET f1 = f1 + 200
-WHERE f1 BETWEEN 100 - 50 AND 100 + 50;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 )
-AS my_value FROM t1;
-my_value
-1
-DELETE FROM t1
-WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200;
-SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SET f1 = 0 , f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######';
-my_value
-1
-INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######';
-my_value
-1
-UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ'
- WHERE f1 = 0 AND f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-my_value
-1
-DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
-my_value
-1
-TRUNCATE t1;
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-DROP TABLE t1;
-# 2.3 table with engine setting in the named partition part
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1)
-( PARTITION part1 STORAGE ENGINE = 'NDB' ,
-PARTITION part2 STORAGE ENGINE = 'NDB'
-);
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) default NULL,
- `f2` char(20) default NULL
-) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH (f1) (PARTITION part1 ENGINE = ndbcluster, PARTITION part2 ENGINE = ndbcluster)
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-UPDATE t1 SET f1 = f1 + 200
-WHERE f1 BETWEEN 100 - 50 AND 100 + 50;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 )
-AS my_value FROM t1;
-my_value
-1
-DELETE FROM t1
-WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200;
-SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SET f1 = 0 , f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######';
-my_value
-1
-INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######';
-my_value
-1
-UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ'
- WHERE f1 = 0 AND f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-my_value
-1
-DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
-my_value
-1
-TRUNCATE t1;
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-DROP TABLE t1;
-# 2.4 table with engine setting in the named subpartition part
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1)
-SUBPARTITION BY HASH(f1)
-( PARTITION part1 VALUES LESS THAN (1000)
-(SUBPARTITION subpart11 STORAGE ENGINE = 'NDB' ,
-SUBPARTITION subpart12 STORAGE ENGINE = 'NDB' ),
-PARTITION part2 VALUES LESS THAN (2000)
-(SUBPARTITION subpart21 STORAGE ENGINE = 'NDB' ,
-SUBPARTITION subpart22 STORAGE ENGINE = 'NDB' )
-);
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) default NULL,
- `f2` char(20) default NULL
-) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) (PARTITION part1 VALUES LESS THAN (1000) (SUBPARTITION subpart11 ENGINE = ndbcluster, SUBPARTITION subpart12 ENGINE = ndbcluster), PARTITION part2 VALUES LESS THAN (2000) (SUBPARTITION subpart21 ENGINE = ndbcluster, SUBPARTITION subpart22 ENGINE = ndbcluster))
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-UPDATE t1 SET f1 = f1 + 200
-WHERE f1 BETWEEN 100 - 50 AND 100 + 50;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 )
-AS my_value FROM t1;
-my_value
-1
-DELETE FROM t1
-WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200;
-SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SET f1 = 0 , f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######';
-my_value
-1
-INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######';
-my_value
-1
-UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ'
- WHERE f1 = 0 AND f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-my_value
-1
-DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
-my_value
-1
-TRUNCATE t1;
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-DROP TABLE t1;
-# 2.5 Ugly "incomplete" storage engine assignments
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1)
-( PARTITION part1 STORAGE ENGINE = 'NDB' ,
-PARTITION part2
-);
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) default NULL,
- `f2` char(20) default NULL
-) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH (f1) (PARTITION part1 ENGINE = ndbcluster, PARTITION part2 ENGINE = ndbcluster)
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-UPDATE t1 SET f1 = f1 + 200
-WHERE f1 BETWEEN 100 - 50 AND 100 + 50;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 )
-AS my_value FROM t1;
-my_value
-1
-DELETE FROM t1
-WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200;
-SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SET f1 = 0 , f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######';
-my_value
-1
-INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######';
-my_value
-1
-UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ'
- WHERE f1 = 0 AND f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-my_value
-1
-DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
-my_value
-1
-TRUNCATE t1;
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-DROP TABLE t1;
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1)
-( PARTITION part1 ,
-PARTITION part2 STORAGE ENGINE = 'NDB'
-);
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) default NULL,
- `f2` char(20) default NULL
-) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH (f1) (PARTITION part1 ENGINE = ndbcluster, PARTITION part2 ENGINE = ndbcluster)
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-UPDATE t1 SET f1 = f1 + 200
-WHERE f1 BETWEEN 100 - 50 AND 100 + 50;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 )
-AS my_value FROM t1;
-my_value
-1
-DELETE FROM t1
-WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200;
-SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SET f1 = 0 , f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######';
-my_value
-1
-INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######';
-my_value
-1
-UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ'
- WHERE f1 = 0 AND f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-my_value
-1
-DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
-my_value
-1
-TRUNCATE t1;
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-DROP TABLE t1;
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1)
-SUBPARTITION BY HASH(f1)
-( PARTITION part1 VALUES LESS THAN (1000)
-(SUBPARTITION subpart11,
-SUBPARTITION subpart12 STORAGE ENGINE = 'NDB' ),
-PARTITION part2 VALUES LESS THAN (2000)
-(SUBPARTITION subpart21 STORAGE ENGINE = 'NDB' ,
-SUBPARTITION subpart22 STORAGE ENGINE = 'NDB' )
-);
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) default NULL,
- `f2` char(20) default NULL
-) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) (PARTITION part1 VALUES LESS THAN (1000) (SUBPARTITION subpart11 ENGINE = ndbcluster, SUBPARTITION subpart12 ENGINE = ndbcluster), PARTITION part2 VALUES LESS THAN (2000) (SUBPARTITION subpart21 ENGINE = ndbcluster, SUBPARTITION subpart22 ENGINE = ndbcluster))
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-UPDATE t1 SET f1 = f1 + 200
-WHERE f1 BETWEEN 100 - 50 AND 100 + 50;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 )
-AS my_value FROM t1;
-my_value
-1
-DELETE FROM t1
-WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200;
-SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SET f1 = 0 , f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######';
-my_value
-1
-INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######';
-my_value
-1
-UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ'
- WHERE f1 = 0 AND f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-my_value
-1
-DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
-my_value
-1
-TRUNCATE t1;
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-DROP TABLE t1;
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1)
-SUBPARTITION BY HASH(f1)
-( PARTITION part1 VALUES LESS THAN (1000)
-(SUBPARTITION subpart11 STORAGE ENGINE = 'NDB' ,
-SUBPARTITION subpart12 STORAGE ENGINE = 'NDB' ),
-PARTITION part2 VALUES LESS THAN (2000)
-(SUBPARTITION subpart21 ,
-SUBPARTITION subpart22 )
-);
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) default NULL,
- `f2` char(20) default NULL
-) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) (PARTITION part1 VALUES LESS THAN (1000) (SUBPARTITION subpart11 ENGINE = ndbcluster, SUBPARTITION subpart12 ENGINE = ndbcluster), PARTITION part2 VALUES LESS THAN (2000) (SUBPARTITION subpart21 ENGINE = ndbcluster, SUBPARTITION subpart22 ENGINE = ndbcluster))
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-UPDATE t1 SET f1 = f1 + 200
-WHERE f1 BETWEEN 100 - 50 AND 100 + 50;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 )
-AS my_value FROM t1;
-my_value
-1
-DELETE FROM t1
-WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200;
-SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SET f1 = 0 , f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######';
-my_value
-1
-INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######';
-my_value
-1
-UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ'
- WHERE f1 = 0 AND f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-my_value
-1
-DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
-my_value
-1
-TRUNCATE t1;
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-DROP TABLE t1;
-# 2.6 Ugly "over determined" storage engine assignments
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) ENGINE = 'NDB'
-PARTITION BY HASH(f1)
-( PARTITION part1 STORAGE ENGINE = 'NDB' ,
-PARTITION part2 STORAGE ENGINE = 'NDB'
-);
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) default NULL,
- `f2` char(20) default NULL
-) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH (f1) (PARTITION part1 ENGINE = ndbcluster, PARTITION part2 ENGINE = ndbcluster)
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-UPDATE t1 SET f1 = f1 + 200
-WHERE f1 BETWEEN 100 - 50 AND 100 + 50;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 )
-AS my_value FROM t1;
-my_value
-1
-DELETE FROM t1
-WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200;
-SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SET f1 = 0 , f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######';
-my_value
-1
-INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######';
-my_value
-1
-UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ'
- WHERE f1 = 0 AND f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-my_value
-1
-DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
-my_value
-1
-TRUNCATE t1;
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-DROP TABLE t1;
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) ENGINE = 'NDB'
-PARTITION BY RANGE(f1)
-SUBPARTITION BY HASH(f1)
-( PARTITION part1 VALUES LESS THAN (1000)
-(SUBPARTITION subpart11 STORAGE ENGINE = 'NDB' ,
-SUBPARTITION subpart12 STORAGE ENGINE = 'NDB' ),
-PARTITION part2 VALUES LESS THAN (2000)
-(SUBPARTITION subpart21 STORAGE ENGINE = 'NDB' ,
-SUBPARTITION subpart22 STORAGE ENGINE = 'NDB' )
-);
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) default NULL,
- `f2` char(20) default NULL
-) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) (PARTITION part1 VALUES LESS THAN (1000) (SUBPARTITION subpart11 ENGINE = ndbcluster, SUBPARTITION subpart12 ENGINE = ndbcluster), PARTITION part2 VALUES LESS THAN (2000) (SUBPARTITION subpart21 ENGINE = ndbcluster, SUBPARTITION subpart22 ENGINE = ndbcluster))
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-UPDATE t1 SET f1 = f1 + 200
-WHERE f1 BETWEEN 100 - 50 AND 100 + 50;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 )
-AS my_value FROM t1;
-my_value
-1
-DELETE FROM t1
-WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200;
-SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SET f1 = 0 , f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######';
-my_value
-1
-INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######';
-my_value
-1
-UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ'
- WHERE f1 = 0 AND f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-my_value
-1
-DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
-my_value
-1
-TRUNCATE t1;
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-DROP TABLE t1;
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1)
-SUBPARTITION BY HASH(f1)
-( PARTITION part1 VALUES LESS THAN (1000) STORAGE ENGINE = 'NDB'
-(SUBPARTITION subpart11 STORAGE ENGINE = 'NDB' ,
-SUBPARTITION subpart12 STORAGE ENGINE = 'NDB' ),
-PARTITION part2 VALUES LESS THAN (2000)
-(SUBPARTITION subpart21 STORAGE ENGINE = 'NDB' ,
-SUBPARTITION subpart22 STORAGE ENGINE = 'NDB' )
-);
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) default NULL,
- `f2` char(20) default NULL
-) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) (PARTITION part1 VALUES LESS THAN (1000) (SUBPARTITION subpart11 ENGINE = ndbcluster, SUBPARTITION subpart12 ENGINE = ndbcluster), PARTITION part2 VALUES LESS THAN (2000) (SUBPARTITION subpart21 ENGINE = ndbcluster, SUBPARTITION subpart22 ENGINE = ndbcluster))
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-UPDATE t1 SET f1 = f1 + 200
-WHERE f1 BETWEEN 100 - 50 AND 100 + 50;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 )
-AS my_value FROM t1;
-my_value
-1
-DELETE FROM t1
-WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200;
-SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SET f1 = 0 , f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######';
-my_value
-1
-INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######';
-my_value
-1
-UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ'
- WHERE f1 = 0 AND f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-my_value
-1
-DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
-my_value
-1
-TRUNCATE t1;
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-DROP TABLE t1;
-# 2.7 Ugly storage engine assignments mixups
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1)
-SUBPARTITION BY HASH(f1)
-( PARTITION part1 VALUES LESS THAN (1000) ENGINE = 'NDB'
-(SUBPARTITION subpart11 ,
-SUBPARTITION subpart12 ),
-PARTITION part2 VALUES LESS THAN (2000)
-(SUBPARTITION subpart21 STORAGE ENGINE = 'NDB' ,
-SUBPARTITION subpart22 STORAGE ENGINE = 'NDB' )
-);
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) default NULL,
- `f2` char(20) default NULL
-) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) (PARTITION part1 VALUES LESS THAN (1000) (SUBPARTITION subpart11 ENGINE = ndbcluster, SUBPARTITION subpart12 ENGINE = ndbcluster), PARTITION part2 VALUES LESS THAN (2000) (SUBPARTITION subpart21 ENGINE = ndbcluster, SUBPARTITION subpart22 ENGINE = ndbcluster))
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-UPDATE t1 SET f1 = f1 + 200
-WHERE f1 BETWEEN 100 - 50 AND 100 + 50;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 )
-AS my_value FROM t1;
-my_value
-1
-DELETE FROM t1
-WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200;
-SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SET f1 = 0 , f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######';
-my_value
-1
-INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######';
-my_value
-1
-UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ'
- WHERE f1 = 0 AND f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-my_value
-1
-DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
-my_value
-1
-TRUNCATE t1;
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-DROP TABLE t1;
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1)
-SUBPARTITION BY HASH(f1)
-( PARTITION part1 VALUES LESS THAN (1000)
-(SUBPARTITION subpart11 STORAGE ENGINE = 'NDB' ,
-SUBPARTITION subpart12 STORAGE ENGINE = 'NDB' ),
-PARTITION part2 VALUES LESS THAN (2000) ENGINE = 'NDB'
-(SUBPARTITION subpart21 ,
-SUBPARTITION subpart22 )
-);
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) default NULL,
- `f2` char(20) default NULL
-) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) (PARTITION part1 VALUES LESS THAN (1000) (SUBPARTITION subpart11 ENGINE = ndbcluster, SUBPARTITION subpart12 ENGINE = ndbcluster), PARTITION part2 VALUES LESS THAN (2000) (SUBPARTITION subpart21 ENGINE = ndbcluster, SUBPARTITION subpart22 ENGINE = ndbcluster))
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-UPDATE t1 SET f1 = f1 + 200
-WHERE f1 BETWEEN 100 - 50 AND 100 + 50;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 )
-AS my_value FROM t1;
-my_value
-1
-DELETE FROM t1
-WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200;
-SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SET f1 = 0 , f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######';
-my_value
-1
-INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######';
-my_value
-1
-UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ'
- WHERE f1 = 0 AND f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-my_value
-1
-DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
-my_value
-1
-TRUNCATE t1;
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-DROP TABLE t1;
-# 2.8 Session default engine differs from engine used within create table
-SET SESSION storage_engine='MEMORY';
-SET SESSION storage_engine='NDB' ;
-#------------------------------------------------------------------------
-# 3. Check number of partitions and subpartitions
-#------------------------------------------------------------------------
-DROP TABLE IF EXISTS t1;
-# 3.1 (positive) without partition/subpartition number assignment
-# 3.1.1 no partition number, no named partitions, no subpartitions mentioned
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1);
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) default NULL,
- `f2` char(20) default NULL
-) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH (f1)
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-UPDATE t1 SET f1 = f1 + 200
-WHERE f1 BETWEEN 100 - 50 AND 100 + 50;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 )
-AS my_value FROM t1;
-my_value
-1
-DELETE FROM t1
-WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200;
-SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SET f1 = 0 , f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######';
-my_value
-1
-INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######';
-my_value
-1
-UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ'
- WHERE f1 = 0 AND f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-my_value
-1
-DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
-my_value
-1
-TRUNCATE t1;
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-DROP TABLE t1;
-# 3.1.2 no partition number, named partitions, no subpartitions mentioned
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) (PARTITION part1, PARTITION part2);
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) default NULL,
- `f2` char(20) default NULL
-) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH (f1) (PARTITION part1 ENGINE = ndbcluster, PARTITION part2 ENGINE = ndbcluster)
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-UPDATE t1 SET f1 = f1 + 200
-WHERE f1 BETWEEN 100 - 50 AND 100 + 50;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 )
-AS my_value FROM t1;
-my_value
-1
-DELETE FROM t1
-WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200;
-SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SET f1 = 0 , f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######';
-my_value
-1
-INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######';
-my_value
-1
-UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ'
- WHERE f1 = 0 AND f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-my_value
-1
-DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
-my_value
-1
-TRUNCATE t1;
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-DROP TABLE t1;
-# 3.1.3 variations on no partition/subpartition number, named partitions,
-# different subpartitions are/are not named
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1) (PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2000), PARTITION part3 VALUES LESS THAN (2147483647)) ;
-DROP TABLE t1;
-# FIXME several subtestcases of 3.1.3 disabled because of server crashes
-# Bug#15407 Partitions: crash if subpartition
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1) (PARTITION part1 VALUES LESS THAN (1000)
-(SUBPARTITION subpart11 , SUBPARTITION subpart12 ), PARTITION part2 VALUES LESS THAN (2000)
-(SUBPARTITION subpart21 , SUBPARTITION subpart22 ), PARTITION part3 VALUES LESS THAN (2147483647)
-(SUBPARTITION subpart21 , SUBPARTITION subpart22 )) ;
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) default NULL,
- `f2` char(20) default NULL
-) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) (PARTITION part1 VALUES LESS THAN (1000) (SUBPARTITION subpart11 ENGINE = ndbcluster, SUBPARTITION subpart12 ENGINE = ndbcluster), PARTITION part2 VALUES LESS THAN (2000) (SUBPARTITION subpart21 ENGINE = ndbcluster, SUBPARTITION subpart22 ENGINE = ndbcluster), PARTITION part3 VALUES LESS THAN (2147483647) (SUBPARTITION subpart21 ENGINE = ndbcluster, SUBPARTITION subpart22 ENGINE = ndbcluster))
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-UPDATE t1 SET f1 = f1 + 200
-WHERE f1 BETWEEN 100 - 50 AND 100 + 50;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 )
-AS my_value FROM t1;
-my_value
-1
-DELETE FROM t1
-WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200;
-SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SET f1 = 0 , f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######';
-my_value
-1
-INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######';
-my_value
-1
-UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ'
- WHERE f1 = 0 AND f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-my_value
-1
-DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
-my_value
-1
-TRUNCATE t1;
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-DROP TABLE t1;
-# 3.2 partition/subpartition numbers good and bad values and notations
-DROP TABLE IF EXISTS t1;
-# 3.2.1 partition/subpartition numbers INTEGER notation
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) PARTITIONS 2;
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) default NULL,
- `f2` char(20) default NULL
-) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH (f1) PARTITIONS 2
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-UPDATE t1 SET f1 = f1 + 200
-WHERE f1 BETWEEN 100 - 50 AND 100 + 50;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 )
-AS my_value FROM t1;
-my_value
-1
-DELETE FROM t1
-WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200;
-SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SET f1 = 0 , f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######';
-my_value
-1
-INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######';
-my_value
-1
-UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ'
- WHERE f1 = 0 AND f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-my_value
-1
-DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
-my_value
-1
-TRUNCATE t1;
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-DROP TABLE t1;
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1)
-SUBPARTITIONS 2
-(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647));
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) default NULL,
- `f2` char(20) default NULL
-) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) SUBPARTITIONS 2 (PARTITION part1 VALUES LESS THAN (1000) , PARTITION part2 VALUES LESS THAN (2147483647) )
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-UPDATE t1 SET f1 = f1 + 200
-WHERE f1 BETWEEN 100 - 50 AND 100 + 50;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 )
-AS my_value FROM t1;
-my_value
-1
-DELETE FROM t1
-WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200;
-SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SET f1 = 0 , f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######';
-my_value
-1
-INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######';
-my_value
-1
-UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ'
- WHERE f1 = 0 AND f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-my_value
-1
-DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
-my_value
-1
-TRUNCATE t1;
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-DROP TABLE t1;
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) PARTITIONS 1;
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) default NULL,
- `f2` char(20) default NULL
-) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH (f1) PARTITIONS 1
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-UPDATE t1 SET f1 = f1 + 200
-WHERE f1 BETWEEN 100 - 50 AND 100 + 50;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 )
-AS my_value FROM t1;
-my_value
-1
-DELETE FROM t1
-WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200;
-SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SET f1 = 0 , f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######';
-my_value
-1
-INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######';
-my_value
-1
-UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ'
- WHERE f1 = 0 AND f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-my_value
-1
-DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
-my_value
-1
-TRUNCATE t1;
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-DROP TABLE t1;
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1)
-SUBPARTITIONS 1
-(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647));
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) default NULL,
- `f2` char(20) default NULL
-) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) SUBPARTITIONS 1 (PARTITION part1 VALUES LESS THAN (1000) , PARTITION part2 VALUES LESS THAN (2147483647) )
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-UPDATE t1 SET f1 = f1 + 200
-WHERE f1 BETWEEN 100 - 50 AND 100 + 50;
-SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 )
-AS my_value FROM t1;
-my_value
-1
-DELETE FROM t1
-WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200;
-SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200)
-AS my_value FROM t1;
-my_value
-1
-INSERT INTO t1 SET f1 = 0 , f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######';
-my_value
-1
-INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######';
-my_value
-1
-UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ'
- WHERE f1 = 0 AND f2 = '#######';
-SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-my_value
-1
-DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ';
-SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
-my_value
-1
-TRUNCATE t1;
-SELECT COUNT(*) = 0 AS my_value FROM t1;
-my_value
-1
-DROP TABLE t1;
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) PARTITIONS 0;
-ERROR HY000: Number of partitions = 0 is not an allowed value
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1)
-SUBPARTITIONS 0
-(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647));
-ERROR HY000: Number of subpartitions = 0 is not an allowed value
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) PARTITIONS -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 2
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1)
-SUBPARTITIONS -1
-(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647));
-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
-(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2' at line 3
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) PARTITIONS 1000000;
-ERROR HY000: Too many partitions were defined
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1)
-SUBPARTITIONS 1000000
-(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647));
-ERROR HY000: Too many partitions were defined
-# 3.2.4 partition/subpartition numbers STRING notation
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) PARTITIONS '2';
-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 ''2'' at line 2
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1)
-SUBPARTITIONS '2'
-(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647));
-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 ''2'
-(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (' at line 3
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) PARTITIONS '2.0';
-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 ''2.0'' at line 2
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1)
-SUBPARTITIONS '2.0'
-(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647));
-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 ''2.0'
-(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN' at line 3
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) PARTITIONS '0.2E+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 ''0.2E+1'' at line 2
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1)
-SUBPARTITIONS '0.2E+1'
-(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647));
-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 ''0.2E+1'
-(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS T' at line 3
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) PARTITIONS '2A';
-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 ''2A'' at line 2
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1)
-SUBPARTITIONS '2A'
-(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647));
-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 ''2A'
-(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN ' at line 3
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) PARTITIONS 'A2';
-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 ''A2'' at line 2
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1)
-SUBPARTITIONS 'A2'
-(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647));
-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 ''A2'
-(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN ' at line 3
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) PARTITIONS '';
-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 2
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1)
-SUBPARTITIONS ''
-(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647));
-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 '''
-(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2' at line 3
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) PARTITIONS 'GARBAGE';
-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 ''GARBAGE'' at line 2
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1)
-SUBPARTITIONS 'GARBAGE'
-(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647));
-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 ''GARBAGE'
-(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS ' at line 3
-# 3.2.5 partition/subpartition numbers other notations
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) PARTITIONS 2A;
-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 '2A' at line 2
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1)
-SUBPARTITIONS 2A
-(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647));
-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 '2A
-(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2' at line 3
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) PARTITIONS A2;
-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 'A2' at line 2
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1)
-SUBPARTITIONS A2
-(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647));
-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 'A2
-(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2' at line 3
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) PARTITIONS GARBAGE;
-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 'GARBAGE' at line 2
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1)
-SUBPARTITIONS GARBAGE
-(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647));
-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 'GARBAGE
-(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS TH' at line 3
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) PARTITIONS "2";
-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 '"2"' at line 2
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1)
-SUBPARTITIONS "2"
-(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647));
-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 '"2"
-(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (' at line 3
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) PARTITIONS "2A";
-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 '"2A"' at line 2
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1)
-SUBPARTITIONS "2A"
-(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647));
-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 '"2A"
-(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN ' at line 3
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) PARTITIONS "A2";
-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 '"A2"' at line 2
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1)
-SUBPARTITIONS "A2"
-(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647));
-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 '"A2"
-(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN ' at line 3
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) PARTITIONS "GARBAGE";
-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 '"GARBAGE"' at line 2
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1)
-SUBPARTITIONS "GARBAGE"
-(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647));
-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 '"GARBAGE"
-(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS ' at line 3
-# 3.3 Mixups of number and names of partition/subpartition assigned
-# 3.3.1 (positive) number of partition/subpartition = number of named partition/subpartition
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) PARTITIONS 2 ( PARTITION part1, PARTITION part2 ) ;
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) default NULL,
- `f2` char(20) default NULL
-) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH (f1) (PARTITION part1 ENGINE = ndbcluster, PARTITION part2 ENGINE = ndbcluster)
-DROP TABLE t1;
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) PARTITIONS 2
-SUBPARTITION BY HASH(f1) SUBPARTITIONS 2
-( PARTITION part1 VALUES LESS THAN (1000)
-(SUBPARTITION subpart11, SUBPARTITION subpart12),
-PARTITION part2 VALUES LESS THAN (2147483647)
-(SUBPARTITION subpart21, SUBPARTITION subpart22)
-);
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `f1` int(11) default NULL,
- `f2` char(20) default NULL
-) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) (PARTITION part1 VALUES LESS THAN (1000) (SUBPARTITION subpart11 ENGINE = ndbcluster, SUBPARTITION subpart12 ENGINE = ndbcluster), PARTITION part2 VALUES LESS THAN (2147483647) (SUBPARTITION subpart21 ENGINE = ndbcluster, SUBPARTITION subpart22 ENGINE = ndbcluster))
-DROP TABLE t1;
-# 3.3.2 (positive) number of partition/subpartition , 0 (= no) named partition/subpartition
-# already checked above
-# 3.3.3 (negative) number of partitions > number of named partitions
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) PARTITIONS 2 ( PARTITION part1 ) ;
-ERROR 42000: Wrong number of partitions defined, mismatch with previous setting near ')' at line 2
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1)
-SUBPARTITION BY HASH(f1) SUBPARTITIONS 2
-( PARTITION part1 VALUES LESS THAN (1000)
-(SUBPARTITION subpart11 ),
-PARTITION part2 VALUES LESS THAN (2147483647)
-(SUBPARTITION subpart21, SUBPARTITION subpart22)
-);
-ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '),
-PARTITION part2 VALUES LESS THAN (2147483647)
-(SUBPARTITION subpart21, SUBPAR' at line 5
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1)
-SUBPARTITION BY HASH(f1) SUBPARTITIONS 2
-( PARTITION part1 VALUES LESS THAN (1000)
-(SUBPARTITION subpart11, SUBPARTITION subpart12),
-PARTITION part2 VALUES LESS THAN (2000)
-(SUBPARTITION subpart21 ),
-PARTITION part3 VALUES LESS THAN (2147483647)
-(SUBPARTITION subpart31, SUBPARTITION subpart32)
-);
-ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '),
-PARTITION part3 VALUES LESS THAN (2147483647)
-(SUBPARTITION subpart31, SUBPAR' at line 7
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY RANGE(f1) PARTITIONS 2
-SUBPARTITION BY HASH(f1) SUBPARTITIONS 2
-( PARTITION part1 VALUES LESS THAN (1000)
-(SUBPARTITION subpart11, SUBPARTITION subpart12),
-PARTITION part2 VALUES LESS THAN (2147483647)
-(SUBPARTITION subpart21 )
-);
-ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near ')
-)' at line 7
-#------------------------------------------------------------------------
-# 4. Checks of logical partition/subpartition name
-# file name clashes during CREATE TABLE
-#------------------------------------------------------------------------
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1) (PARTITION part1, PARTITION part1);
-ERROR HY000: Duplicate partition name part1
-#------------------------------------------------------------------------
-# 5. Alter table experiments
-#------------------------------------------------------------------------
-# 5.1 alter table add partition
-# 5.1.1 (negative) add partition to non partitioned table
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20));
-# FIXME Why does the error numbers of MyISAM(1482) and NDB(1005) differ ?
-ALTER TABLE t1 ADD PARTITION (PARTITION part1);
-Got one of the listed errors
-DROP TABLE t1;
-# 5.1.2 Add one partition to a table with one partition
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
-PARTITION BY HASH(f1);
-INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 100;
diff --git a/mysql-test/suite/ndb/r/ps_7ndb.result b/mysql-test/suite/ndb/r/ps_7ndb.result
index f59b6e4452b..70d511d5398 100644
--- a/mysql-test/suite/ndb/r/ps_7ndb.result
+++ b/mysql-test/suite/ndb/r/ps_7ndb.result
@@ -63,7 +63,7 @@ def test t9 t9 c11 c11 246 9 6 Y 0 4 63
def test t9 t9 c12 c12 246 10 6 Y 0 4 63
def test t9 t9 c13 c13 10 10 10 Y 128 0 63
def test t9 t9 c14 c14 12 19 19 Y 128 0 63
-def test t9 t9 c15 c15 7 19 19 N 1249 0 63
+def test t9 t9 c15 c15 7 19 19 N 9441 0 63
def test t9 t9 c16 c16 11 8 8 Y 128 0 63
def test t9 t9 c17 c17 13 4 4 Y 32864 0 63
def test t9 t9 c18 c18 1 4 1 Y 32768 0 63
@@ -783,20 +783,20 @@ a b
2 two
3 three
4 four
-prepare stmt1 from ' SELECT a as ccc from t1 where a+1=
- (SELECT 1+ccc from t1 where ccc+1=a+1 and a=1) ';
+prepare stmt1 from ' SELECT a as ccc from t1 outr where a+1=
+ (SELECT 1+outr.a from t1 where outr.a+1=a+1 and a=1) ';
execute stmt1 ;
ccc
1
deallocate prepare stmt1 ;
-prepare stmt1 from ' SELECT a as ccc from t1 where a+1=
- (SELECT 1+ccc from t1 where ccc+1=a+1 and a=1) ';
+prepare stmt1 from ' SELECT a as ccc from t1 outr where a+1=
+ (SELECT 1+outr.a from t1 where outr.a+1=a+1 and a=1) ';
execute stmt1 ;
ccc
1
deallocate prepare stmt1 ;
-prepare stmt1 from ' SELECT a as ccc from t1 where a+1=
- (SELECT 1+ccc from t1 where ccc+1=a+1 and a=1) ';
+prepare stmt1 from ' SELECT a as ccc from t1 outr where a+1=
+ (SELECT 1+outr.a from t1 where outr.a+1=a+1 and a=1) ';
execute stmt1 ;
ccc
1
@@ -2956,11 +2956,13 @@ Warnings:
Note 1265 Data truncated for column 'c13' at row 1
Warning 1265 Data truncated for column 'c17' at row 1
Warnings:
+Note 1265 Data truncated for column 'c13' at row 1
Warning 1265 Data truncated for column 'c17' at row 1
Warnings:
Note 1265 Data truncated for column 'c13' at row 1
Warning 1265 Data truncated for column 'c17' at row 1
Warnings:
+Note 1265 Data truncated for column 'c13' at row 1
Warning 1265 Data truncated for column 'c17' at row 1
Warnings:
Note 1265 Data truncated for column 'c13' at row 1
@@ -2994,7 +2996,6 @@ Warning 1265 Data truncated for column 'c15' at row 1
Warning 1264 Out of range value for column 'c16' at row 1
Warning 1264 Out of range value for column 'c17' at row 1
Warnings:
-Note 1265 Data truncated for column 'c13' at row 1
Warning 1265 Data truncated for column 'c15' at row 1
Warning 1264 Out of range value for column 'c16' at row 1
Warning 1264 Out of range value for column 'c17' at row 1
diff --git a/mysql-test/suite/ndb/t/disabled.def b/mysql-test/suite/ndb/t/disabled.def
index 9c2dc80d5ee..1752314ea47 100644
--- a/mysql-test/suite/ndb/t/disabled.def
+++ b/mysql-test/suite/ndb/t/disabled.def
@@ -9,13 +9,13 @@
# Do not use any TAB characters for whitespace.
#
##############################################################################
-ndb_dd_sql_features : Bug#29102 ndb_dd_sql_features fails in pushbuild
-ndb_load : BUG#17233 2006-05-04 tomas failed load data from infile causes mysqld dbug_assert, binlog not flushed
-
partition_03ndb : BUG#16385 2006-03-24 mikael Partitions: crash when updating a range partitioned NDB table
ndb_partition_error2 : HF is not sure if the test can work as internded on all the platforms
+ndb_binlog_basic : Bug #32759 2007-11-27 mats ndb_binlog_basic assert failure 'thd->transaction.stmt.modified_non_trans_table'
# the below testcase have been reworked to avoid the bug, test contains comment, keep bug open
#ndb_binlog_ddl_multi : BUG#18976 2006-04-10 kent CRBR: multiple binlog, second binlog may miss schema log events
#ndb_binlog_discover : bug#21806 2006-08-24
+ndb_backup_print : Bug#32357: ndb_backup_print test fails sometimes in pushbuild
+ndb_dd_backuprestore : Bug#32659 ndb_dd_backuprestore.test fails randomly
diff --git a/mysql-test/suite/ndb/t/ndb_condition_pushdown.test b/mysql-test/suite/ndb/t/ndb_condition_pushdown.test
index ab56430ac1d..9e6a5e90e40 100644
--- a/mysql-test/suite/ndb/t/ndb_condition_pushdown.test
+++ b/mysql-test/suite/ndb/t/ndb_condition_pushdown.test
@@ -1752,5 +1752,1030 @@ SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%');
set engine_condition_pushdown = 1;
SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%');
+# bug#29390 (scan filter is too large, discarded)
+
+drop table t1;
+
+create table t1 (a int, b int, c int, d int, primary key using hash(a))
+ engine=ndbcluster;
+
+insert into t1 values (10,1,100,0+0x1111);
+insert into t1 values (20,2,200,0+0x2222);
+insert into t1 values (30,3,300,0+0x3333);
+insert into t1 values (40,4,400,0+0x4444);
+insert into t1 values (50,5,500,0+0x5555);
+
+set engine_condition_pushdown = on;
+
+select a,b,d from t1
+ where b in (0,1,2,5)
+ order by b;
+
+--disable_query_log
+select a,b,d from t1
+ where b in (
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
+0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2)
+ order by b;
+--enable_query_log
+
set engine_condition_pushdown = @old_ecpd;
DROP TABLE t1,t2,t3,t4,t5;
diff --git a/mysql-test/suite/ndb/t/ndb_lock_table.test b/mysql-test/suite/ndb/t/ndb_lock_table.test
new file mode 100644
index 00000000000..6c21e8e8232
--- /dev/null
+++ b/mysql-test/suite/ndb/t/ndb_lock_table.test
@@ -0,0 +1,15 @@
+-- source include/have_ndb.inc
+
+# BUG 30996
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+create table t1 (a int) engine ndb;
+set autocommit=1;
+lock table t1 write;
+set autocommit=0;
+insert into t1 values (0);
+rollback;
+select * from t1;
+unlock tables;
+drop table t1;
diff --git a/mysql-test/suite/ndb/t/ndb_multi.test b/mysql-test/suite/ndb/t/ndb_multi.test
index b8e052d606b..c2217b51d08 100644
--- a/mysql-test/suite/ndb/t/ndb_multi.test
+++ b/mysql-test/suite/ndb/t/ndb_multi.test
@@ -122,4 +122,33 @@ connection server2;
show tables;
drop database db;
+
+#
+# bug#31470, ndb table with special characters in name
+# are not discovered correctly
+connection server1;
+use test;
+create table `test`.`t1$EX`
+ (server_id int unsigned,
+ master_server_id int unsigned,
+ master_epoch bigint unsigned,
+ count int unsigned,
+ primary key(server_id, master_server_id,
+ master_epoch, count))
+ engine ndb;
+
+# check that table shows up ok on both servers
+# before bugfix table would not show up on server2
+--replace_regex /EX/ex/
+show tables like '%$%';
+connection server2;
+use test;
+--replace_regex /EX/ex/
+show tables like '%$%';
+
+# check cleanup
+drop table `test`.`t1$EX`;
+show tables like '%$%';
+
connection server1;
+show tables like '%$%';
diff --git a/mysql-test/suite/ndb/t/ndb_update.test b/mysql-test/suite/ndb/t/ndb_update.test
index c45f990edcc..ab0fbee171e 100644
--- a/mysql-test/suite/ndb/t/ndb_update.test
+++ b/mysql-test/suite/ndb/t/ndb_update.test
@@ -35,6 +35,11 @@ UPDATE IGNORE t1 set pk1 = 1, c = 2 where pk1 = 4;
select * from t1 order by pk1;
UPDATE t1 set pk1 = pk1 + 10;
select * from t1 order by pk1;
+# bug#25817
+create unique index ib on t1(b);
+update t1 set c = 4 where pk1 = 12;
+update ignore t1 set b = 55 where pk1 = 14;
+select * from t1 order by pk1;
--disable_warnings
DROP TABLE IF EXISTS t1;
diff --git a/mysql-test/suite/ndb/t/ndb_update_no_read.test b/mysql-test/suite/ndb/t/ndb_update_no_read.test
new file mode 100644
index 00000000000..60bea53b7b5
--- /dev/null
+++ b/mysql-test/suite/ndb/t/ndb_update_no_read.test
@@ -0,0 +1,79 @@
+-- source include/have_ndb.inc
+-- source include/not_embedded.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+#
+# New test case for WL 3686 (which is not until CGE-6.3)
+# but test is committed in 5.1 to verify consistant results.
+#
+# When only constant expressions in update statements and
+# only PK or UK in WHERE clause. No extra WHERE parts are
+# allowed. WL #3687 takes of more advanced variants of
+# avoiding the read before the update/delete
+
+create table t1 (a int not null primary key, b int not null, c int,
+ unique index_b (b) using hash)
+engine ndb;
+
+insert into t1 values (1,10,1),(2,9,1),(3,8,1),(4,7,1),(5,6,1),(6,5,2),(7,4,2),(8,3,2),
+ (9,2,2),(10,1,2);
+
+# These ones should use optimisation
+
+update t1 set c = 111, b = 20 where a = 1;
+
+select * from t1 where a = 1 order by a;
+
+delete from t1 where a = 1;
+
+select * from t1 where a = 1 order by a;
+
+update t1 set c = 12, b = 19 where b = 2;
+
+select * from t1 where b = 2 order by a;
+
+delete from t1 where b = 19;
+
+select * from t1 where b = 19 order by a;
+
+update t1 set c = 22 where a = 10 or a >= 10;
+
+select * from t1 order by a;
+
+update t1 set c = 23 where a in (8,10);
+
+select * from t1 order by a;
+
+update t1 set c = 23 where a in (7,8) or a >= 10;
+
+select * from t1 order by a;
+
+# These ones should not use optimisation
+
+update t1 set c = 11 where a = 3 or b = 7;
+
+select * from t1 where a = 3 or b = 7 order by a;
+
+update t1 set a = 13, b = 20 where a = 3;
+
+select * from t1 where a = 13 order by a;
+
+update t1 set a = 12, b = 19 where b = 7;
+
+select * from t1 where b = 19 order by a;
+
+select * from t1 where b = 7 order by a;
+
+update t1 set c = 12, b = 29 where a = 5 and b = 6;
+
+select * from t1 where b = 19 order by a;
+
+delete from t1 where b = 6 and c = 12;
+
+select * from t1 where b = 6 order by a;
+
+drop table t1;
+
diff --git a/mysql-test/suite/ndb/t/partition_03ndb.test b/mysql-test/suite/ndb/t/partition_03ndb.test
deleted file mode 100644
index 3190ab9dfc7..00000000000
--- a/mysql-test/suite/ndb/t/partition_03ndb.test
+++ /dev/null
@@ -1,26 +0,0 @@
-###############################################
-# #
-# Partition tests NDB tables #
-# #
-###############################################
-
-#
-# NOTE: PLEASE DO NOT ADD NOT NDB SPECIFIC TESTCASES HERE !
-# NON STORAGE SPECIFIC TESTCASES SHOULD BE ADDED IN
-# THE SOURCED FIELS ONLY.
-#
-
-# Storage engine to be tested
-let $engine= 'NDB' ;
--- source include/have_ndb.inc
-eval SET SESSION storage_engine=$engine;
-
-
-# Other storage engine <> storage engine to be tested
-let $engine_other= 'MEMORY';
-# number of rows for the INSERT/UPDATE/DELETE/SELECT experiments
-# on partioned tables
-# Attention: In the moment the result files fit to @max_row = 200 only
-SET @max_row = 200;
-
--- source include/partition_1.inc
diff --git a/mysql-test/suite/parts/inc/methods1.inc b/mysql-test/suite/parts/inc/methods1.inc
index 24006b6e0f1..d986b67a456 100644
--- a/mysql-test/suite/parts/inc/methods1.inc
+++ b/mysql-test/suite/parts/inc/methods1.inc
@@ -1,5 +1,5 @@
################################################################################
-# include/partition_methods1.inc #
+# inc/partition_methods1.inc #
# #
# Purpose: #
# Create and check partitioned tables #
@@ -11,7 +11,7 @@
# do #
# 1. Create the partitioned table #
# 2 Insert the content of the table t0_template into t1 #
-# 3. Execute include/partition_check.inc #
+# 3. Execute inc/partition_check.inc #
# 4. Drop the table t1 #
# done #
# #
@@ -21,14 +21,14 @@
# has to be set before sourcing this routine. #
# Example: #
# let $unique= , UNIQUE INDEX uidx1 (f_int1); #
-# include/partition_method1s.inc #
+# inc/partition_method1s.inc #
# #
-# Attention: The routine include/partition_methods2.inc is very similar #
+# Attention: The routine inc/partition_methods2.inc is very similar #
# to this one. So if something has to be changed here it #
# might be necessary to do it also there #
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
+# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@@ -52,7 +52,6 @@ $unique
$partitioning;
eval $insert_all;
--source suite/parts/inc/partition_check.inc
-# --source include/partition_check.inc
DROP TABLE t1;
#----------- PARTITION BY KEY
@@ -67,7 +66,6 @@ $unique
$partitioning;
eval $insert_all;
--source suite/parts/inc/partition_check.inc
-# --source include/partition_check.inc
DROP TABLE t1;
#----------- PARTITION BY LIST
@@ -90,7 +88,6 @@ $unique
$partitioning;
eval $insert_all;
--source suite/parts/inc/partition_check.inc
-# --source include/partition_check.inc
DROP TABLE t1;
#----------- PARTITION BY RANGE
@@ -114,7 +111,6 @@ $unique
$partitioning;
eval $insert_all;
--source suite/parts/inc/partition_check.inc
-# --source include/partition_check.inc
DROP TABLE t1;
#----------- PARTITION BY RANGE -- SUBPARTITION BY HASH
@@ -137,7 +133,6 @@ $unique
$partitioning;
eval $insert_all;
--source suite/parts/inc/partition_check.inc
-# --source include/partition_check.inc
DROP TABLE t1;
#----------- PARTITION BY RANGE -- SUBPARTITION BY KEY
@@ -163,7 +158,6 @@ $unique
$partitioning;
eval $insert_all;
--source suite/parts/inc/partition_check.inc
-# --source include/partition_check.inc
DROP TABLE t1;
#----------- PARTITION BY LIST -- SUBPARTITION BY HASH
@@ -186,7 +180,6 @@ $unique
$partitioning;
eval $insert_all;
--source suite/parts/inc/partition_check.inc
-# --source include/partition_check.inc
DROP TABLE t1;
#----------- PARTITION BY LIST -- SUBPARTITION BY KEY
@@ -209,5 +202,4 @@ $unique
$partitioning;
eval $insert_all;
--source suite/parts/inc/partition_check.inc
-# --source include/partition_check.inc
DROP TABLE t1;
diff --git a/mysql-test/suite/parts/inc/part_blocked_sql_funcs_main.inc b/mysql-test/suite/parts/inc/part_blocked_sql_funcs_main.inc
index cba5c47f01b..1a66a26312a 100644
--- a/mysql-test/suite/parts/inc/part_blocked_sql_funcs_main.inc
+++ b/mysql-test/suite/parts/inc/part_blocked_sql_funcs_main.inc
@@ -21,253 +21,207 @@ let $sqlfunc = ascii(col1);
let $valsqlfunc = ascii('a');
let $coltype = char(30);
--source suite/parts/inc/partition_blocked_sql_funcs.inc
-# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = ord(col1);
let $valsqlfunc = ord('a');
let $coltype = char(30);
--source suite/parts/inc/partition_blocked_sql_funcs.inc
-# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = greatest(col1,15);
let $valsqlfunc = greatest(1,15);
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
-# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = isnull(col1);
let $valsqlfunc = isnull(15);
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
-# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = least(col1,15);
let $valsqlfunc = least(15,30);
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
-# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = case when col1>15 then 20 else 10 end;
let $valsqlfunc = case when 1>30 then 20 else 15 end;
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
-# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = ifnull(col1,30);
let $valsqlfunc = ifnull(1,30);
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
-# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = nullif(col1,30);
let $valsqlfunc = nullif(1,30);
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
-# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = bit_length(col1);
let $valsqlfunc = bit_length(255);
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
-# --source include/partition_blocked_sql_funcs.inc
let $coltype = char(30);
--source suite/parts/inc/partition_blocked_sql_funcs.inc
-# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = char_length(col1);
let $valsqlfunc = char_length('a');
#let $coltype = int;
#--source suite/parts/inc/partition_blocked_sql_funcs.inc
-# --source include/partition_blocked_sql_funcs.inc
let $coltype = char(30);
--source suite/parts/inc/partition_blocked_sql_funcs.inc
-# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = character_length(col1);
let $valsqlfunc = character_length('a');
let $coltype = char(30)
--source suite/parts/inc/partition_blocked_sql_funcs.inc
-# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = find_in_set(col1,'1,2,3,4,5,6,7,8,9');
let $valsqlfunc = find_in_set('i','a,b,c,d,e,f,g,h,i');
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
-# --source include/partition_blocked_sql_funcs.inc
let $coltype = char(30);
--source suite/parts/inc/partition_blocked_sql_funcs.inc
-# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = instr(col1,'acb');
let $valsqlfunc = instr('i','a,b,c,d,e,f,g,h,i');
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
-# --source include/partition_blocked_sql_funcs.inc
let $coltype = char(30);
--source suite/parts/inc/partition_blocked_sql_funcs.inc
-# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = length(col1);
let $valsqlfunc = length('a,b,c,d,e,f,g,h,i');
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
-# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = locate('a',col1);
let $valsqlfunc = locate('i','a,b,c,d,e,f,g,h,i');
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
-# --source include/partition_blocked_sql_funcs.inc
let $coltype = char(30);
--source suite/parts/inc/partition_blocked_sql_funcs.inc
-# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = octet_length(col1);
let $valsqlfunc = octet_length('a,b,c,d,e,f,g,h,i');
--source suite/parts/inc/partition_blocked_sql_funcs.inc
-# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = position('a' in col1);
let $valsqlfunc = position('i' in 'a,b,c,d,e,f,g,h,i');
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
-# --source include/partition_blocked_sql_funcs.inc
let $coltype = char(30);
--source suite/parts/inc/partition_blocked_sql_funcs.inc
-# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = strcmp(col1,'acb');
let $valsqlfunc = strcmp('i','a,b,c,d,e,f,g,h,i');
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
-# --source include/partition_blocked_sql_funcs.inc
let $coltype = char(30);
--source suite/parts/inc/partition_blocked_sql_funcs.inc
-# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = crc32(col1);
let $valsqlfunc = crc32('a,b,c,d,e,f,g,h,i');
let $coltype = char(30);
--source suite/parts/inc/partition_blocked_sql_funcs.inc
-# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = round(col1);
let $valsqlfunc = round(15);
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
-# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = sign(col1);
let $valsqlfunc = sign(123);
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
-# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = period_add(col1,5);
let $valsqlfunc = period_add(9804,5);
let $coltype = datetime;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
-# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = period_diff(col1,col2);
let $valsqlfunc = period_diff(9809,199907);
let $coltype = datetime,col2 datetime;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
-# --source include/partition_blocked_sql_funcs.inc
let $coltype = int,col2 int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
-# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = timestampdiff(day,5,col1);
let $valsqlfunc = timestampdiff(YEAR,'2002-05-01','2001-01-01');
let $coltype = datetime;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
-# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = unix_timestamp(col1);
let $valsqlfunc = unix_timestamp ('2002-05-01');
let $coltype = date;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
-# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = week(col1);
let $valsqlfunc = week('2002-05-01');
let $coltype = datetime;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
-# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = weekofyear(col1);
let $valsqlfunc = weekofyear('2002-05-01');
let $coltype = datetime;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
-# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = cast(col1 as signed);
let $valsqlfunc = cast(123 as signed);
let $coltype = varchar(30);
--source suite/parts/inc/partition_blocked_sql_funcs.inc
-# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = convert(col1,unsigned);
let $valsqlfunc = convert(123,unsigned);
let $coltype = varchar(30);
--source suite/parts/inc/partition_blocked_sql_funcs.inc
-# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = col1 | 20;
let $valsqlfunc = 10 | 20;
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
-# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = col1 & 20;
let $valsqlfunc = 10 & 20;
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
-# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = col1 ^ 20;
let $valsqlfunc = 10 ^ 20;
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
-# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = col1 << 20;
let $valsqlfunc = 10 << 20;
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
-# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = col1 >> 20;
let $valsqlfunc = 10 >> 20;
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
-# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = ~col1;
let $valsqlfunc = ~20;
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
-# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = bit_count(col1);
let $valsqlfunc = bit_count(20);
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
-# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = inet_aton(col1);
let $valsqlfunc = inet_aton('192.168.1.1');
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
-# --source include/partition_blocked_sql_funcs.inc
set @var =20;
let $sqlfunc = bit_length(col1)+@var-@var;
let $valsqlfunc = bit_length(20)+@var-@var;
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
-# --source include/partition_blocked_sql_funcs.inc
delimiter //;
@@ -298,5 +252,4 @@ let $sqlfunc = getmaxsigned_t1(col1);
let $valsqlfunc = getmaxsigned(10);
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
-# --source include/partition_blocked_sql_funcs.inc
drop function if exists getmaxsigned_t1;
diff --git a/mysql-test/suite/parts/inc/part_supported_sql_funcs_delete.inc b/mysql-test/suite/parts/inc/part_supported_sql_funcs_delete.inc
index c0769cdeef1..3a486619b0b 100644
--- a/mysql-test/suite/parts/inc/part_supported_sql_funcs_delete.inc
+++ b/mysql-test/suite/parts/inc/part_supported_sql_funcs_delete.inc
@@ -1,5 +1,6 @@
################################################################################
-# t/part_supported_sql_funcs_delete.inc # # #
+# t/part_supported_sql_funcs_delete.inc #
+# #
# Purpose: #
# Delete access of the tests frame for allowed sql functions #
# #
diff --git a/mysql-test/suite/parts/inc/part_supported_sql_funcs_main.inc b/mysql-test/suite/parts/inc/part_supported_sql_funcs_main.inc
index 4761d15c6d3..25a9774d2a1 100644
--- a/mysql-test/suite/parts/inc/part_supported_sql_funcs_main.inc
+++ b/mysql-test/suite/parts/inc/part_supported_sql_funcs_main.inc
@@ -38,7 +38,6 @@ let $val2 = 13 ;
let $val3 = 17 ;
let $val4 = 15 ;
--source suite/parts/inc/partition_supported_sql_funcs.inc
-# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = ceiling(col1);
@@ -51,7 +50,6 @@ let $val3 = 17.987;
let $val4 = 15.654 ;
# DISABLED due to bug 30577
#--source suite/parts/inc/partition_supported_sql_funcs.inc
-# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = floor(col1);
let $valsqlfunc = floor(15.123);
@@ -63,7 +61,6 @@ let $val3 = 17.987;
let $val4 = 15.654 ;
# DISABLED due to bug 30577
#--source suite/parts/inc/partition_supported_sql_funcs.inc
-# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = mod(col1,10);
let $valsqlfunc = mod(15,10);
@@ -74,7 +71,6 @@ let $val2 = 19;
let $val3 = 17;
let $val4 = 15 ;
--source suite/parts/inc/partition_supported_sql_funcs.inc
-# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = day(col1);
let $valsqlfunc = day('2006-12-21');
@@ -85,7 +81,6 @@ let $val2 = '2006-01-17';
let $val3 = '2006-01-25';
let $val4 = '2006-02-05';
--source suite/parts/inc/partition_supported_sql_funcs.inc
-# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = dayofmonth(col1);
let $valsqlfunc = dayofmonth('2006-12-24');
@@ -96,7 +91,6 @@ let $val2 = '2006-01-17';
let $val3 = '2006-01-25';
let $val4 = '2006-02-05';
--source suite/parts/inc/partition_supported_sql_funcs.inc
-# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = dayofweek(col1);
let $valsqlfunc = dayofweek('2006-12-24');
@@ -107,7 +101,6 @@ let $val2 = '2006-02-17';
let $val3 = '2006-01-25';
let $val4 = '2006-02-05';
--source suite/parts/inc/partition_supported_sql_funcs.inc
-# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = dayofyear(col1);
let $valsqlfunc = dayofyear('2006-12-25');
@@ -118,10 +111,8 @@ let $val2 = '2006-01-17';
let $val3 = '2006-02-25';
let $val4 = '2006-02-05';
--source suite/parts/inc/partition_supported_sql_funcs.inc
-# --source include/partition_supported_sql_funcs.inc
let $coltype = char(30);
--source suite/parts/inc/partition_supported_sql_funcs.inc
-# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = extract(month from col1);
let $valsqlfunc = extract(year from '1998-11-23');
@@ -132,7 +123,6 @@ let $val2 = '2006-02-17';
let $val3 = '2006-01-25';
let $val4 = '2006-02-05';
--source suite/parts/inc/partition_supported_sql_funcs.inc
-# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = hour(col1);
let $valsqlfunc = hour('18:30');
@@ -143,7 +133,6 @@ let $val2 = '14:30';
let $val3 = '21:59';
let $val4 = '10:30';
--source suite/parts/inc/partition_supported_sql_funcs.inc
-# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = microsecond(col1);
let $valsqlfunc = microsecond('10:30:10.000010');
@@ -154,7 +143,6 @@ let $val2 = '04:30:01.000018';
let $val3 = '00:59:22.000024';
let $val4 = '05:30:34.000037';
--source suite/parts/inc/partition_supported_sql_funcs.inc
-# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = minute(col1);
let $valsqlfunc = minute('18:30');
@@ -164,7 +152,6 @@ let $val2 = '14:30:45';
let $val3 = '21:59:22';
let $val4 = '10:24:23';
--source suite/parts/inc/partition_supported_sql_funcs.inc
-# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = second(col1);
let $valsqlfunc = second('18:30:14');
@@ -175,10 +162,8 @@ let $val2 = '14:30:20';
let $val3 = '21:59:22';
let $val4 = '10:22:33';
--source suite/parts/inc/partition_supported_sql_funcs.inc
-# --source include/partition_supported_sql_funcs.inc
let $coltype = char(30);
--source suite/parts/inc/partition_supported_sql_funcs.inc
-# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = month(col1);
let $valsqlfunc = month('2006-10-14');
@@ -189,7 +174,6 @@ let $val2 = '2006-12-17';
let $val3 = '2006-05-25';
let $val4 = '2006-11-06';
--source suite/parts/inc/partition_supported_sql_funcs.inc
-# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = quarter(col1);
let $valsqlfunc = quarter('2006-10-14');
@@ -200,7 +184,6 @@ let $val2 = '2006-12-17';
let $val3 = '2006-09-25';
let $val4 = '2006-07-30';
--source suite/parts/inc/partition_supported_sql_funcs.inc
-# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = time_to_sec(col1)-(time_to_sec(col1)-20);
let $valsqlfunc = time_to_sec('18:30:14')-(time_to_sec('17:59:59'));
@@ -211,7 +194,6 @@ let $val2 = '14:30:45';
let $val3 = '21:59:22';
let $val4 = '10:33:11';
--source suite/parts/inc/partition_supported_sql_funcs.inc
-# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = to_days(col1)-to_days('2006-01-01');
let $valsqlfunc = to_days('2006-02-02')-to_days('2006-01-01');
@@ -222,7 +204,6 @@ let $val2 = '2006-01-17';
let $val3 = '2006-01-25';
let $val4 = '2006-02-06';
--source suite/parts/inc/partition_supported_sql_funcs.inc
-# --source include/partition_supported_sql_funcs.inc
# DATEDIFF() is implemented as (TO_DAYS(d1) - TO_DAYS(d2))
let $sqlfunc = datediff(col1, '2006-01-01');
@@ -234,7 +215,6 @@ let $val2 = '2006-01-17';
let $val3 = '2006-01-25';
let $val4 = '2006-02-06';
--source suite/parts/inc/partition_supported_sql_funcs.inc
-# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = weekday(col1);
let $valsqlfunc = weekday('2006-10-14');
@@ -245,7 +225,6 @@ let $val2 = '2006-11-17';
let $val3 = '2006-05-25';
let $val4 = '2006-02-06';
--source suite/parts/inc/partition_supported_sql_funcs.inc
-# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = year(col1)-1990;
let $valsqlfunc = year('2005-10-14')-1990;
@@ -256,7 +235,6 @@ let $val2 = '2000-02-17';
let $val3 = '2004-05-25';
let $val4 = '2002-02-15';
--source suite/parts/inc/partition_supported_sql_funcs.inc
-# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = yearweek(col1)-200600;
let $valsqlfunc = yearweek('2006-10-14')-200600;
@@ -267,4 +245,3 @@ let $val2 = '2006-08-17';
let $val3 = '2006-03-25';
let $val4 = '2006-11-15';
--source suite/parts/inc/partition_supported_sql_funcs.inc
-# --source include/partition_supported_sql_funcs.inc
diff --git a/mysql-test/suite/parts/inc/partition.pre b/mysql-test/suite/parts/inc/partition.pre
index c09cfed29e6..0c906ce4581 100644
--- a/mysql-test/suite/parts/inc/partition.pre
+++ b/mysql-test/suite/parts/inc/partition.pre
@@ -1,5 +1,5 @@
################################################################################
-# include/partition.pre #
+# inc/partition.pre #
# #
# Purpose: #
# Auxiliary script creating prerequisites needed by the partitioning tests #
@@ -12,41 +12,35 @@
# The README for the partitioning testcases is at the end of this file. #
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
-# Original Date: 2006-03-05 #
-# Change Author: #
-# Change Date: #
-# Change: #
+# Original Author: mleich #
+# Original Date: 2006-03-05 #
+# Change Author: mleich #
+# Change Date: 2007-10-08 #
+# Change: Minor cleanup and fix for #
+# Bug#31243 Test "partition_basic_myisam" truncates path names#
+# - Blow column file_list up to VARBINARY(10000) #
+# - remove reference to fixed bugs #17455, #19305 #
################################################################################
# Set the session storage engine
eval SET @@session.storage_engine = $engine;
##### Disabled/affected testcases, because of open bugs #####
---echo
---echo #------------------------------------------------------------------------
---echo # There are several testcases disabled because of the open bugs
---echo # #15890
-if (`SELECT @@session.storage_engine IN('ndbcluster')`)
-{
---echo # #18730, Bug#18735
-}
---echo # The expected results suffer from the following bugs
---echo # harmless #17455, #19305
---echo # which cannot be suppressed because of technical reasons.
---echo #------------------------------------------------------------------------
-# Attention: Only bugs appearing in all storage engines should be mentioned above.
-# The top level test wrapper (example: t/partition_basic_ndb.test)
-# may set the $fixed_bug<nnnnn> variable to 0 after sourcing
-# this file.
-# Bug#15890 Partitions: Strange interpretation of partition number
-let $fixed_bug15890= 0;
-# Bug#18730: Partitions: NDB, crash on SELECT MIN(<unique column>)
-# Attention: NDB testcases set this variable later to 0
-let $fixed_bug18730= 1;
-# Bug#18735: Partitions: NDB, UNIQUE INDEX, UPDATE, strange server response
-# Attention: NDB testcases set this variable later to 0
-let $fixed_bug18735= 1;
+# --echo
+# --echo #------------------------------------------------------------------------
+# --echo # There are several testcases disabled because of the open bugs
+# if (`SELECT @@session.storage_engine IN('ndbcluster')`)
+# {
+# --echo # #18730
+# }
+# --echo #------------------------------------------------------------------------
+# # Attention: Only bugs appearing in all storage engines should be mentioned above.
+# # The top level test wrapper (example: t/partition_basic_ndb.test)
+# # may set the $fixed_bug<nnnnn> variable to 0 after sourcing
+# # this file.
+# # Bug#18730: Partitions: NDB, crash on SELECT MIN(<unique column>)
+# # Attention: NDB testcases set this variable later to 0
+# let $fixed_bug18730= 1;
--echo
--echo #------------------------------------------------------------------------
@@ -66,6 +60,17 @@ if ($debug)
--echo # It is to be expected, that we get huge differences.
}
+let $ER_DUP_KEY= 1022;
+let $ER_GET_ERRNO= 1030;
+let $ER_BAD_NULL_ERROR= 1048;
+let $ER_DUP_ENTRY= 1062;
+let $ER_PARSE_ERROR= 1064;
+let $ER_TOO_MANY_PARTITIONS_ERROR= 1499;
+let $ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF= 1503;
+let $ER_NO_PARTS_ERROR= 1504;
+let $ER_DROP_PARTITION_NON_EXISTENT= 1507;
+let $ER_SAME_NAME_PARTITION= 1517;
+let $ER_NO_PARTITION_FOR_GIVEN_VALUE= 1526;
# Set the variable $engine_other to a storage engine <> $engine
--disable_query_log
@@ -164,7 +169,7 @@ DROP TABLE IF EXISTS t0_definition;
CREATE TABLE t0_definition (
state CHAR(3),
create_command VARBINARY(5000),
-file_list VARBINARY(5000),
+file_list VARBINARY(10000),
PRIMARY KEY (state)
) ENGINE = MEMORY;
@@ -308,23 +313,23 @@ if (0)
# (t/partition_<feature>_<engine>.test)
# a) General not engine specific settings and requirements
# $debug, $ls, @max_row, $more_trigger_tests, .....
-# --source include/have_partition.inc
+# --source inc/have_partition.inc
# b) Engine specific settings and requirements
# $do_pk_tests, $MAX_VALUE, $engine
# SET SESSION storage_engine
# $engine_other
# c) Generate the prerequisites ($variables, @variables, tables) needed
# via
-# --source include/partition.pre
+# --source inc/partition.pre
# d) Set "fixed_bug<number>" variables to 1 if there are open engine
# specific bugs which need worarounds.
# e) Execute the feature specific testscript via
-# --source include/partition_<feature>.inc
+# --source inc/partition_<feature>.inc
# f) Perform a cleanup by removing all objects created within the tests
-# --source include/partition_cleanup.inc
+# --source inc/partition_cleanup.inc
#
# 2.2. script generating the prerequisites needed in all tests
-# (include/partition.pre)
+# (inc/partition.pre)
# a) Message about open bugs causing that
# - some testcases are disabled
# - it cannot be avoided that the file with expected results suffers
@@ -340,36 +345,70 @@ if (0)
# c) Setting of auxiliary variables
# d) Creation of auxiliary tables ....
#
-# 3. script checking a feature
-# (include/partition_<feature.inc>.inc)
-# Example:
-# a) "set/compute" a CREATE TABLE t1 .. and an ALTER TABLE ... statement
-# b) CREATE TABLE t1 ...
-# c) INSERT INTO t1 (.....) SELECT .... FROM t0_template WHERE ...
-# The first 50 % of all t0_template rows will be inserted into t1.
-# d) ALTER TABLE t1 (Example: ADD/DROP UNIQUE INDEX)
-# e) INSERT INTO t1 (.....) SELECT .... FROM t0_template WHERE ...
-# The second 50 % of all t0_template rows will be inserted into t1.
-# Now t1 and t0_template should have the same content.
-# f) Check the "usability" of the current table t1
-# via
-# --source include/partition_check.pre
-# g) DROP TABLE t1
-# Switch to other CREATE and ALTER statements and run sequence a)-g) again
-# ...
+# 2.3. script checking a feature
+# (inc/partition_<feature.inc>.inc)
+# Example:
+# a) "set/compute" a CREATE TABLE t1 .. and an ALTER TABLE ... statement
+# b) CREATE TABLE t1 ...
+# c) INSERT INTO t1 (.....) SELECT .... FROM t0_template WHERE ...
+# The first 50 % of all t0_template rows will be inserted into t1.
+# d) ALTER TABLE t1 (Example: ADD/DROP UNIQUE INDEX)
+# e) INSERT INTO t1 (.....) SELECT .... FROM t0_template WHERE ...
+# The second 50 % of all t0_template rows will be inserted into t1.
+# Now t1 and t0_template should have the same content.
+# f) Check the "usability" of the current table t1
+# via
+# --source inc/partition_check.pre
+# g) DROP TABLE t1
+# Switch to other CREATE and ALTER statements and run sequence a)-g) again
+# ...
+#
+# 2.4. script checking if a certain table shows the expected behaviour
+# ("usability" check): inc/partition_check.inc
+# - SELECT/INSERT/UPDATE/DELETE affecting single and multiple records
+# - check of values of special interest like NULL etc.
+# - INSERT/UPDATE with BEFORE/AFTER triggers
+# - violations of UNIQUE constraints, if there are any defined
+# - transactions ...
+# - TRUNCATE/OPTIMIZE/..
+# - ...
+#
+#
+# 2.5. There are some auxiliary scripts with sub tests where we cannot predict
+# if we get an error and if we get one, which one.
+# Example: INSERT a record where the value for a certain column equals
+# some existing record.
+# Depending on existing/not existing PRIMARY KEYs, UNIQUE INDEXes
+# the response might be "no error", ER_DUP_KEY, ER_DUP_ENTRY.
+# Our requirements:
+# 1. We cannot abort whenever get an error message from the server.
+# 2. We want the exact server message into the protocol.
+# 3. We want abort testing if we know that a certain error must not happen.
+# Common but unusable Solutions:
+# a) --error 0, ER_DUP_KEY, ER_DUP_ENTRY
+# <statment>
+# We get no error message even if the statement fails.
+# b) --error ER_DUP_KEY, ER_DUP_ENTRY
+# <statment>
+# We might get "got one of the expected errors".
+# There are situations where the statement must be successful.
+# c) --disable_abort_on_error
+# <statment>
+# --enable_abort_on_error
+# And nothing extra
+# We do not abort in case of unexpected server errors.
+#
+# Final solution:
+# --disable_abort_on_error
+# <statment>
+# --enable_abort_on_error
+# Check via error number if the error is not totally unexpected.
+# The sub tests use $ER_DUP_KEY, $ER_DUP_ENTRY, etc.
+# Assignment of values happen in this file.
#
-# 4. script checking if a certain table shows the expected behaviour
-# ("usability" check): include/partition_check.inc
-# - SELECT/INSERT/UPDATE/DELETE affecting single and multiple records
-# - check of values of special interest like NULL etc.
-# - INSERT/UPDATE with BEFORE/AFTER triggers
-# - violations of UNIQUE constraints, if there are any defined
-# - transactions ...
-# - TRUNCATE/OPTIMIZE/..
-# - ...
#
# 3. How to analyze a partitioning bug revealed with these tests/ How to build
-# a small replay script from the monstrous protocols ?
+# a small replay script from the monstrous protocols ?
#------------------------------------------------------------------------------#
# a) crash -- use the file var/master-data/mysql/general_log.CSV
# b) no crash, but unexpected server response (there is no "reject file)
@@ -382,19 +421,19 @@ if (0)
# protocolling of some queries.
# In most cases you will find that the r/<testcase>.<log/reject> contains at
# least a line "# # check <something>: 0".
-# That means that a check within include/partition_check did not got the
+# That means that a check within inc/partition_check did not got the
# expected result.
# A good start for a replay script would be
# 1. Copy t/partition_<feature>_<engine>.test to t/my_test.test
# 2. Edit t/my_test.test
# - set $debug to 1
# - replace the line
-# "--source include/partition_<feature>.inc"
+# "--source inc/partition_<feature>.inc"
# with all statements between the last
# CREATE TABLE t1 statement (included this)
# and the line
-# "# Start usability test (include/partition_check.inc)"
-# - add the content of include/partition_check.inc at the end.
+# "# Start usability test (inc/partition_check.inc)"
+# - add the content of inc/partition_check.inc at the end.
#
# Please excuse that the partitioning tests generate such huge protocols which
# and are not very handy when it comes to bug analysis. I tried to squeez out
diff --git a/mysql-test/include/partition_10.inc b/mysql-test/suite/parts/inc/partition_10.inc
index 74b0fdf7f6a..2050c809463 100644
--- a/mysql-test/include/partition_10.inc
+++ b/mysql-test/suite/parts/inc/partition_10.inc
@@ -1,4 +1,4 @@
-# include/partition_10.inc
+# inc/partition_10.inc
#
# Do some basic checks on a table.
#
@@ -10,7 +10,7 @@
# is like expected.
#
---source include/partition_layout.inc
+--source suite/parts/inc/partition_layout.inc
####### Variations with multiple records
# Select on empty table
@@ -50,20 +50,14 @@ eval UPDATE t1 SET f1 = $max_row + 2, f2 = 'ZZZZZZZ'
WHERE f1 = 0 AND f2 = '#######';
# Select
eval SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = $max_row + 2 AND f2 = 'ZZZZZZZ';
-if ($fixed_bug15968)
-{
# Bug #15968: Partitions: crash when INSERT with f1 = -1 into PARTITION BY HASH(f1)
eval UPDATE t1 SET f1 = 0 - 1, f2 = 'ZZZZZZZ'
WHERE f1 = $max_row + 1 AND f2 = '#######';
# Select
SELECT COUNT(*) AS my_value FROM t1 WHERE f1 = 0 - 1 AND f2 = 'ZZZZZZZ';
-}
# Delete
eval DELETE FROM t1 WHERE f1 = $max_row + 2 AND f2 = 'ZZZZZZZ';
-if ($fixed_bug15968)
-{
DELETE FROM t1 WHERE f1 = 0 - 1 AND f2 = 'ZZZZZZZ';
-}
# Select
SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
diff --git a/mysql-test/include/partition_11.inc b/mysql-test/suite/parts/inc/partition_11.inc
index 7ed4d882aa0..9f10f58a5f0 100644
--- a/mysql-test/include/partition_11.inc
+++ b/mysql-test/suite/parts/inc/partition_11.inc
@@ -1,4 +1,4 @@
-# include/partition_11.inc
+# inc/partition_11.inc
#
# Try to create a table with the given partition number
#
@@ -13,7 +13,7 @@ let $run= `SELECT @my_errno = 0`;
# If this operation was successfull, check + drop this table
if ($run)
{
- --source include/partition_10.inc
+ --source suite/parts/inc/partition_10.inc
eval DROP TABLE t1;
}
#### Try to create a table with the given subpartition number
@@ -29,6 +29,6 @@ let $run= `SELECT @my_errno = 0`;
# If this operation was successfull, check + drop this table
if ($run)
{
- --source include/partition_10.inc
+ --source suite/parts/inc/partition_10.inc
eval DROP TABLE t1;
}
diff --git a/mysql-test/include/partition_12.inc b/mysql-test/suite/parts/inc/partition_12.inc
index 2a5610b82e1..c30990a61ef 100644
--- a/mysql-test/include/partition_12.inc
+++ b/mysql-test/suite/parts/inc/partition_12.inc
@@ -1,10 +1,10 @@
-# include/partition_12.inc
+# inc/partition_12.inc
#
# Do some basic things on a table, if the SQL command executed just before
# sourcing this file was successful.
#
---source include/partition_layout.inc
+--source suite/parts/inc/partition_layout.inc
####### Variations with multiple records
# (mass) Insert max_row_div2 + 1 records
@@ -42,20 +42,14 @@ eval UPDATE t1 SET f1 = $max_row + 2, f2 = 'ZZZZZZZ'
WHERE f1 = 0 AND f2 = '#######';
# Select
eval SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = $max_row + 2 AND f2 = 'ZZZZZZZ';
-if ($fixed_bug15968)
-{
# Bug #15968: Partitions: crash when INSERT with f1 = -1 into PARTITION BY HASH(f1)
eval UPDATE t1 SET f1 = 0 - 1, f2 = 'ZZZZZZZ'
WHERE f1 = $max_row + 1 AND f2 = '#######';
# Select
SELECT COUNT(*) AS my_value FROM t1 WHERE f1 = 0 - 1 AND f2 = 'ZZZZZZZ';
-}
# Delete
eval DELETE FROM t1 WHERE f1 = $max_row + 2 AND f2 = 'ZZZZZZZ';
-if ($fixed_bug15968)
-{
DELETE FROM t1 WHERE f1 = 0 - 1 AND f2 = 'ZZZZZZZ';
-}
# Select
SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
diff --git a/mysql-test/suite/parts/inc/partition_20.inc b/mysql-test/suite/parts/inc/partition_20.inc
index 7901b332a11..cc820b8312b 100644
--- a/mysql-test/suite/parts/inc/partition_20.inc
+++ b/mysql-test/suite/parts/inc/partition_20.inc
@@ -1,10 +1,11 @@
################################################################################
-# include/partition_20.inc #
+# inc/partition_20.inc #
# #
# Purpose: #
-# Auxiliary script, only useful when sourced by include/partition_check.inc. #
+# Auxiliary script, only useful when sourced by #
+# suite/parts/inc/partition_check.inc. #
# #
-# 1. Check if the preceeding statement caused that the expected number of #
+# 1. Check if the preceding statement caused that the expected number of #
# records was #
# - inserted #
# - updated or deleted+inserted #
@@ -17,19 +18,13 @@
# must be set before sourcing this routine. #
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
+# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
# Change: #
################################################################################
-# include/partition_20.inc
-#
-# Auxiliary script, only useful when sourced by include/partition_check.inc.
-#
-
-# Check of preceeding statement via Select
if ($no_debug)
{
--disable_query_log
diff --git a/mysql-test/suite/parts/inc/partition_alter1.inc b/mysql-test/suite/parts/inc/partition_alter1.inc
index a9706d5eb98..e3ec924f346 100644
--- a/mysql-test/suite/parts/inc/partition_alter1.inc
+++ b/mysql-test/suite/parts/inc/partition_alter1.inc
@@ -1,12 +1,12 @@
################################################################################
-# include/partition_alter1.inc #
+# inc/partition_alter1.inc #
# #
# Purpose: #
# ADD/DROP PRIMARY KEYs and/or UNIQUE INDEXes tests on partitioned tables #
# This routine is only useful for the partition_<feature>_<engine> tests. #
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
+# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@@ -26,7 +26,7 @@
--echo # within the partitioning function
--echo #------------------------------------------------------------------------
# Rule: Only f_int1 is used within the partitioning function
-# ---> include/partition_alter_11.inc
+# ---> inc/partition_alter_11.inc
if ($do_pk_tests)
{
# The value of the following test is maybe covered by 1.1.3.
@@ -35,12 +35,10 @@ if ($do_pk_tests)
--echo # 1.1.1 PRIMARY KEY consisting of one column
let $alter= ALTER TABLE t1 ADD PRIMARY KEY(f_int1);
--source suite/parts/inc/partition_alter_11.inc
- # --source include/partition_alter_11.inc
}
# This must fail, because PRIMARY KEY does not contain f_int1
let $alter= ALTER TABLE t1 ADD PRIMARY KEY(f_int2);
--source suite/parts/inc/partition_alter_11.inc
- # --source include/partition_alter_11.inc
}
# The value of the following test is maybe covered by 1.1.4.
if ($more_pk_ui_tests)
@@ -48,65 +46,52 @@ if ($more_pk_ui_tests)
--echo # 1.1.2 UNIQUE INDEX consisting of one column
let $alter= ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1);
--source suite/parts/inc/partition_alter_11.inc
- # --source include/partition_alter_11.inc
}
# This must fail, because UNIQUE INDEX does not contain f_int1
let $alter= ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2);
--source suite/parts/inc/partition_alter_11.inc
-# --source include/partition_alter_11.inc
if ($do_pk_tests)
{
--echo # 1.1.3 PRIMARY KEY consisting of two columns
let $alter= ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2);
--source suite/parts/inc/partition_alter_11.inc
- # --source include/partition_alter_11.inc
let $alter= ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1);
--source suite/parts/inc/partition_alter_11.inc
- # --source include/partition_alter_11.inc
}
--echo # 1.1.4 UNIQUE INDEX consisting of two columns
let $alter= ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2);
--source suite/parts/inc/partition_alter_11.inc
-# --source include/partition_alter_11.inc
let $alter= ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1);
--source suite/parts/inc/partition_alter_11.inc
-# --source include/partition_alter_11.inc
#
--echo #------------------------------------------------------------------------
--echo # 1.2 ADD PRIMARY KEY or UNIQUE INDEX to table with two columns
--echo # (f_int1 and f_int2) within the partitioning function
--echo #------------------------------------------------------------------------
# Rule: f_int1 and f_int2 is used within the partitioning function
-# ---> include/partition_alter_13.inc
+# ---> inc/partition_alter_13.inc
if ($do_pk_tests)
{
--echo # 1.2.1 PRIMARY KEY consisting of two columns
let $alter= ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2);
--source suite/parts/inc/partition_alter_13.inc
- # --source include/partition_alter_13.inc
let $alter= ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1);
--source suite/parts/inc/partition_alter_13.inc
- # --source include/partition_alter_13.inc
}
--echo # 1.2.2 UNIQUE INDEX consisting of two columns
let $alter= ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2);
--source suite/parts/inc/partition_alter_13.inc
-# --source include/partition_alter_13.inc
let $alter= ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1);
--source suite/parts/inc/partition_alter_13.inc
-# --source include/partition_alter_13.inc
if ($do_pk_tests)
{
--echo # 1.2.3 PRIMARY KEY and UNIQUE INDEX consisting of two columns
let $alter= ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2), ADD PRIMARY KEY(f_int2,f_int1);
--source suite/parts/inc/partition_alter_13.inc
- # --source include/partition_alter_13.inc
let $alter= ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_int2);
--source suite/parts/inc/partition_alter_13.inc
- # --source include/partition_alter_13.inc
let $unique= ;
--source suite/parts/inc/partition_alter_13.inc
- # --source include/partition_alter_13.inc
}
#
#
@@ -122,7 +107,7 @@ if ($do_pk_tests)
--echo # 2.1 Partitioning function contains one column(f_int1)
--echo #------------------------------------------------------------------------
# Rule: Only f_int1 is used within the partitioning function
-# ---> include/partition_alter_11.inc
+# ---> inc/partition_alter_11.inc
# The value of the following test is maybe covered by 2.1.5.
if ($more_pk_ui_tests)
{
@@ -132,14 +117,12 @@ if ($more_pk_ui_tests)
let $unique= , PRIMARY KEY(f_int1);
let $alter= ALTER TABLE t1 DROP PRIMARY KEY;
--source suite/parts/inc/partition_alter_11.inc
- # --source include/partition_alter_11.inc
}
#
--echo # 2.1.2 DROP UNIQUE INDEX consisting of one column
let $unique= , UNIQUE INDEX uidx1 (f_int1);
let $alter= ALTER TABLE t1 DROP INDEX uidx1;
--source suite/parts/inc/partition_alter_11.inc
- # --source include/partition_alter_11.inc
#
if ($do_pk_tests)
{
@@ -147,20 +130,16 @@ if ($more_pk_ui_tests)
let $alter= ALTER TABLE t1 DROP PRIMARY KEY;
let $unique= , PRIMARY KEY(f_int1,f_int2);
--source suite/parts/inc/partition_alter_11.inc
- # --source include/partition_alter_11.inc
let $unique= , PRIMARY KEY(f_int2,f_int1);
--source suite/parts/inc/partition_alter_11.inc
- # --source include/partition_alter_11.inc
}
#
--echo # 2.1.4 DROP UNIQUE INDEX consisting of two columns
let $alter= ALTER TABLE t1 DROP INDEX uidx1;
let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2);
--source suite/parts/inc/partition_alter_11.inc
- # --source include/partition_alter_11.inc
let $unique= , UNIQUE INDEX uidx1 (f_int2,f_int1);
--source suite/parts/inc/partition_alter_11.inc
- # --source include/partition_alter_11.inc
}
#
if ($do_pk_tests)
@@ -169,42 +148,35 @@ if ($do_pk_tests)
let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1);
let $alter= ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1;
--source suite/parts/inc/partition_alter_11.inc
- # --source include/partition_alter_11.inc
let $unique= , UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2);
let $alter= ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1;
--source suite/parts/inc/partition_alter_11.inc
- # --source include/partition_alter_11.inc
}
let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1);
let $alter= ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2;
--source suite/parts/inc/partition_alter_11.inc
-# --source include/partition_alter_11.inc
#
--echo #------------------------------------------------------------------------
--echo # 2.2 Partitioning function contains two columns (f_int1,f_int2)
--echo #------------------------------------------------------------------------
# Rule: f_int1 and f_int2 is used within the partitioning function
-# ---> include/partition_alter_13.inc
+# ---> inc/partition_alter_13.inc
if ($do_pk_tests)
{
--echo # 2.2.1 DROP PRIMARY KEY consisting of two columns
let $alter= ALTER TABLE t1 DROP PRIMARY KEY;
let $unique= , PRIMARY KEY(f_int1,f_int2);
--source suite/parts/inc/partition_alter_13.inc
- # --source include/partition_alter_13.inc
let $unique= , PRIMARY KEY(f_int2,f_int1);
--source suite/parts/inc/partition_alter_13.inc
- # --source include/partition_alter_13.inc
}
#
--echo # 2.2.2 DROP UNIQUE INDEX consisting of two columns
let $alter= ALTER TABLE t1 DROP INDEX uidx1;
let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2);
--source suite/parts/inc/partition_alter_13.inc
-# --source include/partition_alter_13.inc
let $unique= , UNIQUE INDEX uidx1 (f_int2,f_int1);
--source suite/parts/inc/partition_alter_13.inc
-# --source include/partition_alter_13.inc
#
if ($do_pk_tests)
{
@@ -212,26 +184,23 @@ if ($do_pk_tests)
let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1);
let $alter= ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1;
--source suite/parts/inc/partition_alter_13.inc
- # --source include/partition_alter_13.inc
let $unique= , UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2);
let $alter= ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1;
--source suite/parts/inc/partition_alter_13.inc
- # --source include/partition_alter_13.inc
}
let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1);
let $alter= ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2;
--source suite/parts/inc/partition_alter_13.inc
-# --source include/partition_alter_13.inc
if (0)
{
--echo
--echo #========================================================================
--echo # 3. ALTER TABLE "ALTER" PRIMARY KEY
---echo # ML: I think that an ALTER TABLE statement where a PRIMARY KEY is
---echo # dropped and recreated (with different layout) might be of
---echo # interest, if the tree containing the table data has to be
---echo # reorganized during this operation.
+--echo # mleich: I think that an ALTER TABLE statement where a PRIMARY
+--echo # KEY is dropped and recreated (with different layout) might
+--echo # be of interest, if the tree containing the table data has
+--echo # to be reorganized during this operation.
--echo # To be implemented
--echo #========================================================================
--echo
diff --git a/mysql-test/suite/parts/inc/partition_alter2.inc b/mysql-test/suite/parts/inc/partition_alter2.inc
index 3e01c3972bc..3960b8e8a09 100644
--- a/mysql-test/suite/parts/inc/partition_alter2.inc
+++ b/mysql-test/suite/parts/inc/partition_alter2.inc
@@ -1,12 +1,12 @@
################################################################################
-# include/partition_alter2.inc #
+# inc/partition_alter2.inc #
# #
# Purpose: #
# Tests where the columns used within the partitioning function are altered. #
# This routine is only useful for the partition_<feature>_<engine> tests. .#
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
+# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@@ -22,12 +22,11 @@
--echo # 1.1 ALTER column f_int2 not used in partitioning function
--echo #------------------------------------------------------------------------
# Rule: Only f_int1 is used within the partitioning function
-# ---> include/partition_alter_11.inc
+# ---> inc/partition_alter_11.inc
let $alter= ALTER TABLE t1 MODIFY f_int2 BIGINT;
--echo # 1.1.1 no PRIMARY KEY or UNIQUE INDEX exists
let $unique= ;
--source suite/parts/inc/partition_alter_11.inc
-# --source include/partition_alter_11.inc
#
if ($do_pk_tests)
{
@@ -38,14 +37,11 @@ if ($do_pk_tests)
{
let $unique= , PRIMARY KEY (f_int1);
--source suite/parts/inc/partition_alter_11.inc
- # --source include/partition_alter_11.inc
}
let $unique= , PRIMARY KEY (f_int1,f_int2);
--source suite/parts/inc/partition_alter_11.inc
- # --source include/partition_alter_11.inc
let $unique= , PRIMARY KEY (f_int2,f_int1);
--source suite/parts/inc/partition_alter_11.inc
- # --source include/partition_alter_11.inc
}
#
--echo # 1.1.3 UNIQUE INDEX exists
@@ -55,14 +51,11 @@ if ($more_pk_ui_tests)
{
let $unique= , UNIQUE INDEX uidx1 (f_int1);
--source suite/parts/inc/partition_alter_11.inc
- # --source include/partition_alter_11.inc
}
let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2);
--source suite/parts/inc/partition_alter_11.inc
-# --source include/partition_alter_11.inc
let $unique= , UNIQUE INDEX uidx1 (f_int2,f_int1);
--source suite/parts/inc/partition_alter_11.inc
-# --source include/partition_alter_11.inc
#
if ($more_pk_ui_tests)
{
@@ -71,47 +64,35 @@ if ($more_pk_ui_tests)
--echo # 1.2 ALTER column f_int1 used in partitioning function
--echo #------------------------------------------------------------------------
# Rule: Only f_int1 is used within the partitioning function
- # ---> include/partition_alter_11.inc
+ # ---> inc/partition_alter_11.inc
let $alter= ALTER TABLE t1 MODIFY f_int1 BIGINT;
--echo # 1.2.1 no PRIMARY KEY or UNIQUE INDEX exists
let $unique= ;
--source suite/parts/inc/partition_alter_11.inc
- # --source include/partition_alter_11.inc
--source suite/parts/inc/partition_alter_13.inc
- # --source include/partition_alter_13.inc
#
if ($do_pk_tests)
{
--echo # 1.2.2 PRIMARY KEY exists
let $unique= , PRIMARY KEY (f_int1);
--source suite/parts/inc/partition_alter_11.inc
- # --source include/partition_alter_11.inc
let $unique= , PRIMARY KEY (f_int1,f_int2);
--source suite/parts/inc/partition_alter_11.inc
- # --source include/partition_alter_11.inc
--source suite/parts/inc/partition_alter_13.inc
- # --source include/partition_alter_13.inc
let $unique= , PRIMARY KEY (f_int2,f_int1);
--source suite/parts/inc/partition_alter_11.inc
- # --source include/partition_alter_11.inc
--source suite/parts/inc/partition_alter_13.inc
- # --source include/partition_alter_13.inc
}
#
--echo # 1.2.3 UNIQUE INDEX exists
let $unique= , UNIQUE INDEX uidx (f_int1);
--source suite/parts/inc/partition_alter_11.inc
- # --source include/partition_alter_11.inc
let $unique= , UNIQUE INDEX uidx (f_int1,f_int2);
--source suite/parts/inc/partition_alter_11.inc
- # --source include/partition_alter_11.inc
--source suite/parts/inc/partition_alter_13.inc
- # --source include/partition_alter_13.inc
let $unique= , UNIQUE INDEX uidx (f_int2,f_int1);
--source suite/parts/inc/partition_alter_11.inc
- # --source include/partition_alter_11.inc
--source suite/parts/inc/partition_alter_13.inc
- # --source include/partition_alter_13.inc
}
#
--echo #------------------------------------------------------------------------
@@ -119,14 +100,12 @@ if ($more_pk_ui_tests)
--echo # f_int1 or (f_int1 and f_int2) used in partitioning function
--echo #------------------------------------------------------------------------
# Rule: f_int1 and f_int2 is used within the partitioning function
-# ---> include/partition_alter_13.inc
+# ---> inc/partition_alter_13.inc
let $alter= ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
--echo # 1.3.1 no PRIMARY KEY or UNIQUE INDEX exists
let $unique= ;
--source suite/parts/inc/partition_alter_11.inc
-# --source include/partition_alter_11.inc
--source suite/parts/inc/partition_alter_13.inc
-# --source include/partition_alter_13.inc
#
if ($do_pk_tests)
{
@@ -137,18 +116,13 @@ if ($do_pk_tests)
{
let $unique= , PRIMARY KEY (f_int1);
--source suite/parts/inc/partition_alter_11.inc
- # --source include/partition_alter_11.inc
}
let $unique= , PRIMARY KEY (f_int1,f_int2);
--source suite/parts/inc/partition_alter_11.inc
- # --source include/partition_alter_11.inc
--source suite/parts/inc/partition_alter_13.inc
- # --source include/partition_alter_13.inc
let $unique= , PRIMARY KEY (f_int2,f_int1);
--source suite/parts/inc/partition_alter_11.inc
- # --source include/partition_alter_11.inc
--source suite/parts/inc/partition_alter_13.inc
- # --source include/partition_alter_13.inc
}
#
--echo # 1.3.3 UNIQUE INDEX exists
@@ -158,18 +132,13 @@ if ($more_pk_ui_tests)
{
let $unique= , UNIQUE INDEX uidx (f_int1);
--source suite/parts/inc/partition_alter_11.inc
- # --source include/partition_alter_11.inc
}
let $unique= , UNIQUE INDEX uidx (f_int1,f_int2);
--source suite/parts/inc/partition_alter_11.inc
-# --source include/partition_alter_11.inc
--source suite/parts/inc/partition_alter_13.inc
-# --source include/partition_alter_13.inc
let $unique= , UNIQUE INDEX uidx (f_int2,f_int1);
--source suite/parts/inc/partition_alter_11.inc
-# --source include/partition_alter_11.inc
--source suite/parts/inc/partition_alter_13.inc
-# --source include/partition_alter_13.inc
--echo
--echo #========================================================================
@@ -180,12 +149,11 @@ let $unique= , UNIQUE INDEX uidx (f_int2,f_int1);
--echo # 2.1 ALTER column f_int2 not used in partitioning function
--echo #------------------------------------------------------------------------
# Rule: Only f_int1 is used within the partitioning function
-# ---> include/partition_alter_11.inc
+# ---> inc/partition_alter_11.inc
let $alter= ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
--echo # 2.1.1 no PRIMARY KEY or UNIQUE INDEX exists
let $unique= ;
--source suite/parts/inc/partition_alter_11.inc
-# --source include/partition_alter_11.inc
#
if ($do_pk_tests)
{
@@ -196,14 +164,11 @@ if ($do_pk_tests)
--echo # 2.1.2 PRIMARY KEY exists
let $unique= , PRIMARY KEY (f_int1);
--source suite/parts/inc/partition_alter_11.inc
- # --source include/partition_alter_11.inc
}
let $unique= , PRIMARY KEY (f_int1,f_int2);
--source suite/parts/inc/partition_alter_11.inc
- # --source include/partition_alter_11.inc
let $unique= , PRIMARY KEY (f_int2,f_int1);
--source suite/parts/inc/partition_alter_11.inc
- # --source include/partition_alter_11.inc
}
#
--echo # 2.1.3 UNIQUE INDEX exists
@@ -213,14 +178,11 @@ if ($more_pk_ui_tests)
{
let $unique= , UNIQUE INDEX uidx1 (f_int1);
--source suite/parts/inc/partition_alter_11.inc
- # --source include/partition_alter_11.inc
}
let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2);
--source suite/parts/inc/partition_alter_11.inc
-# --source include/partition_alter_11.inc
let $unique= , UNIQUE INDEX uidx1 (f_int2,f_int1);
--source suite/parts/inc/partition_alter_11.inc
-# --source include/partition_alter_11.inc
#
if ($more_pk_ui_tests)
{
@@ -229,61 +191,47 @@ if ($more_pk_ui_tests)
--echo # 2.2 ALTER column f_int1 used in partitioning function
--echo #------------------------------------------------------------------------
# Rule: Only f_int1 is used within the partitioning function
- # ---> include/partition_alter_11.inc
+ # ---> inc/partition_alter_11.inc
let $alter= ALTER TABLE t1 MODIFY f_int1 MEDIUMINT;
--echo # 2.2.1 no PRIMARY KEY or UNIQUE INDEX exists
let $unique= ;
--source suite/parts/inc/partition_alter_11.inc
- # --source include/partition_alter_11.inc
--source suite/parts/inc/partition_alter_13.inc
- # --source include/partition_alter_13.inc
#
if ($do_pk_tests)
{
--echo # 2.2.2 PRIMARY KEY exists
let $unique= , PRIMARY KEY (f_int1);
--source suite/parts/inc/partition_alter_11.inc
- # --source include/partition_alter_11.inc
let $unique= , PRIMARY KEY (f_int1,f_int2);
--source suite/parts/inc/partition_alter_11.inc
- # --source include/partition_alter_11.inc
--source suite/parts/inc/partition_alter_13.inc
- # --source include/partition_alter_13.inc
let $unique= , PRIMARY KEY (f_int2,f_int1);
--source suite/parts/inc/partition_alter_11.inc
- # --source include/partition_alter_11.inc
--source suite/parts/inc/partition_alter_13.inc
- # --source include/partition_alter_13.inc
}
#
--echo # 2.2.3 UNIQUE INDEX exists
let $unique= , UNIQUE INDEX uidx (f_int1);
--source suite/parts/inc/partition_alter_11.inc
- # --source include/partition_alter_11.inc
let $unique= , UNIQUE INDEX uidx (f_int1,f_int2);
--source suite/parts/inc/partition_alter_11.inc
- # --source include/partition_alter_11.inc
--source suite/parts/inc/partition_alter_13.inc
- # --source include/partition_alter_13.inc
let $unique= , UNIQUE INDEX uidx (f_int2,f_int1);
--source suite/parts/inc/partition_alter_11.inc
- # --source include/partition_alter_11.inc
--source suite/parts/inc/partition_alter_13.inc
- # --source include/partition_alter_13.inc
}
#
--echo #------------------------------------------------------------------------
--echo # 2.3 ALTER column f_int1 and f_int2 used in partitioning function
--echo #------------------------------------------------------------------------
# Rule: f_int1 and f_int2 is used within the partitioning function
-# ---> include/partition_alter_13.inc
+# ---> inc/partition_alter_13.inc
let $alter= ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
--echo # 2.3.1 no PRIMARY KEY or UNIQUE INDEX exists
let $unique= ;
--source suite/parts/inc/partition_alter_11.inc
-# --source include/partition_alter_11.inc
--source suite/parts/inc/partition_alter_13.inc
-# --source include/partition_alter_13.inc
#
if ($do_pk_tests)
{
@@ -295,17 +243,12 @@ if ($do_pk_tests)
let $unique= , PRIMARY KEY (f_int1);
--source suite/parts/inc/partition_alter_11.inc
}
- # --source include/partition_alter_11.inc
let $unique= , PRIMARY KEY (f_int1,f_int2);
--source suite/parts/inc/partition_alter_11.inc
- # --source include/partition_alter_11.inc
--source suite/parts/inc/partition_alter_13.inc
- # --source include/partition_alter_13.inc
let $unique= , PRIMARY KEY (f_int2,f_int1);
--source suite/parts/inc/partition_alter_11.inc
- # --source include/partition_alter_11.inc
--source suite/parts/inc/partition_alter_13.inc
- # --source include/partition_alter_13.inc
}
#
--echo # 2.3.3 UNIQUE INDEX exists
@@ -315,18 +258,13 @@ if ($more_pk_ui_tests)
{
let $unique= , UNIQUE INDEX uidx (f_int1);
--source suite/parts/inc/partition_alter_11.inc
- # --source include/partition_alter_11.inc
}
let $unique= , UNIQUE INDEX uidx (f_int1,f_int2);
--source suite/parts/inc/partition_alter_11.inc
-# --source include/partition_alter_11.inc
--source suite/parts/inc/partition_alter_13.inc
-# --source include/partition_alter_13.inc
let $unique= , UNIQUE INDEX uidx (f_int2,f_int1);
--source suite/parts/inc/partition_alter_11.inc
-# --source include/partition_alter_11.inc
--source suite/parts/inc/partition_alter_13.inc
-# --source include/partition_alter_13.inc
#
if (0)
@@ -338,8 +276,8 @@ if (0)
--echo # INTEGER --> FLOAT
--echo # INTEGER --> DECIMAL
--echo # INTEGER --> VARCHAR
---echo # ML: I assume that at least the first two variants are of some
---echo # interest. But I am unsure if the server allows such
+--echo # mleich: I assume that at least the first two variants are of
+--echo # some interest. But I am unsure if the server allows such
--echo # conversions. I also think that such operations have a
--echo # conversions very small likelihood.
--echo # To be implemented.
diff --git a/mysql-test/suite/parts/inc/partition_alter3.inc b/mysql-test/suite/parts/inc/partition_alter3.inc
index 4b1539f4260..1fad361b371 100644
--- a/mysql-test/suite/parts/inc/partition_alter3.inc
+++ b/mysql-test/suite/parts/inc/partition_alter3.inc
@@ -1,11 +1,11 @@
################################################################################
-# include/partition_alter3.inc #
+# inc/partition_alter3.inc #
# #
# Purpose: #
# Tests for partition management commands for HASH and KEY partitioning #
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
+# Original Author: mleich #
# Original Date: 2006-04-11 #
# Change Author: #
# Change Date: #
@@ -32,7 +32,7 @@ SELECT IF(9999 - 1000 + 1 > @max_row, @max_row , 9999 - 1000 + 1)
INTO @exp_row_count;
# DEBUG SELECT @exp_row_count;
# 4. Print the layout, check Readability
---source include/partition_layout.inc
+--source suite/parts/inc/partition_layout.inc
--source suite/parts/inc/partition_check_read1.inc
#
--echo #------------------------------------------------------------------------
@@ -44,16 +44,16 @@ ALTER TABLE t1 ADD PARTITION (PARTITION part2);
#
--echo # 1.1.2 Assign HASH partitioning
ALTER TABLE t1 PARTITION BY HASH(YEAR(f_date));
---source include/partition_layout.inc
+--source suite/parts/inc/partition_layout.inc
--source suite/parts/inc/partition_check_read1.inc
#
--echo # 1.1.3 Assign other HASH partitioning to already partitioned table
--echo # + test and switch back + test
ALTER TABLE t1 PARTITION BY HASH(DAYOFYEAR(f_date));
---source include/partition_layout.inc
+--source suite/parts/inc/partition_layout.inc
--source suite/parts/inc/partition_check_read1.inc
ALTER TABLE t1 PARTITION BY HASH(YEAR(f_date));
---source include/partition_layout.inc
+--source suite/parts/inc/partition_layout.inc
--source suite/parts/inc/partition_check_read1.inc
#
--echo # 1.1.4 Add PARTITIONS not fitting to HASH --> must fail
@@ -64,7 +64,7 @@ ALTER TABLE t1 ADD PARTITION (PARTITION part2 VALUES LESS THAN (0));
#
--echo # 1.1.5 Add two named partitions + test
ALTER TABLE t1 ADD PARTITION (PARTITION part1, PARTITION part7);
---source include/partition_layout.inc
+--source suite/parts/inc/partition_layout.inc
--source suite/parts/inc/partition_check_read1.inc
#
--echo # 1.1.6 Add two named partitions, name clash --> must fail
@@ -73,12 +73,12 @@ ALTER TABLE t1 ADD PARTITION (PARTITION part1, PARTITION part7);
#
--echo # 1.1.7 Add one named partition + test
ALTER TABLE t1 ADD PARTITION (PARTITION part2);
---source include/partition_layout.inc
+--source suite/parts/inc/partition_layout.inc
--source suite/parts/inc/partition_check_read1.inc
#
--echo # 1.1.8 Add four not named partitions + test
ALTER TABLE t1 ADD PARTITION PARTITIONS 4;
---source include/partition_layout.inc
+--source suite/parts/inc/partition_layout.inc
--source suite/parts/inc/partition_check_read1.inc
--echo #------------------------------------------------------------------------
@@ -89,7 +89,7 @@ ALTER TABLE t1 ADD PARTITION PARTITIONS 4;
ALTER TABLE t1 DROP PARTITION part1;
#
--echo # 1.2.2 COALESCE PARTITION partitionname is not supported
---error 1064
+--error ER_PARSE_ERROR
ALTER TABLE t1 COALESCE PARTITION part1;
#
--echo # 1.2.3 Decrease by 0 is non sense --> must fail
@@ -101,7 +101,7 @@ let $loop= 7;
while ($loop)
{
ALTER TABLE t1 COALESCE PARTITION 1;
- --source include/partition_layout.inc
+ --source suite/parts/inc/partition_layout.inc
--source suite/parts/inc/partition_check_read1.inc
dec $loop;
}
@@ -111,14 +111,13 @@ ALTER TABLE t1 COALESCE PARTITION 1;
#
--echo # 1.2.6 Remove partitioning
ALTER TABLE t1 REMOVE PARTITIONING;
---source include/partition_layout.inc
+--source suite/parts/inc/partition_layout.inc
--source suite/parts/inc/partition_check_read1.inc
#
--echo # 1.2.7 Remove partitioning from not partitioned table --> ????
ALTER TABLE t1 REMOVE PARTITIONING;
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
-# --source suite/parts/inc/partition_check_drop.inc
--echo
--echo #========================================================================
@@ -134,7 +133,7 @@ $column_list
# 2. Fill the table t1 with some records
eval $insert_all;
# 4. Print the layout, check Readability
---source include/partition_layout.inc
+--source suite/parts/inc/partition_layout.inc
--source suite/parts/inc/partition_check_read2.inc
#
--echo #------------------------------------------------------------------------
@@ -143,7 +142,7 @@ eval $insert_all;
--echo #------------------------------------------------------------------------
--echo # 2.1.1 Assign KEY partitioning
ALTER TABLE t1 PARTITION BY KEY(f_int1);
---source include/partition_layout.inc
+--source suite/parts/inc/partition_layout.inc
--source suite/parts/inc/partition_check_read2.inc
#
--echo # 2.1.2 Add PARTITIONS not fitting to KEY --> must fail
@@ -154,17 +153,17 @@ ALTER TABLE t1 ADD PARTITION (PARTITION part2 VALUES LESS THAN (0));
#
--echo # 2.1.3 Add two named partitions + test
ALTER TABLE t1 ADD PARTITION (PARTITION part1, PARTITION part7);
---source include/partition_layout.inc
+--source suite/parts/inc/partition_layout.inc
--source suite/parts/inc/partition_check_read2.inc
#
--echo # 2.1.4 Add one named partition + test
ALTER TABLE t1 ADD PARTITION (PARTITION part2);
---source include/partition_layout.inc
+--source suite/parts/inc/partition_layout.inc
--source suite/parts/inc/partition_check_read2.inc
#
--echo # 2.1.5 Add four not named partitions + test
ALTER TABLE t1 ADD PARTITION PARTITIONS 4;
---source include/partition_layout.inc
+--source suite/parts/inc/partition_layout.inc
--source suite/parts/inc/partition_check_read2.inc
--echo #------------------------------------------------------------------------
@@ -180,7 +179,7 @@ let $loop= 7;
while ($loop)
{
ALTER TABLE t1 COALESCE PARTITION 1;
- --source include/partition_layout.inc
+ --source suite/parts/inc/partition_layout.inc
--source suite/parts/inc/partition_check_read2.inc
dec $loop;
}
@@ -190,12 +189,11 @@ ALTER TABLE t1 COALESCE PARTITION 1;
#
--echo # 2.2.6 Remove partitioning
ALTER TABLE t1 REMOVE PARTITIONING;
---source include/partition_layout.inc
+--source suite/parts/inc/partition_layout.inc
--source suite/parts/inc/partition_check_read2.inc
#
--echo # 2.2.7 Remove partitioning from not partitioned table --> ????
ALTER TABLE t1 REMOVE PARTITIONING;
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
-# --source suite/parts/inc/partition_check_drop.inc
diff --git a/mysql-test/suite/parts/inc/partition_alter4.inc b/mysql-test/suite/parts/inc/partition_alter4.inc
index e6f5dadbcca..040c13d69d6 100644
--- a/mysql-test/suite/parts/inc/partition_alter4.inc
+++ b/mysql-test/suite/parts/inc/partition_alter4.inc
@@ -1,5 +1,5 @@
################################################################################
-# include/partition_alter1.inc #
+# inc/partition_alter1.inc #
# #
# Purpose: #
# Execute ALTER ... OPTIMIZE/CHECK/REBUID/ANALYZE statements (maintenance) #
@@ -22,19 +22,15 @@
--echo # 1.1 ALTER ... ANALYZE PARTITION part_1;
let $alter= ALTER TABLE t1 ANALYZE PARTITION part_1;
--source suite/parts/inc/partition_alter_41.inc
-# --source include/partition_alter_41.inc
--echo # 1.2 ALTER ... ANALYZE PARTITION part_1,part_2;
let $alter= ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
--source suite/parts/inc/partition_alter_41.inc
-# --source include/partition_alter_41.inc
--echo # 1.3 ALTER ... ANALYZE PARTITION part_1,part_2,part_5,part_6,part_10;
let $alter= ALTER TABLE t1 ANALYZE PARTITION part_1,part_2,part_5,part_6,part_10;
--source suite/parts/inc/partition_alter_41.inc
-# --source include/partition_alter_41.inc
--echo # 1.4 ALTER ... ANALYZE PARTITION part_1,part_1,part_1;
let $alter= ALTER TABLE t1 ANALYZE PARTITION part_1,part_1,part_1;
--source suite/parts/inc/partition_alter_41.inc
-# --source include/partition_alter_41.inc
--echo #------------------------------------------------------------------------
--echo # 2 ALTER ... CHECK PARTITION
@@ -42,19 +38,15 @@ let $alter= ALTER TABLE t1 ANALYZE PARTITION part_1,part_1,part_1;
--echo # 2.1 ALTER ... CHECK PARTITION part_1;
let $alter= ALTER TABLE t1 CHECK PARTITION part_1;
--source suite/parts/inc/partition_alter_41.inc
-# --source include/partition_alter_41.inc
--echo # 2.2 ALTER ... CHECK PARTITION part_1,part_2;
let $alter= ALTER TABLE t1 CHECK PARTITION part_1,part_2;
--source suite/parts/inc/partition_alter_41.inc
-# --source include/partition_alter_41.inc
--echo # 2.3 ALTER ... CHECK PARTITION part_1,part_2,part_5,part_6,part_10;
let $alter= ALTER TABLE t1 CHECK PARTITION part_1,part_2,part_5,part_6,part_10;
--source suite/parts/inc/partition_alter_41.inc
-# --source include/partition_alter_41.inc
--echo # 2.4 ALTER ... CHECK PARTITION part_1,part_1,part_1;
let $alter= ALTER TABLE t1 CHECK PARTITION part_1,part_1,part_1;
--source suite/parts/inc/partition_alter_41.inc
-# --source include/partition_alter_41.inc
--echo #------------------------------------------------------------------------
--echo # 3 ALTER ... OPTIMIZE PARTITION
@@ -62,19 +54,15 @@ let $alter= ALTER TABLE t1 CHECK PARTITION part_1,part_1,part_1;
--echo # 3.1 ALTER ... OPTIMIZE PARTITION part_1;
let $alter= ALTER TABLE t1 OPTIMIZE PARTITION part_1;
--source suite/parts/inc/partition_alter_41.inc
-# --source include/partition_alter_41.inc
--echo # 3.2 ALTER ... OPTIMIZE PARTITION part_1,part_2;
let $alter= ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_2;
--source suite/parts/inc/partition_alter_41.inc
-# --source include/partition_alter_41.inc
--echo # 3.3 ALTER ... OPTIMIZE PARTITION part_1,part_2,part_5,part_6,part_10;
let $alter= ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_2,part_5,part_6,part_10;
--source suite/parts/inc/partition_alter_41.inc
-# --source include/partition_alter_41.inc
--echo # 3.4 ALTER ... OPTIMIZE PARTITION part_1,part_1,part_1;
let $alter= ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_1,part_1;
--source suite/parts/inc/partition_alter_41.inc
-# --source include/partition_alter_41.inc
--echo #------------------------------------------------------------------------
--echo # 4 ALTER ... REBUILD PARTITION
@@ -82,19 +70,15 @@ let $alter= ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_1,part_1;
--echo # 4.1 ALTER ... REBUILD PARTITION part_1;
let $alter= ALTER TABLE t1 REBUILD PARTITION part_1;
--source suite/parts/inc/partition_alter_41.inc
-# --source include/partition_alter_41.inc
--echo # 4.2 ALTER ... REBUILD PARTITION part_1,part_2;
let $alter= ALTER TABLE t1 REBUILD PARTITION part_1,part_2;
--source suite/parts/inc/partition_alter_41.inc
-# --source include/partition_alter_41.inc
--echo # 4.3 ALTER ... REBUILD PARTITION part_1,part_2,part_5,part_6,part_10;
let $alter= ALTER TABLE t1 REBUILD PARTITION part_1,part_2,part_5,part_6,part_10;
--source suite/parts/inc/partition_alter_41.inc
-# --source include/partition_alter_41.inc
--echo # 4.4 ALTER ... REBUILD PARTITION part_1,part_1,part_1;
let $alter= ALTER TABLE t1 REBUILD PARTITION part_1,part_1,part_1;
--source suite/parts/inc/partition_alter_41.inc
-# --source include/partition_alter_41.inc
--echo #------------------------------------------------------------------------
--echo # 5 ALTER ... REPAIR PARTITION
@@ -102,19 +86,15 @@ let $alter= ALTER TABLE t1 REBUILD PARTITION part_1,part_1,part_1;
--echo # 5.1 ALTER ... REBUILD PARTITION part_1;
let $alter= ALTER TABLE t1 REBUILD PARTITION part_1;
--source suite/parts/inc/partition_alter_41.inc
-# --source include/partition_alter_41.inc
--echo # 5.2 ALTER ... REBUILD PARTITION part_1,part_2;
let $alter= ALTER TABLE t1 REBUILD PARTITION part_1,part_2;
--source suite/parts/inc/partition_alter_41.inc
-# --source include/partition_alter_41.inc
--echo # 5.3 ALTER ... REBUILD PARTITION part_1,part_2,part_5,part_6,part_10;
let $alter= ALTER TABLE t1 REBUILD PARTITION part_1,part_2,part_5,part_6,part_10;
--source suite/parts/inc/partition_alter_41.inc
-# --source include/partition_alter_41.inc
--echo # 5.4 ALTER ... REBUILD PARTITION part_1,part_1,part_1;
let $alter= ALTER TABLE t1 REBUILD PARTITION part_1,part_1,part_1;
--source suite/parts/inc/partition_alter_41.inc
-# --source include/partition_alter_41.inc
--echo #------------------------------------------------------------------------
--echo # 6 ALTER ... REMOVE PARTITIONING
@@ -122,5 +102,4 @@ let $alter= ALTER TABLE t1 REBUILD PARTITION part_1,part_1,part_1;
--echo # 6.1 ALTER ... REMOVE PARTITIONING;
let $alter= ALTER TABLE t1 REMOVE PARTITIONING;
--source suite/parts/inc/partition_alter_41.inc
-# --source include/partition_alter_41.inc
diff --git a/mysql-test/suite/parts/inc/partition_alter_1.inc b/mysql-test/suite/parts/inc/partition_alter_1.inc
index 1498970547a..b62efd24072 100644
--- a/mysql-test/suite/parts/inc/partition_alter_1.inc
+++ b/mysql-test/suite/parts/inc/partition_alter_1.inc
@@ -1,17 +1,17 @@
################################################################################
-# include/partition_alter_1.inc #
+# inc/partition_alter_1.inc #
# #
# Purpose: #
# Alter a partioned table and check the usability afterwards #
# This script is only usefule when sourced by #
-# include/partition_alter_1[1|3].inc #
+# inc/partition_alter_1[1|3].inc #
# #
# 0. Expect there is a table t1 #
# 1. Insert the first half of the table t0_template into t1 #
# 2. Execute the ALTER TABLE statement within the variable $alter #
# Case SQL code in #
# 0: 1. Insert the second half of the table t0_template into t1 #
-# 2. Execute the usability test include/partition_check.inc #
+# 2. Execute the usability test inc/partition_check.inc #
# >0, but expected: nothing #
# >0 and unexpected: abort #
# 3. DROP the table t1 #
@@ -20,25 +20,27 @@
# Example: #
# CREATE TABLE t1 (f_int1 INT,f_int2 INT, .... ); #
# let $alter= ALTER TABLE t1 ADD PRIMARY KEY(f_int2); #
-# include/partition_alter_1.inc #
+# inc/partition_alter_1.inc #
# #
# The parameters $insert_first_half and $insert_second_half #
-# are also to be set outside (source ./include/partition.pre). #
+# are also to be set outside (source ./inc/partition.pre). #
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
-# Original Date: 2006-03-05 #
-# Change Author: #
-# Change Date: #
-# Change: #
+# Original Author: mleich #
+# Original Date: 2006-03-05 #
+# Change Author: mleich #
+# Change Date: 2007-10-08 #
+# Change: Fix for #
+# Bug#31481 test suite parts: Many tests fail because of #
+# changed server error codes #
################################################################################
eval $insert_first_half;
# Possible/Expected return codes for ALTER TABLE ...
# 0
# 1030: ER_GET_ERRNO
-# 1500: ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF
-# 1504: ER_DROP_PARTITION_NON_EXISTENT
+# 1502: ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF
+# 1506: ER_DROP_PARTITION_NON_EXISTENT
--disable_abort_on_error
eval $alter;
--enable_abort_on_error
@@ -48,13 +50,15 @@ if ($no_debug)
}
eval SET @my_errno = $mysql_errno;
let $run_test= `SELECT @my_errno = 0`;
-let $unexpected_error= `SELECT @my_errno NOT IN (0,1030,1500,1504)`;
-if ($unexpected_error)
+if (`SELECT @my_errno NOT IN (0,$ER_GET_ERRNO,
+ $ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF,
+ $ER_DROP_PARTITION_NON_EXISTENT)`);
{
--echo # The last command got an unexepected error response.
- --echo # Expected/handled SQL codes are 0,1030,1500,1504
+ --echo # Expected/handled SQL codes are 0,$ER_GET_ERRNO,$ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF,$ER_DROP_PARTITION_NON_EXISTENT
SELECT '# SQL code we got was: ' AS "", @my_errno AS "";
--echo # Sorry, have to abort.
+ --echo # Please check the error name to number mapping in inc/partition.pre.
exit;
--echo
}
@@ -64,6 +68,5 @@ if ($run_test)
{
eval $insert_second_half;
--source suite/parts/inc/partition_check.inc
-# --source include/partition_check.inc
}
DROP TABLE t1;
diff --git a/mysql-test/suite/parts/inc/partition_alter_11.inc b/mysql-test/suite/parts/inc/partition_alter_11.inc
index f26d8e822ae..c7dd2d1d15f 100644
--- a/mysql-test/suite/parts/inc/partition_alter_11.inc
+++ b/mysql-test/suite/parts/inc/partition_alter_11.inc
@@ -1,5 +1,5 @@
################################################################################
-# include/partition_alter_11.inc #
+# inc/partition_alter_11.inc #
# #
# Purpose: #
# Check ALTER partitioned table and the state of the table afterwards #
@@ -10,7 +10,7 @@
# PARTITION BY RANGE/LIST ... SUBPARTITION BY HASH/KEY ... #
# do #
# 1. Create the partitioned table #
-# 2. Execute include/partition_alter_1.inc, which will #
+# 2. Execute inc/partition_alter_1.inc, which will #
# - Insert the first half of the table t0_template into t1 #
# - Execute the ALTER TABLE statement #
# - Insert the second half of the table t0_template into t1 #
@@ -26,14 +26,14 @@
# Example: #
# let $unique= , UNIQUE INDEX uidx1 (f_int1); #
# let $alter= ALTER TABLE t1 DROP UNIQUE INDEX uidx1; #
-# include/partition_alter1.inc #
+# inc/partition_alter1.inc #
# #
# Attention: The routine include/partition_alter_13.inc is very similar #
# to this one. So if something has to be changed here it #
# might be necessary to do it also there #
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
+# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@@ -56,7 +56,6 @@ $unique
)
$partitioning;
--source suite/parts/inc/partition_alter_1.inc
-# --source include/partition_alter_1.inc
#----------- PARTITION BY KEY
if ($with_partitioning)
@@ -69,7 +68,6 @@ $unique
)
$partitioning;
--source suite/parts/inc/partition_alter_1.inc
-# --source include/partition_alter_1.inc
#----------- PARTITION BY LIST
if ($with_partitioning)
@@ -90,7 +88,6 @@ $unique
)
$partitioning;
--source suite/parts/inc/partition_alter_1.inc
-# --source include/partition_alter_1.inc
#----------- PARTITION BY RANGE
if ($with_partitioning)
@@ -112,7 +109,6 @@ $unique
)
$partitioning;
--source suite/parts/inc/partition_alter_1.inc
-# --source include/partition_alter_1.inc
#----------- PARTITION BY RANGE -- SUBPARTITION BY HASH
if ($with_partitioning)
@@ -133,7 +129,6 @@ $unique
)
$partitioning;
--source suite/parts/inc/partition_alter_1.inc
-# --source include/partition_alter_1.inc
#----------- PARTITION BY RANGE -- SUBPARTITION BY KEY
if ($with_partitioning)
@@ -157,7 +152,6 @@ $unique
)
$partitioning;
--source suite/parts/inc/partition_alter_1.inc
-# --source include/partition_alter_1.inc
#----------- PARTITION BY LIST -- SUBPARTITION BY HASH
if ($with_partitioning)
@@ -178,7 +172,6 @@ $unique
)
$partitioning;
--source suite/parts/inc/partition_alter_1.inc
-# --source include/partition_alter_1.inc
#----------- PARTITION BY LIST -- SUBPARTITION BY KEY
if ($with_partitioning)
@@ -199,4 +192,3 @@ $unique
)
$partitioning;
--source suite/parts/inc/partition_alter_1.inc
-# --source include/partition_alter_1.inc
diff --git a/mysql-test/suite/parts/inc/partition_alter_13.inc b/mysql-test/suite/parts/inc/partition_alter_13.inc
index 5152230795a..cfc622a7c82 100644
--- a/mysql-test/suite/parts/inc/partition_alter_13.inc
+++ b/mysql-test/suite/parts/inc/partition_alter_13.inc
@@ -1,5 +1,5 @@
################################################################################
-# include/partition_alter_13.inc #
+# inc/partition_alter_13.inc #
# #
# Purpose: #
# Check ALTER partitioned table and the state of the table afterwards #
@@ -10,7 +10,7 @@
# PARTITION BY RANGE/LIST ... SUBPARTITION BY HASH/KEY ... #
# do #
# 1. Create the partitioned table #
-# 2. Execute include/partition_alter_1.inc, which will #
+# 2. Execute inc/partition_alter_1.inc, which will #
# - Insert the first half of the table t0_template into t1 #
# - Execute the ALTER TABLE statement #
# - Insert the second half of the table t0_template into t1 #
@@ -26,14 +26,14 @@
# Example: #
# let $unique= , UNIQUE INDEX uidx1 (f_int1); #
# let $alter= ALTER TABLE t1 DROP UNIQUE INDEX uidx1; #
-# include/partition_alter1.inc #
+# inc/partition_alter1.inc #
# #
# Attention: The routine include/partition_alter_11.inc is very similar #
# to this one. So if something has to be changed here it #
# might be necessary to do it also there #
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
+# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@@ -56,7 +56,6 @@ $unique
)
$partitioning;
--source suite/parts/inc/partition_alter_1.inc
-# --source include/partition_alter_1.inc
#----------- PARTITION BY KEY
if ($with_partitioning)
@@ -69,7 +68,6 @@ $unique
)
$partitioning;
--source suite/parts/inc/partition_alter_1.inc
-# --source include/partition_alter_1.inc
#----------- PARTITION BY LIST
if ($with_partitioning)
@@ -90,7 +88,6 @@ $unique
)
$partitioning;
--source suite/parts/inc/partition_alter_1.inc
-# --source include/partition_alter_1.inc
#----------- PARTITION BY RANGE
if ($with_partitioning)
@@ -112,7 +109,6 @@ $unique
)
$partitioning;
--source suite/parts/inc/partition_alter_1.inc
-# --source include/partition_alter_1.inc
#----------- PARTITION BY RANGE -- SUBPARTITION BY HASH
if ($with_partitioning)
@@ -133,7 +129,6 @@ $unique
)
$partitioning;
--source suite/parts/inc/partition_alter_1.inc
-# --source include/partition_alter_1.inc
#----------- PARTITION BY RANGE -- SUBPARTITION BY KEY
if ($with_partitioning)
@@ -157,7 +152,6 @@ $unique
)
$partitioning;
--source suite/parts/inc/partition_alter_1.inc
-# --source include/partition_alter_1.inc
#----------- PARTITION BY LIST -- SUBPARTITION BY HASH
if ($with_partitioning)
@@ -178,7 +172,6 @@ $unique
)
$partitioning;
--source suite/parts/inc/partition_alter_1.inc
-# --source include/partition_alter_1.inc
#----------- PARTITION BY LIST -- SUBPARTITION BY KEY
if ($with_partitioning)
@@ -199,4 +192,3 @@ $unique
)
$partitioning;
--source suite/parts/inc/partition_alter_1.inc
-# --source include/partition_alter_1.inc
diff --git a/mysql-test/suite/parts/inc/partition_alter_41.inc b/mysql-test/suite/parts/inc/partition_alter_41.inc
index 303ec8c2062..53469c08a19 100644
--- a/mysql-test/suite/parts/inc/partition_alter_41.inc
+++ b/mysql-test/suite/parts/inc/partition_alter_41.inc
@@ -1,5 +1,5 @@
################################################################################
-# include/partition_alter_11.inc #
+# inc/partition_alter_11.inc #
# #
# Purpose: #
# Check ALTER partitioned table and the state of the table afterwards #
@@ -10,11 +10,11 @@
# PARTITION BY RANGE/LIST ... SUBPARTITION BY HASH/KEY ... #
# do #
# 1. Create the partitioned table #
-# 2. Execute include/partition_alter_1.inc, which will #
+# 2. Execute inc/partition_alter_1.inc, which will #
# - Insert the first half of the table t0_template into t1 #
# - Execute the ALTER TABLE statement #
# - Insert the second half of the table t0_template into t1 #
-# - Execute the usability test include/partition_check.inc #
+# - Execute the usability test inc/partition_check.inc #
# - Drop the table t1 #
# done #
# #
@@ -26,14 +26,14 @@
# Example: #
# let $unique= , UNIQUE INDEX uidx1 (f_int1); #
# let $alter= ALTER TABLE t1 DROP UNIQUE INDEX uidx1; #
-# include/partition_alter1.inc #
+# inc/partition_alter1.inc #
# #
-# Attention: The routine include/partition_alter_13.inc is very similar #
+# Attention: The routine inc/partition_alter_13.inc is very similar #
# to this one. So if something has to be changed here it #
# might be necessary to do it also there #
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
+# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@@ -56,7 +56,6 @@ $unique
)
$partitioning;
--source suite/parts/inc/partition_alter_1.inc
-# --source include/partition_alter_1.inc
#----------- PARTITION BY KEY
if ($with_partitioning)
@@ -69,7 +68,6 @@ $unique
)
$partitioning;
--source suite/parts/inc/partition_alter_1.inc
-# --source include/partition_alter_1.inc
#----------- PARTITION BY LIST
if ($with_partitioning)
@@ -90,7 +88,6 @@ $unique
)
$partitioning;
--source suite/parts/inc/partition_alter_1.inc
-# --source include/partition_alter_1.inc
#----------- PARTITION BY RANGE
if ($with_partitioning)
@@ -112,7 +109,6 @@ $unique
)
$partitioning;
--source suite/parts/inc/partition_alter_1.inc
-# --source include/partition_alter_1.inc
#----------- PARTITION BY RANGE -- SUBPARTITION BY HASH
if ($with_partitioning)
@@ -133,7 +129,6 @@ $unique
)
$partitioning;
--source suite/parts/inc/partition_alter_1.inc
-# --source include/partition_alter_1.inc
#----------- PARTITION BY RANGE -- SUBPARTITION BY KEY
if ($with_partitioning)
@@ -157,7 +152,6 @@ $unique
)
$partitioning;
--source suite/parts/inc/partition_alter_1.inc
-# --source include/partition_alter_1.inc
#----------- PARTITION BY LIST -- SUBPARTITION BY HASH
if ($with_partitioning)
@@ -178,7 +172,6 @@ $unique
)
$partitioning;
--source suite/parts/inc/partition_alter_1.inc
-# --source include/partition_alter_1.inc
#----------- PARTITION BY LIST -- SUBPARTITION BY KEY
if ($with_partitioning)
@@ -199,4 +192,3 @@ $unique
)
$partitioning;
--source suite/parts/inc/partition_alter_1.inc
-# --source include/partition_alter_1.inc
diff --git a/mysql-test/suite/parts/inc/partition_basic.inc b/mysql-test/suite/parts/inc/partition_basic.inc
index 9854edab634..a5815d3b71c 100644
--- a/mysql-test/suite/parts/inc/partition_basic.inc
+++ b/mysql-test/suite/parts/inc/partition_basic.inc
@@ -1,12 +1,12 @@
################################################################################
-# include/partition_basic.inc #
+# inc/partition_basic.inc #
# #
# Purpose: #
# Basic tests around create partitioned table with/without PRIMARY KEY and #
# /or UNIQUE INDEX #
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
+# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@@ -29,7 +29,6 @@
--echo # 1.1 The partitioning function contains one column.
let $unique= ;
--source suite/parts/inc/partition_methods1.inc
-# --source include/partition_methods1.inc
#
--echo # 1.1.1 with DATA DIECTORY/INDEX DIRECTORY
#
@@ -50,16 +49,13 @@ let $unique= ;
let $with_directories= 1;
--source suite/parts/inc/partition_methods1.inc
- # --source include/partition_methods1.inc
--source suite/parts/inc/partition_directory.inc
- # --source include/partition_methods1.inc
let $with_directories= 0;
--enable_query_log
#
--echo # 1.2 The partitioning function contains two columns.
let $unique= ;
--source suite/parts/inc/partition_methods2.inc
-# --source include/partition_methods2.inc
#
--echo #------------------------------------------------------------------------
--echo # 2 Tables with PRIMARY KEY and/or UNIQUE INDEXes
@@ -72,12 +68,10 @@ if ($more_pk_ui_tests)
--echo # 2.1 PRIMARY KEY consisting of one column
let $unique= , PRIMARY KEY(f_int1);
--source suite/parts/inc/partition_methods1.inc
- # --source include/partition_methods1.inc
}
--echo # 2.2 UNIQUE INDEX consisting of one column
let $unique= , UNIQUE INDEX uidx1 (f_int1);
--source suite/parts/inc/partition_methods1.inc
- # --source include/partition_methods1.inc
--echo # 2.2.1 with DATA DIECTORY/INDEX DIRECTORY
#
@@ -98,7 +92,6 @@ if ($more_pk_ui_tests)
let $with_directories= TRUE;
--source suite/parts/inc/partition_methods1.inc
- # --source include/partition_methods1.inc
let $with_directories= FALSE;
--enable_query_log
#
@@ -107,19 +100,15 @@ if ($more_pk_ui_tests)
--echo # 2.3 PRIMARY KEY consisting of two columns
let $unique= , PRIMARY KEY(f_int1,f_int2);
--source suite/parts/inc/partition_methods1.inc
- # --source include/partition_methods1.inc
let $unique= , PRIMARY KEY(f_int2,f_int1);
--source suite/parts/inc/partition_methods1.inc
- # --source include/partition_methods1.inc
}
#
--echo # 2.4 UNIQUE INDEX consisting of two columns
let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2);
--source suite/parts/inc/partition_methods1.inc
- # --source include/partition_methods1.inc
let $unique= , UNIQUE INDEX uidx1 (f_int2,f_int1);
--source suite/parts/inc/partition_methods1.inc
- # --source include/partition_methods1.inc
#
}
--echo # 2.5 PRIMARY KEY + UNIQUE INDEX consisting of two columns
@@ -127,14 +116,11 @@ if ($do_pk_tests)
{
let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1);
--source suite/parts/inc/partition_methods1.inc
- # --source include/partition_methods1.inc
let $unique= , UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2);
--source suite/parts/inc/partition_methods1.inc
- # --source include/partition_methods1.inc
}
let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1);
--source suite/parts/inc/partition_methods1.inc
-# --source include/partition_methods1.inc
--echo #------------------------------------------------------------------------
--echo # 3 Tables with PRIMARY KEY and/or UNIQUE INDEXes
@@ -148,20 +134,16 @@ if ($more_pk_ui_tests)
--echo # 3.1 PRIMARY KEY consisting of two columns
let $unique= , PRIMARY KEY(f_int1,f_int2);
--source suite/parts/inc/partition_methods2.inc
- # --source include/partition_methods2.inc
let $unique= , PRIMARY KEY(f_int2,f_int1);
--source suite/parts/inc/partition_methods2.inc
- # --source include/partition_methods2.inc
}
#
--echo # 3.2 UNIQUE INDEX consisting of two columns
let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2);
--source suite/parts/inc/partition_methods2.inc
- # --source include/partition_methods2.inc
let $unique= , UNIQUE INDEX uidx1 (f_int2,f_int1);
--source suite/parts/inc/partition_methods2.inc
- # --source include/partition_methods2.inc
}
#
--echo # 3.3 PRIMARY KEY and UNIQUE INDEX consisting of two columns
@@ -169,11 +151,8 @@ if ($do_pk_tests)
{
let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1);
--source suite/parts/inc/partition_methods2.inc
- # --source include/partition_methods2.inc
let $unique= , UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2);
--source suite/parts/inc/partition_methods2.inc
- # --source include/partition_methods2.inc
}
let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1);
--source suite/parts/inc/partition_methods2.inc
-# --source include/partition_methods2.inc
diff --git a/mysql-test/suite/parts/inc/partition_binary.inc b/mysql-test/suite/parts/inc/partition_binary.inc
index 7243d6c2ce7..3ee363927c4 100644
--- a/mysql-test/suite/parts/inc/partition_binary.inc
+++ b/mysql-test/suite/parts/inc/partition_binary.inc
@@ -1,3 +1,5 @@
+--echo ---- Partitioning and binary data type
+
--disable_query_log
# DATA DIRECTORY
eval SET @data_dir = 'DATA DIRECTORY =
@@ -43,6 +45,9 @@ select count(*) from t2;
select hex(a) from t2;
drop table t2;
+# mleich: Several partitioning functions are no more allowed.
+if (0)
+{
eval create table t3 (a binary(255) not null, primary key(a)) engine=$engine
partition by range (ascii(a)) subpartition by key (a) subpartitions 4 (
partition pa16 values less than (16),
@@ -66,6 +71,7 @@ select count(*) from t3;
select hex(a) from t3;
drop table t3;
+
eval create table t4 (a binary(255) not null, primary key(a)) engine=$engine
partition by list (ascii(a)) subpartition by key (a) subpartitions 4 (
partition pa16 values in (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16),
@@ -86,6 +92,9 @@ eval insert into t4 values (repeat(char(ascii('a')+$letter),$count+54));
dec $count;
inc $letter;
}
+
select count(*) from t4;
select hex(a) from t4;
drop table t4;
+}
+# End of tests with disallowed partitioning functions.
diff --git a/mysql-test/suite/parts/inc/partition_bit.inc b/mysql-test/suite/parts/inc/partition_bit.inc
index 3dd880595a3..6fcf3b208bb 100644
--- a/mysql-test/suite/parts/inc/partition_bit.inc
+++ b/mysql-test/suite/parts/inc/partition_bit.inc
@@ -14,7 +14,7 @@ let $index_directory = `select @indx_dir`;
drop table if exists t1;
--enable_warnings
---error 1439
+--error ER_TOO_BIG_DISPLAYWIDTH
eval create table t1 (a bit(65), primary key (a)) engine=$engine partition by key (a);
eval create table t1 (a bit(0), primary key (a)) engine=$engine partition by key (a);
diff --git a/mysql-test/suite/parts/inc/partition_blob.inc b/mysql-test/suite/parts/inc/partition_blob.inc
index ccff06ba633..b22693c9f3d 100644
--- a/mysql-test/suite/parts/inc/partition_blob.inc
+++ b/mysql-test/suite/parts/inc/partition_blob.inc
@@ -1,3 +1,5 @@
+--echo ---- Partitioning and blob data type
+
--disable_query_log
# DATA DIRECTORY
eval SET @data_dir = 'DATA DIRECTORY =
diff --git a/mysql-test/suite/parts/inc/partition_char.inc b/mysql-test/suite/parts/inc/partition_char.inc
index 4e330b122e3..b3d7ae3c2a1 100644
--- a/mysql-test/suite/parts/inc/partition_char.inc
+++ b/mysql-test/suite/parts/inc/partition_char.inc
@@ -1,3 +1,5 @@
+--echo ---- Partitioning and char data type
+
--disable_query_log
# DATA DIRECTORY
eval SET @data_dir = 'DATA DIRECTORY =
@@ -42,6 +44,7 @@ select count(*) from t2;
select * from t2;
drop table t2;
+# mleich: Several partitioning functions are no more allowed.
if (0)
{
eval create table t3 (a char(255) not null, primary key(a)) engine=$engine
@@ -91,5 +94,4 @@ select count(*) from t4;
select a from t4;
drop table t4;
}
-#if (0)
-
+# End of tests with disallowed partitioning functions.
diff --git a/mysql-test/suite/parts/inc/partition_check.inc b/mysql-test/suite/parts/inc/partition_check.inc
index 6f03ed58241..19d548cc8ef 100644
--- a/mysql-test/suite/parts/inc/partition_check.inc
+++ b/mysql-test/suite/parts/inc/partition_check.inc
@@ -1,5 +1,5 @@
################################################################################
-# include/partition_check.inc #
+# inc/partition_check.inc #
# #
# Purpose: #
# Do some basic usability checks on table t1. #
@@ -27,7 +27,7 @@
# Records can be deleted or inserted, but the content of the #
# records after a test/testsequence should follow this scheme. #
# #
-# All checks of preceeding statements via Select are so written, #
+# All checks of preceding statements via Select are so written, #
# that they deliver a #
# # check <n> success: 1 #
# when everything is like expected. #
@@ -35,18 +35,21 @@
# This is useful for cleanups. #
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
-# Original Date: 2006-03-05 #
-# Change Author: #
-# Change Date: #
-# Change: #
+# Original Author: mleich #
+# Original Date: 2006-03-05 #
+# Change Author: mleich #
+# Change Date: 2007-10-08 #
+# Change: Around fix for #
+# Bug#31243 Test "partition_basic_myisam" truncates path names#
+# Adjustments of expected error codes: #
+# ER_NO_PARTITION_FOR_GIVEN_VALUE is now 1525 #
+# ER_SAME_NAME_PARTITION is now 1516 #
################################################################################
---echo # Start usability test (include/partition_check.inc)
+--echo # Start usability test (inc/partition_check.inc)
# Print the CREATE TABLE STATEMENT and store the current layout of the table
--source suite/parts/inc/partition_layout_check1.inc
-# --source include/partition_layout_check1.inc
#-------------------------------------------------------------------------------
@@ -156,8 +159,7 @@ if ($run)
# partitioning mechanism.
# Sideeffect: Attempt to INSERT one record
# DUPLICATE KEY will appear if we have UNIQUE columns
-# 1022: ER_DUP_KEY
-# 1062: ER_DUP_ENTRY
+# ER_DUP_KEY, ER_DUP_ENTRY
--disable_abort_on_error
INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig)
SELECT f_int1, f_int1, CAST(f_int1 AS CHAR),
@@ -170,14 +172,13 @@ if ($no_debug)
}
eval SET @my_errno = $mysql_errno;
let $run_delete= `SELECT @my_errno = 0`;
-let $any_unique= `SELECT @my_errno IN (1022,1062)`;
-let $unexpected_error= `SELECT @my_errno NOT IN (0,1022,1062)`;
+let $any_unique= `SELECT @my_errno IN ($ER_DUP_KEY,$ER_DUP_ENTRY)`;
# DEBUG eval SELECT $run_delete AS run_delete, $any_unique AS any_unique,
-# $unexpected_error AS unexpected_error;
-if ($unexpected_error)
+# @my_errno AS sql_errno;
+if (`SELECT @my_errno NOT IN (0,$ER_DUP_KEY,$ER_DUP_ENTRY)`)
{
--echo # The last command got an unexepected error response.
- --echo # Expected/handled SQL codes are 0,1022,1062
+ --echo # Expected/handled SQL codes are 0,$ER_DUP_KEY,$ER_DUP_ENTRY
SELECT '# SQL code we got was: ' AS "", @my_errno AS "";
--echo # Sorry, have to abort.
exit;
@@ -200,8 +201,7 @@ if ($any_unique)
## 1.3.1 Check, if f_int1 is UNIQUE
# Sideeffect: Attempt to INSERT one record
# DUPLICATE KEY will appear if we have UNIQUE columns
- # 1022: ER_DUP_KEY
- # 1062: ER_DUP_ENTRY
+ # ER_DUP_KEY, ER_DUP_ENTRY
--disable_abort_on_error
INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig)
SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR),
@@ -214,14 +214,13 @@ if ($any_unique)
}
eval SET @my_errno = $mysql_errno;
let $run_delete= `SELECT @my_errno = 0`;
- let $f_int1_is_unique= `SELECT @my_errno IN (1022,1062)`;
- let $unexpected_error= `SELECT @my_errno NOT IN (0,1022,1062)`;
+ let $f_int1_is_unique= `SELECT @my_errno IN ($ER_DUP_KEY,$ER_DUP_ENTRY)`;
# DEBUG eval SELECT $run_delete AS run_delete, $f_int1_is_unique AS any_unique,
- # $unexpected_error AS unexpected_error;
- if ($unexpected_error)
+ # @my_errno AS sql_errno;
+ if (`SELECT @my_errno NOT IN (0,$ER_DUP_KEY,$ER_DUP_ENTRY)`)
{
--echo # The last command got an unexepected error response.
- --echo # Expected/handled SQL codes are 0,1022,1062
+ --echo # Expected/handled SQL codes are 0,$ER_DUP_KEY,$ER_DUP_ENTRY
SELECT '# SQL code we got was: ' AS "", @my_errno AS "";
--echo # Sorry, have to abort.
exit;
@@ -238,7 +237,7 @@ if ($any_unique)
DELETE FROM t1 WHERE f_charbig = 'delete me';
}
- ## 1.3.2 Check, if f_int2 is UNIQUE
+ ## 1.3.2 Check, if f_int2 is UNIQUE (get ER_DUP_KEY or ER_DUP_ENTRY
--disable_abort_on_error
INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig)
SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR),
@@ -251,14 +250,13 @@ if ($any_unique)
}
eval SET @my_errno = $mysql_errno;
let $run_delete= `SELECT @my_errno = 0`;
- let $f_int1_is_unique= `SELECT @my_errno IN (1022,1062)`;
- let $unexpected_error= `SELECT @my_errno NOT IN (0,1022,1062)`;
+ let $f_int1_is_unique= `SELECT @my_errno IN ($ER_DUP_KEY,$ER_DUP_ENTRY)`;
# DEBUG eval SELECT $run_delete AS run_delete, $f_int1_is_unique AS any_unique,
- # $unexpected_error AS unexpected_error;
- if ($unexpected_error)
+ # @my_errno AS sql_errno;
+ if (`SELECT @my_errno NOT IN (0,$ER_DUP_KEY,$ER_DUP_ENTRY)`)
{
--echo # The last command got an unexepected error response.
- --echo # Expected/handled SQL codes are 0,1022,1062
+ --echo # Expected/handled SQL codes are 0,$ER_DUP_KEY,$ER_DUP_ENTRY
SELECT '# SQL code we got was: ' AS "", @my_errno AS "";
--echo # Sorry, have to abort.
exit;
@@ -285,14 +283,11 @@ if ($any_unique)
# per f_int1 used in partitioning function
let $col_to_check= f_int1;
--source suite/parts/inc/partition_check_read.inc
-# --source include/partition_check_read.inc
## 2.2 Read all existing and some not existing records of table
# per f_int2 used in partitioning function
let $col_to_check= f_int2;
--source suite/parts/inc/partition_check_read.inc
-if ($fixed_bug18735)
-{
#-------------------------------------------------------------------------------
# 3 Some operations with multiple records
@@ -317,7 +312,7 @@ SELECT '# check multiple-2 success: ' AS "",COUNT(*) = @max_row - @max_row_div3
# (Insert the records deleted in 3.2)
INSERT INTO t1 SELECT * FROM t0_template
WHERE MOD(f_int1,3) = 0;
-# Check of preceeding statement via Select
+# Check of preceding statement via Select
if ($no_debug)
{
--disable_query_log
@@ -333,7 +328,7 @@ FROM t1;
UPDATE t1 SET f_int1 = f_int1 + @max_row
WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4
AND @max_row_div2 + @max_row_div4;
-# Check of preceeding statement via Select
+# Check of preceding statement via Select
if ($no_debug)
{
--disable_query_log
@@ -348,7 +343,7 @@ SELECT '# check multiple-4 success: ' AS "",(COUNT(*) = @max_row) AND (MIN(f_int
DELETE FROM t1
WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row
AND @max_row_div2 + @max_row_div4 + @max_row;
-# Check of preceeding statement via Select
+# Check of preceding statement via Select
if ($no_debug)
{
--disable_query_log
@@ -401,7 +396,7 @@ INSERT INTO t1
SET f_int1 = @cur_value , f_int2 = @cur_value,
f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR),
f_charbig = '#SINGLE#';
-# Check of preceeding statement via Select
+# Check of preceding statement via Select
if ($no_debug)
{
--disable_query_log
@@ -419,7 +414,7 @@ INSERT INTO t1
SET f_int1 = @cur_value , f_int2 = @cur_value,
f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR),
f_charbig = '#SINGLE#';
-# Check of preceeding statement via Select
+# Check of preceding statement via Select
if ($no_debug)
{
--disable_query_log
@@ -439,7 +434,7 @@ SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1;
# Bug#18735: Partitions: NDB, UNIQUE INDEX, UPDATE, strange server response
UPDATE t1 SET f_int1 = @cur_value2
WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#';
-# Check of preceeding statement via Select
+# Check of preceding statement via Select
if ($no_debug)
{
--disable_query_log
@@ -460,7 +455,7 @@ SELECT MAX(f_int1) INTO @cur_value2 FROM t1;
# Bug#18735: Partitions: NDB, UNIQUE INDEX, UPDATE, strange server response
UPDATE t1 SET f_int1 = @cur_value1
WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#';
-# Check of preceeding statement via Select
+# Check of preceding statement via Select
if ($no_debug)
{
--disable_query_log
@@ -472,7 +467,7 @@ WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#';
# 4.5 Delete the record with the highest value of f_int1.
SELECT MAX(f_int1) INTO @cur_value FROM t1;
DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#';
-# Check of preceeding statements via Select
+# Check of preceding statements via Select
if ($no_debug)
{
--disable_query_log
@@ -483,7 +478,7 @@ WHERE f_charbig = '#SINGLE#' AND f_int1 = f_int1 = @cur_value;
#
# 4.6 Delete the record with f_int1 = -1
DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#';
-# Check of preceeding statements via Select
+# Check of preceding statements via Select
if ($no_debug)
{
--disable_query_log
@@ -495,9 +490,9 @@ WHERE f_charbig = '#SINGLE#' AND f_int1 IN (-1,@cur_value);
# 4.7 Insert one record with such a big value for f_int1, so that in case
# - f_int1 is used within the partitioning algorithm
# - we use range partitioning
-# we get error ER_NO_PARTITION_FOR_GIVEN_VALUE (1523)
+# we get error ER_NO_PARTITION_FOR_GIVEN_VALUE
# "Table has no partition for value ...."
-# or ER_SAME_NAME_PARTITION (1514)
+# or ER_SAME_NAME_PARTITION
--disable_abort_on_error
eval INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#$max_int_4##';
--enable_abort_on_error
@@ -506,17 +501,16 @@ if ($no_debug)
--disable_query_log
}
eval SET @my_errno = $mysql_errno;
-let $unexpected_error= `SELECT @my_errno NOT IN (0,1514,1523)`;
-if ($unexpected_error)
+if (`SELECT @my_errno NOT IN (0,$ER_SAME_NAME_PARTITION,$ER_NO_PARTITION_FOR_GIVEN_VALUE)`)
{
--echo # The last command got an unexepected error response.
- --echo # Expected/handled SQL codes are 0,1514,1523
+ --echo # Expected/handled SQL codes are 0,$ER_SAME_NAME_PARTITION,$ER_NO_PARTITION_FOR_GIVEN_VALUE
SELECT '# SQL code we got was: ' AS "", @my_errno AS "";
--echo # Sorry, have to abort.
exit;
--echo
}
-# Check of preceeding statement via Select, if the INSERT was successful
+# Check of preceding statement via Select, if the INSERT was successful
let $run= `SELECT @my_errno = 0`;
if ($run)
{
@@ -534,8 +528,6 @@ eval DELETE FROM t1 WHERE f_charbig = '#$max_int_4##';
}
--enable_query_log
-}
-# End workaround for Bug#18735
#-------------------------------------------------------------------------------
# 5 Experiments with NULL
@@ -558,14 +550,13 @@ INSERT t1 SET f_int1 = 0 , f_int2 = 0,
# mechanism if the result of the expression in the partitioning algorithm
# becomes NULL.
# This INSERT will fail, if f_int1 is PRIMARY KEY or UNIQUE INDEX
-# 1048: ER_BAD_NULL_ERROR
+# with ER_BAD_NULL_ERROR.
--disable_abort_on_error
-
INSERT INTO t1
SET f_int1 = NULL , f_int2 = -@max_row,
f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR),
f_charbig = '#NULL#';
-# Some other NULL experiments if preceeding INSERT was successfull
+# Some other NULL experiments if preceding INSERT was successfull
--enable_abort_on_error
if ($no_debug)
{
@@ -573,13 +564,13 @@ if ($no_debug)
}
eval SET @my_errno = $mysql_errno;
let $run= `SELECT @my_errno = 0`;
-let $unexpected_error= `SELECT @my_errno NOT IN (0,1048)`;
-if ($unexpected_error)
+if (`SELECT @my_errno NOT IN (0,$ER_BAD_NULL_ERROR)`)
{
--echo # The last command got an unexepected error response.
- --echo # Expected/handled SQL codes are 0,1048
+ --echo # Expected/handled SQL codes are 0,$ER_BAD_NULL_ERROR
SELECT '# SQL code we got was: ' AS "", @my_errno AS "";
--echo # Sorry, have to abort.
+ --echo # Please check the error name to number mapping in inc/partition.pre.
exit;
--echo
}
@@ -589,7 +580,7 @@ if ($unexpected_error)
# The following checks do not make sense if f_int1 cannot be NULL
if ($run)
{
-# Check of preceeding statement via Select
+# Check of preceding statement via Select
if ($no_debug)
{
--disable_query_log
@@ -608,7 +599,7 @@ if ($no_debug)
{
--disable_query_log
}
-# Check of preceeding statement via Select
+# Check of preceding statement via Select
SELECT '# check null-2 success: ' AS "",COUNT(*) = 1 AS "" FROM t1
WHERE f_int1 = -@max_row AND f_charbig = '#NULL#';
--enable_query_log
@@ -620,7 +611,7 @@ if ($no_debug)
{
--disable_query_log
}
-# Check of preceeding statement via Select
+# Check of preceding statement via Select
SELECT '# check null-3 success: ' AS "",COUNT(*) = 1 AS "" FROM t1
WHERE f_int1 IS NULL AND f_charbig = '#NULL#';
--enable_query_log
@@ -628,7 +619,7 @@ WHERE f_int1 IS NULL AND f_charbig = '#NULL#';
DELETE FROM t1
WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR)
AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#';
-# Check of preceeding statement via Select
+# Check of preceding statement via Select
if ($no_debug)
{
--disable_query_log
@@ -693,7 +684,6 @@ if ($any_unique)
UPDATE f_int1 = 2 * @max_row + source_tab.f_int1,
f_charbig = 'was updated';
--source suite/parts/inc/partition_20.inc
- # --source include/partition_20.inc
}
if ($f_int2_is_unique)
@@ -709,7 +699,6 @@ if ($any_unique)
UPDATE f_int2 = 2 * @max_row + source_tab.f_int1,
f_charbig = 'was updated';
--source suite/parts/inc/partition_20.inc
- # --source include/partition_20.inc
}
## 6.3 f_int1, f_int2 is UNIQUE, UPDATE f_int1, f_int2 when DUPLICATE KEY
@@ -723,7 +712,6 @@ if ($any_unique)
f_int2 = 2 * @max_row + source_tab.f_int1,
f_charbig = 'was updated';
--source suite/parts/inc/partition_20.inc
- # --source include/partition_20.inc
## 6.4 REPLACE
# Bug#16782: Partitions: crash, REPLACE .. on table with PK, DUPLICATE KEY
@@ -732,7 +720,7 @@ if ($any_unique)
FROM t0_template source_tab
WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row;
# DEBUG SELECT * FROM t1 ORDER BY f_int1, f_int2;
- # Check of preceeding statement via Select
+ # Check of preceding statement via Select
if ($no_debug)
{
--disable_query_log
@@ -759,10 +747,6 @@ if ($any_unique)
# DEBUG SELECT * FROM t1 ORDER BY f_int1, f_int2;
}
-if ($fixed_bug18735)
-{
- # The following tests work cannot like intended, if we had to omit
- # tests because of Bug#18735
#-------------------------------------------------------------------------------
# 7 Transactions
@@ -939,14 +923,12 @@ if ($debug)
SELECT * FROM t1 ORDER BY f_int1;
}
-}
-# End workaround for Bug#18735
#-------------------------------------------------------------------------------
# 8 Some special cases
# 8.1 Dramatic increase of the record/partition/subpartition/table sizes
UPDATE t1 SET f_charbig = REPEAT('b', 1000);
-# partial check of preceeding statement via Select
+# partial check of preceding statement via Select
if ($no_debug)
{
--disable_query_log
@@ -957,7 +939,7 @@ WHERE f_int1 = 1 AND f_charbig = REPEAT('b', 1000);
#
# 8.2 Dramatic decrease of the record/partition/subpartition/table sizes
UPDATE t1 SET f_charbig = '';
-# partial check of preceeding statement via Select
+# partial check of preceding statement via Select
if ($no_debug)
{
--disable_query_log
@@ -973,8 +955,7 @@ if ($debug)
SELECT * FROM t1 ORDER BY f_int1;
}
-if ($fixed_bug18735)
-{
+
#-------------------------------------------------------------------------------
# 9 TRIGGERs
let $num= 1;
@@ -994,28 +975,22 @@ SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
let $event= BEFORE INSERT;
--source suite/parts/inc/partition_trigg1.inc
-# --source include/partition_trigg1.inc
let $event= AFTER INSERT;
--source suite/parts/inc/partition_trigg1.inc
-# --source include/partition_trigg1.inc
let $statement= UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2
WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1));
let $event= BEFORE UPDATE;
--source suite/parts/inc/partition_trigg1.inc
-# --source include/partition_trigg1.inc
let $event= AFTER UPDATE;
--source suite/parts/inc/partition_trigg1.inc
-# --source include/partition_trigg1.inc
let $statement= DELETE FROM t0_aux
WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1));
let $event= BEFORE DELETE;
--source suite/parts/inc/partition_trigg1.inc
-# --source include/partition_trigg1.inc
let $event= AFTER DELETE;
--source suite/parts/inc/partition_trigg1.inc
-# --source include/partition_trigg1.inc
# Cleanup
eval DELETE FROM $tab_in_trigg
@@ -1048,28 +1023,22 @@ SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
let $event= BEFORE INSERT;
--source suite/parts/inc/partition_trigg1.inc
-# --source include/partition_trigg1.inc
let $event= AFTER INSERT;
--source suite/parts/inc/partition_trigg1.inc
-# --source include/partition_trigg1.inc
let $statement= UPDATE t1 SET f_int1 = - f_int1, f_int2 = - f_int2
WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1));
let $event= BEFORE UPDATE;
--source suite/parts/inc/partition_trigg1.inc
-# --source include/partition_trigg1.inc
let $event= AFTER UPDATE;
--source suite/parts/inc/partition_trigg1.inc
-# --source include/partition_trigg1.inc
let $statement= DELETE FROM t1
WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1));
let $event= BEFORE DELETE;
--source suite/parts/inc/partition_trigg1.inc
-# --source include/partition_trigg1.inc
let $event= AFTER DELETE;
--source suite/parts/inc/partition_trigg1.inc
-# --source include/partition_trigg1.inc
eval DELETE FROM $tab_in_trigg
WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
}
@@ -1091,7 +1060,6 @@ SET f_charbig = '####updated per update statement itself####';
let $source= old;
let $event= BEFORE UPDATE;
--source suite/parts/inc/partition_trigg2.inc
-# --source include/partition_trigg2.inc
# FIXME when AFTER TRIGGER can be used
# Currently (2006-02-23) a AFTER TRIGGER is not allowed to modify a row, which
# was just modified: 1362: Updating of NEW row is not allowed in after trigger
@@ -1107,7 +1075,6 @@ f_charbig = '####updated per update statement itself####';
let $source= old;
let $event= BEFORE UPDATE;
--source suite/parts/inc/partition_trigg2.inc
-# --source include/partition_trigg2.inc
# FIXME when AFTER TRIGGER can be used
# Currently (2006-02-23) a AFTER TRIGGER is not allowed to modify a row, which
# was just modified: 1362: Updating of NEW row is not allowed in after trigger
@@ -1115,7 +1082,6 @@ let $event= BEFORE UPDATE;
let $source= new;
let $event= BEFORE UPDATE;
--source suite/parts/inc/partition_trigg2.inc
-# --source include/partition_trigg2.inc
# FIXME when AFTER TRIGGER can be used
if ($debug)
@@ -1134,7 +1100,6 @@ ORDER BY f_int1;
let $event= BEFORE INSERT;
let $source= new;
--source suite/parts/inc/partition_trigg3.inc
-# --source include/partition_trigg3.inc
# FIXME when AFTER TRIGGER can be used
# 9.4.2 INSERT assigns no values to the recalculate columns
@@ -1146,7 +1111,6 @@ ORDER BY f_int1;
let $event= BEFORE INSERT;
let $source= new;
--source suite/parts/inc/partition_trigg3.inc
-# --source include/partition_trigg3.inc
# FIXME when AFTER TRIGGER can be used
if ($debug)
@@ -1154,8 +1118,6 @@ if ($debug)
SELECT * FROM t1 ORDER BY f_int1;
}
-}
-# End workaround for Bug#18735
#-------------------------------------------------------------------------------
# 10 ANALYZE/CHECK/CHECKSUM
@@ -1177,17 +1139,15 @@ CHECKSUM TABLE t1 EXTENDED;
# FIXME What will happen with NDB ?
OPTIMIZE TABLE t1;
--source suite/parts/inc/partition_layout_check2.inc
-# --source include/partition_layout_check2.inc
# 10.2 REPAIR TABLE
REPAIR TABLE t1 EXTENDED;
--source suite/parts/inc/partition_layout_check2.inc
-# --source include/partition_layout_check2.inc
#
# 11.3 Truncate
# Manual about TRUNCATE on tables ( != InnoDB table with FOREIGN KEY ):
# Truncate operations drop and re-create the table ....
TRUNCATE t1;
-# Check of preceeding statement via Select
+# Check of preceding statement via Select
if ($no_debug)
{
--disable_query_log
@@ -1195,6 +1155,5 @@ if ($no_debug)
SELECT '# check TRUNCATE success: ' AS "",COUNT(*) = 0 AS "" FROM t1;
--enable_query_log
--source suite/parts/inc/partition_layout_check2.inc
-# --source include/partition_layout_check2.inc
---echo # End usability test (include/partition_check.inc)
+--echo # End usability test (inc/partition_check.inc)
diff --git a/mysql-test/suite/parts/inc/partition_check_drop.inc b/mysql-test/suite/parts/inc/partition_check_drop.inc
index 825ebecba24..88ebdb7ad48 100644
--- a/mysql-test/suite/parts/inc/partition_check_drop.inc
+++ b/mysql-test/suite/parts/inc/partition_check_drop.inc
@@ -1,5 +1,5 @@
################################################################################
-# include/partition_check_drop.inc #
+# inc/partition_check_drop.inc #
# #
# Purpose: #
# Check that a drop table removes all files belonging to this table. #
@@ -9,7 +9,7 @@
# This routine is only useful for the partition_<feature>_<engine> tests. #
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
+# Original Author: mleich #
# Original Date: 2006-05-12 #
# Change Author: #
# Change Date: #
@@ -52,7 +52,7 @@ if ($found_garbage)
if ($ls)
{
--echo # Attention: There are unused files.
- --echo # Either the DROP TABLE or a preceeding ALTER TABLE
+ --echo # Either the DROP TABLE or a preceding ALTER TABLE
--echo # <alter partitioning> worked incomplete.
--echo # We found:
# Print the list of files into the protocol
diff --git a/mysql-test/suite/parts/inc/partition_check_read.inc b/mysql-test/suite/parts/inc/partition_check_read.inc
index 14bbd46ac7f..e42bb9c90ab 100644
--- a/mysql-test/suite/parts/inc/partition_check_read.inc
+++ b/mysql-test/suite/parts/inc/partition_check_read.inc
@@ -1,5 +1,5 @@
################################################################################
-# include/partition_check_read.inc #
+# inc/partition_check_read.inc #
# #
# Purpose: #
# Read table t1 row by row #
@@ -10,7 +10,7 @@
# - the table contains all expected rows #
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
+# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@@ -80,7 +80,7 @@ if ($no_debug)
--disable_query_log
}
--echo # check read via $col_to_check success: $success
-# ML: The following is omitted because of not reported mysqltest bug
+# mleich: The following is omitted because of not reported mysqltest bug
# (@max_row time the success message)
if (0)
{
diff --git a/mysql-test/suite/parts/inc/partition_check_read1.inc b/mysql-test/suite/parts/inc/partition_check_read1.inc
index dad5c347052..0b8b800a371 100644
--- a/mysql-test/suite/parts/inc/partition_check_read1.inc
+++ b/mysql-test/suite/parts/inc/partition_check_read1.inc
@@ -1,5 +1,5 @@
################################################################################
-# include/partition_check_read1.inc #
+# inc/partition_check_read1.inc #
# #
# Purpose: #
# Read rows from table t1 in different ways #
@@ -10,7 +10,7 @@
# must be set before sourcing this routine. #
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
+# Original Author: mleich #
# Original Date: 2006-04-11 #
# Change Author: #
# Change Date: #
diff --git a/mysql-test/suite/parts/inc/partition_check_read2.inc b/mysql-test/suite/parts/inc/partition_check_read2.inc
index 4c32456a31e..60964355d14 100644
--- a/mysql-test/suite/parts/inc/partition_check_read2.inc
+++ b/mysql-test/suite/parts/inc/partition_check_read2.inc
@@ -1,12 +1,12 @@
################################################################################
-# include/partition_check_read2.inc #
+# inc/partition_check_read2.inc #
# #
# Purpose: #
# Read rows from table t1 in different ways #
# This routine is only useful for the partition_<feature>_<engine> tests. #
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
+# Original Author: mleich #
# Original Date: 2006-04-11 #
# Change Author: #
# Change Date: #
diff --git a/mysql-test/suite/parts/inc/partition_cleanup.inc b/mysql-test/suite/parts/inc/partition_cleanup.inc
index dcd6005287e..34d3e435509 100644
--- a/mysql-test/suite/parts/inc/partition_cleanup.inc
+++ b/mysql-test/suite/parts/inc/partition_cleanup.inc
@@ -1,12 +1,12 @@
################################################################################
-# include/partition_cleanup.inc #
+# inc/partition_cleanup.inc #
# #
# Purpose: #
# Removal of the objects created by the t/partition_<feature>_<engine>.test #
# scripts. #
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
+# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
diff --git a/mysql-test/suite/parts/inc/partition_directory.inc b/mysql-test/suite/parts/inc/partition_directory.inc
index 17748df4f4d..5acdf13a8f9 100644
--- a/mysql-test/suite/parts/inc/partition_directory.inc
+++ b/mysql-test/suite/parts/inc/partition_directory.inc
@@ -1,5 +1,5 @@
################################################################################
-# include/partition_rectory.inc #
+# inc/partition_directory.inc #
# #
# Purpose: #
# Create and check partitioned tables #
@@ -9,7 +9,7 @@
# do #
# 1. Create the partitioned table #
# 2 Insert the content of the table t0_template into t1 #
-# 3. Execute include/partition_check.inc #
+# 3. Execute inc/partition_check.inc #
# 4. Drop the table t1 #
# done #
#------------------------------------------------------------------------------#
@@ -49,7 +49,6 @@ $partitioning;
--enable_query_log
eval $insert_all;
--source suite/parts/inc/partition_check.inc
-# --source include/partition_check.inc
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
@@ -86,7 +85,6 @@ $partitioning;
--enable_query_log
eval $insert_all;
--source suite/parts/inc/partition_check.inc
-# --source include/partition_check.inc
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
@@ -122,7 +120,6 @@ $partitioning;
--enable_query_log
eval $insert_all;
--source suite/parts/inc/partition_check.inc
-# --source include/partition_check.inc
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
@@ -153,7 +150,6 @@ $partitioning;
--enable_query_log
eval $insert_all;
--source suite/parts/inc/partition_check.inc
-# --source include/partition_check.inc
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
@@ -181,7 +177,6 @@ $partitioning;
--enable_query_log
eval $insert_all;
--source suite/parts/inc/partition_check.inc
-# --source include/partition_check.inc
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
@@ -212,7 +207,6 @@ $partitioning;
--enable_query_log
eval $insert_all;
--source suite/parts/inc/partition_check.inc
-# --source include/partition_check.inc
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
@@ -256,7 +250,6 @@ $partitioning;
--enable_query_log
eval $insert_all;
--source suite/parts/inc/partition_check.inc
-# --source include/partition_check.inc
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
diff --git a/mysql-test/suite/parts/inc/partition_engine.inc b/mysql-test/suite/parts/inc/partition_engine.inc
index 2beb08e7626..769e3d71530 100644
--- a/mysql-test/suite/parts/inc/partition_engine.inc
+++ b/mysql-test/suite/parts/inc/partition_engine.inc
@@ -1,5 +1,5 @@
################################################################################
-# include/partition_engine.inc #
+# inc/partition_engine.inc #
# #
# Purpose: #
# Tests around Create/Alter partitioned tables and storage engine settings #
@@ -17,7 +17,7 @@
# storage engine to use. #
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
+# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@@ -45,7 +45,6 @@ $column_list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
--source suite/parts/inc/partition_check.inc
-# --source include/partition_check.inc
DROP TABLE t1;
#
--echo #------------------------------------------------------------------------
@@ -62,7 +61,6 @@ PARTITION BY HASH(f_int1)
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
--source suite/parts/inc/partition_check.inc
-# --source include/partition_check.inc
DROP TABLE t1;
eval CREATE TABLE t1 (
$column_list
@@ -79,7 +77,6 @@ SUBPARTITION BY HASH(f_int1)
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
--source suite/parts/inc/partition_check.inc
-# --source include/partition_check.inc
DROP TABLE t1;
#
--echo #------------------------------------------------------------------------
@@ -96,7 +93,6 @@ PARTITION BY HASH(f_int1)
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
--source suite/parts/inc/partition_check.inc
-# --source include/partition_check.inc
DROP TABLE t1;
eval CREATE TABLE t1 (
$column_list
@@ -108,7 +104,6 @@ PARTITION BY HASH(f_int1)
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
--source suite/parts/inc/partition_check.inc
-# --source include/partition_check.inc
DROP TABLE t1;
eval CREATE TABLE t1 (
$column_list
@@ -125,7 +120,6 @@ SUBPARTITION BY HASH(f_int1)
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
--source suite/parts/inc/partition_check.inc
-# --source include/partition_check.inc
DROP TABLE t1;
eval CREATE TABLE t1 (
$column_list
@@ -142,7 +136,6 @@ SUBPARTITION BY HASH(f_int1)
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
--source suite/parts/inc/partition_check.inc
-# --source include/partition_check.inc
DROP TABLE t1;
#
--echo #------------------------------------------------------------------------
@@ -164,7 +157,6 @@ SUBPARTITION BY HASH(f_int1)
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
--source suite/parts/inc/partition_check.inc
-# --source include/partition_check.inc
DROP TABLE t1;
eval CREATE TABLE t1 (
$column_list
@@ -181,7 +173,6 @@ SUBPARTITION BY HASH(f_int1)
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
--source suite/parts/inc/partition_check.inc
-# --source include/partition_check.inc
DROP TABLE t1;
#
--echo #------------------------------------------------------------------------
@@ -199,7 +190,6 @@ PARTITION BY HASH(f_int1)
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
--source suite/parts/inc/partition_check.inc
-# --source include/partition_check.inc
DROP TABLE t1;
eval CREATE TABLE t1 (
$column_list
@@ -216,7 +206,6 @@ SUBPARTITION BY HASH(f_int1)
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
--source suite/parts/inc/partition_check.inc
-# --source include/partition_check.inc
DROP TABLE t1;
--echo # 6.2 Storage engine assignment after partition name + after
--echo # subpartition name
@@ -236,7 +225,6 @@ SUBPARTITION BY HASH(f_int1)
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
--source suite/parts/inc/partition_check.inc
-# --source include/partition_check.inc
DROP TABLE t1;
--echo #------------------------------------------------------------------------
@@ -252,7 +240,6 @@ PARTITION BY HASH(f_int1) ( PARTITION part1 ENGINE = $engine);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
--source suite/parts/inc/partition_check.inc
-# --source include/partition_check.inc
DROP TABLE t1;
# Bug#15966 Partitions: crash if session default engine <> engine used in create table
eval CREATE TABLE t1 (
@@ -266,6 +253,5 @@ SUBPARTITION BY HASH(f_int1)
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
--source suite/parts/inc/partition_check.inc
-# --source include/partition_check.inc
DROP TABLE t1;
eval SET SESSION storage_engine=$engine;
diff --git a/mysql-test/suite/parts/inc/partition_enum.inc b/mysql-test/suite/parts/inc/partition_enum.inc
index 67e790743f0..886ab6a5f97 100644
--- a/mysql-test/suite/parts/inc/partition_enum.inc
+++ b/mysql-test/suite/parts/inc/partition_enum.inc
@@ -1,3 +1,5 @@
+--echo ---- Partitioning and enum data type
+
--disable_query_log
# DATA DIRECTORY
eval SET @data_dir = 'DATA DIRECTORY =
@@ -47,6 +49,9 @@ select count(*) from t2;
select * from t2;
drop table t2;
+# mleich: Several partitioning functions are no more allowed.
+if (0)
+{
eval create table t3 (a enum (
'1','2','3','4','5','6','7','8','9','0',
'A','B','C','D','E','F','G','H','I','J','K','L',
@@ -71,4 +76,5 @@ dec $letter;
select count(*) from t3;
select * from t3;
drop table t3;
-
+}
+# End of tests with disallowed partitioning functions.
diff --git a/mysql-test/include/partition_layout.inc b/mysql-test/suite/parts/inc/partition_layout.inc
index e8d2b0f9123..c4181ef1cfd 100644
--- a/mysql-test/include/partition_layout.inc
+++ b/mysql-test/suite/parts/inc/partition_layout.inc
@@ -1,4 +1,4 @@
-# include/partition_layout.inc
+# inc/partition_layout.inc
#
# Print partitioning related informations about the table t1
#
diff --git a/mysql-test/suite/parts/inc/partition_layout_check1.inc b/mysql-test/suite/parts/inc/partition_layout_check1.inc
index d3441b3d886..9989f4ed9e3 100644
--- a/mysql-test/suite/parts/inc/partition_layout_check1.inc
+++ b/mysql-test/suite/parts/inc/partition_layout_check1.inc
@@ -1,17 +1,17 @@
################################################################################
-# include/partition_layout_check1.inc #
+# inc/partition_layout_check1.inc #
# #
# Purpose: #
# Store the SHOW CREATE TABLE output and the list of files belonging to #
# this table + print this into the protocol #
# This script is only usefule when sourced within the partitioning tests. #
# #
-# Attention: The routine include/partition_layout_check2.inc is very similar #
+# Attention: The routine inc/partition_layout_check2.inc is very similar #
# to this one. So if something has to be changed here it #
# might be necessary to do it also there #
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
+# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
diff --git a/mysql-test/suite/parts/inc/partition_layout_check2.inc b/mysql-test/suite/parts/inc/partition_layout_check2.inc
index 8a45613559d..05c44a73a7f 100644
--- a/mysql-test/suite/parts/inc/partition_layout_check2.inc
+++ b/mysql-test/suite/parts/inc/partition_layout_check2.inc
@@ -1,18 +1,18 @@
################################################################################
-# include/partition_layout_check2.inc #
+# inc/partition_layout_check2.inc #
# #
# Purpose: #
# Store the SHOW CREATE TABLE output and the list of files belonging to #
# this table + Check if the layout of the table was not modified #
-# since the call of include/partition_layout_check1.inc #
+# since the call of inc/partition_layout_check1.inc #
# This script is only usefule when sourced within the partitioning tests. #
# #
-# Attention: The routine include/partition_layout_check1.inc is very similar #
+# Attention: The routine inc/partition_layout_check1.inc is very similar #
# to this one. So if something has to be changed here it #
# might be necessary to do it also there #
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
+# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
diff --git a/mysql-test/suite/parts/inc/partition_methods1.inc b/mysql-test/suite/parts/inc/partition_methods1.inc
index 6e49c51cc3d..1edcdcb3743 100644
--- a/mysql-test/suite/parts/inc/partition_methods1.inc
+++ b/mysql-test/suite/parts/inc/partition_methods1.inc
@@ -1,5 +1,5 @@
################################################################################
-# include/partition_methods1.inc #
+# inc/partition_methods1.inc #
# #
# Purpose: #
# Create and check partitioned tables #
@@ -11,7 +11,7 @@
# do #
# 1. Create the partitioned table #
# 2 Insert the content of the table t0_template into t1 #
-# 3. Execute include/partition_check.inc #
+# 3. Execute inc/partition_check.inc #
# 4. Drop the table t1 #
# done #
# #
@@ -21,14 +21,14 @@
# has to be set before sourcing this routine. #
# Example: #
# let $unique= , UNIQUE INDEX uidx1 (f_int1); #
-# include/partition_method1s.inc #
+# inc/partition_method1s.inc #
# #
-# Attention: The routine include/partition_methods2.inc is very similar #
+# Attention: The routine inc/partition_methods2.inc is very similar #
# to this one. So if something has to be changed here it #
# might be necessary to do it also there #
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
+# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: HH #
# Change Date: 2006-05-12 #
@@ -66,7 +66,6 @@ $partitioning;
--enable_query_log
eval $insert_all;
--source suite/parts/inc/partition_check.inc
-# --source include/partition_check.inc
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
@@ -107,7 +106,6 @@ $partitioning;
--enable_query_log
eval $insert_all;
--source suite/parts/inc/partition_check.inc
-# --source include/partition_check.inc
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
@@ -143,7 +141,6 @@ $partitioning;
--enable_query_log
eval $insert_all;
--source suite/parts/inc/partition_check.inc
-# --source include/partition_check.inc
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
@@ -180,7 +177,6 @@ $partitioning;
--enable_query_log
eval $insert_all;
--source suite/parts/inc/partition_check.inc
-# --source include/partition_check.inc
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
@@ -212,7 +208,6 @@ $partitioning;
--enable_query_log
eval $insert_all;
--source suite/parts/inc/partition_check.inc
-# --source include/partition_check.inc
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
@@ -247,7 +242,6 @@ $partitioning;
--enable_query_log
eval $insert_all;
--source suite/parts/inc/partition_check.inc
-# --source include/partition_check.inc
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
@@ -299,7 +293,6 @@ $partitioning;
--enable_query_log
eval $insert_all;
--source suite/parts/inc/partition_check.inc
-# --source include/partition_check.inc
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
@@ -329,7 +322,6 @@ $partitioning;
--enable_query_log
eval $insert_all;
--source suite/parts/inc/partition_check.inc
-# --source include/partition_check.inc
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
let $with_directories= FALSE;
diff --git a/mysql-test/suite/parts/inc/partition_methods2.inc b/mysql-test/suite/parts/inc/partition_methods2.inc
index 31b083bfa7a..91821d620b6 100644
--- a/mysql-test/suite/parts/inc/partition_methods2.inc
+++ b/mysql-test/suite/parts/inc/partition_methods2.inc
@@ -1,5 +1,5 @@
################################################################################
-# include/partition_methods2.inc #
+# inc/partition_methods2.inc #
# #
# Purpose: #
# Create and check partitioned tables #
@@ -10,7 +10,7 @@
# do #
# 1. Create the partitioned table #
# 2 Insert the content of the table t0_template into t1 #
-# 3. Execute include/partition_check.inc #
+# 3. Execute inc/partition_check.inc #
# 4. Drop the table t1 #
# done #
# #
@@ -20,14 +20,14 @@
# has to be set before sourcing this routine. #
# Example: #
# let $unique= , UNIQUE INDEX uidx1 (f_int1); #
-# include/partition_methods2.inc #
+# inc/partition_methods2.inc #
# #
-# Attention: The routine include/partition_methods1.inc is very similar #
+# Attention: The routine inc/partition_methods1.inc is very similar #
# to this one. So if something has to be changed here it #
# might be necessary to do it also there #
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
+# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@@ -51,7 +51,6 @@ $unique
$partitioning;
eval $insert_all;
--source suite/parts/inc/partition_check.inc
-# --source include/partition_check.inc
DROP TABLE t1;
#----------- PARTITION BY KEY
@@ -66,7 +65,6 @@ $unique
$partitioning;
eval $insert_all;
--source suite/parts/inc/partition_check.inc
-# --source include/partition_check.inc
DROP TABLE t1;
#----------- PARTITION BY LIST
@@ -89,7 +87,6 @@ $unique
$partitioning;
eval $insert_all;
--source suite/parts/inc/partition_check.inc
-# --source include/partition_check.inc
DROP TABLE t1;
#----------- PARTITION BY RANGE
@@ -113,7 +110,6 @@ $unique
$partitioning;
eval $insert_all;
--source suite/parts/inc/partition_check.inc
-# --source include/partition_check.inc
DROP TABLE t1;
#----------- PARTITION BY RANGE -- SUBPARTITION BY HASH
@@ -136,7 +132,6 @@ $unique
$partitioning;
eval $insert_all;
--source suite/parts/inc/partition_check.inc
-# --source include/partition_check.inc
DROP TABLE t1;
#----------- PARTITION BY RANGE -- SUBPARTITION BY KEY
@@ -162,7 +157,6 @@ $unique
$partitioning;
eval $insert_all;
--source suite/parts/inc/partition_check.inc
-# --source include/partition_check.inc
DROP TABLE t1;
#----------- PARTITION BY LIST -- SUBPARTITION BY HASH
@@ -185,7 +179,6 @@ $unique
$partitioning;
eval $insert_all;
--source suite/parts/inc/partition_check.inc
-# --source include/partition_check.inc
DROP TABLE t1;
#----------- PARTITION BY LIST -- SUBPARTITION BY KEY
@@ -208,5 +201,4 @@ $unique
$partitioning;
eval $insert_all;
--source suite/parts/inc/partition_check.inc
-# --source include/partition_check.inc
DROP TABLE t1;
diff --git a/mysql-test/suite/parts/inc/partition_set.inc b/mysql-test/suite/parts/inc/partition_set.inc
index 292a28e7e1a..b9501ad04b6 100644
--- a/mysql-test/suite/parts/inc/partition_set.inc
+++ b/mysql-test/suite/parts/inc/partition_set.inc
@@ -1,3 +1,5 @@
+--echo ---- Partitioning and set data type
+
--disable_query_log
# DATA DIRECTORY
eval SET @data_dir = 'DATA DIRECTORY =
diff --git a/mysql-test/suite/parts/inc/partition_supported_sql_funcs.inc b/mysql-test/suite/parts/inc/partition_supported_sql_funcs.inc
index 0f30fd199f8..d9c1f5836f0 100644
--- a/mysql-test/suite/parts/inc/partition_supported_sql_funcs.inc
+++ b/mysql-test/suite/parts/inc/partition_supported_sql_funcs.inc
@@ -234,7 +234,6 @@ subpartition by hash($sqlfunc) subpartitions 5
let $t5=t5;
let $t6=t6;
--source suite/parts/inc/part_supported_sql_funcs_delete.inc
- # --source include/part_supported_sql_funcs_delete.inc
let $t1=t11;
let $t2=t22;
@@ -243,7 +242,6 @@ subpartition by hash($sqlfunc) subpartitions 5
let $t5=t55;
let $t6=t66;
--source suite/parts/inc/part_supported_sql_funcs_delete.inc
- # --source include/part_supported_sql_funcs_delete.inc
--echo -------------------------
--echo ---- some alter table end
--echo -------------------------
diff --git a/mysql-test/suite/parts/inc/partition_syntax.inc b/mysql-test/suite/parts/inc/partition_syntax.inc
index a2a29d25e48..e72aad80f0a 100644
--- a/mysql-test/suite/parts/inc/partition_syntax.inc
+++ b/mysql-test/suite/parts/inc/partition_syntax.inc
@@ -1,11 +1,11 @@
################################################################################
-# include/partition_syntax.inc #
+# inc/partition_syntax.inc #
# #
# Purpose: #
# Tests around Create partitioned tables syntax #
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
+# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@@ -107,17 +107,13 @@ let $unique_index= UNIQUE INDEX (f_int2);
#----------- PARTITION BY HASH
let $partition_scheme= PARTITION BY HASH(f_int1) PARTITIONS 2;
--source suite/parts/inc/partition_syntax_2.inc
-# --source include/partition_syntax_2.inc
let $partition_scheme= PARTITION BY HASH(f_int1 + f_int2) PARTITIONS 2;
--source suite/parts/inc/partition_syntax_2.inc
-# --source include/partition_syntax_2.inc
#----------- PARTITION BY KEY
let $partition_scheme= PARTITION BY KEY(f_int1) PARTITIONS 2;
--source suite/parts/inc/partition_syntax_2.inc
-# --source include/partition_syntax_2.inc
let $partition_scheme= PARTITION BY KEY(f_int1,f_int2) PARTITIONS 2;
--source suite/parts/inc/partition_syntax_2.inc
-# --source include/partition_syntax_2.inc
#----------- PARTITION BY LIST
let $partition_scheme= PARTITION BY LIST(MOD(f_int1,3))
(PARTITION partN VALUES IN (NULL),
@@ -125,25 +121,21 @@ let $partition_scheme= PARTITION BY LIST(MOD(f_int1,3))
PARTITION part1 VALUES IN (1),
PARTITION part2 VALUES IN (2));
--source suite/parts/inc/partition_syntax_2.inc
-# --source include/partition_syntax_2.inc
let $partition_scheme= PARTITION BY LIST(MOD(f_int1 + f_int2,3))
(PARTITION partN VALUES IN (NULL),
PARTITION part0 VALUES IN (0),
PARTITION part1 VALUES IN (1),
PARTITION part2 VALUES IN (2));
--source suite/parts/inc/partition_syntax_2.inc
-# --source include/partition_syntax_2.inc
#----------- PARTITION BY RANGE
let $partition_scheme= PARTITION BY RANGE(f_int1)
(PARTITION part1 VALUES LESS THAN (1),
PARTITION part2 VALUES LESS THAN (2147483646));
--source suite/parts/inc/partition_syntax_2.inc
-# --source include/partition_syntax_2.inc
let $partition_scheme= PARTITION BY RANGE(f_int1 + f_int2)
(PARTITION part1 VALUES LESS THAN (1),
PARTITION part2 VALUES LESS THAN (2147483646));
--source suite/parts/inc/partition_syntax_2.inc
-# --source include/partition_syntax_2.inc
#
--echo #------------------------------------------------------------------------
@@ -200,14 +192,12 @@ SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 3
(PARTITION part1 VALUES LESS THAN (1),
PARTITION part2 VALUES LESS THAN (2147483646));
--source suite/parts/inc/partition_syntax_2.inc
-# --source include/partition_syntax_2.inc
#----------- PARTITION BY RANGE -- SUBPARTITION BY KEY
let $partition_scheme= PARTITION BY RANGE(f_int2)
SUBPARTITION BY KEY(f_int1) SUBPARTITIONS 3
(PARTITION part1 VALUES LESS THAN (1),
PARTITION part2 VALUES LESS THAN (2147483646));
--source suite/parts/inc/partition_syntax_2.inc
-# --source include/partition_syntax_2.inc
#----------- PARTITION BY LIST -- SUBPARTITION BY HASH
let $partition_scheme= PARTITION BY LIST(MOD(f_int2,3))
SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2
@@ -216,7 +206,6 @@ SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2
PARTITION part1 VALUES IN (1),
PARTITION part2 VALUES IN (2));
--source suite/parts/inc/partition_syntax_2.inc
-# --source include/partition_syntax_2.inc
#----------- PARTITION BY LIST -- SUBPARTITION BY KEY
let $partition_scheme= PARTITION BY LIST(MOD(f_int2,3))
SUBPARTITION BY KEY(f_int1) SUBPARTITIONS 2
@@ -225,7 +214,6 @@ SUBPARTITION BY KEY(f_int1) SUBPARTITIONS 2
PARTITION part1 VALUES IN (1),
PARTITION part2 VALUES IN (2));
--source suite/parts/inc/partition_syntax_2.inc
-# --source include/partition_syntax_2.inc
--echo
--echo #========================================================================
@@ -249,7 +237,7 @@ PARTITION BY RANGE(f_int1)
--echo # This is a limitation of MySQL 5.1, which could be removed in
--echo # later releases.
--echo #------------------------------------------------------------------------
---error 1064
+--error ER_PARSE_ERROR
eval CREATE TABLE t1 (
$column_list,
PRIMARY KEY (f_int1)
@@ -324,7 +312,7 @@ PARTITION BY RANGE(f_int1)
--echo #------------------------------------------------------------------------
--echo # 3.5.1 NULL in RANGE partitioning clause
--echo # 3.5.1.1 VALUE LESS THAN (NULL) is not allowed
---error 1064
+--error ER_PARSE_ERROR
eval CREATE TABLE t1 (
$column_list
)
@@ -332,7 +320,7 @@ PARTITION BY RANGE(f_int1)
( PARTITION part1 VALUES LESS THAN (NULL),
PARTITION part2 VALUES LESS THAN (1000));
--echo # 3.5.1.2 VALUE LESS THAN (NULL) is not allowed
---error 1064
+--error ER_PARSE_ERROR
eval CREATE TABLE t1 (
$column_list
)
@@ -359,7 +347,6 @@ PARTITION BY LIST(MOD(f_int1,2))
( PARTITION part1 VALUES IN (NULL),
PARTITION part3 VALUES IN (1));
--source suite/parts/inc/partition_layout_check1.inc
-# --source include/partition_layout_check1.inc
DROP TABLE t1;
--echo # 3.5.3 Reveal that IN (...NULL) is not mapped to IN(0)
# Bug#15447: Partitions: NULL is treated as zero
@@ -372,7 +359,6 @@ PARTITION BY LIST(MOD(f_int1,2))
PARTITION part2 VALUES IN (0),
PARTITION part3 VALUES IN (1));
--source suite/parts/inc/partition_layout_check1.inc
-# --source include/partition_layout_check1.inc
DROP TABLE t1;
# FIXME Implement some non integer constant tests
@@ -395,7 +381,6 @@ $column_list
)
PARTITION BY HASH(f_int1);
--source suite/parts/inc/partition_layout_check1.inc
-# --source include/partition_layout_check1.inc
DROP TABLE t1;
--echo # 4.1.2 no partition number, named partitions
eval CREATE TABLE t1 (
@@ -403,7 +388,6 @@ $column_list
)
PARTITION BY HASH(f_int1) (PARTITION part1, PARTITION part2);
--source suite/parts/inc/partition_layout_check1.inc
-# --source include/partition_layout_check1.inc
DROP TABLE t1;
# Attention: Several combinations are impossible
# If subpartitioning exists
@@ -456,21 +440,20 @@ let $part3_Y= `SELECT @AUX`;
eval $part01 $column_list $part02 $part1_N $part2_N $part3_N ;
DROP TABLE t1;
# Bug#15407 Partitions: crash if subpartition
---error 1064
+--error ER_PARSE_ERROR
eval $part01 $column_list $part02 $part1_N $part2_N $part3_Y ;
---error 1064
+--error ER_PARSE_ERROR
eval $part01 $column_list $part02 $part1_N $part2_Y $part3_N ;
---error 1064
+--error ER_PARSE_ERROR
eval $part01 $column_list $part02 $part1_N $part2_Y $part3_Y ;
---error 1064
+--error ER_PARSE_ERROR
eval $part01 $column_list $part02 $part1_Y $part2_N $part3_N ;
---error 1064
+--error ER_PARSE_ERROR
eval $part01 $column_list $part02 $part1_Y $part2_N $part3_Y ;
---error 1064
+--error ER_PARSE_ERROR
eval $part01 $column_list $part02 $part1_Y $part2_Y $part3_N ;
eval $part01 $column_list $part02 $part1_Y $part2_Y $part3_Y ;
--source suite/parts/inc/partition_layout_check1.inc
-# --source include/partition_layout_check1.inc
DROP TABLE t1;
--echo #------------------------------------------------------------------------
@@ -480,172 +463,128 @@ DROP TABLE t1;
DROP TABLE IF EXISTS t1;
--enable_warnings
--echo # 4.2.1 partition/subpartition numbers INTEGER notation
-# ML: "positive/negative" is my private judgement. It need no to correspond
-# with the server response.
+# mleich: "positive/negative" is my private judgement. It need not to
+# correspond with the server response.
# (positive) number = 2
let $part_number= 2;
--source suite/parts/inc/partition_syntax_1.inc
-# --source include/partition_syntax_1.inc
# (positive) special case number = 1
let $part_number= 1;
--source suite/parts/inc/partition_syntax_1.inc
-# --source include/partition_syntax_1.inc
# (negative) 0 is non sense
let $part_number= 0;
--source suite/parts/inc/partition_syntax_1.inc
-# --source include/partition_syntax_1.inc
# (negative) -1 is non sense
let $part_number= -1;
--source suite/parts/inc/partition_syntax_1.inc
-# --source include/partition_syntax_1.inc
# (negative) 1000000 is too huge
let $part_number= 1000000;
--source suite/parts/inc/partition_syntax_1.inc
-# --source include/partition_syntax_1.inc
--echo # 4.2.2 partition/subpartition numbers DECIMAL notation
# (positive) number = 2.0
let $part_number= 2.0;
--source suite/parts/inc/partition_syntax_1.inc
-# --source include/partition_syntax_1.inc
# (negative) -2.0 is non sense
let $part_number= -2.0;
--source suite/parts/inc/partition_syntax_1.inc
-# --source include/partition_syntax_1.inc
# (negative) case number = 0.0 is non sense
let $part_number= 0.0;
--source suite/parts/inc/partition_syntax_1.inc
-# --source include/partition_syntax_1.inc
-if ($fixed_bug15890)
-{
# Bug#15890 Partitions: Strange interpretation of partition number
# (negative) number = 1.6 is non sense
let $part_number= 1.6;
--source suite/parts/inc/partition_syntax_1.inc
-# --source include/partition_syntax_1.inc
-}
# (negative) number is too huge
let $part_number= 999999999999999999999999999999.999999999999999999999999999999;
--source suite/parts/inc/partition_syntax_1.inc
-# --source include/partition_syntax_1.inc
# (negative) number is nearly zero
let $part_number= 0.000000000000000000000000000001;
--source suite/parts/inc/partition_syntax_1.inc
-# --source include/partition_syntax_1.inc
--echo # 4.2.3 partition/subpartition numbers FLOAT notation
##### FLOAT notation
# (positive) number = 2.0E+0
let $part_number= 2.0E+0;
--source suite/parts/inc/partition_syntax_1.inc
-# --source include/partition_syntax_1.inc
-if ($fixed_bug15890)
-{
# Bug#15890 Partitions: Strange interpretation of partition number
# (positive) number = 0.2E+1
let $part_number= 0.2E+1;
--source suite/parts/inc/partition_syntax_1.inc
-# --source include/partition_syntax_1.inc
-}
# (negative) -2.0E+0 is non sense
let $part_number= -2.0E+0;
--source suite/parts/inc/partition_syntax_1.inc
-# --source include/partition_syntax_1.inc
-if ($fixed_bug15890)
-{
# Bug#15890 Partitions: Strange interpretation of partition number
# (negative) 0.16E+1 is non sense
let $part_number= 0.16E+1;
--source suite/parts/inc/partition_syntax_1.inc
-# --source include/partition_syntax_1.inc
-}
# (negative) 0.0E+300 is zero
let $part_number= 0.0E+300;
--source suite/parts/inc/partition_syntax_1.inc
-# --source include/partition_syntax_1.inc
-if ($fixed_bug15890)
-{
# Bug#15890 Partitions: Strange interpretation of partition number
# (negative) 1E+300 is too huge
let $part_number= 1E+300;
--source suite/parts/inc/partition_syntax_1.inc
-# --source include/partition_syntax_1.inc
# (negative) 1E-300 is nearly zero
let $part_number= 1E-300;
--source suite/parts/inc/partition_syntax_1.inc
-# --source include/partition_syntax_1.inc
-}
--echo # 4.2.4 partition/subpartition numbers STRING notation
##### STRING notation
# (negative?) case number = '2'
let $part_number= '2';
--source suite/parts/inc/partition_syntax_1.inc
-# --source include/partition_syntax_1.inc
# (negative?) case number = '2.0'
let $part_number= '2.0';
--source suite/parts/inc/partition_syntax_1.inc
-# --source include/partition_syntax_1.inc
# (negative?) case number = '0.2E+1'
let $part_number= '0.2E+1';
--source suite/parts/inc/partition_syntax_1.inc
-# --source include/partition_syntax_1.inc
# (negative) Strings starts with digit, but 'A' follows
let $part_number= '2A';
--source suite/parts/inc/partition_syntax_1.inc
-# --source include/partition_syntax_1.inc
# (negative) Strings starts with 'A', but digit follows
let $part_number= 'A2';
--source suite/parts/inc/partition_syntax_1.inc
-# --source include/partition_syntax_1.inc
# (negative) empty string
let $part_number= '';
--source suite/parts/inc/partition_syntax_1.inc
-# --source include/partition_syntax_1.inc
# (negative) string without any digits
let $part_number= 'GARBAGE';
--source suite/parts/inc/partition_syntax_1.inc
-# --source include/partition_syntax_1.inc
--echo # 4.2.5 partition/subpartition numbers other notations
# (negative) Strings starts with digit, but 'A' follows
let $part_number= 2A;
--source suite/parts/inc/partition_syntax_1.inc
-# --source include/partition_syntax_1.inc
# (negative) Strings starts with 'A', but digit follows
let $part_number= A2;
--source suite/parts/inc/partition_syntax_1.inc
-# --source include/partition_syntax_1.inc
# (negative) string without any digits
let $part_number= GARBAGE;
--source suite/parts/inc/partition_syntax_1.inc
-# --source include/partition_syntax_1.inc
# (negative?) double quotes
let $part_number= "2";
--source suite/parts/inc/partition_syntax_1.inc
-# --source include/partition_syntax_1.inc
# (negative) Strings starts with digit, but 'A' follows
let $part_number= "2A";
--source suite/parts/inc/partition_syntax_1.inc
-# --source include/partition_syntax_1.inc
# (negative) Strings starts with 'A', but digit follows
let $part_number= "A2";
--source suite/parts/inc/partition_syntax_1.inc
-# --source include/partition_syntax_1.inc
# (negative) string without any digits
let $part_number= "GARBAGE";
--source suite/parts/inc/partition_syntax_1.inc
-# --source include/partition_syntax_1.inc
--echo # 4.2.6 (negative) partition/subpartition numbers per @variables
SET @aux = 5;
---error 1064
+--error ER_PARSE_ERROR
eval CREATE TABLE t1 (
$column_list
)
PARTITION BY HASH(f_int1) PARTITIONS @aux;
---error 1064
+--error ER_PARSE_ERROR
eval CREATE TABLE t1 (
$column_list
)
@@ -665,7 +604,6 @@ $column_list
)
PARTITION BY HASH(f_int1) PARTITIONS 2 ( PARTITION part1, PARTITION part2 ) ;
--source suite/parts/inc/partition_layout_check1.inc
-# --source include/partition_layout_check1.inc
DROP TABLE t1;
eval CREATE TABLE t1 (
$column_list
@@ -678,20 +616,19 @@ SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2
(SUBPARTITION subpart21, SUBPARTITION subpart22)
);
--source suite/parts/inc/partition_layout_check1.inc
-# --source include/partition_layout_check1.inc
DROP TABLE t1;
--echo # 4.3.2 (positive) number of partition/subpartition ,
--echo # 0 (= no) named partition/subpartition
--echo # already checked above
--echo # 4.3.3 (negative) number of partitions/subpartitions
--echo # > number of named partitions/subpartitions
---error 1064
+--error ER_PARSE_ERROR
eval CREATE TABLE t1 (
$column_list
)
PARTITION BY HASH(f_int1) PARTITIONS 2 ( PARTITION part1 ) ;
# Wrong number of named subpartitions in first partition
---error 1064
+--error ER_PARSE_ERROR
eval CREATE TABLE t1 (
$column_list
)
@@ -703,7 +640,7 @@ SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2
(SUBPARTITION subpart21, SUBPARTITION subpart22)
);
# Wrong number of named subpartitions in non first/non last partition
---error 1064
+--error ER_PARSE_ERROR
eval CREATE TABLE t1 (
$column_list
)
@@ -717,7 +654,7 @@ SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2
(SUBPARTITION subpart31, SUBPARTITION subpart32)
);
# Wrong number of named subpartitions in last partition
---error 1064
+--error ER_PARSE_ERROR
eval CREATE TABLE t1 (
$column_list
)
@@ -729,13 +666,13 @@ SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2
(SUBPARTITION subpart21 )
);
--echo # 4.3.4 (negative) number of partitions < number of named partitions
---error 1064
+--error ER_PARSE_ERROR
eval CREATE TABLE t1 (
$column_list
)
PARTITION BY HASH(f_int1) PARTITIONS 1 ( PARTITION part1, PARTITION part2 ) ;
# Wrong number of named subpartitions in first partition
---error 1064
+--error ER_PARSE_ERROR
eval CREATE TABLE t1 (
$column_list
)
@@ -747,7 +684,7 @@ SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 1
(SUBPARTITION subpart21, SUBPARTITION subpart22)
);
# Wrong number of named subpartitions in non first/non last partition
---error 1064
+--error ER_PARSE_ERROR
eval CREATE TABLE t1 (
$column_list
)
@@ -761,7 +698,7 @@ SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 1
(SUBPARTITION subpart31, SUBPARTITION subpart32)
);
# Wrong number of named subpartitions in last partition
---error 1064
+--error ER_PARSE_ERROR
eval CREATE TABLE t1 (
$column_list
)
diff --git a/mysql-test/suite/parts/inc/partition_syntax_1.inc b/mysql-test/suite/parts/inc/partition_syntax_1.inc
index e3e1b3ccbb7..a7168b6af3b 100644
--- a/mysql-test/suite/parts/inc/partition_syntax_1.inc
+++ b/mysql-test/suite/parts/inc/partition_syntax_1.inc
@@ -1,8 +1,8 @@
################################################################################
-# include/partition_syntax_1.inc #
+# inc/partition_syntax_1.inc #
# #
# Purpose: #
-# Auxiliary script, only useful when sourced by include/partition_syntax.inc #
+# Auxiliary script, only useful when sourced by inc/partition_syntax.inc #
# #
# Try to create a table with number of partitions/subpartitions #
# = $part_number. Print the layout of the table and drop it. #
@@ -10,11 +10,13 @@
# The parameter $part_number must be set before sourcing this script. #
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
-# Original Date: 2006-03-05 #
-# Change Author: #
-# Change Date: #
-# Change: #
+# Original Author: mleich #
+# Original Date: 2006-03-05 #
+# Change Author: mleich #
+# Change Date: 2007-10-08 #
+# Change: Fix for #
+# Bug#31481 test suite parts: Many tests fail because of #
+# changed server error codes #
################################################################################
--disable_abort_on_error
@@ -27,16 +29,13 @@ PARTITION BY HASH(f_int1) PARTITIONS $part_number;
eval SET @my_errno= $mysql_errno ;
let $run= `SELECT @my_errno = 0`;
# Expected error codes are
-# 0
-# 1064 ER_PARSE_ERROR
-# Reason: assign -1 partitions
-# 1496 ER_TOO_MANY_PARTITIONS_ERROR
-# 1501 ER_NO_PARTS_ERROR
-let $unexpected_error= `SELECT @my_errno NOT IN (0,1064,1496,1501)`;
-if ($unexpected_error)
+# 0, ER_PARSE_ERROR (Reason: assign -1 partitions), ER_TOO_MANY_PARTITIONS_ERROR
+# and ER_NO_PARTS_ERROR
+if (`SELECT @my_errno NOT IN (0,$ER_PARSE_ERROR,$ER_TOO_MANY_PARTITIONS_ERROR,
+ $ER_NO_PARTS_ERROR)`)
{
--echo # The last command got an unexepected error response.
- --echo # Expected/handled SQL codes are 0,1064,1496,1501
+ --echo # Expected/handled SQL codes are 0,$ER_PARSE_ERROR,$ER_TOO_MANY_PARTITIONS_ERROR,$ER_NO_PARTS_ERROR
SELECT '# SQL code we got was: ' AS "", @my_errno AS "";
--echo # Sorry, have to abort.
exit;
@@ -48,7 +47,6 @@ if ($unexpected_error)
if ($run)
{
--source suite/parts/inc/partition_layout_check1.inc
- # --source include/partition_layout_check1.inc
eval DROP TABLE t1;
}
#### Try to create a table with the given subpartition number
@@ -65,16 +63,13 @@ SUBPARTITIONS $part_number
eval SET @my_errno= $mysql_errno ;
let $run= `SELECT @my_errno = 0`;
# Expected error codes are
-# 0
-# 1064 ER_PARSE_ERROR
-# Reason: assign -1 partitions
-# 1496 ER_TOO_MANY_PARTITIONS_ERROR
-# 1501 ER_NO_PARTS_ERROR
-let $unexpected_error= `SELECT @my_errno NOT IN (0,1064,1496,1501)`;
-if ($unexpected_error)
+# 0, ER_PARSE_ERROR (Reason: assign -1 partitions), ER_TOO_MANY_PARTITIONS_ERROR
+# and ER_NO_PARTS_ERROR
+if (`SELECT @my_errno NOT IN (0,$ER_PARSE_ERROR,$ER_TOO_MANY_PARTITIONS_ERROR,
+ $ER_NO_PARTS_ERROR)`)
{
--echo # The last command got an unexepected error response.
- --echo # Expected/handled SQL codes are 0,1064,1496,1501
+ --echo # Expected/handled SQL codes are 0,$ER_PARSE_ERROR,$ER_TOO_MANY_PARTITIONS_ERROR,$ER_NO_PARTS_ERROR
SELECT '# SQL code we got was: ' AS "", @my_errno AS "";
--echo # Sorry, have to abort.
exit;
@@ -86,6 +81,5 @@ if ($unexpected_error)
if ($run)
{
--source suite/parts/inc/partition_layout_check1.inc
- # --source include/partition_layout_check1.inc
eval DROP TABLE t1;
}
diff --git a/mysql-test/suite/parts/inc/partition_syntax_2.inc b/mysql-test/suite/parts/inc/partition_syntax_2.inc
index 9adf1c9b2a0..b8e728ee79b 100644
--- a/mysql-test/suite/parts/inc/partition_syntax_2.inc
+++ b/mysql-test/suite/parts/inc/partition_syntax_2.inc
@@ -1,11 +1,11 @@
################################################################################
-# include/partition_syntax_2.inc #
+# inc/partition_syntax_2.inc #
# #
# Purpose: #
-# Auxiliary script, only useful when sourced by include/partition_syntax.inc.#
+# Auxiliary script, only useful when sourced by inc/partition_syntax.inc. #
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
+# Original Author: mleich #
# Original Date: 2006-05-11 #
# Change Author: #
# Change Date: #
@@ -35,11 +35,7 @@ if (`SELECT @@session.storage_engine IN('ndbcluster')`)
)
$partition_scheme;
eval $insert_all;
- if ($fixed_bug18735)
- {
--source suite/parts/inc/partition_check.inc
- # --source include/partition_check.inc
- }
DROP TABLE t1;
eval CREATE TABLE t1 (
$column_list,
@@ -47,10 +43,6 @@ if (`SELECT @@session.storage_engine IN('ndbcluster')`)
)
$partition_scheme;
eval $insert_all;
- if ($fixed_bug18735)
- {
--source suite/parts/inc/partition_check.inc
- # --source include/partition_check.inc
- }
DROP TABLE t1;
}
diff --git a/mysql-test/suite/parts/inc/partition_text.inc b/mysql-test/suite/parts/inc/partition_text.inc
index a655552c457..761f5dfb118 100644
--- a/mysql-test/suite/parts/inc/partition_text.inc
+++ b/mysql-test/suite/parts/inc/partition_text.inc
@@ -1,3 +1,5 @@
+--echo ---- Partitioning and text data type
+
--disable_query_log
# DATA DIRECTORY
eval SET @data_dir = 'DATA DIRECTORY =
@@ -53,4 +55,3 @@ partition by key (a) partitions 30;
#select count(*) from t2;
#select * from t2;
#drop table t2;
-
diff --git a/mysql-test/suite/parts/inc/partition_trigg1.inc b/mysql-test/suite/parts/inc/partition_trigg1.inc
index 7ebf2f411d3..7bb5aa162a9 100644
--- a/mysql-test/suite/parts/inc/partition_trigg1.inc
+++ b/mysql-test/suite/parts/inc/partition_trigg1.inc
@@ -1,8 +1,8 @@
################################################################################
-# include/partition_trigg1.inc #
+# inc/partition_trigg1.inc #
# #
# Purpose: #
-# Auxiliary script, only useful when sourced by include/partition_check.inc. #
+# Auxiliary script, only useful when sourced by inc/partition_check.inc. #
# One trigger uses new values (--> event UPDATE, INSERT only) #
# One trigger uses old values (--> event UPDATE, DELETE only) #
# #
@@ -12,7 +12,7 @@
# 4. Revert the modifications #
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
+# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@@ -45,7 +45,7 @@ if ($run1)
eval $statement;
- # Check of preceeding statement via Select
+ # Check of preceding statement via Select
if ($no_debug)
{
--disable_query_log
@@ -94,7 +94,7 @@ if ($run1)
eval $statement;
- # Check of preceeding statement via Select
+ # Check of preceding statement via Select
if ($no_debug)
{
--disable_query_log
diff --git a/mysql-test/suite/parts/inc/partition_trigg2.inc b/mysql-test/suite/parts/inc/partition_trigg2.inc
index 767dbd52e47..2849ca21ff0 100644
--- a/mysql-test/suite/parts/inc/partition_trigg2.inc
+++ b/mysql-test/suite/parts/inc/partition_trigg2.inc
@@ -1,8 +1,8 @@
################################################################################
-# include/partition_trigg2.inc #
+# inc/partition_trigg2.inc #
# #
# Purpose: #
-# Auxiliary script, only useful when sourced by include/partition_check.inc. #
+# Auxiliary script, only useful when sourced by inc/partition_check.inc. #
# The trigger uses new values (--> event UPDATE, INSERT only) #
# #
# 1. Create a trigger #
@@ -11,7 +11,7 @@
# 4. Revert the modifications #
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
+# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@@ -27,7 +27,7 @@ BEGIN
END|
delimiter ;|
eval $statement;
-# Check of preceeding statement via Select
+# Check of preceding statement via Select
if ($no_debug)
{
--disable_query_log
diff --git a/mysql-test/suite/parts/inc/partition_trigg3.inc b/mysql-test/suite/parts/inc/partition_trigg3.inc
index a129cf75a1d..b56847ada44 100644
--- a/mysql-test/suite/parts/inc/partition_trigg3.inc
+++ b/mysql-test/suite/parts/inc/partition_trigg3.inc
@@ -1,8 +1,8 @@
-###############################################################################
-# include/partition_trigg3.inc #
+################################################################################
+# inc/partition_trigg3.inc #
# #
# Purpose: #
-# Auxiliary script, only useful when sourced by include/partition_check.inc. #
+# Auxiliary script, only useful when sourced by inc/partition_check.inc. #
# The trigger uses new values (--> event UPDATE, INSERT only) #
# #
# 1. Create a trigger #
@@ -11,23 +11,13 @@
# 4. Revert the modifications #
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
+# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
# Change: #
################################################################################
-# include/partition_trigg3.inc
-#
-# Auxiliary script, only useful when sourced by include/partition_check.inc.
-#
-# 1. Create a trigger
-# 2. Execute a statement, which activates the trigger
-# 3. Check the results of the trigger activity
-# 4. Revert the modifications
-#
-
delimiter |;
# Original version of the trigger
# eval CREATE TRIGGER trg_3 $event ON t1 FOR EACH ROW
@@ -55,20 +45,12 @@ END|
delimiter ;|
# Additional statements because of Bug(limitation)#17704
SET @counter = 1;
-if ($fixed_bug18730)
-{
# Bug#18730 Partitions: NDB, crash on SELECT MIN(<unique column>)
SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1;
-}
-if (!$fixed_bug18730)
-{
-# Bug#18730 Partitions: NDB, crash on SELECT MIN(<unique column>)
-SELECT @max_row, 1 INTO @my_max1,@my_min2;
-}
# Additional statements end
eval $statement;
DROP TRIGGER trg_3;
-# Check of preceeding statement via Select
+# Check of preceding statement via Select
if ($no_debug)
{
--disable_query_log
diff --git a/mysql-test/suite/parts/inc/partition_value.inc b/mysql-test/suite/parts/inc/partition_value.inc
index 58691752bdf..3e25e740de6 100644
--- a/mysql-test/suite/parts/inc/partition_value.inc
+++ b/mysql-test/suite/parts/inc/partition_value.inc
@@ -1,11 +1,11 @@
################################################################################
-# include/partition_value.inc #
+# inc/partition_value.inc #
# #
# Purpose: #
# Tests around "exotic" values calculated by the partitioning function #
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
+# Original Author: mleich #
# Original Date: 2006-04-11 #
# Change Author: #
# Change Date: #
diff --git a/mysql-test/suite/parts/inc/partition_varbinary.inc b/mysql-test/suite/parts/inc/partition_varbinary.inc
index b112cbe312e..48fd6d890d8 100644
--- a/mysql-test/suite/parts/inc/partition_varbinary.inc
+++ b/mysql-test/suite/parts/inc/partition_varbinary.inc
@@ -1,3 +1,5 @@
+--echo ---- Partitioning and varbinary data type
+
--disable_query_log
# DATA DIRECTORY
eval SET @data_dir = 'DATA DIRECTORY =
diff --git a/mysql-test/suite/parts/inc/partition_varchar.inc b/mysql-test/suite/parts/inc/partition_varchar.inc
index 1cd33fa49da..c018a16e919 100644
--- a/mysql-test/suite/parts/inc/partition_varchar.inc
+++ b/mysql-test/suite/parts/inc/partition_varchar.inc
@@ -1,3 +1,5 @@
+--echo ---- Partitioning and varchar data type
+
--disable_query_log
# DATA DIRECTORY
eval SET @data_dir = 'DATA DIRECTORY =
diff --git a/mysql-test/suite/parts/r/partition_alter1_innodb.result b/mysql-test/suite/parts/r/partition_alter1_innodb.result
index 22f02356b77..a1d40af196c 100644
--- a/mysql-test/suite/parts/r/partition_alter1_innodb.result
+++ b/mysql-test/suite/parts/r/partition_alter1_innodb.result
@@ -2,14 +2,6 @@ SET @max_row = 20;
SET @@session.storage_engine = 'InnoDB';
#------------------------------------------------------------------------
-# There are several testcases disabled because of the open bugs
-# #15890
-# The expected results suffer from the following bugs
-# harmless #17455, #19305
-# which cannot be suppressed because of technical reasons.
-#------------------------------------------------------------------------
-
-#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables
# needed in many testcases
#------------------------------------------------------------------------
@@ -31,7 +23,7 @@ DROP TABLE IF EXISTS t0_definition;
CREATE TABLE t0_definition (
state CHAR(3),
create_command VARBINARY(5000),
-file_list VARBINARY(5000),
+file_list VARBINARY(10000),
PRIMARY KEY (state)
) ENGINE = MEMORY;
DROP TABLE IF EXISTS t0_aux;
@@ -389,7 +381,7 @@ ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -860,7 +852,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -878,7 +870,7 @@ ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -1349,7 +1341,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -1375,7 +1367,7 @@ ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -1846,7 +1838,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -1870,7 +1862,7 @@ ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -2339,7 +2331,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -2361,7 +2353,7 @@ ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -2832,7 +2824,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -2858,7 +2850,7 @@ ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -3327,7 +3319,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -3353,7 +3345,7 @@ ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -3824,7 +3816,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -3846,7 +3838,7 @@ ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -4317,7 +4309,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@@ -4336,7 +4328,7 @@ ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -4807,7 +4799,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -4825,7 +4817,7 @@ ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -5296,7 +5288,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -5322,7 +5314,7 @@ ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -5793,7 +5785,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -5817,7 +5809,7 @@ ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -6286,7 +6278,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -6308,7 +6300,7 @@ ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -6779,7 +6771,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -6805,7 +6797,7 @@ ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -7274,7 +7266,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -7300,7 +7292,7 @@ ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -7771,7 +7763,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -7793,7 +7785,7 @@ ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -8264,7 +8256,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# 1.1.4 UNIQUE INDEX consisting of two columns
DROP TABLE IF EXISTS t1;
@@ -8284,7 +8276,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -8771,7 +8763,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -8789,7 +8781,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -9276,7 +9268,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -9302,7 +9294,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -9789,7 +9781,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -9813,7 +9805,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -10298,7 +10290,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -10320,7 +10312,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -10807,7 +10799,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -10833,7 +10825,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -11318,7 +11310,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -11344,7 +11336,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -11831,7 +11823,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -11853,7 +11845,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -12340,7 +12332,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@@ -12359,7 +12351,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -12846,7 +12838,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -12864,7 +12856,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -13351,7 +13343,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -13377,7 +13369,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -13864,7 +13856,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -13888,7 +13880,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -14373,7 +14365,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -14395,7 +14387,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -14882,7 +14874,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -14908,7 +14900,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -15393,7 +15385,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -15419,7 +15411,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -15906,7 +15898,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -15928,7 +15920,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -16415,7 +16407,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
#------------------------------------------------------------------------
# 1.2 ADD PRIMARY KEY or UNIQUE INDEX to table with two columns
@@ -16439,7 +16431,7 @@ ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -16910,7 +16902,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -16928,7 +16920,7 @@ ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -17399,7 +17391,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -17425,7 +17417,7 @@ ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -17896,7 +17888,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -17920,7 +17912,7 @@ ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -18389,7 +18381,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -18411,7 +18403,7 @@ ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -18880,7 +18872,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -18906,7 +18898,7 @@ ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -19375,7 +19367,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -19401,7 +19393,7 @@ ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -19872,7 +19864,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -19894,7 +19886,7 @@ ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -20365,7 +20357,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@@ -20384,7 +20376,7 @@ ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -20855,7 +20847,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -20873,7 +20865,7 @@ ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -21344,7 +21336,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -21370,7 +21362,7 @@ ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -21841,7 +21833,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -21865,7 +21857,7 @@ ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -22334,7 +22326,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -22356,7 +22348,7 @@ ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -22825,7 +22817,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -22851,7 +22843,7 @@ ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -23320,7 +23312,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -23346,7 +23338,7 @@ ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -23817,7 +23809,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -23839,7 +23831,7 @@ ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -24310,7 +24302,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# 1.2.2 UNIQUE INDEX consisting of two columns
DROP TABLE IF EXISTS t1;
@@ -24330,7 +24322,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -24817,7 +24809,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -24835,7 +24827,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -25322,7 +25314,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -25348,7 +25340,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -25835,7 +25827,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -25859,7 +25851,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -26344,7 +26336,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -26366,7 +26358,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -26851,7 +26843,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -26877,7 +26869,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -27362,7 +27354,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -27388,7 +27380,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -27875,7 +27867,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -27897,7 +27889,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -28384,7 +28376,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@@ -28403,7 +28395,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -28890,7 +28882,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -28908,7 +28900,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -29395,7 +29387,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -29421,7 +29413,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -29908,7 +29900,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -29932,7 +29924,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -30417,7 +30409,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -30439,7 +30431,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -30924,7 +30916,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -30950,7 +30942,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -31435,7 +31427,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -31461,7 +31453,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -31948,7 +31940,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -31970,7 +31962,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -32457,7 +32449,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# 1.2.3 PRIMARY KEY and UNIQUE INDEX consisting of two columns
DROP TABLE IF EXISTS t1;
@@ -32477,7 +32469,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2), ADD PRIMARY KEY(f_int2,f_
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -32949,7 +32941,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -32967,7 +32959,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2), ADD PRIMARY KEY(f_int2,f_
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -33439,7 +33431,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -33465,7 +33457,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2), ADD PRIMARY KEY(f_int2,f_
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -33937,7 +33929,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -33961,7 +33953,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2), ADD PRIMARY KEY(f_int2,f_
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -34431,7 +34423,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -34453,7 +34445,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2), ADD PRIMARY KEY(f_int2,f_
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -34923,7 +34915,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -34949,7 +34941,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2), ADD PRIMARY KEY(f_int2,f_
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -35419,7 +35411,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -35445,7 +35437,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2), ADD PRIMARY KEY(f_int2,f_
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -35917,7 +35909,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -35939,7 +35931,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2), ADD PRIMARY KEY(f_int2,f_
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -36411,7 +36403,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@@ -36430,7 +36422,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -36902,7 +36894,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -36920,7 +36912,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -37392,7 +37384,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -37418,7 +37410,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -37890,7 +37882,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -37914,7 +37906,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -38384,7 +38376,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -38406,7 +38398,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -38876,7 +38868,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -38902,7 +38894,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -39372,7 +39364,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -39398,7 +39390,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -39870,7 +39862,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -39892,7 +39884,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -40364,7 +40356,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@@ -40383,7 +40375,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -40855,7 +40847,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -40873,7 +40865,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -41345,7 +41337,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -41371,7 +41363,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -41843,7 +41835,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -41867,7 +41859,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -42337,7 +42329,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -42359,7 +42351,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -42829,7 +42821,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -42855,7 +42847,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -43325,7 +43317,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -43351,7 +43343,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -43823,7 +43815,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -43845,7 +43837,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -44317,7 +44309,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
#========================================================================
@@ -44344,7 +44336,7 @@ ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -44763,7 +44755,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -44781,7 +44773,7 @@ ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -45200,7 +45192,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -45226,7 +45218,7 @@ ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -45645,7 +45637,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -45669,7 +45661,7 @@ ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -46086,7 +46078,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -46108,7 +46100,7 @@ ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -46527,7 +46519,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -46553,7 +46545,7 @@ ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -46970,7 +46962,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -46996,7 +46988,7 @@ ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -47415,7 +47407,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -47437,7 +47429,7 @@ ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -47856,7 +47848,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@@ -47875,7 +47867,7 @@ ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -48294,7 +48286,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -48312,7 +48304,7 @@ ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -48731,7 +48723,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -48757,7 +48749,7 @@ ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -49176,7 +49168,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -49200,7 +49192,7 @@ ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -49617,7 +49609,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -49639,7 +49631,7 @@ ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -50058,7 +50050,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -50084,7 +50076,7 @@ ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -50501,7 +50493,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -50527,7 +50519,7 @@ ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -50946,7 +50938,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -50968,7 +50960,7 @@ ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -51387,7 +51379,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@@ -51406,7 +51398,7 @@ ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -51841,7 +51833,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -51859,7 +51851,7 @@ ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -52294,7 +52286,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -52320,7 +52312,7 @@ ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -52755,7 +52747,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -52779,7 +52771,7 @@ ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -53212,7 +53204,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -53234,7 +53226,7 @@ ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -53669,7 +53661,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -53695,7 +53687,7 @@ ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -54128,7 +54120,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -54154,7 +54146,7 @@ ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -54589,7 +54581,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -54611,7 +54603,7 @@ ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -55046,7 +55038,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
#------------------------------------------------------------------------
# 2.2 Partitioning function contains two columns (f_int1,f_int2)
@@ -55069,7 +55061,7 @@ ALTER TABLE t1 DROP PRIMARY KEY;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -55488,7 +55480,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -55506,7 +55498,7 @@ ALTER TABLE t1 DROP PRIMARY KEY;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -55925,7 +55917,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -55951,7 +55943,7 @@ ALTER TABLE t1 DROP PRIMARY KEY;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -56370,7 +56362,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -56394,7 +56386,7 @@ ALTER TABLE t1 DROP PRIMARY KEY;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -56811,7 +56803,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -56833,7 +56825,7 @@ ALTER TABLE t1 DROP PRIMARY KEY;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -57250,7 +57242,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -57276,7 +57268,7 @@ ALTER TABLE t1 DROP PRIMARY KEY;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -57693,7 +57685,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -57719,7 +57711,7 @@ ALTER TABLE t1 DROP PRIMARY KEY;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -58138,7 +58130,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -58160,7 +58152,7 @@ ALTER TABLE t1 DROP PRIMARY KEY;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -58579,7 +58571,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@@ -58598,7 +58590,7 @@ ALTER TABLE t1 DROP PRIMARY KEY;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -59017,7 +59009,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -59035,7 +59027,7 @@ ALTER TABLE t1 DROP PRIMARY KEY;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -59454,7 +59446,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -59480,7 +59472,7 @@ ALTER TABLE t1 DROP PRIMARY KEY;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -59899,7 +59891,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -59923,7 +59915,7 @@ ALTER TABLE t1 DROP PRIMARY KEY;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -60340,7 +60332,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -60362,7 +60354,7 @@ ALTER TABLE t1 DROP PRIMARY KEY;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -60779,7 +60771,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -60805,7 +60797,7 @@ ALTER TABLE t1 DROP PRIMARY KEY;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -61222,7 +61214,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -61248,7 +61240,7 @@ ALTER TABLE t1 DROP PRIMARY KEY;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -61667,7 +61659,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -61689,7 +61681,7 @@ ALTER TABLE t1 DROP PRIMARY KEY;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -62108,7 +62100,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# 2.2.2 DROP UNIQUE INDEX consisting of two columns
DROP TABLE IF EXISTS t1;
@@ -62128,7 +62120,7 @@ ALTER TABLE t1 DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -62563,7 +62555,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -62581,7 +62573,7 @@ ALTER TABLE t1 DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -63016,7 +63008,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -63042,7 +63034,7 @@ ALTER TABLE t1 DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -63477,7 +63469,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -63501,7 +63493,7 @@ ALTER TABLE t1 DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -63934,7 +63926,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -63956,7 +63948,7 @@ ALTER TABLE t1 DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -64389,7 +64381,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -64415,7 +64407,7 @@ ALTER TABLE t1 DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -64848,7 +64840,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -64874,7 +64866,7 @@ ALTER TABLE t1 DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -65309,7 +65301,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -65331,7 +65323,7 @@ ALTER TABLE t1 DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -65766,7 +65758,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@@ -65785,7 +65777,7 @@ ALTER TABLE t1 DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -66220,7 +66212,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -66238,7 +66230,7 @@ ALTER TABLE t1 DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -66673,7 +66665,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -66699,7 +66691,7 @@ ALTER TABLE t1 DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -67134,7 +67126,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -67158,7 +67150,7 @@ ALTER TABLE t1 DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -67591,7 +67583,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -67613,7 +67605,7 @@ ALTER TABLE t1 DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -68046,7 +68038,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -68072,7 +68064,7 @@ ALTER TABLE t1 DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -68505,7 +68497,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -68531,7 +68523,7 @@ ALTER TABLE t1 DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -68966,7 +68958,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -68988,7 +68980,7 @@ ALTER TABLE t1 DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -69423,7 +69415,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# 2.2.3 DROP PRIMARY KEY + UNIQUE INDEX consisting of two columns
DROP TABLE IF EXISTS t1;
@@ -69443,7 +69435,7 @@ ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -69862,7 +69854,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -69880,7 +69872,7 @@ ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -70299,7 +70291,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -70325,7 +70317,7 @@ ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -70744,7 +70736,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -70768,7 +70760,7 @@ ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -71185,7 +71177,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -71207,7 +71199,7 @@ ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -71624,7 +71616,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -71650,7 +71642,7 @@ ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -72067,7 +72059,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -72093,7 +72085,7 @@ ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -72512,7 +72504,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -72534,7 +72526,7 @@ ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -72953,7 +72945,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@@ -72972,7 +72964,7 @@ ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -73391,7 +73383,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -73409,7 +73401,7 @@ ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -73828,7 +73820,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -73854,7 +73846,7 @@ ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -74273,7 +74265,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -74297,7 +74289,7 @@ ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -74714,7 +74706,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -74736,7 +74728,7 @@ ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -75153,7 +75145,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -75179,7 +75171,7 @@ ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -75596,7 +75588,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -75622,7 +75614,7 @@ ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -76041,7 +76033,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -76063,7 +76055,7 @@ ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -76482,7 +76474,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@@ -76501,7 +76493,7 @@ ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -76936,7 +76928,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -76954,7 +76946,7 @@ ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -77389,7 +77381,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -77415,7 +77407,7 @@ ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -77850,7 +77842,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -77874,7 +77866,7 @@ ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -78307,7 +78299,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -78329,7 +78321,7 @@ ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -78762,7 +78754,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -78788,7 +78780,7 @@ ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -79221,7 +79213,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -79247,7 +79239,7 @@ ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -79682,7 +79674,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -79704,7 +79696,7 @@ ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -80139,7 +80131,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP VIEW IF EXISTS v1;
DROP TABLE IF EXISTS t1;
diff --git a/mysql-test/suite/parts/r/partition_alter1_myisam.result b/mysql-test/suite/parts/r/partition_alter1_myisam.result
index b2f1d657151..1058342aa8d 100644
--- a/mysql-test/suite/parts/r/partition_alter1_myisam.result
+++ b/mysql-test/suite/parts/r/partition_alter1_myisam.result
@@ -2,14 +2,6 @@ SET @max_row = 20;
SET @@session.storage_engine = 'MyISAM';
#------------------------------------------------------------------------
-# There are several testcases disabled because of the open bugs
-# #15890
-# The expected results suffer from the following bugs
-# harmless #17455, #19305
-# which cannot be suppressed because of technical reasons.
-#------------------------------------------------------------------------
-
-#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables
# needed in many testcases
#------------------------------------------------------------------------
@@ -31,7 +23,7 @@ DROP TABLE IF EXISTS t0_definition;
CREATE TABLE t0_definition (
state CHAR(3),
create_command VARBINARY(5000),
-file_list VARBINARY(5000),
+file_list VARBINARY(10000),
PRIMARY KEY (state)
) ENGINE = MEMORY;
DROP TABLE IF EXISTS t0_aux;
@@ -230,7 +222,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -727,7 +719,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -745,7 +737,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -1248,7 +1240,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -1274,7 +1266,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -1783,7 +1775,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -1807,7 +1799,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -2310,7 +2302,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -2332,7 +2324,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -2841,7 +2833,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -2867,7 +2859,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -3374,7 +3366,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -3400,7 +3392,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -3909,7 +3901,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -3931,7 +3923,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -4442,7 +4434,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@@ -4461,7 +4453,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -4958,7 +4950,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -4976,7 +4968,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -5479,7 +5471,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -5505,7 +5497,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -6014,7 +6006,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -6038,7 +6030,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -6541,7 +6533,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -6563,7 +6555,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -7072,7 +7064,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -7098,7 +7090,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -7605,7 +7597,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -7631,7 +7623,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -8140,7 +8132,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -8162,7 +8154,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -8673,7 +8665,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
#------------------------------------------------------------------------
# 1.2 ADD PRIMARY KEY or UNIQUE INDEX to table with two columns
@@ -8697,7 +8689,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -9194,7 +9186,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -9212,7 +9204,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -9715,7 +9707,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -9741,7 +9733,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -10250,7 +10242,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -10274,7 +10266,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -10777,7 +10769,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -10799,7 +10791,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -11306,7 +11298,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -11332,7 +11324,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -11839,7 +11831,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -11865,7 +11857,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -12374,7 +12366,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -12396,7 +12388,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -12907,7 +12899,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@@ -12926,7 +12918,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -13423,7 +13415,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -13441,7 +13433,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -13944,7 +13936,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -13970,7 +13962,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -14479,7 +14471,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -14503,7 +14495,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -15006,7 +14998,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -15028,7 +15020,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -15535,7 +15527,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -15561,7 +15553,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -16068,7 +16060,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -16094,7 +16086,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -16603,7 +16595,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -16625,7 +16617,7 @@ ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -17136,7 +17128,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
#========================================================================
@@ -17162,7 +17154,7 @@ ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -17607,7 +17599,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -17625,7 +17617,7 @@ ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -18076,7 +18068,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -18102,7 +18094,7 @@ ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -18559,7 +18551,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -18583,7 +18575,7 @@ ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -19034,7 +19026,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -19056,7 +19048,7 @@ ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -19513,7 +19505,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -19539,7 +19531,7 @@ ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -19994,7 +19986,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -20020,7 +20012,7 @@ ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -20477,7 +20469,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -20499,7 +20491,7 @@ ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -20958,7 +20950,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
#------------------------------------------------------------------------
# 2.2 Partitioning function contains two columns (f_int1,f_int2)
@@ -20981,7 +20973,7 @@ ALTER TABLE t1 DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -21426,7 +21418,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -21444,7 +21436,7 @@ ALTER TABLE t1 DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -21895,7 +21887,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -21921,7 +21913,7 @@ ALTER TABLE t1 DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -22378,7 +22370,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -22402,7 +22394,7 @@ ALTER TABLE t1 DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -22853,7 +22845,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -22875,7 +22867,7 @@ ALTER TABLE t1 DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -23330,7 +23322,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -23356,7 +23348,7 @@ ALTER TABLE t1 DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -23811,7 +23803,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -23837,7 +23829,7 @@ ALTER TABLE t1 DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -24294,7 +24286,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -24316,7 +24308,7 @@ ALTER TABLE t1 DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -24775,7 +24767,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@@ -24794,7 +24786,7 @@ ALTER TABLE t1 DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -25239,7 +25231,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -25257,7 +25249,7 @@ ALTER TABLE t1 DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -25708,7 +25700,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -25734,7 +25726,7 @@ ALTER TABLE t1 DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -26191,7 +26183,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -26215,7 +26207,7 @@ ALTER TABLE t1 DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -26666,7 +26658,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -26688,7 +26680,7 @@ ALTER TABLE t1 DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -27143,7 +27135,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -27169,7 +27161,7 @@ ALTER TABLE t1 DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -27624,7 +27616,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -27650,7 +27642,7 @@ ALTER TABLE t1 DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -28107,7 +28099,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -28129,7 +28121,7 @@ ALTER TABLE t1 DROP INDEX uidx1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -28588,7 +28580,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@@ -28607,7 +28599,7 @@ ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -29052,7 +29044,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -29070,7 +29062,7 @@ ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -29521,7 +29513,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -29547,7 +29539,7 @@ ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -30004,7 +29996,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -30028,7 +30020,7 @@ ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -30479,7 +30471,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -30501,7 +30493,7 @@ ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -30956,7 +30948,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -30982,7 +30974,7 @@ ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -31437,7 +31429,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -31463,7 +31455,7 @@ ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -31920,7 +31912,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -31942,7 +31934,7 @@ ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -32401,7 +32393,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP VIEW IF EXISTS v1;
DROP TABLE IF EXISTS t1;
diff --git a/mysql-test/suite/parts/r/partition_alter2_innodb.result b/mysql-test/suite/parts/r/partition_alter2_innodb.result
index cdddae40467..0bb44bb2a1d 100644
--- a/mysql-test/suite/parts/r/partition_alter2_innodb.result
+++ b/mysql-test/suite/parts/r/partition_alter2_innodb.result
@@ -2,14 +2,6 @@ SET @max_row = 20;
SET @@session.storage_engine = 'InnoDB';
#------------------------------------------------------------------------
-# There are several testcases disabled because of the open bugs
-# #15890
-# The expected results suffer from the following bugs
-# harmless #17455, #19305
-# which cannot be suppressed because of technical reasons.
-#------------------------------------------------------------------------
-
-#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables
# needed in many testcases
#------------------------------------------------------------------------
@@ -31,7 +23,7 @@ DROP TABLE IF EXISTS t0_definition;
CREATE TABLE t0_definition (
state CHAR(3),
create_command VARBINARY(5000),
-file_list VARBINARY(5000),
+file_list VARBINARY(10000),
PRIMARY KEY (state)
) ENGINE = MEMORY;
DROP TABLE IF EXISTS t0_aux;
@@ -71,7 +63,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -506,7 +498,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -524,7 +516,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -959,7 +951,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -985,7 +977,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -1420,7 +1412,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -1444,7 +1436,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -1877,7 +1869,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -1899,7 +1891,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -2334,7 +2326,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -2360,7 +2352,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -2793,7 +2785,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -2819,7 +2811,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -3254,7 +3246,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -3276,7 +3268,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -3711,7 +3703,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# 1.1.2 PRIMARY KEY exists
DROP TABLE IF EXISTS t1;
@@ -3731,7 +3723,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -4202,7 +4194,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -4220,7 +4212,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -4691,7 +4683,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -4717,7 +4709,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -5188,7 +5180,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -5212,7 +5204,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -5681,7 +5673,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -5703,7 +5695,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -6174,7 +6166,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -6200,7 +6192,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -6669,7 +6661,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -6695,7 +6687,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -7166,7 +7158,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -7188,7 +7180,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -7659,7 +7651,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@@ -7678,7 +7670,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -8149,7 +8141,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -8167,7 +8159,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -8638,7 +8630,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -8664,7 +8656,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -9135,7 +9127,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -9159,7 +9151,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -9628,7 +9620,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -9650,7 +9642,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -10121,7 +10113,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -10147,7 +10139,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -10616,7 +10608,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -10642,7 +10634,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -11113,7 +11105,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -11135,7 +11127,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -11606,7 +11598,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# 1.1.3 UNIQUE INDEX exists
DROP TABLE IF EXISTS t1;
@@ -11626,7 +11618,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -12113,7 +12105,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -12131,7 +12123,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -12618,7 +12610,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -12644,7 +12636,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -13131,7 +13123,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -13155,7 +13147,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -13640,7 +13632,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -13662,7 +13654,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -14149,7 +14141,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -14175,7 +14167,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -14660,7 +14652,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -14686,7 +14678,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -15173,7 +15165,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -15195,7 +15187,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -15682,7 +15674,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@@ -15701,7 +15693,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -16188,7 +16180,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -16206,7 +16198,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -16693,7 +16685,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -16719,7 +16711,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -17206,7 +17198,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -17230,7 +17222,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -17715,7 +17707,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -17737,7 +17729,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -18224,7 +18216,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -18250,7 +18242,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -18735,7 +18727,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -18761,7 +18753,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -19248,7 +19240,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -19270,7 +19262,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -19757,7 +19749,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
#------------------------------------------------------------------------
# 1.3 ALTER column f_int1 and f_int2
@@ -19781,7 +19773,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -20216,7 +20208,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -20234,7 +20226,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -20669,7 +20661,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -20695,7 +20687,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -21130,7 +21122,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -21154,7 +21146,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -21587,7 +21579,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -21609,7 +21601,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -22044,7 +22036,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -22070,7 +22062,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -22503,7 +22495,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -22529,7 +22521,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -22964,7 +22956,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -22986,7 +22978,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -23421,7 +23413,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@@ -23440,7 +23432,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -23875,7 +23867,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -23893,7 +23885,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -24328,7 +24320,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -24354,7 +24346,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -24789,7 +24781,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -24813,7 +24805,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -25246,7 +25238,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -25268,7 +25260,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -25701,7 +25693,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -25727,7 +25719,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -26160,7 +26152,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -26186,7 +26178,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -26621,7 +26613,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -26643,7 +26635,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -27078,7 +27070,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# 1.3.2 PRIMARY KEY exists
DROP TABLE IF EXISTS t1;
@@ -27098,7 +27090,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -27569,7 +27561,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -27587,7 +27579,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -28058,7 +28050,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -28084,7 +28076,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -28555,7 +28547,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -28579,7 +28571,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -29048,7 +29040,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -29070,7 +29062,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -29541,7 +29533,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -29567,7 +29559,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -30036,7 +30028,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -30062,7 +30054,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -30533,7 +30525,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -30555,7 +30547,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -31026,7 +31018,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@@ -31045,7 +31037,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -31516,7 +31508,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -31534,7 +31526,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -32005,7 +31997,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -32031,7 +32023,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -32502,7 +32494,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -32526,7 +32518,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -32995,7 +32987,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -33017,7 +33009,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -33486,7 +33478,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -33512,7 +33504,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -33981,7 +33973,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -34007,7 +33999,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -34478,7 +34470,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -34500,7 +34492,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -34971,7 +34963,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@@ -34990,7 +34982,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -35461,7 +35453,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -35479,7 +35471,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -35950,7 +35942,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -35976,7 +35968,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -36447,7 +36439,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -36471,7 +36463,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -36940,7 +36932,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -36962,7 +36954,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -37433,7 +37425,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -37459,7 +37451,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -37928,7 +37920,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -37954,7 +37946,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -38425,7 +38417,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -38447,7 +38439,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -38918,7 +38910,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@@ -38937,7 +38929,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -39408,7 +39400,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -39426,7 +39418,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -39897,7 +39889,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -39923,7 +39915,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -40394,7 +40386,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -40418,7 +40410,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -40887,7 +40879,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -40909,7 +40901,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -41378,7 +41370,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -41404,7 +41396,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -41873,7 +41865,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -41899,7 +41891,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -42370,7 +42362,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -42392,7 +42384,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -42863,7 +42855,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# 1.3.3 UNIQUE INDEX exists
DROP TABLE IF EXISTS t1;
@@ -42883,7 +42875,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -43370,7 +43362,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -43388,7 +43380,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -43875,7 +43867,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -43901,7 +43893,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -44388,7 +44380,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -44412,7 +44404,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -44897,7 +44889,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -44919,7 +44911,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -45406,7 +45398,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -45432,7 +45424,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -45917,7 +45909,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -45943,7 +45935,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -46430,7 +46422,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -46452,7 +46444,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -46939,7 +46931,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@@ -46958,7 +46950,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -47445,7 +47437,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -47463,7 +47455,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -47950,7 +47942,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -47976,7 +47968,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -48463,7 +48455,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -48487,7 +48479,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -48972,7 +48964,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -48994,7 +48986,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -49479,7 +49471,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -49505,7 +49497,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -49990,7 +49982,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -50016,7 +50008,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -50503,7 +50495,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -50525,7 +50517,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -51012,7 +51004,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@@ -51031,7 +51023,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -51518,7 +51510,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -51536,7 +51528,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -52023,7 +52015,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -52049,7 +52041,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -52536,7 +52528,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -52560,7 +52552,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -53045,7 +53037,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -53067,7 +53059,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -53554,7 +53546,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -53580,7 +53572,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -54065,7 +54057,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -54091,7 +54083,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -54578,7 +54570,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -54600,7 +54592,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -55087,7 +55079,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@@ -55106,7 +55098,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -55593,7 +55585,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -55611,7 +55603,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -56098,7 +56090,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -56124,7 +56116,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -56611,7 +56603,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -56635,7 +56627,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -57120,7 +57112,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -57142,7 +57134,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -57627,7 +57619,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -57653,7 +57645,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -58138,7 +58130,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -58164,7 +58156,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -58651,7 +58643,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -58673,7 +58665,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -59160,7 +59152,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
#========================================================================
@@ -59188,7 +59180,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -59625,7 +59617,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -59643,7 +59635,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -60080,7 +60072,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -60106,7 +60098,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -60543,7 +60535,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -60567,7 +60559,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -61000,7 +60992,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -61022,7 +61014,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -61459,7 +61451,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -61485,7 +61477,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -61918,7 +61910,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -61944,7 +61936,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -62381,7 +62373,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -62403,7 +62395,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -62840,7 +62832,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@@ -62859,7 +62851,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -63332,7 +63324,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -63350,7 +63342,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -63823,7 +63815,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -63849,7 +63841,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -64322,7 +64314,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -64346,7 +64338,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -64815,7 +64807,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -64837,7 +64829,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -65310,7 +65302,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -65336,7 +65328,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -65805,7 +65797,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -65831,7 +65823,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -66304,7 +66296,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -66326,7 +66318,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -66799,7 +66791,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@@ -66818,7 +66810,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -67291,7 +67283,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -67309,7 +67301,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -67782,7 +67774,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -67808,7 +67800,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -68281,7 +68273,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -68305,7 +68297,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -68774,7 +68766,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -68796,7 +68788,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -69269,7 +69261,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -69295,7 +69287,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -69764,7 +69756,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -69790,7 +69782,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -70263,7 +70255,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -70285,7 +70277,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -70758,7 +70750,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# 2.1.3 UNIQUE INDEX exists
DROP TABLE IF EXISTS t1;
@@ -70778,7 +70770,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -71267,7 +71259,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -71285,7 +71277,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -71774,7 +71766,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -71800,7 +71792,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -72289,7 +72281,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -72313,7 +72305,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -72798,7 +72790,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -72820,7 +72812,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -73309,7 +73301,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -73335,7 +73327,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -73820,7 +73812,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -73846,7 +73838,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -74335,7 +74327,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -74357,7 +74349,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -74846,7 +74838,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@@ -74865,7 +74857,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -75354,7 +75346,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -75372,7 +75364,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -75861,7 +75853,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -75887,7 +75879,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -76376,7 +76368,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -76400,7 +76392,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -76885,7 +76877,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -76907,7 +76899,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -77396,7 +77388,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -77422,7 +77414,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -77907,7 +77899,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -77933,7 +77925,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -78422,7 +78414,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -78444,7 +78436,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -78933,7 +78925,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
#------------------------------------------------------------------------
# 2.3 ALTER column f_int1 and f_int2 used in partitioning function
@@ -78956,7 +78948,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -79394,7 +79386,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -79412,7 +79404,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -79850,7 +79842,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -79876,7 +79868,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -80314,7 +80306,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -80338,7 +80330,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -80776,7 +80768,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -80798,7 +80790,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -81236,7 +81228,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -81262,7 +81254,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -81700,7 +81692,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -81726,7 +81718,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -82164,7 +82156,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -82186,7 +82178,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -82624,7 +82616,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@@ -82643,7 +82635,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -83081,7 +83073,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -83099,7 +83091,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -83537,7 +83529,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -83563,7 +83555,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -84001,7 +83993,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -84025,7 +84017,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -84463,7 +84455,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -84485,7 +84477,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -84923,7 +84915,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -84949,7 +84941,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -85387,7 +85379,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -85413,7 +85405,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -85851,7 +85843,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -85873,7 +85865,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -86311,7 +86303,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# 2.3.2 PRIMARY KEY exists
DROP TABLE IF EXISTS t1;
@@ -86331,7 +86323,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -86805,7 +86797,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -86823,7 +86815,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -87297,7 +87289,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -87323,7 +87315,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -87797,7 +87789,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -87821,7 +87813,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -88295,7 +88287,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -88317,7 +88309,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -88791,7 +88783,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -88817,7 +88809,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -89291,7 +89283,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -89317,7 +89309,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -89791,7 +89783,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -89813,7 +89805,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -90287,7 +90279,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@@ -90306,7 +90298,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -90780,7 +90772,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -90798,7 +90790,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -91272,7 +91264,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -91298,7 +91290,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -91772,7 +91764,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -91796,7 +91788,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -92270,7 +92262,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -92292,7 +92284,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -92766,7 +92758,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -92792,7 +92784,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -93266,7 +93258,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -93292,7 +93284,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -93766,7 +93758,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -93788,7 +93780,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -94262,7 +94254,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@@ -94281,7 +94273,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -94755,7 +94747,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -94773,7 +94765,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -95247,7 +95239,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -95273,7 +95265,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -95747,7 +95739,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -95771,7 +95763,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -96245,7 +96237,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -96267,7 +96259,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -96741,7 +96733,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -96767,7 +96759,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -97241,7 +97233,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -97267,7 +97259,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -97741,7 +97733,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -97763,7 +97755,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -98237,7 +98229,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@@ -98256,7 +98248,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -98730,7 +98722,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -98748,7 +98740,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -99222,7 +99214,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -99248,7 +99240,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -99722,7 +99714,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -99746,7 +99738,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -100220,7 +100212,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -100242,7 +100234,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -100716,7 +100708,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -100742,7 +100734,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -101216,7 +101208,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -101242,7 +101234,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -101716,7 +101708,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -101738,7 +101730,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -102212,7 +102204,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# 2.3.3 UNIQUE INDEX exists
DROP TABLE IF EXISTS t1;
@@ -102232,7 +102224,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -102722,7 +102714,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -102740,7 +102732,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -103230,7 +103222,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -103256,7 +103248,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -103746,7 +103738,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -103770,7 +103762,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -104260,7 +104252,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -104282,7 +104274,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -104772,7 +104764,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -104798,7 +104790,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -105288,7 +105280,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -105314,7 +105306,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -105804,7 +105796,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -105826,7 +105818,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -106316,7 +106308,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@@ -106335,7 +106327,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -106825,7 +106817,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -106843,7 +106835,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -107333,7 +107325,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -107359,7 +107351,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -107849,7 +107841,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -107873,7 +107865,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -108363,7 +108355,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -108385,7 +108377,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -108875,7 +108867,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -108901,7 +108893,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -109391,7 +109383,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -109417,7 +109409,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -109907,7 +109899,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -109929,7 +109921,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -110419,7 +110411,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@@ -110438,7 +110430,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -110928,7 +110920,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -110946,7 +110938,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -111436,7 +111428,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -111462,7 +111454,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -111952,7 +111944,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -111976,7 +111968,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -112466,7 +112458,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -112488,7 +112480,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -112978,7 +112970,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -113004,7 +112996,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -113494,7 +113486,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -113520,7 +113512,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -114010,7 +114002,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -114032,7 +114024,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -114522,7 +114514,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@@ -114541,7 +114533,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -115031,7 +115023,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -115049,7 +115041,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -115539,7 +115531,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -115565,7 +115557,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -116055,7 +116047,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -116079,7 +116071,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -116569,7 +116561,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -116591,7 +116583,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -117081,7 +117073,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -117107,7 +117099,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -117597,7 +117589,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -117623,7 +117615,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -118113,7 +118105,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -118135,7 +118127,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -118625,7 +118617,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP VIEW IF EXISTS v1;
DROP TABLE IF EXISTS t1;
diff --git a/mysql-test/suite/parts/r/partition_alter2_myisam.result b/mysql-test/suite/parts/r/partition_alter2_myisam.result
index 741ce2d8963..18abf7380c3 100644
--- a/mysql-test/suite/parts/r/partition_alter2_myisam.result
+++ b/mysql-test/suite/parts/r/partition_alter2_myisam.result
@@ -2,14 +2,6 @@ SET @max_row = 20;
SET @@session.storage_engine = 'MyISAM';
#------------------------------------------------------------------------
-# There are several testcases disabled because of the open bugs
-# #15890
-# The expected results suffer from the following bugs
-# harmless #17455, #19305
-# which cannot be suppressed because of technical reasons.
-#------------------------------------------------------------------------
-
-#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables
# needed in many testcases
#------------------------------------------------------------------------
@@ -31,7 +23,7 @@ DROP TABLE IF EXISTS t0_definition;
CREATE TABLE t0_definition (
state CHAR(3),
create_command VARBINARY(5000),
-file_list VARBINARY(5000),
+file_list VARBINARY(10000),
PRIMARY KEY (state)
) ENGINE = MEMORY;
DROP TABLE IF EXISTS t0_aux;
@@ -71,7 +63,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -516,7 +508,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -534,7 +526,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -985,7 +977,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -1011,7 +1003,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -1468,7 +1460,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -1492,7 +1484,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -1943,7 +1935,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -1965,7 +1957,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -2422,7 +2414,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -2448,7 +2440,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -2903,7 +2895,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -2929,7 +2921,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -3386,7 +3378,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -3408,7 +3400,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -3867,7 +3859,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# 1.1.3 UNIQUE INDEX exists
DROP TABLE IF EXISTS t1;
@@ -3887,7 +3879,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -4384,7 +4376,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -4402,7 +4394,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -4905,7 +4897,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -4931,7 +4923,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -5440,7 +5432,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -5464,7 +5456,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -5967,7 +5959,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -5989,7 +5981,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -6498,7 +6490,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -6524,7 +6516,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -7031,7 +7023,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -7057,7 +7049,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -7566,7 +7558,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -7588,7 +7580,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -8099,7 +8091,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@@ -8118,7 +8110,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -8615,7 +8607,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -8633,7 +8625,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -9136,7 +9128,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -9162,7 +9154,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -9671,7 +9663,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -9695,7 +9687,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -10198,7 +10190,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -10220,7 +10212,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -10729,7 +10721,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -10755,7 +10747,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -11262,7 +11254,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -11288,7 +11280,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -11797,7 +11789,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -11819,7 +11811,7 @@ ALTER TABLE t1 MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -12330,7 +12322,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
#------------------------------------------------------------------------
# 1.3 ALTER column f_int1 and f_int2
@@ -12354,7 +12346,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -12799,7 +12791,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -12817,7 +12809,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -13268,7 +13260,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -13294,7 +13286,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -13751,7 +13743,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -13775,7 +13767,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -14226,7 +14218,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -14248,7 +14240,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -14705,7 +14697,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -14731,7 +14723,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -15186,7 +15178,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -15212,7 +15204,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -15669,7 +15661,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -15691,7 +15683,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -16150,7 +16142,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@@ -16169,7 +16161,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -16614,7 +16606,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -16632,7 +16624,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -17083,7 +17075,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -17109,7 +17101,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -17566,7 +17558,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -17590,7 +17582,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -18041,7 +18033,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -18063,7 +18055,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -18518,7 +18510,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -18544,7 +18536,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -18999,7 +18991,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -19025,7 +19017,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -19482,7 +19474,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -19504,7 +19496,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -19963,7 +19955,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# 1.3.3 UNIQUE INDEX exists
DROP TABLE IF EXISTS t1;
@@ -19983,7 +19975,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -20480,7 +20472,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -20498,7 +20490,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -21001,7 +20993,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -21027,7 +21019,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -21536,7 +21528,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -21560,7 +21552,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -22063,7 +22055,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -22085,7 +22077,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -22594,7 +22586,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -22620,7 +22612,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -23127,7 +23119,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -23153,7 +23145,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -23662,7 +23654,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -23684,7 +23676,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -24195,7 +24187,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@@ -24214,7 +24206,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -24711,7 +24703,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -24729,7 +24721,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -25232,7 +25224,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -25258,7 +25250,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -25767,7 +25759,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -25791,7 +25783,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -26294,7 +26286,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -26316,7 +26308,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -26823,7 +26815,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -26849,7 +26841,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -27356,7 +27348,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -27382,7 +27374,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -27891,7 +27883,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -27913,7 +27905,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -28424,7 +28416,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@@ -28443,7 +28435,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -28940,7 +28932,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -28958,7 +28950,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -29461,7 +29453,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -29487,7 +29479,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -29996,7 +29988,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -30020,7 +30012,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -30523,7 +30515,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -30545,7 +30537,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -31054,7 +31046,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -31080,7 +31072,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -31587,7 +31579,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -31613,7 +31605,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -32122,7 +32114,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -32144,7 +32136,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -32655,7 +32647,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@@ -32674,7 +32666,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -33171,7 +33163,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -33189,7 +33181,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -33692,7 +33684,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -33718,7 +33710,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -34227,7 +34219,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -34251,7 +34243,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -34754,7 +34746,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -34776,7 +34768,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -35283,7 +35275,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -35309,7 +35301,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -35816,7 +35808,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -35842,7 +35834,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -36351,7 +36343,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -36373,7 +36365,7 @@ ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -36884,7 +36876,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
#========================================================================
@@ -36912,7 +36904,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -37359,7 +37351,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -37377,7 +37369,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -37830,7 +37822,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -37856,7 +37848,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -38315,7 +38307,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -38339,7 +38331,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -38790,7 +38782,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -38812,7 +38804,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -39271,7 +39263,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -39297,7 +39289,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -39752,7 +39744,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -39778,7 +39770,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -40237,7 +40229,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -40259,7 +40251,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -40720,7 +40712,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# 2.1.3 UNIQUE INDEX exists
DROP TABLE IF EXISTS t1;
@@ -40740,7 +40732,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -41239,7 +41231,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -41257,7 +41249,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -41762,7 +41754,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -41788,7 +41780,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -42299,7 +42291,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -42323,7 +42315,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -42826,7 +42818,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -42848,7 +42840,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -43359,7 +43351,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -43385,7 +43377,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -43892,7 +43884,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -43918,7 +43910,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -44429,7 +44421,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -44451,7 +44443,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -44964,7 +44956,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@@ -44983,7 +44975,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -45482,7 +45474,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -45500,7 +45492,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -46005,7 +45997,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -46031,7 +46023,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -46542,7 +46534,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -46566,7 +46558,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -47069,7 +47061,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -47091,7 +47083,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -47602,7 +47594,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -47628,7 +47620,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -48135,7 +48127,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -48161,7 +48153,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -48672,7 +48664,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -48694,7 +48686,7 @@ ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -49207,7 +49199,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
#------------------------------------------------------------------------
# 2.3 ALTER column f_int1 and f_int2 used in partitioning function
@@ -49230,7 +49222,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -49678,7 +49670,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -49696,7 +49688,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -50150,7 +50142,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -50176,7 +50168,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -50636,7 +50628,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -50660,7 +50652,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -51116,7 +51108,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -51138,7 +51130,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -51598,7 +51590,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -51624,7 +51616,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -52084,7 +52076,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -52110,7 +52102,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -52570,7 +52562,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -52592,7 +52584,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -53054,7 +53046,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@@ -53073,7 +53065,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -53521,7 +53513,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -53539,7 +53531,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -53993,7 +53985,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -54019,7 +54011,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -54479,7 +54471,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -54503,7 +54495,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -54959,7 +54951,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -54981,7 +54973,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -55441,7 +55433,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -55467,7 +55459,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -55927,7 +55919,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -55953,7 +55945,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -56413,7 +56405,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -56435,7 +56427,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -56897,7 +56889,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# 2.3.3 UNIQUE INDEX exists
DROP TABLE IF EXISTS t1;
@@ -56917,7 +56909,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -57417,7 +57409,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -57435,7 +57427,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -57941,7 +57933,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -57967,7 +57959,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -58479,7 +58471,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -58503,7 +58495,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -59011,7 +59003,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -59033,7 +59025,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -59545,7 +59537,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -59571,7 +59563,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -60083,7 +60075,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -60109,7 +60101,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -60621,7 +60613,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -60643,7 +60635,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -61157,7 +61149,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@@ -61176,7 +61168,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -61676,7 +61668,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -61694,7 +61686,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -62200,7 +62192,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -62226,7 +62218,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -62738,7 +62730,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -62762,7 +62754,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -63270,7 +63262,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -63292,7 +63284,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -63804,7 +63796,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -63830,7 +63822,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -64342,7 +64334,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -64368,7 +64360,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -64880,7 +64872,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -64902,7 +64894,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -65416,7 +65408,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@@ -65435,7 +65427,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -65935,7 +65927,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -65953,7 +65945,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -66459,7 +66451,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -66485,7 +66477,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -66997,7 +66989,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -67021,7 +67013,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -67529,7 +67521,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -67551,7 +67543,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -68063,7 +68055,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -68089,7 +68081,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -68601,7 +68593,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -68627,7 +68619,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -69139,7 +69131,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -69161,7 +69153,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -69675,7 +69667,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@@ -69694,7 +69686,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -70194,7 +70186,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -70212,7 +70204,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -70718,7 +70710,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -70744,7 +70736,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -71256,7 +71248,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -71280,7 +71272,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -71788,7 +71780,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -71810,7 +71802,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -72322,7 +72314,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -72348,7 +72340,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -72860,7 +72852,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -72886,7 +72878,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -73398,7 +73390,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -73420,7 +73412,7 @@ ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -73934,7 +73926,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP VIEW IF EXISTS v1;
DROP TABLE IF EXISTS t1;
diff --git a/mysql-test/suite/parts/r/partition_alter3_innodb.result b/mysql-test/suite/parts/r/partition_alter3_innodb.result
index 7228462c61d..2ca1e783839 100644
--- a/mysql-test/suite/parts/r/partition_alter3_innodb.result
+++ b/mysql-test/suite/parts/r/partition_alter3_innodb.result
@@ -2,14 +2,6 @@ SET @max_row = 20;
SET @@session.storage_engine = 'InnoDB';
#------------------------------------------------------------------------
-# There are several testcases disabled because of the open bugs
-# #15890
-# The expected results suffer from the following bugs
-# harmless #17455, #19305
-# which cannot be suppressed because of technical reasons.
-#------------------------------------------------------------------------
-
-#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables
# needed in many testcases
#------------------------------------------------------------------------
@@ -31,7 +23,7 @@ DROP TABLE IF EXISTS t0_definition;
CREATE TABLE t0_definition (
state CHAR(3),
create_command VARBINARY(5000),
-file_list VARBINARY(5000),
+file_list VARBINARY(10000),
PRIMARY KEY (state)
) ENGINE = MEMORY;
DROP TABLE IF EXISTS t0_aux;
@@ -321,7 +313,7 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
ALTER TABLE t1 REMOVE PARTITIONING;
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
@@ -600,7 +592,7 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
ALTER TABLE t1 REMOVE PARTITIONING;
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
diff --git a/mysql-test/suite/parts/r/partition_alter3_myisam.result b/mysql-test/suite/parts/r/partition_alter3_myisam.result
index c24858aa2ca..5684ca89b1c 100644
--- a/mysql-test/suite/parts/r/partition_alter3_myisam.result
+++ b/mysql-test/suite/parts/r/partition_alter3_myisam.result
@@ -2,14 +2,6 @@ SET @max_row = 20;
SET @@session.storage_engine = 'MyISAM';
#------------------------------------------------------------------------
-# There are several testcases disabled because of the open bugs
-# #15890
-# The expected results suffer from the following bugs
-# harmless #17455, #19305
-# which cannot be suppressed because of technical reasons.
-#------------------------------------------------------------------------
-
-#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables
# needed in many testcases
#------------------------------------------------------------------------
@@ -31,7 +23,7 @@ DROP TABLE IF EXISTS t0_definition;
CREATE TABLE t0_definition (
state CHAR(3),
create_command VARBINARY(5000),
-file_list VARBINARY(5000),
+file_list VARBINARY(10000),
PRIMARY KEY (state)
) ENGINE = MEMORY;
DROP TABLE IF EXISTS t0_aux;
diff --git a/mysql-test/suite/parts/r/partition_alter4_innodb.result b/mysql-test/suite/parts/r/partition_alter4_innodb.result
index 2c5f57d8a46..0e6f0c22f93 100644
--- a/mysql-test/suite/parts/r/partition_alter4_innodb.result
+++ b/mysql-test/suite/parts/r/partition_alter4_innodb.result
@@ -2,14 +2,6 @@ SET @max_row = 20;
SET @@session.storage_engine = 'InnoDB';
#------------------------------------------------------------------------
-# There are several testcases disabled because of the open bugs
-# #15890
-# The expected results suffer from the following bugs
-# harmless #17455, #19305
-# which cannot be suppressed because of technical reasons.
-#------------------------------------------------------------------------
-
-#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables
# needed in many testcases
#------------------------------------------------------------------------
@@ -31,7 +23,7 @@ DROP TABLE IF EXISTS t0_definition;
CREATE TABLE t0_definition (
state CHAR(3),
create_command VARBINARY(5000),
-file_list VARBINARY(5000),
+file_list VARBINARY(10000),
PRIMARY KEY (state)
) ENGINE = MEMORY;
DROP TABLE IF EXISTS t0_aux;
@@ -70,7 +62,7 @@ ALTER TABLE t1 ANALYZE PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -505,7 +497,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -523,7 +515,7 @@ ALTER TABLE t1 ANALYZE PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -958,7 +950,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -984,7 +976,7 @@ ALTER TABLE t1 ANALYZE PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -1419,7 +1411,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -1443,7 +1435,7 @@ ALTER TABLE t1 ANALYZE PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -1876,7 +1868,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -1898,7 +1890,7 @@ ALTER TABLE t1 ANALYZE PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -2333,7 +2325,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -2359,7 +2351,7 @@ ALTER TABLE t1 ANALYZE PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -2792,7 +2784,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -2818,7 +2810,7 @@ ALTER TABLE t1 ANALYZE PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -3253,7 +3245,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -3275,7 +3267,7 @@ ALTER TABLE t1 ANALYZE PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -3710,7 +3702,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# 1.2 ALTER ... ANALYZE PARTITION part_1,part_2;
DROP TABLE IF EXISTS t1;
@@ -3730,7 +3722,7 @@ ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -4165,7 +4157,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -4183,7 +4175,7 @@ ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -4618,7 +4610,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -4644,7 +4636,7 @@ ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -5079,7 +5071,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -5103,7 +5095,7 @@ ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -5536,7 +5528,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -5558,7 +5550,7 @@ ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -5993,7 +5985,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -6019,7 +6011,7 @@ ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -6452,7 +6444,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -6478,7 +6470,7 @@ ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -6913,7 +6905,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -6935,7 +6927,7 @@ ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -7370,7 +7362,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# 1.3 ALTER ... ANALYZE PARTITION part_1,part_2,part_5,part_6,part_10;
DROP TABLE IF EXISTS t1;
@@ -7713,7 +7705,7 @@ ALTER TABLE t1 CHECK PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -8148,7 +8140,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -8166,7 +8158,7 @@ ALTER TABLE t1 CHECK PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -8601,7 +8593,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -8627,7 +8619,7 @@ ALTER TABLE t1 CHECK PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -9062,7 +9054,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -9086,7 +9078,7 @@ ALTER TABLE t1 CHECK PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -9519,7 +9511,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -9541,7 +9533,7 @@ ALTER TABLE t1 CHECK PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -9976,7 +9968,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -10002,7 +9994,7 @@ ALTER TABLE t1 CHECK PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -10435,7 +10427,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -10461,7 +10453,7 @@ ALTER TABLE t1 CHECK PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -10896,7 +10888,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -10918,7 +10910,7 @@ ALTER TABLE t1 CHECK PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -11353,7 +11345,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# 2.2 ALTER ... CHECK PARTITION part_1,part_2;
DROP TABLE IF EXISTS t1;
@@ -11373,7 +11365,7 @@ ALTER TABLE t1 CHECK PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -11808,7 +11800,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -11826,7 +11818,7 @@ ALTER TABLE t1 CHECK PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -12261,7 +12253,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -12287,7 +12279,7 @@ ALTER TABLE t1 CHECK PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -12722,7 +12714,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -12746,7 +12738,7 @@ ALTER TABLE t1 CHECK PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -13179,7 +13171,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -13201,7 +13193,7 @@ ALTER TABLE t1 CHECK PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -13636,7 +13628,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -13662,7 +13654,7 @@ ALTER TABLE t1 CHECK PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -14095,7 +14087,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -14121,7 +14113,7 @@ ALTER TABLE t1 CHECK PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -14556,7 +14548,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -14578,7 +14570,7 @@ ALTER TABLE t1 CHECK PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -15013,7 +15005,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# 2.3 ALTER ... CHECK PARTITION part_1,part_2,part_5,part_6,part_10;
DROP TABLE IF EXISTS t1;
@@ -15999,7 +15991,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -16434,7 +16426,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -16452,7 +16444,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -16887,7 +16879,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -16913,7 +16905,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -17348,7 +17340,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -17372,7 +17364,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -17805,7 +17797,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -17827,7 +17819,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -18262,7 +18254,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -18288,7 +18280,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -18721,7 +18713,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -18747,7 +18739,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -19182,7 +19174,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -19204,7 +19196,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -19639,7 +19631,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# 4.2 ALTER ... REBUILD PARTITION part_1,part_2;
DROP TABLE IF EXISTS t1;
@@ -19659,7 +19651,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -20094,7 +20086,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -20112,7 +20104,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -20547,7 +20539,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -20573,7 +20565,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -21008,7 +21000,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -21032,7 +21024,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -21465,7 +21457,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -21487,7 +21479,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -21922,7 +21914,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -21948,7 +21940,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -22381,7 +22373,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -22407,7 +22399,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -22842,7 +22834,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -22864,7 +22856,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -23299,7 +23291,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# 4.3 ALTER ... REBUILD PARTITION part_1,part_2,part_5,part_6,part_10;
DROP TABLE IF EXISTS t1;
@@ -23642,7 +23634,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -24077,7 +24069,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -24095,7 +24087,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -24530,7 +24522,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -24556,7 +24548,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -24991,7 +24983,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -25015,7 +25007,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -25448,7 +25440,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -25470,7 +25462,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -25905,7 +25897,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -25931,7 +25923,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -26364,7 +26356,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -26390,7 +26382,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -26825,7 +26817,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -26847,7 +26839,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -27282,7 +27274,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# 5.2 ALTER ... REBUILD PARTITION part_1,part_2;
DROP TABLE IF EXISTS t1;
@@ -27302,7 +27294,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -27737,7 +27729,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -27755,7 +27747,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -28190,7 +28182,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -28216,7 +28208,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -28651,7 +28643,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -28675,7 +28667,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -29108,7 +29100,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -29130,7 +29122,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -29565,7 +29557,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -29591,7 +29583,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -30024,7 +30016,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -30050,7 +30042,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -30485,7 +30477,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -30507,7 +30499,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -30942,7 +30934,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# 5.3 ALTER ... REBUILD PARTITION part_1,part_2,part_5,part_6,part_10;
DROP TABLE IF EXISTS t1;
@@ -31285,7 +31277,7 @@ ALTER TABLE t1 REMOVE PARTITIONING;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -31720,7 +31712,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -31738,7 +31730,7 @@ ALTER TABLE t1 REMOVE PARTITIONING;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -32173,7 +32165,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -32199,7 +32191,7 @@ ALTER TABLE t1 REMOVE PARTITIONING;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -32634,7 +32626,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -32658,7 +32650,7 @@ ALTER TABLE t1 REMOVE PARTITIONING;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -33093,7 +33085,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -33115,7 +33107,7 @@ ALTER TABLE t1 REMOVE PARTITIONING;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -33550,7 +33542,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -33576,7 +33568,7 @@ ALTER TABLE t1 REMOVE PARTITIONING;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -34011,7 +34003,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -34037,7 +34029,7 @@ ALTER TABLE t1 REMOVE PARTITIONING;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -34472,7 +34464,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -34494,7 +34486,7 @@ ALTER TABLE t1 REMOVE PARTITIONING;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -34929,7 +34921,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP VIEW IF EXISTS v1;
DROP TABLE IF EXISTS t1;
diff --git a/mysql-test/suite/parts/r/partition_alter4_myisam.result b/mysql-test/suite/parts/r/partition_alter4_myisam.result
index 32da415443d..8eac8d414de 100644
--- a/mysql-test/suite/parts/r/partition_alter4_myisam.result
+++ b/mysql-test/suite/parts/r/partition_alter4_myisam.result
@@ -2,14 +2,6 @@ SET @max_row = 20;
SET @@session.storage_engine = 'MyISAM';
#------------------------------------------------------------------------
-# There are several testcases disabled because of the open bugs
-# #15890
-# The expected results suffer from the following bugs
-# harmless #17455, #19305
-# which cannot be suppressed because of technical reasons.
-#------------------------------------------------------------------------
-
-#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables
# needed in many testcases
#------------------------------------------------------------------------
@@ -31,7 +23,7 @@ DROP TABLE IF EXISTS t0_definition;
CREATE TABLE t0_definition (
state CHAR(3),
create_command VARBINARY(5000),
-file_list VARBINARY(5000),
+file_list VARBINARY(10000),
PRIMARY KEY (state)
) ENGINE = MEMORY;
DROP TABLE IF EXISTS t0_aux;
@@ -70,7 +62,7 @@ ALTER TABLE t1 ANALYZE PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -515,7 +507,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -533,7 +525,7 @@ ALTER TABLE t1 ANALYZE PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -984,7 +976,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -1010,7 +1002,7 @@ ALTER TABLE t1 ANALYZE PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -1467,7 +1459,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -1491,7 +1483,7 @@ ALTER TABLE t1 ANALYZE PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -1942,7 +1934,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -1964,7 +1956,7 @@ ALTER TABLE t1 ANALYZE PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -2421,7 +2413,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -2447,7 +2439,7 @@ ALTER TABLE t1 ANALYZE PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -2902,7 +2894,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -2928,7 +2920,7 @@ ALTER TABLE t1 ANALYZE PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -3385,7 +3377,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -3407,7 +3399,7 @@ ALTER TABLE t1 ANALYZE PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -3866,7 +3858,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# 1.2 ALTER ... ANALYZE PARTITION part_1,part_2;
DROP TABLE IF EXISTS t1;
@@ -3886,7 +3878,7 @@ ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -4331,7 +4323,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -4349,7 +4341,7 @@ ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -4800,7 +4792,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -4826,7 +4818,7 @@ ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -5283,7 +5275,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -5307,7 +5299,7 @@ ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -5758,7 +5750,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -5780,7 +5772,7 @@ ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -6237,7 +6229,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -6263,7 +6255,7 @@ ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -6718,7 +6710,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -6744,7 +6736,7 @@ ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -7201,7 +7193,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -7223,7 +7215,7 @@ ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -7682,7 +7674,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# 1.3 ALTER ... ANALYZE PARTITION part_1,part_2,part_5,part_6,part_10;
DROP TABLE IF EXISTS t1;
@@ -8025,7 +8017,7 @@ ALTER TABLE t1 CHECK PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -8470,7 +8462,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -8488,7 +8480,7 @@ ALTER TABLE t1 CHECK PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -8939,7 +8931,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -8965,7 +8957,7 @@ ALTER TABLE t1 CHECK PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -9422,7 +9414,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -9446,7 +9438,7 @@ ALTER TABLE t1 CHECK PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -9897,7 +9889,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -9919,7 +9911,7 @@ ALTER TABLE t1 CHECK PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -10376,7 +10368,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -10402,7 +10394,7 @@ ALTER TABLE t1 CHECK PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -10857,7 +10849,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -10883,7 +10875,7 @@ ALTER TABLE t1 CHECK PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -11340,7 +11332,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -11362,7 +11354,7 @@ ALTER TABLE t1 CHECK PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -11821,7 +11813,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# 2.2 ALTER ... CHECK PARTITION part_1,part_2;
DROP TABLE IF EXISTS t1;
@@ -11841,7 +11833,7 @@ ALTER TABLE t1 CHECK PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -12286,7 +12278,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -12304,7 +12296,7 @@ ALTER TABLE t1 CHECK PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -12755,7 +12747,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -12781,7 +12773,7 @@ ALTER TABLE t1 CHECK PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -13238,7 +13230,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -13262,7 +13254,7 @@ ALTER TABLE t1 CHECK PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -13713,7 +13705,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -13735,7 +13727,7 @@ ALTER TABLE t1 CHECK PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -14192,7 +14184,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -14218,7 +14210,7 @@ ALTER TABLE t1 CHECK PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -14673,7 +14665,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -14699,7 +14691,7 @@ ALTER TABLE t1 CHECK PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -15156,7 +15148,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -15178,7 +15170,7 @@ ALTER TABLE t1 CHECK PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -15637,7 +15629,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# 2.3 ALTER ... CHECK PARTITION part_1,part_2,part_5,part_6,part_10;
DROP TABLE IF EXISTS t1;
@@ -15980,7 +15972,7 @@ ALTER TABLE t1 OPTIMIZE PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -16425,7 +16417,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -16443,7 +16435,7 @@ ALTER TABLE t1 OPTIMIZE PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -16894,7 +16886,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -16920,7 +16912,7 @@ ALTER TABLE t1 OPTIMIZE PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -17377,7 +17369,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -17401,7 +17393,7 @@ ALTER TABLE t1 OPTIMIZE PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -17852,7 +17844,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -17874,7 +17866,7 @@ ALTER TABLE t1 OPTIMIZE PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -18331,7 +18323,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -18357,7 +18349,7 @@ ALTER TABLE t1 OPTIMIZE PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -18812,7 +18804,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -18838,7 +18830,7 @@ ALTER TABLE t1 OPTIMIZE PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -19295,7 +19287,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -19317,7 +19309,7 @@ ALTER TABLE t1 OPTIMIZE PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -19776,7 +19768,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# 3.2 ALTER ... OPTIMIZE PARTITION part_1,part_2;
DROP TABLE IF EXISTS t1;
@@ -19796,7 +19788,7 @@ ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -20241,7 +20233,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -20259,7 +20251,7 @@ ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -20710,7 +20702,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -20736,7 +20728,7 @@ ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -21193,7 +21185,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -21217,7 +21209,7 @@ ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -21668,7 +21660,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -21690,7 +21682,7 @@ ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -22147,7 +22139,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -22173,7 +22165,7 @@ ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -22628,7 +22620,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -22654,7 +22646,7 @@ ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -23111,7 +23103,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -23133,7 +23125,7 @@ ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -23592,7 +23584,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# 3.3 ALTER ... OPTIMIZE PARTITION part_1,part_2,part_5,part_6,part_10;
DROP TABLE IF EXISTS t1;
@@ -23935,7 +23927,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -24380,7 +24372,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -24398,7 +24390,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -24849,7 +24841,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -24875,7 +24867,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -25332,7 +25324,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -25356,7 +25348,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -25807,7 +25799,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -25829,7 +25821,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -26286,7 +26278,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -26312,7 +26304,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -26767,7 +26759,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -26793,7 +26785,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -27250,7 +27242,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -27272,7 +27264,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -27731,7 +27723,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# 4.2 ALTER ... REBUILD PARTITION part_1,part_2;
DROP TABLE IF EXISTS t1;
@@ -27751,7 +27743,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -28196,7 +28188,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -28214,7 +28206,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -28665,7 +28657,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -28691,7 +28683,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -29148,7 +29140,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -29172,7 +29164,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -29623,7 +29615,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -29645,7 +29637,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -30102,7 +30094,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -30128,7 +30120,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -30583,7 +30575,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -30609,7 +30601,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -31066,7 +31058,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -31088,7 +31080,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -31547,7 +31539,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# 4.3 ALTER ... REBUILD PARTITION part_1,part_2,part_5,part_6,part_10;
DROP TABLE IF EXISTS t1;
@@ -31890,7 +31882,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -32335,7 +32327,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -32353,7 +32345,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -32804,7 +32796,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -32830,7 +32822,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -33287,7 +33279,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -33311,7 +33303,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -33762,7 +33754,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -33784,7 +33776,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -34241,7 +34233,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -34267,7 +34259,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -34722,7 +34714,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -34748,7 +34740,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -35205,7 +35197,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -35227,7 +35219,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -35686,7 +35678,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# 5.2 ALTER ... REBUILD PARTITION part_1,part_2;
DROP TABLE IF EXISTS t1;
@@ -35706,7 +35698,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -36151,7 +36143,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -36169,7 +36161,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -36620,7 +36612,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -36646,7 +36638,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -37103,7 +37095,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -37127,7 +37119,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -37578,7 +37570,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -37600,7 +37592,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -38057,7 +38049,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -38083,7 +38075,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -38538,7 +38530,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -38564,7 +38556,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -39021,7 +39013,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -39043,7 +39035,7 @@ ALTER TABLE t1 REBUILD PARTITION part_1,part_2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -39502,7 +39494,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# 5.3 ALTER ... REBUILD PARTITION part_1,part_2,part_5,part_6,part_10;
DROP TABLE IF EXISTS t1;
@@ -39845,7 +39837,7 @@ ALTER TABLE t1 REMOVE PARTITIONING;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -40287,7 +40279,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -40305,7 +40297,7 @@ ALTER TABLE t1 REMOVE PARTITIONING;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -40747,7 +40739,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -40773,7 +40765,7 @@ ALTER TABLE t1 REMOVE PARTITIONING;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -41215,7 +41207,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -41239,7 +41231,7 @@ ALTER TABLE t1 REMOVE PARTITIONING;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -41681,7 +41673,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -41703,7 +41695,7 @@ ALTER TABLE t1 REMOVE PARTITIONING;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -42145,7 +42137,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -42171,7 +42163,7 @@ ALTER TABLE t1 REMOVE PARTITIONING;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -42613,7 +42605,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -42639,7 +42631,7 @@ ALTER TABLE t1 REMOVE PARTITIONING;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -43081,7 +43073,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -43103,7 +43095,7 @@ ALTER TABLE t1 REMOVE PARTITIONING;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -43545,7 +43537,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP VIEW IF EXISTS v1;
DROP TABLE IF EXISTS t1;
diff --git a/mysql-test/suite/parts/r/partition_basic_innodb.result b/mysql-test/suite/parts/r/partition_basic_innodb.result
index dc875980678..b9097e33ce0 100644
--- a/mysql-test/suite/parts/r/partition_basic_innodb.result
+++ b/mysql-test/suite/parts/r/partition_basic_innodb.result
@@ -2,14 +2,6 @@ SET @max_row = 20;
SET @@session.storage_engine = 'InnoDB';
#------------------------------------------------------------------------
-# There are several testcases disabled because of the open bugs
-# #15890
-# The expected results suffer from the following bugs
-# harmless #17455, #19305
-# which cannot be suppressed because of technical reasons.
-#------------------------------------------------------------------------
-
-#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables
# needed in many testcases
#------------------------------------------------------------------------
@@ -31,7 +23,7 @@ DROP TABLE IF EXISTS t0_definition;
CREATE TABLE t0_definition (
state CHAR(3),
create_command VARBINARY(5000),
-file_list VARBINARY(5000),
+file_list VARBINARY(10000),
PRIMARY KEY (state)
) ENGINE = MEMORY;
DROP TABLE IF EXISTS t0_aux;
@@ -61,7 +53,7 @@ SET @@session.sql_mode= '';
DROP TABLE IF EXISTS t1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -496,17 +488,17 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
--- not determined ---
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -941,17 +933,17 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
--- not determined ---
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -1386,17 +1378,17 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
--- not determined ---
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -1829,17 +1821,17 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
--- not determined ---
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -2274,17 +2266,17 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
--- not determined ---
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -2717,17 +2709,17 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
--- not determined ---
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -3162,17 +3154,17 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
--- not determined ---
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -3607,10 +3599,10 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
@@ -3618,7 +3610,7 @@ unified filelist
# 1.1.1 with DATA DIECTORY/INDEX DIRECTORY
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -4053,17 +4045,17 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
--- not determined ---
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -4498,17 +4490,17 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
--- not determined ---
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -4943,17 +4935,17 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
--- not determined ---
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -5386,17 +5378,17 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
--- not determined ---
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -5831,17 +5823,17 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
--- not determined ---
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -6274,17 +6266,17 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
--- not determined ---
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -6719,17 +6711,17 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
--- not determined ---
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -7164,10 +7156,10 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
@@ -7175,7 +7167,7 @@ unified filelist
DROP TABLE IF EXISTS t1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -7610,17 +7602,17 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
--- not determined ---
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -8055,17 +8047,17 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
--- not determined ---
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -8500,17 +8492,17 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
--- not determined ---
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -8943,17 +8935,17 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
--- not determined ---
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -9388,17 +9380,17 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
--- not determined ---
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -9831,17 +9823,17 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
--- not determined ---
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -10276,10 +10268,10 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
@@ -10297,7 +10289,7 @@ f_charbig VARCHAR(1000)
PARTITION BY HASH(f_int1 + f_int2) PARTITIONS 2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -10732,7 +10724,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -10745,7 +10737,7 @@ f_charbig VARCHAR(1000)
PARTITION BY KEY(f_int1,f_int2) PARTITIONS 5;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -11180,7 +11172,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -11201,7 +11193,7 @@ PARTITION part2 VALUES IN (2),
PARTITION part3 VALUES IN (3));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -11636,7 +11628,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -11655,7 +11647,7 @@ PARTITION parte VALUES LESS THAN (20),
PARTITION partf VALUES LESS THAN (2147483646));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -12088,7 +12080,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -12105,7 +12097,7 @@ PARTITION partc VALUES LESS THAN (10),
PARTITION partd VALUES LESS THAN (2147483646));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -12538,7 +12530,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -12559,7 +12551,7 @@ PARTITION part4 VALUES LESS THAN (2147483646)
(SUBPARTITION subpart41, SUBPARTITION subpart42));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -12992,7 +12984,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -13013,7 +13005,7 @@ PARTITION part4 VALUES IN (NULL)
(SUBPARTITION sp41, SUBPARTITION sp42));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -13448,7 +13440,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -13465,7 +13457,7 @@ SUBPARTITION BY KEY(f_int2) SUBPARTITIONS 3
PARTITION part3 VALUES IN (NULL));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -13900,7 +13892,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
#------------------------------------------------------------------------
# 2 Tables with PRIMARY KEY and/or UNIQUE INDEXes
@@ -13910,7 +13902,7 @@ DROP TABLE t1;
DROP TABLE IF EXISTS t1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -14382,17 +14374,17 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
--- not determined ---
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -14864,17 +14856,17 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
--- not determined ---
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -15346,17 +15338,17 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
--- not determined ---
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -15826,17 +15818,17 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
--- not determined ---
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -16308,17 +16300,17 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
--- not determined ---
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -16788,17 +16780,17 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
--- not determined ---
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -17270,17 +17262,17 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
--- not determined ---
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -17752,10 +17744,10 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
@@ -17763,7 +17755,7 @@ unified filelist
DROP TABLE IF EXISTS t1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -18235,17 +18227,17 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
--- not determined ---
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -18717,17 +18709,17 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
--- not determined ---
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -19199,17 +19191,17 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
--- not determined ---
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -19679,17 +19671,17 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
--- not determined ---
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -20161,17 +20153,17 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
--- not determined ---
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -20641,17 +20633,17 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
--- not determined ---
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -21123,17 +21115,17 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
--- not determined ---
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -21605,10 +21597,10 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
@@ -21616,7 +21608,7 @@ unified filelist
DROP TABLE IF EXISTS t1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -22104,17 +22096,17 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
--- not determined ---
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -22602,17 +22594,17 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
--- not determined ---
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -23100,17 +23092,17 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
--- not determined ---
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -23596,17 +23588,17 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
--- not determined ---
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -24094,17 +24086,17 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
--- not determined ---
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -24590,17 +24582,17 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
--- not determined ---
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -25088,17 +25080,17 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
--- not determined ---
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -25586,10 +25578,10 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# Attention: There are unused files.
-# Either the DROP TABLE or a preceeding ALTER TABLE
+# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
@@ -25611,7 +25603,7 @@ f_charbig VARCHAR(1000)
PARTITION BY HASH(f_int1 + f_int2) PARTITIONS 2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -26083,7 +26075,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -26096,7 +26088,7 @@ f_charbig VARCHAR(1000)
PARTITION BY KEY(f_int1,f_int2) PARTITIONS 5;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -26568,7 +26560,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -26589,7 +26581,7 @@ PARTITION part2 VALUES IN (2),
PARTITION part3 VALUES IN (3));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -27061,7 +27053,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -27080,7 +27072,7 @@ PARTITION parte VALUES LESS THAN (20),
PARTITION partf VALUES LESS THAN (2147483646));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -27550,7 +27542,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -27567,7 +27559,7 @@ PARTITION partc VALUES LESS THAN (10),
PARTITION partd VALUES LESS THAN (2147483646));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -28037,7 +28029,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -28058,7 +28050,7 @@ PARTITION part4 VALUES LESS THAN (2147483646)
(SUBPARTITION subpart41, SUBPARTITION subpart42));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -28528,7 +28520,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -28549,7 +28541,7 @@ PARTITION part4 VALUES IN (NULL)
(SUBPARTITION sp41, SUBPARTITION sp42));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -29021,7 +29013,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -29038,7 +29030,7 @@ SUBPARTITION BY KEY(f_int2) SUBPARTITIONS 3
PARTITION part3 VALUES IN (NULL));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -29510,7 +29502,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@@ -29524,7 +29516,7 @@ f_charbig VARCHAR(1000)
PARTITION BY HASH(f_int1 + f_int2) PARTITIONS 2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -29996,7 +29988,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -30009,7 +30001,7 @@ f_charbig VARCHAR(1000)
PARTITION BY KEY(f_int1,f_int2) PARTITIONS 5;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -30481,7 +30473,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -30502,7 +30494,7 @@ PARTITION part2 VALUES IN (2),
PARTITION part3 VALUES IN (3));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -30974,7 +30966,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -30993,7 +30985,7 @@ PARTITION parte VALUES LESS THAN (20),
PARTITION partf VALUES LESS THAN (2147483646));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -31463,7 +31455,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -31480,7 +31472,7 @@ PARTITION partc VALUES LESS THAN (10),
PARTITION partd VALUES LESS THAN (2147483646));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -31950,7 +31942,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -31971,7 +31963,7 @@ PARTITION part4 VALUES LESS THAN (2147483646)
(SUBPARTITION subpart41, SUBPARTITION subpart42));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -32441,7 +32433,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -32462,7 +32454,7 @@ PARTITION part4 VALUES IN (NULL)
(SUBPARTITION sp41, SUBPARTITION sp42));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -32934,7 +32926,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -32951,7 +32943,7 @@ SUBPARTITION BY KEY(f_int2) SUBPARTITIONS 3
PARTITION part3 VALUES IN (NULL));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -33423,7 +33415,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@@ -33437,7 +33429,7 @@ f_charbig VARCHAR(1000)
PARTITION BY HASH(f_int1 + f_int2) PARTITIONS 2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -33925,7 +33917,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -33938,7 +33930,7 @@ f_charbig VARCHAR(1000)
PARTITION BY KEY(f_int1,f_int2) PARTITIONS 5;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -34426,7 +34418,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -34447,7 +34439,7 @@ PARTITION part2 VALUES IN (2),
PARTITION part3 VALUES IN (3));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -34935,7 +34927,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -34954,7 +34946,7 @@ PARTITION parte VALUES LESS THAN (20),
PARTITION partf VALUES LESS THAN (2147483646));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -35440,7 +35432,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -35457,7 +35449,7 @@ PARTITION partc VALUES LESS THAN (10),
PARTITION partd VALUES LESS THAN (2147483646));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -35943,7 +35935,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -35964,7 +35956,7 @@ PARTITION part4 VALUES LESS THAN (2147483646)
(SUBPARTITION subpart41, SUBPARTITION subpart42));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -36450,7 +36442,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -36471,7 +36463,7 @@ PARTITION part4 VALUES IN (NULL)
(SUBPARTITION sp41, SUBPARTITION sp42));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -36959,7 +36951,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -36976,7 +36968,7 @@ SUBPARTITION BY KEY(f_int2) SUBPARTITIONS 3
PARTITION part3 VALUES IN (NULL));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -37464,7 +37456,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP VIEW IF EXISTS v1;
DROP TABLE IF EXISTS t1;
diff --git a/mysql-test/suite/parts/r/partition_basic_myisam.result b/mysql-test/suite/parts/r/partition_basic_myisam.result
index 471eb4973f6..7e0d5bcd62a 100644
--- a/mysql-test/suite/parts/r/partition_basic_myisam.result
+++ b/mysql-test/suite/parts/r/partition_basic_myisam.result
@@ -2,14 +2,6 @@ SET @max_row = 20;
SET @@session.storage_engine = 'MyISAM';
#------------------------------------------------------------------------
-# There are several testcases disabled because of the open bugs
-# #15890
-# The expected results suffer from the following bugs
-# harmless #17455, #19305
-# which cannot be suppressed because of technical reasons.
-#------------------------------------------------------------------------
-
-#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables
# needed in many testcases
#------------------------------------------------------------------------
@@ -31,7 +23,7 @@ DROP TABLE IF EXISTS t0_definition;
CREATE TABLE t0_definition (
state CHAR(3),
create_command VARBINARY(5000),
-file_list VARBINARY(5000),
+file_list VARBINARY(10000),
PRIMARY KEY (state)
) ENGINE = MEMORY;
DROP TABLE IF EXISTS t0_aux;
@@ -61,7 +53,7 @@ SET @@session.sql_mode= '';
DROP TABLE IF EXISTS t1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -506,11 +498,11 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -961,11 +953,11 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -1422,11 +1414,11 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -1877,11 +1869,11 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -2338,11 +2330,11 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -2797,11 +2789,11 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -3258,11 +3250,11 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -3721,12 +3713,12 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# 1.1.1 with DATA DIECTORY/INDEX DIRECTORY
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -3736,7 +3728,7 @@ t1 CREATE TABLE `t1` (
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD
@@ -4167,37 +4159,37 @@ OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
state new
-Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par
state old
-Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p2.MYI
# check layout success: 0
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 repair status OK
state new
-Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par
state old
-Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p2.MYI
# check layout success: 0
TRUNCATE t1;
# check TRUNCATE success: 1
state new
-Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par
state old
-Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p2.MYI
# check layout success: 0
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -4207,7 +4199,7 @@ t1 CREATE TABLE `t1` (
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD
@@ -4650,37 +4642,37 @@ OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
state new
-Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par
state old
-Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p3.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p4.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p5.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p3.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p4.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p5.MYI
# check layout success: 0
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 repair status OK
state new
-Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par
state old
-Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p3.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p4.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p5.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p3.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p4.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p5.MYI
# check layout success: 0
TRUNCATE t1;
# check TRUNCATE success: 1
state new
-Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par
state old
-Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p3.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p4.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p5.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p3.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p4.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p5.MYI
# check layout success: 0
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -4690,7 +4682,7 @@ t1 CREATE TABLE `t1` (
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYD
@@ -5145,37 +5137,37 @@ OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
state new
-Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
File list MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par
state old
-Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
File list MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#part0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_3.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_N.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#part0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_3.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_N.MYI
# check layout success: 0
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 repair status OK
state new
-Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
File list MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par
state old
-Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
File list MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#part0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_3.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_N.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#part0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_3.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_N.MYI
# check layout success: 0
TRUNCATE t1;
# check TRUNCATE success: 1
state new
-Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
File list MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par
state old
-Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
File list MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#part0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_3.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_N.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#part0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_3.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_N.MYI
# check layout success: 0
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -5185,7 +5177,7 @@ t1 CREATE TABLE `t1` (
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYD
@@ -5630,37 +5622,37 @@ OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
state new
-Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par
state old
-Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#parta.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partb.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partc.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partd.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#parte.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partf.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#parta.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partb.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partd.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#parte.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partf.MYI
# check layout success: 0
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 repair status OK
state new
-Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par
state old
-Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#parta.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partb.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partc.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partd.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#parte.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partf.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#parta.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partb.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partd.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#parte.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partf.MYI
# check layout success: 0
TRUNCATE t1;
# check TRUNCATE success: 1
state new
-Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par
state old
-Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#parta.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partb.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partc.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partd.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#parte.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partf.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#parta.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partb.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partd.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#parte.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partf.MYI
# check layout success: 0
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -5670,7 +5662,7 @@ t1 CREATE TABLE `t1` (
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYD
@@ -6125,37 +6117,37 @@ OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
state new
-Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par
state old
-Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#parta#SP#partasp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#parta#SP#partasp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partb#SP#partbsp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partb#SP#partbsp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partc#SP#partcsp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partc#SP#partcsp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partd#SP#partdsp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partd#SP#partdsp1.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#parta#SP#partasp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#parta#SP#partasp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partb#SP#partbsp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partb#SP#partbsp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc#SP#partcsp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc#SP#partcsp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partd#SP#partdsp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partd#SP#partdsp1.MYI
# check layout success: 0
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 repair status OK
state new
-Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par
state old
-Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#parta#SP#partasp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#parta#SP#partasp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partb#SP#partbsp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partb#SP#partbsp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partc#SP#partcsp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partc#SP#partcsp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partd#SP#partdsp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partd#SP#partdsp1.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#parta#SP#partasp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#parta#SP#partasp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partb#SP#partbsp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partb#SP#partbsp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc#SP#partcsp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc#SP#partcsp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partd#SP#partdsp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partd#SP#partdsp1.MYI
# check layout success: 0
TRUNCATE t1;
# check TRUNCATE success: 1
state new
-Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par
state old
-Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#parta#SP#partasp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#parta#SP#partasp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partb#SP#partbsp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partb#SP#partbsp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partc#SP#partcsp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partc#SP#partcsp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partd#SP#partdsp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partd#SP#partdsp1.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#parta#SP#partasp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#parta#SP#partasp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partb#SP#partbsp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partb#SP#partbsp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc#SP#partcsp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc#SP#partcsp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partd#SP#partdsp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partd#SP#partdsp1.MYI
# check layout success: 0
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -6165,7 +6157,7 @@ t1 CREATE TABLE `t1` (
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD
@@ -6618,37 +6610,37 @@ OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
state new
-Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */
+Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */
File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par
state old
-Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */
+Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */
File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#subpart11.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#subpart12.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#subpart21.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#subpart22.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#subpart31.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#subpart32.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#subpart41.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#subpart42.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#subpart11.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#subpart12.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#subpart21.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#subpart22.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#subpart31.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#subpart32.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#subpart41.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#subpart42.MYI
# check layout success: 0
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 repair status OK
state new
-Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */
+Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */
File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par
state old
-Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */
+Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */
File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#subpart11.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#subpart12.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#subpart21.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#subpart22.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#subpart31.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#subpart32.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#subpart41.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#subpart42.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#subpart11.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#subpart12.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#subpart21.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#subpart22.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#subpart31.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#subpart32.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#subpart41.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#subpart42.MYI
# check layout success: 0
TRUNCATE t1;
# check TRUNCATE success: 1
state new
-Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */
+Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */
File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par
state old
-Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */
+Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */
File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#subpart11.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#subpart12.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#subpart21.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#subpart22.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#subpart31.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#subpart32.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#subpart41.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#subpart42.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#subpart11.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#subpart12.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#subpart21.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#subpart22.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#subpart31.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#subpart32.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#subpart41.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#subpart42.MYI
# check layout success: 0
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -6658,7 +6650,7 @@ t1 CREATE TABLE `t1` (
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */
+) ENGINE=MyISAM 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 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYD
@@ -7113,37 +7105,37 @@ OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
state new
-Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */
+Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM 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 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */
File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par
state old
-Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */
+Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM 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 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */
File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#sp11.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#sp12.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#sp21.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#sp22.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#sp31.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#sp32.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#sp41.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#sp42.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#sp11.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#sp12.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#sp21.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#sp22.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#sp31.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#sp32.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#sp41.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#sp42.MYI
# check layout success: 0
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 repair status OK
state new
-Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */
+Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM 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 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */
File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par
state old
-Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */
+Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM 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 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */
File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#sp11.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#sp12.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#sp21.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#sp22.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#sp31.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#sp32.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#sp41.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#sp42.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#sp11.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#sp12.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#sp21.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#sp22.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#sp31.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#sp32.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#sp41.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#sp42.MYI
# check layout success: 0
TRUNCATE t1;
# check TRUNCATE success: 1
state new
-Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */
+Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM 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 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */
File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par
state old
-Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */
+Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM 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 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */
File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#sp11.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#sp12.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#sp21.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#sp22.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#sp31.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#sp32.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#sp41.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#sp42.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#sp11.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#sp12.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#sp21.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#sp22.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#sp31.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#sp32.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#sp41.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#sp42.MYI
# check layout success: 0
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -7153,7 +7145,7 @@ t1 CREATE TABLE `t1` (
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYD
@@ -7612,38 +7604,38 @@ OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
state new
-Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par
state old
-Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#part1sp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#part1sp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#part1sp2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#part2sp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#part2sp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#part2sp2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#part3sp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#part3sp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#part3sp2.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#part1sp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#part1sp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#part1sp2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#part2sp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#part2sp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#part2sp2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#part3sp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#part3sp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#part3sp2.MYI
# check layout success: 0
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 repair status OK
state new
-Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par
state old
-Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#part1sp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#part1sp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#part1sp2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#part2sp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#part2sp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#part2sp2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#part3sp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#part3sp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#part3sp2.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#part1sp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#part1sp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#part1sp2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#part2sp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#part2sp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#part2sp2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#part3sp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#part3sp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#part3sp2.MYI
# check layout success: 0
TRUNCATE t1;
# check TRUNCATE success: 1
state new
-Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par
state old
-Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#part1sp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#part1sp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#part1sp2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#part2sp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#part2sp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#part2sp2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#part3sp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#part3sp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#part3sp2.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#part1sp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#part1sp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#part1sp2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#part2sp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#part2sp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#part2sp2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#part3sp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#part3sp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#part3sp2.MYI
# check layout success: 0
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -8088,11 +8080,11 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -8543,11 +8535,11 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -8557,7 +8549,7 @@ t1 CREATE TABLE `t1` (
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYD
@@ -9004,11 +8996,11 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -9018,7 +9010,7 @@ t1 CREATE TABLE `t1` (
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYD
@@ -9459,11 +9451,11 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -9473,7 +9465,7 @@ t1 CREATE TABLE `t1` (
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYD
@@ -9920,11 +9912,11 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -9934,7 +9926,7 @@ t1 CREATE TABLE `t1` (
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = MyISAM, SUBPARTITION subpart42 ENGINE = MyISAM)) */
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = MyISAM, SUBPARTITION subpart42 ENGINE = MyISAM)) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD
@@ -10379,11 +10371,11 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -10393,7 +10385,7 @@ t1 CREATE TABLE `t1` (
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */
+) ENGINE=MyISAM 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 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYD
@@ -10840,7 +10832,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# 1.2 The partitioning function contains two columns.
DROP TABLE IF EXISTS t1;
@@ -10855,7 +10847,7 @@ f_charbig VARCHAR(1000)
PARTITION BY HASH(f_int1 + f_int2) PARTITIONS 2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -11300,7 +11292,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -11313,7 +11305,7 @@ f_charbig VARCHAR(1000)
PARTITION BY KEY(f_int1,f_int2) PARTITIONS 5;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -11764,7 +11756,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -11785,7 +11777,7 @@ PARTITION part2 VALUES IN (2),
PARTITION part3 VALUES IN (3));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -12242,7 +12234,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -12261,7 +12253,7 @@ PARTITION parte VALUES LESS THAN (20),
PARTITION partf VALUES LESS THAN (2147483646));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -12712,7 +12704,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -12729,7 +12721,7 @@ PARTITION partc VALUES LESS THAN (10),
PARTITION partd VALUES LESS THAN (2147483646));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -13184,7 +13176,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -13205,7 +13197,7 @@ PARTITION part4 VALUES LESS THAN (2147483646)
(SUBPARTITION subpart41, SUBPARTITION subpart42));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -13660,7 +13652,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -13681,7 +13673,7 @@ PARTITION part4 VALUES IN (NULL)
(SUBPARTITION sp41, SUBPARTITION sp42));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -14138,7 +14130,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -14155,7 +14147,7 @@ SUBPARTITION BY KEY(f_int2) SUBPARTITIONS 3
PARTITION part3 VALUES IN (NULL));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -14614,7 +14606,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
#------------------------------------------------------------------------
# 2 Tables with PRIMARY KEY and/or UNIQUE INDEXes
@@ -14624,7 +14616,7 @@ DROP TABLE t1;
DROP TABLE IF EXISTS t1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -15122,11 +15114,11 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -15630,11 +15622,11 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -15646,7 +15638,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL,
UNIQUE KEY `uidx1` (`f_int1`,`f_int2`),
UNIQUE KEY `uidx2` (`f_int2`,`f_int1`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYD
@@ -16144,11 +16136,11 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -16160,7 +16152,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL,
UNIQUE KEY `uidx1` (`f_int1`,`f_int2`),
UNIQUE KEY `uidx2` (`f_int2`,`f_int1`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYD
@@ -16652,11 +16644,11 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -16668,7 +16660,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL,
UNIQUE KEY `uidx1` (`f_int1`,`f_int2`),
UNIQUE KEY `uidx2` (`f_int2`,`f_int1`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYD
@@ -17166,11 +17158,11 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -17182,7 +17174,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL,
UNIQUE KEY `uidx1` (`f_int1`,`f_int2`),
UNIQUE KEY `uidx2` (`f_int2`,`f_int1`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD
@@ -17678,11 +17670,11 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -17694,7 +17686,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL,
UNIQUE KEY `uidx1` (`f_int1`,`f_int2`),
UNIQUE KEY `uidx2` (`f_int2`,`f_int1`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */
+) ENGINE=MyISAM 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 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYD
@@ -18192,11 +18184,11 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -18208,7 +18200,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL,
UNIQUE KEY `uidx1` (`f_int1`,`f_int2`),
UNIQUE KEY `uidx2` (`f_int2`,`f_int1`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYD
@@ -18708,7 +18700,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
#------------------------------------------------------------------------
# 3 Tables with PRIMARY KEY and/or UNIQUE INDEXes
@@ -18727,7 +18719,7 @@ f_charbig VARCHAR(1000)
PARTITION BY HASH(f_int1 + f_int2) PARTITIONS 2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -19225,7 +19217,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -19238,7 +19230,7 @@ f_charbig VARCHAR(1000)
PARTITION BY KEY(f_int1,f_int2) PARTITIONS 5;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -19742,7 +19734,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -19763,7 +19755,7 @@ PARTITION part2 VALUES IN (2),
PARTITION part3 VALUES IN (3));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -20273,7 +20265,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -20292,7 +20284,7 @@ PARTITION parte VALUES LESS THAN (20),
PARTITION partf VALUES LESS THAN (2147483646));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -20796,7 +20788,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -20813,7 +20805,7 @@ PARTITION partc VALUES LESS THAN (10),
PARTITION partd VALUES LESS THAN (2147483646));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -21321,7 +21313,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -21342,7 +21334,7 @@ PARTITION part4 VALUES LESS THAN (2147483646)
(SUBPARTITION subpart41, SUBPARTITION subpart42));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -21850,7 +21842,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -21871,7 +21863,7 @@ PARTITION part4 VALUES IN (NULL)
(SUBPARTITION sp41, SUBPARTITION sp42));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -22381,7 +22373,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -22398,7 +22390,7 @@ SUBPARTITION BY KEY(f_int2) SUBPARTITIONS 3
PARTITION part3 VALUES IN (NULL));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -22910,7 +22902,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
DROP VIEW IF EXISTS v1;
DROP TABLE IF EXISTS t1;
diff --git a/mysql-test/suite/parts/r/partition_bit_myisam.result b/mysql-test/suite/parts/r/partition_bit_myisam.result
index 2bd1b1afd2c..e5b31e0c154 100644
--- a/mysql-test/suite/parts/r/partition_bit_myisam.result
+++ b/mysql-test/suite/parts/r/partition_bit_myisam.result
@@ -23,7 +23,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` bit(1) NOT NULL DEFAULT '\0',
PRIMARY KEY (`a`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!50100 PARTITION BY KEY (a) (PARTITION pa1 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
drop table t1;
create table t1 (a bit(64), primary key (a)) engine='MyISAM'
partition by key (a) partitions 2;
@@ -66,7 +66,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` bit(64) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0',
PRIMARY KEY (`a`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
insert into t1 values
(b'1111111111111111111111111111111111111111111111111111111111111111'),
(b'1000000000000000000000000000000000000000000000000000000000000000'),
diff --git a/mysql-test/suite/parts/r/partition_char_innodb.result b/mysql-test/suite/parts/r/partition_char_innodb.result
index 27399a0ad41..c9609537f08 100644
--- a/mysql-test/suite/parts/r/partition_char_innodb.result
+++ b/mysql-test/suite/parts/r/partition_char_innodb.result
@@ -1,3 +1,4 @@
+---- Partitioning and char data type
create table t1 (a char(255) not null, primary key(a)) engine='InnoDB'
partition by key (a) (
partition pa1 DATA DIRECTORY =
@@ -12,14 +13,12 @@ partition pa3 DATA DIRECTORY =
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
-Warnings:
-Warning 1266 Using storage engine MyISAM for table 't1'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` char(255) NOT NULL,
PRIMARY KEY (`a`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */
insert into t1 values (repeat('a',255)), ('b'), (repeat('a',128)), (repeat('b',64));
select * from t1;
a
@@ -40,14 +39,12 @@ bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
drop table t1;
create table t2 (a char(255) not null, primary key(a)) engine='InnoDB'
partition by key (a) partitions 27;
-Warnings:
-Warning 1266 Using storage engine MyISAM for table 't2'
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` char(255) NOT NULL,
PRIMARY KEY (`a`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 27 */
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 27 */
26 inserts;
insert into t2 values (repeat(char(ascii('a')+0),26+54));
insert into t2 values (repeat(char(ascii('a')+1),25+54));
@@ -107,6 +104,7 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
drop table t2;
+---- Partitioning and binary data type
create table t1 (a binary(255) not null, primary key(a)) engine='InnoDB'
partition by key (a) (
partition pa1 DATA DIRECTORY =
@@ -121,14 +119,12 @@ partition pa3 DATA DIRECTORY =
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
-Warnings:
-Warning 1266 Using storage engine MyISAM for table 't1'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` binary(255) NOT NULL,
PRIMARY KEY (`a`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */
insert into t1 values (repeat('a',255)), ('b'), (repeat('a',128)), (repeat('b',64));
select hex(a) from t1;
hex(a)
@@ -152,14 +148,12 @@ hex(a)
drop table t1;
create table t2 (a binary(255) not null, primary key(a)) engine='InnoDB'
partition by key (a) partitions 27;
-Warnings:
-Warning 1266 Using storage engine MyISAM for table 't2'
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` binary(255) NOT NULL,
PRIMARY KEY (`a`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 27 */
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 27 */
26 inserts;
insert into t2 values (repeat(char(ascii('a')+0),26+54));
insert into t2 values (repeat(char(ascii('a')+1),25+54));
@@ -219,157 +213,7 @@ hex(a)
797979797979797979797979797979797979797979797979797979797979797979797979797979797979797979797979797979797979797900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
drop table t2;
-create table t3 (a binary(255) not null, primary key(a)) engine='InnoDB'
-partition by range (ascii(a)) subpartition by key (a) subpartitions 4 (
-partition pa16 values less than (16),
-partition pa32 values less than (32),
-partition pa64 values less than (64),
-partition pa128 values less than (128),
-partition pa256 values less than (256)
-);
-Warnings:
-Warning 1266 Using storage engine MyISAM for table 't3'
-show create table t3;
-Table Create Table
-t3 CREATE TABLE `t3` (
- `a` binary(255) NOT NULL,
- PRIMARY KEY (`a`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (ascii(a)) SUBPARTITION BY KEY (a) SUBPARTITIONS 4 (PARTITION pa16 VALUES LESS THAN (16) ENGINE = MyISAM, PARTITION pa32 VALUES LESS THAN (32) ENGINE = MyISAM, PARTITION pa64 VALUES LESS THAN (64) ENGINE = MyISAM, PARTITION pa128 VALUES LESS THAN (128) ENGINE = MyISAM, PARTITION pa256 VALUES LESS THAN (256) ENGINE = MyISAM) */
-26 inserts;
-insert into t3 values (repeat(char(ascii('a')+0),26+54));
-insert into t3 values (repeat(char(ascii('a')+1),25+54));
-insert into t3 values (repeat(char(ascii('a')+2),24+54));
-insert into t3 values (repeat(char(ascii('a')+3),23+54));
-insert into t3 values (repeat(char(ascii('a')+4),22+54));
-insert into t3 values (repeat(char(ascii('a')+5),21+54));
-insert into t3 values (repeat(char(ascii('a')+6),20+54));
-insert into t3 values (repeat(char(ascii('a')+7),19+54));
-insert into t3 values (repeat(char(ascii('a')+8),18+54));
-insert into t3 values (repeat(char(ascii('a')+9),17+54));
-insert into t3 values (repeat(char(ascii('a')+10),16+54));
-insert into t3 values (repeat(char(ascii('a')+11),15+54));
-insert into t3 values (repeat(char(ascii('a')+12),14+54));
-insert into t3 values (repeat(char(ascii('a')+13),13+54));
-insert into t3 values (repeat(char(ascii('a')+14),12+54));
-insert into t3 values (repeat(char(ascii('a')+15),11+54));
-insert into t3 values (repeat(char(ascii('a')+16),10+54));
-insert into t3 values (repeat(char(ascii('a')+17),9+54));
-insert into t3 values (repeat(char(ascii('a')+18),8+54));
-insert into t3 values (repeat(char(ascii('a')+19),7+54));
-insert into t3 values (repeat(char(ascii('a')+20),6+54));
-insert into t3 values (repeat(char(ascii('a')+21),5+54));
-insert into t3 values (repeat(char(ascii('a')+22),4+54));
-insert into t3 values (repeat(char(ascii('a')+23),3+54));
-insert into t3 values (repeat(char(ascii('a')+24),2+54));
-insert into t3 values (repeat(char(ascii('a')+25),1+54));
-select count(*) from t3;
-count(*)
-26
-select hex(a) from t3;
-hex(a)
-616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262620000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868680000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474740000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-757575757575757575757575757575757575757575757575757575757575757575757575757575757575757575757575757575757575757575757575000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777770000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-797979797979797979797979797979797979797979797979797979797979797979797979797979797979797979797979797979797979797900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-drop table t3;
-create table t4 (a binary(255) not null, primary key(a)) engine='InnoDB'
-partition by list (ascii(a)) subpartition by key (a) subpartitions 4 (
-partition pa16 values in (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16),
-partition pa32 values in (17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32),
-partition pa64 values in (33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64),
-partition pa128 values in (65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128),
-partition pa256 values in (129,130,131,132,133,134,135,136,137,138,139,140
-,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256)
-);
-Warnings:
-Warning 1266 Using storage engine MyISAM for table 't4'
-show create table t4;
-Table Create Table
-t4 CREATE TABLE `t4` (
- `a` binary(255) NOT NULL,
- PRIMARY KEY (`a`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ascii(a)) SUBPARTITION BY KEY (a) SUBPARTITIONS 4 (PARTITION pa16 VALUES IN (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16) ENGINE = MyISAM, PARTITION pa32 VALUES IN (17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32) ENGINE = MyISAM, PARTITION pa64 VALUES IN (33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64) ENGINE = MyISAM, PARTITION pa128 VALUES IN (65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128) ENGINE = MyISAM, PARTITION pa256 VALUES IN (129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256) ENGINE = MyISAM) */
-26 inserts;
-insert into t4 values (repeat(char(ascii('a')+0),26+54));
-insert into t4 values (repeat(char(ascii('a')+1),25+54));
-insert into t4 values (repeat(char(ascii('a')+2),24+54));
-insert into t4 values (repeat(char(ascii('a')+3),23+54));
-insert into t4 values (repeat(char(ascii('a')+4),22+54));
-insert into t4 values (repeat(char(ascii('a')+5),21+54));
-insert into t4 values (repeat(char(ascii('a')+6),20+54));
-insert into t4 values (repeat(char(ascii('a')+7),19+54));
-insert into t4 values (repeat(char(ascii('a')+8),18+54));
-insert into t4 values (repeat(char(ascii('a')+9),17+54));
-insert into t4 values (repeat(char(ascii('a')+10),16+54));
-insert into t4 values (repeat(char(ascii('a')+11),15+54));
-insert into t4 values (repeat(char(ascii('a')+12),14+54));
-insert into t4 values (repeat(char(ascii('a')+13),13+54));
-insert into t4 values (repeat(char(ascii('a')+14),12+54));
-insert into t4 values (repeat(char(ascii('a')+15),11+54));
-insert into t4 values (repeat(char(ascii('a')+16),10+54));
-insert into t4 values (repeat(char(ascii('a')+17),9+54));
-insert into t4 values (repeat(char(ascii('a')+18),8+54));
-insert into t4 values (repeat(char(ascii('a')+19),7+54));
-insert into t4 values (repeat(char(ascii('a')+20),6+54));
-insert into t4 values (repeat(char(ascii('a')+21),5+54));
-insert into t4 values (repeat(char(ascii('a')+22),4+54));
-insert into t4 values (repeat(char(ascii('a')+23),3+54));
-insert into t4 values (repeat(char(ascii('a')+24),2+54));
-insert into t4 values (repeat(char(ascii('a')+25),1+54));
-select count(*) from t4;
-count(*)
-26
-select hex(a) from t4;
-hex(a)
-616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262620000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868680000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474740000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-757575757575757575757575757575757575757575757575757575757575757575757575757575757575757575757575757575757575757575757575000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777770000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-797979797979797979797979797979797979797979797979797979797979797979797979797979797979797979797979797979797979797900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-drop table t4;
+---- Partitioning and varchar data type
create table t1 (a varchar(767) not null, primary key(a)) engine='InnoDB'
partition by key (a) (
partition pa1 DATA DIRECTORY =
@@ -384,14 +228,12 @@ partition pa3 DATA DIRECTORY =
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
-Warnings:
-Warning 1266 Using storage engine MyISAM for table 't1'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(767) NOT NULL,
PRIMARY KEY (`a`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */
insert into t1 values (repeat('a',767)), ('b'), (repeat('a',500)), (repeat('b',64));
select * from t1;
a
@@ -412,14 +254,12 @@ bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
drop table t1;
create table t2 (a varchar(767) not null, primary key(a)) engine='InnoDB'
partition by key (a) partitions 27;
-Warnings:
-Warning 1266 Using storage engine MyISAM for table 't2'
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` varchar(767) NOT NULL,
PRIMARY KEY (`a`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 27 */
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 27 */
26 inserts;
insert into t2 values (repeat(char(ascii('a')+0),26*26));
insert into t2 values (repeat(char(ascii('a')+1),25*25));
@@ -479,6 +319,7 @@ xxxxxxxxx
yyyy
z
drop table t2;
+---- Partitioning and varbinary data type
create table t1 (a varbinary(767) not null, primary key(a)) engine='InnoDB'
partition by key (a) (
partition pa1 DATA DIRECTORY =
@@ -493,14 +334,12 @@ partition pa3 DATA DIRECTORY =
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
-Warnings:
-Warning 1266 Using storage engine MyISAM for table 't1'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varbinary(767) NOT NULL,
PRIMARY KEY (`a`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */
insert into t1 values (repeat('a',767)), ('b'), (repeat('a',500)), (repeat('b',64));
select * from t1;
a
@@ -521,14 +360,12 @@ bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
drop table t1;
create table t2 (a varbinary(767) not null, primary key(a)) engine='InnoDB'
partition by key (a) partitions 30;
-Warnings:
-Warning 1266 Using storage engine MyISAM for table 't2'
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` varbinary(767) NOT NULL,
PRIMARY KEY (`a`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 30 */
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 30 */
26 inserts;
insert into t2 values (repeat(char(ascii('a')+0),26*26));
insert into t2 values (repeat(char(ascii('a')+1),25*25));
@@ -588,6 +425,7 @@ xxxxxxxxx
yyyy
z
drop table t2;
+---- Partitioning and enum data type
create table t1 (a enum('A','B','C','D','E','F','G','H','I','J','K','L') not null, primary key(a)) engine='InnoDB'
partition by key (a) (
partition pa1 DATA DIRECTORY =
@@ -602,14 +440,12 @@ partition pa3 DATA DIRECTORY =
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
-Warnings:
-Warning 1266 Using storage engine MyISAM for table 't1'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` enum('A','B','C','D','E','F','G','H','I','J','K','L') NOT NULL,
PRIMARY KEY (`a`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */
insert into t1 values ('A'),('D'),('L'),('G');
select * from t1;
a
@@ -641,14 +477,12 @@ create table t2 (a enum (
'Y','Z'
) not null, primary key(a)) engine='InnoDB'
partition by key (a) partitions 27;
-Warnings:
-Warning 1266 Using storage engine MyISAM for table 't2'
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` enum('1','2','3','4','5','6','7','8','9','0','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z') NOT NULL,
PRIMARY KEY (`a`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 27 */
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 27 */
0 inserts;
insert into t2 values (char(ascii('A')+26));
Warnings:
@@ -721,60 +555,7 @@ X
Y
Z
drop table t2;
-create table t3 (a enum (
-'1','2','3','4','5','6','7','8','9','0',
-'A','B','C','D','E','F','G','H','I','J','K','L',
-'M','N','O','P','Q','R','S','T','U','V','W','X',
-'Y','Z'
-) not null, primary key(a)) engine='InnoDB'
-partition by range (cast(a as unsigned)) subpartition by key (a) subpartitions 3 (
-partition pa9 values less than (10),
-partition pa18 values less than (19),
-partition pa27 values less than (28),
-partition pa36 values less than (37)
-);
-Warnings:
-Warning 1266 Using storage engine MyISAM for table 't3'
-show create table t3;
-Table Create Table
-t3 CREATE TABLE `t3` (
- `a` enum('1','2','3','4','5','6','7','8','9','0','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z') NOT NULL,
- PRIMARY KEY (`a`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (cast(a as unsigned)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION pa9 VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION pa18 VALUES LESS THAN (19) ENGINE = MyISAM, PARTITION pa27 VALUES LESS THAN (28) ENGINE = MyISAM, PARTITION pa36 VALUES LESS THAN (37) ENGINE = MyISAM) */
-0 inserts;
-select count(*) from t3;
-count(*)
-0
-select * from t3;
-a
-drop table t3;
-create table t4 (a enum (
-'1','2','3','4','5','6','7','8','9','0',
-'A','B','C','D','E','F','G','H','I','J','K','L',
-'M','N','O','P','Q','R','S','T','U','V','W','X',
-'Y','Z'
-) not null, primary key(a)) engine='InnoDB'
-partition by list (cast(a as unsigned)) subpartition by key (a) subpartitions 3 (
-partition pa9 values in (1,2,3,4,5,6,7,8,9),
-partition pa18 values in (10,11,12,13,14,15,16,17,18),
-partition pa27 values in (19,20,21,22,23,24,25,26,27),
-partition pa36 values in (28,29,30,31,32,33,34,35,36)
-);
-Warnings:
-Warning 1266 Using storage engine MyISAM for table 't4'
-show create table t4;
-Table Create Table
-t4 CREATE TABLE `t4` (
- `a` enum('1','2','3','4','5','6','7','8','9','0','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z') NOT NULL,
- PRIMARY KEY (`a`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (cast(a as unsigned)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION pa9 VALUES IN (1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, PARTITION pa18 VALUES IN (10,11,12,13,14,15,16,17,18) ENGINE = MyISAM, PARTITION pa27 VALUES IN (19,20,21,22,23,24,25,26,27) ENGINE = MyISAM, PARTITION pa36 VALUES IN (28,29,30,31,32,33,34,35,36) ENGINE = MyISAM) */
-0 inserts;
-select count(*) from t4;
-count(*)
-0
-select * from t4;
-a
-drop table t4;
+---- Partitioning and set data type
create table t1 (a set('A','B','C','D','E','F','G','H','I','J','K','L') not null, primary key(a)) engine='InnoDB'
partition by key (a) (
partition pa1 DATA DIRECTORY =
@@ -789,14 +570,12 @@ partition pa3 DATA DIRECTORY =
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
-Warnings:
-Warning 1266 Using storage engine MyISAM for table 't1'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` set('A','B','C','D','E','F','G','H','I','J','K','L') NOT NULL,
PRIMARY KEY (`a`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */
insert into t1 values ('A,B'),('C,D'),('E,L'),('G,H,K');
select * from t1 order by a;
a
@@ -828,14 +607,12 @@ create table t2 (a set (
'Y','Z'
) not null, primary key(a)) engine='InnoDB'
partition by key (a) partitions 27;
-Warnings:
-Warning 1266 Using storage engine MyISAM for table 't2'
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` set('1','2','3','4','5','6','7','8','9','0','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z') NOT NULL,
PRIMARY KEY (`a`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 27 */
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 27 */
insert into t2 values ('A'),('B'),('C'),('D'),('E'),('F'),('G'),('H'),('I'),('K'),('L'),('M'),('N'),('O'),('P'),('Q'),('S'),('T'),('U'),('V'),('X'),('Y'),('Z');
insert into t2 values ('A,B'),('B,C'),('C,D'),('D,E'),('E,F'),('F,G'),('G,H'),('H,I'),('I,J'),('K,L'),('L,M'),('M,N'),('N,O'),('O,P'),('P,Q'),('Q,R'),('S,T'),('T,U'),('U,V'),('V,W'),('X,Y'),('Y,Z'),('Z,A');
insert into t2 values ('A,B,C'),('B,C,D'),('C,D,E'),('D,E,F'),('E,F,G'),('F,G,H'),('G,H,I'),('H,I,J'),('I,J,K'),('K,L,M'),('L,M,N'),('M,N,O'),('N,O,P'),('O,P,Q'),('P,Q,R'),('Q,R,S'),('S,T,U'),('T,U,V'),('U,V,W'),('V,W,X'),('X,Y,Z'),('Y,Z,A'),('Z,A,B');
@@ -947,56 +724,7 @@ Y,Z
A,Y,Z
X,Y,Z
drop table t2;
-create table t3 (a set (
-'1','2','3','4','5','6','7','8','9','0'
-) not null, primary key(a)) engine='InnoDB'
-partition by range (cast(a as unsigned)) subpartition by key (a) subpartitions 3 (
-partition pa9 values less than (10),
-partition pa18 values less than (19),
-partition pa27 values less than (28),
-partition pa36 values less than (37),
-partition pa64 values less than (65),
-partition pa128 values less than (129),
-partition pa256 values less than (257),
-partition pa512 values less than (513),
-partition pa768 values less than (769),
-partition pa1024 values less than (1025)
-);
-Warnings:
-Warning 1266 Using storage engine MyISAM for table 't3'
-show create table t3;
-Table Create Table
-t3 CREATE TABLE `t3` (
- `a` set('1','2','3','4','5','6','7','8','9','0') NOT NULL,
- PRIMARY KEY (`a`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (cast(a as unsigned)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION pa9 VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION pa18 VALUES LESS THAN (19) ENGINE = MyISAM, PARTITION pa27 VALUES LESS THAN (28) ENGINE = MyISAM, PARTITION pa36 VALUES LESS THAN (37) ENGINE = MyISAM, PARTITION pa64 VALUES LESS THAN (65) ENGINE = MyISAM, PARTITION pa128 VALUES LESS THAN (129) ENGINE = MyISAM, PARTITION pa256 VALUES LESS THAN (257) ENGINE = MyISAM, PARTITION pa512 VALUES LESS THAN (513) ENGINE = MyISAM, PARTITION pa768 VALUES LESS THAN (769) ENGINE = MyISAM, PARTITION pa1024 VALUES LESS THAN (1025) ENGINE = MyISAM) */
-select count(*) from t3;
-count(*)
-0
-select * from t3 order by a;
-a
-drop table t3;
-create table t4 (a set (
-'1','2','3') not null, primary key(a)) engine='InnoDB'
-partition by list (cast(a as unsigned)) subpartition by key (a) subpartitions 3 (
-partition pa9 values in (1,2,3,4,5,6,7,8,9),
-partition pa18 values in (10,11,12,13,14,15,16,17,18),
-partition pa27 values in (19,20,21,22,23,24,25,26,27)
-);
-Warnings:
-Warning 1266 Using storage engine MyISAM for table 't4'
-show create table t4;
-Table Create Table
-t4 CREATE TABLE `t4` (
- `a` set('1','2','3') NOT NULL,
- PRIMARY KEY (`a`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (cast(a as unsigned)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION pa9 VALUES IN (1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, PARTITION pa18 VALUES IN (10,11,12,13,14,15,16,17,18) ENGINE = MyISAM, PARTITION pa27 VALUES IN (19,20,21,22,23,24,25,26,27) ENGINE = MyISAM) */
-select count(*) from t4;
-count(*)
-0
-select * from t4 order by a;
-a
-drop table t4;
+---- Partitioning and blob data type
create table t1 (a blob not null, primary key(a(767))) engine='InnoDB'
partition by key (a) (
partition pa1 DATA DIRECTORY =
@@ -1024,6 +752,7 @@ ERROR HY000: A BLOB field is not allowed in partition function
create table t2 (a longblob not null, primary key(a(767))) engine='InnoDB'
partition by key (a) partitions 30;
ERROR HY000: A BLOB field is not allowed in partition function
+---- Partitioning and text data type
create table t1 (a text not null, primary key(a(767))) engine='InnoDB'
partition by key (a) (
partition pa1 DATA DIRECTORY =
diff --git a/mysql-test/suite/parts/r/partition_char_myisam.result b/mysql-test/suite/parts/r/partition_char_myisam.result
index 514b2dba1bf..1009f52348d 100644
--- a/mysql-test/suite/parts/r/partition_char_myisam.result
+++ b/mysql-test/suite/parts/r/partition_char_myisam.result
@@ -1,5 +1,6 @@
-create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w'), primary key(a,b,c,d)) engine='MyISAM'
-partition by key (a,b,c,d) (
+---- Partitioning and char data type
+create table t1 (a char(255) not null, primary key(a)) engine='MyISAM'
+partition by key (a) (
partition pa1 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=20 min_rows=2,
@@ -15,26 +16,764 @@ partition pa4 DATA DIRECTORY =
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` date NOT NULL,
- `b` varchar(50) NOT NULL,
- `c` varchar(50) NOT NULL,
- `d` enum('m','w') NOT NULL DEFAULT 'm',
- PRIMARY KEY (`a`,`b`,`c`,`d`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!50100 PARTITION BY KEY (a,b,c,d) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
-insert into t1 values
-('1975-01-01', 'abcde', 'abcde','m'),
-('1983-12-31', 'cdef', 'srtbvsr', 'w'),
-('1980-10-14', 'fgbbd', 'dtzndtz', 'w'),
-('2000-06-15', 'jukg','zikhuk','m');
-select * from t1;
-a b c d
-1975-01-01 abcde abcde m
-1980-10-14 fgbbd dtzndtz w
-1983-12-31 cdef srtbvsr w
-2000-06-15 jukg zikhuk m
-select * from t1 where a<19851231;
-a b c d
-1975-01-01 abcde abcde m
-1980-10-14 fgbbd dtzndtz w
-1983-12-31 cdef srtbvsr w
+ `a` char(255) NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
+insert into t1 values (repeat('a',255)), ('b'), (repeat('a',128)), (repeat('b',64));
+select * from t1;
+a
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+b
+bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+select * from t1 where a='b';
+a
+b
+update t1 set a='bb' where a='b';
+delete from t1 where a='bb';
+select * from t1;
+a
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+drop table t1;
+create table t2 (a char(255) not null, primary key(a)) engine='MyISAM'
+partition by key (a) partitions 27;
+show create table t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` char(255) NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 27 */
+26 inserts;
+insert into t2 values (repeat(char(ascii('a')+0),26+54));
+insert into t2 values (repeat(char(ascii('a')+1),25+54));
+insert into t2 values (repeat(char(ascii('a')+2),24+54));
+insert into t2 values (repeat(char(ascii('a')+3),23+54));
+insert into t2 values (repeat(char(ascii('a')+4),22+54));
+insert into t2 values (repeat(char(ascii('a')+5),21+54));
+insert into t2 values (repeat(char(ascii('a')+6),20+54));
+insert into t2 values (repeat(char(ascii('a')+7),19+54));
+insert into t2 values (repeat(char(ascii('a')+8),18+54));
+insert into t2 values (repeat(char(ascii('a')+9),17+54));
+insert into t2 values (repeat(char(ascii('a')+10),16+54));
+insert into t2 values (repeat(char(ascii('a')+11),15+54));
+insert into t2 values (repeat(char(ascii('a')+12),14+54));
+insert into t2 values (repeat(char(ascii('a')+13),13+54));
+insert into t2 values (repeat(char(ascii('a')+14),12+54));
+insert into t2 values (repeat(char(ascii('a')+15),11+54));
+insert into t2 values (repeat(char(ascii('a')+16),10+54));
+insert into t2 values (repeat(char(ascii('a')+17),9+54));
+insert into t2 values (repeat(char(ascii('a')+18),8+54));
+insert into t2 values (repeat(char(ascii('a')+19),7+54));
+insert into t2 values (repeat(char(ascii('a')+20),6+54));
+insert into t2 values (repeat(char(ascii('a')+21),5+54));
+insert into t2 values (repeat(char(ascii('a')+22),4+54));
+insert into t2 values (repeat(char(ascii('a')+23),3+54));
+insert into t2 values (repeat(char(ascii('a')+24),2+54));
+insert into t2 values (repeat(char(ascii('a')+25),1+54));
+select count(*) from t2;
+count(*)
+26
+select * from t2;
+a
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
+eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
+fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
+kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
+lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
+mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
+nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
+oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
+ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp
+qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
+rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
+ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
+ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt
+uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu
+vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
+wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
+zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
+drop table t2;
+---- Partitioning and binary data type
+create table t1 (a binary(255) not null, primary key(a)) engine='MyISAM'
+partition by key (a) (
+partition pa1 DATA DIRECTORY =
+'/tmp' INDEX DIRECTORY =
+'/tmp' max_rows=20 min_rows=2,
+partition pa2 DATA DIRECTORY =
+'/tmp' INDEX DIRECTORY =
+'/tmp' max_rows=30 min_rows=3,
+partition pa3 DATA DIRECTORY =
+'/tmp' INDEX DIRECTORY =
+'/tmp' max_rows=30 min_rows=4,
+partition pa4 DATA DIRECTORY =
+'/tmp' INDEX DIRECTORY =
+'/tmp' max_rows=40 min_rows=2);
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` binary(255) NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
+insert into t1 values (repeat('a',255)), ('b'), (repeat('a',128)), (repeat('b',64));
+select hex(a) from t1;
+hex(a)
+616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161
+620000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262620000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+select a from t1 where substr(a,1,2)='b\0';
+a
+b
+update t1 set a='cc' where substr(a,1,2)= 'b\0';
+select a from t1 where substr(a,1,1)='c';
+a
+cc
+delete from t1 where substr(a,1,2)='cc';
+select hex(a) from t1;
+hex(a)
+616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161
+626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262620000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+drop table t1;
+create table t2 (a binary(255) not null, primary key(a)) engine='MyISAM'
+partition by key (a) partitions 27;
+show create table t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` binary(255) NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 27 */
+26 inserts;
+insert into t2 values (repeat(char(ascii('a')+0),26+54));
+insert into t2 values (repeat(char(ascii('a')+1),25+54));
+insert into t2 values (repeat(char(ascii('a')+2),24+54));
+insert into t2 values (repeat(char(ascii('a')+3),23+54));
+insert into t2 values (repeat(char(ascii('a')+4),22+54));
+insert into t2 values (repeat(char(ascii('a')+5),21+54));
+insert into t2 values (repeat(char(ascii('a')+6),20+54));
+insert into t2 values (repeat(char(ascii('a')+7),19+54));
+insert into t2 values (repeat(char(ascii('a')+8),18+54));
+insert into t2 values (repeat(char(ascii('a')+9),17+54));
+insert into t2 values (repeat(char(ascii('a')+10),16+54));
+insert into t2 values (repeat(char(ascii('a')+11),15+54));
+insert into t2 values (repeat(char(ascii('a')+12),14+54));
+insert into t2 values (repeat(char(ascii('a')+13),13+54));
+insert into t2 values (repeat(char(ascii('a')+14),12+54));
+insert into t2 values (repeat(char(ascii('a')+15),11+54));
+insert into t2 values (repeat(char(ascii('a')+16),10+54));
+insert into t2 values (repeat(char(ascii('a')+17),9+54));
+insert into t2 values (repeat(char(ascii('a')+18),8+54));
+insert into t2 values (repeat(char(ascii('a')+19),7+54));
+insert into t2 values (repeat(char(ascii('a')+20),6+54));
+insert into t2 values (repeat(char(ascii('a')+21),5+54));
+insert into t2 values (repeat(char(ascii('a')+22),4+54));
+insert into t2 values (repeat(char(ascii('a')+23),3+54));
+insert into t2 values (repeat(char(ascii('a')+24),2+54));
+insert into t2 values (repeat(char(ascii('a')+25),1+54));
+select count(*) from t2;
+count(*)
+26
+select hex(a) from t2;
+hex(a)
+616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262620000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868680000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474740000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+757575757575757575757575757575757575757575757575757575757575757575757575757575757575757575757575757575757575757575757575000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777770000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+797979797979797979797979797979797979797979797979797979797979797979797979797979797979797979797979797979797979797900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+drop table t2;
+---- Partitioning and varchar data type
+create table t1 (a varchar(767) not null, primary key(a)) engine='MyISAM'
+partition by key (a) (
+partition pa1 DATA DIRECTORY =
+'/tmp' INDEX DIRECTORY =
+'/tmp' max_rows=20 min_rows=2,
+partition pa2 DATA DIRECTORY =
+'/tmp' INDEX DIRECTORY =
+'/tmp' max_rows=30 min_rows=3,
+partition pa3 DATA DIRECTORY =
+'/tmp' INDEX DIRECTORY =
+'/tmp' max_rows=30 min_rows=4,
+partition pa4 DATA DIRECTORY =
+'/tmp' INDEX DIRECTORY =
+'/tmp' max_rows=40 min_rows=2);
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(767) NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
+insert into t1 values (repeat('a',767)), ('b'), (repeat('a',500)), (repeat('b',64));
+select * from t1;
+a
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+b
+bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+select * from t1 where a='b';
+a
+b
+update t1 set a='bb' where a='b';
+delete from t1 where a='bb';
+select * from t1;
+a
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+drop table t1;
+create table t2 (a varchar(767) not null, primary key(a)) engine='MyISAM'
+partition by key (a) partitions 27;
+show create table t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` varchar(767) NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 27 */
+26 inserts;
+insert into t2 values (repeat(char(ascii('a')+0),26*26));
+insert into t2 values (repeat(char(ascii('a')+1),25*25));
+insert into t2 values (repeat(char(ascii('a')+2),24*24));
+insert into t2 values (repeat(char(ascii('a')+3),23*23));
+insert into t2 values (repeat(char(ascii('a')+4),22*22));
+insert into t2 values (repeat(char(ascii('a')+5),21*21));
+insert into t2 values (repeat(char(ascii('a')+6),20*20));
+insert into t2 values (repeat(char(ascii('a')+7),19*19));
+insert into t2 values (repeat(char(ascii('a')+8),18*18));
+insert into t2 values (repeat(char(ascii('a')+9),17*17));
+insert into t2 values (repeat(char(ascii('a')+10),16*16));
+insert into t2 values (repeat(char(ascii('a')+11),15*15));
+insert into t2 values (repeat(char(ascii('a')+12),14*14));
+insert into t2 values (repeat(char(ascii('a')+13),13*13));
+insert into t2 values (repeat(char(ascii('a')+14),12*12));
+insert into t2 values (repeat(char(ascii('a')+15),11*11));
+insert into t2 values (repeat(char(ascii('a')+16),10*10));
+insert into t2 values (repeat(char(ascii('a')+17),9*9));
+insert into t2 values (repeat(char(ascii('a')+18),8*8));
+insert into t2 values (repeat(char(ascii('a')+19),7*7));
+insert into t2 values (repeat(char(ascii('a')+20),6*6));
+insert into t2 values (repeat(char(ascii('a')+21),5*5));
+insert into t2 values (repeat(char(ascii('a')+22),4*4));
+insert into t2 values (repeat(char(ascii('a')+23),3*3));
+insert into t2 values (repeat(char(ascii('a')+24),2*2));
+insert into t2 values (repeat(char(ascii('a')+25),1*1));
+select count(*) from t2;
+count(*)
+26
+select * from t2;
+a
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
+eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
+fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
+kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
+lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
+mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
+nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
+oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
+ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp
+qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
+rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
+ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
+ttttttttttttttttttttttttttttttttttttttttttttttttt
+uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu
+vvvvvvvvvvvvvvvvvvvvvvvvv
+wwwwwwwwwwwwwwww
+xxxxxxxxx
+yyyy
+z
+drop table t2;
+---- Partitioning and varbinary data type
+create table t1 (a varbinary(767) not null, primary key(a)) engine='MyISAM'
+partition by key (a) (
+partition pa1 DATA DIRECTORY =
+'/tmp' INDEX DIRECTORY =
+'/tmp' max_rows=20 min_rows=2,
+partition pa2 DATA DIRECTORY =
+'/tmp' INDEX DIRECTORY =
+'/tmp' max_rows=30 min_rows=3,
+partition pa3 DATA DIRECTORY =
+'/tmp' INDEX DIRECTORY =
+'/tmp' max_rows=30 min_rows=4,
+partition pa4 DATA DIRECTORY =
+'/tmp' INDEX DIRECTORY =
+'/tmp' max_rows=40 min_rows=2);
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varbinary(767) NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
+insert into t1 values (repeat('a',767)), ('b'), (repeat('a',500)), (repeat('b',64));
+select * from t1;
+a
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+b
+bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+select * from t1 where a='b';
+a
+b
+update t1 set a='bb' where a='b';
+delete from t1 where a='bb';
+select * from t1;
+a
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
drop table t1;
+create table t2 (a varbinary(767) not null, primary key(a)) engine='MyISAM'
+partition by key (a) partitions 30;
+show create table t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` varbinary(767) NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 30 */
+26 inserts;
+insert into t2 values (repeat(char(ascii('a')+0),26*26));
+insert into t2 values (repeat(char(ascii('a')+1),25*25));
+insert into t2 values (repeat(char(ascii('a')+2),24*24));
+insert into t2 values (repeat(char(ascii('a')+3),23*23));
+insert into t2 values (repeat(char(ascii('a')+4),22*22));
+insert into t2 values (repeat(char(ascii('a')+5),21*21));
+insert into t2 values (repeat(char(ascii('a')+6),20*20));
+insert into t2 values (repeat(char(ascii('a')+7),19*19));
+insert into t2 values (repeat(char(ascii('a')+8),18*18));
+insert into t2 values (repeat(char(ascii('a')+9),17*17));
+insert into t2 values (repeat(char(ascii('a')+10),16*16));
+insert into t2 values (repeat(char(ascii('a')+11),15*15));
+insert into t2 values (repeat(char(ascii('a')+12),14*14));
+insert into t2 values (repeat(char(ascii('a')+13),13*13));
+insert into t2 values (repeat(char(ascii('a')+14),12*12));
+insert into t2 values (repeat(char(ascii('a')+15),11*11));
+insert into t2 values (repeat(char(ascii('a')+16),10*10));
+insert into t2 values (repeat(char(ascii('a')+17),9*9));
+insert into t2 values (repeat(char(ascii('a')+18),8*8));
+insert into t2 values (repeat(char(ascii('a')+19),7*7));
+insert into t2 values (repeat(char(ascii('a')+20),6*6));
+insert into t2 values (repeat(char(ascii('a')+21),5*5));
+insert into t2 values (repeat(char(ascii('a')+22),4*4));
+insert into t2 values (repeat(char(ascii('a')+23),3*3));
+insert into t2 values (repeat(char(ascii('a')+24),2*2));
+insert into t2 values (repeat(char(ascii('a')+25),1*1));
+select count(*) from t2;
+count(*)
+26
+select * from t2;
+a
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
+eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
+fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
+kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
+lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
+mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
+nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
+oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
+ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp
+qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
+rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
+ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
+ttttttttttttttttttttttttttttttttttttttttttttttttt
+uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu
+vvvvvvvvvvvvvvvvvvvvvvvvv
+wwwwwwwwwwwwwwww
+xxxxxxxxx
+yyyy
+z
+drop table t2;
+---- Partitioning and enum data type
+create table t1 (a enum('A','B','C','D','E','F','G','H','I','J','K','L') not null, primary key(a)) engine='MyISAM'
+partition by key (a) (
+partition pa1 DATA DIRECTORY =
+'/tmp' INDEX DIRECTORY =
+'/tmp' max_rows=20 min_rows=2,
+partition pa2 DATA DIRECTORY =
+'/tmp' INDEX DIRECTORY =
+'/tmp' max_rows=30 min_rows=3,
+partition pa3 DATA DIRECTORY =
+'/tmp' INDEX DIRECTORY =
+'/tmp' max_rows=30 min_rows=4,
+partition pa4 DATA DIRECTORY =
+'/tmp' INDEX DIRECTORY =
+'/tmp' max_rows=40 min_rows=2);
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` enum('A','B','C','D','E','F','G','H','I','J','K','L') NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
+insert into t1 values ('A'),('D'),('L'),('G');
+select * from t1;
+a
+A
+D
+G
+L
+select * from t1 where a='A';
+a
+A
+update t1 set a='E' where a='L';
+select * from t1;
+a
+A
+D
+E
+G
+delete from t1 where a='E';
+select * from t1;
+a
+A
+D
+G
+drop table t1;
+create table t2 (a enum (
+'1','2','3','4','5','6','7','8','9','0',
+'A','B','C','D','E','F','G','H','I','J','K','L',
+'M','N','O','P','Q','R','S','T','U','V','W','X',
+'Y','Z'
+) not null, primary key(a)) engine='MyISAM'
+partition by key (a) partitions 27;
+show create table t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` enum('1','2','3','4','5','6','7','8','9','0','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z') NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 27 */
+0 inserts;
+insert into t2 values (char(ascii('A')+26));
+Warnings:
+Warning 1265 Data truncated for column 'a' at row 1
+insert into t2 values (char(ascii('A')+25));
+insert into t2 values (char(ascii('A')+24));
+insert into t2 values (char(ascii('A')+23));
+insert into t2 values (char(ascii('A')+22));
+insert into t2 values (char(ascii('A')+21));
+insert into t2 values (char(ascii('A')+20));
+insert into t2 values (char(ascii('A')+19));
+insert into t2 values (char(ascii('A')+18));
+insert into t2 values (char(ascii('A')+17));
+insert into t2 values (char(ascii('A')+16));
+insert into t2 values (char(ascii('A')+15));
+insert into t2 values (char(ascii('A')+14));
+insert into t2 values (char(ascii('A')+13));
+insert into t2 values (char(ascii('A')+12));
+insert into t2 values (char(ascii('A')+11));
+insert into t2 values (char(ascii('A')+10));
+insert into t2 values (char(ascii('A')+9));
+insert into t2 values (char(ascii('A')+8));
+insert into t2 values (char(ascii('A')+7));
+insert into t2 values (char(ascii('A')+6));
+insert into t2 values (char(ascii('A')+5));
+insert into t2 values (char(ascii('A')+4));
+insert into t2 values (char(ascii('A')+3));
+insert into t2 values (char(ascii('A')+2));
+insert into t2 values (char(ascii('A')+1));
+insert into t2 values ('1'),('2'),('3'),('4'),('5'),('6'),('7'),('8'),('9'),('0');
+select count(*) from t2;
+count(*)
+36
+select * from t2;
+a
+
+1
+2
+3
+4
+5
+6
+7
+8
+9
+0
+B
+C
+D
+E
+F
+G
+H
+I
+J
+K
+L
+M
+N
+O
+P
+Q
+R
+S
+T
+U
+V
+W
+X
+Y
+Z
+drop table t2;
+---- Partitioning and set data type
+create table t1 (a set('A','B','C','D','E','F','G','H','I','J','K','L') not null, primary key(a)) engine='MyISAM'
+partition by key (a) (
+partition pa1 DATA DIRECTORY =
+'/tmp' INDEX DIRECTORY =
+'/tmp' max_rows=20 min_rows=2,
+partition pa2 DATA DIRECTORY =
+'/tmp' INDEX DIRECTORY =
+'/tmp' max_rows=30 min_rows=3,
+partition pa3 DATA DIRECTORY =
+'/tmp' INDEX DIRECTORY =
+'/tmp' max_rows=30 min_rows=4,
+partition pa4 DATA DIRECTORY =
+'/tmp' INDEX DIRECTORY =
+'/tmp' max_rows=40 min_rows=2);
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` set('A','B','C','D','E','F','G','H','I','J','K','L') NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
+insert into t1 values ('A,B'),('C,D'),('E,L'),('G,H,K');
+select * from t1 order by a;
+a
+A,B
+C,D
+G,H,K
+E,L
+select * from t1 where a='A,B';
+a
+A,B
+update t1 set a='A,B,C' where a='E,L';
+select * from t1 order by a;
+a
+A,B
+A,B,C
+C,D
+G,H,K
+delete from t1 where a='A,B';
+select * from t1 order by a;
+a
+A,B,C
+C,D
+G,H,K
+drop table t1;
+create table t2 (a set (
+'1','2','3','4','5','6','7','8','9','0',
+'A','B','C','D','E','F','G','H','I','J','K','L',
+'M','N','O','P','Q','R','S','T','U','V','W','X',
+'Y','Z'
+) not null, primary key(a)) engine='MyISAM'
+partition by key (a) partitions 27;
+show create table t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` set('1','2','3','4','5','6','7','8','9','0','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z') NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 27 */
+insert into t2 values ('A'),('B'),('C'),('D'),('E'),('F'),('G'),('H'),('I'),('K'),('L'),('M'),('N'),('O'),('P'),('Q'),('S'),('T'),('U'),('V'),('X'),('Y'),('Z');
+insert into t2 values ('A,B'),('B,C'),('C,D'),('D,E'),('E,F'),('F,G'),('G,H'),('H,I'),('I,J'),('K,L'),('L,M'),('M,N'),('N,O'),('O,P'),('P,Q'),('Q,R'),('S,T'),('T,U'),('U,V'),('V,W'),('X,Y'),('Y,Z'),('Z,A');
+insert into t2 values ('A,B,C'),('B,C,D'),('C,D,E'),('D,E,F'),('E,F,G'),('F,G,H'),('G,H,I'),('H,I,J'),('I,J,K'),('K,L,M'),('L,M,N'),('M,N,O'),('N,O,P'),('O,P,Q'),('P,Q,R'),('Q,R,S'),('S,T,U'),('T,U,V'),('U,V,W'),('V,W,X'),('X,Y,Z'),('Y,Z,A'),('Z,A,B');
+insert into t2 values ('1'),('2'),('3'),('4'),('5'),('6'),('7'),('8'),('9'),('0');
+insert into t2 values ('1,2'),('2,3'),('3,4'),('4,5'),('5,6'),('6,7'),('7,8'),('8,9'),('9,0'),('0,1');
+insert into t2 values ('1,2,3'),('2,3,4'),('3,4,5'),('4,5,6'),('5,6,7'),('6,7,8'),('7,8,9'),('8,9,0'),('9,0,1'),('0,1,2');
+select count(*) from t2;
+count(*)
+99
+select * from t2 order by a;
+a
+1
+2
+1,2
+3
+2,3
+1,2,3
+4
+3,4
+2,3,4
+5
+4,5
+3,4,5
+6
+5,6
+4,5,6
+7
+6,7
+5,6,7
+8
+7,8
+6,7,8
+9
+8,9
+7,8,9
+0
+1,0
+1,2,0
+9,0
+1,9,0
+8,9,0
+A
+B
+A,B
+C
+B,C
+A,B,C
+D
+C,D
+B,C,D
+E
+D,E
+C,D,E
+F
+E,F
+D,E,F
+G
+F,G
+E,F,G
+H
+G,H
+F,G,H
+I
+H,I
+G,H,I
+I,J
+H,I,J
+K
+I,J,K
+L
+K,L
+M
+L,M
+K,L,M
+N
+M,N
+L,M,N
+O
+N,O
+M,N,O
+P
+O,P
+N,O,P
+Q
+P,Q
+O,P,Q
+Q,R
+P,Q,R
+S
+Q,R,S
+T
+S,T
+U
+T,U
+S,T,U
+V
+U,V
+T,U,V
+V,W
+U,V,W
+X
+V,W,X
+Y
+X,Y
+Z
+A,Z
+A,B,Z
+Y,Z
+A,Y,Z
+X,Y,Z
+drop table t2;
+---- Partitioning and blob data type
+create table t1 (a blob not null, primary key(a(767))) engine='MyISAM'
+partition by key (a) (
+partition pa1 DATA DIRECTORY =
+'/tmp' INDEX DIRECTORY =
+'/tmp' max_rows=20 min_rows=2,
+partition pa2 DATA DIRECTORY =
+'/tmp' INDEX DIRECTORY =
+'/tmp' max_rows=30 min_rows=3,
+partition pa3 DATA DIRECTORY =
+'/tmp' INDEX DIRECTORY =
+'/tmp' max_rows=30 min_rows=4,
+partition pa4 DATA DIRECTORY =
+'/tmp' INDEX DIRECTORY =
+'/tmp' max_rows=40 min_rows=2);
+ERROR HY000: A BLOB field is not allowed in partition function
+create table t2 (a blob not null, primary key(a(767))) engine='MyISAM'
+partition by key (a) partitions 30;
+ERROR HY000: A BLOB field is not allowed in partition function
+create table t2 (a tinyblob not null, primary key(a(767))) engine='MyISAM'
+partition by key (a) partitions 30;
+ERROR HY000: A BLOB field is not allowed in partition function
+create table t2 (a mediumblob not null, primary key(a(767))) engine='MyISAM'
+partition by key (a) partitions 30;
+ERROR HY000: A BLOB field is not allowed in partition function
+create table t2 (a longblob not null, primary key(a(767))) engine='MyISAM'
+partition by key (a) partitions 30;
+ERROR HY000: A BLOB field is not allowed in partition function
+---- Partitioning and text data type
+create table t1 (a text not null, primary key(a(767))) engine='MyISAM'
+partition by key (a) (
+partition pa1 DATA DIRECTORY =
+'/tmp' INDEX DIRECTORY =
+'/tmp' max_rows=20 min_rows=2,
+partition pa2 DATA DIRECTORY =
+'/tmp' INDEX DIRECTORY =
+'/tmp' max_rows=30 min_rows=3,
+partition pa3 DATA DIRECTORY =
+'/tmp' INDEX DIRECTORY =
+'/tmp' max_rows=30 min_rows=4,
+partition pa4 DATA DIRECTORY =
+'/tmp' INDEX DIRECTORY =
+'/tmp' max_rows=40 min_rows=2);
+ERROR HY000: A BLOB field is not allowed in partition function
+create table t2 (a tinytext not null, primary key(a(767))) engine='MyISAM'
+partition by key (a) partitions 30;
+ERROR HY000: A BLOB field is not allowed in partition function
+create table t2 (a mediumtext not null, primary key(a(767))) engine='MyISAM'
+partition by key (a) partitions 30;
+ERROR HY000: A BLOB field is not allowed in partition function
+create table t2 (a longtext not null, primary key(a(767))) engine='MyISAM'
+partition by key (a) partitions 30;
+ERROR HY000: A BLOB field is not allowed in partition function
diff --git a/mysql-test/suite/parts/r/partition_datetime_myisam.result b/mysql-test/suite/parts/r/partition_datetime_myisam.result
index 1ef281f2766..7e05d368cf8 100644
--- a/mysql-test/suite/parts/r/partition_datetime_myisam.result
+++ b/mysql-test/suite/parts/r/partition_datetime_myisam.result
@@ -17,7 +17,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`a`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
insert into t1 values ('1975-01-01 21:21:21'), ('2020-12-31 12:10:30'), ('1980-10-14 03:03'), ('2000-06-15 23:59');
select * from t1;
a
@@ -298,7 +298,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` date NOT NULL,
PRIMARY KEY (`a`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
insert into t1 values ('1975-01-01'), ('2020-12-31'), ('1980-10-14'), ('2000-06-15');
select * from t1;
a
@@ -625,7 +625,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` time NOT NULL,
PRIMARY KEY (`a`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
insert into t1 values ('21:21:21'), ('12:10:30'), ('03:03:03'), ('23:59');
select * from t1;
a
@@ -1090,7 +1090,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime NOT NULL,
PRIMARY KEY (`a`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
insert into t1 values ('1975-01-01 21:21:21'), ('2020-12-31 12:10:30'), ('1980-10-14 03:03'), ('2000-06-15 23:59');
select * from t1;
a
@@ -1367,7 +1367,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` year(4) NOT NULL,
PRIMARY KEY (`a`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
insert into t1 values ('1975'), (2020), ('1980'), ('2000');
select * from t1;
a
diff --git a/mysql-test/suite/parts/r/partition_decimal_myisam.result b/mysql-test/suite/parts/r/partition_decimal_myisam.result
index 464ac4ddaf5..4d06f4d7b38 100644
--- a/mysql-test/suite/parts/r/partition_decimal_myisam.result
+++ b/mysql-test/suite/parts/r/partition_decimal_myisam.result
@@ -17,7 +17,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` decimal(10,4) NOT NULL,
PRIMARY KEY (`a`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
insert into t1 values (999999.9999), (-999999.9999), (123456.7899), (-123456.7899), (-1.5), (1), (0), (-1), (1.5), (1234.567), (-1234.567);
select * from t1;
a
diff --git a/mysql-test/suite/parts/r/partition_engine_innodb.result b/mysql-test/suite/parts/r/partition_engine_innodb.result
index bea9a59da9b..04a5a492269 100644
--- a/mysql-test/suite/parts/r/partition_engine_innodb.result
+++ b/mysql-test/suite/parts/r/partition_engine_innodb.result
@@ -2,14 +2,6 @@ SET @max_row = 20;
SET @@session.storage_engine = 'InnoDB';
#------------------------------------------------------------------------
-# There are several testcases disabled because of the open bugs
-# #15890
-# The expected results suffer from the following bugs
-# harmless #17455, #19305
-# which cannot be suppressed because of technical reasons.
-#------------------------------------------------------------------------
-
-#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables
# needed in many testcases
#------------------------------------------------------------------------
@@ -31,7 +23,7 @@ DROP TABLE IF EXISTS t0_definition;
CREATE TABLE t0_definition (
state CHAR(3),
create_command VARBINARY(5000),
-file_list VARBINARY(5000),
+file_list VARBINARY(10000),
PRIMARY KEY (state)
) ENGINE = MEMORY;
DROP TABLE IF EXISTS t0_aux;
@@ -65,7 +57,7 @@ f_charbig VARCHAR(1000)
PARTITION BY HASH(f_int1) PARTITIONS 2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -500,7 +492,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
#------------------------------------------------------------------------
# 2 Assignment of storage engine just after partition or subpartition
@@ -519,7 +511,7 @@ PARTITION part2 STORAGE ENGINE = 'InnoDB'
);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -954,7 +946,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -974,7 +966,7 @@ SUBPARTITION subpart22 STORAGE ENGINE = 'InnoDB')
);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -1407,7 +1399,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
#------------------------------------------------------------------------
# 3 Some but not all named partitions or subpartitions get a storage
@@ -1426,7 +1418,7 @@ PARTITION part2
);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -1861,7 +1853,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -1876,7 +1868,7 @@ PARTITION part2 STORAGE ENGINE = 'InnoDB'
);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -2311,7 +2303,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -2331,7 +2323,7 @@ SUBPARTITION subpart22 STORAGE ENGINE = 'InnoDB')
);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -2764,7 +2756,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -2784,7 +2776,7 @@ SUBPARTITION subpart22 )
);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -3217,7 +3209,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
#------------------------------------------------------------------------
# 4 Storage engine assignment after partition name + after name of
@@ -3241,7 +3233,7 @@ SUBPARTITION subpart22 STORAGE ENGINE = 'InnoDB')
);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -3674,7 +3666,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -3694,7 +3686,7 @@ SUBPARTITION subpart22)
);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -4127,7 +4119,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
#------------------------------------------------------------------------
# 5 Precedence of storage engine assignments (if there is any)
@@ -4147,7 +4139,7 @@ PARTITION part2 STORAGE ENGINE = 'InnoDB'
);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -4582,7 +4574,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -4602,7 +4594,7 @@ SUBPARTITION subpart22 STORAGE ENGINE = 'InnoDB')
);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -5035,7 +5027,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# 6.2 Storage engine assignment after partition name + after
# subpartition name
@@ -5057,7 +5049,7 @@ SUBPARTITION subpart22 STORAGE ENGINE = 'InnoDB')
);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -5490,7 +5482,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
#------------------------------------------------------------------------
# 6 Session default engine differs from engine used within create table
@@ -5506,7 +5498,7 @@ f_charbig VARCHAR(1000)
PARTITION BY HASH(f_int1) ( PARTITION part1 ENGINE = 'InnoDB');
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -5941,7 +5933,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -5957,7 +5949,7 @@ SUBPARTITION BY HASH(f_int1)
SUBPARTITION subpart12 STORAGE ENGINE = 'InnoDB'));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -6390,7 +6382,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
SET SESSION storage_engine='InnoDB';
DROP VIEW IF EXISTS v1;
diff --git a/mysql-test/suite/parts/r/partition_engine_myisam.result b/mysql-test/suite/parts/r/partition_engine_myisam.result
index 343077c5e4d..f81becc6eea 100644
--- a/mysql-test/suite/parts/r/partition_engine_myisam.result
+++ b/mysql-test/suite/parts/r/partition_engine_myisam.result
@@ -2,14 +2,6 @@ SET @max_row = 20;
SET @@session.storage_engine = 'MyISAM';
#------------------------------------------------------------------------
-# There are several testcases disabled because of the open bugs
-# #15890
-# The expected results suffer from the following bugs
-# harmless #17455, #19305
-# which cannot be suppressed because of technical reasons.
-#------------------------------------------------------------------------
-
-#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables
# needed in many testcases
#------------------------------------------------------------------------
@@ -31,7 +23,7 @@ DROP TABLE IF EXISTS t0_definition;
CREATE TABLE t0_definition (
state CHAR(3),
create_command VARBINARY(5000),
-file_list VARBINARY(5000),
+file_list VARBINARY(10000),
PRIMARY KEY (state)
) ENGINE = MEMORY;
DROP TABLE IF EXISTS t0_aux;
@@ -65,7 +57,7 @@ f_charbig VARCHAR(1000)
PARTITION BY HASH(f_int1) PARTITIONS 2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -510,7 +502,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
#------------------------------------------------------------------------
# 2 Assignment of storage engine just after partition or subpartition
@@ -529,7 +521,7 @@ PARTITION part2 STORAGE ENGINE = 'MyISAM'
);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -974,7 +966,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -994,7 +986,7 @@ SUBPARTITION subpart22 STORAGE ENGINE = 'MyISAM')
);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -1441,7 +1433,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
#------------------------------------------------------------------------
# 3 Some but not all named partitions or subpartitions get a storage
@@ -1460,7 +1452,7 @@ PARTITION part2
);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -1905,7 +1897,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -1920,7 +1912,7 @@ PARTITION part2 STORAGE ENGINE = 'MyISAM'
);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -2365,7 +2357,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -2385,7 +2377,7 @@ SUBPARTITION subpart22 STORAGE ENGINE = 'MyISAM')
);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -2832,7 +2824,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -2852,7 +2844,7 @@ SUBPARTITION subpart22 )
);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -3299,7 +3291,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
#------------------------------------------------------------------------
# 4 Storage engine assignment after partition name + after name of
@@ -3323,7 +3315,7 @@ SUBPARTITION subpart22 STORAGE ENGINE = 'MyISAM')
);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -3770,7 +3762,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -3790,7 +3782,7 @@ SUBPARTITION subpart22)
);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -4237,7 +4229,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
#------------------------------------------------------------------------
# 5 Precedence of storage engine assignments (if there is any)
@@ -4257,7 +4249,7 @@ PARTITION part2 STORAGE ENGINE = 'MyISAM'
);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -4702,7 +4694,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -4722,7 +4714,7 @@ SUBPARTITION subpart22 STORAGE ENGINE = 'MyISAM')
);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -5169,7 +5161,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# 6.2 Storage engine assignment after partition name + after
# subpartition name
@@ -5191,7 +5183,7 @@ SUBPARTITION subpart22 STORAGE ENGINE = 'MyISAM')
);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -5638,7 +5630,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
#------------------------------------------------------------------------
# 6 Session default engine differs from engine used within create table
@@ -5654,7 +5646,7 @@ f_charbig VARCHAR(1000)
PARTITION BY HASH(f_int1) ( PARTITION part1 ENGINE = 'MyISAM');
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -6097,7 +6089,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@@ -6113,7 +6105,7 @@ SUBPARTITION BY HASH(f_int1)
SUBPARTITION subpart12 STORAGE ENGINE = 'MyISAM'));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
-# Start usability test (include/partition_check.inc)
+# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@@ -6556,7 +6548,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
-# End usability test (include/partition_check.inc)
+# End usability test (inc/partition_check.inc)
DROP TABLE t1;
SET SESSION storage_engine='MyISAM';
DROP VIEW IF EXISTS v1;
diff --git a/mysql-test/suite/parts/r/partition_float_innodb.result b/mysql-test/suite/parts/r/partition_float_innodb.result
index bc30987b33f..c203fabfd87 100644
--- a/mysql-test/suite/parts/r/partition_float_innodb.result
+++ b/mysql-test/suite/parts/r/partition_float_innodb.result
@@ -89,152 +89,6 @@ select count(*) from t2;
count(*)
3072
drop table t2;
-create table t3 (a float not null, primary key(a)) engine='InnoDB'
-partition by range (cast(floor(a) as signed)) subpartition by key (a) subpartitions 3 (
-partition pa1 values less than (3),
-partition pa3 values less than (6),
-partition pa10 values less than (10)
-);
-show create table t3;
-Table Create Table
-t3 CREATE TABLE `t3` (
- `a` float NOT NULL,
- PRIMARY KEY (`a`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (cast(floor(a) as signed)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION pa1 VALUES LESS THAN (3) ENGINE = InnoDB, PARTITION pa3 VALUES LESS THAN (6) ENGINE = InnoDB, PARTITION pa10 VALUES LESS THAN (10) ENGINE = InnoDB) */
-9*3 inserts;
-insert into t3 values (9);
-insert into t3 values (9+0.33);
-insert into t3 values (9+0.75);
-insert into t3 values (8);
-insert into t3 values (8+0.33);
-insert into t3 values (8+0.75);
-insert into t3 values (7);
-insert into t3 values (7+0.33);
-insert into t3 values (7+0.75);
-insert into t3 values (6);
-insert into t3 values (6+0.33);
-insert into t3 values (6+0.75);
-insert into t3 values (5);
-insert into t3 values (5+0.33);
-insert into t3 values (5+0.75);
-insert into t3 values (4);
-insert into t3 values (4+0.33);
-insert into t3 values (4+0.75);
-insert into t3 values (3);
-insert into t3 values (3+0.33);
-insert into t3 values (3+0.75);
-insert into t3 values (2);
-insert into t3 values (2+0.33);
-insert into t3 values (2+0.75);
-insert into t3 values (1);
-insert into t3 values (1+0.33);
-insert into t3 values (1+0.75);
-select count(*) from t3;
-count(*)
-27
-select * from t3;
-a
-1
-1.33
-1.75
-2
-2.33
-2.75
-3
-3.33
-3.75
-4
-4.33
-4.75
-5
-5.33
-5.75
-6
-6.33
-6.75
-7
-7.33
-7.75
-8
-8.33
-8.75
-9
-9.33
-9.75
-drop table t3;
-create table t4 (a float not null, primary key(a)) engine='InnoDB'
-partition by list (cast(floor(a) as signed)) subpartition by key (a) subpartitions 3 (
-partition pa1 values in (1,2,3),
-partition pa3 values in (4,5,6),
-partition pa10 values in (7,8,9,10)
-);
-show create table t4;
-Table Create Table
-t4 CREATE TABLE `t4` (
- `a` float NOT NULL,
- PRIMARY KEY (`a`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (cast(floor(a) as signed)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION pa1 VALUES IN (1,2,3) ENGINE = InnoDB, PARTITION pa3 VALUES IN (4,5,6) ENGINE = InnoDB, PARTITION pa10 VALUES IN (7,8,9,10) ENGINE = InnoDB) */
-9*3 inserts;
-insert into t4 values (9);
-insert into t4 values (9+0.33);
-insert into t4 values (9+0.75);
-insert into t4 values (8);
-insert into t4 values (8+0.33);
-insert into t4 values (8+0.75);
-insert into t4 values (7);
-insert into t4 values (7+0.33);
-insert into t4 values (7+0.75);
-insert into t4 values (6);
-insert into t4 values (6+0.33);
-insert into t4 values (6+0.75);
-insert into t4 values (5);
-insert into t4 values (5+0.33);
-insert into t4 values (5+0.75);
-insert into t4 values (4);
-insert into t4 values (4+0.33);
-insert into t4 values (4+0.75);
-insert into t4 values (3);
-insert into t4 values (3+0.33);
-insert into t4 values (3+0.75);
-insert into t4 values (2);
-insert into t4 values (2+0.33);
-insert into t4 values (2+0.75);
-insert into t4 values (1);
-insert into t4 values (1+0.33);
-insert into t4 values (1+0.75);
-select count(*) from t4;
-count(*)
-27
-select * from t4;
-a
-1
-1.33
-1.75
-2
-2.33
-2.75
-3
-3.33
-3.75
-4
-4.33
-4.75
-5
-5.33
-5.75
-6
-6.33
-6.75
-7
-7.33
-7.75
-8
-8.33
-8.75
-9
-9.33
-9.75
-drop table t4;
create table t1 (a double not null, primary key(a)) engine='InnoDB'
partition by key (a) (
partition pa1 DATA DIRECTORY =
@@ -318,149 +172,3 @@ select count(*) from t2;
count(*)
3072
drop table t2;
-create table t3 (a double not null, primary key(a)) engine='InnoDB'
-partition by range (cast(floor(a) as signed)) subpartition by key (a) subpartitions 3 (
-partition pa1 values less than (3),
-partition pa3 values less than (6),
-partition pa10 values less than (10)
-);
-show create table t3;
-Table Create Table
-t3 CREATE TABLE `t3` (
- `a` double NOT NULL,
- PRIMARY KEY (`a`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (cast(floor(a) as signed)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION pa1 VALUES LESS THAN (3) ENGINE = InnoDB, PARTITION pa3 VALUES LESS THAN (6) ENGINE = InnoDB, PARTITION pa10 VALUES LESS THAN (10) ENGINE = InnoDB) */
-9*3 inserts;
-insert into t3 values (9);
-insert into t3 values (9+0.33);
-insert into t3 values (9+0.75);
-insert into t3 values (8);
-insert into t3 values (8+0.33);
-insert into t3 values (8+0.75);
-insert into t3 values (7);
-insert into t3 values (7+0.33);
-insert into t3 values (7+0.75);
-insert into t3 values (6);
-insert into t3 values (6+0.33);
-insert into t3 values (6+0.75);
-insert into t3 values (5);
-insert into t3 values (5+0.33);
-insert into t3 values (5+0.75);
-insert into t3 values (4);
-insert into t3 values (4+0.33);
-insert into t3 values (4+0.75);
-insert into t3 values (3);
-insert into t3 values (3+0.33);
-insert into t3 values (3+0.75);
-insert into t3 values (2);
-insert into t3 values (2+0.33);
-insert into t3 values (2+0.75);
-insert into t3 values (1);
-insert into t3 values (1+0.33);
-insert into t3 values (1+0.75);
-select count(*) from t3;
-count(*)
-27
-select * from t3;
-a
-1
-1.33
-1.75
-2
-2.33
-2.75
-3
-3.33
-3.75
-4
-4.33
-4.75
-5
-5.33
-5.75
-6
-6.33
-6.75
-7
-7.33
-7.75
-8
-8.33
-8.75
-9
-9.33
-9.75
-drop table t3;
-create table t4 (a double not null, primary key(a)) engine='InnoDB'
-partition by list (cast(floor(a) as signed)) subpartition by key (a) subpartitions 3 (
-partition pa1 values in (1,2,3),
-partition pa3 values in (4,5,6),
-partition pa10 values in (7,8,9,10)
-);
-show create table t4;
-Table Create Table
-t4 CREATE TABLE `t4` (
- `a` double NOT NULL,
- PRIMARY KEY (`a`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (cast(floor(a) as signed)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION pa1 VALUES IN (1,2,3) ENGINE = InnoDB, PARTITION pa3 VALUES IN (4,5,6) ENGINE = InnoDB, PARTITION pa10 VALUES IN (7,8,9,10) ENGINE = InnoDB) */
-9*3 inserts;
-insert into t4 values (9);
-insert into t4 values (9+0.33);
-insert into t4 values (9+0.75);
-insert into t4 values (8);
-insert into t4 values (8+0.33);
-insert into t4 values (8+0.75);
-insert into t4 values (7);
-insert into t4 values (7+0.33);
-insert into t4 values (7+0.75);
-insert into t4 values (6);
-insert into t4 values (6+0.33);
-insert into t4 values (6+0.75);
-insert into t4 values (5);
-insert into t4 values (5+0.33);
-insert into t4 values (5+0.75);
-insert into t4 values (4);
-insert into t4 values (4+0.33);
-insert into t4 values (4+0.75);
-insert into t4 values (3);
-insert into t4 values (3+0.33);
-insert into t4 values (3+0.75);
-insert into t4 values (2);
-insert into t4 values (2+0.33);
-insert into t4 values (2+0.75);
-insert into t4 values (1);
-insert into t4 values (1+0.33);
-insert into t4 values (1+0.75);
-select count(*) from t4;
-count(*)
-27
-select * from t4;
-a
-1
-1.33
-1.75
-2
-2.33
-2.75
-3
-3.33
-3.75
-4
-4.33
-4.75
-5
-5.33
-5.75
-6
-6.33
-6.75
-7
-7.33
-7.75
-8
-8.33
-8.75
-9
-9.33
-9.75
-drop table t4;
diff --git a/mysql-test/suite/parts/r/partition_float_myisam.result b/mysql-test/suite/parts/r/partition_float_myisam.result
index aba62b8ba70..13881548473 100644
--- a/mysql-test/suite/parts/r/partition_float_myisam.result
+++ b/mysql-test/suite/parts/r/partition_float_myisam.result
@@ -17,7 +17,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` float NOT NULL,
PRIMARY KEY (`a`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
insert into t1 values (-3.402823466E+38), (3.402823466E+38), (-1.5), (-1), (0), (1), (1.5);
select * from t1;
a
@@ -108,7 +108,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` double NOT NULL,
PRIMARY KEY (`a`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
insert into t1 values (-2.2250738585072014E+208), (-2.2250738585072014E-208), (-1.5), (-1), (0), (1.5), (1234.567), (2.2250738585072014E+208);
select * from t1;
a
diff --git a/mysql-test/suite/parts/r/partition_int_myisam.result b/mysql-test/suite/parts/r/partition_int_myisam.result
index d00f8e5f772..7f16cdb207a 100644
--- a/mysql-test/suite/parts/r/partition_int_myisam.result
+++ b/mysql-test/suite/parts/r/partition_int_myisam.result
@@ -17,7 +17,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` tinyint(3) unsigned NOT NULL,
PRIMARY KEY (`a`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
insert into t1 values (255), (254), (253), (252), (1), (2), (128);
select * from t1;
a
@@ -125,7 +125,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` smallint(5) unsigned NOT NULL,
PRIMARY KEY (`a`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
insert into t1 values (65535), (65534), (65533), (65532), (1), (2), (256);
select * from t1;
a
@@ -233,7 +233,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(10) unsigned NOT NULL,
PRIMARY KEY (`a`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
insert into t1 values (4294967295), (4294967294), (4294967293), (4294967292), (1), (2), (65535);
select * from t1;
a
@@ -341,7 +341,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` mediumint(8) unsigned NOT NULL,
PRIMARY KEY (`a`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
insert into t1 values (16777215), (16777214), (16777213), (16777212), (1), (2), (65535);
select * from t1;
a
@@ -449,7 +449,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`a`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612), (1), (2), (65535);
select * from t1;
a
diff --git a/mysql-test/suite/parts/r/partition_special_myisam.result b/mysql-test/suite/parts/r/partition_special_myisam.result
index f3249f49778..85e6d5445fd 100644
--- a/mysql-test/suite/parts/r/partition_special_myisam.result
+++ b/mysql-test/suite/parts/r/partition_special_myisam.result
@@ -20,7 +20,7 @@ t1 CREATE TABLE `t1` (
`c` varchar(50) NOT NULL,
`d` enum('m','w') NOT NULL DEFAULT 'm',
PRIMARY KEY (`a`,`b`,`c`,`d`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!50100 PARTITION BY KEY (a,b,c,d) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a,b,c,d) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
insert into t1 values
('1975-01-01', 'abcde', 'abcde','m'),
('1983-12-31', 'cdef', 'srtbvsr', 'w'),
@@ -65,7 +65,7 @@ t1 CREATE TABLE `t1` (
`h` tinyint(4) NOT NULL,
`i` char(255) DEFAULT NULL,
PRIMARY KEY (`a`,`b`,`c`,`d`,`e`,`f`,`g`,`h`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!50100 PARTITION BY KEY (a,b,c,d,e,f,g,h) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a,b,c,d,e,f,g,h) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
insert into t1 values
('1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113, 'tbhth nrzh ztfghgfh fzh ftzhj fztjh'),
('1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127, 'liuugbzvdmrlti b itiortudirtfgtibm dfi'),
@@ -118,7 +118,7 @@ t1 CREATE TABLE `t1` (
`h1` tinyint(4) NOT NULL,
`i` char(255) DEFAULT NULL,
PRIMARY KEY (`a`,`b`,`c`,`d`,`e`,`f`,`g`,`h`,`a1`,`b1`,`c1`,`d1`,`e1`,`f1`,`g1`,`h1`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!50100 PARTITION BY KEY (a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
insert into t1 values
('1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113,'1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113, 'tbhth nrzh ztfghgfh fzh ftzhj fztjh'),
('1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127,'1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127, 'liuugbzvdmrlti b itiortudirtfgtibm dfi'),
@@ -202,7 +202,7 @@ t1 CREATE TABLE `t1` (
`h3` tinyint(4) NOT NULL,
`i` char(255) DEFAULT NULL,
PRIMARY KEY (`a`,`b`,`c`,`d`,`e`,`f`,`g`,`h`,`a1`,`b1`,`c1`,`d1`,`e1`,`f1`,`g1`,`h1`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!50100 PARTITION BY KEY (a,b,c,d,e,f,g,h) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a,b,c,d,e,f,g,h) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
insert into t1 values
('1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113,'1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113,'1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113, '1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113, 'tbhth nrzh ztfghgfh fzh ftzhj fztjh'),
('1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127,'1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127, '1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127, '1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127, 'liuugbzvdmrlti b itiortudirtfgtibm dfi'),
diff --git a/mysql-test/suite/parts/r/partition_syntax_innodb.result b/mysql-test/suite/parts/r/partition_syntax_innodb.result
index c6fb2d38e4c..a26d2ec65b9 100644
--- a/mysql-test/suite/parts/r/partition_syntax_innodb.result
+++ b/mysql-test/suite/parts/r/partition_syntax_innodb.result
@@ -2,14 +2,6 @@ SET @max_row = 20;
SET @@session.storage_engine = 'InnoDB';
#------------------------------------------------------------------------
-# There are several testcases disabled because of the open bugs
-# #15890
-# The expected results suffer from the following bugs
-# harmless #17455, #19305
-# which cannot be suppressed because of technical reasons.
-#------------------------------------------------------------------------
-
-#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables
# needed in many testcases
#------------------------------------------------------------------------
@@ -31,7 +23,7 @@ DROP TABLE IF EXISTS t0_definition;
CREATE TABLE t0_definition (
state CHAR(3),
create_command VARBINARY(5000),
-file_list VARBINARY(5000),
+file_list VARBINARY(10000),
PRIMARY KEY (state)
) ENGINE = MEMORY;
DROP TABLE IF EXISTS t0_aux;
@@ -1061,6 +1053,29 @@ f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
)
+PARTITION BY HASH(f_int1) PARTITIONS 1.6;
+ERROR 42000: Only integers allowed as number here near '1.6' at line 8
+CREATE TABLE t1 (
+f_int1 INTEGER,
+f_int2 INTEGER,
+f_char1 CHAR(20),
+f_char2 CHAR(20),
+f_charbig VARCHAR(1000)
+)
+PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1)
+SUBPARTITIONS 1.6
+(PARTITION part1 VALUES LESS THAN (10),
+PARTITION part2 VALUES LESS THAN (2147483646));
+ERROR 42000: Only integers allowed as number here near '1.6
+(PARTITION part1 VALUES LESS THAN (10),
+PARTITION part2 VALUES LESS THAN (21' at line 9
+CREATE TABLE t1 (
+f_int1 INTEGER,
+f_int2 INTEGER,
+f_char1 CHAR(20),
+f_char2 CHAR(20),
+f_charbig VARCHAR(1000)
+)
PARTITION BY HASH(f_int1) PARTITIONS 999999999999999999999999999999.999999999999999999999999999999;
ERROR 42000: Only integers allowed as number here near '999999999999999999999999999999.999999999999999999999999999999' at line 8
CREATE TABLE t1 (
@@ -1130,6 +1145,29 @@ f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
)
+PARTITION BY HASH(f_int1) PARTITIONS 0.2E+1;
+ERROR 42000: Only integers allowed as number here near '0.2E+1' at line 8
+CREATE TABLE t1 (
+f_int1 INTEGER,
+f_int2 INTEGER,
+f_char1 CHAR(20),
+f_char2 CHAR(20),
+f_charbig VARCHAR(1000)
+)
+PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1)
+SUBPARTITIONS 0.2E+1
+(PARTITION part1 VALUES LESS THAN (10),
+PARTITION part2 VALUES LESS THAN (2147483646));
+ERROR 42000: Only integers allowed as number here near '0.2E+1
+(PARTITION part1 VALUES LESS THAN (10),
+PARTITION part2 VALUES LESS THAN ' at line 9
+CREATE TABLE t1 (
+f_int1 INTEGER,
+f_int2 INTEGER,
+f_char1 CHAR(20),
+f_char2 CHAR(20),
+f_charbig VARCHAR(1000)
+)
PARTITION BY HASH(f_int1) PARTITIONS -2.0E+0;
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 '-2.0E+0' at line 8
CREATE TABLE t1 (
@@ -1153,6 +1191,29 @@ f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
)
+PARTITION BY HASH(f_int1) PARTITIONS 0.16E+1;
+ERROR 42000: Only integers allowed as number here near '0.16E+1' at line 8
+CREATE TABLE t1 (
+f_int1 INTEGER,
+f_int2 INTEGER,
+f_char1 CHAR(20),
+f_char2 CHAR(20),
+f_charbig VARCHAR(1000)
+)
+PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1)
+SUBPARTITIONS 0.16E+1
+(PARTITION part1 VALUES LESS THAN (10),
+PARTITION part2 VALUES LESS THAN (2147483646));
+ERROR 42000: Only integers allowed as number here near '0.16E+1
+(PARTITION part1 VALUES LESS THAN (10),
+PARTITION part2 VALUES LESS THAN' at line 9
+CREATE TABLE t1 (
+f_int1 INTEGER,
+f_int2 INTEGER,
+f_char1 CHAR(20),
+f_char2 CHAR(20),
+f_charbig VARCHAR(1000)
+)
PARTITION BY HASH(f_int1) PARTITIONS 0.0E+300;
ERROR 42000: Only integers allowed as number here near '0.0E+300' at line 8
CREATE TABLE t1 (
@@ -1169,6 +1230,52 @@ PARTITION part2 VALUES LESS THAN (2147483646));
ERROR 42000: Only integers allowed as number here near '0.0E+300
(PARTITION part1 VALUES LESS THAN (10),
PARTITION part2 VALUES LESS THA' at line 9
+CREATE TABLE t1 (
+f_int1 INTEGER,
+f_int2 INTEGER,
+f_char1 CHAR(20),
+f_char2 CHAR(20),
+f_charbig VARCHAR(1000)
+)
+PARTITION BY HASH(f_int1) PARTITIONS 1E+300;
+ERROR 42000: Only integers allowed as number here near '1E+300' at line 8
+CREATE TABLE t1 (
+f_int1 INTEGER,
+f_int2 INTEGER,
+f_char1 CHAR(20),
+f_char2 CHAR(20),
+f_charbig VARCHAR(1000)
+)
+PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1)
+SUBPARTITIONS 1E+300
+(PARTITION part1 VALUES LESS THAN (10),
+PARTITION part2 VALUES LESS THAN (2147483646));
+ERROR 42000: Only integers allowed as number here near '1E+300
+(PARTITION part1 VALUES LESS THAN (10),
+PARTITION part2 VALUES LESS THAN ' at line 9
+CREATE TABLE t1 (
+f_int1 INTEGER,
+f_int2 INTEGER,
+f_char1 CHAR(20),
+f_char2 CHAR(20),
+f_charbig VARCHAR(1000)
+)
+PARTITION BY HASH(f_int1) PARTITIONS 1E-300;
+ERROR 42000: Only integers allowed as number here near '1E-300' at line 8
+CREATE TABLE t1 (
+f_int1 INTEGER,
+f_int2 INTEGER,
+f_char1 CHAR(20),
+f_char2 CHAR(20),
+f_charbig VARCHAR(1000)
+)
+PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1)
+SUBPARTITIONS 1E-300
+(PARTITION part1 VALUES LESS THAN (10),
+PARTITION part2 VALUES LESS THAN (2147483646));
+ERROR 42000: Only integers allowed as number here near '1E-300
+(PARTITION part1 VALUES LESS THAN (10),
+PARTITION part2 VALUES LESS THAN ' at line 9
# 4.2.4 partition/subpartition numbers STRING notation
CREATE TABLE t1 (
f_int1 INTEGER,
diff --git a/mysql-test/suite/parts/r/partition_syntax_myisam.result b/mysql-test/suite/parts/r/partition_syntax_myisam.result
index 49a7b155a58..93cb075ce2f 100644
--- a/mysql-test/suite/parts/r/partition_syntax_myisam.result
+++ b/mysql-test/suite/parts/r/partition_syntax_myisam.result
@@ -2,14 +2,6 @@ SET @max_row = 20;
SET @@session.storage_engine = 'MyISAM';
#------------------------------------------------------------------------
-# There are several testcases disabled because of the open bugs
-# #15890
-# The expected results suffer from the following bugs
-# harmless #17455, #19305
-# which cannot be suppressed because of technical reasons.
-#------------------------------------------------------------------------
-
-#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables
# needed in many testcases
#------------------------------------------------------------------------
@@ -31,7 +23,7 @@ DROP TABLE IF EXISTS t0_definition;
CREATE TABLE t0_definition (
state CHAR(3),
create_command VARBINARY(5000),
-file_list VARBINARY(5000),
+file_list VARBINARY(10000),
PRIMARY KEY (state)
) ENGINE = MEMORY;
DROP TABLE IF EXISTS t0_aux;
@@ -1143,6 +1135,29 @@ f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
)
+PARTITION BY HASH(f_int1) PARTITIONS 1.6;
+ERROR 42000: Only integers allowed as number here near '1.6' at line 8
+CREATE TABLE t1 (
+f_int1 INTEGER,
+f_int2 INTEGER,
+f_char1 CHAR(20),
+f_char2 CHAR(20),
+f_charbig VARCHAR(1000)
+)
+PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1)
+SUBPARTITIONS 1.6
+(PARTITION part1 VALUES LESS THAN (10),
+PARTITION part2 VALUES LESS THAN (2147483646));
+ERROR 42000: Only integers allowed as number here near '1.6
+(PARTITION part1 VALUES LESS THAN (10),
+PARTITION part2 VALUES LESS THAN (21' at line 9
+CREATE TABLE t1 (
+f_int1 INTEGER,
+f_int2 INTEGER,
+f_char1 CHAR(20),
+f_char2 CHAR(20),
+f_charbig VARCHAR(1000)
+)
PARTITION BY HASH(f_int1) PARTITIONS 999999999999999999999999999999.999999999999999999999999999999;
ERROR 42000: Only integers allowed as number here near '999999999999999999999999999999.999999999999999999999999999999' at line 8
CREATE TABLE t1 (
@@ -1212,6 +1227,29 @@ f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
)
+PARTITION BY HASH(f_int1) PARTITIONS 0.2E+1;
+ERROR 42000: Only integers allowed as number here near '0.2E+1' at line 8
+CREATE TABLE t1 (
+f_int1 INTEGER,
+f_int2 INTEGER,
+f_char1 CHAR(20),
+f_char2 CHAR(20),
+f_charbig VARCHAR(1000)
+)
+PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1)
+SUBPARTITIONS 0.2E+1
+(PARTITION part1 VALUES LESS THAN (10),
+PARTITION part2 VALUES LESS THAN (2147483646));
+ERROR 42000: Only integers allowed as number here near '0.2E+1
+(PARTITION part1 VALUES LESS THAN (10),
+PARTITION part2 VALUES LESS THAN ' at line 9
+CREATE TABLE t1 (
+f_int1 INTEGER,
+f_int2 INTEGER,
+f_char1 CHAR(20),
+f_char2 CHAR(20),
+f_charbig VARCHAR(1000)
+)
PARTITION BY HASH(f_int1) PARTITIONS -2.0E+0;
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 '-2.0E+0' at line 8
CREATE TABLE t1 (
@@ -1235,6 +1273,29 @@ f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
)
+PARTITION BY HASH(f_int1) PARTITIONS 0.16E+1;
+ERROR 42000: Only integers allowed as number here near '0.16E+1' at line 8
+CREATE TABLE t1 (
+f_int1 INTEGER,
+f_int2 INTEGER,
+f_char1 CHAR(20),
+f_char2 CHAR(20),
+f_charbig VARCHAR(1000)
+)
+PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1)
+SUBPARTITIONS 0.16E+1
+(PARTITION part1 VALUES LESS THAN (10),
+PARTITION part2 VALUES LESS THAN (2147483646));
+ERROR 42000: Only integers allowed as number here near '0.16E+1
+(PARTITION part1 VALUES LESS THAN (10),
+PARTITION part2 VALUES LESS THAN' at line 9
+CREATE TABLE t1 (
+f_int1 INTEGER,
+f_int2 INTEGER,
+f_char1 CHAR(20),
+f_char2 CHAR(20),
+f_charbig VARCHAR(1000)
+)
PARTITION BY HASH(f_int1) PARTITIONS 0.0E+300;
ERROR 42000: Only integers allowed as number here near '0.0E+300' at line 8
CREATE TABLE t1 (
@@ -1251,6 +1312,52 @@ PARTITION part2 VALUES LESS THAN (2147483646));
ERROR 42000: Only integers allowed as number here near '0.0E+300
(PARTITION part1 VALUES LESS THAN (10),
PARTITION part2 VALUES LESS THA' at line 9
+CREATE TABLE t1 (
+f_int1 INTEGER,
+f_int2 INTEGER,
+f_char1 CHAR(20),
+f_char2 CHAR(20),
+f_charbig VARCHAR(1000)
+)
+PARTITION BY HASH(f_int1) PARTITIONS 1E+300;
+ERROR 42000: Only integers allowed as number here near '1E+300' at line 8
+CREATE TABLE t1 (
+f_int1 INTEGER,
+f_int2 INTEGER,
+f_char1 CHAR(20),
+f_char2 CHAR(20),
+f_charbig VARCHAR(1000)
+)
+PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1)
+SUBPARTITIONS 1E+300
+(PARTITION part1 VALUES LESS THAN (10),
+PARTITION part2 VALUES LESS THAN (2147483646));
+ERROR 42000: Only integers allowed as number here near '1E+300
+(PARTITION part1 VALUES LESS THAN (10),
+PARTITION part2 VALUES LESS THAN ' at line 9
+CREATE TABLE t1 (
+f_int1 INTEGER,
+f_int2 INTEGER,
+f_char1 CHAR(20),
+f_char2 CHAR(20),
+f_charbig VARCHAR(1000)
+)
+PARTITION BY HASH(f_int1) PARTITIONS 1E-300;
+ERROR 42000: Only integers allowed as number here near '1E-300' at line 8
+CREATE TABLE t1 (
+f_int1 INTEGER,
+f_int2 INTEGER,
+f_char1 CHAR(20),
+f_char2 CHAR(20),
+f_charbig VARCHAR(1000)
+)
+PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1)
+SUBPARTITIONS 1E-300
+(PARTITION part1 VALUES LESS THAN (10),
+PARTITION part2 VALUES LESS THAN (2147483646));
+ERROR 42000: Only integers allowed as number here near '1E-300
+(PARTITION part1 VALUES LESS THAN (10),
+PARTITION part2 VALUES LESS THAN ' at line 9
# 4.2.4 partition/subpartition numbers STRING notation
CREATE TABLE t1 (
f_int1 INTEGER,
diff --git a/mysql-test/suite/parts/r/rpl_partition.result b/mysql-test/suite/parts/r/rpl_partition.result
index 79a95fd613b..bd77d4317bd 100644
--- a/mysql-test/suite/parts/r/rpl_partition.result
+++ b/mysql-test/suite/parts/r/rpl_partition.result
@@ -121,7 +121,7 @@ Create Table CREATE TABLE `t3` (
`fkid` mediumint(9) DEFAULT NULL,
`filler` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
-) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (id) SUBPARTITION BY HASH (id) SUBPARTITIONS 2 (PARTITION pa1 VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION pa2 VALUES LESS THAN (20) ENGINE = MyISAM, PARTITION pa3 VALUES LESS THAN (30) ENGINE = MyISAM, PARTITION pa4 VALUES LESS THAN (40) ENGINE = MyISAM, PARTITION pa5 VALUES LESS THAN (50) ENGINE = MyISAM, PARTITION pa6 VALUES LESS THAN (60) ENGINE = MyISAM, PARTITION pa7 VALUES LESS THAN (70) ENGINE = MyISAM, PARTITION pa8 VALUES LESS THAN (80) ENGINE = MyISAM, PARTITION pa9 VALUES LESS THAN (90) ENGINE = MyISAM, PARTITION pa10 VALUES LESS THAN (100) ENGINE = MyISAM, PARTITION pa11 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */
+) ENGINE=MyISAM AUTO_INCREMENT=1001 DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (id) SUBPARTITION BY HASH (id) SUBPARTITIONS 2 (PARTITION pa1 VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION pa2 VALUES LESS THAN (20) ENGINE = MyISAM, PARTITION pa3 VALUES LESS THAN (30) ENGINE = MyISAM, PARTITION pa4 VALUES LESS THAN (40) ENGINE = MyISAM, PARTITION pa5 VALUES LESS THAN (50) ENGINE = MyISAM, PARTITION pa6 VALUES LESS THAN (60) ENGINE = MyISAM, PARTITION pa7 VALUES LESS THAN (70) ENGINE = MyISAM, PARTITION pa8 VALUES LESS THAN (80) ENGINE = MyISAM, PARTITION pa9 VALUES LESS THAN (90) ENGINE = MyISAM, PARTITION pa10 VALUES LESS THAN (100) ENGINE = MyISAM, PARTITION pa11 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */
show slave status;
Slave_IO_State #
Master_Host 127.0.0.1
diff --git a/mysql-test/suite/parts/t/disabled.def b/mysql-test/suite/parts/t/disabled.def
index 1b70519b72c..85b31bb0598 100644
--- a/mysql-test/suite/parts/t/disabled.def
+++ b/mysql-test/suite/parts/t/disabled.def
@@ -12,9 +12,7 @@ partition_value_ndb : cannot create t1
partition_basic_ndb : cannot create t1
partition_alter1_ndb : timeout. Needs too much time.
partition_alter2_ndb : cannot create t1
-partition_char_innodb : crash. Bug? More investigations
partition_sessions : needs system_3_init.inc
partition_engine_ndb : cannot create t1
part_supported_sql_func_ndb : cannot create t1
rpl_ndb_dd_partitions : cannot create t1
-partition_float_innodb : Bug#30583 Partition on DOUBLE key + INNODB + count(*) == crash
diff --git a/mysql-test/suite/parts/t/part_blocked_sql_func_innodb.test b/mysql-test/suite/parts/t/part_blocked_sql_func_innodb.test
index c2bbf6ad26c..12f5aabf59f 100644
--- a/mysql-test/suite/parts/t/part_blocked_sql_func_innodb.test
+++ b/mysql-test/suite/parts/t/part_blocked_sql_func_innodb.test
@@ -14,11 +14,11 @@
################################################################################
#
-# NOTE: PLEASE DO NOT ADD NOT MYISAM SPECIFIC TESTCASES HERE !
+# NOTE: PLEASE DO NOT ADD NOT INNODB SPECIFIC TESTCASES HERE !
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
-# Please read the README at the end of include/partition.pre before changing
+# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@@ -40,5 +40,3 @@ let $engine= 'INNODB';
#------------------------------------------------------------------------------#
--source suite/parts/inc/part_blocked_sql_funcs_main.inc
-# --source inc/part_blocked_sql_funcs_main.inc
-
diff --git a/mysql-test/suite/parts/t/part_blocked_sql_func_myisam.test b/mysql-test/suite/parts/t/part_blocked_sql_func_myisam.test
index bd7247e4ba5..6478f8c9f81 100644
--- a/mysql-test/suite/parts/t/part_blocked_sql_func_myisam.test
+++ b/mysql-test/suite/parts/t/part_blocked_sql_func_myisam.test
@@ -18,7 +18,7 @@
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
-# Please read the README at the end of include/partition.pre before changing
+# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@@ -39,5 +39,3 @@ let $engine= 'MYISAM';
#------------------------------------------------------------------------------#
--source suite/parts/inc/part_blocked_sql_funcs_main.inc
-# --source inc/part_blocked_sql_funcs_main.inc
-
diff --git a/mysql-test/suite/parts/t/part_supported_sql_func_innodb.test b/mysql-test/suite/parts/t/part_supported_sql_func_innodb.test
index ee765bbe1d0..e8d263e369c 100644
--- a/mysql-test/suite/parts/t/part_supported_sql_func_innodb.test
+++ b/mysql-test/suite/parts/t/part_supported_sql_func_innodb.test
@@ -14,7 +14,7 @@
################################################################################
#
-# NOTE: PLEASE DO NOT ADD NOT MYISAM SPECIFIC TESTCASES HERE !
+# NOTE: PLEASE DO NOT ADD NOT INNODB SPECIFIC TESTCASES HERE !
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
@@ -38,5 +38,3 @@ let $engine= 'INNODB';
#------------------------------------------------------------------------------#
--source suite/parts/inc/part_supported_sql_funcs_main.inc
-# --source inc/part_supported_sql_funcs_main.inc
-
diff --git a/mysql-test/suite/parts/t/part_supported_sql_func_myisam.test b/mysql-test/suite/parts/t/part_supported_sql_func_myisam.test
index 58c7d8ebfb1..4fb1e532c6b 100644
--- a/mysql-test/suite/parts/t/part_supported_sql_func_myisam.test
+++ b/mysql-test/suite/parts/t/part_supported_sql_func_myisam.test
@@ -18,7 +18,7 @@
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
-# Please read the README at the end of include/partition.pre before changing
+# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@@ -40,5 +40,3 @@ let $engine= 'MYISAM';
#------------------------------------------------------------------------------#
--source suite/parts/inc/part_supported_sql_funcs_main.inc
-# --source inc/part_supported_sql_funcs_main.inc
-
diff --git a/mysql-test/suite/parts/t/part_supported_sql_func_ndb.test b/mysql-test/suite/parts/t/part_supported_sql_func_ndb.test
index c21ffe16d19..c21649ba396 100644
--- a/mysql-test/suite/parts/t/part_supported_sql_func_ndb.test
+++ b/mysql-test/suite/parts/t/part_supported_sql_func_ndb.test
@@ -30,11 +30,9 @@ let $do_long_tests= 1;
#------------------------------------------------------------------------------#
# Engine specific settings and requirements
---source include/have_ndb.inc
##### Storage engine to be tested
+--source include/have_ndb.inc
let $engine= 'NDB';
#------------------------------------------------------------------------------#
--source suite/parts/inc/part_supported_sql_funcs_main.inc
-# --source inc/part_supported_sql_funcs_main.inc
-
diff --git a/mysql-test/suite/parts/t/partition_alter1_innodb.test b/mysql-test/suite/parts/t/partition_alter1_innodb.test
index 2667f1dbccd..bc07a832043 100644
--- a/mysql-test/suite/parts/t/partition_alter1_innodb.test
+++ b/mysql-test/suite/parts/t/partition_alter1_innodb.test
@@ -6,7 +6,7 @@
# InnoDB branch #
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
+# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@@ -18,7 +18,7 @@
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
-# Please read the README at the end of include/partition.pre before changing
+# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@@ -47,8 +47,8 @@ let $more_pk_ui_tests= 0;
# Engine specific settings and requirements
##### Storage engine to be tested
-let $engine= 'InnoDB';
--source include/have_innodb.inc
+let $engine= 'InnoDB';
##### Execute the test of "table" files
# InnoDB has no files per PK, UI, ...
@@ -64,7 +64,6 @@ let $MAX_VALUE= (2147483646);
# Generate the prerequisites ($variables, @variables, tables) needed
--source suite/parts/inc/partition.pre
-# --source inc/partition.pre
##### Workarounds for known open engine specific bugs
# none
@@ -72,7 +71,6 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_alter1.inc
-# --source inc/partition_alter1.inc
#------------------------------------------------------------------------------#
# Execute storage engine specific tests
@@ -80,4 +78,3 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Cleanup
--source suite/parts/inc/partition_cleanup.inc
-# --source inc/partition_cleanup.inc
diff --git a/mysql-test/suite/parts/t/partition_alter1_myisam.test b/mysql-test/suite/parts/t/partition_alter1_myisam.test
index 0959de92c15..a6a60f4a61d 100644
--- a/mysql-test/suite/parts/t/partition_alter1_myisam.test
+++ b/mysql-test/suite/parts/t/partition_alter1_myisam.test
@@ -6,7 +6,7 @@
# MyISAM branch #
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
+# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@@ -18,7 +18,7 @@
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
-# Please read the README at the end of include/partition.pre before changing
+# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@@ -63,7 +63,6 @@ let $MAX_VALUE= (2147483646);
# Generate the prerequisites ($variables, @variables, tables) needed
--source suite/parts/inc/partition.pre
-# --source inc/partition.pre
##### Workarounds for known open engine specific bugs
# none
@@ -71,7 +70,6 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_alter1.inc
-# --source inc/partition_alter1.inc
#------------------------------------------------------------------------------#
# Execute storage engine specific tests
@@ -79,4 +77,3 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Cleanup
--source suite/parts/inc/partition_cleanup.inc
-# --source inc/partition_cleanup.inc
diff --git a/mysql-test/suite/parts/t/partition_alter1_ndb.test b/mysql-test/suite/parts/t/partition_alter1_ndb.test
index 96ea9376eb9..cb18b203d39 100644
--- a/mysql-test/suite/parts/t/partition_alter1_ndb.test
+++ b/mysql-test/suite/parts/t/partition_alter1_ndb.test
@@ -6,7 +6,7 @@
# NDB branch #
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
+# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@@ -18,7 +18,7 @@
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
-# Please read the README at the end of include/partition.pre before changing
+# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@@ -47,8 +47,8 @@ let $more_pk_ui_tests= 0;
# Engine specific settings and requirements
##### Storage engine to be tested
-let $engine= 'ndbcluster';
--source include/have_ndb.inc
+let $engine= 'ndbcluster';
##### Execute the test of "table" files
# NDB has no files per PK, UI, ...
@@ -67,7 +67,6 @@ let $MAX_VALUE= (2147483646);
# Generate the prerequisites ($variables, @variables, tables) needed
--source suite/parts/inc/partition.pre
-# --source inc/partition.pre
##### Workarounds for known open engine specific bugs
# Bug#18735: Partitions: NDB, UNIQUE INDEX, UPDATE, strange server response
@@ -76,7 +75,6 @@ let $fixed_bug18735= 0;
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_alter1.inc
-# --source inc/partition_alter1.inc
#------------------------------------------------------------------------------#
# Execute storage engine specific tests
@@ -84,4 +82,3 @@ let $fixed_bug18735= 0;
#------------------------------------------------------------------------------#
# Cleanup
--source suite/parts/inc/partition_cleanup.inc
-# --source inc/partition_cleanup.inc
diff --git a/mysql-test/suite/parts/t/partition_alter2_innodb.test b/mysql-test/suite/parts/t/partition_alter2_innodb.test
index df2b4a0e048..a5efdc71437 100644
--- a/mysql-test/suite/parts/t/partition_alter2_innodb.test
+++ b/mysql-test/suite/parts/t/partition_alter2_innodb.test
@@ -6,7 +6,7 @@
# InnoDB branch #
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
+# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@@ -18,7 +18,7 @@
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
-# Please read the README at the end of include/partition.pre before changing
+# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@@ -47,8 +47,8 @@ let $more_pk_ui_tests= 0;
# Engine specific settings and requirements
##### Storage engine to be tested
-let $engine= 'InnoDB';
--source include/have_innodb.inc
+let $engine= 'InnoDB';
##### Execute the test of "table" files
# InnoDB has no files per PK, UI, ...
@@ -64,7 +64,6 @@ let $MAX_VALUE= (2147483646);
# Generate the prerequisites ($variables, @variables, tables) needed
--source suite/parts/inc/partition.pre
-# --source inc/partition.pre
##### Workarounds for known open engine specific bugs
# none
@@ -72,7 +71,6 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_alter2.inc
-# --source inc/partition_alter2.inc
#------------------------------------------------------------------------------#
# Execute storage engine specific tests
@@ -80,4 +78,3 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Cleanup
--source suite/parts/inc/partition_cleanup.inc
-# --source inc/partition_cleanup.inc
diff --git a/mysql-test/suite/parts/t/partition_alter2_myisam.test b/mysql-test/suite/parts/t/partition_alter2_myisam.test
index b8b92d1b218..a5b6380ef15 100644
--- a/mysql-test/suite/parts/t/partition_alter2_myisam.test
+++ b/mysql-test/suite/parts/t/partition_alter2_myisam.test
@@ -6,7 +6,7 @@
# MyISAM branch #
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
+# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@@ -18,7 +18,7 @@
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
-# Please read the README at the end of include/partition.pre before changing
+# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@@ -63,7 +63,6 @@ let $MAX_VALUE= (2147483646);
# Generate the prerequisites ($variables, @variables, tables) needed
--source suite/parts/inc/partition.pre
-# --source inc/partition.pre
##### Workarounds for known open engine specific bugs
# none
@@ -71,7 +70,6 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_alter2.inc
-# --source inc/partition_alter2.inc
#------------------------------------------------------------------------------#
# Execute storage engine specific tests
@@ -79,4 +77,3 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Cleanup
--source suite/parts/inc/partition_cleanup.inc
-# --source inc/partition_cleanup.inc
diff --git a/mysql-test/suite/parts/t/partition_alter2_ndb.test b/mysql-test/suite/parts/t/partition_alter2_ndb.test
index 8506ec3fea8..e9b4da93b7a 100644
--- a/mysql-test/suite/parts/t/partition_alter2_ndb.test
+++ b/mysql-test/suite/parts/t/partition_alter2_ndb.test
@@ -6,7 +6,7 @@
# NDB branch #
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
+# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@@ -18,7 +18,7 @@
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
-# Please read the README at the end of include/partition.pre before changing
+# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@@ -48,8 +48,8 @@ let $more_pk_ui_tests= 0;
# Engine specific settings and requirements
##### Storage engine to be tested
-let $engine= 'ndbcluster';
--source include/have_ndb.inc
+let $engine= 'ndbcluster';
##### Execute the test of "table" files
# NDB has no files per PK, UI, ...
@@ -68,7 +68,6 @@ let $MAX_VALUE= (2147483646);
# Generate the prerequisites ($variables, @variables, tables) needed
--source suite/parts/inc/partition.pre
-# --source inc/partition.pre
##### Workarounds for known open engine specific bugs
# none
@@ -76,7 +75,6 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_alter2.inc
-# --source inc/partition_alter2.inc
#------------------------------------------------------------------------------#
# Execute storage engine specific tests
@@ -84,4 +82,3 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Cleanup
--source suite/parts/inc/partition_cleanup.inc
-# --source inc/partition_cleanup.inc
diff --git a/mysql-test/suite/parts/t/partition_alter3_innodb.test b/mysql-test/suite/parts/t/partition_alter3_innodb.test
index 253cd7242bd..23c1a987aae 100644
--- a/mysql-test/suite/parts/t/partition_alter3_innodb.test
+++ b/mysql-test/suite/parts/t/partition_alter3_innodb.test
@@ -6,7 +6,7 @@
# InnoDB branch #
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
+# Original Author: mleich #
# Original Date: 2006-04-24 #
# Change Author: #
# Change Date: #
@@ -18,7 +18,7 @@
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
-# Please read the README at the end of include/partition.pre before changing
+# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@@ -46,8 +46,8 @@ let $more_pk_ui_tests= 0;
# Engine specific settings and requirements
##### Storage engine to be tested
-let $engine= 'InnoDB';
--source include/have_innodb.inc
+let $engine= 'InnoDB';
##### Execute the test of "table" files
# InnoDB has no files per PK, UI, ...
@@ -63,7 +63,6 @@ let $MAX_VALUE= (2147483646);
# Generate the prerequisites ($variables, @variables, tables) needed
--source suite/parts/inc/partition.pre
-# --source inc/partition.pre
##### Workarounds for known open engine specific bugs
# none
@@ -71,7 +70,6 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_alter3.inc
-# --source inc/partition_alter3.inc
#------------------------------------------------------------------------------#
# Execute storage engine specific tests
@@ -79,4 +77,3 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Cleanup
--source suite/parts/inc/partition_cleanup.inc
-# --source inc/partition_cleanup.inc
diff --git a/mysql-test/suite/parts/t/partition_alter3_myisam.test b/mysql-test/suite/parts/t/partition_alter3_myisam.test
index 894340de4db..2212065fcc1 100644
--- a/mysql-test/suite/parts/t/partition_alter3_myisam.test
+++ b/mysql-test/suite/parts/t/partition_alter3_myisam.test
@@ -6,7 +6,7 @@
# MyISAM branch #
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
+# Original Author: mleich #
# Original Date: 2006-04-11 #
# Change Author: #
# Change Date: #
@@ -18,7 +18,7 @@
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
-# Please read the README at the end of include/partition.pre before changing
+# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@@ -62,7 +62,6 @@ let $MAX_VALUE= (2147483646);
# Generate the prerequisites ($variables, @variables, tables) needed
--source suite/parts/inc/partition.pre
-# --source inc/partition.pre
##### Workarounds for known open engine specific bugs
# none
@@ -70,7 +69,6 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_alter3.inc
-# --source inc/partition_alter3.inc
#------------------------------------------------------------------------------#
# Execute storage engine specific tests
@@ -78,4 +76,3 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Cleanup
--source suite/parts/inc/partition_cleanup.inc
-# --source inc/partition_cleanup.inc
diff --git a/mysql-test/suite/parts/t/partition_alter4_innodb.test b/mysql-test/suite/parts/t/partition_alter4_innodb.test
index eea8b9997ef..3061e5c9e7f 100644
--- a/mysql-test/suite/parts/t/partition_alter4_innodb.test
+++ b/mysql-test/suite/parts/t/partition_alter4_innodb.test
@@ -18,7 +18,7 @@
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
-# Please read the README at the end of include/partition.pre before changing
+# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@@ -47,8 +47,8 @@ let $more_pk_ui_tests= 0;
# Engine specific settings and requirements
##### Storage engine to be tested
-let $engine= 'InnoDB';
--source include/have_innodb.inc
+let $engine= 'InnoDB';
##### Execute the test of "table" files
# InnoDB has no files per PK, UI, ...
@@ -64,7 +64,6 @@ let $MAX_VALUE= (2147483646);
# Generate the prerequisites ($variables, @variables, tables) needed
--source suite/parts/inc/partition.pre
-# --source inc/partition.pre
##### Workarounds for known open engine specific bugs
# none
@@ -72,7 +71,6 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_alter4.inc
-# --source inc/partition_alter4.inc
#------------------------------------------------------------------------------#
# Execute storage engine specific tests
@@ -80,4 +78,3 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Cleanup
--source suite/parts/inc/partition_cleanup.inc
-# --source inc/partition_cleanup.inc
diff --git a/mysql-test/suite/parts/t/partition_alter4_myisam.test b/mysql-test/suite/parts/t/partition_alter4_myisam.test
index 064dc111ef3..3b2117a3745 100644
--- a/mysql-test/suite/parts/t/partition_alter4_myisam.test
+++ b/mysql-test/suite/parts/t/partition_alter4_myisam.test
@@ -18,7 +18,7 @@
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
-# Please read the README at the end of include/partition.pre before changing
+# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@@ -63,7 +63,6 @@ let $MAX_VALUE= (2147483646);
# Generate the prerequisites ($variables, @variables, tables) needed
--source suite/parts/inc/partition.pre
-# --source inc/partition.pre
##### Workarounds for known open engine specific bugs
# none
@@ -71,7 +70,6 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_alter4.inc
-# --source inc/partition_alter4.inc
#------------------------------------------------------------------------------#
# Execute storage engine specific tests
@@ -79,4 +77,3 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Cleanup
--source suite/parts/inc/partition_cleanup.inc
-# --source inc/partition_cleanup.inc
diff --git a/mysql-test/suite/parts/t/partition_basic_innodb.test b/mysql-test/suite/parts/t/partition_basic_innodb.test
index 8e6f6e6d166..2c3e172014c 100644
--- a/mysql-test/suite/parts/t/partition_basic_innodb.test
+++ b/mysql-test/suite/parts/t/partition_basic_innodb.test
@@ -6,7 +6,7 @@
# InnoDB branch #
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
+# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@@ -18,7 +18,7 @@
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
-# Please read the README at the end of include/partition.pre before changing
+# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@@ -47,8 +47,8 @@ let $more_pk_ui_tests= 0;
# Engine specific settings and requirements
##### Storage engine to be tested
-let $engine= 'InnoDB';
--source include/have_innodb.inc
+let $engine= 'InnoDB';
##### Execute the test of "table" files
# InnoDB has no files per PK, UI, ...
@@ -64,7 +64,6 @@ let $MAX_VALUE= (2147483646);
# Generate the prerequisites ($variables, @variables, tables) needed
--source suite/parts/inc/partition.pre
-# --source inc/partition.pre
##### Workarounds for known open engine specific bugs
# none
@@ -72,7 +71,6 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_basic.inc
-# --source inc/partition_basic.inc
#------------------------------------------------------------------------------#
# Execute storage engine specific tests
@@ -80,4 +78,3 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Cleanup
--source suite/parts/inc/partition_cleanup.inc
-# --source inc/partition_cleanup.inc
diff --git a/mysql-test/suite/parts/t/partition_basic_myisam.test b/mysql-test/suite/parts/t/partition_basic_myisam.test
index 4f653db88e3..c363d06b00a 100644
--- a/mysql-test/suite/parts/t/partition_basic_myisam.test
+++ b/mysql-test/suite/parts/t/partition_basic_myisam.test
@@ -6,7 +6,7 @@
# MyISAM branch #
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
+# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@@ -18,7 +18,7 @@
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
-# Please read the README at the end of include/partition.pre before changing
+# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@@ -48,6 +48,9 @@ let $more_pk_ui_tests= 0;
##### Storage engine to be tested
let $engine= 'MyISAM';
+# The server uses in case of MyISAM symlinking (if available) and the expected
+# results fit to symlinking support.
+--source include/have_symlink.inc
##### Execute the test of "table" files
# MyISAM has files per PK, UI, ...
@@ -63,7 +66,6 @@ let $MAX_VALUE= (2147483646);
# Generate the prerequisites ($variables, @variables, tables) needed
--source suite/parts/inc/partition.pre
-# --source inc/partition.pre
##### Workarounds for known open engine specific bugs
# none
@@ -71,7 +73,6 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_basic.inc
-# --source inc/partition_basic.inc
#------------------------------------------------------------------------------#
# Execute storage engine specific tests
@@ -79,4 +80,3 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Cleanup
--source suite/parts/inc/partition_cleanup.inc
-# --source inc/partition_cleanup.inc
diff --git a/mysql-test/suite/parts/t/partition_basic_ndb.test b/mysql-test/suite/parts/t/partition_basic_ndb.test
index 2e6f830eefc..273d92ac80d 100644
--- a/mysql-test/suite/parts/t/partition_basic_ndb.test
+++ b/mysql-test/suite/parts/t/partition_basic_ndb.test
@@ -6,7 +6,7 @@
# NDB branch #
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
+# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@@ -18,7 +18,7 @@
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
-# Please read the README at the end of include/partition.pre before changing
+# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@@ -48,8 +48,8 @@ let $more_pk_ui_tests= 0;
# Engine specific settings and requirements
##### Storage engine to be tested
-let $engine= 'ndbcluster';
--source include/have_ndb.inc
+let $engine= 'ndbcluster';
##### Execute the test of "table" files
# NDB has no files per PK, UI, ...
@@ -68,18 +68,16 @@ let $MAX_VALUE= (2147483646);
# Generate the prerequisites ($variables, @variables, tables) needed
--source suite/parts/inc/partition.pre
-# --source inc/partition.pre
##### Workarounds for known open engine specific bugs
# Bug#18730 Partitions: NDB, crash on SELECT MIN(<unique column>)
-let $fixed_bug18730= 0;
+let $fixed_bug18730= 1;
# Bug#18735: Partitions: NDB, UNIQUE INDEX, UPDATE, strange server response
let $fixed_bug18735= 0;
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_basic.inc
-# --source inc/partition_basic.inc
#------------------------------------------------------------------------------#
# Execute storage engine specific tests
@@ -87,4 +85,3 @@ let $fixed_bug18735= 0;
#------------------------------------------------------------------------------#
# Cleanup
--source suite/parts/inc/partition_cleanup.inc
-# --source inc/partition_cleanup.inc
diff --git a/mysql-test/suite/parts/t/partition_bit_innodb.test b/mysql-test/suite/parts/t/partition_bit_innodb.test
index 7bc74036b2e..9b8eb90bb18 100644
--- a/mysql-test/suite/parts/t/partition_bit_innodb.test
+++ b/mysql-test/suite/parts/t/partition_bit_innodb.test
@@ -18,7 +18,7 @@
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
-# Please read the README at the end of include/partition.pre before changing
+# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@@ -53,5 +53,3 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_bit.inc
-# --source inc/partition_basic.inc
-
diff --git a/mysql-test/suite/parts/t/partition_bit_myisam.test b/mysql-test/suite/parts/t/partition_bit_myisam.test
index c21ca104ca5..d2503c4923a 100644
--- a/mysql-test/suite/parts/t/partition_bit_myisam.test
+++ b/mysql-test/suite/parts/t/partition_bit_myisam.test
@@ -18,7 +18,7 @@
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
-# Please read the README at the end of include/partition.pre before changing
+# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@@ -52,5 +52,4 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_bit.inc
-# --source inc/partition_basic.inc
diff --git a/mysql-test/suite/parts/t/partition_bit_ndb.test b/mysql-test/suite/parts/t/partition_bit_ndb.test
index 9e21c7de158..94e4119031c 100644
--- a/mysql-test/suite/parts/t/partition_bit_ndb.test
+++ b/mysql-test/suite/parts/t/partition_bit_ndb.test
@@ -18,7 +18,7 @@
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
-# Please read the README at the end of include/partition.pre before changing
+# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@@ -53,5 +53,3 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_bit.inc
-# --source inc/partition_basic.inc
-
diff --git a/mysql-test/suite/parts/t/partition_char_innodb.test b/mysql-test/suite/parts/t/partition_char_innodb.test
index 27295084de4..0fd74dc46bd 100644
--- a/mysql-test/suite/parts/t/partition_char_innodb.test
+++ b/mysql-test/suite/parts/t/partition_char_innodb.test
@@ -18,7 +18,7 @@
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
-# Please read the README at the end of include/partition.pre before changing
+# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@@ -35,8 +35,8 @@ let $debug= 0;
# Engine specific settings and requirements
##### Storage engine to be tested
-let $engine= 'InnoDB';
--source include/have_innodb.inc
+let $engine= 'InnoDB';
##### max rows to be inserted
let $maxrows=65535;
@@ -51,11 +51,3 @@ let $maxrows=65535;
--source suite/parts/inc/partition_set.inc
--source suite/parts/inc/partition_blob.inc
--source suite/parts/inc/partition_text.inc
-# --source inc/partition_char.inc
-# --source inc/partition_binary.inc
-# --source inc/partition_varchar.inc
-# --source inc/partition_varbinary.inc
-# --source inc/partition_enum.inc
-# --source inc/partition_set.inc
-# --source inc/partition_blob.inc
-# --source inc/partition_text.inc
diff --git a/mysql-test/suite/parts/t/partition_char_myisam.test b/mysql-test/suite/parts/t/partition_char_myisam.test
index bdcb2cd9c24..63f478ec4ba 100644
--- a/mysql-test/suite/parts/t/partition_char_myisam.test
+++ b/mysql-test/suite/parts/t/partition_char_myisam.test
@@ -1,9 +1,9 @@
################################################################################
-# t/partition_special_myisam.test #
+# t/partition_char_myisam.test #
# #
# Purpose: #
-# different Tests #
-# MYISAM branch #
+# Tests around character types #
+# MyISAM branch #
# #
#------------------------------------------------------------------------------#
# Original Author: HH #
@@ -18,7 +18,7 @@
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
-# Please read the README at the end of include/partition.pre before changing
+# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@@ -37,7 +37,16 @@ let $debug= 0;
##### Storage engine to be tested
let $engine= 'MyISAM';
+##### max rows to be inserted
+let $maxrows=65535;
+
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
---source suite/parts/inc/partition_key_4col.inc
-# --source inc/partition_key_4col.inc
+--source suite/parts/inc/partition_char.inc
+--source suite/parts/inc/partition_binary.inc
+--source suite/parts/inc/partition_varchar.inc
+--source suite/parts/inc/partition_varbinary.inc
+--source suite/parts/inc/partition_enum.inc
+--source suite/parts/inc/partition_set.inc
+--source suite/parts/inc/partition_blob.inc
+--source suite/parts/inc/partition_text.inc
diff --git a/mysql-test/suite/parts/t/partition_datetime_innodb.test b/mysql-test/suite/parts/t/partition_datetime_innodb.test
index eba0bc3e10b..ec292fa04cf 100644
--- a/mysql-test/suite/parts/t/partition_datetime_innodb.test
+++ b/mysql-test/suite/parts/t/partition_datetime_innodb.test
@@ -18,7 +18,7 @@
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
-# Please read the README at the end of include/partition.pre before changing
+# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@@ -35,8 +35,8 @@ let $debug= 0;
# Engine specific settings and requirements
##### Storage engine to be tested
-let $engine= 'InnoDB';
--source include/have_innodb.inc
+let $engine= 'InnoDB';
##### max rows to be inserted
let $maxrows=1024;
@@ -48,8 +48,3 @@ let $maxrows=1024;
--source suite/parts/inc/partition_time.inc
--source suite/parts/inc/partition_datetime.inc
--source suite/parts/inc/partition_year.inc
-# --source inc/partition_timestamp.inc
-# --source inc/partition_date.inc
-# --source inc/partition_time.inc
-# --source inc/partition_datetime.inc
-# --source inc/partition_year.inc
diff --git a/mysql-test/suite/parts/t/partition_datetime_myisam.test b/mysql-test/suite/parts/t/partition_datetime_myisam.test
index 1fd6527d38e..25e304d5dcc 100644
--- a/mysql-test/suite/parts/t/partition_datetime_myisam.test
+++ b/mysql-test/suite/parts/t/partition_datetime_myisam.test
@@ -18,7 +18,7 @@
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
-# Please read the README at the end of include/partition.pre before changing
+# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@@ -47,8 +47,3 @@ let $maxrows=65535;
--source suite/parts/inc/partition_time.inc
--source suite/parts/inc/partition_datetime.inc
--source suite/parts/inc/partition_year.inc
-# --source inc/partition_timestamp.inc
-# --source inc/partition_date.inc
-# --source inc/partition_time.inc
-# --source inc/partition_datetime.inc
-# --source inc/partition_year.inc
diff --git a/mysql-test/suite/parts/t/partition_decimal_innodb.test b/mysql-test/suite/parts/t/partition_decimal_innodb.test
index 22e759ec5d9..6d0aa156abe 100644
--- a/mysql-test/suite/parts/t/partition_decimal_innodb.test
+++ b/mysql-test/suite/parts/t/partition_decimal_innodb.test
@@ -18,7 +18,7 @@
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
-# Please read the README at the end of include/partition.pre before changing
+# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@@ -35,8 +35,8 @@ let $debug= 0;
# Engine specific settings and requirements
##### Storage engine to be tested
-let $engine= 'InnoDB';
--source include/have_innodb.inc
+let $engine= 'InnoDB';
##### number of rows to be inserted
let $maxrows=1024;
@@ -44,4 +44,3 @@ let $maxrows=1024;
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_decimal.inc
-# --source inc/partition_decimal.inc
diff --git a/mysql-test/suite/parts/t/partition_decimal_myisam.test b/mysql-test/suite/parts/t/partition_decimal_myisam.test
index 9be50028647..49fc64cbd37 100644
--- a/mysql-test/suite/parts/t/partition_decimal_myisam.test
+++ b/mysql-test/suite/parts/t/partition_decimal_myisam.test
@@ -18,7 +18,7 @@
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
-# Please read the README at the end of include/partition.pre before changing
+# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@@ -42,4 +42,3 @@ let $maxrows=65535;
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_decimal.inc
-# --source inc/partition_decimal.inc
diff --git a/mysql-test/suite/parts/t/partition_engine_innodb.test b/mysql-test/suite/parts/t/partition_engine_innodb.test
index 6205c970b21..13a7b133fa1 100644
--- a/mysql-test/suite/parts/t/partition_engine_innodb.test
+++ b/mysql-test/suite/parts/t/partition_engine_innodb.test
@@ -6,7 +6,7 @@
# InnoDB branch #
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
+# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@@ -18,7 +18,7 @@
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
-# Please read the README at the end of include/partition.pre before changing
+# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@@ -46,8 +46,8 @@ let $more_pk_ui_tests= 0;
# Engine specific settings and requirements
##### Storage engine to be tested
-let $engine= 'InnoDB';
--source include/have_innodb.inc
+let $engine= 'InnoDB';
##### Execute the test of "table" files
# InnoDB has no files per PK, UI, ...
@@ -63,7 +63,6 @@ let $MAX_VALUE= (2147483646);
# Generate the prerequisites ($variables, @variables, tables) needed
--source suite/parts/inc/partition.pre
-# --source inc/partition.pre
##### Workarounds for known open engine specific bugs
# none
@@ -71,7 +70,6 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_engine.inc
-# --source inc/partition_engine.inc
#------------------------------------------------------------------------------#
# Execute storage engine specific tests
@@ -79,4 +77,3 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Cleanup
--source suite/parts/inc/partition_cleanup.inc
-# --source inc/partition_cleanup.inc
diff --git a/mysql-test/suite/parts/t/partition_engine_myisam.test b/mysql-test/suite/parts/t/partition_engine_myisam.test
index 437e20ab3ee..a7696d690db 100644
--- a/mysql-test/suite/parts/t/partition_engine_myisam.test
+++ b/mysql-test/suite/parts/t/partition_engine_myisam.test
@@ -6,7 +6,7 @@
# MyISAM branch #
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
+# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@@ -18,7 +18,7 @@
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
-# Please read the README at the end of include/partition.pre before changing
+# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@@ -62,7 +62,6 @@ let $MAX_VALUE= (2147483646);
# Generate the prerequisites ($variables, @variables, tables) needed
--source suite/parts/inc/partition.pre
-# --source inc/partition.pre
##### Workarounds for known open engine specific bugs
# none
@@ -70,7 +69,6 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_engine.inc
-# --source inc/partition_engine.inc
#------------------------------------------------------------------------------#
# Execute storage engine specific tests
@@ -78,4 +76,3 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Cleanup
--source suite/parts/inc/partition_cleanup.inc
-# --source inc/partition_cleanup.inc
diff --git a/mysql-test/suite/parts/t/partition_engine_ndb.test b/mysql-test/suite/parts/t/partition_engine_ndb.test
index 223e9b035c6..1e185c8ebaa 100644
--- a/mysql-test/suite/parts/t/partition_engine_ndb.test
+++ b/mysql-test/suite/parts/t/partition_engine_ndb.test
@@ -6,7 +6,7 @@
# NDB branch #
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
+# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@@ -18,7 +18,7 @@
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
-# Please read the README at the end of include/partition.pre before changing
+# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@@ -67,7 +67,6 @@ let $MAX_VALUE= (2147483646);
# Generate the prerequisites ($variables, @variables, tables) needed
--source suite/parts/inc/partition.pre
-# --source inc/partition.pre
##### Workarounds for known open engine specific bugs
# none
@@ -75,7 +74,6 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_engine.inc
-# --source inc/partition_engine.inc
#------------------------------------------------------------------------------#
# Execute storage engine specific tests
@@ -83,4 +81,3 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Cleanup
--source suite/parts/inc/partition_cleanup.inc
-# --source inc/partition_cleanup.inc
diff --git a/mysql-test/suite/parts/t/partition_float_innodb.test b/mysql-test/suite/parts/t/partition_float_innodb.test
index 3395d1812d2..2f1fe723dad 100644
--- a/mysql-test/suite/parts/t/partition_float_innodb.test
+++ b/mysql-test/suite/parts/t/partition_float_innodb.test
@@ -1,9 +1,9 @@
################################################################################
-# t/partition_float_myisam.test #
+# t/partition_float_innodb.test #
# #
# Purpose: #
# Tests around float type #
-# MyISAM branch #
+# INNODB branch #
# #
#------------------------------------------------------------------------------#
# Original Author: HH #
@@ -14,11 +14,11 @@
################################################################################
#
-# NOTE: PLEASE DO NOT ADD NOT MYISAM SPECIFIC TESTCASES HERE !
+# NOTE: PLEASE DO NOT ADD NOT INNODB SPECIFIC TESTCASES HERE !
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
-# Please read the README at the end of include/partition.pre before changing
+# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@@ -35,8 +35,8 @@ let $debug= 0;
# Engine specific settings and requirements
##### Storage engine to be tested
-let $engine= 'InnoDB';
--source include/have_innodb.inc
+let $engine= 'InnoDB';
##### Number of row to be inserted.
let $maxrows=1024;
@@ -45,5 +45,3 @@ let $maxrows=1024;
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_float.inc
--source suite/parts/inc/partition_double.inc
-# --source inc/partition_float.inc
-# --source inc/partition_double.inc
diff --git a/mysql-test/suite/parts/t/partition_float_myisam.test b/mysql-test/suite/parts/t/partition_float_myisam.test
index 57ef91a3169..51e0f1f5a21 100644
--- a/mysql-test/suite/parts/t/partition_float_myisam.test
+++ b/mysql-test/suite/parts/t/partition_float_myisam.test
@@ -18,7 +18,7 @@
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
-# Please read the README at the end of include/partition.pre before changing
+# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@@ -43,5 +43,3 @@ let $maxrows=16384;
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_float.inc
--source suite/parts/inc/partition_double.inc
-# --source inc/partition_float.inc
-# --source inc/partition_double.inc
diff --git a/mysql-test/suite/parts/t/partition_int_innodb.test b/mysql-test/suite/parts/t/partition_int_innodb.test
index dc14b369654..698a2c93c22 100644
--- a/mysql-test/suite/parts/t/partition_int_innodb.test
+++ b/mysql-test/suite/parts/t/partition_int_innodb.test
@@ -18,7 +18,7 @@
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
-# Please read the README at the end of include/partition.pre before changing
+# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@@ -35,8 +35,8 @@ let $debug= 0;
# Engine specific settings and requirements
##### Storage engine to be tested
-let $engine= 'InnoDB';
--source include/have_innodb.inc
+let $engine= 'InnoDB';
##### max rows to be inserted
let $maxrows=1024;
@@ -48,8 +48,3 @@ let $maxrows=1024;
--source suite/parts/inc/partition_int.inc
--source suite/parts/inc/partition_mediumint.inc
--source suite/parts/inc/partition_bigint.inc
-# --source inc/partition_tinyint.inc
-# --source inc/partition_samllint.inc
-# --source inc/partition_int.inc
-# --source inc/partition_mediumint.inc
-# --source inc/partition_bigint.inc
diff --git a/mysql-test/suite/parts/t/partition_int_myisam.test b/mysql-test/suite/parts/t/partition_int_myisam.test
index c85a1471a35..b0ede4995e8 100644
--- a/mysql-test/suite/parts/t/partition_int_myisam.test
+++ b/mysql-test/suite/parts/t/partition_int_myisam.test
@@ -18,7 +18,7 @@
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
-# Please read the README at the end of include/partition.pre before changing
+# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@@ -46,8 +46,3 @@ let $maxrows=65535;
--source suite/parts/inc/partition_int.inc
--source suite/parts/inc/partition_mediumint.inc
--source suite/parts/inc/partition_bigint.inc
-# --source inc/partition_tinyint.inc
-# --source inc/partition_samllint.inc
-# --source inc/partition_int.inc
-# --source inc/partition_mediumint.inc
-# --source inc/partition_bigint.inc
diff --git a/mysql-test/suite/parts/t/partition_int_ndb.test b/mysql-test/suite/parts/t/partition_int_ndb.test
index dfa853bed16..0a60408292a 100644
--- a/mysql-test/suite/parts/t/partition_int_ndb.test
+++ b/mysql-test/suite/parts/t/partition_int_ndb.test
@@ -18,7 +18,7 @@
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
-# Please read the README at the end of include/partition.pre before changing
+# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@@ -45,8 +45,3 @@ let $engine= 'NDB';
--source suite/parts/inc/partition_int.inc
--source suite/parts/inc/partition_mediumint.inc
--source suite/parts/inc/partition_bigint.inc
-# --source inc/partition_tinyint.inc
-# --source inc/partition_samllint.inc
-# --source inc/partition_int.inc
-# --source inc/partition_mediumint.inc
-# --source inc/partition_bigint.inc
diff --git a/mysql-test/suite/parts/t/partition_special_innodb.test b/mysql-test/suite/parts/t/partition_special_innodb.test
index f552d64f4e4..598dfea1e27 100644
--- a/mysql-test/suite/parts/t/partition_special_innodb.test
+++ b/mysql-test/suite/parts/t/partition_special_innodb.test
@@ -18,7 +18,7 @@
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
-# Please read the README at the end of include/partition.pre before changing
+# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@@ -35,8 +35,8 @@ let $debug= 0;
# Engine specific settings and requirements
##### Storage engine to be tested
-let $engine= 'InnoDB';
--source include/have_innodb.inc
+let $engine= 'InnoDB';
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
@@ -44,7 +44,3 @@ let $engine= 'InnoDB';
--source suite/parts/inc/partition_key_8col.inc
--source suite/parts/inc/partition_key_16col.inc
--source suite/parts/inc/partition_key_32col.inc
-# --source inc/partition_key_4col.inc
-# --source inc/partition_key_8col.inc
-# --source inc/partition_key_16col.inc
-# --source inc/partition_key_32col.inc
diff --git a/mysql-test/suite/parts/t/partition_special_myisam.test b/mysql-test/suite/parts/t/partition_special_myisam.test
index c87d39ab577..e1737ebc3c2 100644
--- a/mysql-test/suite/parts/t/partition_special_myisam.test
+++ b/mysql-test/suite/parts/t/partition_special_myisam.test
@@ -18,7 +18,7 @@
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
-# Please read the README at the end of include/partition.pre before changing
+# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@@ -43,7 +43,3 @@ let $engine= 'MyISAM';
--source suite/parts/inc/partition_key_8col.inc
--source suite/parts/inc/partition_key_16col.inc
--source suite/parts/inc/partition_key_32col.inc
-# --source inc/partition_key_4col.inc
-# --source inc/partition_key_8col.inc
-# --source inc/partition_key_16col.inc
-# --source inc/partition_key_32col.inc
diff --git a/mysql-test/suite/parts/t/partition_syntax_innodb.test b/mysql-test/suite/parts/t/partition_syntax_innodb.test
index ce62b06bd6f..6e65337d267 100644
--- a/mysql-test/suite/parts/t/partition_syntax_innodb.test
+++ b/mysql-test/suite/parts/t/partition_syntax_innodb.test
@@ -6,7 +6,7 @@
# InnoDB branch #
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
+# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@@ -18,7 +18,7 @@
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
-# Please read the README at the end of include/partition.pre before changing
+# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@@ -46,8 +46,8 @@ let $more_pk_ui_tests= 0;
# Engine specific settings and requirements
##### Storage engine to be tested
-let $engine= 'InnoDB';
--source include/have_innodb.inc
+let $engine= 'InnoDB';
##### Execute the test of "table" files
# InnoDB has no files per PK, UI, ...
@@ -63,7 +63,6 @@ let $MAX_VALUE= (2147483646);
# Generate the prerequisites ($variables, @variables, tables) needed
--source suite/parts/inc/partition.pre
-# --source inc/partition.pre
##### Workarounds for known open engine specific bugs
# none
@@ -71,7 +70,6 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_syntax.inc
-# --source inc/partition_syntax.inc
#------------------------------------------------------------------------------#
# Execute storage engine specific tests
@@ -79,4 +77,3 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Cleanup
--source suite/parts/inc/partition_cleanup.inc
-# --source inc/partition_cleanup.inc
diff --git a/mysql-test/suite/parts/t/partition_syntax_myisam.test b/mysql-test/suite/parts/t/partition_syntax_myisam.test
index 62396580b50..7777833f6d4 100644
--- a/mysql-test/suite/parts/t/partition_syntax_myisam.test
+++ b/mysql-test/suite/parts/t/partition_syntax_myisam.test
@@ -6,7 +6,7 @@
# MyISAM branch #
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
+# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@@ -18,7 +18,7 @@
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
-# Please read the README at the end of include/partition.pre before changing
+# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@@ -62,7 +62,6 @@ let $MAX_VALUE= (2147483646);
# Generate the prerequisites ($variables, @variables, tables) needed
--source suite/parts/inc/partition.pre
-# --source inc/partition.pre
##### Workarounds for known open engine specific bugs
# none
@@ -70,7 +69,6 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_syntax.inc
-# --source inc/partition_syntax.inc
#------------------------------------------------------------------------------#
# Execute storage engine specific tests
@@ -78,4 +76,3 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Cleanup
--source suite/parts/inc/partition_cleanup.inc
-# --source inc/partition_cleanup.inc
diff --git a/mysql-test/suite/parts/t/partition_syntax_ndb.test b/mysql-test/suite/parts/t/partition_syntax_ndb.test
index 3eb453ce7ea..90b74452ab1 100644
--- a/mysql-test/suite/parts/t/partition_syntax_ndb.test
+++ b/mysql-test/suite/parts/t/partition_syntax_ndb.test
@@ -6,7 +6,7 @@
# NDB branch #
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
+# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@@ -18,7 +18,7 @@
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
-# Please read the README at the end of include/partition.pre before changing
+# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@@ -47,8 +47,8 @@ let $more_pk_ui_tests= 0;
# Engine specific settings and requirements
##### Storage engine to be tested
-let $engine= 'ndbcluster';
--source include/have_ndb.inc
+let $engine= 'ndbcluster';
##### Execute the test of "table" files
# NDB has no files per PK, UI, ...
@@ -67,7 +67,6 @@ let $MAX_VALUE= (2147483646);
# Generate the prerequisites ($variables, @variables, tables) needed
--source suite/parts/inc/partition.pre
-# --source inc/partition.pre
##### Workarounds for known open engine specific bugs
# Bug#18735: Partitions: NDB, UNIQUE INDEX, UPDATE, strange server response
@@ -76,7 +75,6 @@ let $fixed_bug18735= 0;
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_syntax.inc
-# --source inc/partition_syntax.inc
#------------------------------------------------------------------------------#
# Execute storage engine specific tests
@@ -84,4 +82,3 @@ let $fixed_bug18735= 0;
#------------------------------------------------------------------------------#
# Cleanup
--source suite/parts/inc/partition_cleanup.inc
-# --source inc/partition_cleanup.inc
diff --git a/mysql-test/suite/parts/t/partition_value_innodb.test b/mysql-test/suite/parts/t/partition_value_innodb.test
index 2e3c6ff98ad..9d59533a54e 100644
--- a/mysql-test/suite/parts/t/partition_value_innodb.test
+++ b/mysql-test/suite/parts/t/partition_value_innodb.test
@@ -6,7 +6,7 @@
# InnoDB branch #
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
+# Original Author: mleich #
# Original Date: 2006-04-11 #
# Change Author: #
# Change Date: #
@@ -18,7 +18,7 @@
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
-# Please read the README at the end of include/partition.pre before changing
+# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@@ -46,8 +46,8 @@ let $more_pk_ui_tests= 0;
# Engine specific settings and requirements
##### Storage engine to be tested
-let $engine= 'InnoDB';
--source include/have_innodb.inc
+let $engine= 'InnoDB';
##### Execute the test of "table" files
# InnoDB has no files per PK, UI, ...
@@ -63,7 +63,6 @@ let $MAX_VALUE= (2147483646);
# Generate the prerequisites ($variables, @variables, tables) needed
--source suite/parts/inc/partition.pre
-# --source inc/partition.pre
##### Workarounds for known open engine specific bugs
# none
@@ -71,7 +70,6 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_value.inc
-# --source inc/partition_value.inc
#------------------------------------------------------------------------------#
# Execute storage engine specific tests
@@ -79,4 +77,3 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Cleanup
--source suite/parts/inc/partition_cleanup.inc
-# --source inc/partition_cleanup.inc
diff --git a/mysql-test/suite/parts/t/partition_value_myisam.test b/mysql-test/suite/parts/t/partition_value_myisam.test
index 78e781111f7..d6020669509 100644
--- a/mysql-test/suite/parts/t/partition_value_myisam.test
+++ b/mysql-test/suite/parts/t/partition_value_myisam.test
@@ -6,7 +6,7 @@
# MyISAM branch #
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
+# Original Author: mleich #
# Original Date: 2006-04-11 #
# Change Author: #
# Change Date: #
@@ -18,7 +18,7 @@
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
-# Please read the README at the end of include/partition.pre before changing
+# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@@ -62,7 +62,6 @@ let $MAX_VALUE= (2147483646);
# Generate the prerequisites ($variables, @variables, tables) needed
--source suite/parts/inc/partition.pre
-# --source inc/partition.pre
##### Workarounds for known open engine specific bugs
# none
@@ -70,7 +69,6 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_value.inc
-# --source inc/partition_value.inc
#------------------------------------------------------------------------------#
# Execute storage engine specific tests
@@ -78,4 +76,3 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Cleanup
--source suite/parts/inc/partition_cleanup.inc
-# --source inc/partition_cleanup.inc
diff --git a/mysql-test/suite/parts/t/partition_value_ndb.test b/mysql-test/suite/parts/t/partition_value_ndb.test
index 94230af131e..91497c3ec42 100644
--- a/mysql-test/suite/parts/t/partition_value_ndb.test
+++ b/mysql-test/suite/parts/t/partition_value_ndb.test
@@ -6,7 +6,7 @@
# NDB branch #
# #
#------------------------------------------------------------------------------#
-# Original Author: ML #
+# Original Author: mleich #
# Original Date: 2006-04-11 #
# Change Author: #
# Change Date: #
@@ -18,7 +18,7 @@
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
-# Please read the README at the end of include/partition.pre before changing
+# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@@ -47,8 +47,8 @@ let $more_pk_ui_tests= 0;
# Engine specific settings and requirements
##### Storage engine to be tested
-let $engine= 'ndbcluster';
--source include/have_ndb.inc
+let $engine= 'ndbcluster';
##### Execute the test of "table" files
# NDB has no files per PK, UI, ...
@@ -67,7 +67,6 @@ let $MAX_VALUE= (2147483646);
# Generate the prerequisites ($variables, @variables, tables) needed
--source suite/parts/inc/partition.pre
-# --source inc/partition.pre
##### Workarounds for known open engine specific bugs
# none
@@ -75,7 +74,6 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_value.inc
-# --source inc/partition_value.inc
#------------------------------------------------------------------------------#
# Execute storage engine specific tests
@@ -83,4 +81,3 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Cleanup
--source suite/parts/inc/partition_cleanup.inc
-# --source inc/partition_cleanup.inc
diff --git a/mysql-test/suite/rpl/data/rpl_bug28618.dat b/mysql-test/suite/rpl/data/rpl_bug28618.dat
new file mode 100644
index 00000000000..b800c4dd39d
--- /dev/null
+++ b/mysql-test/suite/rpl/data/rpl_bug28618.dat
@@ -0,0 +1,3 @@
+1|master only
+2|master only
+3|master only
diff --git a/mysql-test/suite/rpl/include/rpl_mixed_check_select.inc b/mysql-test/suite/rpl/include/rpl_mixed_check_select.inc
index 5d3b80e077b..b3e0cefbbd7 100644
--- a/mysql-test/suite/rpl/include/rpl_mixed_check_select.inc
+++ b/mysql-test/suite/rpl/include/rpl_mixed_check_select.inc
@@ -7,15 +7,15 @@
--echo ==========MASTER==========
SELECT COUNT(*) FROM t1;
-SELECT * FROM t1;
+SELECT * FROM t1 ORDER BY a;
SELECT COUNT(*) FROM t2;
-SELECT * FROM t2;
+SELECT * FROM t2 ORDER BY a;
sync_slave_with_master;
--echo ==========SLAVE===========
USE test_rpl;
SELECT COUNT(*) FROM t1;
-SELECT * FROM t1;
+SELECT * FROM t1 ORDER BY a;
SELECT COUNT(*) FROM t2;
-SELECT * FROM t2;
+SELECT * FROM t2 ORDER BY a;
connection master;
diff --git a/mysql-test/suite/rpl/include/rpl_mixed_check_view.inc b/mysql-test/suite/rpl/include/rpl_mixed_check_view.inc
index 43feedfe64a..a9f7ad8cd68 100644
--- a/mysql-test/suite/rpl/include/rpl_mixed_check_view.inc
+++ b/mysql-test/suite/rpl/include/rpl_mixed_check_view.inc
@@ -7,11 +7,11 @@
--echo ==========MASTER==========
SHOW CREATE VIEW v1;
-SELECT * FROM v1;
+SELECT * FROM v1 ORDER BY a;
sync_slave_with_master;
--echo ==========SLAVE===========
USE test_rpl;
SHOW CREATE VIEW v1;
-SELECT * FROM v1;
+SELECT * FROM v1 ORDER BY a;
connection master;
diff --git a/mysql-test/suite/rpl/include/rpl_mixed_dml.inc b/mysql-test/suite/rpl/include/rpl_mixed_dml.inc
index e210ccd907f..d7041d82a2a 100644
--- a/mysql-test/suite/rpl/include/rpl_mixed_dml.inc
+++ b/mysql-test/suite/rpl/include/rpl_mixed_dml.inc
@@ -54,7 +54,7 @@ DELETE FROM t2 WHERE a = 2;
--copy_file ./suite/rpl/data/rpl_mixed.dat $MYSQLTEST_VARDIR/tmp/rpl_mixed.dat
LOAD DATA INFILE '../tmp/rpl_mixed.dat' INTO TABLE t1 FIELDS TERMINATED BY '|' ;
--remove_file $MYSQLTEST_VARDIR/tmp/rpl_mixed.dat
-SELECT * FROM t1;
+SELECT * FROM t1 ORDER BY a;
--source suite/rpl/include/rpl_mixed_check_select.inc
--source suite/rpl/include/rpl_mixed_clear_tables.inc
@@ -75,7 +75,7 @@ DELETE FROM t1 WHERE a = 2;
--echo
--echo ******************** SELECT ********************
INSERT INTO t1 VALUES(1, 't1, text 1');
-SELECT * FROM t1 WHERE b <> UUID();
+SELECT * FROM t1 WHERE b <> UUID() ORDER BY a;
--source suite/rpl/include/rpl_mixed_clear_tables.inc
# JOIN
@@ -85,8 +85,8 @@ INSERT INTO t1 VALUES(1, 'CCC');
INSERT INTO t1 VALUES(2, 'DDD');
INSERT INTO t2 VALUES(1, 'DDD');
INSERT INTO t2 VALUES(2, 'CCC');
-SELECT * FROM t1 LEFT JOIN t2 ON t1.a = t2.a;
-SELECT * FROM t1 INNER JOIN t2 ON t1.b = t2.b;
+SELECT * FROM t1 LEFT JOIN t2 ON t1.a = t2.a ORDER BY t1.a,t2.a;
+SELECT * FROM t1 INNER JOIN t2 ON t1.b = t2.b ORDER BY t1.a,t2.a;
--source suite/rpl/include/rpl_mixed_clear_tables.inc
# UNION
diff --git a/mysql-test/suite/rpl/r/rpl_binlog_grant.result b/mysql-test/suite/rpl/r/rpl_binlog_grant.result
index 43a21913cf6..72dc58effa1 100644
--- a/mysql-test/suite/rpl/r/rpl_binlog_grant.result
+++ b/mysql-test/suite/rpl/r/rpl_binlog_grant.result
@@ -1,3 +1,9 @@
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
drop database if exists d1;
create database d1;
use d1;
diff --git a/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result b/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result
index fe5a5b28682..e268e4c2e51 100644
--- a/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result
+++ b/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result
@@ -72,7 +72,7 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
-Last_Errno 1534
+Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 2 size mismatch - master has size 10, test.t2 on slave has size 6. Master's column size should be <= the slave's column size.
Skip_Counter 0
Exec_Master_Log_Pos #
@@ -90,7 +90,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
-Last_SQL_Errno 1534
+Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 2 size mismatch - master has size 10, test.t2 on slave has size 6. Master's column size should be <= the slave's column size.
STOP SLAVE;
RESET SLAVE;
@@ -139,7 +139,7 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
-Last_Errno 1534
+Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3
Skip_Counter 0
Exec_Master_Log_Pos #
@@ -157,7 +157,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
-Last_SQL_Errno 1534
+Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
@@ -201,7 +201,7 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
-Last_Errno 1534
+Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3
Skip_Counter 0
Exec_Master_Log_Pos #
@@ -219,7 +219,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
-Last_SQL_Errno 1534
+Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
@@ -263,7 +263,7 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
-Last_Errno 1534
+Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246
Skip_Counter 0
Exec_Master_Log_Pos #
@@ -281,7 +281,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
-Last_SQL_Errno 1534
+Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
@@ -324,7 +324,7 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
-Last_Errno 1534
+Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3
Skip_Counter 0
Exec_Master_Log_Pos #
@@ -342,7 +342,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
-Last_SQL_Errno 1534
+Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3;
*** Drop t6 ***
@@ -436,7 +436,7 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
-Last_Errno 1534
+Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5
Skip_Counter 0
Exec_Master_Log_Pos #
@@ -454,7 +454,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
-Last_SQL_Errno 1534
+Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
@@ -497,7 +497,7 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
-Last_Errno 1534
+Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252
Skip_Counter 0
Exec_Master_Log_Pos #
@@ -515,7 +515,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
-Last_SQL_Errno 1534
+Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
@@ -615,6 +615,66 @@ c1 c2 c3 c4 c5 c6 c7
1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP
2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP
3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP
+*** Create t14a on slave ***
+STOP SLAVE;
+RESET SLAVE;
+CREATE TABLE t14a (c1 INT KEY, c4 BLOB, c5 CHAR(5),
+c6 INT DEFAULT '1',
+c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
+)ENGINE='InnoDB';
+*** Create t14a on Master ***
+CREATE TABLE t14a (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
+) ENGINE='InnoDB';
+RESET MASTER;
+*** Start Slave ***
+START SLAVE;
+*** Master Data Insert ***
+set @b1 = 'b1b1b1b1';
+set @b1 = concat(@b1,@b1);
+INSERT INTO t14a () VALUES(1,@b1,'Kyle'),
+(2,@b1,'JOE'),
+(3,@b1,'QA');
+SELECT * FROM t14a ORDER BY c1;
+c1 c4 c5
+1 b1b1b1b1b1b1b1b1 Kyle
+2 b1b1b1b1b1b1b1b1 JOE
+3 b1b1b1b1b1b1b1b1 QA
+*** Select on Slave ****
+SELECT * FROM t14a ORDER BY c1;
+c1 c4 c5 c6 c7
+1 b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP
+2 b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP
+3 b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP
+STOP SLAVE;
+RESET SLAVE;
+*** Master Drop c5 ***
+ALTER TABLE t14a DROP COLUMN c5;
+RESET MASTER;
+*** Start Slave ***
+START SLAVE;
+*** Master Data Insert ***
+set @b1 = 'b1b1b1b1';
+set @b1 = concat(@b1,@b1);
+INSERT INTO t14a () VALUES(4,@b1),
+(5,@b1),
+(6,@b1);
+SELECT * FROM t14a ORDER BY c1;
+c1 c4
+1 b1b1b1b1b1b1b1b1
+2 b1b1b1b1b1b1b1b1
+3 b1b1b1b1b1b1b1b1
+4 b1b1b1b1b1b1b1b1
+5 b1b1b1b1b1b1b1b1
+6 b1b1b1b1b1b1b1b1
+*** Select on Slave ****
+SELECT * FROM t14a ORDER BY c1;
+c1 c4 c5 c6 c7
+1 b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP
+2 b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP
+3 b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP
+4 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP
+5 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP
+6 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP
*** connect to master and drop columns ***
ALTER TABLE t14 DROP COLUMN c2;
ALTER TABLE t14 DROP COLUMN c4;
@@ -707,7 +767,7 @@ Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 1060
Last_SQL_Error Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5'
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
*** Try to insert in master ****
INSERT INTO t15 () VALUES(5,2.00,'Replication Testing',@b1,'Buda',2);
@@ -723,6 +783,7 @@ c1 c2 c3 c4 c5 c6 c7
1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP
2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP
3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP
+5 2.00 Replication Testing b1b1b1b1b1b1b1b1 Buda 2 CURRENT_TIMESTAMP
*** DROP TABLE t15 ***
DROP TABLE t15;
*** Create t16 on slave ***
@@ -822,7 +883,7 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
-Last_Errno 1534
+Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2
Skip_Counter 0
Exec_Master_Log_Pos #
@@ -840,7 +901,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
-Last_SQL_Errno 1534
+Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
diff --git a/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result b/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result
index e70a2efaf29..364354d3a17 100644
--- a/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result
+++ b/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result
@@ -72,7 +72,7 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
-Last_Errno 1534
+Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 2 size mismatch - master has size 10, test.t2 on slave has size 6. Master's column size should be <= the slave's column size.
Skip_Counter 0
Exec_Master_Log_Pos #
@@ -90,7 +90,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
-Last_SQL_Errno 1534
+Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 2 size mismatch - master has size 10, test.t2 on slave has size 6. Master's column size should be <= the slave's column size.
STOP SLAVE;
RESET SLAVE;
@@ -139,7 +139,7 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
-Last_Errno 1534
+Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3
Skip_Counter 0
Exec_Master_Log_Pos #
@@ -157,7 +157,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
-Last_SQL_Errno 1534
+Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
@@ -201,7 +201,7 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
-Last_Errno 1534
+Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3
Skip_Counter 0
Exec_Master_Log_Pos #
@@ -219,7 +219,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
-Last_SQL_Errno 1534
+Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
@@ -263,7 +263,7 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
-Last_Errno 1534
+Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246
Skip_Counter 0
Exec_Master_Log_Pos #
@@ -281,7 +281,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
-Last_SQL_Errno 1534
+Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
@@ -324,7 +324,7 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
-Last_Errno 1534
+Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3
Skip_Counter 0
Exec_Master_Log_Pos #
@@ -342,7 +342,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
-Last_SQL_Errno 1534
+Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3;
*** Drop t6 ***
@@ -436,7 +436,7 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
-Last_Errno 1534
+Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5
Skip_Counter 0
Exec_Master_Log_Pos #
@@ -454,7 +454,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
-Last_SQL_Errno 1534
+Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
@@ -497,7 +497,7 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
-Last_Errno 1534
+Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252
Skip_Counter 0
Exec_Master_Log_Pos #
@@ -515,7 +515,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
-Last_SQL_Errno 1534
+Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
@@ -615,6 +615,66 @@ c1 c2 c3 c4 c5 c6 c7
1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP
2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP
3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP
+*** Create t14a on slave ***
+STOP SLAVE;
+RESET SLAVE;
+CREATE TABLE t14a (c1 INT KEY, c4 BLOB, c5 CHAR(5),
+c6 INT DEFAULT '1',
+c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
+)ENGINE='MyISAM';
+*** Create t14a on Master ***
+CREATE TABLE t14a (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
+) ENGINE='MyISAM';
+RESET MASTER;
+*** Start Slave ***
+START SLAVE;
+*** Master Data Insert ***
+set @b1 = 'b1b1b1b1';
+set @b1 = concat(@b1,@b1);
+INSERT INTO t14a () VALUES(1,@b1,'Kyle'),
+(2,@b1,'JOE'),
+(3,@b1,'QA');
+SELECT * FROM t14a ORDER BY c1;
+c1 c4 c5
+1 b1b1b1b1b1b1b1b1 Kyle
+2 b1b1b1b1b1b1b1b1 JOE
+3 b1b1b1b1b1b1b1b1 QA
+*** Select on Slave ****
+SELECT * FROM t14a ORDER BY c1;
+c1 c4 c5 c6 c7
+1 b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP
+2 b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP
+3 b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP
+STOP SLAVE;
+RESET SLAVE;
+*** Master Drop c5 ***
+ALTER TABLE t14a DROP COLUMN c5;
+RESET MASTER;
+*** Start Slave ***
+START SLAVE;
+*** Master Data Insert ***
+set @b1 = 'b1b1b1b1';
+set @b1 = concat(@b1,@b1);
+INSERT INTO t14a () VALUES(4,@b1),
+(5,@b1),
+(6,@b1);
+SELECT * FROM t14a ORDER BY c1;
+c1 c4
+1 b1b1b1b1b1b1b1b1
+2 b1b1b1b1b1b1b1b1
+3 b1b1b1b1b1b1b1b1
+4 b1b1b1b1b1b1b1b1
+5 b1b1b1b1b1b1b1b1
+6 b1b1b1b1b1b1b1b1
+*** Select on Slave ****
+SELECT * FROM t14a ORDER BY c1;
+c1 c4 c5 c6 c7
+1 b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP
+2 b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP
+3 b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP
+4 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP
+5 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP
+6 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP
*** connect to master and drop columns ***
ALTER TABLE t14 DROP COLUMN c2;
ALTER TABLE t14 DROP COLUMN c4;
@@ -707,7 +767,7 @@ Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 1060
Last_SQL_Error Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5'
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
*** Try to insert in master ****
INSERT INTO t15 () VALUES(5,2.00,'Replication Testing',@b1,'Buda',2);
@@ -723,6 +783,7 @@ c1 c2 c3 c4 c5 c6 c7
1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP
2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP
3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP
+5 2.00 Replication Testing b1b1b1b1b1b1b1b1 Buda 2 CURRENT_TIMESTAMP
*** DROP TABLE t15 ***
DROP TABLE t15;
*** Create t16 on slave ***
@@ -822,7 +883,7 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
-Last_Errno 1534
+Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2
Skip_Counter 0
Exec_Master_Log_Pos #
@@ -840,7 +901,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
-Last_SQL_Errno 1534
+Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
diff --git a/mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result b/mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result
index 18906617925..af460ded1e7 100644
--- a/mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result
+++ b/mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result
Binary files differ
diff --git a/mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result b/mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result
index 5bc1a13b107..f0613c16825 100644
--- a/mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result
+++ b/mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result
Binary files differ
diff --git a/mysql-test/suite/rpl/r/rpl_flushlog_loop.result b/mysql-test/suite/rpl/r/rpl_flushlog_loop.result
index b47c262eb66..ca06a5a328c 100644
--- a/mysql-test/suite/rpl/r/rpl_flushlog_loop.result
+++ b/mysql-test/suite/rpl/r/rpl_flushlog_loop.result
@@ -4,6 +4,13 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
+show variables like 'relay_log%';
+Variable_name Value
+relay_log MYSQLTEST_VARDIR/master-data/relay-log
+relay_log_index
+relay_log_info_file relay-log.info
+relay_log_purge ON
+relay_log_space_limit 0
stop slave;
change master to master_host='127.0.0.1',master_user='root',
master_password='',master_port=MASTER_PORT;
diff --git a/mysql-test/suite/rpl/r/rpl_found_rows.result b/mysql-test/suite/rpl/r/rpl_found_rows.result
new file mode 100644
index 00000000000..7e757a1d141
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_found_rows.result
@@ -0,0 +1,233 @@
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+==== 0. Setting it all up ====
+SET BINLOG_FORMAT=STATEMENT;
+**** On Master ****
+CREATE TABLE t1 (a INT);
+CREATE TABLE logtbl (sect INT, test INT, count INT);
+INSERT INTO t1 VALUES (1),(2),(3);
+INSERT INTO t1 SELECT 2*a+3 FROM t1;
+INSERT INTO t1 SELECT 2*a+3 FROM t1;
+INSERT INTO t1 SELECT 2*a+3 FROM t1;
+INSERT INTO t1 SELECT 2*a+3 FROM t1;
+INSERT INTO t1 SELECT 2*a+3 FROM t1;
+INSERT INTO t1 SELECT 2*a+3 FROM t1;
+#### 1. Using statement mode ####
+==== 1.1. Simple test ====
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1;
+a
+7
+SELECT FOUND_ROWS() INTO @a;
+INSERT INTO logtbl VALUES(1,1,@a);
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a < 5 ORDER BY a LIMIT 1;
+a
+1
+SELECT FOUND_ROWS() INTO @a;
+INSERT INTO logtbl VALUES(1,2,@a);
+SELECT * FROM logtbl WHERE sect = 1 ORDER BY sect,test;
+sect test count
+1 1 183
+1 2 3
+**** On Slave ****
+SELECT * FROM logtbl WHERE sect = 1 ORDER BY sect,test;
+sect test count
+1 1 183
+1 2 3
+==== 1.2. Stored procedure ====
+**** On Master ****
+CREATE PROCEDURE calc_and_log(sect INT, test INT) BEGIN
+DECLARE cnt INT;
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a < 5 ORDER BY a LIMIT 1;
+SELECT FOUND_ROWS() INTO cnt;
+INSERT INTO logtbl VALUES(sect,test,cnt);
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1;
+SELECT FOUND_ROWS() INTO cnt;
+INSERT INTO logtbl VALUES(sect,test+1,cnt);
+END $$
+CALL calc_and_log(2,1);
+a
+1
+a
+7
+CREATE PROCEDURE just_log(sect INT, test INT, found_rows INT) BEGIN
+INSERT INTO logtbl VALUES (sect,test,found_rows);
+END $$
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1;
+a
+7
+SELECT FOUND_ROWS() INTO @found_rows;
+CALL just_log(2,3,@found_rows);
+SELECT * FROM logtbl WHERE sect = 2 ORDER BY sect,test;
+sect test count
+2 1 3
+2 2 183
+2 3 183
+**** On Slave ****
+SELECT * FROM logtbl WHERE sect = 2 ORDER BY sect,test;
+sect test count
+2 1 3
+2 2 183
+2 3 183
+==== 1.3. Stored functions ====
+**** On Master ****
+CREATE FUNCTION log_rows(sect INT, test INT, found_rows INT)
+RETURNS INT
+BEGIN
+INSERT INTO logtbl VALUES(sect,test,found_rows);
+RETURN found_rows;
+END $$
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1;
+a
+7
+SELECT FOUND_ROWS() INTO @found_rows;
+SELECT log_rows(3,1,@found_rows), log_rows(3,2,@found_rows);
+log_rows(3,1,@found_rows) log_rows(3,2,@found_rows)
+183 183
+SELECT * FROM logtbl WHERE sect = 3 ORDER BY sect,test;
+sect test count
+3 1 183
+3 2 183
+**** On Slave ****
+SELECT * FROM logtbl WHERE sect = 3 ORDER BY sect,test;
+sect test count
+3 1 183
+3 2 183
+==== 1.9. Cleanup ====
+**** On Master ****
+DELETE FROM logtbl;
+DROP PROCEDURE just_log;
+DROP PROCEDURE calc_and_log;
+DROP FUNCTION log_rows;
+**** Resetting master and slave ****
+STOP SLAVE;
+RESET SLAVE;
+RESET MASTER;
+START SLAVE;
+#### 2. Using mixed mode ####
+==== 2.1. Checking a procedure ====
+**** On Master ****
+SET BINLOG_FORMAT=MIXED;
+CREATE PROCEDURE just_log(sect INT, test INT) BEGIN
+INSERT INTO logtbl VALUES (sect,test,FOUND_ROWS());
+END $$
+**** On Master 1 ****
+SET BINLOG_FORMAT=MIXED;
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1;
+a
+7
+CALL just_log(1,1);
+**** On Master ****
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1;
+a
+7
+CALL just_log(1,2);
+**** On Master 1 ****
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a < 5 ORDER BY a LIMIT 1;
+a
+1
+CALL just_log(1,3);
+**** On Master ****
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1;
+a
+7
+CALL just_log(1,4);
+SELECT * FROM logtbl WHERE sect = 1 ORDER BY sect,test;
+sect test count
+1 1 183
+1 2 183
+1 3 3
+1 4 183
+**** On Slave ****
+SELECT * FROM logtbl WHERE sect = 1 ORDER BY sect,test;
+sect test count
+1 1 183
+1 2 183
+1 3 3
+1 4 183
+==== 2.1. Checking a stored function ====
+**** On Master ****
+CREATE FUNCTION log_rows(sect INT, test INT)
+RETURNS INT
+BEGIN
+DECLARE found_rows INT;
+SELECT FOUND_ROWS() INTO found_rows;
+INSERT INTO logtbl VALUES(sect,test,found_rows);
+RETURN found_rows;
+END $$
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a < 5 ORDER BY a LIMIT 1;
+a
+1
+SELECT log_rows(2,1), log_rows(2,2);
+log_rows(2,1) log_rows(2,2)
+3 3
+CREATE TABLE t2 (a INT, b INT);
+CREATE TRIGGER t2_tr BEFORE INSERT ON t2 FOR EACH ROW
+BEGIN
+INSERT INTO logtbl VALUES (NEW.a, NEW.b, FOUND_ROWS());
+END $$
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a < 5 ORDER BY a LIMIT 1;
+a
+1
+INSERT INTO t2 VALUES (2,3), (2,4);
+DROP TRIGGER t2_tr;
+CREATE TRIGGER t2_tr BEFORE INSERT ON t2 FOR EACH ROW
+BEGIN
+DECLARE dummy INT;
+SELECT log_rows(NEW.a, NEW.b) INTO dummy;
+END $$
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1;
+a
+7
+INSERT INTO t2 VALUES (2,5), (2,6);
+DROP TRIGGER t2_tr;
+CREATE PROCEDURE log_me_inner(sect INT, test INT)
+BEGIN
+DECLARE dummy INT;
+SELECT log_rows(sect, test) INTO dummy;
+SELECT log_rows(sect, test+1) INTO dummy;
+END $$
+CREATE PROCEDURE log_me(sect INT, test INT)
+BEGIN
+CALL log_me_inner(sect,test);
+END $$
+CREATE TRIGGER t2_tr BEFORE INSERT ON t2 FOR EACH ROW
+BEGIN
+CALL log_me(NEW.a, NEW.b);
+END $$
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1;
+a
+7
+INSERT INTO t2 VALUES (2,5), (2,6);
+SELECT * FROM logtbl WHERE sect = 2 ORDER BY sect,test;
+sect test count
+2 1 3
+2 2 3
+2 3 3
+2 4 3
+2 5 183
+2 5 183
+2 6 183
+2 6 0
+2 6 183
+2 7 0
+SELECT * FROM logtbl WHERE sect = 2 ORDER BY sect,test;
+sect test count
+2 1 3
+2 2 3
+2 3 3
+2 4 3
+2 5 183
+2 5 183
+2 6 183
+2 6 0
+2 6 183
+2 7 0
+DROP TABLE t1, logtbl;
+DROP PROCEDURE just_log;
+DROP PROCEDURE log_me;
+DROP PROCEDURE log_me_inner;
+DROP FUNCTION log_rows;
diff --git a/mysql-test/suite/rpl/r/rpl_idempotency.result b/mysql-test/suite/rpl/r/rpl_idempotency.result
new file mode 100644
index 00000000000..f17fbd82c44
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_idempotency.result
@@ -0,0 +1,71 @@
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+CREATE TABLE t1 (a INT PRIMARY KEY);
+CREATE TABLE t2 (a INT);
+INSERT INTO t1 VALUES (-1),(-2),(-3);
+INSERT INTO t2 VALUES (-1),(-2),(-3);
+DELETE FROM t1 WHERE a = -2;
+DELETE FROM t2 WHERE a = -2;
+DELETE FROM t1 WHERE a = -2;
+DELETE FROM t2 WHERE a = -2;
+SELECT * FROM t1 ORDER BY a;
+a
+-3
+-1
+SELECT * FROM t2 ORDER BY a;
+a
+-3
+-1
+SELECT * FROM t1 ORDER BY a;
+a
+-3
+-1
+SELECT * FROM t2 ORDER BY a;
+a
+-3
+-1
+Last_SQL_Error
+0
+INSERT IGNORE INTO t1 VALUES (-2);
+INSERT IGNORE INTO t1 VALUES (-2);
+SELECT * FROM t1 ORDER BY a;
+a
+-3
+-2
+-1
+SELECT * FROM t1 ORDER BY a;
+a
+-3
+-2
+-1
+Last_SQL_Error
+0
+UPDATE t1 SET a = 1 WHERE a = -1;
+UPDATE t2 SET a = 1 WHERE a = -1;
+UPDATE t1 SET a = 1 WHERE a = -1;
+UPDATE t2 SET a = 1 WHERE a = -1;
+SELECT * FROM t1 ORDER BY a;
+a
+-3
+-2
+1
+SELECT * FROM t2 ORDER BY a;
+a
+-3
+1
+SELECT * FROM t1 ORDER BY a;
+a
+-3
+-2
+1
+SELECT * FROM t2 ORDER BY a;
+a
+-3
+1
+Last_SQL_Error
+0
+DROP TABLE t1, t2;
diff --git a/mysql-test/suite/rpl/r/rpl_incident.result b/mysql-test/suite/rpl/r/rpl_incident.result
index 568078cc276..c3baabbdbc3 100644
--- a/mysql-test/suite/rpl/r/rpl_incident.result
+++ b/mysql-test/suite/rpl/r/rpl_incident.result
@@ -44,7 +44,7 @@ Replicate_Do_Table
Replicate_Ignore_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
-Last_Errno 1589
+Last_Errno 1590
Last_Error The incident LOST_EVENTS occured on the master. Message: <none>
Skip_Counter 0
Exec_Master_Log_Pos #
@@ -62,7 +62,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
-Last_SQL_Errno 1589
+Last_SQL_Errno 1590
Last_SQL_Error The incident LOST_EVENTS occured on the master. Message: <none>
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
diff --git a/mysql-test/suite/rpl/r/rpl_innodb_bug28430.result b/mysql-test/suite/rpl/r/rpl_innodb_bug28430.result
index fb2782ed9f4..e92f74e27eb 100644
--- a/mysql-test/suite/rpl/r/rpl_innodb_bug28430.result
+++ b/mysql-test/suite/rpl/r/rpl_innodb_bug28430.result
@@ -113,31 +113,31 @@ Create Table CREATE TABLE `byrange_tbl` (
`fkid` mediumint(9) DEFAULT NULL,
`filler` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (id) SUBPARTITION BY HASH (id) SUBPARTITIONS 2 (PARTITION pa1 VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION pa2 VALUES LESS THAN (20) ENGINE = InnoDB, PARTITION pa3 VALUES LESS THAN (30) ENGINE = InnoDB, PARTITION pa4 VALUES LESS THAN (40) ENGINE = InnoDB, PARTITION pa5 VALUES LESS THAN (50) ENGINE = InnoDB, PARTITION pa6 VALUES LESS THAN (60) ENGINE = InnoDB, PARTITION pa7 VALUES LESS THAN (70) ENGINE = InnoDB, PARTITION pa8 VALUES LESS THAN (80) ENGINE = InnoDB, PARTITION pa9 VALUES LESS THAN (90) ENGINE = InnoDB, PARTITION pa10 VALUES LESS THAN (100) ENGINE = InnoDB, PARTITION pa11 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
-show slave status;
-Slave_IO_State Waiting for master to send event
+) ENGINE=InnoDB AUTO_INCREMENT=1001 DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (id) SUBPARTITION BY HASH (id) SUBPARTITIONS 2 (PARTITION pa1 VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION pa2 VALUES LESS THAN (20) ENGINE = InnoDB, PARTITION pa3 VALUES LESS THAN (30) ENGINE = InnoDB, PARTITION pa4 VALUES LESS THAN (40) ENGINE = InnoDB, PARTITION pa5 VALUES LESS THAN (50) ENGINE = InnoDB, PARTITION pa6 VALUES LESS THAN (60) ENGINE = InnoDB, PARTITION pa7 VALUES LESS THAN (70) ENGINE = InnoDB, PARTITION pa8 VALUES LESS THAN (80) ENGINE = InnoDB, PARTITION pa9 VALUES LESS THAN (90) ENGINE = InnoDB, PARTITION pa10 VALUES LESS THAN (100) ENGINE = InnoDB, PARTITION pa11 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
+SHOW SLAVE STATUS;
+Slave_IO_State #
Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 945470
-Relay_Log_File slave-relay-bin.000003
-Relay_Log_Pos 945616
+Relay_Log_File #
+Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
Slave_IO_Running Yes
Slave_SQL_Running Yes
Replicate_Do_DB
Replicate_Ignore_DB
Replicate_Do_Table
-Replicate_Ignore_Table
+Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 945470
-Relay_Log_Space 945771
+Relay_Log_Space #
Until_Condition None
Until_Log_File
Until_Log_Pos 0
@@ -149,8 +149,8 @@ Master_SSL_Cipher
Master_SSL_Key
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
-Last_IO_Errno 0
-Last_IO_Error
+Last_IO_Errno #
+Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
SELECT count(*) "Slave norm" FROM test.regular_tbl;
diff --git a/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result b/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result
index 19c5299df25..0e11d132cc4 100644
--- a/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result
+++ b/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result
@@ -41,26 +41,26 @@ DELETE FROM t2 WHERE b <> UUID();
SELECT COUNT(*) FROM t1;
COUNT(*)
1
-SELECT * FROM t1;
+SELECT * FROM t1 ORDER BY a;
a b
2 t1, text 2
SELECT COUNT(*) FROM t2;
COUNT(*)
0
-SELECT * FROM t2;
+SELECT * FROM t2 ORDER BY a;
a b
==========SLAVE===========
USE test_rpl;
SELECT COUNT(*) FROM t1;
COUNT(*)
1
-SELECT * FROM t1;
+SELECT * FROM t1 ORDER BY a;
a b
2 t1, text 2
SELECT COUNT(*) FROM t2;
COUNT(*)
0
-SELECT * FROM t2;
+SELECT * FROM t2 ORDER BY a;
a b
DELETE FROM t1;
DELETE FROM t2;
@@ -76,13 +76,13 @@ DELETE FROM t2 WHERE a = 2;
SELECT COUNT(*) FROM t1;
COUNT(*)
1
-SELECT * FROM t1;
+SELECT * FROM t1 ORDER BY a;
a b
1 t1, text 1
SELECT COUNT(*) FROM t2;
COUNT(*)
1
-SELECT * FROM t2;
+SELECT * FROM t2 ORDER BY a;
a b
1 t2, text 1
==========SLAVE===========
@@ -90,13 +90,13 @@ USE test_rpl;
SELECT COUNT(*) FROM t1;
COUNT(*)
1
-SELECT * FROM t1;
+SELECT * FROM t1 ORDER BY a;
a b
1 t1, text 1
SELECT COUNT(*) FROM t2;
COUNT(*)
1
-SELECT * FROM t2;
+SELECT * FROM t2 ORDER BY a;
a b
1 t2, text 1
DELETE FROM t1;
@@ -104,7 +104,7 @@ DELETE FROM t2;
******************** LOAD DATA INFILE ********************
LOAD DATA INFILE '../tmp/rpl_mixed.dat' INTO TABLE t1 FIELDS TERMINATED BY '|' ;
-SELECT * FROM t1;
+SELECT * FROM t1 ORDER BY a;
a b
10 line A
20 line B
@@ -113,7 +113,7 @@ a b
SELECT COUNT(*) FROM t1;
COUNT(*)
3
-SELECT * FROM t1;
+SELECT * FROM t1 ORDER BY a;
a b
10 line A
20 line B
@@ -121,14 +121,14 @@ a b
SELECT COUNT(*) FROM t2;
COUNT(*)
0
-SELECT * FROM t2;
+SELECT * FROM t2 ORDER BY a;
a b
==========SLAVE===========
USE test_rpl;
SELECT COUNT(*) FROM t1;
COUNT(*)
3
-SELECT * FROM t1;
+SELECT * FROM t1 ORDER BY a;
a b
10 line A
20 line B
@@ -136,7 +136,7 @@ a b
SELECT COUNT(*) FROM t2;
COUNT(*)
0
-SELECT * FROM t2;
+SELECT * FROM t2 ORDER BY a;
a b
DELETE FROM t1;
DELETE FROM t2;
@@ -153,35 +153,35 @@ DELETE FROM t1 WHERE a = 2;
SELECT COUNT(*) FROM t1;
COUNT(*)
2
-SELECT * FROM t1;
+SELECT * FROM t1 ORDER BY a;
a b
1 t1, text 11
3 t1, text 33
SELECT COUNT(*) FROM t2;
COUNT(*)
0
-SELECT * FROM t2;
+SELECT * FROM t2 ORDER BY a;
a b
==========SLAVE===========
USE test_rpl;
SELECT COUNT(*) FROM t1;
COUNT(*)
2
-SELECT * FROM t1;
+SELECT * FROM t1 ORDER BY a;
a b
1 t1, text 11
3 t1, text 33
SELECT COUNT(*) FROM t2;
COUNT(*)
0
-SELECT * FROM t2;
+SELECT * FROM t2 ORDER BY a;
a b
DELETE FROM t1;
DELETE FROM t2;
******************** SELECT ********************
INSERT INTO t1 VALUES(1, 't1, text 1');
-SELECT * FROM t1 WHERE b <> UUID();
+SELECT * FROM t1 WHERE b <> UUID() ORDER BY a;
a b
1 t1, text 1
DELETE FROM t1;
@@ -192,11 +192,11 @@ INSERT INTO t1 VALUES(1, 'CCC');
INSERT INTO t1 VALUES(2, 'DDD');
INSERT INTO t2 VALUES(1, 'DDD');
INSERT INTO t2 VALUES(2, 'CCC');
-SELECT * FROM t1 LEFT JOIN t2 ON t1.a = t2.a;
+SELECT * FROM t1 LEFT JOIN t2 ON t1.a = t2.a ORDER BY t1.a,t2.a;
a b a b
1 CCC 1 DDD
2 DDD 2 CCC
-SELECT * FROM t1 INNER JOIN t2 ON t1.b = t2.b;
+SELECT * FROM t1 INNER JOIN t2 ON t1.b = t2.b ORDER BY t1.a,t2.a;
a b a b
1 CCC 2 CCC
2 DDD 1 DDD
@@ -219,50 +219,50 @@ INSERT INTO t1 VALUES(1, 't1, text 1');
SELECT COUNT(*) FROM t1;
COUNT(*)
1
-SELECT * FROM t1;
+SELECT * FROM t1 ORDER BY a;
a b
1 t1, text 1
SELECT COUNT(*) FROM t2;
COUNT(*)
0
-SELECT * FROM t2;
+SELECT * FROM t2 ORDER BY a;
a b
==========SLAVE===========
USE test_rpl;
SELECT COUNT(*) FROM t1;
COUNT(*)
1
-SELECT * FROM t1;
+SELECT * FROM t1 ORDER BY a;
a b
1 t1, text 1
SELECT COUNT(*) FROM t2;
COUNT(*)
0
-SELECT * FROM t2;
+SELECT * FROM t2 ORDER BY a;
a b
TRUNCATE t1;
==========MASTER==========
SELECT COUNT(*) FROM t1;
COUNT(*)
0
-SELECT * FROM t1;
+SELECT * FROM t1 ORDER BY a;
a b
SELECT COUNT(*) FROM t2;
COUNT(*)
0
-SELECT * FROM t2;
+SELECT * FROM t2 ORDER BY a;
a b
==========SLAVE===========
USE test_rpl;
SELECT COUNT(*) FROM t1;
COUNT(*)
0
-SELECT * FROM t1;
+SELECT * FROM t1 ORDER BY a;
a b
SELECT COUNT(*) FROM t2;
COUNT(*)
0
-SELECT * FROM t2;
+SELECT * FROM t2 ORDER BY a;
a b
DELETE FROM t1;
DELETE FROM t2;
@@ -275,13 +275,13 @@ UPDATE t1 SET b = 't1, text 1 updated' WHERE a = 1;
SELECT COUNT(*) FROM t1;
COUNT(*)
1
-SELECT * FROM t1;
+SELECT * FROM t1 ORDER BY a;
a b
1 t1, text 1 updated
SELECT COUNT(*) FROM t2;
COUNT(*)
1
-SELECT * FROM t2;
+SELECT * FROM t2 ORDER BY a;
a b
1 t2, text 1
==========SLAVE===========
@@ -289,13 +289,13 @@ USE test_rpl;
SELECT COUNT(*) FROM t1;
COUNT(*)
1
-SELECT * FROM t1;
+SELECT * FROM t1 ORDER BY a;
a b
1 t1, text 1 updated
SELECT COUNT(*) FROM t2;
COUNT(*)
1
-SELECT * FROM t2;
+SELECT * FROM t2 ORDER BY a;
a b
1 t2, text 1
UPDATE t1, t2 SET t1.b = 'test', t2.b = 'test';
@@ -303,13 +303,13 @@ UPDATE t1, t2 SET t1.b = 'test', t2.b = 'test';
SELECT COUNT(*) FROM t1;
COUNT(*)
1
-SELECT * FROM t1;
+SELECT * FROM t1 ORDER BY a;
a b
1 test
SELECT COUNT(*) FROM t2;
COUNT(*)
1
-SELECT * FROM t2;
+SELECT * FROM t2 ORDER BY a;
a b
1 test
==========SLAVE===========
@@ -317,13 +317,13 @@ USE test_rpl;
SELECT COUNT(*) FROM t1;
COUNT(*)
1
-SELECT * FROM t1;
+SELECT * FROM t1 ORDER BY a;
a b
1 test
SELECT COUNT(*) FROM t2;
COUNT(*)
1
-SELECT * FROM t2;
+SELECT * FROM t2 ORDER BY a;
a b
1 test
DELETE FROM t1;
@@ -349,26 +349,26 @@ COMMIT;
SELECT COUNT(*) FROM t1;
COUNT(*)
1
-SELECT * FROM t1;
+SELECT * FROM t1 ORDER BY a;
a b
1 start
SELECT COUNT(*) FROM t2;
COUNT(*)
0
-SELECT * FROM t2;
+SELECT * FROM t2 ORDER BY a;
a b
==========SLAVE===========
USE test_rpl;
SELECT COUNT(*) FROM t1;
COUNT(*)
1
-SELECT * FROM t1;
+SELECT * FROM t1 ORDER BY a;
a b
1 start
SELECT COUNT(*) FROM t2;
COUNT(*)
0
-SELECT * FROM t2;
+SELECT * FROM t2 ORDER BY a;
a b
START TRANSACTION;
INSERT INTO t1 VALUES (2, 'rollback');
@@ -377,26 +377,26 @@ ROLLBACK;
SELECT COUNT(*) FROM t1;
COUNT(*)
1
-SELECT * FROM t1;
+SELECT * FROM t1 ORDER BY a;
a b
1 start
SELECT COUNT(*) FROM t2;
COUNT(*)
0
-SELECT * FROM t2;
+SELECT * FROM t2 ORDER BY a;
a b
==========SLAVE===========
USE test_rpl;
SELECT COUNT(*) FROM t1;
COUNT(*)
1
-SELECT * FROM t1;
+SELECT * FROM t1 ORDER BY a;
a b
1 start
SELECT COUNT(*) FROM t2;
COUNT(*)
0
-SELECT * FROM t2;
+SELECT * FROM t2 ORDER BY a;
a b
START TRANSACTION;
INSERT INTO t1 VALUES (3, 'before savepoint s1');
@@ -407,27 +407,27 @@ ROLLBACK TO SAVEPOINT s1;
SELECT COUNT(*) FROM t1;
COUNT(*)
2
-SELECT * FROM t1;
+SELECT * FROM t1 ORDER BY a;
a b
1 start
3 before savepoint s1
SELECT COUNT(*) FROM t2;
COUNT(*)
0
-SELECT * FROM t2;
+SELECT * FROM t2 ORDER BY a;
a b
==========SLAVE===========
USE test_rpl;
SELECT COUNT(*) FROM t1;
COUNT(*)
1
-SELECT * FROM t1;
+SELECT * FROM t1 ORDER BY a;
a b
1 start
SELECT COUNT(*) FROM t2;
COUNT(*)
0
-SELECT * FROM t2;
+SELECT * FROM t2 ORDER BY a;
a b
START TRANSACTION;
INSERT INTO t1 VALUES (5, 'before savepoint s2');
@@ -441,7 +441,7 @@ DELETE FROM t1 WHERE a = 7;
SELECT COUNT(*) FROM t1;
COUNT(*)
4
-SELECT * FROM t1;
+SELECT * FROM t1 ORDER BY a;
a b
1 start
3 before savepoint s1
@@ -450,14 +450,14 @@ a b
SELECT COUNT(*) FROM t2;
COUNT(*)
0
-SELECT * FROM t2;
+SELECT * FROM t2 ORDER BY a;
a b
==========SLAVE===========
USE test_rpl;
SELECT COUNT(*) FROM t1;
COUNT(*)
4
-SELECT * FROM t1;
+SELECT * FROM t1 ORDER BY a;
a b
1 start
3 before savepoint s1
@@ -466,7 +466,7 @@ a b
SELECT COUNT(*) FROM t2;
COUNT(*)
0
-SELECT * FROM t2;
+SELECT * FROM t2 ORDER BY a;
a b
DELETE FROM t1;
DELETE FROM t2;
@@ -610,28 +610,28 @@ DELETE FROM t1 WHERE a = 202;
SELECT COUNT(*) FROM t1;
COUNT(*)
2
-SELECT * FROM t1;
+SELECT * FROM t1 ORDER BY a;
a b
100 test
201 test
SELECT COUNT(*) FROM t2;
COUNT(*)
0
-SELECT * FROM t2;
+SELECT * FROM t2 ORDER BY a;
a b
==========SLAVE===========
USE test_rpl;
SELECT COUNT(*) FROM t1;
COUNT(*)
2
-SELECT * FROM t1;
+SELECT * FROM t1 ORDER BY a;
a b
100 test
201 test
SELECT COUNT(*) FROM t2;
COUNT(*)
0
-SELECT * FROM t2;
+SELECT * FROM t2 ORDER BY a;
a b
ALTER PROCEDURE p1 COMMENT 'p1';
DROP PROCEDURE p1;
@@ -649,13 +649,13 @@ INSERT INTO t1 VALUES (1, 'test');
SELECT COUNT(*) FROM t1;
COUNT(*)
1
-SELECT * FROM t1;
+SELECT * FROM t1 ORDER BY a;
a b
1 test
SELECT COUNT(*) FROM t2;
COUNT(*)
1
-SELECT * FROM t2;
+SELECT * FROM t2 ORDER BY a;
a b
1 test
==========SLAVE===========
@@ -663,13 +663,13 @@ USE test_rpl;
SELECT COUNT(*) FROM t1;
COUNT(*)
1
-SELECT * FROM t1;
+SELECT * FROM t1 ORDER BY a;
a b
1 test
SELECT COUNT(*) FROM t2;
COUNT(*)
1
-SELECT * FROM t2;
+SELECT * FROM t2 ORDER BY a;
a b
1 test
DELETE FROM t1;
@@ -694,51 +694,51 @@ test_rpl e1 @ SYSTEM RECURRING NULL 1 # # NULL SLAVESIDE_DISABLED 1 latin1 latin
SELECT COUNT(*) FROM t1;
COUNT(*)
1
-SELECT * FROM t1;
+SELECT * FROM t1 ORDER BY a;
a b
1 test1
SELECT COUNT(*) FROM t2;
COUNT(*)
0
-SELECT * FROM t2;
+SELECT * FROM t2 ORDER BY a;
a b
==========SLAVE===========
USE test_rpl;
SELECT COUNT(*) FROM t1;
COUNT(*)
1
-SELECT * FROM t1;
+SELECT * FROM t1 ORDER BY a;
a b
1 test1
SELECT COUNT(*) FROM t2;
COUNT(*)
0
-SELECT * FROM t2;
+SELECT * FROM t2 ORDER BY a;
a b
==========MASTER==========
SELECT COUNT(*) FROM t1;
COUNT(*)
1
-SELECT * FROM t1;
+SELECT * FROM t1 ORDER BY a;
a b
1 test1
SELECT COUNT(*) FROM t2;
COUNT(*)
0
-SELECT * FROM t2;
+SELECT * FROM t2 ORDER BY a;
a b
==========SLAVE===========
USE test_rpl;
SELECT COUNT(*) FROM t1;
COUNT(*)
1
-SELECT * FROM t1;
+SELECT * FROM t1 ORDER BY a;
a b
1 test1
SELECT COUNT(*) FROM t2;
COUNT(*)
0
-SELECT * FROM t2;
+SELECT * FROM t2 ORDER BY a;
a b
ALTER EVENT e1 RENAME TO e2;
==========MASTER==========
@@ -754,26 +754,26 @@ test_rpl e2 @ SYSTEM RECURRING NULL 1 # # NULL SLAVESIDE_DISABLED 1 latin1 latin
SELECT COUNT(*) FROM t1;
COUNT(*)
1
-SELECT * FROM t1;
+SELECT * FROM t1 ORDER BY a;
a b
1 test1
SELECT COUNT(*) FROM t2;
COUNT(*)
0
-SELECT * FROM t2;
+SELECT * FROM t2 ORDER BY a;
a b
==========SLAVE===========
USE test_rpl;
SELECT COUNT(*) FROM t1;
COUNT(*)
1
-SELECT * FROM t1;
+SELECT * FROM t1 ORDER BY a;
a b
1 test1
SELECT COUNT(*) FROM t2;
COUNT(*)
0
-SELECT * FROM t2;
+SELECT * FROM t2 ORDER BY a;
a b
DROP EVENT e2;
==========MASTER==========
@@ -795,7 +795,7 @@ CREATE VIEW v2 AS SELECT * FROM t1 WHERE b <> UUID();
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1` where (`t1`.`a` = 1) latin1 latin1_swedish_ci
-SELECT * FROM v1;
+SELECT * FROM v1 ORDER BY a;
a b
1 test1
==========SLAVE===========
@@ -803,7 +803,7 @@ USE test_rpl;
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1` where (`t1`.`a` = 1) latin1 latin1_swedish_ci
-SELECT * FROM v1;
+SELECT * FROM v1 ORDER BY a;
a b
1 test1
ALTER VIEW v1 AS SELECT * FROM t1 WHERE a = 2;
@@ -811,7 +811,7 @@ ALTER VIEW v1 AS SELECT * FROM t1 WHERE a = 2;
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1` where (`t1`.`a` = 2) latin1 latin1_swedish_ci
-SELECT * FROM v1;
+SELECT * FROM v1 ORDER BY a;
a b
2 test2
==========SLAVE===========
@@ -819,7 +819,7 @@ USE test_rpl;
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1` where (`t1`.`a` = 2) latin1 latin1_swedish_ci
-SELECT * FROM v1;
+SELECT * FROM v1 ORDER BY a;
a b
2 test2
DROP VIEW v1;
diff --git a/mysql-test/suite/rpl/r/rpl_invoked_features.result b/mysql-test/suite/rpl/r/rpl_invoked_features.result
index 3bcef762497..502bb040218 100644
--- a/mysql-test/suite/rpl/r/rpl_invoked_features.result
+++ b/mysql-test/suite/rpl/r/rpl_invoked_features.result
@@ -17,13 +17,13 @@ DROP EVENT IF EXISTS e11;
CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b INT, c VARCHAR(64)) ENGINE=myisam;
INSERT INTO t1 VALUES (1,1,'1');
INSERT INTO t1 VALUES (2,2,UUID());
-CREATE TABLE t2 (a INT, b INT, c VARCHAR(64)) ENGINE=myisam;
+CREATE TABLE t2 (a INT UNIQUE, b INT, c VARCHAR(64)) ENGINE=myisam;
INSERT INTO t2 VALUES (1,1,'1');
INSERT INTO t2 VALUES (2,2,UUID());
CREATE TABLE t11 (a INT NOT NULL PRIMARY KEY, b INT, c VARCHAR(64)) ENGINE=innodb;
INSERT INTO t11 VALUES (1,1,'1');
INSERT INTO t11 VALUES (2,2,UUID());
-CREATE TABLE t12 (a INT, b INT, c VARCHAR(64)) ENGINE=innodb;
+CREATE TABLE t12 (a INT UNIQUE, b INT, c VARCHAR(64)) ENGINE=innodb;
INSERT INTO t12 VALUES (1,1,'1');
INSERT INTO t12 VALUES (2,2,UUID());
@@ -49,21 +49,15 @@ BEGIN
UPDATE t12 SET c = '';
UPDATE t13 SET c = '';
END|
-CREATE EVENT e1 ON SCHEDULE EVERY 1 SECOND ENABLE DO
+CREATE EVENT e1 ON SCHEDULE EVERY 1 SECOND DISABLE DO
BEGIN
-DECLARE c INT;
-SELECT a INTO c FROM t1 WHERE a < 11 ORDER BY a DESC LIMIT 1;
-IF c = 7 THEN
+ALTER EVENT e1 DISABLE;
CALL p1(10, '');
-END IF;
END|
-CREATE EVENT e11 ON SCHEDULE EVERY 1 SECOND ENABLE DO
+CREATE EVENT e11 ON SCHEDULE EVERY 1 SECOND DISABLE DO
BEGIN
-DECLARE c INT;
-SELECT a INTO c FROM t11 WHERE a < 11 ORDER BY a DESC LIMIT 1;
-IF c = 7 THEN
+ALTER EVENT e11 DISABLE;
CALL p11(10, '');
-END IF;
END|
CREATE FUNCTION f1 (x INT) RETURNS VARCHAR(64)
BEGIN
@@ -78,11 +72,11 @@ RETURN f1(x);
END|
CREATE PROCEDURE p1 (IN x INT, IN y VARCHAR(64))
BEGIN
-INSERT INTO t1 VALUES (x,x,y);
+INSERT IGNORE INTO t1 VALUES (x,x,y);
END|
CREATE PROCEDURE p11 (IN x INT, IN y VARCHAR(64))
BEGIN
-INSERT INTO t11 VALUES (x,x,y);
+INSERT IGNORE INTO t11 VALUES (x,x,y);
END|
CREATE TABLE t3 SELECT * FROM v1;
@@ -110,6 +104,8 @@ INSERT INTO t11 VALUES(7,7,f2(7));
INSERT INTO t11 VALUES (103,103,'');
SET GLOBAL EVENT_SCHEDULER = on;
+ALTER EVENT e1 ENABLE;
+ALTER EVENT e11 ENABLE;
SET GLOBAL EVENT_SCHEDULER = off;
SHOW TABLES LIKE 't%';
@@ -138,8 +134,8 @@ PROCEDURE p1
PROCEDURE p11
SELECT event_name, status FROM information_schema.events WHERE event_schema='test';
event_name status
-e1 ENABLED
-e11 ENABLED
+e1 DISABLED
+e11 DISABLED
SELECT COUNT(*) FROM t1;
COUNT(*)
@@ -438,6 +434,8 @@ UPDATE t3 SET c='';
UPDATE t11 SET c='';
UPDATE t12 SET c='';
UPDATE t13 SET c='';
+ALTER TABLE t3 ORDER BY a;
+ALTER TABLE t13 ORDER BY a;
diff --git a/mysql-test/suite/rpl/r/rpl_loaddata_fatal.result b/mysql-test/suite/rpl/r/rpl_loaddata_fatal.result
index d30110f85e9..a4d67754bd6 100644
--- a/mysql-test/suite/rpl/r/rpl_loaddata_fatal.result
+++ b/mysql-test/suite/rpl/r/rpl_loaddata_fatal.result
@@ -65,7 +65,7 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
-Last_Errno 1592
+Last_Errno 1593
Last_Error Fatal error: Not enough memory
Skip_Counter 0
Exec_Master_Log_Pos 325
@@ -83,7 +83,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
-Last_SQL_Errno 1592
+Last_SQL_Errno 1593
Last_SQL_Error Fatal error: Not enough memory
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
diff --git a/mysql-test/suite/rpl/r/rpl_packet.result b/mysql-test/suite/rpl/r/rpl_packet.result
index 981c234d380..dd56eb0471c 100644
--- a/mysql-test/suite/rpl/r/rpl_packet.result
+++ b/mysql-test/suite/rpl/r/rpl_packet.result
@@ -27,6 +27,42 @@ STOP SLAVE;
START SLAVE;
CREATE TABLe `t1` (`f1` LONGTEXT) ENGINE=MyISAM;
INSERT INTO `t1`(`f1`) VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa2048');
-SHOW STATUS LIKE 'Slave_running';
-Variable_name Value
-Slave_running OFF
+show slave status;
+Slave_IO_State #
+Master_Host 127.0.0.1
+Master_User root
+Master_Port MASTER_MYPORT
+Connect_Retry 1
+Master_Log_File master-bin.000001
+Read_Master_Log_Pos #
+Relay_Log_File #
+Relay_Log_Pos #
+Relay_Master_Log_File master-bin.000001
+Slave_IO_Running No
+Slave_SQL_Running #
+Replicate_Do_DB
+Replicate_Ignore_DB
+Replicate_Do_Table
+Replicate_Ignore_Table
+Replicate_Wild_Do_Table
+Replicate_Wild_Ignore_Table
+Last_Errno 0
+Last_Error
+Skip_Counter 0
+Exec_Master_Log_Pos #
+Relay_Log_Space #
+Until_Condition None
+Until_Log_File
+Until_Log_Pos 0
+Master_SSL_Allowed No
+Master_SSL_CA_File
+Master_SSL_CA_Path
+Master_SSL_Cert
+Master_SSL_Cipher
+Master_SSL_Key
+Seconds_Behind_Master #
+Master_SSL_Verify_Server_Cert No
+Last_IO_Errno 0
+Last_IO_Error
+Last_SQL_Errno 0
+Last_SQL_Error
diff --git a/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result b/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result
index 7dc9926522b..c3fd663fad8 100644
--- a/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result
+++ b/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result
@@ -242,3 +242,34 @@ a b
3 1
4 4
drop table t1,t2;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+**** On Master ****
+SET SESSION BINLOG_FORMAT=ROW;
+CREATE TABLE t1 (a INT PRIMARY KEY, b SET('master','slave'));
+INSERT INTO t1 VALUES (1,'master,slave'), (2,'master,slave');
+**** On Slave ****
+UPDATE t1 SET a = 5, b = 'slave' WHERE a = 1;
+SELECT * FROM t1 ORDER BY a;
+a b
+2 master,slave
+5 slave
+**** On Master ****
+UPDATE t1 SET a = 5, b = 'master' WHERE a = 1;
+SELECT * FROM t1 ORDER BY a;
+a b
+2 master,slave
+5 master
+**** On Slave ****
+Last_SQL_Error
+
+SELECT * FROM t1 ORDER BY a;
+a b
+2 master,slave
+5 slave
+DROP TABLE t1;
+**** On Master ****
+DROP TABLE t1;
diff --git a/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result b/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result
index a6877b27b95..2efe3a3e486 100644
--- a/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result
+++ b/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result
@@ -415,4 +415,23 @@ a b c
2 4 8
3 6 9
99 99 99
+**** Test for BUG#31552 ****
+**** On Master ****
+DELETE FROM t1;
+**** Resetting master and slave ****
+STOP SLAVE;
+RESET SLAVE;
+RESET MASTER;
+START SLAVE;
+**** On Master ****
+INSERT INTO t1 VALUES ('K','K'), ('L','L'), ('M','M');
+**** On Master ****
+DELETE FROM t1 WHERE C1 = 'L';
+DELETE FROM t1;
+SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
+COUNT(*) 0
+Last_SQL_Error
+0
+SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
+COUNT(*) 0
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8;
diff --git a/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result b/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result
index 4c6ec627db5..fc78abfbe2e 100644
--- a/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result
+++ b/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result
@@ -415,4 +415,23 @@ a b c
2 4 8
3 6 9
99 99 99
+**** Test for BUG#31552 ****
+**** On Master ****
+DELETE FROM t1;
+**** Resetting master and slave ****
+STOP SLAVE;
+RESET SLAVE;
+RESET MASTER;
+START SLAVE;
+**** On Master ****
+INSERT INTO t1 VALUES ('K','K'), ('L','L'), ('M','M');
+**** On Master ****
+DELETE FROM t1 WHERE C1 = 'L';
+DELETE FROM t1;
+SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
+COUNT(*) 0
+Last_SQL_Error
+0
+SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
+COUNT(*) 0
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8;
diff --git a/mysql-test/suite/rpl/r/rpl_row_charset.result b/mysql-test/suite/rpl/r/rpl_row_charset.result
index e51f3e57d1f..caaa9d8332b 100644
--- a/mysql-test/suite/rpl/r/rpl_row_charset.result
+++ b/mysql-test/suite/rpl/r/rpl_row_charset.result
@@ -40,7 +40,7 @@ show create database mysqltest3;
Database Create Database
mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET armscii8 COLLATE armscii8_bin */
use mysqltest2;
-create table t1 (a int auto_increment primary key, b varchar(100));
+create table t1 (a int auto_increment primary key, b varchar(100))engine=myisam;;
set character_set_client=cp850, collation_connection=latin2_croatian_ci;
insert into t1 (b) values(@@character_set_server);
insert into t1 (b) values(@@collation_server);
@@ -117,7 +117,7 @@ master-bin.000001 # Query # # create database mysqltest2 character set latin2
master-bin.000001 # Query # # create database mysqltest3
master-bin.000001 # Query # # drop database mysqltest3
master-bin.000001 # Query # # create database mysqltest3
-master-bin.000001 # Query # # use `mysqltest2`; create table t1 (a int auto_increment primary key, b varchar(100))
+master-bin.000001 # Query # # use `mysqltest2`; create table t1 (a int auto_increment primary key, b varchar(100))engine=myisam
master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1)
@@ -177,14 +177,16 @@ select "--- --3943--" as "";
--- --3943--
use test;
-CREATE TABLE t1 (c1 VARBINARY(255), c2 VARBINARY(255));
+CREATE TABLE t1 (c1 VARBINARY(255), c2 VARBINARY(255))ENGINE=myisam;;
SET CHARACTER_SET_CLIENT=koi8r,
CHARACTER_SET_CONNECTION=cp1251,
CHARACTER_SET_RESULTS=koi8r;
INSERT INTO t1 (c1, c2) VALUES ('îÕ, ÚÁ ÒÙÂÁÌËÕ','îÕ, ÚÁ ÒÙÂÁÌËÕ');
+SET SQL_BIG_SELECTS=1;
select hex(c1), hex(c2) from t1;
hex(c1) hex(c2)
CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3
+SET SQL_BIG_SELECTS=1;
select hex(c1), hex(c2) from t1;
hex(c1) hex(c2)
CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3
diff --git a/mysql-test/suite/rpl/r/rpl_row_charset_innodb.result b/mysql-test/suite/rpl/r/rpl_row_charset_innodb.result
new file mode 100644
index 00000000000..eb1dc585457
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_row_charset_innodb.result
@@ -0,0 +1,215 @@
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+set timestamp=1000000000;
+drop database if exists mysqltest2;
+drop database if exists mysqltest3;
+create database mysqltest2 character set latin2;
+set @@character_set_server=latin5;
+create database mysqltest3;
+
+--- --master--
+show create database mysqltest2;
+Database Create Database
+mysqltest2 CREATE DATABASE `mysqltest2` /*!40100 DEFAULT CHARACTER SET latin2 */
+show create database mysqltest3;
+Database Create Database
+mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET latin5 */
+
+--- --slave--
+show create database mysqltest2;
+Database Create Database
+mysqltest2 CREATE DATABASE `mysqltest2` /*!40100 DEFAULT CHARACTER SET latin2 */
+show create database mysqltest3;
+Database Create Database
+mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET latin5 */
+set @@collation_server=armscii8_bin;
+drop database mysqltest3;
+create database mysqltest3;
+
+--- --master--
+show create database mysqltest3;
+Database Create Database
+mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET armscii8 COLLATE armscii8_bin */
+
+--- --slave--
+show create database mysqltest3;
+Database Create Database
+mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET armscii8 COLLATE armscii8_bin */
+use mysqltest2;
+create table t1 (a int auto_increment primary key, b varchar(100))engine=innodb;;
+set character_set_client=cp850, collation_connection=latin2_croatian_ci;
+insert into t1 (b) values(@@character_set_server);
+insert into t1 (b) values(@@collation_server);
+insert into t1 (b) values(@@character_set_client);
+insert into t1 (b) values(@@character_set_connection);
+insert into t1 (b) values(@@collation_connection);
+
+--- --master--
+select * from t1 order by a;
+a b
+1 armscii8
+2 armscii8_bin
+3 cp850
+4 latin2
+5 latin2_croatian_ci
+
+--- --slave--
+select * from mysqltest2.t1 order by a;
+a b
+1 armscii8
+2 armscii8_bin
+3 cp850
+4 latin2
+5 latin2_croatian_ci
+select "--- --muller--" as "";
+
+--- --muller--
+set character_set_client=latin1, collation_connection=latin1_german1_ci;
+truncate table t1;
+insert into t1 (b) values(@@collation_connection);
+insert into t1 (b) values(LEAST("Müller","Muffler"));
+set collation_connection=latin1_german2_ci;
+insert into t1 (b) values(@@collation_connection);
+insert into t1 (b) values(LEAST("Müller","Muffler"));
+
+--- --master--
+select * from t1 order by a;
+a b
+1 latin1_german1_ci
+2 Muffler
+3 latin1_german2_ci
+4 Müller
+
+--- --slave--
+select * from mysqltest2.t1 order by a;
+a b
+1 latin1_german1_ci
+2 Muffler
+3 latin1_german2_ci
+4 Müller
+select "--- --INSERT--" as "";
+
+--- --INSERT--
+set @a= _cp850 'Müller' collate cp850_general_ci;
+truncate table t1;
+insert into t1 (b) values(collation(@a));
+
+--- --master--
+select * from t1 order by a;
+a b
+1 cp850_general_ci
+
+--- --slave--
+select * from mysqltest2.t1 order by a;
+a b
+1 cp850_general_ci
+drop database mysqltest2;
+drop database mysqltest3;
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # drop database if exists mysqltest2
+master-bin.000001 # Query # # drop database if exists mysqltest3
+master-bin.000001 # Query # # create database mysqltest2 character set latin2
+master-bin.000001 # Query # # create database mysqltest3
+master-bin.000001 # Query # # drop database mysqltest3
+master-bin.000001 # Query # # create database mysqltest3
+master-bin.000001 # Query # # use `mysqltest2`; create table t1 (a int auto_increment primary key, b varchar(100))engine=innodb
+master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # use `mysqltest2`; truncate table t1
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # use `mysqltest2`; truncate table t1
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # drop database mysqltest2
+master-bin.000001 # Query # # drop database mysqltest3
+select "--- --global--" as "";
+
+--- --global--
+set global character_set_server=latin2;
+set global character_set_server=latin1;
+set global character_set_server=latin2;
+set global character_set_server=latin1;
+select "--- --oneshot--" as "";
+
+--- --oneshot--
+set one_shot @@character_set_server=latin5;
+set @@max_join_size=1000;
+select @@character_set_server;
+@@character_set_server
+latin5
+select @@character_set_server;
+@@character_set_server
+latin1
+set @@character_set_server=latin5;
+select @@character_set_server;
+@@character_set_server
+latin5
+select @@character_set_server;
+@@character_set_server
+latin5
+set one_shot max_join_size=10;
+ERROR HY000: The 'SET ONE_SHOT' syntax is reserved for purposes internal to the MySQL server
+set character_set_client=9999999;
+ERROR 42000: Unknown character set: '9999999'
+set collation_server=9999998;
+ERROR HY000: Unknown collation: '9999998'
+select "--- --3943--" as "";
+
+--- --3943--
+use test;
+CREATE TABLE t1 (c1 VARBINARY(255), c2 VARBINARY(255))ENGINE=innodb;;
+SET CHARACTER_SET_CLIENT=koi8r,
+CHARACTER_SET_CONNECTION=cp1251,
+CHARACTER_SET_RESULTS=koi8r;
+INSERT INTO t1 (c1, c2) VALUES ('îÕ, ÚÁ ÒÙÂÁÌËÕ','îÕ, ÚÁ ÒÙÂÁÌËÕ');
+SET SQL_BIG_SELECTS=1;
+select hex(c1), hex(c2) from t1;
+hex(c1) hex(c2)
+CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3
+SET SQL_BIG_SELECTS=1;
+select hex(c1), hex(c2) from t1;
+hex(c1) hex(c2)
+CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3
+drop table t1;
+select "--- --6676--" as "";
+
+--- --6676--
+create table `t1` (
+`pk` varchar(10) not null default '',
+primary key (`pk`)
+) engine=innodb default charset=latin1;
+set @p=_latin1 'test';
+update t1 set pk='test' where pk=@p;
+drop table t1;
diff --git a/mysql-test/suite/rpl/r/rpl_row_colSize.result b/mysql-test/suite/rpl/r/rpl_row_colSize.result
index 9358e36cac6..6d002a722f1 100644
--- a/mysql-test/suite/rpl/r/rpl_row_colSize.result
+++ b/mysql-test/suite/rpl/r/rpl_row_colSize.result
@@ -37,7 +37,7 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
-Last_Errno 1534
+Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 10, test.t1 on slave has size 3. Master's column size should be <= the slave's column size.
Skip_Counter 0
Exec_Master_Log_Pos #
@@ -55,7 +55,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
-Last_SQL_Errno 1534
+Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 10, test.t1 on slave has size 3. Master's column size should be <= the slave's column size.
SELECT COUNT(*) FROM t1;
COUNT(*)
@@ -91,7 +91,7 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
-Last_Errno 1534
+Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 12, test.t1 on slave has size 12. Master's column size should be <= the slave's column size.
Skip_Counter 0
Exec_Master_Log_Pos #
@@ -109,7 +109,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
-Last_SQL_Errno 1534
+Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 12, test.t1 on slave has size 12. Master's column size should be <= the slave's column size.
SELECT COUNT(*) FROM t1;
COUNT(*)
@@ -145,7 +145,7 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
-Last_Errno 1534
+Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 10, test.t1 on slave has size 3. Master's column size should be <= the slave's column size.
Skip_Counter 0
Exec_Master_Log_Pos #
@@ -163,7 +163,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
-Last_SQL_Errno 1534
+Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 10, test.t1 on slave has size 3. Master's column size should be <= the slave's column size.
SELECT COUNT(*) FROM t1;
COUNT(*)
@@ -200,7 +200,7 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
-Last_Errno 1534
+Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 5, test.t1 has type 4
Skip_Counter 0
Exec_Master_Log_Pos #
@@ -218,7 +218,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
-Last_SQL_Errno 1534
+Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 5, test.t1 has type 4
SELECT COUNT(*) FROM t1;
COUNT(*)
@@ -255,7 +255,7 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
-Last_Errno 1534
+Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 8, test.t1 on slave has size 1. Master's column size should be <= the slave's column size.
Skip_Counter 0
Exec_Master_Log_Pos #
@@ -273,7 +273,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
-Last_SQL_Errno 1534
+Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 8, test.t1 on slave has size 1. Master's column size should be <= the slave's column size.
SELECT COUNT(*) FROM t1;
COUNT(*)
@@ -309,7 +309,7 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
-Last_Errno 1534
+Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 2, test.t1 on slave has size 2. Master's column size should be <= the slave's column size.
Skip_Counter 0
Exec_Master_Log_Pos #
@@ -327,7 +327,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
-Last_SQL_Errno 1534
+Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 2, test.t1 on slave has size 2. Master's column size should be <= the slave's column size.
SELECT COUNT(*) FROM t1;
COUNT(*)
@@ -364,7 +364,7 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
-Last_Errno 1534
+Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 2, test.t1 on slave has size 1. Master's column size should be <= the slave's column size.
Skip_Counter 0
Exec_Master_Log_Pos #
@@ -382,7 +382,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
-Last_SQL_Errno 1534
+Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 2, test.t1 on slave has size 1. Master's column size should be <= the slave's column size.
SELECT COUNT(*) FROM t1;
COUNT(*)
@@ -419,7 +419,7 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
-Last_Errno 1534
+Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 20, test.t1 on slave has size 11. Master's column size should be <= the slave's column size.
Skip_Counter 0
Exec_Master_Log_Pos #
@@ -437,7 +437,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
-Last_SQL_Errno 1534
+Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 20, test.t1 on slave has size 11. Master's column size should be <= the slave's column size.
SELECT COUNT(*) FROM t1;
COUNT(*)
@@ -505,7 +505,7 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
-Last_Errno 1534
+Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 2, test.t1 on slave has size 1. Master's column size should be <= the slave's column size.
Skip_Counter 0
Exec_Master_Log_Pos #
@@ -523,7 +523,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
-Last_SQL_Errno 1534
+Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 2, test.t1 on slave has size 1. Master's column size should be <= the slave's column size.
SELECT COUNT(*) FROM t1;
COUNT(*)
@@ -560,7 +560,7 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
-Last_Errno 1534
+Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 2000, test.t1 on slave has size 100. Master's column size should be <= the slave's column size.
Skip_Counter 0
Exec_Master_Log_Pos #
@@ -578,7 +578,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
-Last_SQL_Errno 1534
+Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 2000, test.t1 on slave has size 100. Master's column size should be <= the slave's column size.
SELECT COUNT(*) FROM t1;
COUNT(*)
@@ -614,7 +614,7 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
-Last_Errno 1534
+Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 200, test.t1 on slave has size 10. Master's column size should be <= the slave's column size.
Skip_Counter 0
Exec_Master_Log_Pos #
@@ -632,7 +632,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
-Last_SQL_Errno 1534
+Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 200, test.t1 on slave has size 10. Master's column size should be <= the slave's column size.
SELECT COUNT(*) FROM t1;
COUNT(*)
@@ -668,7 +668,7 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
-Last_Errno 1534
+Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 2000, test.t1 on slave has size 1000. Master's column size should be <= the slave's column size.
Skip_Counter 0
Exec_Master_Log_Pos #
@@ -686,7 +686,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
-Last_SQL_Errno 1534
+Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 2000, test.t1 on slave has size 1000. Master's column size should be <= the slave's column size.
SELECT COUNT(*) FROM t1;
COUNT(*)
@@ -723,7 +723,7 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
-Last_Errno 1534
+Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 4, test.t1 on slave has size 1. Master's column size should be <= the slave's column size.
Skip_Counter 0
Exec_Master_Log_Pos #
@@ -741,7 +741,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
-Last_SQL_Errno 1534
+Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 4, test.t1 on slave has size 1. Master's column size should be <= the slave's column size.
SELECT COUNT(*) FROM t1;
COUNT(*)
diff --git a/mysql-test/suite/rpl/r/rpl_row_extraColmaster_ndb.result b/mysql-test/suite/rpl/r/rpl_row_extraColmaster_ndb.result
deleted file mode 100644
index 0b1f2e6c8bf..00000000000
--- a/mysql-test/suite/rpl/r/rpl_row_extraColmaster_ndb.result
+++ /dev/null
Binary files differ
diff --git a/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result b/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result
index 566537ab745..06dc90f18aa 100644
--- a/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result
+++ b/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result
@@ -214,7 +214,7 @@ Replicate_Do_Table
Replicate_Ignore_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
-Last_Errno 1534
+Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 3, test.t4 has type 4
Skip_Counter 0
Exec_Master_Log_Pos #
@@ -232,7 +232,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
-Last_SQL_Errno 1534
+Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 3, test.t4 has type 4
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
@@ -257,7 +257,7 @@ Replicate_Do_Table
Replicate_Ignore_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
-Last_Errno 1534
+Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 1 type mismatch - received type 3, test.t5 has type 4
Skip_Counter 0
Exec_Master_Log_Pos #
@@ -275,7 +275,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
-Last_SQL_Errno 1534
+Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 1 type mismatch - received type 3, test.t5 has type 4
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
@@ -300,7 +300,7 @@ Replicate_Do_Table
Replicate_Ignore_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
-Last_Errno 1534
+Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 3, test.t6 has type 4
Skip_Counter 0
Exec_Master_Log_Pos #
@@ -318,7 +318,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
-Last_SQL_Errno 1534
+Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 3, test.t6 has type 4
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
diff --git a/mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result b/mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result
index 83df75b81e9..3911fe89b7f 100644
--- a/mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result
+++ b/mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result
@@ -214,7 +214,7 @@ Replicate_Do_Table
Replicate_Ignore_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
-Last_Errno 1534
+Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 3, test.t4 has type 4
Skip_Counter 0
Exec_Master_Log_Pos #
@@ -232,7 +232,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
-Last_SQL_Errno 1534
+Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 3, test.t4 has type 4
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
@@ -257,7 +257,7 @@ Replicate_Do_Table
Replicate_Ignore_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
-Last_Errno 1534
+Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 1 type mismatch - received type 3, test.t5 has type 4
Skip_Counter 0
Exec_Master_Log_Pos #
@@ -275,7 +275,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
-Last_SQL_Errno 1534
+Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 1 type mismatch - received type 3, test.t5 has type 4
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
@@ -300,7 +300,7 @@ Replicate_Do_Table
Replicate_Ignore_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
-Last_Errno 1534
+Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 3, test.t6 has type 4
Skip_Counter 0
Exec_Master_Log_Pos #
@@ -318,7 +318,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
-Last_SQL_Errno 1534
+Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 3, test.t6 has type 4
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
diff --git a/mysql-test/suite/rpl/r/rpl_skip_error.result b/mysql-test/suite/rpl/r/rpl_skip_error.result
index 525909387b3..ed4c4a6b3bb 100644
--- a/mysql-test/suite/rpl/r/rpl_skip_error.result
+++ b/mysql-test/suite/rpl/r/rpl_skip_error.result
@@ -29,8 +29,7 @@ select * from t1;
a
1
2
-3
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error
-# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 786 # # master-bin.000001 Yes Yes 0 0 786 # None 0 No # No 0 0
+# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 851 # # master-bin.000001 Yes Yes 0 0 851 # None 0 No # No 0 0
drop table t1;
diff --git a/mysql-test/suite/rpl/r/rpl_slave_skip.result b/mysql-test/suite/rpl/r/rpl_slave_skip.result
index 8e492fe4732..f89fa34e319 100644
--- a/mysql-test/suite/rpl/r/rpl_slave_skip.result
+++ b/mysql-test/suite/rpl/r/rpl_slave_skip.result
@@ -142,3 +142,211 @@ Last_SQL_Errno 0
Last_SQL_Error
**** On Master ****
DROP TABLE t1, t2;
+SET SESSION BINLOG_FORMAT=ROW;
+SET AUTOCOMMIT=0;
+CREATE TABLE t1 (a INT, b VARCHAR(20)) ENGINE=myisam;
+CREATE TABLE t2 (a INT, b VARCHAR(20)) ENGINE=myisam;
+CREATE TABLE t3 (a INT, b VARCHAR(20)) ENGINE=myisam;
+INSERT INTO t1 VALUES (1,'master/slave');
+INSERT INTO t2 VALUES (1,'master/slave');
+INSERT INTO t3 VALUES (1,'master/slave');
+CREATE TRIGGER tr1 AFTER UPDATE on t1 FOR EACH ROW
+BEGIN
+INSERT INTO t2 VALUES (NEW.a,NEW.b);
+DELETE FROM t2 WHERE a < NEW.a;
+END|
+CREATE TRIGGER tr2 AFTER INSERT on t2 FOR EACH ROW
+BEGIN
+UPDATE t3 SET a =2, b = 'master only';
+END|
+**** On Slave ****
+STOP SLAVE;
+**** On Master ****
+UPDATE t1 SET a = 2, b = 'master only' WHERE a = 1;
+DROP TRIGGER tr1;
+DROP TRIGGER tr2;
+INSERT INTO t1 VALUES (3,'master/slave');
+INSERT INTO t2 VALUES (3,'master/slave');
+INSERT INTO t3 VALUES (3,'master/slave');
+SELECT * FROM t1 ORDER BY a;
+a b
+2 master only
+3 master/slave
+SELECT * FROM t2 ORDER BY a;
+a b
+2 master only
+3 master/slave
+SELECT * FROM t3 ORDER BY a;
+a b
+2 master only
+3 master/slave
+*** On Slave ***
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
+START SLAVE;
+SELECT * FROM t1 ORDER BY a;
+a b
+1 master/slave
+3 master/slave
+SELECT * FROM t2 ORDER BY a;
+a b
+1 master/slave
+3 master/slave
+SELECT * FROM t3 ORDER BY a;
+a b
+1 master/slave
+3 master/slave
+DROP TABLE t1, t2, t3;
+**** Case 2: Row binlog format and transactional tables ****
+*** On Master ***
+CREATE TABLE t4 (a INT, b VARCHAR(20)) ENGINE=innodb;
+CREATE TABLE t5 (a INT, b VARCHAR(20)) ENGINE=innodb;
+CREATE TABLE t6 (a INT, b VARCHAR(20)) ENGINE=innodb;
+**** On Slave ****
+STOP SLAVE;
+*** On Master ***
+BEGIN;
+INSERT INTO t4 VALUES (2, 'master only');
+INSERT INTO t5 VALUES (2, 'master only');
+INSERT INTO t6 VALUES (2, 'master only');
+COMMIT;
+BEGIN;
+INSERT INTO t4 VALUES (3, 'master/slave');
+INSERT INTO t5 VALUES (3, 'master/slave');
+INSERT INTO t6 VALUES (3, 'master/slave');
+COMMIT;
+SELECT * FROM t4 ORDER BY a;
+a b
+2 master only
+3 master/slave
+SELECT * FROM t5 ORDER BY a;
+a b
+2 master only
+3 master/slave
+SELECT * FROM t6 ORDER BY a;
+a b
+2 master only
+3 master/slave
+*** On Slave ***
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
+START SLAVE;
+SELECT * FROM t4 ORDER BY a;
+a b
+3 master/slave
+SELECT * FROM t5 ORDER BY a;
+a b
+3 master/slave
+SELECT * FROM t6 ORDER BY a;
+a b
+3 master/slave
+**** On Slave ****
+STOP SLAVE;
+*** On Master ***
+BEGIN;
+INSERT INTO t4 VALUES (6, 'master only');
+INSERT INTO t5 VALUES (6, 'master only');
+INSERT INTO t6 VALUES (6, 'master only');
+COMMIT;
+BEGIN;
+INSERT INTO t4 VALUES (7, 'master only');
+INSERT INTO t5 VALUES (7, 'master only');
+INSERT INTO t6 VALUES (7, 'master only');
+COMMIT;
+SELECT * FROM t4 ORDER BY a;
+a b
+2 master only
+3 master/slave
+6 master only
+7 master only
+SELECT * FROM t5 ORDER BY a;
+a b
+2 master only
+3 master/slave
+6 master only
+7 master only
+SELECT * FROM t6 ORDER BY a;
+a b
+2 master only
+3 master/slave
+6 master only
+7 master only
+*** On Slave ***
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER=10;
+START SLAVE;
+SELECT * FROM t4 ORDER BY a;
+a b
+3 master/slave
+SELECT * FROM t5 ORDER BY a;
+a b
+3 master/slave
+SELECT * FROM t6 ORDER BY a;
+a b
+3 master/slave
+STOP SLAVE;
+SET AUTOCOMMIT=0;
+INSERT INTO t4 VALUES (4, 'master only');
+INSERT INTO t5 VALUES (4, 'master only');
+INSERT INTO t6 VALUES (4, 'master only');
+COMMIT;
+INSERT INTO t4 VALUES (5, 'master/slave');
+INSERT INTO t5 VALUES (5, 'master/slave');
+INSERT INTO t6 VALUES (5, 'master/slave');
+COMMIT;
+SELECT * FROM t4 ORDER BY a;
+a b
+2 master only
+3 master/slave
+4 master only
+5 master/slave
+6 master only
+7 master only
+SELECT * FROM t5 ORDER BY a;
+a b
+2 master only
+3 master/slave
+4 master only
+5 master/slave
+6 master only
+7 master only
+SELECT * FROM t6 ORDER BY a;
+a b
+2 master only
+3 master/slave
+4 master only
+5 master/slave
+6 master only
+7 master only
+*** On Slave ***
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
+START SLAVE;
+SELECT * FROM t4 ORDER BY a;
+a b
+3 master/slave
+5 master/slave
+SELECT * FROM t5 ORDER BY a;
+a b
+3 master/slave
+5 master/slave
+SELECT * FROM t6 ORDER BY a;
+a b
+3 master/slave
+5 master/slave
+DROP TABLE t4, t5, t6;
+**** Case 3: Statement logging format and LOAD DATA with non-transactional table ****
+*** On Master ***
+CREATE TABLE t10 (a INT, b VARCHAR(20)) ENGINE=myisam;
+*** On Slave ***
+STOP SLAVE;
+*** On Master ***
+SET SESSION BINLOG_FORMAT=STATEMENT;
+LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/rpl_bug28618.dat' INTO TABLE t10 FIELDS TERMINATED BY '|';
+SELECT * FROM t10 ORDER BY a;
+a b
+1 master only
+2 master only
+3 master only
+*** On Slave ***
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
+START SLAVE;
+SELECT * FROM t10 ORDER BY a;
+a b
+DROP TABLE t10;
diff --git a/mysql-test/suite/rpl/r/rpl_sp_effects.result b/mysql-test/suite/rpl/r/rpl_sp_effects.result
index c2c44b06972..a39d189aa3a 100644
--- a/mysql-test/suite/rpl/r/rpl_sp_effects.result
+++ b/mysql-test/suite/rpl/r/rpl_sp_effects.result
@@ -235,4 +235,45 @@ drop table t1;
drop function f1;
drop function f2;
drop procedure p1;
+create table t2 (b BIT(7));
+create procedure sp_bug26199(bitvalue BIT(7))
+begin
+insert into t2 set b = bitvalue;
+end //
+create function sf_bug26199(b BIT(7)) returns int
+begin
+insert into t2 values(b);
+return 0;
+end//
+call sp_bug26199(b'1110');
+call sp_bug26199('\0');
+select sf_bug26199(b'1111111');
+sf_bug26199(b'1111111')
+0
+select sf_bug26199(b'101111111');
+sf_bug26199(b'101111111')
+0
+Warnings:
+Warning 1264 Out of range value for column 'b' at row 1
+select sf_bug26199('\'');
+sf_bug26199('\'')
+0
+select hex(b) from t2;
+hex(b)
+E
+0
+7F
+7F
+27
+select hex(b) from t2;
+hex(b)
+E
+0
+7F
+7F
+27
+drop table t2;
+drop procedure sp_bug26199;
+drop function sf_bug26199;
SET GLOBAL log_bin_trust_function_creators = 0;
+end of the tests
diff --git a/mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result b/mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result
index 510c94d1f2c..75eb3b09c57 100644
--- a/mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result
+++ b/mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result
@@ -405,6 +405,26 @@ CREATE TABLE t12 (data LONG);
LOCK TABLES t12 WRITE;
INSERT INTO t12 VALUES(UUID());
UNLOCK TABLES;
+CREATE FUNCTION my_user()
+RETURNS CHAR(64)
+BEGIN
+DECLARE user CHAR(64);
+SELECT USER() INTO user;
+RETURN user;
+END $$
+CREATE FUNCTION my_current_user()
+RETURNS CHAR(64)
+BEGIN
+DECLARE user CHAR(64);
+SELECT CURRENT_USER() INTO user;
+RETURN user;
+END $$
+DROP TABLE IF EXISTS t13;
+CREATE TABLE t13 (data CHAR(64));
+INSERT INTO t13 VALUES (USER());
+INSERT INTO t13 VALUES (my_user());
+INSERT INTO t13 VALUES (CURRENT_USER());
+INSERT INTO t13 VALUES (my_current_user());
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # drop database if exists mysqltest1
@@ -709,6 +729,30 @@ master-bin.000001 # Query # # use `mysqltest1`; DROP TABLE IF EXISTS t12
master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE t12 (data LONG)
master-bin.000001 # Table_map # # table_id: # (mysqltest1.t12)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` FUNCTION my_user()
+RETURNS CHAR(64)
+BEGIN
+DECLARE user CHAR(64);
+SELECT USER() INTO user;
+RETURN user;
+END
+master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` FUNCTION my_current_user()
+RETURNS CHAR(64)
+BEGIN
+DECLARE user CHAR(64);
+SELECT CURRENT_USER() INTO user;
+RETURN user;
+END
+master-bin.000001 # Query # # use `mysqltest1`; DROP TABLE IF EXISTS t13
+master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE t13 (data CHAR(64))
+master-bin.000001 # Table_map # # table_id: # (mysqltest1.t13)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (mysqltest1.t13)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (mysqltest1.t13)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (mysqltest1.t13)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # drop database if exists mysqltest1
@@ -1013,5 +1057,29 @@ master-bin.000001 # Query # # use `mysqltest1`; DROP TABLE IF EXISTS t12
master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE t12 (data LONG)
master-bin.000001 # Table_map # # table_id: # (mysqltest1.t12)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` FUNCTION my_user()
+RETURNS CHAR(64)
+BEGIN
+DECLARE user CHAR(64);
+SELECT USER() INTO user;
+RETURN user;
+END
+master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` FUNCTION my_current_user()
+RETURNS CHAR(64)
+BEGIN
+DECLARE user CHAR(64);
+SELECT CURRENT_USER() INTO user;
+RETURN user;
+END
+master-bin.000001 # Query # # use `mysqltest1`; DROP TABLE IF EXISTS t13
+master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE t13 (data CHAR(64))
+master-bin.000001 # Table_map # # table_id: # (mysqltest1.t13)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (mysqltest1.t13)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (mysqltest1.t13)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (mysqltest1.t13)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
drop database mysqltest1;
set global binlog_format =@my_binlog_format;
diff --git a/mysql-test/suite/rpl/r/rpl_temporary_errors.result b/mysql-test/suite/rpl/r/rpl_temporary_errors.result
new file mode 100644
index 00000000000..5c681683b08
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_temporary_errors.result
@@ -0,0 +1,81 @@
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+**** On Master ****
+SET SESSION BINLOG_FORMAT=ROW;
+CREATE TABLE t1 (a INT PRIMARY KEY, b INT);
+INSERT INTO t1 VALUES (1,1), (2,2), (3,3), (4,4);
+**** On Slave ****
+SHOW STATUS LIKE 'Slave_retried_transactions';
+Variable_name Value
+Slave_retried_transactions 0
+UPDATE t1 SET a = 5, b = 47 WHERE a = 1;
+SELECT * FROM t1;
+a b
+5 47
+2 2
+3 3
+4 4
+**** On Master ****
+UPDATE t1 SET a = 5, b = 5 WHERE a = 1;
+SELECT * FROM t1;
+a b
+5 5
+2 2
+3 3
+4 4
+**** On Slave ****
+SHOW STATUS LIKE 'Slave_retried_transactions';
+Variable_name Value
+Slave_retried_transactions 0
+SELECT * FROM t1;
+a b
+5 47
+2 2
+3 3
+4 4
+SHOW SLAVE STATUS;
+Slave_IO_State #
+Master_Host 127.0.0.1
+Master_User root
+Master_Port MASTER_PORT
+Connect_Retry 1
+Master_Log_File master-bin.000001
+Read_Master_Log_Pos 408
+Relay_Log_File #
+Relay_Log_Pos #
+Relay_Master_Log_File master-bin.000001
+Slave_IO_Running Yes
+Slave_SQL_Running Yes
+Replicate_Do_DB
+Replicate_Ignore_DB
+Replicate_Do_Table
+Replicate_Ignore_Table #
+Replicate_Wild_Do_Table
+Replicate_Wild_Ignore_Table
+Last_Errno 0
+Last_Error
+Skip_Counter 0
+Exec_Master_Log_Pos 408
+Relay_Log_Space #
+Until_Condition None
+Until_Log_File
+Until_Log_Pos 0
+Master_SSL_Allowed No
+Master_SSL_CA_File
+Master_SSL_CA_Path
+Master_SSL_Cert
+Master_SSL_Cipher
+Master_SSL_Key
+Seconds_Behind_Master #
+Master_SSL_Verify_Server_Cert No
+Last_IO_Errno #
+Last_IO_Error #
+Last_SQL_Errno 0
+Last_SQL_Error
+DROP TABLE t1;
+**** On Master ****
+DROP TABLE t1;
diff --git a/mysql-test/suite/rpl/r/rpl_truncate_2myisam.result b/mysql-test/suite/rpl/r/rpl_truncate_2myisam.result
index c7ef28ba56b..7eee31dab7a 100644
--- a/mysql-test/suite/rpl/r/rpl_truncate_2myisam.result
+++ b/mysql-test/suite/rpl/r/rpl_truncate_2myisam.result
@@ -4,6 +4,11 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
+STOP SLAVE;
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t1;
+RESET SLAVE;
+START SLAVE;
**** On Master ****
SET SESSION BINLOG_FORMAT=STATEMENT;
SET GLOBAL BINLOG_FORMAT=STATEMENT;
@@ -31,10 +36,17 @@ a b
DROP TABLE t1;
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS t1
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
master-bin.000001 # Query # # use `test`; DROP TABLE t1
+RESET MASTER;
+STOP SLAVE;
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t1;
+RESET SLAVE;
+START SLAVE;
**** On Master ****
SET SESSION BINLOG_FORMAT=MIXED;
SET GLOBAL BINLOG_FORMAT=MIXED;
@@ -62,10 +74,17 @@ a b
DROP TABLE t1;
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS t1
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
master-bin.000001 # Query # # use `test`; DROP TABLE t1
+RESET MASTER;
+STOP SLAVE;
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t1;
+RESET SLAVE;
+START SLAVE;
**** On Master ****
SET SESSION BINLOG_FORMAT=ROW;
SET GLOBAL BINLOG_FORMAT=ROW;
@@ -93,11 +112,18 @@ a b
DROP TABLE t1;
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS t1
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
master-bin.000001 # Query # # use `test`; DROP TABLE t1
+RESET MASTER;
+STOP SLAVE;
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t1;
+RESET SLAVE;
+START SLAVE;
**** On Master ****
SET SESSION BINLOG_FORMAT=STATEMENT;
SET GLOBAL BINLOG_FORMAT=STATEMENT;
@@ -125,10 +151,17 @@ a b
DROP TABLE t1;
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS t1
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
master-bin.000001 # Query # # use `test`; DELETE FROM t1
master-bin.000001 # Query # # use `test`; DROP TABLE t1
+RESET MASTER;
+STOP SLAVE;
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t1;
+RESET SLAVE;
+START SLAVE;
**** On Master ****
SET SESSION BINLOG_FORMAT=MIXED;
SET GLOBAL BINLOG_FORMAT=MIXED;
@@ -156,10 +189,17 @@ a b
DROP TABLE t1;
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS t1
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
master-bin.000001 # Query # # use `test`; DELETE FROM t1
master-bin.000001 # Query # # use `test`; DROP TABLE t1
+RESET MASTER;
+STOP SLAVE;
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t1;
+RESET SLAVE;
+START SLAVE;
**** On Master ****
SET SESSION BINLOG_FORMAT=ROW;
SET GLOBAL BINLOG_FORMAT=ROW;
@@ -188,9 +228,11 @@ a b
DROP TABLE t1;
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS t1
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Delete_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; DROP TABLE t1
+RESET MASTER;
diff --git a/mysql-test/suite/rpl/r/rpl_truncate_3innodb.result b/mysql-test/suite/rpl/r/rpl_truncate_3innodb.result
index 7ce48c2e983..a6580a5685b 100644
--- a/mysql-test/suite/rpl/r/rpl_truncate_3innodb.result
+++ b/mysql-test/suite/rpl/r/rpl_truncate_3innodb.result
@@ -4,6 +4,11 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
+STOP SLAVE;
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t1;
+RESET SLAVE;
+START SLAVE;
**** On Master ****
SET SESSION BINLOG_FORMAT=STATEMENT;
SET GLOBAL BINLOG_FORMAT=STATEMENT;
@@ -31,12 +36,19 @@ a b
DROP TABLE t1;
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS t1
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DROP TABLE t1
+RESET MASTER;
+STOP SLAVE;
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t1;
+RESET SLAVE;
+START SLAVE;
**** On Master ****
SET SESSION BINLOG_FORMAT=MIXED;
SET GLOBAL BINLOG_FORMAT=MIXED;
@@ -64,12 +76,19 @@ a b
DROP TABLE t1;
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS t1
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DROP TABLE t1
+RESET MASTER;
+STOP SLAVE;
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t1;
+RESET SLAVE;
+START SLAVE;
**** On Master ****
SET SESSION BINLOG_FORMAT=ROW;
SET GLOBAL BINLOG_FORMAT=ROW;
@@ -97,6 +116,7 @@ a b
DROP TABLE t1;
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS t1
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
@@ -104,6 +124,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DROP TABLE t1
+RESET MASTER;
+STOP SLAVE;
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t1;
+RESET SLAVE;
+START SLAVE;
**** On Master ****
SET SESSION BINLOG_FORMAT=STATEMENT;
SET GLOBAL BINLOG_FORMAT=STATEMENT;
@@ -131,12 +157,19 @@ a b
DROP TABLE t1;
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS t1
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DELETE FROM t1
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DROP TABLE t1
+RESET MASTER;
+STOP SLAVE;
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t1;
+RESET SLAVE;
+START SLAVE;
**** On Master ****
SET SESSION BINLOG_FORMAT=MIXED;
SET GLOBAL BINLOG_FORMAT=MIXED;
@@ -164,12 +197,19 @@ a b
DROP TABLE t1;
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS t1
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DELETE FROM t1
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DROP TABLE t1
+RESET MASTER;
+STOP SLAVE;
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t1;
+RESET SLAVE;
+START SLAVE;
**** On Master ****
SET SESSION BINLOG_FORMAT=ROW;
SET GLOBAL BINLOG_FORMAT=ROW;
@@ -198,6 +238,7 @@ a b
DROP TABLE t1;
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS t1
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
@@ -206,3 +247,4 @@ master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Delete_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DROP TABLE t1
+RESET MASTER;
diff --git a/mysql-test/suite/rpl/r/rpl_udf.result b/mysql-test/suite/rpl/r/rpl_udf.result
index fcd2f4743ba..79a82b5fbc7 100644
--- a/mysql-test/suite/rpl/r/rpl_udf.result
+++ b/mysql-test/suite/rpl/r/rpl_udf.result
@@ -182,19 +182,19 @@ CREATE TABLE t1(sum INT, price FLOAT(24)) ENGINE=MyISAM;
affected rows: 0
INSERT INTO t1 VALUES(myfunc_int(100), myfunc_double(50.00));
Warnings:
-Warning 1591 Statement is not safe to log in statement format.
+Warning 1592 Statement is not safe to log in statement format.
affected rows: 1
INSERT INTO t1 VALUES(myfunc_int(10), myfunc_double(5.00));
Warnings:
-Warning 1591 Statement is not safe to log in statement format.
+Warning 1592 Statement is not safe to log in statement format.
affected rows: 1
INSERT INTO t1 VALUES(myfunc_int(200), myfunc_double(25.00));
Warnings:
-Warning 1591 Statement is not safe to log in statement format.
+Warning 1592 Statement is not safe to log in statement format.
affected rows: 1
INSERT INTO t1 VALUES(myfunc_int(1), myfunc_double(500.00));
Warnings:
-Warning 1591 Statement is not safe to log in statement format.
+Warning 1592 Statement is not safe to log in statement format.
affected rows: 1
SELECT * FROM t1 ORDER BY sum;
sum price
diff --git a/mysql-test/suite/rpl/t/disabled.def b/mysql-test/suite/rpl/t/disabled.def
index 0c90eaa4378..20c3ccf0486 100644
--- a/mysql-test/suite/rpl/t/disabled.def
+++ b/mysql-test/suite/rpl/t/disabled.def
@@ -11,7 +11,8 @@
##############################################################################
rpl_ddl : BUG#26418 2007-03-01 mleich Slave out of sync after CREATE/DROP TEMPORARY TABLE + ROLLBACK on master
-rpl_invoked_features : BUG#29020 2007-06-21 Lars Non-deterministic test case
-rpl_auto_increment_11932 : Bug#29809 2007-07-16 ingo Slave SQL errors in warnings file
rpl_stm_extraColmaster_ndb : WL#3915 : Statement-based replication not supported in ndb. Enable test when supported.
-rpl_row_extraColmaster_ndb : BUG#29549 : Replication of BLOBs fail for NDB
+rpl_innodb_bug28430 : Bug #32247 2007-11-27 mats Test reports wrong value of "AUTO_INCREMENT" (on a partitioned InnoDB table)
+rpl_view : Bug#32654: rpl_view.test fails randomly
+rpl_ndb_multi : Bug#30751: rpl_ndb_multi missing row in output
+rpl_log_pos : Bug#8693 Test 'rpl_log_pos' fails sometimes
diff --git a/mysql-test/suite/rpl/t/rpl_binlog_grant.test b/mysql-test/suite/rpl/t/rpl_binlog_grant.test
index 42af33c2e05..e95f69a3f99 100644
--- a/mysql-test/suite/rpl/t/rpl_binlog_grant.test
+++ b/mysql-test/suite/rpl/t/rpl_binlog_grant.test
@@ -1,3 +1,4 @@
+source include/master-slave.inc;
-- source include/have_innodb.inc
-- source include/not_embedded.inc
-- source include/have_binlog_format_mixed_or_statement.inc
diff --git a/mysql-test/suite/rpl/t/rpl_bug31076.test b/mysql-test/suite/rpl/t/rpl_bug31076.test
index cc8b26ac8f4..1c7b0ca0fd1 100644
--- a/mysql-test/suite/rpl/t/rpl_bug31076.test
+++ b/mysql-test/suite/rpl/t/rpl_bug31076.test
@@ -114,4 +114,5 @@ SELECT * FROM visits_events;
# Cleanup
DROP DATABASE track;
+sync_slave_with_master;
--echo End of 5.1 tests
diff --git a/mysql-test/suite/rpl/t/rpl_dual_pos_advance.test b/mysql-test/suite/rpl/t/rpl_dual_pos_advance.test
index 27c920a3186..83c15d691be 100644
--- a/mysql-test/suite/rpl/t/rpl_dual_pos_advance.test
+++ b/mysql-test/suite/rpl/t/rpl_dual_pos_advance.test
@@ -106,9 +106,3 @@ connection slave;
sync_with_master;
# End of 4.1 tests
-
-# Cleanup
-# The A->B->A replication causes the master to start writing relay logs
-# in var/run, remove them
-remove_file $MYSQLTEST_VARDIR/run/master-relay-bin.000001;
-remove_file $MYSQLTEST_VARDIR/run/master-relay-bin.index;
diff --git a/mysql-test/suite/rpl/t/rpl_extraColmaster_innodb.test b/mysql-test/suite/rpl/t/rpl_extraColmaster_innodb.test
index 082c22329fa..5255a9cfbad 100644
--- a/mysql-test/suite/rpl/t/rpl_extraColmaster_innodb.test
+++ b/mysql-test/suite/rpl/t/rpl_extraColmaster_innodb.test
@@ -12,4 +12,5 @@ set binlog_format=row;
set binlog_format=statement;
-- source extra/rpl_tests/rpl_extraMaster_Col.test
-
+set binlog_format=mixed;
+-- source extra/rpl_tests/rpl_extraMaster_Col.test
diff --git a/mysql-test/suite/rpl/t/rpl_extraColmaster_myisam.test b/mysql-test/suite/rpl/t/rpl_extraColmaster_myisam.test
index 5bbd7953294..e6b41eabd0d 100644
--- a/mysql-test/suite/rpl/t/rpl_extraColmaster_myisam.test
+++ b/mysql-test/suite/rpl/t/rpl_extraColmaster_myisam.test
@@ -11,3 +11,5 @@ set binlog_format=row;
set binlog_format=statement;
-- source extra/rpl_tests/rpl_extraMaster_Col.test
+set binlog_format=mixed;
+-- source extra/rpl_tests/rpl_extraMaster_Col.test
diff --git a/mysql-test/suite/rpl/t/rpl_flushlog_loop.test b/mysql-test/suite/rpl/t/rpl_flushlog_loop.test
index 7d92ba9c2f4..750b49f19a9 100644
--- a/mysql-test/suite/rpl/t/rpl_flushlog_loop.test
+++ b/mysql-test/suite/rpl/t/rpl_flushlog_loop.test
@@ -2,12 +2,9 @@
# in case of bi-directional replication
-- source include/master-slave.inc
-#
-# Start replication master -> slave
-#
-# We have to sync with master, to ensure slave had time to start properly
-# before we stop it. If not, we get errors about UNIX_TIMESTAMP() in the log.
-sync_slave_with_master;
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+show variables like 'relay_log%';
+
connection slave;
--disable_warnings
stop slave;
diff --git a/mysql-test/suite/rpl/t/rpl_found_rows.test b/mysql-test/suite/rpl/t/rpl_found_rows.test
new file mode 100644
index 00000000000..f868061c951
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_found_rows.test
@@ -0,0 +1,256 @@
+source include/master-slave.inc;
+
+# It is not possible to replicate FOUND_ROWS() using statement-based
+# replication, but there is a workaround that stores the result of
+# FOUND_ROWS() into a user variable and then replicates this instead.
+
+# The purpose of this test case is to test that the workaround
+# function properly even when inside stored programs (i.e., stored
+# routines and triggers).
+
+--echo ==== 0. Setting it all up ====
+
+SET BINLOG_FORMAT=STATEMENT;
+
+--echo **** On Master ****
+connection master;
+CREATE TABLE t1 (a INT);
+CREATE TABLE logtbl (sect INT, test INT, count INT);
+
+INSERT INTO t1 VALUES (1),(2),(3);
+INSERT INTO t1 SELECT 2*a+3 FROM t1;
+INSERT INTO t1 SELECT 2*a+3 FROM t1;
+INSERT INTO t1 SELECT 2*a+3 FROM t1;
+INSERT INTO t1 SELECT 2*a+3 FROM t1;
+INSERT INTO t1 SELECT 2*a+3 FROM t1;
+INSERT INTO t1 SELECT 2*a+3 FROM t1;
+
+--echo #### 1. Using statement mode ####
+
+--echo ==== 1.1. Simple test ====
+
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1;
+
+# Instead of
+# INSERT INTO logtbl VALUES(1, 1, FOUND_ROWS());
+# we write
+SELECT FOUND_ROWS() INTO @a;
+INSERT INTO logtbl VALUES(1,1,@a);
+
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a < 5 ORDER BY a LIMIT 1;
+# Instead of
+# INSERT INTO logtbl VALUES(1, 2, FOUND_ROWS());
+# we write
+SELECT FOUND_ROWS() INTO @a;
+INSERT INTO logtbl VALUES(1,2,@a);
+
+SELECT * FROM logtbl WHERE sect = 1 ORDER BY sect,test;
+--echo **** On Slave ****
+sync_slave_with_master;
+SELECT * FROM logtbl WHERE sect = 1 ORDER BY sect,test;
+
+--echo ==== 1.2. Stored procedure ====
+
+# Here we do both the calculation and the logging. We also do it twice
+# to make sure that there are no limitations on how many times it can
+# be used.
+
+--echo **** On Master ****
+connection master;
+--delimiter $$
+CREATE PROCEDURE calc_and_log(sect INT, test INT) BEGIN
+ DECLARE cnt INT;
+ SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a < 5 ORDER BY a LIMIT 1;
+ SELECT FOUND_ROWS() INTO cnt;
+ INSERT INTO logtbl VALUES(sect,test,cnt);
+ SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1;
+ SELECT FOUND_ROWS() INTO cnt;
+ INSERT INTO logtbl VALUES(sect,test+1,cnt);
+END $$
+--delimiter ;
+
+CALL calc_and_log(2,1);
+
+--delimiter $$
+CREATE PROCEDURE just_log(sect INT, test INT, found_rows INT) BEGIN
+ INSERT INTO logtbl VALUES (sect,test,found_rows);
+END $$
+--delimiter ;
+
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1;
+SELECT FOUND_ROWS() INTO @found_rows;
+CALL just_log(2,3,@found_rows);
+
+SELECT * FROM logtbl WHERE sect = 2 ORDER BY sect,test;
+--echo **** On Slave ****
+sync_slave_with_master;
+SELECT * FROM logtbl WHERE sect = 2 ORDER BY sect,test;
+
+--echo ==== 1.3. Stored functions ====
+--echo **** On Master ****
+connection master;
+--delimiter $$
+CREATE FUNCTION log_rows(sect INT, test INT, found_rows INT)
+ RETURNS INT
+BEGIN
+ INSERT INTO logtbl VALUES(sect,test,found_rows);
+ RETURN found_rows;
+END $$
+--delimiter ;
+
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1;
+SELECT FOUND_ROWS() INTO @found_rows;
+SELECT log_rows(3,1,@found_rows), log_rows(3,2,@found_rows);
+
+SELECT * FROM logtbl WHERE sect = 3 ORDER BY sect,test;
+--echo **** On Slave ****
+sync_slave_with_master;
+SELECT * FROM logtbl WHERE sect = 3 ORDER BY sect,test;
+
+--echo ==== 1.9. Cleanup ====
+--echo **** On Master ****
+connection master;
+DELETE FROM logtbl;
+DROP PROCEDURE just_log;
+DROP PROCEDURE calc_and_log;
+DROP FUNCTION log_rows;
+sync_slave_with_master;
+
+source include/reset_master_and_slave.inc;
+
+--echo #### 2. Using mixed mode ####
+
+--echo ==== 2.1. Checking a procedure ====
+
+--echo **** On Master ****
+connection master;
+SET BINLOG_FORMAT=MIXED;
+
+# We will now check some stuff that will not work in statement-based
+# replication, but which should cause the binary log to switch to
+# row-based logging.
+
+--delimiter $$
+CREATE PROCEDURE just_log(sect INT, test INT) BEGIN
+ INSERT INTO logtbl VALUES (sect,test,FOUND_ROWS());
+END $$
+--delimiter ;
+sync_slave_with_master;
+
+--echo **** On Master 1 ****
+connection master1;
+SET BINLOG_FORMAT=MIXED;
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1;
+CALL just_log(1,1);
+
+--echo **** On Master ****
+connection master;
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1;
+CALL just_log(1,2);
+
+--echo **** On Master 1 ****
+
+connection master1;
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a < 5 ORDER BY a LIMIT 1;
+CALL just_log(1,3);
+sync_slave_with_master;
+
+--echo **** On Master ****
+connection master;
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1;
+CALL just_log(1,4);
+sync_slave_with_master;
+
+connection master;
+SELECT * FROM logtbl WHERE sect = 1 ORDER BY sect,test;
+--echo **** On Slave ****
+sync_slave_with_master;
+SELECT * FROM logtbl WHERE sect = 1 ORDER BY sect,test;
+
+--echo ==== 2.1. Checking a stored function ====
+--echo **** On Master ****
+connection master;
+--delimiter $$
+CREATE FUNCTION log_rows(sect INT, test INT)
+ RETURNS INT
+BEGIN
+ DECLARE found_rows INT;
+ SELECT FOUND_ROWS() INTO found_rows;
+ INSERT INTO logtbl VALUES(sect,test,found_rows);
+ RETURN found_rows;
+END $$
+--delimiter ;
+
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a < 5 ORDER BY a LIMIT 1;
+SELECT log_rows(2,1), log_rows(2,2);
+
+CREATE TABLE t2 (a INT, b INT);
+
+# Trying with referencing FOUND_ROWS() directly in the trigger.
+
+--delimiter $$
+CREATE TRIGGER t2_tr BEFORE INSERT ON t2 FOR EACH ROW
+BEGIN
+ INSERT INTO logtbl VALUES (NEW.a, NEW.b, FOUND_ROWS());
+END $$
+--delimiter ;
+
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a < 5 ORDER BY a LIMIT 1;
+INSERT INTO t2 VALUES (2,3), (2,4);
+
+# Referencing FOUND_ROWS() indirectly.
+
+DROP TRIGGER t2_tr;
+
+--delimiter $$
+CREATE TRIGGER t2_tr BEFORE INSERT ON t2 FOR EACH ROW
+BEGIN
+ DECLARE dummy INT;
+ SELECT log_rows(NEW.a, NEW.b) INTO dummy;
+END $$
+--delimiter ;
+
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1;
+INSERT INTO t2 VALUES (2,5), (2,6);
+
+# Putting FOUND_ROWS() even lower in the call chain.
+
+connection master;
+DROP TRIGGER t2_tr;
+
+--delimiter $$
+CREATE PROCEDURE log_me_inner(sect INT, test INT)
+BEGIN
+ DECLARE dummy INT;
+ SELECT log_rows(sect, test) INTO dummy;
+ SELECT log_rows(sect, test+1) INTO dummy;
+END $$
+
+CREATE PROCEDURE log_me(sect INT, test INT)
+BEGIN
+ CALL log_me_inner(sect,test);
+END $$
+--delimiter ;
+
+--delimiter $$
+CREATE TRIGGER t2_tr BEFORE INSERT ON t2 FOR EACH ROW
+BEGIN
+ CALL log_me(NEW.a, NEW.b);
+END $$
+--delimiter ;
+
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1;
+INSERT INTO t2 VALUES (2,5), (2,6);
+
+SELECT * FROM logtbl WHERE sect = 2 ORDER BY sect,test;
+sync_slave_with_master;
+SELECT * FROM logtbl WHERE sect = 2 ORDER BY sect,test;
+
+connection master;
+DROP TABLE t1, logtbl;
+DROP PROCEDURE just_log;
+DROP PROCEDURE log_me;
+DROP PROCEDURE log_me_inner;
+DROP FUNCTION log_rows;
+sync_slave_with_master;
+
diff --git a/mysql-test/suite/rpl/t/rpl_idempotency.test b/mysql-test/suite/rpl/t/rpl_idempotency.test
new file mode 100644
index 00000000000..44956b7b459
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_idempotency.test
@@ -0,0 +1,79 @@
+# Testing various forms of idempotency for replication that should
+# work the same way under statement based as under row based.
+
+source include/master-slave.inc;
+
+connection master;
+CREATE TABLE t1 (a INT PRIMARY KEY);
+CREATE TABLE t2 (a INT);
+INSERT INTO t1 VALUES (-1),(-2),(-3);
+INSERT INTO t2 VALUES (-1),(-2),(-3);
+sync_slave_with_master;
+
+# A delete for a row that does not exist, the statement is
+# deliberately written to be idempotent for statement-based
+# replication as well. We test this towards both a table with a
+# primary key and without a primary key.
+
+connection slave;
+DELETE FROM t1 WHERE a = -2;
+DELETE FROM t2 WHERE a = -2;
+connection master;
+DELETE FROM t1 WHERE a = -2;
+DELETE FROM t2 WHERE a = -2;
+SELECT * FROM t1 ORDER BY a;
+SELECT * FROM t2 ORDER BY a;
+sync_slave_with_master;
+SELECT * FROM t1 ORDER BY a;
+SELECT * FROM t2 ORDER BY a;
+let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1);
+disable_query_log;
+eval SELECT "$last_error" AS Last_SQL_Error;
+enable_query_log;
+
+# An insert of a row that already exists. Since we are replacing the
+# row if it already exists, the most apropriate representation is
+# INSERT IGNORE. We only test this towards a table with a primary key,
+# since the other case does not make sense.
+
+INSERT IGNORE INTO t1 VALUES (-2);
+connection master;
+INSERT IGNORE INTO t1 VALUES (-2);
+SELECT * FROM t1 ORDER BY a;
+sync_slave_with_master;
+SELECT * FROM t1 ORDER BY a;
+let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1);
+disable_query_log;
+eval SELECT "$last_error" AS Last_SQL_Error;
+enable_query_log;
+
+# BUG#19958: RBR idempotency issue for UPDATE and DELETE
+
+# Statement-based and row-based replication have different behaviour
+# when updating a row with an explicit WHERE-clause that matches
+# exactly one row (or no row at all). For statement-based replication,
+# the statement is idempotent since the first time it is executed, it
+# will update exactly one row, and the second time it will not update
+# any row at all. This was not the case for row-based replication, so
+# we test under both row-based and statement-based replication both
+# for tables with and without primary keys.
+
+connection slave;
+UPDATE t1 SET a = 1 WHERE a = -1;
+UPDATE t2 SET a = 1 WHERE a = -1;
+connection master;
+UPDATE t1 SET a = 1 WHERE a = -1;
+UPDATE t2 SET a = 1 WHERE a = -1;
+SELECT * FROM t1 ORDER BY a;
+SELECT * FROM t2 ORDER BY a;
+sync_slave_with_master;
+SELECT * FROM t1 ORDER BY a;
+SELECT * FROM t2 ORDER BY a;
+let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1);
+disable_query_log;
+eval SELECT "$last_error" AS Last_SQL_Error;
+enable_query_log;
+
+connection master;
+DROP TABLE t1, t2;
+sync_slave_with_master;
diff --git a/mysql-test/suite/rpl/t/rpl_innodb_bug28430.test b/mysql-test/suite/rpl/t/rpl_innodb_bug28430.test
index fe3881ab08f..eb828f07415 100644
--- a/mysql-test/suite/rpl/t/rpl_innodb_bug28430.test
+++ b/mysql-test/suite/rpl/t/rpl_innodb_bug28430.test
@@ -1,4 +1,5 @@
--source include/have_innodb.inc
+--source include/have_partition.inc
--source include/have_binlog_format_mixed_or_row.inc
--source include/master-slave.inc
@@ -135,8 +136,7 @@ SELECT count(*) as "Master byrange" FROM test.byrange_tbl;
--sync_slave_with_master
connection slave;
show create table test.byrange_tbl;
---replace_column 4 MASTER_PORT 33 #
-show slave status;
+source include/show_slave_status.inc;
SELECT count(*) "Slave norm" FROM test.regular_tbl;
SELECT count(*) "Slave bykey" FROM test.bykey_tbl;
SELECT count(*) "Slave byrange" FROM test.byrange_tbl;
diff --git a/mysql-test/suite/rpl/t/rpl_innodb_bug30919.test b/mysql-test/suite/rpl/t/rpl_innodb_bug30919.test
index a3779c68021..56b2c7bc03d 100644
--- a/mysql-test/suite/rpl/t/rpl_innodb_bug30919.test
+++ b/mysql-test/suite/rpl/t/rpl_innodb_bug30919.test
@@ -1,4 +1,5 @@
--source include/have_innodb.inc
+--source include/have_partition.inc
--vertical_results
let $engine_type= 'innodb';
diff --git a/mysql-test/suite/rpl/t/rpl_invoked_features.test b/mysql-test/suite/rpl/t/rpl_invoked_features.test
index e797e0552ef..2e69c0fabd9 100644
--- a/mysql-test/suite/rpl/t/rpl_invoked_features.test
+++ b/mysql-test/suite/rpl/t/rpl_invoked_features.test
@@ -8,10 +8,9 @@
--source include/master-slave.inc
--source include/have_innodb.inc
-
-#
-# Define variables used by test case
-#
+# --disable_warnings/--enable_warnings added before/after query
+# if one uses UUID() function because we need to avoid warnings
+# for STATEMENT binlog format
# Non-transactional engine
--let $engine_type= myisam
@@ -45,20 +44,24 @@ DROP EVENT IF EXISTS e11;
--echo
eval CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b INT, c VARCHAR(64)) ENGINE=$engine_type;
---disable_warnings
INSERT INTO t1 VALUES (1,1,'1');
+--disable_warnings
INSERT INTO t1 VALUES (2,2,UUID());
-eval CREATE TABLE t2 (a INT, b INT, c VARCHAR(64)) ENGINE=$engine_type;
+--enable_warnings
+eval CREATE TABLE t2 (a INT UNIQUE, b INT, c VARCHAR(64)) ENGINE=$engine_type;
INSERT INTO t2 VALUES (1,1,'1');
+--disable_warnings
INSERT INTO t2 VALUES (2,2,UUID());
--enable_warnings
eval CREATE TABLE t11 (a INT NOT NULL PRIMARY KEY, b INT, c VARCHAR(64)) ENGINE=$engine_type2;
---disable_warnings
INSERT INTO t11 VALUES (1,1,'1');
+--disable_warnings
INSERT INTO t11 VALUES (2,2,UUID());
-eval CREATE TABLE t12 (a INT, b INT, c VARCHAR(64)) ENGINE=$engine_type2;
+--enable_warnings
+eval CREATE TABLE t12 (a INT UNIQUE, b INT, c VARCHAR(64)) ENGINE=$engine_type2;
INSERT INTO t12 VALUES (1,1,'1');
+--disable_warnings
INSERT INTO t12 VALUES (2,2,UUID());
--enable_warnings
@@ -96,22 +99,16 @@ BEGIN
END|
# Create events which will run every 1 sec
-CREATE EVENT e1 ON SCHEDULE EVERY 1 SECOND ENABLE DO
+CREATE EVENT e1 ON SCHEDULE EVERY 1 SECOND DISABLE DO
BEGIN
- DECLARE c INT;
- SELECT a INTO c FROM t1 WHERE a < 11 ORDER BY a DESC LIMIT 1;
- IF c = 7 THEN
- CALL p1(10, '');
- END IF;
+ ALTER EVENT e1 DISABLE;
+ CALL p1(10, '');
END|
-CREATE EVENT e11 ON SCHEDULE EVERY 1 SECOND ENABLE DO
+CREATE EVENT e11 ON SCHEDULE EVERY 1 SECOND DISABLE DO
BEGIN
- DECLARE c INT;
- SELECT a INTO c FROM t11 WHERE a < 11 ORDER BY a DESC LIMIT 1;
- IF c = 7 THEN
- CALL p11(10, '');
- END IF;
+ ALTER EVENT e11 DISABLE;
+ CALL p11(10, '');
END|
# Create functions and procedures used for events
@@ -130,12 +127,12 @@ END|
CREATE PROCEDURE p1 (IN x INT, IN y VARCHAR(64))
BEGIN
- INSERT INTO t1 VALUES (x,x,y);
+ INSERT IGNORE INTO t1 VALUES (x,x,y);
END|
CREATE PROCEDURE p11 (IN x INT, IN y VARCHAR(64))
BEGIN
- INSERT INTO t11 VALUES (x,x,y);
+ INSERT IGNORE INTO t11 VALUES (x,x,y);
END|
DELIMITER ;|
@@ -147,17 +144,24 @@ DELIMITER ;|
# Do some actions for non-transactional tables
--echo
---disable_warnings
CREATE TABLE t3 SELECT * FROM v1;
INSERT INTO t1 VALUES (3,3,'');
UPDATE t1 SET c='2' WHERE a = 1;
+--disable_warnings
INSERT INTO t1 VALUES(4,4,f1(4));
+--enable_warnings
INSERT INTO t1 VALUES (100,100,'');
+--disable_warnings
CALL p1(5, UUID());
+--enable_warnings
INSERT INTO t1 VALUES (101,101,'');
+--disable_warnings
INSERT INTO t1 VALUES(6,6,f1(6));
+--enable_warnings
INSERT INTO t1 VALUES (102,102,'');
+--disable_warnings
INSERT INTO t1 VALUES(7,7,f2(7));
+--enable_warnings
INSERT INTO t1 VALUES (103,103,'');
# Do some actions for transactional tables
@@ -165,21 +169,34 @@ INSERT INTO t1 VALUES (103,103,'');
CREATE TABLE t13 SELECT * FROM v11;
INSERT INTO t11 VALUES (3,3,'');
UPDATE t11 SET c='2' WHERE a = 1;
+--disable_warnings
INSERT INTO t11 VALUES(4,4,f1(4));
+--enable_warnings
INSERT INTO t11 VALUES (100,100,'');
+--disable_warnings
CALL p11(5, UUID());
+--enable_warnings
INSERT INTO t11 VALUES (101,101,'');
+--disable_warnings
INSERT INTO t11 VALUES(6,6,f1(6));
+--enable_warnings
INSERT INTO t11 VALUES (102,102,'');
+--disable_warnings
INSERT INTO t11 VALUES(7,7,f2(7));
-INSERT INTO t11 VALUES (103,103,'');
--enable_warnings
+INSERT INTO t11 VALUES (103,103,'');
# Scheduler is on
--echo
+# Temporally events fire sequentally due Bug#29020.
SET GLOBAL EVENT_SCHEDULER = on;
-# Wait 2 sec while events will executed
---sleep 2
+# Wait while events will executed
+ALTER EVENT e1 ENABLE;
+let $wait_condition= SELECT COUNT(*) = 1 FROM t1 WHERE t1.a = 10;
+--source include/wait_condition.inc
+ALTER EVENT e11 ENABLE;
+let $wait_condition= SELECT COUNT(*) = 1 FROM t11 WHERE t11.a = 10;
+--source include/wait_condition.inc
SET GLOBAL EVENT_SCHEDULER = off;
# Check original objects
@@ -234,7 +251,7 @@ SELECT COUNT(*) FROM t13;
SELECT a,b FROM t13 ORDER BY a;
SELECT a,b FROM v11 ORDER BY a;
-# Remove UUID() before comparing
+# Remove UUID() before comparing and sort tables
--connection master
--echo
@@ -245,6 +262,9 @@ UPDATE t11 SET c='';
UPDATE t12 SET c='';
UPDATE t13 SET c='';
+ALTER TABLE t3 ORDER BY a;
+ALTER TABLE t13 ORDER BY a;
+
--sync_slave_with_master slave
# Compare a data from master and slave
@@ -260,13 +280,12 @@ UPDATE t13 SET c='';
# Remove dumps
--echo
---exec rm $MYSQLTEST_VARDIR/tmp/rpl_invoked_features_master.sql
---exec rm $MYSQLTEST_VARDIR/tmp/rpl_invoked_features_slave.sql
+--remove_file $MYSQLTEST_VARDIR/tmp/rpl_invoked_features_master.sql
+--remove_file $MYSQLTEST_VARDIR/tmp/rpl_invoked_features_slave.sql
# Remove tables,views,procedures,functions
--connection master
--echo
---disable_warnings
DROP VIEW IF EXISTS v1,v11;
DROP TABLE IF EXISTS t1,t2,t3,t11,t12,t13;
DROP PROCEDURE IF EXISTS p1;
@@ -275,7 +294,6 @@ DROP FUNCTION IF EXISTS f1;
DROP FUNCTION IF EXISTS f2;
DROP EVENT IF EXISTS e1;
DROP EVENT IF EXISTS e11;
---enable_warnings
--sync_slave_with_master slave
diff --git a/mysql-test/suite/rpl/t/rpl_packet.test b/mysql-test/suite/rpl/t/rpl_packet.test
index 316278cb75d..0e17ae3144c 100644
--- a/mysql-test/suite/rpl/t/rpl_packet.test
+++ b/mysql-test/suite/rpl/t/rpl_packet.test
@@ -66,16 +66,11 @@ CREATE TABLe `t1` (`f1` LONGTEXT) ENGINE=MyISAM;
INSERT INTO `t1`(`f1`) VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa2048');
# The slave I/O thread must stop after trying to read the above event
-connection slave;
-sleep 2;
---source include/wait_for_slave_io_to_stop.inc
-SHOW STATUS LIKE 'Slave_running';
-
-# cleanup
-#connection master;
-#drop table t1;
-#connection slave;
-#drop table t1;
-
+connection slave;
+--source include/wait_for_slave_io_to_stop.inc
+--replace_result $MASTER_MYPORT MASTER_MYPORT
+# import is only the 11th column Slave_IO_Running
+--replace_column 1 # 7 # 8 # 9 # 12 # 22 # 23 # 33 #
+query_vertical show slave status;
# End of tests
diff --git a/mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test b/mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test
index fb43664f121..07fe763eb3c 100644
--- a/mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test
+++ b/mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test
@@ -223,3 +223,38 @@ connection master;
drop table t1,t2;
sync_slave_with_master;
+
+#
+# BUG#31702: Missing row on slave causes assertion failure under
+# row-based replication
+#
+
+disable_query_log;
+source include/master-slave-reset.inc;
+enable_query_log;
+
+--echo **** On Master ****
+connection master;
+SET SESSION BINLOG_FORMAT=ROW;
+CREATE TABLE t1 (a INT PRIMARY KEY, b SET('master','slave'));
+INSERT INTO t1 VALUES (1,'master,slave'), (2,'master,slave');
+--echo **** On Slave ****
+sync_slave_with_master;
+UPDATE t1 SET a = 5, b = 'slave' WHERE a = 1;
+SELECT * FROM t1 ORDER BY a;
+--echo **** On Master ****
+connection master;
+UPDATE t1 SET a = 5, b = 'master' WHERE a = 1;
+SELECT * FROM t1 ORDER BY a;
+--echo **** On Slave ****
+sync_slave_with_master;
+let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1);
+disable_query_log;
+eval SELECT "$last_error" AS Last_SQL_Error;
+enable_query_log;
+SELECT * FROM t1 ORDER BY a;
+DROP TABLE t1;
+
+--echo **** On Master ****
+connection master;
+DROP TABLE t1;
diff --git a/mysql-test/suite/rpl/t/rpl_row_charset_innodb-master.opt b/mysql-test/suite/rpl/t/rpl_row_charset_innodb-master.opt
new file mode 100644
index 00000000000..627becdbfb5
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_row_charset_innodb-master.opt
@@ -0,0 +1 @@
+--innodb
diff --git a/mysql-test/suite/rpl/t/rpl_row_charset_innodb-slave.opt b/mysql-test/suite/rpl/t/rpl_row_charset_innodb-slave.opt
new file mode 100644
index 00000000000..627becdbfb5
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_row_charset_innodb-slave.opt
@@ -0,0 +1 @@
+--innodb
diff --git a/mysql-test/suite/rpl/t/rpl_row_charset_innodb.test b/mysql-test/suite/rpl/t/rpl_row_charset_innodb.test
new file mode 100644
index 00000000000..2d48af65581
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_row_charset_innodb.test
@@ -0,0 +1,10 @@
+########################################################
+# By JBM 2005-02-15 Wrapped to allow reuse of test code#
+# Added to skip if ndb is default #
+########################################################
+-- source include/not_ndb_default.inc
+-- source include/have_binlog_format_row.inc
+-- source include/have_innodb.inc
+-- source include/master-slave.inc
+let $engine_type=innodb;
+-- source extra/rpl_tests/rpl_row_charset.test
diff --git a/mysql-test/suite/rpl/t/rpl_row_extraColmaster_ndb.test b/mysql-test/suite/rpl/t/rpl_row_extraColmaster_ndb.test
deleted file mode 100644
index b91947e52e2..00000000000
--- a/mysql-test/suite/rpl/t/rpl_row_extraColmaster_ndb.test
+++ /dev/null
@@ -1,12 +0,0 @@
-###########################################
-# Purpose: Wrapper for rpl_extraMaster_Col.test
-# Using NDB
-###########################################
--- source include/have_ndb.inc
--- source include/ndb_master-slave.inc
--- source include/have_binlog_format_row.inc
-
-let $engine_type = 'NDB';
-
--- source extra/rpl_tests/rpl_extraMaster_Col.test
-
diff --git a/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test b/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test
index dd46d64f684..be76ac9f3f6 100644
--- a/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test
+++ b/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test
@@ -344,5 +344,6 @@ FLUSH LOGS;
--exec rm $MYSQLTEST_VARDIR/tmp/local.sql
DROP TABLE IF EXISTS t1, t2, t3, t04, t05, t4, t5;
+sync_slave_with_master;
# End of 4.1 tests
diff --git a/mysql-test/suite/rpl/t/rpl_row_until.test b/mysql-test/suite/rpl/t/rpl_row_until.test
index 9464e5cfadd..610eec305df 100644
--- a/mysql-test/suite/rpl/t/rpl_row_until.test
+++ b/mysql-test/suite/rpl/t/rpl_row_until.test
@@ -13,6 +13,8 @@ save_master_pos;
connection slave;
sync_with_master;
stop slave;
+# Make sure the slave sql and io thread has stopped
+--source include/wait_for_slave_to_stop.inc
connection master;
# create some events on master
@@ -52,6 +54,8 @@ save_master_pos;
connection slave;
sync_with_master;
stop slave;
+# Make sure the slave sql and io thread has stopped
+--source include/wait_for_slave_to_stop.inc
# this should stop immediately as we are already there
start slave until master_log_file='master-bin.000001', master_log_pos=740;
diff --git a/mysql-test/suite/rpl/t/rpl_skip_error-slave.opt b/mysql-test/suite/rpl/t/rpl_skip_error-slave.opt
index c84171976a1..a8f5deaa30b 100644
--- a/mysql-test/suite/rpl/t/rpl_skip_error-slave.opt
+++ b/mysql-test/suite/rpl/t/rpl_skip_error-slave.opt
@@ -1 +1 @@
---slave-skip-error=1062,1582
+--slave-skip-error=1062
diff --git a/mysql-test/suite/rpl/t/rpl_skip_error.test b/mysql-test/suite/rpl/t/rpl_skip_error.test
index b68b637b3b0..72d434d9c9b 100644
--- a/mysql-test/suite/rpl/t/rpl_skip_error.test
+++ b/mysql-test/suite/rpl/t/rpl_skip_error.test
@@ -3,6 +3,14 @@
#########################################
# Note that errors are ignored by opt file.
source include/master-slave.inc;
+source include/have_binlog_format_mixed_or_statement.inc;
+
+#
+# Bug #30594
+# Skipping error due to applying Row-based repliation events
+# should be checked with another test file
+# consider names like rpl_row_skip_error
+#
create table t1 (n int not null primary key);
save_master_pos;
diff --git a/mysql-test/suite/rpl/t/rpl_slave_skip-slave.opt b/mysql-test/suite/rpl/t/rpl_slave_skip-slave.opt
new file mode 100644
index 00000000000..627becdbfb5
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_slave_skip-slave.opt
@@ -0,0 +1 @@
+--innodb
diff --git a/mysql-test/suite/rpl/t/rpl_slave_skip.test b/mysql-test/suite/rpl/t/rpl_slave_skip.test
index b19d6a2730b..6783098fd7c 100644
--- a/mysql-test/suite/rpl/t/rpl_slave_skip.test
+++ b/mysql-test/suite/rpl/t/rpl_slave_skip.test
@@ -1,7 +1,9 @@
source include/master-slave.inc;
+source include/have_innodb.inc;
--echo **** On Slave ****
connection slave;
+source include/have_innodb.inc;
STOP SLAVE;
--echo **** On Master ****
@@ -69,3 +71,240 @@ query_vertical SHOW SLAVE STATUS;
connection master;
DROP TABLE t1, t2;
sync_slave_with_master;
+
+#
+# More tests for BUG#28618
+#
+# Case 1.
+# ROW binlog format and non-transactional tables.
+# Create the group of events via triggers and try to skip
+# some items of that group.
+#
+
+connection master;
+SET SESSION BINLOG_FORMAT=ROW;
+SET AUTOCOMMIT=0;
+
+CREATE TABLE t1 (a INT, b VARCHAR(20)) ENGINE=myisam;
+CREATE TABLE t2 (a INT, b VARCHAR(20)) ENGINE=myisam;
+CREATE TABLE t3 (a INT, b VARCHAR(20)) ENGINE=myisam;
+
+INSERT INTO t1 VALUES (1,'master/slave');
+INSERT INTO t2 VALUES (1,'master/slave');
+INSERT INTO t3 VALUES (1,'master/slave');
+
+DELIMITER |;
+
+CREATE TRIGGER tr1 AFTER UPDATE on t1 FOR EACH ROW
+BEGIN
+ INSERT INTO t2 VALUES (NEW.a,NEW.b);
+ DELETE FROM t2 WHERE a < NEW.a;
+END|
+
+CREATE TRIGGER tr2 AFTER INSERT on t2 FOR EACH ROW
+BEGIN
+ UPDATE t3 SET a =2, b = 'master only';
+END|
+
+DELIMITER ;|
+
+--echo **** On Slave ****
+sync_slave_with_master;
+STOP SLAVE;
+source include/wait_for_slave_to_stop.inc;
+
+--echo **** On Master ****
+connection master;
+UPDATE t1 SET a = 2, b = 'master only' WHERE a = 1;
+DROP TRIGGER tr1;
+DROP TRIGGER tr2;
+INSERT INTO t1 VALUES (3,'master/slave');
+INSERT INTO t2 VALUES (3,'master/slave');
+INSERT INTO t3 VALUES (3,'master/slave');
+
+SELECT * FROM t1 ORDER BY a;
+SELECT * FROM t2 ORDER BY a;
+SELECT * FROM t3 ORDER BY a;
+
+save_master_pos;
+
+--echo *** On Slave ***
+connection slave;
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
+START SLAVE;
+source include/wait_for_slave_to_start.inc;
+sync_with_master;
+
+SELECT * FROM t1 ORDER BY a;
+SELECT * FROM t2 ORDER BY a;
+SELECT * FROM t3 ORDER BY a;
+
+connection master;
+DROP TABLE t1, t2, t3;
+sync_slave_with_master;
+
+--echo **** Case 2: Row binlog format and transactional tables ****
+
+# Create the transaction and try to skip some
+# queries from one.
+
+--echo *** On Master ***
+connection master;
+CREATE TABLE t4 (a INT, b VARCHAR(20)) ENGINE=innodb;
+CREATE TABLE t5 (a INT, b VARCHAR(20)) ENGINE=innodb;
+CREATE TABLE t6 (a INT, b VARCHAR(20)) ENGINE=innodb;
+
+--echo **** On Slave ****
+sync_slave_with_master;
+STOP SLAVE;
+source include/wait_for_slave_to_stop.inc;
+
+--echo *** On Master ***
+connection master;
+BEGIN;
+INSERT INTO t4 VALUES (2, 'master only');
+INSERT INTO t5 VALUES (2, 'master only');
+INSERT INTO t6 VALUES (2, 'master only');
+COMMIT;
+
+BEGIN;
+INSERT INTO t4 VALUES (3, 'master/slave');
+INSERT INTO t5 VALUES (3, 'master/slave');
+INSERT INTO t6 VALUES (3, 'master/slave');
+COMMIT;
+
+SELECT * FROM t4 ORDER BY a;
+SELECT * FROM t5 ORDER BY a;
+SELECT * FROM t6 ORDER BY a;
+
+save_master_pos;
+
+--echo *** On Slave ***
+connection slave;
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
+START SLAVE;
+source include/wait_for_slave_to_start.inc;
+sync_with_master;
+
+SELECT * FROM t4 ORDER BY a;
+SELECT * FROM t5 ORDER BY a;
+SELECT * FROM t6 ORDER BY a;
+
+# Test skipping two groups
+
+--echo **** On Slave ****
+connection slave;
+STOP SLAVE;
+source include/wait_for_slave_to_stop.inc;
+
+--echo *** On Master ***
+connection master;
+BEGIN;
+INSERT INTO t4 VALUES (6, 'master only');
+INSERT INTO t5 VALUES (6, 'master only');
+INSERT INTO t6 VALUES (6, 'master only');
+COMMIT;
+
+BEGIN;
+INSERT INTO t4 VALUES (7, 'master only');
+INSERT INTO t5 VALUES (7, 'master only');
+INSERT INTO t6 VALUES (7, 'master only');
+COMMIT;
+
+SELECT * FROM t4 ORDER BY a;
+SELECT * FROM t5 ORDER BY a;
+SELECT * FROM t6 ORDER BY a;
+
+save_master_pos;
+
+--echo *** On Slave ***
+connection slave;
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER=10;
+START SLAVE;
+source include/wait_for_slave_to_start.inc;
+sync_with_master;
+
+SELECT * FROM t4 ORDER BY a;
+SELECT * FROM t5 ORDER BY a;
+SELECT * FROM t6 ORDER BY a;
+
+#
+# And the same, but with autocommit = 0
+#
+connection slave;
+STOP SLAVE;
+source include/wait_for_slave_to_stop.inc;
+
+connection master;
+SET AUTOCOMMIT=0;
+
+INSERT INTO t4 VALUES (4, 'master only');
+INSERT INTO t5 VALUES (4, 'master only');
+INSERT INTO t6 VALUES (4, 'master only');
+COMMIT;
+
+INSERT INTO t4 VALUES (5, 'master/slave');
+INSERT INTO t5 VALUES (5, 'master/slave');
+INSERT INTO t6 VALUES (5, 'master/slave');
+COMMIT;
+
+SELECT * FROM t4 ORDER BY a;
+SELECT * FROM t5 ORDER BY a;
+SELECT * FROM t6 ORDER BY a;
+
+save_master_pos;
+
+--echo *** On Slave ***
+connection slave;
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
+START SLAVE;
+source include/wait_for_slave_to_start.inc;
+sync_with_master;
+
+SELECT * FROM t4 ORDER BY a;
+SELECT * FROM t5 ORDER BY a;
+SELECT * FROM t6 ORDER BY a;
+
+connection master;
+DROP TABLE t4, t5, t6;
+sync_slave_with_master;
+
+--echo **** Case 3: Statement logging format and LOAD DATA with non-transactional table ****
+
+# LOAD DATA creates two events in binary log for statement binlog format.
+# Try to skip the first.
+
+--echo *** On Master ***
+connection master;
+CREATE TABLE t10 (a INT, b VARCHAR(20)) ENGINE=myisam;
+
+--echo *** On Slave ***
+sync_slave_with_master;
+STOP SLAVE;
+source include/wait_for_slave_to_stop.inc;
+
+--echo *** On Master ***
+connection master;
+SET SESSION BINLOG_FORMAT=STATEMENT;
+exec cp ./suite/rpl/data/rpl_bug28618.dat $MYSQLTEST_VARDIR/tmp/;
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/rpl_bug28618.dat' INTO TABLE t10 FIELDS TERMINATED BY '|';
+remove_file $MYSQLTEST_VARDIR/tmp/rpl_bug28618.dat;
+
+SELECT * FROM t10 ORDER BY a;
+
+save_master_pos;
+
+--echo *** On Slave ***
+connection slave;
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
+START SLAVE;
+source include/wait_for_slave_to_start.inc;
+sync_with_master;
+
+SELECT * FROM t10 ORDER BY a;
+
+connection master;
+DROP TABLE t10;
+sync_slave_with_master;
+
diff --git a/mysql-test/suite/rpl/t/rpl_sp_effects.test b/mysql-test/suite/rpl/t/rpl_sp_effects.test
index 027bfd69f36..c1092e3260f 100644
--- a/mysql-test/suite/rpl/t/rpl_sp_effects.test
+++ b/mysql-test/suite/rpl/t/rpl_sp_effects.test
@@ -201,6 +201,10 @@ sync_slave_with_master;
connection slave;
SELECT 'slave', a FROM t1 ORDER BY a;
+#
+# cleanup
+#
+
connection master;
drop table t1;
drop function f1;
@@ -208,4 +212,50 @@ drop function f2;
drop procedure p1;
sync_slave_with_master;
+#
+# bug#26199 Replication Failure on Slave when using stored procs
+# with bit-type parameters
+
+connection master;
+
+create table t2 (b BIT(7));
+delimiter //;
+create procedure sp_bug26199(bitvalue BIT(7))
+begin
+ insert into t2 set b = bitvalue;
+end //
+
+create function sf_bug26199(b BIT(7)) returns int
+begin
+ insert into t2 values(b);
+ return 0;
+end//
+
+DELIMITER ;//
+
+
+
+call sp_bug26199(b'1110');
+call sp_bug26199('\0');
+select sf_bug26199(b'1111111');
+select sf_bug26199(b'101111111');
+select sf_bug26199('\'');
+select hex(b) from t2;
+
+sync_slave_with_master;
+#connection slave;
+select hex(b) from t2;
+
+#
+# cleanup bug#26199
+#
+connection master;
+drop table t2;
+drop procedure sp_bug26199;
+drop function sf_bug26199;
+
+sync_slave_with_master;
+
SET GLOBAL log_bin_trust_function_creators = 0;
+
+--echo end of the tests
diff --git a/mysql-test/suite/rpl/t/rpl_ssl.test b/mysql-test/suite/rpl/t/rpl_ssl.test
index c1b7bc2097b..7e256390e25 100644
--- a/mysql-test/suite/rpl/t/rpl_ssl.test
+++ b/mysql-test/suite/rpl/t/rpl_ssl.test
@@ -42,6 +42,10 @@ select * from t1;
# Do the same thing a number of times
disable_query_log;
disable_result_log;
+# 2007-11-27 mats Bug #32756 Starting and stopping the slave in a loop can lose rows
+# After discussions with Engineering, I'm disabling this part of the test to avoid it causing
+# red trees.
+disable_parsing;
let $i= 100;
while ($i)
{
@@ -54,7 +58,8 @@ while ($i)
stop slave;
dec $i;
}
-start slave;
+enable_parsing;
+START SLAVE;
enable_query_log;
enable_result_log;
connection master;
@@ -76,6 +81,16 @@ if (`select $slave_count != $master_count`)
echo master and slave differed in number of rows;
echo master: $master_count;
echo slave: $slave_count;
+
+ connection master;
+ echo === master ===;
+ select count(*) t1;
+ select * from t1;
+ connection slave;
+ echo === slave ===;
+ select count(*) t1;
+ select * from t1;
+ query_vertical show slave status;
}
connection master;
diff --git a/mysql-test/suite/rpl/t/rpl_stm_extraColmaster_ndb.test b/mysql-test/suite/rpl/t/rpl_stm_extraColmaster_ndb.test
deleted file mode 100644
index 84734204439..00000000000
--- a/mysql-test/suite/rpl/t/rpl_stm_extraColmaster_ndb.test
+++ /dev/null
@@ -1,13 +0,0 @@
-###########################################
-# Purpose: Wrapper for rpl_extraMaster_Col.test
-# Using NDB
-###########################################
--- source include/have_ndb.inc
--- source include/ndb_master-slave.inc
--- source include/have_binlog_format_statement.inc
-
-let $engine_type = 'NDB';
-
--- source extra/rpl_tests/rpl_extraMaster_Col.test
-
-
diff --git a/mysql-test/suite/rpl/t/rpl_stm_mystery22.test b/mysql-test/suite/rpl/t/rpl_stm_mystery22.test
index 017593fdfba..b43a734fffc 100644
--- a/mysql-test/suite/rpl/t/rpl_stm_mystery22.test
+++ b/mysql-test/suite/rpl/t/rpl_stm_mystery22.test
@@ -28,7 +28,7 @@ insert into t1 values(NULL,'new');
save_master_pos;
connection slave;
# wait until the slave tries to run the query, fails and aborts slave thread
-wait_for_slave_to_stop;
+source include/wait_for_slave_sql_error.inc;
select * from t1 order by n;
delete from t1 where n = 2;
--disable_warnings
diff --git a/mysql-test/suite/rpl/t/rpl_stm_until.test b/mysql-test/suite/rpl/t/rpl_stm_until.test
index 98e7e0e5eac..c8d3cb1823d 100644
--- a/mysql-test/suite/rpl/t/rpl_stm_until.test
+++ b/mysql-test/suite/rpl/t/rpl_stm_until.test
@@ -12,6 +12,8 @@ save_master_pos;
connection slave;
sync_with_master;
stop slave;
+# Make sure the slave sql and io thread has stopped
+--source include/wait_for_slave_to_stop.inc
connection master;
# create some events on master
@@ -51,6 +53,8 @@ save_master_pos;
connection slave;
sync_with_master;
stop slave;
+# Make sure the slave sql and io thread has stopped
+--source include/wait_for_slave_to_stop.inc
# this should stop immediately as we are already there
start slave until master_log_file='master-bin.000001', master_log_pos=776;
diff --git a/mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test b/mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test
index 6279e9c4d39..67dbde5e89d 100644
--- a/mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test
+++ b/mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test
@@ -518,6 +518,42 @@ CREATE TABLE t12 (data LONG);
LOCK TABLES t12 WRITE;
INSERT INTO t12 VALUES(UUID());
UNLOCK TABLES;
+sync_slave_with_master;
+
+#
+# BUG#28086: SBR of USER() becomes corrupted on slave
+#
+
+connection master;
+
+# Just to get something that is non-trivial, albeit still simple, we
+# stuff the result of USER() and CURRENT_USER() into a variable.
+--delimiter $$
+CREATE FUNCTION my_user()
+ RETURNS CHAR(64)
+BEGIN
+ DECLARE user CHAR(64);
+ SELECT USER() INTO user;
+ RETURN user;
+END $$
+--delimiter ;
+
+--delimiter $$
+CREATE FUNCTION my_current_user()
+ RETURNS CHAR(64)
+BEGIN
+ DECLARE user CHAR(64);
+ SELECT CURRENT_USER() INTO user;
+ RETURN user;
+END $$
+--delimiter ;
+
+DROP TABLE IF EXISTS t13;
+CREATE TABLE t13 (data CHAR(64));
+INSERT INTO t13 VALUES (USER());
+INSERT INTO t13 VALUES (my_user());
+INSERT INTO t13 VALUES (CURRENT_USER());
+INSERT INTO t13 VALUES (my_current_user());
source include/show_binlog_events.inc;
sync_slave_with_master;
diff --git a/mysql-test/suite/rpl/t/rpl_temporary.test b/mysql-test/suite/rpl/t/rpl_temporary.test
index 09b8b83f25f..852dfdbc25c 100644
--- a/mysql-test/suite/rpl/t/rpl_temporary.test
+++ b/mysql-test/suite/rpl/t/rpl_temporary.test
@@ -208,8 +208,9 @@ select * from t1;
connection master;
drop table t1;
+--remove_file $MYSQLTEST_VARDIR/tmp/bug14157.sql
# Delete the anonymous users
source include/delete_anonymous_users.inc;
-# End of 5.1 tests
+# End of tests
diff --git a/mysql-test/suite/rpl/t/rpl_temporary_errors-slave.opt b/mysql-test/suite/rpl/t/rpl_temporary_errors-slave.opt
new file mode 100644
index 00000000000..80c171170f6
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_temporary_errors-slave.opt
@@ -0,0 +1,3 @@
+--loose-debug="+d,all_errors_are_temporary_errors" --slave-transaction-retries=2
+
+
diff --git a/mysql-test/suite/rpl/t/rpl_temporary_errors.test b/mysql-test/suite/rpl/t/rpl_temporary_errors.test
new file mode 100644
index 00000000000..6a57f3cc167
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_temporary_errors.test
@@ -0,0 +1,27 @@
+source include/master-slave.inc;
+
+--echo **** On Master ****
+connection master;
+SET SESSION BINLOG_FORMAT=ROW;
+CREATE TABLE t1 (a INT PRIMARY KEY, b INT);
+INSERT INTO t1 VALUES (1,1), (2,2), (3,3), (4,4);
+--echo **** On Slave ****
+sync_slave_with_master;
+SHOW STATUS LIKE 'Slave_retried_transactions';
+UPDATE t1 SET a = 5, b = 47 WHERE a = 1;
+SELECT * FROM t1;
+--echo **** On Master ****
+connection master;
+UPDATE t1 SET a = 5, b = 5 WHERE a = 1;
+SELECT * FROM t1;
+#SHOW BINLOG EVENTS;
+--echo **** On Slave ****
+sync_slave_with_master;
+SHOW STATUS LIKE 'Slave_retried_transactions';
+SELECT * FROM t1;
+source include/show_slave_status.inc;
+DROP TABLE t1;
+
+--echo **** On Master ****
+connection master;
+DROP TABLE t1;
diff --git a/mysql-test/suite/rpl/t/rpl_trigger.test b/mysql-test/suite/rpl/t/rpl_trigger.test
index 9f5f6fc9b4c..4a496ea4923 100644
--- a/mysql-test/suite/rpl/t/rpl_trigger.test
+++ b/mysql-test/suite/rpl/t/rpl_trigger.test
@@ -316,8 +316,13 @@ SELECT * FROM t2;
# 2. Check that the trigger is non-SUID on the slave;
# 3. Check that the trigger can be activated on the slave.
+#
+# We disable warnings here since it affects the result file in
+# different ways depending on the mode being used.
+disable_warnings;
INSERT INTO t1 VALUES(2);
+enable_warnings;
SELECT * FROM t1;
SELECT * FROM t2;
diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_charset.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_charset.result
index ed9b3cfbfa8..8b1f3093332 100644
--- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_charset.result
+++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_charset.result
@@ -40,7 +40,7 @@ show create database mysqltest3;
Database Create Database
mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET armscii8 COLLATE armscii8_bin */
use mysqltest2;
-create table t1 (a int auto_increment primary key, b varchar(100));
+create table t1 (a int auto_increment primary key, b varchar(100))engine=NDB;;
set character_set_client=cp850, collation_connection=latin2_croatian_ci;
insert into t1 (b) values(@@character_set_server);
insert into t1 (b) values(@@collation_server);
@@ -117,29 +117,27 @@ master-bin.000001 # Query # # create database mysqltest2 character set latin2
master-bin.000001 # Query # # create database mysqltest3
master-bin.000001 # Query # # drop database mysqltest3
master-bin.000001 # Query # # create database mysqltest3
-master-bin.000001 # Query # # use `mysqltest2`; create table t1 (a int auto_increment primary key, b varchar(100))
-master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1)
-master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1)
-master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1)
-master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1)
-master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # use `mysqltest2`; create table t1 (a int auto_increment primary key, b varchar(100))engine=NDB
+master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1)
+master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status)
+master-bin.000001 # Write_rows # # table_id: #
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `mysqltest2`; truncate table t1
+master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1)
+master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status)
+master-bin.000001 # Write_rows # # table_id: #
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1)
-master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1)
-master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1)
-master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `mysqltest2`; truncate table t1
+master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1)
+master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status)
+master-bin.000001 # Write_rows # # table_id: #
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # drop database mysqltest2
master-bin.000001 # Query # # drop database mysqltest3
select "--- --global--" as "";
@@ -177,14 +175,16 @@ select "--- --3943--" as "";
--- --3943--
use test;
-CREATE TABLE t1 (c1 VARBINARY(255), c2 VARBINARY(255));
+CREATE TABLE t1 (c1 VARBINARY(255), c2 VARBINARY(255))ENGINE=NDB;;
SET CHARACTER_SET_CLIENT=koi8r,
CHARACTER_SET_CONNECTION=cp1251,
CHARACTER_SET_RESULTS=koi8r;
INSERT INTO t1 (c1, c2) VALUES ('îÕ, ÚÁ ÒÙÂÁÌËÕ','îÕ, ÚÁ ÒÙÂÁÌËÕ');
+SET SQL_BIG_SELECTS=1;
select hex(c1), hex(c2) from t1;
hex(c1) hex(c2)
CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3
+SET SQL_BIG_SELECTS=1;
select hex(c1), hex(c2) from t1;
hex(c1) hex(c2)
CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3
diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result
index 41e888827b1..685fdbf0a6e 100644
--- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result
+++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result
@@ -72,7 +72,7 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
-Last_Errno 1534
+Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 2 size mismatch - master has size 10, test.t2 on slave has size 6. Master's column size should be <= the slave's column size.
Skip_Counter 0
Exec_Master_Log_Pos #
@@ -90,7 +90,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
-Last_SQL_Errno 1534
+Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 2 size mismatch - master has size 10, test.t2 on slave has size 6. Master's column size should be <= the slave's column size.
STOP SLAVE;
RESET SLAVE;
@@ -139,7 +139,7 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
-Last_Errno 1534
+Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3
Skip_Counter 0
Exec_Master_Log_Pos #
@@ -157,7 +157,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
-Last_SQL_Errno 1534
+Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
@@ -201,7 +201,7 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
-Last_Errno 1534
+Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3
Skip_Counter 0
Exec_Master_Log_Pos #
@@ -219,7 +219,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
-Last_SQL_Errno 1534
+Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
@@ -263,7 +263,7 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
-Last_Errno 1534
+Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246
Skip_Counter 0
Exec_Master_Log_Pos #
@@ -281,7 +281,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
-Last_SQL_Errno 1534
+Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
@@ -324,7 +324,7 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
-Last_Errno 1534
+Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3
Skip_Counter 0
Exec_Master_Log_Pos #
@@ -342,7 +342,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
-Last_SQL_Errno 1534
+Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3;
*** Drop t6 ***
@@ -436,7 +436,7 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
-Last_Errno 1534
+Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5
Skip_Counter 0
Exec_Master_Log_Pos #
@@ -454,7 +454,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
-Last_SQL_Errno 1534
+Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
@@ -497,7 +497,7 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
-Last_Errno 1534
+Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252
Skip_Counter 0
Exec_Master_Log_Pos #
@@ -515,7 +515,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
-Last_SQL_Errno 1534
+Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
@@ -615,6 +615,66 @@ c1 c2 c3 c4 c5 c6 c7
1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle NULL CURRENT_TIMESTAMP
2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE NULL CURRENT_TIMESTAMP
3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA NULL CURRENT_TIMESTAMP
+*** Create t14a on slave ***
+STOP SLAVE;
+RESET SLAVE;
+CREATE TABLE t14a (c1 INT KEY, c4 BLOB, c5 CHAR(5),
+c6 INT DEFAULT '1',
+c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
+)ENGINE='NDB';
+*** Create t14a on Master ***
+CREATE TABLE t14a (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
+) ENGINE='NDB';
+RESET MASTER;
+*** Start Slave ***
+START SLAVE;
+*** Master Data Insert ***
+set @b1 = 'b1b1b1b1';
+set @b1 = concat(@b1,@b1);
+INSERT INTO t14a () VALUES(1,@b1,'Kyle'),
+(2,@b1,'JOE'),
+(3,@b1,'QA');
+SELECT * FROM t14a ORDER BY c1;
+c1 c4 c5
+1 b1b1b1b1b1b1b1b1 Kyle
+2 b1b1b1b1b1b1b1b1 JOE
+3 b1b1b1b1b1b1b1b1 QA
+*** Select on Slave ****
+SELECT * FROM t14a ORDER BY c1;
+c1 c4 c5 c6 c7
+1 b1b1b1b1b1b1b1b1 Kyle NULL CURRENT_TIMESTAMP
+2 b1b1b1b1b1b1b1b1 JOE NULL CURRENT_TIMESTAMP
+3 b1b1b1b1b1b1b1b1 QA NULL CURRENT_TIMESTAMP
+STOP SLAVE;
+RESET SLAVE;
+*** Master Drop c5 ***
+ALTER TABLE t14a DROP COLUMN c5;
+RESET MASTER;
+*** Start Slave ***
+START SLAVE;
+*** Master Data Insert ***
+set @b1 = 'b1b1b1b1';
+set @b1 = concat(@b1,@b1);
+INSERT INTO t14a () VALUES(4,@b1),
+(5,@b1),
+(6,@b1);
+SELECT * FROM t14a ORDER BY c1;
+c1 c4
+1 b1b1b1b1b1b1b1b1
+2 b1b1b1b1b1b1b1b1
+3 b1b1b1b1b1b1b1b1
+4 b1b1b1b1b1b1b1b1
+5 b1b1b1b1b1b1b1b1
+6 b1b1b1b1b1b1b1b1
+*** Select on Slave ****
+SELECT * FROM t14a ORDER BY c1;
+c1 c4 c5 c6 c7
+1 b1b1b1b1b1b1b1b1 Kyle NULL CURRENT_TIMESTAMP
+2 b1b1b1b1b1b1b1b1 JOE NULL CURRENT_TIMESTAMP
+3 b1b1b1b1b1b1b1b1 QA NULL CURRENT_TIMESTAMP
+4 b1b1b1b1b1b1b1b1 NULL NULL CURRENT_TIMESTAMP
+5 b1b1b1b1b1b1b1b1 NULL NULL CURRENT_TIMESTAMP
+6 b1b1b1b1b1b1b1b1 NULL NULL CURRENT_TIMESTAMP
*** connect to master and drop columns ***
ALTER TABLE t14 DROP COLUMN c2;
ALTER TABLE t14 DROP COLUMN c4;
@@ -707,7 +767,7 @@ Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 1060
Last_SQL_Error Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5'
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
*** Try to insert in master ****
INSERT INTO t15 () VALUES(5,2.00,'Replication Testing',@b1,'Buda',2);
@@ -823,7 +883,7 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
-Last_Errno 1534
+Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2
Skip_Counter 0
Exec_Master_Log_Pos #
@@ -841,7 +901,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
-Last_SQL_Errno 1534
+Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraColMaster.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraColMaster.result
new file mode 100644
index 00000000000..d5d4658c01f
--- /dev/null
+++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraColMaster.result
@@ -0,0 +1,2286 @@
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+set binlog_format=row;
+
+***********************************************************
+***********************************************************
+***************** Start of Testing ************************
+***********************************************************
+***********************************************************
+* This test format == binlog_format ROW and engine == 'NDB'
+***********************************************************
+***********************************************************
+
+***** Testing more columns on the Master *****
+
+CREATE TABLE t1 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20),
+/* extra */
+f5 FLOAT DEFAULT '2.00',
+f6 CHAR(4) DEFAULT 'TEST',
+f7 INT DEFAULT '0',
+f8 TEXT,
+f9 LONGBLOB,
+f10 BIT(63),
+f11 VARBINARY(64))ENGINE='NDB';
+
+* Alter Table on Slave and drop columns f5 through f11 *
+
+alter table t1 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11;
+
+* Insert data in Master then update and delete some rows*
+
+* Select count and 20 rows from Master *
+
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+40
+
+SELECT f1,f2,f3,f4,f5,f6,f7,f8,f9,
+hex(f10),hex(f11) FROM t1 ORDER BY f3 LIMIT 20;
+f1 f2 f3 f4 f5 f6 f7 f8 f9 hex(f10) hex(f11)
+2 2 2 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
+3 3 3 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
+5 5 5 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
+6 6 6 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
+8 8 8 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
+9 9 9 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
+11 11 11 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
+12 12 12 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
+14 14 14 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
+15 15 15 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
+17 17 17 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
+18 18 18 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
+20 20 20 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
+21 21 21 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
+23 23 23 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
+24 24 24 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
+26 26 26 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
+27 27 27 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
+29 29 29 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
+30 30 30 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
+
+* Select count and 20 rows from Slave *
+
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+40
+
+SELECT * FROM t1 ORDER BY f3 LIMIT 20;
+f1 f2 f3 f4
+2 2 2 second
+3 3 3 next
+5 5 5 second
+6 6 6 next
+8 8 8 second
+9 9 9 next
+11 11 11 second
+12 12 12 next
+14 14 14 second
+15 15 15 next
+17 17 17 second
+18 18 18 next
+20 20 20 second
+21 21 21 next
+23 23 23 second
+24 24 24 next
+26 26 26 second
+27 27 27 next
+29 29 29 second
+30 30 30 next
+
+* Show Slave Status *
+
+show slave status;;
+Slave_IO_State #
+Master_Host 127.0.0.1
+Master_User root
+Master_Port #
+Connect_Retry 1
+Master_Log_File master-bin.000001
+Read_Master_Log_Pos #
+Relay_Log_File #
+Relay_Log_Pos #
+Relay_Master_Log_File master-bin.000001
+Slave_IO_Running Yes
+Slave_SQL_Running Yes
+Replicate_Do_DB
+Replicate_Ignore_DB
+Replicate_Do_Table
+Replicate_Ignore_Table
+Replicate_Wild_Do_Table
+Replicate_Wild_Ignore_Table
+Last_Errno 0
+Last_Error
+Skip_Counter 0
+Exec_Master_Log_Pos #
+Relay_Log_Space #
+Until_Condition None
+Until_Log_File
+Until_Log_Pos 0
+Master_SSL_Allowed No
+Master_SSL_CA_File
+Master_SSL_CA_Path
+Master_SSL_Cert
+Master_SSL_Cipher
+Master_SSL_Key
+Seconds_Behind_Master #
+Master_SSL_Verify_Server_Cert No
+Last_IO_Errno #
+Last_IO_Error #
+Last_SQL_Errno 0
+Last_SQL_Error
+
+
+***** Testing Altering table def scenario *****
+
+CREATE TABLE t2 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20),
+/* extra */
+f5 DOUBLE DEFAULT '2.00',
+f6 ENUM('a', 'b', 'c') default 'a',
+f7 DECIMAL(17,9) default '1000.00',
+f8 MEDIUMBLOB,
+f9 NUMERIC(6,4) default '2000.00',
+f10 VARCHAR(1024),
+f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0',
+f12 SET('a', 'b', 'c') default 'b')
+ENGINE='NDB';
+Warnings:
+Warning 1264 Out of range value for column 'f9' at row 1
+
+CREATE TABLE t3 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20),
+/* extra */
+f5 DOUBLE DEFAULT '2.00',
+f6 ENUM('a', 'b', 'c') default 'a',
+f8 MEDIUMBLOB,
+f10 VARCHAR(1024),
+f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0',
+f12 SET('a', 'b', 'c') default 'b')
+ENGINE='NDB';
+
+CREATE TABLE t4 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20),
+/* extra */
+f5 DOUBLE DEFAULT '2.00',
+f6 DECIMAL(17,9) default '1000.00',
+f7 MEDIUMBLOB,
+f8 NUMERIC(6,4) default '2000.00',
+f9 VARCHAR(1024),
+f10 BINARY(20) not null default '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0',
+f11 CHAR(255))
+ENGINE='NDB';
+Warnings:
+Warning 1264 Out of range value for column 'f8' at row 1
+
+CREATE TABLE t31 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20),
+/* extra */
+f5 BIGINT,
+f6 BLOB,
+f7 DATE,
+f8 DATETIME,
+f9 FLOAT,
+f10 INT,
+f11 LONGBLOB,
+f12 LONGTEXT,
+f13 MEDIUMBLOB,
+f14 MEDIUMINT,
+f15 MEDIUMTEXT,
+f16 REAL,
+f17 SMALLINT,
+f18 TEXT,
+f19 TIME,
+f20 TIMESTAMP,
+f21 TINYBLOB,
+f22 TINYINT,
+f23 TINYTEXT,
+f24 YEAR,
+f25 BINARY(255),
+f26 BIT(64),
+f27 CHAR(255),
+f28 DECIMAL(30,7),
+f29 DOUBLE,
+f30 ENUM ('a','b', 'c') default 'a',
+f31 FLOAT,
+f32 NUMERIC(17,9),
+f33 SET ('a', 'b', 'c') default 'b',
+f34 VARBINARY(1025),
+f35 VARCHAR(257)
+) ENGINE='NDB';
+
+** Alter tables on slave and drop columns **
+
+alter table t2 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11, drop
+f12;
+alter table t3 drop f5, drop f6, drop f8, drop f10, drop f11, drop f12;
+alter table t4 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11;
+alter table t31
+drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11,
+drop f12, drop f13, drop f14, drop f15, drop f16, drop f17, drop f18,
+drop f19, drop f20, drop f21, drop f22, drop f23, drop f24, drop f25,
+drop f26, drop f27, drop f28, drop f29, drop f30, drop f31, drop f32,
+drop f33, drop f34, drop f35;
+
+** Insert Data into Master **
+INSERT into t2 set f1=1, f2=1, f3=1, f4='first', f8='f8: medium size blob', f10='f10:
+some var char';
+INSERT into t2 values (2, 2, 2, 'second',
+2.0, 'b', 2000.0002, 'f8: medium size blob', 2000, 'f10: some var char',
+'01234567', 'c'),
+(3, 3, 3, 'third',
+3.0, 'b', 3000.0003, 'f8: medium size blob', 3000, 'f10: some var char',
+'01234567', 'c');
+Warnings:
+Warning 1264 Out of range value for column 'f9' at row 1
+Warning 1264 Out of range value for column 'f9' at row 2
+INSERT into t3 set f1=1, f2=1, f3=1, f4='first', f10='f10: some var char';
+INSERT into t4 set f1=1, f2=1, f3=1, f4='first', f7='f7: medium size blob', f10='f10:
+binary data';
+INSERT into t31 set f1=1, f2=1, f3=1, f4='first';
+INSERT into t31 set f1=1, f2=1, f3=2, f4='second',
+f9=2.2, f10='seven samurai', f28=222.222, f35='222';
+Warnings:
+Warning 1366 Incorrect integer value: 'seven samurai' for column 'f10' at row 1
+INSERT into t31 values (1, 1, 3, 'third',
+/* f5 BIGINT, */ 333333333333333333333333,
+/* f6 BLOB, */ '3333333333333333333333',
+/* f7 DATE, */ '2007-07-18',
+/* f8 DATETIME, */ "2007-07-18",
+/* f9 FLOAT, */ 3.33333333,
+/* f10 INT, */ 333333333,
+/* f11 LONGBLOB, */ '3333333333333333333',
+/* f12 LONGTEXT, */ '3333333333333333333',
+/* f13 MEDIUMBLOB, */ '3333333333333333333',
+/* f14 MEDIUMINT, */ 33,
+/* f15 MEDIUMTEXT, */ 3.3,
+/* f16 REAL, */ 3.3,
+/* f17 SMALLINT, */ 3,
+/* f18 TEXT, */ '33',
+/* f19 TIME, */ '2:59:58.999',
+/* f20 TIMESTAMP, */ 20000303000000,
+/* f21 TINYBLOB, */ '3333',
+/* f22 TINYINT, */ 3,
+/* f23 TINYTEXT, */ '3',
+/* f24 YEAR, */ 3000,
+/* f25 BINARY(255), */ 'three_33333',
+/* f26 BIT(64), */ b'011',
+/* f27 CHAR(255), */ 'three',
+/* f28 DECIMAL(30,7), */ 3.333,
+/* f29 DOUBLE, */ 3.333333333333333333333333333,
+/* f30 ENUM ('a','b','c')*/ 'c',
+/* f31 FLOAT, */ 3.0,
+/* f32 NUMERIC(17,9), */ 3.3333,
+/* f33 SET ('a','b','c'),*/ 'c',
+/*f34 VARBINARY(1025),*/ '3333 minus 3',
+/*f35 VARCHAR(257),*/ 'three times three'
+ );
+Warnings:
+Warning 1264 Out of range value for column 'f5' at row 1
+Warning 1264 Out of range value for column 'f24' at row 1
+INSERT into t31 values (1, 1, 4, 'fourth',
+/* f5 BIGINT, */ 333333333333333333333333,
+/* f6 BLOB, */ '3333333333333333333333',
+/* f7 DATE, */ '2007-07-18',
+/* f8 DATETIME, */ "2007-07-18",
+/* f9 FLOAT, */ 3.33333333,
+/* f10 INT, */ 333333333,
+/* f11 LONGBLOB, */ '3333333333333333333',
+/* f12 LONGTEXT, */ '3333333333333333333',
+/* f13 MEDIUMBLOB, */ '3333333333333333333',
+/* f14 MEDIUMINT, */ 33,
+/* f15 MEDIUMTEXT, */ 3.3,
+/* f16 REAL, */ 3.3,
+/* f17 SMALLINT, */ 3,
+/* f18 TEXT, */ '33',
+/* f19 TIME, */ '2:59:58.999',
+/* f20 TIMESTAMP, */ 20000303000000,
+/* f21 TINYBLOB, */ '3333',
+/* f22 TINYINT, */ 3,
+/* f23 TINYTEXT, */ '3',
+/* f24 YEAR, */ 3000,
+/* f25 BINARY(255), */ 'three_33333',
+/* f26 BIT(64), */ b'011',
+/* f27 CHAR(255), */ 'three',
+/* f28 DECIMAL(30,7), */ 3.333,
+/* f29 DOUBLE, */ 3.333333333333333333333333333,
+/* f30 ENUM ('a','b','c')*/ 'c',
+/* f31 FLOAT, */ 3.0,
+/* f32 NUMERIC(17,9), */ 3.3333,
+/* f33 SET ('a','b','c'),*/ 'c',
+/*f34 VARBINARY(1025),*/ '3333 minus 3',
+/*f35 VARCHAR(257),*/ 'three times three'
+ ),
+(1, 1, 5, 'fifth',
+/* f5 BIGINT, */ 333333333333333333333333,
+/* f6 BLOB, */ '3333333333333333333333',
+/* f7 DATE, */ '2007-07-18',
+/* f8 DATETIME, */ "2007-07-18",
+/* f9 FLOAT, */ 3.33333333,
+/* f10 INT, */ 333333333,
+/* f11 LONGBLOB, */ '3333333333333333333',
+/* f12 LONGTEXT, */ '3333333333333333333',
+/* f13 MEDIUMBLOB, */ '3333333333333333333',
+/* f14 MEDIUMINT, */ 33,
+/* f15 MEDIUMTEXT, */ 3.3,
+/* f16 REAL, */ 3.3,
+/* f17 SMALLINT, */ 3,
+/* f18 TEXT, */ '33',
+/* f19 TIME, */ '2:59:58.999',
+/* f20 TIMESTAMP, */ 20000303000000,
+/* f21 TINYBLOB, */ '3333',
+/* f22 TINYINT, */ 3,
+/* f23 TINYTEXT, */ '3',
+/* f24 YEAR, */ 3000,
+/* f25 BINARY(255), */ 'three_33333',
+/* f26 BIT(64), */ b'011',
+/* f27 CHAR(255), */ 'three',
+/* f28 DECIMAL(30,7), */ 3.333,
+/* f29 DOUBLE, */ 3.333333333333333333333333333,
+/* f30 ENUM ('a','b','c')*/ 'c',
+/* f31 FLOAT, */ 3.0,
+/* f32 NUMERIC(17,9), */ 3.3333,
+/* f33 SET ('a','b','c'),*/ 'c',
+/*f34 VARBINARY(1025),*/ '3333 minus 3',
+/*f35 VARCHAR(257),*/ 'three times three'
+ ),
+(1, 1, 6, 'sixth',
+/* f5 BIGINT, */ NULL,
+/* f6 BLOB, */ '3333333333333333333333',
+/* f7 DATE, */ '2007-07-18',
+/* f8 DATETIME, */ "2007-07-18",
+/* f9 FLOAT, */ 3.33333333,
+/* f10 INT, */ 333333333,
+/* f11 LONGBLOB, */ '3333333333333333333',
+/* f12 LONGTEXT, */ '3333333333333333333',
+/* f13 MEDIUMBLOB, */ '3333333333333333333',
+/* f14 MEDIUMINT, */ 33,
+/* f15 MEDIUMTEXT, */ 3.3,
+/* f16 REAL, */ 3.3,
+/* f17 SMALLINT, */ 3,
+/* f18 TEXT, */ '33',
+/* f19 TIME, */ '2:59:58.999',
+/* f20 TIMESTAMP, */ 20000303000000,
+/* f21 TINYBLOB, */ '3333',
+/* f22 TINYINT, */ 3,
+/* f23 TINYTEXT, */ '3',
+/* f24 YEAR, */ 3000,
+/* f25 BINARY(255), */ 'three_33333',
+/* f26 BIT(64), */ b'011',
+/* f27 CHAR(255), */ 'three',
+/* f28 DECIMAL(30,7), */ 3.333,
+/* f29 DOUBLE, */ 3.333333333333333333333333333,
+/* f30 ENUM ('a','b','c')*/ 'c',
+/* f31 FLOAT, */ 3.0,
+/* f32 NUMERIC(17,9), */ 3.3333,
+/* f33 SET ('a','b','c'),*/ 'c',
+/*f34 VARBINARY(1025),*/ '3333 minus 3',
+/*f35 VARCHAR(257),*/ NULL
+);
+Warnings:
+Warning 1264 Out of range value for column 'f5' at row 1
+Warning 1264 Out of range value for column 'f24' at row 1
+Warning 1264 Out of range value for column 'f5' at row 2
+Warning 1264 Out of range value for column 'f24' at row 2
+Warning 1264 Out of range value for column 'f24' at row 3
+
+** Sync slave with master **
+** Do selects from tables **
+
+select * from t1 order by f3;
+f1 f2 f3 f4
+2 2 2 second
+3 3 3 next
+5 5 5 second
+6 6 6 next
+8 8 8 second
+9 9 9 next
+11 11 11 second
+12 12 12 next
+14 14 14 second
+15 15 15 next
+17 17 17 second
+18 18 18 next
+20 20 20 second
+21 21 21 next
+23 23 23 second
+24 24 24 next
+26 26 26 second
+27 27 27 next
+29 29 29 second
+30 30 30 next
+31 31 31 second
+32 32 32 second
+33 33 33 second
+34 34 34 second
+35 35 35 second
+36 36 36 second
+37 37 37 second
+38 38 38 second
+39 39 39 second
+40 40 40 second
+41 41 41 second
+42 42 42 second
+43 43 43 second
+44 44 44 second
+45 45 45 second
+46 46 46 second
+47 47 47 second
+48 48 48 second
+49 49 49 second
+50 50 50 second
+select * from t2 order by f1;
+f1 f2 f3 f4
+1 1 1 first
+2 2 2 second
+3 3 3 third
+select * from t3 order by f1;
+f1 f2 f3 f4
+1 1 1 first
+select * from t4 order by f1;
+f1 f2 f3 f4
+1 1 1 first
+select * from t31 order by f1;
+f1 f2 f3 f4
+1 1 5 fifth
+1 1 3 third
+1 1 1 first
+1 1 6 sixth
+1 1 2 second
+1 1 4 fourth
+
+** Do updates master **
+
+update t31 set f5=555555555555555 where f3=6;
+update t31 set f2=2 where f3=2;
+update t31 set f1=NULL where f3=1;
+update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3;
+Warnings:
+Warning 1048 Column 'f3' cannot be null
+
+** Delete from Master **
+
+delete from t1;
+delete from t2;
+delete from t3;
+delete from t4;
+delete from t31;
+
+** Check slave status **
+
+select * from t31;
+f1 f2 f3 f4
+show slave status;;
+Slave_IO_State #
+Master_Host 127.0.0.1
+Master_User root
+Master_Port #
+Connect_Retry 1
+Master_Log_File master-bin.000001
+Read_Master_Log_Pos #
+Relay_Log_File #
+Relay_Log_Pos #
+Relay_Master_Log_File master-bin.000001
+Slave_IO_Running Yes
+Slave_SQL_Running Yes
+Replicate_Do_DB
+Replicate_Ignore_DB
+Replicate_Do_Table
+Replicate_Ignore_Table
+Replicate_Wild_Do_Table
+Replicate_Wild_Ignore_Table
+Last_Errno 0
+Last_Error
+Skip_Counter 0
+Exec_Master_Log_Pos #
+Relay_Log_Space #
+Until_Condition None
+Until_Log_File
+Until_Log_Pos 0
+Master_SSL_Allowed No
+Master_SSL_CA_File
+Master_SSL_CA_Path
+Master_SSL_Cert
+Master_SSL_Cipher
+Master_SSL_Key
+Seconds_Behind_Master #
+Master_SSL_Verify_Server_Cert No
+Last_IO_Errno #
+Last_IO_Error #
+Last_SQL_Errno 0
+Last_SQL_Error
+
+****************************************
+* columns in master at middle of table *
+* Expect: Proper error message *
+****************************************
+
+** Stop and Reset Slave **
+
+STOP SLAVE;
+RESET SLAVE;
+
+** create table slave side **
+CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5)
+) ENGINE='NDB';
+
+** Connect to master and create table **
+
+CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233',
+c CHAR(5), e INT DEFAULT '1')ENGINE='NDB';
+RESET MASTER;
+
+*** Start Slave ***
+START SLAVE;
+
+*** Master Data Insert ***
+set @b1 = 'b1b1b1b1';
+set @b1 = concat(@b1,@b1);
+INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT),
+(2,@b1,DEFAULT,'JOE',DEFAULT),
+(3,@b1,DEFAULT,'QA',DEFAULT);
+
+********************************************
+*** Expect slave to fail with Error 1523 ***
+********************************************
+
+SHOW SLAVE STATUS;
+Slave_IO_State #
+Master_Host 127.0.0.1
+Master_User root
+Master_Port #
+Connect_Retry 1
+Master_Log_File master-bin.000001
+Read_Master_Log_Pos #
+Relay_Log_File #
+Relay_Log_Pos #
+Relay_Master_Log_File master-bin.000001
+Slave_IO_Running Yes
+Slave_SQL_Running No
+Replicate_Do_DB
+Replicate_Ignore_DB
+Replicate_Do_Table
+Replicate_Ignore_Table
+Replicate_Wild_Do_Table
+Replicate_Wild_Ignore_Table
+Last_Errno 1534
+Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
+Skip_Counter 0
+Exec_Master_Log_Pos #
+Relay_Log_Space #
+Until_Condition None
+Until_Log_File
+Until_Log_Pos 0
+Master_SSL_Allowed No
+Master_SSL_CA_File
+Master_SSL_CA_Path
+Master_SSL_Cert
+Master_SSL_Cipher
+Master_SSL_Key
+Seconds_Behind_Master #
+Master_SSL_Verify_Server_Cert No
+Last_IO_Errno #
+Last_IO_Error #
+Last_SQL_Errno 1534
+Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
+START SLAVE;
+
+*** Drop t10 ***
+DROP TABLE t10;
+
+*********************************************
+* More columns in master at middle of table *
+* Expect: Proper error message *
+*********************************************
+
+*** Create t11 on slave ***
+STOP SLAVE;
+RESET SLAVE;
+CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254)
+) ENGINE='NDB';
+
+*** Create t11 on Master ***
+CREATE TABLE t11 (a INT KEY, b BLOB, f TEXT,
+c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='NDB';
+RESET MASTER;
+
+*** Start Slave ***
+START SLAVE;
+
+*** Master Data Insert ***
+set @b1 = 'b1b1b1b1';
+set @b1 = concat(@b1,@b1);
+INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT),
+(2,@b1,'Testing is cool','JOE',DEFAULT),
+(3,@b1,DEFAULT,'QA',DEFAULT);
+
+********************************************
+*** Expect slave to fail with Error 1523 ***
+********************************************
+
+SHOW SLAVE STATUS;
+Slave_IO_State #
+Master_Host 127.0.0.1
+Master_User root
+Master_Port #
+Connect_Retry 1
+Master_Log_File master-bin.000001
+Read_Master_Log_Pos #
+Relay_Log_File #
+Relay_Log_Pos #
+Relay_Master_Log_File master-bin.000001
+Slave_IO_Running Yes
+Slave_SQL_Running No
+Replicate_Do_DB
+Replicate_Ignore_DB
+Replicate_Do_Table
+Replicate_Ignore_Table
+Replicate_Wild_Do_Table
+Replicate_Wild_Ignore_Table
+Last_Errno 1534
+Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
+Skip_Counter 0
+Exec_Master_Log_Pos #
+Relay_Log_Space #
+Until_Condition None
+Until_Log_File
+Until_Log_Pos 0
+Master_SSL_Allowed No
+Master_SSL_CA_File
+Master_SSL_CA_Path
+Master_SSL_Cert
+Master_SSL_Cipher
+Master_SSL_Key
+Seconds_Behind_Master #
+Master_SSL_Verify_Server_Cert No
+Last_IO_Errno #
+Last_IO_Error #
+Last_SQL_Errno 1534
+Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
+START SLAVE;
+
+*** Drop t11 ***
+DROP TABLE t11;
+
+*********************************************
+* More columns in master at middle of table *
+* Expect: This one should pass blob-text *
+*********************************************
+
+*** Create t12 on slave ***
+STOP SLAVE;
+RESET SLAVE;
+CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB
+) ENGINE='NDB';
+
+*** Create t12 on Master ***
+CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT,
+c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='NDB';
+RESET MASTER;
+
+*** Start Slave ***
+START SLAVE;
+
+*** Master Data Insert ***
+set @b1 = 'b1b1b1b1';
+set @b1 = concat(@b1,@b1);
+INSERT INTO t12 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT),
+(2,@b1,'JOE',DEFAULT,DEFAULT),
+(3,@b1,'QA',DEFAULT,DEFAULT);
+
+SELECT a,hex(b),f,c,e FROM t12 ORDER BY a;
+a hex(b) f c e
+1 62316231623162316231623162316231 Kyle test 1
+2 62316231623162316231623162316231 JOE test 1
+3 62316231623162316231623162316231 QA test 1
+
+*** Select on Slave ***
+SELECT a,hex(b),c FROM t12 ORDER BY a;
+a hex(b) c
+1 62316231623162316231623162316231 Kyle
+2 62316231623162316231623162316231 JOE
+3 62316231623162316231623162316231 QA
+
+*** Drop t12 ***
+DROP TABLE t12;
+
+****************************************************
+* - Alter Master adding columns at middle of table *
+* Expect: columns added *
+****************************************************
+
+
+*** Create t14 on slave ***
+STOP SLAVE;
+RESET SLAVE;
+CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
+) ENGINE='NDB';
+
+*** Create t14 on Master ***
+CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
+c6 INT DEFAULT '1',
+c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
+)ENGINE='NDB';
+RESET MASTER;
+
+*** Start Slave ***
+START SLAVE;
+
+*** Master Data Insert ***
+ALTER TABLE t14 ADD COLUMN c2 DECIMAL(8,2) AFTER c1;
+ALTER TABLE t14 ADD COLUMN c3 TEXT AFTER c2;
+
+set @b1 = 'b1b1b1b1';
+set @b1 = concat(@b1,@b1);
+INSERT INTO t14 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle',DEFAULT,DEFAULT),
+(2,2.00,'This Test Should work',@b1,'JOE',DEFAULT,DEFAULT),
+(3,3.00,'If is does not, I will open a bug',@b1,'QA',DEFAULT,DEFAULT);
+
+SELECT c1,c2,c3,hex(c4),c5,c6,c7 FROM t14 ORDER BY c1;
+c1 c2 c3 hex(c4) c5 c6 c7
+1 1.00 Replication Testing Extra Col 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP
+2 2.00 This Test Should work 62316231623162316231623162316231 JOE 1 CURRENT_TIMESTAMP
+3 3.00 If is does not, I will open a bug 62316231623162316231623162316231 QA 1 CURRENT_TIMESTAMP
+
+*** Select on Slave ****
+SELECT c1,c2,c3,hex(c4),c5 FROM t14 ORDER BY c1;
+c1 c2 c3 hex(c4) c5
+1 1.00 Replication Testing Extra Col 62316231623162316231623162316231 Kyle
+2 2.00 This Test Should work 62316231623162316231623162316231 JOE
+3 3.00 If is does not, I will open a bug 62316231623162316231623162316231 QA
+
+****************************************************
+* - Alter Master Dropping columns from the middle. *
+* Expect: columns dropped *
+****************************************************
+
+*** connect to master and drop columns ***
+ALTER TABLE t14 DROP COLUMN c2;
+ALTER TABLE t14 DROP COLUMN c7;
+
+*** Select from Master ***
+SELECT c1,c3,hex(c4),c5,c6 FROM t14 ORDER BY c1;
+c1 c3 hex(c4) c5 c6
+1 Replication Testing Extra Col 62316231623162316231623162316231 Kyle 1
+2 This Test Should work 62316231623162316231623162316231 JOE 1
+3 If is does not, I will open a bug 62316231623162316231623162316231 QA 1
+
+************
+* Bug30415 *
+************
+SHOW SLAVE STATUS;
+Slave_IO_State #
+Master_Host 127.0.0.1
+Master_User root
+Master_Port #
+Connect_Retry 1
+Master_Log_File master-bin.000001
+Read_Master_Log_Pos #
+Relay_Log_File #
+Relay_Log_Pos #
+Relay_Master_Log_File master-bin.000001
+Slave_IO_Running Yes
+Slave_SQL_Running No
+Replicate_Do_DB
+Replicate_Ignore_DB
+Replicate_Do_Table
+Replicate_Ignore_Table
+Replicate_Wild_Do_Table
+Replicate_Wild_Ignore_Table
+Last_Errno 1091
+Last_Error Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
+Skip_Counter 0
+Exec_Master_Log_Pos #
+Relay_Log_Space #
+Until_Condition None
+Until_Log_File
+Until_Log_Pos 0
+Master_SSL_Allowed No
+Master_SSL_CA_File
+Master_SSL_CA_Path
+Master_SSL_Cert
+Master_SSL_Cipher
+Master_SSL_Key
+Seconds_Behind_Master #
+Master_SSL_Verify_Server_Cert No
+Last_IO_Errno #
+Last_IO_Error #
+Last_SQL_Errno 1091
+Last_SQL_Error Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
+STOP SLAVE;
+RESET SLAVE;
+
+*** Drop t14 ***
+DROP TABLE t14;
+DROP TABLE t14;
+RESET MASTER;
+START SLAVE;
+
+*************************************************
+* - Alter Master adding columns at end of table *
+* Expect: Error 1054 *
+*************************************************
+
+*** Create t15 on slave ***
+STOP SLAVE;
+RESET SLAVE;
+CREATE TABLE t15 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
+) ENGINE='NDB';
+
+*** Create t15 on Master ***
+CREATE TABLE t15 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
+c6 INT DEFAULT '1',
+c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
+)ENGINE='NDB';
+RESET MASTER;
+
+*** Start Slave ***
+START SLAVE;
+
+*** Master Data Insert ***
+ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7;
+set @b1 = 'b1b1b1b1';
+set @b1 = concat(@b1,@b1);
+INSERT INTO t15 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT,3.00),
+(2,@b1,'JOE',DEFAULT,DEFAULT,3.00),
+(3,@b1,'QA',DEFAULT,DEFAULT,3.00);
+SELECT c1,hex(c4),c5,c6,c7,c2 FROM t15 ORDER BY c1;
+c1 hex(c4) c5 c6 c7 c2
+1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP 3.00
+2 62316231623162316231623162316231 JOE 1 CURRENT_TIMESTAMP 3.00
+3 62316231623162316231623162316231 QA 1 CURRENT_TIMESTAMP 3.00
+
+********************************************
+*** Expect slave to fail with Error 1054 ***
+********************************************
+
+SHOW SLAVE STATUS;
+Slave_IO_State #
+Master_Host 127.0.0.1
+Master_User root
+Master_Port #
+Connect_Retry 1
+Master_Log_File master-bin.000001
+Read_Master_Log_Pos #
+Relay_Log_File #
+Relay_Log_Pos #
+Relay_Master_Log_File master-bin.000001
+Slave_IO_Running Yes
+Slave_SQL_Running No
+Replicate_Do_DB
+Replicate_Ignore_DB
+Replicate_Do_Table
+Replicate_Ignore_Table
+Replicate_Wild_Do_Table
+Replicate_Wild_Ignore_Table
+Last_Errno 1054
+Last_Error Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
+Skip_Counter 0
+Exec_Master_Log_Pos #
+Relay_Log_Space #
+Until_Condition None
+Until_Log_File
+Until_Log_Pos 0
+Master_SSL_Allowed No
+Master_SSL_CA_File
+Master_SSL_CA_Path
+Master_SSL_Cert
+Master_SSL_Cipher
+Master_SSL_Key
+Seconds_Behind_Master #
+Master_SSL_Verify_Server_Cert No
+Last_IO_Errno #
+Last_IO_Error #
+Last_SQL_Errno 1054
+Last_SQL_Error Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
+STOP SLAVE;
+RESET SLAVE;
+
+*** Drop t15 ***
+DROP TABLE t15;
+DROP TABLE t15;
+RESET MASTER;
+START SLAVE;
+
+************************************************
+* - Create index on Master column not on slave *
+* Expect:Warning *
+************************************************
+
+*** Create t16 on slave ***
+STOP SLAVE;
+RESET SLAVE;
+CREATE TABLE t16 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
+) ENGINE='NDB';
+
+*** Create t16 on Master ***
+CREATE TABLE t16 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
+c6 INT DEFAULT '1',
+c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
+)ENGINE='NDB';
+RESET MASTER;
+
+*** Start Slave ***
+START SLAVE;
+
+*** Master Create Index and Data Insert ***
+CREATE INDEX part_of_c6 ON t16 (c6);
+set @b1 = 'b1b1b1b1';
+set @b1 = concat(@b1,@b1);
+INSERT INTO t16 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT),
+(2,@b1,'JOE',2,DEFAULT),
+(3,@b1,'QA',3,DEFAULT);
+SELECT c1,hex(c4),c5,c6,c7 FROM t16 ORDER BY c1;
+c1 hex(c4) c5 c6 c7
+1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP
+2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP
+3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP
+
+*****************
+*** BUG 30434 ***
+*****************
+
+SHOW SLAVE STATUS;
+Slave_IO_State #
+Master_Host 127.0.0.1
+Master_User root
+Master_Port #
+Connect_Retry 1
+Master_Log_File master-bin.000001
+Read_Master_Log_Pos #
+Relay_Log_File #
+Relay_Log_Pos #
+Relay_Master_Log_File master-bin.000001
+Slave_IO_Running Yes
+Slave_SQL_Running No
+Replicate_Do_DB
+Replicate_Ignore_DB
+Replicate_Do_Table
+Replicate_Ignore_Table
+Replicate_Wild_Do_Table
+Replicate_Wild_Ignore_Table
+Last_Errno 1072
+Last_Error Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
+Skip_Counter 0
+Exec_Master_Log_Pos #
+Relay_Log_Space #
+Until_Condition None
+Until_Log_File
+Until_Log_Pos 0
+Master_SSL_Allowed No
+Master_SSL_CA_File
+Master_SSL_CA_Path
+Master_SSL_Cert
+Master_SSL_Cipher
+Master_SSL_Key
+Seconds_Behind_Master #
+Master_SSL_Verify_Server_Cert No
+Last_IO_Errno #
+Last_IO_Error #
+Last_SQL_Errno 1072
+Last_SQL_Error Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
+STOP SLAVE;
+RESET SLAVE;
+
+*** Drop t16 ***
+DROP TABLE t16;
+DROP TABLE t16;
+RESET MASTER;
+START SLAVE;
+
+*****************************************************
+* - Delete rows using column on Master not on slave *
+* Expect: Rows Deleted *
+*****************************************************
+
+*** Create t17 on slave ***
+STOP SLAVE;
+RESET SLAVE;
+CREATE TABLE t17 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
+) ENGINE='NDB';
+
+*** Create t17 on Master ***
+CREATE TABLE t17 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
+c6 INT DEFAULT '1',
+c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
+)ENGINE='NDB';
+RESET MASTER;
+
+*** Start Slave ***
+START SLAVE;
+
+*** Master Data Insert ***
+set @b1 = 'b1b1b1b1';
+set @b1 = concat(@b1,@b1);
+INSERT INTO t17 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT),
+(2,@b1,'JOE',2,DEFAULT),
+(3,@b1,'QA',3,DEFAULT);
+SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1;
+c1 hex(c4) c5 c6 c7
+1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP
+2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP
+3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP
+
+** Select * from Slave **
+SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1;
+c1 hex(c4) c5
+1 62316231623162316231623162316231 Kyle
+2 62316231623162316231623162316231 JOE
+3 62316231623162316231623162316231 QA
+
+** Delete from master **
+DELETE FROM t17 WHERE c6 = 3;
+SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1;
+c1 hex(c4) c5 c6 c7
+1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP
+2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP
+
+** Check slave **
+SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1;
+c1 hex(c4) c5
+1 62316231623162316231623162316231 Kyle
+2 62316231623162316231623162316231 JOE
+DROP TABLE t17;
+
+
+*****************************************************
+* - Update row using column on Master not on slave *
+* Expect: Rows updated *
+*****************************************************
+
+** Bug30674 **
+
+*** Create t18 on slave ***
+
+STOP SLAVE;
+RESET SLAVE;
+CREATE TABLE t18 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
+) ENGINE='NDB';
+
+*** Create t18 on Master ***
+CREATE TABLE t18 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
+c6 INT DEFAULT '1',
+c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
+)ENGINE='NDB';
+RESET MASTER;
+
+*** Start Slave ***
+START SLAVE;
+
+*** Master Data Insert ***
+set @b1 = 'b1b1b1b1';
+set @b1 = concat(@b1,@b1);
+INSERT INTO t18 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT),
+(2,@b1,'JOE',2,DEFAULT),
+(3,@b1,'QA',3,DEFAULT);
+SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1;
+c1 hex(c4) c5 c6 c7
+1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP
+2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP
+3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP
+
+** Select * from Slave **
+SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1;
+c1 hex(c4) c5
+1 62316231623162316231623162316231 Kyle
+2 62316231623162316231623162316231 JOE
+3 62316231623162316231623162316231 QA
+
+** update from master **
+SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1;
+c1 hex(c4) c5 c6 c7
+1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP
+2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP
+3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP
+
+** Check slave **
+SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1;
+c1 hex(c4) c5
+1 62316231623162316231623162316231 Kyle
+2 62316231623162316231623162316231 JOE
+3 62316231623162316231623162316231 QA
+DROP TABLE t18;
+
+
+*****************************************************
+* - Insert UUID column on Master not on slave *
+* Expect: Rows inserted *
+*****************************************************
+
+*** Create t5 on slave ***
+STOP SLAVE;
+RESET SLAVE;
+CREATE TABLE t5 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
+) ENGINE='NDB';
+
+*** Create t5 on Master ***
+CREATE TABLE t5 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
+c6 LONG,
+c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
+)ENGINE='NDB';
+RESET MASTER;
+
+*** Start Slave ***
+START SLAVE;
+
+*** Master Data Insert ***
+set @b1 = 'b1b1b1b1';
+INSERT INTO t5 () VALUES(1,@b1,'Kyle',UUID(),DEFAULT),
+(2,@b1,'JOE',UUID(),DEFAULT),
+(3,@b1,'QA',UUID(),DEFAULT);
+SELECT c1,hex(c4),c5,c6,c7 FROM t5 ORDER BY c1;
+c1 hex(c4) c5 c6 c7
+1 6231623162316231 Kyle UUID TIME
+2 6231623162316231 JOE UUID TIME
+3 6231623162316231 QA UUID TIME
+
+** Select * from Slave **
+SELECT c1,hex(c4),c5 FROM t5 ORDER BY c1;
+c1 hex(c4) c5
+1 6231623162316231 Kyle
+2 6231623162316231 JOE
+3 6231623162316231 QA
+DROP TABLE t5;
+
+set binlog_format=mixed;
+
+***********************************************************
+***********************************************************
+***************** Start of Testing ************************
+***********************************************************
+***********************************************************
+* This test format == binlog_format MIXED and engine == 'NDB'
+***********************************************************
+***********************************************************
+
+***** Testing more columns on the Master *****
+
+CREATE TABLE t1 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20),
+/* extra */
+f5 FLOAT DEFAULT '2.00',
+f6 CHAR(4) DEFAULT 'TEST',
+f7 INT DEFAULT '0',
+f8 TEXT,
+f9 LONGBLOB,
+f10 BIT(63),
+f11 VARBINARY(64))ENGINE='NDB';
+
+* Alter Table on Slave and drop columns f5 through f11 *
+
+alter table t1 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11;
+
+* Insert data in Master then update and delete some rows*
+
+* Select count and 20 rows from Master *
+
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+40
+
+SELECT f1,f2,f3,f4,f5,f6,f7,f8,f9,
+hex(f10),hex(f11) FROM t1 ORDER BY f3 LIMIT 20;
+f1 f2 f3 f4 f5 f6 f7 f8 f9 hex(f10) hex(f11)
+2 2 2 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
+3 3 3 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
+5 5 5 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
+6 6 6 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
+8 8 8 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
+9 9 9 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
+11 11 11 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
+12 12 12 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
+14 14 14 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
+15 15 15 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
+17 17 17 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
+18 18 18 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
+20 20 20 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
+21 21 21 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
+23 23 23 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
+24 24 24 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
+26 26 26 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
+27 27 27 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
+29 29 29 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
+30 30 30 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
+
+* Select count and 20 rows from Slave *
+
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+40
+
+SELECT * FROM t1 ORDER BY f3 LIMIT 20;
+f1 f2 f3 f4
+2 2 2 second
+3 3 3 next
+5 5 5 second
+6 6 6 next
+8 8 8 second
+9 9 9 next
+11 11 11 second
+12 12 12 next
+14 14 14 second
+15 15 15 next
+17 17 17 second
+18 18 18 next
+20 20 20 second
+21 21 21 next
+23 23 23 second
+24 24 24 next
+26 26 26 second
+27 27 27 next
+29 29 29 second
+30 30 30 next
+
+* Show Slave Status *
+
+show slave status;;
+Slave_IO_State #
+Master_Host 127.0.0.1
+Master_User root
+Master_Port #
+Connect_Retry 1
+Master_Log_File master-bin.000001
+Read_Master_Log_Pos #
+Relay_Log_File #
+Relay_Log_Pos #
+Relay_Master_Log_File master-bin.000001
+Slave_IO_Running Yes
+Slave_SQL_Running Yes
+Replicate_Do_DB
+Replicate_Ignore_DB
+Replicate_Do_Table
+Replicate_Ignore_Table
+Replicate_Wild_Do_Table
+Replicate_Wild_Ignore_Table
+Last_Errno 0
+Last_Error
+Skip_Counter 0
+Exec_Master_Log_Pos #
+Relay_Log_Space #
+Until_Condition None
+Until_Log_File
+Until_Log_Pos 0
+Master_SSL_Allowed No
+Master_SSL_CA_File
+Master_SSL_CA_Path
+Master_SSL_Cert
+Master_SSL_Cipher
+Master_SSL_Key
+Seconds_Behind_Master #
+Master_SSL_Verify_Server_Cert No
+Last_IO_Errno #
+Last_IO_Error #
+Last_SQL_Errno 0
+Last_SQL_Error
+
+
+***** Testing Altering table def scenario *****
+
+CREATE TABLE t2 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20),
+/* extra */
+f5 DOUBLE DEFAULT '2.00',
+f6 ENUM('a', 'b', 'c') default 'a',
+f7 DECIMAL(17,9) default '1000.00',
+f8 MEDIUMBLOB,
+f9 NUMERIC(6,4) default '2000.00',
+f10 VARCHAR(1024),
+f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0',
+f12 SET('a', 'b', 'c') default 'b')
+ENGINE='NDB';
+Warnings:
+Warning 1264 Out of range value for column 'f9' at row 1
+
+CREATE TABLE t3 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20),
+/* extra */
+f5 DOUBLE DEFAULT '2.00',
+f6 ENUM('a', 'b', 'c') default 'a',
+f8 MEDIUMBLOB,
+f10 VARCHAR(1024),
+f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0',
+f12 SET('a', 'b', 'c') default 'b')
+ENGINE='NDB';
+
+CREATE TABLE t4 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20),
+/* extra */
+f5 DOUBLE DEFAULT '2.00',
+f6 DECIMAL(17,9) default '1000.00',
+f7 MEDIUMBLOB,
+f8 NUMERIC(6,4) default '2000.00',
+f9 VARCHAR(1024),
+f10 BINARY(20) not null default '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0',
+f11 CHAR(255))
+ENGINE='NDB';
+Warnings:
+Warning 1264 Out of range value for column 'f8' at row 1
+
+CREATE TABLE t31 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20),
+/* extra */
+f5 BIGINT,
+f6 BLOB,
+f7 DATE,
+f8 DATETIME,
+f9 FLOAT,
+f10 INT,
+f11 LONGBLOB,
+f12 LONGTEXT,
+f13 MEDIUMBLOB,
+f14 MEDIUMINT,
+f15 MEDIUMTEXT,
+f16 REAL,
+f17 SMALLINT,
+f18 TEXT,
+f19 TIME,
+f20 TIMESTAMP,
+f21 TINYBLOB,
+f22 TINYINT,
+f23 TINYTEXT,
+f24 YEAR,
+f25 BINARY(255),
+f26 BIT(64),
+f27 CHAR(255),
+f28 DECIMAL(30,7),
+f29 DOUBLE,
+f30 ENUM ('a','b', 'c') default 'a',
+f31 FLOAT,
+f32 NUMERIC(17,9),
+f33 SET ('a', 'b', 'c') default 'b',
+f34 VARBINARY(1025),
+f35 VARCHAR(257)
+) ENGINE='NDB';
+
+** Alter tables on slave and drop columns **
+
+alter table t2 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11, drop
+f12;
+alter table t3 drop f5, drop f6, drop f8, drop f10, drop f11, drop f12;
+alter table t4 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11;
+alter table t31
+drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11,
+drop f12, drop f13, drop f14, drop f15, drop f16, drop f17, drop f18,
+drop f19, drop f20, drop f21, drop f22, drop f23, drop f24, drop f25,
+drop f26, drop f27, drop f28, drop f29, drop f30, drop f31, drop f32,
+drop f33, drop f34, drop f35;
+
+** Insert Data into Master **
+INSERT into t2 set f1=1, f2=1, f3=1, f4='first', f8='f8: medium size blob', f10='f10:
+some var char';
+INSERT into t2 values (2, 2, 2, 'second',
+2.0, 'b', 2000.0002, 'f8: medium size blob', 2000, 'f10: some var char',
+'01234567', 'c'),
+(3, 3, 3, 'third',
+3.0, 'b', 3000.0003, 'f8: medium size blob', 3000, 'f10: some var char',
+'01234567', 'c');
+Warnings:
+Warning 1264 Out of range value for column 'f9' at row 1
+Warning 1264 Out of range value for column 'f9' at row 2
+INSERT into t3 set f1=1, f2=1, f3=1, f4='first', f10='f10: some var char';
+INSERT into t4 set f1=1, f2=1, f3=1, f4='first', f7='f7: medium size blob', f10='f10:
+binary data';
+INSERT into t31 set f1=1, f2=1, f3=1, f4='first';
+INSERT into t31 set f1=1, f2=1, f3=2, f4='second',
+f9=2.2, f10='seven samurai', f28=222.222, f35='222';
+Warnings:
+Warning 1366 Incorrect integer value: 'seven samurai' for column 'f10' at row 1
+INSERT into t31 values (1, 1, 3, 'third',
+/* f5 BIGINT, */ 333333333333333333333333,
+/* f6 BLOB, */ '3333333333333333333333',
+/* f7 DATE, */ '2007-07-18',
+/* f8 DATETIME, */ "2007-07-18",
+/* f9 FLOAT, */ 3.33333333,
+/* f10 INT, */ 333333333,
+/* f11 LONGBLOB, */ '3333333333333333333',
+/* f12 LONGTEXT, */ '3333333333333333333',
+/* f13 MEDIUMBLOB, */ '3333333333333333333',
+/* f14 MEDIUMINT, */ 33,
+/* f15 MEDIUMTEXT, */ 3.3,
+/* f16 REAL, */ 3.3,
+/* f17 SMALLINT, */ 3,
+/* f18 TEXT, */ '33',
+/* f19 TIME, */ '2:59:58.999',
+/* f20 TIMESTAMP, */ 20000303000000,
+/* f21 TINYBLOB, */ '3333',
+/* f22 TINYINT, */ 3,
+/* f23 TINYTEXT, */ '3',
+/* f24 YEAR, */ 3000,
+/* f25 BINARY(255), */ 'three_33333',
+/* f26 BIT(64), */ b'011',
+/* f27 CHAR(255), */ 'three',
+/* f28 DECIMAL(30,7), */ 3.333,
+/* f29 DOUBLE, */ 3.333333333333333333333333333,
+/* f30 ENUM ('a','b','c')*/ 'c',
+/* f31 FLOAT, */ 3.0,
+/* f32 NUMERIC(17,9), */ 3.3333,
+/* f33 SET ('a','b','c'),*/ 'c',
+/*f34 VARBINARY(1025),*/ '3333 minus 3',
+/*f35 VARCHAR(257),*/ 'three times three'
+ );
+Warnings:
+Warning 1264 Out of range value for column 'f5' at row 1
+Warning 1264 Out of range value for column 'f24' at row 1
+INSERT into t31 values (1, 1, 4, 'fourth',
+/* f5 BIGINT, */ 333333333333333333333333,
+/* f6 BLOB, */ '3333333333333333333333',
+/* f7 DATE, */ '2007-07-18',
+/* f8 DATETIME, */ "2007-07-18",
+/* f9 FLOAT, */ 3.33333333,
+/* f10 INT, */ 333333333,
+/* f11 LONGBLOB, */ '3333333333333333333',
+/* f12 LONGTEXT, */ '3333333333333333333',
+/* f13 MEDIUMBLOB, */ '3333333333333333333',
+/* f14 MEDIUMINT, */ 33,
+/* f15 MEDIUMTEXT, */ 3.3,
+/* f16 REAL, */ 3.3,
+/* f17 SMALLINT, */ 3,
+/* f18 TEXT, */ '33',
+/* f19 TIME, */ '2:59:58.999',
+/* f20 TIMESTAMP, */ 20000303000000,
+/* f21 TINYBLOB, */ '3333',
+/* f22 TINYINT, */ 3,
+/* f23 TINYTEXT, */ '3',
+/* f24 YEAR, */ 3000,
+/* f25 BINARY(255), */ 'three_33333',
+/* f26 BIT(64), */ b'011',
+/* f27 CHAR(255), */ 'three',
+/* f28 DECIMAL(30,7), */ 3.333,
+/* f29 DOUBLE, */ 3.333333333333333333333333333,
+/* f30 ENUM ('a','b','c')*/ 'c',
+/* f31 FLOAT, */ 3.0,
+/* f32 NUMERIC(17,9), */ 3.3333,
+/* f33 SET ('a','b','c'),*/ 'c',
+/*f34 VARBINARY(1025),*/ '3333 minus 3',
+/*f35 VARCHAR(257),*/ 'three times three'
+ ),
+(1, 1, 5, 'fifth',
+/* f5 BIGINT, */ 333333333333333333333333,
+/* f6 BLOB, */ '3333333333333333333333',
+/* f7 DATE, */ '2007-07-18',
+/* f8 DATETIME, */ "2007-07-18",
+/* f9 FLOAT, */ 3.33333333,
+/* f10 INT, */ 333333333,
+/* f11 LONGBLOB, */ '3333333333333333333',
+/* f12 LONGTEXT, */ '3333333333333333333',
+/* f13 MEDIUMBLOB, */ '3333333333333333333',
+/* f14 MEDIUMINT, */ 33,
+/* f15 MEDIUMTEXT, */ 3.3,
+/* f16 REAL, */ 3.3,
+/* f17 SMALLINT, */ 3,
+/* f18 TEXT, */ '33',
+/* f19 TIME, */ '2:59:58.999',
+/* f20 TIMESTAMP, */ 20000303000000,
+/* f21 TINYBLOB, */ '3333',
+/* f22 TINYINT, */ 3,
+/* f23 TINYTEXT, */ '3',
+/* f24 YEAR, */ 3000,
+/* f25 BINARY(255), */ 'three_33333',
+/* f26 BIT(64), */ b'011',
+/* f27 CHAR(255), */ 'three',
+/* f28 DECIMAL(30,7), */ 3.333,
+/* f29 DOUBLE, */ 3.333333333333333333333333333,
+/* f30 ENUM ('a','b','c')*/ 'c',
+/* f31 FLOAT, */ 3.0,
+/* f32 NUMERIC(17,9), */ 3.3333,
+/* f33 SET ('a','b','c'),*/ 'c',
+/*f34 VARBINARY(1025),*/ '3333 minus 3',
+/*f35 VARCHAR(257),*/ 'three times three'
+ ),
+(1, 1, 6, 'sixth',
+/* f5 BIGINT, */ NULL,
+/* f6 BLOB, */ '3333333333333333333333',
+/* f7 DATE, */ '2007-07-18',
+/* f8 DATETIME, */ "2007-07-18",
+/* f9 FLOAT, */ 3.33333333,
+/* f10 INT, */ 333333333,
+/* f11 LONGBLOB, */ '3333333333333333333',
+/* f12 LONGTEXT, */ '3333333333333333333',
+/* f13 MEDIUMBLOB, */ '3333333333333333333',
+/* f14 MEDIUMINT, */ 33,
+/* f15 MEDIUMTEXT, */ 3.3,
+/* f16 REAL, */ 3.3,
+/* f17 SMALLINT, */ 3,
+/* f18 TEXT, */ '33',
+/* f19 TIME, */ '2:59:58.999',
+/* f20 TIMESTAMP, */ 20000303000000,
+/* f21 TINYBLOB, */ '3333',
+/* f22 TINYINT, */ 3,
+/* f23 TINYTEXT, */ '3',
+/* f24 YEAR, */ 3000,
+/* f25 BINARY(255), */ 'three_33333',
+/* f26 BIT(64), */ b'011',
+/* f27 CHAR(255), */ 'three',
+/* f28 DECIMAL(30,7), */ 3.333,
+/* f29 DOUBLE, */ 3.333333333333333333333333333,
+/* f30 ENUM ('a','b','c')*/ 'c',
+/* f31 FLOAT, */ 3.0,
+/* f32 NUMERIC(17,9), */ 3.3333,
+/* f33 SET ('a','b','c'),*/ 'c',
+/*f34 VARBINARY(1025),*/ '3333 minus 3',
+/*f35 VARCHAR(257),*/ NULL
+);
+Warnings:
+Warning 1264 Out of range value for column 'f5' at row 1
+Warning 1264 Out of range value for column 'f24' at row 1
+Warning 1264 Out of range value for column 'f5' at row 2
+Warning 1264 Out of range value for column 'f24' at row 2
+Warning 1264 Out of range value for column 'f24' at row 3
+
+** Sync slave with master **
+** Do selects from tables **
+
+select * from t1 order by f3;
+f1 f2 f3 f4
+2 2 2 second
+3 3 3 next
+5 5 5 second
+6 6 6 next
+8 8 8 second
+9 9 9 next
+11 11 11 second
+12 12 12 next
+14 14 14 second
+15 15 15 next
+17 17 17 second
+18 18 18 next
+20 20 20 second
+21 21 21 next
+23 23 23 second
+24 24 24 next
+26 26 26 second
+27 27 27 next
+29 29 29 second
+30 30 30 next
+31 31 31 second
+32 32 32 second
+33 33 33 second
+34 34 34 second
+35 35 35 second
+36 36 36 second
+37 37 37 second
+38 38 38 second
+39 39 39 second
+40 40 40 second
+41 41 41 second
+42 42 42 second
+43 43 43 second
+44 44 44 second
+45 45 45 second
+46 46 46 second
+47 47 47 second
+48 48 48 second
+49 49 49 second
+50 50 50 second
+select * from t2 order by f1;
+f1 f2 f3 f4
+1 1 1 first
+2 2 2 second
+3 3 3 third
+select * from t3 order by f1;
+f1 f2 f3 f4
+1 1 1 first
+select * from t4 order by f1;
+f1 f2 f3 f4
+1 1 1 first
+select * from t31 order by f1;
+f1 f2 f3 f4
+1 1 5 fifth
+1 1 3 third
+1 1 1 first
+1 1 6 sixth
+1 1 2 second
+1 1 4 fourth
+
+** Do updates master **
+
+update t31 set f5=555555555555555 where f3=6;
+update t31 set f2=2 where f3=2;
+update t31 set f1=NULL where f3=1;
+update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3;
+Warnings:
+Warning 1048 Column 'f3' cannot be null
+
+** Delete from Master **
+
+delete from t1;
+delete from t2;
+delete from t3;
+delete from t4;
+delete from t31;
+
+** Check slave status **
+
+select * from t31;
+f1 f2 f3 f4
+show slave status;;
+Slave_IO_State #
+Master_Host 127.0.0.1
+Master_User root
+Master_Port #
+Connect_Retry 1
+Master_Log_File master-bin.000001
+Read_Master_Log_Pos #
+Relay_Log_File #
+Relay_Log_Pos #
+Relay_Master_Log_File master-bin.000001
+Slave_IO_Running Yes
+Slave_SQL_Running Yes
+Replicate_Do_DB
+Replicate_Ignore_DB
+Replicate_Do_Table
+Replicate_Ignore_Table
+Replicate_Wild_Do_Table
+Replicate_Wild_Ignore_Table
+Last_Errno 0
+Last_Error
+Skip_Counter 0
+Exec_Master_Log_Pos #
+Relay_Log_Space #
+Until_Condition None
+Until_Log_File
+Until_Log_Pos 0
+Master_SSL_Allowed No
+Master_SSL_CA_File
+Master_SSL_CA_Path
+Master_SSL_Cert
+Master_SSL_Cipher
+Master_SSL_Key
+Seconds_Behind_Master #
+Master_SSL_Verify_Server_Cert No
+Last_IO_Errno #
+Last_IO_Error #
+Last_SQL_Errno 0
+Last_SQL_Error
+
+****************************************
+* columns in master at middle of table *
+* Expect: Proper error message *
+****************************************
+
+** Stop and Reset Slave **
+
+STOP SLAVE;
+RESET SLAVE;
+
+** create table slave side **
+CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5)
+) ENGINE='NDB';
+
+** Connect to master and create table **
+
+CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233',
+c CHAR(5), e INT DEFAULT '1')ENGINE='NDB';
+RESET MASTER;
+
+*** Start Slave ***
+START SLAVE;
+
+*** Master Data Insert ***
+set @b1 = 'b1b1b1b1';
+set @b1 = concat(@b1,@b1);
+INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT),
+(2,@b1,DEFAULT,'JOE',DEFAULT),
+(3,@b1,DEFAULT,'QA',DEFAULT);
+
+********************************************
+*** Expect slave to fail with Error 1523 ***
+********************************************
+
+SHOW SLAVE STATUS;
+Slave_IO_State #
+Master_Host 127.0.0.1
+Master_User root
+Master_Port #
+Connect_Retry 1
+Master_Log_File master-bin.000001
+Read_Master_Log_Pos #
+Relay_Log_File #
+Relay_Log_Pos #
+Relay_Master_Log_File master-bin.000001
+Slave_IO_Running Yes
+Slave_SQL_Running No
+Replicate_Do_DB
+Replicate_Ignore_DB
+Replicate_Do_Table
+Replicate_Ignore_Table
+Replicate_Wild_Do_Table
+Replicate_Wild_Ignore_Table
+Last_Errno 1534
+Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
+Skip_Counter 0
+Exec_Master_Log_Pos #
+Relay_Log_Space #
+Until_Condition None
+Until_Log_File
+Until_Log_Pos 0
+Master_SSL_Allowed No
+Master_SSL_CA_File
+Master_SSL_CA_Path
+Master_SSL_Cert
+Master_SSL_Cipher
+Master_SSL_Key
+Seconds_Behind_Master #
+Master_SSL_Verify_Server_Cert No
+Last_IO_Errno #
+Last_IO_Error #
+Last_SQL_Errno 1534
+Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
+START SLAVE;
+
+*** Drop t10 ***
+DROP TABLE t10;
+
+*********************************************
+* More columns in master at middle of table *
+* Expect: Proper error message *
+*********************************************
+
+*** Create t11 on slave ***
+STOP SLAVE;
+RESET SLAVE;
+CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254)
+) ENGINE='NDB';
+
+*** Create t11 on Master ***
+CREATE TABLE t11 (a INT KEY, b BLOB, f TEXT,
+c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='NDB';
+RESET MASTER;
+
+*** Start Slave ***
+START SLAVE;
+
+*** Master Data Insert ***
+set @b1 = 'b1b1b1b1';
+set @b1 = concat(@b1,@b1);
+INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT),
+(2,@b1,'Testing is cool','JOE',DEFAULT),
+(3,@b1,DEFAULT,'QA',DEFAULT);
+
+********************************************
+*** Expect slave to fail with Error 1523 ***
+********************************************
+
+SHOW SLAVE STATUS;
+Slave_IO_State #
+Master_Host 127.0.0.1
+Master_User root
+Master_Port #
+Connect_Retry 1
+Master_Log_File master-bin.000001
+Read_Master_Log_Pos #
+Relay_Log_File #
+Relay_Log_Pos #
+Relay_Master_Log_File master-bin.000001
+Slave_IO_Running Yes
+Slave_SQL_Running No
+Replicate_Do_DB
+Replicate_Ignore_DB
+Replicate_Do_Table
+Replicate_Ignore_Table
+Replicate_Wild_Do_Table
+Replicate_Wild_Ignore_Table
+Last_Errno 1534
+Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
+Skip_Counter 0
+Exec_Master_Log_Pos #
+Relay_Log_Space #
+Until_Condition None
+Until_Log_File
+Until_Log_Pos 0
+Master_SSL_Allowed No
+Master_SSL_CA_File
+Master_SSL_CA_Path
+Master_SSL_Cert
+Master_SSL_Cipher
+Master_SSL_Key
+Seconds_Behind_Master #
+Master_SSL_Verify_Server_Cert No
+Last_IO_Errno #
+Last_IO_Error #
+Last_SQL_Errno 1534
+Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
+START SLAVE;
+
+*** Drop t11 ***
+DROP TABLE t11;
+
+*********************************************
+* More columns in master at middle of table *
+* Expect: This one should pass blob-text *
+*********************************************
+
+*** Create t12 on slave ***
+STOP SLAVE;
+RESET SLAVE;
+CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB
+) ENGINE='NDB';
+
+*** Create t12 on Master ***
+CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT,
+c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='NDB';
+RESET MASTER;
+
+*** Start Slave ***
+START SLAVE;
+
+*** Master Data Insert ***
+set @b1 = 'b1b1b1b1';
+set @b1 = concat(@b1,@b1);
+INSERT INTO t12 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT),
+(2,@b1,'JOE',DEFAULT,DEFAULT),
+(3,@b1,'QA',DEFAULT,DEFAULT);
+
+SELECT a,hex(b),f,c,e FROM t12 ORDER BY a;
+a hex(b) f c e
+1 62316231623162316231623162316231 Kyle test 1
+2 62316231623162316231623162316231 JOE test 1
+3 62316231623162316231623162316231 QA test 1
+
+*** Select on Slave ***
+SELECT a,hex(b),c FROM t12 ORDER BY a;
+a hex(b) c
+1 62316231623162316231623162316231 Kyle
+2 62316231623162316231623162316231 JOE
+3 62316231623162316231623162316231 QA
+
+*** Drop t12 ***
+DROP TABLE t12;
+
+****************************************************
+* - Alter Master adding columns at middle of table *
+* Expect: columns added *
+****************************************************
+
+
+*** Create t14 on slave ***
+STOP SLAVE;
+RESET SLAVE;
+CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
+) ENGINE='NDB';
+
+*** Create t14 on Master ***
+CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
+c6 INT DEFAULT '1',
+c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
+)ENGINE='NDB';
+RESET MASTER;
+
+*** Start Slave ***
+START SLAVE;
+
+*** Master Data Insert ***
+ALTER TABLE t14 ADD COLUMN c2 DECIMAL(8,2) AFTER c1;
+ALTER TABLE t14 ADD COLUMN c3 TEXT AFTER c2;
+
+set @b1 = 'b1b1b1b1';
+set @b1 = concat(@b1,@b1);
+INSERT INTO t14 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle',DEFAULT,DEFAULT),
+(2,2.00,'This Test Should work',@b1,'JOE',DEFAULT,DEFAULT),
+(3,3.00,'If is does not, I will open a bug',@b1,'QA',DEFAULT,DEFAULT);
+
+SELECT c1,c2,c3,hex(c4),c5,c6,c7 FROM t14 ORDER BY c1;
+c1 c2 c3 hex(c4) c5 c6 c7
+1 1.00 Replication Testing Extra Col 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP
+2 2.00 This Test Should work 62316231623162316231623162316231 JOE 1 CURRENT_TIMESTAMP
+3 3.00 If is does not, I will open a bug 62316231623162316231623162316231 QA 1 CURRENT_TIMESTAMP
+
+*** Select on Slave ****
+SELECT c1,c2,c3,hex(c4),c5 FROM t14 ORDER BY c1;
+c1 c2 c3 hex(c4) c5
+1 1.00 Replication Testing Extra Col 62316231623162316231623162316231 Kyle
+2 2.00 This Test Should work 62316231623162316231623162316231 JOE
+3 3.00 If is does not, I will open a bug 62316231623162316231623162316231 QA
+
+****************************************************
+* - Alter Master Dropping columns from the middle. *
+* Expect: columns dropped *
+****************************************************
+
+*** connect to master and drop columns ***
+ALTER TABLE t14 DROP COLUMN c2;
+ALTER TABLE t14 DROP COLUMN c7;
+
+*** Select from Master ***
+SELECT c1,c3,hex(c4),c5,c6 FROM t14 ORDER BY c1;
+c1 c3 hex(c4) c5 c6
+1 Replication Testing Extra Col 62316231623162316231623162316231 Kyle 1
+2 This Test Should work 62316231623162316231623162316231 JOE 1
+3 If is does not, I will open a bug 62316231623162316231623162316231 QA 1
+
+************
+* Bug30415 *
+************
+SHOW SLAVE STATUS;
+Slave_IO_State #
+Master_Host 127.0.0.1
+Master_User root
+Master_Port #
+Connect_Retry 1
+Master_Log_File master-bin.000001
+Read_Master_Log_Pos #
+Relay_Log_File #
+Relay_Log_Pos #
+Relay_Master_Log_File master-bin.000001
+Slave_IO_Running Yes
+Slave_SQL_Running No
+Replicate_Do_DB
+Replicate_Ignore_DB
+Replicate_Do_Table
+Replicate_Ignore_Table
+Replicate_Wild_Do_Table
+Replicate_Wild_Ignore_Table
+Last_Errno 1091
+Last_Error Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
+Skip_Counter 0
+Exec_Master_Log_Pos #
+Relay_Log_Space #
+Until_Condition None
+Until_Log_File
+Until_Log_Pos 0
+Master_SSL_Allowed No
+Master_SSL_CA_File
+Master_SSL_CA_Path
+Master_SSL_Cert
+Master_SSL_Cipher
+Master_SSL_Key
+Seconds_Behind_Master #
+Master_SSL_Verify_Server_Cert No
+Last_IO_Errno #
+Last_IO_Error #
+Last_SQL_Errno 1091
+Last_SQL_Error Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
+STOP SLAVE;
+RESET SLAVE;
+
+*** Drop t14 ***
+DROP TABLE t14;
+DROP TABLE t14;
+RESET MASTER;
+START SLAVE;
+
+*************************************************
+* - Alter Master adding columns at end of table *
+* Expect: Error 1054 *
+*************************************************
+
+*** Create t15 on slave ***
+STOP SLAVE;
+RESET SLAVE;
+CREATE TABLE t15 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
+) ENGINE='NDB';
+
+*** Create t15 on Master ***
+CREATE TABLE t15 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
+c6 INT DEFAULT '1',
+c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
+)ENGINE='NDB';
+RESET MASTER;
+
+*** Start Slave ***
+START SLAVE;
+
+*** Master Data Insert ***
+ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7;
+set @b1 = 'b1b1b1b1';
+set @b1 = concat(@b1,@b1);
+INSERT INTO t15 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT,3.00),
+(2,@b1,'JOE',DEFAULT,DEFAULT,3.00),
+(3,@b1,'QA',DEFAULT,DEFAULT,3.00);
+SELECT c1,hex(c4),c5,c6,c7,c2 FROM t15 ORDER BY c1;
+c1 hex(c4) c5 c6 c7 c2
+1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP 3.00
+2 62316231623162316231623162316231 JOE 1 CURRENT_TIMESTAMP 3.00
+3 62316231623162316231623162316231 QA 1 CURRENT_TIMESTAMP 3.00
+
+********************************************
+*** Expect slave to fail with Error 1054 ***
+********************************************
+
+SHOW SLAVE STATUS;
+Slave_IO_State #
+Master_Host 127.0.0.1
+Master_User root
+Master_Port #
+Connect_Retry 1
+Master_Log_File master-bin.000001
+Read_Master_Log_Pos #
+Relay_Log_File #
+Relay_Log_Pos #
+Relay_Master_Log_File master-bin.000001
+Slave_IO_Running Yes
+Slave_SQL_Running No
+Replicate_Do_DB
+Replicate_Ignore_DB
+Replicate_Do_Table
+Replicate_Ignore_Table
+Replicate_Wild_Do_Table
+Replicate_Wild_Ignore_Table
+Last_Errno 1054
+Last_Error Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
+Skip_Counter 0
+Exec_Master_Log_Pos #
+Relay_Log_Space #
+Until_Condition None
+Until_Log_File
+Until_Log_Pos 0
+Master_SSL_Allowed No
+Master_SSL_CA_File
+Master_SSL_CA_Path
+Master_SSL_Cert
+Master_SSL_Cipher
+Master_SSL_Key
+Seconds_Behind_Master #
+Master_SSL_Verify_Server_Cert No
+Last_IO_Errno #
+Last_IO_Error #
+Last_SQL_Errno 1054
+Last_SQL_Error Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
+STOP SLAVE;
+RESET SLAVE;
+
+*** Drop t15 ***
+DROP TABLE t15;
+DROP TABLE t15;
+RESET MASTER;
+START SLAVE;
+
+************************************************
+* - Create index on Master column not on slave *
+* Expect:Warning *
+************************************************
+
+*** Create t16 on slave ***
+STOP SLAVE;
+RESET SLAVE;
+CREATE TABLE t16 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
+) ENGINE='NDB';
+
+*** Create t16 on Master ***
+CREATE TABLE t16 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
+c6 INT DEFAULT '1',
+c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
+)ENGINE='NDB';
+RESET MASTER;
+
+*** Start Slave ***
+START SLAVE;
+
+*** Master Create Index and Data Insert ***
+CREATE INDEX part_of_c6 ON t16 (c6);
+set @b1 = 'b1b1b1b1';
+set @b1 = concat(@b1,@b1);
+INSERT INTO t16 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT),
+(2,@b1,'JOE',2,DEFAULT),
+(3,@b1,'QA',3,DEFAULT);
+SELECT c1,hex(c4),c5,c6,c7 FROM t16 ORDER BY c1;
+c1 hex(c4) c5 c6 c7
+1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP
+2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP
+3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP
+
+*****************
+*** BUG 30434 ***
+*****************
+
+SHOW SLAVE STATUS;
+Slave_IO_State #
+Master_Host 127.0.0.1
+Master_User root
+Master_Port #
+Connect_Retry 1
+Master_Log_File master-bin.000001
+Read_Master_Log_Pos #
+Relay_Log_File #
+Relay_Log_Pos #
+Relay_Master_Log_File master-bin.000001
+Slave_IO_Running Yes
+Slave_SQL_Running No
+Replicate_Do_DB
+Replicate_Ignore_DB
+Replicate_Do_Table
+Replicate_Ignore_Table
+Replicate_Wild_Do_Table
+Replicate_Wild_Ignore_Table
+Last_Errno 1072
+Last_Error Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
+Skip_Counter 0
+Exec_Master_Log_Pos #
+Relay_Log_Space #
+Until_Condition None
+Until_Log_File
+Until_Log_Pos 0
+Master_SSL_Allowed No
+Master_SSL_CA_File
+Master_SSL_CA_Path
+Master_SSL_Cert
+Master_SSL_Cipher
+Master_SSL_Key
+Seconds_Behind_Master #
+Master_SSL_Verify_Server_Cert No
+Last_IO_Errno #
+Last_IO_Error #
+Last_SQL_Errno 1072
+Last_SQL_Error Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
+STOP SLAVE;
+RESET SLAVE;
+
+*** Drop t16 ***
+DROP TABLE t16;
+DROP TABLE t16;
+RESET MASTER;
+START SLAVE;
+
+*****************************************************
+* - Delete rows using column on Master not on slave *
+* Expect: Rows Deleted *
+*****************************************************
+
+*** Create t17 on slave ***
+STOP SLAVE;
+RESET SLAVE;
+CREATE TABLE t17 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
+) ENGINE='NDB';
+
+*** Create t17 on Master ***
+CREATE TABLE t17 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
+c6 INT DEFAULT '1',
+c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
+)ENGINE='NDB';
+RESET MASTER;
+
+*** Start Slave ***
+START SLAVE;
+
+*** Master Data Insert ***
+set @b1 = 'b1b1b1b1';
+set @b1 = concat(@b1,@b1);
+INSERT INTO t17 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT),
+(2,@b1,'JOE',2,DEFAULT),
+(3,@b1,'QA',3,DEFAULT);
+SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1;
+c1 hex(c4) c5 c6 c7
+1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP
+2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP
+3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP
+
+** Select * from Slave **
+SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1;
+c1 hex(c4) c5
+1 62316231623162316231623162316231 Kyle
+2 62316231623162316231623162316231 JOE
+3 62316231623162316231623162316231 QA
+
+** Delete from master **
+DELETE FROM t17 WHERE c6 = 3;
+SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1;
+c1 hex(c4) c5 c6 c7
+1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP
+2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP
+
+** Check slave **
+SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1;
+c1 hex(c4) c5
+1 62316231623162316231623162316231 Kyle
+2 62316231623162316231623162316231 JOE
+DROP TABLE t17;
+
+
+*****************************************************
+* - Update row using column on Master not on slave *
+* Expect: Rows updated *
+*****************************************************
+
+** Bug30674 **
+
+*** Create t18 on slave ***
+
+STOP SLAVE;
+RESET SLAVE;
+CREATE TABLE t18 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
+) ENGINE='NDB';
+
+*** Create t18 on Master ***
+CREATE TABLE t18 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
+c6 INT DEFAULT '1',
+c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
+)ENGINE='NDB';
+RESET MASTER;
+
+*** Start Slave ***
+START SLAVE;
+
+*** Master Data Insert ***
+set @b1 = 'b1b1b1b1';
+set @b1 = concat(@b1,@b1);
+INSERT INTO t18 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT),
+(2,@b1,'JOE',2,DEFAULT),
+(3,@b1,'QA',3,DEFAULT);
+SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1;
+c1 hex(c4) c5 c6 c7
+1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP
+2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP
+3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP
+
+** Select * from Slave **
+SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1;
+c1 hex(c4) c5
+1 62316231623162316231623162316231 Kyle
+2 62316231623162316231623162316231 JOE
+3 62316231623162316231623162316231 QA
+
+** update from master **
+SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1;
+c1 hex(c4) c5 c6 c7
+1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP
+2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP
+3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP
+
+** Check slave **
+SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1;
+c1 hex(c4) c5
+1 62316231623162316231623162316231 Kyle
+2 62316231623162316231623162316231 JOE
+3 62316231623162316231623162316231 QA
+DROP TABLE t18;
+
+
+*****************************************************
+* - Insert UUID column on Master not on slave *
+* Expect: Rows inserted *
+*****************************************************
+
+*** Create t5 on slave ***
+STOP SLAVE;
+RESET SLAVE;
+CREATE TABLE t5 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
+) ENGINE='NDB';
+
+*** Create t5 on Master ***
+CREATE TABLE t5 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
+c6 LONG,
+c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
+)ENGINE='NDB';
+RESET MASTER;
+
+*** Start Slave ***
+START SLAVE;
+
+*** Master Data Insert ***
+set @b1 = 'b1b1b1b1';
+INSERT INTO t5 () VALUES(1,@b1,'Kyle',UUID(),DEFAULT),
+(2,@b1,'JOE',UUID(),DEFAULT),
+(3,@b1,'QA',UUID(),DEFAULT);
+SELECT c1,hex(c4),c5,c6,c7 FROM t5 ORDER BY c1;
+c1 hex(c4) c5 c6 c7
+1 6231623162316231 Kyle UUID TIME
+2 6231623162316231 JOE UUID TIME
+3 6231623162316231 QA UUID TIME
+
+** Select * from Slave **
+SELECT c1,hex(c4),c5 FROM t5 ORDER BY c1;
+c1 hex(c4) c5
+1 6231623162316231 Kyle
+2 6231623162316231 JOE
+3 6231623162316231 QA
+DROP TABLE t5;
+
diff --git a/mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result b/mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result
index 5519e0dcd0c..abd5bad8e49 100644
--- a/mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result
+++ b/mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result
@@ -415,4 +415,23 @@ a b c
2 4 8
3 6 9
99 99 99
+**** Test for BUG#31552 ****
+**** On Master ****
+DELETE FROM t1;
+**** Resetting master and slave ****
+STOP SLAVE;
+RESET SLAVE;
+RESET MASTER;
+START SLAVE;
+**** On Master ****
+INSERT INTO t1 VALUES ('K','K'), ('L','L'), ('M','M');
+**** On Master ****
+DELETE FROM t1 WHERE C1 = 'L';
+DELETE FROM t1;
+SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
+COUNT(*) 0
+Last_SQL_Error
+0
+SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
+COUNT(*) 0
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8;
diff --git a/mysql-test/suite/rpl_ndb/t/disabled.def b/mysql-test/suite/rpl_ndb/t/disabled.def
index f372d44cb90..60bfa559953 100644
--- a/mysql-test/suite/rpl_ndb/t/disabled.def
+++ b/mysql-test/suite/rpl_ndb/t/disabled.def
@@ -11,16 +11,13 @@
##############################################################################
-rpl_ndb_2innodb : BUG#19227 2006-04-20 pekka pk delete apparently not replicated
-rpl_ndb_2myisam : BUG#19227 Seems to pass currently
-rpl_ndb_2other : BUG#21842 2007-08-30 tsmith test has never worked on bigendian (sol10-sparc-a, powermacg5
-rpl_ndb_dd_partitions : BUG#19259 2006-04-21 rpl_ndb_dd_partitions fails on s/AMD
-rpl_ndb_innodb2ndb : Bug#29549 rpl_ndb_myisam2ndb,rpl_ndb_innodb2ndb failed on Solaris for pack_length issue
-rpl_ndb_myisam2ndb : Bug#29549 rpl_ndb_myisam2ndb,rpl_ndb_innodb2ndb failed on Solaris for pack_length issue
+rpl_ndb_2innodb : Bug #32648 Test failure between NDB Cluster and other engines
+rpl_ndb_2myisam : Bug #32648 Test failure between NDB Cluster and other engines
+rpl_ndb_2other : Bug #32648 Test failure between NDB Cluster and other engines
rpl_ndb_ddl : BUG#28798 2007-05-31 lars Valgrind failure in NDB
-rpl_ndb_mix_innodb : BUG#28123 rpl_ndb_mix_innodb.test casue slave to core on sol10-sparc-a
rpl_ndb_ctype_ucs2_def : BUG#27404 util thd mysql_parse sig11 when mysqld default multibyte charset
-
+rpl_ndb_extraColMaster : BUG#30854 : Tables name show as binary in slave err msg on vm-win2003-64-b and Solaris
+rpl_ndb_mix_innodb : Bug #32720 Test rpl_ndb_mix_innodb fails on SPARC and PowerPC
# the below testcase have been reworked to avoid the bug, test contains comment, keep bug open
diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_charset.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_charset.test
index 4bac267443e..f14229a52f9 100644
--- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_charset.test
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_charset.test
@@ -1,8 +1,8 @@
########################################################
# By JBM 2005-02-15 Wrapped to allow reuse of test code#
########################################################
---source include/have_ndb.inc
--- source include/have_binlog_format_row.inc
+-- source include/have_ndb.inc
+-- source include/have_binlog_format_mixed_or_row.inc
-- source include/ndb_master-slave.inc
let $engine_type=NDB;
-- source extra/rpl_tests/rpl_row_charset.test
diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_extraColMaster.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_extraColMaster.test
new file mode 100644
index 00000000000..d78eda7eef1
--- /dev/null
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_extraColMaster.test
@@ -0,0 +1,14 @@
+#############################################################
+# Purpose: To test having extra columns on the master WL#3915
+#############################################################
+-- source include/have_ndb.inc
+-- source include/ndb_master-slave.inc
+-- source include/have_binlog_format_mixed_or_row.inc
+
+let $engine_type = 'NDB';
+
+set binlog_format=row;
+-- source extra/rpl_tests/rpl_extraMaster_Col.test
+
+set binlog_format=mixed;
+-- source extra/rpl_tests/rpl_extraMaster_Col.test
diff --git a/mysql-test/t/almost_full.test b/mysql-test/t/almost_full.test
new file mode 100644
index 00000000000..5c67ab3c088
--- /dev/null
+++ b/mysql-test/t/almost_full.test
@@ -0,0 +1,41 @@
+#
+# Some special cases with empty tables
+#
+
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+
+set global myisam_data_pointer_size=2;
+CREATE TABLE t1 (a int auto_increment primary key not null, b longtext) ENGINE=MyISAM;
+
+--disable_query_log
+let $1= 303;
+while ($1)
+{
+ INSERT INTO t1 SET b=repeat('a',200);
+ dec $1;
+}
+--enable_query_log
+
+DELETE FROM t1 WHERE a=1 or a=5;
+
+--error 1114
+INSERT INTO t1 SET b=repeat('a',600);
+CHECK TABLE t1 EXTENDED;
+
+--error 1114
+UPDATE t1 SET b=repeat('a', 800) where a=10;
+CHECK TABLE t1 EXTENDED;
+
+INSERT INTO t1 SET b=repeat('a',400);
+CHECK TABLE t1 EXTENDED;
+
+DELETE FROM t1 WHERE a=2 or a=6;
+UPDATE t1 SET b=repeat('a', 600) where a=11;
+CHECK TABLE t1 EXTENDED;
+drop table t1;
+
+set global myisam_data_pointer_size=default;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/analyze.test b/mysql-test/t/analyze.test
index 7c9830bb468..0903db1eca4 100644
--- a/mysql-test/t/analyze.test
+++ b/mysql-test/t/analyze.test
@@ -72,4 +72,16 @@ analyze table t1;
show index from t1;
drop table t1;
-# End of 4.1 tests
+--echo End of 4.1 tests
+
+#
+# Bug #30495: optimize table t1,t2,t3 extended errors
+#
+create table t1(a int);
+--error 1064
+analyze table t1 extended;
+--error 1064
+optimize table t1 extended;
+drop table t1;
+
+--echo End of 5.0 tests
diff --git a/mysql-test/t/archive.test b/mysql-test/t/archive.test
index 23c591856a7..b42c8446a32 100644
--- a/mysql-test/t/archive.test
+++ b/mysql-test/t/archive.test
@@ -1320,7 +1320,7 @@ SELECT * FROM t2;
INSERT INTO t2 VALUES (2,011401,37,'breaking','dreaded','Steinberg','W');
INSERT INTO t2 VALUES (3,011402,37,'Romans','scholastics','jarring','');
INSERT INTO t2 VALUES (4,011403,37,'intercepted','audiology','tinily','');
-OPTIMIZE TABLE t2 EXTENDED;
+OPTIMIZE TABLE t2;
SELECT * FROM t2;
REPAIR TABLE t2;
SELECT * FROM t2;
@@ -1351,8 +1351,16 @@ SELECT * FROM t2;
# Test INSERT DELAYED and wait until the table has one more record
SELECT COUNT(auto) FROM t2;
-INSERT DELAYED INTO t2 VALUES (4,011403,37,'intercepted','audiology','tinily','');
-while (`SELECT COUNT(auto)!=1214 FROM t2`)
+INSERT DELAYED INTO t2 VALUES (99999,011403,37,'the','delayed','insert','');
+
+# Insert another record since in Archive delayed values are only
+# guaranteed to materialize based on either:
+# 1) A new row showing up from a normal insert
+# 2) A flush table has occurred.
+INSERT INTO t2 VALUES (100000,000001,00,'after','delayed','insert','');
+
+# Wait for the delayed insert to appear
+while (`SELECT COUNT(auto)!=1215 FROM t2`)
{
sleep 0.1;
}
@@ -1361,7 +1369,7 @@ SELECT COUNT(auto) FROM t2;
# Adding test for ALTER TABLE
ALTER TABLE t2 DROP COLUMN fld6;
SHOW CREATE TABLE t2;
-SELECT * FROM t2;
+SELECT * FROM t2 WHERE auto != 100000;
# Adding tests for autoincrement
@@ -1559,3 +1567,34 @@ insert into t1 set a='';
insert into t1 set a='a';
check table t1 extended;
drop table t1;
+
+#
+# BUG#31036 - Using order by with archive table crashes server
+#
+
+CREATE TABLE t1(a VARCHAR(510)) ENGINE = ARCHIVE;
+
+let $bug31036=41;
+--disable_query_log
+while($bug31036)
+{
+ INSERT INTO t1(a) VALUES (REPEAT('a', 510));
+ dec $bug31036;
+}
+--enable_query_log
+INSERT INTO t1(a) VALUES ('');
+
+--disable_result_log
+SELECT * FROM t1 ORDER BY a;
+--enable_result_log
+
+DROP TABLE t1;
+
+#
+# BUG#31833 - ORDER BY leads to wrong result when ARCHIVE, BLOB and table
+# cache is full
+#
+CREATE TABLE t1(a INT NOT NULL AUTO_INCREMENT, b BLOB, KEY(a)) ENGINE=archive;
+INSERT INTO t1 VALUES (NULL, NULL),(NULL, NULL);
+FLUSH TABLE t1;
+SELECT * FROM t1 ORDER BY a;
diff --git a/mysql-test/t/bigint.test b/mysql-test/t/bigint.test
index da10f4efa61..5a589816dcd 100644
--- a/mysql-test/t/bigint.test
+++ b/mysql-test/t/bigint.test
@@ -113,6 +113,15 @@ t2.value64=t1.value64;
drop table t1, t2;
+# Test for BUG#30069, can't handle bigint -9223372036854775808 on
+# x86_64, with some GCC versions and optimizations.
+
+create table t1 (sint64 bigint not null);
+insert into t1 values (-9223372036854775808);
+select * from t1;
+
+drop table t1;
+
# End of 4.1 tests
#
diff --git a/mysql-test/t/case.test b/mysql-test/t/case.test
index 63baeebcf12..028c64d6de7 100644
--- a/mysql-test/t/case.test
+++ b/mysql-test/t/case.test
@@ -1,9 +1,9 @@
-#
+
# Testing of CASE
#
--disable_warnings
-drop table if exists t1,t2;
+drop table if exists t1, t2;
--enable_warnings
select CASE "b" when "a" then 1 when "b" then 2 END;
@@ -152,4 +152,21 @@ SELECT IFNULL(t2.EMPNUM,t1.EMPNUM) AS CEMPNUM,
FROM t1 LEFT JOIN t2 ON t1.EMPNUM=t2.EMPNUM;
DROP TABLE t1,t2;
-# End of 4.1 tests
+
+--echo End of 4.1 tests
+
+#
+# #30782: Truncated UNSIGNED BIGINT columns
+#
+create table t1 (a int, b bigint unsigned);
+create table t2 (c int);
+insert into t1 (a, b) values (1,4572794622775114594), (2,18196094287899841997),
+ (3,11120436154190595086);
+insert into t2 (c) values (1), (2), (3);
+select t1.a, (case t1.a when 0 then 0 else t1.b end) d from t1
+ join t2 on t1.a=t2.c order by d;
+select t1.a, (case t1.a when 0 then 0 else t1.b end) d from t1
+ join t2 on t1.a=t2.c where b=11120436154190595086 order by d;
+drop table t1, t2;
+
+--echo End of 5.0 tests
diff --git a/mysql-test/t/cast.test b/mysql-test/t/cast.test
index 5563e260a06..50865215944 100644
--- a/mysql-test/t/cast.test
+++ b/mysql-test/t/cast.test
@@ -246,4 +246,26 @@ INSERT INTO t1(d1) VALUES ('2007-07-19 08:30:00'), (NULL),
SELECT cast(date(d1) as signed) FROM t1;
drop table t1;
+#
+# Bug #31990: MINUTE() and SECOND() return bogus results when used on a DATE
+#
+
+# Show that HH:MM:SS of a DATE are 0, and that it's the same for columns
+# and typecasts (NULL in, NULL out).
+CREATE TABLE t1 (f1 DATE);
+INSERT INTO t1 VALUES ('2007-07-19'), (NULL);
+SELECT HOUR(f1),
+ MINUTE(f1),
+ SECOND(f1) FROM t1;
+SELECT HOUR(CAST('2007-07-19' AS DATE)),
+ MINUTE(CAST('2007-07-19' AS DATE)),
+ SECOND(CAST('2007-07-19' AS DATE));
+SELECT HOUR(CAST(NULL AS DATE)),
+ MINUTE(CAST(NULL AS DATE)),
+ SECOND(CAST(NULL AS DATE));
+SELECT HOUR(NULL),
+ MINUTE(NULL),
+ SECOND(NULL);
+DROP TABLE t1;
+
--echo End of 5.0 tests
diff --git a/mysql-test/t/change_user.test b/mysql-test/t/change_user.test
new file mode 100644
index 00000000000..d0cdfc8a741
--- /dev/null
+++ b/mysql-test/t/change_user.test
@@ -0,0 +1,35 @@
+#
+# Bug#20023 mysql_change_user() resets the value of SQL_BIG_SELECTS
+#
+
+--echo Bug#20023
+SELECT @@session.sql_big_selects;
+SELECT @@global.max_join_size;
+--echo change_user
+--change_user
+SELECT @@session.sql_big_selects;
+SELECT @@global.max_join_size;
+SET @@global.max_join_size = 10000;
+SET @@session.max_join_size = default;
+--echo change_user
+--change_user
+SELECT @@session.sql_big_selects;
+SET @@global.max_join_size = -1;
+SET @@session.max_join_size = default;
+--echo change_user
+--change_user
+SELECT @@session.sql_big_selects;
+
+#
+# Bug#31418 User locks misfunctioning after mysql_change_user()
+#
+
+--echo Bug#31418
+SELECT IS_FREE_LOCK('bug31418');
+SELECT IS_USED_LOCK('bug31418');
+SELECT GET_LOCK('bug31418', 1);
+SELECT IS_USED_LOCK('bug31418') = CONNECTION_ID();
+--echo change_user
+--change_user
+SELECT IS_FREE_LOCK('bug31418');
+SELECT IS_USED_LOCK('bug31418');
diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test
index 341c019af6e..dff6bf3fcff 100644
--- a/mysql-test/t/create.test
+++ b/mysql-test/t/create.test
@@ -483,7 +483,7 @@ drop table t1,t2;
create table t1 (a int);
--error 1093
create table t1 select * from t1;
---error 1093
+--error ER_WRONG_OBJECT
create table t2 union = (t1) select * from t1;
flush tables with read lock;
unlock tables;
@@ -1197,14 +1197,17 @@ drop table t1,t2;
CREATE DATABASE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
--error 1102
DROP DATABASE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
---error 1049
-RENAME DATABASE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa TO a;
---error 1102
-RENAME DATABASE mysqltest TO aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
-create database mysqltest;
---error 1102
-RENAME DATABASE mysqltest TO aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
-drop database mysqltest;
+
+# TODO: enable these tests when RENAME DATABASE is implemented.
+# --error 1049
+# RENAME DATABASE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa TO a;
+# --error 1102
+# RENAME DATABASE mysqltest TO aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
+# create database mysqltest;
+# --error 1102
+# RENAME DATABASE mysqltest TO aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
+# drop database mysqltest;
+
--error 1102
USE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
--error 1102
@@ -1300,4 +1303,42 @@ return 0;
drop view имÑ_вью_кодировке_утф8_длиной_больше_чем_42;
drop table имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48;
set names default;
+
+#
+# Bug#21136 CREATE TABLE SELECT within CREATE TABLE SELECT causes server crash
+#
+
+--disable_warnings
+drop table if exists t1,t2,t3;
+drop function if exists f1;
+--enable_warnings
+
+--delimiter |
+create function f1() returns int
+begin
+ declare res int;
+ create temporary table t3 select 1 i;
+ set res:= (select count(*) from t1);
+ drop temporary table t3;
+ return res;
+end|
+--delimiter ;
+create table t1 as select 1;
+create table t2 as select f1() from t1;
+drop table t1,t2;
+drop function f1;
+
+#
+# Bug#25629 CREATE TABLE LIKE does not work with INFORMATION_SCHEMA
+#
+create table t1 like information_schema.processlist;
+show create table t1;
+drop table t1;
+create temporary table t1 like information_schema.processlist;
+show create table t1;
+drop table t1;
+create table t1 like information_schema.character_sets;
+show create table t1;
+drop table t1;
+
--echo End of 5.1 tests
diff --git a/mysql-test/t/csv.test b/mysql-test/t/csv.test
index 5c877557dfc..7b4f95bbf8a 100644
--- a/mysql-test/t/csv.test
+++ b/mysql-test/t/csv.test
@@ -1322,7 +1322,7 @@ drop table if exists t1,t2,t3,t4;
DROP TABLE IF EXISTS bug13894;
--enable_warnings
-CREATE TABLE bug13894 ( val integer ) ENGINE = CSV;
+CREATE TABLE bug13894 ( val integer not null ) ENGINE = CSV;
INSERT INTO bug13894 VALUES (5);
INSERT INTO bug13894 VALUES (10);
INSERT INTO bug13894 VALUES (11);
@@ -1340,7 +1340,7 @@ DROP TABLE bug13894;
DROP TABLE IF EXISTS bug14672;
--enable_warnings
-CREATE TABLE bug14672 (c1 integer) engine = CSV;
+CREATE TABLE bug14672 (c1 integer not null) engine = CSV;
INSERT INTO bug14672 VALUES (1), (2), (3);
SELECT * FROM bug14672;
DELETE FROM bug14672 WHERE c1 = 2;
@@ -1357,7 +1357,7 @@ DROP TABLE bug14672;
# Test CONCURRENT INSERT (5.1)
#
-CREATE TABLE test_concurrent_insert ( val integer ) ENGINE = CSV;
+CREATE TABLE test_concurrent_insert ( val integer not null ) ENGINE = CSV;
connect (con1,localhost,root,,);
connect (con2,localhost,root,,);
@@ -1393,7 +1393,7 @@ DROP TABLE test_concurrent_insert;
# Check that repair on the newly created table works fine
-CREATE TABLE test_repair_table ( val integer ) ENGINE = CSV;
+CREATE TABLE test_repair_table ( val integer not null ) ENGINE = CSV;
CHECK TABLE test_repair_table;
REPAIR TABLE test_repair_table;
@@ -1405,7 +1405,7 @@ DROP TABLE test_repair_table;
# restore the meta-file
#
-CREATE TABLE test_repair_table2 ( val integer ) ENGINE = CSV;
+CREATE TABLE test_repair_table2 ( val integer not null ) ENGINE = CSV;
--remove_file $MYSQLTEST_VARDIR/master-data/test/test_repair_table2.CSM
# Should give a warning and perform autorepair. We also disable ps-protocol
@@ -1423,7 +1423,7 @@ DROP TABLE test_repair_table2;
# Corrupt csv file and see if we can repair it
-CREATE TABLE test_repair_table3 ( val integer ) ENGINE = CSV;
+CREATE TABLE test_repair_table3 ( val integer not null ) ENGINE = CSV;
--remove_file $MYSQLTEST_VARDIR/master-data/test/test_repair_table3.CSV
--write_file $MYSQLTEST_VARDIR/master-data/test/test_repair_table3.CSV
"1"
@@ -1517,7 +1517,7 @@ DROP TABLE test_repair_table5;
# BUG#13406 - incorrect amount of "records deleted"
#
-create table t1 (a int) engine=csv;
+create table t1 (a int not null) engine=csv;
insert t1 values (1);
--enable_info
delete from t1; # delete_row
@@ -1549,7 +1549,7 @@ drop table t1;
# whole alter table code is being tested all around the test suite already.
#
-create table t1 (v varchar(32));
+create table t1 (v varchar(32) not null);
insert into t1 values ('def'),('abc'),('hij'),('3r4f');
select * from t1;
# Fast alter, no copy performed
@@ -1583,8 +1583,8 @@ drop table t1;
# resulted in scanning through deleted memory and we were geting a crash.
# that's why we need two tables in the bugtest
-create table bug15205 (val int(11) default null) engine=csv;
-create table bug15205_2 (val int(11) default null) engine=csv;
+create table bug15205 (val int(11) not null) engine=csv;
+create table bug15205_2 (val int(11) not null) engine=csv;
--remove_file $MYSQLTEST_VARDIR/master-data/test/bug15205.CSV
# system error (can't open the datafile)
--replace_result $MYSQLTEST_VARDIR . master-data/ ''
@@ -1604,8 +1604,8 @@ drop table bug15205_2;
#
set names latin1;
create table t1 (
- c varchar(1),
- name varchar(64)
+ c varchar(1) not null,
+ name varchar(64) not null
) character set latin1 engine=csv;
insert into t1 values (0xC0,'LATIN CAPITAL LETTER A WITH GRAVE');
insert into t1 values (0xE0,'LATIN SMALL LETTER A WITH GRAVE');
@@ -1623,9 +1623,9 @@ drop table t1;
# Bug#22080 "CHECK fails to identify some corruption"
#
-create table bug22080_1 (id int,string varchar(64)) Engine=CSV;
-create table bug22080_2 (id int,string varchar(64)) Engine=CSV;
-create table bug22080_3 (id int,string varchar(64)) Engine=CSV;
+create table bug22080_1 (id int not null,string varchar(64) not null) Engine=CSV;
+create table bug22080_2 (id int not null,string varchar(64) not null) Engine=CSV;
+create table bug22080_3 (id int not null,string varchar(64) not null) Engine=CSV;
insert into bug22080_1 values(1,'string');
insert into bug22080_1 values(2,'string');
insert into bug22080_1 values(3,'string');
@@ -1655,7 +1655,7 @@ drop tables bug22080_1,bug22080_2,bug22080_3;
#
# Testing float type
#
-create table float_test (id float,string varchar(64)) Engine=CSV;
+create table float_test (id float not null,string varchar(64) not null) Engine=CSV;
insert into float_test values(1.0,'string');
insert into float_test values(2.23,'serg.g');
insert into float_test values(0.03,'string');
@@ -1670,12 +1670,12 @@ drop table float_test;
#
CREATE TABLE `bug21328` (
- `col1` int(11) DEFAULT NULL,
- `col2` int(11) DEFAULT NULL,
- `col3` int(11) DEFAULT NULL
+ `col1` int(11) NOT NULL,
+ `col2` int(11) NOT NULL,
+ `col3` int(11) NOT NULL
) ENGINE=CSV;
-insert into bug21328 values (1,NULL,NULL);
+insert into bug21328 values (1,0,0);
alter table bug21328 engine=myisam;
drop table bug21328;
@@ -1683,7 +1683,7 @@ drop table bug21328;
# BUG#28971 - ALTER TABLE followed by UPDATE for a CSV table make server
# crash
#
-create table t1(a blob, b int) engine=csv;
+create table t1(a blob not null, b int not null) engine=csv;
insert into t1 values('a', 1);
flush tables;
update t1 set b=2;
@@ -1693,13 +1693,13 @@ drop table t1;
#
# Bug #29353: negative values
#
-create table t1(a int) engine=csv;
+create table t1(a int not null) engine=csv;
insert into t1 values(-1), (-123.34), (2), (-23);
select * from t1;
check table t1;
drop table t1;
-create table t1(a int, b int) engine=csv;
+create table t1(a int not null, b int not null) engine=csv;
--remove_file $MYSQLTEST_VARDIR/master-data/test/t1.CSV
--write_file $MYSQLTEST_VARDIR/master-data/test/t1.CSV
1, 1E-2
@@ -1717,7 +1717,7 @@ drop table t1;
#
# Bug #29411: deleting from a csv table leads to the table corruption
#
-create table t1(a int) engine=csv;
+create table t1(a int not null) engine=csv;
insert into t1 values (0), (1), (2);
delete from t1 limit 2;
check table t1;
@@ -1727,4 +1727,50 @@ check table t1;
select * from t1;
drop table t1;
+#
+# Bug #31473: does not work with NULL value in datetime field
+#
+create table t1(a datetime not null) engine=csv;
+insert into t1 values();
+select * from t1;
+drop table t1;
+create table t1(a set('foo','bar') not null) engine=csv;
+insert into t1 values();
+select * from t1;
+drop table t1;
+create table t1(a varchar(32) not null) engine=csv;
+insert into t1 values();
+select * from t1;
+drop table t1;
+create table t1(a int not null) engine=csv;
+insert into t1 values();
+select * from t1;
+drop table t1;
+create table t1(a blob not null) engine=csv;
+insert into t1 values();
+select * from t1;
+drop table t1;
+create table t1(a bit(1) not null) engine=csv;
+insert into t1 values();
+select BIN(a) from t1;
+drop table t1;
+# We prevent creation of table with nullable ENUM
+--error ER_CHECK_NOT_IMPLEMENTED
+create table t1(a enum('foo','bar') default null) engine=csv;
+--error ER_CHECK_NOT_IMPLEMENTED
+create table t1(a enum('foo','bar') default 'foo') engine=csv;
+# Enum columns must be specified as NOT NULL
+create table t1(a enum('foo','bar') default 'foo' not null) engine=csv;
+insert into t1 values();
+select * from t1;
+drop table t1;
+
+#
+# BUG#32817 - though CSV is marked as supported create table is rejected
+# with error 1005.
+#
+--error ER_CHECK_NOT_IMPLEMENTED
+CREATE TABLE t1(a INT) ENGINE=CSV;
+SHOW WARNINGS;
+
--echo End of 5.1 tests
diff --git a/mysql-test/t/ctype_euckr.test b/mysql-test/t/ctype_euckr.test
index 56939817b2f..05e4b04eded 100644
--- a/mysql-test/t/ctype_euckr.test
+++ b/mysql-test/t/ctype_euckr.test
@@ -31,3 +31,26 @@ SELECT hex(a) FROM t1 ORDER BY a;
DROP TABLE t1;
# End of 4.1 tests
+
+#
+#Bug #30315 Character sets: insertion of euckr code value 0xa141 fails
+#
+create table t1 (s1 varchar(5) character set euckr);
+# Insert some valid characters
+insert into t1 values (0xA141);
+insert into t1 values (0xA15A);
+insert into t1 values (0xA161);
+insert into t1 values (0xA17A);
+insert into t1 values (0xA181);
+insert into t1 values (0xA1FE);
+# Insert some invalid characters
+insert into t1 values (0xA140);
+insert into t1 values (0xA15B);
+insert into t1 values (0xA160);
+insert into t1 values (0xA17B);
+insert into t1 values (0xA180);
+insert into t1 values (0xA1FF);
+select hex(s1), hex(convert(s1 using utf8)) from t1 order by binary s1;
+drop table t1;
+
+--echo End of 5.0 tests
diff --git a/mysql-test/t/ctype_uca.test b/mysql-test/t/ctype_uca.test
index 695a21adbf5..0d917428efb 100644
--- a/mysql-test/t/ctype_uca.test
+++ b/mysql-test/t/ctype_uca.test
@@ -538,4 +538,8 @@ alter table t1 convert to character set ucs2 collate ucs2_czech_ci;
select * from t1 where a like 'c%';
drop table t1;
+set collation_connection=ucs2_unicode_ci;
+--source include/ctype_regex.inc
+set names utf8;
+
-- echo End for 5.0 tests
diff --git a/mysql-test/t/ctype_ucs.test b/mysql-test/t/ctype_ucs.test
index bca3a9c3a96..3af5bfa54f9 100644
--- a/mysql-test/t/ctype_ucs.test
+++ b/mysql-test/t/ctype_ucs.test
@@ -547,6 +547,26 @@ select quote(name) from bug20536;
drop table bug20536;
+#
+# Bug #31615: crash after set names ucs2 collate xxx
+#
+--error 1231
+set names ucs2;
+--error 1231
+set names ucs2 collate ucs2_bin;
+--error 1231
+set character_set_client= ucs2;
+--error 1231
+set character_set_client= concat('ucs', substr('2', 1));
+
+#
+# BUG#31159 - fulltext search on ucs2 column crashes server
+#
+CREATE TABLE t1(a TEXT CHARSET ucs2 COLLATE ucs2_unicode_ci);
+INSERT INTO t1 VALUES('abcd');
+SELECT * FROM t1 WHERE MATCH(a) AGAINST ('+abcd' IN BOOLEAN MODE);
+DROP TABLE t1;
+
--echo End of 4.1 tests
#
@@ -651,4 +671,12 @@ select * from t1 where a=if(b<10,_ucs2 0x00C0,_ucs2 0x0062);
select * from t1 where a=if(b<10,_ucs2 0x0062,_ucs2 0x00C0);
drop table t1;
+set collation_connection=ucs2_general_ci;
+--source include/ctype_regex.inc
+set names latin1;
+#
+# Bug#30981 CHAR(0x41 USING ucs2) doesn't add leading zero
+#
+select hex(char(0x41 using ucs2));
+
--echo End of 5.0 tests
diff --git a/mysql-test/t/ctype_utf8.test b/mysql-test/t/ctype_utf8.test
index b61bb1d53bf..d18a7d22a0e 100644
--- a/mysql-test/t/ctype_utf8.test
+++ b/mysql-test/t/ctype_utf8.test
@@ -186,6 +186,13 @@ select * from t1 where a = 'b' and a != 'b';
drop table t1;
#
+# Testing regexp
+#
+set collation_connection=utf8_general_ci;
+--source include/ctype_regex.inc
+set names utf8;
+
+#
# Bug #3928 regexp [[:>:]] and UTF-8
#
set names utf8;
@@ -1404,3 +1411,30 @@ SELECT b FROM t2 UNION SELECT c FROM t1;
SELECT i FROM t2 UNION SELECT c FROM t1;
DROP TABLE t1, t2;
+
+#
+# Bug#30982: CHAR(..USING..) can return a not-well-formed string
+# Bug #30986: Character set introducer followed by a HEX string can return bad result
+#
+set sql_mode=traditional;
+select hex(char(0xFF using utf8));
+select hex(convert(0xFF using utf8));
+--error ER_INVALID_CHARACTER_STRING
+select hex(_utf8 0x616263FF);
+--error ER_INVALID_CHARACTER_STRING
+select hex(_utf8 X'616263FF');
+--error ER_INVALID_CHARACTER_STRING
+select hex(_utf8 B'001111111111');
+--error ER_INVALID_CHARACTER_STRING
+select (_utf8 X'616263FF');
+set sql_mode=default;
+select hex(char(0xFF using utf8));
+select hex(convert(0xFF using utf8));
+--error ER_INVALID_CHARACTER_STRING
+select hex(_utf8 0x616263FF);
+--error ER_INVALID_CHARACTER_STRING
+select hex(_utf8 X'616263FF');
+--error ER_INVALID_CHARACTER_STRING
+select hex(_utf8 B'001111111111');
+--error ER_INVALID_CHARACTER_STRING
+select (_utf8 X'616263FF');
diff --git a/mysql-test/t/delayed.test b/mysql-test/t/delayed.test
index 17c2722dda4..9c7e825bc30 100644
--- a/mysql-test/t/delayed.test
+++ b/mysql-test/t/delayed.test
@@ -112,13 +112,13 @@ DROP TABLE t1;
# Bug#20627 - INSERT DELAYED does not honour auto_increment_* variables
#
SET @bug20627_old_auto_increment_offset=
- @@auto_increment_offset= 2;
+ @@auto_increment_offset;
SET @bug20627_old_auto_increment_increment=
- @@auto_increment_increment= 3;
+ @@auto_increment_increment;
SET @bug20627_old_session_auto_increment_offset=
- @@session.auto_increment_offset= 4;
+ @@session.auto_increment_offset;
SET @bug20627_old_session_auto_increment_increment=
- @@session.auto_increment_increment= 5;
+ @@session.auto_increment_increment;
SET @@auto_increment_offset= 2;
SET @@auto_increment_increment= 3;
SET @@session.auto_increment_offset= 4;
@@ -160,13 +160,13 @@ SET @@session.auto_increment_increment=
# Bug#20830 - INSERT DELAYED does not honour SET INSERT_ID
#
SET @bug20830_old_auto_increment_offset=
- @@auto_increment_offset= 2;
+ @@auto_increment_offset;
SET @bug20830_old_auto_increment_increment=
- @@auto_increment_increment= 3;
+ @@auto_increment_increment;
SET @bug20830_old_session_auto_increment_offset=
- @@session.auto_increment_offset= 4;
+ @@session.auto_increment_offset;
SET @bug20830_old_session_auto_increment_increment=
- @@session.auto_increment_increment= 5;
+ @@session.auto_increment_increment;
SET @@auto_increment_offset= 2;
SET @@auto_increment_increment= 3;
SET @@session.auto_increment_offset= 4;
@@ -253,11 +253,45 @@ SELECT HEX(a) FROM t1;
DROP TABLE t1;
#
-# Bug#26464 - insert delayed + update + merge = corruption
+# Bug #32676: insert delayed crash with wrong column and function specified
#
-CREATE TABLE t1(c1 INT) ENGINE=MyISAM;
-CREATE TABLE t2(c1 INT) ENGINE=MERGE UNION=(t1);
---error 1031
-INSERT DELAYED INTO t2 VALUES(1);
-DROP TABLE t1, t2;
+CREATE TABLE t1 (a INT);
+--error ER_BAD_FIELD_ERROR
+INSERT DELAYED INTO t1 SET b= b();
+DROP TABLE t1;
+
+--echo End of 5.0 tests
+
+#
+# Bug#27358 INSERT DELAYED does not honour SQL_MODE of the client
+#
+--disable_warnings
+DROP TABLE IF EXISTS t1,t2;
+--enable_warnings
+SET SQL_MODE='NO_AUTO_VALUE_ON_ZERO';
+CREATE TABLE `t1` (
+ `id` int(11) PRIMARY KEY auto_increment,
+ `f1` varchar(10) NOT NULL UNIQUE
+);
+INSERT DELAYED INTO t1 VALUES(0,"test1");
+sleep 1;
+SELECT * FROM t1;
+SET SQL_MODE='PIPES_AS_CONCAT';
+INSERT DELAYED INTO t1 VALUES(0,'a' || 'b');
+sleep 1;
+SELECT * FROM t1;
+SET SQL_MODE='ERROR_FOR_DIVISION_BY_ZERO,STRICT_ALL_TABLES';
+--error 1365
+INSERT DELAYED INTO t1 VALUES(mod(1,0),"test3");
+CREATE TABLE t2 (
+ `id` int(11) PRIMARY KEY auto_increment,
+ `f1` date
+);
+SET SQL_MODE='NO_ZERO_DATE,STRICT_ALL_TABLES,NO_ZERO_IN_DATE';
+--error ER_TRUNCATED_WRONG_VALUE
+INSERT DELAYED INTO t2 VALUES (0,'0000-00-00');
+--error ER_TRUNCATED_WRONG_VALUE
+INSERT DELAYED INTO t2 VALUES (0,'2007-00-00');
+DROP TABLE t1,t2;
+--echo End of 5.1 tests
diff --git a/mysql-test/t/delete.test b/mysql-test/t/delete.test
index 8a03cb6c715..602e30687c8 100644
--- a/mysql-test/t/delete.test
+++ b/mysql-test/t/delete.test
@@ -277,3 +277,18 @@ SELECT * FROM t1;
DROP TABLE t1, t2;
DROP DATABASE db1;
DROP DATABASE db2;
+
+#
+# Bug 31742: delete from ... order by function call that causes an error,
+# asserts server
+#
+
+CREATE FUNCTION f1() RETURNS INT RETURN 1;
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (0);
+--error 1318
+DELETE FROM t1 ORDER BY (f1(10)) LIMIT 1;
+DROP TABLE t1;
+DROP FUNCTION f1;
+
+--echo End of 5.0 tests
diff --git a/mysql-test/t/derived.test b/mysql-test/t/derived.test
index 4d8a8e3c3af..4e79fac584f 100644
--- a/mysql-test/t/derived.test
+++ b/mysql-test/t/derived.test
@@ -211,7 +211,8 @@ drop table t2;
# select list counter
#
CREATE TABLE `t1` ( `itemid` int(11) NOT NULL default '0', `grpid` varchar(15) NOT NULL default '', `vendor` int(11) NOT NULL default '0', `date_` date NOT NULL default '0000-00-00', `price` decimal(12,2) NOT NULL default '0.00', PRIMARY KEY (`itemid`,`grpid`,`vendor`,`date_`), KEY `itemid` (`itemid`,`vendor`), KEY `itemid_2` (`itemid`,`date_`));
-insert into t1 values (128, 'rozn', 2, now(), 10),(128, 'rozn', 1, now(), 10);
+insert into t1 values (128, 'rozn', 2, curdate(), 10),
+ (128, 'rozn', 1, curdate(), 10);
SELECT MIN(price) min, MAX(price) max, AVG(price) avg FROM (SELECT SUBSTRING( MAX(concat(date_,";",price)), 12) price FROM t1 WHERE itemid=128 AND grpid='rozn' GROUP BY itemid, grpid, vendor) lastprices;
DROP TABLE t1;
diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def
index fa7fbcbf804..86cc86798de 100644
--- a/mysql-test/t/disabled.def
+++ b/mysql-test/t/disabled.def
@@ -16,3 +16,11 @@ concurrent_innodb : BUG#21579 2006-08-11 mleich innodb_concurrent random
ctype_big5 : BUG#26711 2007-06-21 Lars Test has never worked on Double Whopper
federated_transactions : Bug#29523 Transactions do not work
+events : Bug#32664 events.test fails randomly
+lowercase_table3 : Bug#32667 lowercase_table3.test reports to error log
+kill : Bug#29149: Test "kill" fails on Windows
+innodb_mysql : Bug#32724: innodb_mysql.test fails randomly
+wait_timeout : Bug#32801 wait_timeout.test fails randomly
+kill : Bug#29149 Test "kill" fails on Windows
+ctype_create : Bug#32965 main.ctype_create fails
+status : Bug#32966 main.status fails
diff --git a/mysql-test/t/drop.test b/mysql-test/t/drop.test
index a1451773e90..a79044436eb 100644
--- a/mysql-test/t/drop.test
+++ b/mysql-test/t/drop.test
@@ -122,3 +122,16 @@ disconnect addconroot2;
connection default;
--echo End of 5.0 tests
+
+#
+# Bug#30152 MySQLD crash duing alter table causes DROP DATABASE to FAIL due to temp file
+#
+create database mysql_test;
+create table mysql_test.t1(f1 int);
+create table mysql_test.`#sql-347f_7` (f1 int);
+create table mysql_test.`#sql-347f_8` (f1 int);
+drop table mysql_test.`#sql-347f_8`;
+copy_file $MYSQLTEST_VARDIR/master-data/mysql_test/t1.frm $MYSQLTEST_VARDIR/master-data/mysql_test/#sql-347f_6.frm;
+drop database mysql_test;
+
+--echo End of 5.1 tests
diff --git a/mysql-test/t/events.test b/mysql-test/t/events.test
index d1ca5f1b609..a4c7eaebc30 100644
--- a/mysql-test/t/events.test
+++ b/mysql-test/t/events.test
@@ -454,7 +454,8 @@ create event закачка on schedule every 10 hour do select get_lock("test_l
--echo "Should have only 2 processes: the scheduler and the locked event"
let $wait_condition= select count(*) = 2 from information_schema.processlist
where ( (state like 'User lock%' AND info like 'select get_lock%')
- OR (command='Daemon' AND user='event_scheduler'));
+ OR (command='Daemon' AND user='event_scheduler' AND
+ state = 'Waiting for next activation'));
--source include/wait_condition.inc
select /*2*/ user, host, db, command, state, info
diff --git a/mysql-test/t/events_bugs-master.opt b/mysql-test/t/events_bugs-master.opt
new file mode 100644
index 00000000000..f93413a61e5
--- /dev/null
+++ b/mysql-test/t/events_bugs-master.opt
@@ -0,0 +1 @@
+--event-scheduler
diff --git a/mysql-test/t/events_bugs.test b/mysql-test/t/events_bugs.test
index 36052fdb9af..efdb67349ec 100644
--- a/mysql-test/t/events_bugs.test
+++ b/mysql-test/t/events_bugs.test
@@ -10,6 +10,21 @@ create database events_test;
use events_test;
#
+# START: Bug #31332 --event-scheduler option misbehaving
+#
+
+# NOTE!! this test must come first! It's testing that the --event-scheduler
+# option with no argument in events_bugs-master.opt turns the scheduler on.
+
+select * from information_schema.global_variables where variable_name like 'event_scheduler';
+
+SET GLOBAL event_scheduler = 'OFF';
+
+#
+# END: Bug #31332
+#
+
+#
# START - 16415: Events: event names are case sensitive
#
CREATE EVENT lower_case ON SCHEDULE EVERY 1 MINUTE DO SELECT 1;
@@ -712,18 +727,6 @@ DROP TABLE event_log;
#DROP DATABASE ev_db_1;
SET GLOBAL event_scheduler = OFF;
-#
-# End of tests
-#
-
-let $wait_condition=
- select count(*) = 0 from information_schema.processlist
- where db='events_test' and command = 'Connect' and user=current_user();
---source include/wait_condition.inc
-
-DROP DATABASE events_test;
-
-
#
# Bug#28641 CREATE EVENT with '2038.01.18 03:00:00' let server crash.
#
@@ -737,3 +740,215 @@ CREATE EVENT bug28641 ON SCHEDULE AT '2038.01.18 03:00:00'
DELIMITER ;|
SET GLOBAL event_scheduler= OFF;
DROP EVENT bug28641;
+
+###########################################################################
+
+--echo
+--echo #####################################################################
+--echo #
+--echo # BUG#31111: --read-only crashes MySQL (events fail to load).
+--echo #
+--echo #####################################################################
+--echo
+
+--error 0,ER_CANNOT_USER
+DROP USER mysqltest_u1@localhost;
+
+--disable_warnings
+DROP EVENT IF EXISTS e1;
+DROP EVENT IF EXISTS e2;
+--enable_warnings
+
+--echo
+
+# Check that an ordinary user can not create/update/drop events in the
+# read-only mode.
+
+GRANT EVENT ON *.* TO mysqltest_u1@localhost;
+
+--echo
+
+SET GLOBAL READ_ONLY = 1;
+
+--echo
+
+--echo #
+--echo # Connection: u1_con (mysqltest_u1@localhost/events_test).
+--echo #
+
+--connect(u1_con,localhost,mysqltest_u1,,events_test)
+
+--echo
+
+--error ER_OPTION_PREVENTS_STATEMENT
+CREATE EVENT e1 ON SCHEDULE AT '2020-01-01 00:00:00' DO SET @a = 1;
+
+--echo
+
+--error ER_OPTION_PREVENTS_STATEMENT
+ALTER EVENT e1 COMMENT 'comment';
+
+--echo
+
+--error ER_OPTION_PREVENTS_STATEMENT
+DROP EVENT e1;
+
+--echo
+
+# Check that the super user still can create/update/drop events.
+
+--echo #
+--echo # Connection: root_con (root@localhost/events_test).
+--echo #
+
+--connect(root_con,localhost,root,,events_test)
+
+--echo
+
+CREATE EVENT e1 ON SCHEDULE AT '2020-01-01 00:00:00' DO SET @a = 1;
+
+--echo
+
+ALTER EVENT e1 COMMENT 'comment';
+
+--echo
+
+DROP EVENT e1;
+
+--echo
+
+#
+# Switch to read-write mode; create test events under the user mysqltest_u1;
+# switch back to read-only mode.
+#
+
+SET GLOBAL READ_ONLY = 0;
+
+--echo
+
+--echo #
+--echo # Connection: u1_con (mysqltest_u1@localhost/test).
+--echo #
+
+--connection u1_con
+
+--echo
+
+CREATE EVENT e1 ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 SECOND DO SET @a = 1;
+CREATE EVENT e2 ON SCHEDULE EVERY 1 SECOND DO SET @a = 1;
+
+--echo
+
+SELECT
+ event_name,
+ last_executed IS NULL,
+ definer
+FROM INFORMATION_SCHEMA.EVENTS
+WHERE event_schema = 'events_test';
+
+--echo
+
+--echo #
+--echo # Connection: root_con (root@localhost/events_test).
+--echo #
+
+--connection root_con
+
+--echo
+
+SET GLOBAL READ_ONLY = 1;
+
+# Check that the event scheduler is able to update event.
+
+--echo
+
+SET GLOBAL EVENT_SCHEDULER = ON;
+
+--echo
+
+--echo # Waiting for the event scheduler to execute and drop event e1...
+
+let $wait_timeout = 2;
+let $wait_condition =
+ SELECT COUNT(*) = 0
+ FROM INFORMATION_SCHEMA.EVENTS
+ WHERE event_schema = 'events_test' AND event_name = 'e1';
+--source include/wait_condition.inc
+
+--echo
+
+--echo # Waiting for the event scheduler to execute and update event e2...
+
+let $wait_condition =
+ SELECT last_executed IS NOT NULL
+ FROM INFORMATION_SCHEMA.EVENTS
+ WHERE event_schema = 'events_test' AND event_name = 'e2';
+--source include/wait_condition.inc
+
+--echo
+
+SET GLOBAL EVENT_SCHEDULER = OFF;
+
+--echo
+
+SELECT
+ event_name,
+ last_executed IS NULL,
+ definer
+FROM INFORMATION_SCHEMA.EVENTS
+WHERE event_schema = 'events_test';
+
+--echo
+
+--error ER_EVENT_DOES_NOT_EXIST
+DROP EVENT e1;
+
+--echo
+--echo # Cleanup.
+--echo
+
+DROP EVENT e2;
+
+--echo
+
+SET GLOBAL READ_ONLY = 0;
+
+--echo
+
+--echo #
+--echo # Connection: default
+--echo #
+
+--disconnect u1_con
+--disconnect root_con
+--connection default
+
+--echo
+
+DROP USER mysqltest_u1@localhost;
+
+--echo
+--echo #####################################################################
+--echo #
+--echo # End of BUG#31111.
+--echo #
+--echo #####################################################################
+--echo
+
+
+###########################################################################
+#
+# End of tests
+#
+# !!! KEEP this section AT THE END of this file !!!
+#
+###########################################################################
+
+let $wait_condition=
+ select count(*) = 0 from information_schema.processlist
+ where db='events_test' and command = 'Connect' and user=current_user();
+--source include/wait_condition.inc
+
+DROP DATABASE events_test;
+
+# THIS MUST BE THE LAST LINE in this file.
diff --git a/mysql-test/t/events_scheduling.test b/mysql-test/t/events_scheduling.test
index b1eeae1e020..226cad0f3eb 100644
--- a/mysql-test/t/events_scheduling.test
+++ b/mysql-test/t/events_scheduling.test
@@ -87,7 +87,7 @@ SELECT IF(TIME_TO_SEC(TIMEDIFF(ENDS,STARTS))=6, 'OK', 'ERROR')
FROM INFORMATION_SCHEMA.EVENTS
WHERE EVENT_SCHEMA=DATABASE() AND EVENT_NAME='event_2';
-SELECT IF(LAST_EXECUTED-ENDS < 3, 'OK', 'ERROR')
+SELECT IF(LAST_EXECUTED-ENDS <= 0, 'OK', 'ERROR')
FROM INFORMATION_SCHEMA.EVENTS
WHERE EVENT_SCHEMA=DATABASE() AND EVENT_NAME='event_2';
diff --git a/mysql-test/t/explain.test b/mysql-test/t/explain.test
index 04cf37f457a..c9ae8aceaf6 100644
--- a/mysql-test/t/explain.test
+++ b/mysql-test/t/explain.test
@@ -66,4 +66,32 @@ explain extended select * from t1 having 1;
drop view v1;
drop table t1;
+#
+# Bug #32241: memory corruption due to large index map in 'Range checked for
+# each record'
+#
+
+CREATE TABLE t1(c INT);
+INSERT INTO t1 VALUES (),();
+
+CREATE TABLE t2 (b INT,
+KEY(b),KEY(b),KEY(b),KEY(b),KEY(b),
+KEY(b),KEY(b),KEY(b),KEY(b),KEY(b),
+KEY(b),KEY(b),KEY(b),KEY(b),KEY(b),
+KEY(b),KEY(b),KEY(b),KEY(b),KEY(b),
+KEY(b),KEY(b),KEY(b),KEY(b),KEY(b),
+KEY(b),KEY(b),KEY(b),KEY(b),KEY(b),
+KEY(b),KEY(b),KEY(b),KEY(b),KEY(b),
+KEY(b),KEY(b),KEY(b),KEY(b),KEY(b));
+
+INSERT INTO t2 VALUES (),(),();
+
+# We only need to make sure that there is no buffer overrun and the index map
+# is displayed correctly
+--replace_column 1 X 2 X 3 X 4 X 5 X 6 X 7 X 8 X 9 X
+EXPLAIN SELECT 1 FROM
+ (SELECT 1 FROM t2,t1 WHERE b < c GROUP BY 1 LIMIT 1) AS d2;
+DROP TABLE t2;
+DROP TABLE t1;
+
# End of 5.0 tests.
diff --git a/mysql-test/t/federated.test b/mysql-test/t/federated.test
index 90f1fa36bb4..76cb5fd4793 100644
--- a/mysql-test/t/federated.test
+++ b/mysql-test/t/federated.test
@@ -1764,6 +1764,35 @@ DROP TABLE federated.t1;
connection slave;
DROP TABLE federated.t1;
---echo End of 5.1 tests
+#
+# Bug #32374 crash with filesort when selecting from federated table and view
+#
+connection slave;
+create table t1 (a varchar(256));
+--disable_warnings
+drop view if exists v1;
+--enable_warnings
+create view v1 as select a from t1;
+--disable_query_log
+let $n= 100;
+while ($n)
+{
+ insert into t1 values (repeat('a',200));
+ dec $n;
+}
+--enable_query_log
+connection master;
+--replace_result $SLAVE_MYPORT SLAVE_PORT
+eval create table t1
+ (a varchar(256)) engine=federated
+ connection='mysql://root@127.0.0.1:$SLAVE_MYPORT/test/v1';
+
+select 1 from t1 order by a;
+drop table t1;
+connection slave;
+drop table t1;
+drop view v1;
+
+--echo End of 5.1 tests
source include/federated_cleanup.inc;
diff --git a/mysql-test/t/federated_server.test b/mysql-test/t/federated_server.test
index 87b67720104..444285ac045 100644
--- a/mysql-test/t/federated_server.test
+++ b/mysql-test/t/federated_server.test
@@ -2,7 +2,7 @@
# if federated can utilise the servers table
# should work with embedded server after mysqltest is fixed
-- source include/not_embedded.inc
--- source include/federated.inc;
+-- source include/federated.inc
-- source include/big_test.inc
connection slave;
@@ -282,6 +282,18 @@ drop user guest_select@localhost;
drop table federated.t1;
drop server 's1';
+#
+# Bug#30671 - ALTER SERVER causes the server to crash
+#
+create server 's1' foreign data wrapper 'mysql' options (port 3306);
+alter server 's1' options
+ (host 'localhost', database '', user '',
+ password '', socket '', owner '', port 3306);
+# The next statement would crash unpatched server
+alter server 's1' options
+ (host 'localhost', database 'database1', user '',
+ password '', socket '', owner '', port 3306);
+drop server 's1';
--echo # End of 5.1 tests
diff --git a/mysql-test/t/flush.test b/mysql-test/t/flush.test
index d58d038c3ea..794423ca211 100644
--- a/mysql-test/t/flush.test
+++ b/mysql-test/t/flush.test
@@ -133,6 +133,37 @@ disconnect con3;
connection default;
drop table t1, t2;
+#
+# Bug#32528 Global read lock with a low priority write lock causes a server crash
+#
+
+--disable_warnings
+drop table if exists t1, t2;
+--enable_warnings
+
+set session low_priority_updates=1;
+
+create table t1 (a int);
+create table t2 (b int);
+
+lock tables t1 write;
+--error ER_LOCK_OR_ACTIVE_TRANSACTION
+flush tables with read lock;
+unlock tables;
+
+lock tables t1 read, t2 write;
+--error ER_LOCK_OR_ACTIVE_TRANSACTION
+flush tables with read lock;
+unlock tables;
+
+lock tables t1 read;
+flush tables with read lock;
+unlock tables;
+
+drop table t1, t2;
+
+set session low_priority_updates=default;
+
--echo End of 5.0 tests
#
diff --git a/mysql-test/t/fulltext.test b/mysql-test/t/fulltext.test
index 1f8a3b82cfd..64f77b4f0b7 100644
--- a/mysql-test/t/fulltext.test
+++ b/mysql-test/t/fulltext.test
@@ -400,6 +400,14 @@ SELECT * FROM t1 WHERE MATCH(a) AGAINST('test');
DROP TABLE t1;
#
+# BUG#11392 - fulltext search bug
+#
+CREATE TABLE t1(a TEXT);
+INSERT INTO t1 VALUES(' aaaaa aaaa');
+SELECT * FROM t1 WHERE MATCH(a) AGAINST ('"aaaa"' IN BOOLEAN MODE);
+DROP TABLE t1;
+
+#
# BUG#29445 - match ... against () never returns
#
CREATE TABLE t1(a VARCHAR(20), FULLTEXT(a));
diff --git a/mysql-test/t/func_gconcat.test b/mysql-test/t/func_gconcat.test
index 6f9b5399b7b..322be2b7b8e 100644
--- a/mysql-test/t/func_gconcat.test
+++ b/mysql-test/t/func_gconcat.test
@@ -562,4 +562,41 @@ insert into t1 (id, name) values (2, "óra");
select b.id, group_concat(b.name) from t1 a, t1 b group by b.id;
drop table t1;
+#
+# Bug #31154: group_concat() and bit fields;
+#
+create table t1(a bit not null);
+insert into t1 values (), (), ();
+select group_concat(distinct a) from t1;
+select group_concat(distinct a order by a) from t1;
+drop table t1;
+
+create table t1(a bit(2) not null);
+insert into t1 values (1), (0), (0), (3), (1);
+select group_concat(distinct a) from t1;
+select group_concat(distinct a order by a) from t1;
+select group_concat(distinct a order by a desc) from t1;
+drop table t1;
+
+create table t1(a bit(2), b varchar(10), c bit);
+insert into t1 values (1, 'a', 0), (0, 'b', 1), (0, 'c', 0), (3, 'd', 1),
+(1, 'e', 1), (3, 'f', 1), (0, 'g', 1);
+select group_concat(distinct a, c) from t1;
+select group_concat(distinct a, c order by a) from t1;
+select group_concat(distinct a, c) from t1;
+select group_concat(distinct a, c order by a, c) from t1;
+select group_concat(distinct a, c order by a desc, c desc) from t1;
+
+drop table t1;
+
+
+#
+# Bug#30897 GROUP_CONCAT returns extra comma on empty fields
+#
+create table t1 (f1 char(20));
+insert into t1 values (''),('');
+select group_concat(distinct f1) from t1;
+select group_concat(f1) from t1;
+drop table t1;
+
--echo End of 5.0 tests
diff --git a/mysql-test/t/func_group.test b/mysql-test/t/func_group.test
index d1b4919c83e..8beed28cfbf 100644
--- a/mysql-test/t/func_group.test
+++ b/mysql-test/t/func_group.test
@@ -867,5 +867,46 @@ SELECT MIN(a), MIN(b) FROM t5 WHERE a = 1 and b > 1;
DROP TABLE t1, t2, t3, t4, t5;
+#
+# Bug #31156: mysqld: item_sum.cc:918:
+# virtual bool Item_sum_distinct::setup(THD*): Assertion
+#
+
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 values (),(),();
+SELECT (SELECT SLEEP(0) FROM t1 ORDER BY AVG(DISTINCT a) ) as x FROM t1
+ GROUP BY x;
+SELECT 1 FROM t1 GROUP BY (SELECT SLEEP(0) FROM t1 ORDER BY AVG(DISTINCT a) );
+
+DROP TABLE t1;
+
+#
+# Bug #30715: Assertion failed: item_field->field->real_maybe_null(), file
+# .\opt_sum.cc, line
+#
+
+CREATE TABLE t1 (a int, b date NOT NULL, KEY k1 (a,b));
+SELECT MIN(b) FROM t1 WHERE a=1 AND b>'2007-08-01';
+DROP TABLE t1;
+
+#
+# Bug #31794: no syntax error on SELECT id FROM t HAVING count(*)>2;
+#
+
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2),(3),(4);
+
+SET SQL_MODE=ONLY_FULL_GROUP_BY;
+--error ER_MIX_OF_GROUP_FUNC_AND_FIELDS
+SELECT a FROM t1 HAVING COUNT(*)>2;
+--error ER_MIX_OF_GROUP_FUNC_AND_FIELDS
+SELECT COUNT(*), a FROM t1;
+
+SET SQL_MODE=DEFAULT;
+SELECT a FROM t1 HAVING COUNT(*)>2;
+SELECT COUNT(*), a FROM t1;
+
+DROP TABLE t1;
+
###
--echo End of 5.0 tests
diff --git a/mysql-test/t/func_in.test b/mysql-test/t/func_in.test
index 2c5ed6a22d3..d8b0c89532e 100644
--- a/mysql-test/t/func_in.test
+++ b/mysql-test/t/func_in.test
@@ -408,5 +408,13 @@ select f2 from t2 where f2 in (1,'b');
explain select f2 from t2 where f2 in (1,'b');
drop table t1, t2;
+#
+# Bug #31075: crash in get_func_mm_tree
+#
+
+create table t1 (a time, key(a));
+insert into t1 values (),(),(),(),(),(),(),(),(),();
+select a from t1 where a not in (a,a,a) group by a;
+drop table t1;
--echo End of 5.1 tests
diff --git a/mysql-test/t/func_math.test b/mysql-test/t/func_math.test
index 668528b2e9b..274a953a314 100644
--- a/mysql-test/t/func_math.test
+++ b/mysql-test/t/func_math.test
@@ -224,4 +224,29 @@ select mod(cast(-2 as unsigned), 3), mod(18446744073709551614, 3), mod(-2, 3);
select mod(5, cast(-2 as unsigned)), mod(5, 18446744073709551614), mod(5, -2);
select pow(cast(-2 as unsigned), 5), pow(18446744073709551614, 5), pow(-2, 5);
+#
+# Bug #30587: mysql crashes when trying to group by TIME div NUMBER
+#
+
+CREATE TABLE t1 (a timestamp, b varchar(20), c bit(1));
+INSERT INTO t1 VALUES('1998-09-23', 'str1', 1), ('2003-03-25', 'str2', 0);
+SELECT a DIV 900 y FROM t1 GROUP BY y;
+SELECT DISTINCT a DIV 900 y FROM t1;
+SELECT b DIV 900 y FROM t1 GROUP BY y;
+SELECT c DIV 900 y FROM t1 GROUP BY y;
+DROP TABLE t1;
+
+CREATE TABLE t1(a LONGBLOB);
+INSERT INTO t1 VALUES('1'),('2'),('3');
+SELECT DISTINCT (a DIV 254576881) FROM t1;
+SELECT (a DIV 254576881) FROM t1 UNION ALL
+ SELECT (a DIV 254576881) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1(a SET('a','b','c'));
+INSERT INTO t1 VALUES ('a');
+SELECT a DIV 2 FROM t1 UNION SELECT a DIV 2 FROM t1;
+DROP TABLE t1;
+
+
--echo End of 5.0 tests
diff --git a/mysql-test/t/func_misc.test b/mysql-test/t/func_misc.test
index 01eff55d1f6..7a579088d23 100644
--- a/mysql-test/t/func_misc.test
+++ b/mysql-test/t/func_misc.test
@@ -3,7 +3,7 @@
#
--disable_warnings
-DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t1, t2;
--enable_warnings
select format(1.5555,0),format(123.5555,1),format(1234.5555,2),format(12345.55555,3),format(123456.5555,4),format(1234567.5555,5),format("12345.2399",2);
@@ -198,6 +198,54 @@ drop table table_26093;
drop function func_26093_a;
drop function func_26093_b;
+#
+# Bug #30832: Assertion + crash with select name_const('test',now());
+#
+--error ER_WRONG_ARGUMENTS
+SELECT NAME_CONST('test', NOW());
+--error ER_WRONG_ARGUMENTS
+SELECT NAME_CONST('test', UPPER('test'));
+
+SELECT NAME_CONST('test', NULL);
+SELECT NAME_CONST('test', 1);
+SELECT NAME_CONST('test', -1);
+SELECT NAME_CONST('test', 1.0);
+SELECT NAME_CONST('test', -1.0);
+SELECT NAME_CONST('test', 'test');
+
+#
+# Bug #27545: erroneous usage of NAME_CONST with a name as the first parameter
+# resolved against a column name of a derived table hangs the client
+#
+
+CREATE TABLE t1 (a int);
+INSERT INTO t1 VALUES (5), (2);
+
+--error ER_WRONG_ARGUMENTS
+SELECT NAME_CONST(x,2) FROM (SELECT a x FROM t1) t;
+
+DROP TABLE t1;
+
+
+#
+# Bug #32559: connection hangs on query with name_const
+#
+CREATE TABLE t1(a INT);
+INSERT INTO t1 VALUES (), (), ();
+--error ER_WRONG_ARGUMENTS
+SELECT NAME_CONST(a, '1') FROM t1;
+--error ER_WRONG_ARGUMENTS
+SET INSERT_ID= NAME_CONST(a, a);
+DROP TABLE t1;
+
+#
+# Bug #31349: ERROR 1062 (23000): Duplicate entry '' for key 'group_key'
+#
+create table t1 (a int not null);
+insert into t1 values (-1), (-2);
+select min(a) from t1 group by inet_ntoa(a);
+drop table t1;
+
--echo End of 5.0 tests
#
diff --git a/mysql-test/t/func_regexp.test b/mysql-test/t/func_regexp.test
index 23070c71fe9..1b35fab9d54 100644
--- a/mysql-test/t/func_regexp.test
+++ b/mysql-test/t/func_regexp.test
@@ -6,28 +6,9 @@
drop table if exists t1;
--enable_warnings
-create table t1 (s1 char(64),s2 char(64));
+set names latin1;
+--source include/ctype_regex.inc
-insert into t1 values('aaa','aaa');
-insert into t1 values('aaa|qqq','qqq');
-insert into t1 values('gheis','^[^a-dXYZ]+$');
-insert into t1 values('aab','^aa?b');
-insert into t1 values('Baaan','^Ba*n');
-insert into t1 values('aaa','qqq|aaa');
-insert into t1 values('qqq','qqq|aaa');
-
-insert into t1 values('bbb','qqq|aaa');
-insert into t1 values('bbb','qqq');
-insert into t1 values('aaa','aba');
-
-insert into t1 values(null,'abc');
-insert into t1 values('def',null);
-insert into t1 values(null,null);
-insert into t1 values('ghi','ghi[');
-
-select HIGH_PRIORITY s1 regexp s2 from t1;
-
-drop table t1;
#
# This test a bug in regexp on Alpha
@@ -74,4 +55,13 @@ execute stmt1 using @a;
deallocate prepare stmt1;
drop table t1;
-# End of 4.1 tests
+--echo End of 4.1 tests
+
+
+#
+# Bug #31440: 'select 1 regex null' asserts debug server
+#
+
+SELECT 1 REGEXP NULL;
+
+--echo End of 5.0 tests
diff --git a/mysql-test/t/func_sapdb.test b/mysql-test/t/func_sapdb.test
index bb65cbaa774..5db6db70e8f 100644
--- a/mysql-test/t/func_sapdb.test
+++ b/mysql-test/t/func_sapdb.test
@@ -47,6 +47,7 @@ select makedate(1997,1);
select makedate(1997,0);
select makedate(9999,365);
select makedate(9999,366);
+select makedate(100,1);
#Time functions
diff --git a/mysql-test/t/func_set.test b/mysql-test/t/func_set.test
index 710b9b90a05..e4fde6e0e0e 100644
--- a/mysql-test/t/func_set.test
+++ b/mysql-test/t/func_set.test
@@ -54,4 +54,21 @@ select find_in_set(binary 'a', 'A,B,C');
#
select find_in_set('1','3,1,');
-# End of 4.1 tests
+--echo End of 4.1 tests
+
+#
+# Bug #32560: crash with interval function and count(*)
+#
+SELECT INTERVAL(0.0, NULL);
+SELECT INTERVAL(0.0, CAST(NULL AS DECIMAL));
+SELECT INTERVAL(0.0, CAST(DATE(NULL) AS DECIMAL));
+SELECT INTERVAL(0.0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+SELECT INTERVAL(0.0, CAST(NULL AS DECIMAL), CAST(NULL AS DECIMAL),
+ CAST(NULL AS DECIMAL), CAST(NULL AS DECIMAL), CAST(NULL AS DECIMAL),
+ CAST(NULL AS DECIMAL), CAST(NULL AS DECIMAL), CAST(NULL AS DECIMAL));
+SELECT INTERVAL(0.0, CAST(DATE(NULL) AS DECIMAL), CAST(DATE(NULL) AS DECIMAL),
+ CAST(DATE(NULL) AS DECIMAL), CAST(DATE(NULL) AS DECIMAL),
+ CAST(DATE(NULL) AS DECIMAL), CAST(DATE(NULL) AS DECIMAL),
+ CAST(DATE(NULL) AS DECIMAL), CAST(DATE(NULL) AS DECIMAL));
+
+--echo End of 5.0 tests
diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test
index 945f5a050f4..b6da14211ae 100644
--- a/mysql-test/t/func_str.test
+++ b/mysql-test/t/func_str.test
@@ -782,6 +782,19 @@ explain extended select encode(f1,'zxcv') as 'enc' from t1;
explain extended select decode(f1,'zxcv') as 'enc' from t1;
drop table t1;
+#
+# Bug #31758 inet_ntoa, oct, crashes server with null + filesort
+#
+create table t1 (a bigint not null)engine=myisam;
+insert into t1 set a = 1024*1024*1024*4;
+delete from t1 order by (inet_ntoa(a)) desc limit 10;
+drop table t1;
+create table t1 (a char(36) not null)engine=myisam;
+insert ignore into t1 set a = ' ';
+insert ignore into t1 set a = ' ';
+select * from t1 order by (oct(a));
+drop table t1;
+
--echo End of 4.1 tests
#
@@ -1231,4 +1244,16 @@ SELECT SUBSTR(a,1,len) FROM t1;
DROP TABLE t1;
+#
+# Bug #28850: Potential bugs related to the return type of the CHAR function
+#
+
+CREATE TABLE t1 AS SELECT CHAR(0x414243) as c1;
+SELECT HEX(c1) from t1;
+DROP TABLE t1;
+
+CREATE VIEW v1 AS SELECT CHAR(0x414243) as c1;
+SELECT HEX(c1) from v1;
+DROP VIEW v1;
+
--echo End of 5.0 tests
diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test
index d3346bbb880..97087abd668 100644
--- a/mysql-test/t/func_time.test
+++ b/mysql-test/t/func_time.test
@@ -548,6 +548,16 @@ DROP TABLE testBug8868;
SET NAMES DEFAULT;
#
+# Bug #31160: MAKETIME() crashes server when returning NULL in ORDER BY using
+# filesort
+#
+CREATE TABLE t1 (
+ a TIMESTAMP
+);
+INSERT INTO t1 VALUES (now()), (now());
+SELECT 1 FROM t1 ORDER BY MAKETIME(1, 1, a);
+DROP TABLE t1;
+#
# Bug #19844 time_format in Union truncates values
#
@@ -756,6 +766,16 @@ select concat(a,ifnull(min(date_format(now(), '%Y-%m-%d')),' ull')) from t1;
set lc_time_names=en_US;
drop table t1;
+#
+# Bug#32180: DATE_ADD treats datetime numeric argument as DATE
+# instead of DATETIME
+#
+
+select DATE_ADD('20071108181000', INTERVAL 1 DAY);
+select DATE_ADD(20071108181000, INTERVAL 1 DAY);
+select DATE_ADD('20071108', INTERVAL 1 DAY);
+select DATE_ADD(20071108, INTERVAL 1 DAY);
+
--echo End of 5.0 tests
#
diff --git a/mysql-test/t/gis-rtree.test b/mysql-test/t/gis-rtree.test
index 88f31143d93..dad22f42571 100644
--- a/mysql-test/t/gis-rtree.test
+++ b/mysql-test/t/gis-rtree.test
@@ -797,6 +797,42 @@ UPDATE t1 set spatial_point=GeomFromText('POINT(41 46)') where c1 like 'f%';
CHECK TABLE t1 EXTENDED;
DROP TABLE t1;
+#
+# Bug #30286 spatial index cause corruption and server crash!
+#
+
+create table t1 (a geometry not null, spatial index(a));
+insert into t1 values (PointFromWKB(POINT(1.1517219314031e+164, 131072)));
+insert into t1 values (PointFromWKB(POINT(9.1248812352444e+192, 2.9740338169556e+284)));
+insert into t1 values (PointFromWKB(POINT(4.7783097267365e-299, -0)));
+insert into t1 values (PointFromWKB(POINT(1.49166814624e-154, 2.0880974297595e-53)));
+insert into t1 values (PointFromWKB(POINT(4.0917382598702e+149, 1.2024538023802e+111)));
+insert into t1 values (PointFromWKB(POINT(2.0349165139404e+236, 2.9993936277913e-241)));
+insert into t1 values (PointFromWKB(POINT(2.5243548967072e-29, 1.2024538023802e+111)));
+insert into t1 values (PointFromWKB(POINT(0, 6.9835074892995e-251)));
+insert into t1 values (PointFromWKB(POINT(2.0880974297595e-53, 3.1050361846014e+231)));
+insert into t1 values (PointFromWKB(POINT(2.8728483499323e-188, 2.4600631144627e+260)));
+insert into t1 values (PointFromWKB(POINT(3.0517578125e-05, 2.0349165139404e+236)));
+insert into t1 values (PointFromWKB(POINT(1.1517219314031e+164, 1.1818212630766e-125)));
+insert into t1 values (PointFromWKB(POINT(2.481040258324e-265, 5.7766220027675e-275)));
+insert into t1 values (PointFromWKB(POINT(2.0880974297595e-53, 2.5243548967072e-29)));
+insert into t1 values (PointFromWKB(POINT(5.7766220027675e-275, 9.9464647281957e+86)));
+insert into t1 values (PointFromWKB(POINT(2.2181357552967e+130, 3.7857669957337e-270)));
+insert into t1 values (PointFromWKB(POINT(4.5767114681874e-246, 3.6893488147419e+19)));
+insert into t1 values (PointFromWKB(POINT(4.5767114681874e-246, 3.7537584144024e+255)));
+insert into t1 values (PointFromWKB(POINT(3.7857669957337e-270, 1.8033161362863e-130)));
+insert into t1 values (PointFromWKB(POINT(0, 5.8774717541114e-39)));
+insert into t1 values (PointFromWKB(POINT(1.1517219314031e+164, 2.2761049594727e-159)));
+insert into t1 values (PointFromWKB(POINT(6.243497100632e+144, 3.7857669957337e-270)));
+insert into t1 values (PointFromWKB(POINT(3.7857669957337e-270, 2.6355494858076e-82)));
+insert into t1 values (PointFromWKB(POINT(2.0349165139404e+236, 3.8518598887745e-34)));
+insert into t1 values (PointFromWKB(POINT(4.6566128730774e-10, 2.0880974297595e-53)));
+insert into t1 values (PointFromWKB(POINT(2.0880974297595e-53, 1.8827498946116e-183)));
+insert into t1 values (PointFromWKB(POINT(1.8033161362863e-130, 9.1248812352444e+192)));
+insert into t1 values (PointFromWKB(POINT(4.7783097267365e-299, 2.2761049594727e-159)));
+insert into t1 values (PointFromWKB(POINT(1.94906280228e+289, 1.2338789709327e-178)));
+drop table t1;
+
# End of 4.1 tests
#
diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test
index d7182e36e3a..e6b8b91783c 100644
--- a/mysql-test/t/gis.test
+++ b/mysql-test/t/gis.test
@@ -432,6 +432,56 @@ INSERT INTO t1 VALUES (NULL);
SELECT * FROM t1;
DROP TABLE t1;
+#
+# Bug #30955 geomfromtext() crasher
+#
+CREATE TABLE `t1` ( `col9` set('a'), `col89` date);
+INSERT INTO `t1` VALUES ('','0000-00-00');
+select geomfromtext(col9,col89) as a from t1;
+DROP TABLE t1;
+
+#
+# Bug #31158 Spatial, Union, LONGBLOB vs BLOB bug (crops data)
+#
+
+CREATE TABLE t1 (
+ geomdata polygon NOT NULL,
+ SPATIAL KEY index_geom (geomdata)
+) ENGINE=MyISAM DEFAULT CHARSET=latin2 DELAY_KEY_WRITE=1 ROW_FORMAT=FIXED;
+
+CREATE TABLE t2 (
+ geomdata polygon NOT NULL,
+ SPATIAL KEY index_geom (geomdata)
+) ENGINE=MyISAM DEFAULT CHARSET=latin2 DELAY_KEY_WRITE=1 ROW_FORMAT=FIXED;
+
+CREATE TABLE t3
+select
+ aswkb(ws.geomdata) AS geomdatawkb
+ from
+ t1 ws
+union
+ select
+ aswkb(ws.geomdata) AS geomdatawkb
+ from
+ t2 ws;
+
+describe t3;
+
+drop table t1;
+drop table t2;
+drop table t3;
+
+#
+# Bug #30284 spatial key corruption
+#
+
+create table t1(col1 geometry default null,col15 geometrycollection not
+null,spatial index(col15),index(col1(15)))engine=myisam;
+insert into t1 set col15 = GeomFromText('POINT(6 5)');
+insert into t1 set col15 = GeomFromText('POINT(6 5)');
+check table t1 extended;
+drop table t1;
+
--echo End of 4.1 tests
#
@@ -591,6 +641,17 @@ SELECT AsText(GeometryFromText(CONCAT(
--enable_query_log
SELECT 1;
+-- source include/gis_keys.inc
+
+#
+# Bug #31155 gis types in union'd select cause crash
+#
+
+create table `t1` (`col002` point)engine=myisam;
+insert into t1 values (),(),();
+select min(`col002`) from t1 union select `col002` from t1;
+drop table t1;
+
--echo End of 5.0 tests
diff --git a/mysql-test/t/grant.test b/mysql-test/t/grant.test
index e33712e1ebf..d9ee38d0c14 100644
--- a/mysql-test/t/grant.test
+++ b/mysql-test/t/grant.test
@@ -1235,6 +1235,7 @@ DROP DATABASE mysqltest1;
DROP DATABASE mysqltest2;
DROP USER mysqltest_1@localhost;
+DROP USER mysqltest_2@localhost;
#
# Bug#27878: Unchecked privileges on a view referring to a table from another
@@ -1257,6 +1258,10 @@ UPDATE v1 SET f2 = 4;
SELECT * FROM test.t1;
disconnect user1;
connection default;
+REVOKE UPDATE (f1) ON `test`.`t1` FROM 'mysqltest_1'@'localhost';
+REVOKE SELECT ON `test`.* FROM 'mysqltest_1'@'localhost';
+REVOKE ALL ON db27878.* FROM 'mysqltest_1'@'localhost';
+DROP USER mysqltest_1@localhost;
DROP DATABASE db27878;
use test;
DROP TABLE t1;
@@ -1274,3 +1279,101 @@ drop user юзер_юзер@localhost;
--error ER_WRONG_STRING_LENGTH
grant select on test.* to очень_длинный_юзер@localhost;
set names default;
+
+#
+# Bug #20901 - CREATE privilege is enough to insert into a table
+#
+
+create database mysqltest;
+use mysqltest;
+
+grant create on mysqltest.* to mysqltest@localhost;
+create table t1 (i INT);
+
+connect (user1,localhost,mysqltest,,mysqltest);
+connection user1;
+# show we don't have INSERT
+--error 1142
+insert into t1 values (1);
+# show we have CREATE
+create table t2 (i INT);
+create table t4 (i INT);
+
+connection default;
+grant select, insert on mysqltest.t2 to mysqltest@localhost;
+grant insert on mysqltest.t4 to mysqltest@localhost;
+# to specify ACLs for non-existent objects, must explictly |CREATE
+grant create, insert on mysqltest.t5 to mysqltest@localhost;
+grant create, insert on mysqltest.t6 to mysqltest@localhost;
+flush privileges;
+
+connection user1;
+insert into t2 values (1);
+
+
+# CREATE IF NOT EXISTS...SELECT, t1 exists, no INSERT, must fail
+--error 1142
+create table if not exists t1 select * from t2;
+
+# CREATE IF NOT EXISTS...SELECT, no t3 yet, no INSERT, must fail
+--error 1142
+create table if not exists t3 select * from t2;
+
+# CREATE IF NOT EXISTS...SELECT, t4 exists, have INSERT, must succeed
+create table if not exists t4 select * from t2;
+
+# CREATE IF NOT EXISTS...SELECT, no t5 yet, have INSERT, must succeed
+create table if not exists t5 select * from t2;
+
+
+# CREATE...SELECT, no t6 yet, have INSERT, must succeed
+create table t6 select * from t2;
+
+# CREATE...SELECT, no t7 yet, no INSERT, must fail
+--error 1142
+create table t7 select * from t2;
+
+# CREATE...SELECT, t4 exists, have INSERT, must still fail (exists)
+--error 1050
+create table t4 select * from t2;
+
+# CREATE...SELECT, t1 exists, no INSERT, must fail
+--error 1142
+create table t1 select * from t2;
+
+
+connection default;
+drop table t1,t2,t4,t5,t6;
+
+revoke create on mysqltest.* from mysqltest@localhost;
+revoke select, insert on mysqltest.t2 from mysqltest@localhost;
+revoke insert on mysqltest.t4 from mysqltest@localhost;
+revoke create, insert on mysqltest.t5 from mysqltest@localhost;
+revoke create, insert on mysqltest.t6 from mysqltest@localhost;
+drop user mysqltest@localhost;
+
+disconnect user1;
+drop database mysqltest;
+use test;
+
+
+#
+# Bug #16470 crash on grant if old grant tables
+#
+--echo FLUSH PRIVILEGES without procs_priv table.
+RENAME TABLE mysql.procs_priv TO mysql.procs_gone;
+FLUSH PRIVILEGES;
+--echo Assigning privileges without procs_priv table.
+CREATE DATABASE mysqltest1;
+CREATE PROCEDURE mysqltest1.test() SQL SECURITY DEFINER
+ SELECT 1;
+--error ER_NO_SUCH_TABLE
+GRANT EXECUTE ON FUNCTION mysqltest1.test TO mysqltest_1@localhost;
+GRANT ALL PRIVILEGES ON test.* TO mysqltest_1@localhost;
+CALL mysqltest1.test();
+DROP DATABASE mysqltest1;
+RENAME TABLE mysql.procs_gone TO mysql.procs_priv;
+FLUSH PRIVILEGES;
+
+
+--echo End of 5.1 tests
diff --git a/mysql-test/t/grant2.test b/mysql-test/t/grant2.test
index f6075ba2ee4..0f0c92e82eb 100644
--- a/mysql-test/t/grant2.test
+++ b/mysql-test/t/grant2.test
@@ -585,5 +585,37 @@ drop user mysqltest_1@localhost;
drop user mysqltest_2@localhost;
+#
+# Bug #30468: column level privileges not respected when joining tables
+#
+CREATE DATABASE db1;
+
+USE db1;
+CREATE TABLE t1 (a INT, b INT);
+INSERT INTO t1 VALUES (1,1),(2,2);
+
+CREATE TABLE t2 (b INT, c INT);
+INSERT INTO t2 VALUES (1,100),(2,200);
+
+GRANT SELECT ON t1 TO mysqltest1@localhost;
+GRANT SELECT (b) ON t2 TO mysqltest1@localhost;
+
+connect (conn1,localhost,mysqltest1,,);
+connection conn1;
+USE db1;
+--error ER_COLUMNACCESS_DENIED_ERROR
+SELECT c FROM t2;
+--error ER_COLUMNACCESS_DENIED_ERROR
+SELECT * FROM t2;
+--error ER_COLUMNACCESS_DENIED_ERROR
+SELECT * FROM t1 JOIN t2 USING (b);
+
+connection default;
+disconnect conn1;
+DROP TABLE db1.t1, db1.t2;
+DROP USER mysqltest1@localhost;
+DROP DATABASE db1;
+
+
--echo End of 5.0 tests
diff --git a/mysql-test/t/grant3.test b/mysql-test/t/grant3.test
index 115586e807d..fac577ef0ff 100644
--- a/mysql-test/t/grant3.test
+++ b/mysql-test/t/grant3.test
@@ -34,3 +34,103 @@ delete from mysql.db where user like 'mysqltest\_%';
delete from mysql.tables_priv where user like 'mysqltest\_%';
delete from mysql.columns_priv where user like 'mysqltest\_%';
flush privileges;
+
+#
+# Bug: #19828 Case sensitivity in Grant/Revoke
+#
+
+grant select on test.* to CUser@localhost;
+grant select on test.* to CUser@LOCALHOST;
+flush privileges;
+
+SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
+SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser' order by 1,2;
+
+REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'LOCALHOST';
+flush privileges;
+
+SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
+SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser' order by 1,2;
+
+REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'localhost';
+flush privileges;
+
+SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
+SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser' order by 1,2;
+
+DROP USER CUser@localhost;
+DROP USER CUser@LOCALHOST;
+
+#### table grants
+create table t1 (a int);
+grant select on test.t1 to CUser@localhost;
+grant select on test.t1 to CUser@LOCALHOST;
+flush privileges;
+
+SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
+SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
+
+REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'LOCALHOST';
+flush privileges;
+
+SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
+SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
+
+REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'localhost';
+flush privileges;
+
+SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
+SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
+
+DROP USER CUser@localhost;
+DROP USER CUser@LOCALHOST;
+
+### column grants
+
+grant select(a) on test.t1 to CUser@localhost;
+grant select(a) on test.t1 to CUser@LOCALHOST;
+flush privileges;
+
+SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
+SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
+
+REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'LOCALHOST';
+flush privileges;
+
+SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
+SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
+
+REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'localhost';
+flush privileges;
+
+SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
+SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
+
+DROP USER CUser@localhost;
+DROP USER CUser@LOCALHOST;
+
+drop table t1;
+
+# revoke on a specific DB only
+
+grant select on test.* to CUser2@localhost;
+grant select on test.* to CUser2@LOCALHOST;
+flush privileges;
+
+SELECT user, host FROM mysql.user where user = 'CUser2' order by 1,2;
+SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser2' order by 1,2;
+
+REVOKE SELECT ON test.* FROM 'CUser2'@'LOCALHOST';
+flush privileges;
+
+SELECT user, host FROM mysql.user where user = 'CUser2' order by 1,2;
+SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser2' order by 1,2;
+
+REVOKE SELECT ON test.* FROM 'CUser2'@'localhost';
+flush privileges;
+
+SELECT user, host FROM mysql.user where user = 'CUser2' order by 1,2;
+SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser2' order by 1,2;
+
+DROP USER CUser2@localhost;
+DROP USER CUser2@LOCALHOST;
diff --git a/mysql-test/t/group_by.test b/mysql-test/t/group_by.test
index ae616df0dfd..94c2b463aaa 100644
--- a/mysql-test/t/group_by.test
+++ b/mysql-test/t/group_by.test
@@ -790,6 +790,41 @@ drop table t1;
SET SQL_MODE = '';
#
+
+#
+# Bug #32202: ORDER BY not working with GROUP BY
+#
+
+CREATE TABLE t1(
+ id INT AUTO_INCREMENT PRIMARY KEY,
+ c1 INT NOT NULL,
+ c2 INT NOT NULL,
+ UNIQUE KEY (c2,c1));
+
+INSERT INTO t1(c1,c2) VALUES (5,1), (4,1), (3,5), (2,3), (1,3);
+
+# Show that the test cases from the bug report pass
+SELECT * FROM t1 ORDER BY c1;
+SELECT * FROM t1 GROUP BY id ORDER BY c1;
+
+# Show that DESC is handled correctly
+SELECT * FROM t1 GROUP BY id ORDER BY id DESC;
+
+# Show that results are correctly ordered when ORDER BY fields
+# are a subset of GROUP BY ones
+SELECT * FROM t1 GROUP BY c2 ,c1, id ORDER BY c2, c1;
+SELECT * FROM t1 GROUP BY c2, c1, id ORDER BY c2 DESC, c1;
+SELECT * FROM t1 GROUP BY c2, c1, id ORDER BY c2 DESC, c1 DESC;
+
+# Show that results are correctly ordered when GROUP BY fields
+# are a subset of ORDER BY ones
+SELECT * FROM t1 GROUP BY c2 ORDER BY c2, c1;
+SELECT * FROM t1 GROUP BY c2 ORDER BY c2 DESC, c1;
+SELECT * FROM t1 GROUP BY c2 ORDER BY c2 DESC, c1 DESC;
+
+DROP TABLE t1;
+
+--echo End of 5.0 tests
# Bug #21174: Index degrades sort performance and
# optimizer does not honor IGNORE INDEX.
# a.k.a WL3527.
@@ -811,6 +846,7 @@ EXPLAIN SELECT a FROM t1 IGNORE INDEX (PRIMARY,i2);
EXPLAIN SELECT a FROM t1 IGNORE INDEX FOR JOIN (PRIMARY,i2);
EXPLAIN SELECT a FROM t1 IGNORE INDEX FOR GROUP BY (PRIMARY,i2) GROUP BY a;
EXPLAIN SELECT a FROM t1 IGNORE INDEX FOR ORDER BY (PRIMARY,i2) ORDER BY a;
+SELECT a FROM t1 IGNORE INDEX FOR ORDER BY (PRIMARY,i2) ORDER BY a;
EXPLAIN SELECT a FROM t1 IGNORE INDEX FOR ORDER BY (PRIMARY)
IGNORE INDEX FOR GROUP BY (i2) GROUP BY a;
EXPLAIN SELECT a FROM t1 IGNORE INDEX (PRIMARY) IGNORE INDEX FOR ORDER BY (i2);
diff --git a/mysql-test/t/group_min_max.test b/mysql-test/t/group_min_max.test
index cf25b4c61be..7ec7e58ee19 100644
--- a/mysql-test/t/group_min_max.test
+++ b/mysql-test/t/group_min_max.test
@@ -890,6 +890,7 @@ FLUSH STATUS;
DELETE FROM t3 WHERE (SELECT MAX(b) FROM t1 GROUP BY a HAVING a < 2) > 10000;
SHOW STATUS LIKE 'handler_read__e%';
FLUSH STATUS;
+--error ER_SUBQUERY_NO_1_ROW
DELETE FROM t3 WHERE (SELECT (SELECT MAX(b) FROM t1 GROUP BY a HAVING a < 2) x
FROM t1) > 10000;
SHOW STATUS LIKE 'handler_read__e%';
@@ -913,7 +914,31 @@ SELECT SQL_BIG_RESULT DISTINCT(a) FROM t1;
DROP TABLE t1;
+#
+# Bug #32268: Indexed queries give bogus MIN and MAX results
+#
+
+CREATE TABLE t1 (a INT, b INT);
+INSERT INTO t1 (a, b) VALUES (1,1), (1,2), (1,3);
+INSERT INTO t1 SELECT a + 1, b FROM t1;
+INSERT INTO t1 SELECT a + 2, b FROM t1;
+EXPLAIN
+SELECT a, MIN(b), MAX(b) FROM t1 GROUP BY a ORDER BY a DESC;
+SELECT a, MIN(b), MAX(b) FROM t1 GROUP BY a ORDER BY a DESC;
+CREATE INDEX break_it ON t1 (a, b);
+EXPLAIN
+SELECT a, MIN(b), MAX(b) FROM t1 GROUP BY a ORDER BY a;
+SELECT a, MIN(b), MAX(b) FROM t1 GROUP BY a ORDER BY a;
+EXPLAIN
+SELECT a, MIN(b), MAX(b) FROM t1 GROUP BY a ORDER BY a DESC;
+SELECT a, MIN(b), MAX(b) FROM t1 GROUP BY a ORDER BY a DESC;
+
+EXPLAIN
+SELECT a, MIN(b), MAX(b), AVG(b) FROM t1 GROUP BY a ORDER BY a DESC;
+SELECT a, MIN(b), MAX(b), AVG(b) FROM t1 GROUP BY a ORDER BY a DESC;
+
+DROP TABLE t1;
diff --git a/mysql-test/t/heap_btree.test b/mysql-test/t/heap_btree.test
index 0e8cc71dab5..b51eeb27331 100644
--- a/mysql-test/t/heap_btree.test
+++ b/mysql-test/t/heap_btree.test
@@ -213,6 +213,15 @@ CREATE TABLE t1 (
INSERT INTO t1 VALUES('1'), ('2');
DROP TABLE t1;
+#
+# BUG#30590 - delete from memory table with composite btree primary key
+#
+CREATE TABLE t1 (a INT, KEY USING BTREE(a)) ENGINE=MEMORY;
+INSERT INTO t1 VALUES(1),(2),(2);
+DELETE FROM t1 WHERE a=2;
+SELECT * FROM t1;
+DROP TABLE t1;
+
--echo End of 4.1 tests
#
@@ -235,5 +244,14 @@ CREATE TABLE t1 (a INT, UNIQUE USING BTREE(a)) ENGINE=MEMORY;
INSERT INTO t1 VALUES(NULL),(NULL);
DROP TABLE t1;
+#
+# Bug #30885: MEMORY returns incorrect data if BTREE index is used for NULL lookup
+#
+create table t1(a varchar(255), b varchar(255),
+ key using btree (a,b)) engine=memory;
+insert into t1 values (1, 1), (3, 3), (2, 2), (NULL, 1), (NULL, NULL), (0, 0);
+select * from t1 where a is null;
+drop table t1;
+
--echo End of 5.0 tests
diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test
index 6bcc14d4e49..2a9319fe010 100644
--- a/mysql-test/t/information_schema.test
+++ b/mysql-test/t/information_schema.test
@@ -807,7 +807,8 @@ DROP FUNCTION func2;
select column_type, group_concat(table_schema, '.', table_name), count(*) as num
from information_schema.columns where
table_schema='information_schema' and
-(column_type = 'varchar(7)' or column_type = 'varchar(20)')
+(column_type = 'varchar(7)' or column_type = 'varchar(20)'
+ or column_type = 'varchar(27)')
group by column_type order by num;
#
@@ -953,7 +954,7 @@ BEGIN
DECLARE col1, col2, col3, col4, col6 CHAR(255);
DECLARE default_val VARCHAR(65532);
DECLARE done INT DEFAULT 0;
- DECLARE cur1 CURSOR FOR SHOW COLUMNS FROM bug23037;
+ DECLARE cur1 CURSOR FOR SELECT COLUMN_NAME, COLUMN_TYPE, IS_NULLABLE, COLUMN_KEY, COLUMN_DEFAULT, EXTRA FROM INFORMATION_SCHEMA.COLUMNS where TABLE_NAME='bug23037';
DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1;
OPEN cur1;
FETCH cur1 INTO col1, col2, col3, col4, default_val, col6;
@@ -1090,6 +1091,14 @@ show columns from t1;
drop table t1;
--echo End of 5.0 tests.
+
+#
+# Bug#30079 A check for "hidden" I_S tables is flawed
+#
+--error 1109
+show fields from information_schema.table_names;
+--error 1109
+show keys from information_schema.table_names;
#
# Show engines
#
@@ -1134,6 +1143,7 @@ END$$
DELIMITER ;$$
+let $wait_timeout= 300;
let $wait_condition=select count(*) = 0 from information_schema.events where event_name='event_status';
--source include/wait_condition.inc
@@ -1178,4 +1188,64 @@ select count(*) from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysql' AND TA
select count(*) from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysql' AND TABLE_NAME='';
select count(*) from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='' AND TABLE_NAME='';
select count(*) from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='' AND TABLE_NAME='nonexisting';
+
+#
+# Bug#30689 Wrong content in I_S.VIEWS.VIEW_DEFINITION if VIEW is based on I_S
+#
+CREATE VIEW v1
+AS SELECT *
+FROM INFORMATION_SCHEMA.TABLES;
+SELECT VIEW_DEFINITION FROM INFORMATION_SCHEMA.VIEWS where TABLE_NAME = 'v1';
+DROP VIEW v1;
+
+#
+# Bug#30795 Query on INFORMATION_SCHEMA.SCHEMATA, wrong result
+#
+SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA
+WHERE SCHEMA_NAME ='information_schema';
+
+#
+# Bug#31381 Error in retrieving Data from INFORMATION_SCHEMA
+#
+SELECT TABLE_COLLATION FROM INFORMATION_SCHEMA.TABLES
+WHERE TABLE_SCHEMA='mysql' and TABLE_NAME= 'db';
+
+#
+# Bug#31633 Information schema = NULL queries crash the server
+#
+select * from information_schema.columns where table_schema = NULL;
+select * from `information_schema`.`COLUMNS` where `TABLE_NAME` = NULL;
+select * from `information_schema`.`KEY_COLUMN_USAGE` where `TABLE_SCHEMA` = NULL;
+select * from `information_schema`.`KEY_COLUMN_USAGE` where `TABLE_NAME` = NULL;
+select * from `information_schema`.`PARTITIONS` where `TABLE_SCHEMA` = NULL;
+select * from `information_schema`.`PARTITIONS` where `TABLE_NAME` = NULL;
+select * from `information_schema`.`REFERENTIAL_CONSTRAINTS` where `CONSTRAINT_SCHEMA` = NULL;
+select * from `information_schema`.`REFERENTIAL_CONSTRAINTS` where `TABLE_NAME` = NULL;
+select * from information_schema.schemata where schema_name = NULL;
+select * from `information_schema`.`STATISTICS` where `TABLE_SCHEMA` = NULL;
+select * from `information_schema`.`STATISTICS` where `TABLE_NAME` = NULL;
+select * from information_schema.tables where table_schema = NULL;
+select * from information_schema.tables where table_catalog = NULL;
+select * from information_schema.tables where table_name = NULL;
+select * from `information_schema`.`TABLE_CONSTRAINTS` where `TABLE_SCHEMA` = NULL;
+select * from `information_schema`.`TABLE_CONSTRAINTS` where `TABLE_NAME` = NULL;
+select * from `information_schema`.`TRIGGERS` where `EVENT_OBJECT_SCHEMA` = NULL;
+select * from `information_schema`.`TRIGGERS` where `EVENT_OBJECT_TABLE` = NULL;
+select * from `information_schema`.`VIEWS` where `TABLE_SCHEMA` = NULL;
+select * from `information_schema`.`VIEWS` where `TABLE_NAME` = NULL;
+
+#
+# Bug#31630 debug assert with explain extended select ... from i_s
+#
+explain extended select 1 from information_schema.tables;
+
+#
+# Bug#32775 problems with SHOW EVENTS and Information_Schema
+#
+use information_schema;
+show events;
+show events from information_schema;
+show events where Db= 'information_schema';
+use test;
+
--echo End of 5.1 tests.
diff --git a/mysql-test/t/innodb-semi-consistent-master.opt b/mysql-test/t/innodb-semi-consistent-master.opt
new file mode 100644
index 00000000000..2746e4e184e
--- /dev/null
+++ b/mysql-test/t/innodb-semi-consistent-master.opt
@@ -0,0 +1 @@
+--innodb_locks_unsafe_for_binlog=true --innodb_lock_wait_timeout=2
diff --git a/mysql-test/t/innodb-semi-consistent.test b/mysql-test/t/innodb-semi-consistent.test
new file mode 100644
index 00000000000..c33126b93ff
--- /dev/null
+++ b/mysql-test/t/innodb-semi-consistent.test
@@ -0,0 +1,50 @@
+-- source include/not_embedded.inc
+-- source include/have_innodb.inc
+
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+
+# basic tests of semi-consistent reads
+
+connect (a,localhost,root,,);
+connect (b,localhost,root,,);
+connection a;
+set session transaction isolation level read committed;
+create table t1(a int not null) engine=innodb DEFAULT CHARSET=latin1;
+insert into t1 values (1),(2),(3),(4),(5),(6),(7);
+set autocommit=0;
+# this should lock the entire table
+select * from t1 where a=3 lock in share mode;
+connection b;
+set session transaction isolation level read committed;
+set autocommit=0;
+-- error ER_LOCK_WAIT_TIMEOUT
+update t1 set a=10 where a=5;
+connection a;
+commit;
+connection b;
+update t1 set a=10 where a=5;
+connection a;
+-- error ER_LOCK_WAIT_TIMEOUT
+select * from t1 where a=2 for update;
+# this should lock the records (1),(2)
+select * from t1 where a=2 limit 1 for update;
+connection b;
+update t1 set a=11 where a=6;
+-- error ER_LOCK_WAIT_TIMEOUT
+update t1 set a=12 where a=2;
+-- error ER_LOCK_WAIT_TIMEOUT
+update t1 set a=13 where a=1;
+connection a;
+commit;
+connection b;
+update t1 set a=14 where a=1;
+commit;
+connection a;
+select * from t1;
+drop table t1;
+
+connection default;
+disconnect a;
+disconnect b;
diff --git a/mysql-test/t/innodb-ucs2.test b/mysql-test/t/innodb-ucs2.test
index 6647a9d0845..7b91ef37d3f 100644
--- a/mysql-test/t/innodb-ucs2.test
+++ b/mysql-test/t/innodb-ucs2.test
@@ -1,6 +1,10 @@
-- source include/have_innodb.inc
-- source include/have_ucs2.inc
+--disable_warnings
+drop table if exists t1, t2;
+--enable_warnings
+
#
# BUG 14056 Column prefix index on UTF-8 primary key column causes: Can't find record..
#
diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test
index cc1ef6f9730..8fdbbfcde79 100644
--- a/mysql-test/t/innodb.test
+++ b/mysql-test/t/innodb.test
@@ -327,39 +327,6 @@ select * from t2;
drop table t1,t2;
#
-# Search on unique key
-#
-
-CREATE TABLE t1 (
- id int(11) NOT NULL auto_increment,
- ggid varchar(32) binary DEFAULT '' NOT NULL,
- email varchar(64) DEFAULT '' NOT NULL,
- passwd varchar(32) binary DEFAULT '' NOT NULL,
- PRIMARY KEY (id),
- UNIQUE ggid (ggid)
-) ENGINE=innodb;
-
-insert into t1 (ggid,passwd) values ('test1','xxx');
-insert into t1 (ggid,passwd) values ('test2','yyy');
--- error ER_DUP_ENTRY
-insert into t1 (ggid,passwd) values ('test2','this will fail');
--- error ER_DUP_ENTRY
-insert into t1 (ggid,id) values ('this will fail',1);
-
-select * from t1 where ggid='test1';
-select * from t1 where passwd='xxx';
-select * from t1 where id=2;
-
-replace into t1 (ggid,id) values ('this will work',1);
-replace into t1 (ggid,passwd) values ('test2','this will work');
--- error ER_DUP_ENTRY
-update t1 set id=100,ggid='test2' where id=1;
-select * from t1;
-select * from t1 where id=1;
-select * from t1 where id=999;
-drop table t1;
-
-#
# ORDER BY on not primary key
#
@@ -754,6 +721,38 @@ select * from t2;
drop table t1,t2;
#
+# Bug #29136 erred multi-delete on trans table does not rollback
+#
+
+# prepare
+--disable_warnings
+drop table if exists t1, t2;
+--enable_warnings
+CREATE TABLE t1 (a int, PRIMARY KEY (a));
+CREATE TABLE t2 (a int, PRIMARY KEY (a)) ENGINE=InnoDB;
+create trigger trg_del_t2 after delete on t2 for each row
+ insert into t1 values (1);
+insert into t1 values (1);
+insert into t2 values (1),(2);
+
+
+# exec cases A, B - see multi_update.test
+
+# A. send_error() w/o send_eof() branch
+
+--error ER_DUP_ENTRY
+delete t2 from t2;
+
+# check
+
+select count(*) from t2 /* must be 2 as restored after rollback caused by the error */;
+
+# cleanup bug#29136
+
+drop table t1, t2;
+
+
+#
# Testing of IFNULL
#
create table t1 (a int, b int) engine=innodb;
@@ -2323,6 +2322,67 @@ CREATE TABLE t1 (
c29 CHAR(255), c30 CHAR(255), c31 CHAR(255), c32 CHAR(255)
) ENGINE = InnoDB;
+#
+# Bug #31860 InnoDB assumes AUTOINC values can only be positive.
+#
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1(
+ id BIGINT(20) NOT NULL AUTO_INCREMENT PRIMARY KEY
+ ) ENGINE=InnoDB;
+INSERT INTO t1 VALUES(-10);
+SELECT * FROM t1;
+#
+# NOTE: The server really needs to be restarted at this point
+# for the test to be useful.
+#
+# Without the fix InnoDB would trip over an assertion here.
+INSERT INTO t1 VALUES(NULL);
+# The next value should be 1 and not -9 or a -ve number
+SELECT * FROM t1;
+DROP TABLE t1;
+
+#
+# Bug #21409 Incorrect result returned when in READ-COMMITTED with
+# query_cache ON
+#
+CONNECT (c1,localhost,root,,);
+CONNECT (c2,localhost,root,,);
+CONNECTION c1;
+SET TX_ISOLATION='read-committed';
+SET AUTOCOMMIT=0;
+DROP TABLE IF EXISTS t1, t2;
+CREATE TABLE t1 ( a int ) ENGINE=InnoDB;
+CREATE TABLE t2 LIKE t1;
+SELECT * FROM t2;
+CONNECTION c2;
+SET TX_ISOLATION='read-committed';
+SET AUTOCOMMIT=0;
+INSERT INTO t1 VALUES (1);
+COMMIT;
+CONNECTION c1;
+SELECT * FROM t1 WHERE a=1;
+DISCONNECT c1;
+DISCONNECT c2;
+CONNECT (c1,localhost,root,,);
+CONNECT (c2,localhost,root,,);
+CONNECTION c1;
+SET TX_ISOLATION='read-committed';
+SET AUTOCOMMIT=0;
+SELECT * FROM t2;
+CONNECTION c2;
+SET TX_ISOLATION='read-committed';
+SET AUTOCOMMIT=0;
+INSERT INTO t1 VALUES (2);
+COMMIT;
+CONNECTION c1;
+# The result set below should be the same for both selects
+SELECT * FROM t1 WHERE a=2;
+SELECT * FROM t1 WHERE a=2;
+DROP TABLE t1;
+DROP TABLE t2;
+DISCONNECT c1;
+DISCONNECT c2;
+
#######################################################################
# #
# Please, DO NOT TOUCH this file as well as the innodb.result file. #
diff --git a/mysql-test/t/innodb_autoinc_lock_mode_zero-master.opt b/mysql-test/t/innodb_autoinc_lock_mode_zero-master.opt
new file mode 100644
index 00000000000..fad0da2ac2e
--- /dev/null
+++ b/mysql-test/t/innodb_autoinc_lock_mode_zero-master.opt
@@ -0,0 +1 @@
+--innodb-autoinc-lock-mode=0
diff --git a/mysql-test/t/innodb_autoinc_lock_mode_zero.test b/mysql-test/t/innodb_autoinc_lock_mode_zero.test
new file mode 100644
index 00000000000..96f748673c0
--- /dev/null
+++ b/mysql-test/t/innodb_autoinc_lock_mode_zero.test
@@ -0,0 +1,44 @@
+# This test runs with old-style locking, as:
+# --innodb-autoinc-lock-mode=0
+
+-- source include/have_innodb.inc
+
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+
+
+#
+# Search on unique key
+#
+
+CREATE TABLE t1 (
+ id int(11) NOT NULL auto_increment,
+ ggid varchar(32) binary DEFAULT '' NOT NULL,
+ email varchar(64) DEFAULT '' NOT NULL,
+ passwd varchar(32) binary DEFAULT '' NOT NULL,
+ PRIMARY KEY (id),
+ UNIQUE ggid (ggid)
+) ENGINE=innodb;
+
+insert into t1 (ggid,passwd) values ('test1','xxx');
+insert into t1 (ggid,passwd) values ('test2','yyy');
+-- error ER_DUP_ENTRY
+insert into t1 (ggid,passwd) values ('test2','this will fail');
+-- error ER_DUP_ENTRY
+insert into t1 (ggid,id) values ('this will fail',1);
+
+select * from t1 where ggid='test1';
+select * from t1 where passwd='xxx';
+select * from t1 where id=2;
+
+replace into t1 (ggid,id) values ('this will work',1);
+replace into t1 (ggid,passwd) values ('test2','this will work');
+-- error ER_DUP_ENTRY
+update t1 set id=100,ggid='test2' where id=1;
+select * from t1;
+select * from t1 where id=1;
+select * from t1 where id=999;
+drop table t1;
+
+--echo End of tests
diff --git a/mysql-test/t/innodb_gis.test b/mysql-test/t/innodb_gis.test
index 9675b6b69dc..1adb14ea482 100644
--- a/mysql-test/t/innodb_gis.test
+++ b/mysql-test/t/innodb_gis.test
@@ -1,6 +1,7 @@
--source include/have_innodb.inc
SET storage_engine=innodb;
--source include/gis_generic.inc
+--source include/gis_keys.inc
#
# Bug #15680 (SPATIAL key in innodb)
diff --git a/mysql-test/t/insert.test b/mysql-test/t/insert.test
index 3d32da9c3b7..c58fb61ad30 100644
--- a/mysql-test/t/insert.test
+++ b/mysql-test/t/insert.test
@@ -387,5 +387,106 @@ SELECT * FROM t2;
DROP TABLE t1, t2;
+#
+# Bug #26788: mysqld (debug) aborts when inserting specific numbers into char
+# fields
+#
+
+CREATE TABLE t1 (
+ a char(20) NOT NULL,
+ b char(7) DEFAULT NULL,
+ c char(4) DEFAULT NULL
+);
+
+INSERT INTO t1(a,b,c) VALUES (9.999999e+0, 9.999999e+0, 9.999e+0);
+INSERT INTO t1(a,b,c) VALUES (1.225e-05, 1.225e-05, 1.225e-05);
+INSERT INTO t1(a,b) VALUES (1.225e-04, 1.225e-04);
+INSERT INTO t1(a,b) VALUES (1.225e-01, 1.225e-01);
+INSERT INTO t1(a,b) VALUES (1.225877e-01, 1.225877e-01);
+INSERT INTO t1(a,b) VALUES (1.225e+01, 1.225e+01);
+INSERT INTO t1(a,b,c) VALUES (1.225e+01, 1.225e+01, 1.225e+01);
+INSERT INTO t1(a,b) VALUES (1.225e+05, 1.225e+05);
+INSERT INTO t1(a,b) VALUES (1.225e+10, 1.225e+10);
+INSERT INTO t1(a,b) VALUES (1.225e+15, 1.225e+15);
+INSERT INTO t1(a,b) VALUES (5000000e+0, 5000000e+0);
+INSERT INTO t1(a,b) VALUES (1.25e+78, 1.25e+78);
+INSERT INTO t1(a,b) VALUES (1.25e-94, 1.25e-94);
+INSERT INTO t1(a,b) VALUES (1.25e+203, 1.25e+203);
+INSERT INTO t1(a,b) VALUES (1.25e-175, 1.25e-175);
+INSERT INTO t1(a,c) VALUES (1.225e+0, 1.225e+0);
+INSERT INTO t1(a,c) VALUES (1.37e+0, 1.37e+0);
+INSERT INTO t1(a,c) VALUES (-1.37e+0, -1.37e+0);
+INSERT INTO t1(a,c) VALUES (1.87e-3, 1.87e-3);
+INSERT INTO t1(a,c) VALUES (-1.87e-2, -1.87e-2);
+INSERT INTO t1(a,c) VALUES (5000e+0, 5000e+0);
+INSERT INTO t1(a,c) VALUES (-5000e+0, -5000e+0);
+# Expected results are "12.2" and "1.2e+78", but Windows returns "12.3" and
+# "1.3e+78" due to different rounding rules
+--replace_result 12.3 12.2 1.3e+78 1.2e+78
+SELECT * FROM t1;
+
+DROP TABLE t1;
+
+CREATE TABLE t1 (
+ a char(20) NOT NULL,
+ b char(7) DEFAULT NULL,
+ c char(5)
+);
+
+
+INSERT INTO t1(a,b,c) VALUES (9.999999e+0, 9.999999e+0, 9.999e+0);
+INSERT INTO t1(a,b,c) VALUES (1.225e-05, 1.225e-05, 1.225e-05);
+INSERT INTO t1(a,b) VALUES (1.225e-04, 1.225e-04);
+INSERT INTO t1(a,b) VALUES (1.225e-01, 1.225e-01);
+INSERT INTO t1(a,b) VALUES (1.225877e-01, 1.225877e-01);
+INSERT INTO t1(a,b) VALUES (1.225e+01, 1.225e+01);
+INSERT INTO t1(a,b,c) VALUES (1.225e+01, 1.225e+01, 1.225e+01);
+INSERT INTO t1(a,b) VALUES (1.225e+05, 1.225e+05);
+INSERT INTO t1(a,b) VALUES (1.225e+10, 1.225e+10);
+INSERT INTO t1(a,b) VALUES (1.225e+15, 1.225e+15);
+INSERT INTO t1(a,b) VALUES (5000000e+0, 5000000e+0);
+INSERT INTO t1(a,b) VALUES (1.25e+78, 1.25e+78);
+INSERT INTO t1(a,b) VALUES (1.25e-94, 1.25e-94);
+INSERT INTO t1(a,b) VALUES (1.25e+203, 1.25e+203);
+INSERT INTO t1(a,b) VALUES (1.25e-175, 1.25e-175);
+INSERT INTO t1(a,c) VALUES (1.225e+0, 1.225e+0);
+INSERT INTO t1(a,c) VALUES (1.37e+0, 1.37e+0);
+INSERT INTO t1(a,c) VALUES (-1.37e+0, -1.37e+0);
+INSERT INTO t1(a,c) VALUES (1.87e-3, 1.87e-3);
+INSERT INTO t1(a,c) VALUES (-1.87e-2, -1.87e-2);
+INSERT INTO t1(a,c) VALUES (5000e+0, 5000e+0);
+INSERT INTO t1(a,c) VALUES (-5000e+0, -5000e+0);
+
+# Expected results are "12.2" and "1.2e+78", but Windows returns "12.3" and
+# "1.3e+78" due to different rounding rules
+--replace_result 12.3 12.2 1.3e+78 1.2e+78
+SELECT * FROM t1;
+
+DROP TABLE t1;
+
+#
+# Bug #31152: assertion in Field_str::store(double)
+#
+
+CREATE TABLE t (a CHAR(10),b INT);
+INSERT INTO t VALUES (),(),();
+INSERT INTO t(a) SELECT rand() FROM t;
+DROP TABLE t;
+
+#
+# Bug #30453: String not cast to int correctly
+#
+
+CREATE TABLE t1 (c1 INT NOT NULL);
+INSERT INTO t1 VALUES(4188.32999999999992724042385816574096679687500),
+('4188.32999999999992724042385816574096679687500'), (4188);
+SELECT * FROM t1;
+
+CREATE TABLE t2 (c1 BIGINT);
+INSERT INTO t2 VALUES('15449237462.0000000000');
+SELECT * FROM t2;
+
+DROP TABLE t1, t2;
+
--echo End of 5.0 tests.
diff --git a/mysql-test/t/insert_select.test b/mysql-test/t/insert_select.test
index ace51ef61c7..499db086877 100644
--- a/mysql-test/t/insert_select.test
+++ b/mysql-test/t/insert_select.test
@@ -372,3 +372,15 @@ INSERT INTO t1 (prev_id) SELECT id
SELECT * FROM t1;
DROP TABLE t1,t2;
+
+--echo #
+--echo # Bug#30384: Having SQL_BUFFER_RESULT option in the
+--echo # CREATE .. KEY(..) .. SELECT led to creating corrupted index.
+--echo #
+create table t1(f1 int);
+insert into t1 values(1),(2),(3);
+create table t2 (key(f1)) engine=myisam select sql_buffer_result f1 from t1;
+check table t2 extended;
+drop table t1,t2;
+--echo ##################################################################
+
diff --git a/mysql-test/t/join.test b/mysql-test/t/join.test
index 14c98431970..ed1b84bb5ec 100644
--- a/mysql-test/t/join.test
+++ b/mysql-test/t/join.test
@@ -698,4 +698,33 @@ select '^^: The above should be ~= 20 + cost(select * from t1). Value less than
drop table t1, t2;
+#
+# Bug #31094: Forcing index-based sort doesn't work anymore if joins are
+# done
+#
+
+CREATE TABLE t1 (a INT PRIMARY KEY, b INT);
+CREATE TABLE t2 (c INT PRIMARY KEY, d INT);
+
+INSERT INTO t1 VALUES(1,NULL),(2,NULL),(3,NULL),(4,NULL);
+INSERT INTO t1 SELECT a + 4, b FROM t1;
+INSERT INTO t1 SELECT a + 8, b FROM t1;
+INSERT INTO t1 SELECT a + 16, b FROM t1;
+INSERT INTO t1 SELECT a + 32, b FROM t1;
+INSERT INTO t1 SELECT a + 64, b FROM t1;
+INSERT INTO t2 SELECT a, b FROM t1;
+
+#expect indexed ORDER BY
+EXPLAIN SELECT * FROM t1 JOIN t2 ON b=c ORDER BY a LIMIT 2;
+EXPLAIN SELECT * FROM t1 JOIN t2 ON a=c ORDER BY a LIMIT 2;
+SELECT * FROM t1 JOIN t2 ON b=c ORDER BY a LIMIT 2;
+SELECT * FROM t1 JOIN t2 ON a=c ORDER BY a LIMIT 2;
+
+#expect filesort
+EXPLAIN SELECT * FROM t1 JOIN t2 ON b=c ORDER BY a;
+EXPLAIN SELECT * FROM t1 JOIN t2 ON a=c ORDER BY a;
+SELECT * FROM t1 JOIN t2 ON b=c ORDER BY a;
+SELECT * FROM t1 JOIN t2 ON a=c ORDER BY a;
+
+DROP TABLE IF EXISTS t1,t2;
--echo End of 5.0 tests.
diff --git a/mysql-test/t/key.test b/mysql-test/t/key.test
index f1eb8e68b49..9a4158d8e13 100644
--- a/mysql-test/t/key.test
+++ b/mysql-test/t/key.test
@@ -501,3 +501,63 @@ ORDER BY c.b, c.d
;
DROP TABLE t1, t2;
+
+#
+# Bug #31137: Assertion failed: primary_key_no == -1 || primary_key_no == 0
+#
+create table t1(a int not null, key aa(a),
+ b char(10) not null, unique key bb(b(1)),
+ c char(4) not null, unique key cc(c));
+desc t1;
+show create table t1;
+drop table t1;
+create table t1(a int not null, key aa(a),
+ b char(10) not null, unique key bb(b(1)),
+ c char(4) not null);
+desc t1;
+alter table t1 add unique key cc(c);
+desc t1;
+show create table t1;
+drop table t1;
+
+--echo End of 5.0 tests
+
+#
+# Bug #31148: bool close_thread_table(THD*, TABLE**): Assertion
+# `table->key_read == 0' failed.
+#
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+CREATE TABLE t1 (a INT PRIMARY KEY AUTO_INCREMENT);
+
+INSERT INTO t1 VALUES (), (), ();
+
+SELECT 1 AS c1
+FROM t1
+ORDER BY (
+ SELECT 1 AS c2
+ FROM t1
+ GROUP BY GREATEST(LAST_INSERT_ID(), t1.a) ASC
+ LIMIT 1);
+
+DROP TABLE t1;
+
+
+#
+# Bug #31974: Wrong EXPLAIN output
+#
+
+CREATE TABLE t1 (a INT, b INT, INDEX (a,b));
+INSERT INTO t1 (a, b)
+ VALUES
+ (1,1), (1,2), (1,3), (1,4), (1,5),
+ (2,2), (2,3), (2,1), (3,1), (4,1), (4,2), (4,3), (4,4), (4,5), (4,6);
+EXPLAIN SELECT 1 FROM t1 AS t1_outer WHERE
+ (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2) > 12;
+SELECT 1 as RES FROM t1 AS t1_outer WHERE
+ (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2) > 12;
+
+DROP TABLE t1;
diff --git a/mysql-test/t/kill.test b/mysql-test/t/kill.test
index 5d5095f7d61..3da4232502d 100644
--- a/mysql-test/t/kill.test
+++ b/mysql-test/t/kill.test
@@ -304,3 +304,21 @@ while ($i)
dec $i ;
}
--enable_query_log
+
+###########################################################################
+
+--echo #
+--echo # Bug#19723: kill of active connection yields different error code
+--echo # depending on platform.
+--echo #
+
+--echo
+--echo # Connection: con2.
+--connection con2
+
+KILL CONNECTION_ID();
+
+--echo # CR_SERVER_LOST, CR_SERVER_GONE_ERROR, depending on the timing
+--echo # of close of the connection socket
+--error 2013, 2006
+SELECT 1;
diff --git a/mysql-test/t/log_state.test b/mysql-test/t/log_state.test
index c67da261ef1..a340238b724 100644
--- a/mysql-test/t/log_state.test
+++ b/mysql-test/t/log_state.test
@@ -179,6 +179,60 @@ SET GLOBAL READ_ONLY = OFF;
SET GLOBAL general_log = @old_general_log_state;
SET GLOBAL slow_query_log = @old_slow_log_state;
+#
+# Bug #29131: SHOW VARIABLES reports variable 'log' but SET doesn't recognize it
+#
+
+SET @old_general_log_state = @@global.general_log;
+SET @old_slow_log_state = @@global.slow_query_log;
+
+SHOW VARIABLES LIKE 'general_log';
+SHOW VARIABLES LIKE 'log';
+SELECT @@general_log, @@log;
+SET GLOBAL log = 0;
+SHOW VARIABLES LIKE 'general_log';
+SHOW VARIABLES LIKE 'log';
+SELECT @@general_log, @@log;
+SET GLOBAL general_log = 1;
+SHOW VARIABLES LIKE 'general_log';
+SHOW VARIABLES LIKE 'log';
+SELECT @@general_log, @@log;
+
+SHOW VARIABLES LIKE 'slow_query_log';
+SHOW VARIABLES LIKE 'log_slow_queries';
+SELECT @@slow_query_log, @@log_slow_queries;
+SET GLOBAL log_slow_queries = 0;
+SHOW VARIABLES LIKE 'slow_query_log';
+SHOW VARIABLES LIKE 'log_slow_queries';
+SELECT @@slow_query_log, @@log_slow_queries;
+SET GLOBAL slow_query_log = 1;
+SHOW VARIABLES LIKE 'slow_query_log';
+SHOW VARIABLES LIKE 'log_slow_queries';
+SELECT @@slow_query_log, @@log_slow_queries;
+
+SET GLOBAL general_log = @old_general_log_state;
+SET GLOBAL slow_query_log = @old_slow_log_state;
+
+#
+# Bug #31604: server crash when setting slow_query_log_file/general_log_file
+#
+set @old_general_log_file= @@global.general_log_file;
+set @old_slow_query_log_file= @@global.slow_query_log_file;
+
+--error 1231
+set global general_log_file= concat('/not exiting path/log.maste', 'r');
+--error 1231
+set global general_log_file= NULL;
+--error 1231
+set global slow_query_log_file= concat('/not exiting path/log.maste', 'r');
+--error 1231
+set global slow_query_log_file= NULL;
+
+set global general_log_file= @old_general_log_file;
+set global slow_query_log_file= @old_slow_query_log_file;
+
+--echo End of 5.1 tests
+
--enable_ps_protocol
#
diff --git a/mysql-test/t/log_tables.test b/mysql-test/t/log_tables.test
index 89c7c255554..0c986c6d63a 100644
--- a/mysql-test/t/log_tables.test
+++ b/mysql-test/t/log_tables.test
@@ -253,11 +253,11 @@ use mysql;
CREATE TABLE `general_log` (
`event_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
ON UPDATE CURRENT_TIMESTAMP,
- `user_host` mediumtext,
- `thread_id` int(11) DEFAULT NULL,
- `server_id` int(11) DEFAULT NULL,
- `command_type` varchar(64) DEFAULT NULL,
- `argument` mediumtext
+ `user_host` mediumtext NOT NULL,
+ `thread_id` int(11) NOT NULL,
+ `server_id` int(11) NOT NULL,
+ `command_type` varchar(64) NOT NULL,
+ `argument` mediumtext NOT NULL
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='General log';
CREATE TABLE `slow_log` (
@@ -268,10 +268,10 @@ CREATE TABLE `slow_log` (
`lock_time` time NOT NULL,
`rows_sent` int(11) NOT NULL,
`rows_examined` int(11) NOT NULL,
- `db` varchar(512) DEFAULT NULL,
- `last_insert_id` int(11) DEFAULT NULL,
- `insert_id` int(11) DEFAULT NULL,
- `server_id` int(11) DEFAULT NULL,
+ `db` varchar(512) NOT NULL,
+ `last_insert_id` int(11) NOT NULL,
+ `insert_id` int(11) NOT NULL,
+ `server_id` int(11) NOT NULL,
`sql_text` mediumtext NOT NULL
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log';
@@ -295,6 +295,13 @@ unlock tables;
# Bug #21785 Server crashes after rename of the log table
#
+--disable_warnings
+drop table if exists mysql.renamed_general_log;
+drop table if exists mysql.renamed_slow_log;
+drop table if exists mysql.general_log_new;
+drop table if exists mysql.slow_log_new;
+--enable_warnings
+
use mysql;
# Should result in error
--error ER_CANT_RENAME_LOG_TABLE
@@ -359,6 +366,55 @@ drop table renamed_general_log, renamed_slow_log;
use test;
#
+# Bug#27858 (Failing to log to a log table doesn't log anything to error log)
+#
+# This test works as expected, it's a negative test.
+# The message "[ERROR] Failed to write to mysql.general_log"
+# is printed to master.err when writing to the table mysql.general_log
+# failed.
+# However, this message is picked up by mysql-test-run.pl,
+# and reported as a test failure, which is a false negative.
+# There is no current way to *selectively* filter out these expected error conditions
+# (see mysql-test/lib/mtr_report.pl, mtr_report_stats()).
+# Instead of filtering all occurences of "Failed to write to
+# mysql.general_log", which could hide bugs when the error is not expected,
+# this test case is commented instead.
+# TODO: improve filtering of expected errors in master.err in
+# mysql-test-run.pl (based on the test name ?), and uncomment this test.
+
+# --disable_warnings
+# drop table if exists mysql.bad_general_log;
+# drop table if exists mysql.bad_slow_log;
+# drop table if exists mysql.general_log_hide;
+# drop table if exists mysql.slow_log_hide;
+# --enable_warnings
+#
+# create table mysql.bad_general_log (a int) engine= CSV;
+# create table mysql.bad_slow_log (a int) engine= CSV;
+#
+# # Rename does not perform checks on the table structure,
+# # exploiting this to force a failure to log
+# rename table mysql.general_log to mysql.general_log_hide, mysql.bad_general_log TO mysql.general_log;
+# rename table mysql.slow_log to mysql.slow_log_hide, mysql.bad_slow_log TO mysql.slow_log;
+#
+# # The following message should be printed in master.log:
+# # [ERROR] Failed to write to mysql.general_log
+# # TODO: See how verifying this could be automated
+#
+# flush tables;
+# select "logging this should fail";
+#
+# # Restore the log tables
+#
+# rename table mysql.general_log to mysql.bad_general_log, mysql.general_log_hide TO mysql.general_log;
+# rename table mysql.slow_log to mysql.bad_slow_log, mysql.slow_log_hide TO mysql.slow_log;
+#
+# flush tables;
+#
+# drop table mysql.bad_general_log;
+# drop table mysql.bad_slow_log;
+
+#
# Bug #21966 Strange warnings on repair of the log tables
#
@@ -751,3 +807,152 @@ DROP DATABASE IF EXISTS `db_17876`;
SET GLOBAL general_log = @old_general_log_state;
SET GLOBAL slow_query_log = @old_slow_log_state;
+#
+# Bug#21557 entries in the general query log truncated at 1000 characters.
+#
+
+select CONNECTION_ID() into @thread_id;
+truncate table mysql.general_log;
+set @old_general_log_state = @@global.general_log;
+set global general_log = on;
+--disable_result_log
+set @lparam = "000 001 002 003 004 005 006 007 008 009"
+ "010 011 012 013 014 015 016 017 018 019"
+ "020 021 022 023 024 025 026 027 028 029"
+ "030 031 032 033 034 035 036 037 038 039"
+ "040 041 042 043 044 045 046 047 048 049"
+ "050 051 052 053 054 055 056 057 058 059"
+ "060 061 062 063 064 065 066 067 068 069"
+ "070 071 072 073 074 075 076 077 078 079"
+ "080 081 082 083 084 085 086 087 088 089"
+ "090 091 092 093 094 095 096 097 098 099"
+ "100 101 102 103 104 105 106 107 108 109"
+ "110 111 112 113 114 115 116 117 118 119"
+ "120 121 122 123 124 125 126 127 128 129"
+ "130 131 132 133 134 135 136 137 138 139"
+ "140 141 142 143 144 145 146 147 148 149"
+ "150 151 152 153 154 155 156 157 158 159"
+ "160 161 162 163 164 165 166 167 168 169"
+ "170 171 172 173 174 175 176 177 178 179"
+ "180 181 182 183 184 185 186 187 188 189"
+ "190 191 192 193 194 195 196 197 198 199"
+ "200 201 202 203 204 205 206 207 208 209"
+ "210 211 212 213 214 215 216 217 218 219"
+ "220 221 222 223 224 225 226 227 228 229"
+ "230 231 232 233 234 235 236 237 238 239"
+ "240 241 242 243 244 245 246 247 248 249"
+ "250 251 252 253 254 255 256 257 258 259"
+ "260 261 262 263 264 265 266 267 268 269"
+ "270 271 272 273 274 275 276 277 278 279"
+ "280 281 282 283 284 285 286 287 288 289"
+ "290 291 292 293 294 295 296 297 298 299"
+ "300 301 302 303 304 305 306 307 308 309"
+ "310 311 312 313 314 315 316 317 318 319"
+ "320 321 322 323 324 325 326 327 328 329"
+ "330 331 332 333 334 335 336 337 338 339"
+ "340 341 342 343 344 345 346 347 348 349"
+ "350 351 352 353 354 355 356 357 358 359"
+ "360 361 362 363 364 365 366 367 368 369"
+ "370 371 372 373 374 375 376 377 378 379"
+ "380 381 382 383 384 385 386 387 388 389"
+ "390 391 392 393 394 395 396 397 398 399"
+ "400 401 402 403 404 405 406 407 408 409"
+ "410 411 412 413 414 415 416 417 418 419"
+ "420 421 422 423 424 425 426 427 428 429"
+ "430 431 432 433 434 435 436 437 438 439"
+ "440 441 442 443 444 445 446 447 448 449"
+ "450 451 452 453 454 455 456 457 458 459"
+ "460 461 462 463 464 465 466 467 468 469"
+ "470 471 472 473 474 475 476 477 478 479"
+ "480 481 482 483 484 485 486 487 488 489"
+ "490 491 492 493 494 495 496 497 498 499"
+ "500 501 502 503 504 505 506 507 508 509"
+ "510 511 512 513 514 515 516 517 518 519"
+ "520 521 522 523 524 525 526 527 528 529"
+ "530 531 532 533 534 535 536 537 538 539"
+ "540 541 542 543 544 545 546 547 548 549"
+ "550 551 552 553 554 555 556 557 558 559"
+ "560 561 562 563 564 565 566 567 568 569"
+ "570 571 572 573 574 575 576 577 578 579"
+ "580 581 582 583 584 585 586 587 588 589"
+ "590 591 592 593 594 595 596 597 598 599"
+ "600 601 602 603 604 605 606 607 608 609"
+ "610 611 612 613 614 615 616 617 618 619"
+ "620 621 622 623 624 625 626 627 628 629"
+ "630 631 632 633 634 635 636 637 638 639"
+ "640 641 642 643 644 645 646 647 648 649"
+ "650 651 652 653 654 655 656 657 658 659"
+ "660 661 662 663 664 665 666 667 668 669"
+ "670 671 672 673 674 675 676 677 678 679"
+ "680 681 682 683 684 685 686 687 688 689"
+ "690 691 692 693 694 695 696 697 698 699"
+ "700 701 702 703 704 705 706 707 708 709"
+ "710 711 712 713 714 715 716 717 718 719"
+ "720 721 722 723 724 725 726 727 728 729"
+ "730 731 732 733 734 735 736 737 738 739"
+ "740 741 742 743 744 745 746 747 748 749"
+ "750 751 752 753 754 755 756 757 758 759"
+ "760 761 762 763 764 765 766 767 768 769"
+ "770 771 772 773 774 775 776 777 778 779"
+ "780 781 782 783 784 785 786 787 788 789"
+ "790 791 792 793 794 795 796 797 798 799"
+ "800 801 802 803 804 805 806 807 808 809"
+ "810 811 812 813 814 815 816 817 818 819"
+ "820 821 822 823 824 825 826 827 828 829"
+ "830 831 832 833 834 835 836 837 838 839"
+ "840 841 842 843 844 845 846 847 848 849"
+ "850 851 852 853 854 855 856 857 858 859"
+ "860 861 862 863 864 865 866 867 868 869"
+ "870 871 872 873 874 875 876 877 878 879"
+ "880 881 882 883 884 885 886 887 888 889"
+ "890 891 892 893 894 895 896 897 898 899"
+ "900 901 902 903 904 905 906 907 908 909"
+ "910 911 912 913 914 915 916 917 918 919"
+ "920 921 922 923 924 925 926 927 928 929"
+ "930 931 932 933 934 935 936 937 938 939"
+ "940 941 942 943 944 945 946 947 948 949"
+ "950 951 952 953 954 955 956 957 958 959"
+ "960 961 962 963 964 965 966 967 968 969"
+ "970 971 972 973 974 975 976 977 978 979"
+ "980 981 982 983 984 985 986 987 988 989"
+ "990 991 992 993 994 995 996 997 998 999";
+--enable_result_log
+prepare long_query from "select ? as long_query";
+--disable_result_log
+execute long_query using @lparam;
+--enable_result_log
+set global general_log = off;
+select command_type, argument from mysql.general_log where thread_id = @thread_id;
+deallocate prepare long_query;
+set global general_log = @old_general_log_state;
+
+#
+# Bug #31700: thd->examined_row_count not incremented for 'const' type queries
+#
+SET @old_slow_log_state = @@global.slow_query_log;
+
+SET SESSION long_query_time = 0;
+SET GLOBAL slow_query_log = ON;
+FLUSH LOGS;
+TRUNCATE TABLE mysql.slow_log;
+
+# Let there be three columns, unique, non-unique, and non-indexed:
+CREATE TABLE t1 (f1 SERIAL,f2 INT, f3 INT, PRIMARY KEY(f1), KEY(f2));
+INSERT INTO t1 VALUES (1,1,1);
+INSERT INTO t1 VALUES (2,2,2);
+INSERT INTO t1 VALUES (3,3,3);
+INSERT INTO t1 VALUES (4,4,4);
+
+SELECT SQL_NO_CACHE 'Bug#31700 - SCAN',f1,f2,f3,SLEEP(1.1) FROM t1 WHERE f3=4;
+SELECT SQL_NO_CACHE 'Bug#31700 - KEY', f1,f2,f3,SLEEP(1.1) FROM t1 WHERE f2=3;
+SELECT SQL_NO_CACHE 'Bug#31700 - PK', f1,f2,f3,SLEEP(1.1) FROM t1 WHERE f1=2;
+
+--replace_column 1 TIMESTAMP
+SELECT start_time, rows_examined, rows_sent, sql_text FROM mysql.slow_log WHERE sql_text LIKE '%Bug#31700%' ORDER BY start_time;
+
+DROP TABLE t1;
+
+TRUNCATE TABLE mysql.slow_log;
+
+SET GLOBAL slow_query_log = @old_slow_log_state;
+SET SESSION long_query_time =@old_long_query_time;
diff --git a/mysql-test/t/lowercase_view.test b/mysql-test/t/lowercase_view.test
index e9cc26bec18..d6612b3e6b9 100644
--- a/mysql-test/t/lowercase_view.test
+++ b/mysql-test/t/lowercase_view.test
@@ -138,3 +138,26 @@ create view v1Aa as select AaA.col1 from t1Aa as AaA;
show create view v1AA;
drop view v1AA;
drop table t1Aa;
+
+
+#
+# Bug #31562: HAVING and lower case
+#
+
+CREATE TABLE t1 (a int, b int);
+
+select X.a from t1 AS X group by X.b having (X.a = 1);
+select X.a from t1 AS X group by X.b having (x.a = 1);
+select X.a from t1 AS X group by X.b having (x.b = 1);
+
+CREATE OR REPLACE VIEW v1 AS
+select X.a from t1 AS X group by X.b having (X.a = 1);
+
+SHOW CREATE VIEW v1;
+
+SELECT * FROM v1;
+
+DROP VIEW v1;
+DROP TABLE t1;
+
+--echo End of 5.0 tests.
diff --git a/mysql-test/t/merge-big.test b/mysql-test/t/merge-big.test
new file mode 100644
index 00000000000..eddcbb59ed4
--- /dev/null
+++ b/mysql-test/t/merge-big.test
@@ -0,0 +1,150 @@
+#
+# Test of MERGE tables with multisession and many waits.
+#
+# This test takes rather long time so let us run it only in --big-test mode
+--source include/big_test.inc
+# We are using some debug-only features in this test
+--source include/have_debug.inc
+
+--disable_warnings
+drop table if exists t1,t2,t3,t4,t5,t6;
+--enable_warnings
+
+--echo #
+--echo # Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE
+--echo # corrupts a MERGE table
+--echo # Problem #3
+--echo #
+# Two FLUSH TABLES within a LOCK TABLES segment could invalidate the lock.
+# This did *not* require a MERGE table.
+#
+# To increase reproducibility it was necessary to enter a sleep of 2
+# seconds at the end of wait_for_tables() after unlock of LOCK_open. In
+# 5.0 and 5.1 the sleep must be inserted in open_and_lock_tables() after
+# open_tables() instead. wait_for_tables() is not used in this case. The
+# problem was that FLUSH TABLES releases LOCK_open while having unlocked
+# and closed all tables. When this happened while a thread was in the
+# loop in mysql_lock_tables() right after wait_for_tables()
+# (open_tables()) and before retrying to lock, the thread got the lock.
+# And it did not notice that the table needed a refresh after the
+# [re-]open. So it executed its statement on the table.
+#
+# The first FLUSH TABLES kicked the INSERT out of thr_multi_lock() and
+# let it wait in wait_for_tables() (open_table()). The second FLUSH
+# TABLES must happen while the INSERT was on its way from
+# wait_for_tables() (open_table()) to the next call of thr_multi_lock().
+# This needed to be supported by a sleep to make it repeatable.
+#
+CREATE TABLE t1 (c1 INT) ENGINE= MyISAM;
+LOCK TABLE t1 WRITE;
+#SELECT NOW();
+ --echo # connection con1
+ connect (con1,localhost,root,,);
+ let $con1_id= `SELECT CONNECTION_ID()`;
+ SET SESSION debug="+d,sleep_open_and_lock_after_open";
+ send INSERT INTO t1 VALUES (1);
+--echo # connection default
+connection default;
+--echo # Let INSERT go into thr_multi_lock().
+let $wait_condition= SELECT 1 FROM INFORMATION_SCHEMA.PROCESSLIST
+ WHERE ID = $con1_id AND STATE = 'Locked';
+--source include/wait_condition.inc
+#SELECT NOW();
+--echo # Kick INSERT out of thr_multi_lock().
+FLUSH TABLES;
+#SELECT NOW();
+--echo # Let INSERT go through open_tables() where it sleeps.
+let $wait_condition= SELECT 1 FROM INFORMATION_SCHEMA.PROCESSLIST
+ WHERE ID = $con1_id AND STATE = 'DBUG sleep';
+--source include/wait_condition.inc
+#SELECT NOW();
+--echo # Unlock and close table and wait for con1 to close too.
+FLUSH TABLES;
+#SELECT NOW();
+--echo # This should give no result.
+SELECT * FROM t1;
+#SELECT NOW();
+UNLOCK TABLES;
+ --echo # connection con1
+ connection con1;
+ reap;
+ SET SESSION debug="-d,sleep_open_and_lock_after_open";
+ disconnect con1;
+--echo # connection default
+connection default;
+DROP TABLE t1;
+
+--echo #
+--echo # Extra tests for Bug#26379 - Combination of FLUSH TABLE and
+--echo # REPAIR TABLE corrupts a MERGE table
+--echo #
+CREATE TABLE t1 (c1 INT);
+CREATE TABLE t2 (c1 INT);
+CREATE TABLE t3 (c1 INT);
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (2);
+INSERT INTO t3 VALUES (3);
+--echo #
+--echo # CREATE ... SELECT
+--echo # try to access parent from another thread.
+--echo #
+#SELECT NOW();
+ --echo # connection con1
+ connect (con1,localhost,root,,);
+ let $con1_id= `SELECT CONNECTION_ID()`;
+ SET SESSION debug="+d,sleep_create_select_before_lock";
+ send CREATE TABLE t4 (c1 INT) ENGINE=MRG_MYISAM UNION=(t1,t2)
+ INSERT_METHOD=FIRST SELECT * FROM t3;
+--echo # connection default
+connection default;
+# wait for the other query to start executing
+let $wait_condition= SELECT 1 FROM INFORMATION_SCHEMA.PROCESSLIST
+ WHERE ID = $con1_id AND STATE = 'DBUG sleep';
+--source include/wait_condition.inc
+#SELECT NOW();
+--echo # Now try to access the parent.
+--echo # If 3 is in table, SELECT had to wait.
+SELECT * FROM t4 ORDER BY c1;
+#SELECT NOW();
+ --echo # connection con1
+ connection con1;
+ reap;
+ #SELECT NOW();
+ SET SESSION debug="-d,sleep_create_select_before_lock";
+ disconnect con1;
+--echo # connection default
+connection default;
+--echo # Cleanup for next test.
+DROP TABLE t4;
+DELETE FROM t1 WHERE c1 != 1;
+--echo #
+--echo # CREATE ... SELECT
+--echo # try to access child from another thread.
+--echo #
+#SELECT NOW();
+ --echo # connection con1
+ connect (con1,localhost,root,,);
+ let $con1_id= `SELECT CONNECTION_ID()`;
+ SET SESSION debug="+d,sleep_create_select_before_lock";
+ send CREATE TABLE t4 (c1 INT) ENGINE=MRG_MYISAM UNION=(t1,t2)
+ INSERT_METHOD=FIRST SELECT * FROM t3;
+--echo # connection default
+connection default;
+# wait for the other query to start executing
+let $wait_condition= SELECT 1 FROM INFORMATION_SCHEMA.PROCESSLIST
+ WHERE ID = $con1_id AND STATE = 'DBUG sleep';
+--source include/wait_condition.inc
+#SELECT NOW();
+--echo # Now try to access a child.
+--echo # If 3 is in table, SELECT had to wait.
+SELECT * FROM t1 ORDER BY c1;
+#SELECT NOW();
+ --echo # connection con1
+ connection con1;
+ reap;
+ #SELECT NOW();
+ SET SESSION debug="-d,sleep_create_select_before_lock";
+ disconnect con1;
+--echo # connection default
+connection default;
+DROP TABLE t1, t2, t3, t4;
diff --git a/mysql-test/t/merge.test b/mysql-test/t/merge.test
index 91bf247c469..679a60ab8e1 100644
--- a/mysql-test/t/merge.test
+++ b/mysql-test/t/merge.test
@@ -1,5 +1,5 @@
#
-# test of MERGE TABLES
+# Test of MERGE TABLES
#
# MERGE tables require MyISAM tables
@@ -226,6 +226,7 @@ create table t2 (a int not null);
insert into t1 values (1);
insert into t2 values (2);
create temporary table t3 (a int not null) ENGINE=MERGE UNION=(t1,t2);
+--error ER_WRONG_MRG_TABLE
select * from t3;
create temporary table t4 (a int not null);
create temporary table t5 (a int not null);
@@ -234,6 +235,58 @@ insert into t5 values (2);
create temporary table t6 (a int not null) ENGINE=MERGE UNION=(t4,t5);
select * from t6;
drop table t6, t3, t1, t2, t4, t5;
+#
+# Bug#19627 - temporary merge table locking
+# MERGE table and its children must match in temporary type.
+# Forbid temporary merge on non-temporary children: shown above.
+# Forbid non-temporary merge on temporary children:
+create temporary table t1 (a int not null);
+create temporary table t2 (a int not null);
+insert into t1 values (1);
+insert into t2 values (2);
+create table t3 (a int not null) ENGINE=MERGE UNION=(t1,t2);
+--error ER_WRONG_MRG_TABLE
+select * from t3;
+drop table t3, t2, t1;
+# Forbid children mismatch in temporary:
+create table t1 (a int not null);
+create temporary table t2 (a int not null);
+insert into t1 values (1);
+insert into t2 values (2);
+create table t3 (a int not null) ENGINE=MERGE UNION=(t1,t2);
+--error ER_WRONG_MRG_TABLE
+select * from t3;
+drop table t3;
+create temporary table t3 (a int not null) ENGINE=MERGE UNION=(t1,t2);
+--error ER_WRONG_MRG_TABLE
+select * from t3;
+drop table t3, t2, t1;
+--echo # CREATE...SELECT is not implemented for MERGE tables.
+CREATE TEMPORARY TABLE t1 (c1 INT NOT NULL);
+CREATE TEMPORARY TABLE t2 (c1 INT NOT NULL);
+CREATE TABLE t3 (c1 INT NOT NULL);
+INSERT INTO t3 VALUES (3), (33);
+LOCK TABLES t3 READ;
+--error ER_WRONG_OBJECT
+CREATE TEMPORARY TABLE t4 (c1 INT NOT NULL) ENGINE=MERGE UNION=(t1,t2)
+ INSERT_METHOD=LAST SELECT * FROM t3;
+--error ER_TABLE_NOT_LOCKED
+SELECT * FROM t4;
+UNLOCK TABLES;
+CREATE TEMPORARY TABLE t4 (c1 INT NOT NULL) ENGINE=MERGE UNION=(t1,t2)
+ INSERT_METHOD=LAST;
+INSERT INTO t4 SELECT * FROM t3;
+--echo # Alter temporary MERGE table.
+ALTER TABLE t4 UNION=(t1);
+LOCK TABLES t4 WRITE;
+--echo # Alter temporary MERGE table under LOCk tables.
+ALTER TABLE t4 UNION=(t1,t2);
+UNLOCK TABLES;
+--echo # MERGE table and function.
+CREATE FUNCTION f1 () RETURNS INT RETURN (SELECT max(c1) FROM t3);
+SELECT * FROM t4 WHERE c1 < f1();
+DROP FUNCTION f1;
+DROP TABLE t4, t3, t2, t1;
#
# testing merge::records_in_range and optimizer
@@ -289,11 +342,11 @@ create table t1 (a int);
create table t2 (a int);
insert into t1 values (0);
insert into t2 values (1);
---error 1093
+--error ER_WRONG_OBJECT
create table t3 engine=merge union=(t1, t2) select * from t1;
---error 1093
+--error ER_WRONG_OBJECT
create table t3 engine=merge union=(t1, t2) select * from t2;
---error 1093
+--error ER_WRONG_OBJECT
create table t3 engine=merge union=(t1, t2) select (select max(a) from t2);
drop table t1, t2;
@@ -408,7 +461,7 @@ CREATE TABLE t2(a INT) ENGINE=MERGE UNION=(t1);
SELECT * FROM t2;
DROP TABLE t1, t2;
CREATE TABLE t2(a INT) ENGINE=MERGE UNION=(t3);
---error 1168
+--error ER_NO_SUCH_TABLE
SELECT * FROM t2;
DROP TABLE t2;
@@ -500,11 +553,11 @@ drop table t1;
# CREATE TABLE fails
#
CREATE TABLE tm1(a INT) ENGINE=MERGE UNION=(t1, t2);
---error 1168
+--error ER_NO_SUCH_TABLE
SELECT * FROM tm1;
CHECK TABLE tm1;
CREATE TABLE t1(a INT);
---error 1168
+--error ER_NO_SUCH_TABLE
SELECT * FROM tm1;
CHECK TABLE tm1;
CREATE TABLE t2(a BLOB);
@@ -516,8 +569,823 @@ SELECT * FROM tm1;
CHECK TABLE tm1;
DROP TABLE tm1, t1, t2;
+#
+# Bug#15522 - create ... select and with merge tables
+#
+# This was fixed together with Bug#20662 (Infinite loop in CREATE TABLE
+# IF NOT EXISTS ... SELECT with locked tables).
+# The new behavior for MERGE tables is consistent with the
+# CREATE TABLE SELECT behavior for ordinary tables.
+#
+CREATE TABLE t1(c1 INT);
+CREATE TABLE t2 (c1 INT) ENGINE=MERGE UNION=(t1) INSERT_METHOD=FIRST;
+--error ER_UPDATE_TABLE_USED
+CREATE TABLE IF NOT EXISTS t1 SELECT * FROM t2;
+DROP TABLE t1, t2;
+
+#
+# Bug #28837: MyISAM storage engine error (134) doing delete with self-join
+#
+
+CREATE TABLE t1 (id INT NOT NULL, ref INT NOT NULL, INDEX (id)) ENGINE=MyISAM;
+CREATE TABLE t2 LIKE t1;
+
+INSERT INTO t2 (id, ref) VALUES (1,3), (2,1), (3,2), (4,5), (4,4);
+INSERT INTO t1 SELECT * FROM t2;
+INSERT INTO t1 SELECT * FROM t2;
+
+CREATE TABLE t3 (id INT NOT NULL, ref INT NOT NULL, INDEX (id)) ENGINE=MERGE
+ UNION(t1);
+
+SELECT * FROM t3 AS a INNER JOIN t3 AS b USING (id) WHERE a.ref < b.ref;
+SELECT * FROM t3;
+DELETE FROM a USING t3 AS a INNER JOIN t3 AS b USING (id) WHERE a.ref < b.ref;
+SELECT * FROM t3;
+
+DROP TABLE t1, t2, t3;
+
--echo End of 5.0 tests
+
+#
+# Bug #8306: TRUNCATE leads to index corruption
+#
+create table t1 (c1 int, index(c1));
+create table t2 (c1 int, index(c1)) engine=merge union=(t1);
+insert into t1 values (1);
+# Close all tables.
+flush tables;
+# Open t2 and (implicitly) t1.
+select * from t2;
+# Truncate after flush works (unless another threads reopens t2 in between).
+flush tables;
+truncate table t1;
+insert into t1 values (1);
+# Close all tables.
+flush tables;
+# Open t2 and (implicitly) t1.
+select * from t2;
+# Truncate t1, wich was not recognized as open without the bugfix.
+# After fix for Bug#8306 and before fix for Bug#26379,
+# it should fail with a table-in-use error message, otherwise succeed.
+truncate table t1;
+# The insert used to fail on the crashed table.
+insert into t1 values (1);
+drop table t1,t2;
+--echo #
+--echo # Extra tests for TRUNCATE.
+--echo #
+--echo # Truncate MERGE table.
+CREATE TABLE t1 (c1 INT, INDEX(c1));
+CREATE TABLE t2 (c1 INT, INDEX(c1));
+CREATE TABLE t3 (c1 INT, INDEX(c1)) ENGINE=MRG_MYISAM UNION=(t1,t2);
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (2);
+SELECT * FROM t3;
+TRUNCATE TABLE t3;
+SELECT * FROM t3;
+--echo #
+--echo # Truncate child table.
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (2);
+TRUNCATE TABLE t1;
+SELECT * FROM t3;
+--echo #
+--echo # Truncate MERGE table under locked tables.
+LOCK TABLE t1 WRITE, t2 WRITE, t3 WRITE;
+INSERT INTO t1 VALUES (1);
+--error ER_LOCK_OR_ACTIVE_TRANSACTION
+TRUNCATE TABLE t3;
+SELECT * FROM t3;
+--echo #
+--echo # Truncate child table under locked tables.
+--error ER_LOCK_OR_ACTIVE_TRANSACTION
+TRUNCATE TABLE t1;
+SELECT * FROM t3;
+UNLOCK TABLES;
+DROP TABLE t1, t2, t3;
+--echo #
+--echo # Truncate temporary MERGE table.
+CREATE TEMPORARY TABLE t1 (c1 INT, INDEX(c1));
+CREATE TEMPORARY TABLE t2 (c1 INT, INDEX(c1));
+CREATE TEMPORARY TABLE t3 (c1 INT, INDEX(c1)) ENGINE=MRG_MYISAM UNION=(t1,t2);
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (2);
+SELECT * FROM t3;
+TRUNCATE TABLE t3;
+SELECT * FROM t3;
+--echo #
+--echo # Truncate temporary child table.
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (2);
+TRUNCATE TABLE t1;
+SELECT * FROM t3;
+--echo #
+--echo # Truncate temporary MERGE table under locked tables.
+INSERT INTO t1 VALUES (1);
+CREATE TABLE t4 (c1 INT, INDEX(c1));
+LOCK TABLE t4 WRITE;
+--error ER_LOCK_OR_ACTIVE_TRANSACTION
+TRUNCATE TABLE t3;
+SELECT * FROM t3;
+--echo #
+--echo # Truncate temporary child table under locked tables.
+--error ER_LOCK_OR_ACTIVE_TRANSACTION
+TRUNCATE TABLE t1;
+SELECT * FROM t3;
+UNLOCK TABLES;
+DROP TABLE t1, t2, t3, t4;
+
+#
+# Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE corrupts a MERGE table
+# Preparation
+connect (con1,localhost,root,,);
+connect (con2,localhost,root,,);
+connection default;
+#
+# Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE corrupts a MERGE table
+# Problem #1
+# A thread trying to lock a MERGE table performed busy waiting while
+# REPAIR TABLE or a similar table administration task was ongoing on one or
+# more of its MyISAM tables.
+# To allow for observability it was necessary to enter a multi-second sleep
+# in mysql_admin_table() after remove_table_from_cache(), which comes after
+# mysql_abort_lock(). The sleep faked a long running operation. One could
+# watch a high CPU load during the sleep time.
+# The problem was that mysql_abort_lock() upgrades the write lock to
+# TL_WRITE_ONLY. This lock type persisted until the final unlock at the end
+# of the administration task. The effect of TL_WRITE_ONLY is to reject any
+# attempt to lock the table. The trying thread must close the table and wait
+# until it is no longer used. Unfortunately there is no way to detect that
+# one of the MyISAM tables of a MERGE table is in use. When trying to lock
+# the MERGE table, all MyISAM tables are locked. If one fails on
+# TL_WRITE_ONLY, all locks are aborted and wait_for_tables() is entered.
+# But this doesn't see the MERGE table as used, so it seems appropriate to
+# retry a lock...
+#
+CREATE TABLE t1 (c1 INT) ENGINE= MyISAM;
+CREATE TABLE t2 (c1 INT) ENGINE= MRG_MYISAM UNION= (t1) INSERT_METHOD= LAST;
+send REPAIR TABLE t1;
+ connection con1;
+ sleep 1; # let repair run into its sleep
+ INSERT INTO t2 VALUES (1);
+connection default;
+reap;
+DROP TABLE t1, t2;
+#
+# Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE corrupts a MERGE table
+# Problem #2
+# A thread trying to lock a MERGE table performed busy waiting until all
+# threads that did REPAIR TABLE or similar table administration tasks on
+# one or more of its MyISAM tables in LOCK TABLES segments did
+# UNLOCK TABLES.
+# The difference against problem #1 is that the busy waiting took place
+# *after* the administration task. It was terminated by UNLOCK TABLES only.
+#
+# This is the same test case as for
+# Bug#26867 - LOCK TABLES REPAIR + merge table result in memory/cpu hogging
+#
+#
+CREATE TABLE t1 (c1 INT) ENGINE= MyISAM;
+CREATE TABLE t2 (c1 INT) ENGINE= MRG_MYISAM UNION= (t1) INSERT_METHOD= LAST;
+LOCK TABLE t1 WRITE;
+ connection con1;
+ send INSERT INTO t2 VALUES (1);
+connection default;
+sleep 1; # Let INSERT go into thr_multi_lock().
+REPAIR TABLE t1;
+sleep 2; # con1 performs busy waiting during this sleep.
+UNLOCK TABLES;
+ connection con1;
+ reap;
+connection default;
+DROP TABLE t1, t2;
+#
+# Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE corrupts a MERGE table
+# Problem #3
+# Two FLUSH TABLES within a LOCK TABLES segment could invalidate the lock.
+# This did *not* require a MERGE table.
+# To increase reproducibility it was necessary to enter a sleep of 2 seconds
+# at the end of wait_for_tables() after unlock of LOCK_open. In 5.0 and 5.1
+# the sleep must be inserted in open_and_lock_tables() after open_tables()
+# instead. wait_for_tables() is not used in this case.
+# The problem was that FLUSH TABLES releases LOCK_open while having unlocked
+# and closed all tables. When this happened while a thread was in the loop in
+# mysql_lock_tables() right after wait_for_tables() and before retrying to
+# lock, the thread got the lock. (Translate to similar code places in 5.0
+# and 5.1). And it did not notice that the table needed a refresh. So it
+# executed its statement on the table.
+# The first FLUSH TABLES kicked the INSERT out of thr_multi_lock() and let
+# it wait in wait_for_tables(). (open_table() in 5.0 and 5.1). The second
+# FLUSH TABLES must happen while the INSERT was on its way from
+# wait_for_tables() to the next call of thr_multi_lock(). This needed to be
+# supported by a sleep to make it repeatable.
+#
+CREATE TABLE t1 (c1 INT) ENGINE= MyISAM;
+LOCK TABLE t1 WRITE;
+ connection con1;
+ send INSERT INTO t1 VALUES (1);
+connection default;
+sleep 1; # Let INSERT go into thr_multi_lock().
+FLUSH TABLES;
+sleep 1; # Let INSERT go through wait_for_tables() where it sleeps.
+FLUSH TABLES;
+# This should give no result. But it will with sleep(2) at the right place.
+SELECT * FROM t1;
+UNLOCK TABLES;
+ connection con1;
+ reap;
+connection default;
+DROP TABLE t1;
+#
+# Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE corrupts a MERGE table
+# Cleanup
+disconnect con1;
+disconnect con2;
+#
+--echo #
+--echo # Extra tests for Bug#26379 - Combination of FLUSH TABLE and
+--echo # REPAIR TABLE corrupts a MERGE table
+#
+--echo #
+--echo # CREATE ... SELECT is disabled for MERGE tables.
+--echo #
+CREATE TABLE t1(c1 INT);
+INSERT INTO t1 VALUES (1);
+CREATE TABLE t2 (c1 INT) ENGINE=MRG_MYISAM UNION=(t1) INSERT_METHOD=LAST;
+--error ER_OPEN_AS_READONLY
+CREATE TABLE t3 ENGINE=MRG_MYISAM INSERT_METHOD=LAST SELECT * FROM t2;
+--error ER_NO_SUCH_TABLE
+SHOW CREATE TABLE t3;
+--error ER_WRONG_OBJECT
+CREATE TABLE t3 ENGINE=MRG_MYISAM UNION=(t1) INSERT_METHOD=LAST
+ SELECT * FROM t2;
+--error ER_NO_SUCH_TABLE
+SHOW CREATE TABLE t3;
+DROP TABLE t1, t2;
+#
+--echo #
+--echo # CREATE ... LIKE
+--echo #
+--echo # 1. Create like.
+CREATE TABLE t1 (c1 INT);
+CREATE TABLE t2 (c1 INT);
+CREATE TABLE t3 (c1 INT) ENGINE=MRG_MYISAM UNION=(t1,t2)
+ INSERT_METHOD=LAST;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (2);
+INSERT INTO t3 VALUES (3);
+CREATE TABLE t4 LIKE t3;
+SHOW CREATE TABLE t4;
+--error ER_OPEN_AS_READONLY
+INSERT INTO t4 VALUES (4);
+DROP TABLE t4;
+--echo #
+--echo # 1. Create like with locked tables.
+LOCK TABLES t3 WRITE, t2 WRITE, t1 WRITE;
+CREATE TABLE t4 LIKE t3;
+--error ER_TABLE_NOT_LOCKED
+SHOW CREATE TABLE t4;
+--error ER_TABLE_NOT_LOCKED
+INSERT INTO t4 VALUES (4);
+UNLOCK TABLES;
+SHOW CREATE TABLE t4;
+--error ER_OPEN_AS_READONLY
+INSERT INTO t4 VALUES (4);
+DROP TABLE t4;
+#
+--echo #
+--echo # Rename child.
+--echo #
+--echo # 1. Normal rename of non-MERGE table.
+CREATE TABLE t4 (c1 INT);
+INSERT INTO t4 VALUES (4);
+SELECT * FROM t4 ORDER BY c1;
+RENAME TABLE t4 TO t5;
+SELECT * FROM t5 ORDER BY c1;
+RENAME TABLE t5 TO t4;
+SELECT * FROM t4 ORDER BY c1;
+DROP TABLE t4;
+--echo #
+--echo # 2. Normal rename.
+SELECT * FROM t3 ORDER BY c1;
+RENAME TABLE t2 TO t5;
+--error ER_NO_SUCH_TABLE
+SELECT * FROM t3 ORDER BY c1;
+RENAME TABLE t5 TO t2;
+SELECT * FROM t3 ORDER BY c1;
+--echo #
+--echo # 3. Normal rename with locked tables.
+LOCK TABLES t1 WRITE, t2 WRITE, t3 WRITE;
+SELECT * FROM t3 ORDER BY c1;
+--error ER_LOCK_OR_ACTIVE_TRANSACTION
+RENAME TABLE t2 TO t5;
+SELECT * FROM t3 ORDER BY c1;
+--error ER_LOCK_OR_ACTIVE_TRANSACTION
+RENAME TABLE t5 TO t2;
+SELECT * FROM t3 ORDER BY c1;
+UNLOCK TABLES;
+--echo #
+--echo # 4. Alter table rename.
+ALTER TABLE t2 RENAME TO t5;
+--error ER_NO_SUCH_TABLE
+SELECT * FROM t3 ORDER BY c1;
+ALTER TABLE t5 RENAME TO t2;
+SELECT * FROM t3 ORDER BY c1;
+--echo #
+--echo # 5. Alter table rename with locked tables.
+LOCK TABLES t1 WRITE, t2 WRITE, t3 WRITE;
+ALTER TABLE t2 RENAME TO t5;
+--error ER_TABLE_NOT_LOCKED
+SELECT * FROM t3 ORDER BY c1;
+--error ER_TABLE_NOT_LOCKED
+ALTER TABLE t5 RENAME TO t2;
+UNLOCK TABLES;
+ALTER TABLE t5 RENAME TO t2;
+SELECT * FROM t3 ORDER BY c1;
+#
+--echo #
+--echo # Rename parent.
+--echo #
+--echo # 1. Normal rename with locked tables.
+LOCK TABLES t1 WRITE, t2 WRITE, t3 WRITE;
+SELECT * FROM t3 ORDER BY c1;
+--error ER_LOCK_OR_ACTIVE_TRANSACTION
+RENAME TABLE t3 TO t5;
+SELECT * FROM t3 ORDER BY c1;
+--error ER_LOCK_OR_ACTIVE_TRANSACTION
+RENAME TABLE t5 TO t3;
+SELECT * FROM t3 ORDER BY c1;
+--echo #
+--echo # 5. Alter table rename with locked tables.
+ALTER TABLE t3 RENAME TO t5;
+--error ER_TABLE_NOT_LOCKED
+SELECT * FROM t5 ORDER BY c1;
+--error ER_TABLE_NOT_LOCKED
+ALTER TABLE t5 RENAME TO t3;
+UNLOCK TABLES;
+ALTER TABLE t5 RENAME TO t3;
+SELECT * FROM t3 ORDER BY c1;
+DROP TABLE t1, t2, t3;
+#
+--echo #
+--echo # Drop locked tables.
+--echo #
+--echo # 1. Drop parent.
+CREATE TABLE t1 (c1 INT, INDEX(c1));
+CREATE TABLE t2 (c1 INT, INDEX(c1)) ENGINE=MRG_MYISAM UNION=(t1)
+ INSERT_METHOD=LAST;
+LOCK TABLES t1 WRITE, t2 WRITE;
+INSERT INTO t1 VALUES (1);
+DROP TABLE t2;
+--error ER_TABLE_NOT_LOCKED
+SELECT * FROM t2;
+SELECT * FROM t1;
+UNLOCK TABLES;
+--echo # 2. Drop child.
+CREATE TABLE t2 (c1 INT, INDEX(c1)) ENGINE=MRG_MYISAM UNION=(t1)
+ INSERT_METHOD=LAST;
+LOCK TABLES t1 WRITE, t2 WRITE;
+INSERT INTO t1 VALUES (1);
+DROP TABLE t1;
+--error ER_NO_SUCH_TABLE
+SELECT * FROM t2;
+--error ER_NO_SUCH_TABLE
+SELECT * FROM t1;
+UNLOCK TABLES;
+DROP TABLE t2;
+#
+--echo #
+--echo # ALTER TABLE. Change child list.
+--echo #
+CREATE TABLE t1 (c1 INT, INDEX(c1));
+CREATE TABLE t2 (c1 INT, INDEX(c1));
+CREATE TABLE t3 (c1 INT, INDEX(c1));
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (2);
+INSERT INTO t3 VALUES (3);
+CREATE TABLE t4 (c1 INT, INDEX(c1)) ENGINE=MRG_MYISAM UNION=(t3,t2)
+ INSERT_METHOD=LAST;
+--echo # Shrink child list.
+ALTER TABLE t4 UNION=(t3);
+SHOW CREATE TABLE t4;
+SELECT * FROM t4 ORDER BY c1;
+--echo # Extend child list.
+ALTER TABLE t4 UNION=(t3,t2);
+SHOW CREATE TABLE t4;
+SELECT * FROM t4 ORDER BY c1;
+#
+--echo #
+--echo # ALTER TABLE under LOCK TABLES. Change child list.
+--echo #
+LOCK TABLES t4 WRITE, t3 WRITE, t2 WRITE;
+--echo # Shrink child list.
+--error ER_LOCK_OR_ACTIVE_TRANSACTION
+ALTER TABLE t4 UNION=(t3);
+--echo # Extend child list within locked tables.
+--error ER_LOCK_OR_ACTIVE_TRANSACTION
+ALTER TABLE t4 UNION=(t3,t2);
+--echo # Extend child list beyond locked tables.
+--error ER_LOCK_OR_ACTIVE_TRANSACTION
+ALTER TABLE t4 UNION=(t3,t2,t1);
+SHOW CREATE TABLE t4;
+SELECT * FROM t4 ORDER BY c1;
+UNLOCK TABLES;
+DROP TABLE t4;
+#
+--echo #
+--echo # ALTER TABLE under LOCK TABLES. Grave change, table re-creation.
+--echo #
+CREATE TABLE t4 (c1 INT, INDEX(c1)) ENGINE=MRG_MYISAM UNION=(t1,t2,t3)
+ INSERT_METHOD=LAST;
+--echo # Lock parent first and then children.
+LOCK TABLES t4 WRITE, t3 WRITE, t2 WRITE, t1 WRITE;
+ALTER TABLE t4 DROP INDEX c1, ADD UNIQUE INDEX (c1);
+SELECT * FROM t4 ORDER BY c1;
+ALTER TABLE t2 DROP INDEX c1, ADD UNIQUE INDEX (c1);
+SELECT * FROM t4 ORDER BY c1;
+UNLOCK TABLES;
+--echo # Lock children first and then parent.
+LOCK TABLES t1 WRITE, t2 WRITE, t3 WRITE, t4 WRITE;
+ALTER TABLE t4 DROP INDEX c1, ADD UNIQUE INDEX (c1);
+SELECT * FROM t4 ORDER BY c1;
+ALTER TABLE t2 DROP INDEX c1, ADD UNIQUE INDEX (c1);
+SELECT * FROM t4 ORDER BY c1;
+UNLOCK TABLES;
+--echo # Lock parent between children.
+LOCK TABLES t3 WRITE, t2 WRITE, t4 WRITE, t1 WRITE;
+ALTER TABLE t4 DROP INDEX c1, ADD UNIQUE INDEX (c1);
+SELECT * FROM t4 ORDER BY c1;
+ALTER TABLE t2 DROP INDEX c1, ADD UNIQUE INDEX (c1);
+SELECT * FROM t4 ORDER BY c1;
+UNLOCK TABLES;
+DROP TABLE t1, t2, t3, t4;
+#
+--echo #
+--echo # ALTER TABLE under LOCK TABLES. Simple change, no re-creation.
+--echo #
+CREATE TABLE t1 (c1 INT);
+CREATE TABLE t2 (c1 INT);
+CREATE TABLE t3 (c1 INT);
+CREATE TABLE t4 (c1 INT) ENGINE=MRG_MYISAM UNION=(t1,t2,t3)
+ INSERT_METHOD=LAST;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (2);
+INSERT INTO t3 VALUES (3);
+--echo # Lock parent first and then children.
+LOCK TABLES t4 WRITE, t3 WRITE, t2 WRITE, t1 WRITE;
+ALTER TABLE t4 ALTER COLUMN c1 SET DEFAULT 44;
+SELECT * FROM t4 ORDER BY c1;
+ALTER TABLE t2 ALTER COLUMN c1 SET DEFAULT 22;
+SELECT * FROM t4 ORDER BY c1;
+UNLOCK TABLES;
+--echo # Lock children first and then parent.
+LOCK TABLES t1 WRITE, t2 WRITE, t3 WRITE, t4 WRITE;
+ALTER TABLE t4 ALTER COLUMN c1 SET DEFAULT 44;
+SELECT * FROM t4 ORDER BY c1;
+ALTER TABLE t2 ALTER COLUMN c1 SET DEFAULT 22;
+SELECT * FROM t4 ORDER BY c1;
+UNLOCK TABLES;
+--echo # Lock parent between children.
+LOCK TABLES t3 WRITE, t2 WRITE, t4 WRITE, t1 WRITE;
+ALTER TABLE t4 ALTER COLUMN c1 SET DEFAULT 44;
+SELECT * FROM t4 ORDER BY c1;
+ALTER TABLE t2 ALTER COLUMN c1 SET DEFAULT 22;
+SELECT * FROM t4 ORDER BY c1;
+UNLOCK TABLES;
+#
+--echo #
+--echo # FLUSH TABLE under LOCK TABLES.
+--echo #
+--echo # Lock parent first and then children.
+LOCK TABLES t4 WRITE, t3 WRITE, t2 WRITE, t1 WRITE;
+FLUSH TABLE t4;
+SELECT * FROM t4 ORDER BY c1;
+FLUSH TABLE t2;
+SELECT * FROM t4 ORDER BY c1;
+FLUSH TABLES;
+SELECT * FROM t4 ORDER BY c1;
+UNLOCK TABLES;
+--echo # Lock children first and then parent.
+LOCK TABLES t1 WRITE, t2 WRITE, t3 WRITE, t4 WRITE;
+FLUSH TABLE t4;
+SELECT * FROM t4 ORDER BY c1;
+FLUSH TABLE t2;
+SELECT * FROM t4 ORDER BY c1;
+FLUSH TABLES;
+SELECT * FROM t4 ORDER BY c1;
+UNLOCK TABLES;
+--echo # Lock parent between children.
+LOCK TABLES t3 WRITE, t2 WRITE, t4 WRITE, t1 WRITE;
+FLUSH TABLE t4;
+SELECT * FROM t4 ORDER BY c1;
+FLUSH TABLE t2;
+SELECT * FROM t4 ORDER BY c1;
+FLUSH TABLES;
+SELECT * FROM t4 ORDER BY c1;
+UNLOCK TABLES;
+#
+--echo #
+--echo # Triggers
+--echo #
+--echo # Trigger on parent
+DELETE FROM t4 WHERE c1 = 4;
+CREATE TRIGGER t4_ai AFTER INSERT ON t4 FOR EACH ROW SET @a=1;
+SET @a=0;
+INSERT INTO t4 VALUES (4);
+SELECT @a;
+SELECT * FROM t4 ORDER BY c1;
+DROP TRIGGER t4_ai;
+--echo # Trigger on parent under LOCK TABLES
+LOCK TABLES t3 WRITE, t2 WRITE, t4 WRITE, t1 WRITE;
+CREATE TRIGGER t4_ai AFTER INSERT ON t4 FOR EACH ROW SET @a=1;
+SET @a=0;
+INSERT INTO t4 VALUES (4);
+SELECT @a;
+SELECT * FROM t4 ORDER BY c1;
+DROP TRIGGER t4_ai;
+UNLOCK TABLES;
+--echo #
+--echo # Trigger on child
+DELETE FROM t4 WHERE c1 = 4;
+CREATE TRIGGER t3_ai AFTER INSERT ON t3 FOR EACH ROW SET @a=1;
+SET @a=0;
+INSERT INTO t4 VALUES (4);
+SELECT @a;
+INSERT INTO t3 VALUES (33);
+SELECT @a;
+SELECT * FROM t4 ORDER BY c1;
+DROP TRIGGER t3_ai;
+--echo # Trigger on child under LOCK TABLES
+LOCK TABLES t3 WRITE, t2 WRITE, t4 WRITE, t1 WRITE;
+CREATE TRIGGER t3_ai AFTER INSERT ON t3 FOR EACH ROW SET @a=1;
+SET @a=0;
+INSERT INTO t4 VALUES (4);
+SELECT @a;
+INSERT INTO t3 VALUES (33);
+SELECT @a;
+SELECT * FROM t4 ORDER BY c1;
+DELETE FROM t4 WHERE c1 = 33;
+DROP TRIGGER t3_ai;
+--echo #
+--echo # Trigger with table use on child
+DELETE FROM t4 WHERE c1 = 4;
+CREATE TRIGGER t3_ai AFTER INSERT ON t3 FOR EACH ROW INSERT INTO t2 VALUES(22);
+INSERT INTO t4 VALUES (4);
+SELECT * FROM t4 ORDER BY c1;
+INSERT INTO t3 VALUES (33);
+SELECT * FROM t4 ORDER BY c1;
+DELETE FROM t4 WHERE c1 = 22;
+DELETE FROM t4 WHERE c1 = 33;
+DROP TRIGGER t3_ai;
+--echo # Trigger with table use on child under LOCK TABLES
+LOCK TABLES t3 WRITE, t2 WRITE, t4 WRITE, t1 WRITE;
+CREATE TRIGGER t3_ai AFTER INSERT ON t3 FOR EACH ROW INSERT INTO t2 VALUES(22);
+INSERT INTO t4 VALUES (4);
+SELECT * FROM t4 ORDER BY c1;
+INSERT INTO t3 VALUES (33);
+SELECT * FROM t4 ORDER BY c1;
+DROP TRIGGER t3_ai;
+DELETE FROM t4 WHERE c1 = 22;
+DELETE FROM t4 WHERE c1 = 33;
+UNLOCK TABLES;
+#
+--echo #
+--echo # Repair
+--echo #
+REPAIR TABLE t4;
+REPAIR TABLE t2;
+SELECT * FROM t4 ORDER BY c1;
+LOCK TABLES t3 WRITE, t2 WRITE, t4 WRITE, t1 WRITE;
+REPAIR TABLE t4;
+REPAIR TABLE t2;
+SELECT * FROM t4 ORDER BY c1;
+UNLOCK TABLES;
+#
+--echo #
+--echo # Optimize
+--echo #
+OPTIMIZE TABLE t4;
+OPTIMIZE TABLE t2;
+SELECT * FROM t4 ORDER BY c1;
+LOCK TABLES t3 WRITE, t2 WRITE, t4 WRITE, t1 WRITE;
+OPTIMIZE TABLE t4;
+OPTIMIZE TABLE t2;
+SELECT * FROM t4 ORDER BY c1;
+UNLOCK TABLES;
+#
+--echo #
+--echo # Checksum
+--echo #
+CHECKSUM TABLE t4;
+CHECKSUM TABLE t2;
+SELECT * FROM t4 ORDER BY c1;
+LOCK TABLES t3 WRITE, t2 WRITE, t4 WRITE, t1 WRITE;
+CHECKSUM TABLE t4;
+CHECKSUM TABLE t2;
+SELECT * FROM t4 ORDER BY c1;
+UNLOCK TABLES;
+#
+--echo #
+--echo # Insert delayed
+--echo #
+# See also Bug#26464 - insert delayed + update + merge = corruption
+# Succeeds in embedded server - is converted to normal insert
+# Fails in normal server, ps-protocol - not supported by engine
+# Fails in normal server, normal protocol - not a base table
+--error 0, ER_ILLEGAL_HA, ER_WRONG_OBJECT
+INSERT DELAYED INTO t4 VALUES(44);
+# Get rid of row in embedded server
+DELETE FROM t4 WHERE c1 = 44;
+INSERT DELAYED INTO t3 VALUES(33);
+ let $wait_cmd= SHOW STATUS LIKE 'Not_flushed_delayed_rows';
+ let $run= query_get_value($wait_cmd, Value, 1);
+ while ($run)
+ {
+ let $run= query_get_value($wait_cmd, Value, 1);
+ }
+SELECT * FROM t4 ORDER BY c1;
+LOCK TABLES t3 WRITE, t2 WRITE, t4 WRITE, t1 WRITE;
+--error ER_DELAYED_INSERT_TABLE_LOCKED, ER_ILLEGAL_HA
+INSERT DELAYED INTO t4 VALUES(444);
+--error ER_DELAYED_INSERT_TABLE_LOCKED, ER_ILLEGAL_HA
+INSERT DELAYED INTO t3 VALUES(333);
+SELECT * FROM t4 ORDER BY c1;
+UNLOCK TABLES;
+DROP TABLE t1, t2, t3, t4;
+#
+--echo #
+--echo # Recursive inclusion of merge tables in their union clauses.
+--echo #
+CREATE TABLE t1 (c1 INT, INDEX(c1));
+CREATE TABLE t2 (c1 INT, INDEX(c1)) ENGINE=MRG_MYISAM UNION=(t1)
+ INSERT_METHOD=LAST;
+CREATE TABLE t3 (c1 INT, INDEX(c1)) ENGINE=MRG_MYISAM UNION=(t2,t1)
+ INSERT_METHOD=LAST;
+ALTER TABLE t2 UNION=(t3,t1);
+--error ER_ADMIN_WRONG_MRG_TABLE
+SELECT * FROM t2;
+DROP TABLE t1, t2, t3;
+
+
+#
+# Bug#25038 - Waiting TRUNCATE
+#
+# Show that truncate of child table after use of parent table works.
+CREATE TABLE t1 (c1 INT) ENGINE= MyISAM;
+CREATE TABLE t2 (c1 INT) ENGINE= MyISAM;
+CREATE TABLE t3 (c1 INT) ENGINE= MRG_MYISAM UNION= (t1, t2);
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (2);
+SELECT * FROM t3;
+TRUNCATE TABLE t1;
+SELECT * FROM t3;
+DROP TABLE t1, t2, t3;
+#
+# Show that truncate of child table waits while parent table is used.
+# (test partly borrowed from count_distinct3.)
+CREATE TABLE t1 (id INTEGER, grp TINYINT, id_rev INTEGER);
+SET @rnd_max= 2147483647;
+let $1 = 10;
+while ($1)
+{
+ SET @rnd= RAND();
+ SET @id = CAST(@rnd * @rnd_max AS UNSIGNED);
+ SET @id_rev= @rnd_max - @id;
+ SET @grp= CAST(127.0 * @rnd AS UNSIGNED);
+ INSERT INTO t1 (id, grp, id_rev) VALUES (@id, @grp, @id_rev);
+ dec $1;
+}
+set @@read_buffer_size=2*1024*1024;
+CREATE TABLE t2 SELECT * FROM t1;
+INSERT INTO t1 (id, grp, id_rev) SELECT id, grp, id_rev FROM t2;
+INSERT INTO t2 (id, grp, id_rev) SELECT id, grp, id_rev FROM t1;
+INSERT INTO t1 (id, grp, id_rev) SELECT id, grp, id_rev FROM t2;
+INSERT INTO t2 (id, grp, id_rev) SELECT id, grp, id_rev FROM t1;
+INSERT INTO t1 (id, grp, id_rev) SELECT id, grp, id_rev FROM t2;
+CREATE TABLE t3 (id INTEGER, grp TINYINT, id_rev INTEGER)
+ ENGINE= MRG_MYISAM UNION= (t1, t2);
+SELECT COUNT(*) FROM t1;
+SELECT COUNT(*) FROM t2;
+SELECT COUNT(*) FROM t3;
+connect (con1,localhost,root,,);
+ # As t3 contains random numbers, results are different from test to test.
+ # That's okay, because we test only that select doesn't yield an
+ # error. Note, that --disable_result_log doesn't suppress error output.
+ --disable_result_log
+ send SELECT COUNT(DISTINCT a1.id) FROM t3 AS a1, t3 AS a2
+ WHERE a1.id = a2.id GROUP BY a2.grp;
+connection default;
+sleep 1;
+TRUNCATE TABLE t1;
+ connection con1;
+ reap;
+ --enable_result_log
+ disconnect con1;
+connection default;
+SELECT COUNT(*) FROM t1;
+SELECT COUNT(*) FROM t2;
+SELECT COUNT(*) FROM t3;
+DROP TABLE t1, t2, t3;
+
+#
+# Bug#25700 - merge base tables get corrupted by optimize/analyze/repair table
+#
+# Using FLUSH TABLES before REPAIR.
+CREATE TABLE t1 (c1 INT) ENGINE=MyISAM;
+CREATE TABLE t2 (c1 INT) ENGINE=MRG_MYISAM UNION=(t1) INSERT_METHOD=LAST;
+INSERT INTO t2 VALUES (1);
+SELECT * FROM t2;
+LOCK TABLES t2 WRITE, t1 WRITE;
+FLUSH TABLES;
+REPAIR TABLE t1;
+CHECK TABLE t1;
+REPAIR TABLE t1;
+UNLOCK TABLES;
+CHECK TABLE t1 EXTENDED;
+#
+# Not using FLUSH TABLES before REPAIR.
+LOCK TABLES t2 WRITE, t1 WRITE;
+REPAIR TABLE t1;
+CHECK TABLE t1;
+REPAIR TABLE t1;
+UNLOCK TABLES;
+CHECK TABLE t1 EXTENDED;
+DROP TABLE t1, t2;
+
+#
+# Bug#26377 - Deadlock with MERGE and FLUSH TABLE
+#
+CREATE TABLE t1 ( a INT ) ENGINE=MyISAM;
+CREATE TABLE m1 ( a INT ) ENGINE=MRG_MYISAM UNION=(t1);
+# Lock t1 first. This did always work.
+LOCK TABLES t1 WRITE, m1 WRITE;
+FLUSH TABLE t1;
+UNLOCK TABLES;
+DROP TABLE m1, t1;
+#
+CREATE TABLE t1 ( a INT ) ENGINE=MyISAM;
+CREATE TABLE m1 ( a INT ) ENGINE=MRG_MYISAM UNION=(t1);
+# Lock m1 first. This did deadlock.
+LOCK TABLES m1 WRITE, t1 WRITE;
+FLUSH TABLE t1;
+UNLOCK TABLES;
+DROP TABLE m1, t1;
+
+#
+# Bug#27660 - Falcon: merge table possible
+#
+# Normal MyISAM MERGE operation.
+CREATE TABLE t1 (c1 INT, c2 INT) ENGINE= MyISAM;
+CREATE TABLE t2 (c1 INT, c2 INT) ENGINE= MyISAM;
+CREATE TABLE t3 (c1 INT, c2 INT) ENGINE= MRG_MYISAM UNION(t1, t2);
+INSERT INTO t1 VALUES (1, 1);
+INSERT INTO t2 VALUES (2, 2);
+SELECT * FROM t3;
+# Try an unsupported engine.
+ALTER TABLE t1 ENGINE= MEMORY;
+INSERT INTO t1 VALUES (0, 0);
+# Before fixing, this succeeded, but (0, 0) was missing.
+--error 1168
+SELECT * FROM t3;
+DROP TABLE t1, t2, t3;
+
+#
+# Bug#30275 - Merge tables: flush tables or unlock tables causes server to crash
+#
+CREATE TABLE t1 (c1 INT, KEY(c1));
+CREATE TABLE t2 (c1 INT, KEY(c1)) ENGINE=MRG_MYISAM UNION=(t1)
+ INSERT_METHOD=FIRST;
+LOCK TABLE t1 WRITE, t2 WRITE;
+FLUSH TABLES t2, t1;
+OPTIMIZE TABLE t1;
+FLUSH TABLES t1;
+UNLOCK TABLES;
+#
+FLUSH TABLES;
+INSERT INTO t1 VALUES (1);
+LOCK TABLE t1 WRITE, t2 WRITE;
+FLUSH TABLES t2, t1;
+OPTIMIZE TABLE t1;
+FLUSH TABLES t1;
+UNLOCK TABLES;
+DROP TABLE t1, t2;
+
+#
+# Test derived from test program for
+# Bug#30273 - merge tables: Can't lock file (errno: 155)
+#
+CREATE TABLE t1 (ID INT) ENGINE=MYISAM;
+CREATE TABLE m1 (ID INT) ENGINE=MRG_MYISAM UNION=(t1) INSERT_METHOD=FIRST;
+INSERT INTO t1 VALUES ();
+INSERT INTO m1 VALUES ();
+LOCK TABLE t1 WRITE, m1 WRITE;
+FLUSH TABLES m1, t1;
+OPTIMIZE TABLE t1;
+FLUSH TABLES m1, t1;
+UNLOCK TABLES;
+DROP TABLE t1, m1;
+
--disable_result_log
--disable_query_log
eval set global storage_engine=$default;
diff --git a/mysql-test/t/merge_innodb.test b/mysql-test/t/merge_innodb.test
new file mode 100644
index 00000000000..7f0b1a0c36e
--- /dev/null
+++ b/mysql-test/t/merge_innodb.test
@@ -0,0 +1,41 @@
+# t/merge_innodb.test
+#
+# Tests with MERGE tables over InnoDB tables
+#
+
+--source include/have_innodb.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
+--enable_warnings
+
+#
+# Bug#30491 - MERGE doesn't report error when one table is Innodb
+#
+CREATE TABLE t1 (c1 varchar(100)) ENGINE=MyISAM;
+CREATE TABLE t2 (c1 varchar(100)) ENGINE=MyISAM;
+CREATE TABLE t3 (c1 varchar(100)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES ('Ann'), ('Alice');
+INSERT INTO t2 VALUES ('Bob'), ('Brian');
+INSERT INTO t3 VALUES ('Chris'), ('Charlie');
+CREATE TABLE t4 (c1 varchar(100)) ENGINE=MRG_MYISAM UNION=(t1,t2)
+ INSERT_METHOD=LAST;
+CREATE TABLE t5 (c1 varchar(100)) ENGINE=MRG_MYISAM UNION=(t1,t3)
+ INSERT_METHOD=LAST;
+--error ER_WRONG_MRG_TABLE
+SELECT * FROM t5;
+SELECT * FROM t4;
+ALTER TABLE t2 ENGINE=InnoDB;
+--error ER_WRONG_MRG_TABLE
+SELECT * FROM t4;
+DELETE FROM t2 LIMIT 1;
+--error ER_WRONG_MRG_TABLE
+SELECT * FROM t4;
+--error ER_WRONG_MRG_TABLE
+INSERT INTO t4 VALUES ('Beware');
+--error ER_WRONG_MRG_TABLE
+SELECT * FROM t4;
+SELECT * FROM t2;
+SELECT * FROM t1;
+DROP TABLE t1, t2, t3, t4, t5;
+
diff --git a/mysql-test/t/multi_update.test b/mysql-test/t/multi_update.test
index 6f5ac70a34b..331663dceb5 100644
--- a/mysql-test/t/multi_update.test
+++ b/mysql-test/t/multi_update.test
@@ -588,6 +588,7 @@ CREATE TABLE `t2` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
# as the test is about to see erroed queries in binlog
+set @sav_binlog_format= @@session.binlog_format;
set @@session.binlog_format= mixed;
@@ -614,5 +615,42 @@ show master status /* there must be the UPDATE query event */;
# cleanup bug#27716
drop table t1, t2;
+set @@session.binlog_format= @sav_binlog_format;
+
+#
+# Bug #29136 erred multi-delete on trans table does not rollback
+#
+
+# prepare
+--disable_warnings
+drop table if exists t1, t2, t3;
+--enable_warnings
+CREATE TABLE t1 (a int, PRIMARY KEY (a));
+CREATE TABLE t2 (a int, PRIMARY KEY (a));
+CREATE TABLE t3 (a int, PRIMARY KEY (a)) ENGINE=MyISAM;
+create trigger trg_del_t3 before delete on t3 for each row insert into t1 values (1);
+
+insert into t2 values (1),(2);
+insert into t3 values (1),(2);
+reset master;
+
+# exec cases B, A - see innodb.test
+
+# B. send_eof() and send_error() afterward
+
+--error ER_DUP_ENTRY
+delete t3.* from t2,t3 where t2.a=t3.a;
+
+# check
+select count(*) from t1 /* must be 1 */;
+select count(*) from t3 /* must be 1 */;
+
+# cleanup bug#29136
+drop table t1, t2, t3;
+
+#
+# Add further tests from here
+#
+
--echo end of tests
diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test
index 5c6fe0fc887..89ff1482b60 100644
--- a/mysql-test/t/myisam.test
+++ b/mysql-test/t/myisam.test
@@ -576,32 +576,6 @@ select count(*) from t1 where a is null;
drop table t1;
#
-# Bug #8306: TRUNCATE leads to index corruption
-#
-create table t1 (c1 int, index(c1));
-create table t2 (c1 int, index(c1)) engine=merge union=(t1);
-insert into t1 values (1);
-# Close all tables.
-flush tables;
-# Open t2 and (implicitly) t1.
-select * from t2;
-# Truncate after flush works (unless another threads reopens t2 in between).
-flush tables;
-truncate table t1;
-insert into t1 values (1);
-# Close all tables.
-flush tables;
-# Open t2 and (implicitly) t1.
-select * from t2;
-# Truncate t1, wich was not recognized as open without the bugfix.
-# Now, it should fail with a table-in-use error message.
---error 1105
-truncate table t1;
-# The insert used to fail on the crashed table.
-insert into t1 values (1);
-drop table t1,t2;
-
-#
# bug9188 - Corruption Can't open file: 'table.MYI' (errno: 145)
#
create table t1 (c1 int, c2 varchar(4) not null default '',
@@ -1146,6 +1120,55 @@ ALTER TABLE t1 ENABLE KEYS;
SELECT a FROM t1 FORCE INDEX (inx) WHERE a=1;
DROP TABLE t1;
+#
+# Bug#4692 - DISABLE/ENABLE KEYS waste a space
+#
+CREATE TABLE t1 (c1 INT, c2 INT, UNIQUE INDEX (c1), INDEX (c2)) ENGINE=MYISAM;
+--replace_column 6 # 7 # 8 # 10 # 11 # 12 # 13 # 14 # 15 # 16 #
+SHOW TABLE STATUS LIKE 't1';
+INSERT INTO t1 VALUES (1,1);
+--replace_column 6 # 7 # 8 # 10 # 11 # 12 # 13 # 14 # 15 # 16 #
+SHOW TABLE STATUS LIKE 't1';
+ALTER TABLE t1 DISABLE KEYS;
+--replace_column 6 # 7 # 8 # 10 # 11 # 12 # 13 # 14 # 15 # 16 #
+SHOW TABLE STATUS LIKE 't1';
+ALTER TABLE t1 ENABLE KEYS;
+--replace_column 6 # 7 # 8 # 10 # 11 # 12 # 13 # 14 # 15 # 16 #
+SHOW TABLE STATUS LIKE 't1';
+ALTER TABLE t1 DISABLE KEYS;
+--replace_column 6 # 7 # 8 # 10 # 11 # 12 # 13 # 14 # 15 # 16 #
+SHOW TABLE STATUS LIKE 't1';
+ALTER TABLE t1 ENABLE KEYS;
+--replace_column 6 # 7 # 8 # 10 # 11 # 12 # 13 # 14 # 15 # 16 #
+SHOW TABLE STATUS LIKE 't1';
+#--exec ls -log var/master-data/test/t1.MYI
+#--exec myisamchk -dvv var/master-data/test/t1.MYI
+#--exec myisamchk -iev var/master-data/test/t1.MYI
+--echo # Enable keys with parallel repair
+SET @@myisam_repair_threads=2;
+ALTER TABLE t1 DISABLE KEYS;
+ALTER TABLE t1 ENABLE KEYS;
+SET @@myisam_repair_threads=1;
+CHECK TABLE t1 EXTENDED;
+DROP TABLE t1;
+
+#
+# Bug#28837: MyISAM storage engine error (134) doing delete with self-join
+#
+
+CREATE TABLE t1 (id int NOT NULL, ref int NOT NULL, INDEX (id)) ENGINE=MyISAM;
+CREATE TABLE t2 LIKE t1;
+
+INSERT INTO t2 (id, ref) VALUES (1,3), (2,1), (3,2), (4,5), (4,4);
+INSERT INTO t1 SELECT * FROM t2;
+
+SELECT * FROM t1 AS a INNER JOIN t1 AS b USING (id) WHERE a.ref < b.ref;
+SELECT * FROM t1;
+DELETE FROM a USING t1 AS a INNER JOIN t1 AS b USING (id) WHERE a.ref < b.ref;
+SELECT * FROM t1;
+
+DROP TABLE t1, t2;
+
--echo End of 5.0 tests
@@ -1256,3 +1279,4 @@ CHECK TABLE t1;
DROP TABLE t1;
--echo End of 5.1 tests
+
diff --git a/mysql-test/t/myisampack.test b/mysql-test/t/myisampack.test
new file mode 100644
index 00000000000..6598af6318a
--- /dev/null
+++ b/mysql-test/t/myisampack.test
@@ -0,0 +1,33 @@
+#
+# BUG#31277 - myisamchk --unpack corrupts a table
+#
+CREATE TABLE t1(c1 DOUBLE, c2 DOUBLE, c3 DOUBLE, c4 DOUBLE, c5 DOUBLE,
+ c6 DOUBLE, c7 DOUBLE, c8 DOUBLE, c9 DOUBLE, a INT PRIMARY KEY);
+INSERT INTO t1 VALUES
+(-3.31168791059336e-06,-3.19054655887874e-06,-1.06528081684847e-05,-1.227278240089e-06,-1.66718069164799e-06,-2.59038972510885e-06,-2.83145227805303e-06,-4.09678491270648e-07,-2.22610091291797e-06,6),
+(0.0030743000272545,2.53222044316438e-05,2.78674650061845e-05,1.95914465544536e-05,1.7347572525984e-05,1.87513810069614e-05,1.69882826885005e-05,2.44449336987598e-05,1.89914629921774e-05,9),
+(2.85229319423495e-05,3.05970988282259e-05,3.77161100113133e-05,2.3055238978766e-05,2.08241267364615e-05,2.28009504270553e-05,2.12070165658947e-05,2.84350091565409e-05,2.3366822910704e-05,3),
+(0,0,0,0,0,0,0,0,0,12),
+(3.24544577570754e-05,3.44619021870993e-05,4.37561613201124e-05,2.57556808726748e-05,2.3195354640561e-05,2.58532400758869e-05,2.34934241667179e-05,3.1621640063232e-05,2.58229982746189e-05,19),
+(2.53222044316438e-05,0.00445071933455582,2.97447268116016e-05,2.12379514059868e-05,1.86777776502663e-05,2.0170058676712e-05,1.8946030385445e-05,2.66040037173511e-05,2.09161899668946e-05,20),
+(3.03462382611645e-05,3.26517930083994e-05,3.5242025468662e-05,2.53219745106391e-05,2.24384532945004e-05,2.4052346047657e-05,2.23865572957053e-05,3.1634313969082e-05,2.48285463481801e-05,21),
+(1.95914465544536e-05,2.12379514059868e-05,2.27808649037128e-05,0.000341724375366877,1.4512761275113e-05,1.56475828693953e-05,1.44372366441415e-05,2.07952121981765e-05,1.61488256935919e-05,28),
+(1.7347572525984e-05,1.86777776502663e-05,2.04116907052727e-05,1.4512761275113e-05,0.000432162526082388,1.38116514014465e-05,1.2712914948904e-05,1.82503165178506e-05,1.43043075345922e-05,30),
+(1.68339762136661e-05,1.77836497166611e-05,2.36328309295222e-05,1.30183423732016e-05,1.18674654241553e-05,1.32467273128652e-05,1.24581739117775e-05,1.55624190959406e-05,1.33010638508213e-05,31),
+(1.89643062824415e-05,2.06997140070717e-05,2.29045490159364e-05,1.57918175731019e-05,1.39864987449492e-05,1.50580274578455e-05,1.45908734129609e-05,1.95329296993327e-05,1.5814709481221e-05,32),
+(1.69882826885005e-05,1.8946030385445e-05,2.00820439721439e-05,1.44372366441415e-05,1.2712914948904e-05,1.35209686474184e-05,0.00261563314789896,1.78285095864627e-05,1.46699314500019e-05,34),
+(2.0278186540684e-05,2.18923409729654e-05,2.39981539939738e-05,1.71774589459438e-05,1.54654355357383e-05,1.62731485707636e-05,1.49253140625051e-05,2.18229800160297e-05,1.71923561673718e-05,35),
+(2.44449336987598e-05,2.66040037173511e-05,2.84860148925308e-05,2.07952121981765e-05,1.82503165178506e-05,1.97667730441441e-05,1.78285095864627e-05,0.00166478601822712,2.0299952103232e-05,36),
+(1.89914629921774e-05,2.09161899668946e-05,2.26026841007872e-05,1.61488256935919e-05,1.43043075345922e-05,1.52609063290127e-05,1.46699314500019e-05,2.0299952103232e-05,0.00306670170971682,39),
+(0,0,0,0,0,0,0,0,0,41),
+(0,0,0,0,0,0,0,0,0,17),
+(0,0,0,0,0,0,0,0,0,18),
+(2.51880677333017e-05,2.63051795435778e-05,2.79874748974906e-05,2.02888886670845e-05,1.8178636318197e-05,1.91308527003585e-05,1.83260023644133e-05,2.4422300558171e-05,1.96411467520551e-05,44),
+(2.22402118719591e-05,2.37546284320705e-05,2.58463051055541e-05,1.83391609130854e-05,1.6300720519646e-05,1.74559091886791e-05,1.63733785575587e-05,2.26616253279828e-05,1.79541237435621e-05,45),
+(3.01092775359837e-05,3.23865212934412e-05,4.09444584045994e-05,0,2.15470966302776e-05,2.39082636344032e-05,2.28296706429177e-05,2.9007671511595e-05,2.44201138973326e-05,46);
+FLUSH TABLES;
+--exec $MYISAMPACK -s $MYSQLTEST_VARDIR/master-data/test/t1
+--exec $MYISAMCHK -srq $MYSQLTEST_VARDIR/master-data/test/t1
+--exec $MYISAMCHK -s --unpack $MYSQLTEST_VARDIR/master-data/test/t1
+CHECK TABLE t1 EXTENDED;
+DROP TABLE t1;
diff --git a/mysql-test/t/mysql.test b/mysql-test/t/mysql.test
index 3ee04f32640..528337da77b 100644
--- a/mysql-test/t/mysql.test
+++ b/mysql-test/t/mysql.test
@@ -282,6 +282,15 @@ remove_file $MYSQLTEST_VARDIR/tmp/bug21412.sql;
#
--exec $MYSQL test -e "/*! \C latin1 */ select 1;"
+#
+# Bug#29323 mysql client only accetps ANSI encoded files
+#
+--write_file $MYSQLTEST_VARDIR/tmp/bug29323.sql
+select "This is a file starting with UTF8 BOM 0xEFBBBF";
+EOF
+--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug29323.sql 2>&1
+remove_file $MYSQLTEST_VARDIR/tmp/bug29323.sql;
+
--echo End of 5.0 tests
#
@@ -290,3 +299,21 @@ remove_file $MYSQLTEST_VARDIR/tmp/bug21412.sql;
--disable_query_log
--exec $MYSQL --server-arg=no-defaults test -e "quit"
--enable_query_log
+
+#
+# Bug #25146: Some warnings/errors not shown when using --show-warnings
+#
+
+# This one should succeed with no warnings
+--exec $MYSQL --show-warnings test -e "create table t1 (id int)"
+
+# This should succeed, with warnings about conversion from nonexistent engine
+--exec $MYSQL --show-warnings test -e "create table t2 (id int) engine=nonexistent"
+
+# This should fail, with warnings as well
+--error 1
+--exec $MYSQL --show-warnings test -e "create table t2 (id int) engine=nonexistent2"
+
+drop tables t1, t2;
+
+--echo End of tests
diff --git a/mysql-test/t/mysql_client_test.test b/mysql-test/t/mysql_client_test.test
index 66a27abd61a..7667522feaf 100644
--- a/mysql-test/t/mysql_client_test.test
+++ b/mysql-test/t/mysql_client_test.test
@@ -8,8 +8,8 @@
# server or run mysql-test-run --debug mysql_client_test and check
# var/log/mysql_client_test.trace
---exec echo "$MYSQL_CLIENT_TEST" > $MYSQLTEST_VARDIR/log/mysql_client_test.log 2>&1
---exec $MYSQL_CLIENT_TEST --getopt-ll-test=25600M >> $MYSQLTEST_VARDIR/log/mysql_client_test.log 2>&1
+--exec echo "$MYSQL_CLIENT_TEST" > $MYSQLTEST_VARDIR/log/mysql_client_test.out.log 2>&1
+--exec $MYSQL_CLIENT_TEST --getopt-ll-test=25600M >> $MYSQLTEST_VARDIR/log/mysql_client_test.out.log 2>&1
# End of 4.1 tests
echo ok;
diff --git a/mysql-test/t/mysql_comments.sql b/mysql-test/t/mysql_comments.sql
new file mode 100644
index 00000000000..2497c35e465
--- /dev/null
+++ b/mysql-test/t/mysql_comments.sql
@@ -0,0 +1,218 @@
+##============================================================================
+## Notes
+##============================================================================
+
+# Test case for Bug#11230
+
+# The point of this test is to make sure that '#', '-- ' and '/* ... */'
+# comments, as well as empty lines, are sent from the client to the server.
+# This is to ensure better error reporting, and to keep comments in the code
+# for stored procedures / functions / triggers (Bug#11230).
+# As a result, be careful when editing comments in this script, they do
+# matter.
+#
+# Also, note that this is a script for **mysql**, not mysqltest.
+# This is critical, as the mysqltest client interprets comments differently.
+
+##============================================================================
+## Setup
+##============================================================================
+
+## See mysql_comments.test for initial cleanup
+
+# Test tables
+#
+# t1 is reused throughout the file, and dropped at the end.
+#
+drop table if exists t1;
+create table t1 (
+ id char(16) not null default '',
+ data int not null
+);
+
+##============================================================================
+## Comments outside statements
+##============================================================================
+
+# Ignored 1a
+-- Ignored 1b
+/*
+ Ignored 1c
+*/
+
+select 1;
+
+##============================================================================
+## Comments inside statements
+##============================================================================
+
+select # comment 1a
+# comment 2a
+-- comment 2b
+/*
+ comment 2c
+*/
+2
+; # not strictly inside, but on same line
+# ignored
+
+##============================================================================
+## Comments inside functions
+##============================================================================
+
+drop function if exists foofct ;
+
+create function foofct (x char(20))
+returns char(20)
+/* not inside the body yet */
+return
+-- comment 1a
+# comment 1b
+/* comment 1c */
+x; # after body, on same line
+
+select foofct("call 1");
+
+show create function foofct;
+drop function foofct;
+
+delimiter |
+
+create function foofct(x char(20))
+returns char(20)
+begin
+ -- comment 1a
+ # comment 1b
+ /*
+ comment 1c
+ */
+
+ -- empty line below
+
+ -- empty line above
+ return x;
+end|
+
+delimiter ;
+
+select foofct("call 2");
+
+show create function foofct;
+drop function foofct;
+
+##============================================================================
+## Comments inside stored procedures
+##============================================================================
+
+# Empty statement
+drop procedure if exists empty;
+create procedure empty()
+begin
+end;
+
+call empty();
+show create procedure empty;
+drop procedure empty;
+
+drop procedure if exists foosp;
+
+## These comments are before the create, and will be lost
+# Comment 1a
+-- Comment 1b
+/*
+ Comment 1c
+ */
+create procedure foosp()
+/* Comment not quiet in the body yet */
+ insert into test.t1
+## These comments are part of the procedure body, and should be kept.
+# Comment 2a
+-- Comment 2b
+/* Comment 2c */
+ -- empty line below
+
+ -- empty line above
+ values ("foo", 42); # comment 3, still part of the body
+## After the ';', therefore not part of the body
+# comment 4a
+-- Comment 4b
+/*
+ Comment 4c
+ */
+
+call foosp();
+select * from t1;
+delete from t1;
+show create procedure foosp;
+drop procedure foosp;
+
+drop procedure if exists nicesp;
+
+delimiter |
+
+create procedure nicesp(a int)
+begin
+ -- declare some variables here
+ declare b int;
+ declare c float;
+
+ -- do more stuff here
+ -- commented nicely and so on
+
+ -- famous last words ...
+end|
+
+delimiter ;
+
+show create procedure nicesp;
+drop procedure nicesp;
+
+##============================================================================
+## Comments inside triggers
+##============================================================================
+
+drop trigger if exists t1_empty;
+
+create trigger t1_empty after delete on t1
+for each row
+begin
+end;
+
+show create trigger t1_empty;
+
+drop trigger if exists t1_bi;
+
+delimiter |
+
+create trigger t1_bi before insert on t1
+for each row
+begin
+# comment 1a
+-- comment 1b
+/*
+ comment 1c
+*/
+ -- declare some variables here
+ declare b int;
+ declare c float;
+
+ -- do more stuff here
+ -- commented nicely and so on
+
+ -- famous last words ...
+ set NEW.data := 12;
+end|
+
+delimiter ;
+
+show create trigger t1_bi;
+
+# also make sure the trigger still works
+insert into t1(id) value ("trig");
+select * from t1;
+
+##============================================================================
+## Cleanup
+##============================================================================
+
+drop table t1;
diff --git a/mysql-test/t/mysql_comments.test b/mysql-test/t/mysql_comments.test
new file mode 100644
index 00000000000..1f997aeb1ab
--- /dev/null
+++ b/mysql-test/t/mysql_comments.test
@@ -0,0 +1,37 @@
+# This test should work in embedded server after we fix mysqltest
+-- source include/not_embedded.inc
+###################### mysql_comments.test #############################
+# #
+# Testing of comments handling by the command line client (mysql) #
+# #
+# Creation: #
+# 2007-10-29 akopytov Implemented this test as a part of fixes for #
+# bug #26215 and bug #11230 #
+# #
+########################################################################
+
+#
+# Bug #11230: Keeping comments when storing stored procedures
+#
+
+# See the content of mysql_comments.sql
+# Set the test database to a known state before running the tests.
+--disable_warnings
+drop table if exists t1;
+drop function if exists foofct;
+drop procedure if exists empty;
+drop procedure if exists foosp;
+drop procedure if exists nicesp;
+drop trigger if exists t1_empty;
+drop trigger if exists t1_bi;
+--enable_warnings
+
+# Test without comments
+--echo "Pass 1 : --disable-comments"
+--exec $MYSQL --disable-comments test 2>&1 < "./t/mysql_comments.sql"
+
+# Test with comments
+--echo "Pass 2 : --enable-comments"
+--exec $MYSQL --enable-comments test 2>&1 < "./t/mysql_comments.sql"
+
+--echo End of 5.0 tests
diff --git a/mysql-test/t/mysqlbinlog.test b/mysql-test/t/mysqlbinlog.test
index 25bd9a402ae..1afc105e34e 100644
--- a/mysql-test/t/mysqlbinlog.test
+++ b/mysql-test/t/mysqlbinlog.test
@@ -240,6 +240,10 @@ let $c= `select $a=$b`;
--echo $c
drop table t1;
+echo shell> mysqlbinlog std_data/corrupt-relay-bin.000624 > var/tmp/bug31793.sql;
+error 1;
+exec $MYSQL_BINLOG $MYSQL_TEST_DIR/std_data/corrupt-relay-bin.000624 > $MYSQLTEST_VARDIR/tmp/bug31793.sql;
+
--echo End of 5.0 tests
#
@@ -250,4 +254,32 @@ flush logs;
--exec $MYSQL_BINLOG $MYSQLTEST_VARDIR/log/master-bin.000016 >/dev/null 2>/dev/null
--exec $MYSQL_BINLOG --force-if-open $MYSQLTEST_VARDIR/log/master-bin.000016 >/dev/null 2>/dev/null
+--echo BUG#31611: Security risk with BINLOG statement
+
+SET BINLOG_FORMAT=ROW;
+CREATE DATABASE mysqltest1;
+CREATE USER untrusted@localhost;
+GRANT SELECT ON mysqltest1.* TO untrusted@localhost;
+
+SHOW GRANTS FOR untrusted@localhost;
+USE mysqltest1;
+CREATE TABLE t1 (a INT, b CHAR(64));
+flush logs;
+INSERT INTO t1 VALUES (1,USER());
+flush logs;
+echo mysqlbinlog var/log/master-bin.000017 > var/tmp/bug31611.sql;
+exec $MYSQL_BINLOG $MYSQLTEST_VARDIR/log/master-bin.000017 > $MYSQLTEST_VARDIR/tmp/bug31611.sql;
+connect (unsecure,localhost,untrusted,,mysqltest1);
+echo mysql mysqltest1 -uuntrusted < var/tmp/bug31611.sql;
+error 1;
+exec $MYSQL mysqltest1 -uuntrusted < $MYSQLTEST_VARDIR/tmp/bug31611.sql;
+connection unsecure;
+error ER_TABLEACCESS_DENIED_ERROR;
+INSERT INTO t1 VALUES (1,USER());
+
+SELECT * FROM t1;
+connection default;
+DROP DATABASE mysqltest1;
+DROP USER untrusted@localhost;
+
--echo End of 5.1 tests
diff --git a/mysql-test/t/mysqlcheck.test b/mysql-test/t/mysqlcheck.test
index d233546f9e3..6a7f44b4dbe 100644
--- a/mysql-test/t/mysqlcheck.test
+++ b/mysql-test/t/mysqlcheck.test
@@ -11,7 +11,7 @@
#
--disable_warnings
-DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t1, `t``1`, `t 1`;
drop view if exists v1;
drop database if exists client_test_db;
--enable_warnings
@@ -37,4 +37,26 @@ create view v1 as select * from t1;
drop view v1;
drop table t1;
+#
+# Bug #30654: mysqlcheck fails during upgrade of tables whose names include backticks
+#
+create table `t``1`(a int);
+create table `t 1`(a int);
+--replace_result 'Table is already up to date' OK
+--exec $MYSQL_CHECK --databases test
+drop table `t``1`, `t 1`;
+
--echo End of 5.0 tests
+
+#
+# Bug #30679: 5.1 name encoding not performed for views during upgrade
+#
+create table t1(a int);
+create view v1 as select * from t1;
+show tables;
+--copy_file $MYSQLTEST_VARDIR/master-data/test/v1.frm $MYSQLTEST_VARDIR/master-data/test/v-1.frm
+show tables;
+--exec $MYSQL_CHECK --check-upgrade --fix-table-names --databases test
+show tables;
+drop view v1, `v-1`;
+drop table t1;
diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test
index a2e0ec20984..eb08737dfcc 100644
--- a/mysql-test/t/mysqldump.test
+++ b/mysql-test/t/mysqldump.test
@@ -1577,6 +1577,23 @@ SELECT * FROM t2;
DROP TABLE t1,t2;
--echo #
+--echo # Bug#29815: new option for suppressing last line of mysqldump:
+--echo # "Dump completed on"
+--echo #
+
+--echo # --skip-dump-date:
+--replace_regex /-- [^D][^u][^m][^p].*// /\/\*!.*//
+--exec $MYSQL_DUMP --skip-dump-date test
+
+--echo # --dump-date:
+--replace_regex /-- [^D][^u][^m][^p].*// /\/\*!.*// / on [0-9 :-]+/ on DATE/
+--exec $MYSQL_DUMP --dump-date test
+
+--echo # --dump-date (default):
+--replace_regex /-- [^D][^u][^m][^p].*// /\/\*!.*// / on [0-9 :-]+/ on DATE/
+--exec $MYSQL_DUMP test
+
+--echo #
--echo # End of 5.0 tests
--echo #
@@ -1771,6 +1788,18 @@ TRUNCATE mysql.event;
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug29938.sql
SHOW EVENTS;
+
+--echo #
+--echo # Bug#31113 mysqldump 5.1 can't handle a dash ("-") in database names
+--echo #
+create database `test-database`;
+use `test-database`;
+create table test (a int);
+--exec $MYSQL_DUMP --compact --opt --quote-names test-database
+drop database `test-database`;
+use test;
+
+
--echo #
--echo # End of 5.1 tests
--echo #
diff --git a/mysql-test/t/mysqlslap.test b/mysql-test/t/mysqlslap.test
index dffa226d101..28042f62fe6 100644
--- a/mysql-test/t/mysqlslap.test
+++ b/mysql-test/t/mysqlslap.test
@@ -40,3 +40,16 @@
--exec $MYSQL_SLAP --only-print --delimiter=";" --query="select * from t1;select * from t2" --create="CREATE TABLE t1 (id int, name varchar(64)); create table t2(foo1 varchar(32), foo2 varchar(32)); INSERT INTO t1 VALUES (1, 'This is a test'); insert into t2 values ('test', 'test2')" --engine="heap,myisam" --post-query="SHOW TABLES" --pre-query="SHOW TABLES" --number-of-queries=6 --commit=1;
--exec $MYSQL_SLAP --silent --concurrency=5 --iterations=1 --number-int-cols=2 --number-char-cols=3 --auto-generate-sql --auto-generate-sql-add-autoincrement --auto-generate-sql-load-type=write --detach=2
+
+--echo #
+--echo # Bug #29985: mysqlslap -- improper handling of resultsets in SPROCs
+--echo #
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS p1;
+--enable_warnings
+CREATE PROCEDURE p1() SELECT 1;
+
+--exec $MYSQL_SLAP --create-schema=test --delimiter=";" --query="CALL p1; SELECT 1;" --silent 2>&1
+
+DROP PROCEDURE p1;
diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test
index 8a38972c00f..d0c8c0b4e38 100644
--- a/mysql-test/t/mysqltest.test
+++ b/mysql-test/t/mysqltest.test
@@ -1435,7 +1435,10 @@ select "this will be executed";
--exec $MYSQL_TEST -x $MYSQLTEST_VARDIR/tmp/query.sql -R $MYSQLTEST_VARDIR/tmp/zero_length_file.result > /dev/null 2>&1
remove_file $MYSQLTEST_VARDIR/tmp/zero_length_file.result;
+--error 0,1
remove_file $MYSQLTEST_VARDIR/log/zero_length_file.reject;
+--error 0,1
+remove_file $MYSQL_TEST_DIR/r/zero_length_file.reject;
#
# Test that a test file that does not generate any output fails.
@@ -2080,5 +2083,23 @@ eval $show_statement;
drop table t1;
+# ----------------------------------------------------------------------------
+# Test change_user command
+# ----------------------------------------------------------------------------
+
+--error 1
+--exec echo "--change_user root,,inexistent" | $MYSQL_TEST 2>&1
+
+--error 1
+--exec echo "--change_user inexistent,,test" | $MYSQL_TEST 2>&1
+
+--error 1
+--exec echo "--change_user root,inexistent,test" | $MYSQL_TEST 2>&1
+
+--change_user
+--change_user root
+--change_user root,,
+--change_user root,,test
+
--echo End of tests
diff --git a/mysql-test/t/named_pipe-master.opt b/mysql-test/t/named_pipe-master.opt
new file mode 100644
index 00000000000..e534ae1eae5
--- /dev/null
+++ b/mysql-test/t/named_pipe-master.opt
@@ -0,0 +1 @@
+--loose-enable-named-pipe
diff --git a/mysql-test/t/named_pipe.test b/mysql-test/t/named_pipe.test
new file mode 100644
index 00000000000..e3dfd24bb52
--- /dev/null
+++ b/mysql-test/t/named_pipe.test
@@ -0,0 +1,14 @@
+# We currently only have named pipe support on windows, so
+# in order to optimize things we skip this test on all
+# other platforms
+--source include/windows.inc
+
+# Only run this test if named pipe is avaliable
+let $nmp= query_get_value("SHOW VARIABLES LIKE 'named_pipe'", Value, 1);
+if (`SELECT '$nmp' != 'ON'`){
+ skip No named pipe support;
+}
+
+# Source select test case
+-- source include/common-tests.inc
+
diff --git a/mysql-test/t/no-threads.test b/mysql-test/t/no-threads.test
index 806cf24e961..31ea6406ee9 100644
--- a/mysql-test/t/no-threads.test
+++ b/mysql-test/t/no-threads.test
@@ -3,3 +3,4 @@
#
select 1+1;
select 1+2;
+SHOW GLOBAL VARIABLES LIKE 'thread_handling';
diff --git a/mysql-test/t/null.test b/mysql-test/t/null.test
index 65e09b006ec..2878b54c357 100644
--- a/mysql-test/t/null.test
+++ b/mysql-test/t/null.test
@@ -1,6 +1,6 @@
# Initialise
--disable_warnings
-drop table if exists t1;
+drop table if exists t1, t2;
--enable_warnings
#
@@ -231,4 +231,27 @@ drop table bug19145a;
drop table bug19145b;
drop table bug19145c;
-# End of 4.1 tests
+--echo # End of 4.1 tests
+
+--echo #
+--echo # Bug #31471: decimal_bin_size: Assertion `scale >= 0 &&
+--echo # precision > 0 && scale <= precision'
+--echo #
+
+CREATE TABLE t1 (a DECIMAL (1, 0) ZEROFILL, b DECIMAL (1, 0) ZEROFILL);
+INSERT INTO t1 (a, b) VALUES (0, 0);
+
+CREATE TABLE t2 SELECT IFNULL(a, b) FROM t1;
+DESCRIBE t2;
+DROP TABLE t2;
+
+CREATE TABLE t2 SELECT IFNULL(a, NULL) FROM t1;
+DESCRIBE t2;
+DROP TABLE t2;
+
+CREATE TABLE t2 SELECT IFNULL(NULL, b) FROM t1;
+DESCRIBE t2;
+
+DROP TABLE t1, t2;
+
+--echo # End of 5.0 tests
diff --git a/mysql-test/t/olap.test b/mysql-test/t/olap.test
index 05934bff492..d1e40024733 100644
--- a/mysql-test/t/olap.test
+++ b/mysql-test/t/olap.test
@@ -358,3 +358,21 @@ SELECT * FROM (SELECT a, SUM(a) FROM t1 GROUP BY a WITH ROLLUP) as t;
DROP TABLE t1;
+--echo #
+--echo # Bug#31095: Unexpected NULL constant caused server crash.
+--echo #
+create table t1(a int);
+insert into t1 values (1),(2),(3);
+select count(a) from t1 group by null with rollup;
+drop table t1;
+--echo ##############################################################
+
+#
+# Bug #32558: group by null-returning expression with rollup causes crash
+#
+CREATE TABLE t1(a INT);
+INSERT INTO t1 VALUES(0);
+SELECT 1 FROM t1 GROUP BY (DATE(NULL)) WITH ROLLUP;
+DROP TABLE t1;
+
+--echo End of 5.0 tests
diff --git a/mysql-test/t/order_by.test b/mysql-test/t/order_by.test
index 37398616299..71238504d36 100644
--- a/mysql-test/t/order_by.test
+++ b/mysql-test/t/order_by.test
@@ -779,3 +779,60 @@ EXPLAIN SELECT id,c3 FROM t2 WHERE c2 BETWEEN 20 AND 30 ORDER BY c3 LIMIT 4000;
SELECT id,c3 FROM t2 WHERE c2=11 ORDER BY c3 LIMIT 20;
DROP TABLE t1,t2;
+
+#
+# Bug #30665: Inconsistent optimization of IGNORE INDEX FOR {ORDER BY|GROUP BY}
+#
+CREATE TABLE t1 (
+ a INT,
+ b INT,
+ PRIMARY KEY (a),
+ KEY ab(a, b)
+);
+INSERT INTO t1 VALUES (1,1),(2,2),(3,3),(4,4);
+INSERT INTO t1 SELECT a + 4, b + 4 FROM t1;
+INSERT INTO t1 SELECT a + 8, b + 8 FROM t1;
+INSERT INTO t1 SELECT a +16, b +16 FROM t1;
+INSERT INTO t1 SELECT a +32, b +32 FROM t1;
+INSERT INTO t1 SELECT a +64, b +64 FROM t1;
+
+EXPLAIN SELECT a FROM t1 IGNORE INDEX FOR GROUP BY (a, ab) GROUP BY a;
+
+--disable_query_log
+--let $q = `show status like 'Created_tmp_tables';`
+eval set @tmp_tables_before =
+ CAST(REPLACE('$q', 'Created_tmp_tables', '') AS UNSIGNED);
+--enable_query_log
+
+SELECT a FROM t1 IGNORE INDEX FOR GROUP BY (a, ab) GROUP BY a;
+
+# this query creates one temporary table in itself, which we are not
+# interested in.
+
+--disable_query_log
+--let $q = `show status like 'Created_tmp_tables';`
+eval set @tmp_tables_after =
+ CAST(REPLACE('$q', 'Created_tmp_tables', '') AS UNSIGNED);
+--enable_query_log
+
+SELECT @tmp_tables_after = @tmp_tables_before ;
+
+EXPLAIN SELECT a FROM t1 IGNORE INDEX FOR ORDER BY (a, ab) ORDER BY a;
+
+--disable_query_log
+--let $q = `show status like 'Created_tmp_tables';`
+eval set @tmp_tables_before =
+ CAST(REPLACE('$q', 'Created_tmp_tables', '') AS UNSIGNED);
+--enable_query_log
+
+SELECT a FROM t1 IGNORE INDEX FOR ORDER BY (a, ab) ORDER BY a;
+
+--disable_query_log
+--let $q = `show status like 'Created_tmp_tables';`
+eval set @tmp_tables_after =
+ CAST(REPLACE('$q', 'Created_tmp_tables', '') AS UNSIGNED);
+--enable_query_log
+
+SELECT @tmp_tables_after = @tmp_tables_before;
+
+DROP TABLE t1;
diff --git a/mysql-test/t/order_fill_sortbuf-master.opt b/mysql-test/t/order_fill_sortbuf-master.opt
index 116494d4588..9aa3cc76221 100644
--- a/mysql-test/t/order_fill_sortbuf-master.opt
+++ b/mysql-test/t/order_fill_sortbuf-master.opt
@@ -1 +1 @@
---set-variable=sort_buffer=0
+--set-variable=sort_buffer=32804
diff --git a/mysql-test/t/outfile_loaddata.test b/mysql-test/t/outfile_loaddata.test
new file mode 100644
index 00000000000..2a120871e7d
--- /dev/null
+++ b/mysql-test/t/outfile_loaddata.test
@@ -0,0 +1,113 @@
+--disable_warnings
+DROP TABLE IF EXISTS t1, t2;
+--enable_warnings
+
+--echo #
+--echo # Bug#31663 FIELDS TERMINATED BY special character
+--echo #
+
+CREATE TABLE t1 (i1 int, i2 int, c1 VARCHAR(256), c2 VARCHAR(256));
+INSERT INTO t1 VALUES (101, 202, '-r-', '=raker=');
+
+--let $fields=*
+--let $clauses=FIELDS TERMINATED BY 'raker'
+--echo # $clauses, warning:
+
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--eval SELECT $fields INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/bug31663.txt' $clauses FROM t1
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--eval SELECT LOAD_FILE('$MYSQLTEST_VARDIR/tmp/bug31663.txt')
+--eval CREATE TABLE t2 SELECT $fields FROM t1
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/bug31663.txt' INTO TABLE t2 $clauses
+--eval SELECT $fields FROM t2
+--remove_file $MYSQLTEST_VARDIR/tmp/bug31663.txt
+DROP TABLE t2;
+
+--let $fields=i1, i2
+--let $clauses=FIELDS TERMINATED BY 'r'
+--echo # Only numeric fields, $clauses, no warnings:
+
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--eval SELECT $fields INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/bug31663.txt' $clauses FROM t1
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--eval SELECT LOAD_FILE('$MYSQLTEST_VARDIR/tmp/bug31663.txt')
+--eval CREATE TABLE t2 SELECT $fields FROM t1
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/bug31663.txt' INTO TABLE t2 $clauses
+--eval SELECT $fields FROM t2
+--remove_file $MYSQLTEST_VARDIR/tmp/bug31663.txt
+DROP TABLE t2;
+
+--let $fields=*
+--let $clauses=FIELDS TERMINATED BY '0'
+--echo # $clauses, warning:
+
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--eval SELECT $fields INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/bug31663.txt' $clauses FROM t1
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--eval SELECT LOAD_FILE('$MYSQLTEST_VARDIR/tmp/bug31663.txt')
+--eval CREATE TABLE t2 SELECT $fields FROM t1
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/bug31663.txt' INTO TABLE t2 $clauses
+--eval SELECT $fields FROM t2
+--remove_file $MYSQLTEST_VARDIR/tmp/bug31663.txt
+DROP TABLE t2;
+
+--let $fields=*
+--let $clauses=FIELDS OPTIONALLY ENCLOSED BY '"' TERMINATED BY '0'
+--echo # $clauses, warning:
+
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--eval SELECT $fields INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/bug31663.txt' $clauses FROM t1
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--eval SELECT LOAD_FILE('$MYSQLTEST_VARDIR/tmp/bug31663.txt')
+--eval CREATE TABLE t2 SELECT $fields FROM t1
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/bug31663.txt' INTO TABLE t2 $clauses
+--eval SELECT $fields FROM t2
+--remove_file $MYSQLTEST_VARDIR/tmp/bug31663.txt
+DROP TABLE t2;
+
+--let $fields=c1, c2
+--let $clauses=FIELDS OPTIONALLY ENCLOSED BY '"' TERMINATED BY '0'
+--echo # Only string fields, $clauses, no warnings:
+
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--eval SELECT $fields INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/bug31663.txt' $clauses FROM t1
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--eval SELECT LOAD_FILE('$MYSQLTEST_VARDIR/tmp/bug31663.txt')
+--eval CREATE TABLE t2 SELECT $fields FROM t1
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/bug31663.txt' INTO TABLE t2 $clauses
+--eval SELECT $fields FROM t2
+--remove_file $MYSQLTEST_VARDIR/tmp/bug31663.txt
+DROP TABLE t2;
+
+DROP TABLE t1;
+
+--echo #
+--echo # Bug#32533: SELECT INTO OUTFILE never escapes multibyte character
+--echo #
+
+CREATE TABLE t1 (c1 VARCHAR(256));
+INSERT INTO t1 VALUES (0xC3);
+SELECT HEX(c1) FROM t1;
+
+--let $file=$MYSQLTEST_VARDIR/tmp/bug32533.txt
+
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--eval SELECT * INTO OUTFILE '$file' FIELDS ENCLOSED BY 0xC3 FROM t1
+TRUNCATE t1;
+
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--eval SELECT HEX(LOAD_FILE('$file'))
+
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--eval LOAD DATA INFILE '$file' INTO TABLE t1 FIELDS ENCLOSED BY 0xC3
+SELECT HEX(c1) FROM t1;
+
+--remove_file $file
+DROP TABLE t1;
+
+--echo # End of 5.0 tests.
diff --git a/mysql-test/t/parser.test b/mysql-test/t/parser.test
index 79c9129bb74..9170308a4f2 100644
--- a/mysql-test/t/parser.test
+++ b/mysql-test/t/parser.test
@@ -629,3 +629,31 @@ select atan(10, 20 "p2");
-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
select atan(10 AS p1, 20 AS p2);
+#
+# Bug#22312 Syntax error in expression with INTERVAL()
+#
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+SELECT STR_TO_DATE('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE;
+SELECT STR_TO_DATE('10:00 PM', '%h:%i %p') + INTERVAL (INTERVAL(1,2,3) + 1) MINUTE;
+SELECT "1997-12-31 23:59:59" + INTERVAL 1 SECOND;
+SELECT 1 + INTERVAL(1,0,1,2) + 1;
+SELECT INTERVAL(1^1,0,1,2) + 1;
+SELECT INTERVAL(1,0+1,2,3) * 5.5;
+SELECT INTERVAL(3,3,1+3,4+4) / 0.5;
+SELECT (INTERVAL(1,0,1,2) + 5) * 7 + INTERVAL(1,0,1,2) / 2;
+SELECT INTERVAL(1,0,1,2) + 1, 5 * INTERVAL(1,0,1,2);
+SELECT INTERVAL(0,(1*5)/2) + INTERVAL(5,4,3);
+
+--disable_warnings
+SELECT 1^1 + INTERVAL 1+1 SECOND & 1 + INTERVAL 1+1 SECOND;
+SELECT 1%2 - INTERVAL 1^1 SECOND | 1%2 - INTERVAL 1^1 SECOND;
+--enable_warnings
+
+CREATE TABLE t1 (a INT, b DATETIME);
+INSERT INTO t1 VALUES (INTERVAL(3,2,1) + 1, "1997-12-31 23:59:59" + INTERVAL 1 SECOND);
+SELECT * FROM t1 WHERE a = INTERVAL(3,2,1) + 1;
+DROP TABLE t1;
diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test
index 42db23dadef..23d6c5f8865 100644
--- a/mysql-test/t/partition.test
+++ b/mysql-test/t/partition.test
@@ -1,30 +1,79 @@
#--disable_abort_on_error
#
# Simple test for the partition storage engine
-# Taken fromm the select test
+# taken from the select test.
#
--- source include/have_partition.inc
+# Last update:
+# 2007-10-22 mleich - Move ARCHIVE, BLACKHOLE and CSV related sub tests to
+# new tests. Reason: All these might be not available.
+# - Minor cleanup
+#
+--source include/have_partition.inc
--disable_warnings
drop table if exists t1;
--enable_warnings
#
+# Bug #30695: An apostrophe ' in the comment of the ADD PARTITION causes the Server to crash.
+#
+# To verify the fix for crashing (on unix-type OS)
+# uncomment the exec and error rows!
+
+CREATE TABLE t1 (
+ d DATE NOT NULL
+)
+PARTITION BY RANGE( YEAR(d) ) (
+ PARTITION p0 VALUES LESS THAN (1960),
+ PARTITION p1 VALUES LESS THAN (1970),
+ PARTITION p2 VALUES LESS THAN (1980),
+ PARTITION p3 VALUES LESS THAN (1990)
+);
+
+ALTER TABLE t1 ADD PARTITION (
+PARTITION `p5` VALUES LESS THAN (2010)
+COMMENT 'APSTART \' APEND'
+);
+#--exec sed 's/APSTART \\/APSTART /' var/master-data/test/t1.frm > tmpt1.frm && mv tmpt1.frm var/master-data/test/t1.frm
+#--error 1064
+SELECT * FROM t1 LIMIT 1;
+
+DROP TABLE t1;
+
+#
+# Bug 30878: crashing when alter an auto_increment non partitioned
+# table to partitioned
+
+create table t1 (id int auto_increment, s1 int, primary key (id));
+
+insert into t1 values (null,1);
+insert into t1 values (null,6);
+
+select * from t1;
+
+alter table t1 partition by range (id) (
+ partition p0 values less than (3),
+ partition p1 values less than maxvalue
+);
+
+drop table t1;
+
+#
# Bug 15890: Strange number of partitions accepted
#
--- error 1064
+-- error ER_PARSE_ERROR
create table t1 (a int)
partition by key(a)
partitions 0.2+e1;
--- error 1064
+-- error ER_PARSE_ERROR
create table t1 (a int)
partition by key(a)
partitions -1;
--- error 1064
+-- error ER_PARSE_ERROR
create table t1 (a int)
partition by key(a)
partitions 1.5;
--- error 1064
+-- error ER_PARSE_ERROR
create table t1 (a int)
partition by key(a)
partitions 1e+300;
@@ -32,7 +81,7 @@ partitions 1e+300;
#
# Bug 21350: Data Directory problems
#
--- error 1103
+-- error ER_WRONG_TABLE_NAME
create table t1 (a int)
partition by key (a)
(partition p0 DATA DIRECTORY 'part-data' INDEX DIRECTORY 'part-data');
@@ -41,7 +90,7 @@ partition by key (a)
# Insert a test that manages to create the first partition and fails with
# the second, ensure that we clean up afterwards in a proper manner.
#
---error 1103
+--error ER_WRONG_TABLE_NAME
create table t1 (a int)
partition by key (a)
(partition p0,
@@ -63,23 +112,14 @@ drop procedure pz;
drop table t1;
#
-# Bug 19307: CSV engine crashes
-#
---error ER_PARTITION_MERGE_ERROR
-create table t1 (a int)
-engine = csv
-partition by list (a)
-(partition p0 values in (null));
-
-#
# BUG 16002: Handle unsigned integer functions properly
#
---error 1064
+--error ER_PARSE_ERROR
create table t1 (a bigint)
partition by range (a)
(partition p0 values less than (0xFFFFFFFFFFFFFFFF),
partition p1 values less than (10));
---error 1064
+--error ER_PARSE_ERROR
create table t1 (a bigint)
partition by list (a)
(partition p0 values in (0xFFFFFFFFFFFFFFFF),
@@ -101,15 +141,6 @@ select * from t1 where (a + 1) > 10;
drop table t1;
#
-# Bug 19307: CSV engine crashes
-#
---error ER_PARTITION_MERGE_ERROR
-create table t1 (a int)
-engine = csv
-partition by list (a)
-(partition p0 values in (null));
-
-#
# Added test case
#
create table t1 (a int)
@@ -342,6 +373,16 @@ select * from t1 where a = 4;
drop table t1;
#
+# Bug#22351 - handler::index_next_same() call to key_cmp_if_same()
+# uses the wrong buffer
+#
+CREATE TABLE t1 (c1 INT, c2 INT, PRIMARY KEY USING BTREE (c1,c2)) ENGINE=MEMORY
+ PARTITION BY KEY(c2,c1) PARTITIONS 4;
+INSERT INTO t1 VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6);
+SELECT * FROM t1 WHERE c1 = 4;
+DROP TABLE t1;
+
+#
# Bug #13438: Engine clause in PARTITION clause causes crash
#
CREATE TABLE t1 (a int)
@@ -413,34 +454,6 @@ analyze table t1;
drop table t1;
#
-# BUG 14524
-#
-# Disable warnings to allow this test case to work without
-# the Blackhole engine.
---disable_warnings
-CREATE TABLE `t1` (
- `id` int(11) default NULL
-) ENGINE=BLACKHOLE DEFAULT CHARSET=latin1 PARTITION BY HASH (id) ;
---enable_warnings
-SELECT * FROM t1;
-
-drop table t1;
-
-#
-# BUG 14524
-#
-# Disable warnings to allow this test case to work without
-# the Blackhole engine.
---disable_warnings
-CREATE TABLE `t1` (
- `id` int(11) default NULL
-) ENGINE=BLACKHOLE DEFAULT CHARSET=latin1 PARTITION BY HASH (id) ;
---enable_warnings
-SELECT * FROM t1;
-
-drop table t1;
-
-#
# BUG 15221 (Cannot reorganize with the same name)
#
create table t1
@@ -766,7 +779,7 @@ create table t1 (a int)
partition by list (a)
(partition p0 values in (1));
---error 1064
+--error ER_PARSE_ERROR
alter table t1 rebuild partition;
drop table t1;
@@ -810,14 +823,14 @@ drop table t1;
#
# BUG 15407 Crash with subpartition
#
---error 1064
+--error ER_PARSE_ERROR
create table t1 (a int, b int)
partition by range (a)
subpartition by hash(a)
(partition p0 values less than (0) (subpartition sp0),
partition p1 values less than (1));
---error 1064
+--error ER_PARSE_ERROR
create table t1 (a int, b int)
partition by range (a)
subpartition by hash(a)
@@ -875,7 +888,7 @@ create table t1 (a int)
partition by list (a)
(partition p0 values in (1));
---error 1064
+--error ER_PARSE_ERROR
alter table t1 rebuild partition;
drop table t1;
@@ -937,7 +950,7 @@ drop table t1;
#
prepare stmt1 from 'create table t1 (s1 int) partition by hash (s1)';
execute stmt1;
---error 1050
+--error ER_TABLE_EXISTS_ERROR
execute stmt1;
drop table t1;
@@ -1126,7 +1139,7 @@ PARTITION BY LIST (a)
SHOW CREATE TABLE t1;
DROP TABLE t1;
---error 1064
+--error ER_PARSE_ERROR
CREATE TABLE t1 (a int)
PARTITION BY RANGE(a)
(PARTITION p0 VALUES LESS THAN (NULL));
@@ -1222,23 +1235,6 @@ OPTIMIZE TABLE t1;
drop table t1;
#
-# Bug 17310 Partitions: Bugs with archived partitioned tables
-#
-create database db99;
-use db99;
-create table t1 (a int not null)
-engine=archive
-partition by list (a)
-(partition p0 values in (1), partition p1 values in (2));
-insert into t1 values (1), (2);
---error 0, 1005
-create index inx on t1 (a);
-alter table t1 add partition (partition p2 values in (3));
-alter table t1 drop partition p2;
-use test;
-drop database db99;
-
-#
#BUG 17138 Problem with stored procedure and analyze partition
#
--disable_warnings
@@ -1481,6 +1477,15 @@ ALTER TABLE t1 DROP PARTITION p1;
DROP TABLE t1;
#
+# Bug #30484: Partitions: crash with self-referencing trigger
+#
+
+create table t (s1 int) engine=myisam partition by key (s1);
+create trigger t_ad after delete on t for each row insert into t values (old.s1);
+insert into t values (1);
+drop table t;
+
+#
# Bug #27816: Log tables ran with partitions crashes the server when logging
# is enabled.
#
@@ -1493,10 +1498,165 @@ ALTER TABLE general_log PARTITION BY RANGE (TO_DAYS(event_time))
(PARTITION p0 VALUES LESS THAN (733144), PARTITION p1 VALUES LESS THAN (3000000));
ALTER TABLE general_log ENGINE = CSV;
SET GLOBAL general_log = default;
+use test;
#
# Bug #27084 partitioning by list seems failing when using case
# BUG #18198: Case no longer supported, test case removed
#
+create table t2 (b int);
+--error ER_BAD_FIELD_ERROR
+create table t1 (b int)
+PARTITION BY RANGE (t2.b) (
+ PARTITION p1 VALUES LESS THAN (10),
+ PARTITION p2 VALUES LESS THAN (20)
+) select * from t2;
+create table t1 (a int)
+PARTITION BY RANGE (b) (
+ PARTITION p1 VALUES LESS THAN (10),
+ PARTITION p2 VALUES LESS THAN (20)
+) select * from t2;
+show create table t1;
+drop table t1, t2;
+
+#
+# Bug #32067 Partitions: crash with timestamp column
+# this bug occurs randomly on some UPDATE statement
+# with the '1032: Can't find record in 't1'' error
+
+create table t1
+ (s1 timestamp on update current_timestamp, s2 int)
+ partition by key(s1) partitions 3;
+
+insert into t1 values (null,null);
+--disable_query_log
+let $cnt= 1000;
+while ($cnt)
+{
+ update t1 set s2 = 1;
+ update t1 set s2 = 2;
+ dec $cnt;
+}
+--enable_query_log
+
+drop table t1;
+
+#
+# BUG#32272: partition crash 1: enum column
+#
+create table t1 (
+ c0 int,
+ c1 bigint,
+ c2 set('sweet'),
+ key (c2,c1,c0),
+ key(c0)
+) engine=myisam partition by hash (month(c0)) partitions 5;
+
+--disable_warnings
+insert ignore into t1 set c0 = -6502262, c1 = 3992917, c2 = 35019;
+insert ignore into t1 set c0 = 241221, c1 = -6862346, c2 = 56644;
+--enable_warnings
+# This must not fail assert:
+select c1 from t1 group by (select c0 from t1 limit 1);
+drop table t1;
+
+# Bug #30495: optimize table t1,t2,t3 extended errors
+#
+CREATE TABLE t1(a int)
+PARTITION BY RANGE (a) (
+ PARTITION p1 VALUES LESS THAN (10),
+ PARTITION p2 VALUES LESS THAN (20)
+);
+--error 1064
+ALTER TABLE t1 OPTIMIZE PARTITION p1 EXTENDED;
+--error 1064
+ALTER TABLE t1 ANALYZE PARTITION p1 EXTENDED;
+DROP TABLE t1;
+
+#
+# Bug #29258: Partitions: search fails for maximum unsigned bigint
+#
+CREATE TABLE t1 (s1 BIGINT UNSIGNED)
+ PARTITION BY RANGE (s1) (
+ PARTITION p0 VALUES LESS THAN (0),
+ PARTITION p1 VALUES LESS THAN (1),
+ PARTITION p2 VALUES LESS THAN (18446744073709551615)
+);
+INSERT INTO t1 VALUES (0), (18446744073709551614);
+--error ER_NO_PARTITION_FOR_GIVEN_VALUE
+INSERT INTO t1 VALUES (18446744073709551615);
+DROP TABLE t1;
+
+CREATE TABLE t1 (s1 BIGINT UNSIGNED)
+ PARTITION BY RANGE (s1) (
+ PARTITION p0 VALUES LESS THAN (0),
+ PARTITION p1 VALUES LESS THAN (1),
+ PARTITION p2 VALUES LESS THAN (18446744073709551614),
+ PARTITION p3 VALUES LESS THAN MAXVALUE
+);
+INSERT INTO t1 VALUES (-1), (0), (18446744073709551613),
+ (18446744073709551614), (18446744073709551615);
+SELECT * FROM t1;
+SELECT * FROM t1 WHERE s1 = 0;
+SELECT * FROM t1 WHERE s1 = 18446744073709551614;
+SELECT * FROM t1 WHERE s1 = 18446744073709551615;
+DROP TABLE t1;
+
+CREATE TABLE t1 (s1 BIGINT UNSIGNED)
+ PARTITION BY RANGE (s1) (
+ PARTITION p0 VALUES LESS THAN (0),
+ PARTITION p1 VALUES LESS THAN (1),
+ PARTITION p2 VALUES LESS THAN (18446744073709551615),
+ PARTITION p3 VALUES LESS THAN MAXVALUE
+);
+DROP TABLE t1;
+
+#
+# Bug #31890 Partitions: ORDER BY DESC in InnoDB not working
+#
+
+CREATE TABLE t1
+(int_column INT, char_column CHAR(5),
+PRIMARY KEY(char_column,int_column))
+PARTITION BY KEY(char_column,int_column)
+PARTITIONS 101;
+INSERT INTO t1 (int_column, char_column) VALUES
+( 39868 ,'zZZRW'),
+( 545592 ,'zZzSD'),
+( 4936 ,'zzzsT'),
+( 9274 ,'ZzZSX'),
+( 970185 ,'ZZzTN'),
+( 786036 ,'zZzTO'),
+( 37240 ,'zZzTv'),
+( 313801 ,'zzzUM'),
+( 782427 ,'ZZZva'),
+( 907955 ,'zZZvP'),
+( 453491 ,'zzZWV'),
+( 756594 ,'ZZZXU'),
+( 718061 ,'ZZzZH');
+SELECT * FROM t1 ORDER BY char_column DESC;
+DROP TABLE t1;
+
+#
+# Bug #32247 Test reports wrong value of "AUTO_INCREMENT" (on a partitioned InnoDB table)
+#
+
+CREATE TABLE t1(id MEDIUMINT NOT NULL AUTO_INCREMENT,
+ user CHAR(25), PRIMARY KEY(id))
+ PARTITION BY RANGE(id)
+ SUBPARTITION BY hash(id) subpartitions 2
+ (PARTITION pa1 values less than (10),
+ PARTITION pa2 values less than (20),
+ PARTITION pa11 values less than MAXVALUE);
+--disable_query_log
+let $n= 15;
+while ($n)
+{
+ insert into t1 (user) values ('mysql');
+ dec $n;
+}
+--enable_query_log
+show create table t1;
+drop table t1;
--echo End of 5.1 tests
diff --git a/mysql-test/t/partition_02myisam.test b/mysql-test/t/partition_02myisam.test
deleted file mode 100644
index 107d0b89cea..00000000000
--- a/mysql-test/t/partition_02myisam.test
+++ /dev/null
@@ -1,25 +0,0 @@
-###############################################
-# #
-# Partition tests MyISAM tables #
-# #
-###############################################
-
-#
-# NOTE: PLEASE DO NOT ADD NOT MYISAM SPECIFIC TESTCASES HERE !
-# NON STORAGE SPECIFIC TESTCASES SHOULD BE ADDED IN
-# THE SOURCED FIELS ONLY.
-#
-
-# Storage engine to be tested
-let $engine= 'MYISAM';
-eval SET SESSION storage_engine=$engine;
-
-
-# Other storage engine <> storage engine to be tested
-let $engine_other= 'MEMORY';
-# number of rows for the INSERT/UPDATE/DELETE/SELECT experiments
-# on partioned tables
-# Attention: In the moment the result files fit to @max_row = 200 only
-SET @max_row = 200;
-
--- source include/partition_1.inc
diff --git a/mysql-test/t/partition_archive.test b/mysql-test/t/partition_archive.test
new file mode 100644
index 00000000000..fad57107b7d
--- /dev/null
+++ b/mysql-test/t/partition_archive.test
@@ -0,0 +1,107 @@
+# Tests for the partition storage engine in connection with the
+# storage engine ARCHIVE.
+#
+# Creation:
+# 2007-10-18 mleich - Move ARCHIVE related sub tests of partition.test to
+# this test. Reason: ARCHIVE is not everytime available.
+# - Minor cleanup
+#
+
+--source include/have_partition.inc
+--source include/have_archive.inc
+
+
+#
+# Bug 17310 Partitions: Bugs with archived partitioned tables
+#
+--disable_warnings
+drop database if exists db99;
+drop table if exists t1;
+--enable_warnings
+
+create database db99;
+use db99;
+create table t1 (a int not null)
+engine=archive
+partition by list (a)
+(partition p0 values in (1), partition p1 values in (2));
+insert into t1 values (1), (2);
+--error 0, ER_CANT_CREATE_TABLE
+create index inx on t1 (a);
+alter table t1 add partition (partition p2 values in (3));
+alter table t1 drop partition p2;
+use test;
+drop database db99;
+
+create table t1 (f1 integer) engine= ARCHIVE partition by list(f1)
+(
+ partition p1 values in (1),
+ partition p2 values in (NULL),
+ partition p3 values in (2),
+ partition p4 values in (3),
+ partition p5 values in (4)
+);
+
+insert into t1 values (1),(2),(3),(4),(null);
+select * from t1;
+select * from t1 where f1 < 3;
+drop table t1;
+
+CREATE TABLE t1 (
+a int not null,
+b int not null,
+c int not null) engine=ARCHIVE
+partition by hash (a + 2)
+partitions 3
+(partition x1 tablespace ts1,
+ partition x2 tablespace ts2,
+ partition x3 tablespace ts3);
+
+insert into t1 values (1,1,1);
+insert into t1 values (2,1,1);
+insert into t1 values (3,1,1);
+insert into t1 values (4,1,1);
+insert into t1 values (5,1,1);
+
+select * from t1;
+
+drop table t1;
+
+#
+# Bug #32247 Test reports wrong value of "AUTO_INCREMENT" (on a partitioned InnoDB table)
+# (though reported as InnoDB bug, requires some ARCHIVE tests
+
+create table t1 (a int) engine=archive partition by hash(a);
+show create table t1;
+drop table t1;
+
+CREATE TABLE t1(id MEDIUMINT NOT NULL AUTO_INCREMENT,
+ f1 VARCHAR(25),
+ PRIMARY KEY(id)) ENGINE=ARCHIVE
+ PARTITION BY RANGE(id)
+ SUBPARTITION BY hash(id) subpartitions 2
+ (PARTITION pa1 values less than (10),
+ PARTITION pa2 values less than (20),
+ PARTITION pa3 values less than (30),
+ PARTITION pa4 values less than (40),
+ PARTITION pa5 values less than (50),
+ PARTITION pa6 values less than (60),
+ PARTITION pa7 values less than (70),
+ PARTITION pa8 values less than (80),
+ PARTITION pa9 values less than (90),
+ PARTITION pa10 values less than (100),
+ PARTITION pa11 values less than MAXVALUE);
+
+--disable_query_log
+let $n= 100;
+while ($n)
+{
+ insert into t1 (f1) values (repeat('a',25));
+ dec $n;
+}
+--enable_query_log
+
+show create table t1;
+select count(*) from t1;
+drop table t1;
+
diff --git a/mysql-test/t/partition_blackhole.test b/mysql-test/t/partition_blackhole.test
new file mode 100644
index 00000000000..9344ecb3b62
--- /dev/null
+++ b/mysql-test/t/partition_blackhole.test
@@ -0,0 +1,24 @@
+# Tests for the partition storage engine in connection with the
+# storage engine BLACKHOLE.
+#
+# Creation:
+# 2007-10-18 mleich - Move BLACKHOLE related sub tests of partition.test to
+# this test. Reason: BLACKHOLE is not everytime available.
+# - Minor cleanup
+#
+
+--source include/have_partition.inc
+--source include/have_blackhole.inc
+
+#
+# Bug#14524 Partitions: crash if blackhole
+#
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+CREATE TABLE `t1` (
+ `id` int(11) default NULL
+) ENGINE=BLACKHOLE DEFAULT CHARSET=latin1 PARTITION BY HASH (id) ;
+SELECT * FROM t1;
+
+DROP TABLE t1;
diff --git a/mysql-test/t/partition_csv.test b/mysql-test/t/partition_csv.test
new file mode 100644
index 00000000000..aa3d9d67c26
--- /dev/null
+++ b/mysql-test/t/partition_csv.test
@@ -0,0 +1,38 @@
+# Tests for the partition storage engine in connection with the
+# storage engine CSV.
+#
+# Creation:
+# 2007-10-18 mleich - Move CSV related sub tests of partition.test to
+# this test. Reason: CSV is not everytime available.
+# - Minor cleanup
+#
+
+--source include/have_partition.inc
+--source include/have_csv.inc
+
+#
+# Bug#19307: Partitions: csv delete failure
+# = CSV engine crashes
+#
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+--error ER_PARTITION_MERGE_ERROR
+create table t1 (a int)
+engine = csv
+partition by list (a)
+(partition p0 values in (null));
+
+#
+# Bug#27816: Log tables ran with partitions crashes the server when logging
+# is enabled.
+#
+USE mysql;
+SET GLOBAL general_log = 0;
+ALTER TABLE general_log ENGINE = MyISAM;
+--error ER_WRONG_USAGE
+ALTER TABLE general_log PARTITION BY RANGE (TO_DAYS(event_time))
+ (PARTITION p0 VALUES LESS THAN (733144),
+ PARTITION p1 VALUES LESS THAN (3000000));
+ALTER TABLE general_log ENGINE = CSV;
+SET GLOBAL general_log = 1;
diff --git a/mysql-test/t/partition_datatype.test b/mysql-test/t/partition_datatype.test
new file mode 100644
index 00000000000..61d3cb42c7b
--- /dev/null
+++ b/mysql-test/t/partition_datatype.test
@@ -0,0 +1,213 @@
+#
+# Simple test for the partition storage engine
+# with most datatypes and null / not null
+# as partition by key
+# Created to verify the fix for Bug#31705
+# Partitions: crash if varchar length > 65530
+#
+-- source include/have_partition.inc
+
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+
+# FIXME: disabled this test because of valgrind error
+#create table t1 (a bit not null) partition by key (a);
+#insert into t1 values (b'1');
+#select * from t1 where a = b'1';
+#drop table t1;
+create table t1 (a tinyint not null) partition by key (a);
+insert into t1 values (2);
+select * from t1 where a = 2;
+drop table t1;
+create table t1 (a smallint not null) partition by key (a);
+insert into t1 values (2);
+select * from t1 where a = 2;
+drop table t1;
+create table t1 (a mediumint not null) partition by key (a);
+insert into t1 values (2);
+select * from t1 where a = 2;
+drop table t1;
+create table t1 (a int not null) partition by key (a);
+insert into t1 values (2);
+select * from t1 where a = 2;
+drop table t1;
+create table t1 (a bigint not null) partition by key (a);
+insert into t1 values (2);
+select * from t1 where a = 2;
+drop table t1;
+create table t1 (a float not null) partition by key (a);
+insert into t1 values (2.1);
+select * from t1 where a = 2.1;
+drop table t1;
+create table t1 (a double not null) partition by key (a);
+insert into t1 values (2.1);
+select * from t1 where a = 2.1;
+drop table t1;
+create table t1 (a decimal not null) partition by key (a);
+insert into t1 values (2.1);
+select * from t1 where a = 2.1;
+drop table t1;
+create table t1 (a date not null) partition by key (a);
+insert into t1 values ('2001-01-01');
+select * from t1 where a = '2001-01-01';
+drop table t1;
+create table t1 (a datetime not null) partition by key (a);
+insert into t1 values ('2001-01-01 01:02:03');
+select * from t1 where a = '2001-01-01 01:02:03';
+drop table t1;
+create table t1 (a timestamp not null) partition by key (a);
+insert into t1 values ('2001-01-01 01:02:03');
+select * from t1 where a = '2001-01-01 01:02:03';
+drop table t1;
+create table t1 (a time not null) partition by key (a);
+insert into t1 values ('01:02:03');
+select * from t1 where a = '01:02:03';
+drop table t1;
+create table t1 (a year not null) partition by key (a);
+insert into t1 values ('2001');
+select * from t1 where a = '2001';
+drop table t1;
+create table t1 (a varchar(10) character set utf8 not null) partition by key (a);
+insert into t1 values ('abc');
+select * from t1 where a = 'abc';
+drop table t1;
+create table t1 (a varchar(300) character set utf8 not null) partition by key (a);
+insert into t1 values ('abc');
+select * from t1 where a = 'abc';
+drop table t1;
+create table t1 (a varchar(10) character set latin1 not null) partition by key (a);
+insert into t1 values ('abc');
+select * from t1 where a = 'abc';
+drop table t1;
+create table t1 (a varchar(300) character set latin1 not null) partition by key (a);
+insert into t1 values ('abc');
+select * from t1 where a = 'abc';
+drop table t1;
+create table t1 (a char(10) character set utf8 not null) partition by key (a);
+insert into t1 values ('abc');
+select * from t1 where a = 'abc';
+drop table t1;
+create table t1 (a char(10) character set latin1 not null) partition by key (a);
+insert into t1 values ('abc');
+select * from t1 where a = 'abc';
+drop table t1;
+create table t1 (a enum('y','n') not null) partition by key (a);
+insert into t1 values ('y');
+select * from t1 where a = 'y';
+drop table t1;
+create table t1 (a set('y','n') not null) partition by key (a);
+insert into t1 values ('y');
+select * from t1 where a = 'y';
+drop table t1;
+# FIXME: disabled this test because of valgrind error
+#create table t1 (a bit) partition by key (a);
+#insert into t1 values (b'1');
+#select * from t1 where a = b'1';
+#drop table t1;
+create table t1 (a tinyint) partition by key (a);
+insert into t1 values (2);
+select * from t1 where a = 2;
+drop table t1;
+create table t1 (a smallint) partition by key (a);
+insert into t1 values (2);
+select * from t1 where a = 2;
+drop table t1;
+create table t1 (a mediumint) partition by key (a);
+insert into t1 values (2);
+select * from t1 where a = 2;
+drop table t1;
+create table t1 (a int) partition by key (a);
+insert into t1 values (2);
+select * from t1 where a = 2;
+drop table t1;
+create table t1 (a bigint) partition by key (a);
+insert into t1 values (2);
+select * from t1 where a = 2;
+drop table t1;
+create table t1 (a float) partition by key (a);
+insert into t1 values (2.1);
+select * from t1 where a = 2.1;
+drop table t1;
+create table t1 (a double) partition by key (a);
+insert into t1 values (2.1);
+select * from t1 where a = 2.1;
+drop table t1;
+create table t1 (a decimal) partition by key (a);
+insert into t1 values (2.1);
+select * from t1 where a = 2.1;
+drop table t1;
+create table t1 (a date) partition by key (a);
+insert into t1 values ('2001-01-01');
+select * from t1 where a = '2001-01-01';
+drop table t1;
+create table t1 (a datetime) partition by key (a);
+insert into t1 values ('2001-01-01 01:02:03');
+select * from t1 where a = '2001-01-01 01:02:03';
+drop table t1;
+create table t1 (a timestamp null) partition by key (a);
+insert into t1 values ('2001-01-01 01:02:03');
+select * from t1 where a = '2001-01-01 01:02:03';
+drop table t1;
+create table t1 (a time) partition by key (a);
+insert into t1 values ('01:02:03');
+select * from t1 where a = '01:02:03';
+drop table t1;
+create table t1 (a year) partition by key (a);
+insert into t1 values ('2001');
+select * from t1 where a = '2001';
+drop table t1;
+create table t1 (a varchar(10) character set utf8) partition by key (a);
+insert into t1 values ('abc');
+select * from t1 where a = 'abc';
+drop table t1;
+create table t1 (a varchar(300) character set utf8) partition by key (a);
+insert into t1 values ('abc');
+select * from t1 where a = 'abc';
+drop table t1;
+create table t1 (a varchar(10) character set latin1) partition by key (a);
+insert into t1 values ('abc');
+select * from t1 where a = 'abc';
+drop table t1;
+create table t1 (a varchar(300) character set latin1) partition by key (a);
+insert into t1 values ('abc');
+select * from t1 where a = 'abc';
+drop table t1;
+create table t1 (a char(10) character set utf8) partition by key (a);
+insert into t1 values ('abc');
+select * from t1 where a = 'abc';
+drop table t1;
+create table t1 (a char(10) character set latin1) partition by key (a);
+insert into t1 values ('abc');
+select * from t1 where a = 'abc';
+drop table t1;
+create table t1 (a enum('y','n')) partition by key (a);
+insert into t1 values ('y');
+select * from t1 where a = 'y';
+drop table t1;
+create table t1 (a set('y','n')) partition by key (a);
+insert into t1 values ('y');
+select * from t1 where a = 'y';
+drop table t1;
+create table t1 (a varchar(65531)) partition by key (a);
+insert into t1 values ('bbbb');
+insert into t1 values ('aaaa');
+select * from t1 where a = 'aaa%';
+select * from t1 where a like 'aaa%';
+drop table t1;
+create table t1 (a varchar(65532)) partition by key (a);
+insert into t1 values ('bbbb');
+insert into t1 values ('aaaa');
+select * from t1 where a = 'aaa%';
+select * from t1 where a like 'aaa%';
+drop table t1;
+create table t1 (a varchar(65533) not null) partition by key (a);
+insert into t1 values ('aaaa');
+select * from t1 where a = 'aaa%';
+drop table t1;
+-- error ER_TOO_BIG_ROWSIZE
+create table t1 (a varchar(65533)) partition by key (a);
+-- error ER_TOO_BIG_ROWSIZE
+create table t1 (a varchar(65534) not null) partition by key (a);
+-- error ER_TOO_BIG_ROWSIZE
+create table t1 (a varchar(65535)) partition by key (a);
diff --git a/mysql-test/t/partition_error.test b/mysql-test/t/partition_error.test
index 5fc2097cc52..c9b95fc1664 100644
--- a/mysql-test/t/partition_error.test
+++ b/mysql-test/t/partition_error.test
@@ -9,6 +9,19 @@ drop table if exists t1;
--enable_warnings
#
+# Bug 29368:
+# Incorrect error, 1467, for syntax error when creating partition
+--error ER_PARTITION_REQUIRES_VALUES_ERROR
+CREATE TABLE t1 (
+ a int
+)
+PARTITION BY RANGE (a)
+(
+ PARTITION p0 VALUES LESS THAN (1),
+ PARTITION p1 VALU ES LESS THAN (2)
+);
+
+#
# Partition by key stand-alone error
#
--error 1064
diff --git a/mysql-test/t/partition_hash.test b/mysql-test/t/partition_hash.test
index 98add060a76..362d5f747e9 100644
--- a/mysql-test/t/partition_hash.test
+++ b/mysql-test/t/partition_hash.test
@@ -10,6 +10,22 @@ drop table if exists t1;
--enable_warnings
#
+# Bug#30822: crash when COALESCE
+#
+CREATE TABLE t1 (c1 INT)
+ PARTITION BY HASH (c1)
+ PARTITIONS 15;
+INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
+ALTER TABLE t1 COALESCE PARTITION 13;
+DROP TABLE t1;
+CREATE TABLE t1 (c1 INT)
+ PARTITION BY LINEAR HASH (c1)
+ PARTITIONS 5;
+INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
+ALTER TABLE t1 COALESCE PARTITION 3;
+DROP TABLE t1;
+
+#
# More partition pruning tests, especially on interval walking
#
create table t1 (a int unsigned)
@@ -144,3 +160,13 @@ select * from t1 where c3 between '2002-01-01' and '2002-12-31';
drop table t1;
+#
+# Bug#31210 - INSERT DELAYED crashes server when used on partitioned table
+#
+CREATE TABLE t1 (c1 INT) ENGINE=MyISAM PARTITION BY HASH(c1) PARTITIONS 1;
+# The test succeeds in an embedded server because normal insert is done.
+# The test fails in a normal server with "engine doesn't have this option".
+--error 0, ER_ILLEGAL_HA
+INSERT DELAYED INTO t1 VALUES (1);
+DROP TABLE t1;
+
diff --git a/mysql-test/t/partition_innodb.test b/mysql-test/t/partition_innodb.test
index f4320c5c56a..58010f85ecf 100644
--- a/mysql-test/t/partition_innodb.test
+++ b/mysql-test/t/partition_innodb.test
@@ -1,6 +1,21 @@
--source include/have_partition.inc
--source include/have_innodb.inc
+# Bug#32948 - FKs allowed to reference partitioned table
+#
+-- echo # Bug#32948
+CREATE TABLE t1 (c1 INT, PRIMARY KEY (c1)) ENGINE=INNODB;
+CREATE TABLE t2 (c1 INT, PRIMARY KEY (c1),
+ FOREIGN KEY (c1) REFERENCES t1 (c1)
+ ON DELETE CASCADE)
+ENGINE=INNODB;
+--error ER_ROW_IS_REFERENCED
+ALTER TABLE t1 PARTITION BY HASH(c1) PARTITIONS 5;
+--error ER_ROW_IS_REFERENCED
+ALTER TABLE t1 ENGINE=MyISAM;
+DROP TABLE t2;
+DROP TABLE t1;
+
#
# Bug #14673: Wrong InnoDB default row format
#
@@ -134,3 +149,23 @@ SELECT * FROM t1 WHERE first_name='Andy' OR last_name='Jake';
drop table t1;
+#
+# BUG#30583 - Partition on DOUBLE key + INNODB + count(*) == crash
+#
+CREATE TABLE t1 (a DOUBLE NOT NULL, KEY(a)) ENGINE=InnoDB
+PARTITION BY KEY(a) PARTITIONS 10;
+INSERT INTO t1 VALUES(1),(2);
+SELECT COUNT(*) FROM t1;
+DROP TABLE t1;
+
+#
+# Bug #31893 Partitions: crash if subpartitions and engine change
+#
+create table t1 (int_column int, char_column char(5))
+ PARTITION BY RANGE (int_column) subpartition by key (char_column) subpartitions 2
+ (PARTITION p1 VALUES LESS THAN (5) ENGINE = InnoDB);
+alter table t1 PARTITION BY RANGE (int_column)
+ subpartition by key (char_column) subpartitions 2
+ (PARTITION p1 VALUES LESS THAN (5) ENGINE = myisam);
+show create table t1;
+drop table t1;
diff --git a/mysql-test/t/partition_mgm.test b/mysql-test/t/partition_mgm.test
index a06f8d1aee5..68da4a5b390 100644
--- a/mysql-test/t/partition_mgm.test
+++ b/mysql-test/t/partition_mgm.test
@@ -22,17 +22,18 @@ drop table t1;
CREATE TABLE t1 (f_date DATE, f_varchar VARCHAR(30))
PARTITION BY HASH(YEAR(f_date)) PARTITIONS 2;
SHOW CREATE TABLE t1;
-
---replace_result $MYSQLTEST_VARDIR "hello"
---exec ls $MYSQLTEST_VARDIR/master-data/test/t1#*
---replace_result $MYSQLTEST_VARDIR "hello"
---exec ls $MYSQLTEST_VARDIR/master-data/test/t1.*
+-- file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD
+-- file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI
+-- file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD
+-- file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI
+-- file_exists $MYSQLTEST_VARDIR/master-data/test/t1.frm
+-- file_exists $MYSQLTEST_VARDIR/master-data/test/t1.par
ALTER TABLE t1 COALESCE PARTITION 1;
SHOW CREATE TABLE t1;
---replace_result $MYSQLTEST_VARDIR "hello"
---exec ls $MYSQLTEST_VARDIR/master-data/test/t1#*
---replace_result $MYSQLTEST_VARDIR "hello"
---exec ls $MYSQLTEST_VARDIR/master-data/test/t1.*
+-- file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD
+-- file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI
+-- file_exists $MYSQLTEST_VARDIR/master-data/test/t1.frm
+-- file_exists $MYSQLTEST_VARDIR/master-data/test/t1.par
drop table t1;
#
# Bug 20767: REORGANIZE partition crashes
diff --git a/mysql-test/t/partition_range.test b/mysql-test/t/partition_range.test
index 50d850913bc..6ed3abab46a 100644
--- a/mysql-test/t/partition_range.test
+++ b/mysql-test/t/partition_range.test
@@ -6,7 +6,7 @@
-- source include/have_partition.inc
--disable_warnings
-drop table if exists t1;
+drop table if exists t1, t2;
--enable_warnings
#
@@ -757,3 +757,29 @@ DROP TABLE t1;
# a = "C2345678901234567890";
#select * from t1 where a = "12345678901234567890";
#drop table t1;
+
+
+#
+# BUG#30573: get wrong result with "group by" on PARTITIONed table
+#
+#create table t1 (a int);
+#insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+#CREATE TABLE t2 (
+# defid int(10) unsigned NOT NULL,
+# day int(10) unsigned NOT NULL,
+# count int(10) unsigned NOT NULL,
+# filler char(200),
+# KEY (defid,day)
+#)
+#PARTITION BY RANGE (day) (
+# PARTITION p7 VALUES LESS THAN (20070401) ,
+# PARTITION p8 VALUES LESS THAN (20070501));
+
+#insert into t2 select 20, 20070311, 1, 'filler' from t1 A, t1 B;
+#insert into t2 select 20, 20070411, 1, 'filler' from t1 A, t1 B;
+#insert into t2 values(52, 20070321, 123, 'filler') ;
+#insert into t2 values(52, 20070322, 456, 'filler') ;
+
+#select sum(count) from t2 ch where ch.defid in (50,52) and ch.day between 20070320 and 20070401 group by defid;
+#drop table t1, t2;
+
diff --git a/mysql-test/t/partition_symlink.test b/mysql-test/t/partition_symlink.test
new file mode 100644
index 00000000000..ab779ec2b68
--- /dev/null
+++ b/mysql-test/t/partition_symlink.test
@@ -0,0 +1,121 @@
+# Test that must have symlink. eg. using DATA/INDEX DIR
+# (DATA/INDEX DIR requires symlinks)
+-- source include/have_partition.inc
+-- source include/have_symlink.inc
+# remove the not_windows line after fixing bug#30459
+-- source include/not_windows.inc
+-- disable_warnings
+DROP TABLE IF EXISTS t1;
+DROP DATABASE IF EXISTS mysqltest2;
+-- enable_warnings
+
+#
+# Bug 32091: Security breach via directory changes
+#
+# The below test shows that a pre-existing table mysqltest2.t1 cannot be
+# replaced by a user with no rights in 'mysqltest2'. The altered table
+# test.t1 will be altered (remove partitioning) into the test directory
+# and having its partitions removed from the mysqltest2 directory.
+# (the partitions data files are named <tablename>#P#<partname>.MYD
+# and will not collide with a non partitioned table's data files.)
+# NOTE: the privileges on files and directories are the same for all
+# database users in mysqld, though mysqld enforces privileges on
+# the database and table levels which in turn maps to directories and
+# files, but not the other way around (any db-user can use any
+# directory or file that the mysqld-process can use, via DATA/INDEX DIR)
+# this is the security flaw that was used in bug#32091 and bug#32111
+-- echo # Creating two non colliding tables mysqltest2.t1 and test.t1
+-- echo # test.t1 have partitions in mysqltest2-directory!
+-- echo # user root:
+ CREATE USER mysqltest_1@localhost;
+ CREATE DATABASE mysqltest2;
+ USE mysqltest2;
+ CREATE TABLE t1 (a INT);
+ INSERT INTO t1 VALUES (0);
+connect(con1,localhost,mysqltest_1,,);
+-- echo # user mysqltest_1:
+ USE test;
+ -- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+ eval CREATE TABLE t1 (a INT)
+ PARTITION BY LIST (a) (
+ PARTITION p0 VALUES IN (0)
+ DATA DIRECTORY '$MYSQLTEST_VARDIR/master-data/mysqltest2'
+ INDEX DIRECTORY '$MYSQLTEST_VARDIR/master-data/mysqltest2',
+ PARTITION p1 VALUES IN (1)
+ DATA DIRECTORY '$MYSQLTEST_VARDIR/master-data/test'
+ INDEX DIRECTORY '$MYSQLTEST_VARDIR/master-data/test',
+ PARTITION p2 VALUES IN (2)
+ );
+ -- echo # without the patch for bug#32091 this would create
+ -- echo # files mysqltest2/t1.MYD + .MYI and possible overwrite
+ -- echo # the mysqltest2.t1 table (depending on bug#32111)
+ -- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+ ALTER TABLE t1 REMOVE PARTITIONING;
+ INSERT INTO t1 VALUES (1);
+ SELECT * FROM t1;
+connection default;
+-- echo # user root:
+ USE mysqltest2;
+ FLUSH TABLES;
+ -- echo # if the patch works, this should be different
+ -- echo # and before the patch they were the same!
+ SELECT * FROM t1;
+ USE test;
+ SELECT * FROM t1;
+ DROP TABLE t1;
+ DROP DATABASE mysqltest2;
+# The below test shows that a pre-existing partition can not be
+# destroyed by a new partition from another table.
+# (Remember that a table or partition that uses the DATA/INDEX DIR
+# is symlinked and thus has
+# 1. the real file in the DATA/INDEX DIR and
+# 2. a symlink in its default database directory pointing to
+# the real file.
+# So it is using/blocking 2 files in (in 2 different directories
+-- echo # test that symlinks can not overwrite files when CREATE TABLE
+-- echo # user root:
+ CREATE DATABASE mysqltest2;
+ USE mysqltest2;
+ -- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+ eval CREATE TABLE t1 (a INT)
+ PARTITION BY LIST (a) (
+ PARTITION p0 VALUES IN (0)
+ DATA DIRECTORY '$MYSQLTEST_VARDIR/master-data/mysqltest2'
+ INDEX DIRECTORY '$MYSQLTEST_VARDIR/master-data/mysqltest2',
+ PARTITION p1 VALUES IN (1)
+ DATA DIRECTORY '$MYSQLTEST_VARDIR/master-data/test'
+ INDEX DIRECTORY '$MYSQLTEST_VARDIR/master-data/test'
+ );
+connection con1;
+-- echo # user mysqltest_1:
+ USE test;
+ -- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+ -- error 1,1
+ eval CREATE TABLE t1 (a INT)
+ PARTITION BY LIST (a) (
+ PARTITION p0 VALUES IN (0)
+ DATA DIRECTORY '$MYSQLTEST_VARDIR/master-data/mysqltest2'
+ INDEX DIRECTORY '$MYSQLTEST_VARDIR/master-data/mysqltest2',
+ PARTITION p1 VALUES IN (1)
+ DATA DIRECTORY '$MYSQLTEST_VARDIR/master-data/test'
+ INDEX DIRECTORY '$MYSQLTEST_VARDIR/master-data/test'
+ );
+ -- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+ -- error 1,1
+ eval CREATE TABLE t1 (a INT)
+ PARTITION BY LIST (a) (
+ PARTITION p0 VALUES IN (0)
+ DATA DIRECTORY '$MYSQLTEST_VARDIR/master-data/test'
+ INDEX DIRECTORY '$MYSQLTEST_VARDIR/master-data/test',
+ PARTITION p1 VALUES IN (1)
+ DATA DIRECTORY '$MYSQLTEST_VARDIR/master-data/mysqltest2'
+ INDEX DIRECTORY '$MYSQLTEST_VARDIR/master-data/mysqltest2'
+ );
+connection default;
+-- echo # user root (cleanup):
+ DROP DATABASE mysqltest2;
+ USE test;
+ DROP USER mysqltest_1@localhost;
+ disconnect con1;
+
+
diff --git a/mysql-test/t/plugin.test b/mysql-test/t/plugin.test
index fb6d5febe45..d8d6d069676 100644
--- a/mysql-test/t/plugin.test
+++ b/mysql-test/t/plugin.test
@@ -24,3 +24,18 @@ UNINSTALL PLUGIN EXAMPLE;
--error 1305
UNINSTALL PLUGIN non_exist;
+
+
+--echo #
+--echo # Bug#32034: check_func_enum() does not check correct values but set it
+--echo # to impossible int val
+--echo #
+
+INSTALL PLUGIN example SONAME 'ha_example.so';
+
+SET GLOBAL example_enum_var= e1;
+SET GLOBAL example_enum_var= e2;
+--error 1231
+SET GLOBAL example_enum_var= impossible;
+
+UNINSTALL PLUGIN example;
diff --git a/mysql-test/t/ps.test b/mysql-test/t/ps.test
index dea86bdd2fa..b45d67d8485 100644
--- a/mysql-test/t/ps.test
+++ b/mysql-test/t/ps.test
@@ -1223,6 +1223,16 @@ EXECUTE st1;
DEALLOCATE PREPARE st1;
DROP TABLE t1;
+
+#
+# Bug #32137: prepared statement crash with str_to_date in update clause
+#
+create table t1 (a int, b tinyint);
+prepare st1 from 'update t1 set b= (str_to_date(a, a))';
+execute st1;
+deallocate prepare st1;
+drop table t1;
+
--echo End of 4.1 tests.
############################# 5.0 tests start ################################
@@ -2778,4 +2788,38 @@ execute stmt;
show create table t1;
drop table t1;
+#
+# Bug #32030 DELETE does not return an error and deletes rows if error
+# evaluating WHERE
+#
+# Test that there is an error for prepared delete just like for the normal
+# one.
+#
+--disable_warnings
+drop table if exists t1, t2;
+--enable_warnings
+create table t1 (a int, b int);
+create table t2 like t1;
+
+insert into t1 (a, b) values (1,1), (1,2), (1,3), (1,4), (1,5),
+ (2,2), (2,3), (2,1), (3,1), (4,1), (4,2), (4,3), (4,4), (4,5), (4,6);
+
+insert into t2 select a, max(b) from t1 group by a;
+
+prepare stmt from "delete from t2 where (select (select max(b) from t1 group
+by a having a < 2) x from t1) > 10000";
+
+--error ER_SUBQUERY_NO_1_ROW
+delete from t2 where (select (select max(b) from t1 group
+by a having a < 2) x from t1) > 10000;
+--error ER_SUBQUERY_NO_1_ROW
+execute stmt;
+--error ER_SUBQUERY_NO_1_ROW
+execute stmt;
+
+deallocate prepare stmt;
+drop table t1, t2;
+
+
+
--echo End of 5.1 tests.
diff --git a/mysql-test/t/query_cache.test b/mysql-test/t/query_cache.test
index 950f1ceea76..890999cdc08 100644
--- a/mysql-test/t/query_cache.test
+++ b/mysql-test/t/query_cache.test
@@ -1,10 +1,5 @@
-- source include/have_query_cache.inc
-# Disabled on embedded due to bug #30710, "query_cache.test fails on
-# embedded w/ per-column privs test". Please re-enable when that bug
-# is resolved.
--- source include/not_embedded.inc
-
#
# Tests with query cache
#
@@ -1256,81 +1251,71 @@ disconnect user2;
disconnect user3;
#
-# Bug #30269 Query cache eats memory
+# Bug #28211 RENAME DATABASE and query cache don't play nicely together
#
---disable_warnings
-DROP DATABASE IF EXISTS bug30269;
---enable_warnings
-FLUSH STATUS;
-CREATE DATABASE bug30269;
-USE bug30269;
-CREATE TABLE test1 (id int, name varchar(23));
-CREATE VIEW view1 AS SELECT * FROM test1;
-INSERT INTO test1 VALUES (5, 'testit');
-GRANT SELECT (id) ON TABLE bug30269.test1 TO 'bug30269'@'localhost';
-GRANT SELECT ON TABLE bug30269.view1 TO 'bug30269'@'localhost';
-set global query_cache_size= 81920;
-connect (bug30269, localhost, bug30269,,);
-connection bug30269;
-USE bug30269;
-show status like 'Qcache_queries_in_cache';
---echo # Select statement not stored in query cache because of column privileges.
-SELECT id FROM test1 WHERE id>2;
-show status like 'Qcache_queries_in_cache';
-SELECT id FROM view1 WHERE id>2;
-show status like 'Qcache_queries_in_cache';
-
-connection default;
-DROP DATABASE bug30269;
-disconnect bug30269;
-DROP USER 'bug30269'@'localhost';
+# TODO: enable these tests when RENAME DATABASE is implemented.
+# --disable_warnings
+# drop database if exists db1;
+# drop database if exists db2;
+# --enable_warnings
+# set GLOBAL query_cache_size=15*1024*1024;
+# create database db1;
+# use db1;
+# create table t1(c1 int)engine=myisam;
+# insert into t1(c1) values (1);
+# select * from db1.t1 f;
+# show status like 'Qcache_queries_in_cache';
+# rename schema db1 to db2;
+# show status like 'Qcache_queries_in_cache';
+# drop database db2;
+# set global query_cache_size=default;
+#
+# --disable_warnings
+# drop database if exists db1;
+# drop database if exists db3;
+# --enable_warnings
+# set GLOBAL query_cache_size=15*1024*1024;
+# create database db1;
+# create database db3;
+# use db1;
+# create table t1(c1 int) engine=myisam;
+# use db3;
+# create table t1(c1 int) engine=myisam;
+# use db1;
+# insert into t1(c1) values (1);
+# use mysql;
+# select * from db1.t1;
+# select c1+1 from db1.t1;
+# select * from db3.t1;
+# show status like 'Qcache_queries_in_cache';
+# rename schema db1 to db2;
+# show status like 'Qcache_queries_in_cache';
+# drop database db2;
+# drop database db3;
set GLOBAL query_cache_type=default;
set GLOBAL query_cache_limit=default;
set GLOBAL query_cache_min_res_unit=default;
set GLOBAL query_cache_size=default;
+
--echo End of 5.0 tests
#
-# Bug #28211 RENAME DATABASE and query cache don't play nicely together
+# Bug #31157: Crash when select+order by the avg of some field within the
+# group by
#
---disable_warnings
-drop database if exists db1;
-drop database if exists db2;
---enable_warnings
-set GLOBAL query_cache_size=15*1024*1024;
-create database db1;
-use db1;
-create table t1(c1 int)engine=myisam;
-insert into t1(c1) values (1);
-select * from db1.t1 f;
-show status like 'Qcache_queries_in_cache';
-rename schema db1 to db2;
-show status like 'Qcache_queries_in_cache';
-drop database db2;
-set global query_cache_size=default;
---disable_warnings
-drop database if exists db1;
-drop database if exists db3;
---enable_warnings
-set GLOBAL query_cache_size=15*1024*1024;
-create database db1;
-create database db3;
-use db1;
-create table t1(c1 int) engine=myisam;
-use db3;
-create table t1(c1 int) engine=myisam;
-use db1;
-insert into t1(c1) values (1);
-use mysql;
-select * from db1.t1;
-select c1+1 from db1.t1;
-select * from db3.t1;
-show status like 'Qcache_queries_in_cache';
-rename schema db1 to db2;
-show status like 'Qcache_queries_in_cache';
-drop database db2;
-drop database db3;
+CREATE TABLE t1 (a ENUM('rainbow'));
+INSERT INTO t1 VALUES (),(),(),(),();
+SELECT 1 FROM t1 GROUP BY (SELECT 1 FROM t1 ORDER BY AVG(LAST_INSERT_ID()));
+DROP TABLE t1;
+CREATE TABLE t1 (a LONGBLOB);
+INSERT INTO t1 SET a = 'aaaa';
+INSERT INTO t1 SET a = 'aaaa';
+SELECT 1 FROM t1 GROUP BY
+ (SELECT LAST_INSERT_ID() FROM t1 ORDER BY MIN(a) ASC LIMIT 1);
+DROP TABLE t1;
+
--echo End of 5.1 tests
+
diff --git a/mysql-test/t/query_cache_notembedded.test b/mysql-test/t/query_cache_notembedded.test
index a0085c0ba31..929b93e10d5 100644
--- a/mysql-test/t/query_cache_notembedded.test
+++ b/mysql-test/t/query_cache_notembedded.test
@@ -225,3 +225,39 @@ connection default;
set GLOBAL query_cache_size=0;
SET GLOBAL log_bin_trust_function_creators = 0;
+
+#
+# Bug #30269 Query cache eats memory
+#
+--disable_warnings
+DROP DATABASE IF EXISTS bug30269;
+--enable_warnings
+FLUSH STATUS;
+CREATE DATABASE bug30269;
+USE bug30269;
+CREATE TABLE test1 (id int, name varchar(23));
+CREATE VIEW view1 AS SELECT * FROM test1;
+INSERT INTO test1 VALUES (5, 'testit');
+GRANT SELECT (id) ON TABLE bug30269.test1 TO 'bug30269'@'localhost';
+GRANT SELECT ON TABLE bug30269.view1 TO 'bug30269'@'localhost';
+set global query_cache_size= 81920;
+connect (bug30269, localhost, bug30269,,);
+connection bug30269;
+USE bug30269;
+show status like 'Qcache_queries_in_cache';
+--echo # Select statement not stored in query cache because of column privileges.
+SELECT id FROM test1 WHERE id>2;
+show status like 'Qcache_queries_in_cache';
+SELECT id FROM view1 WHERE id>2;
+show status like 'Qcache_queries_in_cache';
+
+connection default;
+DROP DATABASE bug30269;
+disconnect bug30269;
+DROP USER 'bug30269'@'localhost';
+
+set GLOBAL query_cache_type=default;
+set GLOBAL query_cache_limit=default;
+set GLOBAL query_cache_min_res_unit=default;
+set GLOBAL query_cache_size=default;
+
diff --git a/mysql-test/t/range.test b/mysql-test/t/range.test
index 06c2ef248c4..e20f0370e2c 100644
--- a/mysql-test/t/range.test
+++ b/mysql-test/t/range.test
@@ -935,6 +935,26 @@ SELECT * FROM t1 WHERE item='A1' AND started<='2005-12-02 00:00:00';
DROP TABLE t1;
+--echo
+--echo BUG#32198 "Comparison of DATE with DATETIME still not using indexes correctly"
+--echo
+CREATE TABLE t1 (
+ id int(11) NOT NULL auto_increment,
+ dateval date default NULL,
+ PRIMARY KEY (id),
+ KEY dateval (dateval)
+) AUTO_INCREMENT=173;
+
+INSERT INTO t1 VALUES
+(1,'2007-01-01'),(2,'2007-01-02'),(3,'2007-01-03'),(4,'2007-01-04'),
+(5,'2007-01-05'),(6,'2007-01-06'),(7,'2007-01-07'),(8,'2007-01-08'),
+(9,'2007-01-09'),(10,'2007-01-10'),(11,'2007-01-11');
+
+--echo This must use range access:
+explain select * from t1 where dateval >= '2007-01-01 00:00:00' and dateval <= '2007-01-02 23:59:59';
+
+drop table t1;
+
# End of 5.0 tests
# BUG#22393 fix: Adjust 'ref' estimate if we have 'range' estimate for
diff --git a/mysql-test/t/renamedb.test b/mysql-test/t/renamedb.test
index 1e71adb3bf3..84315090b7a 100644
--- a/mysql-test/t/renamedb.test
+++ b/mysql-test/t/renamedb.test
@@ -1,26 +1,53 @@
---disable_warnings
-drop database if exists testdb1;
---enable_warnings
-
-create database testdb1 default character set latin2;
-use testdb1;
-create table t1 (a int);
-insert into t1 values (1),(2),(3);
-show create database testdb1;
-show tables;
-rename database testdb1 to testdb2;
---error 1049
-show create database testdb1;
-show create database testdb2;
-select database();
-show tables;
-select a from t1 order by a;
-drop database testdb2;
+# TODO: enable these tests when RENAME DATABASE is implemented.
+#
+# --disable_warnings
+# drop database if exists testdb1;
+# --enable_warnings
+#
+# create database testdb1 default character set latin2;
+# use testdb1;
+# create table t1 (a int);
+# insert into t1 values (1),(2),(3);
+# show create database testdb1;
+# show tables;
+# rename database testdb1 to testdb2;
+# --error 1049
+# show create database testdb1;
+# show create database testdb2;
+# select database();
+# show tables;
+# select a from t1 order by a;
+# drop database testdb2;
+#
#
# Bug#19392 Rename Database: Crash if case change
#
-create database testdb1;
---error 1007
-rename database testdb1 to testdb1;
-drop database testdb1;
+# create database testdb1;
+# --error 1007
+# rename database testdb1 to testdb1;
+# drop database testdb1;
+
+#
+# WL#4030 (Deprecate RENAME DATABASE: replace with ALTER DATABASE <name> UPGRADE)
+#
+
+--error ER_PARSE_ERROR
+rename database testdb1 to testdb2;
+
+--error ER_WRONG_USAGE
+ALTER DATABASE wrong UPGRADE DATA DIRECTORY NAME;
+
+--error ER_WRONG_USAGE
+ALTER DATABASE `#mysql41#not-supported` UPGRADE DATA DIRECTORY NAME;
+
+--error ER_WRONG_USAGE
+ALTER DATABASE `#mysql51#not-yet` UPGRADE DATA DIRECTORY NAME;
+
+--error ER_WRONG_USAGE
+ALTER DATABASE `#mysql50#` UPGRADE DATA DIRECTORY NAME;
+
+--error ER_BAD_DB_ERROR
+ALTER DATABASE `#mysql50#upgrade-me` UPGRADE DATA DIRECTORY NAME;
+
+
diff --git a/mysql-test/t/repair.test b/mysql-test/t/repair.test
index 6ef21cde465..b433b8720b9 100644
--- a/mysql-test/t/repair.test
+++ b/mysql-test/t/repair.test
@@ -83,7 +83,36 @@ SET myisam_repair_threads=@@global.myisam_repair_threads;
SET myisam_sort_buffer_size=@@global.myisam_sort_buffer_size;
DROP TABLE t1;
-# End of 4.1 tests
+#
+# BUG#31174 - "Repair" command on MyISAM crashes with small
+# myisam_sort_buffer_size
+#
+CREATE TABLE t1(a CHAR(255), KEY(a));
+SET myisam_sort_buffer_size=4496;
+INSERT INTO t1 VALUES
+('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
+('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
+('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
+('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
+('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
+('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
+('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
+('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
+('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
+('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
+('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
+('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
+('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
+('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
+('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
+('0'),('0'),('0'),('0'),('0'),('0'),('0');
+SET myisam_repair_threads=2;
+REPAIR TABLE t1;
+SET myisam_repair_threads=@@global.myisam_repair_threads;
+SET myisam_sort_buffer_size=@@global.myisam_sort_buffer_size;
+DROP TABLE t1;
+
+--echo End of 4.1 tests
# End of 5.0 tests
#
diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test
index 76a66cc4783..bc0e4ae307f 100644
--- a/mysql-test/t/select.test
+++ b/mysql-test/t/select.test
@@ -2361,6 +2361,27 @@ insert into t1 values (0xfffffffffffffffff, 0xfffffffffffffffff),
select hex(a), hex(b) from t1;
drop table t1;
+#
+# Bug #32103: optimizer crash when join on int and mediumint with variable in
+# where clause
+#
+
+CREATE TABLE t1 (c0 int);
+CREATE TABLE t2 (c0 int);
+
+# We need any variable that:
+# 1. has integer type,
+# 2. can be used with the "@@name" syntax
+# 3. available in every server build
+INSERT INTO t1 VALUES(@@connect_timeout);
+INSERT INTO t2 VALUES(@@connect_timeout);
+
+# We only need to ensure 1 row is returned to validate the results
+--replace_column 1 X 2 X
+SELECT * FROM t1 JOIN t2 ON t1.c0 = t2.c0 WHERE (t1.c0 <=> @@connect_timeout);
+
+DROP TABLE t1, t2;
+
--echo End of 4.1 tests
#
@@ -2743,14 +2764,14 @@ 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');
# should return all records
-select * from t1 where f2 >= 0;
-select * from t1 where f2 >= '0000-00-00';
+select * from t1 where f2 >= 0 order by f2;
+select * from t1 where f2 >= '0000-00-00' order by f2;
# should return 4,5
-select * from t1 where f2 >= '2005-09-31';
-select * from t1 where f2 >= '2005-09-3a';
+select * from t1 where f2 >= '2005-09-31' order by f2;
+select * from t1 where f2 >= '2005-09-3a' order by f2;
# should return 1,2,3
-select * from t1 where f2 <= '2005-09-31';
-select * from t1 where f2 <= '2005-09-3a';
+select * from t1 where f2 <= '2005-09-31' order by f2;
+select * from t1 where f2 <= '2005-09-3a' order by f2;
drop table t1;
#
@@ -3455,23 +3476,190 @@ DROP TABLE t1;
#
--disable_ps_protocol
-
SELECT 1 AS ` `;
SELECT 1 AS ` `;
SELECT 1 AS ` x`;
+--enable_ps_protocol
+
+--error 1166
+CREATE VIEW v1 AS SELECT 1 AS ``;
+--error 1166
CREATE VIEW v1 AS SELECT 1 AS ` `;
-SELECT `` FROM v1;
-CREATE VIEW v2 AS SELECT 1 AS ` `;
-SELECT `` FROM v2;
+--error 1166
+CREATE VIEW v1 AS SELECT 1 AS ` `;
+
+--error 1166
+CREATE VIEW v1 AS SELECT (SELECT 1 AS ` `);
+
+CREATE VIEW v1 AS SELECT 1 AS ` x`;
+SELECT `x` FROM v1;
+
+--error 1166
+ALTER VIEW v1 AS SELECT 1 AS ` `;
+
+DROP VIEW v1;
+
+#
+# Bug#31800: Date comparison fails with timezone and slashes for greater
+# than comparison
+#
+
+# On DATETIME-like literals with trailing garbage, BETWEEN fudged in a
+# DATETIME comparator, while greater/less-than used bin-string comparisons.
+# Should correctly be compared as DATE or DATETIME, but throw a warning:
+
+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';
+select str_to_date('2007-10-09','%Y-%m-%d') > '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';
+
+# We have all we need -- and trailing garbage:
+# (leaving out a leading zero in first example to prove it's a
+# value-comparison, not a string-comparison!)
+select str_to_date('2007-10-01','%Y-%m-%d') = '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';
+select str_to_date('2007-10-01','%Y-%m-%d %H:%i:%s') = '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';
+# no time at all:
+select str_to_date('2007-10-01','%Y-%m-%d %H:%i:%s') = '2007-10-01 x12:34:56 GMT-6';
+# partial time:
+select str_to_date('2007-10-01 12:34:00','%Y-%m-%d %H:%i:%s') = '2007-10-01 12:34x:56 GMT-6';
+# fail, different second part:
+select str_to_date('2007-10-01 12:34:56','%Y-%m-%d %H:%i:%s') = '2007-10-01 12:34x:56 GMT-6';
+# correct syntax, no trailing nonsense -- this one must throw no warning:
+select str_to_date('2007-10-01 12:34:56','%Y-%m-%d %H:%i:%s') = '2007-10-01 12:34:56';
+# no warning, but failure (different hour parts):
+select str_to_date('2007-10-01','%Y-%m-%d') = '2007-10-01 12:00:00';
+# succeed:
+select str_to_date('2007-10-01 12','%Y-%m-%d %H') = '2007-10-01 12:00:00';
+# succeed, but warn for "trailing garbage" (":34"):
+select str_to_date('2007-10-01 12:34','%Y-%m-%d %H') = '2007-10-01 12:00:00';
+# invalid date (Feb 30) succeeds
+select str_to_date('2007-02-30 12:34','%Y-%m-%d %H:%i') = '2007-02-30 12:34';
+# 0-day for both, just works in default SQL mode.
+select str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34';
+# 0-day, succeed
+select str_to_date('2007-10-00','%Y-%m-%d') between '2007/09/01 00:00:00'
+ and '2007/10/20 00:00:00';
+set SQL_MODE=TRADITIONAL;
+# 0-day throws warning in traditional mode, and fails
+select str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34';
+select str_to_date('2007-10-01 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34';
+# different code-path: get_datetime_value() with 0-day
+select str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-01 12:34';
+select str_to_date('2007-10-00','%Y-%m-%d') between '2007/09/01'
+ and '2007/10/20';
+set SQL_MODE=DEFAULT;
+select str_to_date('2007-10-00','%Y-%m-%d') between '' and '2007/10/20';
+select str_to_date('','%Y-%m-%d') between '2007/10/01' and '2007/10/20';
+select str_to_date('','%Y-%m-%d %H:%i') = '2007-10-01 12:34';
+select str_to_date(NULL,'%Y-%m-%d %H:%i') = '2007-10-01 12:34';
+select str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '';
+
+select str_to_date('1','%Y-%m-%d') = '1';
+select str_to_date('1','%Y-%m-%d') = '1';
+select str_to_date('','%Y-%m-%d') = '';
+
+# these three should work!
+select str_to_date('1000-01-01','%Y-%m-%d') between '0000-00-00' and NULL;
+select str_to_date('1000-01-01','%Y-%m-%d') between NULL and '2000-00-00';
+select str_to_date('1000-01-01','%Y-%m-%d') between NULL and NULL;
+
+#
+# Bug #30666: Incorrect order when using range conditions on 2 tables or more
+#
+
+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);
+
+# Show that ORDER BY produces the correct results order
+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;
+
+# Show that ORDER BY DESC produces the correct results order
+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;
+
+DROP TABLE t1, t2, t3;
+###########################################################################
+
+--echo
+--echo #
+--echo # Bug#30736: Row Size Too Large Error Creating a Table and
+--echo # Inserting Data.
+--echo #
-CREATE VIEW v3 AS SELECT 1 AS ` x`;
-SELECT `x` FROM v3;
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t2;
+--enable_warnings
-DROP VIEW v1, v2, v3;
+--echo
---enable_ps_protocol
+CREATE TABLE t1(
+ c1 DECIMAL(10, 2),
+ c2 FLOAT);
+
+--echo
+
+INSERT INTO t1 VALUES (0, 1), (2, 3), (4, 5);
+
+--echo
+
+CREATE TABLE t2(
+ c3 DECIMAL(10, 2))
+ SELECT
+ c1 * c2 AS c3
+ FROM t1;
+
+--echo
+
+SELECT * FROM t1;
+
+--echo
+
+SELECT * FROM t2;
+
+--echo
+
+DROP TABLE t1;
+DROP TABLE t2;
+
+--echo
+
+###########################################################################
+
+#
+# Bug #32335: Error on BIGINT > NULL + 1
+#
+
+CREATE TABLE t1 (c1 BIGINT NOT NULL);
+INSERT INTO t1 (c1) VALUES (1);
+SELECT * FROM t1 WHERE c1 > NULL + 1;
+DROP TABLE t1;
+
+--echo
--echo End of 5.0 tests
diff --git a/mysql-test/t/windows_shm-master.opt b/mysql-test/t/shm-master.opt
index 4476ea16360..d71395213b1 100644
--- a/mysql-test/t/windows_shm-master.opt
+++ b/mysql-test/t/shm-master.opt
@@ -1 +1 @@
---skip-grant-tables --loose-shared-memory-base-name=HeyMrBaseNameXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX --loose-shared-memory=1
+--skip-grant-tables --loose-shared-memory-base-name=HeyMrBaseNameXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX$MTR_BUILD_THREAD --loose-shared-memory=1
diff --git a/mysql-test/t/shm.test b/mysql-test/t/shm.test
new file mode 100644
index 00000000000..380607d8ebf
--- /dev/null
+++ b/mysql-test/t/shm.test
@@ -0,0 +1,19 @@
+# We currently only have shm support on windows, so in order
+# to optimize things we skip this test on all other platforms
+--source include/windows.inc
+
+# Only run this test if shared memory is avaliable
+let $shm= query_get_value("SHOW VARIABLES LIKE 'shared_memory'", Value, 1);
+if (`SELECT '$shm' != 'ON'`){
+ skip No shm support;
+}
+
+# Source select test case
+-- source include/common-tests.inc
+
+#
+# Bug #24924: shared-memory-base-name that is too long causes buffer overflow
+#
+--exec $MYSQLADMIN --no-defaults --user=root --host=127.0.0.1 --port=$MASTER_MYPORT --shared-memory-base-name=HeyMrBaseNameXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ping
+
+--echo End of 5.0 tests.
diff --git a/mysql-test/t/skip_grants.test b/mysql-test/t/skip_grants.test
index 5e0fc65bc34..72a073ac541 100644
--- a/mysql-test/t/skip_grants.test
+++ b/mysql-test/t/skip_grants.test
@@ -122,3 +122,23 @@ select count(*) from information_schema.COLUMN_PRIVILEGES;
select count(*) from information_schema.SCHEMA_PRIVILEGES;
select count(*) from information_schema.TABLE_PRIVILEGES;
select count(*) from information_schema.USER_PRIVILEGES;
+#
+# Bug #32020: loading udfs while --skip-grant-tables is enabled causes out of
+# memory errors
+#
+
+--error ER_CANT_INITIALIZE_UDF
+CREATE FUNCTION a RETURNS STRING SONAME '';
+--error ER_SP_DOES_NOT_EXIST
+DROP FUNCTION a;
+
+--echo End of 5.0 tests
+
+--echo #
+--echo # Bug#29817 Queries with UDF fail with non-descriptive error
+--echo # if mysql.proc is missing
+--echo #
+--error ER_SP_DOES_NOT_EXIST
+select no_such_function(1);
+
+--echo End of 5.1 tests
diff --git a/mysql-test/t/sp-error.test b/mysql-test/t/sp-error.test
index 012f2b33225..606c2a673bc 100644
--- a/mysql-test/t/sp-error.test
+++ b/mysql-test/t/sp-error.test
@@ -196,7 +196,7 @@ select f(10)|
drop function f|
---error 1322
+--error ER_PARSE_ERROR
create procedure p()
begin
declare c cursor for insert into test.t1 values ("foo", 42);
@@ -1763,7 +1763,7 @@ drop procedure bug15091;
drop function if exists bug16896;
--enable_warnings
---error ER_SP_NO_AGGREGATE
+--error ER_PARSE_ERROR
create aggregate function bug16896() returns int return 1;
#
@@ -2078,10 +2078,6 @@ create function bug20701() returns varchar(25) binary return "test";
create function bug20701() returns varchar(25) return "test";
drop function bug20701;
-
---echo End of 5.1 tests
-
-
#
# Bug#26503 (Illegal SQL exception handler code causes the server to crash)
#
@@ -2150,6 +2146,165 @@ end//
delimiter ;//
+
+#
+# Bug#28360 (RENAME DATABASE destroys routines)
+#
+
+--disable_warnings
+drop procedure if exists proc_28360;
+drop function if exists func_28360;
+--enable_warnings
+
+delimiter //;
+
+--error ER_SP_NO_DROP_SP
+CREATE PROCEDURE proc_28360()
+BEGIN
+ ALTER DATABASE `#mysql50#upgrade-me` UPGRADE DATA DIRECTORY NAME;
+END//
+
+--error ER_SP_NO_DROP_SP
+CREATE FUNCTION func_28360() RETURNS int
+BEGIN
+ ALTER DATABASE `#mysql50#upgrade-me` UPGRADE DATA DIRECTORY NAME;
+ RETURN 0;
+END//
+
+delimiter ;//
+
+
+#
+# Bug#29223 declare cursor c for SHOW .....
+#
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS p1;
+--enable_warnings
+--delimiter |
+--error ER_PARSE_ERROR
+CREATE PROCEDURE p1()
+BEGIN
+ DECLARE c char(100);
+ DECLARE cur1 CURSOR FOR SHOW TABLES;
+
+ OPEN cur1;
+ FETCH cur1 INTO c;
+ select c;
+ CLOSE cur1;
+END|
+--delimiter ;
+
+#
+# Bug#29816 Syntactically wrong query fails with misleading error message
+#
+
+--disable_warnings
+DROP DATABASE IF EXISTS mysqltest;
+--enable_warnings
+CREATE DATABASE mysqltest;
+USE mysqltest;
+DROP DATABASE mysqltest;
+# Both ER_SP_DOES_NOT_EXIST and ER_PARSE_ERROR are valid here,
+# the result is implementation dependent:
+# See Bug#29816 for details
+--error ER_SP_DOES_NOT_EXIST
+SELECT inexistent(), 1 + ,;
+--error ER_SP_DOES_NOT_EXIST
+SELECT inexistent();
+--error ER_PARSE_ERROR
+SELECT .inexistent();
+--error ER_PARSE_ERROR
+SELECT ..inexistent();
+USE test;
+
+#
+# Bug#30904 SET PASSWORD statement is non-transactional
+#
+
+delimiter |;
+
+--error ER_SP_CANT_SET_AUTOCOMMIT
+create function f1() returns int
+begin
+ set @test = 1, password = password('foo');
+ return 1;
+end|
+
+--error ER_SP_CANT_SET_AUTOCOMMIT
+create trigger t1
+ before insert on t2 for each row set password = password('foo');|
+
+delimiter ;|
+
+#
+# Bug#30882 Dropping a temporary table inside a stored function may cause a server crash
+#
+
+--disable_warnings
+drop function if exists f1;
+drop function if exists f2;
+drop table if exists t1, t2;
+--enable_warnings
+
+delimiter |;
+create function f1() returns int
+begin
+ drop temporary table t1;
+ return 1;
+end|
+delimiter ;|
+--error ER_CANT_REOPEN_TABLE
+create temporary table t1 as select f1();
+
+delimiter |;
+create function f2() returns int
+begin
+ create temporary table t2 as select f1();
+ return 1;
+end|
+delimiter ;|
+--error ER_CANT_REOPEN_TABLE
+create temporary table t1 as select f2();
+
+drop function f1;
+drop function f2;
+
+delimiter |;
+create function f1() returns int
+begin
+ drop temporary table t2,t1;
+ return 1;
+end|
+create function f2() returns int
+begin
+ create temporary table t2 as select f1();
+ return 1;
+end|
+delimiter ;|
+--error ER_CANT_REOPEN_TABLE
+create temporary table t1 as select f2();
+
+drop function f1;
+drop function f2;
+
+create temporary table t2(a int);
+select * from t2;
+delimiter |;
+create function f2() returns int
+begin
+ drop temporary table t2;
+ return 1;
+end|
+delimiter ;|
+select f2();
+
+drop function f2;
+--error ER_BAD_TABLE_ERROR
+drop table t2;
+
+--echo End of 5.1 tests
+
#
# BUG#NNNN: New bug synopsis
#
diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test
index 4e4102dd1ef..004e1c4ddd2 100644
--- a/mysql-test/t/sp.test
+++ b/mysql-test/t/sp.test
@@ -7581,4 +7581,479 @@ DROP TABLE t1;
DROP PROCEDURE p1;
DROP PROCEDURE p2;
+###########################################################################
+
+#
+# Bug#31035: select from function, group by result crasher.
+#
+
+###########################################################################
+
+--echo
+
+--echo #
+--echo # Bug#31035.
+--echo #
+
+--echo
+
+--echo #
+--echo # - Prepare.
+--echo #
+
+--echo
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+DROP FUNCTION IF EXISTS f1;
+DROP FUNCTION IF EXISTS f2;
+DROP FUNCTION IF EXISTS f3;
+DROP FUNCTION IF EXISTS f4;
+--enable_warnings
+
+--echo
+
+--echo #
+--echo # - Create required objects.
+--echo #
+
+--echo
+
+CREATE TABLE t1(c1 INT);
+
+--echo
+
+INSERT INTO t1 VALUES (1), (2), (3);
+
+--echo
+
+CREATE FUNCTION f1()
+ RETURNS INT
+ NOT DETERMINISTIC
+ RETURN 1;
+
+--echo
+
+CREATE FUNCTION f2(p INT)
+ RETURNS INT
+ NOT DETERMINISTIC
+ RETURN 1;
+
+--echo
+
+CREATE FUNCTION f3()
+ RETURNS INT
+ DETERMINISTIC
+ RETURN 1;
+
+--echo
+
+CREATE FUNCTION f4(p INT)
+ RETURNS INT
+ DETERMINISTIC
+ RETURN 1;
+
+--echo
+
+--echo #
+--echo # - Check.
+--echo #
+
+--echo
+
+# Not deterministic function, no arguments.
+
+SELECT f1() AS a FROM t1 GROUP BY a;
+
+--echo
+
+# Not deterministic function, non-constant argument.
+
+SELECT f2(@a) AS a FROM t1 GROUP BY a;
+
+--echo
+
+# Deterministic function, no arguments.
+
+SELECT f3() AS a FROM t1 GROUP BY a;
+
+--echo
+
+# Deterministic function, constant argument.
+
+SELECT f4(0) AS a FROM t1 GROUP BY a;
+
+--echo
+
+# Deterministic function, non-constant argument.
+
+SELECT f4(@a) AS a FROM t1 GROUP BY a;
+
+--echo
+
+--echo #
+--echo # - Cleanup.
+--echo #
+
+--echo
+
+DROP TABLE t1;
+DROP FUNCTION f1;
+DROP FUNCTION f2;
+DROP FUNCTION f3;
+DROP FUNCTION f4;
+
+--echo
+
+###########################################################################
+
+#
+# Bug#31191: JOIN in combination with stored function crashes the server.
+#
+
+###########################################################################
+
+--echo #
+--echo # Bug#31191.
+--echo #
+
+--echo
+
+--echo #
+--echo # - Prepare.
+--echo #
+
+--echo
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t2;
+DROP FUNCTION IF EXISTS f1;
+--enable_warnings
+
+--echo
+
+--echo #
+--echo # - Create required objects.
+--echo #
+
+--echo
+
+CREATE TABLE t1 (
+ id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
+ barcode INT(8) UNSIGNED ZEROFILL nOT NULL,
+ PRIMARY KEY (id),
+ UNIQUE KEY barcode (barcode)
+);
+
+--echo
+
+INSERT INTO t1 (id, barcode) VALUES (1, 12345678);
+INSERT INTO t1 (id, barcode) VALUES (2, 12345679);
+
+--echo
+
+CREATE TABLE test.t2 (
+ id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
+ barcode BIGINT(11) UNSIGNED ZEROFILL NOT NULL,
+ PRIMARY KEY (id)
+);
+
+--echo
+
+INSERT INTO test.t2 (id, barcode) VALUES (1, 12345106708);
+INSERT INTO test.t2 (id, barcode) VALUES (2, 12345106709);
+
+--echo
+
+CREATE FUNCTION f1(p INT(8))
+ RETURNS BIGINT(11) UNSIGNED
+ READS SQL DATA
+ RETURN FLOOR(p/1000)*1000000 + 100000 + FLOOR((p MOD 1000)/10)*100 + (p MOD 10);
+
+--echo
+
+--echo #
+--echo # - Check.
+--echo #
+
+--echo
+
+SELECT DISTINCT t1.barcode, f1(t1.barcode)
+FROM t1
+INNER JOIN t2
+ON f1(t1.barcode) = t2.barcode
+WHERE t1.barcode=12345678;
+
+--echo
+
+--echo #
+--echo # - Cleanup.
+--echo #
+
+--echo
+
+DROP TABLE t1;
+DROP TABLE t2;
+DROP FUNCTION f1;
+
+--echo
+
+###########################################################################
+
+#
+# Bug#31226: Group by function crashes mysql.
+#
+
+###########################################################################
+
+--echo #
+--echo # Bug#31226.
+--echo #
+
+--echo
+
+--echo #
+--echo # - Prepare.
+--echo #
+
+--echo
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+DROP FUNCTION IF EXISTS f1;
+--enable_warnings
+
+--echo
+
+--echo #
+--echo # - Create required objects.
+--echo #
+
+--echo
+
+CREATE TABLE t1(id INT);
+
+--echo
+
+INSERT INTO t1 VALUES (1), (2), (3);
+
+--echo
+
+CREATE FUNCTION f1()
+ RETURNS DATETIME
+ NOT DETERMINISTIC NO SQL
+ RETURN NOW();
+
+--echo
+
+--echo #
+--echo # - Check.
+--echo #
+
+--echo
+
+--replace_column 1 <timestamp>
+SELECT f1() FROM t1 GROUP BY 1;
+
+--echo
+
+--echo #
+--echo # - Cleanup.
+--echo #
+
+--echo
+
+DROP TABLE t1;
+DROP FUNCTION f1;
+
+--echo
+
+###########################################################################
+
+#
+# Bug#28318 (CREATE FUNCTION (UDF) requires a schema)
+#
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS db28318_a.t1;
+DROP PROCEDURE IF EXISTS db28318_b.t2;
+DROP DATABASE IF EXISTS db28318_a;
+DROP DATABASE IF EXISTS db28318_b;
+--enable_warnings
+
+CREATE DATABASE db28318_a;
+CREATE DATABASE db28318_b;
+
+CREATE PROCEDURE db28318_a.t1() SELECT "db28318_a.t1";
+CREATE PROCEDURE db28318_b.t2() CALL t1();
+
+use db28318_a;
+
+# In db28318_b.t2, t1 refers to db28318_b.t1
+--error ER_SP_DOES_NOT_EXIST
+CALL db28318_b.t2();
+
+DROP PROCEDURE db28318_a.t1;
+DROP PROCEDURE db28318_b.t2;
+DROP DATABASE db28318_a;
+DROP DATABASE db28318_b;
+use test;
+
+###########################################################################
+
--echo End of 5.0 tests
+
+###########################################################################
+
+#
+# Bug#20550: Stored function: wrong RETURN type metadata when used in a VIEW.
+#
+
+###########################################################################
+
+--echo
+
+--echo #
+--echo # Bug#20550.
+--echo #
+
+--echo
+
+--echo #
+--echo # - Prepare.
+--echo #
+
+--echo
+
+--disable_warnings
+DROP VIEW IF EXISTS v1;
+DROP VIEW IF EXISTS v2;
+DROP FUNCTION IF EXISTS f1;
+DROP FUNCTION IF EXISTS f2;
+--enable_warnings
+
+--echo
+
+--echo #
+--echo # - Create required objects.
+--echo #
+
+--echo
+
+CREATE FUNCTION f1() RETURNS VARCHAR(65525) RETURN 'Hello';
+
+--echo
+
+CREATE FUNCTION f2() RETURNS TINYINT RETURN 1;
+
+--echo
+
+CREATE VIEW v1 AS SELECT f1();
+
+--echo
+
+CREATE VIEW v2 AS SELECT f2();
+
+--echo
+
+--echo #
+--echo # - Check.
+--echo #
+
+--echo
+
+SELECT DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'v1';
+
+--echo
+
+SELECT DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'v2';
+
+--echo
+
+--echo #
+--echo # - Cleanup.
+--echo #
+
+--echo
+
+DROP FUNCTION f1;
+DROP FUNCTION f2;
+DROP VIEW v1;
+DROP VIEW v2;
+
+--echo
+
+###########################################################################
+
+#
+# Bug#24923: Functions with ENUM issues.
+#
+
+###########################################################################
+
+--echo #
+--echo # - Bug#24923: prepare.
+--echo #
+
+--echo
+
+--disable_warnings
+DROP FUNCTION IF EXISTS f1;
+--enable_warnings
+
+--echo
+
+--echo #
+--echo # - Bug#24923: create required objects.
+--echo #
+
+--echo
+
+delimiter |;
+
+CREATE FUNCTION f1(p INT)
+ RETURNS ENUM ('Very_long_enum_element_identifier',
+ 'Another_very_long_enum_element_identifier')
+ BEGIN
+ CASE p
+ WHEN 1 THEN
+ RETURN 'Very_long_enum_element_identifier';
+ ELSE
+ RETURN 'Another_very_long_enum_element_identifier';
+ END CASE;
+ END|
+
+delimiter ;|
+
+--echo
+
+--echo #
+--echo # - Bug#24923: check.
+--echo #
+
+--echo
+
+SELECT f1(1);
+
+--echo
+
+SELECT f1(2);
+
+--echo
+
+SHOW CREATE FUNCTION f1;
+
+--echo #
+--echo # - Bug#24923: cleanup.
+--echo #
+
+--echo
+
+DROP FUNCTION f1;
+
+--echo
+
+###########################################################################
+
+--echo End of 5.1 tests
diff --git a/mysql-test/t/sp_notembedded.test b/mysql-test/t/sp_notembedded.test
index b5037b469ae..4a747b9c614 100644
--- a/mysql-test/t/sp_notembedded.test
+++ b/mysql-test/t/sp_notembedded.test
@@ -45,27 +45,9 @@ call bug4902_2()|
call bug4902_2()|
drop procedure bug4902_2|
-
-# Disable until bug#17244 is fixed
---disable_parsing
#
-# BUG#5278: Stored procedure packets out of order if SET PASSWORD.
+# BUG#3583: query cache doesn't work for stored procedures
#
---disable_warnings
-drop function if exists bug5278|
---enable_warnings
-create function bug5278 () returns char
-begin
- SET PASSWORD FOR 'bob'@'%.loc.gov' = PASSWORD('newpass');
- return 'okay';
-end|
-
---error 1133
-select bug5278()|
---error 1133
-select bug5278()|
-drop function bug5278|
---enable_parsing
--disable_warnings
drop table if exists t1|
@@ -74,9 +56,6 @@ create table t1 (
id char(16) not null default '',
data int not null
)|
-#
-# BUG#3583: query cache doesn't work for stored procedures
-#
--disable_warnings
drop procedure if exists bug3583|
--enable_warnings
diff --git a/mysql-test/t/status.test b/mysql-test/t/status.test
index 1cd5aa1726a..6a11791924a 100644
--- a/mysql-test/t/status.test
+++ b/mysql-test/t/status.test
@@ -21,6 +21,8 @@ select * from information_schema.session_status where variable_name like 'Table_
connection con1;
# ++Immediate = 3
SET SQL_LOG_BIN=0;
+set @old_general_log = @@global.general_log;
+set global general_log = 'OFF';
--disable_warnings
# ++Immediate = 4
drop table if exists t1;
@@ -60,6 +62,7 @@ reap;
# ++Immediate = 16 + $wait_condition_reps
show status like 'Table_locks_waited';
drop table t1;
+set global general_log = @old_general_log;
disconnect con2;
disconnect con1;
diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test
index 5ca590aaaa4..6d6490d0ebc 100644
--- a/mysql-test/t/subselect.test
+++ b/mysql-test/t/subselect.test
@@ -32,7 +32,9 @@ SELECT 1 FROM (SELECT 1 as a) b WHERE 1 IN (SELECT (SELECT a));
select (SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE(1));
-- error 1108
SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE((SELECT 1));
+-- error ER_BAD_FIELD_ERROR
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NULL;
+-- error ER_BAD_FIELD_ERROR
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NOT NULL;
SELECT (SELECT 1,2,3) = ROW(1,2,3);
SELECT (SELECT 1,2,3) = ROW(1,2,1);
@@ -1346,17 +1348,20 @@ drop table t1,t2;
CREATE TABLE t1 ( a int, b int );
CREATE TABLE t2 ( c int, d int );
INSERT INTO t1 VALUES (1,2), (2,3), (3,4);
-SELECT a AS abc, b FROM t1 WHERE b = (SELECT MIN(b) FROM t1 WHERE a=abc);
-INSERT INTO t2 SELECT a AS abc, b FROM t1 WHERE b = (SELECT MIN(b) FROM t1 WHERE a=abc);
+SELECT a AS abc, b FROM t1 outr WHERE b =
+ (SELECT MIN(b) FROM t1 WHERE a=outr.a);
+INSERT INTO t2 SELECT a AS abc, b FROM t1 outr WHERE b =
+ (SELECT MIN(b) FROM t1 WHERE a=outr.a);
select * from t2;
-CREATE TABLE t3 SELECT a AS abc, b FROM t1 WHERE b = (SELECT MIN(b) FROM t1 WHERE a=abc);
+CREATE TABLE t3 SELECT a AS abc, b FROM t1 outr WHERE b =
+ (SELECT MIN(b) FROM t1 WHERE a=outr.a);
select * from t3;
-prepare stmt1 from "INSERT INTO t2 SELECT a AS abc, b FROM t1 WHERE b = (SELECT MIN(b) FROM t1 WHERE a=abc);";
+prepare stmt1 from "INSERT INTO t2 SELECT a AS abc, b FROM t1 outr WHERE b = (SELECT MIN(b) FROM t1 WHERE a=outr.a);";
execute stmt1;
deallocate prepare stmt1;
select * from t2;
drop table t3;
-prepare stmt1 from "CREATE TABLE t3 SELECT a AS abc, b FROM t1 WHERE b = (SELECT MIN(b) FROM t1 WHERE a=abc);";
+prepare stmt1 from "CREATE TABLE t3 SELECT a AS abc, b FROM t1 outr WHERE b = (SELECT MIN(b) FROM t1 WHERE a=outr.a);";
execute stmt1;
select * from t3;
deallocate prepare stmt1;
@@ -1529,7 +1534,9 @@ INSERT INTO t1 VALUES ('ASM','American Samoa','Oceania','Polynesia',199.00,0,680
INSERT INTO t1 VALUES ('ATF','French Southern territories','Antarctica','Antarctica',7780.00,0,0,NULL,0.00,NULL,'Terres australes françaises','Nonmetropolitan Territory of France','Jacques Chirac',NULL,'TF');
INSERT INTO t1 VALUES ('UMI','United States Minor Outlying Islands','Oceania','Micronesia/Caribbean',16.00,0,0,NULL,0.00,NULL,'United States Minor Outlying Islands','Dependent Territory of the US','George W. Bush',NULL,'UM');
/*!40000 ALTER TABLE t1 ENABLE KEYS */;
-SELECT DISTINCT Continent AS c FROM t1 WHERE Code <> SOME ( SELECT Code FROM t1 WHERE Continent = c AND Population < 200);
+SELECT DISTINCT Continent AS c FROM t1 outr WHERE
+ Code <> SOME ( SELECT Code FROM t1 WHERE Continent = outr.Continent AND
+ Population < 200);
drop table t1;
#
@@ -2448,12 +2455,16 @@ DROP TABLE t1, t2;
CREATE TABLE t1 (i INT);
(SELECT i FROM t1) UNION (SELECT i FROM t1);
+#TODO:not supported
+--error ER_PARSE_ERROR
SELECT sql_no_cache * FROM t1 WHERE NOT EXISTS
(
(SELECT i FROM t1) UNION
(SELECT i FROM t1)
);
+#TODO:not supported
+--error ER_PARSE_ERROR
SELECT * FROM t1
WHERE NOT EXISTS (((SELECT i FROM t1) UNION (SELECT i FROM t1)));
@@ -2461,7 +2472,9 @@ WHERE NOT EXISTS (((SELECT i FROM t1) UNION (SELECT i FROM t1)));
--error 1064
explain select ((select t11.i from t1 t11) union (select t12.i from t1 t12))
from t1;
-#supported
+
+#TODO:not supported
+--error ER_PARSE_ERROR
explain select * from t1 where not exists
((select t11.i from t1 t11) union (select t12.i from t1 t12));
@@ -2987,6 +3000,143 @@ SELECT (SELECT SUM(t1.a) FROM t2 WHERE a!=0) FROM t1;
SELECT (SELECT SUM(t1.a) FROM t2 WHERE a=1) FROM t1;
DROP TABLE t1,t2;
+#
+# Bug #31884: Assertion + crash in subquery in the SELECT clause.
+#
+
+CREATE TABLE t1 (a1 INT, a2 INT);
+CREATE TABLE t2 (b1 INT, b2 INT);
+
+INSERT INTO t1 VALUES (100, 200);
+INSERT INTO t1 VALUES (101, 201);
+INSERT INTO t2 VALUES (101, 201);
+INSERT INTO t2 VALUES (103, 203);
+
+SELECT ((a1,a2) IN (SELECT * FROM t2 WHERE b2 > 0)) IS NULL FROM t1;
+DROP TABLE t1, t2;
+
+#
+# Bug #28076: inconsistent binary/varbinary comparison
+#
+
+CREATE TABLE t1 (s1 BINARY(5), s2 VARBINARY(5));
+INSERT INTO t1 VALUES (0x41,0x41), (0x42,0x42), (0x43,0x43);
+
+SELECT s1, s2 FROM t1 WHERE s2 IN (SELECT s1 FROM t1);
+SELECT s1, s2 FROM t1 WHERE (s2, 10) IN (SELECT s1, 10 FROM t1);
+
+CREATE INDEX I1 ON t1 (s1);
+CREATE INDEX I2 ON t1 (s2);
+
+SELECT s1, s2 FROM t1 WHERE s2 IN (SELECT s1 FROM t1);
+SELECT s1, s2 FROM t1 WHERE (s2, 10) IN (SELECT s1, 10 FROM t1);
+
+TRUNCATE t1;
+INSERT INTO t1 VALUES (0x41,0x41);
+SELECT * FROM t1 WHERE s1 = (SELECT s2 FROM t1);
+
+DROP TABLE t1;
+
+CREATE TABLE t1 (a1 VARBINARY(2) NOT NULL DEFAULT '0', PRIMARY KEY (a1));
+CREATE TABLE t2 (a2 BINARY(2) default '0', INDEX (a2));
+CREATE TABLE t3 (a3 BINARY(2) default '0');
+INSERT INTO t1 VALUES (1),(2),(3),(4);
+INSERT INTO t2 VALUES (1),(2),(3);
+INSERT INTO t3 VALUES (1),(2),(3);
+SELECT LEFT(t2.a2, 1) FROM t2,t3 WHERE t3.a3=t2.a2;
+SELECT t1.a1, t1.a1 in (SELECT t2.a2 FROM t2,t3 WHERE t3.a3=t2.a2) FROM t1;
+DROP TABLE t1,t2,t3;
+
+CREATE TABLE t1 (a1 BINARY(3) PRIMARY KEY, b1 VARBINARY(3));
+CREATE TABLE t2 (a2 VARBINARY(3) PRIMARY KEY);
+CREATE TABLE t3 (a3 VARBINARY(3) PRIMARY KEY);
+INSERT INTO t1 VALUES (1,10), (2,20), (3,30), (4,40);
+INSERT INTO t2 VALUES (2), (3), (4), (5);
+INSERT INTO t3 VALUES (10), (20), (30);
+SELECT LEFT(t1.a1,1) FROM t1,t3 WHERE t1.b1=t3.a3;
+SELECT a2 FROM t2 WHERE t2.a2 IN (SELECT t1.a1 FROM t1,t3 WHERE t1.b1=t3.a3);
+DROP TABLE t1, t2, t3;
+
+#
+# Bug #30788: Inconsistent retrieval of char/varchar
+#
+
+CREATE TABLE t1 (a CHAR(1), b VARCHAR(10));
+INSERT INTO t1 VALUES ('a', 'aa');
+INSERT INTO t1 VALUES ('a', 'aaa');
+SELECT a,b FROM t1 WHERE b IN (SELECT a FROM t1);
+CREATE INDEX I1 ON t1 (a);
+CREATE INDEX I2 ON t1 (b);
+EXPLAIN SELECT a,b FROM t1 WHERE b IN (SELECT a FROM t1);
+SELECT a,b FROM t1 WHERE b IN (SELECT a FROM t1);
+
+CREATE TABLE t2 (a VARCHAR(1), b VARCHAR(10));
+INSERT INTO t2 SELECT * FROM t1;
+CREATE INDEX I1 ON t2 (a);
+CREATE INDEX I2 ON t2 (b);
+EXPLAIN SELECT a,b FROM t2 WHERE b IN (SELECT a FROM t2);
+SELECT a,b FROM t2 WHERE b IN (SELECT a FROM t2);
+EXPLAIN
+SELECT a,b FROM t1 WHERE b IN (SELECT a FROM t1 WHERE LENGTH(a)<500);
+SELECT a,b FROM t1 WHERE b IN (SELECT a FROM t1 WHERE LENGTH(a)<500);
+
+DROP TABLE t1,t2;
+
+#
+# Bug #32400: Complex SELECT query returns correct result only on some
+# occasions
+#
+
+CREATE TABLE t1(a INT, b INT);
+INSERT INTO t1 VALUES (1,1), (1,2), (2,3), (2,4);
+
+--error ER_BAD_FIELD_ERROR
+EXPLAIN
+SELECT a AS out_a, MIN(b) FROM t1
+WHERE b > (SELECT MIN(b) FROM t1 WHERE a = out_a)
+GROUP BY a;
+
+--error ER_BAD_FIELD_ERROR
+SELECT a AS out_a, MIN(b) FROM t1
+WHERE b > (SELECT MIN(b) FROM t1 WHERE a = out_a)
+GROUP BY a;
+
+EXPLAIN
+SELECT a AS out_a, MIN(b) FROM t1 t1_outer
+WHERE b > (SELECT MIN(b) FROM t1 WHERE a = t1_outer.a)
+GROUP BY a;
+
+SELECT a AS out_a, MIN(b) FROM t1 t1_outer
+WHERE b > (SELECT MIN(b) FROM t1 WHERE a = t1_outer.a)
+GROUP BY a;
+
+DROP TABLE t1;
+
+
+#
+# Bug #32036: EXISTS within a WHERE clause with a UNION crashes MySQL 5.122
+#
+
+CREATE TABLE t1 (a INT);
+CREATE TABLE t2 (a INT);
+
+INSERT INTO t1 VALUES (1),(2);
+INSERT INTO t2 VALUES (1),(2);
+
+SELECT 2 FROM t1 WHERE EXISTS ((SELECT 1 FROM t2 WHERE t1.a=t2.a));
+EXPLAIN EXTENDED
+SELECT 2 FROM t1 WHERE EXISTS ((SELECT 1 FROM t2 WHERE t1.a=t2.a));
+
+
+#TODO:not supported
+--error ER_PARSE_ERROR
+EXPLAIN EXTENDED
+SELECT 2 FROM t1 WHERE EXISTS ((SELECT 1 FROM t2 WHERE t1.a=t2.a) UNION
+ (SELECT 1 FROM t2 WHERE t1.a = t2.a));
+
+DROP TABLE t1,t2;
+
+
--echo End of 5.0 tests.
#
diff --git a/mysql-test/t/subselect_notembedded.test b/mysql-test/t/subselect_notembedded.test
index c112272e8ad..040c90452b9 100644
--- a/mysql-test/t/subselect_notembedded.test
+++ b/mysql-test/t/subselect_notembedded.test
@@ -7,3 +7,99 @@
--error 1064
purge master logs before (select adddate(current_timestamp(), interval -4 day));
purge master logs before adddate(current_timestamp(), interval -4 day);
+
+#
+# Bug31048: Many nested subqueries may cause server crash.
+#
+create table t1(a int,b int,key(a),key(b));
+insert into t1(a,b) values (1,2),(2,1),(2,3),(3,4),(5,4),(5,5),
+ (6,7),(7,4),(5,3);
+# test for the stack overflow bug
+select sum(a),a from t1 where a> (
+ select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+ select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+ select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+ select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+ select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+ select sum(a) from t1 where a> ( select sum(a) from t1
+ )group by b limit 1)group by b limit 1
+ )group by b limit 1)group by b limit 1)group by b limit 1
+ )group by b limit 1)group by b limit 1)group by b limit 1
+ )group by b limit 1)group by b limit 1)group by b limit 1)
+group by a;
+--replace_regex /overrun.*$/overrun detected/
+--error 1436
+select sum(a),a from t1 where a> (
+ select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+ select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+ select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+ select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+ select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+ select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+ select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+ select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+ select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+ select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+ select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+ select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+ select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+ select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+ select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+ select sum(a) from t1
+ )group by b limit 1)group by b limit 1)group by b limit 1
+ )group by b limit 1)group by b limit 1)group by b limit 1
+ )group by b limit 1)group by b limit 1)group by b limit 1
+ )group by b limit 1)group by b limit 1)group by b limit 1
+ )group by b limit 1)group by b limit 1)group by b limit 1
+ )group by b limit 1)group by b limit 1)group by b limit 1
+ )group by b limit 1)group by b limit 1)group by b limit 1
+ )group by b limit 1)group by b limit 1)group by b limit 1
+ )group by b limit 1)group by b limit 1)group by b limit 1
+ )group by b limit 1)group by b limit 1)group by b limit 1)
+group by a;
+# test for the memory consumption & subquery slowness bug
+explain select sum(a),a from t1 where a> (
+ select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+ select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+ select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+ select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+ select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+ select sum(a) from t1 where a> ( select sum(a) from t1
+ )group by b limit 1)group by b limit 1
+ )group by b limit 1)group by b limit 1)group by b limit 1
+ )group by b limit 1)group by b limit 1)group by b limit 1
+ )group by b limit 1)group by b limit 1)group by b limit 1)
+group by a;
+--replace_regex /overrun.*$/overrun detected/
+--error 1436
+explain select sum(a),a from t1 where a> (
+ select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+ select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+ select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+ select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+ select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+ select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+ select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+ select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+ select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+ select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+ select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+ select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+ select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+ select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+ select sum(a) from t1 where a> ( select sum(a) from t1 where a> (
+ select sum(a) from t1
+ )group by b limit 1)group by b limit 1)group by b limit 1
+ )group by b limit 1)group by b limit 1)group by b limit 1
+ )group by b limit 1)group by b limit 1)group by b limit 1
+ )group by b limit 1)group by b limit 1)group by b limit 1
+ )group by b limit 1)group by b limit 1)group by b limit 1
+ )group by b limit 1)group by b limit 1)group by b limit 1
+ )group by b limit 1)group by b limit 1)group by b limit 1
+ )group by b limit 1)group by b limit 1)group by b limit 1
+ )group by b limit 1)group by b limit 1)group by b limit 1
+ )group by b limit 1)group by b limit 1)group by b limit 1)
+group by a;
+drop table t1;
+
+
diff --git a/mysql-test/t/symlink.test b/mysql-test/t/symlink.test
index 15f50b11e73..f339b29c83a 100644
--- a/mysql-test/t/symlink.test
+++ b/mysql-test/t/symlink.test
@@ -121,6 +121,18 @@ show create table t1;
drop table t1;
#
+# BUG#32111 - Security Breach via DATA/INDEX DIRECORY and RENAME TABLE
+#
+--replace_result $MYSQLTEST_VARDIR TEST_DIR
+eval CREATE TABLE t1(a INT)
+DATA DIRECTORY='$MYSQLTEST_VARDIR/master-data/mysql'
+INDEX DIRECTORY='$MYSQLTEST_VARDIR/master-data/mysql';
+--replace_result $MYSQLTEST_VARDIR TEST_DIR
+--error 1
+RENAME TABLE t1 TO user;
+DROP TABLE t1;
+
+#
# Test specifying DATA DIRECTORY that is the same as what would normally
# have been chosen. (Bug #8707)
#
diff --git a/mysql-test/t/trigger.test b/mysql-test/t/trigger.test
index 9f4634e1e17..1aeac91e5ad 100644
--- a/mysql-test/t/trigger.test
+++ b/mysql-test/t/trigger.test
@@ -2246,3 +2246,62 @@ select * from table_25411_a;
drop table table_25411_a;
drop table table_25411_b;
+#
+# Bug #31866: MySQL Server crashes on SHOW CREATE TRIGGER statement
+#
+
+--disable_warnings
+DROP TRIGGER IF EXISTS trg;
+--enable_warnings
+
+--error ER_TRG_DOES_NOT_EXIST
+SHOW CREATE TRIGGER trg;
+
+#
+# Bug#23713 LOCK TABLES + CREATE TRIGGER + FLUSH TABLES WITH READ LOCK = deadlock
+#
+# Test of trigger creation and removal under LOCK TABLES
+#
+
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+
+create table t1 (i int, j int);
+
+create trigger t1_bi before insert on t1 for each row begin end;
+--error ER_NOT_SUPPORTED_YET
+create trigger t1_bi before insert on t1 for each row begin end;
+drop trigger t1_bi;
+--error ER_TRG_DOES_NOT_EXIST
+drop trigger t1_bi;
+
+lock tables t1 read;
+--error ER_TABLE_NOT_LOCKED_FOR_WRITE
+create trigger t1_bi before insert on t1 for each row begin end;
+--error ER_TABLE_NOT_LOCKED_FOR_WRITE
+create trigger t1_bi before insert on t1 for each row begin end;
+--error ER_TRG_DOES_NOT_EXIST
+drop trigger t1_bi;
+unlock tables;
+
+create trigger t1_bi before insert on t1 for each row begin end;
+lock tables t1 read;
+--error ER_TABLE_NOT_LOCKED_FOR_WRITE
+create trigger t1_bi before insert on t1 for each row begin end;
+--error ER_TABLE_NOT_LOCKED_FOR_WRITE
+drop trigger t1_bi;
+unlock tables;
+drop trigger t1_bi;
+
+lock tables t1 write;
+create trigger b1_bi before insert on t1 for each row set new.i = new.i + 10;
+insert into t1 values (10, 10);
+drop trigger b1_bi;
+insert into t1 values (10, 10);
+select * from t1;
+unlock tables;
+
+drop table t1;
+
+--echo End of 5.1 tests.
diff --git a/mysql-test/t/trigger-grant.test b/mysql-test/t/trigger_notembedded.test
index 8145212ed5b..748ae6e1c27 100644
--- a/mysql-test/t/trigger-grant.test
+++ b/mysql-test/t/trigger_notembedded.test
@@ -875,3 +875,37 @@ DROP DATABASE mysqltest_db1;
USE test;
--echo End of 5.0 tests.
+
+#
+# Bug#23713 LOCK TABLES + CREATE TRIGGER + FLUSH TABLES WITH READ LOCK = deadlock
+#
+
+# Test temporarily disable due to Bug#32395
+--disable_parsing
+create table t1 (i int);
+connect (flush,localhost,root,,test,,);
+connection default;
+--echo connection: default
+lock tables t1 write;
+connection flush;
+--echo connection: flush
+--send flush tables with read lock;
+connection default;
+--echo connection: default
+let $wait_condition=
+ select count(*) = 1 from information_schema.processlist
+ where state = "Flushing tables";
+--source include/wait_condition.inc
+create trigger t1_bi before insert on t1 for each row begin end;
+unlock tables;
+connection flush;
+--echo connection: flush
+--reap
+unlock tables;
+connection default;
+select * from t1;
+drop table t1;
+disconnect flush;
+--enable_parsing
+
+--echo End of 5.1 tests.
diff --git a/mysql-test/t/type_bit.test b/mysql-test/t/type_bit.test
index b9d93c28115..44780fb9d01 100644
--- a/mysql-test/t/type_bit.test
+++ b/mysql-test/t/type_bit.test
@@ -318,6 +318,21 @@ INSERT INTO t2 VALUES (3, 2, 'two'), (2, 3, 'three'), (2, 0, 'zero'),
SELECT COUNT(DISTINCT b,c) FROM t2 GROUP BY a;
DROP TABLE t2;
+#
+# BUG#32556 assert in "using index for group-by" : is_last_prefix <= 0,
+# file .\opt_range.cc
+
+CREATE TABLE t1(a BIT(13), KEY(a));
+--disable_warnings
+INSERT INTO t1(a) VALUES
+(65535),(65525),(65535),(65535),(65535),(65535),(65535),(65535),(65535),(65535);
+--enable_warnings
+
+EXPLAIN SELECT 1 FROM t1 GROUP BY a;
+SELECT 1 FROM t1 GROUP BY a;
+
+DROP TABLE t1;
+
--echo End of 5.0 tests
#
diff --git a/mysql-test/t/type_blob.test b/mysql-test/t/type_blob.test
index b6febf8e76d..afb70b0bd0c 100644
--- a/mysql-test/t/type_blob.test
+++ b/mysql-test/t/type_blob.test
@@ -436,4 +436,15 @@ set @@sql_mode='TRADITIONAL';
create table t1 (a text default '');
set @@sql_mode='';
+#
+# Bug #32282: TEXT silently truncates when value is exactly 65536 bytes
+#
+
+CREATE TABLE t (c TEXT CHARSET ASCII);
+INSERT INTO t (c) VALUES (REPEAT('1',65537));
+INSERT INTO t (c) VALUES (REPEAT('2',65536));
+INSERT INTO t (c) VALUES (REPEAT('3',65535));
+SELECT LENGTH(c), CHAR_LENGTH(c) FROM t;
+DROP TABLE t;
+
--echo End of 5.0 tests
diff --git a/mysql-test/t/type_date.test b/mysql-test/t/type_date.test
index dcee4fd2ffc..d714229c217 100644
--- a/mysql-test/t/type_date.test
+++ b/mysql-test/t/type_date.test
@@ -139,3 +139,88 @@ insert into t1 values (9912101,9912101,9912101);
insert into t1 values (11111,11111,11111);
select * from t1;
drop table t1;
+
+#
+# Bug #30942: select str_to_date from derived table returns varying results
+#
+CREATE TABLE t1 (
+ a INT
+);
+
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (NULL);
+
+SELECT str_to_date( '', a ) FROM t1;
+DROP TABLE t1;
+
+
+#
+# Bug #31221: Optimizer incorrectly identifies impossible WHERE clause
+#
+
+CREATE TABLE t1 (a DATE, b int, PRIMARY KEY (a,b));
+INSERT INTO t1 VALUES (DATE(NOW()), 1);
+SELECT COUNT(*) FROM t1 WHERE a = NOW();
+EXPLAIN SELECT COUNT(*) FROM t1 WHERE a = NOW();
+INSERT INTO t1 VALUES (DATE(NOW()), 2);
+SELECT COUNT(*) FROM t1 WHERE a = NOW();
+EXPLAIN SELECT COUNT(*) FROM t1 WHERE a = NOW();
+SELECT COUNT(*) FROM t1 WHERE a = NOW() AND b = 1;
+EXPLAIN SELECT COUNT(*) FROM t1 WHERE a = NOW() AND b = 1;
+ALTER TABLE t1 DROP PRIMARY KEY;
+SELECT COUNT(*) FROM t1 WHERE a = NOW();
+EXPLAIN SELECT COUNT(*) FROM t1 WHERE a = NOW();
+
+DROP TABLE t1;
+
+#
+# Bug #28687: Search fails on '0000-00-00' date after sql_mode change
+#
+
+CREATE TABLE t1 (a DATE);
+CREATE TABLE t2 (a DATE);
+CREATE INDEX i ON t1 (a);
+INSERT INTO t1 VALUES ('0000-00-00'),('0000-00-00');
+INSERT INTO t2 VALUES ('0000-00-00'),('0000-00-00');
+SELECT * FROM t1 WHERE a = '0000-00-00';
+SELECT * FROM t2 WHERE a = '0000-00-00';
+SET SQL_MODE=TRADITIONAL;
+EXPLAIN SELECT * FROM t1 WHERE a = '0000-00-00';
+SELECT * FROM t1 WHERE a = '0000-00-00';
+SELECT * FROM t2 WHERE a = '0000-00-00';
+--error ER_TRUNCATED_WRONG_VALUE
+INSERT INTO t1 VALUES ('0000-00-00');
+SET SQL_MODE=DEFAULT;
+DROP TABLE t1,t2;
+
+#
+# Bug #31928: Search fails on '1000-00-00' date after sql_mode change
+#
+
+CREATE TABLE t1 (a DATE);
+CREATE TABLE t2 (a DATE);
+CREATE INDEX i ON t1 (a);
+INSERT INTO t1 VALUES ('1000-00-00'),('1000-00-00');
+INSERT INTO t2 VALUES ('1000-00-00'),('1000-00-00');
+SELECT * FROM t1 WHERE a = '1000-00-00';
+SELECT * FROM t2 WHERE a = '1000-00-00';
+SET SQL_MODE=TRADITIONAL;
+EXPLAIN SELECT * FROM t1 WHERE a = '1000-00-00';
+SELECT * FROM t1 WHERE a = '1000-00-00';
+SELECT * FROM t2 WHERE a = '1000-00-00';
+--error ER_TRUNCATED_WRONG_VALUE
+INSERT INTO t1 VALUES ('1000-00-00');
+SET SQL_MODE=DEFAULT;
+DROP TABLE t1,t2;
+
+--echo End of 5.0 tests
+
+#
+# Bug#32021: Using Date 000-00-01 in WHERE causes wrong result
+#
+create table t1 (a date, primary key (a))engine=memory;
+insert into t1 values ('0000-01-01'), ('0000-00-01'), ('0001-01-01');
+select * from t1 where a between '0000-00-01' and '0000-00-02';
+drop table t1;
+
+--echo End of 5.1 tests
diff --git a/mysql-test/t/type_datetime.test b/mysql-test/t/type_datetime.test
index d8d137d81e6..4fdd96b8729 100644
--- a/mysql-test/t/type_datetime.test
+++ b/mysql-test/t/type_datetime.test
@@ -155,13 +155,13 @@ set @@sql_mode='ansi,traditional';
insert into t1 values ('2007-03-23 13:49:38','2007-03-23 13:49:38');
insert into t1 set dt='2007-03-23 13:49:38',da=dt;
# Test error handling
---error 1292
+--error ER_TRUNCATED_WRONG_VALUE
insert into t1 values ('2007-03-32','2007-03-23 13:49:38');
select * from t1;
drop table t1;
---error 1067
+--error ER_INVALID_DEFAULT
create table t1 (da date default '1962-03-32 23:33:34', dt datetime default '1962-03-03');
---error 1067
+--error ER_INVALID_DEFAULT
create table t1 (t time default '916:00:00 a');
set @@sql_mode= @org_mode;
@@ -169,6 +169,19 @@ set @@sql_mode= @org_mode;
#
# Bug#27590: Wrong DATE/DATETIME comparison.
#
+## The following sub test will fail (difference to expected result) if the
+## select curdate() < now(), f1 < now(), cast(f1 as date) < now() from t1;
+## runs exact at midnight ('00:00:00').
+## ( Bug#29290 type_datetime.test failure in 5.1 )
+## Therefore we sleep a bit if we are too close to midnight.
+## The complete test itself needs around 1 second.
+## Therefore a time_distance to midnight of 5 seconds should be sufficient.
+if (`SELECT CURTIME() > SEC_TO_TIME(24 * 3600 - 5)`)
+{
+ # We are here when CURTIME() is between '23:59:56' and '23:59:59'.
+ # So a sleep time of 5 seconds brings us between '00:00:01' and '00:00:04'.
+ --real_sleep 5
+}
create table t1 (f1 date, f2 datetime, f3 timestamp);
insert into t1(f1) values(curdate());
select curdate() < now(), f1 < now(), cast(f1 as date) < now() from t1;
@@ -283,6 +296,99 @@ select * from t1 where f1 between 2002010 and 20070101000000;
select * from t1 where f1 between 20020101 and 2007010100000;
drop table t1;
+--echo #
+--echo # Bug#27216: functions with parameters of different date types may
+--echo # return wrong type of the result.
+--echo #
+create table t1 (f1 date, f2 datetime, f3 varchar(20));
+create table t2 as select coalesce(f1,f1) as f4 from t1;
+desc t2;
+create table t3 as select coalesce(f1,f2) as f4 from t1;
+desc t3;
+create table t4 as select coalesce(f2,f2) as f4 from t1;
+desc t4;
+create table t5 as select coalesce(f1,f3) as f4 from t1;
+desc t5;
+create table t6 as select coalesce(f2,f3) as f4 from t1;
+desc t6;
+create table t7 as select coalesce(makedate(1997,1),f2) as f4 from t1;
+desc t7;
+create table t8 as select coalesce(cast('01-01-01' as datetime),f2) as f4
+ from t1;
+desc t8;
+create table t9 as select case when 1 then cast('01-01-01' as date)
+ when 0 then cast('01-01-01' as date) end as f4 from t1;
+desc t9;
+create table t10 as select case when 1 then cast('01-01-01' as datetime)
+ when 0 then cast('01-01-01' as datetime) end as f4 from t1;
+desc t10;
+create table t11 as select if(1, cast('01-01-01' as datetime),
+ cast('01-01-01' as date)) as f4 from t1;
+desc t11;
+create table t12 as select least(cast('01-01-01' as datetime),
+ cast('01-01-01' as date)) as f4 from t1;
+desc t12;
+create table t13 as select ifnull(cast('01-01-01' as datetime),
+ cast('01-01-01' as date)) as f4 from t1;
+desc t13;
+drop tables t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13;
+--echo ###################################################################
+#
+# Bug #31253: crash comparing datetime to double
+# Should return 1st row only. Crashes if NULL propagation fails.
+#
+create table t1 (f1 time);
+insert into t1 set f1 = '45:44:44';
+insert into t1 set f1 = '15:44:44';
+select * from t1 where (convert(f1,datetime)) != 1;
+drop table t1;
+
+#
+# Bug #31249: problem with convert(..., datetime)
+#
+create table t1 (a tinyint);
+insert into t1 values (), (), ();
+select sum(a) from t1 group by convert(a, datetime);
+drop table t1;
+
+#
+# Bug #32694: NOT NULL table field in a subquery produces invalid results
+#
+create table t1 (id int(10) not null, cur_date datetime not null);
+create table t2 (id int(10) not null, cur_date date not null);
+insert into t1 (id, cur_date) values (1, '2007-04-25 18:30:22');
+insert into t2 (id, cur_date) values (1, '2007-04-25');
+
+explain extended
+select * from t1
+where id in (select id from t1 as x1 where (t1.cur_date is null));
+select * from t1
+where id in (select id from t1 as x1 where (t1.cur_date is null));
+
+explain extended
+select * from t2
+where id in (select id from t2 as x1 where (t2.cur_date is null));
+select * from t2
+where id in (select id from t2 as x1 where (t2.cur_date is null));
+
+insert into t1 (id, cur_date) values (2, '2007-04-26 18:30:22');
+insert into t2 (id, cur_date) values (2, '2007-04-26');
+
+explain extended
+select * from t1
+where id in (select id from t1 as x1 where (t1.cur_date is null));
+select * from t1
+where id in (select id from t1 as x1 where (t1.cur_date is null));
+
+explain extended
+select * from t2
+where id in (select id from t2 as x1 where (t2.cur_date is null));
+select * from t2
+where id in (select id from t2 as x1 where (t2.cur_date is null));
+
+drop table t1,t2;
+
+--echo End of 5.0 tests
#
# Test of storing datetime into date fields
#
diff --git a/mysql-test/t/type_decimal.test b/mysql-test/t/type_decimal.test
index 5538f19f5f9..807d1e6b01e 100644
--- a/mysql-test/t/type_decimal.test
+++ b/mysql-test/t/type_decimal.test
@@ -278,7 +278,7 @@ update t1 set b=a;
select * from t1;
drop table t1;
-# End of 4.1 tests
+--echo End of 4.1 tests
#
# Test for BUG#8397: decimal type in subselects (Item_cache_decimal)
@@ -408,3 +408,74 @@ INSERT INTO t1 VALUES (1.1325,3);
SELECT ROUND(qty,3), dps, ROUND(qty,dps) FROM t1;
DROP TABLE t1;
+
+#
+# Bug#31019: MOD() function and operator crashes MySQL when
+# divisor is very long and < 1
+#
+
+SELECT 1 % .123456789123456789123456789123456789123456789123456789123456789123456789123456789 AS '%';
+SELECT MOD(1, .123456789123456789123456789123456789123456789123456789123456789123456789123456789) AS 'MOD()';
+
+# Bug #31227: memory overrun with decimal (6,6) and zerofill and group_concat
+# valgrind will complain about this (the group_concat(f2)) on unpatched mysqld.
+#
+create table t1 (f1 decimal(6,6),f2 decimal(6,6) zerofill);
+insert into t1 values (-0.123456,0.123456);
+select group_concat(f1),group_concat(f2) from t1;
+drop table t1;
+
+#
+# BUG#31450 "Query causes error 1048"
+#
+create table t1 (
+ ua_id decimal(22,0) not null,
+ ua_invited_by_id decimal(22,0) default NULL,
+ primary key(ua_id)
+);
+insert into t1 values (123, NULL), (456, NULL);
+
+--echo this must not produce error 1048:
+select * from t1 where ua_invited_by_id not in (select ua_id from t1);
+
+drop table t1;
+
+#
+# Bug #30889: filesort and order by with float/numeric crashes server
+#
+--disable_warnings
+DROP TABLE IF EXISTS t3;
+DROP TABLE IF EXISTS t4;
+--enable_warnings
+CREATE TABLE t1( a NUMERIC, b INT );
+INSERT INTO t1 VALUES (123456, 40), (123456, 40);
+SELECT TRUNCATE( a, b ) AS c FROM t1 ORDER BY c;
+SELECT ROUND( a, b ) AS c FROM t1 ORDER BY c;
+SELECT ROUND( a, 100 ) AS c FROM t1 ORDER BY c;
+
+CREATE TABLE t2( a NUMERIC, b INT );
+INSERT INTO t2 VALUES (123456, 100);
+SELECT TRUNCATE( a, b ) AS c FROM t2 ORDER BY c;
+SELECT ROUND( a, b ) AS c FROM t2 ORDER BY c;
+
+CREATE TABLE t3( a DECIMAL, b INT );
+INSERT INTO t3 VALUES (123456, 40), (123456, 40);
+SELECT TRUNCATE( a, b ) AS c FROM t3 ORDER BY c;
+SELECT ROUND( a, b ) AS c FROM t3 ORDER BY c;
+SELECT ROUND( a, 100 ) AS c FROM t3 ORDER BY c;
+
+CREATE TABLE t4( a DECIMAL, b INT );
+INSERT INTO t4 VALUES (123456, 40), (123456, 40);
+SELECT TRUNCATE( a, b ) AS c FROM t4 ORDER BY c;
+SELECT ROUND( a, b ) AS c FROM t4 ORDER BY c;
+SELECT ROUND( a, 100 ) AS c FROM t4 ORDER BY c;
+
+delete from t1;
+INSERT INTO t1 VALUES (1234567890, 20), (999.99, 5);
+show create table t1;
+
+select round(a,b) as c from t1 order by c;
+
+DROP TABLE t1, t2, t3, t4;
+
+--echo End of 5.0 tests
diff --git a/mysql-test/t/type_float.test b/mysql-test/t/type_float.test
index a55200c8853..9aa8c00d24a 100644
--- a/mysql-test/t/type_float.test
+++ b/mysql-test/t/type_float.test
@@ -116,15 +116,10 @@ drop table if exists t1;
# Check conversion of floats to character field (Bug #7774)
create table t1 (c char(20));
insert into t1 values (5e-28);
-# Expected result is "5e-28", but windows returns "5e-028"
---replace_result 5e-028 5e-28
select * from t1;
drop table t1;
create table t1 (c char(6));
insert into t1 values (2e5),(2e6),(2e-4),(2e-5);
-# Expected result is "2e+06", but windows returns "2e+006"
-# Expected result is "2e-05", but windows returns "2e-005"
---replace_result 2e+006 2e+06 2e-005 2e-05
select * from t1;
drop table t1;
@@ -224,6 +219,22 @@ create table t1 (s1 float(0,2));
create table t1 (s1 float(1,2));
#
+# MySQL Bugs: #11589: mysqltest --ps-protocol, strange output, float/double/real with zerofill
+#
+
+CREATE TABLE t1 (
+ f1 real zerofill,
+ f2 double zerofill,
+ f3 float zerofill);
+INSERT INTO t1 VALUES ( 0.314152e+1, 0.314152e+1, 0.314152e+1);
+
+let $my_stmt= select f1, f2, f3 FROM t1;
+eval PREPARE stmt1 FROM '$my_stmt';
+select f1, f2, f3 FROM t1;
+eval $my_stmt;
+EXECUTE stmt1;
+
+DROP TABLE t1;
# Bug #28121 "INSERT or UPDATE into DOUBLE(200,0) field being truncated to 31 digits"
#
diff --git a/mysql-test/t/type_newdecimal.test b/mysql-test/t/type_newdecimal.test
index b1776d09744..4b052a3d1fb 100644
--- a/mysql-test/t/type_newdecimal.test
+++ b/mysql-test/t/type_newdecimal.test
@@ -1205,6 +1205,27 @@ SELECT 1 FROM t1 GROUP BY @b := @a, @b;
DROP TABLE t1;
+#
+# Bug #24907: unpredictable (display) precission, if input precission
+# increases
+#
+
+# As per 10.1.1. Overview of Numeric Types, type (new) DECIMAL has a
+# maxmimum precision of 30 places after the decimal point. Show that
+# temp field creation beyond that works and throws a truncation warning.
+# DECIMAL(37,36) should be adjusted to DECIMAL(31,30).
+CREATE TABLE t1 SELECT 0.123456789012345678901234567890123456 AS f1;
+DESC t1;
+SELECT f1 FROM t1;
+DROP TABLE t1;
+
+# too many decimal places, AND too many digits altogether (90 = 45+45).
+# should preserve integers (65 = 45+20)
+CREATE TABLE t1 SELECT 123451234512345123451234512345123451234512345.678906789067890678906789067890678906789067890 AS f1;
+DESC t1;
+SELECT f1 FROM t1;
+DROP TABLE t1;
+
--echo End of 5.0 tests
#
diff --git a/mysql-test/t/udf.test b/mysql-test/t/udf.test
index 2f1d197cb9e..e9ae1a31079 100644
--- a/mysql-test/t/udf.test
+++ b/mysql-test/t/udf.test
@@ -35,20 +35,20 @@ eval CREATE FUNCTION reverse_lookup
eval CREATE AGGREGATE FUNCTION avgcost
RETURNS REAL SONAME "$UDF_EXAMPLE_LIB";
---error 0
+--error ER_CANT_INITIALIZE_UDF
select myfunc_double();
select myfunc_double(1);
select myfunc_double(78654);
--error 1305
select myfunc_nonexist();
select myfunc_int();
---error 0
+--error ER_CANT_INITIALIZE_UDF
select lookup();
select lookup("127.0.0.1");
---error 0
+--error ER_CANT_INITIALIZE_UDF
select lookup(127,0,0,1);
select lookup("localhost");
---error 0
+--error ER_CANT_INITIALIZE_UDF
select reverse_lookup();
# These two functions should return "localhost", but it's
@@ -59,9 +59,9 @@ select reverse_lookup(127,0,0,1);
--enable_result_log
select reverse_lookup("localhost");
---error 0
+--error ER_CANT_INITIALIZE_UDF
select avgcost();
---error 0
+--error ER_CANT_INITIALIZE_UDF
select avgcost(100,23.76);
create table t1(sum int, price float(24));
insert into t1 values(100, 50.00), (100, 100.00);
@@ -113,11 +113,11 @@ DROP TABLE bug19904;
# Bug#21269: DEFINER-clause is allowed for UDF-functions
#
---error ER_WRONG_USAGE
+--error ER_PARSE_ERROR
CREATE DEFINER=CURRENT_USER() FUNCTION should_not_parse
RETURNS STRING SONAME "should_not_parse.so";
---error ER_WRONG_USAGE
+--error ER_PARSE_ERROR
CREATE DEFINER=someone@somewhere FUNCTION should_not_parse
RETURNS STRING SONAME "should_not_parse.so";
#
@@ -206,11 +206,12 @@ DROP FUNCTION IF EXISTS metaphon;
CREATE FUNCTION metaphon(a int) RETURNS int
return 0;
+# this currently passes, and eclipse the stored function
--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
---error ER_UDF_EXISTS
eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_LIB";
DROP FUNCTION metaphon;
+DROP FUNCTION metaphon;
--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_LIB";
@@ -363,6 +364,20 @@ drop table t1;
drop function metaphon;
set GLOBAL query_cache_size=default;
+#
+# Bug#28318 CREATE FUNCTION (UDF) requires a schema
+#
+
+--disable_warnings
+DROP DATABASE IF EXISTS mysqltest;
+--enable_warnings
+CREATE DATABASE mysqltest;
+USE mysqltest;
+DROP DATABASE mysqltest;
+--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
+eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_LIB";
+DROP FUNCTION metaphon;
+USE test;
#
# Bug #29804 UDF parameters don't contain correct string length
@@ -400,4 +415,25 @@ DROP PROCEDURE check_const_len_sp;
DROP TRIGGER check_const_len_trigger;
DROP TABLE const_len_bug;
+
+#
+# Bug #30355: Incorrect ordering of UDF results
+#
+
+--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
+eval CREATE FUNCTION sequence RETURNS INTEGER SONAME "$UDF_EXAMPLE_LIB";
+CREATE TABLE t1 (a INT);
+CREATE TABLE t2 (a INT PRIMARY KEY);
+INSERT INTO t1 VALUES (4),(3),(2),(1);
+INSERT INTO t2 SELECT * FROM t1;
+
+SELECT sequence() AS seq, a FROM t1 ORDER BY seq ASC;
+SELECT sequence() AS seq, a FROM t1 ORDER BY seq DESC;
+
+SELECT * FROM t1 WHERE a = sequence();
+SELECT * FROM t2 WHERE a = sequence();
+
+DROP FUNCTION sequence;
+DROP TABLE t1,t2;
+
--echo End of 5.0 tests.
diff --git a/mysql-test/t/upgrade.test b/mysql-test/t/upgrade.test
index f517c7787f8..05f430b087b 100644
--- a/mysql-test/t/upgrade.test
+++ b/mysql-test/t/upgrade.test
@@ -1,5 +1,10 @@
-- source include/not_embedded.inc
+# Temporary disabled on windows,
+# because of --exec mkdir
+# TODO: implement Bug#31004 and remove this limitation
+--source include/not_windows.inc
+
--disable_warnings
drop database if exists `mysqltest1`;
drop database if exists `mysqltest-1`;
@@ -56,3 +61,33 @@ system cp $MYSQL_TEST_DIR/std_data/old_table-323.frm $MYSQLTEST_VARDIR/master-da
truncate t1;
drop table t1;
+#
+# Bug#28360 (RENAME DATABASE destroys routines)
+#
+
+--disable_warnings
+drop database if exists `tabc`;
+drop database if exists `a-b-c`;
+--enable_warnings
+
+create database `tabc` default character set latin2;
+create table tabc.t1 (a int);
+FLUSH TABLES;
+
+# Manually make a 5.0 database from the template
+--exec mkdir $MYSQLTEST_VARDIR/master-data/a-b-c
+--copy_file $MYSQLTEST_VARDIR/master-data/tabc/db.opt $MYSQLTEST_VARDIR/master-data/a-b-c/db.opt
+--copy_file $MYSQLTEST_VARDIR/master-data/tabc/t1.frm $MYSQLTEST_VARDIR/master-data/a-b-c/t1.frm
+--copy_file $MYSQLTEST_VARDIR/master-data/tabc/t1.MYD $MYSQLTEST_VARDIR/master-data/a-b-c/t1.MYD
+--copy_file $MYSQLTEST_VARDIR/master-data/tabc/t1.MYI $MYSQLTEST_VARDIR/master-data/a-b-c/t1.MYI
+
+show databases like '%a-b-c%';
+ALTER DATABASE `#mysql50#a-b-c` UPGRADE DATA DIRECTORY NAME;
+# The physical directory name is now a@002db@002dc, the logical name still a-b-c
+show databases like '%a-b-c%';
+show create database `a-b-c`;
+show tables in `a-b-c`;
+show create table `a-b-c`.`t1`;
+drop database `a-b-c`;
+drop database `tabc`;
+
diff --git a/mysql-test/t/user_var.test b/mysql-test/t/user_var.test
index 3a3e8f88f83..f2699ab03d3 100644
--- a/mysql-test/t/user_var.test
+++ b/mysql-test/t/user_var.test
@@ -237,3 +237,30 @@ select @a:=f2, count(f2) from t1 group by 1 desc;
select @a:=f3, count(f3) from t1 group by 1 desc;
select @a:=f4, count(f4) from t1 group by 1 desc;
drop table t1;
+
+#
+# Bug#32482: Crash for a query with ORDER BY a user variable.
+#
+create table t1 (f1 int);
+insert into t1 values (2), (1);
+select @i := f1 as j from t1 order by 1;
+drop table t1;
+# Bug #32260: User variables in query cause server crash
+#
+create table t1(a int);
+insert into t1 values(5),(4),(4),(3),(2),(2),(2),(1);
+set @rownum := 0;
+set @rank := 0;
+set @prev_score := NULL;
+# Disable the result log as we assign a value to a user variable in one part
+# of a statement and use the same variable in other part of the same statement,
+# so we can get unexpected results.
+--disable_result_log
+select @rownum := @rownum + 1 as row,
+ @rank := IF(@prev_score!=a, @rownum, @rank) as rank,
+ @prev_score := a as score
+from t1 order by score desc;
+--enable_result_log
+drop table t1;
+
+--echo End of 5.1 tests
diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test
index e1ed89cea4e..a13bbec7952 100644
--- a/mysql-test/t/variables.test
+++ b/mysql-test/t/variables.test
@@ -161,6 +161,7 @@ select * from information_schema.session_variables where variable_name like 'net
set net_buffer_length=1;
show variables like 'net_buffer_length';
select * from information_schema.session_variables where variable_name like 'net_buffer_length';
+#warning 1292
set net_buffer_length=2000000000;
show variables like 'net_buffer_length';
select * from information_schema.session_variables where variable_name like 'net_buffer_length';
@@ -574,7 +575,14 @@ set @test = @@query_prealloc_size;
set @@query_prealloc_size = @test;
select @@query_prealloc_size = @test;
-# End of 4.1 tests
+#
+# Bug#31588 buffer overrun when setting variables
+#
+# Buffer-size Off By One. Should throw valgrind-warning without fix #31588.
+--error 1231
+set global sql_mode=repeat('a',80);
+
+--echo End of 4.1 tests
#
# Bug#6282 Packet error with SELECT INTO
diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test
index 67354c14cff..7f769c50449 100644
--- a/mysql-test/t/view.test
+++ b/mysql-test/t/view.test
@@ -510,7 +510,7 @@ drop table t1;
#
create table t1 (a int, b int);
create view v1 as select a, sum(b) from t1 group by a;
--- error 1176
+--error ER_WRONG_USAGE
select b from v1 use index (some_index) where b=1;
drop view v1;
drop table t1;
@@ -2549,21 +2549,20 @@ CREATE TABLE t1(
fName varchar(25) NOT NULL,
lName varchar(25) NOT NULL,
DOB date NOT NULL,
+ test_date date NOT NULL,
uID int unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY);
-INSERT INTO t1(fName, lName, DOB) VALUES
- ('Hank', 'Hill', '1964-09-29'),
- ('Tom', 'Adams', '1908-02-14'),
- ('Homer', 'Simpson', '1968-03-05');
+INSERT INTO t1(fName, lName, DOB, test_date) VALUES
+ ('Hank', 'Hill', '1964-09-29', '2007-01-01'),
+ ('Tom', 'Adams', '1908-02-14', '2007-01-01'),
+ ('Homer', 'Simpson', '1968-03-05', '2007-01-01');
CREATE VIEW v1 AS
- SELECT (year(now())-year(DOB)) AS Age
+ SELECT (year(test_date)-year(DOB)) AS Age
FROM t1 HAVING Age < 75;
SHOW CREATE VIEW v1;
-set timestamp=1136066400;
-SELECT (year(now())-year(DOB)) AS Age FROM t1 HAVING Age < 75;
-set timestamp=1136066400;
+SELECT (year(test_date)-year(DOB)) AS Age FROM t1 HAVING Age < 75;
SELECT * FROM v1;
DROP VIEW v1;
@@ -3415,6 +3414,46 @@ select table_name, is_updatable from information_schema.views
drop view v1;
drop table t1;
+#
+# Bug #28701: SELECTs from VIEWs completely ignore USE/FORCE KEY, allowing
+# invalid statements
+#
+
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2);
+CREATE VIEW v1 AS SELECT * FROM t1;
+--error ER_WRONG_USAGE
+SELECT * FROM v1 USE KEY(non_existant);
+--error ER_WRONG_USAGE
+SELECT * FROM v1 FORCE KEY(non_existant);
+--error ER_WRONG_USAGE
+SELECT * FROM v1 IGNORE KEY(non_existant);
+
+DROP VIEW v1;
+DROP TABLE t1;
+
+#
+# Bug #28702: VIEWs defined with USE/FORCE KEY ignore that request
+#
+CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b INT NOT NULL DEFAULT 0,
+ PRIMARY KEY(a), KEY (b));
+INSERT INTO t1 VALUES (),(),(),(),(),(),(),(),(),(),(),(),(),(),();
+CREATE VIEW v1 AS SELECT * FROM t1 FORCE KEY (PRIMARY,b) ORDER BY a;
+SHOW CREATE VIEW v1;
+EXPLAIN SELECT * FROM v1;
+CREATE VIEW v2 AS SELECT * FROM t1 USE KEY () ORDER BY a;
+SHOW CREATE VIEW v2;
+EXPLAIN SELECT * FROM v2;
+CREATE VIEW v3 AS SELECT * FROM t1 IGNORE KEY (b) ORDER BY a;
+SHOW CREATE VIEW v3;
+EXPLAIN SELECT * FROM v3;
+
+DROP VIEW v1;
+DROP VIEW v2;
+DROP VIEW v3;
+DROP TABLE t1;
+
+
--echo End of 5.0 tests.
#
@@ -3436,4 +3475,55 @@ DROP VIEW `v-2`;
DROP DATABASE `d-1`;
USE test;
+--echo
+--echo #
+--echo # Bug#26676: VIEW using old table schema in a session.
+--echo #
+--echo
+
+--disable_warnings
+DROP VIEW IF EXISTS v1;
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+CREATE TABLE t1(c1 INT, c2 INT);
+INSERT INTO t1 VALUES (1, 2), (3, 4);
+
+--echo
+
+SELECT * FROM t1;
+
+--echo
+
+CREATE VIEW v1 AS SELECT * FROM t1;
+
+--echo
+
+SELECT * FROM v1;
+
+--echo
+
+ALTER TABLE t1 ADD COLUMN c3 INT AFTER c2;
+
+--echo
+
+SELECT * FROM t1;
+
+--echo
+
+SELECT * FROM v1;
+
+--echo
+
+SHOW CREATE VIEW v1;
+
+--echo
+
+DROP VIEW v1;
+DROP TABLE t1;
+
+--echo
+--echo # End of test case for Bug#26676.
+--echo
+
--echo End of 5.1 tests.
diff --git a/mysql-test/t/view_grant.test b/mysql-test/t/view_grant.test
index b3bfd1cf544..3be0148f765 100644
--- a/mysql-test/t/view_grant.test
+++ b/mysql-test/t/view_grant.test
@@ -1040,10 +1040,11 @@ GRANT SELECT ON db26813.t1 TO u26813@localhost;
connect (u1,localhost,u26813,,db26813);
connection u1;
---error 1142
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
ALTER VIEW v1 AS SELECT f2 FROM t1;
---error 1142
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
ALTER VIEW v2 AS SELECT f2 FROM t1;
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
ALTER VIEW v3 AS SELECT f2 FROM t1;
connection root;
@@ -1053,6 +1054,51 @@ DROP USER u26813@localhost;
DROP DATABASE db26813;
disconnect u1;
+--echo #
+--echo # Bug#29908: A user can gain additional access through the ALTER VIEW.
+--echo #
+connection root;
+CREATE DATABASE mysqltest_29908;
+USE mysqltest_29908;
+CREATE TABLE t1(f1 INT, f2 INT);
+CREATE USER u29908_1@localhost;
+CREATE DEFINER = u29908_1@localhost VIEW v1 AS SELECT f1 FROM t1;
+CREATE DEFINER = u29908_1@localhost SQL SECURITY INVOKER VIEW v2 AS
+ SELECT f1 FROM t1;
+GRANT DROP, CREATE VIEW, SHOW VIEW ON mysqltest_29908.v1 TO u29908_1@localhost;
+GRANT DROP, CREATE VIEW, SHOW VIEW ON mysqltest_29908.v2 TO u29908_1@localhost;
+GRANT SELECT ON mysqltest_29908.t1 TO u29908_1@localhost;
+CREATE USER u29908_2@localhost;
+GRANT DROP, CREATE VIEW ON mysqltest_29908.v1 TO u29908_2@localhost;
+GRANT DROP, CREATE VIEW, SHOW VIEW ON mysqltest_29908.v2 TO u29908_2@localhost;
+GRANT SELECT ON mysqltest_29908.t1 TO u29908_2@localhost;
+
+connect (u2,localhost,u29908_2,,mysqltest_29908);
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+ALTER VIEW v1 AS SELECT f2 FROM t1;
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+ALTER VIEW v2 AS SELECT f2 FROM t1;
+SHOW CREATE VIEW v2;
+
+connect (u1,localhost,u29908_1,,mysqltest_29908);
+ALTER VIEW v1 AS SELECT f2 FROM t1;
+SHOW CREATE VIEW v1;
+ALTER VIEW v2 AS SELECT f2 FROM t1;
+SHOW CREATE VIEW v2;
+
+connection root;
+ALTER VIEW v1 AS SELECT f1 FROM t1;
+SHOW CREATE VIEW v1;
+ALTER VIEW v2 AS SELECT f1 FROM t1;
+SHOW CREATE VIEW v2;
+
+DROP USER u29908_1@localhost;
+DROP USER u29908_2@localhost;
+DROP DATABASE mysqltest_29908;
+disconnect u1;
+disconnect u2;
+--echo #######################################################################
+
#
# BUG#24040: Create View don't succed with "all privileges" on a database.
#
diff --git a/mysql-test/t/windows.test b/mysql-test/t/windows.test
index 0be81a95b9a..92ca0c3a3ec 100644
--- a/mysql-test/t/windows.test
+++ b/mysql-test/t/windows.test
@@ -36,6 +36,9 @@ EXPLAIN SELECT * FROM t1 WHERE b = (SELECT max(2));
--echo End of 5.0 tests.
+--disable_warnings
+drop procedure if exists proc_1;
+--enable_warnings
#
# Bug #20665: All commands supported in Stored Procedures should work in
# Prepared Statements
diff --git a/mysql-test/t/windows_shm.test b/mysql-test/t/windows_shm.test
deleted file mode 100644
index 1c6f05f2da0..00000000000
--- a/mysql-test/t/windows_shm.test
+++ /dev/null
@@ -1,9 +0,0 @@
-# Windows-specific tests
---source include/windows.inc
-
-#
-# Bug #24924: shared-memory-base-name that is too long causes buffer overflow
-#
---exec $MYSQLADMIN --no-defaults --user=root --host=127.0.0.1 --port=$MASTER_MYPORT --shared-memory-base-name=HeyMrBaseNameXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ping
-
---echo End of 5.0 tests.
diff --git a/mysql-test/t/xml.test b/mysql-test/t/xml.test
index 1d16652ab1e..5ca9c7afd76 100644
--- a/mysql-test/t/xml.test
+++ b/mysql-test/t/xml.test
@@ -533,3 +533,22 @@ select UpdateXML('<a>a</a>',repeat('a b ',1000),'');
select ExtractValue('<a>a</a>', '/a[@x=@y0123456789_0123456789_0123456789_0123456789]');
--error 1105
select ExtractValue('<a>a</a>', '/a[@x=$y0123456789_0123456789_0123456789_0123456789]');
+
+#
+# Bug #31438: updatexml still crashes
+#
+
+select updatexml(NULL, 1, 1), updatexml(1, NULL, 1), updatexml(1, 1, NULL);
+select updatexml(NULL, NULL, 1), updatexml(1, NULL, NULL),
+ updatexml(NULL, 1, NULL);
+select updatexml(NULL, NULL, NULL);
+
+#
+# Bug #32557: order by updatexml causes assertion in filesort
+#
+CREATE TABLE t1(a INT NOT NULL);
+INSERT INTO t1 VALUES (0), (0);
+SELECT 1 FROM t1 ORDER BY(UPDATEXML(a, '1', '1'));
+DROP TABLE t1;
+
+--echo End of 5.1 tests
diff --git a/mysys/CMakeLists.txt b/mysys/CMakeLists.txt
index 3ba9bef4613..5b024056fda 100755
--- a/mysys/CMakeLists.txt
+++ b/mysys/CMakeLists.txt
@@ -29,7 +29,7 @@ SET(MYSYS_SOURCES array.c charset-def.c charset.c checksum.c default.c default_
errors.c hash.c list.c md5.c mf_brkhant.c mf_cache.c mf_dirname.c mf_fn_ext.c
mf_format.c mf_getdate.c mf_iocache.c mf_iocache2.c mf_keycache.c my_safehash.c
mf_keycaches.c mf_loadpath.c mf_pack.c mf_path.c mf_qsort.c mf_qsort2.c
- mf_radix.c mf_same.c mf_sort.c mf_soundex.c mf_strip.c mf_tempdir.c
+ mf_radix.c mf_same.c mf_sort.c mf_soundex.c mf_strip.c mf_arr_appstr.c mf_tempdir.c
mf_tempfile.c mf_unixpath.c mf_wcomp.c mf_wfile.c mulalloc.c my_access.c
my_aes.c my_alarm.c my_alloc.c my_append.c my_bit.c my_bitmap.c my_chsize.c
my_clock.c my_compress.c my_conio.c my_copy.c my_crc32.c my_create.c my_delete.c
diff --git a/mysys/Makefile.am b/mysys/Makefile.am
index 3c9cd9ac6dd..10200fde8be 100644
--- a/mysys/Makefile.am
+++ b/mysys/Makefile.am
@@ -38,7 +38,7 @@ libmysys_a_SOURCES = my_init.c my_getwd.c mf_getdate.c my_mmap.c \
my_error.c errors.c my_div.c my_messnc.c \
mf_format.c mf_same.c mf_dirname.c mf_fn_ext.c \
my_symlink.c my_symlink2.c \
- mf_pack.c mf_unixpath.c mf_strip.c \
+ mf_pack.c mf_unixpath.c mf_strip.c mf_arr_appstr.c \
mf_wcomp.c mf_wfile.c my_gethwaddr.c \
mf_qsort.c mf_qsort2.c mf_sort.c \
ptr_cmp.c mf_radix.c queues.c my_getncpus.c \
diff --git a/mysys/default.c b/mysys/default.c
index 3cc5b08e77c..2758029ec12 100644
--- a/mysys/default.c
+++ b/mysys/default.c
@@ -47,7 +47,7 @@ char *my_defaults_extra_file=0;
/* Which directories are searched for options (and in which order) */
-#define MAX_DEFAULT_DIRS 7
+#define MAX_DEFAULT_DIRS 6
const char *default_directories[MAX_DEFAULT_DIRS + 1];
#ifdef __WIN__
@@ -83,7 +83,22 @@ static int search_default_file_with_ext(Process_option_func func,
void *func_ctx,
const char *dir, const char *ext,
const char *config_file, int recursion_level);
-static void init_default_directories();
+
+
+
+/**
+ Create the list of default directories.
+
+ @details
+ On all systems, if a directory is already in the list, it will be moved
+ to the end of the list. This avoids reading defaults files multiple times,
+ while ensuring the correct precedence.
+
+ @return void
+*/
+
+static void (*init_default_directories)();
+
static char *remove_end_comment(char *ptr);
@@ -922,6 +937,34 @@ void print_defaults(const char *conf_file, const char **groups)
#include <help_end.h>
+/*
+ This extra complexity is to avoid declaring 'rc' if it won't be
+ used.
+*/
+#define ADD_DIRECTORY_INTERNAL(DIR) \
+ array_append_string_unique((DIR), default_directories, \
+ array_elements(default_directories))
+#ifdef DBUG_OFF
+# define ADD_DIRECTORY(DIR) (void) ADD_DIRECTORY_INTERNAL(DIR)
+#else
+#define ADD_DIRECTORY(DIR) \
+ do { \
+ my_bool rc= ADD_DIRECTORY_INTERNAL(DIR); \
+ DBUG_ASSERT(rc == FALSE); /* Success */ \
+ } while (0)
+#endif
+
+
+#define ADD_COMMON_DIRECTORIES() \
+ do { \
+ char *env; \
+ if ((env= getenv(STRINGIFY_ARG(DEFAULT_HOME_ENV)))) \
+ ADD_DIRECTORY(env); \
+ /* Placeholder for --defaults-extra-file=<path> */ \
+ ADD_DIRECTORY(""); \
+ } while (0)
+
+
#ifdef __WIN__
/*
This wrapper for GetSystemWindowsDirectory() will dynamically bind to the
@@ -956,71 +999,33 @@ static size_t my_get_system_windows_directory(char *buffer, size_t size)
}
return count;
}
-#endif
-/*
- Create the list of default directories.
+/**
+ Initialize default directories for Microsoft Windows
- On Microsoft Windows, this is:
- 1. C:/
+ @details
+ 1. GetSystemWindowsDirectory()
2. GetWindowsDirectory()
- 3. GetSystemWindowsDirectory()
- 4. getenv(DEFAULT_HOME_ENV)
- 5. Directory above where the executable is located
- 6. ""
- 7. --sysconfdir=<path>
-
- On Novell NetWare, this is:
- 1. sys:/etc/
- 2. getenv(DEFAULT_HOME_ENV)
- 3. ""
- 4. --sysconfdir=<path>
-
- On OS/2, this is:
- 1. getenv(ETC)
- 2. /etc/
- 3. getenv(DEFAULT_HOME_ENV)
- 4. ""
- 5. "~/"
- 6. --sysconfdir=<path>
-
- Everywhere else, this is:
- 1. /etc/
- 2. /etc/mysql/
- 3. getenv(DEFAULT_HOME_ENV)
- 4. ""
- 5. "~/"
- 6. --sysconfdir=<path>
-
- */
+ 3. C:/
+ 4. Directory above where the executable is located
+ 5. getenv(DEFAULT_HOME_ENV)
+ 6. --defaults-extra-file=<path> (run-time option)
+*/
-static void init_default_directories()
+static void init_default_directories_win()
{
- const char *env, **ptr= default_directories;
+ bzero((char *) default_directories, sizeof(default_directories));
-#ifdef __WIN__
- *ptr++= "C:/";
+ if (my_get_system_windows_directory(shared_system_dir,
+ sizeof(shared_system_dir)))
+ ADD_DIRECTORY(shared_system_dir);
if (GetWindowsDirectory(system_dir,sizeof(system_dir)))
- *ptr++= (char*)&system_dir;
- if (my_get_system_windows_directory(shared_system_dir,
- sizeof(shared_system_dir)) &&
- strcmp(system_dir, shared_system_dir))
- *ptr++= (char *)&shared_system_dir;
+ ADD_DIRECTORY(system_dir);
+
+ ADD_DIRECTORY("C:/");
-#elif defined(__NETWARE__)
- *ptr++= "sys:/etc/";
-#else
- *ptr++= "/etc/";
- *ptr++= "/etc/mysql/";
-#endif
- if ((env= getenv(STRINGIFY_ARG(DEFAULT_HOME_ENV))))
- *ptr++= env;
- *ptr++= ""; /* Place for defaults_extra_file */
-#if !defined(__WIN__) && !defined(__NETWARE__)
- *ptr++= "~/";;
-#elif defined(__WIN__)
if (GetModuleFileName(NULL, config_dir, sizeof(config_dir)))
{
char *last= NULL, *end= strend(config_dir);
@@ -1050,12 +1055,61 @@ static void init_default_directories()
last= end;
}
}
- *ptr++= (char *)&config_dir;
+ ADD_DIRECTORY(config_dir);
}
-#endif
+
+ ADD_COMMON_DIRECTORIES();
+}
+
+static void (*init_default_directories)()= init_default_directories_win;
+
+#elif defined(__NETWARE__)
+
+/**
+ Initialize default directories for Novell Netware
+
+ @details
+ 1. sys:/etc/
+ 2. getenv(DEFAULT_HOME_ENV)
+ 3. --defaults-extra-file=<path> (run-time option)
+*/
+
+static void init_default_directories_netware()
+{
+ bzero((char *) default_directories, sizeof(default_directories));
+ ADD_DIRECTORY("sys:/etc/");
+ ADD_COMMON_DIRECTORIES();
+}
+
+static void (*init_default_directories)()= init_default_directories_netware;
+
+#else
+
+/**
+ Initialize default directories for Unix
+
+ @details
+ 1. /etc/
+ 2. /etc/mysql/
+ 3. --sysconfdir=<path> (compile-time option)
+ 4. getenv(DEFAULT_HOME_ENV)
+ 5. --defaults-extra-file=<path> (run-time option)
+ 6. "~/"
+*/
+
+static void init_default_directories_unix()
+{
+ bzero((char *) default_directories, sizeof(default_directories));
+ ADD_DIRECTORY("/etc/");
+ ADD_DIRECTORY("/etc/mysql/");
#ifdef DEFAULT_SYSCONFDIR
if (DEFAULT_SYSCONFDIR != "")
- *ptr++= DEFAULT_SYSCONFDIR;
+ ADD_DIRECTORY(DEFAULT_SYSCONFDIR);
#endif
- *ptr= 0; /* end marker */
+ ADD_COMMON_DIRECTORIES();
+ ADD_DIRECTORY("~/");
}
+
+static void (*init_default_directories)()= init_default_directories_unix;
+
+#endif
diff --git a/mysys/mf_arr_appstr.c b/mysys/mf_arr_appstr.c
new file mode 100644
index 00000000000..1edbea9df4a
--- /dev/null
+++ b/mysys/mf_arr_appstr.c
@@ -0,0 +1,61 @@
+/* Copyright (C) 2007 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
+#include "mysys_priv.h"
+#include <m_string.h> /* strcmp() */
+
+
+/**
+ Append str to array, or move to the end if it already exists
+
+ @param str String to be appended
+ @param array The array, terminated by a NULL element, all unused elements
+ pre-initialized to NULL
+ @param size Size of the array; array must be terminated by a NULL
+ pointer, so can hold size - 1 elements
+
+ @retval FALSE Success
+ @retval TRUE Failure, array is full
+*/
+
+my_bool array_append_string_unique(const char *str,
+ const char **array, size_t size)
+{
+ const char **p;
+ /* end points at the terminating NULL element */
+ const char **end= array + size - 1;
+ DBUG_ASSERT(*end == NULL);
+
+ for (p= array; *p; ++p)
+ {
+ if (strcmp(*p, str) == 0)
+ break;
+ }
+ if (p >= end)
+ return TRUE; /* Array is full */
+
+ DBUG_ASSERT(*p == NULL || strcmp(*p, str) == 0);
+
+ while (*(p + 1))
+ {
+ *p= *(p + 1);
+ ++p;
+ }
+
+ DBUG_ASSERT(p < end);
+ *p= str;
+
+ return FALSE; /* Success */
+}
diff --git a/mysys/mf_keycache.c b/mysys/mf_keycache.c
index 8b1f3ad0540..2fcf397766d 100644
--- a/mysys/mf_keycache.c
+++ b/mysys/mf_keycache.c
@@ -3431,7 +3431,7 @@ static int flush_cached_blocks(KEY_CACHE *keycache,
As all blocks referred in 'cache' are marked by BLOCK_IN_FLUSH
we are guarunteed no thread will change them
*/
- qsort((uchar*) cache, count, sizeof(*cache), (qsort_cmp) cmp_sec_link);
+ my_qsort((uchar*) cache, count, sizeof(*cache), (qsort_cmp) cmp_sec_link);
keycache_pthread_mutex_lock(&keycache->cache_lock);
/*
diff --git a/mysys/mf_qsort.c b/mysys/mf_qsort.c
index 3d52d56c952..4b3ecb603a6 100644
--- a/mysys/mf_qsort.c
+++ b/mysys/mf_qsort.c
@@ -91,10 +91,10 @@ typedef struct st_stack
*****************************************************************************/
#ifdef QSORT_EXTRA_CMP_ARGUMENT
-qsort_t qsort2(void *base_ptr, size_t count, size_t size, qsort2_cmp cmp,
+qsort_t my_qsort2(void *base_ptr, size_t count, size_t size, qsort2_cmp cmp,
void *cmp_argument)
#else
-qsort_t qsort(void *base_ptr, size_t count, size_t size, qsort_cmp cmp)
+qsort_t my_qsort(void *base_ptr, size_t count, size_t size, qsort_cmp cmp)
#endif
{
char *low, *high, *pivot;
diff --git a/mysys/mf_sort.c b/mysys/mf_sort.c
index 741c8f42327..686ebbc1d14 100644
--- a/mysys/mf_sort.c
+++ b/mysys/mf_sort.c
@@ -34,8 +34,8 @@ void my_string_ptr_sort(uchar *base, uint items, size_t size)
{
if (size && items)
{
- qsort2(base,items, sizeof(uchar*), get_ptr_compare(size),
- (void*) &size);
+ my_qsort2(base,items, sizeof(uchar*), get_ptr_compare(size),
+ (void*) &size);
}
}
}
diff --git a/mysys/my_delete.c b/mysys/my_delete.c
index 14374fd3fa8..4d1115410cb 100644
--- a/mysys/my_delete.c
+++ b/mysys/my_delete.c
@@ -59,16 +59,20 @@ int nt_share_delete(const char *name, myf MyFlags)
ulong cnt;
DBUG_ENTER("nt_share_delete");
DBUG_PRINT("my",("name %s MyFlags %d", name, MyFlags));
-
+
for (cnt= GetTickCount(); cnt; cnt--)
{
sprintf(buf, "%s.%08X.deleted", name, cnt);
if (MoveFile(name, buf))
break;
-
+
if ((errno= GetLastError()) == ERROR_ALREADY_EXISTS)
continue;
-
+
+ /* This happened during tests with MERGE tables. */
+ if (errno == ERROR_ACCESS_DENIED)
+ continue;
+
DBUG_PRINT("warning", ("Failed to rename %s to %s, errno: %d",
name, buf, errno));
break;
diff --git a/mysys/my_getopt.c b/mysys/my_getopt.c
index 218d9dce1f4..d7de0d12e08 100644
--- a/mysys/my_getopt.c
+++ b/mysys/my_getopt.c
@@ -19,6 +19,10 @@
#include <my_sys.h>
#include <mysys_err.h>
#include <my_getopt.h>
+#include <errno.h>
+
+typedef void (*init_func_p)(const struct my_option *option, uchar* *variable,
+ longlong value);
static void default_reporter(enum loglevel level, const char *format, ...);
my_error_reporter my_getopt_error_reporter= &default_reporter;
@@ -29,7 +33,12 @@ static longlong getopt_ll(char *arg, const struct my_option *optp, int *err);
static longlong getopt_ll_limit_value(longlong, const struct my_option *);
static ulonglong getopt_ull(char *, const struct my_option *, int *);
static double getopt_double(char *arg, const struct my_option *optp, int *err);
-static void init_variables(const struct my_option *options);
+static void init_variables(const struct my_option *options,
+ init_func_p init_one_value);
+static void init_one_value(const struct my_option *option, uchar* *variable,
+ longlong value);
+static void fini_one_value(const struct my_option *option, uchar* *variable,
+ longlong value);
static int setval(const struct my_option *, uchar **, char *, my_bool);
static char *check_struct_option(char *cur_arg, char *key_name);
@@ -72,6 +81,7 @@ static void default_reporter(enum loglevel level,
fprintf(stderr, "%s", "Info: ");
vfprintf(stderr, format, args);
va_end(args);
+ fputc('\n', stderr);
fflush(stderr);
}
@@ -112,7 +122,7 @@ int handle_options(int *argc, char ***argv,
DBUG_ASSERT(argv && *argv);
(*argc)--; /* Skip the program name */
(*argv)++; /* --- || ---- */
- init_variables(longopts);
+ init_variables(longopts, init_one_value);
for (pos= *argv, pos_end=pos+ *argc; pos != pos_end ; pos++)
{
@@ -139,7 +149,7 @@ int handle_options(int *argc, char ***argv,
{
if (my_getopt_print_errors)
my_getopt_error_reporter(ERROR_LEVEL,
- "%s: Option '-O' requires an argument\n",
+ "%s: Option '-O' requires an argument",
my_progname);
return EXIT_ARGUMENT_REQUIRED;
}
@@ -157,7 +167,7 @@ int handle_options(int *argc, char ***argv,
{
if (my_getopt_print_errors)
my_getopt_error_reporter(ERROR_LEVEL,
- "%s: Option '--set-variable' requires an argument\n",
+ "%s: Option '--set-variable' requires an argument",
my_progname);
return EXIT_ARGUMENT_REQUIRED;
}
@@ -171,7 +181,7 @@ int handle_options(int *argc, char ***argv,
{
if (my_getopt_print_errors)
my_getopt_error_reporter(ERROR_LEVEL,
- "%s: Option '--set-variable' requires an argument\n",
+ "%s: Option '--set-variable' requires an argument",
my_progname);
return EXIT_ARGUMENT_REQUIRED;
}
@@ -233,7 +243,7 @@ int handle_options(int *argc, char ***argv,
{
if (my_getopt_print_errors)
my_getopt_error_reporter(ERROR_LEVEL,
- "%s: ambiguous option '--%s-%s' (--%s-%s)\n",
+ "%s: ambiguous option '--%s-%s' (--%s-%s)",
my_progname, special_opt_prefix[i],
cur_arg, special_opt_prefix[i],
prev_found);
@@ -284,7 +294,7 @@ int handle_options(int *argc, char ***argv,
if (my_getopt_print_errors)
my_getopt_error_reporter(option_is_loose ?
WARNING_LEVEL : ERROR_LEVEL,
- "%s: unknown variable '%s'\n",
+ "%s: unknown variable '%s'",
my_progname, cur_arg);
if (!option_is_loose)
return EXIT_UNKNOWN_VARIABLE;
@@ -294,7 +304,7 @@ int handle_options(int *argc, char ***argv,
if (my_getopt_print_errors)
my_getopt_error_reporter(option_is_loose ?
WARNING_LEVEL : ERROR_LEVEL,
- "%s: unknown option '--%s'\n",
+ "%s: unknown option '--%s'",
my_progname, cur_arg);
if (!option_is_loose)
return EXIT_UNKNOWN_OPTION;
@@ -312,7 +322,7 @@ int handle_options(int *argc, char ***argv,
{
if (my_getopt_print_errors)
my_getopt_error_reporter(ERROR_LEVEL,
- "%s: variable prefix '%s' is not unique\n",
+ "%s: variable prefix '%s' is not unique",
my_progname, opt_str);
return EXIT_VAR_PREFIX_NOT_UNIQUE;
}
@@ -320,7 +330,7 @@ int handle_options(int *argc, char ***argv,
{
if (my_getopt_print_errors)
my_getopt_error_reporter(ERROR_LEVEL,
- "%s: ambiguous option '--%s' (%s, %s)\n",
+ "%s: ambiguous option '--%s' (%s, %s)",
my_progname, opt_str, prev_found,
optp->name);
return EXIT_AMBIGUOUS_OPTION;
@@ -343,7 +353,7 @@ int handle_options(int *argc, char ***argv,
{
if (my_getopt_print_errors)
my_getopt_error_reporter(ERROR_LEVEL,
- "%s: option '%s' cannot take an argument\n",
+ "%s: option '%s' cannot take an argument",
my_progname, optp->name);
return EXIT_NO_ARGUMENT_ALLOWED;
}
@@ -356,7 +366,7 @@ int handle_options(int *argc, char ***argv,
{
if (my_getopt_print_errors)
my_getopt_error_reporter(ERROR_LEVEL,
- "%s: option '--%s' cannot take an argument\n",
+ "%s: option '--%s' cannot take an argument",
my_progname, optp->name);
return EXIT_NO_ARGUMENT_ALLOWED;
}
@@ -378,7 +388,7 @@ int handle_options(int *argc, char ***argv,
{
my_getopt_error_reporter(WARNING_LEVEL,
"%s: ignoring option '--%s' due to \
-invalid value '%s'\n",
+invalid value '%s'",
my_progname, optp->name, optend);
continue;
}
@@ -409,7 +419,7 @@ invalid value '%s'\n",
{
if (my_getopt_print_errors)
my_getopt_error_reporter(ERROR_LEVEL,
- "%s: option '--%s' requires an argument\n",
+ "%s: option '--%s' requires an argument",
my_progname, optp->name);
return EXIT_ARGUMENT_REQUIRED;
}
@@ -469,7 +479,7 @@ invalid value '%s'\n",
{
if (my_getopt_print_errors)
my_getopt_error_reporter(ERROR_LEVEL,
- "%s: option '-%c' requires an argument\n",
+ "%s: option '-%c' requires an argument",
my_progname, optp->id);
return EXIT_ARGUMENT_REQUIRED;
}
@@ -482,7 +492,7 @@ invalid value '%s'\n",
set_maximum_value)))
{
my_getopt_error_reporter(ERROR_LEVEL,
- "%s: Error while setting value '%s' to '%s'\n",
+ "%s: Error while setting value '%s' to '%s'",
my_progname, argument, optp->name);
return error;
}
@@ -494,7 +504,7 @@ invalid value '%s'\n",
{
if (my_getopt_print_errors)
my_getopt_error_reporter(ERROR_LEVEL,
- "%s: unknown option '-%c'\n",
+ "%s: unknown option '-%c'",
my_progname, *optend);
return EXIT_UNKNOWN_OPTION;
}
@@ -505,7 +515,7 @@ invalid value '%s'\n",
if ((error= setval(optp, value, argument, set_maximum_value)))
{
my_getopt_error_reporter(ERROR_LEVEL,
- "%s: Error while setting value '%s' to '%s'\n",
+ "%s: Error while setting value '%s' to '%s'",
my_progname, argument, optp->name);
return error;
}
@@ -729,7 +739,15 @@ static longlong eval_num_suffix(char *argument, int *error, char *option_name)
longlong num;
*error= 0;
+ errno= 0;
num= strtoll(argument, &endchar, 10);
+ if (errno == ERANGE)
+ {
+ my_getopt_error_reporter(ERROR_LEVEL,
+ "Incorrect integer value: '%s'", argument);
+ *error= 1;
+ return 0;
+ }
if (*endchar == 'k' || *endchar == 'K')
num*= 1024L;
else if (*endchar == 'm' || *endchar == 'M')
@@ -761,7 +779,7 @@ static longlong eval_num_suffix(char *argument, int *error, char *option_name)
static longlong getopt_ll(char *arg, const struct my_option *optp, int *err)
{
longlong num=eval_num_suffix(arg, err, (char*) optp->name);
- return getopt_ll_limit_value(num, optp);
+ return getopt_ll_limit_value(num, optp, NULL);
}
/*
@@ -771,22 +789,58 @@ static longlong getopt_ll(char *arg, const struct my_option *optp, int *err)
Returns "fixed" value.
*/
-static longlong getopt_ll_limit_value(longlong num,
- const struct my_option *optp)
+static longlong getopt_ll_limit_value(longlong num, const struct my_option *optp,
+ bool *fix)
{
- ulonglong block_size= (optp->block_size ? (ulonglong) optp->block_size : 1L);
longlong old= num;
- char buf1[255] __attribute__((unused)), buf2[255] __attribute__((unused));
+ bool adjusted= FALSE;
+ char buf1[255], buf2[255];
+ ulonglong block_size= (optp->block_size ? (ulonglong) optp->block_size : 1L);
- if (num > 0 && (ulonglong) num > (ulonglong) optp->max_value &&
+ if (num > 0 && ((ulonglong) num > (ulonglong) optp->max_value) &&
optp->max_value) /* if max value is not set -> no upper limit */
+ {
num= (ulonglong) optp->max_value;
+ adjusted= TRUE;
+ }
+
+ switch ((optp->var_type & GET_TYPE_MASK)) {
+ case GET_INT:
+ if (num > (longlong) INT_MAX)
+ {
+ num= ((longlong) INT_MAX);
+ adjusted= TRUE;
+ }
+ break;
+ case GET_LONG:
+#if SIZEOF_LONG < SIZEOF_LONG_LONG
+ if (num > (longlong) LONG_MAX)
+ {
+ num= ((longlong) LONG_MAX);
+ adjusted= TRUE;
+ }
+#endif
+ break;
+ default:
+ DBUG_ASSERT((optp->var_type & GET_TYPE_MASK) == GET_LL);
+ break;
+ }
+
num= ((num - optp->sub_size) / block_size);
num= (longlong) (num * block_size);
- num= max(num, optp->min_value);
- if (num != old)
- DBUG_PRINT("options", ("option '%s' adjusted %s -> %s",
- optp->name, llstr(old, buf1), llstr(num, buf2)));
+
+ if (num < optp->min_value)
+ {
+ num= optp->min_value;
+ adjusted= TRUE;
+ }
+
+ if (fix)
+ *fix= adjusted;
+ else if (adjusted)
+ my_getopt_error_reporter(WARNING_LEVEL,
+ "option '%s': signed value %s adjusted to %s",
+ optp->name, llstr(old, buf1), llstr(num, buf2));
return num;
}
@@ -800,28 +854,64 @@ static longlong getopt_ll_limit_value(longlong num,
static ulonglong getopt_ull(char *arg, const struct my_option *optp, int *err)
{
ulonglong num= eval_num_suffix(arg, err, (char*) optp->name);
- return getopt_ull_limit_value(num, optp);
+ return getopt_ull_limit_value(num, optp, NULL);
}
-ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *optp)
+ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *optp,
+ bool *fix);
{
+ bool adjusted= FALSE;
ulonglong old= num;
- char buf1[255] __attribute__((unused)), buf2[255] __attribute__((unused));
+ char buf1[255], buf2[255];
if ((ulonglong) num > (ulonglong) optp->max_value &&
optp->max_value) /* if max value is not set -> no upper limit */
+ {
num= (ulonglong) optp->max_value;
+ adjusted= TRUE;
+ }
+
+ switch ((optp->var_type & GET_TYPE_MASK)) {
+ case GET_UINT:
+ if (num > (ulonglong) UINT_MAX)
+ {
+ num= ((ulonglong) UINT_MAX);
+ adjusted= TRUE;
+ }
+ break;
+ case GET_ULONG:
+#if SIZEOF_LONG < SIZEOF_LONG_LONG
+ if (num > (ulonglong) ULONG_MAX)
+ {
+ num= ((ulonglong) ULONG_MAX);
+ adjusted= TRUE;
+ }
+#endif
+ break;
+ default:
+ DBUG_ASSERT((optp->var_type & GET_TYPE_MASK) == GET_ULL);
+ break;
+ }
+
if (optp->block_size > 1)
{
num/= (ulonglong) optp->block_size;
num*= (ulonglong) optp->block_size;
}
+
if (num < (ulonglong) optp->min_value)
+ {
num= (ulonglong) optp->min_value;
- if (num != old)
- DBUG_PRINT("options", ("option '%s' adjusted %s -> %s",
- optp->name, ullstr(old, buf1), ullstr(num, buf2)));
+ adjusted= TRUE;
+ }
+
+ if (fix)
+ *fix= adjusted;
+ else if (adjusted)
+ my_getopt_error_reporter(WARNING_LEVEL,
+ "option '%s': unsigned value %s adjusted to %s",
+ optp->name, ullstr(old, buf1), ullstr(num, buf2));
return num;
}
@@ -932,6 +1022,37 @@ static void init_one_value(const struct my_option *optp, uchar* *variable,
/*
+ Init one value to it's default values
+
+ SYNOPSIS
+ init_one_value()
+ option Option to initialize
+ value Pointer to variable
+*/
+
+static void fini_one_value(const struct my_option *option, uchar* *variable,
+ longlong value __attribute__ ((unused)))
+{
+ DBUG_ENTER("fini_one_value");
+ switch ((option->var_type & GET_TYPE_MASK)) {
+ case GET_STR_ALLOC:
+ my_free((*(char**) variable), MYF(MY_ALLOW_ZERO_PTR));
+ *((char**) variable)= NULL;
+ break;
+ default: /* dummy default to avoid compiler warnings */
+ break;
+ }
+ DBUG_VOID_RETURN;
+}
+
+
+void my_cleanup_options(const struct my_option *options)
+{
+ init_variables(options, fini_one_value);
+}
+
+
+/*
initialize all variables to their default values
SYNOPSIS
@@ -944,7 +1065,8 @@ static void init_one_value(const struct my_option *optp, uchar* *variable,
for a value and initialize.
*/
-static void init_variables(const struct my_option *options)
+static void init_variables(const struct my_option *options,
+ init_func_p init_one_value)
{
DBUG_ENTER("init_variables");
for (; options->name; options++)
diff --git a/mysys/my_init.c b/mysys/my_init.c
index 850333e0100..145a435b4b6 100644
--- a/mysys/my_init.c
+++ b/mysys/my_init.c
@@ -312,7 +312,7 @@ int handle_rtc_failure(int err_type, const char *file, int line,
return 0; /* Error is handled */
}
-#pragma runtime_checks("", on)
+#pragma runtime_checks("", restore)
#endif
diff --git a/mysys/my_lib.c b/mysys/my_lib.c
index c10b2e391b4..c18d14fb549 100644
--- a/mysys/my_lib.c
+++ b/mysys/my_lib.c
@@ -180,7 +180,7 @@ MY_DIR *my_dir(const char *path, myf MyFlags)
result->number_off_files= dir_entries_storage->elements;
if (!(MyFlags & MY_DONT_SORT))
- qsort((void *) result->dir_entry, result->number_off_files,
+ my_qsort((void *) result->dir_entry, result->number_off_files,
sizeof(FILEINFO), (qsort_cmp) comp_names);
DBUG_RETURN(result);
@@ -491,7 +491,7 @@ MY_DIR *my_dir(const char *path, myf MyFlags)
result->number_off_files= dir_entries_storage->elements;
if (!(MyFlags & MY_DONT_SORT))
- qsort((void *) result->dir_entry, result->number_off_files,
+ my_qsort((void *) result->dir_entry, result->number_off_files,
sizeof(FILEINFO), (qsort_cmp) comp_names);
DBUG_PRINT("exit", ("found %d files", result->number_off_files));
DBUG_RETURN(result);
diff --git a/mysys/my_symlink2.c b/mysys/my_symlink2.c
index 2a46fb3abea..7c3ddbb911c 100644
--- a/mysys/my_symlink2.c
+++ b/mysys/my_symlink2.c
@@ -130,6 +130,7 @@ int my_rename_with_symlink(const char *from, const char *to, myf MyFlags)
int was_symlink= (!my_disable_symlinks &&
!my_readlink(link_name, from, MYF(0)));
int result=0;
+ int name_is_different;
DBUG_ENTER("my_rename_with_symlink");
if (!was_symlink)
@@ -138,6 +139,14 @@ int my_rename_with_symlink(const char *from, const char *to, myf MyFlags)
/* Change filename that symlink pointed to */
strmov(tmp_name, to);
fn_same(tmp_name,link_name,1); /* Copy dir */
+ name_is_different= strcmp(link_name, tmp_name);
+ if (name_is_different && !access(tmp_name, F_OK))
+ {
+ my_errno= EEXIST;
+ if (MyFlags & MY_WME)
+ my_error(EE_CANTCREATEFILE, MYF(0), tmp_name, EEXIST);
+ DBUG_RETURN(1);
+ }
/* Create new symlink */
if (my_symlink(tmp_name, to, MyFlags))
@@ -149,7 +158,7 @@ int my_rename_with_symlink(const char *from, const char *to, myf MyFlags)
the same basename and different directories.
*/
- if (strcmp(link_name, tmp_name) && my_rename(link_name, tmp_name, MyFlags))
+ if (name_is_different && my_rename(link_name, tmp_name, MyFlags))
{
int save_errno=my_errno;
my_delete(to, MyFlags); /* Remove created symlink */
diff --git a/mysys/my_winthread.c b/mysys/my_winthread.c
index 27ccaef4f23..e94369bec32 100644
--- a/mysys/my_winthread.c
+++ b/mysys/my_winthread.c
@@ -40,6 +40,29 @@ void win_pthread_init(void)
pthread_mutex_init(&THR_LOCK_thread,MY_MUTEX_INIT_FAST);
}
+
+/**
+ Adapter to @c pthread_mutex_trylock()
+
+ @retval 0 Mutex was acquired
+ @retval EBUSY Mutex was already locked by a thread
+ */
+int
+win_pthread_mutex_trylock(pthread_mutex_t *mutex)
+{
+ if (TryEnterCriticalSection(mutex))
+ {
+ /* Don't allow recursive lock */
+ if (mutex->RecursionCount > 1){
+ LeaveCriticalSection(mutex);
+ return EBUSY;
+ }
+ return 0;
+ }
+ return EBUSY;
+}
+
+
/*
** We have tried to use '_beginthreadex' instead of '_beginthread' here
** but in this case the program leaks about 512 characters for each
diff --git a/mysys/my_write.c b/mysys/my_write.c
index 056a84f1794..c67b1d8f3f2 100644
--- a/mysys/my_write.c
+++ b/mysys/my_write.c
@@ -29,6 +29,10 @@ size_t my_write(int Filedes, const uchar *Buffer, size_t Count, myf MyFlags)
Filedes, (long) Buffer, (ulong) Count, MyFlags));
errors=0; written=0;
+ /* The behavior of write(fd, buf, 0) is not portable */
+ if (unlikely(!Count))
+ DBUG_RETURN(0);
+
for (;;)
{
if ((writenbytes= write(Filedes, Buffer, Count)) == Count)
diff --git a/mysys/queues.c b/mysys/queues.c
index d8a7ca19bee..94f49ab8f9c 100644
--- a/mysys/queues.c
+++ b/mysys/queues.c
@@ -61,7 +61,7 @@ int init_queue(QUEUE *queue, uint max_elements, uint offset_to_key,
queue->first_cmp_arg=first_cmp_arg;
queue->max_elements=max_elements;
queue->offset_to_key=offset_to_key;
- queue->max_at_top= max_at_top ? (-1 ^ 1) : 0;
+ queue_set_max_at_top(queue, max_at_top);
DBUG_RETURN(0);
}
@@ -137,7 +137,7 @@ int reinit_queue(QUEUE *queue, uint max_elements, uint offset_to_key,
queue->compare=compare;
queue->first_cmp_arg=first_cmp_arg;
queue->offset_to_key=offset_to_key;
- queue->max_at_top= max_at_top ? (-1 ^ 1) : 0;
+ queue_set_max_at_top(queue, max_at_top);
resize_queue(queue, max_elements);
DBUG_RETURN(0);
}
@@ -208,16 +208,14 @@ void delete_queue(QUEUE *queue)
void queue_insert(register QUEUE *queue, uchar *element)
{
reg2 uint idx, next;
- int cmp;
DBUG_ASSERT(queue->elements < queue->max_elements);
queue->root[0]= element;
idx= ++queue->elements;
/* max_at_top swaps the comparison if we want to order by desc */
- while ((cmp= queue->compare(queue->first_cmp_arg,
- element + queue->offset_to_key,
- queue->root[(next= idx >> 1)] +
- queue->offset_to_key)) &&
- (cmp ^ queue->max_at_top) < 0)
+ while ((queue->compare(queue->first_cmp_arg,
+ element + queue->offset_to_key,
+ queue->root[(next= idx >> 1)] +
+ queue->offset_to_key) * queue->max_at_top) < 0)
{
queue->root[idx]= queue->root[next];
idx= next;
@@ -287,19 +285,17 @@ void _downheap(register QUEUE *queue, uint idx)
while (idx <= half_queue)
{
- int cmp;
next_index=idx+idx;
if (next_index < elements &&
(queue->compare(queue->first_cmp_arg,
queue->root[next_index]+offset_to_key,
- queue->root[next_index+1]+offset_to_key) ^
+ queue->root[next_index+1]+offset_to_key) *
queue->max_at_top) > 0)
next_index++;
if (first &&
- (((cmp=queue->compare(queue->first_cmp_arg,
- queue->root[next_index]+offset_to_key,
- element+offset_to_key)) == 0) ||
- ((cmp ^ queue->max_at_top) > 0)))
+ (((queue->compare(queue->first_cmp_arg,
+ queue->root[next_index]+offset_to_key,
+ element+offset_to_key) * queue->max_at_top) >= 0)))
{
queue->root[idx]= element;
return;
@@ -314,7 +310,7 @@ void _downheap(register QUEUE *queue, uint idx)
{
if ((queue->compare(queue->first_cmp_arg,
queue->root[next_index]+offset_to_key,
- element+offset_to_key) ^
+ element+offset_to_key) *
queue->max_at_top) < 0)
break;
queue->root[idx]=queue->root[next_index];
@@ -334,7 +330,6 @@ void _downheap(register QUEUE *queue, uint idx)
{
uchar *element;
uint elements,half_queue,next_index,offset_to_key;
- int cmp;
offset_to_key=queue->offset_to_key;
element=queue->root[idx];
@@ -346,13 +341,12 @@ void _downheap(register QUEUE *queue, uint idx)
if (next_index < elements &&
(queue->compare(queue->first_cmp_arg,
queue->root[next_index]+offset_to_key,
- queue->root[next_index+1]+offset_to_key) ^
+ queue->root[next_index+1]+offset_to_key) *
queue->max_at_top) > 0)
next_index++;
- if ((cmp=queue->compare(queue->first_cmp_arg,
- queue->root[next_index]+offset_to_key,
- element+offset_to_key)) == 0 ||
- (cmp ^ queue->max_at_top) > 0)
+ if ((queue->compare(queue->first_cmp_arg,
+ queue->root[next_index]+offset_to_key,
+ element+offset_to_key) * queue->max_at_top) >= 0)
break;
queue->root[idx]=queue->root[next_index];
idx=next_index;
@@ -382,7 +376,7 @@ void queue_fix(QUEUE *queue)
make test_priority_queue
./test_priority_queue
- Written by Mikael Ronström, 2005
+ Written by Mikael Ronström, 2005
*/
static uint num_array[1025];
diff --git a/mysys/thr_lock.c b/mysys/thr_lock.c
index 5e75802441e..ff70faaefea 100644
--- a/mysys/thr_lock.c
+++ b/mysys/thr_lock.c
@@ -400,6 +400,7 @@ wait_for_lock(struct st_lock_list *wait, THR_LOCK_DATA *data,
struct timespec wait_timeout;
enum enum_thr_lock_result result= THR_LOCK_ABORTED;
my_bool can_deadlock= test(data->owner->info->n_cursors);
+ DBUG_ENTER("wait_for_lock");
if (!in_wait_list)
{
@@ -435,13 +436,21 @@ wait_for_lock(struct st_lock_list *wait, THR_LOCK_DATA *data,
if the predicate is true.
*/
if (data->cond == 0)
+ {
+ DBUG_PRINT("thr_lock", ("lock granted/aborted"));
break;
+ }
if (rc == ETIMEDOUT || rc == ETIME)
{
+ /* purecov: begin inspected */
+ DBUG_PRINT("thr_lock", ("lock timed out"));
result= THR_LOCK_WAIT_TIMEOUT;
break;
+ /* purecov: end */
}
}
+ DBUG_PRINT("thr_lock", ("aborted: %d in_wait_list: %d",
+ thread_var->abort, in_wait_list));
if (data->cond || data->type == TL_UNLOCK)
{
@@ -457,6 +466,7 @@ wait_for_lock(struct st_lock_list *wait, THR_LOCK_DATA *data,
}
else
{
+ DBUG_PRINT("thr_lock", ("lock aborted"));
check_locks(data->lock, "aborted wait_for_lock", 0);
}
}
@@ -475,7 +485,7 @@ wait_for_lock(struct st_lock_list *wait, THR_LOCK_DATA *data,
thread_var->current_mutex= 0;
thread_var->current_cond= 0;
pthread_mutex_unlock(&thread_var->mutex);
- return result;
+ DBUG_RETURN(result);
}
@@ -513,7 +523,7 @@ thr_lock(THR_LOCK_DATA *data, THR_LOCK_OWNER *owner,
and the read lock is not TL_READ_NO_INSERT
*/
- DBUG_PRINT("lock",("write locked by thread: 0x%lx",
+ DBUG_PRINT("lock",("write locked 1 by thread: 0x%lx",
lock->write.data->owner->info->thread_id));
if (thr_lock_owner_equal(data->owner, lock->write.data->owner) ||
(lock->write.data->type <= TL_WRITE_DELAYED &&
@@ -602,10 +612,14 @@ thr_lock(THR_LOCK_DATA *data, THR_LOCK_OWNER *owner,
{
if (lock->write.data->type == TL_WRITE_ONLY)
{
- /* We are not allowed to get a lock in this case */
- data->type=TL_UNLOCK;
- result= THR_LOCK_ABORTED; /* Can't wait for this one */
- goto end;
+ /* Allow lock owner to bypass TL_WRITE_ONLY. */
+ if (!thr_lock_owner_equal(data->owner, lock->write.data->owner))
+ {
+ /* We are not allowed to get a lock in this case */
+ data->type=TL_UNLOCK;
+ result= THR_LOCK_ABORTED; /* Can't wait for this one */
+ goto end;
+ }
}
/*
@@ -635,10 +649,8 @@ thr_lock(THR_LOCK_DATA *data, THR_LOCK_OWNER *owner,
statistic_increment(locks_immediate,&THR_LOCK_lock);
goto end;
}
- /* purecov: begin inspected */
- DBUG_PRINT("lock",("write locked by thread: 0x%lx",
+ DBUG_PRINT("lock",("write locked 2 by thread: 0x%lx",
lock->write.data->owner->info->thread_id));
- /* purecov: end */
}
else
{
@@ -673,7 +685,7 @@ thr_lock(THR_LOCK_DATA *data, THR_LOCK_OWNER *owner,
goto end;
}
}
- DBUG_PRINT("lock",("write locked by thread: 0x%lx type: %d",
+ DBUG_PRINT("lock",("write locked 3 by thread: 0x%lx type: %d",
lock->read.data->owner->info->thread_id, data->type));
}
wait_queue= &lock->write_wait;
@@ -687,6 +699,7 @@ thr_lock(THR_LOCK_DATA *data, THR_LOCK_OWNER *owner,
lock_owner= lock->read.data ? lock->read.data : lock->write.data;
if (lock_owner && lock_owner->owner->info == owner->info)
{
+ DBUG_PRINT("lock",("deadlock"));
result= THR_LOCK_DEADLOCK;
goto end;
}
diff --git a/mysys/thr_mutex.c b/mysys/thr_mutex.c
index 015061900e5..aa46021a938 100644
--- a/mysys/thr_mutex.c
+++ b/mysys/thr_mutex.c
@@ -93,7 +93,7 @@ int safe_mutex_init(safe_mutex_t *mp,
}
-int safe_mutex_lock(safe_mutex_t *mp,const char *file, uint line)
+int safe_mutex_lock(safe_mutex_t *mp, my_bool try_lock, const char *file, uint line)
{
int error;
DBUG_PRINT("mutex", ("%s (0x%lx) locking", mp->name ? mp->name : "Null",
@@ -108,15 +108,50 @@ int safe_mutex_lock(safe_mutex_t *mp,const char *file, uint line)
}
pthread_mutex_lock(&mp->global);
- if (mp->count > 0 && pthread_equal(pthread_self(),mp->thread))
+ if (mp->count > 0)
{
- fprintf(stderr,"safe_mutex: Trying to lock mutex %s at %s, line %d, when the mutex was already locked at %s, line %d in thread %s\n",
- mp->name, file,line,mp->file, mp->line, my_thread_name());
- fflush(stderr);
- abort();
+ if (try_lock)
+ {
+ pthread_mutex_unlock(&mp->global);
+ return EBUSY;
+ }
+ else if (pthread_equal(pthread_self(),mp->thread))
+ {
+ fprintf(stderr,
+ "safe_mutex: Trying to lock mutex at %s, line %d, when the"
+ " mutex was already locked at %s, line %d in thread %s\n",
+ file,line,mp->file, mp->line, my_thread_name());
+ fflush(stderr);
+ abort();
+ }
}
pthread_mutex_unlock(&mp->global);
- error=pthread_mutex_lock(&mp->mutex);
+
+ /*
+ If we are imitating trylock(), we need to take special
+ precautions.
+
+ - We cannot use pthread_mutex_lock() only since another thread can
+ overtake this thread and take the lock before this thread
+ causing pthread_mutex_trylock() to hang. In this case, we should
+ just return EBUSY. Hence, we use pthread_mutex_trylock() to be
+ able to return immediately.
+
+ - We cannot just use trylock() and continue execution below, since
+ this would generate an error and abort execution if the thread
+ was overtaken and trylock() returned EBUSY . In this case, we
+ instead just return EBUSY, since this is the expected behaviour
+ of trylock().
+ */
+ if (try_lock)
+ {
+ error= pthread_mutex_trylock(&mp->mutex);
+ if (error == EBUSY)
+ return error;
+ }
+ else
+ error= pthread_mutex_lock(&mp->mutex);
+
if (error || (error=pthread_mutex_lock(&mp->global)))
{
fprintf(stderr,"Got error %d when trying to lock mutex %s at %s, line %d\n",
diff --git a/netware/Makefile.am b/netware/Makefile.am
index 64467a41777..80da180273b 100644
--- a/netware/Makefile.am
+++ b/netware/Makefile.am
@@ -56,9 +56,6 @@ link_sources:
done
echo timestamp > link_sources
-BUILT_SOURCES = link_sources
-CLEANFILES = $(BUILT_SOURCES)
-
else
BUILT_SOURCES = libmysql.imp init_db.sql test_db.sql
diff --git a/netware/mysql_test_run.c b/netware/mysql_test_run.c
index 774aa61bea4..c32abce20d3 100644
--- a/netware/mysql_test_run.c
+++ b/netware/mysql_test_run.c
@@ -175,7 +175,7 @@ void report_stats()
log_msg("\nThe .out and .err files in %s may give you some\n", result_dir);
log_msg("hint of what went wrong.\n");
log_msg("\nIf you want to report this error, please first read the documentation\n");
- log_msg("at: http://www.mysql.com/doc/en/MySQL_test_suite.html\n");
+ log_msg("at: http://dev.mysql.com/doc/mysql/en/mysql-test-suite.html\n");
}
log_msg("\n%.02f total minutes elapsed in the test cases\n\n", total_time / 60);
@@ -1169,7 +1169,8 @@ void setup(char *file)
setenv("MYSQL_BINLOG", file_path, 1);
setenv("MASTER_MYPORT", "9306", 1);
setenv("SLAVE_MYPORT", "9307", 1);
- setenv("MYSQL_TCP_PORT", "3306", 1);
+ snprintf(file_path, PATH_MAX*2, "%d", MYSQL_PORT);
+ setenv("MYSQL_TCP_PORT", file_path, 1);
snprintf(file_path, PATH_MAX*2, "%s/mysql_client_test --no-defaults --testcase--user=root --port=%u ", bin_dir, master_port);
setenv("MYSQL_CLIENT_TEST",file_path,1);
snprintf(file_path, PATH_MAX*2, "%s/mysql --no-defaults --user=root --port=%u ", bin_dir, master_port);
diff --git a/netware/mysqld_safe.c b/netware/mysqld_safe.c
index 9db8a441ca3..00e7d1bcd51 100644
--- a/netware/mysqld_safe.c
+++ b/netware/mysqld_safe.c
@@ -189,7 +189,7 @@ void start_defaults(int argc, char *argv[])
snprintf(address, PATH_MAX, "0.0.0.0");
// port
- snprintf(port, PATH_MAX, "3306");
+ snprintf(port, PATH_MAX, "%d", MYSQL_PORT);
// default option
default_option[0]= NULL;
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index fed96490397..fc4359fd872 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -144,13 +144,19 @@ SUFFIXES = .sh
-e 's!@''CC''@!@CC@!'\
-e 's!@''CXX''@!@CXX@!'\
-e 's!@''GXX''@!@GXX@!'\
+ -e 's!@''SAVE_CC''@!@SAVE_CC@!'\
+ -e 's!@''SAVE_CXX''@!@SAVE_CXX@!'\
-e 's!@''CC_VERSION''@!@CC_VERSION@!'\
-e 's!@''CXX_VERSION''@!@CXX_VERSION@!'\
-e 's!@''PERL''@!@PERL@!' \
- -e 's!@''ASFLAGS''@!@SAVE_ASFLAGS@!'\
- -e 's!@''CFLAGS''@!@SAVE_CFLAGS@!'\
- -e 's!@''CXXFLAGS''@!@SAVE_CXXFLAGS@!'\
- -e 's!@''LDFLAGS''@!@SAVE_LDFLAGS@!'\
+ -e 's!@''SAVE_ASFLAGS''@!@SAVE_ASFLAGS@!'\
+ -e 's!@''SAVE_CFLAGS''@!@SAVE_CFLAGS@!'\
+ -e 's!@''SAVE_CXXFLAGS''@!@SAVE_CXXFLAGS@!'\
+ -e 's!@''SAVE_LDFLAGS''@!@SAVE_LDFLAGS@!'\
+ -e 's!@''ASFLAGS''@!@ASFLAGS@!'\
+ -e 's!@''CFLAGS''@!@CFLAGS@!'\
+ -e 's!@''CXXFLAGS''@!@CXXFLAGS@!'\
+ -e 's!@''LDFLAGS''@!@LDFLAGS@!'\
-e 's!@''CLIENT_LIBS''@!@CLIENT_LIBS@!' \
-e 's!@''ZLIB_LIBS''@!@ZLIB_LIBS@!' \
-e 's!@''LIBS''@!@LIBS@!' \
@@ -169,6 +175,7 @@ SUFFIXES = .sh
-e 's!@''MYSQLD_DEFAULT_SWITCHES''@!@MYSQLD_DEFAULT_SWITCHES@!' \
-e 's!@''MYSQL_UNIX_ADDR''@!@MYSQL_UNIX_ADDR@!' \
-e 's!@''MYSQL_TCP_PORT''@!@MYSQL_TCP_PORT@!' \
+ -e 's!@''MYSQL_TCP_PORT_DEFAULT''@!@MYSQL_TCP_PORT_DEFAULT@!' \
-e 's!@''TARGET_LINUX''@!@TARGET_LINUX@!' \
-e "s!@""CONF_COMMAND""@!@CONF_COMMAND@!" \
-e 's!@''MYSQLD_USER''@!@MYSQLD_USER@!' \
diff --git a/scripts/make_win_bin_dist b/scripts/make_win_bin_dist
index 957a5a6768d..a5b73ecc6c3 100755
--- a/scripts/make_win_bin_dist
+++ b/scripts/make_win_bin_dist
@@ -152,7 +152,6 @@ if [ x"$TARGET" != x"release" ] ; then
cp server-tools/instance-manager/$TARGET/*.pdb $DESTDIR/bin/
fi
cp tests/$TARGET/*.exe $DESTDIR/bin/
-cp libmysql/$TARGET/*.exe $DESTDIR/bin/
cp libmysql/$TARGET/libmysql.dll $DESTDIR/bin/
# FIXME really needed?!
diff --git a/scripts/mysql_config.sh b/scripts/mysql_config.sh
index 6b054e83720..ae58655ed0f 100644
--- a/scripts/mysql_config.sh
+++ b/scripts/mysql_config.sh
@@ -92,9 +92,14 @@ fix_path pkgincludedir include/mysql include
version='@VERSION@'
socket='@MYSQL_UNIX_ADDR@'
-port='@MYSQL_TCP_PORT@'
ldflags='@LDFLAGS@'
+if [ @MYSQL_TCP_PORT_DEFAULT@ -eq 0 ]; then
+ port=0
+else
+ port=@MYSQL_TCP_PORT@
+fi
+
# Create options
# We intentionally add a space to the beginning and end of lib strings, simplifies replace later
libs=" $ldflags -L$pkglibdir -lmysqlclient @ZLIB_DEPS@ @NON_THREADED_LIBS@"
diff --git a/scripts/mysql_fix_privilege_tables.sh b/scripts/mysql_fix_privilege_tables.sh
index a353273dc28..3b179957932 100644
--- a/scripts/mysql_fix_privilege_tables.sh
+++ b/scripts/mysql_fix_privilege_tables.sh
@@ -25,6 +25,7 @@ sql_only=0
basedir="@prefix@"
verbose=0
args=""
+# no elaborate fallback here; with no argument, it will happen in "mysql"
port=""
socket=""
database="mysql"
diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh
index 6f147c45f3b..3c1d3ae0fab 100644
--- a/scripts/mysql_install_db.sh
+++ b/scripts/mysql_install_db.sh
@@ -19,7 +19,8 @@
# All unrecognized arguments to this script are passed to mysqld.
basedir=""
-ldata=""
+builddir=""
+ldata="@localstatedir@"
srcdir=""
args=""
@@ -30,14 +31,18 @@ user=""
force=0
in_rpm=0
ip_only=0
-windows=0
-source_install=0
+cross_bootstrap=0
usage()
{
cat <<EOF
Usage: $0 [OPTIONS]
--basedir=path The path to the MySQL installation directory.
+ --builddir=path If using --srcdir with out-of-directory builds, you
+ will need to set this to the location of the build
+ directory where built files reside.
+ --cross-bootstrap For internal use. Used when building the MySQL system
+ tables on a different host than the target.
--datadir=path The path to the MySQL data directory.
--force Causes mysql_install_db to run even if DNS does not
work. In that case, grant table entries that normally
@@ -48,17 +53,15 @@ Usage: $0 [OPTIONS]
--skip-name-resolve Use IP addresses rather than hostnames when creating
grant table entries. This option can be useful if
your DNS does not work.
- --srcdir=path For internal use. The directory under which
- mysql_install_db looks for support files such as the
- error message file and the file for popoulating the
- help tables.
+ --srcdir=path The path to the MySQL source directory. This option
+ uses the compiled binaries and support files within the
+ source tree, useful for if you don't want to install
+ MySQL yet and just want to create the system tables.
--user=user_name The login username to use for running mysqld. Files
and directories created by mysqld will be owned by this
user. You must be root to use this option. By default
mysqld runs using your current login name and files and
directories that it creates will be owned by you.
- --windows For internal use. This option is used for creating
- Windows distributions.
All other options are passed to the mysqld program
@@ -68,7 +71,7 @@ EOF
s_echo()
{
- if test "$in_rpm" -eq 0 -a "$windows" -eq 0
+ if test "$in_rpm" -eq 0 -a "$cross_bootstrap" -eq 0
then
echo "$1"
fi
@@ -96,6 +99,7 @@ parse_arguments()
case "$arg" in
--force) force=1 ;;
--basedir=*) basedir=`parse_arg "$arg"` ;;
+ --builddir=*) builddir=`parse_arg "$arg"` ;;
--srcdir=*) srcdir=`parse_arg "$arg"` ;;
--ldata=*|--datadir=*) ldata=`parse_arg "$arg"` ;;
--user=*)
@@ -110,23 +114,17 @@ parse_arguments()
--no-defaults|--defaults-file=*|--defaults-extra-file=*)
defaults="$arg" ;;
- --windows)
- # This is actually a "cross bootstrap" argument used when
- # building the MySQL system tables on a different host
- # than the target. The platform independent
- # files that are created in --datadir on the host can
- # be copied to the target system, the most common use for
- # this feature is in the windows installer which will take
- # the files from datadir and include them as part of the install
- # package.
- windows=1 ;;
-
- --source-install)
- # This is used when you want to run mysqld directly from the
- # source tree (for example when you are developing MySQL and
- # only want to create the default tables but don't want to
- # install mysqld yet.
- source_install=1 ;;
+ --cross-bootstrap|--windows)
+ # Used when building the MySQL system tables on a different host than
+ # the target. The platform-independent files that are created in
+ # --datadir on the host can be copied to the target system.
+ #
+ # The most common use for this feature is in the Windows installer
+ # which will take the files from datadir and include them as part of
+ # the install package. See top-level 'dist-hook' make target.
+ #
+ # --windows is a deprecated alias
+ cross_bootstrap=1 ;;
*)
if test -n "$pick_args"
@@ -155,41 +153,33 @@ find_in_basedir()
file=$1; shift
- base="$basedir"
- if test -z "$base"
- then
- # Assume source installation if basedir is not given
- base="."
- fi
-
for dir in "$@"
do
- if test -f "$base/$dir/$file"
+ if test -f "$basedir/$dir/$file"
then
if test -n "$return_dir"
then
- echo "$base/$dir"
+ echo "$basedir/$dir"
else
- echo "$base/$dir/$file"
+ echo "$basedir/$dir/$file"
fi
break
fi
done
}
-missing_in_basedir()
+cannot_find_file()
{
- if test -z "$basedir"
- then
- echo "FATAL ERROR: Could not find $* inside --basedir"
- echo
- echo "When using --basedir you must point either into a MySQL binary"
- echo "distribution directory or a compiled tree previously populated"
- echo "by 'make install'"
- else
- echo "FATAL ERROR: Can't find $*. Please specify your installation"
- echo "directory with the '--basedir=' option."
- fi
+ echo
+ echo "FATAL ERROR: Could not find $*"
+ echo
+ echo "If you compiled from source, you need to run 'make install' to"
+ echo "copy the software into the correct location ready for operation."
+ echo
+ echo "If you are using a binary release, you must either be at the top"
+ echo "level of the extracted archive, or pass the --basedir option"
+ echo "pointing to that location."
+ echo
}
# Ok, let's go. We first need to parse arguments which are required by
@@ -197,23 +187,37 @@ missing_in_basedir()
# the command line to add any extra bits that we need.
parse_arguments PICK-ARGS-FROM-ARGV "$@"
-# We can now find my_print_defaults, either in the supplied --basedir
-# location or in the installed area.
-
-print_defaults=`find_in_basedir my_print_defaults bin extra`
-if test -z "$print_defaults"
+#
+# We can now find my_print_defaults. This script supports:
+#
+# --srcdir=path pointing to compiled source tree
+# --basedir=path pointing to installed binary location
+#
+# or default to compiled-in locations.
+#
+if test -n "$srcdir" && test -n "$basedir"
then
- print_defaults="@bindir@/my_print_defaults"
- if ! test -x "$print_defaults"
+ echo "ERROR: Specify either --basedir or --srcdir, not both."
+ exit 1
+fi
+if test -n "$srcdir"
+then
+ if test -z "$builddir"
then
- echo "FATAL ERROR: Could not find $print_defaults"
- echo
- echo "If you are using a binary release, you must run this script from"
- echo "within the directory the archive extracted into. If you compiled"
- echo "MySQL yourself you must run 'make install' first or use"
- echo "use --source-install --install-dir=xxx from the top source directory"
- exit 1
+ builddir="$srcdir"
fi
+ print_defaults="$builddir/extra/my_print_defaults"
+elif test -n "$basedir"
+then
+ print_defaults=`find_in_basedir my_print_defaults bin extra`
+else
+ print_defaults="@bindir@/my_print_defaults"
+fi
+
+if test ! -x "$print_defaults"
+then
+ cannot_find_file "$print_defaults"
+ exit 1
fi
# Now we can get arguments from the groups [mysqld] and [mysql_install_db]
@@ -221,63 +225,33 @@ fi
parse_arguments `$print_defaults $defaults mysqld mysql_install_db`
parse_arguments PICK-ARGS-FROM-ARGV "$@"
-# Path to MySQL installation directory
-if test -z "$basedir" -a "$source_install" = 0
+# Configure paths to support files
+if test -n "$srcdir"
then
+ basedir="$builddir"
+ bindir="$basedir/client"
+ extra_bindir="$basedir/extra"
+ mysqld="$basedir/sql/mysqld"
+ mysqld_opt="--language=$srcdir/sql/share/english"
+ pkgdatadir="$srcdir/scripts"
+ scriptdir="$srcdir/scripts"
+elif test -n "$basedir"
+then
+ bindir="$basedir/bin"
+ extra_bindir="$bindir"
+ mysqld=`find_in_basedir mysqld libexec sbin bin`
+ pkgdatadir=`find_in_basedir --dir fill_help_tables.sql share share/mysql`
+ scriptdir="$basedir/scripts"
+else
basedir="@prefix@"
bindir="@bindir@"
extra_bindir="$bindir"
mysqld="@libexecdir@/mysqld"
pkgdatadir="@pkgdatadir@"
-else
- bindir="$basedir/bin"
- extra_bindir="$bindir"
- # We set up bootstrap-specific paths later, so skip this for --windows
- if test "$windows" -eq 0
- then
- mysqld=`find_in_basedir mysqld libexec sbin bin`
- if test -z "$basedir"
- then
- # We come here when source-install is given
- bindir="$basedir/bin"
- extra_bindir="$bindir"
- fi
- if test -x "$mysqld"
- then
- pkgdatadir=`find_in_basedir --dir fill_help_tables.sql share share/mysql scripts`
- if test -z "$pkgdatadir"
- then
- missing_in_basedir fill_help_tables.sql
- exit 1
- fi
- else
- if test -x "./sql/mysqld"
- then
- # Source installation
- mysqld="./sql/mysqld"
- bindir="./client"
- extra_bindir="./extra"
- pkgdatadir="./scripts"
- mysqld_opt="--language=./sql/share/english"
- else
- missing_in_basedir mysqld
- fi
- fi
- fi
-fi
-
-# Path to data directory
-if test -z "$ldata"
-then
- ldata="@localstatedir@"
-fi
-
-# Set up paths to SQL scripts required for bootstrap and ensure they exist.
-if test -n "$srcdir"
-then
- pkgdatadir="$srcdir/scripts"
+ scriptdir="@scriptdir@"
fi
+# Set up paths to SQL scripts required for bootstrap
fill_help_tables="$pkgdatadir/fill_help_tables.sql"
create_system_tables="$pkgdatadir/mysql_system_tables.sql"
fill_system_tables="$pkgdatadir/mysql_system_tables_data.sql"
@@ -286,28 +260,14 @@ for f in $fill_help_tables $create_system_tables $fill_system_tables
do
if test ! -f "$f"
then
- echo "FATAL ERROR: Could not find SQL file '$f'"
+ cannot_find_file "$f"
exit 1
fi
done
-# Set up Windows-specific paths
-if test "$windows" -eq 1
-then
- mysqld="./sql/mysqld"
- if test -n "$srcdir" -a -f "$srcdir/sql/share/english/errmsg.sys"
- then
- mysqld_opt="--language=$srcdir/sql/share/english"
- else
- mysqld_opt="--language=./sql/share/english"
- fi
-fi
-
-# Make sure mysqld is available in default location (--basedir option is
-# already tested above).
if test ! -x "$mysqld"
then
- echo "FATAL ERROR: 'mysqld' executable not found!"
+ cannot_find_file "$mysqld"
exit 1
fi
@@ -315,13 +275,13 @@ fi
hostname=`@HOSTNAME@`
# Check if hostname is valid
-if test "$windows" -eq 0 -a "$in_rpm" -eq 0 -a "$force" -eq 0
+if test "$cross_bootstrap" -eq 0 -a "$in_rpm" -eq 0 -a "$force" -eq 0
then
resolved=`$extra_bindir/resolveip $hostname 2>&1`
- if [ $? -ne 0 ]
+ if test $? -ne 0
then
resolved=`$extra_bindir/resolveip localhost 2>&1`
- if [ $? -ne 0 ]
+ if test $? -ne 0
then
echo "Neither host '$hostname' nor 'localhost' could be looked up with"
echo "$extra_bindir/resolveip"
@@ -345,7 +305,7 @@ then
hostname=`echo "$resolved" | awk '/ /{print $6}'`
fi
-# Create database directories mysql & test
+# Create database directories
for dir in $ldata $ldata/mysql $ldata/test
do
if test ! -d $dir
@@ -364,98 +324,95 @@ then
args="$args --user=$user"
fi
-# Peform the install of system tables
+# Configure mysqld command line
mysqld_bootstrap="${MYSQLD_BOOTSTRAP-$mysqld}"
mysqld_install_cmd_line="$mysqld_bootstrap $defaults $mysqld_opt --bootstrap \
--basedir=$basedir --datadir=$ldata --log-warnings=0 --loose-skip-innodb \
--loose-skip-ndbcluster $args --max_allowed_packet=8M \
--net_buffer_length=16K"
-# Pipe mysql_system_tables.sql to "mysqld --bootstrap"
+# Create the system and help tables by passing them to "mysqld --bootstrap"
s_echo "Installing MySQL system tables..."
-if `(echo "use mysql;"; cat $create_system_tables $fill_system_tables) | $mysqld_install_cmd_line`
+if { echo "use mysql;"; cat $create_system_tables $fill_system_tables; } | eval "$filter_cmd_line" | $mysqld_install_cmd_line > /dev/null
then
s_echo "OK"
+else
+ echo
+ echo "Installation of system tables failed! Examine the logs in"
+ echo "$ldata for more information."
+ echo
+ echo "You can try to start the mysqld daemon with:"
+ echo
+ echo " shell> $mysqld --skip-grant &"
+ echo
+ echo "and use the command line tool $bindir/mysql"
+ echo "to connect to the mysql database and look at the grant tables:"
+ echo
+ echo " shell> $bindir/mysql -u root mysql"
+ echo " mysql> show tables"
+ echo
+ echo "Try 'mysqld --help' if you have problems with paths. Using --log"
+ echo "gives you a log in $ldata that may be helpful."
+ echo
+ echo "The latest information about MySQL is available on the web at"
+ echo "http://www.mysql.com/. Please consult the MySQL manual section"
+ echo "'Problems running mysql_install_db', and the manual section that"
+ echo "describes problems on your OS. Another information source are the"
+ echo "MySQL email archives available at http://lists.mysql.com/."
+ echo
+ echo "Please check all of the above before mailing us! And remember, if"
+ echo "you do mail us, you MUST use the $scriptdir/mysqlbug script!"
+ echo
+ exit 1
+fi
- s_echo "Filling help tables..."
- # Pipe fill_help_tables.sql to "mysqld --bootstrap"
- if `(echo "use mysql;"; cat $fill_help_tables) | $mysqld_install_cmd_line`
- then
- # Fill suceeded
- s_echo "OK"
- else
- echo
- echo "WARNING: HELP FILES ARE NOT COMPLETELY INSTALLED!"
- echo "The \"HELP\" command might not work properly"
- echo
- fi
+s_echo "Filling help tables..."
+if `(echo "use mysql;"; cat $fill_help_tables) | $mysqld_install_cmd_line`
+then
+ s_echo "OK"
+else
+ echo
+ echo "WARNING: HELP FILES ARE NOT COMPLETELY INSTALLED!"
+ echo "The \"HELP\" command might not work properly."
+fi
+# Don't output verbose information if running inside bootstrap or using
+# --srcdir for testing.
+if test "$cross_bootstrap" -eq 0 && test -z "$srcdir"
+then
s_echo
s_echo "To start mysqld at boot time you have to copy"
s_echo "support-files/mysql.server to the right place for your system"
- s_echo
+ echo
+ echo "PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !"
+ echo "To do so, start the server, then issue the following commands:"
+ echo
+ echo "$bindir/mysqladmin -u root password 'new-password'"
+ echo "$bindir/mysqladmin -u root -h $hostname password 'new-password'"
+ echo
+ echo "Alternatively you can run:"
+ echo "$bindir/mysql_secure_installation"
+ echo
+ echo "which will also give you the option of removing the test"
+ echo "databases and anonymous user created by default. This is"
+ echo "strongly recommended for production servers."
+ echo
+ echo "See the manual for more instructions."
- if test "$windows" -eq 0
+ if test "$in_rpm" -eq 0
then
- # A root password should of course also be set on Windows!
- # The reason for not displaying these prompts here is that when
- # executing this script with the --windows argument the script
- # is used to generate system tables mainly used by the
- # windows installer. And thus the password should not be set until
- # those files has been copied to the target system
- echo "PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !"
- echo "To do so, start the server, then issue the following commands:"
- echo "$bindir/mysqladmin -u root password 'new-password'"
- echo "$bindir/mysqladmin -u root -h $hostname password 'new-password'"
- echo
- echo "Alternatively you can run:"
- echo "$bindir/mysql_secure_installation"
- echo
- echo "which will also give you the option of removing the test"
- echo "databases and anonymous user created by default. This is"
- echo "strongly recommended for production servers."
- echo
- echo "See the manual for more instructions."
- echo
-
- if test "$in_rpm" -eq 0 -a "$source_install" -eq 0
- then
- echo "You can start the MySQL daemon with:"
- echo "cd @prefix@ ; $bindir/mysqld_safe &"
- echo
- echo "You can test the MySQL daemon with mysql-test-run.pl"
- echo "cd mysql-test ; perl mysql-test-run.pl"
- echo
- fi
- echo "Please report any problems with the @scriptdir@/mysqlbug script!"
- echo
- echo "The latest information about MySQL is available on the web at"
- echo "http://www.mysql.com"
- echo "Support MySQL by buying support/licenses at http://shop.mysql.com"
+ echo "You can start the MySQL daemon with:"
+ echo "cd $basedir ; $bindir/mysqld_safe &"
+ echo "You can test the MySQL daemon with mysql-test-run.pl"
+ echo "cd $basedir/mysql-test ; perl mysql-test-run.pl"
fi
- exit 0
-else
- echo "Installation of system tables failed!"
- echo
- echo "Examine the logs in $ldata for more information."
- echo "You can try to start the mysqld daemon with:"
- echo "$mysqld --skip-grant &"
- echo "and use the command line tool"
- echo "$bindir/mysql to connect to the mysql"
- echo "database and look at the grant tables:"
+
echo
- echo "shell> $bindir/mysql -u root mysql"
- echo "mysql> show tables"
+ echo "Please report any problems with the $scriptdir/mysqlbug script!"
echo
- echo "Try 'mysqld --help' if you have problems with paths. Using --log"
- echo "gives you a log in $ldata that may be helpful."
+ echo "The latest information about MySQL is available at http://www.mysql.com/"
+ echo "Support MySQL by buying support/licenses from http://shop.mysql.com/"
echo
- echo "The latest information about MySQL is available on the web at"
- echo "http://www.mysql.com"
- echo "Please consult the MySQL manual section: 'Problems running mysql_install_db',"
- echo "and the manual section that describes problems on your OS."
- echo "Another information source is the MySQL email archive."
- echo "Please check all of the above before mailing us!"
- echo "And if you do mail us, you MUST use the @scriptdir@/mysqlbug script!"
- exit 1
fi
+
+exit 0
diff --git a/scripts/mysql_system_tables.sql b/scripts/mysql_system_tables.sql
index f7b23e4e7ae..7ca35ae0752 100644
--- a/scripts/mysql_system_tables.sql
+++ b/scripts/mysql_system_tables.sql
@@ -60,13 +60,13 @@ CREATE TABLE IF NOT EXISTS time_zone_transition_type ( Time_zone_id int unsign
CREATE TABLE IF NOT EXISTS time_zone_leap_second ( Transition_time bigint signed NOT NULL, Correction int signed NOT NULL, PRIMARY KEY TranTime (Transition_time) ) engine=MyISAM CHARACTER SET utf8 comment='Leap seconds information for time zones';
-CREATE TABLE IF NOT EXISTS proc (db char(64) collate utf8_bin DEFAULT '' NOT NULL, name char(64) DEFAULT '' NOT NULL, type enum('FUNCTION','PROCEDURE') NOT NULL, specific_name char(64) DEFAULT '' NOT NULL, language enum('SQL') DEFAULT 'SQL' NOT NULL, sql_data_access enum( 'CONTAINS_SQL', 'NO_SQL', 'READS_SQL_DATA', 'MODIFIES_SQL_DATA') DEFAULT 'CONTAINS_SQL' NOT NULL, is_deterministic enum('YES','NO') DEFAULT 'NO' NOT NULL, security_type enum('INVOKER','DEFINER') DEFAULT 'DEFINER' NOT NULL, param_list blob NOT NULL, returns char(64) DEFAULT '' NOT NULL, body longblob NOT NULL, definer char(77) collate utf8_bin DEFAULT '' NOT NULL, created timestamp, modified timestamp, 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') DEFAULT '' NOT NULL, comment char(64) collate utf8_bin DEFAULT '' NOT NULL, character_set_client char(32) collate utf8_bin, collation_connection char(32) collate utf8_bin, db_collation char(32) collate utf8_bin, body_utf8 longblob, PRIMARY KEY (db,name,type)) engine=MyISAM character set utf8 comment='Stored Procedures';
+CREATE TABLE IF NOT EXISTS proc (db char(64) collate utf8_bin DEFAULT '' NOT NULL, name char(64) DEFAULT '' NOT NULL, type enum('FUNCTION','PROCEDURE') NOT NULL, specific_name char(64) DEFAULT '' NOT NULL, language enum('SQL') DEFAULT 'SQL' NOT NULL, sql_data_access enum( 'CONTAINS_SQL', 'NO_SQL', 'READS_SQL_DATA', 'MODIFIES_SQL_DATA') DEFAULT 'CONTAINS_SQL' NOT NULL, is_deterministic enum('YES','NO') DEFAULT 'NO' NOT NULL, security_type enum('INVOKER','DEFINER') DEFAULT 'DEFINER' NOT NULL, param_list blob NOT NULL, returns longblob DEFAULT '' NOT NULL, body longblob NOT NULL, definer char(77) collate utf8_bin DEFAULT '' NOT NULL, created timestamp, modified timestamp, 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') DEFAULT '' NOT NULL, comment char(64) collate utf8_bin DEFAULT '' NOT NULL, character_set_client char(32) collate utf8_bin, collation_connection char(32) collate utf8_bin, db_collation char(32) collate utf8_bin, body_utf8 longblob, PRIMARY KEY (db,name,type)) engine=MyISAM character set utf8 comment='Stored Procedures';
CREATE TABLE IF NOT EXISTS procs_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Routine_name char(64) binary DEFAULT '' NOT NULL, Routine_type enum('FUNCTION','PROCEDURE') NOT NULL, Grantor char(77) DEFAULT '' NOT NULL, Proc_priv set('Execute','Alter Routine','Grant') COLLATE utf8_general_ci DEFAULT '' NOT NULL, Timestamp timestamp(14), PRIMARY KEY (Host,Db,User,Routine_name,Routine_type), KEY Grantor (Grantor) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Procedure privileges';
-- Create general_log if CSV is enabled.
-SET @str = IF (@@have_csv = 'YES', 'CREATE TABLE IF NOT EXISTS general_log (event_time TIMESTAMP NOT NULL, user_host MEDIUMTEXT, thread_id INTEGER, server_id INTEGER, command_type VARCHAR(64), argument MEDIUMTEXT) engine=CSV CHARACTER SET utf8 comment="General log"', 'SET @dummy = 0');
+SET @str = IF (@@have_csv = 'YES', 'CREATE TABLE IF NOT EXISTS general_log (event_time TIMESTAMP NOT NULL, user_host MEDIUMTEXT NOT NULL, thread_id INTEGER NOT NULL, server_id INTEGER NOT NULL, command_type VARCHAR(64) NOT NULL, argument MEDIUMTEXT NOT NULL) engine=CSV CHARACTER SET utf8 comment="General log"', 'SET @dummy = 0');
PREPARE stmt FROM @str;
EXECUTE stmt;
@@ -74,7 +74,7 @@ DROP PREPARE stmt;
-- Create slow_log if CSV is enabled.
-SET @str = IF (@@have_csv = 'YES', 'CREATE TABLE IF NOT EXISTS slow_log (start_time TIMESTAMP NOT NULL, user_host MEDIUMTEXT NOT NULL, query_time TIME NOT NULL, lock_time TIME NOT NULL, rows_sent INTEGER NOT NULL, rows_examined INTEGER NOT NULL, db VARCHAR(512), last_insert_id INTEGER, insert_id INTEGER, server_id INTEGER, sql_text MEDIUMTEXT NOT NULL) engine=CSV CHARACTER SET utf8 comment="Slow log"', 'SET @dummy = 0');
+SET @str = IF (@@have_csv = 'YES', 'CREATE TABLE IF NOT EXISTS slow_log (start_time TIMESTAMP NOT NULL, user_host MEDIUMTEXT NOT NULL, query_time TIME NOT NULL, lock_time TIME NOT NULL, rows_sent INTEGER NOT NULL, rows_examined INTEGER NOT NULL, db VARCHAR(512) NOT NULL, last_insert_id INTEGER NOT NULL, insert_id INTEGER NOT NULL, server_id INTEGER NOT NULL, sql_text MEDIUMTEXT NOT NULL) engine=CSV CHARACTER SET utf8 comment="Slow log"', 'SET @dummy = 0');
PREPARE stmt FROM @str;
EXECUTE stmt;
diff --git a/scripts/mysql_system_tables_data.sql b/scripts/mysql_system_tables_data.sql
index 6af79f3b049..6db9430b972 100644
--- a/scripts/mysql_system_tables_data.sql
+++ b/scripts/mysql_system_tables_data.sql
@@ -2,6 +2,12 @@
-- The inital data for system tables of MySQL Server
--
+-- When setting up a "cross bootstrap" database (e.g., creating data on a Unix
+-- host which will later be included in a Windows zip file), any lines
+-- containing "@current_hostname" are filtered out by mysql_install_db.
+set @current_hostname= @@hostname;
+
+
-- Fill "db" table with default grants for anyone to
-- access database 'test' and 'test_%' if "db" table didn't exist
CREATE TEMPORARY TABLE tmp_db LIKE db;
@@ -14,10 +20,11 @@ DROP TABLE tmp_db;
-- Fill "users" table with default users allowing root access
-- from local machine if "users" table didn't exist before
CREATE TEMPORARY TABLE tmp_user LIKE user;
+set @current_hostname= @@hostname;
INSERT INTO tmp_user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
-REPLACE INTO tmp_user VALUES (@@hostname,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
+REPLACE INTO tmp_user VALUES (@current_hostname,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
REPLACE INTO tmp_user VALUES ('127.0.0.1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
INSERT INTO tmp_user (host,user) VALUES ('localhost','');
-INSERT INTO tmp_user (host,user) VALUES (@@hostname,'');
+INSERT INTO tmp_user (host,user) VALUES (@current_hostname,'');
INSERT INTO user SELECT * FROM tmp_user WHERE @had_user_table=0;
DROP TABLE tmp_user;
diff --git a/scripts/mysql_system_tables_fix.sql b/scripts/mysql_system_tables_fix.sql
index 78e6a0ceb57..a43964bf09a 100644
--- a/scripts/mysql_system_tables_fix.sql
+++ b/scripts/mysql_system_tables_fix.sql
@@ -344,6 +344,7 @@ ALTER TABLE proc MODIFY name char(64) DEFAULT '' NOT NULL,
'MODIFIES_SQL_DATA'
) DEFAULT 'CONTAINS_SQL' NOT NULL,
MODIFY body longblob NOT NULL,
+ MODIFY returns longblob NOT NULL,
MODIFY sql_mode
set('REAL_AS_FLOAT',
'PIPES_AS_CONCAT',
diff --git a/scripts/mysqlbug.sh b/scripts/mysqlbug.sh
index 69ea82e8794..64804b5de19 100644
--- a/scripts/mysqlbug.sh
+++ b/scripts/mysqlbug.sh
@@ -23,7 +23,8 @@ VERSION="@VERSION@@MYSQL_SERVER_SUFFIX@"
COMPILATION_COMMENT="@COMPILATION_COMMENT@"
BUGmysql="mysql@lists.mysql.com"
# This is set by configure
-COMP_ENV_INFO="CC='@CC@' CFLAGS='@CFLAGS@' CXX='@CXX@' CXXFLAGS='@CXXFLAGS@' LDFLAGS='@LDFLAGS@' ASFLAGS='@ASFLAGS@'"
+COMP_CALL_INFO="CC='@SAVE_CC@' CFLAGS='@SAVE_CFLAGS@' CXX='@SAVE_CXX@' CXXFLAGS='@SAVE_CXXFLAGS@' LDFLAGS='@SAVE_LDFLAGS@' ASFLAGS='@SAVE_ASFLAGS@'"
+COMP_RUN_INFO="CC='@CC@' CFLAGS='@CFLAGS@' CXX='@CXX@' CXXFLAGS='@CXXFLAGS@' LDFLAGS='@LDFLAGS@' ASFLAGS='@ASFLAGS@'"
CONFIGURE_LINE="@CONF_COMMAND@"
LIBC_INFO=""
@@ -261,7 +262,8 @@ ${ORGANIZATION- $ORGANIZATION_C}
`test -n "$MACHINE" && echo "Machine: $MACHINE"`
`test -n "$FILE_PATHS" && echo "Some paths: $FILE_PATHS"`
`test -n "$GCC_INFO" && echo "GCC: $GCC_INFO"`
-`test -n "$COMP_ENV_INFO" && echo "Compilation info: $COMP_ENV_INFO"`
+`test -n "$COMP_CALL_INFO" && echo "Compilation info (call): $COMP_CALL_INFO"`
+`test -n "$COMP_RUN_INFO" && echo "Compilation info (used): $COMP_RUN_INFO"`
`test -n "$LIBC_INFO" && echo "LIBC: $LIBC_INFO"`
`test -n "$CONFIGURE_LINE" && echo "Configure command: $CONFIGURE_LINE"`
`test -n "$PERL_INFO" && echo "Perl: $PERL_INFO"`
diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh
index d9c1a16e21a..99dcafbbf71 100644
--- a/scripts/mysqld_safe.sh
+++ b/scripts/mysqld_safe.sh
@@ -396,7 +396,7 @@ then
does not exist or is not executable. Please cd to the mysql installation
directory and restart this script from there as follows:
./bin/mysqld_safe&
-See http://dev.mysql.com/doc/mysql/en/mysqld_safe.html for more information"
+See http://dev.mysql.com/doc/mysql/en/mysqld-safe.html for more information"
exit 1
fi
diff --git a/server-tools/instance-manager/mysqlmanager.cc b/server-tools/instance-manager/mysqlmanager.cc
index 6d6ebbee57d..276d1ca3b49 100644
--- a/server-tools/instance-manager/mysqlmanager.cc
+++ b/server-tools/instance-manager/mysqlmanager.cc
@@ -79,6 +79,9 @@ int main(int argc, char *argv[])
{
int return_value;
+ puts("\n"
+ "WARNING: This program is deprecated and will be removed in 6.0.\n");
+
/* Initialize. */
MY_INIT(argv[0]);
diff --git a/server-tools/instance-manager/priv.h b/server-tools/instance-manager/priv.h
index 5bf47e1e234..1c2124c0e77 100644
--- a/server-tools/instance-manager/priv.h
+++ b/server-tools/instance-manager/priv.h
@@ -29,7 +29,7 @@
#include "portability.h"
/* IM-wide platform-independent defines */
-#define SERVER_DEFAULT_PORT 3306
+#define SERVER_DEFAULT_PORT MYSQL_PORT
#define DEFAULT_MONITORING_INTERVAL 20
#define DEFAULT_PORT 2273
/* three-week timeout should be enough */
diff --git a/sql-common/client.c b/sql-common/client.c
index baf154dcc43..f149442f12e 100644
--- a/sql-common/client.c
+++ b/sql-common/client.c
@@ -272,6 +272,76 @@ static int wait_for_data(my_socket fd, uint timeout)
}
#endif /* defined(__WIN__) || defined(__NETWARE__) */
+/**
+ Set the internal error message to mysql handler
+
+ @param mysql connection handle (client side)
+ @param errcode CR_ error code, passed to ER macro to get
+ error text
+ @parma sqlstate SQL standard sqlstate
+*/
+
+void set_mysql_error(MYSQL *mysql, int errcode, const char *sqlstate)
+{
+ NET *net;
+ DBUG_ENTER("set_mysql_error");
+ DBUG_PRINT("enter", ("error :%d '%s'", errcode, ER(errcode)));
+ DBUG_ASSERT(mysql != 0);
+
+ net= &mysql->net;
+ net->last_errno= errcode;
+ strmov(net->last_error, ER(errcode));
+ strmov(net->sqlstate, sqlstate);
+
+ DBUG_VOID_RETURN;
+}
+
+/**
+ Clear possible error state of struct NET
+
+ @param net clear the state of the argument
+*/
+
+void net_clear_error(NET *net)
+{
+ net->last_errno= 0;
+ net->last_error[0]= '\0';
+ strmov(net->sqlstate, not_error_sqlstate);
+}
+
+/**
+ Set an error message on the client.
+
+ @param mysql connection handle
+ @param errcode CR_* errcode, for client errors
+ @param sqlstate SQL standard sql state, unknown_sqlstate for the
+ majority of client errors.
+ @param format error message template, in sprintf format
+ @param ... variable number of arguments
+*/
+
+static void set_mysql_extended_error(MYSQL *mysql, int errcode,
+ const char *sqlstate,
+ const char *format, ...)
+{
+ NET *net;
+ va_list args;
+ DBUG_ENTER("set_mysql_extended_error");
+ DBUG_PRINT("enter", ("error :%d '%s'", errcode, format));
+ DBUG_ASSERT(mysql != 0);
+
+ net= &mysql->net;
+ net->last_errno= errcode;
+ va_start(args, format);
+ my_vsnprintf(net->last_error, sizeof(net->last_error)-1,
+ format, args);
+ va_end(args);
+ strmov(net->sqlstate, sqlstate);
+
+ DBUG_VOID_RETURN;
+}
+
+
/*
Create a named pipe connection
@@ -279,7 +349,7 @@ static int wait_for_data(my_socket fd, uint timeout)
#ifdef __WIN__
-HANDLE create_named_pipe(NET *net, uint connect_timeout, char **arg_host,
+HANDLE create_named_pipe(MYSQL *mysql, uint connect_timeout, char **arg_host,
char **arg_unix_socket)
{
HANDLE hPipe=INVALID_HANDLE_VALUE;
@@ -312,42 +382,34 @@ HANDLE create_named_pipe(NET *net, uint connect_timeout, char **arg_host,
break;
if (GetLastError() != ERROR_PIPE_BUSY)
{
- net->last_errno=CR_NAMEDPIPEOPEN_ERROR;
- strmov(net->sqlstate, unknown_sqlstate);
- my_snprintf(net->last_error, sizeof(net->last_error)-1,
- ER(net->last_errno), host, unix_socket,
- (ulong) GetLastError());
+ set_mysql_extended_error(mysql, CR_NAMEDPIPEOPEN_ERROR,
+ unknown_sqlstate, ER(CR_NAMEDPIPEOPEN_ERROR),
+ host, unix_socket, (ulong) GetLastError());
return INVALID_HANDLE_VALUE;
}
/* wait for for an other instance */
if (! WaitNamedPipe(pipe_name, connect_timeout*1000) )
{
- net->last_errno=CR_NAMEDPIPEWAIT_ERROR;
- strmov(net->sqlstate, unknown_sqlstate);
- my_snprintf(net->last_error, sizeof(net->last_error)-1,
- ER(net->last_errno), host, unix_socket,
- (ulong) GetLastError());
+ set_mysql_extended_error(mysql, CR_NAMEDPIPEWAIT_ERROR, unknown_sqlstate,
+ ER(CR_NAMEDPIPEWAIT_ERROR),
+ host, unix_socket, (ulong) GetLastError());
return INVALID_HANDLE_VALUE;
}
}
if (hPipe == INVALID_HANDLE_VALUE)
{
- net->last_errno=CR_NAMEDPIPEOPEN_ERROR;
- strmov(net->sqlstate, unknown_sqlstate);
- my_snprintf(net->last_error, sizeof(net->last_error)-1,
- ER(net->last_errno), host, unix_socket,
- (ulong) GetLastError());
+ set_mysql_extended_error(mysql, CR_NAMEDPIPEOPEN_ERROR, unknown_sqlstate,
+ ER(CR_NAMEDPIPEOPEN_ERROR), host, unix_socket,
+ (ulong) GetLastError());
return INVALID_HANDLE_VALUE;
}
dwMode = PIPE_READMODE_BYTE | PIPE_WAIT;
if ( !SetNamedPipeHandleState(hPipe, &dwMode, NULL, NULL) )
{
CloseHandle( hPipe );
- net->last_errno=CR_NAMEDPIPESETSTATE_ERROR;
- strmov(net->sqlstate, unknown_sqlstate);
- my_snprintf(net->last_error, sizeof(net->last_error)-1,
- ER(net->last_errno),host, unix_socket,
- (ulong) GetLastError());
+ set_mysql_extended_error(mysql, CR_NAMEDPIPESETSTATE_ERROR,
+ unknown_sqlstate, ER(CR_NAMEDPIPESETSTATE_ERROR),
+ host, unix_socket, (ulong) GetLastError());
return INVALID_HANDLE_VALUE;
}
*arg_host=host ; *arg_unix_socket=unix_socket; /* connect arg */
@@ -566,14 +628,12 @@ err:
CloseHandle(handle_connect_file_map);
if (error_allow)
{
- net->last_errno=error_allow;
- strmov(net->sqlstate, unknown_sqlstate);
if (error_allow == CR_SHARED_MEMORY_EVENT_ERROR)
- my_snprintf(net->last_error,sizeof(net->last_error)-1,
- ER(net->last_errno),suffix_pos,error_code);
+ set_mysql_extended_error(mysql, error_allow, unknown_sqlstate,
+ ER(error_allow), suffix_pos, error_code);
else
- my_snprintf(net->last_error,sizeof(net->last_error)-1,
- ER(net->last_errno),error_code);
+ set_mysql_extended_error(mysql, error_allow, unknown_sqlstate,
+ ER(error_allow), error_code);
return(INVALID_HANDLE_VALUE);
}
return(handle_map);
@@ -683,10 +743,8 @@ cli_advanced_command(MYSQL *mysql, enum enum_server_command command,
DBUG_RETURN(1);
}
- net->last_error[0]=0;
- net->last_errno= 0;
- strmov(net->sqlstate, not_error_sqlstate);
- mysql->net.report_error=0;
+ net_clear_error(net);
+ net->report_error=0;
mysql->info=0;
mysql->affected_rows= ~(my_ulonglong) 0;
/*
@@ -703,8 +761,7 @@ cli_advanced_command(MYSQL *mysql, enum enum_server_command command,
socket_errno));
if (net->last_errno == ER_NET_PACKET_TOO_LARGE)
{
- net->last_errno=CR_NET_PACKET_TOO_LARGE;
- strmov(net->last_error,ER(net->last_errno));
+ set_mysql_error(mysql, CR_NET_PACKET_TOO_LARGE, unknown_sqlstate);
goto end;
}
end_server(mysql);
@@ -713,8 +770,7 @@ cli_advanced_command(MYSQL *mysql, enum enum_server_command command,
if (net_write_command(net,(uchar) command, header, header_length,
arg, arg_length))
{
- net->last_errno=CR_SERVER_GONE_ERROR;
- strmov(net->last_error,ER(net->last_errno));
+ set_mysql_error(mysql, CR_SERVER_GONE_ERROR, unknown_sqlstate);
goto end;
}
}
@@ -742,48 +798,6 @@ void free_old_query(MYSQL *mysql)
}
/*
- Set the internal error message to mysql handler
-*/
-
-void set_mysql_error(MYSQL *mysql, int errcode, const char *sqlstate)
-{
- NET *net;
- DBUG_ENTER("set_mysql_error");
- DBUG_PRINT("enter", ("error :%d '%s'", errcode, ER(errcode)));
- DBUG_ASSERT(mysql != 0);
-
- net= &mysql->net;
- net->last_errno= errcode;
- strmov(net->last_error, ER(errcode));
- strmov(net->sqlstate, sqlstate);
-
- DBUG_VOID_RETURN;
-}
-
-
-static void set_mysql_extended_error(MYSQL *mysql, int errcode,
- const char *sqlstate,
- const char *format, ...)
-{
- NET *net;
- va_list args;
- DBUG_ENTER("set_mysql_extended_error");
- DBUG_PRINT("enter", ("error :%d '%s'", errcode, format));
- DBUG_ASSERT(mysql != 0);
-
- net= &mysql->net;
- net->last_errno= errcode;
- va_start(args, format);
- my_vsnprintf(net->last_error, sizeof(net->last_error)-1,
- format, args);
- va_end(args);
- strmov(net->sqlstate, sqlstate);
-
- DBUG_VOID_RETURN;
-}
-
-
-/*
Flush result set sent from server
*/
@@ -846,9 +860,8 @@ static int check_license(MYSQL *mysql)
{
if (net->last_errno == ER_UNKNOWN_SYSTEM_VARIABLE)
{
- net->last_errno= CR_WRONG_LICENSE;
- my_snprintf(net->last_error, sizeof(net->last_error)-1,
- ER(net->last_errno), required_license);
+ set_mysql_extended_error(mysql, CR_WRONG_LICENSE, unknown_sqlstate,
+ ER(CR_WRONG_LICENSE), required_license);
}
return 1;
}
@@ -864,9 +877,8 @@ static int check_license(MYSQL *mysql)
(!row || !row[0] ||
strncmp(row[0], required_license, sizeof(required_license))))
{
- net->last_errno= CR_WRONG_LICENSE;
- my_snprintf(net->last_error, sizeof(net->last_error)-1,
- ER(net->last_errno), required_license);
+ set_mysql_extended_error(mysql, CR_WRONG_LICENSE, unknown_sqlstate,
+ ER(CR_WRONG_LICENSE), required_license);
}
mysql_free_result(res);
return net->last_errno;
@@ -1085,11 +1097,16 @@ void mysql_read_default_options(struct st_mysql_options *options,
my_free(options->ssl_capath, MYF(MY_ALLOW_ZERO_PTR));
options->ssl_capath = my_strdup(opt_arg, MYF(MY_WME));
break;
+ case 26: /* ssl_cipher */
+ my_free(options->ssl_cipher, MYF(MY_ALLOW_ZERO_PTR));
+ options->ssl_cipher= my_strdup(opt_arg, MYF(MY_WME));
+ break;
#else
case 13: /* Ignore SSL options */
case 14:
case 15:
case 16:
+ case 26:
break;
#endif /* HAVE_OPENSSL */
case 17: /* charset-lib */
@@ -1717,7 +1734,6 @@ static MYSQL_METHODS client_methods=
C_MODE_START
int mysql_init_character_set(MYSQL *mysql)
{
- NET *net= &mysql->net;
const char *default_collation_name;
/* Set character set */
@@ -1761,24 +1777,22 @@ int mysql_init_character_set(MYSQL *mysql)
}
charsets_dir= save;
}
-
+
if (!mysql->charset)
{
- net->last_errno=CR_CANT_READ_CHARSET;
- strmov(net->sqlstate, unknown_sqlstate);
if (mysql->options.charset_dir)
- my_snprintf(net->last_error, sizeof(net->last_error)-1,
- ER(net->last_errno),
- mysql->options.charset_name,
- mysql->options.charset_dir);
+ set_mysql_extended_error(mysql, CR_CANT_READ_CHARSET, unknown_sqlstate,
+ ER(CR_CANT_READ_CHARSET),
+ mysql->options.charset_name,
+ mysql->options.charset_dir);
else
{
char cs_dir_name[FN_REFLEN];
get_charsets_dir(cs_dir_name);
- my_snprintf(net->last_error, sizeof(net->last_error)-1,
- ER(net->last_errno),
- mysql->options.charset_name,
- cs_dir_name);
+ set_mysql_extended_error(mysql, CR_CANT_READ_CHARSET, unknown_sqlstate,
+ ER(CR_CANT_READ_CHARSET),
+ mysql->options.charset_name,
+ cs_dir_name);
}
return 1;
}
@@ -1910,10 +1924,10 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
DBUG_PRINT("info",("Using UNIX sock '%s'",unix_socket));
if ((sock = socket(AF_UNIX,SOCK_STREAM,0)) == SOCKET_ERROR)
{
- net->last_errno=CR_SOCKET_CREATE_ERROR;
- strmov(net->sqlstate, unknown_sqlstate);
- my_snprintf(net->last_error,sizeof(net->last_error)-1,
- ER(net->last_errno),socket_errno);
+ set_mysql_extended_error(mysql, CR_SOCKET_CREATE_ERROR,
+ unknown_sqlstate,
+ ER(CR_SOCKET_CREATE_ERROR),
+ socket_errno);
goto error;
}
net->vio= vio_new(sock, VIO_TYPE_SOCKET,
@@ -1926,10 +1940,10 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
{
DBUG_PRINT("error",("Got error %d on connect to local server",
socket_errno));
- net->last_errno=CR_CONNECTION_ERROR;
- strmov(net->sqlstate, unknown_sqlstate);
- my_snprintf(net->last_error,sizeof(net->last_error)-1,
- ER(net->last_errno),unix_socket,socket_errno);
+ set_mysql_extended_error(mysql, CR_CONNECTION_ERROR,
+ unknown_sqlstate,
+ ER(CR_CONNECTION_ERROR),
+ unix_socket, socket_errno);
goto error;
}
mysql->options.protocol=MYSQL_PROTOCOL_SOCKET;
@@ -1941,8 +1955,8 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
(! have_tcpip && (unix_socket || !host && is_NT()))))
{
sock=0;
- if ((hPipe=create_named_pipe(net, mysql->options.connect_timeout,
- (char**) &host, (char**) &unix_socket)) ==
+ if ((hPipe= create_named_pipe(mysql, mysql->options.connect_timeout,
+ (char**) &host, (char**) &unix_socket)) ==
INVALID_HANDLE_VALUE)
{
DBUG_PRINT("error",
@@ -1986,10 +2000,8 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
#endif
if (sock == SOCKET_ERROR)
{
- net->last_errno=CR_IPSOCK_ERROR;
- strmov(net->sqlstate, unknown_sqlstate);
- my_snprintf(net->last_error,sizeof(net->last_error)-1,
- ER(net->last_errno),socket_errno);
+ set_mysql_extended_error(mysql, CR_IPSOCK_ERROR, unknown_sqlstate,
+ ER(CR_IPSOCK_ERROR), socket_errno);
goto error;
}
net->vio= vio_new(sock, VIO_TYPE_TCPIP, VIO_BUFFERED_READ);
@@ -2014,10 +2026,8 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
if (!hp)
{
my_gethostbyname_r_free();
- net->last_errno=CR_UNKNOWN_HOST;
- strmov(net->sqlstate, unknown_sqlstate);
- my_snprintf(net->last_error, sizeof(net->last_error)-1,
- ER(CR_UNKNOWN_HOST), host, tmp_errno);
+ set_mysql_extended_error(mysql, CR_UNKNOWN_HOST, unknown_sqlstate,
+ ER(CR_UNKNOWN_HOST), host, tmp_errno);
goto error;
}
memcpy(&sock_addr.sin_addr, hp->h_addr,
@@ -2030,10 +2040,8 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
{
DBUG_PRINT("error",("Got error %d on connect to '%s'",socket_errno,
host));
- net->last_errno= CR_CONN_HOST_ERROR;
- strmov(net->sqlstate, unknown_sqlstate);
- my_snprintf(net->last_error, sizeof(net->last_error)-1,
- ER(CR_CONN_HOST_ERROR), host, socket_errno);
+ set_mysql_extended_error(mysql, CR_CONN_HOST_ERROR, unknown_sqlstate,
+ ER(CR_CONN_HOST_ERROR), host, socket_errno);
goto error;
}
}
@@ -2097,11 +2105,9 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
PROTOCOL_VERSION, mysql->protocol_version));
if (mysql->protocol_version != PROTOCOL_VERSION)
{
- strmov(net->sqlstate, unknown_sqlstate);
- net->last_errno= CR_VERSION_ERROR;
- my_snprintf(net->last_error, sizeof(net->last_error)-1,
- ER(CR_VERSION_ERROR), mysql->protocol_version,
- PROTOCOL_VERSION);
+ set_mysql_extended_error(mysql, CR_VERSION_ERROR, unknown_sqlstate,
+ ER(CR_VERSION_ERROR), mysql->protocol_version,
+ PROTOCOL_VERSION);
goto error;
}
end=strend((char*) net->read_pos+1);
@@ -2625,7 +2631,7 @@ void mysql_detach_stmt_list(LIST **stmt_list __attribute__((unused)),
for (; element; element= element->next)
{
MYSQL_STMT *stmt= (MYSQL_STMT *) element->data;
- set_stmt_errmsg(stmt, buff, CR_STMT_CLOSED, unknown_sqlstate);
+ set_stmt_error(stmt, CR_STMT_CLOSED, unknown_sqlstate, buff);
stmt->mysql= 0;
/* No need to call list_delete for statement here */
}
@@ -3142,11 +3148,8 @@ int STDCALL mysql_set_character_set(MYSQL *mysql, const char *cs_name)
{
char cs_dir_name[FN_REFLEN];
get_charsets_dir(cs_dir_name);
- mysql->net.last_errno= CR_CANT_READ_CHARSET;
- strmov(mysql->net.sqlstate, unknown_sqlstate);
- my_snprintf(mysql->net.last_error, sizeof(mysql->net.last_error) - 1,
- ER(mysql->net.last_errno), cs_name, cs_dir_name);
-
+ set_mysql_extended_error(mysql, CR_CANT_READ_CHARSET, unknown_sqlstate,
+ ER(CR_CANT_READ_CHARSET), cs_name, cs_dir_name);
}
charsets_dir= save_csdir;
return mysql->net.last_errno;
diff --git a/sql-common/my_time.c b/sql-common/my_time.c
index a1a3e0b6c77..543a925681b 100644
--- a/sql-common/my_time.c
+++ b/sql-common/my_time.c
@@ -54,24 +54,24 @@ uint calc_days_in_year(uint year)
366 : 365);
}
-/*
- Check datetime value for validity according to flags.
-
- SYNOPSIS
- check_date()
- ltime Date to check.
- not_zero_date ltime is not the zero date
- flags flags to check
- was_cut set to 2 if value was truncated.
- NOTE: This is not touched if value was not truncated
- NOTES
- Here we assume that year and month is ok !
+/**
+ @brief Check datetime value for validity according to flags.
+
+ @param[in] ltime Date to check.
+ @param[in] not_zero_date ltime is not the zero date
+ @param[in] flags flags to check
+ (see str_to_datetime() flags in my_time.h)
+ @param[out] was_cut set to 2 if value was invalid according to flags.
+ (Feb 29 in non-leap etc.) This remains unchanged
+ if value is not invalid.
+
+ @details Here we assume that year and month is ok!
If month is 0 we allow any date. (This only happens if we allow zero
date parts in str_to_datetime())
Disallow dates with zero year and non-zero month and/or day.
- RETURN
- 0 ok
+ @return
+ 0 OK
1 error
*/
@@ -117,9 +117,9 @@ my_bool check_date(const MYSQL_TIME *ltime, my_bool not_zero_date,
TIME_NO_ZERO_IN_DATE Don't allow partial dates
TIME_NO_ZERO_DATE Don't allow 0000-00-00 date
TIME_INVALID_DATES Allow 2000-02-31
- was_cut 0 Value ok
+ was_cut 0 Value OK
1 If value was cut during conversion
- 2 Date part was within ranges but date was wrong
+ 2 check_date(date,flags) considers date invalid
DESCRIPTION
At least the following formats are recogniced (based on number of digits)
@@ -1084,7 +1084,7 @@ int my_TIME_to_str(const MYSQL_TIME *l_time, char *to)
flags - flags to use in validating date, as in str_to_datetime()
was_cut 0 Value ok
1 If value was cut during conversion
- 2 Date part was within ranges but date was wrong
+ 2 check_date(date,flags) considers date invalid
DESCRIPTION
Convert a datetime value of formats YYMMDD, YYYYMMDD, YYMMDDHHMSS,
@@ -1105,9 +1105,14 @@ longlong number_to_datetime(longlong nr, MYSQL_TIME *time_res,
long part1,part2;
*was_cut= 0;
+ bzero((char*) time_res, sizeof(*time_res));
+ time_res->time_type=MYSQL_TIMESTAMP_DATE;
if (nr == LL(0) || nr >= LL(10000101000000))
+ {
+ time_res->time_type=MYSQL_TIMESTAMP_DATETIME;
goto ok;
+ }
if (nr < 101)
goto err;
if (nr <= (YY_PART_YEAR-1)*10000L+1231L)
@@ -1131,6 +1136,9 @@ longlong number_to_datetime(longlong nr, MYSQL_TIME *time_res,
}
if (nr < 101000000L)
goto err;
+
+ time_res->time_type=MYSQL_TIMESTAMP_DATETIME;
+
if (nr <= (YY_PART_YEAR-1)*LL(10000000000)+LL(1231235959))
{
nr= nr+LL(20000000000000); /* YYMMDDHHMMSS, 2000-2069 */
@@ -1144,7 +1152,6 @@ longlong number_to_datetime(longlong nr, MYSQL_TIME *time_res,
ok:
part1=(long) (nr/LL(1000000));
part2=(long) (nr - (longlong) part1*LL(1000000));
- bzero((char*) time_res, sizeof(*time_res));
time_res->year= (int) (part1/10000L); part1%=10000L;
time_res->month= (int) part1 / 100;
time_res->day= (int) part1 % 100;
diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt
index 299f4ae4285..77abc4e6fa5 100755
--- a/sql/CMakeLists.txt
+++ b/sql/CMakeLists.txt
@@ -90,12 +90,14 @@ TARGET_LINK_LIBRARIES(mysqld
SET_TARGET_PROPERTIES(mysqld PROPERTIES OUTPUT_NAME mysqld${MYSQLD_EXE_SUFFIX})
+IF(cmake_version EQUAL 20406)
# Work around for 2.4.6 bug, OUTPUT_NAME will not set the right .PDB
# file name. Note that COMPILE_FLAGS set some temporary pdb during build,
# LINK_FLAGS sets the real one.
SET_TARGET_PROPERTIES(mysqld PROPERTIES
COMPILE_FLAGS "/Fd${CMAKE_CFG_INTDIR}/mysqld${MYSQLD_EXE_SUFFIX}.pdb"
LINK_FLAGS "/PDB:${CMAKE_CFG_INTDIR}/mysqld${MYSQLD_EXE_SUFFIX}.pdb")
+ENDIF(cmake_version EQUAL 20406)
IF(EMBED_MANIFESTS)
MYSQL_EMBED_MANIFEST("mysqld" "asInvoker")
diff --git a/sql/event_data_objects.cc b/sql/event_data_objects.cc
index 787b04c12c6..f4b64ab3012 100644
--- a/sql/event_data_objects.cc
+++ b/sql/event_data_objects.cc
@@ -1649,8 +1649,6 @@ err:
void
Event_queue_element::mark_last_executed(THD *thd)
{
- thd->set_current_time();
-
last_executed= (my_time_t) thd->query_start();
last_executed_changed= TRUE;
@@ -2017,6 +2015,7 @@ end_no_lex_start:
ret= 1;
else
{
+ ulong saved_master_access;
/*
Peculiar initialization order is a crutch to avoid races in SHOW
PROCESSLIST which reads thd->{query/query_length} without a mutex.
@@ -2024,8 +2023,19 @@ end_no_lex_start:
thd->query_length= 0;
thd->query= sp_sql.c_ptr_safe();
thd->query_length= sp_sql.length();
- if (Events::drop_event(thd, dbname, name, FALSE))
- ret= 1;
+
+ /*
+ NOTE: even if we run in read-only mode, we should be able to lock
+ the mysql.event table for writing. In order to achieve this, we
+ should call mysql_lock_tables() under the super-user.
+ */
+
+ saved_master_access= thd->security_ctx->master_access;
+ thd->security_ctx->master_access |= SUPER_ACL;
+
+ ret= Events::drop_event(thd, dbname, name, FALSE);
+
+ thd->security_ctx->master_access= saved_master_access;
}
}
#ifndef NO_EMBEDDED_ACCESS_CHECKS
diff --git a/sql/event_db_repository.cc b/sql/event_db_repository.cc
index 705bd8b2704..9a33b33d8c9 100644
--- a/sql/event_db_repository.cc
+++ b/sql/event_db_repository.cc
@@ -525,6 +525,10 @@ Event_db_repository::fill_schema_events(THD *thd, TABLE_LIST *tables,
- whether this open mode would work under LOCK TABLES, or inside a
stored function or trigger.
+ Note that if the table can't be locked successfully this operation will
+ close it. Therefore it provides guarantee that it either opens and locks
+ table or fails without leaving any tables open.
+
@param[in] thd Thread context
@param[in] lock_type How to lock the table
@param[out] table We will store the open table here
@@ -544,7 +548,10 @@ Event_db_repository::open_event_table(THD *thd, enum thr_lock_type lock_type,
tables.init_one_table("mysql", "event", lock_type);
if (simple_open_n_lock_tables(thd, &tables))
+ {
+ close_thread_tables(thd);
DBUG_RETURN(TRUE);
+ }
*table= tables.table;
tables.table->use_all_columns();
@@ -995,6 +1002,8 @@ update_timing_fields_for_event(THD *thd,
if (thd->current_stmt_binlog_row_based)
thd->clear_current_stmt_binlog_row_based();
+ DBUG_ASSERT(thd->security_ctx->master_access & SUPER_ACL);
+
if (open_event_table(thd, TL_WRITE, &table))
goto end;
diff --git a/sql/event_scheduler.cc b/sql/event_scheduler.cc
index b03b51f1134..5655a8acc99 100644
--- a/sql/event_scheduler.cc
+++ b/sql/event_scheduler.cc
@@ -127,6 +127,7 @@ post_init_event_thread(THD *thd)
thd->cleanup();
return TRUE;
}
+ lex_start(thd);
pthread_mutex_lock(&LOCK_thread_count);
threads.append(thd);
@@ -399,6 +400,13 @@ Event_scheduler::start()
new_thd->system_thread= SYSTEM_THREAD_EVENT_SCHEDULER;
new_thd->command= COM_DAEMON;
+ /*
+ We should run the event scheduler thread under the super-user privileges.
+ In particular, this is needed to be able to lock the mysql.event table
+ for writing when the server is running in the read-only mode.
+ */
+ new_thd->security_ctx->master_access |= SUPER_ACL;
+
scheduler_param_value=
(struct scheduler_param *)my_malloc(sizeof(struct scheduler_param), MYF(0));
scheduler_param_value->thd= new_thd;
diff --git a/sql/events.cc b/sql/events.cc
index 5246bccc388..87385082a82 100644
--- a/sql/events.cc
+++ b/sql/events.cc
@@ -146,7 +146,7 @@ bool
Events::set_opt_event_scheduler(char *argument)
{
if (argument == NULL)
- opt_event_scheduler= Events::EVENTS_DISABLED;
+ opt_event_scheduler= Events::EVENTS_ON;
else
{
int type;
@@ -825,8 +825,8 @@ Events::fill_schema_events(THD *thd, TABLE_LIST *tables, COND * /* cond */)
if (thd->lex->sql_command == SQLCOM_SHOW_EVENTS)
{
DBUG_ASSERT(thd->lex->select_lex.db);
- if (check_access(thd, EVENT_ACL, thd->lex->select_lex.db, 0, 0, 0,
- is_schema_db(thd->lex->select_lex.db)))
+ if (!is_schema_db(thd->lex->select_lex.db) && // There is no events in I_S
+ check_access(thd, EVENT_ACL, thd->lex->select_lex.db, 0, 0, 0, 0))
DBUG_RETURN(1);
db= thd->lex->select_lex.db;
}
@@ -884,6 +884,7 @@ Events::init(my_bool opt_noacl)
*/
thd->thread_stack= (char*) &thd;
thd->store_globals();
+ lex_start(thd);
/*
We will need Event_db_repository anyway, even if the scheduler is
@@ -1124,11 +1125,25 @@ Events::load_events_from_db(THD *thd)
READ_RECORD read_record_info;
bool ret= TRUE;
uint count= 0;
+ ulong saved_master_access;
DBUG_ENTER("Events::load_events_from_db");
DBUG_PRINT("enter", ("thd: 0x%lx", (long) thd));
- if (db_repository->open_event_table(thd, TL_WRITE, &table))
+ /*
+ NOTE: even if we run in read-only mode, we should be able to lock the
+ mysql.event table for writing. In order to achieve this, we should call
+ mysql_lock_tables() under the super user.
+ */
+
+ saved_master_access= thd->security_ctx->master_access;
+ thd->security_ctx->master_access |= SUPER_ACL;
+
+ ret= db_repository->open_event_table(thd, TL_WRITE, &table);
+
+ thd->security_ctx->master_access= saved_master_access;
+
+ if (ret)
{
sql_print_error("Event Scheduler: Failed to open table mysql.event");
DBUG_RETURN(TRUE);
diff --git a/sql/field.cc b/sql/field.cc
index fa93454c757..93588992fed 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -1394,20 +1394,85 @@ int Field::store(const char *to, uint length, CHARSET_INFO *cs,
/**
+ Pack the field into a format suitable for storage and transfer.
+
+ To implement packing functionality, only the virtual function
+ should be overridden. The other functions are just convenience
+ functions and hence should not be overridden.
+
+ The value of <code>low_byte_first</code> is dependent on how the
+ packed data is going to be used: for local use, e.g., temporary
+ store on disk or in memory, use the native format since that is
+ faster. For data that is going to be transfered to other machines
+ (e.g., when writing data to the binary log), data should always be
+ stored in little-endian format.
+
+ @note The default method for packing fields just copy the raw bytes
+ of the record into the destination, but never more than
+ <code>max_length</code> characters.
+
+ @param to
+ Pointer to memory area where representation of field should be put.
+
+ @param from
+ Pointer to memory area where record representation of field is
+ stored.
+
+ @param max_length
+ Maximum length of the field, as given in the column definition. For
+ example, for <code>CHAR(1000)</code>, the <code>max_length</code>
+ is 1000. This information is sometimes needed to decide how to pack
+ the data.
+
+ @param low_byte_first
+ @c TRUE if integers should be stored little-endian, @c FALSE if
+ native format should be used. Note that for little-endian machines,
+ the value of this flag is a moot point since the native format is
+ little-endian.
+*/
+uchar *
+Field::pack(uchar *to, const uchar *from, uint max_length,
+ bool low_byte_first __attribute__((unused)))
+{
+ uint32 length= pack_length();
+ set_if_smaller(length, max_length);
+ memcpy(to, from, length);
+ return to+length;
+}
+
+/**
Unpack a field from row data.
- This method is used to unpack a field from a master whose size
- of the field is less than that of the slave.
-
+ This method is used to unpack a field from a master whose size of
+ the field is less than that of the slave.
+
+ The <code>param_data</code> parameter is a two-byte integer (stored
+ in the least significant 16 bits of the unsigned integer) usually
+ consisting of two parts: the real type in the most significant byte
+ and a original pack length in the least significant byte.
+
+ The exact layout of the <code>param_data</code> field is given by
+ the <code>Table_map_log_event::save_field_metadata()</code>.
+
+ This is the default method for unpacking a field. It just copies
+ the memory block in byte order (of original pack length bytes or
+ length of field, whichever is smaller).
+
@param to Destination of the data
@param from Source of the data
- @param param_data Pack length of the field data
+ @param param_data Real type and original pack length of the field
+ data
+
+ @param low_byte_first
+ If this flag is @c true, all composite entities (e.g., lengths)
+ should be unpacked in little-endian format; otherwise, the entities
+ are unpacked in native order.
@return New pointer into memory based on from + length of the data
*/
-const uchar *Field::unpack(uchar* to,
- const uchar *from,
- uint param_data)
+const uchar *
+Field::unpack(uchar* to, const uchar *from, uint param_data,
+ bool low_byte_first __attribute__((unused)))
{
uint length=pack_length();
int from_type= 0;
@@ -1420,19 +1485,18 @@ const uchar *Field::unpack(uchar* to,
from_type= (param_data & 0xff00) >> 8U; // real_type.
param_data= param_data & 0x00ff; // length.
}
+
+ if ((param_data == 0) ||
+ (length == param_data) ||
+ (from_type != real_type()))
+ {
+ memcpy(to, from, length);
+ return from+length;
+ }
+
uint len= (param_data && (param_data < length)) ?
param_data : length;
- /*
- If the length is the same, use old unpack method.
- If the param_data is 0, use the old unpack method.
- This is possible if the table map was generated from a down-level
- master or if the data was not available on the master.
- If the real_types are not the same, use the old unpack method.
- */
- if ((length == param_data) ||
- (param_data == 0) ||
- (from_type != real_type()))
- return(unpack(to, from));
+
memcpy(to, from, param_data > length ? length : len);
return from+len;
}
@@ -1457,15 +1521,24 @@ void Field_num::add_zerofill_and_unsigned(String &res) const
void Field::make_field(Send_field *field)
{
- if (orig_table->s->db.str && *orig_table->s->db.str)
+ if (orig_table && orig_table->s->db.str && *orig_table->s->db.str)
{
field->db_name= orig_table->s->db.str;
field->org_table_name= orig_table->s->table_name.str;
}
else
field->org_table_name= field->db_name= "";
- field->table_name= orig_table->alias;
- field->col_name= field->org_col_name= field_name;
+ if (orig_table)
+ {
+ field->table_name= orig_table->alias;
+ field->org_col_name= field_name;
+ }
+ else
+ {
+ field->table_name= "";
+ field->org_col_name= "";
+ }
+ field->col_name= field_name;
field->charsetnr= charset()->number;
field->length=field_length;
field->type=type();
@@ -2805,10 +2878,15 @@ uint Field_new_decimal::is_equal(Create_field *new_field)
@return New pointer into memory based on from + length of the data
*/
-const uchar *Field_new_decimal::unpack(uchar* to,
- const uchar *from,
- uint param_data)
+const uchar *
+Field_new_decimal::unpack(uchar* to,
+ const uchar *from,
+ uint param_data,
+ bool low_byte_first)
{
+ if (param_data == 0)
+ return Field::unpack(to, from, param_data, low_byte_first);
+
uint from_precision= (param_data & 0xff00) >> 8U;
uint from_decimal= param_data & 0x00ff;
uint length=pack_length();
@@ -3950,6 +4028,49 @@ void Field_longlong::sql_type(String &res) const
}
+/*
+ Floating-point numbers
+ */
+
+uchar *
+Field_real::pack(uchar *to, const uchar *from,
+ uint max_length, bool low_byte_first)
+{
+ DBUG_ENTER("Field_real::pack");
+ DBUG_ASSERT(max_length >= pack_length());
+ DBUG_PRINT("debug", ("pack_length(): %u", pack_length()));
+#ifdef WORDS_BIGENDIAN
+ if (low_byte_first != table->s->db_low_byte_first)
+ {
+ const uchar *dptr= from + pack_length();
+ while (dptr-- > from)
+ *to++ = *dptr;
+ DBUG_RETURN(to);
+ }
+ else
+#endif
+ DBUG_RETURN(Field::pack(to, from, max_length, low_byte_first));
+}
+
+const uchar *
+Field_real::unpack(uchar *to, const uchar *from,
+ uint param_data, bool low_byte_first)
+{
+ DBUG_ENTER("Field_real::unpack");
+ DBUG_PRINT("debug", ("pack_length(): %u", pack_length()));
+#ifdef WORDS_BIGENDIAN
+ if (low_byte_first != table->s->db_low_byte_first)
+ {
+ const uchar *dptr= from + pack_length();
+ while (dptr-- > from)
+ *to++ = *dptr;
+ DBUG_RETURN(from + pack_length());
+ }
+ else
+#endif
+ DBUG_RETURN(Field::unpack(to, from, param_data, low_byte_first));
+}
+
/****************************************************************************
single precision float
****************************************************************************/
@@ -4607,6 +4728,8 @@ Field_timestamp::Field_timestamp(uchar *ptr_arg, uint32 len_arg,
/* This timestamp has auto-update */
share->timestamp_field= this;
flags|= TIMESTAMP_FLAG;
+ if (unireg_check != TIMESTAMP_DN_FIELD)
+ flags|= ON_UPDATE_NOW_FLAG;
}
}
@@ -4620,6 +4743,8 @@ Field_timestamp::Field_timestamp(bool maybe_null_arg,
{
/* For 4.0 MYD and 4.0 InnoDB compatibility */
flags|= ZEROFILL_FLAG | UNSIGNED_FLAG;
+ if (unireg_check != TIMESTAMP_DN_FIELD)
+ flags|= ON_UPDATE_NOW_FLAG;
}
@@ -5576,6 +5701,9 @@ void Field_date::sql_type(String &res) const
1 Value was cut during conversion
2 Wrong date string
3 Datetime value that was cut (warning level NOTE)
+ This is used by opt_range.cc:get_mm_leaf(). Note that there is a
+ nearly-identical class Field_date doesn't ever return 3 from its
+ store function.
*/
int Field_newdate::store(const char *from,uint len,CHARSET_INFO *cs)
@@ -5600,7 +5728,7 @@ int Field_newdate::store(const char *from,uint len,CHARSET_INFO *cs)
{
tmp= l_time.day + l_time.month*32 + l_time.year*16*32;
if (!error && (ret != MYSQL_TIMESTAMP_DATE) &&
- thd->count_cuted_fields != CHECK_FIELD_IGNORE)
+ (l_time.hour || l_time.minute || l_time.second || l_time.second_part))
error= 3; // Datetime was cut (note)
}
@@ -5648,10 +5776,16 @@ int Field_newdate::store(longlong nr, bool unsigned_val)
else
tmp= l_time.day + l_time.month*32 + l_time.year*16*32;
+ if (!error && l_time.time_type != MYSQL_TIMESTAMP_DATE &&
+ (l_time.hour || l_time.minute || l_time.second || l_time.second_part))
+ error= 3;
+
if (error)
- set_datetime_warning(MYSQL_ERROR::WARN_LEVEL_WARN,
- error == 2 ? ER_WARN_DATA_OUT_OF_RANGE :
- WARN_DATA_TRUNCATED,nr,MYSQL_TIMESTAMP_DATE, 1);
+ set_datetime_warning(error == 3 ? MYSQL_ERROR::WARN_LEVEL_NOTE :
+ MYSQL_ERROR::WARN_LEVEL_WARN,
+ error == 2 ?
+ ER_WARN_DATA_OUT_OF_RANGE : WARN_DATA_TRUNCATED,
+ nr,MYSQL_TIMESTAMP_DATE, 1);
int3store(ptr,tmp);
return error;
@@ -5679,6 +5813,17 @@ int Field_newdate::store_time(MYSQL_TIME *ltime,timestamp_type time_type)
set_datetime_warning(MYSQL_ERROR::WARN_LEVEL_WARN, WARN_DATA_TRUNCATED,
str.ptr(), str.length(), MYSQL_TIMESTAMP_DATE, 1);
}
+ if (!error && ltime->time_type != MYSQL_TIMESTAMP_DATE &&
+ (ltime->hour || ltime->minute || ltime->second || ltime->second_part))
+ {
+ char buff[MAX_DATE_STRING_REP_LENGTH];
+ String str(buff, sizeof(buff), &my_charset_latin1);
+ make_datetime((DATE_TIME_FORMAT *) 0, ltime, &str);
+ set_datetime_warning(MYSQL_ERROR::WARN_LEVEL_NOTE,
+ WARN_DATA_TRUNCATED,
+ str.ptr(), str.length(), MYSQL_TIMESTAMP_DATE, 1);
+ error= 3;
+ }
}
else
{
@@ -6259,24 +6404,74 @@ int Field_str::store(double nr)
ASSERT_COLUMN_MARKED_FOR_WRITE;
char buff[DOUBLE_TO_STRING_CONVERSION_BUFFER_SIZE];
uint length;
- bool use_scientific_notation= TRUE;
uint local_char_length= field_length / charset()->mbmaxlen;
- /*
- Check fabs(nr) against longest value that can be stored in field,
- which depends on whether the value is < 1 or not, and negative or not
- */
double anr= fabs(nr);
+ bool fractional= (anr != floor(anr));
int neg= (nr < 0.0) ? 1 : 0;
- if (local_char_length > 4 && local_char_length < 32 &&
- (anr < 1.0 ? anr > 1/(log_10[max(0,(int) local_char_length-neg-2)]) /* -2 for "0." */
- : anr < log_10[local_char_length-neg]-1))
- use_scientific_notation= FALSE;
-
- length= (uint) my_sprintf(buff, (buff, "%-.*g",
- (use_scientific_notation ?
- max(0, (int)local_char_length-neg-5) :
- local_char_length),
- nr));
+ uint max_length;
+ int exp;
+ uint digits;
+ uint i;
+
+ /* Calculate the exponent from the 'e'-format conversion */
+ if (anr < 1.0 && anr > 0)
+ {
+ for (exp= 0; anr < 1e-100; exp-= 100, anr*= 1e100);
+ for (; anr < 1e-10; exp-= 10, anr*= 1e10);
+ for (i= 1; anr < 1 / log_10[i]; exp--, i++);
+ exp--;
+ }
+ else
+ {
+ for (exp= 0; anr > 1e100; exp+= 100, anr/= 1e100);
+ for (; anr > 1e10; exp+= 10, anr/= 1e10);
+ for (i= 1; anr > log_10[i]; exp++, i++);
+ }
+
+ max_length= local_char_length - neg;
+
+ /*
+ Since in sprintf("%g") precision means the number of significant digits,
+ calculate the maximum number of significant digits if the 'f'-format
+ would be used (+1 for decimal point if the number has a fractional part).
+ */
+ digits= max(0, (int) max_length - fractional);
+ /*
+ If the exponent is negative, decrease digits by the number of leading zeros
+ after the decimal point that do not count as significant digits.
+ */
+ if (exp < 0)
+ digits= max(0, (int) digits + exp);
+ /*
+ 'e'-format is used only if the exponent is less than -4 or greater than or
+ equal to the precision. In this case we need to adjust the number of
+ significant digits to take "e+NN" + decimal point into account (hence -5).
+ We also have to reserve one additional character if abs(exp) >= 100.
+ */
+ if (exp >= (int) digits || exp < -4)
+ digits= max(0, (int) (max_length - 5 - (exp >= 100 || exp <= -100)));
+
+ /* Limit precision to DBL_DIG to avoid garbage past significant digits */
+ set_if_smaller(digits, DBL_DIG);
+
+ length= (uint) my_sprintf(buff, (buff, "%-.*g", digits, nr));
+
+#ifdef __WIN__
+ /*
+ Windows always zero-pads the exponent to 3 digits, we want to remove the
+ leading 0 to match the sprintf() output on other platforms.
+ */
+ if ((exp >= (int) digits || exp < -4) && exp > -100 && exp < 100)
+ {
+ DBUG_ASSERT(length >= 6); /* 1e+NNN */
+ uint tmp= length - 3;
+ buff[tmp]= buff[tmp + 1];
+ tmp++;
+ buff[tmp]= buff[tmp + 1];
+ length--;
+ }
+#endif
+
/*
+1 below is because "precision" in %g above means the
max. number of significant digits, not the output width.
@@ -6337,6 +6532,11 @@ int Field_longstr::store_decimal(const my_decimal *d)
return store(str.ptr(), str.length(), str.charset());
}
+uint32 Field_longstr::max_data_length() const
+{
+ return field_length + (field_length > 255 ? 2 : 1);
+}
+
double Field_string::val_real(void)
{
@@ -6481,7 +6681,9 @@ void Field_string::sql_type(String &res) const
}
-uchar *Field_string::pack(uchar *to, const uchar *from, uint max_length)
+uchar *Field_string::pack(uchar *to, const uchar *from,
+ uint max_length,
+ bool low_byte_first __attribute__((unused)))
{
uint length= min(field_length,max_length);
uint local_char_length= max_length/field_charset->mbmaxlen;
@@ -6489,11 +6691,15 @@ uchar *Field_string::pack(uchar *to, const uchar *from, uint max_length)
local_char_length= my_charpos(field_charset, from, from+length,
local_char_length);
set_if_smaller(length, local_char_length);
- while (length && from[length-1] == ' ')
+ while (length && from[length-1] == field_charset->pad_char)
length--;
+
+ // Length always stored little-endian
*to++= (uchar) length;
if (field_length > 255)
*to++= (uchar) (length >> 8);
+
+ // Store the actual bytes of the string
memcpy(to, from, length);
return to+length;
}
@@ -6515,34 +6721,27 @@ uchar *Field_string::pack(uchar *to, const uchar *from, uint max_length)
@return New pointer into memory based on from + length of the data
*/
-const uchar *Field_string::unpack(uchar *to,
- const uchar *from,
- uint param_data)
-{
- uint from_len= param_data & 0x00ff; // length.
- uint length= 0;
- uint f_length;
- f_length= (from_len < field_length) ? from_len : field_length;
- DBUG_ASSERT(f_length <= 255);
- length= (uint) *from++;
- bitmap_set_bit(table->write_set,field_index);
- store((const char *)from, length, system_charset_info);
- return from+length;
-}
-
-
-const uchar *Field_string::unpack(uchar *to, const uchar *from)
-{
+const uchar *
+Field_string::unpack(uchar *to,
+ const uchar *from,
+ uint param_data,
+ bool low_byte_first __attribute__((unused)))
+{
+ uint from_length=
+ param_data ? min(param_data & 0x00ff, field_length) : field_length;
uint length;
- if (field_length > 255)
+
+ if (from_length > 255)
{
length= uint2korr(from);
from+= 2;
}
else
length= (uint) *from++;
- memcpy(to, from, (int) length);
- bfill(to+length, field_length - length, ' ');
+
+ memcpy(to, from, length);
+ // Pad the string with the pad character of the fields charset
+ bfill(to + length, field_length - length, field_charset->pad_char);
return from+length;
}
@@ -6732,6 +6931,7 @@ const uint Field_varstring::MAX_SIZE= UINT_MAX16;
int Field_varstring::do_save_field_metadata(uchar *metadata_ptr)
{
char *ptr= (char *)metadata_ptr;
+ DBUG_ASSERT(field_length <= 65535);
int2store(ptr, field_length);
return 2;
}
@@ -6959,22 +7159,30 @@ uint32 Field_varstring::data_length()
Here the number of length bytes are depending on the given max_length
*/
-uchar *Field_varstring::pack(uchar *to, const uchar *from, uint max_length)
+uchar *Field_varstring::pack(uchar *to, const uchar *from,
+ uint max_length,
+ bool low_byte_first __attribute__((unused)))
{
uint length= length_bytes == 1 ? (uint) *from : uint2korr(from);
set_if_smaller(max_length, field_length);
if (length > max_length)
length=max_length;
- *to++= (char) (length & 255);
+
+ /* Length always stored little-endian */
+ *to++= length & 0xFF;
if (max_length > 255)
- *to++= (char) (length >> 8);
- if (length)
+ *to++= (length >> 8) & 0xFF;
+
+ /* Store bytes of string */
+ if (length > 0)
memcpy(to, from+length_bytes, length);
return to+length;
}
-uchar *Field_varstring::pack_key(uchar *to, const uchar *key, uint max_length)
+uchar *
+Field_varstring::pack_key(uchar *to, const uchar *key, uint max_length,
+ bool low_byte_first __attribute__((unused)))
{
uint length= length_bytes == 1 ? (uint) *key : uint2korr(key);
uint local_char_length= ((field_charset->mbmaxlen > 1) ?
@@ -7013,8 +7221,9 @@ uchar *Field_varstring::pack_key(uchar *to, const uchar *key, uint max_length)
Pointer to end of 'key' (To the next key part if multi-segment key)
*/
-const uchar *Field_varstring::unpack_key(uchar *to, const uchar *key,
- uint max_length)
+const uchar *
+Field_varstring::unpack_key(uchar *to, const uchar *key, uint max_length,
+ bool low_byte_first __attribute__((unused)))
{
/* get length of the blob key */
uint32 length= *key++;
@@ -7043,8 +7252,9 @@ const uchar *Field_varstring::unpack_key(uchar *to, const uchar *key,
end of key storage
*/
-uchar *Field_varstring::pack_key_from_key_image(uchar *to, const uchar *from,
- uint max_length)
+uchar *
+Field_varstring::pack_key_from_key_image(uchar *to, const uchar *from, uint max_length,
+ bool low_byte_first __attribute__((unused)))
{
/* Key length is always stored as 2 bytes */
uint length= uint2korr(from);
@@ -7064,6 +7274,9 @@ uchar *Field_varstring::pack_key_from_key_image(uchar *to, const uchar *from,
This method is used to unpack a varstring field from a master
whose size of the field is less than that of the slave.
+
+ @note
+ The string length is always packed little-endian.
@param to Destination of the data
@param from Source of the data
@@ -7071,9 +7284,10 @@ uchar *Field_varstring::pack_key_from_key_image(uchar *to, const uchar *from,
@return New pointer into memory based on from + length of the data
*/
-const uchar *Field_varstring::unpack(uchar *to,
- const uchar *from,
- uint param_data)
+const uchar *
+Field_varstring::unpack(uchar *to, const uchar *from,
+ uint param_data,
+ bool low_byte_first __attribute__((unused)))
{
uint length;
uint l_bytes= (param_data && (param_data < field_length)) ?
@@ -7085,28 +7299,7 @@ const uchar *Field_varstring::unpack(uchar *to,
if (length_bytes == 2)
to[1]= 0;
}
- else
- {
- length= uint2korr(from);
- to[0]= *from++;
- to[1]= *from++;
- }
- if (length)
- memcpy(to+ length_bytes, from, length);
- return from+length;
-}
-
-
-/*
- unpack field packed with Field_varstring::pack()
-*/
-
-const uchar *Field_varstring::unpack(uchar *to, const uchar *from)
-{
- uint length;
- if (length_bytes == 1)
- length= (uint) (*to= *from++);
- else
+ else /* l_bytes == 2 */
{
length= uint2korr(from);
to[0]= *from++;
@@ -7355,9 +7548,9 @@ void Field_blob::store_length(uchar *i_ptr,
}
-uint32 Field_blob::get_length(const uchar *pos, bool low_byte_first)
+uint32 Field_blob::get_length(const uchar *pos, uint packlength_arg, bool low_byte_first)
{
- switch (packlength) {
+ switch (packlength_arg) {
case 1:
return (uint32) pos[0];
case 2:
@@ -7788,26 +7981,37 @@ void Field_blob::sql_type(String &res) const
}
}
-
-uchar *Field_blob::pack(uchar *to, const uchar *from, uint max_length)
+uchar *Field_blob::pack(uchar *to, const uchar *from,
+ uint max_length, bool low_byte_first)
{
+ DBUG_ENTER("Field_blob::pack");
+ DBUG_PRINT("enter", ("to: 0x%lx; from: 0x%lx;"
+ " max_length: %u; low_byte_first: %d",
+ (ulong) to, (ulong) from,
+ max_length, low_byte_first));
+ DBUG_DUMP("record", from, table->s->reclength);
uchar *save= ptr;
ptr= (uchar*) from;
uint32 length=get_length(); // Length of from string
- if (length > max_length)
- {
- length=max_length;
- store_length(to,packlength,length,TRUE);
- }
- else
- memcpy(to,from,packlength); // Copy length
- if (length)
+
+ /*
+ Store max length, which will occupy packlength bytes. If the max
+ length given is smaller than the actual length of the blob, we
+ just store the initial bytes of the blob.
+ */
+ store_length(to, packlength, min(length, max_length), low_byte_first);
+
+ /*
+ Store the actual blob data, which will occupy 'length' bytes.
+ */
+ if (length > 0)
{
get_ptr((uchar**) &from);
memcpy(to+packlength, from,length);
}
ptr=save; // Restore org row pointer
- return to+packlength+length;
+ DBUG_DUMP("packed", to, packlength + length);
+ DBUG_RETURN(to+packlength+length);
}
@@ -7822,28 +8026,30 @@ uchar *Field_blob::pack(uchar *to, const uchar *from, uint max_length)
@param to Destination of the data
@param from Source of the data
- @param param_data not used
+ @param param_data @c TRUE if base types should be stored in little-
+ endian format, @c FALSE if native format should
+ be used.
@return New pointer into memory based on from + length of the data
*/
const uchar *Field_blob::unpack(uchar *to,
const uchar *from,
- uint param_data)
-{
- return unpack(to, from);
-}
-
-
-const uchar *Field_blob::unpack(uchar *to, const uchar *from)
-{
- uint32 length=get_length(from);
- memcpy(to,from,packlength);
- from+=packlength;
- if (length)
- memcpy_fixed(to+packlength, &from, sizeof(from));
- else
- bzero(to+packlength,sizeof(from));
- return from+length;
+ uint param_data,
+ bool low_byte_first)
+{
+ DBUG_ENTER("Field_blob::unpack");
+ DBUG_PRINT("enter", ("to: 0x%lx; from: 0x%lx;"
+ " param_data: %u; low_byte_first: %d",
+ (ulong) to, (ulong) from, param_data, low_byte_first));
+ uint const master_packlength=
+ param_data > 0 ? param_data & 0xFF : packlength;
+ uint32 const length= get_length(from, master_packlength, low_byte_first);
+ DBUG_DUMP("packed", from, length + master_packlength);
+ bitmap_set_bit(table->write_set, field_index);
+ store(reinterpret_cast<const char*>(from) + master_packlength,
+ length, field_charset);
+ DBUG_DUMP("record", to, table->s->reclength);
+ DBUG_RETURN(from + master_packlength + length);
}
/* Keys for blobs are like keys on varchars */
@@ -7893,7 +8099,9 @@ int Field_blob::pack_cmp(const uchar *b, uint key_length_arg,
/* Create a packed key that will be used for storage from a MySQL row */
-uchar *Field_blob::pack_key(uchar *to, const uchar *from, uint max_length)
+uchar *
+Field_blob::pack_key(uchar *to, const uchar *from, uint max_length,
+ bool low_byte_first __attribute__((unused)))
{
uchar *save= ptr;
ptr= (uchar*) from;
@@ -7938,8 +8146,9 @@ uchar *Field_blob::pack_key(uchar *to, const uchar *from, uint max_length)
Pointer into 'from' past the last byte copied from packed key.
*/
-const uchar *Field_blob::unpack_key(uchar *to, const uchar *from,
- uint max_length)
+const uchar *
+Field_blob::unpack_key(uchar *to, const uchar *from, uint max_length,
+ bool low_byte_first __attribute__((unused)))
{
/* get length of the blob key */
uint32 length= *from++;
@@ -7962,8 +8171,9 @@ const uchar *Field_blob::unpack_key(uchar *to, const uchar *from,
/* Create a packed key that will be used for storage from a MySQL key */
-uchar *Field_blob::pack_key_from_key_image(uchar *to, const uchar *from,
- uint max_length)
+uchar *
+Field_blob::pack_key_from_key_image(uchar *to, const uchar *from, uint max_length,
+ bool low_byte_first __attribute__((unused)))
{
uint length=uint2korr(from);
if (length > max_length)
@@ -8005,36 +8215,6 @@ uint Field_blob::is_equal(Create_field *new_field)
#ifdef HAVE_SPATIAL
-uint Field_geom::get_key_image(uchar *buff, uint length, imagetype type)
-{
- uchar *blob;
- const char *dummy;
- MBR mbr;
- ulong blob_length= get_length(ptr);
- Geometry_buffer buffer;
- Geometry *gobj;
- const uint image_length= SIZEOF_STORED_DOUBLE*4;
-
- if (blob_length < SRID_SIZE)
- {
- bzero(buff, image_length);
- return image_length;
- }
- get_ptr(&blob);
- gobj= Geometry::construct(&buffer, (char*) blob, blob_length);
- if (!gobj || gobj->get_mbr(&mbr, &dummy))
- bzero(buff, image_length);
- else
- {
- float8store(buff, mbr.xmin);
- float8store(buff + 8, mbr.xmax);
- float8store(buff + 16, mbr.ymin);
- float8store(buff + 24, mbr.ymax);
- }
- return image_length;
-}
-
-
void Field_geom::sql_type(String &res) const
{
CHARSET_INFO *cs= &my_charset_latin1;
@@ -8940,9 +9120,11 @@ void Field_bit::sql_type(String &res) const
}
-uchar *Field_bit::pack(uchar *to, const uchar *from, uint max_length)
+uchar *
+Field_bit::pack(uchar *to, const uchar *from, uint max_length,
+ bool low_byte_first __attribute__((unused)))
{
- DBUG_ASSERT(max_length);
+ DBUG_ASSERT(max_length > 0);
uint length;
if (bit_len > 0)
{
@@ -8977,28 +9159,44 @@ uchar *Field_bit::pack(uchar *to, const uchar *from, uint max_length)
/**
Unpack a bit field from row data.
- This method is used to unpack a bit field from a master whose size
+ This method is used to unpack a bit field from a master whose size
of the field is less than that of the slave.
-
+
@param to Destination of the data
@param from Source of the data
@param param_data Bit length (upper) and length (lower) values
@return New pointer into memory based on from + length of the data
*/
-const uchar *Field_bit::unpack(uchar *to,
- const uchar *from,
- uint param_data)
+const uchar *
+Field_bit::unpack(uchar *to, const uchar *from, uint param_data,
+ bool low_byte_first __attribute__((unused)))
{
uint const from_len= (param_data >> 8U) & 0x00ff;
uint const from_bit_len= param_data & 0x00ff;
/*
- If the master and slave have the same sizes, then use the old
- unpack() method.
+ If the parameter data is zero (i.e., undefined), or if the master
+ and slave have the same sizes, then use the old unpack() method.
*/
- if ((from_bit_len == bit_len) &&
- (from_len == bytes_in_rec))
- return(unpack(to, from));
+ if (param_data == 0 ||
+ (from_bit_len == bit_len) && (from_len == bytes_in_rec))
+ {
+ if (bit_len > 0)
+ {
+ /*
+ set_rec_bits is a macro, don't put the post-increment in the
+ argument since that might cause strange side-effects.
+
+ For the choice of the second argument, see the explanation for
+ Field_bit::pack().
+ */
+ set_rec_bits(*from, bit_ptr + (to - ptr), bit_ofs, bit_len);
+ from++;
+ }
+ memcpy(to, from, bytes_in_rec);
+ return from + bytes_in_rec;
+ }
+
/*
We are converting a smaller bit field to a larger one here.
To do that, we first need to construct a raw value for the original
@@ -9026,25 +9224,6 @@ const uchar *Field_bit::unpack(uchar *to,
}
-const uchar *Field_bit::unpack(uchar *to, const uchar *from)
-{
- if (bit_len > 0)
- {
- /*
- set_rec_bits is a macro, don't put the post-increment in the
- argument since that might cause strange side-effects.
-
- For the choice of the second argument, see the explanation for
- Field_bit::pack().
- */
- set_rec_bits(*from, bit_ptr + (to - ptr), bit_ofs, bit_len);
- from++;
- }
- memcpy(to, from, bytes_in_rec);
- return from + bytes_in_rec;
-}
-
-
void Field_bit::set_default()
{
if (bit_len > 0)
diff --git a/sql/field.h b/sql/field.h
index 4ed66f8afc8..53788560e68 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -25,6 +25,7 @@
#define NOT_FIXED_DEC 31
#define DATETIME_DEC 6
+const uint32 max_field_size= (uint32) 4294967295U;
class Send_field;
class Protocol;
@@ -175,6 +176,17 @@ public:
*/
virtual uint32 data_length() { return pack_length(); }
virtual uint32 sort_length() const { return pack_length(); }
+
+ /**
+ Get the maximum size of the data in packed format.
+
+ @return Maximum data length of the field when packed using the
+ Field::pack() function.
+ */
+ virtual uint32 max_data_length() const {
+ return pack_length();
+ };
+
virtual int reset(void) { bzero(ptr,pack_length()); return 0; }
virtual void reset_fields() {}
virtual void set_default()
@@ -357,32 +369,45 @@ public:
return str;
}
virtual bool send_binary(Protocol *protocol);
- virtual uchar *pack(uchar *to, const uchar *from, uint max_length=~(uint) 0)
+
+ virtual uchar *pack(uchar *to, const uchar *from,
+ uint max_length, bool low_byte_first);
+ /**
+ @overload Field::pack(uchar*, const uchar*, uint, bool)
+ */
+ uchar *pack(uchar *to, const uchar *from)
{
- uint32 length=pack_length();
- memcpy(to,from,length);
- return to+length;
+ DBUG_ENTER("Field::pack");
+ uchar *result= this->pack(to, from, UINT_MAX, table->s->db_low_byte_first);
+ DBUG_RETURN(result);
}
- virtual const uchar *unpack(uchar* to, const uchar *from, uint param_data);
- virtual const uchar *unpack(uchar* to, const uchar *from)
+
+ virtual const uchar *unpack(uchar* to, const uchar *from,
+ uint param_data, bool low_byte_first);
+ /**
+ @overload Field::unpack(uchar*, const uchar*, uint, bool)
+ */
+ const uchar *unpack(uchar* to, const uchar *from)
{
- uint length=pack_length();
- memcpy(to,from,length);
- return from+length;
+ DBUG_ENTER("Field::unpack");
+ const uchar *result= unpack(to, from, 0U, table->s->db_low_byte_first);
+ DBUG_RETURN(result);
}
- virtual uchar *pack_key(uchar* to, const uchar *from, uint max_length)
+
+ virtual uchar *pack_key(uchar* to, const uchar *from,
+ uint max_length, bool low_byte_first)
{
- return pack(to,from,max_length);
+ return pack(to, from, max_length, low_byte_first);
}
virtual uchar *pack_key_from_key_image(uchar* to, const uchar *from,
- uint max_length)
+ uint max_length, bool low_byte_first)
{
- return pack(to,from,max_length);
+ return pack(to, from, max_length, low_byte_first);
}
virtual const uchar *unpack_key(uchar* to, const uchar *from,
- uint max_length)
+ uint max_length, bool low_byte_first)
{
- return unpack(to,from);
+ return unpack(to, from, max_length, low_byte_first);
}
virtual uint packed_col_length(const uchar *to, uint length)
{ return length;}
@@ -567,6 +592,7 @@ public:
{}
int store_decimal(const my_decimal *d);
+ uint32 max_data_length() const;
};
/* base class for float and double and decimal (old one) */
@@ -587,6 +613,10 @@ public:
int truncate(double *nr, double max_length);
uint32 max_display_length() { return field_length; }
uint size_of() const { return sizeof(*this); }
+ virtual const uchar *unpack(uchar* to, const uchar *from,
+ uint param_data, bool low_byte_first);
+ virtual uchar *pack(uchar* to, const uchar *from,
+ uint max_length, bool low_byte_first);
};
@@ -615,6 +645,16 @@ public:
void overflow(bool negative);
bool zero_pack() const { return 0; }
void sql_type(String &str) const;
+ virtual const uchar *unpack(uchar* to, const uchar *from,
+ uint param_data, bool low_byte_first)
+ {
+ return Field::unpack(to, from, param_data, low_byte_first);
+ }
+ virtual uchar *pack(uchar* to, const uchar *from,
+ uint max_length, bool low_byte_first)
+ {
+ return Field::pack(to, from, max_length, low_byte_first);
+ }
};
@@ -665,7 +705,8 @@ public:
uint row_pack_length() { return pack_length(); }
int compatible_field_size(uint field_metadata);
uint is_equal(Create_field *new_field);
- virtual const uchar *unpack(uchar* to, const uchar *from, uint param_data);
+ virtual const uchar *unpack(uchar* to, const uchar *from,
+ uint param_data, bool low_byte_first);
};
@@ -696,6 +737,20 @@ public:
uint32 pack_length() const { return 1; }
void sql_type(String &str) const;
uint32 max_display_length() { return 4; }
+
+ virtual uchar *pack(uchar* to, const uchar *from,
+ uint max_length, bool low_byte_first)
+ {
+ *to= *from;
+ return to + 1;
+ }
+
+ virtual const uchar *unpack(uchar* to, const uchar *from,
+ uint param_data, bool low_byte_first)
+ {
+ *to= *from;
+ return from + 1;
+ }
};
@@ -731,8 +786,47 @@ public:
uint32 pack_length() const { return 2; }
void sql_type(String &str) const;
uint32 max_display_length() { return 6; }
-};
+ virtual uchar *pack(uchar* to, const uchar *from,
+ uint max_length, bool low_byte_first)
+ {
+ int16 val;
+#ifdef WORDS_BIGENDIAN
+ if (table->s->db_low_byte_first)
+ val = sint2korr(from);
+ else
+#endif
+ shortget(val, from);
+
+#ifdef WORDS_BIGENDIAN
+ if (low_byte_first)
+ int2store(to, val);
+ else
+#endif
+ shortstore(to, val);
+ return to + sizeof(val);
+ }
+
+ virtual const uchar *unpack(uchar* to, const uchar *from,
+ uint param_data, bool low_byte_first)
+ {
+ int16 val;
+#ifdef WORDS_BIGENDIAN
+ if (low_byte_first)
+ val = sint2korr(from);
+ else
+#endif
+ shortget(val, from);
+
+#ifdef WORDS_BIGENDIAN
+ if (table->s->db_low_byte_first)
+ int2store(to, val);
+ else
+#endif
+ shortstore(to, val);
+ return from + sizeof(val);
+ }
+};
class Field_medium :public Field_num {
public:
@@ -761,6 +855,18 @@ public:
uint32 pack_length() const { return 3; }
void sql_type(String &str) const;
uint32 max_display_length() { return 8; }
+
+ virtual uchar *pack(uchar* to, const uchar *from,
+ uint max_length, bool low_byte_first)
+ {
+ return Field::pack(to, from, max_length, low_byte_first);
+ }
+
+ virtual const uchar *unpack(uchar* to, const uchar *from,
+ uint param_data, bool low_byte_first)
+ {
+ return Field::unpack(to, from, param_data, low_byte_first);
+ }
};
@@ -796,6 +902,45 @@ public:
uint32 pack_length() const { return 4; }
void sql_type(String &str) const;
uint32 max_display_length() { return MY_INT32_NUM_DECIMAL_DIGITS; }
+ virtual uchar *pack(uchar* to, const uchar *from,
+ uint max_length, bool low_byte_first)
+ {
+ int32 val;
+#ifdef WORDS_BIGENDIAN
+ if (table->s->db_low_byte_first)
+ val = sint4korr(from);
+ else
+#endif
+ longget(val, from);
+
+#ifdef WORDS_BIGENDIAN
+ if (low_byte_first)
+ int4store(to, val);
+ else
+#endif
+ longstore(to, val);
+ return to + sizeof(val);
+ }
+
+ virtual const uchar *unpack(uchar* to, const uchar *from,
+ uint param_data, bool low_byte_first)
+ {
+ int32 val;
+#ifdef WORDS_BIGENDIAN
+ if (low_byte_first)
+ val = sint4korr(from);
+ else
+#endif
+ longget(val, from);
+
+#ifdef WORDS_BIGENDIAN
+ if (table->s->db_low_byte_first)
+ int4store(to, val);
+ else
+#endif
+ longstore(to, val);
+ return from + sizeof(val);
+ }
};
@@ -838,6 +983,45 @@ public:
void sql_type(String &str) const;
bool can_be_compared_as_longlong() const { return TRUE; }
uint32 max_display_length() { return 20; }
+ virtual uchar *pack(uchar* to, const uchar *from,
+ uint max_length, bool low_byte_first)
+ {
+ int64 val;
+#ifdef WORDS_BIGENDIAN
+ if (table->s->db_low_byte_first)
+ val = sint8korr(from);
+ else
+#endif
+ longlongget(val, from);
+
+#ifdef WORDS_BIGENDIAN
+ if (low_byte_first)
+ int8store(to, val);
+ else
+#endif
+ longlongstore(to, val);
+ return to + sizeof(val);
+ }
+
+ virtual const uchar *unpack(uchar* to, const uchar *from,
+ uint param_data, bool low_byte_first)
+ {
+ int64 val;
+#ifdef WORDS_BIGENDIAN
+ if (low_byte_first)
+ val = sint8korr(from);
+ else
+#endif
+ longlongget(val, from);
+
+#ifdef WORDS_BIGENDIAN
+ if (table->s->db_low_byte_first)
+ int8store(to, val);
+ else
+#endif
+ longlongstore(to, val);
+ return from + sizeof(val);
+ }
};
#endif
@@ -1218,9 +1402,10 @@ public:
int cmp(const uchar *,const uchar *);
void sort_string(uchar *buff,uint length);
void sql_type(String &str) const;
- uchar *pack(uchar *to, const uchar *from, uint max_length=~(uint) 0);
- virtual const uchar *unpack(uchar* to, const uchar *from, uint param_data);
- const uchar *unpack(uchar* to, const uchar *from);
+ virtual uchar *pack(uchar *to, const uchar *from,
+ uint max_length, bool low_byte_first);
+ virtual const uchar *unpack(uchar* to, const uchar *from,
+ uint param_data, bool low_byte_first);
uint pack_length_from_metadata(uint field_metadata)
{ return (field_metadata & 0x00ff); }
uint row_pack_length() { return (field_length + 1); }
@@ -1298,13 +1483,15 @@ public:
uint get_key_image(uchar *buff,uint length, imagetype type);
void set_key_image(const uchar *buff,uint length);
void sql_type(String &str) const;
- uchar *pack(uchar *to, const uchar *from, uint max_length=~(uint) 0);
- uchar *pack_key(uchar *to, const uchar *from, uint max_length);
+ virtual uchar *pack(uchar *to, const uchar *from,
+ uint max_length, bool low_byte_first);
+ uchar *pack_key(uchar *to, const uchar *from, uint max_length, bool low_byte_first);
uchar *pack_key_from_key_image(uchar* to, const uchar *from,
- uint max_length);
- virtual const uchar *unpack(uchar* to, const uchar *from, uint param_data);
- const uchar *unpack(uchar* to, const uchar *from);
- const uchar *unpack_key(uchar* to, const uchar *from, uint max_length);
+ uint max_length, bool low_byte_first);
+ virtual const uchar *unpack(uchar* to, const uchar *from,
+ uint param_data, bool low_byte_first);
+ const uchar *unpack_key(uchar* to, const uchar *from,
+ uint max_length, bool low_byte_first);
int pack_cmp(const uchar *a, const uchar *b, uint key_length,
my_bool insert_or_update);
int pack_cmp(const uchar *b, uint key_length,my_bool insert_or_update);
@@ -1397,7 +1584,7 @@ public:
{ return (uint32) (packlength); }
uint row_pack_length() { return pack_length_no_ptr(); }
uint32 sort_length() const;
- inline uint32 max_data_length() const
+ virtual uint32 max_data_length() const
{
return (uint32) (((ulonglong) 1 << (packlength*8)) -1);
}
@@ -1425,13 +1612,13 @@ public:
@returns The length in the row plus the size of the data.
*/
uint32 get_packed_size(const uchar *ptr_arg, bool low_byte_first)
- {return packlength + get_length(ptr_arg, low_byte_first);}
+ {return packlength + get_length(ptr_arg, packlength, low_byte_first);}
inline uint32 get_length(uint row_offset= 0)
- { return get_length(ptr+row_offset, table->s->db_low_byte_first); }
- uint32 get_length(const uchar *ptr, bool low_byte_first);
+ { return get_length(ptr+row_offset, this->packlength, table->s->db_low_byte_first); }
+ uint32 get_length(const uchar *ptr, uint packlength, bool low_byte_first);
uint32 get_length(const uchar *ptr_arg)
- { return get_length(ptr_arg, table->s->db_low_byte_first); }
+ { return get_length(ptr_arg, this->packlength, table->s->db_low_byte_first); }
void put_length(uchar *pos, uint32 length);
inline void get_ptr(uchar **str)
{
@@ -1472,13 +1659,16 @@ public:
memcpy_fixed(ptr+packlength,&tmp,sizeof(char*));
return 0;
}
- uchar *pack(uchar *to, const uchar *from, uint max_length= ~(uint) 0);
- uchar *pack_key(uchar *to, const uchar *from, uint max_length);
+ virtual uchar *pack(uchar *to, const uchar *from,
+ uint max_length, bool low_byte_first);
+ uchar *pack_key(uchar *to, const uchar *from,
+ uint max_length, bool low_byte_first);
uchar *pack_key_from_key_image(uchar* to, const uchar *from,
- uint max_length);
- virtual const uchar *unpack(uchar *to, const uchar *from, uint param_data);
- const uchar *unpack(uchar *to, const uchar *from);
- const uchar *unpack_key(uchar* to, const uchar *from, uint max_length);
+ uint max_length, bool low_byte_first);
+ virtual const uchar *unpack(uchar *to, const uchar *from,
+ uint param_data, bool low_byte_first);
+ const uchar *unpack_key(uchar* to, const uchar *from,
+ uint max_length, bool low_byte_first);
int pack_cmp(const uchar *a, const uchar *b, uint key_length,
my_bool insert_or_update);
int pack_cmp(const uchar *b, uint key_length,my_bool insert_or_update);
@@ -1522,7 +1712,6 @@ public:
int store(double nr);
int store(longlong nr, bool unsigned_val);
int store_decimal(const my_decimal *);
- uint get_key_image(uchar *buff,uint length,imagetype type);
uint size_of() const { return sizeof(*this); }
int reset(void) { return !maybe_null() || Field_blob::reset(); }
geometry_type get_geometry_type() { return geom_type; };
@@ -1631,6 +1820,7 @@ public:
enum_field_types type() const { return MYSQL_TYPE_BIT; }
enum ha_base_keytype key_type() const { return HA_KEYTYPE_BIT; }
uint32 key_length() const { return (uint32) (field_length + 7) / 8; }
+ uint32 max_data_length() const { return (field_length + 7) / 8; }
uint32 max_display_length() { return field_length; }
uint size_of() const { return sizeof(*this); }
Item_result result_type () const { return INT_RESULT; }
@@ -1672,9 +1862,10 @@ public:
{ return (bytes_in_rec + ((bit_len > 0) ? 1 : 0)); }
int compatible_field_size(uint field_metadata);
void sql_type(String &str) const;
- uchar *pack(uchar *to, const uchar *from, uint max_length=~(uint) 0);
- virtual const uchar *unpack(uchar *to, const uchar *from, uint param_data);
- const uchar *unpack(uchar* to, const uchar *from);
+ virtual uchar *pack(uchar *to, const uchar *from,
+ uint max_length, bool low_byte_first);
+ virtual const uchar *unpack(uchar *to, const uchar *from,
+ uint param_data, bool low_byte_first);
virtual void set_default();
Field *new_key_field(MEM_ROOT *root, struct st_table *new_table,
diff --git a/sql/filesort.cc b/sql/filesort.cc
index 229922e6077..98a56b627ec 100644
--- a/sql/filesort.cc
+++ b/sql/filesort.cc
@@ -555,8 +555,8 @@ static ha_rows find_all_keys(SORTPARAM *param, SQL_SELECT *select,
else
file->unlock_row();
/* It does not make sense to read more keys in case of a fatal error */
- if (thd->net.report_error)
- DBUG_RETURN(HA_POS_ERROR);
+ if (thd->is_error())
+ break;
}
if (quick_select)
{
@@ -573,6 +573,9 @@ static ha_rows find_all_keys(SORTPARAM *param, SQL_SELECT *select,
file->ha_rnd_end();
}
+ if (thd->is_error())
+ DBUG_RETURN(HA_POS_ERROR);
+
/* Signal we should use orignal column read and write maps */
sort_form->column_bitmaps_set(save_read_set, save_write_set);
diff --git a/sql/gstream.cc b/sql/gstream.cc
index 46e12b6ef3b..0c8011549f3 100644
--- a/sql/gstream.cc
+++ b/sql/gstream.cc
@@ -44,7 +44,7 @@ bool Gis_read_stream::get_next_word(LEX_STRING *res)
skip_space();
res->str= (char*) m_cur;
/* The following will also test for \0 */
- if (!my_isvar_start(&my_charset_bin, *m_cur))
+ if ((m_cur >= m_limit) || !my_isvar_start(&my_charset_bin, *m_cur))
return 1;
/*
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc
index b2152fbb906..bf2b19bfc9c 100644
--- a/sql/ha_ndbcluster.cc
+++ b/sql/ha_ndbcluster.cc
@@ -325,9 +325,9 @@ Thd_ndb::Thd_ndb()
{
ndb= new Ndb(g_ndb_cluster_connection, "");
lock_count= 0;
+ start_stmt_count= 0;
count= 0;
- all= NULL;
- stmt= NULL;
+ trans= NULL;
m_error= FALSE;
m_error_code= 0;
query_state&= NDB_QUERY_NORMAL;
@@ -382,6 +382,11 @@ Thd_ndb::get_open_table(THD *thd, const void *key)
{
thd_ndb_share= (THD_NDB_SHARE *) alloc_root(&thd->transaction.mem_root,
sizeof(THD_NDB_SHARE));
+ if (!thd_ndb_share)
+ {
+ mem_alloc_error(sizeof(THD_NDB_SHARE));
+ DBUG_RETURN(NULL);
+ }
thd_ndb_share->key= key;
thd_ndb_share->stat.last_count= count;
thd_ndb_share->stat.no_uncommitted_rows_count= 0;
@@ -1638,6 +1643,26 @@ int ha_ndbcluster::set_primary_key_from_record(NdbOperation *op, const uchar *re
DBUG_RETURN(0);
}
+bool ha_ndbcluster::check_index_fields_in_write_set(uint keyno)
+{
+ KEY* key_info= table->key_info + keyno;
+ KEY_PART_INFO* key_part= key_info->key_part;
+ KEY_PART_INFO* end= key_part+key_info->key_parts;
+ uint i;
+ DBUG_ENTER("check_index_fields_in_write_set");
+
+ for (i= 0; key_part != end; key_part++, i++)
+ {
+ Field* field= key_part->field;
+ if (!bitmap_is_set(table->write_set, field->field_index))
+ {
+ DBUG_RETURN(false);
+ }
+ }
+
+ DBUG_RETURN(true);
+}
+
int ha_ndbcluster::set_index_key_from_record(NdbOperation *op,
const uchar *record, uint keyno)
{
@@ -1956,8 +1981,8 @@ check_null_in_record(const KEY* key_info, const uchar *record)
* primary key or unique index values
*/
-int ha_ndbcluster::peek_indexed_rows(const uchar *record,
- bool check_pk)
+int ha_ndbcluster::peek_indexed_rows(const uchar *record,
+ NDB_WRITE_OP write_op)
{
NdbTransaction *trans= m_active_trans;
NdbOperation *op;
@@ -1969,7 +1994,7 @@ int ha_ndbcluster::peek_indexed_rows(const uchar *record,
NdbOperation::LockMode lm=
(NdbOperation::LockMode)get_ndb_lock_type(m_lock.type);
first= NULL;
- if (check_pk && table->s->primary_key != MAX_KEY)
+ if (write_op != NDB_UPDATE && table->s->primary_key != MAX_KEY)
{
/*
* Fetch any row with colliding primary key
@@ -2019,6 +2044,11 @@ int ha_ndbcluster::peek_indexed_rows(const uchar *record,
DBUG_PRINT("info", ("skipping check for key with NULL"));
continue;
}
+ if (write_op != NDB_INSERT && !check_index_fields_in_write_set(i))
+ {
+ DBUG_PRINT("info", ("skipping check for key %u not in write_set", i));
+ continue;
+ }
NdbIndexOperation *iop;
const NDBINDEX *unique_index = m_index[i].unique_index;
key_part= key_info->key_part;
@@ -2716,7 +2746,7 @@ int ha_ndbcluster::write_row(uchar *record)
start_bulk_insert will set parameters to ensure that each
write_row is committed individually
*/
- int peek_res= peek_indexed_rows(record, TRUE);
+ int peek_res= peek_indexed_rows(record, NDB_INSERT);
if (!peek_res)
{
@@ -2765,7 +2795,7 @@ int ha_ndbcluster::write_row(uchar *record)
if (ndb->getAutoIncrementValue(m_table, g.range, auto_value, 1) == -1)
{
if (--retries &&
- ndb->getNdbError().status == NdbError::TemporaryError);
+ ndb->getNdbError().status == NdbError::TemporaryError)
{
my_sleep(retry_sleep);
continue;
@@ -2960,7 +2990,8 @@ int ha_ndbcluster::update_row(const uchar *old_data, uchar *new_data)
if (m_ignore_dup_key && (thd->lex->sql_command == SQLCOM_UPDATE ||
thd->lex->sql_command == SQLCOM_UPDATE_MULTI))
{
- int peek_res= peek_indexed_rows(new_data, pk_update);
+ NDB_WRITE_OP write_op= (pk_update) ? NDB_PK_UPDATE : NDB_UPDATE;
+ int peek_res= peek_indexed_rows(new_data, write_op);
if (!peek_res)
{
@@ -4327,7 +4358,7 @@ static int ndbcluster_update_apply_status(THD *thd, int do_update)
Ndb *ndb= thd_ndb->ndb;
NDBDICT *dict= ndb->getDictionary();
const NDBTAB *ndbtab;
- NdbTransaction *trans= thd_ndb->all ? thd_ndb->all : thd_ndb->stmt;
+ NdbTransaction *trans= thd_ndb->trans;
ndb->setDatabaseName(NDB_REP_DB);
Ndb_table_guard ndbtab_g(dict, NDB_APPLY_TABLE);
if (!(ndbtab= ndbtab_g.get_table()))
@@ -4371,10 +4402,110 @@ static int ndbcluster_update_apply_status(THD *thd, int do_update)
}
#endif /* HAVE_NDB_BINLOG */
+void ha_ndbcluster::transaction_checks(THD *thd)
+{
+ if (thd->lex->sql_command == SQLCOM_LOAD)
+ {
+ m_transaction_on= FALSE;
+ /* Would be simpler if has_transactions() didn't always say "yes" */
+ thd->transaction.all.modified_non_trans_table=
+ thd->transaction.stmt.modified_non_trans_table= TRUE;
+ }
+ else if (!thd->transaction.on)
+ m_transaction_on= FALSE;
+ else
+ m_transaction_on= thd->variables.ndb_use_transactions;
+}
+
+int ha_ndbcluster::start_statement(THD *thd,
+ Thd_ndb *thd_ndb,
+ Ndb *ndb)
+{
+ DBUG_ENTER("ha_ndbcluster::start_statement");
+ PRINT_OPTION_FLAGS(thd);
+
+ trans_register_ha(thd, FALSE, ndbcluster_hton);
+ if (!thd_ndb->trans)
+ {
+ if (thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN))
+ trans_register_ha(thd, TRUE, ndbcluster_hton);
+ DBUG_PRINT("trans",("Starting transaction"));
+ thd_ndb->trans= ndb->startTransaction();
+ if (thd_ndb->trans == NULL)
+ ERR_RETURN(ndb->getNdbError());
+ thd_ndb->init_open_tables();
+ thd_ndb->query_state&= NDB_QUERY_NORMAL;
+ thd_ndb->trans_options= 0;
+ thd_ndb->m_slow_path= FALSE;
+ if (!(thd->options & OPTION_BIN_LOG) ||
+ thd->variables.binlog_format == BINLOG_FORMAT_STMT)
+ {
+ thd_ndb->trans_options|= TNTO_NO_LOGGING;
+ thd_ndb->m_slow_path= TRUE;
+ }
+ else if (thd->slave_thread)
+ thd_ndb->m_slow_path= TRUE;
+ }
+ /*
+ If this is the start of a LOCK TABLE, a table look
+ should be taken on the table in NDB
+
+ Check if it should be read or write lock
+ */
+ if (thd->options & (OPTION_TABLE_LOCK))
+ {
+ //lockThisTable();
+ DBUG_PRINT("info", ("Locking the table..." ));
+ }
+ DBUG_RETURN(0);
+}
+
+int ha_ndbcluster::init_handler_for_statement(THD *thd, Thd_ndb *thd_ndb)
+{
+ /*
+ This is the place to make sure this handler instance
+ has a started transaction.
+
+ The transaction is started by the first handler on which
+ MySQL Server calls external lock
+
+ Other handlers in the same stmt or transaction should use
+ the same NDB transaction. This is done by setting up the m_active_trans
+ pointer to point to the NDB transaction.
+ */
+
+ DBUG_ENTER("ha_ndbcluster::init_handler_for_statement");
+ // store thread specific data first to set the right context
+ m_force_send= thd->variables.ndb_force_send;
+ m_ha_not_exact_count= !thd->variables.ndb_use_exact_count;
+ m_autoincrement_prefetch=
+ (ha_rows) thd->variables.ndb_autoincrement_prefetch_sz;
+
+ m_active_trans= thd_ndb->trans;
+ DBUG_ASSERT(m_active_trans);
+ // Start of transaction
+ m_rows_changed= 0;
+ m_ops_pending= 0;
+ m_slow_path= thd_ndb->m_slow_path;
+#ifdef HAVE_NDB_BINLOG
+ if (unlikely(m_slow_path))
+ {
+ if (m_share == ndb_apply_status_share && thd->slave_thread)
+ thd_ndb->trans_options|= TNTO_INJECTED_APPLY_STATUS;
+ }
+#endif
+ // TODO remove double pointers...
+ if (!(m_thd_ndb_share= thd_ndb->get_open_table(thd, m_table)))
+ {
+ DBUG_RETURN(1);
+ }
+ m_table_info= &m_thd_ndb_share->stat;
+ DBUG_RETURN(0);
+}
+
int ha_ndbcluster::external_lock(THD *thd, int lock_type)
{
int error=0;
- NdbTransaction* trans= NULL;
DBUG_ENTER("external_lock");
/*
@@ -4395,124 +4526,15 @@ int ha_ndbcluster::external_lock(THD *thd, int lock_type)
if (lock_type != F_UNLCK)
{
DBUG_PRINT("info", ("lock_type != F_UNLCK"));
- if (thd->lex->sql_command == SQLCOM_LOAD)
- {
- m_transaction_on= FALSE;
- /* Would be simpler if has_transactions() didn't always say "yes" */
- thd->transaction.all.modified_non_trans_table= thd->transaction.stmt.modified_non_trans_table= TRUE;
- }
- else if (!thd->transaction.on)
- m_transaction_on= FALSE;
- else
- m_transaction_on= thd->variables.ndb_use_transactions;
+ transaction_checks(thd);
if (!thd_ndb->lock_count++)
{
- PRINT_OPTION_FLAGS(thd);
- if (!(thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)))
- {
- // Autocommit transaction
- DBUG_ASSERT(!thd_ndb->stmt);
- DBUG_PRINT("trans",("Starting transaction stmt"));
-
- trans= ndb->startTransaction();
- if (trans == NULL)
- {
- thd_ndb->lock_count= 0;
- ERR_RETURN(ndb->getNdbError());
- }
- thd_ndb->init_open_tables();
- thd_ndb->stmt= trans;
- thd_ndb->query_state&= NDB_QUERY_NORMAL;
- thd_ndb->trans_options= 0;
- thd_ndb->m_slow_path= FALSE;
- if (!(thd->options & OPTION_BIN_LOG) ||
- thd->variables.binlog_format == BINLOG_FORMAT_STMT)
- {
- thd_ndb->trans_options|= TNTO_NO_LOGGING;
- thd_ndb->m_slow_path= TRUE;
- }
- else if (thd->slave_thread)
- thd_ndb->m_slow_path= TRUE;
- trans_register_ha(thd, FALSE, ndbcluster_hton);
- }
- else
- {
- if (!thd_ndb->all)
- {
- // Not autocommit transaction
- // A "master" transaction ha not been started yet
- DBUG_PRINT("trans",("starting transaction, all"));
-
- trans= ndb->startTransaction();
- if (trans == NULL)
- {
- thd_ndb->lock_count= 0;
- ERR_RETURN(ndb->getNdbError());
- }
- thd_ndb->init_open_tables();
- thd_ndb->all= trans;
- thd_ndb->query_state&= NDB_QUERY_NORMAL;
- thd_ndb->trans_options= 0;
- thd_ndb->m_slow_path= FALSE;
- if (!(thd->options & OPTION_BIN_LOG) ||
- thd->variables.binlog_format == BINLOG_FORMAT_STMT)
- {
- thd_ndb->trans_options|= TNTO_NO_LOGGING;
- thd_ndb->m_slow_path= TRUE;
- }
- else if (thd->slave_thread)
- thd_ndb->m_slow_path= TRUE;
- trans_register_ha(thd, TRUE, ndbcluster_hton);
-
- /*
- If this is the start of a LOCK TABLE, a table look
- should be taken on the table in NDB
-
- Check if it should be read or write lock
- */
- if (thd->options & (OPTION_TABLE_LOCK))
- {
- //lockThisTable();
- DBUG_PRINT("info", ("Locking the table..." ));
- }
-
- }
- }
- }
- /*
- This is the place to make sure this handler instance
- has a started transaction.
-
- The transaction is started by the first handler on which
- MySQL Server calls external lock
-
- Other handlers in the same stmt or transaction should use
- the same NDB transaction. This is done by setting up the m_active_trans
- pointer to point to the NDB transaction.
- */
-
- // store thread specific data first to set the right context
- m_force_send= thd->variables.ndb_force_send;
- m_ha_not_exact_count= !thd->variables.ndb_use_exact_count;
- m_autoincrement_prefetch=
- (ha_rows) thd->variables.ndb_autoincrement_prefetch_sz;
-
- m_active_trans= thd_ndb->all ? thd_ndb->all : thd_ndb->stmt;
- DBUG_ASSERT(m_active_trans);
- // Start of transaction
- m_rows_changed= 0;
- m_ops_pending= 0;
- m_slow_path= thd_ndb->m_slow_path;
-#ifdef HAVE_NDB_BINLOG
- if (unlikely(m_slow_path))
- {
- if (m_share == ndb_apply_status_share && thd->slave_thread)
- thd_ndb->trans_options|= TNTO_INJECTED_APPLY_STATUS;
+ if ((error= start_statement(thd, thd_ndb, ndb)))
+ goto error;
}
-#endif
- // TODO remove double pointers...
- m_thd_ndb_share= thd_ndb->get_open_table(thd, m_table);
- m_table_info= &m_thd_ndb_share->stat;
+ if ((error= init_handler_for_statement(thd, thd_ndb)))
+ goto error;
+ DBUG_RETURN(0);
}
else
{
@@ -4540,16 +4562,19 @@ int ha_ndbcluster::external_lock(THD *thd, int lock_type)
DBUG_PRINT("trans", ("Last external_lock"));
PRINT_OPTION_FLAGS(thd);
- if (thd_ndb->stmt)
+ if (!(thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)))
{
- /*
- Unlock is done without a transaction commit / rollback.
- This happens if the thread didn't update any rows
- We must in this case close the transaction to release resources
- */
- DBUG_PRINT("trans",("ending non-updating transaction"));
- ndb->closeTransaction(m_active_trans);
- thd_ndb->stmt= NULL;
+ if (thd_ndb->trans)
+ {
+ /*
+ Unlock is done without a transaction commit / rollback.
+ This happens if the thread didn't update any rows
+ We must in this case close the transaction to release resources
+ */
+ DBUG_PRINT("trans",("ending non-updating transaction"));
+ ndb->closeTransaction(thd_ndb->trans);
+ thd_ndb->trans= NULL;
+ }
}
}
m_table_info= NULL;
@@ -4578,7 +4603,10 @@ int ha_ndbcluster::external_lock(THD *thd, int lock_type)
if (m_ops_pending)
DBUG_PRINT("warning", ("ops_pending != 0L"));
m_ops_pending= 0;
+ DBUG_RETURN(0);
}
+error:
+ thd_ndb->lock_count--;
DBUG_RETURN(error);
}
@@ -4610,25 +4638,20 @@ int ha_ndbcluster::start_stmt(THD *thd, thr_lock_type lock_type)
{
int error=0;
DBUG_ENTER("start_stmt");
- PRINT_OPTION_FLAGS(thd);
Thd_ndb *thd_ndb= get_thd_ndb(thd);
- NdbTransaction *trans= (thd_ndb->stmt)?thd_ndb->stmt:thd_ndb->all;
- if (!trans){
+ transaction_checks(thd);
+ if (!thd_ndb->start_stmt_count++)
+ {
Ndb *ndb= thd_ndb->ndb;
- DBUG_PRINT("trans",("Starting transaction stmt"));
- trans= ndb->startTransaction();
- if (trans == NULL)
- ERR_RETURN(ndb->getNdbError());
- no_uncommitted_rows_reset(thd);
- thd_ndb->stmt= trans;
- thd_ndb->query_state&= NDB_QUERY_NORMAL;
- trans_register_ha(thd, FALSE, ndbcluster_hton);
+ if ((error= start_statement(thd, thd_ndb, ndb)))
+ goto error;
}
- m_active_trans= trans;
- // Start of statement
- m_ops_pending= 0;
-
+ if ((error= init_handler_for_statement(thd, thd_ndb)))
+ goto error;
+ DBUG_RETURN(0);
+error:
+ thd_ndb->start_stmt_count--;
DBUG_RETURN(error);
}
@@ -4642,15 +4665,29 @@ static int ndbcluster_commit(handlerton *hton, THD *thd, bool all)
int res= 0;
Thd_ndb *thd_ndb= get_thd_ndb(thd);
Ndb *ndb= thd_ndb->ndb;
- NdbTransaction *trans= all ? thd_ndb->all : thd_ndb->stmt;
+ NdbTransaction *trans= thd_ndb->trans;
DBUG_ENTER("ndbcluster_commit");
- DBUG_PRINT("transaction",("%s",
- trans == thd_ndb->stmt ?
- "stmt" : "all"));
DBUG_ASSERT(ndb);
- if (trans == NULL)
+ PRINT_OPTION_FLAGS(thd);
+ DBUG_PRINT("enter", ("Commit %s", (all ? "all" : "stmt")));
+ thd_ndb->start_stmt_count= 0;
+ if (trans == NULL || (!all &&
+ thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)))
+ {
+ /*
+ An odditity in the handler interface is that commit on handlerton
+ is called to indicate end of statement only in cases where
+ autocommit isn't used and the all flag isn't set.
+
+ We also leave quickly when a transaction haven't even been started,
+ in this case we are safe that no clean up is needed. In this case
+ the MySQL Server could handle the query without contacting the
+ NDB kernel.
+ */
+ DBUG_PRINT("info", ("Commit before start or end-of-statement only"));
DBUG_RETURN(0);
+ }
#ifdef HAVE_NDB_BINLOG
if (unlikely(thd_ndb->m_slow_path))
@@ -4671,11 +4708,7 @@ static int ndbcluster_commit(handlerton *hton, THD *thd, bool all)
ndbcluster_print_error(res, error_op);
}
ndb->closeTransaction(trans);
-
- if (all)
- thd_ndb->all= NULL;
- else
- thd_ndb->stmt= NULL;
+ thd_ndb->trans= NULL;
/* Clear commit_count for tables changed by transaction */
NDB_SHARE* share;
@@ -4704,13 +4737,18 @@ static int ndbcluster_rollback(handlerton *hton, THD *thd, bool all)
int res= 0;
Thd_ndb *thd_ndb= get_thd_ndb(thd);
Ndb *ndb= thd_ndb->ndb;
- NdbTransaction *trans= all ? thd_ndb->all : thd_ndb->stmt;
+ NdbTransaction *trans= thd_ndb->trans;
DBUG_ENTER("ndbcluster_rollback");
- DBUG_PRINT("transaction",("%s",
- trans == thd_ndb->stmt ?
- "stmt" : "all"));
- DBUG_ASSERT(ndb && trans);
+ DBUG_ASSERT(ndb);
+ thd_ndb->start_stmt_count= 0;
+ if (trans == NULL || (!all &&
+ thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)))
+ {
+ /* Ignore end-of-statement until real rollback or commit is called */
+ DBUG_PRINT("info", ("Rollback before start or end-of-statement only"));
+ DBUG_RETURN(0);
+ }
if (trans->execute(NdbTransaction::Rollback) != 0)
{
@@ -4722,11 +4760,7 @@ static int ndbcluster_rollback(handlerton *hton, THD *thd, bool all)
ndbcluster_print_error(res, error_op);
}
ndb->closeTransaction(trans);
-
- if (all)
- thd_ndb->all= NULL;
- else
- thd_ndb->stmt= NULL;
+ thd_ndb->trans= NULL;
/* Clear list of tables changed by transaction */
thd_ndb->changed_tables.empty();
@@ -6155,7 +6189,7 @@ void ha_ndbcluster::get_auto_increment(ulonglong offset, ulonglong increment,
ndb->getAutoIncrementValue(m_table, g.range, auto_value, cache_size, increment, offset))
{
if (--retries &&
- ndb->getNdbError().status == NdbError::TemporaryError);
+ ndb->getNdbError().status == NdbError::TemporaryError)
{
my_sleep(retry_sleep);
continue;
@@ -9039,6 +9073,7 @@ pthread_handler_t ndb_util_thread_func(void *arg __attribute__((unused)))
thd->thread_stack= (char*)&thd; /* remember where our stack is */
if (thd->store_globals())
goto ndb_util_thread_fail;
+ lex_start(thd);
thd->init_for_queries();
thd->version=refresh_version;
thd->main_security_ctx.host_or_ip= "";
diff --git a/sql/ha_ndbcluster.h b/sql/ha_ndbcluster.h
index a6f992226c2..fd337303853 100644
--- a/sql/ha_ndbcluster.h
+++ b/sql/ha_ndbcluster.h
@@ -81,6 +81,12 @@ typedef struct ndb_index_data {
uint index_stat_query_count;
} NDB_INDEX_DATA;
+typedef enum ndb_write_op {
+ NDB_INSERT = 0,
+ NDB_UPDATE = 1,
+ NDB_PK_UPDATE = 2
+} NDB_WRITE_OP;
+
typedef union { const NdbRecAttr *rec; NdbBlob *blob; void *ptr; } NdbValue;
int get_ndb_blobs_value(TABLE* table, NdbValue* value_array,
@@ -204,8 +210,8 @@ class Thd_ndb
Ndb *ndb;
ulong count;
uint lock_count;
- NdbTransaction *all;
- NdbTransaction *stmt;
+ uint start_stmt_count;
+ NdbTransaction *trans;
bool m_error;
bool m_slow_path;
int m_error_code;
@@ -438,7 +444,7 @@ private:
const NdbOperation *first,
const NdbOperation *last,
uint errcode);
- int peek_indexed_rows(const uchar *record, bool check_pk);
+ int peek_indexed_rows(const uchar *record, NDB_WRITE_OP write_op);
int fetch_next(NdbScanOperation* op);
int next_result(uchar *buf);
int define_read_attrs(uchar* buf, NdbOperation* op);
@@ -463,6 +469,7 @@ private:
friend int g_get_ndb_blobs_value(NdbBlob *ndb_blob, void *arg);
int set_primary_key(NdbOperation *op, const uchar *key);
int set_primary_key_from_record(NdbOperation *op, const uchar *record);
+ bool check_index_fields_in_write_set(uint keyno);
int set_index_key_from_record(NdbOperation *op, const uchar *record,
uint keyno);
int set_bounds(NdbIndexScanOperation*, uint inx, bool rir,
@@ -496,6 +503,10 @@ private:
friend int execute_no_commit(ha_ndbcluster*, NdbTransaction*, bool);
friend int execute_no_commit_ie(ha_ndbcluster*, NdbTransaction*, bool);
+ void transaction_checks(THD *thd);
+ int start_statement(THD *thd, Thd_ndb *thd_ndb, Ndb* ndb);
+ int init_handler_for_statement(THD *thd, Thd_ndb *thd_ndb);
+
NdbTransaction *m_active_trans;
NdbScanOperation *m_active_cursor;
const NdbDictionary::Table *m_table;
diff --git a/sql/ha_ndbcluster_binlog.cc b/sql/ha_ndbcluster_binlog.cc
index 5d5c8a26447..be75eff2575 100644
--- a/sql/ha_ndbcluster_binlog.cc
+++ b/sql/ha_ndbcluster_binlog.cc
@@ -259,7 +259,7 @@ static void run_query(THD *thd, char *buf, char *end,
DBUG_PRINT("query", ("%s", thd->query));
mysql_parse(thd, thd->query, thd->query_length, &found_semicolon);
- if (no_print_error && thd->query_error)
+ if (no_print_error && thd->is_slave_error)
{
int i;
Thd_ndb *thd_ndb= get_thd_ndb(thd);
@@ -271,7 +271,7 @@ static void run_query(THD *thd, char *buf, char *end,
sql_print_error("NDB: %s: error %s %d(ndb: %d) %d %d",
buf, thd->net.last_error, thd->net.last_errno,
thd_ndb->m_error_code,
- thd->net.report_error, thd->query_error);
+ (int) thd->is_error(), thd->is_slave_error);
}
thd->options= save_thd_options;
@@ -321,7 +321,7 @@ ndbcluster_binlog_open_table(THD *thd, NDB_SHARE *share,
DBUG_ENTER("ndbcluster_binlog_open_table");
safe_mutex_assert_owner(&LOCK_open);
- init_tmp_table_share(table_share, share->db, 0, share->table_name,
+ init_tmp_table_share(thd, table_share, share->db, 0, share->table_name,
share->key);
if ((error= open_table_def(thd, table_share, 0)))
{
@@ -3621,6 +3621,7 @@ pthread_handler_t ndb_binlog_thread_func(void *arg)
pthread_exit(0);
DBUG_RETURN(NULL);
}
+ lex_start(thd);
thd->init_for_queries();
thd->command= COM_DAEMON;
diff --git a/sql/ha_ndbcluster_cond.cc b/sql/ha_ndbcluster_cond.cc
index 94342c6d2ad..d8dff3c7e2f 100644
--- a/sql/ha_ndbcluster_cond.cc
+++ b/sql/ha_ndbcluster_cond.cc
@@ -1338,9 +1338,23 @@ ha_ndbcluster_cond::generate_scan_filter(NdbScanOperation *op)
if (m_cond_stack)
{
- NdbScanFilter filter(op);
+ NdbScanFilter filter(op, false); // don't abort on too large
- DBUG_RETURN(generate_scan_filter_from_cond(filter));
+ int ret=generate_scan_filter_from_cond(filter);
+ if (ret != 0)
+ {
+ const NdbError& err=filter.getNdbError();
+ if (err.code == NdbScanFilter::FilterTooLarge)
+ {
+ // err.message has static storage
+ DBUG_PRINT("info", ("%s", err.message));
+ push_warning(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
+ err.code, err.message);
+ ret=0;
+ }
+ }
+ if (ret != 0)
+ DBUG_RETURN(ret);
}
else
{
@@ -1391,7 +1405,7 @@ int ha_ndbcluster_cond::generate_scan_filter_from_key(NdbScanOperation *op,
{
KEY_PART_INFO* key_part= key_info->key_part;
KEY_PART_INFO* end= key_part+key_info->key_parts;
- NdbScanFilter filter(op);
+ NdbScanFilter filter(op, true); // abort on too large
int res;
DBUG_ENTER("generate_scan_filter_from_key");
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc
index a57f1d24758..a67078dc26c 100644
--- a/sql/ha_partition.cc
+++ b/sql/ha_partition.cc
@@ -1531,6 +1531,14 @@ int ha_partition::copy_partitions(ulonglong *copied, ulonglong *deleted)
longlong func_value;
DBUG_ENTER("ha_partition::copy_partitions");
+ if (m_part_info->linear_hash_ind)
+ {
+ if (m_part_info->part_type == HASH_PARTITION)
+ set_linear_hash_mask(m_part_info, m_part_info->no_parts);
+ else
+ set_linear_hash_mask(m_part_info, m_part_info->no_subparts);
+ }
+
while (reorg_part < m_reorged_parts)
{
handler *file= m_reorged_file[reorg_part];
@@ -1598,7 +1606,12 @@ error:
void ha_partition::update_create_info(HA_CREATE_INFO *create_info)
{
- m_file[0]->update_create_info(create_info);
+ info(HA_STATUS_AUTO);
+
+ if (!(create_info->used_fields & HA_CREATE_USED_AUTO))
+ create_info->auto_increment_value= stats.auto_increment_value;
+
+ create_info->data_file_name= create_info->index_file_name = NULL;
return;
}
@@ -2678,7 +2691,8 @@ int ha_partition::write_row(uchar * buf)
uint32 part_id;
int error;
longlong func_value;
- bool autoincrement_lock= false;
+ bool autoincrement_lock= FALSE;
+ my_bitmap_map *old_map;
#ifdef NOT_NEEDED
uchar *rec0= m_rec0;
#endif
@@ -2705,8 +2719,17 @@ int ha_partition::write_row(uchar * buf)
use autoincrement_lock variable to avoid unnecessary locks.
Probably not an ideal solution.
*/
- autoincrement_lock= true;
- pthread_mutex_lock(&table_share->mutex);
+ if (table_share->tmp_table == NO_TMP_TABLE)
+ {
+ /*
+ Bug#30878 crash when alter table from non partitioned table
+ to partitioned.
+ Checking if tmp table then there is no need to lock,
+ and the table_share->mutex may not be initialised.
+ */
+ autoincrement_lock= TRUE;
+ pthread_mutex_lock(&table_share->mutex);
+ }
error= update_auto_increment();
/*
@@ -2715,10 +2738,10 @@ int ha_partition::write_row(uchar * buf)
the correct partition. We must check and fail if neccessary.
*/
if (error)
- DBUG_RETURN(error);
+ goto exit;
}
- my_bitmap_map *old_map= dbug_tmp_use_all_columns(table, table->read_set);
+ old_map= dbug_tmp_use_all_columns(table, table->read_set);
#ifdef NOT_NEEDED
if (likely(buf == rec0))
#endif
@@ -2783,16 +2806,28 @@ exit:
int ha_partition::update_row(const uchar *old_data, uchar *new_data)
{
uint32 new_part_id, old_part_id;
- int error;
+ int error= 0;
longlong func_value;
+ timestamp_auto_set_type orig_timestamp_type= table->timestamp_field_type;
DBUG_ENTER("ha_partition::update_row");
+ /*
+ We need to set timestamp field once before we calculate
+ the partition. Then we disable timestamp calculations
+ inside m_file[*]->update_row() methods
+ */
+ if (orig_timestamp_type & TIMESTAMP_AUTO_SET_ON_UPDATE)
+ {
+ table->timestamp_field->set_time();
+ table->timestamp_field_type= TIMESTAMP_NO_AUTO_SET;
+ }
+
if ((error= get_parts_for_update(old_data, new_data, table->record[0],
m_part_info, &old_part_id, &new_part_id,
&func_value)))
{
m_part_info->err_value= func_value;
- DBUG_RETURN(error);
+ goto exit;
}
/*
@@ -2804,23 +2839,27 @@ int ha_partition::update_row(const uchar *old_data, uchar *new_data)
if (new_part_id == old_part_id)
{
DBUG_PRINT("info", ("Update in partition %d", new_part_id));
- DBUG_RETURN(m_file[new_part_id]->update_row(old_data, new_data));
+ error= m_file[new_part_id]->update_row(old_data, new_data);
+ goto exit;
}
else
{
DBUG_PRINT("info", ("Update from partition %d to partition %d",
old_part_id, new_part_id));
if ((error= m_file[new_part_id]->write_row(new_data)))
- DBUG_RETURN(error);
+ goto exit;
if ((error= m_file[old_part_id]->delete_row(old_data)))
{
#ifdef IN_THE_FUTURE
(void) m_file[new_part_id]->delete_last_inserted_row(new_data);
#endif
- DBUG_RETURN(error);
+ goto exit;
}
}
- DBUG_RETURN(0);
+
+exit:
+ table->timestamp_field_type= orig_timestamp_type;
+ DBUG_RETURN(error);
}
@@ -2924,12 +2963,7 @@ void ha_partition::start_bulk_insert(ha_rows rows)
handler **file;
DBUG_ENTER("ha_partition::start_bulk_insert");
- if (!rows)
- {
- /* Avoid allocation big caches in all underlaying handlers */
- DBUG_VOID_RETURN;
- }
- rows= rows/m_tot_parts + 1;
+ rows= rows ? rows/m_tot_parts + 1 : 0;
file= m_file;
do
{
@@ -3391,6 +3425,25 @@ int ha_partition::index_init(uint inx, bool sorted)
*/
if (m_lock_type == F_WRLCK)
bitmap_union(table->read_set, &m_part_info->full_part_field_set);
+ else if (sorted)
+ {
+ /*
+ An ordered scan is requested. We must make sure all fields of the
+ used index are in the read set, as partitioning requires them for
+ sorting (see ha_partition::handle_ordered_index_scan).
+
+ The SQL layer may request an ordered index scan without having index
+ fields in the read set when
+ - it needs to do an ordered scan over an index prefix.
+ - it evaluates ORDER BY with SELECT COUNT(*) FROM t1.
+
+ TODO: handle COUNT(*) queries via unordered scan.
+ */
+ uint i;
+ for (i= 0; i < m_curr_key_info->key_parts; i++)
+ bitmap_set_bit(table->read_set,
+ m_curr_key_info->key_part[i].field->field_index);
+ }
file= m_file;
do
{
@@ -3945,7 +3998,8 @@ int ha_partition::handle_unordered_next(uchar *buf, bool is_next_same)
}
else if (!(error= file->index_next(buf)))
{
- if (compare_key(end_range) <= 0)
+ if (!(file->table_flags() & HA_READ_ORDER) ||
+ compare_key(end_range) <= 0)
{
m_last_part= m_part_spec.start_part;
DBUG_RETURN(0); // Row was in range
@@ -4022,7 +4076,8 @@ int ha_partition::handle_unordered_scan_next_partition(uchar * buf)
}
if (!error)
{
- if (compare_key(end_range) <= 0)
+ if (!(file->table_flags() & HA_READ_ORDER) ||
+ compare_key(end_range) <= 0)
{
m_last_part= i;
DBUG_RETURN(0);
@@ -4540,6 +4595,8 @@ void ha_partition::get_dynamic_partition_info(PARTITION_INFO *stat_info,
4) Parameters only used by temporary tables for query processing
5) Parameters only used by MyISAM internally
6) Parameters not used at all
+ 7) Parameters only used by federated tables for query processing
+ 8) Parameters only used by NDB
The partition handler need to handle category 1), 2) and 3).
@@ -4809,6 +4866,15 @@ void ha_partition::get_dynamic_partition_info(PARTITION_INFO *stat_info,
HA_EXTRA_INSERT_WITH_UPDATE:
Inform handler that an "INSERT...ON DUPLICATE KEY UPDATE" will be
executed. This condition is unset by HA_EXTRA_NO_IGNORE_DUP_KEY.
+
+ 8) Parameters only used by NDB
+ ------------------------------
+ HA_EXTRA_DELETE_CANNOT_BATCH:
+ HA_EXTRA_UPDATE_CANNOT_BATCH:
+ Inform handler that delete_row()/update_row() cannot batch deletes/updates
+ and should perform them immediately. This may be needed when table has
+ AFTER DELETE/UPDATE triggers which access to subject table.
+ These flags are reset by the handler::extra(HA_EXTRA_RESET) call.
*/
int ha_partition::extra(enum ha_extra_function operation)
@@ -4894,6 +4960,13 @@ int ha_partition::extra(enum ha_extra_function operation)
/* Category 7), used by federated handlers */
case HA_EXTRA_INSERT_WITH_UPDATE:
DBUG_RETURN(loop_extra(operation));
+ /* Category 8) Parameters only used by NDB */
+ case HA_EXTRA_DELETE_CANNOT_BATCH:
+ case HA_EXTRA_UPDATE_CANNOT_BATCH:
+ {
+ /* Currently only NDB use the *_CANNOT_BATCH */
+ break;
+ }
default:
{
/* Temporary crash to discover what is wrong */
diff --git a/sql/handler.cc b/sql/handler.cc
index 2fe04c5dba3..bb804768326 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -1412,6 +1412,36 @@ static const char *check_lowercase_names(handler *file, const char *path,
}
+/**
+ An interceptor to hijack the text of the error message without
+ setting an error in the thread. We need the text to present it
+ in the form of a warning to the user.
+*/
+
+struct Ha_delete_table_error_handler: public Internal_error_handler
+{
+public:
+ virtual bool handle_error(uint sql_errno,
+ const char *message,
+ MYSQL_ERROR::enum_warning_level level,
+ THD *thd);
+ char buff[MYSQL_ERRMSG_SIZE];
+};
+
+
+bool
+Ha_delete_table_error_handler::
+handle_error(uint sql_errno,
+ const char *message,
+ MYSQL_ERROR::enum_warning_level level,
+ THD *thd)
+{
+ /* Grab the error message */
+ strmake(buff, message, sizeof(buff)-1);
+ return TRUE;
+}
+
+
/** @brief
This should return ENOENT if the file doesn't exists.
The .frm file will be deleted only if we return 0 or ENOENT
@@ -1440,23 +1470,11 @@ int ha_delete_table(THD *thd, handlerton *table_type, const char *path,
{
/*
Because file->print_error() use my_error() to generate the error message
- we must store the error state in thd, reset it and restore it to
- be able to get hold of the error message.
- (We should in the future either rewrite handler::print_error() or make
- a nice method of this.
+ we use an internal error handler to intercept it and store the text
+ in a temporary buffer. Later the message will be presented to user
+ as a warning.
*/
- bool query_error= thd->query_error;
- sp_rcontext *spcont= thd->spcont;
- SELECT_LEX *current_select= thd->lex->current_select;
- char buff[sizeof(thd->net.last_error)];
- char new_error[sizeof(thd->net.last_error)];
- int last_errno= thd->net.last_errno;
-
- strmake(buff, thd->net.last_error, sizeof(buff)-1);
- thd->query_error= 0;
- thd->spcont= NULL;
- thd->lex->current_select= 0;
- thd->net.last_error[0]= 0;
+ Ha_delete_table_error_handler ha_delete_table_error_handler;
/* Fill up strucutures that print_error may need */
dummy_share.path.str= (char*) path;
@@ -1469,16 +1487,18 @@ int ha_delete_table(THD *thd, handlerton *table_type, const char *path,
file->table_share= &dummy_share;
file->table= &dummy_table;
+
+ thd->push_internal_handler(&ha_delete_table_error_handler);
file->print_error(error, 0);
- strmake(new_error, thd->net.last_error, sizeof(buff)-1);
- /* restore thd */
- thd->query_error= query_error;
- thd->spcont= spcont;
- thd->lex->current_select= current_select;
- thd->net.last_errno= last_errno;
- strmake(thd->net.last_error, buff, sizeof(buff)-1);
- push_warning(thd, MYSQL_ERROR::WARN_LEVEL_ERROR, error, new_error);
+ thd->pop_internal_handler();
+
+ /*
+ XXX: should we convert *all* errors to warnings here?
+ What if the error is fatal?
+ */
+ push_warning(thd, MYSQL_ERROR::WARN_LEVEL_ERROR, error,
+ ha_delete_table_error_handler.buff);
}
delete file;
DBUG_RETURN(error);
@@ -2201,7 +2221,7 @@ void handler::print_error(int error, myf errflag)
case HA_ERR_NO_SUCH_TABLE:
my_error(ER_NO_SUCH_TABLE, MYF(0), table_share->db.str,
table_share->table_name.str);
- break;
+ DBUG_VOID_RETURN;
case HA_ERR_RBR_LOGGING_FAILED:
textno= ER_BINLOG_ROW_LOGGING_FAILED;
break;
@@ -2520,15 +2540,56 @@ int ha_enable_transaction(THD *thd, bool on)
int handler::index_next_same(uchar *buf, const uchar *key, uint keylen)
{
int error;
+ DBUG_ENTER("index_next_same");
if (!(error=index_next(buf)))
{
+ my_ptrdiff_t ptrdiff= buf - table->record[0];
+ uchar *save_record_0;
+ KEY *key_info;
+ KEY_PART_INFO *key_part;
+ KEY_PART_INFO *key_part_end;
+ LINT_INIT(save_record_0);
+ LINT_INIT(key_info);
+ LINT_INIT(key_part);
+ LINT_INIT(key_part_end);
+
+ /*
+ key_cmp_if_same() compares table->record[0] against 'key'.
+ In parts it uses table->record[0] directly, in parts it uses
+ field objects with their local pointers into table->record[0].
+ If 'buf' is distinct from table->record[0], we need to move
+ all record references. This is table->record[0] itself and
+ the field pointers of the fields used in this key.
+ */
+ if (ptrdiff)
+ {
+ save_record_0= table->record[0];
+ table->record[0]= buf;
+ key_info= table->key_info + active_index;
+ key_part= key_info->key_part;
+ key_part_end= key_part + key_info->key_parts;
+ for (; key_part < key_part_end; key_part++)
+ {
+ DBUG_ASSERT(key_part->field);
+ key_part->field->move_field_offset(ptrdiff);
+ }
+ }
+
if (key_cmp_if_same(table, key, active_index, keylen))
{
table->status=STATUS_NOT_FOUND;
error=HA_ERR_END_OF_FILE;
}
+
+ /* Move back if necessary. */
+ if (ptrdiff)
+ {
+ table->record[0]= save_record_0;
+ for (key_part= key_info->key_part; key_part < key_part_end; key_part++)
+ key_part->field->move_field_offset(-ptrdiff);
+ }
}
- return error;
+ DBUG_RETURN(error);
}
@@ -2580,7 +2641,7 @@ int ha_create_table(THD *thd, const char *path,
TABLE_SHARE share;
DBUG_ENTER("ha_create_table");
- init_tmp_table_share(&share, db, 0, table_name, path);
+ init_tmp_table_share(thd, &share, db, 0, table_name, path);
if (open_table_def(thd, &share, 0) ||
open_table_from_share(thd, &share, "", 0, (uint) READ_ALL, 0, &table,
TRUE))
@@ -2639,15 +2700,14 @@ int ha_create_table_from_engine(THD* thd, const char *db, const char *name)
frmblob and frmlen are set, write the frm to disk
*/
- (void)strxnmov(path,FN_REFLEN-1,mysql_data_home,FN_ROOTDIR,
- db,FN_ROOTDIR,name,NullS);
+ build_table_filename(path, FN_REFLEN-1, db, name, "", 0);
// Save the frm file
error= writefrm(path, frmblob, frmlen);
my_free(frmblob, MYF(0));
if (error)
DBUG_RETURN(2);
- init_tmp_table_share(&share, db, 0, name, path);
+ init_tmp_table_share(thd, &share, db, 0, name, path);
if (open_table_def(thd, &share, 0))
{
DBUG_RETURN(3);
@@ -3144,6 +3204,8 @@ int handler::read_multi_range_next(KEY_MULTI_RANGE **found_range_p)
}
else
{
+ if (was_semi_consistent_read())
+ goto scan_it_again;
/*
We need to set this for the last range only, but checking this
condition is more expensive than just setting the result code.
@@ -3151,10 +3213,10 @@ int handler::read_multi_range_next(KEY_MULTI_RANGE **found_range_p)
result= HA_ERR_END_OF_FILE;
}
+ multi_range_curr++;
+scan_it_again:
/* Try the next range(s) until one matches a record. */
- for (multi_range_curr++;
- multi_range_curr < multi_range_end;
- multi_range_curr++)
+ for (; multi_range_curr < multi_range_end; multi_range_curr++)
{
result= read_range_first(multi_range_curr->start_key.keypart_map ?
&multi_range_curr->start_key : 0,
@@ -3654,11 +3716,12 @@ int handler::ha_reset()
int handler::ha_write_row(uchar *buf)
{
int error;
+ DBUG_ENTER("handler::ha_write_row");
if (unlikely(error= write_row(buf)))
- return error;
+ DBUG_RETURN(error);
if (unlikely(error= binlog_log_row<Write_rows_log_event>(table, 0, buf)))
- return error;
- return 0;
+ DBUG_RETURN(error); /* purecov: inspected */
+ DBUG_RETURN(0);
}
diff --git a/sql/handler.h b/sql/handler.h
index d9533739af2..707334ccecd 100644
--- a/sql/handler.h
+++ b/sql/handler.h
@@ -1642,13 +1642,22 @@ public:
virtual int repair_partitions(THD *thd)
{ return HA_ERR_WRONG_COMMAND; }
- /* lock_count() can be more than one if the table is a MERGE */
+ /**
+ @note lock_count() can return > 1 if the table is MERGE or partitioned.
+ */
virtual uint lock_count(void) const { return 1; }
/**
Is not invoked for non-transactional temporary tables.
+ @note store_lock() can return more than one lock if the table is MERGE
+ or partitioned.
+
@note that one can NOT rely on table->in_use in store_lock(). It may
refer to a different thread if called from mysql_lock_abort_for_thread().
+
+ @note If the table is MERGE, store_lock() can return less locks
+ than lock_count() claimed. This can happen when the MERGE children
+ are not attached when this is called from another thread.
*/
virtual THR_LOCK_DATA **store_lock(THD *thd,
THR_LOCK_DATA **to,
diff --git a/sql/item.cc b/sql/item.cc
index d8080d62c39..4d579597d21 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -272,6 +272,7 @@ my_decimal *Item::val_decimal_from_date(my_decimal *decimal_value)
if (get_date(&ltime, TIME_FUZZY_DATE))
{
my_decimal_set_zero(decimal_value);
+ null_value= 1; // set NULL, stop processing
return 0;
}
return date2my_decimal(&ltime, decimal_value);
@@ -966,10 +967,13 @@ int Item::save_in_field_no_warnings(Field *field, bool no_conversions)
THD *thd= table->in_use;
enum_check_fields tmp= thd->count_cuted_fields;
my_bitmap_map *old_map= dbug_tmp_use_all_columns(table, table->write_set);
+ ulong sql_mode= thd->variables.sql_mode;
+ thd->variables.sql_mode&= ~(MODE_NO_ZERO_IN_DATE | MODE_NO_ZERO_DATE);
thd->count_cuted_fields= CHECK_FIELD_IGNORE;
res= save_in_field(field, no_conversions);
thd->count_cuted_fields= tmp;
dbug_tmp_restore_column_map(table->write_set, old_map);
+ thd->variables.sql_mode= sql_mode;
return res;
}
@@ -1236,7 +1240,17 @@ bool Item_name_const::is_null()
Item::Type Item_name_const::type() const
{
- return value_item->type();
+ /*
+ As
+ 1. one can try to create the Item_name_const passing non-constant
+ arguments, although it's incorrect and
+ 2. the type() method can be called before the fix_fields() to get
+ type information for a further type cast, e.g.
+ if (item->type() == FIELD_ITEM)
+ ((Item_field *) item)->...
+ we return NULL_ITEM in the case to avoid wrong casting.
+ */
+ return valid_args ? value_item->type() : NULL_ITEM;
}
@@ -1248,14 +1262,14 @@ bool Item_name_const::fix_fields(THD *thd, Item **ref)
s.length(0);
if (value_item->fix_fields(thd, &value_item) ||
- name_item->fix_fields(thd, &name_item))
- return TRUE;
- if (!(value_item->const_item() && name_item->const_item()))
+ name_item->fix_fields(thd, &name_item) ||
+ !value_item->const_item() ||
+ !name_item->const_item() ||
+ !(item_name= name_item->val_str(&s))) // Can't have a NULL name
+ {
+ my_error(ER_RESERVED_SYNTAX, MYF(0), "NAME_CONST");
return TRUE;
-
- if (!(item_name= name_item->val_str(&s)))
- return TRUE; /* Can't have a NULL name */
-
+ }
set_name(item_name->ptr(), (uint) item_name->length(), system_charset_info);
max_length= value_item->max_length;
decimals= value_item->decimals;
@@ -3345,7 +3359,7 @@ static Item** find_field_in_group_list(Item *find_item, ORDER *group_list)
if (cur_field->table_name && table_name)
{
/* If field_name is qualified by a table name. */
- if (strcmp(cur_field->table_name, table_name))
+ if (my_strcasecmp(table_alias_charset, cur_field->table_name, table_name))
/* Same field names, different tables. */
return NULL;
@@ -3679,7 +3693,7 @@ Item_field::fix_outer_field(THD *thd, Field **from_field, Item **reference)
}
/* Search in SELECT and GROUP lists of the outer select. */
- if (outer_context->resolve_in_select_list)
+ if (place != IN_WHERE && place != IN_ON)
{
if (!(ref= resolve_ref_in_select_and_group(thd, this, select)))
return -1; /* Some error occurred (e.g. ambiguous names). */
@@ -3859,7 +3873,9 @@ bool Item_field::fix_fields(THD *thd, Item **reference)
context->first_name_resolution_table,
context->last_name_resolution_table,
reference,
- IGNORE_EXCEPT_NON_UNIQUE,
+ thd->lex->use_only_table_context ?
+ REPORT_ALL_ERRORS :
+ IGNORE_EXCEPT_NON_UNIQUE,
!any_privileges,
TRUE)) ==
not_found_field)
@@ -4313,6 +4329,47 @@ bool Item::is_datetime()
}
+String *Item::check_well_formed_result(String *str, bool send_error)
+{
+ /* Check whether we got a well-formed string */
+ CHARSET_INFO *cs= str->charset();
+ int well_formed_error;
+ uint wlen= cs->cset->well_formed_len(cs,
+ str->ptr(), str->ptr() + str->length(),
+ str->length(), &well_formed_error);
+ if (wlen < str->length())
+ {
+ THD *thd= current_thd;
+ char hexbuf[7];
+ enum MYSQL_ERROR::enum_warning_level level;
+ uint diff= str->length() - wlen;
+ set_if_smaller(diff, 3);
+ octet2hex(hexbuf, str->ptr() + wlen, diff);
+ if (send_error)
+ {
+ my_error(ER_INVALID_CHARACTER_STRING, MYF(0),
+ cs->csname, hexbuf);
+ return 0;
+ }
+ if ((thd->variables.sql_mode &
+ (MODE_STRICT_TRANS_TABLES | MODE_STRICT_ALL_TABLES)))
+ {
+ level= MYSQL_ERROR::WARN_LEVEL_ERROR;
+ null_value= 1;
+ str= 0;
+ }
+ else
+ {
+ level= MYSQL_ERROR::WARN_LEVEL_WARN;
+ str->length(wlen);
+ }
+ push_warning_printf(thd, level, ER_INVALID_CHARACTER_STRING,
+ ER(ER_INVALID_CHARACTER_STRING), cs->csname, hexbuf);
+ }
+ return str;
+}
+
+
/*
Create a field to hold a string value from an item
@@ -4456,12 +4513,11 @@ Field *Item::tmp_table_field_from_field_type(TABLE *table, bool fixed_length)
else
field= new Field_blob(max_length, maybe_null, name, collation.collation);
break; // Blob handled outside of case
+#ifdef HAVE_SPATIAL
case MYSQL_TYPE_GEOMETRY:
- field= new Field_geom(max_length, maybe_null, name, table->s,
- (Field::geometry_type)
- ((type() == Item::TYPE_HOLDER) ?
- ((Item_type_holder *)this)->get_geometry_type() :
- ((Item_geometry_func *)this)->get_geometry_type()));
+ field= new Field_geom(max_length, maybe_null,
+ name, table->s, get_geometry_type());
+#endif /* HAVE_SPATIAL */
}
if (field)
field->init(table);
@@ -4603,7 +4659,7 @@ int Item::save_in_field(Field *field, bool no_conversions)
my_decimal decimal_value;
my_decimal *value= val_decimal(&decimal_value);
if (null_value)
- return set_field_to_null(field);
+ return set_field_to_null_with_conversions(field, no_conversions);
field->set_notnull();
error=field->store_decimal(value);
}
@@ -4865,6 +4921,19 @@ warn:
}
+void Item_hex_string::print(String *str)
+{
+ char *end= (char*) str_value.ptr() + str_value.length(),
+ *ptr= end - min(str_value.length(), sizeof(longlong));
+ str->append("0x");
+ for (; ptr != end ; ptr++)
+ {
+ str->append(_dig_vec_lower[((uchar) *ptr) >> 4]);
+ str->append(_dig_vec_lower[((uchar) *ptr) & 0x0F]);
+ }
+}
+
+
bool Item_hex_string::eq(const Item *arg, bool binary_cmp) const
{
if (arg->basic_const_item() && arg->type() == type())
@@ -6299,9 +6368,9 @@ bool field_is_equal_to_item(Field *field,Item *item)
return result == field->val_real();
}
-Item_cache* Item_cache::get_cache(Item_result type)
+Item_cache* Item_cache::get_cache(const Item *item)
{
- switch (type) {
+ switch (item->result_type()) {
case INT_RESULT:
return new Item_cache_int();
case REAL_RESULT:
@@ -6309,7 +6378,7 @@ Item_cache* Item_cache::get_cache(Item_result type)
case DECIMAL_RESULT:
return new Item_cache_decimal();
case STRING_RESULT:
- return new Item_cache_str();
+ return new Item_cache_str(item);
case ROW_RESULT:
return new Item_cache_row();
default:
@@ -6487,6 +6556,14 @@ my_decimal *Item_cache_str::val_decimal(my_decimal *decimal_val)
}
+int Item_cache_str::save_in_field(Field *field, bool no_conversions)
+{
+ int res= Item_cache::save_in_field(field, no_conversions);
+ return (is_varbinary && field->type() == MYSQL_TYPE_STRING &&
+ value->length() < field->field_length) ? 1 : res;
+}
+
+
bool Item_cache_row::allocate(uint num)
{
item_count= num;
@@ -6505,7 +6582,7 @@ bool Item_cache_row::setup(Item * item)
{
Item *el= item->element_index(i);
Item_cache *tmp;
- if (!(tmp= values[i]= Item_cache::get_cache(el->result_type())))
+ if (!(tmp= values[i]= Item_cache::get_cache(el)))
return 1;
tmp->setup(el);
}
@@ -6585,10 +6662,10 @@ Item_type_holder::Item_type_holder(THD *thd, Item *item)
if (Field::result_merge_type(fld_type) == INT_RESULT)
decimals= 0;
prev_decimal_int_part= item->decimal_int_part();
+#ifdef HAVE_SPATIAL
if (item->field_type() == MYSQL_TYPE_GEOMETRY)
- geometry_type= (item->type() == Item::FIELD_ITEM) ?
- ((Item_field *)item)->get_geometry_type() :
- (Field::geometry_type)((Item_geometry_func *)item)->get_geometry_type();
+ geometry_type= item->get_geometry_type();
+#endif /* HAVE_SPATIAL */
}
diff --git a/sql/item.h b/sql/item.h
index 30631a9bb2a..4ac3b2959b3 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -1001,6 +1001,9 @@ public:
*/
virtual bool result_as_longlong() { return FALSE; }
bool is_datetime();
+ virtual Field::geometry_type get_geometry_type() const
+ { return Field::GEOM_GEOMETRY; };
+ String *check_well_formed_result(String *str, bool send_error= 0);
};
@@ -1239,10 +1242,14 @@ class Item_name_const : public Item
{
Item *value_item;
Item *name_item;
+ bool valid_args;
public:
Item_name_const(Item *name_arg, Item *val):
value_item(val), name_item(name_arg)
{
+ if (!(valid_args= name_item->basic_const_item() &
+ value_item->basic_const_item()))
+ my_error(ER_WRONG_ARGUMENTS, MYF(0), "NAME_CONST");
Item::maybe_null= TRUE;
}
@@ -1467,7 +1474,7 @@ public:
int fix_outer_field(THD *thd, Field **field, Item **reference);
virtual Item *update_value_transformer(uchar *select_arg);
void print(String *str);
- Field::geometry_type get_geometry_type()
+ Field::geometry_type get_geometry_type() const
{
DBUG_ASSERT(field_type() == MYSQL_TYPE_GEOMETRY);
return field->get_geometry_type();
@@ -1714,7 +1721,7 @@ public:
double val_real()
{ DBUG_ASSERT(fixed == 1); return ulonglong2double((ulonglong)value); }
String *val_str(String*);
- Item *clone_item() { return new Item_uint(name,max_length); }
+ Item *clone_item() { return new Item_uint(name, value, max_length); }
int save_in_field(Field *field, bool no_conversions);
void print(String *str);
Item_num *neg ();
@@ -2019,6 +2026,7 @@ public:
enum_field_types field_type() const { return MYSQL_TYPE_VARCHAR; }
// to prevent drop fixed flag (no need parent cleanup call)
void cleanup() {}
+ void print(String *str);
bool eq(const Item *item, bool binary_cmp) const;
virtual Item *safe_charset_converter(CHARSET_INFO *tocs);
bool check_partition_func_processor(uchar *int_arg) {return FALSE;}
@@ -2614,8 +2622,27 @@ class Item_cache: public Item
protected:
Item *example;
table_map used_table_map;
+ /*
+ Field that this object will get value from. This is set/used by
+ index-based subquery engines to detect and remove the equality injected
+ by IN->EXISTS transformation.
+ For all other uses of Item_cache, cached_field doesn't matter.
+ */
+ Field *cached_field;
+ enum enum_field_types cached_field_type;
public:
- Item_cache(): example(0), used_table_map(0) {fixed= 1; null_value= 1;}
+ Item_cache():
+ example(0), used_table_map(0), cached_field(0), cached_field_type(MYSQL_TYPE_STRING)
+ {
+ fixed= 1;
+ null_value= 1;
+ }
+ Item_cache(enum_field_types field_type_arg):
+ example(0), used_table_map(0), cached_field(0), cached_field_type(field_type_arg)
+ {
+ fixed= 1;
+ null_value= 1;
+ }
void set_used_tables(table_map map) { used_table_map= map; }
@@ -2627,16 +2654,27 @@ public:
decimals= item->decimals;
collation.set(item->collation);
unsigned_flag= item->unsigned_flag;
+ if (item->type() == FIELD_ITEM)
+ cached_field= ((Item_field *)item)->field;
return 0;
};
virtual void store(Item *)= 0;
enum Type type() const { return CACHE_ITEM; }
- static Item_cache* get_cache(Item_result type);
+ enum_field_types field_type() const { return cached_field_type; }
+ static Item_cache* get_cache(const Item *item);
table_map used_tables() const { return used_table_map; }
virtual void keep_array() {}
// to prevent drop fixed flag (no need parent cleanup call)
void cleanup() {}
void print(String *str);
+ bool eq_def(Field *field)
+ {
+ return cached_field ? cached_field->eq_def (field) : FALSE;
+ }
+ bool eq(const Item *item, bool binary_cmp) const
+ {
+ return this == item;
+ }
};
@@ -2646,6 +2684,8 @@ protected:
longlong value;
public:
Item_cache_int(): Item_cache(), value(0) {}
+ Item_cache_int(enum_field_types field_type_arg):
+ Item_cache(field_type_arg), value(0) {}
void store(Item *item);
void store(Item *item, longlong val_arg);
@@ -2693,9 +2733,16 @@ class Item_cache_str: public Item_cache
{
char buffer[STRING_BUFFER_USUAL_SIZE];
String *value, value_buff;
+ bool is_varbinary;
+
public:
- Item_cache_str(): Item_cache(), value(0) { }
-
+ Item_cache_str(const Item *item) :
+ Item_cache(), value(0),
+ is_varbinary(item->type() == FIELD_ITEM &&
+ ((const Item_field *) item)->field->type() ==
+ MYSQL_TYPE_VARCHAR &&
+ !((const Item_field *) item)->field->has_charset())
+ {}
void store(Item *item);
double val_real();
longlong val_int();
@@ -2703,6 +2750,7 @@ public:
my_decimal *val_decimal(my_decimal *);
enum Item_result result_type() const { return STRING_RESULT; }
CHARSET_INFO *charset() const { return value->charset(); };
+ int save_in_field(Field *field, bool no_conversions);
};
class Item_cache_row: public Item_cache
@@ -2805,7 +2853,7 @@ public:
Field *make_field_by_type(TABLE *table);
static uint32 display_length(Item *item);
static enum_field_types get_real_type(Item *);
- Field::geometry_type get_geometry_type() { return geometry_type; };
+ Field::geometry_type get_geometry_type() const { return geometry_type; };
};
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index 8f5ff050dd6..1d1e28593d4 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -24,7 +24,8 @@
#include <m_ctype.h>
#include "sql_select.h"
-static bool convert_constant_item(THD *thd, Field *field, Item **item);
+static bool convert_constant_item(THD *thd, Item_field *field_item,
+ Item **item);
static Item_result item_store_type(Item_result a, Item *item,
my_bool unsigned_flag)
@@ -146,6 +147,35 @@ static int agg_cmp_type(Item_result *type, Item **items, uint nitems)
}
+/**
+ @brief Aggregates field types from the array of items.
+
+ @param[in] items array of items to aggregate the type from
+ @paran[in] nitems number of items in the array
+
+ @details This function aggregates field types from the array of items.
+ Found type is supposed to be used later as the result field type
+ of a multi-argument function.
+ Aggregation itself is performed by the Field::field_type_merge()
+ function.
+
+ @note The term "aggregation" is used here in the sense of inferring the
+ result type of a function from its argument types.
+
+ @return aggregated field type.
+*/
+
+enum_field_types agg_field_type(Item **items, uint nitems)
+{
+ uint i;
+ if (!nitems || items[0]->result_type() == ROW_RESULT )
+ return (enum_field_types)-1;
+ enum_field_types res= items[0]->field_type();
+ for (i= 1 ; i < nitems ; i++)
+ res= Field::field_type_merge(res, items[i]->field_type());
+ return res;
+}
+
/*
Collects different types for comparison of first item with each other items
@@ -322,7 +352,7 @@ longlong Item_func_nop_all::val_int()
SYNOPSIS
convert_constant_item()
thd thread handle
- field item will be converted using the type of this field
+ field_item item will be converted using the type of this field
item [in/out] reference to the item to convert
DESCRIPTION
@@ -345,8 +375,10 @@ longlong Item_func_nop_all::val_int()
1 Item was replaced with an integer version of the item
*/
-static bool convert_constant_item(THD *thd, Field *field, Item **item)
+static bool convert_constant_item(THD *thd, Item_field *field_item,
+ Item **item)
{
+ Field *field= field_item->field;
int result= 0;
if (!(*item)->with_subselect && (*item)->const_item())
@@ -356,9 +388,11 @@ static bool convert_constant_item(THD *thd, Field *field, Item **item)
enum_check_fields orig_count_cuted_fields= thd->count_cuted_fields;
my_bitmap_map *old_write_map;
my_bitmap_map *old_read_map;
+ ulonglong orig_field_val; /* original field value if valid */
LINT_INIT(old_write_map);
LINT_INIT(old_read_map);
+ LINT_INIT(orig_field_val);
if (table)
{
@@ -369,7 +403,14 @@ static bool convert_constant_item(THD *thd, Field *field, Item **item)
thd->variables.sql_mode= (orig_sql_mode & ~MODE_NO_ZERO_DATE) |
MODE_INVALID_DATES;
thd->count_cuted_fields= CHECK_FIELD_IGNORE;
- if (!(*item)->save_in_field(field, 1) && !((*item)->null_value))
+
+ /*
+ Store the value of the field if it references an outer field because
+ the call to save_in_field below overrides that value.
+ */
+ if (field_item->depended_from)
+ orig_field_val= field->val_int();
+ if (!(*item)->is_null() && !(*item)->save_in_field(field, 1))
{
Item *tmp= new Item_int_with_ref(field->val_int(), *item,
test(field->flags & UNSIGNED_FLAG));
@@ -377,6 +418,13 @@ static bool convert_constant_item(THD *thd, Field *field, Item **item)
thd->change_item_tree(item, tmp);
result= 1; // Item was replaced
}
+ /* Restore the original field value. */
+ if (field_item->depended_from)
+ {
+ result= field->store(orig_field_val, TRUE);
+ /* orig_field_val must be a valid value that can be restored back. */
+ DBUG_ASSERT(!result);
+ }
thd->variables.sql_mode= orig_sql_mode;
thd->count_cuted_fields= orig_count_cuted_fields;
if (table)
@@ -433,15 +481,14 @@ void Item_bool_func2::fix_length_and_dec()
thd= current_thd;
if (!thd->is_context_analysis_only())
{
- Item *arg_real_item= args[0]->real_item();
- if (arg_real_item->type() == FIELD_ITEM)
+ if (args[0]->real_item()->type() == FIELD_ITEM)
{
- Field *field=((Item_field*) arg_real_item)->field;
- if (field->can_be_compared_as_longlong() &&
- !(arg_real_item->is_datetime() &&
+ Item_field *field_item= (Item_field*) (args[0]->real_item());
+ if (field_item->field->can_be_compared_as_longlong() &&
+ !(field_item->is_datetime() &&
args[1]->result_type() == STRING_RESULT))
{
- if (convert_constant_item(thd, field,&args[1]))
+ if (convert_constant_item(thd, field_item, &args[1]))
{
cmp.set_cmp_func(this, tmp_arg, tmp_arg+1,
INT_RESULT); // Works for all types.
@@ -450,15 +497,14 @@ void Item_bool_func2::fix_length_and_dec()
}
}
}
- arg_real_item= args[1]->real_item();
- if (arg_real_item->type() == FIELD_ITEM)
+ if (args[1]->real_item()->type() == FIELD_ITEM)
{
- Field *field=((Item_field*) arg_real_item)->field;
- if (field->can_be_compared_as_longlong() &&
- !(arg_real_item->is_datetime() &&
+ Item_field *field_item= (Item_field*) (args[1]->real_item());
+ if (field_item->field->can_be_compared_as_longlong() &&
+ !(field_item->is_datetime() &&
args[0]->result_type() == STRING_RESULT))
{
- if (convert_constant_item(thd, field,&args[0]))
+ if (convert_constant_item(thd, field_item, &args[0]))
{
cmp.set_cmp_func(this, tmp_arg, tmp_arg+1,
INT_RESULT); // Works for all types.
@@ -575,26 +621,26 @@ int Arg_comparator::set_compare_func(Item_bool_func2 *item, Item_result type)
}
-/*
- Convert date provided in a string to the int representation.
+/**
+ @brief Convert date provided in a string to the int representation.
- SYNOPSIS
- get_date_from_str()
- thd Thread handle
- str a string to convert
- warn_type type of the timestamp for issuing the warning
- warn_name field name for issuing the warning
- error_arg [out] TRUE if string isn't a DATETIME or clipping occur
+ @param[in] thd thread handle
+ @param[in] str a string to convert
+ @param[in] warn_type type of the timestamp for issuing the warning
+ @param[in] warn_name field name for issuing the warning
+ @param[out] error_arg could not extract a DATE or DATETIME
- DESCRIPTION
- Convert date provided in the string str to the int representation.
- if the string contains wrong date or doesn't contain it at all
- then the warning is issued and TRUE returned in the error_arg argument.
- The warn_type and the warn_name arguments are used as the name and the
- type of the field when issuing the warning.
+ @details Convert date provided in the string str to the int
+ representation. If the string contains wrong date or doesn't
+ contain it at all then a warning is issued. The warn_type and
+ the warn_name arguments are used as the name and the type of the
+ field when issuing the warning. If any input was discarded
+ (trailing or non-timestampy characters), was_cut will be non-zero.
+ was_type will return the type str_to_datetime() could correctly
+ extract.
- RETURN
- converted value.
+ @return
+ converted value. 0 on error and on zero-dates -- check 'failure'
*/
static ulonglong
@@ -605,26 +651,33 @@ get_date_from_str(THD *thd, String *str, timestamp_type warn_type,
int error;
MYSQL_TIME l_time;
enum_mysql_timestamp_type ret;
- *error_arg= TRUE;
ret= str_to_datetime(str->ptr(), str->length(), &l_time,
(TIME_FUZZY_DATE | MODE_INVALID_DATES |
(thd->variables.sql_mode &
(MODE_NO_ZERO_IN_DATE | MODE_NO_ZERO_DATE))),
&error);
- if ((ret == MYSQL_TIMESTAMP_DATETIME || ret == MYSQL_TIMESTAMP_DATE))
+
+ if (ret == MYSQL_TIMESTAMP_DATETIME || ret == MYSQL_TIMESTAMP_DATE)
{
- value= TIME_to_ulonglong_datetime(&l_time);
+ /*
+ Do not return yet, we may still want to throw a "trailing garbage"
+ warning.
+ */
*error_arg= FALSE;
+ value= TIME_to_ulonglong_datetime(&l_time);
}
-
- if (error || *error_arg)
+ else
{
+ *error_arg= TRUE;
+ error= 1; /* force warning */
+ }
+
+ if (error > 0)
make_truncated_value_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
str->ptr(), str->length(),
warn_type, warn_name);
- *error_arg= TRUE;
- }
+
return value;
}
@@ -897,12 +950,15 @@ get_datetime_value(THD *thd, Item ***item_arg, Item **cache_arg,
{
value= item->val_int();
*is_null= item->null_value;
+ enum_field_types f_type= item->field_type();
/*
Item_date_add_interval may return MYSQL_TYPE_STRING as the result
field type. To detect that the DATE value has been returned we
- compare it with 1000000L - any DATE value should be less than it.
+ compare it with 100000000L - any DATE value should be less than it.
+ Don't shift cached DATETIME values up for the second time.
*/
- if (item->field_type() == MYSQL_TYPE_DATE || value < 100000000L)
+ if (f_type == MYSQL_TYPE_DATE ||
+ (f_type != MYSQL_TYPE_DATETIME && value < 100000000L))
value*= 1000000L;
}
else
@@ -925,6 +981,12 @@ get_datetime_value(THD *thd, Item ***item_arg, Item **cache_arg,
timestamp_type t_type= f_type ==
MYSQL_TYPE_DATE ? MYSQL_TIMESTAMP_DATE : MYSQL_TIMESTAMP_DATETIME;
value= get_date_from_str(thd, str, t_type, warn_item->name, &error);
+ /*
+ If str did not contain a valid date according to the current
+ SQL_MODE, get_date_from_str() has already thrown a warning,
+ and we don't want to throw NULL on invalid date (see 5.2.6
+ "SQL modes" in the manual), so we're done here.
+ */
}
/*
Do not cache GET_USER_VAR() function as its const_item() may return TRUE
@@ -933,7 +995,7 @@ get_datetime_value(THD *thd, Item ***item_arg, Item **cache_arg,
if (item->const_item() && cache_arg && (item->type() != Item::FUNC_ITEM ||
((Item_func*)item)->functype() != Item_func::GUSERVAR_FUNC))
{
- Item_cache_int *cache= new Item_cache_int();
+ Item_cache_int *cache= new Item_cache_int(MYSQL_TYPE_DATETIME);
/* Mark the cache as non-const to prevent re-caching. */
cache->set_used_tables(1);
cache->store(item, value);
@@ -1396,7 +1458,7 @@ longlong Item_func_truth::val_int()
bool Item_in_optimizer::fix_left(THD *thd, Item **ref)
{
if (!args[0]->fixed && args[0]->fix_fields(thd, args) ||
- !cache && !(cache= Item_cache::get_cache(args[0]->result_type())))
+ !cache && !(cache= Item_cache::get_cache(args[0])))
return 1;
cache->setup(args[0]);
@@ -1649,26 +1711,29 @@ bool Item_func_opt_neg::eq(const Item *item, bool binary_cmp) const
void Item_func_interval::fix_length_and_dec()
{
+ uint rows= row->cols();
+
use_decimal_comparison= ((row->element_index(0)->result_type() ==
DECIMAL_RESULT) ||
(row->element_index(0)->result_type() ==
INT_RESULT));
- if (row->cols() > 8)
+ if (rows > 8)
{
- bool consts=1;
+ bool not_null_consts= TRUE;
- for (uint i=1 ; consts && i < row->cols() ; i++)
+ for (uint i= 1; not_null_consts && i < rows; i++)
{
- consts&= row->element_index(i)->const_item();
+ Item *el= row->element_index(i);
+ not_null_consts&= el->const_item() & !el->is_null();
}
- if (consts &&
+ if (not_null_consts &&
(intervals=
- (interval_range*) sql_alloc(sizeof(interval_range)*(row->cols()-1))))
+ (interval_range*) sql_alloc(sizeof(interval_range) * (rows - 1))))
{
if (use_decimal_comparison)
{
- for (uint i=1 ; i < row->cols(); i++)
+ for (uint i= 1; i < rows; i++)
{
Item *el= row->element_index(i);
interval_range *range= intervals + (i-1);
@@ -1693,7 +1758,7 @@ void Item_func_interval::fix_length_and_dec()
}
else
{
- for (uint i=1 ; i < row->cols(); i++)
+ for (uint i= 1; i < rows; i++)
{
intervals[i-1].dbl= row->element_index(i)->val_real();
}
@@ -1784,12 +1849,22 @@ longlong Item_func_interval::val_int()
((el->result_type() == DECIMAL_RESULT) ||
(el->result_type() == INT_RESULT)))
{
- my_decimal e_dec_buf, *e_dec= row->element_index(i)->val_decimal(&e_dec_buf);
+ my_decimal e_dec_buf, *e_dec= el->val_decimal(&e_dec_buf);
+ /* Skip NULL ranges. */
+ if (el->null_value)
+ continue;
if (my_decimal_cmp(e_dec, dec) > 0)
- return i-1;
+ return i - 1;
+ }
+ else
+ {
+ double val= el->val_real();
+ /* Skip NULL ranges. */
+ if (el->null_value)
+ continue;
+ if (val > value)
+ return i - 1;
}
- else if (row->element_index(i)->val_real() > value)
- return i-1;
}
return i-1;
}
@@ -1901,16 +1976,16 @@ void Item_func_between::fix_length_and_dec()
thd->lex->sql_command != SQLCOM_CREATE_VIEW &&
thd->lex->sql_command != SQLCOM_SHOW_CREATE)
{
- Field *field=((Item_field*) (args[0]->real_item()))->field;
- if (field->can_be_compared_as_longlong())
+ Item_field *field_item= (Item_field*) (args[0]->real_item());
+ if (field_item->field->can_be_compared_as_longlong())
{
/*
The following can't be recoded with || as convert_constant_item
changes the argument
*/
- if (convert_constant_item(thd, field,&args[1]))
+ if (convert_constant_item(thd, field_item, &args[1]))
cmp_type=INT_RESULT; // Works for all types.
- if (convert_constant_item(thd, field,&args[2]))
+ if (convert_constant_item(thd, field_item, &args[2]))
cmp_type=INT_RESULT; // Works for all types.
}
}
@@ -2046,10 +2121,20 @@ Item_func_ifnull::fix_length_and_dec()
agg_result_type(&hybrid_type, args, 2);
maybe_null=args[1]->maybe_null;
decimals= max(args[0]->decimals, args[1]->decimals);
- max_length= (hybrid_type == DECIMAL_RESULT || hybrid_type == INT_RESULT) ?
- (max(args[0]->max_length - args[0]->decimals,
- args[1]->max_length - args[1]->decimals) + decimals) :
- max(args[0]->max_length, args[1]->max_length);
+ unsigned_flag= args[0]->unsigned_flag && args[1]->unsigned_flag;
+
+ if (hybrid_type == DECIMAL_RESULT || hybrid_type == INT_RESULT)
+ {
+ int len0= args[0]->max_length - args[0]->decimals
+ - (args[0]->unsigned_flag ? 0 : 1);
+
+ int len1= args[1]->max_length - args[1]->decimals
+ - (args[1]->unsigned_flag ? 0 : 1);
+
+ max_length= max(len0, len1) + decimals + (unsigned_flag ? 0 : 1);
+ }
+ else
+ max_length= max(args[0]->max_length, args[1]->max_length);
switch (hybrid_type) {
case STRING_RESULT:
@@ -2065,9 +2150,7 @@ Item_func_ifnull::fix_length_and_dec()
default:
DBUG_ASSERT(0);
}
- cached_field_type= args[0]->field_type();
- if (cached_field_type != args[1]->field_type())
- cached_field_type= Item_func::field_type();
+ cached_field_type= agg_field_type(args, 2);
}
@@ -2215,11 +2298,13 @@ Item_func_if::fix_length_and_dec()
{
cached_result_type= arg2_type;
collation.set(args[2]->collation.collation);
+ cached_field_type= args[2]->field_type();
}
else if (null2)
{
cached_result_type= arg1_type;
collation.set(args[1]->collation.collation);
+ cached_field_type= args[1]->field_type();
}
else
{
@@ -2233,6 +2318,7 @@ Item_func_if::fix_length_and_dec()
{
collation.set(&my_charset_bin); // Number
}
+ cached_field_type= agg_field_type(args + 1, 2);
}
if ((cached_result_type == DECIMAL_RESULT )
@@ -2557,6 +2643,23 @@ bool Item_func_case::fix_fields(THD *thd, Item **ref)
}
+void Item_func_case::agg_str_lengths(Item* arg)
+{
+ set_if_bigger(max_length, arg->max_length);
+ set_if_bigger(decimals, arg->decimals);
+ unsigned_flag= unsigned_flag && arg->unsigned_flag;
+}
+
+
+void Item_func_case::agg_num_lengths(Item *arg)
+{
+ uint len= my_decimal_length_to_precision(arg->max_length, arg->decimals,
+ arg->unsigned_flag) - arg->decimals;
+ set_if_bigger(max_length, len);
+ set_if_bigger(decimals, arg->decimals);
+ unsigned_flag= unsigned_flag && arg->unsigned_flag;
+}
+
void Item_func_case::fix_length_and_dec()
{
@@ -2582,7 +2685,7 @@ void Item_func_case::fix_length_and_dec()
agg_arg_charsets(collation, agg, nagg, MY_COLL_ALLOW_CONV, 1))
return;
-
+ cached_field_type= agg_field_type(agg, nagg);
/*
Aggregate first expression and all THEN expression types
and collations when string comparison
@@ -2620,15 +2723,22 @@ void Item_func_case::fix_length_and_dec()
max_length=0;
decimals=0;
- for (uint i=0 ; i < ncases ; i+=2)
+ unsigned_flag= TRUE;
+ if (cached_result_type == STRING_RESULT)
{
- set_if_bigger(max_length,args[i+1]->max_length);
- set_if_bigger(decimals,args[i+1]->decimals);
+ for (uint i= 0; i < ncases; i+= 2)
+ agg_str_lengths(args[i + 1]);
+ if (else_expr_num != -1)
+ agg_str_lengths(args[else_expr_num]);
}
- if (else_expr_num != -1)
+ else
{
- set_if_bigger(max_length,args[else_expr_num]->max_length);
- set_if_bigger(decimals,args[else_expr_num]->decimals);
+ for (uint i= 0; i < ncases; i+= 2)
+ agg_num_lengths(args[i + 1]);
+ if (else_expr_num != -1)
+ agg_num_lengths(args[else_expr_num]);
+ max_length= my_decimal_precision_to_length(max_length + decimals, decimals,
+ unsigned_flag);
}
}
@@ -2751,6 +2861,7 @@ my_decimal *Item_func_coalesce::decimal_op(my_decimal *decimal_value)
void Item_func_coalesce::fix_length_and_dec()
{
+ cached_field_type= agg_field_type(args, arg_count);
agg_result_type(&hybrid_type, args, arg_count);
switch (hybrid_type) {
case STRING_RESULT:
@@ -2831,7 +2942,7 @@ static inline int cmp_ulongs (ulonglong a_val, ulonglong b_val)
SYNOPSIS
cmp_longlong()
- cmp_arg an argument passed to the calling function (qsort2)
+ cmp_arg an argument passed to the calling function (my_qsort2)
a left argument
b right argument
@@ -3509,13 +3620,13 @@ void Item_func_in::fix_length_and_dec()
thd->lex->sql_command != SQLCOM_SHOW_CREATE &&
cmp_type != INT_RESULT)
{
- Field *field= ((Item_field*) (args[0]->real_item()))->field;
- if (field->can_be_compared_as_longlong())
+ Item_field *field_item= (Item_field*) (args[0]->real_item());
+ if (field_item->field->can_be_compared_as_longlong())
{
bool all_converted= TRUE;
for (arg=args+1, arg_end=args+arg_count; arg != arg_end ; arg++)
{
- if (!convert_constant_item (thd, field, &arg[0]))
+ if (!convert_constant_item (thd, field_item, &arg[0]))
all_converted= FALSE;
}
if (all_converted)
@@ -4340,6 +4451,51 @@ void Item_func_like::cleanup()
#ifdef USE_REGEX
bool
+Item_func_regex::regcomp(bool send_error)
+{
+ char buff[MAX_FIELD_WIDTH];
+ String tmp(buff,sizeof(buff),&my_charset_bin);
+ String *res= args[1]->val_str(&tmp);
+ int error;
+
+ if (args[1]->null_value)
+ return TRUE;
+
+ if (regex_compiled)
+ {
+ if (!stringcmp(res, &prev_regexp))
+ return FALSE;
+ prev_regexp.copy(*res);
+ my_regfree(&preg);
+ regex_compiled= 0;
+ }
+
+ if (cmp_collation.collation != regex_lib_charset)
+ {
+ /* Convert UCS2 strings to UTF8 */
+ uint dummy_errors;
+ if (conv.copy(res->ptr(), res->length(), res->charset(),
+ regex_lib_charset, &dummy_errors))
+ return TRUE;
+ res= &conv;
+ }
+
+ if ((error= my_regcomp(&preg, res->c_ptr_safe(),
+ regex_lib_flags, regex_lib_charset)))
+ {
+ if (send_error)
+ {
+ (void) my_regerror(error, &preg, buff, sizeof(buff));
+ my_error(ER_REGEXP_ERROR, MYF(0), buff);
+ }
+ return TRUE;
+ }
+ regex_compiled= 1;
+ return FALSE;
+}
+
+
+bool
Item_func_regex::fix_fields(THD *thd, Item **ref)
{
DBUG_ASSERT(fixed == 0);
@@ -4355,34 +4511,34 @@ Item_func_regex::fix_fields(THD *thd, Item **ref)
if (agg_arg_charsets(cmp_collation, args, 2, MY_COLL_CMP_CONV, 1))
return TRUE;
+ regex_lib_flags= (cmp_collation.collation->state &
+ (MY_CS_BINSORT | MY_CS_CSSORT)) ?
+ REG_EXTENDED | REG_NOSUB :
+ REG_EXTENDED | REG_NOSUB | REG_ICASE;
+ /*
+ If the case of UCS2 and other non-ASCII character sets,
+ we will convert patterns and strings to UTF8.
+ */
+ regex_lib_charset= (cmp_collation.collation->mbminlen > 1) ?
+ &my_charset_utf8_general_ci :
+ cmp_collation.collation;
+
used_tables_cache=args[0]->used_tables() | args[1]->used_tables();
not_null_tables_cache= (args[0]->not_null_tables() |
args[1]->not_null_tables());
const_item_cache=args[0]->const_item() && args[1]->const_item();
if (!regex_compiled && args[1]->const_item())
{
- char buff[MAX_FIELD_WIDTH];
- String tmp(buff,sizeof(buff),&my_charset_bin);
- String *res=args[1]->val_str(&tmp);
if (args[1]->null_value)
{ // Will always return NULL
maybe_null=1;
+ fixed= 1;
return FALSE;
}
- int error;
- if ((error= my_regcomp(&preg,res->c_ptr(),
- ((cmp_collation.collation->state &
- (MY_CS_BINSORT | MY_CS_CSSORT)) ?
- REG_EXTENDED | REG_NOSUB :
- REG_EXTENDED | REG_NOSUB | REG_ICASE),
- cmp_collation.collation)))
- {
- (void) my_regerror(error,&preg,buff,sizeof(buff));
- my_error(ER_REGEXP_ERROR, MYF(0), buff);
+ if (regcomp(TRUE))
return TRUE;
- }
- regex_compiled=regex_is_const=1;
- maybe_null=args[0]->maybe_null;
+ regex_is_const= 1;
+ maybe_null= args[0]->maybe_null;
}
else
maybe_null=1;
@@ -4395,47 +4551,25 @@ longlong Item_func_regex::val_int()
{
DBUG_ASSERT(fixed == 1);
char buff[MAX_FIELD_WIDTH];
- String *res, tmp(buff,sizeof(buff),&my_charset_bin);
+ String tmp(buff,sizeof(buff),&my_charset_bin);
+ String *res= args[0]->val_str(&tmp);
- res=args[0]->val_str(&tmp);
- if (args[0]->null_value)
- {
- null_value=1;
+ if ((null_value= (args[0]->null_value ||
+ (!regex_is_const && regcomp(FALSE)))))
return 0;
- }
- if (!regex_is_const)
- {
- char buff2[MAX_FIELD_WIDTH];
- String *res2, tmp2(buff2,sizeof(buff2),&my_charset_bin);
- res2= args[1]->val_str(&tmp2);
- if (args[1]->null_value)
+ if (cmp_collation.collation != regex_lib_charset)
+ {
+ /* Convert UCS2 strings to UTF8 */
+ uint dummy_errors;
+ if (conv.copy(res->ptr(), res->length(), res->charset(),
+ regex_lib_charset, &dummy_errors))
{
- null_value=1;
+ null_value= 1;
return 0;
}
- if (!regex_compiled || stringcmp(res2,&prev_regexp))
- {
- prev_regexp.copy(*res2);
- if (regex_compiled)
- {
- my_regfree(&preg);
- regex_compiled=0;
- }
- if (my_regcomp(&preg,res2->c_ptr_safe(),
- ((cmp_collation.collation->state &
- (MY_CS_BINSORT | MY_CS_CSSORT)) ?
- REG_EXTENDED | REG_NOSUB :
- REG_EXTENDED | REG_NOSUB | REG_ICASE),
- cmp_collation.collation))
- {
- null_value=1;
- return 0;
- }
- regex_compiled=1;
- }
+ res= &conv;
}
- null_value=0;
return my_regexec(&preg,res->c_ptr_safe(),0,(my_regmatch_t*) 0,0) ? 0 : 1;
}
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h
index 40d0c2dfe91..188d87a69ca 100644
--- a/sql/item_cmpfunc.h
+++ b/sql/item_cmpfunc.h
@@ -640,6 +640,7 @@ public:
class Item_func_coalesce :public Item_func_numhybrid
{
protected:
+ enum_field_types cached_field_type;
Item_func_coalesce(Item *a, Item *b) :Item_func_numhybrid(a, b) {}
public:
Item_func_coalesce(List<Item> &list) :Item_func_numhybrid(list) {}
@@ -652,13 +653,13 @@ public:
enum Item_result result_type () const { return hybrid_type; }
const char *func_name() const { return "coalesce"; }
table_map not_null_tables() const { return 0; }
+ enum_field_types field_type() const { return cached_field_type; }
};
class Item_func_ifnull :public Item_func_coalesce
{
protected:
- enum_field_types cached_field_type;
bool field_type_defined;
public:
Item_func_ifnull(Item *a, Item *b) :Item_func_coalesce(a,b) {}
@@ -677,6 +678,7 @@ public:
class Item_func_if :public Item_func
{
enum Item_result cached_result_type;
+ enum_field_types cached_field_type;
public:
Item_func_if(Item *a,Item *b,Item *c)
:Item_func(a,b,c), cached_result_type(INT_RESULT)
@@ -686,6 +688,7 @@ public:
String *val_str(String *str);
my_decimal *val_decimal(my_decimal *);
enum Item_result result_type () const { return cached_result_type; }
+ enum_field_types field_type() const { return cached_field_type; }
bool fix_fields(THD *, Item **);
void fix_length_and_dec();
uint decimal_precision() const;
@@ -713,6 +716,7 @@ public:
bool is_null();
};
+
/* Functions to handle the optimized IN */
@@ -738,7 +742,7 @@ public:
virtual uchar *get_value(Item *item)=0;
void sort()
{
- qsort2(base,used_count,size,compare,collation);
+ my_qsort2(base,used_count,size,compare,collation);
}
int find(Item *item);
@@ -1104,6 +1108,7 @@ class Item_func_case :public Item_func
uint ncases;
Item_result cmp_type;
DTCollation cmp_collation;
+ enum_field_types cached_field_type;
cmp_item *cmp_items[5]; /* For all result types */
cmp_item *case_item;
public:
@@ -1134,11 +1139,14 @@ public:
uint decimal_precision() const;
table_map not_null_tables() const { return 0; }
enum Item_result result_type () const { return cached_result_type; }
+ enum_field_types field_type() const { return cached_field_type; }
const char *func_name() const { return "case"; }
void print(String *str);
Item *find_item(String *str);
CHARSET_INFO *compare_collation() { return cmp_collation.collation; }
void cleanup();
+ void agg_str_lengths(Item *arg);
+ void agg_num_lengths(Item *arg);
};
/*
@@ -1376,6 +1384,10 @@ class Item_func_regex :public Item_bool_func
bool regex_is_const;
String prev_regexp;
DTCollation cmp_collation;
+ CHARSET_INFO *regex_lib_charset;
+ int regex_lib_flags;
+ String conv;
+ bool regcomp(bool send_error);
public:
Item_func_regex(Item *a,Item *b) :Item_bool_func(a,b),
regex_compiled(0),regex_is_const(0) {}
@@ -1442,6 +1454,7 @@ public:
Item *transform(Item_transformer transformer, uchar *arg);
void traverse_cond(Cond_traverser, void *arg, traverse_order order);
void neg_arguments(THD *thd);
+ enum_field_types field_type() const { return MYSQL_TYPE_LONGLONG; }
bool subst_argument_checker(uchar **arg) { return TRUE; }
Item *compile(Item_analyzer analyzer, uchar **arg_p,
Item_transformer transformer, uchar *arg_t);
diff --git a/sql/item_create.cc b/sql/item_create.cc
index 12b795e79a1..dc9f6e92884 100644
--- a/sql/item_create.cc
+++ b/sql/item_create.cc
@@ -2326,6 +2326,25 @@ Item*
Create_qfunc::create(THD *thd, LEX_STRING name, List<Item> *item_list)
{
LEX_STRING db;
+
+ if (! thd->db && ! thd->lex->sphead)
+ {
+ /*
+ The proper error message should be in the lines of:
+ Can't resolve <name>() to a function call,
+ because this function:
+ - is not a native function,
+ - is not a user defined function,
+ - can not match a qualified (read: stored) function
+ since no database is selected.
+ Reusing ER_SP_DOES_NOT_EXIST have a message consistent with
+ the case when a default database exist, see Create_sp_func::create().
+ */
+ my_error(ER_SP_DOES_NOT_EXIST, MYF(0),
+ "FUNCTION", name.str);
+ return NULL;
+ }
+
if (thd->lex->copy_db_to(&db.str, &db.length))
return NULL;
diff --git a/sql/item_func.cc b/sql/item_func.cc
index 0c02eb01d71..02f6369187a 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -188,7 +188,7 @@ Item_func::fix_fields(THD *thd, Item **ref)
}
}
fix_length_and_dec();
- if (thd->net.report_error) // An error inside fix_length_and_dec occured
+ if (thd->is_error()) // An error inside fix_length_and_dec occured
return TRUE;
fixed= 1;
return FALSE;
@@ -1378,7 +1378,11 @@ longlong Item_func_int_div::val_int()
void Item_func_int_div::fix_length_and_dec()
{
- max_length=args[0]->max_length - args[0]->decimals;
+ Item_result argtype= args[0]->result_type();
+ /* use precision ony for the data type it is applicable for and valid */
+ max_length=args[0]->max_length -
+ (argtype == DECIMAL_RESULT || argtype == INT_RESULT ?
+ args[0]->decimals : 0);
maybe_null=1;
unsigned_flag=args[0]->unsigned_flag | args[1]->unsigned_flag;
}
@@ -1997,6 +2001,7 @@ void Item_func_round::fix_length_and_dec()
case DECIMAL_RESULT:
{
hybrid_type= DECIMAL_RESULT;
+ decimals_to_set= min(DECIMAL_MAX_SCALE, decimals_to_set);
int decimals_delta= args[0]->decimals - decimals_to_set;
int precision= args[0]->decimal_precision();
int length_increase= ((decimals_delta <= 0) || truncate) ? 0:1;
@@ -2103,7 +2108,7 @@ my_decimal *Item_func_round::decimal_op(my_decimal *decimal_value)
longlong dec= args[1]->val_int();
if (dec > 0 || (dec < 0 && args[1]->unsigned_flag))
{
- dec= min((ulonglong) dec, DECIMAL_MAX_SCALE);
+ dec= min((ulonglong) dec, decimals);
decimals= (uint8) dec; // to get correct output
}
else if (dec < INT_MIN)
@@ -2239,6 +2244,7 @@ void Item_func_min_max::fix_length_and_dec()
else if ((cmp_type == DECIMAL_RESULT) || (cmp_type == INT_RESULT))
max_length= my_decimal_precision_to_length(max_int_part+decimals, decimals,
unsigned_flag);
+ cached_field_type= agg_field_type(args, arg_count);
}
@@ -2893,6 +2899,7 @@ udf_handler::fix_fields(THD *thd, Item_result_field *func,
if (u_d->func_init)
{
+ char init_msg_buff[MYSQL_ERRMSG_SIZE];
char *to=num_buffer;
for (uint i=0; i < arg_count; i++)
{
@@ -2945,16 +2952,22 @@ udf_handler::fix_fields(THD *thd, Item_result_field *func,
}
thd->net.last_error[0]=0;
Udf_func_init init= u_d->func_init;
- if ((error=(uchar) init(&initid, &f_args, thd->net.last_error)))
+ if ((error=(uchar) init(&initid, &f_args, init_msg_buff)))
{
my_error(ER_CANT_INITIALIZE_UDF, MYF(0),
- u_d->name.str, thd->net.last_error);
+ u_d->name.str, init_msg_buff);
free_udf(u_d);
DBUG_RETURN(TRUE);
}
func->max_length=min(initid.max_length,MAX_BLOB_WIDTH);
func->maybe_null=initid.maybe_null;
const_item_cache=initid.const_item;
+ /*
+ Keep used_tables_cache in sync with const_item_cache.
+ See the comment in Item_udf_func::update_used tables.
+ */
+ if (!const_item_cache && !used_tables_cache)
+ used_tables_cache= RAND_TABLE_BIT;
func->decimals=min(initid.decimals,NOT_FIXED_DEC);
}
initialized=1;
@@ -3620,10 +3633,17 @@ longlong Item_func_last_insert_id::val_int()
thd->first_successful_insert_id_in_prev_stmt= value;
return value;
}
- thd->lex->uncacheable(UNCACHEABLE_SIDEEFFECT);
return thd->read_first_successful_insert_id_in_prev_stmt();
}
+
+bool Item_func_last_insert_id::fix_fields(THD *thd, Item **ref)
+{
+ thd->lex->uncacheable(UNCACHEABLE_SIDEEFFECT);
+ return Item_int_func::fix_fields(thd, ref);
+}
+
+
/* This function is just used to test speed of different functions */
longlong Item_func_benchmark::val_int()
@@ -3708,13 +3728,12 @@ longlong Item_func_sleep::val_int()
break;
error= 0;
}
-
+ pthread_mutex_unlock(&LOCK_user_locks);
pthread_mutex_lock(&thd->mysys_var->mutex);
thd->mysys_var->current_mutex= 0;
thd->mysys_var->current_cond= 0;
pthread_mutex_unlock(&thd->mysys_var->mutex);
- pthread_mutex_unlock(&LOCK_user_locks);
pthread_cond_destroy(&cond);
return test(!error); // Return 1 killed
@@ -3829,9 +3848,12 @@ Item_func_set_user_var::fix_length_and_dec()
bool Item_func_set_user_var::register_field_in_read_map(uchar *arg)
{
- TABLE *table= (TABLE *) arg;
- if (result_field->table == table || !table)
- bitmap_set_bit(result_field->table->read_set, result_field->field_index);
+ if (result_field)
+ {
+ TABLE *table= (TABLE *) arg;
+ if (result_field->table == table || !table)
+ bitmap_set_bit(result_field->table->read_set, result_field->field_index);
+ }
return 0;
}
@@ -4062,7 +4084,7 @@ my_decimal *user_var_entry::val_decimal(my_bool *null_value, my_decimal *val)
NOTES
For now it always return OK. All problem with value evaluating
- will be caught by thd->net.report_error check in sql_set_variables().
+ will be caught by thd->is_error() check in sql_set_variables().
RETURN
FALSE OK.
@@ -5593,8 +5615,13 @@ Item_func_sp::fix_fields(THD *thd, Item **ref)
#endif /* ! NO_EMBEDDED_ACCESS_CHECKS */
}
+
if (!m_sp->m_chistics->detistic)
- used_tables_cache |= RAND_TABLE_BIT;
+ {
+ used_tables_cache |= RAND_TABLE_BIT;
+ const_item_cache= FALSE;
+ }
+
DBUG_RETURN(res);
}
@@ -5602,8 +5629,12 @@ Item_func_sp::fix_fields(THD *thd, Item **ref)
void Item_func_sp::update_used_tables()
{
Item_func::update_used_tables();
+
if (!m_sp->m_chistics->detistic)
- used_tables_cache |= RAND_TABLE_BIT;
+ {
+ used_tables_cache |= RAND_TABLE_BIT;
+ const_item_cache= FALSE;
+ }
}
diff --git a/sql/item_func.h b/sql/item_func.h
index 04e3f39f9f5..4981d1694e0 100644
--- a/sql/item_func.h
+++ b/sql/item_func.h
@@ -236,9 +236,40 @@ public:
my_decimal *val_decimal(my_decimal *);
String *val_str(String*str);
+ /**
+ @brief Performs the operation that this functions implements when the
+ result type is INT.
+
+ @return The result of the operation.
+ */
virtual longlong int_op()= 0;
+
+ /**
+ @brief Performs the operation that this functions implements when the
+ result type is REAL.
+
+ @return The result of the operation.
+ */
virtual double real_op()= 0;
+
+ /**
+ @brief Performs the operation that this functions implements when the
+ result type is DECIMAL.
+
+ @param A pointer where the DECIMAL value will be allocated.
+ @return
+ - 0 If the result is NULL
+ - The same pointer it was given, with the area initialized to the
+ result of the operation.
+ */
virtual my_decimal *decimal_op(my_decimal *)= 0;
+
+ /**
+ @brief Performs the operation that this functions implements when the
+ result type is a string type.
+
+ @return The result of the operation.
+ */
virtual String *str_op(String *)= 0;
bool is_null() { update_null_value(); return null_value; }
};
@@ -436,6 +467,7 @@ public:
longlong int_op();
my_decimal *decimal_op(my_decimal *);
const char *func_name() const { return "-"; }
+ virtual bool basic_const_item() const { return args[0]->basic_const_item(); }
void fix_length_and_dec();
void fix_num_length_and_dec();
uint decimal_precision() const { return args[0]->decimal_precision(); }
@@ -699,7 +731,8 @@ class Item_func_min_max :public Item_func
/* An item used for issuing warnings while string to DATETIME conversion. */
Item *datetime_item;
THD *thd;
-
+protected:
+ enum_field_types cached_field_type;
public:
Item_func_min_max(List<Item> &list,int cmp_sign_arg) :Item_func(list),
cmp_type(INT_RESULT), cmp_sign(cmp_sign_arg), compare_as_dates(FALSE),
@@ -712,6 +745,7 @@ public:
enum Item_result result_type () const { return cmp_type; }
bool result_as_longlong() { return compare_as_dates; };
uint cmp_datetimes(ulonglong *value);
+ enum_field_types field_type() const { return cached_field_type; }
};
class Item_func_min :public Item_func_min_max
@@ -754,6 +788,8 @@ public:
collation= args[0]->collation;
max_length= args[0]->max_length;
decimals=args[0]->decimals;
+ /* The item could be a NULL constant. */
+ null_value= args[0]->is_null();
}
};
@@ -930,6 +966,7 @@ public:
if (arg_count)
max_length= args[0]->max_length;
}
+ bool fix_fields(THD *thd, Item **ref);
};
@@ -985,6 +1022,56 @@ public:
fixed= 1;
return res;
}
+ void update_used_tables()
+ {
+ /*
+ TODO: Make a member in UDF_INIT and return if a UDF is deterministic or
+ not.
+ Currently UDF_INIT has a member (const_item) that is an in/out
+ parameter to the init() call.
+ The code in udf_handler::fix_fields also duplicates the arguments
+ handling code in Item_func::fix_fields().
+
+ The lack of information if a UDF is deterministic makes writing
+ a correct update_used_tables() for UDFs impossible.
+ One solution to this would be :
+ - Add a is_deterministic member of UDF_INIT
+ - (optionally) deprecate the const_item member of UDF_INIT
+ - Take away the duplicate code from udf_handler::fix_fields() and
+ make Item_udf_func call Item_func::fix_fields() to process its
+ arguments as for any other function.
+ - Store the deterministic flag returned by <udf>_init into the
+ udf_handler.
+ - Don't implement Item_udf_func::fix_fields, implement
+ Item_udf_func::fix_length_and_dec() instead (similar to non-UDF
+ functions).
+ - Override Item_func::update_used_tables to call
+ Item_func::update_used_tables() and add a RAND_TABLE_BIT to the
+ result of Item_func::update_used_tables() if the UDF is
+ non-deterministic.
+ - (optionally) rename RAND_TABLE_BIT to NONDETERMINISTIC_BIT to
+ better describe its usage.
+
+ The above would require a change of the UDF API.
+ Until that change is done here's how the current code works:
+ We call Item_func::update_used_tables() only when we know that
+ the function depends on real non-const tables and is deterministic.
+ This can be done only because we know that the optimizer will
+ call update_used_tables() only when there's possibly a new const
+ table. So update_used_tables() can only make a Item_func more
+ constant than it is currently.
+ That's why we don't need to do anything if a function is guaranteed
+ to return non-constant (it's non-deterministic) or is already a
+ const.
+ */
+ if ((used_tables_cache & ~PSEUDO_TABLE_BITS) &&
+ !(used_tables_cache & RAND_TABLE_BIT))
+ {
+ Item_func::update_used_tables();
+ if (!const_item_cache && !used_tables_cache)
+ used_tables_cache= RAND_TABLE_BIT;
+ }
+ }
void cleanup();
Item_result result_type () const { return udf.result_type(); }
table_map not_null_tables() const { return 0; }
@@ -1534,6 +1621,11 @@ public:
bool fix_fields(THD *thd, Item **ref);
void fix_length_and_dec(void);
bool is_expensive() { return 1; }
+
+ inline Field *get_sp_result_field()
+ {
+ return sp_result_field;
+ }
};
diff --git a/sql/item_geofunc.cc b/sql/item_geofunc.cc
index 78741483c0b..2da5965c94d 100644
--- a/sql/item_geofunc.cc
+++ b/sql/item_geofunc.cc
@@ -28,7 +28,7 @@ Field *Item_geometry_func::tmp_table_field(TABLE *t_arg)
{
Field *result;
if ((result= new Field_geom(max_length, maybe_null, name, t_arg->s,
- (Field::geometry_type) get_geometry_type())))
+ get_geometry_type())))
result->init(t_arg);
return result;
}
@@ -37,14 +37,10 @@ void Item_geometry_func::fix_length_and_dec()
{
collation.set(&my_charset_bin);
decimals=0;
- max_length=MAX_BLOB_WIDTH;
+ max_length= max_field_size;
maybe_null= 1;
}
-int Item_geometry_func::get_geometry_type() const
-{
- return (int)Field::GEOM_GEOMETRY;
-}
String *Item_func_geometry_from_text::val_str(String *str)
{
@@ -163,9 +159,9 @@ String *Item_func_geometry_type::val_str(String *str)
}
-int Item_func_envelope::get_geometry_type() const
+Field::geometry_type Item_func_envelope::get_geometry_type() const
{
- return (int) Field::GEOM_POLYGON;
+ return Field::GEOM_POLYGON;
}
@@ -193,9 +189,9 @@ String *Item_func_envelope::val_str(String *str)
}
-int Item_func_centroid::get_geometry_type() const
+Field::geometry_type Item_func_centroid::get_geometry_type() const
{
- return (int) Field::GEOM_POINT;
+ return Field::GEOM_POINT;
}
@@ -333,9 +329,9 @@ err:
*/
-int Item_func_point::get_geometry_type() const
+Field::geometry_type Item_func_point::get_geometry_type() const
{
- return (int) Field::GEOM_POINT;
+ return Field::GEOM_POINT;
}
diff --git a/sql/item_geofunc.h b/sql/item_geofunc.h
index 068caa447ef..62be78eee9e 100644
--- a/sql/item_geofunc.h
+++ b/sql/item_geofunc.h
@@ -33,7 +33,6 @@ public:
void fix_length_and_dec();
enum_field_types field_type() const { return MYSQL_TYPE_GEOMETRY; }
Field *tmp_table_field(TABLE *t_arg);
- virtual int get_geometry_type() const;
bool is_null() { (void) val_int(); return null_value; }
};
@@ -92,7 +91,7 @@ public:
Item_func_centroid(Item *a): Item_geometry_func(a) {}
const char *func_name() const { return "centroid"; }
String *val_str(String *);
- int get_geometry_type() const;
+ Field::geometry_type get_geometry_type() const;
};
class Item_func_envelope: public Item_geometry_func
@@ -101,7 +100,7 @@ public:
Item_func_envelope(Item *a): Item_geometry_func(a) {}
const char *func_name() const { return "envelope"; }
String *val_str(String *);
- int get_geometry_type() const;
+ Field::geometry_type get_geometry_type() const;
};
class Item_func_point: public Item_geometry_func
@@ -111,7 +110,7 @@ public:
Item_func_point(Item *a, Item *b, Item *srid): Item_geometry_func(a, b, srid) {}
const char *func_name() const { return "point"; }
String *val_str(String *);
- int get_geometry_type() const;
+ Field::geometry_type get_geometry_type() const;
};
class Item_func_spatial_decomp: public Item_geometry_func
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc
index 7a6721f3bbd..aa5a654d5e7 100644
--- a/sql/item_strfunc.cc
+++ b/sql/item_strfunc.cc
@@ -36,36 +36,6 @@ C_MODE_END
String my_empty_string("",default_charset_info);
-String *Item_str_func::check_well_formed_result(String *str)
-{
- /* Check whether we got a well-formed string */
- CHARSET_INFO *cs= str->charset();
- int well_formed_error;
- uint wlen= cs->cset->well_formed_len(cs,
- str->ptr(), str->ptr() + str->length(),
- str->length(), &well_formed_error);
- if (wlen < str->length())
- {
- THD *thd= current_thd;
- char hexbuf[7];
- enum MYSQL_ERROR::enum_warning_level level;
- uint diff= str->length() - wlen;
- set_if_smaller(diff, 3);
- octet2hex(hexbuf, str->ptr() + wlen, diff);
- if (thd->variables.sql_mode &
- (MODE_STRICT_TRANS_TABLES | MODE_STRICT_ALL_TABLES))
- {
- level= MYSQL_ERROR::WARN_LEVEL_ERROR;
- null_value= 1;
- str= 0;
- }
- else
- level= MYSQL_ERROR::WARN_LEVEL_WARN;
- push_warning_printf(thd, level, ER_INVALID_CHARACTER_STRING,
- ER(ER_INVALID_CHARACTER_STRING), cs->csname, hexbuf);
- }
- return str;
-}
bool Item_str_func::fix_fields(THD *thd, Item **ref)
@@ -386,10 +356,35 @@ String *Item_func_concat::val_str(String *str)
}
else
{ // Two big const strings
- if (tmp_value.alloc(max_length) ||
- tmp_value.copy(*res) ||
- tmp_value.append(*res2))
+ /*
+ NOTE: We should be prudent in the initial allocation unit -- the
+ size of the arguments is a function of data distribution, which
+ can be any. Instead of overcommitting at the first row, we grow
+ the allocated amount by the factor of 2. This ensures that no
+ more than 25% of memory will be overcommitted on average.
+ */
+
+ uint concat_len= res->length() + res2->length();
+
+ if (tmp_value.alloced_length() < concat_len)
+ {
+ if (tmp_value.alloced_length() == 0)
+ {
+ if (tmp_value.alloc(concat_len))
+ goto null;
+ }
+ else
+ {
+ uint new_len = max(tmp_value.alloced_length() * 2, concat_len);
+
+ if (tmp_value.realloc(new_len))
+ goto null;
+ }
+ }
+
+ if (tmp_value.copy(*res) || tmp_value.append(*res2))
goto null;
+
res= &tmp_value;
use_as_buff=str;
}
@@ -709,8 +704,33 @@ String *Item_func_concat_ws::val_str(String *str)
}
else
{ // Two big const strings
- if (tmp_value.alloc(max_length) ||
- tmp_value.copy(*res) ||
+ /*
+ NOTE: We should be prudent in the initial allocation unit -- the
+ size of the arguments is a function of data distribution, which can
+ be any. Instead of overcommitting at the first row, we grow the
+ allocated amount by the factor of 2. This ensures that no more than
+ 25% of memory will be overcommitted on average.
+ */
+
+ uint concat_len= res->length() + sep_str->length() + res2->length();
+
+ if (tmp_value.alloced_length() < concat_len)
+ {
+ if (tmp_value.alloced_length() == 0)
+ {
+ if (tmp_value.alloc(concat_len))
+ goto null;
+ }
+ else
+ {
+ uint new_len = max(tmp_value.alloced_length() * 2, concat_len);
+
+ if (tmp_value.realloc(new_len))
+ goto null;
+ }
+ }
+
+ if (tmp_value.copy(*res) ||
tmp_value.append(*sep_str) ||
tmp_value.append(*res2))
goto null;
@@ -2276,11 +2296,13 @@ String *Item_func_char::val_str(String *str)
{
DBUG_ASSERT(fixed == 1);
str->length(0);
+ str->set_charset(collation.collation);
for (uint i=0 ; i < arg_count ; i++)
{
int32 num=(int32) args[i]->val_int();
if (!args[i]->null_value)
{
+ char char_num= (char) num;
if (num&0xFF000000L) {
str->append((char)(num>>24));
goto b2;
@@ -2290,10 +2312,9 @@ String *Item_func_char::val_str(String *str)
} else if (num&0xFF00L) {
b1: str->append((char)(num>>8));
}
- str->append((char) num);
+ str->append(&char_num, 1);
}
}
- str->set_charset(collation.collation);
str->realloc(str->length()); // Add end 0 (for Purify)
return check_well_formed_result(str);
}
diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h
index 155f8457156..0d7cd66acff 100644
--- a/sql/item_strfunc.h
+++ b/sql/item_strfunc.h
@@ -35,7 +35,6 @@ public:
my_decimal *val_decimal(my_decimal *);
enum Item_result result_type () const { return STRING_RESULT; }
void left_right_max_length();
- String *check_well_formed_result(String *str);
bool fix_fields(THD *thd, Item **ref);
};
@@ -509,7 +508,7 @@ public:
String *val_str(String *);
void fix_length_and_dec()
{
- max_length= arg_count * collation.collation->mbmaxlen;
+ max_length= arg_count * 4;
}
const char *func_name() const { return "char"; }
};
@@ -559,7 +558,8 @@ public:
void fix_length_and_dec()
{
collation.set(default_charset());
- max_length= 64;
+ max_length=64;
+ maybe_null= 1;
}
};
@@ -657,7 +657,12 @@ public:
}
String* val_str(String* str);
const char *func_name() const { return "inet_ntoa"; }
- void fix_length_and_dec() { decimals = 0; max_length=3*8+7; }
+ void fix_length_and_dec()
+ {
+ decimals= 0;
+ max_length= 3 * 8 + 7;
+ maybe_null= 1;
+ }
};
class Item_func_quote :public Item_str_func
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc
index 843c6ced263..e2003f820b6 100644
--- a/sql/item_subselect.cc
+++ b/sql/item_subselect.cc
@@ -248,7 +248,7 @@ bool Item_subselect::exec()
{
int res;
- if (thd->net.report_error)
+ if (thd->is_error())
/* Do not execute subselect in case of a fatal error */
return 1;
@@ -1760,7 +1760,7 @@ void subselect_engine::set_row(List<Item> &item_list, Item_cache **row)
item->decimals= sel_item->decimals;
item->unsigned_flag= sel_item->unsigned_flag;
maybe_null= sel_item->maybe_null;
- if (!(row[i]= Item_cache::get_cache(res_type)))
+ if (!(row[i]= Item_cache::get_cache(sel_item)))
return;
row[i]->setup(sel_item);
}
@@ -1843,7 +1843,9 @@ int subselect_single_select_engine::exec()
DBUG_RETURN(1);
}
}
- if (select_lex->uncacheable && executed)
+ if (select_lex->uncacheable &&
+ select_lex->uncacheable != UNCACHEABLE_EXPLAIN
+ && executed)
{
if (join->reinit())
{
@@ -2222,6 +2224,7 @@ int subselect_indexsubquery_engine::exec()
((Item_in_subselect *) item)->value= 0;
empty_result_set= TRUE;
null_keypart= 0;
+ table->status= 0;
if (check_null)
{
@@ -2234,6 +2237,16 @@ int subselect_indexsubquery_engine::exec()
if (copy_ref_key())
DBUG_RETURN(1);
+ if (table->status)
+ {
+ /*
+ We know that there will be no rows even if we scan.
+ Can be set in copy_ref_key.
+ */
+ ((Item_in_subselect *) item)->value= 0;
+ DBUG_RETURN(0);
+ }
+
if (null_keypart)
DBUG_RETURN(scan_table());
diff --git a/sql/item_subselect.h b/sql/item_subselect.h
index 51ab7b8ad42..de4b1cbdc06 100644
--- a/sql/item_subselect.h
+++ b/sql/item_subselect.h
@@ -307,6 +307,7 @@ public:
double val_real();
String *val_str(String*);
my_decimal *val_decimal(my_decimal *);
+ void update_null_value () { (void) val_bool(); }
bool val_bool();
void top_level_item() { abort_on_null=1; }
inline bool is_top_level_item() { return abort_on_null; }
diff --git a/sql/item_sum.cc b/sql/item_sum.cc
index 2684cce16ac..a7574cf4d60 100644
--- a/sql/item_sum.cc
+++ b/sql/item_sum.cc
@@ -915,7 +915,9 @@ bool Item_sum_distinct::setup(THD *thd)
List<Create_field> field_list;
Create_field field_def; /* field definition */
DBUG_ENTER("Item_sum_distinct::setup");
- DBUG_ASSERT(tree == 0);
+ /* It's legal to call setup() more than once when in a subquery */
+ if (tree)
+ DBUG_RETURN(FALSE);
/*
Virtual table and the tree are created anew on each re-execution of
@@ -923,7 +925,7 @@ bool Item_sum_distinct::setup(THD *thd)
mem_root.
*/
if (field_list.push_back(&field_def))
- return TRUE;
+ DBUG_RETURN(TRUE);
null_value= maybe_null= 1;
quick_group= 0;
@@ -935,7 +937,7 @@ bool Item_sum_distinct::setup(THD *thd)
args[0]->unsigned_flag);
if (! (table= create_virtual_tmp_table(thd, field_list)))
- return TRUE;
+ DBUG_RETURN(TRUE);
/* XXX: check that the case of CHAR(0) works OK */
tree_key_length= table->s->reclength - table->s->null_bytes;
@@ -2462,6 +2464,7 @@ bool Item_sum_count_distinct::setup(THD *thd)
/*
Setup can be called twice for ROLLUP items. This is a bug.
Please add DBUG_ASSERT(tree == 0) here when it's fixed.
+ It's legal to call setup() more than once when in a subquery
*/
if (tree || table || tmp_table_param)
return FALSE;
@@ -3328,15 +3331,34 @@ bool Item_func_group_concat::setup(THD *thd)
count_field_types(select_lex, tmp_table_param, all_fields, 0);
tmp_table_param->force_copy_fields= force_copy_fields;
DBUG_ASSERT(table == 0);
- /*
- Currently we have to force conversion of BLOB values to VARCHAR's
- if we are to store them in TREE objects used for ORDER BY and
- DISTINCT. This leads to truncation if the BLOB's size exceeds
- Field_varstring::MAX_SIZE.
- */
if (arg_count_order > 0 || distinct)
+ {
+ /*
+ Currently we have to force conversion of BLOB values to VARCHAR's
+ if we are to store them in TREE objects used for ORDER BY and
+ DISTINCT. This leads to truncation if the BLOB's size exceeds
+ Field_varstring::MAX_SIZE.
+ */
set_if_smaller(tmp_table_param->convert_blob_length,
Field_varstring::MAX_SIZE);
+
+ /*
+ Force the create_tmp_table() to convert BIT columns to INT
+ as we cannot compare two table records containg BIT fields
+ stored in the the tree used for distinct/order by.
+ Moreover we don't even save in the tree record null bits
+ where BIT fields store parts of their data.
+ */
+ List_iterator_fast<Item> li(all_fields);
+ Item *item;
+ while ((item= li++))
+ {
+ if (item->type() == Item::FIELD_ITEM &&
+ ((Item_field*) item)->field->type() == FIELD_TYPE_BIT)
+ item->marker= 4;
+ }
+ }
+
/*
We have to create a temporary table to get descriptions of fields
(types, sizes and so on).
@@ -3405,7 +3427,7 @@ String* Item_func_group_concat::val_str(String* str)
DBUG_ASSERT(fixed == 1);
if (null_value)
return 0;
- if (!result.length() && tree)
+ if (no_appended && tree)
/* Tree is used for sorting as in ORDER BY */
tree_walk(tree, (tree_walk_action)&dump_leaf_key, (void*)this,
left_root_right);
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc
index 300d0788f55..3d4a6de83ac 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -1651,8 +1651,7 @@ bool Item_func_now::get_date(MYSQL_TIME *res,
int Item_func_now::save_in_field(Field *to, bool no_conversions)
{
to->set_notnull();
- to->store_time(&ltime, MYSQL_TIMESTAMP_DATETIME);
- return 0;
+ return to->store_time(&ltime, MYSQL_TIMESTAMP_DATETIME);
}
@@ -2587,6 +2586,13 @@ bool Item_date_typecast::get_date(MYSQL_TIME *ltime, uint fuzzy_date)
}
+bool Item_date_typecast::get_time(MYSQL_TIME *ltime)
+{
+ bzero((char *)ltime, sizeof(MYSQL_TIME));
+ return args[0]->null_value;
+}
+
+
String *Item_date_typecast::val_str(String *str)
{
DBUG_ASSERT(fixed == 1);
@@ -3235,38 +3241,42 @@ get_date_time_result_type(const char *format, uint length)
void Item_func_str_to_date::fix_length_and_dec()
{
- char format_buff[64];
- String format_str(format_buff, sizeof(format_buff), &my_charset_bin), *format;
maybe_null= 1;
decimals=0;
- cached_field_type= MYSQL_TYPE_STRING;
+ cached_field_type= MYSQL_TYPE_DATETIME;
max_length= MAX_DATETIME_FULL_WIDTH*MY_CHARSET_BIN_MB_MAXLEN;
cached_timestamp_type= MYSQL_TIMESTAMP_NONE;
- format= args[1]->val_str(&format_str);
- if (!args[1]->null_value && (const_item= args[1]->const_item()))
+ if ((const_item= args[1]->const_item()))
{
- cached_format_type= get_date_time_result_type(format->ptr(),
- format->length());
- switch (cached_format_type) {
- case DATE_ONLY:
- cached_timestamp_type= MYSQL_TIMESTAMP_DATE;
- cached_field_type= MYSQL_TYPE_DATE;
- max_length= MAX_DATE_WIDTH*MY_CHARSET_BIN_MB_MAXLEN;
- break;
- case TIME_ONLY:
- case TIME_MICROSECOND:
- cached_timestamp_type= MYSQL_TIMESTAMP_TIME;
- cached_field_type= MYSQL_TYPE_TIME;
- max_length= MAX_TIME_WIDTH*MY_CHARSET_BIN_MB_MAXLEN;
- break;
- default:
- cached_timestamp_type= MYSQL_TIMESTAMP_DATETIME;
- cached_field_type= MYSQL_TYPE_DATETIME;
- break;
+ char format_buff[64];
+ String format_str(format_buff, sizeof(format_buff), &my_charset_bin);
+ String *format= args[1]->val_str(&format_str);
+ if (!args[1]->null_value)
+ {
+ cached_format_type= get_date_time_result_type(format->ptr(),
+ format->length());
+ switch (cached_format_type) {
+ case DATE_ONLY:
+ cached_timestamp_type= MYSQL_TIMESTAMP_DATE;
+ cached_field_type= MYSQL_TYPE_DATE;
+ max_length= MAX_DATE_WIDTH * MY_CHARSET_BIN_MB_MAXLEN;
+ break;
+ case TIME_ONLY:
+ case TIME_MICROSECOND:
+ cached_timestamp_type= MYSQL_TIMESTAMP_TIME;
+ cached_field_type= MYSQL_TYPE_TIME;
+ max_length= MAX_TIME_WIDTH * MY_CHARSET_BIN_MB_MAXLEN;
+ break;
+ default:
+ cached_timestamp_type= MYSQL_TIMESTAMP_DATETIME;
+ cached_field_type= MYSQL_TYPE_DATETIME;
+ break;
+ }
}
}
}
+
bool Item_func_str_to_date::get_date(MYSQL_TIME *ltime, uint fuzzy_date)
{
DATE_TIME_FORMAT date_time_format;
diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h
index 36556269d07..9be7e97db49 100644
--- a/sql/item_timefunc.h
+++ b/sql/item_timefunc.h
@@ -778,6 +778,7 @@ public:
const char *func_name() const { return "cast_as_date"; }
String *val_str(String *str);
bool get_date(MYSQL_TIME *ltime, uint fuzzy_date);
+ bool get_time(MYSQL_TIME *ltime);
const char *cast_type() const { return "date"; }
enum_field_types field_type() const { return MYSQL_TYPE_DATE; }
Field *tmp_table_field(TABLE *table)
@@ -847,7 +848,9 @@ public:
}
void fix_length_and_dec()
{
- Item_typecast_maybe_null::fix_length_and_dec();
+ collation.set(&my_charset_bin);
+ maybe_null= 1;
+ max_length= MAX_DATETIME_FULL_WIDTH * MY_CHARSET_BIN_MB_MAXLEN;
decimals= DATETIME_DEC;
}
bool result_as_longlong() { return TRUE; }
@@ -938,7 +941,10 @@ class Item_func_maketime :public Item_str_timefunc
{
public:
Item_func_maketime(Item *a, Item *b, Item *c)
- :Item_str_timefunc(a, b ,c) {}
+ :Item_str_timefunc(a, b, c)
+ {
+ maybe_null= TRUE;
+ }
String *val_str(String *str);
const char *func_name() const { return "maketime"; }
};
@@ -1007,7 +1013,7 @@ class Item_func_str_to_date :public Item_str_func
bool const_item;
public:
Item_func_str_to_date(Item *a, Item *b)
- :Item_str_func(a, b)
+ :Item_str_func(a, b), const_item(false)
{}
String *val_str(String *str);
bool get_date(MYSQL_TIME *ltime, uint fuzzy_date);
diff --git a/sql/item_xmlfunc.cc b/sql/item_xmlfunc.cc
index 15be9c97b6e..68d85418324 100644
--- a/sql/item_xmlfunc.cc
+++ b/sql/item_xmlfunc.cc
@@ -2580,7 +2580,8 @@ void Item_xml_str_func::fix_length_and_dec()
return;
}
- xp= args[1]->val_str(&tmp);
+ if (!(xp= args[1]->val_str(&tmp)))
+ return;
my_xpath_init(&xpath);
xpath.cs= collation.collation;
xpath.debug= 0;
@@ -2611,35 +2612,27 @@ typedef struct
uint level;
String *pxml; // parsed XML
uint pos[MAX_LEVEL]; // Tag position stack
+ uint parent; // Offset of the parent of the current node
} MY_XML_USER_DATA;
-/*
- Find the parent node
-
- SYNOPSYS
- Find the parent node, i.e. a tag or attrubute node on the given level.
-
- RETURN
- 1 - success
- 0 - failure
-*/
-static uint xml_parent_tag(MY_XML_NODE *items, uint nitems, uint level)
+static bool
+append_node(String *str, MY_XML_NODE *node)
{
- if (!nitems)
- return 0;
-
- MY_XML_NODE *p, *last= &items[nitems-1];
- for (p= last; p >= items; p--)
- {
- if (p->level == level &&
- (p->type == MY_XML_NODE_TAG ||
- p->type == MY_XML_NODE_ATTR))
- {
- return p - items;
- }
- }
- return 0;
+ /*
+ If "str" doesn't have space for a new node,
+ it will allocate two times more space that it has had so far.
+ (2*len+512) is a heuristic value,
+ which gave the best performance during tests.
+ The ideas behind this formula are:
+ - It allows to have a very small number of reallocs:
+ about 10 reallocs on a 1Mb-long XML value.
+ - At the same time, it avoids excessive memory use.
+ */
+ if (str->reserve(sizeof(MY_XML_NODE), 2 * str->length() + 512))
+ return TRUE;
+ str->q_append((const char*) node, sizeof(MY_XML_NODE));
+ return FALSE;
}
@@ -2661,19 +2654,17 @@ extern "C" int xml_enter(MY_XML_PARSER *st,const char *attr, size_t len);
int xml_enter(MY_XML_PARSER *st,const char *attr, size_t len)
{
MY_XML_USER_DATA *data= (MY_XML_USER_DATA*)st->user_data;
- MY_XML_NODE *nodes= (MY_XML_NODE*) data->pxml->ptr();
uint numnodes= data->pxml->length() / sizeof(MY_XML_NODE);
- uint parent= xml_parent_tag(nodes, numnodes, data->level - 1);
MY_XML_NODE node;
+ node.parent= data->parent; // Set parent for the new node to old parent
+ data->parent= numnodes; // Remember current node as new parent
data->pos[data->level]= numnodes;
node.level= data->level++;
node.type= st->current_node_type; // TAG or ATTR
node.beg= attr;
node.end= attr + len;
- node.parent= parent;
- data->pxml->append((const char*) &node, sizeof(MY_XML_NODE));
- return MY_XML_OK;
+ return append_node(data->pxml, &node) ? MY_XML_ERROR : MY_XML_OK;
}
@@ -2694,18 +2685,14 @@ extern "C" int xml_value(MY_XML_PARSER *st,const char *attr, size_t len);
int xml_value(MY_XML_PARSER *st,const char *attr, size_t len)
{
MY_XML_USER_DATA *data= (MY_XML_USER_DATA*)st->user_data;
- MY_XML_NODE *nodes= (MY_XML_NODE*) data->pxml->ptr();
- uint numnodes= data->pxml->length() / sizeof(MY_XML_NODE);
- uint parent= xml_parent_tag(nodes, numnodes, data->level - 1);
MY_XML_NODE node;
+ node.parent= data->parent; // Set parent for the new text node to old parent
node.level= data->level;
node.type= MY_XML_NODE_TEXT;
node.beg= attr;
node.end= attr + len;
- node.parent= parent;
- data->pxml->append((const char*) &node, sizeof(MY_XML_NODE));
- return MY_XML_OK;
+ return append_node(data->pxml, &node) ? MY_XML_ERROR : MY_XML_OK;
}
@@ -2730,6 +2717,7 @@ int xml_leave(MY_XML_PARSER *st,const char *attr, size_t len)
data->level--;
MY_XML_NODE *nodes= (MY_XML_NODE*) data->pxml->ptr();
+ data->parent= nodes[data->parent].parent;
nodes+= data->pos[data->level];
nodes->tagend= st->cur;
@@ -2760,6 +2748,7 @@ String *Item_xml_str_func::parse_xml(String *raw_xml, String *parsed_xml_buf)
p.flags= MY_XML_FLAG_RELATIVE_NAMES | MY_XML_FLAG_SKIP_TEXT_NORMALIZATION;
user_data.level= 0;
user_data.pxml= parsed_xml_buf;
+ user_data.parent= 0;
my_xml_set_enter_handler(&p, xml_enter);
my_xml_set_value_handler(&p, xml_value);
my_xml_set_leave_handler(&p, xml_leave);
diff --git a/sql/item_xmlfunc.h b/sql/item_xmlfunc.h
index 278c98baf7c..dadbb5ccf42 100644
--- a/sql/item_xmlfunc.h
+++ b/sql/item_xmlfunc.h
@@ -28,8 +28,16 @@ protected:
String tmp_value, pxml;
Item *nodeset_func;
public:
- Item_xml_str_func(Item *a, Item *b): Item_str_func(a,b) {}
- Item_xml_str_func(Item *a, Item *b, Item *c): Item_str_func(a,b,c) {}
+ Item_xml_str_func(Item *a, Item *b):
+ Item_str_func(a,b)
+ {
+ maybe_null= TRUE;
+ }
+ Item_xml_str_func(Item *a, Item *b, Item *c):
+ Item_str_func(a,b,c)
+ {
+ maybe_null= TRUE;
+ }
void fix_length_and_dec();
String *parse_xml(String *raw_xml, String *parsed_xml_buf);
};
diff --git a/sql/key.cc b/sql/key.cc
index e8354ed2635..6ddfe10848f 100644
--- a/sql/key.cc
+++ b/sql/key.cc
@@ -127,19 +127,6 @@ void key_copy(uchar *to_key, uchar *from_record, KEY *key_info,
key_part->null_bit);
key_length--;
}
- if (key_part->type == HA_KEYTYPE_BIT)
- {
- Field_bit *field= (Field_bit *) (key_part->field);
- if (field->bit_len)
- {
- uchar bits= get_rec_bits(from_record +
- key_part->null_offset +
- (key_part->null_bit == 128),
- field->bit_ofs, field->bit_len);
- *to_key++= bits;
- key_length--;
- }
- }
if (key_part->key_part_flag & HA_BLOB_PART ||
key_part->key_part_flag & HA_VAR_LENGTH_PART)
{
diff --git a/sql/lock.cc b/sql/lock.cc
index d43ec116a28..dd0863e1bfa 100644
--- a/sql/lock.cc
+++ b/sql/lock.cc
@@ -847,9 +847,6 @@ static MYSQL_LOCK *get_lock_data(THD *thd, TABLE **table_ptr, uint count,
locks= locks_buf= sql_lock->locks= (THR_LOCK_DATA**) (sql_lock + 1);
to= table_buf= sql_lock->table= (TABLE**) (locks + tables * 2);
sql_lock->table_count=lock_count;
- sql_lock->lock_count=tables;
- DBUG_PRINT("info", ("sql_lock->table_count %d sql_lock->lock_count %d",
- sql_lock->table_count, sql_lock->lock_count));
for (i=0 ; i < count ; i++)
{
@@ -889,6 +886,23 @@ static MYSQL_LOCK *get_lock_data(THD *thd, TABLE **table_ptr, uint count,
for ( ; org_locks != locks ; org_locks++)
(*org_locks)->debug_print_param= (void *) table;
}
+ /*
+ We do not use 'tables', because there are cases where store_lock()
+ returns less locks than lock_count() claimed. This can happen when
+ a FLUSH TABLES tries to abort locks from a MERGE table of another
+ thread. When that thread has just opened the table, but not yet
+ attached its children, it cannot return the locks. lock_count()
+ always returns the number of locks that an attached table has.
+ This is done to avoid the reverse situation: If lock_count() would
+ return 0 for a non-attached MERGE table, and that table becomes
+ attached between the calls to lock_count() and store_lock(), then
+ we would have allocated too little memory for the lock data. Now
+ we may allocate too much, but better safe than memory overrun.
+ And in the FLUSH case, the memory is released quickly anyway.
+ */
+ sql_lock->lock_count= locks - locks_buf;
+ DBUG_PRINT("info", ("sql_lock->table_count %d sql_lock->lock_count %d",
+ sql_lock->table_count, sql_lock->lock_count));
DBUG_RETURN(sql_lock);
}
diff --git a/sql/log.cc b/sql/log.cc
index f8c78b03228..d1b662badc5 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -72,13 +72,14 @@ public:
virtual ~Silence_log_table_errors() {}
- virtual bool handle_error(uint sql_errno,
+ virtual bool handle_error(uint sql_errno, const char *message,
MYSQL_ERROR::enum_warning_level level,
THD *thd);
};
bool
Silence_log_table_errors::handle_error(uint /* sql_errno */,
+ const char * /* message */,
MYSQL_ERROR::enum_warning_level /* level */,
THD * /* thd */)
{
@@ -387,10 +388,15 @@ bool Log_to_csv_event_handler::
if (table->field[1]->store(user_host, user_host_len, client_cs) ||
table->field[2]->store((longlong) thread_id, TRUE) ||
table->field[3]->store((longlong) server_id, TRUE) ||
- table->field[4]->store(command_type, command_type_len, client_cs) ||
- table->field[5]->store(sql_text, sql_text_len, client_cs))
+ table->field[4]->store(command_type, command_type_len, client_cs))
goto err;
+ /*
+ A positive return value in store() means truncation.
+ Still logging a message in the log in this case.
+ */
+ if (table->field[5]->store(sql_text, sql_text_len, client_cs) < 0)
+ goto err;
/* mark all fields as not null */
table->field[1]->set_notnull();
@@ -407,19 +413,14 @@ bool Log_to_csv_event_handler::
/* log table entries are not replicated */
if (table->file->ha_write_row(table->record[0]))
- {
- struct tm start;
- localtime_r(&event_time, &start);
-
- sql_print_error("%02d%02d%02d %2d:%02d:%02d - Failed to write to mysql.general_log",
- start.tm_year % 100, start.tm_mon + 1,
- start.tm_mday, start.tm_hour,
- start.tm_min, start.tm_sec);
- }
+ goto err;
result= FALSE;
err:
+ if (result)
+ sql_print_error("Failed to write to mysql.general_log");
+
if (need_rnd_end)
{
table->file->ha_rnd_end();
@@ -595,25 +596,24 @@ bool Log_to_csv_event_handler::
goto err;
table->field[9]->set_notnull();
- /* sql_text */
- if (table->field[10]->store(sql_text,sql_text_len, client_cs))
+ /*
+ Column sql_text.
+ A positive return value in store() means truncation.
+ Still logging a message in the log in this case.
+ */
+ if (table->field[10]->store(sql_text, sql_text_len, client_cs) < 0)
goto err;
/* log table entries are not replicated */
if (table->file->ha_write_row(table->record[0]))
- {
- struct tm start;
- localtime_r(&current_time, &start);
-
- sql_print_error("%02d%02d%02d %2d:%02d:%02d - Failed to write to mysql.slow_log",
- start.tm_year % 100, start.tm_mon + 1,
- start.tm_mday, start.tm_hour,
- start.tm_min, start.tm_sec);
- }
+ goto err;
result= FALSE;
err:
+ if (result)
+ sql_print_error("Failed to write to mysql.slow_log");
+
if (need_rnd_end)
{
table->file->ha_rnd_end();
@@ -945,73 +945,65 @@ bool LOGGER::slow_log_print(THD *thd, const char *query, uint query_length,
return error;
}
-bool LOGGER::general_log_print(THD *thd, enum enum_server_command command,
- const char *format, va_list args)
+bool LOGGER::general_log_write(THD *thd, enum enum_server_command command,
+ const char *query, uint query_length)
{
bool error= FALSE;
Log_event_handler **current_handler= general_log_handler_list;
+ char user_host_buff[MAX_USER_HOST_SIZE];
+ Security_context *sctx= thd->security_ctx;
+ ulong id;
+ uint user_host_len= 0;
+ time_t current_time;
- /*
- Print the message to the buffer if we have at least one log event handler
- enabled and want to log this king of commands
- */
- if (*general_log_handler_list && (what_to_log & (1L << (uint) command)))
- {
- char message_buff[MAX_LOG_BUFFER_SIZE];
- char user_host_buff[MAX_USER_HOST_SIZE];
- Security_context *sctx= thd->security_ctx;
- ulong id;
- uint message_buff_len= 0, user_host_len= 0;
- time_t current_time;
- if (thd)
- { /* Normal thread */
- if ((thd->options & OPTION_LOG_OFF)
-#ifndef NO_EMBEDDED_ACCESS_CHECKS
- && (sctx->master_access & SUPER_ACL)
-#endif
- )
- {
- return 0; /* No logging */
- }
- id= thd->thread_id;
- }
- else
- id=0; /* Log from connect handler */
+ if (thd)
+ id= thd->thread_id; /* Normal thread */
+ else
+ id= 0; /* Log from connect handler */
- lock_shared();
- if (!opt_log)
- {
- unlock();
- return 0;
- }
- user_host_len= strxnmov(user_host_buff, MAX_USER_HOST_SIZE,
- sctx->priv_user ? sctx->priv_user : "", "[",
- sctx->user ? sctx->user : "", "] @ ",
- sctx->host ? sctx->host : "", " [",
- sctx->ip ? sctx->ip : "", "]", NullS) -
- user_host_buff;
-
- /* prepare message */
- if (format)
- message_buff_len= my_vsnprintf(message_buff,
- sizeof(message_buff), format, args);
- else
- message_buff[0]= '\0';
-
- current_time= my_time(0);
- while (*current_handler)
- error+= (*current_handler++)->
- log_general(thd, current_time, user_host_buff,
- user_host_len, id,
- command_name[(uint) command].str,
- command_name[(uint) command].length,
- message_buff, message_buff_len,
- thd->variables.character_set_client) || error;
+ lock_shared();
+ if (!opt_log)
+ {
unlock();
+ return 0;
}
+ user_host_len= strxnmov(user_host_buff, MAX_USER_HOST_SIZE,
+ sctx->priv_user ? sctx->priv_user : "", "[",
+ sctx->user ? sctx->user : "", "] @ ",
+ sctx->host ? sctx->host : "", " [",
+ sctx->ip ? sctx->ip : "", "]", NullS) -
+ user_host_buff;
+
+ current_time= my_time(0);
+ while (*current_handler)
+ error+= (*current_handler++)->
+ log_general(thd, current_time, user_host_buff,
+ user_host_len, id,
+ command_name[(uint) command].str,
+ command_name[(uint) command].length,
+ query, query_length,
+ thd->variables.character_set_client) || error;
+ unlock();
+
return error;
}
+bool LOGGER::general_log_print(THD *thd, enum enum_server_command command,
+ const char *format, va_list args)
+{
+ uint message_buff_len= 0;
+ char message_buff[MAX_LOG_BUFFER_SIZE];
+
+ /* prepare message */
+ if (format)
+ message_buff_len= my_vsnprintf(message_buff, sizeof(message_buff),
+ format, args);
+ else
+ message_buff[0]= '\0';
+
+ return general_log_write(thd, command, message_buff, message_buff_len);
+}
+
void LOGGER::init_error_log(uint error_log_printer)
{
if (error_log_printer & LOG_NONE)
@@ -2076,10 +2068,10 @@ bool MYSQL_QUERY_LOG::write(THD *thd, time_t current_time,
if (my_b_write(&log_file, (uchar*) buff, buff_len))
tmp_errno= errno;
}
- if (my_b_printf(&log_file, "# User@Host: ", sizeof("# User@Host: ") - 1)
- != sizeof("# User@Host: ") - 1)
+ const uchar uh[]= "# User@Host: ";
+ if (my_b_write(&log_file, uh, sizeof(uh) - 1))
tmp_errno= errno;
- if (my_b_printf(&log_file, user_host, user_host_len) != user_host_len)
+ if (my_b_write(&log_file, (uchar*) user_host, user_host_len))
tmp_errno= errno;
if (my_b_write(&log_file, (uchar*) "\n", 1))
tmp_errno= errno;
@@ -2166,13 +2158,9 @@ const char *MYSQL_LOG::generate_name(const char *log_name,
{
if (!log_name || !log_name[0])
{
- /*
- TODO: The following should be using fn_format(); We just need to
- first change fn_format() to cut the file name if it's too long.
- */
- strmake(buff, pidfile_name, FN_REFLEN - 5);
- strmov(fn_ext(buff), suffix);
- return (const char *)buff;
+ strmake(buff, pidfile_name, FN_REFLEN - strlen(suffix) - 1);
+ return (const char *)
+ fn_format(buff, buff, "", suffix, MYF(MY_REPLACE_EXT|MY_REPLACE_DIR));
}
// get rid of extension if the log is binary to avoid problems
if (strip_ext)
@@ -2905,8 +2893,8 @@ int MYSQL_BIN_LOG::purge_logs(const char *to_log,
*decrease_log_space-= file_size;
ha_binlog_index_purge_file(current_thd, log_info.log_file_name);
- if (current_thd->query_error) {
- DBUG_PRINT("info",("query error: %d", current_thd->query_error));
+ if (current_thd->is_slave_error) {
+ DBUG_PRINT("info",("slave error: %d", current_thd->is_slave_error));
if (my_errno == EMFILE) {
DBUG_PRINT("info",("my_errno: %d, set ret = LOG_INFO_EMFILE", my_errno));
ret = LOG_INFO_EMFILE;
@@ -3582,9 +3570,6 @@ bool MYSQL_BIN_LOG::write(Log_event *event_info)
(!binlog_filter->db_ok(local_db)))
{
VOID(pthread_mutex_unlock(&LOCK_log));
- DBUG_PRINT("info",("OPTION_BIN_LOG is %s, db_ok('%s') == %d",
- (thd->options & OPTION_BIN_LOG) ? "set" : "clear",
- local_db, binlog_filter->db_ok(local_db)));
DBUG_RETURN(0);
}
#endif /* HAVE_REPLICATION */
@@ -3742,12 +3727,44 @@ bool slow_log_print(THD *thd, const char *query, uint query_length,
}
+bool LOGGER::log_command(THD *thd, enum enum_server_command command)
+{
+#ifndef NO_EMBEDDED_ACCESS_CHECKS
+ Security_context *sctx= thd->security_ctx;
+#endif
+ /*
+ Log command if we have at least one log event handler enabled and want
+ to log this king of commands
+ */
+ if (*general_log_handler_list && (what_to_log & (1L << (uint) command)))
+ {
+ if ((thd->options & OPTION_LOG_OFF)
+#ifndef NO_EMBEDDED_ACCESS_CHECKS
+ && (sctx->master_access & SUPER_ACL)
+#endif
+ )
+ {
+ /* No logging */
+ return FALSE;
+ }
+
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+
bool general_log_print(THD *thd, enum enum_server_command command,
const char *format, ...)
{
va_list args;
uint error= 0;
+ /* Print the message to the buffer if we want to log this king of commands */
+ if (! logger.log_command(thd, command))
+ return FALSE;
+
va_start(args, format);
error= logger.general_log_print(thd, command, format, args);
va_end(args);
@@ -3755,6 +3772,16 @@ bool general_log_print(THD *thd, enum enum_server_command command,
return error;
}
+bool general_log_write(THD *thd, enum enum_server_command command,
+ const char *query, uint query_length)
+{
+ /* Write the message to the log if we want to log this king of commands */
+ if (logger.log_command(thd, command))
+ return logger.general_log_write(thd, command, query, query_length);
+
+ return FALSE;
+}
+
void MYSQL_BIN_LOG::rotate_and_purge(uint flags)
{
if (!(flags & RP_LOCK_LOG_IS_ALREADY_LOCKED))
diff --git a/sql/log.h b/sql/log.h
index e597c986794..20a1b7e8e6d 100644
--- a/sql/log.h
+++ b/sql/log.h
@@ -130,7 +130,13 @@ typedef struct st_log_info
my_off_t pos;
bool fatal; // if the purge happens to give us a negative offset
pthread_mutex_t lock;
- st_log_info():fatal(0) { pthread_mutex_init(&lock, MY_MUTEX_INIT_FAST);}
+ st_log_info()
+ : index_file_offset(0), index_file_start_offset(0),
+ pos(0), fatal(0)
+ {
+ log_file_name[0] = '\0';
+ pthread_mutex_init(&lock, MY_MUTEX_INIT_FAST);
+ }
~st_log_info() { pthread_mutex_destroy(&lock);}
} LOG_INFO;
@@ -499,6 +505,8 @@ public:
void lock_exclusive() { rw_wrlock(&LOCK_logger); }
void unlock() { rw_unlock(&LOCK_logger); }
bool is_log_table_enabled(uint log_table_type);
+ bool log_command(THD *thd, enum enum_server_command command);
+
/*
We want to initialize all log mutexes as soon as possible,
but we cannot do it in constructor, as safe_mutex relies on
@@ -518,6 +526,8 @@ public:
ulonglong current_utime);
bool general_log_print(THD *thd,enum enum_server_command command,
const char *format, va_list args);
+ bool general_log_write(THD *thd, enum enum_server_command command,
+ const char *query, uint query_length);
/* we use this function to setup all enabled log event handlers */
int set_handlers(uint error_log_printer,
diff --git a/sql/log_event.cc b/sql/log_event.cc
index d8e22953fc2..2b3037aedcc 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -36,6 +36,64 @@
#define FLAGSTR(V,F) ((V)&(F)?#F" ":"")
+#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION) && !defined(DBUG_OFF) && !defined(_lint)
+static const char *HA_ERR(int i)
+{
+ switch (i) {
+ case HA_ERR_KEY_NOT_FOUND: return "HA_ERR_KEY_NOT_FOUND";
+ case HA_ERR_FOUND_DUPP_KEY: return "HA_ERR_FOUND_DUPP_KEY";
+ case HA_ERR_RECORD_CHANGED: return "HA_ERR_RECORD_CHANGED";
+ case HA_ERR_WRONG_INDEX: return "HA_ERR_WRONG_INDEX";
+ case HA_ERR_CRASHED: return "HA_ERR_CRASHED";
+ case HA_ERR_WRONG_IN_RECORD: return "HA_ERR_WRONG_IN_RECORD";
+ case HA_ERR_OUT_OF_MEM: return "HA_ERR_OUT_OF_MEM";
+ case HA_ERR_NOT_A_TABLE: return "HA_ERR_NOT_A_TABLE";
+ case HA_ERR_WRONG_COMMAND: return "HA_ERR_WRONG_COMMAND";
+ case HA_ERR_OLD_FILE: return "HA_ERR_OLD_FILE";
+ case HA_ERR_NO_ACTIVE_RECORD: return "HA_ERR_NO_ACTIVE_RECORD";
+ case HA_ERR_RECORD_DELETED: return "HA_ERR_RECORD_DELETED";
+ case HA_ERR_RECORD_FILE_FULL: return "HA_ERR_RECORD_FILE_FULL";
+ case HA_ERR_INDEX_FILE_FULL: return "HA_ERR_INDEX_FILE_FULL";
+ case HA_ERR_END_OF_FILE: return "HA_ERR_END_OF_FILE";
+ case HA_ERR_UNSUPPORTED: return "HA_ERR_UNSUPPORTED";
+ case HA_ERR_TO_BIG_ROW: return "HA_ERR_TO_BIG_ROW";
+ case HA_WRONG_CREATE_OPTION: return "HA_WRONG_CREATE_OPTION";
+ case HA_ERR_FOUND_DUPP_UNIQUE: return "HA_ERR_FOUND_DUPP_UNIQUE";
+ case HA_ERR_UNKNOWN_CHARSET: return "HA_ERR_UNKNOWN_CHARSET";
+ case HA_ERR_WRONG_MRG_TABLE_DEF: return "HA_ERR_WRONG_MRG_TABLE_DEF";
+ case HA_ERR_CRASHED_ON_REPAIR: return "HA_ERR_CRASHED_ON_REPAIR";
+ case HA_ERR_CRASHED_ON_USAGE: return "HA_ERR_CRASHED_ON_USAGE";
+ case HA_ERR_LOCK_WAIT_TIMEOUT: return "HA_ERR_LOCK_WAIT_TIMEOUT";
+ case HA_ERR_LOCK_TABLE_FULL: return "HA_ERR_LOCK_TABLE_FULL";
+ case HA_ERR_READ_ONLY_TRANSACTION: return "HA_ERR_READ_ONLY_TRANSACTION";
+ case HA_ERR_LOCK_DEADLOCK: return "HA_ERR_LOCK_DEADLOCK";
+ case HA_ERR_CANNOT_ADD_FOREIGN: return "HA_ERR_CANNOT_ADD_FOREIGN";
+ case HA_ERR_NO_REFERENCED_ROW: return "HA_ERR_NO_REFERENCED_ROW";
+ case HA_ERR_ROW_IS_REFERENCED: return "HA_ERR_ROW_IS_REFERENCED";
+ case HA_ERR_NO_SAVEPOINT: return "HA_ERR_NO_SAVEPOINT";
+ case HA_ERR_NON_UNIQUE_BLOCK_SIZE: return "HA_ERR_NON_UNIQUE_BLOCK_SIZE";
+ case HA_ERR_NO_SUCH_TABLE: return "HA_ERR_NO_SUCH_TABLE";
+ case HA_ERR_TABLE_EXIST: return "HA_ERR_TABLE_EXIST";
+ case HA_ERR_NO_CONNECTION: return "HA_ERR_NO_CONNECTION";
+ case HA_ERR_NULL_IN_SPATIAL: return "HA_ERR_NULL_IN_SPATIAL";
+ case HA_ERR_TABLE_DEF_CHANGED: return "HA_ERR_TABLE_DEF_CHANGED";
+ case HA_ERR_NO_PARTITION_FOUND: return "HA_ERR_NO_PARTITION_FOUND";
+ case HA_ERR_RBR_LOGGING_FAILED: return "HA_ERR_RBR_LOGGING_FAILED";
+ case HA_ERR_DROP_INDEX_FK: return "HA_ERR_DROP_INDEX_FK";
+ case HA_ERR_FOREIGN_DUPLICATE_KEY: return "HA_ERR_FOREIGN_DUPLICATE_KEY";
+ case HA_ERR_TABLE_NEEDS_UPGRADE: return "HA_ERR_TABLE_NEEDS_UPGRADE";
+ case HA_ERR_TABLE_READONLY: return "HA_ERR_TABLE_READONLY";
+ case HA_ERR_AUTOINC_READ_FAILED: return "HA_ERR_AUTOINC_READ_FAILED";
+ case HA_ERR_AUTOINC_ERANGE: return "HA_ERR_AUTOINC_ERANGE";
+ case HA_ERR_GENERIC: return "HA_ERR_GENERIC";
+ case HA_ERR_RECORD_IS_THE_SAME: return "HA_ERR_RECORD_IS_THE_SAME";
+ case HA_ERR_LOGGING_IMPOSSIBLE: return "HA_ERR_LOGGING_IMPOSSIBLE";
+ case HA_ERR_CORRUPT_EVENT: return "HA_ERR_CORRUPT_EVENT";
+ }
+ return "<unknown error>";
+}
+#endif
+
/*
Cache that will automatically be written to a dedicated file on
destruction.
@@ -114,6 +172,9 @@ private:
flag_set m_flags;
};
+#ifndef DBUG_OFF
+uint debug_not_change_ts_if_art_event= 1; // bug#29309 simulation
+#endif
/*
pretty_print_str()
@@ -148,7 +209,7 @@ static void pretty_print_str(IO_CACHE* cache, char* str, int len)
static void clear_all_errors(THD *thd, Relay_log_info *rli)
{
- thd->query_error = 0;
+ thd->is_slave_error = 0;
thd->clear_error();
rli->clear_error();
}
@@ -555,8 +616,32 @@ int Log_event::do_update_pos(Relay_log_info *rli)
Matz: I don't think we will need this check with this refactoring.
*/
if (rli)
- rli->stmt_done(log_pos, when);
-
+ {
+ /*
+ bug#29309 simulation: resetting the flag to force
+ wrong behaviour of artificial event to update
+ rli->last_master_timestamp for only one time -
+ the first FLUSH LOGS in the test.
+ */
+ DBUG_EXECUTE_IF("let_first_flush_log_change_timestamp",
+ if (debug_not_change_ts_if_art_event == 1
+ && is_artificial_event())
+ {
+ debug_not_change_ts_if_art_event= 0;
+ });
+#ifndef DBUG_OFF
+ rli->stmt_done(log_pos,
+ is_artificial_event() &&
+ debug_not_change_ts_if_art_event > 0 ? 0 : when);
+#else
+ rli->stmt_done(log_pos, is_artificial_event()? 0 : when);
+#endif
+ DBUG_EXECUTE_IF("let_first_flush_log_change_timestamp",
+ if (debug_not_change_ts_if_art_event == 0)
+ {
+ debug_not_change_ts_if_art_event= 2;
+ });
+ }
return 0; // Cannot fail currently
}
@@ -570,7 +655,8 @@ Log_event::do_shall_skip(Relay_log_info *rli)
(ulong) server_id, (ulong) ::server_id,
rli->replicate_same_server_id,
rli->slave_skip_counter));
- if (server_id == ::server_id && !rli->replicate_same_server_id)
+ if (server_id == ::server_id && !rli->replicate_same_server_id ||
+ rli->slave_skip_counter == 1 && rli->is_in_group())
return EVENT_SKIP_IGNORE;
else if (rli->slave_skip_counter > 0)
return EVENT_SKIP_COUNT;
@@ -1227,6 +1313,16 @@ void Log_event::print_timestamp(IO_CACHE* file, time_t* ts)
#endif /* MYSQL_CLIENT */
+#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
+inline Log_event::enum_skip_reason
+Log_event::continue_group(Relay_log_info *rli)
+{
+ if (rli->slave_skip_counter == 1)
+ return Log_event::EVENT_SKIP_IGNORE;
+ return Log_event::do_shall_skip(rli);
+}
+#endif
+
/**************************************************************************
Query_log_event methods
**************************************************************************/
@@ -1290,6 +1386,11 @@ static void write_str_with_code_and_len(char **dst, const char *src,
bool Query_log_event::write(IO_CACHE* file)
{
+ /**
+ @todo if catalog can be of length FN_REFLEN==512, then we are not
+ replicating it correctly, since the length is stored in a byte
+ /sven
+ */
uchar buf[QUERY_HEADER_LEN+
1+4+ // code of flags2 and flags2
1+8+ // code of sql_mode and sql_mode
@@ -1516,6 +1617,10 @@ Query_log_event::Query_log_event(THD* thd_arg, const char* query_arg,
time(&end_time);
exec_time = (ulong) (end_time - thd_arg->start_time);
+ /**
+ @todo this means that if we have no catalog, then it is replicated
+ as an existing catalog of length zero. is that safe? /sven
+ */
catalog_len = (catalog) ? (uint32) strlen(catalog) : 0;
/* status_vars_len is set just before writing the event */
db_len = (db) ? (uint32) strlen(db) : 0;
@@ -1525,7 +1630,7 @@ Query_log_event::Query_log_event(THD* thd_arg, const char* query_arg,
/*
If we don't use flags2 for anything else than options contained in
thd_arg->options, it would be more efficient to flags2=thd_arg->options
- (OPTIONS_WRITTEN_TO_BINLOG would be used only at reading time).
+ (OPTIONS_WRITTEN_TO_BIN_LOG would be used only at reading time).
But it's likely that we don't want to use 32 bits for 3 bits; in the future
we will probably want to reclaim the 29 bits. So we need the &.
*/
@@ -1556,18 +1661,48 @@ Query_log_event::Query_log_event(THD* thd_arg, const char* query_arg,
/* 2 utility functions for the next method */
-/*
- Get the pointer for a string (src) that contains the length in
- the first byte. Set the output string (dst) to the string value
- and place the length of the string in the byte after the string.
+/**
+ Read a string with length from memory.
+
+ This function reads the string-with-length stored at
+ <code>src</code> and extract the length into <code>*len</code> and
+ a pointer to the start of the string into <code>*dst</code>. The
+ string can then be copied using <code>memcpy()</code> with the
+ number of bytes given in <code>*len</code>.
+
+ @param src Pointer to variable holding a pointer to the memory to
+ read the string from.
+ @param dst Pointer to variable holding a pointer where the actual
+ string starts. Starting from this position, the string
+ can be copied using @c memcpy().
+ @param len Pointer to variable where the length will be stored.
+ @param end One-past-the-end of the memory where the string is
+ stored.
+
+ @return Zero if the entire string can be copied successfully,
+ @c UINT_MAX if the length could not be read from memory
+ (that is, if <code>*src >= end</code>), otherwise the
+ number of bytes that are missing to read the full
+ string, which happends <code>*dst + *len >= end</code>.
*/
-static void get_str_len_and_pointer(const Log_event::Byte **src,
- const char **dst,
- uint *len)
-{
- if ((*len= **src))
- *dst= (char *)*src + 1; // Will be copied later
- (*src)+= *len + 1;
+static int
+get_str_len_and_pointer(const Log_event::Byte **src,
+ const char **dst,
+ uint *len,
+ const Log_event::Byte *end)
+{
+ if (*src >= end)
+ return -1; // Will be UINT_MAX in two-complement arithmetics
+ uint length= **src;
+ if (length > 0)
+ {
+ if (*src + length >= end)
+ return *src + length - end + 1; // Number of bytes missing
+ *dst= (char *)*src + 1; // Will be copied later
+ }
+ *len= length;
+ *src+= length + 1;
+ return 0;
}
static void copy_str_and_move(const char **src,
@@ -1580,6 +1715,46 @@ static void copy_str_and_move(const char **src,
*(*dst)++= 0;
}
+
+#ifndef DBUG_OFF
+static char const *
+code_name(int code)
+{
+ static char buf[255];
+ switch (code) {
+ case Q_FLAGS2_CODE: return "Q_FLAGS2_CODE";
+ case Q_SQL_MODE_CODE: return "Q_SQL_MODE_CODE";
+ case Q_CATALOG_CODE: return "Q_CATALOG_CODE";
+ case Q_AUTO_INCREMENT: return "Q_AUTO_INCREMENT";
+ case Q_CHARSET_CODE: return "Q_CHARSET_CODE";
+ case Q_TIME_ZONE_CODE: return "Q_TIME_ZONE_CODE";
+ case Q_CATALOG_NZ_CODE: return "Q_CATALOG_NZ_CODE";
+ case Q_LC_TIME_NAMES_CODE: return "Q_LC_TIME_NAMES_CODE";
+ case Q_CHARSET_DATABASE_CODE: return "Q_CHARSET_DATABASE_CODE";
+ }
+ sprintf(buf, "CODE#%d", code);
+ return buf;
+}
+#endif
+
+/**
+ Macro to check that there is enough space to read from memory.
+
+ @param PTR Pointer to memory
+ @param END End of memory
+ @param CNT Number of bytes that should be read.
+ */
+#define CHECK_SPACE(PTR,END,CNT) \
+ do { \
+ DBUG_PRINT("info", ("Read %s", code_name(pos[-1]))); \
+ DBUG_ASSERT((PTR) + (CNT) <= (END)); \
+ if ((PTR) + (CNT) > (END)) { \
+ DBUG_PRINT("info", ("query= 0")); \
+ query= 0; \
+ DBUG_VOID_RETURN; \
+ } \
+ } while (0)
+
/*
Query_log_event::Query_log_event()
This is used by the SQL slave thread to prepare the event before execution.
@@ -1632,6 +1807,19 @@ Query_log_event::Query_log_event(const char* buf, uint event_len,
if (tmp)
{
status_vars_len= uint2korr(buf + Q_STATUS_VARS_LEN_OFFSET);
+ /*
+ Check if status variable length is corrupt and will lead to very
+ wrong data. We could be even more strict and require data_len to
+ be even bigger, but this will suffice to catch most corruption
+ errors that can lead to a crash.
+ */
+ if (status_vars_len > min(data_len, MAX_SIZE_LOG_EVENT_STATUS))
+ {
+ DBUG_PRINT("info", ("status_vars_len (%u) > data_len (%lu); query= 0",
+ status_vars_len, data_len));
+ query= 0;
+ DBUG_VOID_RETURN;
+ }
data_len-= status_vars_len;
DBUG_PRINT("info", ("Query_log_event has status_vars_len: %u",
(uint) status_vars_len));
@@ -1651,6 +1839,7 @@ Query_log_event::Query_log_event(const char* buf, uint event_len,
{
switch (*pos++) {
case Q_FLAGS2_CODE:
+ CHECK_SPACE(pos, end, 4);
flags2_inited= 1;
flags2= uint4korr(pos);
DBUG_PRINT("info",("In Query_log_event, read flags2: %lu", (ulong) flags2));
@@ -1661,6 +1850,7 @@ Query_log_event::Query_log_event(const char* buf, uint event_len,
#ifndef DBUG_OFF
char buff[22];
#endif
+ CHECK_SPACE(pos, end, 8);
sql_mode_inited= 1;
sql_mode= (ulong) uint8korr(pos); // QQ: Fix when sql_mode is ulonglong
DBUG_PRINT("info",("In Query_log_event, read sql_mode: %s",
@@ -1669,15 +1859,24 @@ Query_log_event::Query_log_event(const char* buf, uint event_len,
break;
}
case Q_CATALOG_NZ_CODE:
- get_str_len_and_pointer(&pos, &catalog, &catalog_len);
+ DBUG_PRINT("info", ("case Q_CATALOG_NZ_CODE; pos: 0x%lx; end: 0x%lx",
+ (ulong) pos, (ulong) end));
+ if (get_str_len_and_pointer(&pos, &catalog, &catalog_len, end))
+ {
+ DBUG_PRINT("info", ("query= 0"));
+ query= 0;
+ DBUG_VOID_RETURN;
+ }
break;
case Q_AUTO_INCREMENT:
+ CHECK_SPACE(pos, end, 4);
auto_increment_increment= uint2korr(pos);
auto_increment_offset= uint2korr(pos+2);
pos+= 4;
break;
case Q_CHARSET_CODE:
{
+ CHECK_SPACE(pos, end, 6);
charset_inited= 1;
memcpy(charset, pos, 6);
pos+= 6;
@@ -1685,20 +1884,29 @@ Query_log_event::Query_log_event(const char* buf, uint event_len,
}
case Q_TIME_ZONE_CODE:
{
- get_str_len_and_pointer(&pos, &time_zone_str, &time_zone_len);
+ if (get_str_len_and_pointer(&pos, &time_zone_str, &time_zone_len, end))
+ {
+ DBUG_PRINT("info", ("Q_TIME_ZONE_CODE: query= 0"));
+ query= 0;
+ DBUG_VOID_RETURN;
+ }
break;
}
case Q_CATALOG_CODE: /* for 5.0.x where 0<=x<=3 masters */
+ CHECK_SPACE(pos, end, 1);
if ((catalog_len= *pos))
catalog= (char*) pos+1; // Will be copied later
+ CHECK_SPACE(pos, end, catalog_len + 2);
pos+= catalog_len+2; // leap over end 0
catalog_nz= 0; // catalog has end 0 in event
break;
case Q_LC_TIME_NAMES_CODE:
+ CHECK_SPACE(pos, end, 2);
lc_time_names_number= uint2korr(pos);
pos+= 2;
break;
case Q_CHARSET_DATABASE_CODE:
+ CHECK_SPACE(pos, end, 2);
charset_database_number= uint2korr(pos);
pos+= 2;
break;
@@ -1726,6 +1934,11 @@ Query_log_event::Query_log_event(const char* buf, uint event_len,
DBUG_VOID_RETURN;
if (catalog_len) // If catalog is given
{
+ /**
+ @todo we should clean up and do only copy_str_and_move; it
+ works for both cases. Then we can remove the catalog_nz
+ flag. /sven
+ */
if (likely(catalog_nz)) // true except if event comes from 5.0.0|1|2|3.
copy_str_and_move(&catalog, &start, catalog_len);
else
@@ -1738,6 +1951,13 @@ Query_log_event::Query_log_event(const char* buf, uint event_len,
if (time_zone_len)
copy_str_and_move(&time_zone_str, &start, time_zone_len);
+ /**
+ if time_zone_len or catalog_len are 0, then time_zone and catalog
+ are uninitialized at this point. shouldn't they point to the
+ zero-length null-terminated strings we allocated space for in the
+ my_alloc call above? /sven
+ */
+
/* A 2nd variable part; this is common to all versions */
memcpy((char*) start, end, data_len); // Copy db and query
start[data_len]= '\0'; // End query with \0 (For safetly)
@@ -2106,14 +2326,14 @@ and was aborted. There is a chance that your master is inconsistent at this \
point. If you are sure that your master is ok, run this query manually on the \
slave and then restart the slave with SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; \
START SLAVE; . Query: '%s'", expected_error, thd->query);
- thd->query_error= 1;
+ thd->is_slave_error= 1;
}
goto end;
}
/* If the query was not ignored, it is printed to the general log */
if (thd->net.last_errno != ER_SLAVE_IGNORED_TABLE)
- general_log_print(thd, COM_QUERY, "%s", thd->query);
+ general_log_write(thd, COM_QUERY, thd->query, thd->query_length);
compare_errors:
@@ -2138,7 +2358,7 @@ Default database: '%s'. Query: '%s'",
actual_error ? thd->net.last_error: "no error",
actual_error,
print_slave_db_safe(db), query_arg);
- thd->query_error= 1;
+ thd->is_slave_error= 1;
}
/*
If we get the same error code as expected, or they should be ignored.
@@ -2153,14 +2373,14 @@ Default database: '%s'. Query: '%s'",
/*
Other cases: mostly we expected no error and get one.
*/
- else if (thd->query_error || thd->is_fatal_error)
+ else if (thd->is_slave_error || thd->is_fatal_error)
{
rli->report(ERROR_LEVEL, actual_error,
"Error '%s' on query. Default database: '%s'. Query: '%s'",
(actual_error ? thd->net.last_error :
"unexpected success or fatal error"),
print_slave_db_safe(thd->db), query_arg);
- thd->query_error= 1;
+ thd->is_slave_error= 1;
}
/*
@@ -2171,7 +2391,7 @@ Default database: '%s'. Query: '%s'",
sql_print_error("Slave: did not get the expected number of affected \
rows running query from master - expected %d, got %d (this numbers \
should have matched modulo 4294967296).", 0, ...);
- thd->query_error = 1;
+ thd->is_slave_error = 1;
}
We may also want an option to tell the slave to ignore "affected"
mismatch. This mismatch could be implemented with a new ER_ code, and
@@ -2200,6 +2420,7 @@ end:
*/
thd->catalog= 0;
thd->set_db(NULL, 0); /* will free the current database */
+ DBUG_PRINT("info", ("end: query= 0"));
thd->query= 0; // just to be sure
thd->query_length= 0;
VOID(pthread_mutex_unlock(&LOCK_thread_count));
@@ -2215,7 +2436,7 @@ end:
thd->first_successful_insert_id_in_prev_stmt= 0;
thd->stmt_depends_on_first_successful_insert_id_in_prev_stmt= 0;
free_root(thd->mem_root,MYF(MY_KEEP_PREALLOC));
- return thd->query_error;
+ return thd->is_slave_error;
}
int Query_log_event::do_update_pos(Relay_log_info *rli)
@@ -2235,6 +2456,30 @@ int Query_log_event::do_update_pos(Relay_log_info *rli)
}
+Log_event::enum_skip_reason
+Query_log_event::do_shall_skip(Relay_log_info *rli)
+{
+ DBUG_ENTER("Query_log_event::do_shall_skip");
+ DBUG_PRINT("debug", ("query: %s; q_len: %d", query, q_len));
+ DBUG_ASSERT(query && q_len > 0);
+
+ if (rli->slave_skip_counter > 0)
+ {
+ if (strcmp("BEGIN", query) == 0)
+ {
+ thd->options|= OPTION_BEGIN;
+ DBUG_RETURN(Log_event::continue_group(rli));
+ }
+
+ if (strcmp("COMMIT", query) == 0 || strcmp("ROLLBACK", query) == 0)
+ {
+ thd->options&= ~OPTION_BEGIN;
+ DBUG_RETURN(Log_event::EVENT_SKIP_COUNT);
+ }
+ }
+ DBUG_RETURN(Log_event::do_shall_skip(rli));
+}
+
#endif
@@ -2774,7 +3019,7 @@ uint Load_log_event::get_query_buffer_length()
21 + sql_ex.field_term_len*4 + 2 + // " FIELDS TERMINATED BY 'str'"
23 + sql_ex.enclosed_len*4 + 2 + // " OPTIONALLY ENCLOSED BY 'str'"
12 + sql_ex.escaped_len*4 + 2 + // " ESCAPED BY 'str'"
- 21 + sql_ex.line_term_len*4 + 2 + // " FIELDS TERMINATED BY 'str'"
+ 21 + sql_ex.line_term_len*4 + 2 + // " LINES TERMINATED BY 'str'"
19 + sql_ex.line_start_len*4 + 2 + // " LINES STARTING BY 'str'"
15 + 22 + // " IGNORE xxx LINES"
3 + (num_fields-1)*2 + field_block_len; // " (field1, field2, ...)"
@@ -3255,7 +3500,7 @@ int Load_log_event::do_apply_event(NET* net, Relay_log_info const *rli,
thd->set_db(new_db.str, new_db.length);
DBUG_ASSERT(thd->query == 0);
thd->query_length= 0; // Should not be needed
- thd->query_error= 0;
+ thd->is_slave_error= 0;
clear_all_errors(thd, const_cast<Relay_log_info*>(rli));
/* see Query_log_event::do_apply_event() and BUG#13360 */
@@ -3429,7 +3674,7 @@ int Load_log_event::do_apply_event(NET* net, Relay_log_info const *rli,
List<Item> tmp_list;
if (mysql_load(thd, &ex, &tables, field_list, tmp_list, tmp_list,
handle_dup, ignore, net != 0))
- thd->query_error= 1;
+ thd->is_slave_error= 1;
if (thd->cuted_fields)
{
/* log_pos is the position of the LOAD event in the master log */
@@ -3468,9 +3713,9 @@ error:
close_thread_tables(thd);
DBUG_EXECUTE_IF("LOAD_DATA_INFILE_has_fatal_error",
- thd->query_error= 0; thd->is_fatal_error= 1;);
+ thd->is_slave_error= 0; thd->is_fatal_error= 1;);
- if (thd->query_error)
+ if (thd->is_slave_error)
{
/* this err/sql_errno code is copy-paste from net_send_error() */
const char *err;
@@ -3871,10 +4116,7 @@ Intvar_log_event::do_shall_skip(Relay_log_info *rli)
that we do not change the value of the slave skip counter since it
will be decreased by the following insert event.
*/
- if (rli->slave_skip_counter == 1)
- return Log_event::EVENT_SKIP_IGNORE;
- else
- return Log_event::do_shall_skip(rli);
+ return continue_group(rli);
}
#endif
@@ -3970,10 +4212,7 @@ Rand_log_event::do_shall_skip(Relay_log_info *rli)
that we do not change the value of the slave skip counter since it
will be decreased by the following insert event.
*/
- if (rli->slave_skip_counter == 1)
- return Log_event::EVENT_SKIP_IGNORE;
- else
- return Log_event::do_shall_skip(rli);
+ return continue_group(rli);
}
#endif /* !MYSQL_CLIENT */
@@ -4049,6 +4288,17 @@ int Xid_log_event::do_apply_event(Relay_log_info const *rli)
"COMMIT /* implicit, from Xid_log_event */");
return end_trans(thd, COMMIT);
}
+
+Log_event::enum_skip_reason
+Xid_log_event::do_shall_skip(Relay_log_info *rli)
+{
+ DBUG_ENTER("Xid_log_event::do_shall_skip");
+ if (rli->slave_skip_counter > 0) {
+ thd->options&= ~OPTION_BEGIN;
+ DBUG_RETURN(Log_event::EVENT_SKIP_COUNT);
+ }
+ DBUG_RETURN(Log_event::do_shall_skip(rli));
+}
#endif /* !MYSQL_CLIENT */
@@ -4427,10 +4677,7 @@ User_var_log_event::do_shall_skip(Relay_log_info *rli)
that we do not change the value of the slave skip counter since it
will be decreased by the following insert event.
*/
- if (rli->slave_skip_counter == 1)
- return Log_event::EVENT_SKIP_IGNORE;
- else
- return Log_event::do_shall_skip(rli);
+ return continue_group(rli);
}
#endif /* !MYSQL_CLIENT */
@@ -5366,6 +5613,19 @@ int Begin_load_query_log_event::get_create_or_append() const
#endif /* defined( HAVE_REPLICATION) && !defined(MYSQL_CLIENT) */
+#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
+Log_event::enum_skip_reason
+Begin_load_query_log_event::do_shall_skip(Relay_log_info *rli)
+{
+ /*
+ If the slave skip counter is 1, then we should not start executing
+ on the next event.
+ */
+ return continue_group(rli);
+}
+#endif
+
+
/**************************************************************************
Execute_load_query_log_event methods
**************************************************************************/
@@ -5374,12 +5634,13 @@ int Begin_load_query_log_event::get_create_or_append() const
#ifndef MYSQL_CLIENT
Execute_load_query_log_event::
Execute_load_query_log_event(THD *thd_arg, const char* query_arg,
- ulong query_length_arg, uint fn_pos_start_arg,
- uint fn_pos_end_arg,
- enum_load_dup_handling dup_handling_arg,
- bool using_trans, bool suppress_use):
+ ulong query_length_arg, uint fn_pos_start_arg,
+ uint fn_pos_end_arg,
+ enum_load_dup_handling dup_handling_arg,
+ bool using_trans, bool suppress_use,
+ THD::killed_state killed_err_arg):
Query_log_event(thd_arg, query_arg, query_length_arg, using_trans,
- suppress_use),
+ suppress_use, killed_err_arg),
file_id(thd_arg->file_id), fn_pos_start(fn_pos_start_arg),
fn_pos_end(fn_pos_end_arg), dup_handling(dup_handling_arg)
{
@@ -5577,6 +5838,10 @@ bool sql_ex_info::write_data(IO_CACHE* file)
}
else
{
+ /**
+ @todo This is sensitive to field padding. We should write a
+ char[7], not an old_sql_ex. /sven
+ */
old_sql_ex old_ex;
old_ex.field_term= *field_term;
old_ex.enclosed= *enclosed;
@@ -5655,7 +5920,7 @@ Rows_log_event::Rows_log_event(THD *thd_arg, TABLE *tbl_arg, ulong tid,
m_width(tbl_arg ? tbl_arg->s->fields : 1),
m_rows_buf(0), m_rows_cur(0), m_rows_end(0), m_flags(0)
#ifdef HAVE_REPLICATION
- ,m_key(NULL), m_curr_row(NULL), m_curr_row_end(NULL)
+ , m_curr_row(NULL), m_curr_row_end(NULL), m_key(NULL)
#endif
{
/*
@@ -5703,7 +5968,7 @@ Rows_log_event::Rows_log_event(const char *buf, uint event_len,
#endif
m_table_id(0), m_rows_buf(0), m_rows_cur(0), m_rows_end(0)
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
- ,m_key(NULL), m_curr_row(NULL), m_curr_row_end(NULL)
+ , m_curr_row(NULL), m_curr_row_end(NULL), m_key(NULL)
#endif
{
DBUG_ENTER("Rows_log_event::Rows_log_event(const char*,...)");
@@ -5951,7 +6216,7 @@ int Rows_log_event::do_apply_event(Relay_log_info const *rli)
{
if (!need_reopen)
{
- if (thd->query_error || thd->is_fatal_error)
+ if (thd->is_slave_error || thd->is_fatal_error)
{
/*
Error reporting borrowed from Query_log_event with many excessive
@@ -5995,7 +6260,7 @@ int Rows_log_event::do_apply_event(Relay_log_info const *rli)
uint tables_count= rli->tables_to_lock_count;
if ((error= open_tables(thd, &tables, &tables_count, 0)))
{
- if (thd->query_error || thd->is_fatal_error)
+ if (thd->is_slave_error || thd->is_fatal_error)
{
/*
Error reporting borrowed from Query_log_event with many excessive
@@ -6006,7 +6271,7 @@ int Rows_log_event::do_apply_event(Relay_log_info const *rli)
"Error '%s' on reopening tables",
(actual_error ? thd->net.last_error :
"unexpected success or fatal error"));
- thd->query_error= 1;
+ thd->is_slave_error= 1;
}
const_cast<Relay_log_info*>(rli)->clear_tables_to_lock();
DBUG_RETURN(error);
@@ -6029,7 +6294,7 @@ int Rows_log_event::do_apply_event(Relay_log_info const *rli)
{
mysql_unlock_tables(thd, thd->lock);
thd->lock= 0;
- thd->query_error= 1;
+ thd->is_slave_error= 1;
const_cast<Relay_log_info*>(rli)->clear_tables_to_lock();
DBUG_RETURN(ERR_BAD_TABLE_DEF);
}
@@ -6146,20 +6411,25 @@ int Rows_log_event::do_apply_event(Relay_log_info const *rli)
table->in_use = old_thd;
switch (error)
{
- /* Some recoverable errors */
- case HA_ERR_RECORD_CHANGED:
- case HA_ERR_KEY_NOT_FOUND: /* Idempotency support: OK if
- tuple does not exist */
- error= 0;
case 0:
break;
+ /* Some recoverable errors */
+ case HA_ERR_RECORD_CHANGED:
+ case HA_ERR_RECORD_DELETED:
+ case HA_ERR_KEY_NOT_FOUND:
+ case HA_ERR_END_OF_FILE:
+ /* Idempotency support: OK if tuple does not exist */
+ DBUG_PRINT("info", ("error: %s", HA_ERR(error)));
+ error= 0;
+ break;
+
default:
rli->report(ERROR_LEVEL, thd->net.last_errno,
"Error in %s event: row application failed. %s",
get_type_str(),
thd->net.last_error ? thd->net.last_error : "");
- thd->query_error= 1;
+ thd->is_slave_error= 1;
break;
}
@@ -6170,6 +6440,10 @@ int Rows_log_event::do_apply_event(Relay_log_info const *rli)
m_curr_row_end.
*/
+ DBUG_PRINT("info", ("error: %d", error));
+ DBUG_PRINT("info", ("curr_row: 0x%lu; curr_row_end: 0x%lu; rows_end: 0x%lu",
+ (ulong) m_curr_row, (ulong) m_curr_row_end, (ulong) m_rows_end));
+
if (!m_curr_row_end && !error)
unpack_current_row(rli);
@@ -6221,7 +6495,7 @@ int Rows_log_event::do_apply_event(Relay_log_info const *rli)
*/
thd->reset_current_stmt_binlog_row_based();
const_cast<Relay_log_info*>(rli)->cleanup_context(thd, error);
- thd->query_error= 1;
+ thd->is_slave_error= 1;
DBUG_RETURN(error);
}
@@ -6469,6 +6743,16 @@ void Rows_log_event::print_helper(FILE *file,
data) in the table map are initialized as zero (0). The array size is the
same as the columns for the table on the slave.
+ Additionally, values saved for field metadata on the master are saved as a
+ string of bytes (uchar) in the binlog. A field may require 1 or more bytes
+ to store the information. In cases where values require multiple bytes
+ (e.g. values > 255), the endian-safe methods are used to properly encode
+ the values on the master and decode them on the slave. When the field
+ metadata values are captured on the slave, they are stored in an array of
+ type uint16. This allows the least number of casts to prevent casting bugs
+ when the field metadata is used in comparisons of field attributes. When
+ the field metadata is used for calculating addresses in pointer math, the
+ type used is uint32.
*/
/**
@@ -6519,9 +6803,15 @@ Table_map_log_event::Table_map_log_event(THD *thd, TABLE *tbl, ulong tid,
m_dblen(m_dbnam ? tbl->s->db.length : 0),
m_tblnam(tbl->s->table_name.str),
m_tbllen(tbl->s->table_name.length),
- m_colcnt(tbl->s->fields), m_field_metadata(0),
- m_field_metadata_size(0), m_memory(NULL), m_meta_memory(NULL), m_data_size(0),
- m_table_id(tid), m_null_bits(0), m_flags(flags)
+ m_colcnt(tbl->s->fields),
+ m_memory(NULL),
+ m_table_id(tid),
+ m_flags(flags),
+ m_data_size(0),
+ m_field_metadata(0),
+ m_field_metadata_size(0),
+ m_null_bits(0),
+ m_meta_memory(NULL)
{
DBUG_ASSERT(m_table_id != ~0UL);
/*
@@ -6798,7 +7088,7 @@ int Table_map_log_event::do_apply_event(Relay_log_info const *rli)
TABLE_LIST *tmp_table_list= table_list;
if ((error= open_tables(thd, &tmp_table_list, &count, 0)))
{
- if (thd->query_error || thd->is_fatal_error)
+ if (thd->is_slave_error || thd->is_fatal_error)
{
/*
Error reporting borrowed from Query_log_event with many excessive
@@ -6810,7 +7100,7 @@ int Table_map_log_event::do_apply_event(Relay_log_info const *rli)
(actual_error ? thd->net.last_error :
"unexpected success or fatal error"),
table_list->db, table_list->table_name);
- thd->query_error= 1;
+ thd->is_slave_error= 1;
}
goto err;
}
@@ -6860,10 +7150,7 @@ Table_map_log_event::do_shall_skip(Relay_log_info *rli)
If the slave skip counter is 1, then we should not start executing
on the next event.
*/
- if (rli->slave_skip_counter == 1)
- return Log_event::EVENT_SKIP_IGNORE;
- else
- return Log_event::do_shall_skip(rli);
+ return continue_group(rli);
}
int Table_map_log_event::do_update_pos(Relay_log_info *rli)
@@ -7377,6 +7664,9 @@ static bool record_compare(TABLE *table)
records. Check that the other engines also return correct records.
*/
+ DBUG_DUMP("record[0]", table->record[0], table->s->reclength);
+ DBUG_DUMP("record[1]", table->record[1], table->s->reclength);
+
bool result= FALSE;
uchar saved_x[2], saved_filler[2];
@@ -7465,7 +7755,7 @@ record_compare_exit:
int Rows_log_event::find_row(const Relay_log_info *rli)
{
- DBUG_ENTER("find_row");
+ DBUG_ENTER("Rows_log_event::find_row");
DBUG_ASSERT(m_table && m_table->in_use != NULL);
@@ -7694,7 +7984,7 @@ int Rows_log_event::find_row(const Relay_log_info *rli)
DBUG_DUMP("record found", table->record[0], table->s->reclength);
table->file->ha_rnd_end();
- DBUG_ASSERT(error == HA_ERR_END_OF_FILE || error == 0);
+ DBUG_ASSERT(error == HA_ERR_END_OF_FILE || error == HA_ERR_RECORD_DELETED || error == 0);
DBUG_RETURN(error);
}
@@ -7894,7 +8184,15 @@ Update_rows_log_event::do_exec_row(const Relay_log_info *const rli)
int error= find_row(rli);
if (error)
+ {
+ /*
+ We need to read the second image in the event of error to be
+ able to skip to the next pair of updates
+ */
+ m_curr_row= m_curr_row_end;
+ unpack_current_row(rli);
return error;
+ }
/*
This is the situation after locating BI:
diff --git a/sql/log_event.h b/sql/log_event.h
index 0c66d1b190f..4bd496af2a4 100644
--- a/sql/log_event.h
+++ b/sql/log_event.h
@@ -18,8 +18,10 @@
@{
@file
-
- Binary log event definitions.
+
+ @brief Binary log event definitions. This includes generic code
+ common to all types of log events, as well as specific code for each
+ type of log event.
*/
@@ -37,6 +39,23 @@
#include "rpl_reporting.h"
#endif
+/**
+ Either assert or return an error.
+
+ In debug build, the condition will be checked, but in non-debug
+ builds, the error code given will be returned instead.
+
+ @param COND Condition to check
+ @param ERRNO Error number to return in non-debug builds
+*/
+#ifdef DBUG_OFF
+#define ASSERT_OR_RETURN_ERROR(COND, ERRNO) \
+ do { if (!(COND)) return ERRNO; } while (0)
+#else
+#define ASSERT_OR_RETURN_ERROR(COND, ERRNO) \
+ DBUG_ASSERT(COND)
+#endif
+
#define LOG_READ_EOF -1
#define LOG_READ_BOGUS -2
#define LOG_READ_IO -3
@@ -394,15 +413,19 @@ struct sql_ex_info
#define LOG_EVENT_BINLOG_IN_USE_F 0x1
-/*
- If the query depends on the thread (for example: TEMPORARY TABLE).
- Currently this is used by mysqlbinlog to know it must print
- SET @@PSEUDO_THREAD_ID=xx; before the query (it would not hurt to print it
- for every query but this would be slow).
+/**
+ @def LOG_EVENT_THREAD_SPECIFIC_F
+
+ If the query depends on the thread (for example: TEMPORARY TABLE).
+ Currently this is used by mysqlbinlog to know it must print
+ SET @@PSEUDO_THREAD_ID=xx; before the query (it would not hurt to print it
+ for every query but this would be slow).
*/
#define LOG_EVENT_THREAD_SPECIFIC_F 0x4
-/*
+/**
+ @def LOG_EVENT_SUPPRESS_USE_F
+
Suppress the generation of 'USE' statements before the actual
statement. This flag should be set for any events that does not need
the current database set to function correctly. Most notable cases
@@ -421,23 +444,26 @@ struct sql_ex_info
*/
#define LOG_EVENT_UPDATE_TABLE_MAP_VERSION_F 0x10
-/*
- OPTIONS_WRITTEN_TO_BIN_LOG are the bits of thd->options which must be
- written to the binlog. OPTIONS_WRITTEN_TO_BINLOG could be written
- into the Format_description_log_event, so that if later we don't want
- to replicate a variable we did replicate, or the contrary, it's
- doable. But it should not be too hard to decide once for all of what
- we replicate and what we don't, among the fixed 32 bits of
- thd->options.
- I (Guilhem) have read through every option's usage, and it looks like
- OPTION_AUTO_IS_NULL and OPTION_NO_FOREIGN_KEYS are the only ones
- which alter how the query modifies the table. It's good to replicate
- OPTION_RELAXED_UNIQUE_CHECKS too because otherwise, the slave may
- insert data slower than the master, in InnoDB.
- OPTION_BIG_SELECTS is not needed (the slave thread runs with
- max_join_size=HA_POS_ERROR) and OPTION_BIG_TABLES is not needed
- either, as the manual says (because a too big in-memory temp table is
- automatically written to disk).
+/**
+ @def OPTIONS_WRITTEN_TO_BIN_LOG
+
+ OPTIONS_WRITTEN_TO_BIN_LOG are the bits of thd->options which must
+ be written to the binlog. OPTIONS_WRITTEN_TO_BIN_LOG could be
+ written into the Format_description_log_event, so that if later we
+ don't want to replicate a variable we did replicate, or the
+ contrary, it's doable. But it should not be too hard to decide once
+ for all of what we replicate and what we don't, among the fixed 32
+ bits of thd->options.
+
+ I (Guilhem) have read through every option's usage, and it looks
+ like OPTION_AUTO_IS_NULL and OPTION_NO_FOREIGN_KEYS are the only
+ ones which alter how the query modifies the table. It's good to
+ replicate OPTION_RELAXED_UNIQUE_CHECKS too because otherwise, the
+ slave may insert data slower than the master, in InnoDB.
+ OPTION_BIG_SELECTS is not needed (the slave thread runs with
+ max_join_size=HA_POS_ERROR) and OPTION_BIG_TABLES is not needed
+ either, as the manual says (because a too big in-memory temp table
+ is automatically written to disk).
*/
#define OPTIONS_WRITTEN_TO_BIN_LOG \
(OPTION_AUTO_IS_NULL | OPTION_NO_FOREIGN_KEY_CHECKS | \
@@ -452,6 +478,11 @@ struct sql_ex_info
#endif
#undef EXPECTED_OPTIONS /* You shouldn't use this one */
+/**
+ @enum Log_event_type
+
+ Enumeration type for the different types of log events.
+*/
enum Log_event_type
{
/*
@@ -612,13 +643,90 @@ typedef struct st_print_event_info
#endif
-/*****************************************************************************
-
- Log_event class
+/**
+ @class Log_event
This is the abstract base class for binary log events.
-
- ****************************************************************************/
+
+ @section Log_event_binary_format Binary Format
+
+ Any Log_event saved on disk consists of the following three
+ components.
+
+ @li Common-Header
+ @li Post-Header
+ @li Body
+
+ The Common-Header, documented below, always has the same form and
+ length within one version of MySQL. Each event type specifies a
+ form and length of the Post-Header common to all events of the type.
+ The Body may be of different form and length even for different
+ events of the same type. The binary formats of Post-Header and Body
+ are documented separately in each subclass. The binary format of
+ Common-Header is as follows.
+
+ <table>
+ <caption>Common-Header</caption>
+
+ <tr>
+ <th>Name</th>
+ <th>Format<br/></th>
+ <th>Description</th>
+ </tr>
+
+ <tr>
+ <td>timestamp</td>
+ <td>4 byte unsigned integer</td>
+ <td>The number of seconds since 1970.
+ </td>
+ </tr>
+
+ <tr>
+ <td>type</td>
+ <td>1 byte enumeration</td>
+ <td>See enum #Log_event_type.</td>
+ </tr>
+
+ <tr>
+ <td>master_id</td>
+ <td>4 byte integer</td>
+ <td>Server ID of the server that created the event.</td>
+ </tr>
+
+ <tr>
+ <td>total_size</td>
+ <td>4 byte integer</td>
+ <td>The total size of this event, in bytes. In other words, this
+ is the sum of the sizes of Common-Header, Post-Header, and Body.
+ </td>
+ </tr>
+
+ <tr>
+ <td>master_position</td>
+ <td>4 byte integer</td>
+ <td>The position of the next event in the master binary log, in
+ bytes from the beginning of the file.
+ </td>
+ </tr>
+
+ <tr>
+ <td>flags</td>
+ <td>2 byte bitfield</td>
+ <td>See Log_event::flags.</td>
+ </tr>
+ </table>
+
+ Summing up the numbers above, we see that the total size of the
+ common header is 19 bytes.
+
+ @subsection Log_event_endianness_and_string_formats Endianness and String Formats
+
+ All numbers, whether they are 16-, 32-, or 64-bit, are stored in
+ little endian, i.e., the least significant byte first.
+
+ Strings are stored in various formats. The format of each string is
+ documented separately.
+*/
class Log_event
{
public:
@@ -692,8 +800,8 @@ public:
*/
uint32 server_id;
- /*
- Some 16 flags. Look above for LOG_EVENT_TIME_F,
+ /**
+ Some 16 flags. See the definitions above for LOG_EVENT_TIME_F,
LOG_EVENT_FORCED_ROTATE_F, LOG_EVENT_THREAD_SPECIFIC_F, and
LOG_EVENT_SUPPRESS_USE_F for notes.
*/
@@ -871,6 +979,25 @@ public:
protected:
/**
+ Helper function to ignore an event w.r.t. the slave skip counter.
+
+ This function can be used inside do_shall_skip() for functions
+ that cannot end a group. If the slave skip counter is 1 when
+ seeing such an event, the event shall be ignored, the counter
+ left intact, and processing continue with the next event.
+
+ A typical usage is:
+ @code
+ enum_skip_reason do_shall_skip(Relay_log_info *rli) {
+ return continue_group(rli);
+ }
+ @endcode
+
+ @return Skip reason
+ */
+ enum_skip_reason continue_group(Relay_log_info *rli);
+
+ /**
Primitive to apply an event to the database.
This is where the change to the database is made.
@@ -950,6 +1077,7 @@ protected:
#endif
};
+
/*
One class for each type of event.
Two constructors for each class:
@@ -963,13 +1091,332 @@ protected:
mysqlbinlog. This constructor must be format-tolerant.
*/
-/*****************************************************************************
-
- Query Log Event class
-
- Logs SQL queries
+/**
+ @class Query_log_event
+
+ Logs SQL queries.
+
+ @section Query_log_event_binary_format Binary format
+
+ The Post-Header has five components:
+
+ <table>
+ <caption>Post-Header for Query_log_event</caption>
+
+ <tr>
+ <th>Name</th>
+ <th>Size<br/></th>
+ <th>Description</th>
+ </tr>
+
+ <tr>
+ <td>slave_proxy_id</td>
+ <td>4 byte unsigned integer</td>
+ <td>An integer identifying the client thread, which is unique on
+ the server. (Note, however, that two threads on different servers
+ may have the same slave_proxy_id.) This is used when a client
+ thread creates a temporary table. Temporary tables are local to
+ the client, and the slave_proxy_id is used to distinguish
+ temporary tables belonging to different clients.
+ </td>
+ </tr>
+
+ <tr>
+ <td>exec_time</td>
+ <td>4 byte integer</td>
+ <td>???TODO</td>
+ </tr>
+
+ <tr>
+ <td>db_len</td>
+ <td>1 byte integer</td>
+ <td>The length of the name of the currently selected
+ database.
+ </td>
+ </tr>
+
+ <tr>
+ <td>error_code</td>
+ <td>2 byte integer</td>
+ <td>Error code generated by the master. If the master fails, the
+ slave will fail with the same error code, except for the error
+ codes ER_DB_CREATE_EXISTS==1007 and ER_DB_DROP_EXISTS==1008.
+ </td>
+ </tr>
+
+ <tr>
+ <td>status_vars_len</td>
+ <td>2 byte integer</td>
+ <td>The length of the status_vars block of the Body, in bytes. See
+ <a href="#query_log_event_status_vars">below</a>.
+ </td>
+ </tr>
+
+ <tr>
+ <td>Post-Header-For-Derived</td>
+ <td>0 bytes</td>
+ <td>This field is only written by the subclass
+ Execute_load_query_log_event. In this base class, it takes 0
+ bytes. See separate documentation for
+ Execute_load_query_log_event.
+ </td>
+ </tr>
+ </table>
+
+ The Body has the following components:
+
+ <table>
+ <caption>Body for Query_log_event</caption>
+
+ <tr>
+ <th>Name</th>
+ <th>Size<br/></th>
+ <th>Description</th>
+ </tr>
+
+ <tr>
+ <td><a name="query_log_event_status_vars" /> status_vars</td>
+ <td>variable length</td>
+ <td>Zero or more status variables. Each status variable consists
+ of one byte identifying the variable stored, followed by the value
+ of the variable. The possible variables are listed separately in
+ the table below. MySQL always writes events in the order defined
+ below; however, it is capable of reading them in any order.
+ </td>
+ </tr>
+
+ <tr>
+ <td>db</td>
+ <td>db_len+1</td>
+ <td>The currently selected database, as a null-terminated string.
+
+ (The trailing zero is redundant since the length is already known;
+ it is db_len from Post-Header.)
+ </td>
+ </tr>
+
+ <tr>
+ <td>query</td>
+ <td>variable length string without trailing zero, extending to the
+ end of the event (determined by the length field of the
+ Common-Header)
+ </td>
+ <td>The SQL query.</td>
+ </tr>
+ </table>
+
+ The following table lists the status variables that may appear in
+ the status_vars field.
+
+ <table>
+ <caption>Status variables for Query_log_event</caption>
+
+ <tr>
+ <th>Status variable</th>
+ <th>1-byte identifier</th>
+ <th>Size<br/></th>
+ <th>Description</th>
+ </tr>
+
+ <tr>
+ <td>flags2</td>
+ <td>Q_FLAGS2_CODE == 0</td>
+ <td>4 byte bitfield</td>
+ <td>The flags in thd->options, binary AND-ed with
+ OPTIONS_WRITTEN_TO_BIN_LOG. The thd->options bitfield contains
+ options for SELECT. OPTIONS_WRITTEN identifies those options that
+ need to be written to the binlog (not all do). Specifically,
+ OPTIONS_WRITTEN_TO_BIN_LOG equals (OPTION_AUTO_IS_NULL |
+ OPTION_NO_FOREIGN_KEY_CHECKS | OPTION_RELAXED_UNIQUE_CHECKS |
+ OPTION_NOT_AUTOCOMMIT), or 0x0c084000 in hex.
+
+ These flags correspond to the SQL variables SQL_AUTO_IS_NULL,
+ FOREIGN_KEY_CHECKS, UNIQUE_CHECKS, and AUTOCOMMIT, documented in
+ the "SET Syntax" section of the MySQL Manual.
+
+ This field is always written to the binlog in version >= 5.0, and
+ never written in version < 5.0.
+ </td>
+ </tr>
+
+ <tr>
+ <td>sql_mode</td>
+ <td>Q_SQL_MODE_CODE == 1</td>
+ <td>8 byte integer</td>
+ <td>The sql_mode variable. See the section "SQL Modes" in the
+ MySQL manual, and see mysql_priv.h for a list of the possible
+ flags. Currently (2007-10-04), the following flags are available:
+ <pre>
+ MODE_REAL_AS_FLOAT==0x1
+ MODE_PIPES_AS_CONCAT==0x2
+ MODE_ANSI_QUOTES==0x4
+ MODE_IGNORE_SPACE==0x8
+ MODE_NOT_USED==0x10
+ MODE_ONLY_FULL_GROUP_BY==0x20
+ MODE_NO_UNSIGNED_SUBTRACTION==0x40
+ MODE_NO_DIR_IN_CREATE==0x80
+ MODE_POSTGRESQL==0x100
+ MODE_ORACLE==0x200
+ MODE_MSSQL==0x400
+ MODE_DB2==0x800
+ MODE_MAXDB==0x1000
+ MODE_NO_KEY_OPTIONS==0x2000
+ MODE_NO_TABLE_OPTIONS==0x4000
+ MODE_NO_FIELD_OPTIONS==0x8000
+ MODE_MYSQL323==0x10000
+ MODE_MYSQL323==0x20000
+ MODE_MYSQL40==0x40000
+ MODE_ANSI==0x80000
+ MODE_NO_AUTO_VALUE_ON_ZERO==0x100000
+ MODE_NO_BACKSLASH_ESCAPES==0x200000
+ MODE_STRICT_TRANS_TABLES==0x400000
+ MODE_STRICT_ALL_TABLES==0x800000
+ MODE_NO_ZERO_IN_DATE==0x1000000
+ MODE_NO_ZERO_DATE==0x2000000
+ MODE_INVALID_DATES==0x4000000
+ MODE_ERROR_FOR_DIVISION_BY_ZERO==0x8000000
+ MODE_TRADITIONAL==0x10000000
+ MODE_NO_AUTO_CREATE_USER==0x20000000
+ MODE_HIGH_NOT_PRECEDENCE==0x40000000
+ MODE_PAD_CHAR_TO_FULL_LENGTH==0x80000000
+ </pre>
+ All these flags are replicated from the server. However, all
+ flags except MODE_NO_DIR_IN_CREATE are honored by the slave; the
+ slave always preserves its old value of MODE_NO_DIR_IN_CREATE.
+ For a rationale, see comment in Query_log_event::do_apply_event in
+ log_event.cc.
+
+ This field is always written to the binlog.
+ </td>
+ </tr>
+
+ <tr>
+ <td>catalog</td>
+ <td>Q_CATALOG_NZ_CODE == 6</td>
+ <td>Variable-length string: the length in bytes (1 byte) followed
+ by the characters (at most 255 bytes)
+ </td>
+ <td>Stores the client's current catalog. Every database belongs
+ to a catalog, the same way that every table belongs to a
+ database. Currently, there is only one catalog, 'std'.
+
+ This field is written if the length of the catalog is > 0;
+ otherwise it is not written.
+ </td>
+ </tr>
+
+ <tr>
+ <td>auto_increment</td>
+ <td>Q_AUTO_INCREMENT == 3</td>
+ <td>two 2 byte unsigned integers, totally 2+2=4 bytes</td>
+
+ <td>The two variables auto_increment_increment and
+ auto_increment_offset, in that order. For more information, see
+ "System variables" in the MySQL manual.
+
+ This field is written if auto_increment>1; otherwise it is not
+ written.
+ </td>
+ </tr>
+
+ <tr>
+ <td>charset</td>
+ <td>Q_CHARSET_CODE == 4</td>
+ <td>three 2-byte unsigned integers (i.e., 6 bytes)</td>
+ <td>The three variables character_set_client,
+ collation_connection, and collation_server, in that order.
+ `character_set_client' is a code identifying the character set and
+ collation used by the client to encode the query.
+ `collation_connection' identifies the character set and collation
+ that the master converts the query to when it receives it; this is
+ useful when comparing literal strings. `collation_server' is the
+ default character set and collation used when a new database is
+ created.
+
+ See also "Connection Character Sets and Collations" in the MySQL
+ 5.1 manual.
+
+ All three variables are codes identifying a (character set,
+ collation) pair. To see which codes map to which pairs, run the
+ query "SELECT id, character_set_name, collation_name FROM
+ COLLATIONS".
+
+ Cf. Q_CHARSET_DATABASE_NUMBER below.
+
+ This field is always written.
+ </td>
+ </tr>
+
+ <tr>
+ <td>time_zone</td>
+ <td>Q_TIME_ZONE_CODE == 5</td>
+ <td>Variable-length string: the length in bytes (1 byte) followed
+ by the characters (at most 255 bytes).
+ <td>The time_zone of the master.
+
+ See also "System Variables" and "MySQL Server Time Zone Support"
+ in the MySQL manual.
+
+ This field is written if the length of the time zone string is >
+ 0; otherwise, it is not written.
+ </td>
+ </tr>
+
+ <tr>
+ <td>lc_time_names_number</td>
+ <td>Q_LC_TIME_NAMES_CODE == 7</td>
+ <td>2 byte integer</td>
+ <td>A code identifying a table of month and day names. The
+ mapping from codes to languages is defined in sql_locale.cc.
+
+ This field is written if it is != 0, i.e., if the locale is not
+ en_US.
+ </td>
+ </tr>
+
+ <tr>
+ <td>charset_database_number</td>
+ <td>Q_CHARSET_DATABASE_NUMBER == 8</td>
+ <td>2 byte integer</td>
+
+ <td>The value of the collation_database system variable (in the
+ source code stored in thd->variables.collation_database), which
+ holds the code for a (character set, collation) pair as described
+ above (see Q_CHARSET_CODE).
+
+ `collation_database' was used in old versions (???WHEN). Its
+ value was loaded when issuing a "use db" command and could be
+ changed by issuing a "SET collation_database=xxx" command. It
+ used to affect the "LOAD DATA INFILE" and "CREATE TABLE" commands.
+
+ In newer versions, "CREATE TABLE" has been changed to take the
+ character set from the database of the created table, rather than
+ the database of the current database. This makes a difference
+ when creating a table in another database than the current one.
+ "LOAD DATA INFILE" has not yet changed to do this, but there are
+ plans to eventually do it, and to make collation_database
+ read-only.
+
+ This field is written if it is not 0.
+ </td>
+ </tr>
+ </table>
+
+ @subsection Query_log_event_notes_on_previous_versions Notes on Previous Versions
+
+ @li Status vars were introduced in version 5.0. To read earlier
+ versions correctly, check the length of the Post-Header.
+
+ @li The status variable Q_CATALOG_CODE == 2 existed in MySQL 5.0.x,
+ where 0<=x<=3. It was identical to Q_CATALOG_CODE, except that the
+ string had a trailing '\0'. The '\0' was removed in 5.0.4 since it
+ was redundant (the string length is stored before the string). The
+ Q_CATALOG_CODE will never be written by a new master, but can still
+ be understood by a new slave.
+
+ @li See Q_CHARSET_DATABASE_NUMBER in the table above.
- ****************************************************************************/
+*/
class Query_log_event: public Log_event
{
protected:
@@ -1027,7 +1474,7 @@ public:
/*
'flags2' is a second set of flags (on top of those in Log_event), for
session variables. These are thd->options which is & against a mask
- (OPTIONS_WRITTEN_TO_BINLOG).
+ (OPTIONS_WRITTEN_TO_BIN_LOG).
flags2_inited helps make a difference between flags2==0 (3.23 or 4.x
master, we don't know flags2, so use the slave server's global options) and
flags2==0 (5.0 master, we know this has a meaning of flags all down which
@@ -1086,6 +1533,7 @@ public:
public: /* !!! Public in this patch to allow old usage */
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
+ virtual enum_skip_reason do_shall_skip(Relay_log_info *rli);
virtual int do_apply_event(Relay_log_info const *rli);
virtual int do_update_pos(Relay_log_info *rli);
@@ -1096,13 +1544,16 @@ public: /* !!! Public in this patch to allow old usage */
};
-/*****************************************************************************
+/**
+ @class Muted_query_log_event
- Muted Query Log Event class
+ Pretends to log SQL queries, but doesn't actually do so.
- Pretends to Log SQL queries, but doesn't actually do so.
+ @section Muted_query_log_event_binary_format Binary Format
- ****************************************************************************/
+ This log event is not stored, and thus the binary format is 0 bytes
+ long. Note that not even the Common-Header is stored.
+*/
class Muted_query_log_event: public Query_log_event
{
public:
@@ -1119,14 +1570,54 @@ public:
#ifdef HAVE_REPLICATION
-/*****************************************************************************
+/**
+ @class Slave_log_event
- Slave Log Event class
Note that this class is currently not used at all; no code writes a
- Slave_log_event (though some code in repl_failsafe.cc reads Slave_log_event).
- So it's not a problem if this code is not maintained.
-
- ****************************************************************************/
+ Slave_log_event (though some code in repl_failsafe.cc reads
+ Slave_log_event). So it's not a problem if this code is not
+ maintained.
+
+ @section Slave_log_event_binary_format Binary Format
+
+ This event type has no Post-Header. The Body has the following
+ four components.
+
+ <table>
+ <caption>Body for Slave_log_event</caption>
+
+ <tr>
+ <th>Name</th>
+ <th>Size<br/></th>
+ <th>Description</th>
+ </tr>
+
+ <tr>
+ <td>master_pos</td>
+ <td>8 byte integer</td>
+ <td>???TODO
+ </td>
+ </tr>
+
+ <tr>
+ <td>master_port</td>
+ <td>2 byte integer</td>
+ <td>???TODO</td>
+ </tr>
+
+ <tr>
+ <td>master_host</td>
+ <td>null-terminated string</td>
+ <td>???TODO</td>
+ </tr>
+
+ <tr>
+ <td>master_log</td>
+ <td>null-terminated string</td>
+ <td>???TODO</td>
+ </tr>
+ </table>
+*/
class Slave_log_event: public Log_event
{
protected:
@@ -1165,11 +1656,202 @@ private:
#endif /* HAVE_REPLICATION */
-/*****************************************************************************
-
- Load Log Event class
+/**
+ @class Load_log_event
+
+ This log event corresponds to a "LOAD DATA INFILE" SQL query on the
+ following form:
+
+ @verbatim
+ (1) USE db;
+ (2) LOAD DATA [LOCAL] INFILE 'file_name'
+ (3) [REPLACE | IGNORE]
+ (4) INTO TABLE 'table_name'
+ (5) [FIELDS
+ (6) [TERMINATED BY 'field_term']
+ (7) [[OPTIONALLY] ENCLOSED BY 'enclosed']
+ (8) [ESCAPED BY 'escaped']
+ (9) ]
+ (10) [LINES
+ (11) [TERMINATED BY 'line_term']
+ (12) [LINES STARTING BY 'line_start']
+ (13) ]
+ (14) [IGNORE skip_lines LINES]
+ (15) (field_1, field_2, ..., field_n)@endverbatim
+
+ @section Load_log_event_binary_format Binary Format
+
+ The Post-Header consists of the following six components.
+
+ <table>
+ <caption>Post-Header for Load_log_event</caption>
+
+ <tr>
+ <th>Name</th>
+ <th>Size<br/></th>
+ <th>Description</th>
+ </tr>
+
+ <tr>
+ <td>slave_proxy_id</td>
+ <td>4 byte unsigned integer</td>
+ <td>An integer identifying the client thread, which is unique on
+ the server. (Note, however, that the same slave_proxy_id may
+ appear on different servers.) This is used when a client thread
+ creates a temporary table. Temporary tables are local to the
+ client, and the slave_proxy_id is used to distinguish temporary
+ tables belonging to different clients.
+ </td>
+ </tr>
+
+ <tr>
+ <td>exec_time</td>
+ <td>4 byte unsigned integer</td>
+ <td>???TODO</td>
+ </tr>
+
+ <tr>
+ <td>skip_lines</td>
+ <td>4 byte unsigned integer</td>
+ <td>The number on line (14) above, if present, or 0 if line (14)
+ is left out.
+ </td>
+ </tr>
+
+ <tr>
+ <td>table_name_len</td>
+ <td>1 byte unsigned integer</td>
+ <td>The length of 'table_name' on line (4) above.</td>
+ </tr>
+
+ <tr>
+ <td>db_len</td>
+ <td>1 byte unsigned integer</td>
+ <td>The length of 'db' on line (1) above.</td>
+ </tr>
+
+ <tr>
+ <td>num_fields</td>
+ <td>4 byte unsigned integer</td>
+ <td>The number n of fields on line (15) above.</td>
+ </tr>
+ </table>
+
+ The Body contains the following components.
+
+ <table>
+ <caption>Body of Load_log_event</caption>
+
+ <tr>
+ <th>Name</th>
+ <th>Size<br/></th>
+ <th>Description</th>
+ </tr>
+
+ <tr>
+ <td>sql_ex</td>
+ <td>variable length</td>
+
+ <td>Describes the part of the query on lines (3) and
+ (5)&ndash;(13) above. More precisely, it stores the five strings
+ (on lines) field_term (6), enclosed (7), escaped (8), line_term
+ (11), and line_start (12); as well as a bitfield indicating the
+ presence of the keywords REPLACE (3), IGNORE (3), and OPTIONALLY
+ (7).
+
+ The data is stored in one of two formats, called "old" and "new".
+ The type field of Common-Header determines which of these two
+ formats is used: type LOAD_EVENT means that the old format is
+ used, and type NEW_LOAD_EVENT means that the new format is used.
+ When MySQL writes a Load_log_event, it uses the new format if at
+ least one of the five strings is two or more bytes long.
+ Otherwise (i.e., if all strings are 0 or 1 bytes long), the old
+ format is used.
+
+ The new and old format differ in the way the five strings are
+ stored.
+
+ <ul>
+ <li> In the new format, the strings are stored in the order
+ field_term, enclosed, escaped, line_term, line_start. Each string
+ consists of a length (1 byte), followed by a sequence of
+ characters (0-255 bytes). Finally, a boolean combination of the
+ following flags is stored in 1 byte: REPLACE_FLAG==0x4,
+ IGNORE_FLAG==0x8, and OPT_ENCLOSED_FLAG==0x2. If a flag is set,
+ it indicates the presence of the corresponding keyword in the SQL
+ query.
+
+ <li> In the old format, we know that each string has length 0 or
+ 1. Therefore, only the first byte of each string is stored. The
+ order of the strings is the same as in the new format. These five
+ bytes are followed by the same 1-byte bitfield as in the new
+ format. Finally, a 1 byte bitfield called empty_flags is stored.
+ The low 5 bits of empty_flags indicate which of the five strings
+ have length 0. For each of the following flags that is set, the
+ corresponding string has length 0; for the flags that are not set,
+ the string has length 1: FIELD_TERM_EMPTY==0x1,
+ ENCLOSED_EMPTY==0x2, LINE_TERM_EMPTY==0x4, LINE_START_EMPTY==0x8,
+ ESCAPED_EMPTY==0x10.
+ </ul>
+
+ Thus, the size of the new format is 6 bytes + the sum of the sizes
+ of the five strings. The size of the old format is always 7
+ bytes.
+ </td>
+ </tr>
+
+ <tr>
+ <td>field_lens</td>
+ <td>num_fields 1-byte unsigned integers</td>
+ <td>An array of num_fields integers representing the length of
+ each field in the query. (num_fields is from the Post-Header).
+ </td>
+ </tr>
+
+ <tr>
+ <td>fields</td>
+ <td>num_fields null-terminated strings</td>
+ <td>An array of num_fields null-terminated strings, each
+ representing a field in the query. (The trailing zero is
+ redundant, since the length are stored in the num_fields array.)
+ The total length of all strings equals to the sum of all
+ field_lens, plus num_fields bytes for all the trailing zeros.
+ </td>
+ </tr>
+
+ <tr>
+ <td>table_name</td>
+ <td>null-terminated string of length table_len+1 bytes</td>
+ <td>The 'table_name' from the query, as a null-terminated string.
+ (The trailing zero is actually redundant since the table_len is
+ known from Post-Header.)
+ </td>
+ </tr>
+
+ <tr>
+ <td>db</td>
+ <td>null-terminated string of length db_len+1 bytes</td>
+ <td>The 'db' from the query, as a null-terminated string.
+ (The trailing zero is actually redundant since the db_len is known
+ from Post-Header.)
+ </td>
+ </tr>
+
+ <tr>
+ <td>file_name</td>
+ <td>variable length string without trailing zero, extending to the
+ end of the event (determined by the length field of the
+ Common-Header)
+ </td>
+ <td>The 'file_name' from the query.
+ </td>
+ </tr>
+
+ </table>
+
+ @subsection Load_log_event_notes_on_previous_versions Notes on Previous Versions
- ****************************************************************************/
+*/
class Load_log_event: public Log_event
{
private:
@@ -1276,9 +1958,8 @@ public: /* !!! Public in this patch to allow old usage */
extern char server_version[SERVER_VERSION_LENGTH];
-/*****************************************************************************
-
- Start Log Event_v3 class
+/**
+ @class Start_log_event_v3
Start_log_event_v3 is the Start_log_event of binlog format 3 (MySQL 3.23 and
4.x).
@@ -1288,8 +1969,8 @@ extern char server_version[SERVER_VERSION_LENGTH];
MySQL 5.0 whenever it starts sending a new binlog if the requested position
is >4 (otherwise if ==4 the event will be sent naturally).
- ****************************************************************************/
-
+ @section Start_log_event_v3_binary_format Binary Format
+*/
class Start_log_event_v3: public Log_event
{
public:
@@ -1372,10 +2053,14 @@ protected:
};
-/*
- For binlog version 4.
- This event is saved by threads which read it, as they need it for future
- use (to decode the ordinary events).
+/**
+ @class Format_description_log_event
+
+ For binlog version 4.
+ This event is saved by threads which read it, as they need it for future
+ use (to decode the ordinary events).
+
+ @section Format_description_log_event_binary_format Binary Format
*/
class Format_description_log_event: public Start_log_event_v3
@@ -1429,13 +2114,41 @@ protected:
};
-/*****************************************************************************
+/**
+ @class Intvar_log_event
- Intvar Log Event class
+ Logs special variables related to auto_increment values.
- Logs special variables such as auto_increment values
+ @section Intvar_log_event_binary_format Binary Format
- ****************************************************************************/
+ The Post-Header has two components:
+
+ <table>
+ <caption>Post-Header for Intvar_log_event</caption>
+
+ <tr>
+ <th>Name</th>
+ <th>Size<br/></th>
+ <th>Description</th>
+ </tr>
+
+ <tr>
+ <td>Type</td>
+ <td>1 byte enumeration</td>
+ <td>One byte identifying the type of variable stored. Currently,
+ two identifiers are supported: LAST_INSERT_ID_EVENT==1 and
+ INSERT_ID_EVENT==2.
+ </td>
+ </tr>
+
+ <tr>
+ <td>value</td>
+ <td>8 byte unsigned integer</td>
+ <td>The value of the variable.</td>
+ </tr>
+
+ </table>
+*/
class Intvar_log_event: public Log_event
{
@@ -1474,16 +2187,24 @@ private:
};
-/*****************************************************************************
-
- Rand Log Event class
+/**
+ @class Rand_log_event
Logs random seed used by the next RAND(), and by PASSWORD() in 4.1.0.
4.1.1 does not need it (it's repeatable again) so this event needn't be
written in 4.1.1 for PASSWORD() (but the fact that it is written is just a
waste, it does not cause bugs).
- ****************************************************************************/
+ @section Rand_log_event_binary_format Binary Format
+ This event type has no Post-Header. The Body of this event type has
+ two components:
+
+ @li seed1 (8 bytes): 64 bit random seed1.
+ @li seed2 (8 bytes): 64 bit random seed2.
+
+ The state of the random number generation consists of 128 bits,
+ which are stored internally as two 64-bit numbers.
+*/
class Rand_log_event: public Log_event
{
@@ -1520,14 +2241,14 @@ private:
#endif
};
-/*****************************************************************************
-
- Xid Log Event class
+/**
+ @class Xid_log_event
Logs xid of the transaction-to-be-committed in the 2pc protocol.
Has no meaning in replication, slaves ignore it.
- ****************************************************************************/
+ @section Xid_log_event_binary_format Binary Format
+*/
#ifdef MYSQL_CLIENT
typedef ulonglong my_xid; // this line is the same as in handler.h
#endif
@@ -1559,17 +2280,18 @@ class Xid_log_event: public Log_event
private:
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
virtual int do_apply_event(Relay_log_info const *rli);
+ enum_skip_reason do_shall_skip(Relay_log_info *rli);
#endif
};
-/*****************************************************************************
-
- User var Log Event class
+/**
+ @class User_var_log_event
Every time a query uses the value of a user variable, a User_var_log_event is
written before the Query_log_event, to set the user variable.
- ****************************************************************************/
+ @section User_var_log_event_binary_format Binary Format
+*/
class User_var_log_event: public Log_event
{
@@ -1611,11 +2333,14 @@ private:
};
-/*****************************************************************************
+/**
+ @class Stop_log_event
- Stop Log Event class
+ @section Stop_log_event_binary_format Binary Format
- ****************************************************************************/
+ The Post-Header and Body for this event type are empty; it only has
+ the Common-Header.
+*/
class Stop_log_event: public Log_event
{
public:
@@ -1651,13 +2376,54 @@ private:
#endif
};
-/*****************************************************************************
-
- Rotate Log Event class
+/**
+ @class Rotate_log_event
This will be deprecated when we move to using sequence ids.
- ****************************************************************************/
+ @section Rotate_log_event_binary_format Binary Format
+
+ The Post-Header has one component:
+
+ <table>
+ <caption>Post-Header for Rotate_log_event</caption>
+
+ <tr>
+ <th>Name</th>
+ <th>Size<br/></th>
+ <th>Description</th>
+ </tr>
+
+ <tr>
+ <td>pos</td>
+ <td>8 byte integer</td>
+ <td>???TODO</td>
+ </tr>
+
+ </table>
+
+ The Body has one component:
+
+ <table>
+ <caption>Body for Rotate_log_event</caption>
+
+ <tr>
+ <th>Name</th>
+ <th>Size<br/></th>
+ <th>Description</th>
+ </tr>
+
+ <tr>
+ <td>new_log_ident</td>
+ <td>variable length string without trailing zero, extending to the
+ end of the event (determined by the length field of the
+ Common-Header)
+ </td>
+ <td>???TODO</td>
+ </tr>
+
+ </table>
+*/
class Rotate_log_event: public Log_event
{
@@ -1704,9 +2470,11 @@ private:
/* the classes below are for the new LOAD DATA INFILE logging */
-/*****************************************************************************
- Create File Log Event class
- ****************************************************************************/
+/**
+ @class Create_file_log_event
+
+ @section Create_file_log_event_binary_format Binary Format
+*/
class Create_file_log_event: public Load_log_event
{
@@ -1775,11 +2543,11 @@ private:
};
-/*****************************************************************************
-
- Append Block Log Event class
+/**
+ @class Append_block_log_event
- ****************************************************************************/
+ @section Append_block_log_event_binary_format Binary Format
+*/
class Append_block_log_event: public Log_event
{
@@ -1830,11 +2598,11 @@ private:
};
-/*****************************************************************************
-
- Delete File Log Event class
+/**
+ @class Delete_file_log_event
- ****************************************************************************/
+ @section Delete_file_log_event_binary_format Binary Format
+*/
class Delete_file_log_event: public Log_event
{
@@ -1871,11 +2639,11 @@ private:
};
-/*****************************************************************************
-
- Execute Load Log Event class
+/**
+ @class Execute_load_log_event
- ****************************************************************************/
+ @section Delete_file_log_event_binary_format Binary Format
+*/
class Execute_load_log_event: public Log_event
{
@@ -1911,15 +2679,15 @@ private:
};
-/***************************************************************************
-
- Begin load query Log Event class
+/**
+ @class Begin_load_query_log_event
Event for the first block of file to be loaded, its only difference from
Append_block event is that this event creates or truncates existing file
before writing data.
-****************************************************************************/
+ @section Begin_load_query_log_event_binary_format Binary Format
+*/
class Begin_load_query_log_event: public Append_block_log_event
{
public:
@@ -1937,6 +2705,10 @@ public:
*description_event);
~Begin_load_query_log_event() {}
Log_event_type get_type_code() { return BEGIN_LOAD_QUERY_EVENT; }
+private:
+#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
+ virtual enum_skip_reason do_shall_skip(Relay_log_info *rli);
+#endif
};
@@ -1946,15 +2718,15 @@ public:
enum enum_load_dup_handling { LOAD_DUP_ERROR= 0, LOAD_DUP_IGNORE,
LOAD_DUP_REPLACE };
-/****************************************************************************
-
- Execute load query Log Event class
+/**
+ @class Execute_load_query_log_event
Event responsible for LOAD DATA execution, it similar to Query_log_event
but before executing the query it substitutes original filename in LOAD DATA
query with name of temporary file.
-****************************************************************************/
+ @section Execute_load_query_log_event_binary_format Binary Format
+*/
class Execute_load_query_log_event: public Query_log_event
{
public:
@@ -1972,10 +2744,12 @@ public:
#ifndef MYSQL_CLIENT
Execute_load_query_log_event(THD* thd, const char* query_arg,
- ulong query_length, uint fn_pos_start_arg,
- uint fn_pos_end_arg,
- enum_load_dup_handling dup_handling_arg,
- bool using_trans, bool suppress_use);
+ ulong query_length, uint fn_pos_start_arg,
+ uint fn_pos_end_arg,
+ enum_load_dup_handling dup_handling_arg,
+ bool using_trans, bool suppress_use,
+ THD::killed_state
+ killed_err_arg= THD::KILLED_NO_VALUE);
#ifdef HAVE_REPLICATION
void pack_info(Protocol* protocol);
#endif /* HAVE_REPLICATION */
@@ -2006,6 +2780,11 @@ private:
#ifdef MYSQL_CLIENT
+/**
+ @class Unknown_log_event
+
+ @section Unknown_log_event_binary_format Binary Format
+*/
class Unknown_log_event: public Log_event
{
public:
@@ -2026,14 +2805,14 @@ public:
#endif
char *str_to_hex(char *to, const char *from, uint len);
-/*****************************************************************************
-
- Table map log event class
+/**
+ @class Table_map_log_event
Create a mapping from a (database name, table name) couple to a table
identifier (an integer number).
- ****************************************************************************/
+ @section Table_map_log_event_binary_format Binary Format
+*/
class Table_map_log_event : public Log_event
{
public:
@@ -2143,9 +2922,8 @@ private:
};
-/*****************************************************************************
-
- Row level log event class.
+/**
+ @class Rows_log_event
Common base class for all row-containing log events.
@@ -2155,7 +2933,8 @@ private:
- Write data header and data body to an IO_CACHE.
- Provide an interface for adding an individual row to the event.
- ****************************************************************************/
+ @section Rows_log_event_binary_format Binary Format
+*/
class Rows_log_event : public Log_event
@@ -2300,7 +3079,7 @@ protected:
uchar *m_rows_cur; /* One-after the end of the data */
uchar *m_rows_end; /* One-after the end of the allocated space */
- flag_set m_flags; /* Flags for row-level events */
+ flag_set m_flags; /* Flags for row-level events */
/* helper functions */
@@ -2316,8 +3095,11 @@ protected:
int unpack_current_row(const Relay_log_info *const rli)
{
DBUG_ASSERT(m_table);
- return ::unpack_row(rli, m_table, m_width, m_curr_row, &m_cols,
- &m_curr_row_end, &m_master_reclength);
+ ASSERT_OR_RETURN_ERROR(m_curr_row < m_rows_end, HA_ERR_CORRUPT_EVENT);
+ int const result= ::unpack_row(rli, m_table, m_width, m_curr_row, &m_cols,
+ &m_curr_row_end, &m_master_reclength);
+ ASSERT_OR_RETURN_ERROR(m_curr_row_end <= m_rows_end, HA_ERR_CORRUPT_EVENT);
+ return result;
}
#endif
@@ -2383,15 +3165,15 @@ private:
friend class Old_rows_log_event;
};
-/*****************************************************************************
-
- Write row log event class
+/**
+ @class Write_rows_log_event
Log row insertions and updates. The event contain several
insert/update rows for a table. Note that each event contains only
rows for one table.
- ****************************************************************************/
+ @section Write_rows_log_event_binary_format Binary Format
+*/
class Write_rows_log_event : public Rows_log_event
{
public:
@@ -2438,9 +3220,8 @@ private:
};
-/*****************************************************************************
-
- Update rows log event class
+/**
+ @class Update_rows_log_event
Log row updates with a before image. The event contain several
update rows for a table. Note that each event contains only rows for
@@ -2449,7 +3230,8 @@ private:
Also note that the row data consists of pairs of row data: one row
for the old data and one row for the new data.
- ****************************************************************************/
+ @section Update_rows_log_event_binary_format Binary Format
+*/
class Update_rows_log_event : public Rows_log_event
{
public:
@@ -2511,9 +3293,8 @@ protected:
#endif /* !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION) */
};
-/*****************************************************************************
-
- Delete rows log event class.
+/**
+ @class Delete_rows_log_event
Log row deletions. The event contain several delete rows for a
table. Note that each event contains only rows for one table.
@@ -2530,7 +3311,8 @@ protected:
Row_reader
Extract the rows from the event.
- ****************************************************************************/
+ @section Delete_rows_log_event_binary_format Binary Format
+*/
class Delete_rows_log_event : public Rows_log_event
{
public:
@@ -2580,6 +3362,8 @@ protected:
#include "log_event_old.h"
/**
+ @class Incident_log_event
+
Class representing an incident, an occurance out of the ordinary,
that happened on the master.
@@ -2591,7 +3375,7 @@ protected:
<caption>Incident event format</caption>
<tr>
<th>Symbol</th>
- <th>Size<br>(bytes)</th>
+ <th>Size<br/>(bytes)</th>
<th>Description</th>
</tr>
<tr>
@@ -2610,7 +3394,9 @@ protected:
<td>The message, if present. Not null terminated.</td>
</tr>
</table>
- */
+
+ @section Delete_rows_log_event_binary_format Binary Format
+*/
class Incident_log_event : public Log_event {
public:
#ifndef MYSQL_CLIENT
diff --git a/sql/log_event_old.cc b/sql/log_event_old.cc
index 949179386ea..c6b691ec010 100644
--- a/sql/log_event_old.cc
+++ b/sql/log_event_old.cc
@@ -68,7 +68,7 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const Relay_log_info *rli
{
if (!need_reopen)
{
- if (thd->query_error || thd->is_fatal_error)
+ if (thd->is_slave_error || thd->is_fatal_error)
{
/*
Error reporting borrowed from Query_log_event with many excessive
@@ -112,7 +112,7 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const Relay_log_info *rli
uint tables_count= rli->tables_to_lock_count;
if ((error= open_tables(thd, &tables, &tables_count, 0)))
{
- if (thd->query_error || thd->is_fatal_error)
+ if (thd->is_slave_error || thd->is_fatal_error)
{
/*
Error reporting borrowed from Query_log_event with many excessive
@@ -123,7 +123,7 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const Relay_log_info *rli
"Error '%s' on reopening tables",
(actual_error ? thd->net.last_error :
"unexpected success or fatal error"));
- thd->query_error= 1;
+ thd->is_slave_error= 1;
}
const_cast<Relay_log_info*>(rli)->clear_tables_to_lock();
DBUG_RETURN(error);
@@ -146,7 +146,7 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const Relay_log_info *rli
{
mysql_unlock_tables(thd, thd->lock);
thd->lock= 0;
- thd->query_error= 1;
+ thd->is_slave_error= 1;
const_cast<Relay_log_info*>(rli)->clear_tables_to_lock();
DBUG_RETURN(Rows_log_event::ERR_BAD_TABLE_DEF);
}
@@ -255,7 +255,7 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const Relay_log_info *rli
"Error in %s event: row application failed. %s",
ev->get_type_str(),
thd->net.last_error ? thd->net.last_error : "");
- thd->query_error= 1;
+ thd->is_slave_error= 1;
break;
}
@@ -300,7 +300,7 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const Relay_log_info *rli
*/
thd->reset_current_stmt_binlog_row_based();
const_cast<Relay_log_info*>(rli)->cleanup_context(thd, error);
- thd->query_error= 1;
+ thd->is_slave_error= 1;
DBUG_RETURN(error);
}
diff --git a/sql/my_decimal.cc b/sql/my_decimal.cc
index 1f0ebf32795..54cef6abdb5 100644
--- a/sql/my_decimal.cc
+++ b/sql/my_decimal.cc
@@ -68,24 +68,43 @@ int decimal_operation_results(int result)
}
-/*
- Converting decimal to string
-
- SYNOPSIS
- my_decimal2string()
-
- return
- E_DEC_OK
- E_DEC_TRUNCATED
- E_DEC_OVERFLOW
- E_DEC_OOM
+/**
+ @brief Converting decimal to string
+
+ @details Convert given my_decimal to String; allocate buffer as needed.
+
+ @param[in] mask what problems to warn on (mask of E_DEC_* values)
+ @param[in] d the decimal to print
+ @param[in] fixed_prec overall number of digits if ZEROFILL, 0 otherwise
+ @param[in] fixed_dec number of decimal places (if fixed_prec != 0)
+ @param[in] filler what char to pad with (ZEROFILL et al.)
+ @param[out] *str where to store the resulting string
+
+ @return error coce
+ @retval E_DEC_OK
+ @retval E_DEC_TRUNCATED
+ @retval E_DEC_OVERFLOW
+ @retval E_DEC_OOM
*/
int my_decimal2string(uint mask, const my_decimal *d,
uint fixed_prec, uint fixed_dec,
char filler, String *str)
{
- int length= (fixed_prec ? (fixed_prec + 1) : my_decimal_string_length(d));
+ /*
+ Calculate the size of the string: For DECIMAL(a,b), fixed_prec==a
+ holds true iff the type is also ZEROFILL, which in turn implies
+ UNSIGNED. Hence the buffer for a ZEROFILLed value is the length
+ the user requested, plus one for a possible decimal point, plus
+ one if the user only wanted decimal places, but we force a leading
+ zero on them. Because the type is implicitly UNSIGNED, we do not
+ need to reserve a character for the sign. For all other cases,
+ fixed_prec will be 0, and my_decimal_string_length() will be called
+ instead to calculate the required size of the buffer.
+ */
+ int length= (fixed_prec
+ ? (fixed_prec + ((fixed_prec == fixed_dec) ? 1 : 0) + 1)
+ : my_decimal_string_length(d));
int result;
if (str->alloc(length))
return check_result(mask, E_DEC_OOM);
diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h
index f7738e44404..7484c2b26b1 100644
--- a/sql/mysql_priv.h
+++ b/sql/mysql_priv.h
@@ -266,7 +266,7 @@ protected:
#define QUERY_ALLOC_PREALLOC_SIZE 8192
#define TRANS_ALLOC_BLOCK_SIZE 4096
#define TRANS_ALLOC_PREALLOC_SIZE 4096
-#define RANGE_ALLOC_BLOCK_SIZE 2048
+#define RANGE_ALLOC_BLOCK_SIZE 4096
#define ACL_ALLOC_BLOCK_SIZE 1024
#define UDF_ALLOC_BLOCK_SIZE 1024
#define TABLE_ALLOC_BLOCK_SIZE 1024
@@ -327,8 +327,13 @@ protected:
#define PRECISION_FOR_DOUBLE 53
#define PRECISION_FOR_FLOAT 24
+/*
+ Default time to wait before aborting a new client connection
+ that does not respond to "initial server greeting" timely
+*/
+#define CONNECT_TIMEOUT 10
+
/* The following can also be changed from the command line */
-#define CONNECT_TIMEOUT 5 // Do not wait long for connect
#define DEFAULT_CONCURRENCY 10
#define DELAYED_LIMIT 100 /* pause after xxx inserts */
#define DELAYED_QUEUE_SIZE 1000
@@ -674,15 +679,34 @@ extern my_decimal decimal_zero;
void free_items(Item *item);
void cleanup_items(Item *item);
class THD;
-void close_thread_tables(THD *thd, bool locked=0, bool skip_derived=0);
+void close_thread_tables(THD *thd);
+
+#ifndef NO_EMBEDDED_ACCESS_CHECKS
bool check_one_table_access(THD *thd, ulong privilege, TABLE_LIST *tables);
bool check_single_table_access(THD *thd, ulong privilege,
TABLE_LIST *tables, bool no_errors);
bool check_routine_access(THD *thd,ulong want_access,char *db,char *name,
bool is_proc, bool no_errors);
bool check_some_access(THD *thd, ulong want_access, TABLE_LIST *table);
-bool check_merge_table_access(THD *thd, char *db, TABLE_LIST *table_list);
bool check_some_routine_access(THD *thd, const char *db, const char *name, bool is_proc);
+#else
+inline bool check_one_table_access(THD *thd, ulong privilege, TABLE_LIST *tables)
+{ return false; }
+inline bool check_single_table_access(THD *thd, ulong privilege,
+ TABLE_LIST *tables, bool no_errors)
+{ return false; }
+inline bool check_routine_access(THD *thd,ulong want_access,char *db,
+ char *name, bool is_proc, bool no_errors)
+{ return false; }
+inline bool check_some_access(THD *thd, ulong want_access, TABLE_LIST *table)
+{ return false; }
+inline bool check_merge_table_access(THD *thd, char *db, TABLE_LIST *table_list)
+{ return false; }
+inline bool check_some_routine_access(THD *thd, const char *db,
+ const char *name, bool is_proc)
+{ return false; }
+#endif /*NO_EMBEDDED_ACCESS_CHECKS*/
+
bool multi_update_precheck(THD *thd, TABLE_LIST *tables);
bool multi_delete_precheck(THD *thd, TABLE_LIST *tables);
bool mysql_multi_update_prepare(THD *thd);
@@ -740,6 +764,9 @@ bool slow_log_print(THD *thd, const char *query, uint query_length,
bool general_log_print(THD *thd, enum enum_server_command command,
const char *format,...);
+bool general_log_write(THD *thd, enum enum_server_command command,
+ const char *query, uint query_length);
+
#include "sql_class.h"
#include "sql_acl.h"
#include "tztime.h"
@@ -912,18 +939,16 @@ bool init_new_connection_handler_thread();
void reset_mqh(LEX_USER *lu, bool get_them);
bool check_mqh(THD *thd, uint check_command);
void time_out_user_resource_limits(THD *thd, USER_CONN *uc);
-int check_for_max_user_connections(THD *thd, USER_CONN *uc);
void decrease_user_connections(USER_CONN *uc);
void thd_init_client_charset(THD *thd, uint cs_number);
bool setup_connection_thread_globals(THD *thd);
bool login_connection(THD *thd);
-void prepare_new_connection_state(THD* thd);
void end_connection(THD *thd);
bool mysql_create_db(THD *thd, char *db, HA_CREATE_INFO *create, bool silent);
bool mysql_alter_db(THD *thd, const char *db, HA_CREATE_INFO *create);
bool mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent);
-bool mysql_rename_db(THD *thd, LEX_STRING *old_db, LEX_STRING *new_db);
+bool mysql_upgrade_db(THD *thd, LEX_STRING *old_db);
void mysql_binlog_send(THD* thd, char* log_ident, my_off_t pos, ushort flags);
void mysql_client_binlog_statement(THD *thd);
bool mysql_rm_table(THD *thd,TABLE_LIST *tables, my_bool if_exists,
@@ -973,7 +998,8 @@ bool check_dup(const char *db, const char *name, TABLE_LIST *tables);
bool compare_record(TABLE *table);
bool append_file_to_dir(THD *thd, const char **filename_ptr,
const char *table_name);
-
+void wait_while_table_is_used(THD *thd, TABLE *table,
+ enum ha_extra_function function);
bool table_cache_init(void);
void table_cache_free(void);
bool table_def_init(void);
@@ -985,11 +1011,27 @@ void kill_mysql(void);
void close_connection(THD *thd, uint errcode, bool lock);
bool reload_acl_and_cache(THD *thd, ulong options, TABLE_LIST *tables,
bool *write_to_binlog);
+#ifndef NO_EMBEDDED_ACCESS_CHECKS
bool check_access(THD *thd, ulong access, const char *db, ulong *save_priv,
bool no_grant, bool no_errors, bool schema_db);
bool check_table_access(THD *thd, ulong want_access, TABLE_LIST *tables,
bool no_errors);
bool check_global_access(THD *thd, ulong want_access);
+#else
+inline bool check_access(THD *thd, ulong access, const char *db,
+ ulong *save_priv, bool no_grant, bool no_errors,
+ bool schema_db)
+{
+ if (save_priv)
+ *save_priv= GLOBAL_ACLS;
+ return false;
+}
+inline bool check_table_access(THD *thd, ulong want_access, TABLE_LIST *tables,
+ bool no_errors)
+{ return false; }
+inline bool check_global_access(THD *thd, ulong want_access)
+{ return false; }
+#endif /*NO_EMBEDDED_ACCESS_CHECKS*/
/*
Support routine for SQL parser on partitioning syntax
@@ -1136,12 +1178,16 @@ TABLE *open_ltable(THD *thd, TABLE_LIST *table_list, thr_lock_type update,
uint lock_flags);
TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT* mem,
bool *refresh, uint flags);
+bool name_lock_locked_table(THD *thd, TABLE_LIST *tables);
bool reopen_name_locked_table(THD* thd, TABLE_LIST* table_list, bool link_in);
TABLE *table_cache_insert_placeholder(THD *thd, const char *key,
uint key_length);
bool lock_table_name_if_not_cached(THD *thd, const char *db,
const char *table_name, TABLE **table);
TABLE *find_locked_table(THD *thd, const char *db,const char *table_name);
+void detach_merge_children(TABLE *table, bool clear_refs);
+bool fix_merge_after_open(TABLE_LIST *old_child_list, TABLE_LIST **old_last,
+ TABLE_LIST *new_child_list, TABLE_LIST **new_last);
bool reopen_table(TABLE *table);
bool reopen_tables(THD *thd,bool get_locks,bool in_refresh);
void close_data_files_and_morph_locks(THD *thd, const char *db,
@@ -1283,12 +1329,9 @@ bool mysql_ha_open(THD *thd, TABLE_LIST *tables, bool reopen);
bool mysql_ha_close(THD *thd, TABLE_LIST *tables);
bool mysql_ha_read(THD *, TABLE_LIST *,enum enum_ha_read_modes,char *,
List<Item> *,enum ha_rkey_function,Item *,ha_rows,ha_rows);
-int mysql_ha_flush(THD *thd, TABLE_LIST *tables, uint mode_flags,
- bool is_locked);
-/* mysql_ha_flush mode_flags bits */
-#define MYSQL_HA_CLOSE_FINAL 0x00
-#define MYSQL_HA_REOPEN_ON_USAGE 0x01
-#define MYSQL_HA_FLUSH_ALL 0x02
+void mysql_ha_flush(THD *thd);
+void mysql_ha_rm_tables(THD *thd, TABLE_LIST *tables, bool is_locked);
+void mysql_ha_cleanup(THD *thd);
/* sql_base.cc */
#define TMP_TABLE_KEY_EXTRA 8
@@ -1392,8 +1435,21 @@ int init_ftfuncs(THD *thd, SELECT_LEX* select, bool no_order);
void wait_for_condition(THD *thd, pthread_mutex_t *mutex,
pthread_cond_t *cond);
int open_tables(THD *thd, TABLE_LIST **tables, uint *counter, uint flags);
-int simple_open_n_lock_tables(THD *thd,TABLE_LIST *tables);
-bool open_and_lock_tables(THD *thd,TABLE_LIST *tables);
+/* open_and_lock_tables with optional derived handling */
+bool open_and_lock_tables_derived(THD *thd, TABLE_LIST *tables, bool derived);
+/* simple open_and_lock_tables without derived handling */
+inline bool simple_open_n_lock_tables(THD *thd, TABLE_LIST *tables)
+{
+ return open_and_lock_tables_derived(thd, tables, FALSE);
+}
+/* open_and_lock_tables with derived handling */
+inline bool open_and_lock_tables(THD *thd, TABLE_LIST *tables)
+{
+ return open_and_lock_tables_derived(thd, tables, TRUE);
+}
+/* simple open_and_lock_tables without derived handling for single table */
+TABLE *open_n_lock_single_table(THD *thd, TABLE_LIST *table_l,
+ thr_lock_type lock_type);
bool open_normal_and_derived_tables(THD *thd, TABLE_LIST *tables, uint flags);
int lock_tables(THD *thd, TABLE_LIST *tables, uint counter, bool *need_reopen);
int decide_logging_format(THD *thd, TABLE_LIST *tables);
@@ -1413,7 +1469,7 @@ TABLE_LIST *unique_table(THD *thd, TABLE_LIST *table, TABLE_LIST *table_list,
bool check_alias);
TABLE *find_temporary_table(THD *thd, const char *db, const char *table_name);
TABLE *find_temporary_table(THD *thd, TABLE_LIST *table_list);
-bool close_temporary_table(THD *thd, TABLE_LIST *table_list);
+int drop_temporary_table(THD *thd, TABLE_LIST *table_list);
void close_temporary_table(THD *thd, TABLE *table, bool free_share,
bool delete_table);
void close_temporary(TABLE *table, bool free_share, bool delete_table);
@@ -1673,6 +1729,7 @@ void flush_thread_cache();
/* item_func.cc */
extern bool check_reserved_words(LEX_STRING *name);
+extern enum_field_types agg_field_type(Item **items, uint nitems);
/* strfunc.cc */
ulonglong find_set(TYPELIB *lib, const char *x, uint length, CHARSET_INFO *cs,
@@ -1972,7 +2029,8 @@ int format_number(uint inputflag,uint max_length,char * pos,uint length,
/* table.cc */
TABLE_SHARE *alloc_table_share(TABLE_LIST *table_list, char *key,
uint key_length);
-void init_tmp_table_share(TABLE_SHARE *share, const char *key, uint key_length,
+void init_tmp_table_share(THD *thd, TABLE_SHARE *share, const char *key,
+ uint key_length,
const char *table_name, const char *path);
void free_table_share(TABLE_SHARE *share);
int open_table_def(THD *thd, TABLE_SHARE *share, uint db_flags);
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index c95522b114d..d5e4b71dd18 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -175,7 +175,7 @@ typedef fp_except fp_except_t;
this on freebsd
*/
-inline void reset_floating_point_exceptions()
+inline void set_proper_floating_point_mode()
{
/* Don't fall for overflow, underflow,divide-by-zero or loss of precision */
#if defined(__i386__)
@@ -186,8 +186,22 @@ inline void reset_floating_point_exceptions()
FP_X_IMP));
#endif
}
+#elif defined(__sgi)
+/* for IRIX to use set_fpc_csr() */
+#include <sys/fpu.h>
+
+inline void set_proper_floating_point_mode()
+{
+ /* Enable denormalized DOUBLE values support for IRIX */
+ {
+ union fpc_csr n;
+ n.fc_word = get_fpc_csr();
+ n.fc_struct.flush = 0;
+ set_fpc_csr(n.fc_word);
+ }
+}
#else
-#define reset_floating_point_exceptions()
+#define set_proper_floating_point_mode()
#endif /* __FreeBSD__ && HAVE_IEEEFP_H */
} /* cplusplus */
@@ -1166,6 +1180,8 @@ void clean_up(bool print_message)
if (cleanup_done++)
return; /* purecov: inspected */
+ release_ddl_log();
+
/*
make sure that handlers finish up
what they have that is dependent on the binlog
@@ -1363,8 +1379,21 @@ static void set_ports()
{ // Get port if not from commandline
struct servent *serv_ptr;
mysqld_port= MYSQL_PORT;
+
+ /*
+ if builder specifically requested a default port, use that
+ (even if it coincides with our factory default).
+ only if they didn't do we check /etc/services (and, failing
+ on that, fall back to the factory default of 3306).
+ either default can be overridden by the environment variable
+ MYSQL_TCP_PORT, which in turn can be overridden with command
+ line options.
+ */
+
+#if MYSQL_PORT_DEFAULT == 0
if ((serv_ptr= getservbyname("mysql", "tcp")))
mysqld_port= ntohs((u_short) serv_ptr->s_port); /* purecov: inspected */
+#endif
if ((env = getenv("MYSQL_TCP_PORT")))
mysqld_port= (uint) atoi(env); /* purecov: inspected */
}
@@ -2218,7 +2247,7 @@ bytes of memory\n", ((ulong) dflt_key_cache->key_cache_mem_size +
You seem to be running 32-bit Linux and have %d concurrent connections.\n\
If you have not changed STACK_SIZE in LinuxThreads and built the binary \n\
yourself, LinuxThreads is quite likely to steal a part of the global heap for\n\
-the thread stack. Please read http://www.mysql.com/doc/en/Linux.html\n\n",
+the thread stack. Please read http://dev.mysql.com/doc/mysql/en/linux.html\n\n",
thread_count);
}
#endif /* HAVE_LINUXTHREADS */
@@ -2238,7 +2267,7 @@ Some pointers may be invalid and cause the dump to abort...\n");
fprintf(stderr, "thd->thread_id=%lu\n", (ulong) thd->thread_id);
}
fprintf(stderr, "\
-The manual page at http://www.mysql.com/doc/en/Crashing.html contains\n\
+The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains\n\
information that should help you find out what is causing the crash.\n");
fflush(stderr);
#endif /* HAVE_STACKTRACE */
@@ -2590,7 +2619,7 @@ int my_message_sql(uint error, const char *str, myf MyFlags)
TODO: There are two exceptions mechanism (THD and sp_rcontext),
this could be improved by having a common stack of handlers.
*/
- if (thd->handle_error(error, level) ||
+ if (thd->handle_error(error, str, level) ||
(thd->spcont && thd->spcont->handle_error(error, level, thd)))
DBUG_RETURN(0);
@@ -2599,10 +2628,15 @@ int my_message_sql(uint error, const char *str, myf MyFlags)
if (level != MYSQL_ERROR::WARN_LEVEL_ERROR)
goto to_error_log;
- thd->query_error= 1; // needed to catch query errors during replication
+ thd->is_slave_error= 1; // needed to catch query errors during replication
if (!thd->no_warnings_for_error)
+ {
+ thd->no_warnings_for_error= TRUE;
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_ERROR, error, str);
+ thd->no_warnings_for_error= FALSE;
+ }
+
/*
thd->lex->current_select == 0 if lex structure is not inited
(not query command (COM_QUERY))
@@ -2943,7 +2977,6 @@ static int init_common_variables(const char *conf_file_name, int argc,
global_system_variables.collation_connection= default_charset_info;
global_system_variables.character_set_results= default_charset_info;
global_system_variables.character_set_client= default_charset_info;
- global_system_variables.collation_connection= default_charset_info;
if (!(character_set_filesystem=
get_charset_by_csname(character_set_filesystem_name,
@@ -3249,7 +3282,7 @@ static int init_server_components()
query_cache_init();
query_cache_resize(query_cache_size);
my_rnd_init(&sql_rand,(ulong) server_start_time,(ulong) server_start_time/2);
- reset_floating_point_exceptions();
+ set_proper_floating_point_mode();
init_thr_lock();
#ifdef HAVE_REPLICATION
init_slave_list();
@@ -4008,7 +4041,6 @@ we force server id to 2, but this MySQL server will not act as a slave.");
pthread_cond_wait(&COND_thread_count,&LOCK_thread_count);
(void) pthread_mutex_unlock(&LOCK_thread_count);
- release_ddl_log();
#if defined(__WIN__) && !defined(EMBEDDED_LIBRARY)
if (Service.IsNT() && start_mode)
Service.Stop();
@@ -4315,6 +4347,7 @@ void create_thread_to_handle_connection(THD *thd)
}
else
{
+ char error_message_buff[MYSQL_ERRMSG_SIZE];
/* Create new thread to handle connection */
int error;
thread_created++;
@@ -4333,7 +4366,10 @@ void create_thread_to_handle_connection(THD *thd)
thd->killed= THD::KILL_CONNECTION; // Safety
(void) pthread_mutex_unlock(&LOCK_thread_count);
statistic_increment(aborted_connects,&LOCK_status);
- net_printf_error(thd, ER_CANT_CREATE_THREAD, error);
+ /* Can't use my_error() since store_globals has not been called. */
+ my_snprintf(error_message_buff, sizeof(error_message_buff),
+ ER(ER_CANT_CREATE_THREAD), error);
+ net_send_error(thd, ER_CANT_CREATE_THREAD, error_message_buff);
(void) pthread_mutex_lock(&LOCK_thread_count);
close_connection(thd,0,0);
delete thd;
@@ -4608,8 +4644,13 @@ pthread_handler_t handle_connections_sockets(void *arg __attribute__((unused)))
sock == unix_sock ? VIO_LOCALHOST: 0)) ||
my_net_init(&thd->net,vio_tmp))
{
- if (vio_tmp)
- vio_delete(vio_tmp);
+ /*
+ Only delete the temporary vio if we didn't already attach it to the
+ NET object. The destructor in THD will delete any initialized net
+ structure.
+ */
+ if (vio_tmp && thd->net.vio != vio_tmp)
+ vio_delete(vio_tmp);
else
{
(void) shutdown(new_sock, SHUT_RDWR);
@@ -5234,7 +5275,7 @@ struct my_option my_long_options[] =
{"concurrent-insert", OPT_CONCURRENT_INSERT,
"Use concurrent insert with MyISAM. Disable with --concurrent-insert=0",
(uchar**) &myisam_concurrent_insert, (uchar**) &myisam_concurrent_insert,
- 0, GET_LONG, OPT_ARG, 1, 0, 2, 0, 0, 0},
+ 0, GET_ULONG, OPT_ARG, 1, 0, 2, 0, 0, 0},
{"console", OPT_CONSOLE, "Write error output on screen; Don't remove the console window on windows.",
(uchar**) &opt_console, (uchar**) &opt_console, 0, GET_BOOL, NO_ARG, 0, 0, 0,
0, 0, 0},
@@ -5442,7 +5483,8 @@ Disable with --skip-large-pages.",
#ifdef HAVE_MMAP
{"log-tc-size", OPT_LOG_TC_SIZE, "Size of transaction coordinator log.",
(uchar**) &opt_tc_log_size, (uchar**) &opt_tc_log_size, 0, GET_ULONG,
- REQUIRED_ARG, TC_LOG_MIN_SIZE, TC_LOG_MIN_SIZE, ~0L, 0, TC_LOG_PAGE_SIZE, 0},
+ REQUIRED_ARG, TC_LOG_MIN_SIZE, TC_LOG_MIN_SIZE, ULONG_MAX, 0,
+ TC_LOG_PAGE_SIZE, 0},
#endif
{"log-update", OPT_UPDATE_LOG,
"The update log is deprecated since version 5.0, is replaced by the binary \
@@ -5660,7 +5702,13 @@ master-ssl",
{"pid-file", OPT_PID_FILE, "Pid file used by safe_mysqld.",
(uchar**) &pidfile_name_ptr, (uchar**) &pidfile_name_ptr, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"port", 'P', "Port number to use for connection.", (uchar**) &mysqld_port,
+ {"port", 'P', "Port number to use for connection or 0 for default to, in "
+ "order of preference, my.cnf, $MYSQL_TCP_PORT, "
+#if MYSQL_PORT_DEFAULT == 0
+ "/etc/services, "
+#endif
+ "built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
+ (uchar**) &mysqld_port,
(uchar**) &mysqld_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"port-open-timeout", OPT_PORT_OPEN_TIMEOUT,
"Maximum time in seconds to wait for the port to become free. "
@@ -5897,8 +5945,8 @@ log and this option does nothing anymore.",
NO_ARG, 0, 0, 0, 0, 0, 0},
{"warnings", 'W', "Deprecated; use --log-warnings instead.",
(uchar**) &global_system_variables.log_warnings,
- (uchar**) &max_system_variables.log_warnings, 0, GET_ULONG, OPT_ARG, 1, 0, ~0L,
- 0, 0, 0},
+ (uchar**) &max_system_variables.log_warnings, 0, GET_ULONG, OPT_ARG,
+ 1, 0, ULONG_MAX, 0, 0, 0},
{ "back_log", OPT_BACK_LOG,
"The number of outstanding connection requests MySQL can have. This comes into play when the main MySQL thread gets very many connection requests in a very short time.",
(uchar**) &back_log, (uchar**) &back_log, 0, GET_ULONG,
@@ -5906,12 +5954,12 @@ log and this option does nothing anymore.",
{"binlog_cache_size", OPT_BINLOG_CACHE_SIZE,
"The size of the cache to hold the SQL statements for the binary log during a transaction. If you often use big, multi-statement transactions you can increase this to get more performance.",
(uchar**) &binlog_cache_size, (uchar**) &binlog_cache_size, 0, GET_ULONG,
- REQUIRED_ARG, 32*1024L, IO_SIZE, ~0L, 0, IO_SIZE, 0},
+ REQUIRED_ARG, 32*1024L, IO_SIZE, ULONG_MAX, 0, IO_SIZE, 0},
{"bulk_insert_buffer_size", OPT_BULK_INSERT_BUFFER_SIZE,
"Size of tree cache used in bulk insert optimisation. Note that this is a limit per thread!",
(uchar**) &global_system_variables.bulk_insert_buff_size,
(uchar**) &max_system_variables.bulk_insert_buff_size,
- 0, GET_ULONG, REQUIRED_ARG, 8192*1024, 0, ~0L, 0, 1, 0},
+ 0, GET_ULONG, REQUIRED_ARG, 8192*1024, 0, ULONG_MAX, 0, 1, 0},
{"connect_timeout", OPT_CONNECT_TIMEOUT,
"The number of seconds the mysqld server is waiting for a connect packet before responding with 'Bad handshake'.",
(uchar**) &connect_timeout, (uchar**) &connect_timeout,
@@ -5934,7 +5982,7 @@ log and this option does nothing anymore.",
{"delayed_insert_limit", OPT_DELAYED_INSERT_LIMIT,
"After inserting delayed_insert_limit rows, the INSERT DELAYED handler will check if there are any SELECT statements pending. If so, it allows these to execute before continuing.",
(uchar**) &delayed_insert_limit, (uchar**) &delayed_insert_limit, 0, GET_ULONG,
- REQUIRED_ARG, DELAYED_LIMIT, 1, ~0L, 0, 1, 0},
+ REQUIRED_ARG, DELAYED_LIMIT, 1, ULONG_MAX, 0, 1, 0},
{"delayed_insert_timeout", OPT_DELAYED_INSERT_TIMEOUT,
"How long a INSERT DELAYED thread should wait for INSERT statements before terminating.",
(uchar**) &delayed_insert_timeout, (uchar**) &delayed_insert_timeout, 0,
@@ -5942,7 +5990,7 @@ log and this option does nothing anymore.",
{ "delayed_queue_size", OPT_DELAYED_QUEUE_SIZE,
"What size queue (in rows) should be allocated for handling INSERT DELAYED. If the queue becomes full, any client that does INSERT DELAYED will wait until there is room in the queue again.",
(uchar**) &delayed_queue_size, (uchar**) &delayed_queue_size, 0, GET_ULONG,
- REQUIRED_ARG, DELAYED_QUEUE_SIZE, 1, ~0L, 0, 1, 0},
+ REQUIRED_ARG, DELAYED_QUEUE_SIZE, 1, ULONG_MAX, 0, 1, 0},
{"div_precision_increment", OPT_DIV_PRECINCREMENT,
"Precision of the result of '/' operator will be increased on that value.",
(uchar**) &global_system_variables.div_precincrement,
@@ -5982,7 +6030,7 @@ log and this option does nothing anymore.",
"The maximum length of the result of function group_concat.",
(uchar**) &global_system_variables.group_concat_max_len,
(uchar**) &max_system_variables.group_concat_max_len, 0, GET_ULONG,
- REQUIRED_ARG, 1024, 4, (long) ~0, 0, 1, 0},
+ REQUIRED_ARG, 1024, 4, ULONG_MAX, 0, 1, 0},
{"interactive_timeout", OPT_INTERACTIVE_TIMEOUT,
"The number of seconds the server waits for activity on an interactive connection before closing it.",
(uchar**) &global_system_variables.net_interactive_timeout,
@@ -5992,8 +6040,8 @@ log and this option does nothing anymore.",
"The size of the buffer that is used for full joins.",
(uchar**) &global_system_variables.join_buff_size,
(uchar**) &max_system_variables.join_buff_size, 0, GET_ULONG,
- REQUIRED_ARG, 128*1024L, IO_SIZE*2+MALLOC_OVERHEAD, ~0L, MALLOC_OVERHEAD,
- IO_SIZE, 0},
+ REQUIRED_ARG, 128*1024L, IO_SIZE*2+MALLOC_OVERHEAD, ULONG_MAX,
+ MALLOC_OVERHEAD, IO_SIZE, 0},
{"keep_files_on_create", OPT_KEEP_FILES_ON_CREATE,
"Don't overwrite stale .MYD and .MYI even if no directory is specified.",
(uchar**) &global_system_variables.keep_files_on_create,
@@ -6004,14 +6052,14 @@ log and this option does nothing anymore.",
(uchar**) &dflt_key_cache_var.param_buff_size,
(uchar**) 0,
0, (GET_ULL | GET_ASK_ADDR),
- REQUIRED_ARG, KEY_CACHE_SIZE, MALLOC_OVERHEAD, ~(ulong) 0, MALLOC_OVERHEAD,
+ REQUIRED_ARG, KEY_CACHE_SIZE, MALLOC_OVERHEAD, SIZE_T_MAX, MALLOC_OVERHEAD,
IO_SIZE, 0},
{"key_cache_age_threshold", OPT_KEY_CACHE_AGE_THRESHOLD,
"This characterizes the number of hits a hot block has to be untouched until it is considered aged enough to be downgraded to a warm block. This specifies the percentage ratio of that number of hits to the total number of blocks in key cache",
(uchar**) &dflt_key_cache_var.param_age_threshold,
(uchar**) 0,
0, (GET_ULONG | GET_ASK_ADDR), REQUIRED_ARG,
- 300, 100, ~0L, 0, 100, 0},
+ 300, 100, ULONG_MAX, 0, 100, 0},
{"key_cache_block_size", OPT_KEY_CACHE_BLOCK_SIZE,
"The default size of key cache blocks",
(uchar**) &dflt_key_cache_var.param_block_size,
@@ -6047,7 +6095,7 @@ log and this option does nothing anymore.",
{"max_binlog_cache_size", OPT_MAX_BINLOG_CACHE_SIZE,
"Can be used to restrict the total size used to cache a multi-transaction query.",
(uchar**) &max_binlog_cache_size, (uchar**) &max_binlog_cache_size, 0,
- GET_ULONG, REQUIRED_ARG, ~0L, IO_SIZE, ~0L, 0, IO_SIZE, 0},
+ GET_ULONG, REQUIRED_ARG, ULONG_MAX, IO_SIZE, ULONG_MAX, 0, IO_SIZE, 0},
{"max_binlog_size", OPT_MAX_BINLOG_SIZE,
"Binary log will be rotated automatically when the size exceeds this \
value. Will also apply to relay logs if max_relay_log_size is 0. \
@@ -6057,7 +6105,7 @@ The minimum value for this variable is 4096.",
{"max_connect_errors", OPT_MAX_CONNECT_ERRORS,
"If there is more than this number of interrupted connections from a host this host will be blocked from further connections.",
(uchar**) &max_connect_errors, (uchar**) &max_connect_errors, 0, GET_ULONG,
- REQUIRED_ARG, MAX_CONNECT_ERRORS, 1, ~0L, 0, 1, 0},
+ REQUIRED_ARG, MAX_CONNECT_ERRORS, 1, ULONG_MAX, 0, 1, 0},
// Default max_connections of 151 is larger than Apache's default max
// children, to avoid "too many connections" error in a common setup
{"max_connections", OPT_MAX_CONNECTIONS,
@@ -6084,7 +6132,7 @@ The minimum value for this variable is 4096.",
"Joins that are probably going to read more than max_join_size records return an error.",
(uchar**) &global_system_variables.max_join_size,
(uchar**) &max_system_variables.max_join_size, 0, GET_HA_ROWS, REQUIRED_ARG,
- ~0L, 1, ~0L, 0, 1, 0},
+ ULONG_MAX, 1, ULONG_MAX, 0, 1, 0},
{"max_length_for_sort_data", OPT_MAX_LENGTH_FOR_SORT_DATA,
"Max number of bytes in sorted records.",
(uchar**) &global_system_variables.max_length_for_sort_data,
@@ -6102,7 +6150,7 @@ The minimum value for this variable is 4096.",
"Limit assumed max number of seeks when looking up rows based on a key",
(uchar**) &global_system_variables.max_seeks_for_key,
(uchar**) &max_system_variables.max_seeks_for_key, 0, GET_ULONG,
- REQUIRED_ARG, ~0L, 1, ~0L, 0, 1, 0 },
+ REQUIRED_ARG, ULONG_MAX, 1, ULONG_MAX, 0, 1, 0 },
{"max_sort_length", OPT_MAX_SORT_LENGTH,
"The number of bytes to use when sorting BLOB or TEXT values (only the first max_sort_length bytes of each value are used; the rest are ignored).",
(uchar**) &global_system_variables.max_sort_length,
@@ -6117,25 +6165,25 @@ The minimum value for this variable is 4096.",
"Maximum number of temporary tables a client can keep open at a time.",
(uchar**) &global_system_variables.max_tmp_tables,
(uchar**) &max_system_variables.max_tmp_tables, 0, GET_ULONG,
- REQUIRED_ARG, 32, 1, ~0L, 0, 1, 0},
+ REQUIRED_ARG, 32, 1, ULONG_MAX, 0, 1, 0},
{"max_user_connections", OPT_MAX_USER_CONNECTIONS,
"The maximum number of active connections for a single user (0 = no limit).",
(uchar**) &max_user_connections, (uchar**) &max_user_connections, 0, GET_UINT,
- REQUIRED_ARG, 0, 0, ~0, 0, 1, 0},
+ REQUIRED_ARG, 0, 0, UINT_MAX, 0, 1, 0},
{"max_write_lock_count", OPT_MAX_WRITE_LOCK_COUNT,
"After this many write locks, allow some read locks to run in between.",
(uchar**) &max_write_lock_count, (uchar**) &max_write_lock_count, 0, GET_ULONG,
- REQUIRED_ARG, ~0L, 1, ~0L, 0, 1, 0},
+ REQUIRED_ARG, ULONG_MAX, 1, ULONG_MAX, 0, 1, 0},
{"min_examined_row_limit", OPT_MIN_EXAMINED_ROW_LIMIT,
"Don't log queries which examine less than min_examined_row_limit rows to file.",
(uchar**) &global_system_variables.min_examined_row_limit,
(uchar**) &max_system_variables.min_examined_row_limit, 0, GET_ULONG,
- REQUIRED_ARG, 0, 0, ~0L, 0, 1L, 0},
+ REQUIRED_ARG, 0, 0, ULONG_MAX, 0, 1L, 0},
{"multi_range_count", OPT_MULTI_RANGE_COUNT,
"Number of key ranges to request at once.",
(uchar**) &global_system_variables.multi_range_count,
(uchar**) &max_system_variables.multi_range_count, 0,
- GET_ULONG, REQUIRED_ARG, 256, 1, ~0L, 0, 1, 0},
+ GET_ULONG, REQUIRED_ARG, 256, 1, ULONG_MAX, 0, 1, 0},
{"myisam_block_size", OPT_MYISAM_BLOCK_SIZE,
"Block size to be used for MyISAM index pages.",
(uchar**) &opt_myisam_block_size,
@@ -6157,12 +6205,12 @@ The minimum value for this variable is 4096.",
"Number of threads to use when repairing MyISAM tables. The value of 1 disables parallel repair.",
(uchar**) &global_system_variables.myisam_repair_threads,
(uchar**) &max_system_variables.myisam_repair_threads, 0,
- GET_ULONG, REQUIRED_ARG, 1, 1, ~0L, 0, 1, 0},
+ GET_ULONG, REQUIRED_ARG, 1, 1, ULONG_MAX, 0, 1, 0},
{"myisam_sort_buffer_size", OPT_MYISAM_SORT_BUFFER_SIZE,
"The buffer that is allocated when sorting the index when doing a REPAIR or when creating indexes with CREATE INDEX or ALTER TABLE.",
(uchar**) &global_system_variables.myisam_sort_buff_size,
(uchar**) &max_system_variables.myisam_sort_buff_size, 0,
- GET_ULONG, REQUIRED_ARG, 8192*1024, 4, ~0L, 0, 1, 0},
+ GET_ULONG, REQUIRED_ARG, 8192*1024, 4, ULONG_MAX, 0, 1, 0},
{"myisam_use_mmap", OPT_MYISAM_USE_MMAP,
"Use memory mapping for reading and writing MyISAM tables",
(uchar**) &opt_myisam_use_mmap,
@@ -6188,7 +6236,7 @@ The minimum value for this variable is 4096.",
"If a read on a communication port is interrupted, retry this many times before giving up.",
(uchar**) &global_system_variables.net_retry_count,
(uchar**) &max_system_variables.net_retry_count,0,
- GET_ULONG, REQUIRED_ARG, MYSQLD_NET_RETRY_COUNT, 1, ~0L, 0, 1, 0},
+ GET_ULONG, REQUIRED_ARG, MYSQLD_NET_RETRY_COUNT, 1, ULONG_MAX, 0, 1, 0},
{"net_write_timeout", OPT_NET_WRITE_TIMEOUT,
"Number of seconds to wait for a block to be written to a connection before aborting the write.",
(uchar**) &global_system_variables.net_write_timeout,
@@ -6230,17 +6278,17 @@ The minimum value for this variable is 4096.",
"Allocation block size for query parsing and execution",
(uchar**) &global_system_variables.query_alloc_block_size,
(uchar**) &max_system_variables.query_alloc_block_size, 0, GET_ULONG,
- REQUIRED_ARG, QUERY_ALLOC_BLOCK_SIZE, 1024, ~0L, 0, 1024, 0},
+ REQUIRED_ARG, QUERY_ALLOC_BLOCK_SIZE, 1024, ULONG_MAX, 0, 1024, 0},
#ifdef HAVE_QUERY_CACHE
{"query_cache_limit", OPT_QUERY_CACHE_LIMIT,
"Don't cache results that are bigger than this.",
(uchar**) &query_cache_limit, (uchar**) &query_cache_limit, 0, GET_ULONG,
- REQUIRED_ARG, 1024*1024L, 0, (longlong) ULONG_MAX, 0, 1, 0},
+ REQUIRED_ARG, 1024*1024L, 0, ULONG_MAX, 0, 1, 0},
{"query_cache_min_res_unit", OPT_QUERY_CACHE_MIN_RES_UNIT,
"minimal size of unit in wich space for results is allocated (last unit will be trimed after writing all result data.",
(uchar**) &query_cache_min_res_unit, (uchar**) &query_cache_min_res_unit,
0, GET_ULONG, REQUIRED_ARG, QUERY_CACHE_MIN_RESULT_DATA_SIZE,
- 0, (longlong) ULONG_MAX, 0, 1, 0},
+ 0, ULONG_MAX, 0, 1, 0},
#endif /*HAVE_QUERY_CACHE*/
{"query_cache_size", OPT_QUERY_CACHE_SIZE,
"The memory allocated to store results from old queries.",
@@ -6263,17 +6311,18 @@ The minimum value for this variable is 4096.",
(uchar**) &global_system_variables.query_prealloc_size,
(uchar**) &max_system_variables.query_prealloc_size, 0, GET_ULONG,
REQUIRED_ARG, QUERY_ALLOC_PREALLOC_SIZE, QUERY_ALLOC_PREALLOC_SIZE,
- ~0L, 0, 1024, 0},
+ ULONG_MAX, 0, 1024, 0},
{"range_alloc_block_size", OPT_RANGE_ALLOC_BLOCK_SIZE,
"Allocation block size for storing ranges during optimization",
(uchar**) &global_system_variables.range_alloc_block_size,
(uchar**) &max_system_variables.range_alloc_block_size, 0, GET_ULONG,
- REQUIRED_ARG, RANGE_ALLOC_BLOCK_SIZE, RANGE_ALLOC_BLOCK_SIZE, ~0L, 0, 1024, 0},
+ REQUIRED_ARG, RANGE_ALLOC_BLOCK_SIZE, RANGE_ALLOC_BLOCK_SIZE, ULONG_MAX,
+ 0, 1024, 0},
{"read_buffer_size", OPT_RECORD_BUFFER,
"Each thread that does a sequential scan allocates a buffer of this size for each table it scans. If you do many sequential scans, you may want to increase this value.",
(uchar**) &global_system_variables.read_buff_size,
(uchar**) &max_system_variables.read_buff_size,0, GET_ULONG, REQUIRED_ARG,
- 128*1024L, IO_SIZE*2+MALLOC_OVERHEAD, SSIZE_MAX, MALLOC_OVERHEAD, IO_SIZE,
+ 128*1024L, IO_SIZE*2+MALLOC_OVERHEAD, INT_MAX32, MALLOC_OVERHEAD, IO_SIZE,
0},
{"read_only", OPT_READONLY,
"Make all non-temporary tables read-only, with the exception for replication (slave) threads and users with the SUPER privilege",
@@ -6285,12 +6334,12 @@ The minimum value for this variable is 4096.",
(uchar**) &global_system_variables.read_rnd_buff_size,
(uchar**) &max_system_variables.read_rnd_buff_size, 0,
GET_ULONG, REQUIRED_ARG, 256*1024L, IO_SIZE*2+MALLOC_OVERHEAD,
- SSIZE_MAX, MALLOC_OVERHEAD, IO_SIZE, 0},
+ INT_MAX32, MALLOC_OVERHEAD, IO_SIZE, 0},
{"record_buffer", OPT_RECORD_BUFFER,
"Alias for read_buffer_size",
(uchar**) &global_system_variables.read_buff_size,
(uchar**) &max_system_variables.read_buff_size,0, GET_ULONG, REQUIRED_ARG,
- 128*1024L, IO_SIZE*2+MALLOC_OVERHEAD, SSIZE_MAX, MALLOC_OVERHEAD, IO_SIZE, 0},
+ 128*1024L, IO_SIZE*2+MALLOC_OVERHEAD, INT_MAX32, MALLOC_OVERHEAD, IO_SIZE, 0},
#ifdef HAVE_REPLICATION
{"relay_log_purge", OPT_RELAY_LOG_PURGE,
"0 = do not purge relay logs. 1 = purge them as soon as they are no more needed.",
@@ -6326,13 +6375,13 @@ The minimum value for this variable is 4096.",
"Each thread that needs to do a sort allocates a buffer of this size.",
(uchar**) &global_system_variables.sortbuff_size,
(uchar**) &max_system_variables.sortbuff_size, 0, GET_ULONG, REQUIRED_ARG,
- MAX_SORT_MEMORY, MIN_SORT_MEMORY+MALLOC_OVERHEAD*2, ~0L, MALLOC_OVERHEAD,
+ MAX_SORT_MEMORY, MIN_SORT_MEMORY+MALLOC_OVERHEAD*2, ULONG_MAX, MALLOC_OVERHEAD,
1, 0},
{"sync-binlog", OPT_SYNC_BINLOG,
"Synchronously flush binary log to disk after every #th event. "
"Use 0 (default) to disable synchronous flushing.",
(uchar**) &sync_binlog_period, (uchar**) &sync_binlog_period, 0, GET_ULONG,
- REQUIRED_ARG, 0, 0, ~0L, 0, 1, 0},
+ REQUIRED_ARG, 0, 0, ULONG_MAX, 0, 1, 0},
{"sync-frm", OPT_SYNC_FRM, "Sync .frm to disk on create. Enabled by default.",
(uchar**) &opt_sync_frm, (uchar**) &opt_sync_frm, 0, GET_BOOL, NO_ARG, 1, 0,
0, 0, 0, 0},
@@ -6370,7 +6419,7 @@ The minimum value for this variable is 4096.",
{"thread_stack", OPT_THREAD_STACK,
"The stack size for each thread.", (uchar**) &my_thread_stack_size,
(uchar**) &my_thread_stack_size, 0, GET_ULONG, REQUIRED_ARG,DEFAULT_THREAD_STACK,
- 1024L*128L, ~0L, 0, 1024, 0},
+ 1024L*128L, ULONG_MAX, 0, 1024, 0},
{ "time_format", OPT_TIME_FORMAT,
"The TIME format (for future).",
(uchar**) &opt_date_time_formats[MYSQL_TIMESTAMP_TIME],
@@ -6386,12 +6435,12 @@ The minimum value for this variable is 4096.",
"Allocation block size for transactions to be stored in binary log",
(uchar**) &global_system_variables.trans_alloc_block_size,
(uchar**) &max_system_variables.trans_alloc_block_size, 0, GET_ULONG,
- REQUIRED_ARG, QUERY_ALLOC_BLOCK_SIZE, 1024, ~0L, 0, 1024, 0},
+ REQUIRED_ARG, QUERY_ALLOC_BLOCK_SIZE, 1024, ULONG_MAX, 0, 1024, 0},
{"transaction_prealloc_size", OPT_TRANS_PREALLOC_SIZE,
"Persistent buffer for transactions to be stored in binary log",
(uchar**) &global_system_variables.trans_prealloc_size,
(uchar**) &max_system_variables.trans_prealloc_size, 0, GET_ULONG,
- REQUIRED_ARG, TRANS_ALLOC_PREALLOC_SIZE, 1024, ~0L, 0, 1024, 0},
+ REQUIRED_ARG, TRANS_ALLOC_PREALLOC_SIZE, 1024, ULONG_MAX, 0, 1024, 0},
{"thread_handling", OPT_THREAD_HANDLING,
"Define threads usage for handling queries: "
"one-thread-per-connection or no-threads", 0, 0,
@@ -7753,12 +7802,13 @@ mysqld_get_one_option(int optid,
break;
}
case OPT_ONE_THREAD:
- global_system_variables.thread_handling= 2;
+ global_system_variables.thread_handling=
+ SCHEDULER_ONE_THREAD_PER_CONNECTION;
break;
case OPT_THREAD_HANDLING:
{
global_system_variables.thread_handling=
- find_type_or_exit(argument, &thread_handling_typelib, opt->name);
+ find_type_or_exit(argument, &thread_handling_typelib, opt->name)-1;
break;
}
case OPT_FT_BOOLEAN_SYNTAX:
diff --git a/sql/net_serv.cc b/sql/net_serv.cc
index 1f75d7ab1d7..18cf1ebae5b 100644
--- a/sql/net_serv.cc
+++ b/sql/net_serv.cc
@@ -123,7 +123,7 @@ my_bool my_net_init(NET *net, Vio* vio)
MYF(MY_WME))))
DBUG_RETURN(1);
net->buff_end=net->buff+net->max_packet;
- net->no_send_ok= net->no_send_eof= net->no_send_error= 0;
+ net->no_send_ok= net->no_send_error= 0;
net->error=0; net->return_errno=0; net->return_status=0;
net->pkt_nr=net->compress_pkt_nr=0;
net->write_pos=net->read_pos = net->buff;
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index 97d0bcc8707..4ccbdb06a2f 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -276,6 +276,9 @@ public:
Field *field;
uchar *min_value,*max_value; // Pointer to range
+ /*
+ eq_tree() requires that left == right == 0 if the type is MAYBE_KEY.
+ */
SEL_ARG *left,*right; /* R-B tree children */
SEL_ARG *next,*prev; /* Links for bi-directional interval list */
SEL_ARG *parent; /* R-B tree parent */
@@ -291,7 +294,7 @@ public:
SEL_ARG(Field *field, uint8 part, uchar *min_value, uchar *max_value,
uint8 min_flag, uint8 max_flag, uint8 maybe_flag);
SEL_ARG(enum Type type_arg)
- :min_flag(0),elements(1),use_count(1),left(0),next_key_part(0),
+ :min_flag(0),elements(1),use_count(1),left(0),right(0),next_key_part(0),
color(BLACK), type(type_arg)
{}
inline bool is_same(SEL_ARG *arg)
@@ -2158,12 +2161,18 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
keys_to_use.intersect(head->keys_in_use_for_query);
if (!keys_to_use.is_clear_all())
{
+#ifndef EMBEDDED_LIBRARY // Avoid compiler warning
+ uchar buff[STACK_BUFF_ALLOC];
+#endif
MEM_ROOT alloc;
SEL_TREE *tree= NULL;
KEY_PART *key_parts;
KEY *key_info;
PARAM param;
+ if (check_stack_overrun(thd, 2*STACK_MIN_SIZE, buff))
+ DBUG_RETURN(0); // Fatal error flag is set
+
/* set up parameter that is passed to all functions */
param.thd= thd;
param.baseflag= head->file->ha_table_flags();
@@ -3341,18 +3350,16 @@ static bool create_partition_index_description(PART_PRUNE_PARAM *ppar)
{
key_part->key= 0;
key_part->part= part;
- key_part->length= (uint16) (*field)->pack_length_in_rec();
- /*
- psergey-todo: check yet again if this is correct for tricky field types,
- e.g. see "Fix a fatal error in decimal key handling" in open_binary_frm()
- */
- key_part->store_length= (uint16) (*field)->pack_length();
+ key_part->store_length= key_part->length= (uint16) (*field)->key_length();
if ((*field)->real_maybe_null())
key_part->store_length+= HA_KEY_NULL_LENGTH;
if ((*field)->type() == MYSQL_TYPE_BLOB ||
(*field)->real_type() == MYSQL_TYPE_VARCHAR)
key_part->store_length+= HA_KEY_BLOB_LENGTH;
+ DBUG_PRINT("info", ("part %u length %u store_length %u", part,
+ key_part->length, key_part->store_length));
+
key_part->field= (*field);
key_part->image_type = Field::itRAW;
/*
@@ -4461,8 +4468,8 @@ TRP_ROR_INTERSECT *get_best_ror_intersect(const PARAM *param, SEL_TREE *tree,
ROR_SCAN_INFO's.
Step 2: Get best ROR-intersection using an approximate algorithm.
*/
- qsort(tree->ror_scans, tree->n_ror_scans, sizeof(ROR_SCAN_INFO*),
- (qsort_cmp)cmp_ror_scan_info);
+ my_qsort(tree->ror_scans, tree->n_ror_scans, sizeof(ROR_SCAN_INFO*),
+ (qsort_cmp)cmp_ror_scan_info);
DBUG_EXECUTE("info",print_ror_scans_arr(param->table, "ordered",
tree->ror_scans,
tree->ror_scans_end););
@@ -4654,8 +4661,8 @@ TRP_ROR_INTERSECT *get_best_covering_ror_intersect(PARAM *param,
bitmap_get_first(&(*scan)->covered_fields);
}
- qsort(ror_scan_mark, ror_scans_end-ror_scan_mark, sizeof(ROR_SCAN_INFO*),
- (qsort_cmp)cmp_ror_scan_info_covering);
+ my_qsort(ror_scan_mark, ror_scans_end-ror_scan_mark, sizeof(ROR_SCAN_INFO*),
+ (qsort_cmp)cmp_ror_scan_info_covering);
DBUG_EXECUTE("info", print_ror_scans_arr(param->table,
"remaining scans",
@@ -5049,7 +5056,7 @@ static SEL_TREE *get_func_mm_tree(RANGE_OPT_PARAM *param, Item_func *cond_func,
if (inv)
{
- if (func->array->result_type() != ROW_RESULT)
+ if (func->array && func->array->result_type() != ROW_RESULT)
{
/*
We get here for conditions in form "t.key NOT IN (c1, c2, ...)",
@@ -5724,6 +5731,7 @@ get_mm_leaf(RANGE_OPT_PARAM *param, COND *conf_func, Field *field,
{
tree= new (alloc) SEL_ARG(field, 0, 0);
tree->type= SEL_ARG::IMPOSSIBLE;
+ goto end;
}
else
{
@@ -5732,8 +5740,32 @@ get_mm_leaf(RANGE_OPT_PARAM *param, COND *conf_func, Field *field,
for the cases like int_field > 999999999999999999999999 as well.
*/
tree= 0;
+ if (err == 3 && field->type() == FIELD_TYPE_DATE &&
+ (type == Item_func::GT_FUNC || type == Item_func::GE_FUNC ||
+ type == Item_func::LT_FUNC || type == Item_func::LE_FUNC) )
+ {
+ /*
+ We were saving DATETIME into a DATE column, the conversion went ok
+ but a non-zero time part was cut off.
+
+ In MySQL's SQL dialect, DATE and DATETIME are compared as datetime
+ values. Index over a DATE column uses DATE comparison. Changing
+ from one comparison to the other is possible:
+
+ datetime(date_col)< '2007-12-10 12:34:55' -> date_col<='2007-12-10'
+ datetime(date_col)<='2007-12-10 12:34:55' -> date_col<='2007-12-10'
+
+ datetime(date_col)> '2007-12-10 12:34:55' -> date_col>='2007-12-10'
+ datetime(date_col)>='2007-12-10 12:34:55' -> date_col>='2007-12-10'
+
+ but we'll need to convert '>' to '>=' and '<' to '<='. This will
+ be done together with other types at the end of this function
+ (grep for field_is_equal_to_item)
+ */
+ }
+ else
+ goto end;
}
- goto end;
}
if (err < 0)
{
@@ -7348,6 +7380,9 @@ check_quick_keys(PARAM *param, uint idx, SEL_ARG *key_tree,
tmp_max_flag= max_key_flag | key_tree->max_flag;
}
+ if (unlikely(param->thd->killed != 0))
+ return HA_POS_ERROR;
+
keynr=param->real_keynr[idx];
param->range_count++;
if (!tmp_min_flag && ! tmp_max_flag &&
diff --git a/sql/opt_range.h b/sql/opt_range.h
index dd219129167..4f5cce28bf2 100644
--- a/sql/opt_range.h
+++ b/sql/opt_range.h
@@ -24,9 +24,14 @@
#endif
typedef struct st_key_part {
- uint16 key,part, store_length, length;
+ uint16 key,part;
+ /* See KEY_PART_INFO for meaning of the next two: */
+ uint16 store_length, length;
uint8 null_bit;
- /* Keypart flags (0 if partition pruning is used) */
+ /*
+ Keypart flags (0 when this structure is used by partition pruning code
+ for fake partitioning index description)
+ */
uint8 flag;
Field *field;
Field::imagetype image_type;
diff --git a/sql/opt_sum.cc b/sql/opt_sum.cc
index 6836c53db4e..12ad504d738 100644
--- a/sql/opt_sum.cc
+++ b/sql/opt_sum.cc
@@ -295,14 +295,15 @@ int opt_sum_query(TABLE_LIST *tables, List<Item> &all_fields,COND *conds)
Check if case 1 from above holds. If it does, we should read
the skipped tuple.
*/
- if (ref.key_buff[prefix_len] == 1 &&
- /*
+ if (item_field->field->real_maybe_null() &&
+ ref.key_buff[prefix_len] == 1 &&
+ /*
Last keypart (i.e. the argument to MIN) is set to NULL by
find_key_for_maxmin only if all other keyparts are bound
to constants in a conjunction of equalities. Hence, we
can detect this by checking only if the last keypart is
NULL.
- */
+ */
(error == HA_ERR_KEY_NOT_FOUND ||
key_cmp_if_same(table, ref.key_buff, ref.key, prefix_len)))
{
diff --git a/sql/partition_info.cc b/sql/partition_info.cc
index ab887d5dda0..3b580422da1 100644
--- a/sql/partition_info.cc
+++ b/sql/partition_info.cc
@@ -524,6 +524,13 @@ bool partition_info::check_range_constants()
current_largest= part_range_value;
range_int_array[i]= part_range_value;
}
+ else if (defined_max_value &&
+ current_largest == part_range_value &&
+ part_range_value == LONGLONG_MAX &&
+ i == (no_parts - 1))
+ {
+ range_int_array[i]= part_range_value;
+ }
else
{
my_error(ER_RANGE_NOT_INCREASING_ERROR, MYF(0));
@@ -666,8 +673,8 @@ bool partition_info::check_list_constants()
if (fixed && no_list_values)
{
bool first= TRUE;
- qsort((void*)list_array, no_list_values, sizeof(LIST_PART_ENTRY),
- &list_part_cmp);
+ my_qsort((void*)list_array, no_list_values, sizeof(LIST_PART_ENTRY),
+ &list_part_cmp);
i= 0;
LINT_INIT(prev_value);
diff --git a/sql/protocol.cc b/sql/protocol.cc
index 2ed241c4c98..c147b68ca1f 100644
--- a/sql/protocol.cc
+++ b/sql/protocol.cc
@@ -58,7 +58,7 @@ bool Protocol_binary::net_store_data(const uchar *from, size_t length)
Design note:
- net_printf_error and net_send_error are low-level functions
+ net_send_error is a low-level functions
that shall be used only when a new connection is being
established or at server startup.
For SIGNAL/RESIGNAL and GET DIAGNOSTICS functionality it's
@@ -76,6 +76,12 @@ void net_send_error(THD *thd, uint sql_errno, const char *err)
DBUG_ASSERT(!thd->spcont);
+ if (thd->killed == THD::KILL_QUERY || thd->killed == THD::KILL_BAD_DATA)
+ {
+ thd->killed= THD::NOT_KILLED;
+ thd->mysys_var->abort= 0;
+ }
+
if (net && net->no_send_error)
{
thd->clear_error();
@@ -84,7 +90,7 @@ void net_send_error(THD *thd, uint sql_errno, const char *err)
DBUG_VOID_RETURN;
}
- thd->query_error= 1; // needed to catch query errors during replication
+ thd->is_slave_error= 1; // needed to catch query errors during replication
if (!err)
{
if (sql_errno)
@@ -110,134 +116,17 @@ void net_send_error(THD *thd, uint sql_errno, const char *err)
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_ERROR, sql_errno, err);
}
+ /* Abort multi-result sets */
+ thd->server_status&= ~SERVER_MORE_RESULTS_EXISTS;
+
net_send_error_packet(thd, sql_errno, err);
thd->is_fatal_error= 0; // Error message is given
thd->net.report_error= 0;
- /* Abort multi-result sets */
- thd->server_status&= ~SERVER_MORE_RESULTS_EXISTS;
DBUG_VOID_RETURN;
}
-/*
- Write error package and flush to client
- It's a little too low level, but I don't want to use another buffer for
- this
-
- Design note:
-
- net_printf_error and net_send_error are low-level functions
- that shall be used only when a new connection is being
- established or at server startup.
- For SIGNAL/RESIGNAL and GET DIAGNOSTICS functionality it's
- critical that every error that can be intercepted is issued in one
- place only, my_message_sql.
-*/
-
-void
-net_printf_error(THD *thd, uint errcode, ...)
-{
- va_list args;
- uint length,offset;
- const char *format;
-#ifndef EMBEDDED_LIBRARY
- const char *text_pos;
- int head_length= NET_HEADER_SIZE;
-#else
- char text_pos[1024];
-#endif
- NET *net= &thd->net;
-
- DBUG_ENTER("net_printf_error");
- DBUG_PRINT("enter",("message: %u",errcode));
-
- DBUG_ASSERT(!thd->spcont);
-
- if (net && net->no_send_error)
- {
- thd->clear_error();
- thd->is_fatal_error= 0; // Error message is given
- DBUG_PRINT("info", ("sending error messages prohibited"));
- DBUG_VOID_RETURN;
- }
-
- thd->query_error= 1; // needed to catch query errors during replication
-#ifndef EMBEDDED_LIBRARY
- query_cache_abort(net); // Safety
-#endif
- va_start(args,errcode);
- /*
- The following is needed to make net_printf_error() work with 0 argument
- for errorcode and use the argument after that as the format string. This
- is useful for rare errors that are not worth the hassle to put in
- errmsg.sys, but at the same time, the message is not fixed text
- */
- if (errcode)
- format= ER(errcode);
- else
- {
- format=va_arg(args,char*);
- errcode= ER_UNKNOWN_ERROR;
- }
- offset= (net->return_errno ?
- ((thd->client_capabilities & CLIENT_PROTOCOL_41) ?
- 2+SQLSTATE_LENGTH+1 : 2) : 0);
-#ifndef EMBEDDED_LIBRARY
- text_pos=(char*) net->buff + head_length + offset + 1;
- length= (uint) ((char*)net->buff_end - text_pos);
-#else
- length=sizeof(text_pos)-1;
-#endif
- length=my_vsnprintf(my_const_cast(char*) (text_pos),
- min(length, sizeof(net->last_error)),
- format,args);
- va_end(args);
-
- /* Replication slave relies on net->last_* to see if there was error */
- net->last_errno= errcode;
- strmake(net->last_error, text_pos, sizeof(net->last_error)-1);
-
-#ifndef EMBEDDED_LIBRARY
- if (net->vio == 0)
- {
- if (thd->bootstrap)
- {
- /*
- In bootstrap it's ok to print on stderr
- This may also happen when we get an error from a slave thread
- */
- fprintf(stderr,"ERROR: %d %s\n",errcode,text_pos);
- thd->fatal_error();
- }
- DBUG_VOID_RETURN;
- }
-
- int3store(net->buff,length+1+offset);
- net->buff[3]= (net->compress) ? 0 : (uchar) (net->pkt_nr++);
- net->buff[head_length]=(uchar) 255; // Error package
- if (offset)
- {
- uchar *pos= net->buff+head_length+1;
- int2store(pos, errcode);
- if (thd->client_capabilities & CLIENT_PROTOCOL_41)
- {
- pos[2]= '#'; /* To make the protocol backward compatible */
- memcpy(pos+3, mysql_errno_to_sqlstate(errcode), SQLSTATE_LENGTH);
- }
- }
- VOID(net_real_write(net, net->buff, length+head_length+1+offset));
-#else
- net->last_errno= errcode;
- strmake(net->last_error, text_pos, length);
- strmake(net->sqlstate, mysql_errno_to_sqlstate(errcode), SQLSTATE_LENGTH);
-#endif
- if (thd->killed != THD::KILL_CONNECTION)
- push_warning(thd, MYSQL_ERROR::WARN_LEVEL_ERROR, errcode,
- text_pos ? text_pos : ER(errcode));
- thd->is_fatal_error=0; // Error message is given
- DBUG_VOID_RETURN;
-}
/*
Return ok to the client.
@@ -346,7 +235,7 @@ send_eof(THD *thd)
{
NET *net= &thd->net;
DBUG_ENTER("send_eof");
- if (net->vio != 0 && !net->no_send_eof)
+ if (net->vio != 0)
{
write_eof_packet(thd, net);
VOID(net_flush(net));
@@ -410,7 +299,10 @@ void net_send_error_packet(THD *thd, uint sql_errno, const char *err)
{
NET *net= &thd->net;
uint length;
- uchar buff[MYSQL_ERRMSG_SIZE+2], *pos;
+ /*
+ buff[]: sql_errno:2 + ('#':1 + SQLSTATE_LENGTH:5) + MYSQL_ERRMSG_SIZE:512
+ */
+ uchar buff[2+1+SQLSTATE_LENGTH+MYSQL_ERRMSG_SIZE], *pos;
DBUG_ENTER("send_error_packet");
@@ -827,6 +719,7 @@ bool Protocol_text::store(const char *from, size_t length,
field_types[field_pos] == MYSQL_TYPE_DECIMAL ||
field_types[field_pos] == MYSQL_TYPE_BIT ||
field_types[field_pos] == MYSQL_TYPE_NEWDECIMAL ||
+ field_types[field_pos] == MYSQL_TYPE_NEWDATE ||
(field_types[field_pos] >= MYSQL_TYPE_ENUM &&
field_types[field_pos] <= MYSQL_TYPE_GEOMETRY));
field_pos++;
diff --git a/sql/protocol.h b/sql/protocol.h
index 46a2b6d36b6..53584326f03 100644
--- a/sql/protocol.h
+++ b/sql/protocol.h
@@ -172,7 +172,6 @@ public:
};
void send_warning(THD *thd, uint sql_errno, const char *err=0);
-void net_printf_error(THD *thd, uint sql_errno, ...);
void net_send_error(THD *thd, uint sql_errno=0, const char *err=0);
void send_ok(THD *thd, ha_rows affected_rows=0L, ulonglong id=0L,
const char *info=0);
diff --git a/sql/records.cc b/sql/records.cc
index 81c26da4b4d..349cc4a8329 100644
--- a/sql/records.cc
+++ b/sql/records.cc
@@ -55,6 +55,7 @@ static int rr_index(READ_RECORD *info);
void init_read_record_idx(READ_RECORD *info, THD *thd, TABLE *table,
bool print_error, uint idx)
{
+ empty_record(table);
bzero((char*) info,sizeof(*info));
info->table= table;
info->file= table->file;
@@ -161,6 +162,7 @@ void init_read_record(READ_RECORD *info,THD *thd, TABLE *table,
}
else
{
+ empty_record(table);
info->record= table->record[0];
info->ref_length= table->file->ref_length;
}
@@ -565,7 +567,8 @@ static int rr_from_cache(READ_RECORD *info)
int3store(ref_position,(long) i);
ref_position+=3;
}
- qsort(info->read_positions,length,info->struct_length,(qsort_cmp) rr_cmp);
+ my_qsort(info->read_positions, length, info->struct_length,
+ (qsort_cmp) rr_cmp);
position=info->read_positions;
for (i=0 ; i < length ; i++)
diff --git a/sql/rpl_record.cc b/sql/rpl_record.cc
index 65c8e106112..ed0dc82cf01 100644
--- a/sql/rpl_record.cc
+++ b/sql/rpl_record.cc
@@ -65,6 +65,8 @@ pack_row(TABLE *table, MY_BITMAP const* cols,
my_ptrdiff_t const rec_offset= record - table->record[0];
my_ptrdiff_t const def_offset= table->s->default_values - table->record[0];
+ DBUG_ENTER("pack_row");
+
/*
We write the null bits and the packed records using one pass
through all the fields. The null bytes are written little-endian,
@@ -96,26 +98,17 @@ pack_row(TABLE *table, MY_BITMAP const* cols,
For big-endian machines, we have to make sure that the
length is stored in little-endian format, since this is the
format used for the binlog.
-
- We do this by setting the db_low_byte_first, which is used
- inside some store_length() to decide what order to write the
- bytes in.
-
- In reality, db_log_byte_first is only set for legacy table
- type Isam, but in the event of a bug, we need to guarantee
- the endianess when writing to the binlog.
-
- This is currently broken for NDB due to BUG#29549, so we
- will fix it when NDB has fixed their way of handling BLOBs.
*/
-#if 0
- bool save= table->s->db_low_byte_first;
- table->s->db_low_byte_first= TRUE;
-#endif
- pack_ptr= field->pack(pack_ptr, field->ptr + offset);
-#if 0
- table->s->db_low_byte_first= save;
+#ifndef DBUG_OFF
+ const uchar *old_pack_ptr= pack_ptr;
#endif
+ pack_ptr= field->pack(pack_ptr, field->ptr + offset,
+ field->max_data_length(), TRUE);
+ DBUG_PRINT("debug", ("field: %s; pack_ptr: 0x%lx;"
+ " pack_ptr':0x%lx; bytes: %d",
+ field->field_name, (ulong) old_pack_ptr,
+ (ulong) pack_ptr,
+ (int) (pack_ptr - old_pack_ptr)));
}
null_mask <<= 1;
@@ -143,8 +136,8 @@ pack_row(TABLE *table, MY_BITMAP const* cols,
packed data. If it doesn't, something is very wrong.
*/
DBUG_ASSERT(null_ptr == row_data + null_byte_count);
-
- return static_cast<size_t>(pack_ptr - row_data);
+ DBUG_DUMP("row_data", row_data, pack_ptr - row_data);
+ DBUG_RETURN(static_cast<size_t>(pack_ptr - row_data));
}
#endif
@@ -242,18 +235,16 @@ unpack_row(Relay_log_info const *rli,
Use the master's size information if available else call
normal unpack operation.
*/
-#if 0
- bool save= table->s->db_low_byte_first;
- table->s->db_low_byte_first= TRUE;
-#endif
uint16 const metadata= tabledef->field_metadata(i);
- if (tabledef && metadata)
- pack_ptr= f->unpack(f->ptr, pack_ptr, metadata);
- else
- pack_ptr= f->unpack(f->ptr, pack_ptr);
-#if 0
- table->s->db_low_byte_first= save;
+#ifndef DBUG_OFF
+ uchar const *const old_pack_ptr= pack_ptr;
#endif
+ pack_ptr= f->unpack(f->ptr, pack_ptr, metadata, TRUE);
+ DBUG_PRINT("debug", ("field: %s; metadata: 0x%x;"
+ " pack_ptr: 0x%lx; pack_ptr': 0x%lx; bytes: %d",
+ f->field_name, metadata,
+ (ulong) old_pack_ptr, (ulong) pack_ptr,
+ (int) (pack_ptr - old_pack_ptr)));
}
null_mask <<= 1;
@@ -289,6 +280,8 @@ unpack_row(Relay_log_info const *rli,
*/
DBUG_ASSERT(null_ptr == row_data + master_null_byte_count);
+ DBUG_DUMP("row_data", row_data, pack_ptr - row_data);
+
*row_end = pack_ptr;
if (master_reclength)
{
diff --git a/sql/rpl_rli.cc b/sql/rpl_rli.cc
index 867d55a60a3..15d7d97affd 100644
--- a/sql/rpl_rli.cc
+++ b/sql/rpl_rli.cc
@@ -1082,6 +1082,9 @@ bool Relay_log_info::cached_charset_compare(char *charset) const
void Relay_log_info::stmt_done(my_off_t event_master_log_pos,
time_t event_creation_time)
{
+#ifndef DBUG_OFF
+ extern uint debug_not_change_ts_if_art_event;
+#endif
clear_flag(IN_STMT);
/*
@@ -1121,7 +1124,12 @@ void Relay_log_info::stmt_done(my_off_t event_master_log_pos,
is that value may take some time to display in
Seconds_Behind_Master - not critical).
*/
- last_master_timestamp= event_creation_time;
+#ifndef DBUG_OFF
+ if (!(event_creation_time == 0 && debug_not_change_ts_if_art_event > 0))
+#else
+ if (event_creation_time != 0)
+#endif
+ last_master_timestamp= event_creation_time;
}
}
diff --git a/sql/rpl_rli.h b/sql/rpl_rli.h
index 10ecf1a43d4..a3a57ad4ce9 100644
--- a/sql/rpl_rli.h
+++ b/sql/rpl_rli.h
@@ -366,6 +366,18 @@ public:
}
/**
+ Get the value of a replication state flag.
+
+ @param flag Flag to get value of
+
+ @return @c true if the flag was set, @c false otherwise.
+ */
+ bool get_flag(enum_state_flag flag)
+ {
+ return m_flags & (1UL << flag);
+ }
+
+ /**
Clear the value of a replication state flag.
@param flag Flag to clear
diff --git a/sql/rpl_utility.cc b/sql/rpl_utility.cc
index d1ce5bf3b7b..b3ca26d4c2c 100644
--- a/sql/rpl_utility.cc
+++ b/sql/rpl_utility.cc
@@ -31,31 +31,34 @@ uint32 table_def::calc_field_size(uint col, uchar *master_data) const
switch (type(col)) {
case MYSQL_TYPE_NEWDECIMAL:
length= my_decimal_get_binary_size(m_field_metadata[col] >> 8,
- m_field_metadata[col] - ((m_field_metadata[col] >> 8) << 8));
+ m_field_metadata[col] & 0xff);
break;
case MYSQL_TYPE_DECIMAL:
case MYSQL_TYPE_FLOAT:
case MYSQL_TYPE_DOUBLE:
length= m_field_metadata[col];
break;
+ /*
+ The cases for SET and ENUM are include for completeness, however
+ both are mapped to type MYSQL_TYPE_STRING and their real types
+ are encoded in the field metadata.
+ */
case MYSQL_TYPE_SET:
case MYSQL_TYPE_ENUM:
case MYSQL_TYPE_STRING:
{
- if (((m_field_metadata[col] & 0xff00) == (MYSQL_TYPE_SET << 8)) ||
- ((m_field_metadata[col] & 0xff00) == (MYSQL_TYPE_ENUM << 8)))
+ uchar type= m_field_metadata[col] >> 8U;
+ if ((type == MYSQL_TYPE_SET) || (type == MYSQL_TYPE_ENUM))
length= m_field_metadata[col] & 0x00ff;
else
{
- length= m_field_metadata[col] & 0x00ff;
- DBUG_ASSERT(length > 0);
- if (length > 255)
- {
- DBUG_ASSERT(uint2korr(master_data) > 0);
- length= uint2korr(master_data) + 2;
- }
- else
- length= (uint) *master_data + 1;
+ /*
+ We are reading the actual size from the master_data record
+ because this field has the actual lengh stored in the first
+ byte.
+ */
+ length= (uint) *master_data + 1;
+ DBUG_ASSERT(length != 0);
}
break;
}
@@ -95,6 +98,13 @@ uint32 table_def::calc_field_size(uint col, uchar *master_data) const
break;
case MYSQL_TYPE_BIT:
{
+ /*
+ Decode the size of the bit field from the master.
+ from_len is the length in bytes from the master
+ from_bit_len is the number of extra bits stored in the master record
+ If from_bit_len is not 0, add 1 to the length to account for accurate
+ number of bytes needed.
+ */
uint from_len= (m_field_metadata[col] >> 8U) & 0x00ff;
uint from_bit_len= m_field_metadata[col] & 0x00ff;
DBUG_ASSERT(from_bit_len <= 7);
@@ -136,7 +146,7 @@ uint32 table_def::calc_field_size(uint col, uchar *master_data) const
length= *master_data;
break;
case 2:
- length= sint2korr(master_data);
+ length= uint2korr(master_data);
break;
case 3:
length= uint3korr(master_data);
diff --git a/sql/rpl_utility.h b/sql/rpl_utility.h
index 26edbdd1405..375715c7858 100644
--- a/sql/rpl_utility.h
+++ b/sql/rpl_utility.h
@@ -99,7 +99,7 @@ public:
/*
These types store a single byte.
*/
- m_field_metadata[i]= (uchar)field_metadata[index];
+ m_field_metadata[i]= field_metadata[index];
index++;
break;
}
@@ -107,14 +107,14 @@ public:
case MYSQL_TYPE_ENUM:
case MYSQL_TYPE_STRING:
{
- short int x= field_metadata[index++] << 8U; // real_type
- x = x + field_metadata[index++]; // pack or field length
+ uint16 x= field_metadata[index++] << 8U; // real_type
+ x+= field_metadata[index++]; // pack or field length
m_field_metadata[i]= x;
break;
}
case MYSQL_TYPE_BIT:
{
- short int x= field_metadata[index++];
+ uint16 x= field_metadata[index++];
x = x + (field_metadata[index++] << 8U);
m_field_metadata[i]= x;
break;
@@ -125,14 +125,14 @@ public:
These types store two bytes.
*/
char *ptr= (char *)&field_metadata[index];
- m_field_metadata[i]= sint2korr(ptr);
+ m_field_metadata[i]= uint2korr(ptr);
index= index + 2;
break;
}
case MYSQL_TYPE_NEWDECIMAL:
{
- short int x= field_metadata[index++] << 8U; // precision
- x = x + field_metadata[index++]; // decimals
+ uint16 x= field_metadata[index++] << 8U; // precision
+ x+= field_metadata[index++]; // decimals
m_field_metadata[i]= x;
break;
}
diff --git a/sql/scheduler.h b/sql/scheduler.h
index 8351cefda4c..46bbd300cbb 100644
--- a/sql/scheduler.h
+++ b/sql/scheduler.h
@@ -40,7 +40,7 @@ public:
enum scheduler_types
{
- SCHEDULER_ONE_THREAD_PER_CONNECTION=1,
+ SCHEDULER_ONE_THREAD_PER_CONNECTION=0,
SCHEDULER_NO_THREADS,
SCHEDULER_POOL_OF_THREADS
};
diff --git a/sql/set_var.cc b/sql/set_var.cc
index 0815c7df755..eb3b5c0b2e1 100644
--- a/sql/set_var.cc
+++ b/sql/set_var.cc
@@ -120,6 +120,10 @@ static int check_max_delayed_threads(THD *thd, set_var *var);
static void fix_thd_mem_root(THD *thd, enum_var_type type);
static void fix_trans_mem_root(THD *thd, enum_var_type type);
static void fix_server_id(THD *thd, enum_var_type type);
+static ulonglong fix_unsigned(THD *thd, ulonglong num,
+ const struct my_option *option_limits);
+static bool get_unsigned(THD *thd, set_var *var);
+static void throw_bounds_warning(THD *thd, const char *name, ulonglong num);
static KEY_CACHE *create_key_cache(const char *name, uint length);
void fix_sql_mode_var(THD *thd, enum_var_type type);
static uchar *get_error_count(THD *thd);
@@ -164,7 +168,8 @@ static sys_var_character_set_sv sys_character_set_server(&vars, "character_set_s
sys_var_const_str sys_charset_system(&vars, "character_set_system",
(char *)my_charset_utf8_general_ci.name);
static sys_var_character_set_database sys_character_set_database(&vars, "character_set_database");
-static sys_var_character_set_sv sys_character_set_client(&vars, "character_set_client",
+static sys_var_character_set_client sys_character_set_client(&vars,
+ "character_set_client",
&SV::character_set_client,
&default_charset_info);
static sys_var_character_set_sv sys_character_set_connection(&vars, "character_set_connection",
@@ -640,8 +645,14 @@ static sys_var_const_str sys_license(&vars, "license", STRINGIFY_ARG(LICENSE));
/* Global variables which enable|disable logging */
static sys_var_log_state sys_var_general_log(&vars, "general_log", &opt_log,
QUERY_LOG_GENERAL);
+/* Synonym of "general_log" for consistency with SHOW VARIABLES output */
+static sys_var_log_state sys_var_log(&vars, "log", &opt_log,
+ QUERY_LOG_GENERAL);
static sys_var_log_state sys_var_slow_query_log(&vars, "slow_query_log", &opt_slow_log,
QUERY_LOG_SLOW);
+/* Synonym of "slow_query_log" for consistency with SHOW VARIABLES output */
+static sys_var_log_state sys_var_log_slow(&vars, "log_slow_queries",
+ &opt_slow_log, QUERY_LOG_SLOW);
sys_var_str sys_var_general_log_path(&vars, "general_log_file", sys_check_log_path,
sys_update_general_log_path,
sys_default_general_log_path,
@@ -677,10 +688,8 @@ static SHOW_VAR fixed_vars[]= {
#ifdef HAVE_MLOCKALL
{"locked_in_memory", (char*) &locked_in_memory, SHOW_MY_BOOL},
#endif
- {"log", (char*) &opt_log, SHOW_MY_BOOL},
{"log_bin", (char*) &opt_bin_log, SHOW_BOOL},
{"log_error", (char*) log_error_file, SHOW_CHAR},
- {"log_slow_queries", (char*) &opt_slow_log, SHOW_MY_BOOL},
{"lower_case_file_system", (char*) &lower_case_file_system, SHOW_MY_BOOL},
{"lower_case_table_names", (char*) &lower_case_table_names, SHOW_INT},
{"myisam_recover_options", (char*) &myisam_recover_options_str, SHOW_CHAR_PTR},
@@ -1096,6 +1105,39 @@ static void fix_server_id(THD *thd, enum_var_type type)
}
+static void throw_bounds_warning(THD *thd, const char *name, ulonglong num)
+{
+ char buf[22];
+ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
+ ER_TRUNCATED_WRONG_VALUE,
+ ER(ER_TRUNCATED_WRONG_VALUE), name,
+ ullstr(num, buf));
+}
+
+static ulonglong fix_unsigned(THD *thd, ulonglong num,
+ const struct my_option *option_limits)
+{
+ bool fixed= FALSE;
+ ulonglong out= getopt_ull_limit_value(num, option_limits, &fixed);
+
+ if (fixed)
+ throw_bounds_warning(thd, option_limits->name, num);
+ return out;
+}
+
+static bool get_unsigned(THD *thd, set_var *var)
+{
+ if (var->value->unsigned_flag)
+ var->save_result.ulonglong_value= (ulonglong) var->value->val_int();
+ else
+ {
+ longlong v= var->value->val_int();
+ var->save_result.ulonglong_value= (ulonglong) ((v < 0) ? 0 : v);
+ }
+ return 0;
+}
+
+
sys_var_long_ptr::
sys_var_long_ptr(sys_var_chain *chain, const char *name_arg, ulong *value_ptr_arg,
sys_after_update_func after_update_arg)
@@ -1106,9 +1148,7 @@ sys_var_long_ptr(sys_var_chain *chain, const char *name_arg, ulong *value_ptr_ar
bool sys_var_long_ptr_global::check(THD *thd, set_var *var)
{
- longlong v= var->value->val_int();
- var->save_result.ulonglong_value= v < 0 ? 0 : v;
- return 0;
+ return get_unsigned(thd, var);
}
bool sys_var_long_ptr_global::update(THD *thd, set_var *var)
@@ -1116,9 +1156,20 @@ bool sys_var_long_ptr_global::update(THD *thd, set_var *var)
ulonglong tmp= var->save_result.ulonglong_value;
pthread_mutex_lock(guard);
if (option_limits)
- *value= (ulong) getopt_ull_limit_value(tmp, option_limits);
+ *value= (ulong) fix_unsigned(thd, tmp, option_limits);
else
+ {
+#if SIZEOF_LONG < SIZEOF_LONG_LONG
+ /* Avoid overflows on 32 bit systems */
+ if (tmp > ULONG_MAX)
+ {
+ tmp= ULONG_MAX;
+ throw_bounds_warning(thd, name, var->save_result.ulonglong_value);
+ }
+#endif
*value= (ulong) tmp;
+ }
+
pthread_mutex_unlock(guard);
return 0;
}
@@ -1137,7 +1188,7 @@ bool sys_var_ulonglong_ptr::update(THD *thd, set_var *var)
ulonglong tmp= var->save_result.ulonglong_value;
pthread_mutex_lock(&LOCK_global_system_variables);
if (option_limits)
- *value= (ulonglong) getopt_ull_limit_value(tmp, option_limits);
+ *value= (ulonglong) fix_unsigned(thd, tmp, option_limits);
else
*value= (ulonglong) tmp;
pthread_mutex_unlock(&LOCK_global_system_variables);
@@ -1180,7 +1231,7 @@ uchar *sys_var_enum::value_ptr(THD *thd, enum_var_type type, LEX_STRING *base)
bool sys_var_thd_ulong::check(THD *thd, set_var *var)
{
- return (sys_var_thd::check(thd, var) ||
+ return (get_unsigned(thd, var) ||
(check_func && (*check_func)(thd, var)));
}
@@ -1190,20 +1241,26 @@ bool sys_var_thd_ulong::update(THD *thd, set_var *var)
/* Don't use bigger value than given with --maximum-variable-name=.. */
if ((ulong) tmp > max_system_variables.*offset)
+ {
+ throw_bounds_warning(thd, name, tmp);
tmp= max_system_variables.*offset;
+ }
-#if SIZEOF_LONG == 4
- /* Avoid overflows on 32 bit systems */
- if (tmp > (ulonglong) ~(ulong) 0)
- tmp= ((ulonglong) ~(ulong) 0);
+ if (option_limits)
+ tmp= (ulong) fix_unsigned(thd, tmp, option_limits);
+#if SIZEOF_LONG < SIZEOF_LONG_LONG
+ else if (tmp > ULONG_MAX)
+ {
+ tmp= ULONG_MAX;
+ throw_bounds_warning(thd, name, var->save_result.ulonglong_value);
+ }
#endif
- if (option_limits)
- tmp= (ulong) getopt_ull_limit_value(tmp, option_limits);
if (var->type == OPT_GLOBAL)
global_system_variables.*offset= (ulong) tmp;
else
thd->variables.*offset= (ulong) tmp;
+
return 0;
}
@@ -1238,7 +1295,7 @@ bool sys_var_thd_ha_rows::update(THD *thd, set_var *var)
tmp= max_system_variables.*offset;
if (option_limits)
- tmp= (ha_rows) getopt_ull_limit_value(tmp, option_limits);
+ tmp= (ha_rows) fix_unsigned(thd, tmp, option_limits);
if (var->type == OPT_GLOBAL)
{
/* Lock is needed to make things safe on 32 bit systems */
@@ -1274,6 +1331,11 @@ uchar *sys_var_thd_ha_rows::value_ptr(THD *thd, enum_var_type type,
return (uchar*) &(thd->variables.*offset);
}
+bool sys_var_thd_ulonglong::check(THD *thd, set_var *var)
+{
+ return get_unsigned(thd, var);
+}
+
bool sys_var_thd_ulonglong::update(THD *thd, set_var *var)
{
ulonglong tmp= var->save_result.ulonglong_value;
@@ -1282,7 +1344,7 @@ bool sys_var_thd_ulonglong::update(THD *thd, set_var *var)
tmp= max_system_variables.*offset;
if (option_limits)
- tmp= getopt_ull_limit_value(tmp, option_limits);
+ tmp= fix_unsigned(thd, tmp, option_limits);
if (var->type == OPT_GLOBAL)
{
/* Lock is needed to make things safe on 32 bit systems */
@@ -1404,7 +1466,7 @@ bool sys_var::check_set(THD *thd, set_var *var, TYPELIB *enum_names)
&not_used));
if (error_len)
{
- strmake(buff, error, min(sizeof(buff), error_len));
+ strmake(buff, error, min(sizeof(buff) - 1, error_len));
goto err;
}
}
@@ -1489,7 +1551,7 @@ Item *sys_var::item(THD *thd, enum_var_type var_type, LEX_STRING *base)
pthread_mutex_lock(&LOCK_global_system_variables);
value= *(ha_rows*) value_ptr(thd, var_type, base);
pthread_mutex_unlock(&LOCK_global_system_variables);
- return new Item_int((longlong) value);
+ return new Item_int((ulonglong) value);
}
case SHOW_MY_BOOL:
{
@@ -1845,6 +1907,21 @@ CHARSET_INFO **sys_var_character_set_sv::ci_ptr(THD *thd, enum_var_type type)
}
+bool sys_var_character_set_client::check(THD *thd, set_var *var)
+{
+ if (sys_var_character_set_sv::check(thd, var))
+ return 1;
+ /* Currently, UCS-2 cannot be used as a client character set */
+ if (var->save_result.charset->mbminlen > 1)
+ {
+ my_error(ER_WRONG_VALUE_FOR_VAR, MYF(0), name,
+ var->save_result.charset->csname);
+ return 1;
+ }
+ return 0;
+}
+
+
CHARSET_INFO ** sys_var_character_set_database::ci_ptr(THD *thd,
enum_var_type type)
{
@@ -1992,7 +2069,7 @@ bool sys_var_key_buffer_size::update(THD *thd, set_var *var)
}
key_cache->param_buff_size=
- (ulonglong) getopt_ull_limit_value(tmp, option_limits);
+ (ulonglong) fix_unsigned(thd, tmp, option_limits);
/* If key cache didn't existed initialize it, else resize it */
key_cache->in_init= 1;
@@ -2040,7 +2117,7 @@ bool sys_var_key_cache_long::update(THD *thd, set_var *var)
goto end;
*((ulong*) (((char*) key_cache) + offset))=
- (ulong) getopt_ull_limit_value(tmp, option_limits);
+ (ulong) fix_unsigned(thd, tmp, option_limits);
/*
Don't create a new key cache if it didn't exist
@@ -2086,18 +2163,24 @@ void sys_var_log_state::set_default(THD *thd, enum_var_type type)
static int sys_check_log_path(THD *thd, set_var *var)
{
- char path[FN_REFLEN];
+ char path[FN_REFLEN], buff[FN_REFLEN];
MY_STAT f_stat;
- const char *var_path= var->value->str_value.ptr();
+ String str(buff, sizeof(buff), system_charset_info), *res;
+ const char *log_file_str;
+
+ if (!(res= var->value->val_str(&str)))
+ goto err;
+
+ log_file_str= res->c_ptr();
bzero(&f_stat, sizeof(MY_STAT));
- (void) unpack_filename(path, var_path);
+ (void) unpack_filename(path, log_file_str);
if (my_stat(path, &f_stat, MYF(0)))
{
/* Check if argument is a file and we have 'write' permission */
if (!MY_S_ISREG(f_stat.st_mode) ||
!(f_stat.st_mode & MY_S_IWRITE))
- return -1;
+ goto err;
}
else
{
@@ -2106,11 +2189,16 @@ static int sys_check_log_path(THD *thd, set_var *var)
Check if directory exists and
we have permission to create file & write to file
*/
- (void) dirname_part(path, var_path, &path_length);
+ (void) dirname_part(path, log_file_str, &path_length);
if (my_access(path, (F_OK|W_OK)))
- return -1;
+ goto err;
}
return 0;
+
+err:
+ my_error(ER_WRONG_VALUE_FOR_VAR, MYF(0), var->var->name,
+ res ? log_file_str : "NULL");
+ return 1;
}
@@ -2263,6 +2351,13 @@ uchar *sys_var_log_output::value_ptr(THD *thd, enum_var_type type,
int set_var_collation_client::check(THD *thd)
{
+ /* Currently, UCS-2 cannot be used as a client character set */
+ if (character_set_client->mbminlen > 1)
+ {
+ my_error(ER_WRONG_VALUE_FOR_VAR, MYF(0), "character_set_client",
+ character_set_client->csname);
+ return 1;
+ }
return 0;
}
@@ -2884,7 +2979,8 @@ SHOW_VAR* enumerate_sys_vars(THD *thd, bool sorted)
/* sort into order */
if (sorted)
- qsort(result, count + fixed_count, sizeof(SHOW_VAR), (qsort_cmp)show_cmp);
+ my_qsort(result, count + fixed_count, sizeof(SHOW_VAR),
+ (qsort_cmp) show_cmp);
/* make last element empty */
bzero(show, sizeof(SHOW_VAR));
@@ -3035,7 +3131,7 @@ int sql_set_variables(THD *thd, List<set_var_base> *var_list)
if ((error= var->check(thd)))
goto err;
}
- if (!(error= test(thd->net.report_error)))
+ if (!(error= test(thd->is_error())))
{
it.rewind();
while ((var= it++))
diff --git a/sql/set_var.h b/sql/set_var.h
index 4e3f0f7aa24..c98facc9f84 100644
--- a/sql/set_var.h
+++ b/sql/set_var.h
@@ -379,6 +379,7 @@ public:
void set_default(THD *thd, enum_var_type type);
SHOW_TYPE show_type() { return SHOW_LONGLONG; }
uchar *value_ptr(THD *thd, enum_var_type type, LEX_STRING *base);
+ bool check(THD *thd, set_var *var);
bool check_default(enum_var_type type)
{
return type == OPT_GLOBAL && !option_limits;
@@ -667,6 +668,20 @@ public:
};
+class sys_var_character_set_client: public sys_var_character_set_sv
+{
+public:
+ sys_var_character_set_client(sys_var_chain *chain, const char *name_arg,
+ CHARSET_INFO *SV::*offset_arg,
+ CHARSET_INFO **global_default_arg,
+ bool is_nullable= 0)
+ : sys_var_character_set_sv(chain, name_arg, offset_arg, global_default_arg,
+ is_nullable)
+ { }
+ bool check(THD *thd, set_var *var);
+};
+
+
class sys_var_character_set_database :public sys_var_character_set
{
public:
diff --git a/sql/share/errmsg.txt b/sql/share/errmsg.txt
index 30cf85f3181..02e20ad7c5c 100644
--- a/sql/share/errmsg.txt
+++ b/sql/share/errmsg.txt
@@ -5658,6 +5658,8 @@ ER_TOO_HIGH_LEVEL_OF_NESTING_FOR_SELECT
eng "Too high level of nesting for select"
ER_NAME_BECOMES_EMPTY
eng "Name '%-.64s' has become ''"
+ER_AMBIGUOUS_FIELD_TERM
+ eng "First character of the FIELDS TERMINATED string is ambiguous; please use non-optional and non-empty FIELDS ENCLOSED BY"
ER_FOREIGN_SERVER_EXISTS
eng "The foreign server, %s, you are trying to create already exists."
ER_FOREIGN_SERVER_DOESNT_EXIST
@@ -5667,9 +5669,9 @@ ER_ILLEGAL_HA_CREATE_OPTION
eng "Table storage engine '%-.64s' does not support the create option '%.64s'"
ger "Speicher-Engine '%-.64s' der Tabelle unterstützt die Option '%.64s' nicht"
ER_PARTITION_REQUIRES_VALUES_ERROR
- eng "%-.64s PARTITIONING requires definition of VALUES %-.64s for each partition"
- ger "%-.64s-PARTITIONierung erfordert Definition von VALUES %-.64s für jede Partition"
- swe "%-.64s PARTITIONering kräver definition av VALUES %-.64s för varje partition"
+ eng "Syntax error: %-.64s PARTITIONING requires definition of VALUES %-.64s for each partition"
+ ger "Fehler in der SQL-Syntax: %-.64s-PARTITIONierung erfordert Definition von VALUES %-.64s für jede Partition"
+ swe "Syntaxfel: %-.64s PARTITIONering kräver definition av VALUES %-.64s för varje partition"
ER_PARTITION_WRONG_VALUES_ERROR
eng "Only %-.64s PARTITIONING can use VALUES %-.64s in partition definition"
ger "Nur %-.64s-PARTITIONierung kann VALUES %-.64s in der Partitionsdefinition verwenden"
@@ -6109,3 +6111,6 @@ ER_EVENT_INVALID_CREATION_CTX
ER_TRG_CANT_OPEN_TABLE
eng "Cannot open table for trigger `%-.64s`.`%-.64s`"
+
+ER_CANT_CREATE_SROUTINE
+ eng "Cannot create stored routine `%-.64s`. Check warnings"
diff --git a/sql/slave.cc b/sql/slave.cc
index fcbd4eb841b..f530f2a810d 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -137,6 +137,7 @@ static int terminate_slave_thread(THD *thd,
pthread_cond_t* term_cond,
volatile uint *slave_running,
bool skip_lock);
+static bool check_io_slave_killed(THD *thd, Master_info *mi, const char *info);
/*
Find out which replications threads are running
@@ -821,7 +822,7 @@ static int get_master_version_and_clock(MYSQL* mysql, Master_info* mi)
mi->clock_diff_with_master=
(long) (time((time_t*) 0) - strtoul(master_row[0], 0, 10));
}
- else
+ else if (!check_io_slave_killed(mi->io_thd, mi, NULL))
{
mi->clock_diff_with_master= 0; /* The "most sensible" value */
sql_print_warning("\"SELECT UNIX_TIMESTAMP()\" failed on master, "
@@ -980,7 +981,7 @@ static int create_table_from_dump(THD* thd, MYSQL *mysql, const char* db,
DBUG_RETURN(1);
}
thd->query= query;
- thd->query_error = 0;
+ thd->is_slave_error = 0;
thd->net.no_send_ok = 1;
bzero((char*) &tables,sizeof(tables));
@@ -1009,10 +1010,16 @@ static int create_table_from_dump(THD* thd, MYSQL *mysql, const char* db,
thd->db_length= save_db_length;
thd->options = save_options;
- if (thd->query_error)
+ if (thd->is_slave_error)
goto err; // mysql_parse took care of the error send
thd->proc_info = "Opening master dump table";
+ /*
+ Note: If this function starts to fail for MERGE tables,
+ change the next two lines to these:
+ tables.table= NULL; // was set by mysql_rm_table()
+ if (!open_n_lock_single_table(thd, &tables, TL_WRITE))
+ */
tables.lock_type = TL_WRITE;
if (!open_ltable(thd, &tables, TL_WRITE, 0))
{
@@ -1223,7 +1230,7 @@ int register_slave_on_master(MYSQL* mysql, Master_info *mi,
{
*suppress_warnings= TRUE; // Suppress reconnect warning
}
- else
+ else if (!check_io_slave_killed(mi->io_thd, mi, NULL))
{
char buf[256];
my_snprintf(buf, sizeof(buf), "%s (Errno: %d)", mysql_error(mysql),
@@ -1510,6 +1517,7 @@ static int init_slave_thread(THD* thd, SLAVE_THD_TYPE thd_type)
delete thd;
DBUG_RETURN(-1);
}
+ lex_start(thd);
if (thd_type == SLAVE_THD_SQL)
thd->proc_info= "Waiting for the next event in relay log";
@@ -1714,7 +1722,14 @@ static int has_temporary_error(THD *thd)
DBUG_ENTER("has_temporary_error");
if (thd->is_fatal_error)
+ {
+ DBUG_PRINT("info", ("thd->net.last_errno: %s", ER(thd->net.last_errno)));
DBUG_RETURN(0);
+ }
+
+ DBUG_EXECUTE_IF("all_errors_are_temporary_errors",
+ if (thd->net.last_errno)
+ thd->net.last_errno= ER_LOCK_DEADLOCK;);
/*
Temporary error codes:
@@ -1723,7 +1738,10 @@ static int has_temporary_error(THD *thd)
*/
if (thd->net.last_errno == ER_LOCK_DEADLOCK ||
thd->net.last_errno == ER_LOCK_WAIT_TIMEOUT)
+ {
+ DBUG_PRINT("info", ("thd->net.last_errno: %s", ER(thd->net.last_errno)));
DBUG_RETURN(1);
+ }
#ifdef HAVE_NDB_BINLOG
/*
@@ -1794,9 +1812,6 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli)
int const type_code= ev->get_type_code();
int exec_res= 0;
- /*
- */
-
DBUG_PRINT("exec_event",("%s(type_code: %d; server_id: %d)",
ev->get_type_str(), type_code, ev->server_id));
DBUG_PRINT("info", ("thd->options: %s%s; rli->last_event_start_time: %lu",
@@ -1805,7 +1820,6 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli)
rli->last_event_start_time));
-
/*
Execute the event to change the database and update the binary
log coordinates, but first we set some data that is needed for
@@ -1853,10 +1867,13 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli)
// EVENT_SKIP_NOT,
"not skipped",
// EVENT_SKIP_IGNORE,
- "skipped because event originated from this server",
+ "skipped because event should be ignored",
// EVENT_SKIP_COUNT
"skipped because event skip counter was non-zero"
};
+ DBUG_PRINT("info", ("OPTION_BEGIN: %d; IN_STMT: %d",
+ thd->options & OPTION_BEGIN ? 1 : 0,
+ rli->get_flag(Relay_log_info::IN_STMT)));
DBUG_PRINT("skip_event", ("%s event was %s",
ev->get_type_str(), explain[reason]));
#endif
@@ -1905,7 +1922,8 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli)
}
if (slave_trans_retries)
{
- if (exec_res && has_temporary_error(thd))
+ int temp_err;
+ if (exec_res && (temp_err= has_temporary_error(thd)))
{
const char *errmsg;
/*
@@ -1953,15 +1971,19 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli)
"the slave_transaction_retries variable.",
slave_trans_retries);
}
- else if (!((thd->options & OPTION_BEGIN) && opt_using_transactions))
+ else if (exec_res && !temp_err ||
+ (opt_using_transactions &&
+ rli->group_relay_log_pos == rli->event_relay_log_pos))
{
/*
- Only reset the retry counter if the event succeeded or
- failed with a non-transient error. On a successful event,
- the execution will proceed as usual; in the case of a
+ Only reset the retry counter if the entire group succeeded
+ or failed with a non-transient error. On a successful
+ event, the execution will proceed as usual; in the case of a
non-transient error, the slave will stop with an error.
*/
rli->trans_retries= 0; // restart from fresh
+ DBUG_PRINT("info", ("Resetting retry counter, rli->trans_retries: %lu",
+ rli->trans_retries));
}
}
DBUG_RETURN(exec_res);
@@ -1985,7 +2007,7 @@ static bool check_io_slave_killed(THD *thd, Master_info *mi, const char *info)
{
if (io_slave_killed(thd, mi))
{
- if (global_system_variables.log_warnings)
+ if (info && global_system_variables.log_warnings)
sql_print_information(info);
return TRUE;
}
@@ -2170,11 +2192,15 @@ connected:
thd->proc_info = "Registering slave on master";
if (register_slave_on_master(mysql, mi, &suppress_warnings))
{
- sql_print_error("Slave I/O thread couldn't register on master");
- if (check_io_slave_killed(thd, mi, "Slave I/O thread killed while \
-registering slave on master") ||
- try_to_reconnect(thd, mysql, mi, &retry_count, suppress_warnings,
- reconnect_messages[SLAVE_RECON_ACT_REG]))
+ if (!check_io_slave_killed(thd, mi, "Slave I/O thread killed "
+ "while registering slave on master"))
+ {
+ sql_print_error("Slave I/O thread couldn't register on master");
+ if (try_to_reconnect(thd, mysql, mi, &retry_count, suppress_warnings,
+ reconnect_messages[SLAVE_RECON_ACT_REG]))
+ goto err;
+ }
+ else
goto err;
goto connected;
}
@@ -2353,7 +2379,7 @@ err:
change_rpl_status(RPL_ACTIVE_SLAVE,RPL_IDLE_SLAVE);
DBUG_ASSERT(thd->net.buff != 0);
net_end(&thd->net); // destructor will not free it, because net.vio is 0
- close_thread_tables(thd, 0);
+ close_thread_tables(thd);
pthread_mutex_lock(&LOCK_thread_count);
THD_CHECK_SENTRY(thd);
delete thd;
@@ -2450,6 +2476,7 @@ pthread_handler_t handle_slave_sql(void *arg)
rli->ignore_log_space_limit= 0;
pthread_mutex_unlock(&rli->log_space_lock);
rli->trans_retries= 0; // start from "no error"
+ DBUG_PRINT("info", ("rli->trans_retries: %lu", rli->trans_retries));
if (init_relay_log_pos(rli,
rli->group_relay_log_name,
@@ -2501,7 +2528,7 @@ log '%s' at position %s, relay log '%s' position: %s", RPL_LOG_NAME,
if (sys_init_slave.value_length)
{
execute_init_command(thd, &sys_init_slave, &LOCK_sys_init_slave);
- if (thd->query_error)
+ if (thd->is_slave_error)
{
sql_print_error("\
Slave SQL thread aborted. Can't execute init_slave query");
@@ -3581,7 +3608,16 @@ static Log_event* next_event(Relay_log_info* rli)
a new event and is queuing it; the false "0" will exist until SQL
finishes executing the new event; it will be look abnormal only if
the events have old timestamps (then you get "many", 0, "many").
- Transient phases like this can't really be fixed.
+
+ Transient phases like this can be fixed with implemeting
+ Heartbeat event which provides the slave the status of the
+ master at time the master does not have any new update to send.
+ Seconds_Behind_Master would be zero only when master has no
+ more updates in binlog for slave. The heartbeat can be sent
+ in a (small) fraction of slave_net_timeout. Until it's done
+ rli->last_master_timestamp is temporarely (for time of
+ waiting for the following event) reset whenever EOF is
+ reached.
*/
time_t save_timestamp= rli->last_master_timestamp;
rli->last_master_timestamp= 0;
diff --git a/sql/sp.cc b/sql/sp.cc
index 6032688f7f1..b4f0ec7729b 100644
--- a/sql/sp.cc
+++ b/sql/sp.cc
@@ -682,6 +682,10 @@ sp_create_routine(THD *thd, int type, sp_head *sp)
CHARSET_INFO *db_cs= get_default_db_collation(thd, sp->m_db.str);
+ enum_check_fields saved_count_cuted_fields;
+
+ bool store_failed= FALSE;
+
DBUG_ENTER("sp_create_routine");
DBUG_PRINT("enter", ("type: %d name: %.*s",type, (int) sp->m_name.length,
sp->m_name.str));
@@ -696,6 +700,9 @@ sp_create_routine(THD *thd, int type, sp_head *sp)
*/
thd->clear_current_stmt_binlog_row_based();
+ saved_count_cuted_fields= thd->count_cuted_fields;
+ thd->count_cuted_fields= CHECK_FIELD_WARN;
+
if (!(table= open_proc_table_for_update(thd)))
ret= SP_OPEN_TABLE_FAILED;
else
@@ -725,43 +732,77 @@ sp_create_routine(THD *thd, int type, sp_head *sp)
ret= SP_BODY_TOO_LONG;
goto done;
}
- table->field[MYSQL_PROC_FIELD_DB]->
- store(sp->m_db.str, sp->m_db.length, system_charset_info);
- table->field[MYSQL_PROC_FIELD_NAME]->
- store(sp->m_name.str, sp->m_name.length, system_charset_info);
- table->field[MYSQL_PROC_MYSQL_TYPE]->
- store((longlong)type, TRUE);
- table->field[MYSQL_PROC_FIELD_SPECIFIC_NAME]->
- store(sp->m_name.str, sp->m_name.length, system_charset_info);
+
+ store_failed=
+ table->field[MYSQL_PROC_FIELD_DB]->
+ store(sp->m_db.str, sp->m_db.length, system_charset_info);
+
+ store_failed= store_failed ||
+ table->field[MYSQL_PROC_FIELD_NAME]->
+ store(sp->m_name.str, sp->m_name.length, system_charset_info);
+
+ store_failed= store_failed ||
+ table->field[MYSQL_PROC_MYSQL_TYPE]->
+ store((longlong)type, TRUE);
+
+ store_failed= store_failed ||
+ table->field[MYSQL_PROC_FIELD_SPECIFIC_NAME]->
+ store(sp->m_name.str, sp->m_name.length, system_charset_info);
+
if (sp->m_chistics->daccess != SP_DEFAULT_ACCESS)
- table->field[MYSQL_PROC_FIELD_ACCESS]->
- store((longlong)sp->m_chistics->daccess, TRUE);
- table->field[MYSQL_PROC_FIELD_DETERMINISTIC]->
- store((longlong)(sp->m_chistics->detistic ? 1 : 2), TRUE);
+ {
+ store_failed= store_failed ||
+ table->field[MYSQL_PROC_FIELD_ACCESS]->
+ store((longlong)sp->m_chistics->daccess, TRUE);
+ }
+
+ store_failed= store_failed ||
+ table->field[MYSQL_PROC_FIELD_DETERMINISTIC]->
+ store((longlong)(sp->m_chistics->detistic ? 1 : 2), TRUE);
+
if (sp->m_chistics->suid != SP_IS_DEFAULT_SUID)
- table->field[MYSQL_PROC_FIELD_SECURITY_TYPE]->
- store((longlong)sp->m_chistics->suid, TRUE);
- table->field[MYSQL_PROC_FIELD_PARAM_LIST]->
- store(sp->m_params.str, sp->m_params.length, system_charset_info);
+ {
+ store_failed= store_failed ||
+ table->field[MYSQL_PROC_FIELD_SECURITY_TYPE]->
+ store((longlong)sp->m_chistics->suid, TRUE);
+ }
+
+ store_failed= store_failed ||
+ table->field[MYSQL_PROC_FIELD_PARAM_LIST]->
+ store(sp->m_params.str, sp->m_params.length, system_charset_info);
+
if (sp->m_type == TYPE_ENUM_FUNCTION)
{
String retstr(64);
sp_returns_type(thd, retstr, sp);
- table->field[MYSQL_PROC_FIELD_RETURNS]->
- store(retstr.ptr(), retstr.length(), system_charset_info);
+
+ store_failed= store_failed ||
+ table->field[MYSQL_PROC_FIELD_RETURNS]->
+ store(retstr.ptr(), retstr.length(), system_charset_info);
}
- table->field[MYSQL_PROC_FIELD_BODY]->
- store(sp->m_body.str, sp->m_body.length, system_charset_info);
- table->field[MYSQL_PROC_FIELD_DEFINER]->
- store(definer, (uint)strlen(definer), system_charset_info);
+
+ store_failed= store_failed ||
+ table->field[MYSQL_PROC_FIELD_BODY]->
+ store(sp->m_body.str, sp->m_body.length, system_charset_info);
+
+ store_failed= store_failed ||
+ table->field[MYSQL_PROC_FIELD_DEFINER]->
+ store(definer, (uint)strlen(definer), system_charset_info);
+
((Field_timestamp *)table->field[MYSQL_PROC_FIELD_CREATED])->set_time();
((Field_timestamp *)table->field[MYSQL_PROC_FIELD_MODIFIED])->set_time();
- table->field[MYSQL_PROC_FIELD_SQL_MODE]->
- store((longlong)thd->variables.sql_mode, TRUE);
+
+ store_failed= store_failed ||
+ table->field[MYSQL_PROC_FIELD_SQL_MODE]->
+ store((longlong)thd->variables.sql_mode, TRUE);
+
if (sp->m_chistics->comment.str)
- table->field[MYSQL_PROC_FIELD_COMMENT]->
- store(sp->m_chistics->comment.str, sp->m_chistics->comment.length,
- system_charset_info);
+ {
+ store_failed= store_failed ||
+ table->field[MYSQL_PROC_FIELD_COMMENT]->
+ store(sp->m_chistics->comment.str, sp->m_chistics->comment.length,
+ system_charset_info);
+ }
if ((sp->m_type == TYPE_ENUM_FUNCTION) &&
!trust_function_creators && mysql_bin_log.is_open())
@@ -794,24 +835,34 @@ sp_create_routine(THD *thd, int type, sp_head *sp)
}
table->field[MYSQL_PROC_FIELD_CHARACTER_SET_CLIENT]->set_notnull();
- table->field[MYSQL_PROC_FIELD_CHARACTER_SET_CLIENT]->store(
- thd->charset()->csname,
- strlen(thd->charset()->csname),
- system_charset_info);
+ store_failed= store_failed ||
+ table->field[MYSQL_PROC_FIELD_CHARACTER_SET_CLIENT]->store(
+ thd->charset()->csname,
+ strlen(thd->charset()->csname),
+ system_charset_info);
table->field[MYSQL_PROC_FIELD_COLLATION_CONNECTION]->set_notnull();
- table->field[MYSQL_PROC_FIELD_COLLATION_CONNECTION]->store(
- thd->variables.collation_connection->name,
- strlen(thd->variables.collation_connection->name),
- system_charset_info);
+ store_failed= store_failed ||
+ table->field[MYSQL_PROC_FIELD_COLLATION_CONNECTION]->store(
+ thd->variables.collation_connection->name,
+ strlen(thd->variables.collation_connection->name),
+ system_charset_info);
table->field[MYSQL_PROC_FIELD_DB_COLLATION]->set_notnull();
- table->field[MYSQL_PROC_FIELD_DB_COLLATION]->store(
- db_cs->name, strlen(db_cs->name), system_charset_info);
+ store_failed= store_failed ||
+ table->field[MYSQL_PROC_FIELD_DB_COLLATION]->store(
+ db_cs->name, strlen(db_cs->name), system_charset_info);
table->field[MYSQL_PROC_FIELD_BODY_UTF8]->set_notnull();
- table->field[MYSQL_PROC_FIELD_BODY_UTF8]->store(
- sp->m_body_utf8.str, sp->m_body_utf8.length, system_charset_info);
+ store_failed= store_failed ||
+ table->field[MYSQL_PROC_FIELD_BODY_UTF8]->store(
+ sp->m_body_utf8.str, sp->m_body_utf8.length, system_charset_info);
+
+ if (store_failed)
+ {
+ ret= SP_FLD_STORE_FAILED;
+ goto done;
+ }
ret= SP_OK;
if (table->file->ha_write_row(table->record[0]))
@@ -842,6 +893,8 @@ sp_create_routine(THD *thd, int type, sp_head *sp)
}
done:
+ thd->count_cuted_fields= saved_count_cuted_fields;
+
close_thread_tables(thd);
DBUG_RETURN(ret);
}
@@ -1591,12 +1644,12 @@ static bool add_used_routine(LEX *lex, Query_arena *arena,
{
Sroutine_hash_entry *rn=
(Sroutine_hash_entry *)arena->alloc(sizeof(Sroutine_hash_entry) +
- key->length);
+ key->length + 1);
if (!rn) // OOM. Error will be reported using fatal_error().
return FALSE;
rn->key.length= key->length;
rn->key.str= (char *)rn + sizeof(Sroutine_hash_entry);
- memcpy(rn->key.str, key->str, key->length);
+ memcpy(rn->key.str, key->str, key->length + 1);
my_hash_insert(&lex->sroutines, (uchar *)rn);
lex->sroutines_list.link_in_list((uchar *)rn, (uchar **)&rn->next);
rn->belong_to_view= belong_to_view;
@@ -1779,7 +1832,7 @@ sp_cache_routines_and_add_tables_aux(THD *thd, LEX *lex,
for (Sroutine_hash_entry *rt= start; rt; rt= rt->next)
{
- sp_name name(rt->key.str, rt->key.length);
+ sp_name name(thd, rt->key.str, rt->key.length);
int type= rt->key.str[0];
sp_head *sp;
@@ -1787,13 +1840,6 @@ sp_cache_routines_and_add_tables_aux(THD *thd, LEX *lex,
&thd->sp_func_cache : &thd->sp_proc_cache),
&name)))
{
- name.m_name.str= strchr(name.m_qname.str, '.');
- name.m_db.length= name.m_name.str - name.m_qname.str;
- name.m_db.str= strmake_root(thd->mem_root, name.m_qname.str,
- name.m_db.length);
- name.m_name.str+= 1;
- name.m_name.length= name.m_qname.length - name.m_db.length - 1;
-
switch ((ret= db_find_routine(thd, type, &name, &sp)))
{
case SP_OK:
@@ -1820,7 +1866,7 @@ sp_cache_routines_and_add_tables_aux(THD *thd, LEX *lex,
an error with it's return value without calling my_error(), we
set the generic "mysql.proc table corrupt" error here.
*/
- if (!thd->net.report_error)
+ if (! thd->is_error())
{
/*
SP allows full NAME_LEN chars thus he have to allocate enough
diff --git a/sql/sp.h b/sql/sp.h
index 3797eb289a4..31173e1f90c 100644
--- a/sql/sp.h
+++ b/sql/sp.h
@@ -29,6 +29,7 @@
#define SP_NO_DB_ERROR -8
#define SP_BAD_IDENTIFIER -9
#define SP_BODY_TOO_LONG -10
+#define SP_FLD_STORE_FAILED -11
/* Drop all routines in database 'db' */
int
diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index 828517011d5..4b432cef5cd 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -102,8 +102,9 @@ sp_get_item_value(THD *thd, Item *item, String *str)
case REAL_RESULT:
case INT_RESULT:
case DECIMAL_RESULT:
- return item->val_str(str);
-
+ if (item->field_type() != MYSQL_TYPE_BIT)
+ return item->val_str(str);
+ else {/* Bit type is handled as binary string */}
case STRING_RESULT:
{
String *result= item->val_str(str);
@@ -370,7 +371,7 @@ sp_eval_expr(THD *thd, Field *result_field, Item **expr_item_ptr)
thd->abort_on_warning= save_abort_on_warning;
thd->transaction.stmt.modified_non_trans_table= save_stmt_modified_non_trans_table;
- if (thd->net.report_error)
+ if (thd->is_error())
{
/* Return error status if something went wrong. */
err_status= TRUE;
@@ -386,17 +387,43 @@ sp_eval_expr(THD *thd, Field *result_field, Item **expr_item_ptr)
*
*/
+sp_name::sp_name(THD *thd, char *key, uint key_len)
+{
+ m_sroutines_key.str= key;
+ m_sroutines_key.length= key_len;
+ m_qname.str= ++key;
+ m_qname.length= key_len - 1;
+ if ((m_name.str= strchr(m_qname.str, '.')))
+ {
+ m_db.length= m_name.str - key;
+ m_db.str= strmake_root(thd->mem_root, key, m_db.length);
+ m_name.str++;
+ m_name.length= m_qname.length - m_db.length - 1;
+ }
+ else
+ {
+ m_name.str= m_qname.str;
+ m_name.length= m_qname.length;
+ m_db.str= 0;
+ m_db.length= 0;
+ }
+ m_explicit_name= false;
+}
+
void
sp_name::init_qname(THD *thd)
{
- m_sroutines_key.length= m_db.length + m_name.length + 2;
+ const uint dot= !!m_db.length;
+ /* m_sroutines format: m_type + [database + dot] + name + nul */
+ m_sroutines_key.length= 1 + m_db.length + dot + m_name.length;
if (!(m_sroutines_key.str= (char*) thd->alloc(m_sroutines_key.length + 1)))
return;
m_qname.length= m_sroutines_key.length - 1;
m_qname.str= m_sroutines_key.str + 1;
- sprintf(m_qname.str, "%.*s.%.*s",
- (int) m_db.length, (m_db.length ? m_db.str : ""),
- (int) m_name.length, m_name.str);
+ sprintf(m_qname.str, "%.*s%.*s%.*s",
+ (int) m_db.length, (m_db.length ? m_db.str : ""),
+ dot, ".",
+ (int) m_name.length, m_name.str);
}
@@ -439,14 +466,16 @@ check_routine_name(LEX_STRING *ident)
*/
void *
-sp_head::operator new(size_t size)
+sp_head::operator new(size_t size) throw()
{
DBUG_ENTER("sp_head::operator new");
MEM_ROOT own_root;
sp_head *sp;
- init_alloc_root(&own_root, MEM_ROOT_BLOCK_SIZE, MEM_ROOT_PREALLOC);
+ init_sql_alloc(&own_root, MEM_ROOT_BLOCK_SIZE, MEM_ROOT_PREALLOC);
sp= (sp_head *) alloc_root(&own_root, size);
+ if (sp == NULL)
+ return NULL;
sp->main_mem_root= own_root;
DBUG_PRINT("info", ("mem_root 0x%lx", (ulong) &sp->mem_root));
DBUG_RETURN(sp);
@@ -457,6 +486,10 @@ sp_head::operator delete(void *ptr, size_t size)
{
DBUG_ENTER("sp_head::operator delete");
MEM_ROOT own_root;
+
+ if (ptr == NULL)
+ DBUG_VOID_RETURN;
+
sp_head *sp= (sp_head *) ptr;
/* Make a copy of main_mem_root as free_root will free the sp */
@@ -510,6 +543,9 @@ sp_head::init(LEX *lex)
lex->spcont= m_pcont= new sp_pcontext();
+ if (!lex->spcont)
+ DBUG_VOID_RETURN;
+
/*
Altough trg_table_fields list is used only in triggers we init for all
types of stored procedures to simplify reset_lex()/restore_lex() code.
@@ -1043,7 +1079,7 @@ sp_head::execute(THD *thd)
DBUG_RETURN(TRUE);
/* init per-instruction memroot */
- init_alloc_root(&execute_mem_root, MEM_ROOT_BLOCK_SIZE, 0);
+ init_sql_alloc(&execute_mem_root, MEM_ROOT_BLOCK_SIZE, 0);
DBUG_ASSERT(!(m_flags & IS_INVOKED));
m_flags|= IS_INVOKED;
@@ -1082,7 +1118,7 @@ sp_head::execute(THD *thd)
if ((ctx= thd->spcont))
ctx->clear_handler();
- thd->query_error= 0;
+ thd->is_slave_error= 0;
old_arena= thd->stmt_arena;
/*
@@ -1249,9 +1285,9 @@ sp_head::execute(THD *thd)
state= EXECUTED;
done:
- DBUG_PRINT("info", ("err_status: %d killed: %d query_error: %d report_error: %d",
- err_status, thd->killed, thd->query_error,
- thd->net.report_error));
+ DBUG_PRINT("info", ("err_status: %d killed: %d is_slave_error: %d report_error: %d",
+ err_status, thd->killed, thd->is_slave_error,
+ thd->is_error()));
if (thd->killed)
err_status= TRUE;
@@ -1846,7 +1882,7 @@ sp_head::execute_procedure(THD *thd, List<Item> *args)
we'll leave it here.
*/
if (!thd->in_sub_stmt)
- close_thread_tables(thd, 0, 0);
+ close_thread_tables(thd);
DBUG_PRINT("info",(" %.*s: eval args done",
(int) m_name.length, m_name.str));
@@ -1935,16 +1971,29 @@ sp_head::execute_procedure(THD *thd, List<Item> *args)
}
-// Reset lex during parsing, before we parse a sub statement.
-void
+/**
+ @brief Reset lex during parsing, before we parse a sub statement.
+
+ @param thd Thread handler.
+
+ @return Error state
+ @retval true An error occurred.
+ @retval false Success.
+*/
+
+bool
sp_head::reset_lex(THD *thd)
{
DBUG_ENTER("sp_head::reset_lex");
LEX *sublex;
LEX *oldlex= thd->lex;
+ sublex= new (thd->mem_root)st_lex_local;
+ if (sublex == 0)
+ DBUG_RETURN(TRUE);
+
+ thd->lex= sublex;
(void)m_lex.push_front(oldlex);
- thd->lex= sublex= new st_lex;
/* Reset most stuff. */
lex_start(thd);
@@ -1965,7 +2014,7 @@ sp_head::reset_lex(THD *thd)
sublex->interval_list.empty();
sublex->type= 0;
- DBUG_VOID_RETURN;
+ DBUG_RETURN(FALSE);
}
// Restore lex during parsing, after we have parsed a sub statement.
@@ -2647,7 +2696,7 @@ sp_lex_keeper::reset_lex_and_exec_core(THD *thd, uint *nextp,
cleanup_items() is called in sp_head::execute()
*/
- DBUG_RETURN(res || thd->net.report_error);
+ DBUG_RETURN(res || thd->is_error());
}
@@ -2699,7 +2748,7 @@ sp_instr_stmt::execute(THD *thd, uint *nextp)
query= thd->query;
query_length= thd->query_length;
- if (!(res= alloc_query(thd, m_query.str, m_query.length+1)) &&
+ if (!(res= alloc_query(thd, m_query.str, m_query.length)) &&
!(res=subst_spvars(thd, this, &m_query)))
{
/*
@@ -2707,7 +2756,7 @@ sp_instr_stmt::execute(THD *thd, uint *nextp)
queries with SP vars can't be cached)
*/
if (unlikely((thd->options & OPTION_LOG_OFF)==0))
- general_log_print(thd, COM_QUERY, "%s", thd->query);
+ general_log_write(thd, COM_QUERY, thd->query, thd->query_length);
if (query_cache_send_result_to_client(thd,
thd->query, thd->query_length) <= 0)
@@ -3830,7 +3879,7 @@ sp_add_to_query_tables(THD *thd, LEX *lex,
if (!(table= (TABLE_LIST *)thd->calloc(sizeof(TABLE_LIST))))
{
- my_error(ER_OUTOFMEMORY, MYF(0), sizeof(TABLE_LIST));
+ thd->fatal_error();
return NULL;
}
table->db_length= strlen(db);
diff --git a/sql/sp_head.h b/sql/sp_head.h
index 3a8b41acd4c..86a77a434ff 100644
--- a/sql/sp_head.h
+++ b/sql/sp_head.h
@@ -129,16 +129,7 @@ public:
Creates temporary sp_name object from key, used mainly
for SP-cache lookups.
*/
- sp_name(char *key, uint key_len)
- {
- m_sroutines_key.str= key;
- m_sroutines_key.length= key_len;
- m_name.str= m_qname.str= key + 1;
- m_name.length= m_qname.length= key_len - 1;
- m_db.str= 0;
- m_db.length= 0;
- m_explicit_name= false;
- }
+ sp_name(THD *thd, char *key, uint key_len);
// Init. the qualified name from the db and name.
void init_qname(THD *thd); // thd for memroot allocation
@@ -269,10 +260,10 @@ public:
Security_context m_security_ctx;
static void *
- operator new(size_t size);
+ operator new(size_t size) throw ();
static void
- operator delete(void *ptr, size_t size);
+ operator delete(void *ptr, size_t size) throw ();
sp_head();
@@ -335,7 +326,7 @@ public:
}
// Resets lex in 'thd' and keeps a copy of the old one.
- void
+ bool
reset_lex(THD *thd);
// Restores lex in 'thd' from our copy, but keeps some status from the
diff --git a/sql/sp_rcontext.cc b/sql/sp_rcontext.cc
index 60a0c962c28..70a043c4fac 100644
--- a/sql/sp_rcontext.cc
+++ b/sql/sp_rcontext.cc
@@ -503,14 +503,14 @@ sp_cursor::fetch(THD *thd, List<struct sp_variable> *vars)
*/
Item_cache *
-sp_rcontext::create_case_expr_holder(THD *thd, Item_result result_type)
+sp_rcontext::create_case_expr_holder(THD *thd, const Item *item)
{
Item_cache *holder;
Query_arena current_arena;
thd->set_n_backup_active_arena(thd->spcont->callers_arena, &current_arena);
- holder= Item_cache::get_cache(result_type);
+ holder= Item_cache::get_cache(item);
thd->restore_active_arena(thd->spcont->callers_arena, &current_arena);
@@ -559,7 +559,7 @@ sp_rcontext::set_case_expr(THD *thd, int case_expr_id, Item **case_expr_item_ptr
case_expr_item->result_type())
{
m_case_expr_holders[case_expr_id]=
- create_case_expr_holder(thd, case_expr_item->result_type());
+ create_case_expr_holder(thd, case_expr_item);
}
m_case_expr_holders[case_expr_id]->store(case_expr_item);
diff --git a/sql/sp_rcontext.h b/sql/sp_rcontext.h
index 0104b71a648..43102cfeeb2 100644
--- a/sql/sp_rcontext.h
+++ b/sql/sp_rcontext.h
@@ -261,7 +261,7 @@ private:
bool init_var_table(THD *thd);
bool init_var_items();
- Item_cache *create_case_expr_holder(THD *thd, Item_result result_type);
+ Item_cache *create_case_expr_holder(THD *thd, const Item *item);
int set_variable(THD *thd, Field *field, Item **value);
}; // class sp_rcontext : public Sql_alloc
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index 7e017d7d028..58ba8c28fb7 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -277,6 +277,7 @@ my_bool acl_init(bool dont_read_acl_tables)
DBUG_RETURN(1); /* purecov: inspected */
thd->thread_stack= (char*) &thd;
thd->store_globals();
+ lex_start(thd);
/*
It is safe to call acl_reload() since acl_* arrays and hashes which
will be freed there are global static objects and thus are initialized
@@ -364,8 +365,8 @@ static my_bool acl_load(THD *thd, TABLE_LIST *tables)
#endif
VOID(push_dynamic(&acl_hosts,(uchar*) &host));
}
- qsort((uchar*) dynamic_element(&acl_hosts,0,ACL_HOST*),acl_hosts.elements,
- sizeof(ACL_HOST),(qsort_cmp) acl_compare);
+ my_qsort((uchar*) dynamic_element(&acl_hosts,0,ACL_HOST*),acl_hosts.elements,
+ sizeof(ACL_HOST),(qsort_cmp) acl_compare);
end_read_record(&read_record_info);
freeze_size(&acl_hosts);
@@ -428,7 +429,7 @@ static my_bool acl_load(THD *thd, TABLE_LIST *tables)
continue;
}
- const char *password= get_field(&mem, table->field[2]);
+ const char *password= get_field(thd->mem_root, table->field[2]);
uint password_len= password ? strlen(password) : 0;
set_user_salt(&user, password, password_len);
if (user.salt_len == 0 && password_len != 0)
@@ -495,7 +496,7 @@ static my_bool acl_load(THD *thd, TABLE_LIST *tables)
/* Starting from 4.0.2 we have more fields */
if (table->s->fields >= 31)
{
- char *ssl_type=get_field(&mem, table->field[next_field++]);
+ char *ssl_type=get_field(thd->mem_root, table->field[next_field++]);
if (!ssl_type)
user.ssl_type=SSL_TYPE_NONE;
else if (!strcmp(ssl_type, "ANY"))
@@ -509,11 +510,11 @@ static my_bool acl_load(THD *thd, TABLE_LIST *tables)
user.x509_issuer= get_field(&mem, table->field[next_field++]);
user.x509_subject= get_field(&mem, table->field[next_field++]);
- char *ptr = get_field(&mem, table->field[next_field++]);
+ char *ptr = get_field(thd->mem_root, table->field[next_field++]);
user.user_resource.questions=ptr ? atoi(ptr) : 0;
- ptr = get_field(&mem, table->field[next_field++]);
+ ptr = get_field(thd->mem_root, table->field[next_field++]);
user.user_resource.updates=ptr ? atoi(ptr) : 0;
- ptr = get_field(&mem, table->field[next_field++]);
+ ptr = get_field(thd->mem_root, table->field[next_field++]);
user.user_resource.conn_per_hour= ptr ? atoi(ptr) : 0;
if (user.user_resource.questions || user.user_resource.updates ||
user.user_resource.conn_per_hour)
@@ -522,7 +523,7 @@ static my_bool acl_load(THD *thd, TABLE_LIST *tables)
if (table->s->fields >= 36)
{
/* Starting from 5.0.3 we have max_user_connections field */
- ptr= get_field(&mem, table->field[next_field++]);
+ ptr= get_field(thd->mem_root, table->field[next_field++]);
user.user_resource.user_conn= ptr ? atoi(ptr) : 0;
}
else
@@ -552,8 +553,8 @@ static my_bool acl_load(THD *thd, TABLE_LIST *tables)
allow_all_hosts=1; // Anyone can connect
}
}
- qsort((uchar*) dynamic_element(&acl_users,0,ACL_USER*),acl_users.elements,
- sizeof(ACL_USER),(qsort_cmp) acl_compare);
+ my_qsort((uchar*) dynamic_element(&acl_users,0,ACL_USER*),acl_users.elements,
+ sizeof(ACL_USER),(qsort_cmp) acl_compare);
end_read_record(&read_record_info);
freeze_size(&acl_users);
@@ -611,8 +612,8 @@ static my_bool acl_load(THD *thd, TABLE_LIST *tables)
#endif
VOID(push_dynamic(&acl_dbs,(uchar*) &db));
}
- qsort((uchar*) dynamic_element(&acl_dbs,0,ACL_DB*),acl_dbs.elements,
- sizeof(ACL_DB),(qsort_cmp) acl_compare);
+ my_qsort((uchar*) dynamic_element(&acl_dbs,0,ACL_DB*),acl_dbs.elements,
+ sizeof(ACL_DB),(qsort_cmp) acl_compare);
end_read_record(&read_record_info);
freeze_size(&acl_dbs);
init_check_host();
@@ -1242,8 +1243,8 @@ static void acl_insert_user(const char *user, const char *host,
if (!acl_user.host.hostname ||
(acl_user.host.hostname[0] == wild_many && !acl_user.host.hostname[1]))
allow_all_hosts=1; // Anyone can connect /* purecov: tested */
- qsort((uchar*) dynamic_element(&acl_users,0,ACL_USER*),acl_users.elements,
- sizeof(ACL_USER),(qsort_cmp) acl_compare);
+ my_qsort((uchar*) dynamic_element(&acl_users,0,ACL_USER*),acl_users.elements,
+ sizeof(ACL_USER),(qsort_cmp) acl_compare);
/* Rebuild 'acl_check_hosts' since 'acl_users' has been modified */
rebuild_check_host();
@@ -1264,7 +1265,7 @@ static void acl_update_db(const char *user, const char *host, const char *db,
{
if (!acl_db->host.hostname && !host[0] ||
acl_db->host.hostname &&
- !my_strcasecmp(system_charset_info, host, acl_db->host.hostname))
+ !strcmp(host, acl_db->host.hostname))
{
if (!acl_db->db && !db[0] ||
acl_db->db && !strcmp(db,acl_db->db))
@@ -1305,8 +1306,8 @@ static void acl_insert_db(const char *user, const char *host, const char *db,
acl_db.access=privileges;
acl_db.sort=get_sort(3,acl_db.host.hostname,acl_db.db,acl_db.user);
VOID(push_dynamic(&acl_dbs,(uchar*) &acl_db));
- qsort((uchar*) dynamic_element(&acl_dbs,0,ACL_DB*),acl_dbs.elements,
- sizeof(ACL_DB),(qsort_cmp) acl_compare);
+ my_qsort((uchar*) dynamic_element(&acl_dbs,0,ACL_DB*),acl_dbs.elements,
+ sizeof(ACL_DB),(qsort_cmp) acl_compare);
}
@@ -3471,16 +3472,13 @@ void grant_free(void)
}
-/*
- Initialize structures responsible for table/column-level privilege checking
- and load information for them from tables in the 'mysql' database.
-
- SYNOPSIS
- grant_init()
+/**
+ @brief Initialize structures responsible for table/column-level privilege
+ checking and load information for them from tables in the 'mysql' database.
- RETURN VALUES
- 0 ok
- 1 Could not initialize grant's
+ @return Error status
+ @retval 0 OK
+ @retval 1 Could not initialize grant subsystem.
*/
my_bool grant_init()
@@ -3493,6 +3491,7 @@ my_bool grant_init()
DBUG_RETURN(1); /* purecov: deadcode */
thd->thread_stack= (char*) &thd;
thd->store_globals();
+ lex_start(thd);
return_val= grant_reload(thd);
delete thd;
/* Remember that we don't have a THD */
@@ -3501,96 +3500,144 @@ my_bool grant_init()
}
-/*
- Initialize structures responsible for table/column-level privilege
- checking and load information about grants from open privilege tables.
+/**
+ @brief Helper function to grant_reload_procs_priv
- SYNOPSIS
- grant_load()
- thd Current thread
- tables List containing open "mysql.tables_priv" and
- "mysql.columns_priv" tables.
+ Reads the procs_priv table into memory hash.
- RETURN VALUES
- FALSE - success
- TRUE - error
+ @param table A pointer to the procs_priv table structure.
+
+ @see grant_reload
+ @see grant_reload_procs_priv
+
+ @return Error state
+ @retval TRUE An error occurred
+ @retval FALSE Success
*/
-static my_bool grant_load(TABLE_LIST *tables)
+static my_bool grant_load_procs_priv(TABLE *p_table)
{
MEM_ROOT *memex_ptr;
my_bool return_val= 1;
- TABLE *t_table, *c_table, *p_table;
bool check_no_resolve= specialflag & SPECIAL_NO_RESOLVE;
MEM_ROOT **save_mem_root_ptr= my_pthread_getspecific_ptr(MEM_ROOT**,
THR_MALLOC);
DBUG_ENTER("grant_load");
-
- (void) hash_init(&column_priv_hash,system_charset_info,
- 0,0,0, (hash_get_key) get_grant_table,
- (hash_free_key) free_grant_table,0);
(void) hash_init(&proc_priv_hash,system_charset_info,
- 0,0,0, (hash_get_key) get_grant_table,
- 0,0);
+ 0,0,0, (hash_get_key) get_grant_table,
+ 0,0);
(void) hash_init(&func_priv_hash,system_charset_info,
- 0,0,0, (hash_get_key) get_grant_table,
- 0,0);
- init_sql_alloc(&memex, ACL_ALLOC_BLOCK_SIZE, 0);
-
- t_table = tables[0].table;
- c_table = tables[1].table;
- p_table= tables[2].table;
- t_table->file->ha_index_init(0, 1);
+ 0,0,0, (hash_get_key) get_grant_table,
+ 0,0);
p_table->file->ha_index_init(0, 1);
- t_table->use_all_columns();
- c_table->use_all_columns();
p_table->use_all_columns();
- if (!t_table->file->index_first(t_table->record[0]))
+
+ if (!p_table->file->index_first(p_table->record[0]))
{
memex_ptr= &memex;
my_pthread_setspecific_ptr(THR_MALLOC, &memex_ptr);
do
{
- GRANT_TABLE *mem_check;
- if (!(mem_check=new (memex_ptr) GRANT_TABLE(t_table,c_table)))
+ GRANT_NAME *mem_check;
+ HASH *hash;
+ if (!(mem_check=new (memex_ptr) GRANT_NAME(p_table)))
{
- /* This could only happen if we are out memory */
- goto end_unlock;
+ /* This could only happen if we are out memory */
+ goto end_unlock;
}
if (check_no_resolve)
{
if (hostname_requires_resolving(mem_check->host.hostname))
{
- sql_print_warning("'tables_priv' entry '%s %s@%s' "
+ sql_print_warning("'procs_priv' entry '%s %s@%s' "
"ignored in --skip-name-resolve mode.",
- mem_check->tname,
- mem_check->user ? mem_check->user : "",
+ mem_check->tname, mem_check->user,
mem_check->host.hostname ?
mem_check->host.hostname : "");
- continue;
- }
+ continue;
+ }
+ }
+ if (p_table->field[4]->val_int() == TYPE_ENUM_PROCEDURE)
+ {
+ hash= &proc_priv_hash;
+ }
+ else
+ if (p_table->field[4]->val_int() == TYPE_ENUM_FUNCTION)
+ {
+ hash= &func_priv_hash;
+ }
+ else
+ {
+ sql_print_warning("'procs_priv' entry '%s' "
+ "ignored, bad routine type",
+ mem_check->tname);
+ continue;
}
+ mem_check->privs= fix_rights_for_procedure(mem_check->privs);
if (! mem_check->ok())
- delete mem_check;
- else if (my_hash_insert(&column_priv_hash,(uchar*) mem_check))
+ delete mem_check;
+ else if (my_hash_insert(hash, (uchar*) mem_check))
{
- delete mem_check;
- goto end_unlock;
+ delete mem_check;
+ goto end_unlock;
}
}
- while (!t_table->file->index_next(t_table->record[0]));
+ while (!p_table->file->index_next(p_table->record[0]));
}
- if (!p_table->file->index_first(p_table->record[0]))
+ /* Return ok */
+ return_val= 0;
+
+end_unlock:
+ p_table->file->ha_index_end();
+ my_pthread_setspecific_ptr(THR_MALLOC, save_mem_root_ptr);
+ DBUG_RETURN(return_val);
+}
+
+
+/**
+ @brief Initialize structures responsible for table/column-level privilege
+ checking and load information about grants from open privilege tables.
+
+ @param thd Current thread
+ @param tables List containing open "mysql.tables_priv" and
+ "mysql.columns_priv" tables.
+
+ @see grant_reload
+
+ @return Error state
+ @retval FALSE Success
+ @retval TRUE Error
+*/
+
+static my_bool grant_load(TABLE_LIST *tables)
+{
+ MEM_ROOT *memex_ptr;
+ my_bool return_val= 1;
+ TABLE *t_table= 0, *c_table= 0;
+ bool check_no_resolve= specialflag & SPECIAL_NO_RESOLVE;
+ MEM_ROOT **save_mem_root_ptr= my_pthread_getspecific_ptr(MEM_ROOT**,
+ THR_MALLOC);
+ DBUG_ENTER("grant_load");
+ (void) hash_init(&column_priv_hash,system_charset_info,
+ 0,0,0, (hash_get_key) get_grant_table,
+ (hash_free_key) free_grant_table,0);
+
+ t_table = tables[0].table;
+ c_table = tables[1].table;
+ t_table->file->ha_index_init(0, 1);
+ t_table->use_all_columns();
+ c_table->use_all_columns();
+
+ if (!t_table->file->index_first(t_table->record[0]))
{
memex_ptr= &memex;
my_pthread_setspecific_ptr(THR_MALLOC, &memex_ptr);
do
{
- GRANT_NAME *mem_check;
- HASH *hash;
- if (!(mem_check=new (&memex) GRANT_NAME(p_table)))
+ GRANT_TABLE *mem_check;
+ if (!(mem_check=new (memex_ptr) GRANT_TABLE(t_table,c_table)))
{
/* This could only happen if we are out memory */
goto end_unlock;
@@ -3600,74 +3647,111 @@ static my_bool grant_load(TABLE_LIST *tables)
{
if (hostname_requires_resolving(mem_check->host.hostname))
{
- sql_print_warning("'procs_priv' entry '%s %s@%s' "
+ sql_print_warning("'tables_priv' entry '%s %s@%s' "
"ignored in --skip-name-resolve mode.",
- mem_check->tname, mem_check->user,
+ mem_check->tname,
+ mem_check->user ? mem_check->user : "",
mem_check->host.hostname ?
mem_check->host.hostname : "");
continue;
}
}
- if (p_table->field[4]->val_int() == TYPE_ENUM_PROCEDURE)
- {
- hash= &proc_priv_hash;
- }
- else
- if (p_table->field[4]->val_int() == TYPE_ENUM_FUNCTION)
- {
- hash= &func_priv_hash;
- }
- else
- {
- sql_print_warning("'procs_priv' entry '%s' "
- "ignored, bad routine type",
- mem_check->tname);
- continue;
- }
- mem_check->privs= fix_rights_for_procedure(mem_check->privs);
if (! mem_check->ok())
delete mem_check;
- else if (my_hash_insert(hash, (uchar*) mem_check))
+ else if (my_hash_insert(&column_priv_hash,(uchar*) mem_check))
{
delete mem_check;
goto end_unlock;
}
}
- while (!p_table->file->index_next(p_table->record[0]));
+ while (!t_table->file->index_next(t_table->record[0]));
}
+
return_val=0; // Return ok
end_unlock:
t_table->file->ha_index_end();
- p_table->file->ha_index_end();
my_pthread_setspecific_ptr(THR_MALLOC, save_mem_root_ptr);
DBUG_RETURN(return_val);
}
-/*
- Reload information about table and column level privileges if possible.
+/**
+ @brief Helper function to grant_reload. Reloads procs_priv table is it
+ exists.
- SYNOPSIS
- grant_reload()
- thd Current thread
+ @param thd A pointer to the thread handler object.
- NOTES
- Locked tables are checked by acl_reload() and doesn't have to be checked
- in this call.
- This function is also used for initialization of structures responsible
- for table/column-level privilege checking.
+ @see grant_reload
- RETURN VALUE
- FALSE Success
- TRUE Error
+ @return Error state
+ @retval FALSE Success
+ @retval TRUE An error has occurred.
+*/
+
+static my_bool grant_reload_procs_priv(THD *thd)
+{
+ HASH old_proc_priv_hash, old_func_priv_hash;
+ TABLE_LIST table;
+ my_bool return_val= FALSE;
+ DBUG_ENTER("grant_reload_procs_priv");
+
+ bzero((char*) &table, sizeof(table));
+ table.alias= table.table_name= (char*) "procs_priv";
+ table.db= (char *) "mysql";
+ table.lock_type= TL_READ;
+
+ if (simple_open_n_lock_tables(thd, &table))
+ {
+ close_thread_tables(thd);
+ DBUG_RETURN(TRUE);
+ }
+
+ /* Save a copy of the current hash if we need to undo the grant load */
+ old_proc_priv_hash= proc_priv_hash;
+ old_func_priv_hash= func_priv_hash;
+
+ rw_wrlock(&LOCK_grant);
+ if ((return_val= grant_load_procs_priv(table.table)))
+ {
+ /* Error; Reverting to old hash */
+ DBUG_PRINT("error",("Reverting to old privileges"));
+ grant_free();
+ proc_priv_hash= old_proc_priv_hash;
+ func_priv_hash= old_func_priv_hash;
+ }
+ else
+ {
+ hash_free(&old_proc_priv_hash);
+ hash_free(&old_func_priv_hash);
+ }
+ rw_unlock(&LOCK_grant);
+
+ close_thread_tables(thd);
+ DBUG_RETURN(return_val);
+}
+
+
+/**
+ @brief Reload information about table and column level privileges if possible
+
+ @param thd Current thread
+
+ Locked tables are checked by acl_reload() and doesn't have to be checked
+ in this call.
+ This function is also used for initialization of structures responsible
+ for table/column-level privilege checking.
+
+ @return Error state
+ @retval FALSE Success
+ @retval TRUE Error
*/
my_bool grant_reload(THD *thd)
{
- TABLE_LIST tables[3];
- HASH old_column_priv_hash, old_proc_priv_hash, old_func_priv_hash;
+ TABLE_LIST tables[2];
+ HASH old_column_priv_hash;
MEM_ROOT old_mem;
my_bool return_val= 1;
DBUG_ENTER("grant_reload");
@@ -3679,11 +3763,9 @@ my_bool grant_reload(THD *thd)
bzero((char*) tables, sizeof(tables));
tables[0].alias= tables[0].table_name= (char*) "tables_priv";
tables[1].alias= tables[1].table_name= (char*) "columns_priv";
- tables[2].alias= tables[2].table_name= (char*) "procs_priv";
- tables[0].db= tables[1].db= tables[2].db= (char *) "mysql";
+ tables[0].db= tables[1].db= (char *) "mysql";
tables[0].next_local= tables[0].next_global= tables+1;
- tables[1].next_local= tables[1].next_global= tables+2;
- tables[0].lock_type= tables[1].lock_type= tables[2].lock_type= TL_READ;
+ tables[0].lock_type= tables[1].lock_type= TL_READ;
/*
To avoid deadlocks we should obtain table locks before
@@ -3693,35 +3775,45 @@ my_bool grant_reload(THD *thd)
goto end;
rw_wrlock(&LOCK_grant);
- grant_version++;
old_column_priv_hash= column_priv_hash;
- old_proc_priv_hash= proc_priv_hash;
- old_func_priv_hash= func_priv_hash;
+
+ /*
+ Create a new memory pool but save the current memory pool to make an undo
+ opertion possible in case of failure.
+ */
old_mem= memex;
+ init_sql_alloc(&memex, ACL_ALLOC_BLOCK_SIZE, 0);
if ((return_val= grant_load(tables)))
{ // Error. Revert to old hash
DBUG_PRINT("error",("Reverting to old privileges"));
grant_free(); /* purecov: deadcode */
column_priv_hash= old_column_priv_hash; /* purecov: deadcode */
- proc_priv_hash= old_proc_priv_hash;
- func_priv_hash= old_func_priv_hash;
memex= old_mem; /* purecov: deadcode */
}
else
{
hash_free(&old_column_priv_hash);
- hash_free(&old_proc_priv_hash);
- hash_free(&old_func_priv_hash);
free_root(&old_mem,MYF(0));
}
rw_unlock(&LOCK_grant);
-end:
close_thread_tables(thd);
+
+ /*
+ It is ok failing to load procs_priv table because we may be
+ working with 4.1 privilege tables.
+ */
+ if (grant_reload_procs_priv(thd))
+ my_error(ER_CANNOT_LOAD_FROM_TABLE, MYF(0), "mysql.procs_priv");
+
+ rw_wrlock(&LOCK_grant);
+ grant_version++;
+ rw_unlock(&LOCK_grant);
+
+end:
DBUG_RETURN(return_val);
}
-
/****************************************************************************
Check table level grants
@@ -3991,47 +4083,78 @@ bool check_column_grant_in_table_ref(THD *thd, TABLE_LIST * table_ref,
}
-bool check_grant_all_columns(THD *thd, ulong want_access, GRANT_INFO *grant,
- const char* db_name, const char *table_name,
- Field_iterator *fields)
+/**
+ @brief check if a query can access a set of columns
+
+ @param thd the current thread
+ @param want_access_arg the privileges requested
+ @param fields an iterator over the fields of a table reference.
+ @return Operation status
+ @retval 0 Success
+ @retval 1 Falure
+ @details This function walks over the columns of a table reference
+ The columns may originate from different tables, depending on the kind of
+ table reference, e.g. join.
+ For each table it will retrieve the grant information and will use it
+ to check the required access privileges for the fields requested from it.
+*/
+bool check_grant_all_columns(THD *thd, ulong want_access_arg,
+ Field_iterator_table_ref *fields)
{
Security_context *sctx= thd->security_ctx;
- GRANT_TABLE *grant_table;
- GRANT_COLUMN *grant_column;
+ ulong want_access= want_access_arg;
+ const char *table_name= NULL;
- want_access &= ~grant->privilege;
- if (!want_access)
- return 0; // Already checked
+ const char* db_name;
+ GRANT_INFO *grant;
+ /* Initialized only to make gcc happy */
+ GRANT_TABLE *grant_table= NULL;
rw_rdlock(&LOCK_grant);
- /* reload table if someone has modified any grants */
-
- if (grant->version != grant_version)
- {
- grant->grant_table=
- table_hash_search(sctx->host, sctx->ip, db_name,
- sctx->priv_user,
- table_name, 0); /* purecov: inspected */
- grant->version= grant_version; /* purecov: inspected */
- }
- /* The following should always be true */
- if (!(grant_table= grant->grant_table))
- goto err; /* purecov: inspected */
-
for (; !fields->end_of_fields(); fields->next())
{
const char *field_name= fields->name();
- grant_column= column_hash_search(grant_table, field_name,
- (uint) strlen(field_name));
- if (!grant_column || (~grant_column->rights & want_access))
- goto err;
+
+ if (table_name != fields->table_name())
+ {
+ table_name= fields->table_name();
+ db_name= fields->db_name();
+ grant= fields->grant();
+ /* get a fresh one for each table */
+ want_access= want_access_arg & ~grant->privilege;
+ if (want_access)
+ {
+ /* reload table if someone has modified any grants */
+ if (grant->version != grant_version)
+ {
+ grant->grant_table=
+ table_hash_search(sctx->host, sctx->ip, db_name,
+ sctx->priv_user,
+ table_name, 0); /* purecov: inspected */
+ grant->version= grant_version; /* purecov: inspected */
+ }
+
+ grant_table= grant->grant_table;
+ DBUG_ASSERT (grant_table);
+ }
+ }
+
+ if (want_access)
+ {
+ GRANT_COLUMN *grant_column=
+ column_hash_search(grant_table, field_name,
+ (uint) strlen(field_name));
+ if (!grant_column || (~grant_column->rights & want_access))
+ goto err;
+ }
}
rw_unlock(&LOCK_grant);
return 0;
err:
rw_unlock(&LOCK_grant);
+
char command[128];
get_privilege_desc(command, sizeof(command), want_access);
my_error(ER_COLUMNACCESS_DENIED_ERROR, MYF(0),
@@ -4494,6 +4617,13 @@ bool mysql_show_grants(THD *thd,LEX_USER *lex_user)
if (!(host=acl_db->host.hostname))
host= "";
+ /*
+ We do not make SHOW GRANTS case-sensitive here (like REVOKE),
+ but make it case-insensitive because that's the way they are
+ actually applied, and showing fewer privileges than are applied
+ would be wrong from a security point of view.
+ */
+
if (!strcmp(lex_user->user.str,user) &&
!my_strcasecmp(system_charset_info, lex_user->host.str, host))
{
@@ -4529,8 +4659,8 @@ bool mysql_show_grants(THD *thd,LEX_USER *lex_user)
db.append(lex_user->user.str, lex_user->user.length,
system_charset_info);
db.append (STRING_WITH_LEN("'@'"));
- db.append(lex_user->host.str, lex_user->host.length,
- system_charset_info);
+ // host and lex_user->host are equal except for case
+ db.append(host, strlen(host), system_charset_info);
db.append ('\'');
if (want_access & GRANT_ACL)
db.append(STRING_WITH_LEN(" WITH GRANT OPTION"));
@@ -4557,6 +4687,13 @@ bool mysql_show_grants(THD *thd,LEX_USER *lex_user)
if (!(host= grant_table->host.hostname))
host= "";
+ /*
+ We do not make SHOW GRANTS case-sensitive here (like REVOKE),
+ but make it case-insensitive because that's the way they are
+ actually applied, and showing fewer privileges than are applied
+ would be wrong from a security point of view.
+ */
+
if (!strcmp(lex_user->user.str,user) &&
!my_strcasecmp(system_charset_info, lex_user->host.str, host))
{
@@ -4637,8 +4774,8 @@ bool mysql_show_grants(THD *thd,LEX_USER *lex_user)
global.append(lex_user->user.str, lex_user->user.length,
system_charset_info);
global.append(STRING_WITH_LEN("'@'"));
- global.append(lex_user->host.str,lex_user->host.length,
- system_charset_info);
+ // host and lex_user->host are equal except for case
+ global.append(host, strlen(host), system_charset_info);
global.append('\'');
if (table_access & GRANT_ACL)
global.append(STRING_WITH_LEN(" WITH GRANT OPTION"));
@@ -4693,6 +4830,13 @@ static int show_routine_grants(THD* thd, LEX_USER *lex_user, HASH *hash,
if (!(host= grant_proc->host.hostname))
host= "";
+ /*
+ We do not make SHOW GRANTS case-sensitive here (like REVOKE),
+ but make it case-insensitive because that's the way they are
+ actually applied, and showing fewer privileges than are applied
+ would be wrong from a security point of view.
+ */
+
if (!strcmp(lex_user->user.str,user) &&
!my_strcasecmp(system_charset_info, lex_user->host.str, host))
{
@@ -4736,8 +4880,8 @@ static int show_routine_grants(THD* thd, LEX_USER *lex_user, HASH *hash,
global.append(lex_user->user.str, lex_user->user.length,
system_charset_info);
global.append(STRING_WITH_LEN("'@'"));
- global.append(lex_user->host.str,lex_user->host.length,
- system_charset_info);
+ // host and lex_user->host are equal except for case
+ global.append(host, strlen(host), system_charset_info);
global.append('\'');
if (proc_access & GRANT_ACL)
global.append(STRING_WITH_LEN(" WITH GRANT OPTION"));
@@ -4998,6 +5142,7 @@ static int handle_grant_table(TABLE_LIST *tables, uint table_no, bool drop,
uchar user_key[MAX_KEY_LENGTH];
uint key_prefix_length;
DBUG_ENTER("handle_grant_table");
+ THD *thd= current_thd;
table->use_all_columns();
if (! table_no) // mysql.user table
@@ -5066,17 +5211,18 @@ static int handle_grant_table(TABLE_LIST *tables, uint table_no, bool drop,
DBUG_PRINT("info",("scan error: %d", error));
continue;
}
- if (! (host= get_field(&mem, host_field)))
+ if (! (host= get_field(thd->mem_root, host_field)))
host= "";
- if (! (user= get_field(&mem, user_field)))
+ if (! (user= get_field(thd->mem_root, user_field)))
user= "";
#ifdef EXTRA_DEBUG
DBUG_PRINT("loop",("scan fields: '%s'@'%s' '%s' '%s' '%s'",
user, host,
- get_field(&mem, table->field[1]) /*db*/,
- get_field(&mem, table->field[3]) /*table*/,
- get_field(&mem, table->field[4]) /*column*/));
+ get_field(thd->mem_root, table->field[1]) /*db*/,
+ get_field(thd->mem_root, table->field[3]) /*table*/,
+ get_field(thd->mem_root,
+ table->field[4]) /*column*/));
#endif
if (strcmp(user_str, user) ||
my_strcasecmp(system_charset_info, host_str, host))
@@ -5713,7 +5859,7 @@ bool mysql_revoke_all(THD *thd, List <LEX_USER> &list)
host= "";
if (!strcmp(lex_user->user.str,user) &&
- !my_strcasecmp(system_charset_info, lex_user->host.str, host))
+ !strcmp(lex_user->host.str, host))
{
if (!replace_db_table(tables[1].table, acl_db->db, *lex_user,
~(ulong)0, 1))
@@ -5745,7 +5891,7 @@ bool mysql_revoke_all(THD *thd, List <LEX_USER> &list)
host= "";
if (!strcmp(lex_user->user.str,user) &&
- !my_strcasecmp(system_charset_info, lex_user->host.str, host))
+ !strcmp(lex_user->host.str, host))
{
if (replace_table_table(thd,grant_table,tables[2].table,*lex_user,
grant_table->db,
@@ -5791,7 +5937,7 @@ bool mysql_revoke_all(THD *thd, List <LEX_USER> &list)
host= "";
if (!strcmp(lex_user->user.str,user) &&
- !my_strcasecmp(system_charset_info, lex_user->host.str, host))
+ !strcmp(lex_user->host.str, host))
{
if (!replace_routine_table(thd,grant_proc,tables[4].table,*lex_user,
grant_proc->db,
diff --git a/sql/sql_acl.h b/sql/sql_acl.h
index cba283ec65b..a279c26c2e4 100644
--- a/sql/sql_acl.h
+++ b/sql/sql_acl.h
@@ -244,9 +244,8 @@ bool check_grant_column (THD *thd, GRANT_INFO *grant,
const char *name, uint length, Security_context *sctx);
bool check_column_grant_in_table_ref(THD *thd, TABLE_LIST * table_ref,
const char *name, uint length);
-bool check_grant_all_columns(THD *thd, ulong want_access, GRANT_INFO *grant,
- const char* db_name, const char *table_name,
- Field_iterator *fields);
+bool check_grant_all_columns(THD *thd, ulong want_access,
+ Field_iterator_table_ref *fields);
bool check_grant_routine(THD *thd, ulong want_access,
TABLE_LIST *procs, bool is_proc, bool no_error);
bool check_grant_db(THD *thd,const char *db);
diff --git a/sql/sql_array.h b/sql/sql_array.h
index ab6fdd0c5c0..e1b22921519 100644
--- a/sql/sql_array.h
+++ b/sql/sql_array.h
@@ -62,7 +62,7 @@ public:
void sort(CMP_FUNC cmp_func)
{
- qsort(array.buffer, array.elements, sizeof(Elem), (qsort_cmp)cmp_func);
+ my_qsort(array.buffer, array.elements, sizeof(Elem), (qsort_cmp)cmp_func);
}
};
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 337fde53dac..4474671eadf 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -44,7 +44,7 @@ public:
virtual ~Prelock_error_handler() {}
- virtual bool handle_error(uint sql_errno,
+ virtual bool handle_error(uint sql_errno, const char *message,
MYSQL_ERROR::enum_warning_level level,
THD *thd);
@@ -58,6 +58,7 @@ private:
bool
Prelock_error_handler::handle_error(uint sql_errno,
+ const char * /* message */,
MYSQL_ERROR::enum_warning_level /* level */,
THD * /* thd */)
{
@@ -86,7 +87,6 @@ bool Prelock_error_handler::safely_trapped_errors()
@defgroup Data_Dictionary Data Dictionary
@{
*/
-
TABLE *unused_tables; /* Used by mysql_test */
HASH open_cache; /* Used by mysql_test */
static HASH table_def_cache;
@@ -683,6 +683,9 @@ TABLE_SHARE *get_cached_table_share(const char *db, const char *table_name)
to open the table
thd->killed will be set if we run out of memory
+
+ If closing a MERGE child, the calling function has to take care for
+ closing the parent too, if necessary.
*/
@@ -711,6 +714,12 @@ void close_handle_and_leave_table_as_lock(TABLE *table)
share->tmp_table= INTERNAL_TMP_TABLE; // for intern_close_table()
}
+ /*
+ When closing a MERGE parent or child table, detach the children first.
+ Do not clear child table references to allow for reopen.
+ */
+ if (table->child_l || table->parent)
+ detach_merge_children(table, FALSE);
table->file->close();
table->db_stat= 0; // Mark file closed
release_table_share(table->s, RELEASE_NORMAL);
@@ -811,6 +820,10 @@ OPEN_TABLE_LIST *list_open_tables(THD *thd, const char *db, const char *wild)
void intern_close_table(TABLE *table)
{ // Free all structures
DBUG_ENTER("intern_close_table");
+ DBUG_PRINT("tcache", ("table: '%s'.'%s' 0x%lx",
+ table->s ? table->s->db.str : "?",
+ table->s ? table->s->table_name.str : "?",
+ (long) table));
free_io_cache(table);
delete table->triggers;
@@ -834,6 +847,9 @@ static void free_cache_entry(TABLE *table)
{
DBUG_ENTER("free_cache_entry");
+ /* Assert that MERGE children are not attached before final close. */
+ DBUG_ASSERT(!table->is_children_attached());
+
intern_close_table(table);
if (!table->in_use)
{
@@ -900,6 +916,54 @@ bool close_cached_tables(THD *thd, bool if_wait_for_refresh,
pthread_mutex_lock(&oldest_unused_share->mutex);
VOID(hash_delete(&table_def_cache, (uchar*) oldest_unused_share));
}
+ DBUG_PRINT("tcache", ("incremented global refresh_version to: %lu",
+ refresh_version));
+ if (if_wait_for_refresh)
+ {
+ /*
+ Other threads could wait in a loop in open_and_lock_tables(),
+ trying to lock one or more of our tables.
+
+ If they wait for the locks in thr_multi_lock(), their lock
+ request is aborted. They loop in open_and_lock_tables() and
+ enter open_table(). Here they notice the table is refreshed and
+ wait for COND_refresh. Then they loop again in
+ open_and_lock_tables() and this time open_table() succeeds. At
+ this moment, if we (the FLUSH TABLES thread) are scheduled and
+ on another FLUSH TABLES enter close_cached_tables(), they could
+ awake while we sleep below, waiting for others threads (us) to
+ close their open tables. If this happens, the other threads
+ would find the tables unlocked. They would get the locks, one
+ after the other, and could do their destructive work. This is an
+ issue if we have LOCK TABLES in effect.
+
+ The problem is that the other threads passed all checks in
+ open_table() before we refresh the table.
+
+ The fix for this problem is to set some_tables_deleted for all
+ threads with open tables. These threads can still get their
+ locks, but will immediately release them again after checking
+ this variable. They will then loop in open_and_lock_tables()
+ again. There they will wait until we update all tables version
+ below.
+
+ Setting some_tables_deleted is done by remove_table_from_cache()
+ in the other branch.
+
+ In other words (reviewer suggestion): You need this setting of
+ some_tables_deleted for the case when table was opened and all
+ related checks were passed before incrementing refresh_version
+ (which you already have) but attempt to lock the table happened
+ after the call to close_old_data_files() i.e. after removal of
+ current thread locks.
+ */
+ for (uint idx=0 ; idx < open_cache.records ; idx++)
+ {
+ TABLE *table=(TABLE*) hash_element(&open_cache,idx);
+ if (table->in_use)
+ table->in_use->some_tables_deleted= 1;
+ }
+ }
}
else
{
@@ -928,8 +992,8 @@ bool close_cached_tables(THD *thd, bool if_wait_for_refresh,
thd->proc_info="Flushing tables";
close_old_data_files(thd,thd->open_tables,1,1);
- mysql_ha_flush(thd, tables, MYSQL_HA_REOPEN_ON_USAGE | MYSQL_HA_FLUSH_ALL,
- TRUE);
+ mysql_ha_flush(thd);
+
bool found=1;
/* Wait until all threads has closed all the tables we had locked */
DBUG_PRINT("info",
@@ -1054,6 +1118,37 @@ bool close_cached_connection_tables(THD *thd, bool if_wait_for_refresh,
}
+/**
+ Mark all temporary tables which were used by the current statement or
+ substatement as free for reuse, but only if the query_id can be cleared.
+
+ @param thd thread context
+
+ @remark For temp tables associated with a open SQL HANDLER the query_id
+ is not reset until the HANDLER is closed.
+*/
+
+static void mark_temp_tables_as_free_for_reuse(THD *thd)
+{
+ for (TABLE *table= thd->temporary_tables ; table ; table= table->next)
+ {
+ if ((table->query_id == thd->query_id) && ! table->open_by_handler)
+ {
+ table->query_id= 0;
+ table->file->ha_reset();
+ /*
+ Detach temporary MERGE children from temporary parent to allow new
+ attach at next open. Do not do the detach, if close_thread_tables()
+ is called from a sub-statement. The temporary table might still be
+ used in the top-level statement.
+ */
+ if (table->child_l || table->parent)
+ detach_merge_children(table, TRUE);
+ }
+ }
+}
+
+
/*
Mark all tables in the list which were used by current substatement
as free for reuse.
@@ -1090,6 +1185,42 @@ static void mark_used_tables_as_free_for_reuse(THD *thd, TABLE *table)
}
+/**
+ Auxiliary function to close all tables in the open_tables list.
+
+ @param thd Thread context.
+
+ @remark It should not ordinarily be called directly.
+*/
+
+static void close_open_tables(THD *thd)
+{
+ bool found_old_table= 0;
+
+ safe_mutex_assert_not_owner(&LOCK_open);
+
+ VOID(pthread_mutex_lock(&LOCK_open));
+
+ DBUG_PRINT("info", ("thd->open_tables: 0x%lx", (long) thd->open_tables));
+
+ while (thd->open_tables)
+ found_old_table|= close_thread_table(thd, &thd->open_tables);
+ thd->some_tables_deleted= 0;
+
+ /* Free tables to hold down open files */
+ while (open_cache.records > table_cache_size && unused_tables)
+ VOID(hash_delete(&open_cache,(uchar*) unused_tables)); /* purecov: tested */
+ check_unused();
+ if (found_old_table)
+ {
+ /* Tell threads waiting for refresh that something has happened */
+ broadcast_refresh();
+ }
+
+ VOID(pthread_mutex_unlock(&LOCK_open));
+}
+
+
/*
Close all tables used by the current substatement, or all tables
used by this thread if we are on the upper level.
@@ -1097,29 +1228,30 @@ static void mark_used_tables_as_free_for_reuse(THD *thd, TABLE *table)
SYNOPSIS
close_thread_tables()
thd Thread handler
- lock_in_use Set to 1 (0 = default) if caller has a lock on
- LOCK_open
- skip_derived Set to 1 (0 = default) if we should not free derived
- tables.
- stopper When closing tables from thd->open_tables(->next)*,
- don't close/remove tables starting from stopper.
IMPLEMENTATION
Unlocks tables and frees derived tables.
Put all normal tables used by thread in free list.
- When in prelocked mode it will only close/mark as free for reuse
- tables opened by this substatement, it will also check if we are
- closing tables after execution of complete query (i.e. we are on
- upper level) and will leave prelocked mode if needed.
+ It will only close/mark as free for reuse tables opened by this
+ substatement, it will also check if we are closing tables after
+ execution of complete query (i.e. we are on upper level) and will
+ leave prelocked mode if needed.
*/
-void close_thread_tables(THD *thd, bool lock_in_use, bool skip_derived)
+void close_thread_tables(THD *thd)
{
- bool found_old_table;
+ TABLE *table;
prelocked_mode_type prelocked_mode= thd->prelocked_mode;
DBUG_ENTER("close_thread_tables");
+#ifdef EXTRA_DEBUG
+ DBUG_PRINT("tcache", ("open tables:"));
+ for (table= thd->open_tables; table; table= table->next)
+ DBUG_PRINT("tcache", ("table: '%s'.'%s' 0x%lx", table->s->db.str,
+ table->s->table_name.str, (long) table));
+#endif
+
/*
We are assuming here that thd->derived_tables contains ONLY derived
tables for this substatement. i.e. instead of approach which uses
@@ -1131,9 +1263,9 @@ void close_thread_tables(THD *thd, bool lock_in_use, bool skip_derived)
derived tables with (sub-)statement instead of thread and destroy
them at the end of its execution.
*/
- if (thd->derived_tables && !skip_derived)
+ if (thd->derived_tables)
{
- TABLE *table, *next;
+ TABLE *next;
/*
Close all derived tables generated in queries like
SELECT * FROM (SELECT * FROM t1)
@@ -1146,13 +1278,10 @@ void close_thread_tables(THD *thd, bool lock_in_use, bool skip_derived)
thd->derived_tables= 0;
}
- if (prelocked_mode)
- {
- /*
- Mark all temporary tables used by this substatement as free for reuse.
- */
- mark_used_tables_as_free_for_reuse(thd, thd->temporary_tables);
- }
+ /*
+ Mark all temporary tables used by this statement as free for reuse.
+ */
+ mark_temp_tables_as_free_for_reuse(thd);
if (thd->locked_tables || prelocked_mode)
{
@@ -1216,28 +1345,15 @@ void close_thread_tables(THD *thd, bool lock_in_use, bool skip_derived)
if (!thd->active_transaction())
thd->transaction.xid_state.xid.null();
- if (!lock_in_use)
- VOID(pthread_mutex_lock(&LOCK_open));
-
- DBUG_PRINT("info", ("thd->open_tables: 0x%lx", (long) thd->open_tables));
-
- found_old_table= 0;
- while (thd->open_tables)
- found_old_table|= close_thread_table(thd, &thd->open_tables);
- thd->some_tables_deleted=0;
-
- /* Free tables to hold down open files */
- while (open_cache.records > table_cache_size && unused_tables)
- VOID(hash_delete(&open_cache,(uchar*) unused_tables)); /* purecov: tested */
- check_unused();
- if (found_old_table)
- {
- /* Tell threads waiting for refresh that something has happened */
- broadcast_refresh();
- }
- if (!lock_in_use)
- VOID(pthread_mutex_unlock(&LOCK_open));
- /* VOID(pthread_sigmask(SIG_SETMASK,&thd->signals,NULL)); */
+ /*
+ Note that we need to hold LOCK_open while changing the
+ open_tables list. Another thread may work on it.
+ (See: remove_table_from_cache(), mysql_wait_completed_table())
+ Closing a MERGE child before the parent would be fatal if the
+ other thread tries to abort the MERGE lock in between.
+ */
+ if (thd->open_tables)
+ close_open_tables(thd);
if (prelocked_mode == PRELOCKED)
{
@@ -1262,8 +1378,17 @@ bool close_thread_table(THD *thd, TABLE **table_ptr)
DBUG_ENTER("close_thread_table");
DBUG_ASSERT(table->key_read == 0);
DBUG_ASSERT(!table->file || table->file->inited == handler::NONE);
+ DBUG_PRINT("tcache", ("table: '%s'.'%s' 0x%lx", table->s->db.str,
+ table->s->table_name.str, (long) table));
*table_ptr=table->next;
+ /*
+ When closing a MERGE parent or child table, detach the children first.
+ Clear child table references to force new assignment at next open.
+ */
+ if (table->child_l || table->parent)
+ detach_merge_children(table, TRUE);
+
if (table->needs_reopen_or_name_lock() ||
thd->version != refresh_version || !table->db_stat)
{
@@ -1278,6 +1403,9 @@ bool close_thread_table(THD *thd, TABLE **table_ptr)
*/
DBUG_ASSERT(!table->open_placeholder);
+ /* Assert that MERGE children are not attached in unused_tables. */
+ DBUG_ASSERT(!table->is_children_attached());
+
/* Free memory and reset for next loop */
table->file->ha_reset();
table->in_use=0;
@@ -1674,6 +1802,7 @@ TABLE *find_temporary_table(THD *thd, TABLE_LIST *table_list)
Try to locate the table in the list of thd->temporary_tables.
If the table is found:
+ - if the table is being used by some outer statement, fail.
- if the table is in thd->locked_tables, unlock it and
remove it from the list of locked tables. Currently only transactional
temporary tables are present in the locked_tables list.
@@ -1688,24 +1817,36 @@ TABLE *find_temporary_table(THD *thd, TABLE_LIST *table_list)
thd->temporary_tables list, it's impossible to tell here whether
we're dealing with an internal or a user temporary table.
- @retval TRUE the table was not found in the list of temporary tables
- of this thread
- @retval FALSE the table was found and dropped successfully.
+ @retval 0 the table was found and dropped successfully.
+ @retval 1 the table was not found in the list of temporary tables
+ of this thread
+ @retval -1 the table is in use by a outer query
*/
-bool close_temporary_table(THD *thd, TABLE_LIST *table_list)
+int drop_temporary_table(THD *thd, TABLE_LIST *table_list)
{
TABLE *table;
+ DBUG_ENTER("drop_temporary_table");
+ DBUG_PRINT("tmptable", ("closing table: '%s'.'%s'",
+ table_list->db, table_list->table_name));
if (!(table= find_temporary_table(thd, table_list)))
- return 1;
+ DBUG_RETURN(1);
+
+ /* Table might be in use by some outer statement. */
+ if (table->query_id && table->query_id != thd->query_id)
+ {
+ my_error(ER_CANT_REOPEN_TABLE, MYF(0), table->alias);
+ DBUG_RETURN(-1);
+ }
+
/*
If LOCK TABLES list is not empty and contains this table,
unlock the table and remove the table from this list.
*/
mysql_lock_remove(thd, thd->locked_tables, table, FALSE);
close_temporary_table(thd, table, 1, 1);
- return 0;
+ DBUG_RETURN(0);
}
/*
@@ -1715,6 +1856,24 @@ bool close_temporary_table(THD *thd, TABLE_LIST *table_list)
void close_temporary_table(THD *thd, TABLE *table,
bool free_share, bool delete_table)
{
+ DBUG_ENTER("close_temporary_table");
+ DBUG_PRINT("tmptable", ("closing table: '%s'.'%s' 0x%lx alias: '%s'",
+ table->s->db.str, table->s->table_name.str,
+ (long) table, table->alias));
+
+ /*
+ When closing a MERGE parent or child table, detach the children
+ first. Clear child table references as MERGE table cannot be
+ reopened after final close of one of its tables.
+
+ This is necessary here because it is sometimes called with attached
+ tables and without prior close_thread_tables(). E.g. in
+ mysql_alter_table(), mysql_rm_table_part2(), mysql_truncate(),
+ drop_open_table().
+ */
+ if (table->child_l || table->parent)
+ detach_merge_children(table, TRUE);
+
if (table->prev)
{
table->prev->next= table->next;
@@ -1741,6 +1900,7 @@ void close_temporary_table(THD *thd, TABLE *table,
slave_open_temp_tables--;
}
close_temporary(table, free_share, delete_table);
+ DBUG_VOID_RETURN;
}
@@ -1756,6 +1916,8 @@ void close_temporary(TABLE *table, bool free_share, bool delete_table)
{
handlerton *table_type= table->s->db_type();
DBUG_ENTER("close_temporary");
+ DBUG_PRINT("tmptable", ("closing table: '%s'.'%s'",
+ table->s->db.str, table->s->table_name.str));
free_io_cache(table);
closefrm(table, 0);
@@ -1802,6 +1964,9 @@ bool rename_temporary_table(THD* thd, TABLE *table, const char *db,
static void relink_unused(TABLE *table)
{
+ /* Assert that MERGE children are not attached in unused_tables. */
+ DBUG_ASSERT(!table->is_children_attached());
+
if (table != unused_tables)
{
table->prev->next=table->next; /* Remove from unused list */
@@ -1817,6 +1982,77 @@ static void relink_unused(TABLE *table)
/**
+ @brief Prepare an open merge table for close.
+
+ @param[in] thd thread context
+ @param[in] table table to prepare
+ @param[in,out] prev_pp pointer to pointer of previous table
+
+ @detail
+ If the table is a MERGE parent, just detach the children.
+ If the table is a MERGE child, close the parent (incl. detach).
+*/
+
+static void unlink_open_merge(THD *thd, TABLE *table, TABLE ***prev_pp)
+{
+ DBUG_ENTER("unlink_open_merge");
+
+ if (table->parent)
+ {
+ /*
+ If MERGE child, close parent too. Closing includes detaching.
+
+ This is used for example in ALTER TABLE t1 RENAME TO t5 under
+ LOCK TABLES where t1 is a MERGE child:
+ CREATE TABLE t1 (c1 INT);
+ CREATE TABLE t2 (c1 INT) ENGINE=MRG_MYISAM UNION=(t1);
+ LOCK TABLES t1 WRITE, t2 WRITE;
+ ALTER TABLE t1 RENAME TO t5;
+ */
+ TABLE *parent= table->parent;
+ TABLE **prv_p;
+
+ /* Find parent in open_tables list. */
+ for (prv_p= &thd->open_tables;
+ *prv_p && (*prv_p != parent);
+ prv_p= &(*prv_p)->next) {}
+ if (*prv_p)
+ {
+ /* Special treatment required if child follows parent in list. */
+ if (*prev_pp == &parent->next)
+ *prev_pp= prv_p;
+ /*
+ Remove parent from open_tables list and close it.
+ This includes detaching and hence clearing parent references.
+ */
+ close_thread_table(thd, prv_p);
+ }
+ }
+ else if (table->child_l)
+ {
+ /*
+ When closing a MERGE parent, detach the children first. It is
+ not necessary to clear the child or parent table reference of
+ this table because the TABLE is freed. But we need to clear
+ the child or parent references of the other belonging tables
+ so that they cannot be moved into the unused_tables chain with
+ these pointers set.
+
+ This is used for example in ALTER TABLE t2 RENAME TO t5 under
+ LOCK TABLES where t2 is a MERGE parent:
+ CREATE TABLE t1 (c1 INT);
+ CREATE TABLE t2 (c1 INT) ENGINE=MRG_MYISAM UNION=(t1);
+ LOCK TABLES t1 WRITE, t2 WRITE;
+ ALTER TABLE t2 RENAME TO t5;
+ */
+ detach_merge_children(table, TRUE);
+ }
+
+ DBUG_VOID_RETURN;
+}
+
+
+/**
@brief Remove all instances of table from thread's open list and
table cache.
@@ -1827,7 +2063,7 @@ static void relink_unused(TABLE *table)
FALSE - otherwise
@note When unlock parameter is FALSE or current thread doesn't have
- any tables locked with LOCK TABLES tables are assumed to be
+ any tables locked with LOCK TABLES, tables are assumed to be
not locked (for example already unlocked).
*/
@@ -1835,31 +2071,45 @@ void unlink_open_table(THD *thd, TABLE *find, bool unlock)
{
char key[MAX_DBKEY_LENGTH];
uint key_length= find->s->table_cache_key.length;
- TABLE *list, **prev, *next;
+ TABLE *list, **prev;
DBUG_ENTER("unlink_open_table");
safe_mutex_assert_owner(&LOCK_open);
- list= thd->open_tables;
- prev= &thd->open_tables;
memcpy(key, find->s->table_cache_key.str, key_length);
- for (; list ; list=next)
+ /*
+ Note that we need to hold LOCK_open while changing the
+ open_tables list. Another thread may work on it.
+ (See: remove_table_from_cache(), mysql_wait_completed_table())
+ Closing a MERGE child before the parent would be fatal if the
+ other thread tries to abort the MERGE lock in between.
+ */
+ for (prev= &thd->open_tables; *prev; )
{
- next=list->next;
+ list= *prev;
+
if (list->s->table_cache_key.length == key_length &&
!memcmp(list->s->table_cache_key.str, key, key_length))
{
if (unlock && thd->locked_tables)
- mysql_lock_remove(thd, thd->locked_tables, list, TRUE);
+ mysql_lock_remove(thd, thd->locked_tables,
+ list->parent ? list->parent : list, TRUE);
+
+ /* Prepare MERGE table for close. Close parent if necessary. */
+ unlink_open_merge(thd, list, &prev);
+
+ /* Remove table from open_tables list. */
+ *prev= list->next;
+ /* Close table. */
VOID(hash_delete(&open_cache,(uchar*) list)); // Close table
}
else
{
- *prev=list; // put in use list
+ /* Step to next entry in open_tables list. */
prev= &list->next;
}
}
- *prev=0;
+
// Notify any 'refresh' threads
broadcast_refresh();
DBUG_VOID_RETURN;
@@ -1949,6 +2199,41 @@ void wait_for_condition(THD *thd, pthread_mutex_t *mutex, pthread_cond_t *cond)
}
+/**
+ Exclusively name-lock a table that is already write-locked by the
+ current thread.
+
+ @param thd current thread context
+ @param tables able list containing one table to open.
+
+ @return FALSE on success, TRUE otherwise.
+*/
+
+bool name_lock_locked_table(THD *thd, TABLE_LIST *tables)
+{
+ DBUG_ENTER("name_lock_locked_table");
+
+ /* Under LOCK TABLES we must only accept write locked tables. */
+ tables->table= find_locked_table(thd, tables->db, tables->table_name);
+
+ if (!tables->table)
+ my_error(ER_TABLE_NOT_LOCKED, MYF(0), tables->alias);
+ else if (tables->table->reginfo.lock_type < TL_WRITE_LOW_PRIORITY)
+ my_error(ER_TABLE_NOT_LOCKED_FOR_WRITE, MYF(0), tables->alias);
+ else
+ {
+ /*
+ Ensures that table is opened only by this thread and that no
+ other statement will open this table.
+ */
+ wait_while_table_is_used(thd, tables->table, HA_EXTRA_FORCE_REOPEN);
+ DBUG_RETURN(FALSE);
+ }
+
+ DBUG_RETURN(TRUE);
+}
+
+
/*
Open table which is already name-locked by this thread.
@@ -2248,6 +2533,9 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root,
HASH_SEARCH_STATE state;
DBUG_ENTER("open_table");
+ /* Parsing of partitioning information from .frm needs thd->lex set up. */
+ DBUG_ASSERT(thd->lex->is_lex_started);
+
/* find a unused table in the open table cache */
if (refresh)
*refresh=0;
@@ -2284,8 +2572,7 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root,
is always represented by only one TABLE object in THD, and
it can not be cloned. Emit an error for an unsupported behaviour.
*/
- if (table->query_id == thd->query_id ||
- thd->prelocked_mode && table->query_id)
+ if (table->query_id)
{
DBUG_PRINT("error",
("query_id: %lu server_id: %u pseudo_thread_id: %lu",
@@ -2295,7 +2582,6 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root,
DBUG_RETURN(0);
}
table->query_id= thd->query_id;
- table->clear_query_id= 1;
thd->thread_specific_used= TRUE;
DBUG_PRINT("info",("Using temporary table"));
goto reset;
@@ -2341,9 +2627,14 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root,
table->s->table_name.str);
DBUG_RETURN(0);
}
+ /*
+ When looking for a usable TABLE, ignore MERGE children, as they
+ belong to their parent and cannot be used explicitly.
+ */
if (!my_strcasecmp(system_charset_info, table->alias, alias) &&
table->query_id != thd->query_id && /* skip tables already used */
- !(thd->prelocked_mode && table->query_id))
+ !(thd->prelocked_mode && table->query_id) &&
+ !table->parent)
{
int distance= ((int) table->reginfo.lock_type -
(int) table_list->lock_type);
@@ -2466,9 +2757,15 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root,
DBUG_RETURN(0);
}
- /* close handler tables which are marked for flush */
+ /*
+ In order for the back off and re-start process to work properly,
+ handler tables having old versions (due to FLUSH TABLES or pending
+ name-lock) MUST be closed. This is specially important if a name-lock
+ is pending for any table of the handler_tables list, otherwise a
+ deadlock may occur.
+ */
if (thd->handler_tables)
- mysql_ha_flush(thd, (TABLE_LIST*) NULL, MYSQL_HA_REOPEN_ON_USAGE, TRUE);
+ mysql_ha_flush(thd);
/*
Actually try to find the table in the open_cache.
@@ -2486,6 +2783,8 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root,
table= (TABLE*) hash_next(&open_cache, (uchar*) key, key_length,
&state))
{
+ DBUG_PRINT("tcache", ("in_use table: '%s'.'%s' 0x%lx", table->s->db.str,
+ table->s->table_name.str, (long) table));
/*
Here we flush tables marked for flush.
Normally, table->s->version contains the value of
@@ -2533,6 +2832,10 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root,
table->db_stat == 0 signals wait_for_locked_table_names
that the tables in question are not used any more. See
table_is_used call for details.
+
+ Notice that HANDLER tables were already taken care of by
+ the earlier call to mysql_ha_flush() in this same critical
+ section.
*/
close_old_data_files(thd,thd->open_tables,0,0);
/*
@@ -2570,6 +2873,8 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root,
}
if (table)
{
+ DBUG_PRINT("tcache", ("unused table: '%s'.'%s' 0x%lx", table->s->db.str,
+ table->s->table_name.str, (long) table));
/* Unlink the table from "unused_tables" list. */
if (table == unused_tables)
{ // First unused
@@ -2585,6 +2890,7 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root,
{
/* Insert a new TABLE instance into the open cache */
int error;
+ DBUG_PRINT("tcache", ("opening new table"));
/* Free cache if too big */
while (open_cache.records > table_cache_size && unused_tables)
VOID(hash_delete(&open_cache,(uchar*) unused_tables)); /* purecov: tested */
@@ -2651,7 +2957,9 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root,
VOID(pthread_mutex_unlock(&LOCK_open));
DBUG_RETURN(0); // VIEW
}
- DBUG_PRINT("info", ("inserting table 0x%lx into the cache", (long) table));
+ DBUG_PRINT("info", ("inserting table '%s'.'%s' 0x%lx into the cache",
+ table->s->db.str, table->s->table_name.str,
+ (long) table));
VOID(my_hash_insert(&open_cache,(uchar*) table));
}
@@ -2741,9 +3049,12 @@ bool reopen_table(TABLE *table)
TABLE_LIST table_list;
THD *thd= table->in_use;
DBUG_ENTER("reopen_table");
+ DBUG_PRINT("tcache", ("table: '%s'.'%s' 0x%lx", table->s->db.str,
+ table->s->table_name.str, (long) table));
DBUG_ASSERT(table->s->ref_count == 0);
DBUG_ASSERT(!table->sort.io_cache);
+ DBUG_ASSERT(!table->children_attached);
#ifdef EXTRA_DEBUG
if (table->db_stat)
@@ -2784,6 +3095,17 @@ bool reopen_table(TABLE *table)
tmp.next= table->next;
tmp.prev= table->prev;
+ /* Preserve MERGE parent. */
+ tmp.parent= table->parent;
+ /* Fix MERGE child list and check for unchanged union. */
+ if ((table->child_l || tmp.child_l) &&
+ fix_merge_after_open(table->child_l, table->child_last_l,
+ tmp.child_l, tmp.child_last_l))
+ {
+ VOID(closefrm(&tmp, 1)); // close file, free everything
+ goto end;
+ }
+
delete table->triggers;
if (table->file)
VOID(closefrm(table, 1)); // close file, free everything
@@ -2805,6 +3127,11 @@ bool reopen_table(TABLE *table)
}
if (table->triggers)
table->triggers->set_table(table);
+ /*
+ Do not attach MERGE children here. The children might be reopened
+ after the parent. Attach children after reopening all tables that
+ require reopen. See for example reopen_tables().
+ */
broadcast_refresh();
error=0;
@@ -2826,6 +3153,9 @@ bool reopen_table(TABLE *table)
then there is only one table open and locked. This means that
the function probably has to be adjusted before it can be used
anywhere outside ALTER TABLE.
+
+ @note Must not use TABLE_SHARE::table_name/db of the table being closed,
+ the strings are used in a loop even after the share may be freed.
*/
void close_data_files_and_morph_locks(THD *thd, const char *db,
@@ -2857,7 +3187,22 @@ void close_data_files_and_morph_locks(THD *thd, const char *db,
!strcmp(table->s->db.str, db))
{
if (thd->locked_tables)
- mysql_lock_remove(thd, thd->locked_tables, table, TRUE);
+ {
+ if (table->parent)
+ {
+ /*
+ If MERGE child, need to reopen parent too. This means that
+ the first child to be closed will detach all children from
+ the parent and close it. OTOH in most cases a MERGE table
+ won't have multiple children with the same db.table_name.
+ */
+ mysql_lock_remove(thd, thd->locked_tables, table->parent, TRUE);
+ table->parent->open_placeholder= 1;
+ close_handle_and_leave_table_as_lock(table->parent);
+ }
+ else
+ mysql_lock_remove(thd, thd->locked_tables, table, TRUE);
+ }
table->open_placeholder= 1;
close_handle_and_leave_table_as_lock(table);
}
@@ -2867,6 +3212,62 @@ void close_data_files_and_morph_locks(THD *thd, const char *db,
/**
+ @brief Reattach MERGE children after reopen.
+
+ @param[in] thd thread context
+ @param[in,out] err_tables_p pointer to pointer of tables in error
+
+ @return status
+ @retval FALSE OK, err_tables_p unchanged
+ @retval TRUE Error, err_tables_p contains table(s)
+*/
+
+static bool reattach_merge(THD *thd, TABLE **err_tables_p)
+{
+ TABLE *table;
+ TABLE *next;
+ TABLE **prv_p= &thd->open_tables;
+ bool error= FALSE;
+ DBUG_ENTER("reattach_merge");
+
+ for (table= thd->open_tables; table; table= next)
+ {
+ next= table->next;
+ DBUG_PRINT("tcache", ("check table: '%s'.'%s' 0x%lx next: 0x%lx",
+ table->s->db.str, table->s->table_name.str,
+ (long) table, (long) next));
+ /* Reattach children for MERGE tables with "closed data files" only. */
+ if (table->child_l && !table->children_attached)
+ {
+ DBUG_PRINT("tcache", ("MERGE parent, attach children"));
+ if(table->file->extra(HA_EXTRA_ATTACH_CHILDREN))
+ {
+ my_error(ER_CANT_REOPEN_TABLE, MYF(0), table->alias);
+ error= TRUE;
+ /* Remove table from open_tables. */
+ *prv_p= next;
+ if (next)
+ prv_p= &next->next;
+ /* Stack table on error list. */
+ table->next= *err_tables_p;
+ *err_tables_p= table;
+ continue;
+ }
+ else
+ {
+ table->children_attached= TRUE;
+ DBUG_PRINT("myrg", ("attached parent: '%s'.'%s' 0x%lx",
+ table->s->db.str,
+ table->s->table_name.str, (long) table));
+ }
+ }
+ prv_p= &table->next;
+ }
+ DBUG_RETURN(error);
+}
+
+
+/**
@brief Reopen all tables with closed data files.
@param thd Thread context
@@ -2890,7 +3291,9 @@ bool reopen_tables(THD *thd,bool get_locks,bool in_refresh)
{
TABLE *table,*next,**prev;
TABLE **tables,**tables_ptr; // For locks
+ TABLE *err_tables= NULL;
bool error=0, not_used;
+ bool merge_table_found= FALSE;
DBUG_ENTER("reopen_tables");
if (!thd->open_tables)
@@ -2899,10 +3302,15 @@ bool reopen_tables(THD *thd,bool get_locks,bool in_refresh)
safe_mutex_assert_owner(&LOCK_open);
if (get_locks)
{
- /* The ptr is checked later */
+ /*
+ The ptr is checked later
+ Do not handle locks of MERGE children.
+ */
uint opens=0;
for (table= thd->open_tables; table ; table=table->next)
- opens++;
+ if (!table->parent)
+ opens++;
+ DBUG_PRINT("tcache", ("open tables to lock: %u", opens));
tables= (TABLE**) my_alloca(sizeof(TABLE*)*opens);
}
else
@@ -2914,17 +3322,37 @@ bool reopen_tables(THD *thd,bool get_locks,bool in_refresh)
{
uint db_stat=table->db_stat;
next=table->next;
+ DBUG_PRINT("tcache", ("open table: '%s'.'%s' 0x%lx "
+ "parent: 0x%lx db_stat: %u",
+ table->s->db.str, table->s->table_name.str,
+ (long) table, (long) table->parent, db_stat));
+ if (table->child_l && !db_stat)
+ merge_table_found= TRUE;
if (!tables || (!db_stat && reopen_table(table)))
{
my_error(ER_CANT_REOPEN_TABLE, MYF(0), table->alias);
+ /*
+ If we could not allocate 'tables', we may close open tables
+ here. If a MERGE table is affected, detach the children first.
+ It is not necessary to clear the child or parent table reference
+ of this table because the TABLE is freed. But we need to clear
+ the child or parent references of the other belonging tables so
+ that they cannot be moved into the unused_tables chain with
+ these pointers set.
+ */
+ if (table->child_l || table->parent)
+ detach_merge_children(table, TRUE);
VOID(hash_delete(&open_cache,(uchar*) table));
error=1;
}
else
{
+ DBUG_PRINT("tcache", ("opened. need lock: %d",
+ get_locks && !db_stat && !table->parent));
*prev= table;
prev= &table->next;
- if (get_locks && !db_stat)
+ /* Do not handle locks of MERGE children. */
+ if (get_locks && !db_stat && !table->parent)
*tables_ptr++= table; // need new lock on this
if (in_refresh)
{
@@ -2933,25 +3361,52 @@ bool reopen_tables(THD *thd,bool get_locks,bool in_refresh)
}
}
}
+ *prev=0;
+ /*
+ When all tables are open again, we can re-attach MERGE children to
+ their parents. All TABLE objects are still present.
+ */
+ DBUG_PRINT("tcache", ("re-attaching MERGE tables: %d", merge_table_found));
+ if (!error && merge_table_found && reattach_merge(thd, &err_tables))
+ {
+ while (err_tables)
+ {
+ VOID(hash_delete(&open_cache, (uchar*) err_tables));
+ err_tables= err_tables->next;
+ }
+ }
+ DBUG_PRINT("tcache", ("open tables to lock: %u",
+ (uint) (tables_ptr - tables)));
if (tables != tables_ptr) // Should we get back old locks
{
MYSQL_LOCK *lock;
- /* We should always get these locks */
+ /*
+ We should always get these locks. Anyway, we must not go into
+ wait_for_tables() as it tries to acquire LOCK_open, which is
+ already locked.
+ */
thd->some_tables_deleted=0;
if ((lock= mysql_lock_tables(thd, tables, (uint) (tables_ptr - tables),
- 0, &not_used)))
+ MYSQL_LOCK_NOTIFY_IF_NEED_REOPEN, &not_used)))
{
thd->locked_tables=mysql_lock_merge(thd->locked_tables,lock);
}
else
+ {
+ /*
+ This case should only happen if there is a bug in the reopen logic.
+ Need to issue error message to have a reply for the application.
+ Not exactly what happened though, but close enough.
+ */
+ my_error(ER_LOCK_DEADLOCK, MYF(0));
error=1;
+ }
}
if (get_locks && tables)
{
my_afree((uchar*) tables);
}
broadcast_refresh();
- *prev=0;
DBUG_RETURN(error);
}
@@ -2970,14 +3425,19 @@ bool reopen_tables(THD *thd,bool get_locks,bool in_refresh)
@param send_refresh Should we awake waiters even if we didn't close any tables?
*/
-void close_old_data_files(THD *thd, TABLE *table, bool morph_locks,
- bool send_refresh)
+static void close_old_data_files(THD *thd, TABLE *table, bool morph_locks,
+ bool send_refresh)
{
bool found= send_refresh;
DBUG_ENTER("close_old_data_files");
for (; table ; table=table->next)
{
+ DBUG_PRINT("tcache", ("checking table: '%s'.'%s' 0x%lx",
+ table->s->db.str, table->s->table_name.str,
+ (long) table));
+ DBUG_PRINT("tcache", ("needs refresh: %d is open: %u",
+ table->needs_reopen_or_name_lock(), table->db_stat));
/*
Reopen marked for flush.
*/
@@ -2989,13 +3449,33 @@ void close_old_data_files(THD *thd, TABLE *table, bool morph_locks,
if (morph_locks)
{
/*
- Wake up threads waiting for table-level lock on this table
- so they won't sneak in when we will temporarily remove our
- lock on it. This will also give them a chance to close their
- instances of this table.
+ Forward lock handling to MERGE parent. But unlock parent
+ once only.
*/
- mysql_lock_abort(thd, table, TRUE);
- mysql_lock_remove(thd, thd->locked_tables, table, TRUE);
+ TABLE *ulcktbl= table->parent ? table->parent : table;
+ if (ulcktbl->lock_count)
+ {
+ /*
+ Wake up threads waiting for table-level lock on this table
+ so they won't sneak in when we will temporarily remove our
+ lock on it. This will also give them a chance to close their
+ instances of this table.
+ */
+ mysql_lock_abort(thd, ulcktbl, TRUE);
+ mysql_lock_remove(thd, thd->locked_tables, ulcktbl, TRUE);
+ ulcktbl->lock_count= 0;
+ }
+ if ((ulcktbl != table) && ulcktbl->db_stat)
+ {
+ /*
+ Close the parent too. Note that parent can come later in
+ the list of tables. It will then be noticed as closed and
+ as a placeholder. When this happens, do not clear the
+ placeholder flag. See the branch below ("***").
+ */
+ ulcktbl->open_placeholder= 1;
+ close_handle_and_leave_table_as_lock(ulcktbl);
+ }
/*
We want to protect the table from concurrent DDL operations
(like RENAME TABLE) until we will re-open and re-lock it.
@@ -3004,7 +3484,7 @@ void close_old_data_files(THD *thd, TABLE *table, bool morph_locks,
}
close_handle_and_leave_table_as_lock(table);
}
- else if (table->open_placeholder)
+ else if (table->open_placeholder && !morph_locks)
{
/*
We come here only in close-for-back-off scenario. So we have to
@@ -3012,8 +3492,11 @@ void close_old_data_files(THD *thd, TABLE *table, bool morph_locks,
in case of concurrent execution of CREATE TABLE t1 SELECT * FROM t2
and RENAME TABLE t2 TO t1). In close-for-re-open scenario we will
probably want to let it stay.
+
+ Note "***": We must not enter this branch if the placeholder
+ flag has been set because of a former close through a child.
+ See above the comment that refers to this note.
*/
- DBUG_ASSERT(!morph_locks);
table->open_placeholder= 0;
}
}
@@ -3084,7 +3567,7 @@ bool wait_for_tables(THD *thd)
{
thd->some_tables_deleted=0;
close_old_data_files(thd,thd->open_tables,0,dropping_tables != 0);
- mysql_ha_flush(thd, (TABLE_LIST*) NULL, MYSQL_HA_REOPEN_ON_USAGE, TRUE);
+ mysql_ha_flush(thd);
if (!table_is_used(thd->open_tables,1))
break;
(void) pthread_cond_wait(&COND_refresh,&LOCK_open);
@@ -3134,13 +3617,29 @@ TABLE *drop_locked_tables(THD *thd,const char *db, const char *table_name)
prev= &thd->open_tables;
DBUG_ENTER("drop_locked_tables");
+ /*
+ Note that we need to hold LOCK_open while changing the
+ open_tables list. Another thread may work on it.
+ (See: remove_table_from_cache(), mysql_wait_completed_table())
+ Closing a MERGE child before the parent would be fatal if the
+ other thread tries to abort the MERGE lock in between.
+ */
for (table= thd->open_tables; table ; table=next)
{
next=table->next;
if (!strcmp(table->s->table_name.str, table_name) &&
!strcmp(table->s->db.str, db))
{
- mysql_lock_remove(thd, thd->locked_tables, table, TRUE);
+ /* If MERGE child, forward lock handling to parent. */
+ mysql_lock_remove(thd, thd->locked_tables,
+ table->parent ? table->parent : table, TRUE);
+ /*
+ When closing a MERGE parent or child table, detach the children first.
+ Clear child table references in case this object is opened again.
+ */
+ if (table->child_l || table->parent)
+ detach_merge_children(table, TRUE);
+
if (!found)
{
found= table;
@@ -3189,7 +3688,8 @@ void abort_locked_tables(THD *thd,const char *db, const char *table_name)
if (!strcmp(table->s->table_name.str, table_name) &&
!strcmp(table->s->db.str, db))
{
- mysql_lock_abort(thd,table, TRUE);
+ /* If MERGE child, forward lock handling to parent. */
+ mysql_lock_abort(thd, table->parent ? table->parent : table, TRUE);
break;
}
}
@@ -3220,7 +3720,8 @@ void abort_locked_tables(THD *thd,const char *db, const char *table_name)
share->table_map_id is given a value that with a high certainty is
not used by any other table (the only case where a table id can be
reused is on wrap-around, which means more than 4 billion table
- shares open at the same time).
+ share opens have been executed while one table was open all the
+ time).
share->table_map_id is not ~0UL.
*/
@@ -3459,6 +3960,340 @@ err:
}
+/**
+ @brief Add list of MERGE children to a TABLE_LIST list.
+
+ @param[in] tlist the parent TABLE_LIST object just opened
+
+ @return status
+ @retval 0 OK
+ @retval != 0 Error
+
+ @detail
+ When a MERGE parent table has just been opened, insert the
+ TABLE_LIST chain from the MERGE handle into the table list used for
+ opening tables for this statement. This lets the children be opened
+ too.
+*/
+
+static int add_merge_table_list(TABLE_LIST *tlist)
+{
+ TABLE *parent= tlist->table;
+ TABLE_LIST *child_l;
+ DBUG_ENTER("add_merge_table_list");
+ DBUG_PRINT("myrg", ("table: '%s'.'%s' 0x%lx", parent->s->db.str,
+ parent->s->table_name.str, (long) parent));
+
+ /* Must not call this with attached children. */
+ DBUG_ASSERT(!parent->children_attached);
+ /* Must not call this with children list in place. */
+ DBUG_ASSERT(tlist->next_global != parent->child_l);
+ /* Prevent inclusion of another MERGE table. Could make infinite recursion. */
+ if (tlist->parent_l)
+ {
+ my_error(ER_ADMIN_WRONG_MRG_TABLE, MYF(0), tlist->alias);
+ DBUG_RETURN(1);
+ }
+
+ /* Fix children.*/
+ for (child_l= parent->child_l; ; child_l= child_l->next_global)
+ {
+ /*
+ Note: child_l->table may still be set if this parent was taken
+ from the unused_tables chain. Ignore this fact here. The
+ reference will be replaced by the handler in
+ ::extra(HA_EXTRA_ATTACH_CHILDREN).
+ */
+
+ /* Set lock type. */
+ child_l->lock_type= tlist->lock_type;
+
+ /* Set parent reference. */
+ child_l->parent_l= tlist;
+
+ /* Break when this was the last child. */
+ if (&child_l->next_global == parent->child_last_l)
+ break;
+ }
+
+ /* Insert children into the table list. */
+ *parent->child_last_l= tlist->next_global;
+ tlist->next_global= parent->child_l;
+
+ /*
+ Do not fix the prev_global pointers. We will remove the
+ chain soon anyway.
+ */
+
+ DBUG_RETURN(0);
+}
+
+
+/**
+ @brief Attach MERGE children to the parent.
+
+ @param[in] tlist the child TABLE_LIST object just opened
+
+ @return status
+ @retval 0 OK
+ @retval != 0 Error
+
+ @note
+ This is called when the last MERGE child has just been opened, let
+ the handler attach the MyISAM tables to the MERGE table. Remove
+ MERGE TABLE_LIST chain from the statement list so that it cannot be
+ changed or freed.
+*/
+
+static int attach_merge_children(TABLE_LIST *tlist)
+{
+ TABLE *parent= tlist->parent_l->table;
+ int error;
+ DBUG_ENTER("attach_merge_children");
+ DBUG_PRINT("myrg", ("table: '%s'.'%s' 0x%lx", parent->s->db.str,
+ parent->s->table_name.str, (long) parent));
+
+ /* Must not call this with attached children. */
+ DBUG_ASSERT(!parent->children_attached);
+ /* Must call this with children list in place. */
+ DBUG_ASSERT(tlist->parent_l->next_global == parent->child_l);
+
+ /* Attach MyISAM tables to MERGE table. */
+ error= parent->file->extra(HA_EXTRA_ATTACH_CHILDREN);
+
+ /*
+ Remove children from the table list. Even in case of an error.
+ This should prevent tampering with them.
+ */
+ tlist->parent_l->next_global= *parent->child_last_l;
+
+ /*
+ Do not fix the last childs next_global pointer. It is needed for
+ stepping to the next table in the enclosing loop in open_tables().
+ Do not fix prev_global pointers. We did not set them.
+ */
+
+ if (error)
+ {
+ DBUG_PRINT("error", ("attaching MERGE children failed: %d", my_errno));
+ parent->file->print_error(error, MYF(0));
+ DBUG_RETURN(1);
+ }
+
+ parent->children_attached= TRUE;
+ DBUG_PRINT("myrg", ("attached parent: '%s'.'%s' 0x%lx", parent->s->db.str,
+ parent->s->table_name.str, (long) parent));
+
+ /*
+ Note that we have the cildren in the thd->open_tables list at this
+ point.
+ */
+
+ DBUG_RETURN(0);
+}
+
+
+/**
+ @brief Detach MERGE children from the parent.
+
+ @note
+ Call this before the first table of a MERGE table (parent or child)
+ is closed.
+
+ When closing thread tables at end of statement, both parent and
+ children are in thd->open_tables and will be closed. In most cases
+ the children will be closed before the parent. They are opened after
+ the parent and thus stacked into thd->open_tables before it.
+
+ To avoid that we touch a closed children in any way, we must detach
+ the children from the parent when the first belonging table is
+ closed (parent or child).
+
+ All references to the children should be removed on handler level
+ and optionally on table level.
+
+ @note
+ Assure that you call it for a MERGE parent or child only.
+ Either table->child_l or table->parent must be set.
+
+ @param[in] table the TABLE object of the parent
+ @param[in] clear_refs if to clear TABLE references
+ this must be true when called from
+ close_thread_tables() to enable fresh
+ open in open_tables()
+ it must be false when called in preparation
+ for reopen_tables()
+*/
+
+void detach_merge_children(TABLE *table, bool clear_refs)
+{
+ TABLE_LIST *child_l;
+ TABLE *parent= table->child_l ? table : table->parent;
+ bool first_detach;
+ DBUG_ENTER("detach_merge_children");
+ /*
+ Either table->child_l or table->parent must be set. Parent must have
+ child_l set.
+ */
+ DBUG_ASSERT(parent && parent->child_l);
+ DBUG_PRINT("myrg", ("table: '%s'.'%s' 0x%lx clear_refs: %d",
+ table->s->db.str, table->s->table_name.str,
+ (long) table, clear_refs));
+ DBUG_PRINT("myrg", ("parent: '%s'.'%s' 0x%lx", parent->s->db.str,
+ parent->s->table_name.str, (long) parent));
+
+ /*
+ In a open_tables() loop it can happen that not all tables have their
+ children attached yet. Also this is called for every child and the
+ parent from close_thread_tables().
+ */
+ if ((first_detach= parent->children_attached))
+ {
+ VOID(parent->file->extra(HA_EXTRA_DETACH_CHILDREN));
+ parent->children_attached= FALSE;
+ DBUG_PRINT("myrg", ("detached parent: '%s'.'%s' 0x%lx", parent->s->db.str,
+ parent->s->table_name.str, (long) parent));
+ }
+ else
+ DBUG_PRINT("myrg", ("parent is already detached"));
+
+ if (clear_refs)
+ {
+ /* In any case clear the own parent reference. (***) */
+ table->parent= NULL;
+
+ /*
+ On the first detach, clear all references. If this table is the
+ parent, we still may need to clear the child references. The first
+ detach might not have done this.
+ */
+ if (first_detach || (table == parent))
+ {
+ /* Clear TABLE references to force new assignment at next open. */
+ for (child_l= parent->child_l; ; child_l= child_l->next_global)
+ {
+ /*
+ Do not DBUG_ASSERT(child_l->table); open_tables might be
+ incomplete.
+
+ Clear the parent reference of the children only on the first
+ detach. The children might already be closed. They will clear
+ it themseves when this function is called for them with
+ 'clear_refs' true. See above "(***)".
+ */
+ if (first_detach && child_l->table)
+ child_l->table->parent= NULL;
+
+ /* Clear the table reference to force new assignment at next open. */
+ child_l->table= NULL;
+
+ /* Break when this was the last child. */
+ if (&child_l->next_global == parent->child_last_l)
+ break;
+ }
+ }
+ }
+
+ DBUG_VOID_RETURN;
+}
+
+
+/**
+ @brief Fix MERGE children after open.
+
+ @param[in] old_child_list first list member from original table
+ @param[in] old_last pointer to &next_global of last list member
+ @param[in] new_child_list first list member from freshly opened table
+ @param[in] new_last pointer to &next_global of last list member
+
+ @return mismatch
+ @retval FALSE OK, no mismatch
+ @retval TRUE Error, lists mismatch
+
+ @detail
+ Main action is to copy TABLE reference for each member of original
+ child list to new child list. After a fresh open these references
+ are NULL. Assign the old children to the new table. Some of them
+ might also be reopened or will be reopened soon.
+
+ Other action is to verify that the table definition with respect to
+ the UNION list did not change.
+
+ @note
+ This function terminates the child list if the respective '*_last'
+ pointer is non-NULL. Do not call it from a place where the list is
+ embedded in another list and this would break it.
+
+ Terminating the list is required for example in the first
+ reopen_table() after open_tables(). open_tables() requires the end
+ of the list not to be terminated because other tables could follow
+ behind the child list.
+
+ If a '*_last' pointer is NULL, the respective list is assumed to be
+ NULL terminated.
+*/
+
+bool fix_merge_after_open(TABLE_LIST *old_child_list, TABLE_LIST **old_last,
+ TABLE_LIST *new_child_list, TABLE_LIST **new_last)
+{
+ bool mismatch= FALSE;
+ DBUG_ENTER("fix_merge_after_open");
+ DBUG_PRINT("myrg", ("old last addr: 0x%lx new last addr: 0x%lx",
+ (long) old_last, (long) new_last));
+
+ /* Terminate the lists for easier check of list end. */
+ if (old_last)
+ *old_last= NULL;
+ if (new_last)
+ *new_last= NULL;
+
+ for (;;)
+ {
+ DBUG_PRINT("myrg", ("old list item: 0x%lx new list item: 0x%lx",
+ (long) old_child_list, (long) new_child_list));
+ /* Break if one of the list is at its end. */
+ if (!old_child_list || !new_child_list)
+ break;
+ /* Old table has references to child TABLEs. */
+ DBUG_ASSERT(old_child_list->table);
+ /* New table does not yet have references to child TABLEs. */
+ DBUG_ASSERT(!new_child_list->table);
+ DBUG_PRINT("myrg", ("old table: '%s'.'%s' new table: '%s'.'%s'",
+ old_child_list->db, old_child_list->table_name,
+ new_child_list->db, new_child_list->table_name));
+ /* Child db.table names must match. */
+ if (strcmp(old_child_list->table_name, new_child_list->table_name) ||
+ strcmp(old_child_list->db, new_child_list->db))
+ break;
+ /*
+ Copy TABLE reference. Child TABLE objects are still in place
+ though not necessarily open yet.
+ */
+ DBUG_PRINT("myrg", ("old table ref: 0x%lx replaces new table ref: 0x%lx",
+ (long) old_child_list->table,
+ (long) new_child_list->table));
+ new_child_list->table= old_child_list->table;
+ /* Step both lists. */
+ old_child_list= old_child_list->next_global;
+ new_child_list= new_child_list->next_global;
+ }
+ DBUG_PRINT("myrg", ("end of list, mismatch: %d", mismatch));
+ /*
+ If the list pointers are not both NULL after the loop, then the
+ lists differ. If the are both identical, but not NULL, then they
+ have at least one table in common and hence the rest of the list
+ would be identical too. But in this case the loop woul run until the
+ list end, where both pointers would become NULL.
+ */
+ if (old_child_list != new_child_list)
+ mismatch= TRUE;
+ if (mismatch)
+ my_error(ER_TABLE_DEF_CHANGED, MYF(0));
+
+ DBUG_RETURN(mismatch);
+}
+
+
/*
Open all tables in list
@@ -3489,7 +4324,7 @@ err:
int open_tables(THD *thd, TABLE_LIST **start, uint *counter, uint flags)
{
- TABLE_LIST *tables;
+ TABLE_LIST *tables= NULL;
bool refresh;
int result=0;
MEM_ROOT new_frm_mem;
@@ -3502,7 +4337,7 @@ int open_tables(THD *thd, TABLE_LIST **start, uint *counter, uint flags)
temporary mem_root for new .frm parsing.
TODO: variables for size
*/
- init_alloc_root(&new_frm_mem, 8024, 8024);
+ init_sql_alloc(&new_frm_mem, 8024, 8024);
thd->current_tablenr= 0;
restart:
@@ -3549,6 +4384,9 @@ int open_tables(THD *thd, TABLE_LIST **start, uint *counter, uint flags)
*/
for (tables= *start; tables ;tables= tables->next_global)
{
+ DBUG_PRINT("tcache", ("opening table: '%s'.'%s' item: 0x%lx",
+ tables->db, tables->table_name, (long) tables));
+
safe_to_ignore_table= FALSE;
/*
@@ -3600,6 +4438,10 @@ int open_tables(THD *thd, TABLE_LIST **start, uint *counter, uint flags)
else
tables->table= open_table(thd, tables, &new_frm_mem, &refresh, flags);
}
+ else
+ DBUG_PRINT("tcache", ("referenced table: '%s'.'%s' 0x%lx",
+ tables->db, tables->table_name,
+ (long) tables->table));
if (!tables->table)
{
@@ -3631,6 +4473,19 @@ int open_tables(THD *thd, TABLE_LIST **start, uint *counter, uint flags)
goto process_view_routines;
}
+ /*
+ If in a MERGE table open, we need to remove the children list
+ from statement table list before restarting. Otherwise the list
+ will be inserted another time.
+ */
+ if (tables->parent_l)
+ {
+ TABLE_LIST *parent_l= tables->parent_l;
+ /* The parent table should be correctly open at this point. */
+ DBUG_ASSERT(parent_l->table);
+ parent_l->next_global= *parent_l->table->child_last_l;
+ }
+
if (refresh) // Refresh in progress
{
/*
@@ -3699,6 +4554,24 @@ int open_tables(THD *thd, TABLE_LIST **start, uint *counter, uint flags)
thd->update_lock_default : tables->lock_type;
tables->table->grant= tables->grant;
+ /* Attach MERGE children if not locked already. */
+ DBUG_PRINT("tcache", ("is parent: %d is child: %d",
+ test(tables->table->child_l),
+ test(tables->parent_l)));
+ DBUG_PRINT("tcache", ("in lock tables: %d in prelock mode: %d",
+ test(thd->locked_tables), test(thd->prelocked_mode)));
+ if (((!thd->locked_tables && !thd->prelocked_mode) ||
+ tables->table->s->tmp_table) &&
+ ((tables->table->child_l &&
+ add_merge_table_list(tables)) ||
+ (tables->parent_l &&
+ (&tables->next_global == tables->parent_l->table->child_last_l) &&
+ attach_merge_children(tables))))
+ {
+ result= -1;
+ goto err;
+ }
+
process_view_routines:
/*
Again we may need cache all routines used by this view and add
@@ -3731,6 +4604,18 @@ process_view_routines:
if (query_tables_last_own)
thd->lex->mark_as_requiring_prelocking(query_tables_last_own);
+ if (result && tables)
+ {
+ /*
+ Some functions determine success as (tables->table != NULL).
+ tables->table is in thd->open_tables. It won't go lost. If the
+ error happens on a MERGE child, clear the parents TABLE reference.
+ */
+ if (tables->parent_l)
+ tables->parent_l->table= NULL;
+ tables->table= NULL;
+ }
+ DBUG_PRINT("tcache", ("returning: %d", result));
DBUG_RETURN(result);
}
@@ -3770,6 +4655,63 @@ static bool check_lock_and_start_stmt(THD *thd, TABLE *table,
}
+/**
+ @brief Open and lock one table
+
+ @param[in] thd thread handle
+ @param[in] table_l table to open is first table in this list
+ @param[in] lock_type lock to use for table
+
+ @return table
+ @retval != NULL OK, opened table returned
+ @retval NULL Error
+
+ @note
+ If ok, the following are also set:
+ table_list->lock_type lock_type
+ table_list->table table
+
+ @note
+ If table_l is a list, not a single table, the list is temporarily
+ broken.
+
+ @detail
+ This function is meant as a replacement for open_ltable() when
+ MERGE tables can be opened. open_ltable() cannot open MERGE tables.
+
+ There may be more differences between open_n_lock_single_table() and
+ open_ltable(). One known difference is that open_ltable() does
+ neither call decide_logging_format() nor handle some other logging
+ and locking issues because it does not call lock_tables().
+*/
+
+TABLE *open_n_lock_single_table(THD *thd, TABLE_LIST *table_l,
+ thr_lock_type lock_type)
+{
+ TABLE_LIST *save_next_global;
+ DBUG_ENTER("open_n_lock_single_table");
+
+ /* Remember old 'next' pointer. */
+ save_next_global= table_l->next_global;
+ /* Break list. */
+ table_l->next_global= NULL;
+
+ /* Set requested lock type. */
+ table_l->lock_type= lock_type;
+ /* Allow to open real tables only. */
+ table_l->required_type= FRMTYPE_TABLE;
+
+ /* Open the table. */
+ if (simple_open_n_lock_tables(thd, table_l))
+ table_l->table= NULL; /* Just to be sure. */
+
+ /* Restore list. */
+ table_l->next_global= save_next_global;
+
+ DBUG_RETURN(table_l->table);
+}
+
+
/*
Open and lock one table
@@ -3811,6 +4753,17 @@ TABLE *open_ltable(THD *thd, TABLE_LIST *table_list, thr_lock_type lock_type,
if (table)
{
+ if (table->child_l)
+ {
+ /* A MERGE table must not come here. */
+ /* purecov: begin tested */
+ my_error(ER_WRONG_OBJECT, MYF(0), table->s->db.str,
+ table->s->table_name.str, "BASE TABLE");
+ table= 0;
+ goto end;
+ /* purecov: end */
+ }
+
table_list->lock_type= lock_type;
table_list->table= table;
table->grant= table_list->grant;
@@ -3828,56 +4781,21 @@ TABLE *open_ltable(THD *thd, TABLE_LIST *table_list, thr_lock_type lock_type,
table= 0;
}
}
+
+ end:
thd->proc_info=0;
DBUG_RETURN(table);
}
/*
- Open all tables in list and locks them for read without derived
- tables processing.
+ Open all tables in list, locks them and optionally process derived tables.
SYNOPSIS
- simple_open_n_lock_tables()
- thd - thread handler
- tables - list of tables for open&locking
-
- RETURN
- 0 - ok
- -1 - error
-
- NOTE
- The lock will automaticaly be freed by close_thread_tables()
-*/
-
-int simple_open_n_lock_tables(THD *thd, TABLE_LIST *tables)
-{
- uint counter;
- bool need_reopen;
- DBUG_ENTER("simple_open_n_lock_tables");
-
- for ( ; ; )
- {
- if (open_tables(thd, &tables, &counter, 0))
- DBUG_RETURN(-1);
- if (!lock_tables(thd, tables, counter, &need_reopen))
- break;
- if (!need_reopen)
- DBUG_RETURN(-1);
- close_tables_for_reopen(thd, &tables);
- }
- DBUG_RETURN(0);
-}
-
-
-/*
- Open all tables in list, locks them and process derived tables
- tables processing.
-
- SYNOPSIS
- open_and_lock_tables()
+ open_and_lock_tables_derived()
thd - thread handler
tables - list of tables for open&locking
+ derived - if to handle derived tables
RETURN
FALSE - ok
@@ -3885,27 +4803,43 @@ int simple_open_n_lock_tables(THD *thd, TABLE_LIST *tables)
NOTE
The lock will automaticaly be freed by close_thread_tables()
+
+ NOTE
+ There are two convenience functions:
+ - simple_open_n_lock_tables(thd, tables) without derived handling
+ - open_and_lock_tables(thd, tables) with derived handling
+ Both inline functions call open_and_lock_tables_derived() with
+ the third argument set appropriately.
*/
-bool open_and_lock_tables(THD *thd, TABLE_LIST *tables)
+bool open_and_lock_tables_derived(THD *thd, TABLE_LIST *tables, bool derived)
{
uint counter;
bool need_reopen;
- DBUG_ENTER("open_and_lock_tables");
+ DBUG_ENTER("open_and_lock_tables_derived");
+ DBUG_PRINT("enter", ("derived handling: %d", derived));
for ( ; ; )
{
if (open_tables(thd, &tables, &counter, 0))
DBUG_RETURN(-1);
+
+ DBUG_EXECUTE_IF("sleep_open_and_lock_after_open", {
+ const char *old_proc_info= thd->proc_info;
+ thd->proc_info= "DBUG sleep";
+ my_sleep(6000000);
+ thd->proc_info= old_proc_info;});
+
if (!lock_tables(thd, tables, counter, &need_reopen))
break;
if (!need_reopen)
DBUG_RETURN(-1);
close_tables_for_reopen(thd, &tables);
}
- if (mysql_handle_derived(thd->lex, &mysql_derived_prepare) ||
- (thd->fill_derived_tables() &&
- mysql_handle_derived(thd->lex, &mysql_derived_filling)))
+ if (derived &&
+ (mysql_handle_derived(thd->lex, &mysql_derived_prepare) ||
+ (thd->fill_derived_tables() &&
+ mysql_handle_derived(thd->lex, &mysql_derived_filling))))
DBUG_RETURN(TRUE); /* purecov: inspected */
DBUG_RETURN(0);
}
@@ -4219,7 +5153,17 @@ int lock_tables(THD *thd, TABLE_LIST *tables, uint count, bool *need_reopen)
thd->lock= 0;
thd->in_lock_tables=0;
- for (table= tables; table != first_not_own; table= table->next_global)
+ /*
+ When open_and_lock_tables() is called for a single table out of
+ a table list, the 'next_global' chain is temporarily broken. We
+ may not find 'first_not_own' before the end of the "list".
+ Look for example at those places where open_n_lock_single_table()
+ is called. That function implements the temporary breaking of
+ a table list for opening a single table.
+ */
+ for (table= tables;
+ table && table != first_not_own;
+ table= table->next_global)
{
if (!table->placeholder())
{
@@ -4246,7 +5190,17 @@ int lock_tables(THD *thd, TABLE_LIST *tables, uint count, bool *need_reopen)
else
{
TABLE_LIST *first_not_own= thd->lex->first_not_own_table();
- for (table= tables; table != first_not_own; table= table->next_global)
+ /*
+ When open_and_lock_tables() is called for a single table out of
+ a table list, the 'next_global' chain is temporarily broken. We
+ may not find 'first_not_own' before the end of the "list".
+ Look for example at those places where open_n_lock_single_table()
+ is called. That function implements the temporary breaking of
+ a table list for opening a single table.
+ */
+ for (table= tables;
+ table && table != first_not_own;
+ table= table->next_global)
{
if (!table->placeholder() &&
check_lock_and_start_stmt(thd, table->table, table->lock_type))
@@ -4295,7 +5249,6 @@ void close_tables_for_reopen(THD *thd, TABLE_LIST **tables)
sp_remove_not_own_routines(thd->lex);
for (TABLE_LIST *tmp= *tables; tmp; tmp= tmp->next_global)
tmp->table= 0;
- mark_used_tables_as_free_for_reuse(thd, thd->temporary_tables);
close_thread_tables(thd);
}
@@ -4350,7 +5303,7 @@ TABLE *open_temporary_table(THD *thd, const char *path, const char *db,
saved_cache_key= strmov(tmp_path, path)+1;
memcpy(saved_cache_key, cache_key, key_length);
- init_tmp_table_share(share, saved_cache_key, key_length,
+ init_tmp_table_share(thd, share, saved_cache_key, key_length,
strend(saved_cache_key)+1, tmp_path);
if (open_table_def(thd, share, 0) ||
@@ -4383,6 +5336,8 @@ TABLE *open_temporary_table(THD *thd, const char *path, const char *db,
slave_open_temp_tables++;
}
tmp_table->pos_in_table_list= 0;
+ DBUG_PRINT("tmptable", ("opened table: '%s'.'%s' 0x%lx", tmp_table->s->db.str,
+ tmp_table->s->table_name.str, (long) tmp_table));
DBUG_RETURN(tmp_table);
}
@@ -5112,7 +6067,9 @@ find_field_in_tables(THD *thd, Item_ident *item,
{
Field *cur_field= find_field_in_table_ref(thd, cur_table, name, length,
item->name, db, table_name, ref,
- check_privileges,
+ (thd->lex->sql_command ==
+ SQLCOM_SHOW_FIELDS)
+ ? false : check_privileges,
allow_rowid,
&(item->cached_field_index),
register_tree_change,
@@ -5306,7 +6263,8 @@ find_item_in_list(Item *find, List<Item> &items, uint *counter,
if (item_field->field_name && item_field->table_name &&
!my_strcasecmp(system_charset_info, item_field->field_name,
field_name) &&
- !strcmp(item_field->table_name, table_name) &&
+ !my_strcasecmp(table_alias_charset, item_field->table_name,
+ table_name) &&
(!db_name || (item_field->db_name &&
!strcmp(item_field->db_name, db_name))))
{
@@ -6250,7 +7208,7 @@ bool setup_fields(THD *thd, Item **ref_pointer_array,
thd->lex->allow_sum_func= save_allow_sum_func;
thd->mark_used_columns= save_mark_used_columns;
DBUG_PRINT("info", ("thd->mark_used_columns: %d", thd->mark_used_columns));
- DBUG_RETURN(test(thd->net.report_error));
+ DBUG_RETURN(test(thd->is_error()));
}
@@ -6553,10 +7511,7 @@ insert_fields(THD *thd, Name_resolution_context *context, const char *db_name,
!any_privileges)
{
field_iterator.set(tables);
- if (check_grant_all_columns(thd, SELECT_ACL, field_iterator.grant(),
- field_iterator.db_name(),
- field_iterator.table_name(),
- &field_iterator))
+ if (check_grant_all_columns(thd, SELECT_ACL, &field_iterator))
DBUG_RETURN(TRUE);
}
#endif
@@ -6797,7 +7752,7 @@ int setup_conds(THD *thd, TABLE_LIST *tables, TABLE_LIST *leaves,
select_lex->conds_processed_with_permanent_arena= 1;
}
thd->lex->current_select->is_item_list_lookup= save_is_item_list_lookup;
- DBUG_RETURN(test(thd->net.report_error));
+ DBUG_RETURN(test(thd->is_error()));
err_no_arena:
select_lex->is_item_list_lookup= save_is_item_list_lookup;
@@ -6879,7 +7834,7 @@ fill_record(THD * thd, List<Item> &fields, List<Item> &values,
goto err;
}
}
- DBUG_RETURN(thd->net.report_error);
+ DBUG_RETURN(thd->is_error());
err:
if (table)
table->auto_increment_field_not_null= FALSE;
@@ -6964,7 +7919,7 @@ fill_record(THD *thd, Field **ptr, List<Item> &values, bool ignore_errors)
table= (*ptr)->table;
table->auto_increment_field_not_null= FALSE;
}
- while ((field = *ptr++) && !thd->net.report_error)
+ while ((field = *ptr++) && ! thd->is_error())
{
value=v++;
table= field->table;
@@ -6973,7 +7928,7 @@ fill_record(THD *thd, Field **ptr, List<Item> &values, bool ignore_errors)
if (value->save_in_field(field, 0) < 0)
goto err;
}
- DBUG_RETURN(thd->net.report_error);
+ DBUG_RETURN(thd->is_error());
err:
if (table)
@@ -7064,7 +8019,7 @@ my_bool mysql_rm_tmp_tables(void)
/* We should cut file extention before deleting of table */
memcpy(filePathCopy, filePath, filePath_len - ext_len);
filePathCopy[filePath_len - ext_len]= 0;
- init_tmp_table_share(&share, "", 0, "", filePathCopy);
+ init_tmp_table_share(thd, &share, "", 0, "", filePathCopy);
if (!open_table_def(thd, &share, 0) &&
((handler_file= get_new_handler(&share, thd->mem_root,
share.db_type()))))
@@ -7166,7 +8121,7 @@ bool remove_table_from_cache(THD *thd, const char *db, const char *table_name,
TABLE_SHARE *share;
bool result= 0, signalled= 0;
DBUG_ENTER("remove_table_from_cache");
- DBUG_PRINT("enter", ("Table: '%s.%s' flags: %u", db, table_name, flags));
+ DBUG_PRINT("enter", ("table: '%s'.'%s' flags: %u", db, table_name, flags));
key_length=(uint) (strmov(strmov(key,db)+1,table_name)-key)+1;
for (;;)
@@ -7181,6 +8136,8 @@ bool remove_table_from_cache(THD *thd, const char *db, const char *table_name,
&state))
{
THD *in_use;
+ DBUG_PRINT("tcache", ("found table: '%s'.'%s' 0x%lx", table->s->db.str,
+ table->s->table_name.str, (long) table));
table->s->version=0L; /* Free when thread is ready */
if (!(in_use=table->in_use))
@@ -7219,13 +8176,19 @@ bool remove_table_from_cache(THD *thd, const char *db, const char *table_name,
}
/*
Now we must abort all tables locks used by this thread
- as the thread may be waiting to get a lock for another table
+ as the thread may be waiting to get a lock for another table.
+ Note that we need to hold LOCK_open while going through the
+ list. So that the other thread cannot change it. The other
+ thread must also hold LOCK_open whenever changing the
+ open_tables list. Aborting the MERGE lock after a child was
+ closed and before the parent is closed would be fatal.
*/
for (TABLE *thd_table= in_use->open_tables;
thd_table ;
thd_table= thd_table->next)
{
- if (thd_table->db_stat) // If table is open
+ /* Do not handle locks of MERGE children. */
+ if (thd_table->db_stat && !thd_table->parent) // If table is open
signalled|= mysql_lock_abort_for_thread(thd, thd_table);
}
}
@@ -7383,7 +8346,7 @@ open_new_frm(THD *thd, TABLE_SHARE *share, const char *alias,
else
{
/* only VIEWs are supported now */
- my_error(ER_FRM_UNKNOWN_TYPE, MYF(0), share->path, parser->type()->str);
+ my_error(ER_FRM_UNKNOWN_TYPE, MYF(0), share->path.str, parser->type()->str);
goto err;
}
DBUG_RETURN(0);
@@ -7428,7 +8391,9 @@ int abort_and_upgrade_lock(ALTER_PARTITION_PARAM_TYPE *lpt)
lpt->old_lock_type= lpt->table->reginfo.lock_type;
VOID(pthread_mutex_lock(&LOCK_open));
- mysql_lock_abort(lpt->thd, lpt->table, TRUE);
+ /* If MERGE child, forward lock handling to parent. */
+ mysql_lock_abort(lpt->thd, lpt->table->parent ? lpt->table->parent :
+ lpt->table, TRUE);
VOID(remove_table_from_cache(lpt->thd, lpt->db, lpt->table_name, flags));
VOID(pthread_mutex_unlock(&LOCK_open));
DBUG_RETURN(0);
@@ -7449,14 +8414,18 @@ int abort_and_upgrade_lock(ALTER_PARTITION_PARAM_TYPE *lpt)
We also downgrade locks after the upgrade to WRITE_ONLY
*/
+/* purecov: begin deadcode */
void close_open_tables_and_downgrade(ALTER_PARTITION_PARAM_TYPE *lpt)
{
VOID(pthread_mutex_lock(&LOCK_open));
remove_table_from_cache(lpt->thd, lpt->db, lpt->table_name,
RTFC_WAIT_OTHER_THREAD_FLAG);
VOID(pthread_mutex_unlock(&LOCK_open));
- mysql_lock_downgrade_write(lpt->thd, lpt->table, lpt->old_lock_type);
+ /* If MERGE child, forward lock handling to parent. */
+ mysql_lock_downgrade_write(lpt->thd, lpt->table->parent ? lpt->table->parent :
+ lpt->table, lpt->old_lock_type);
}
+/* purecov: end */
/*
@@ -7522,13 +8491,19 @@ void mysql_wait_completed_table(ALTER_PARTITION_PARAM_TYPE *lpt, TABLE *my_table
}
/*
Now we must abort all tables locks used by this thread
- as the thread may be waiting to get a lock for another table
+ as the thread may be waiting to get a lock for another table.
+ Note that we need to hold LOCK_open while going through the
+ list. So that the other thread cannot change it. The other
+ thread must also hold LOCK_open whenever changing the
+ open_tables list. Aborting the MERGE lock after a child was
+ closed and before the parent is closed would be fatal.
*/
for (TABLE *thd_table= in_use->open_tables;
thd_table ;
thd_table= thd_table->next)
{
- if (thd_table->db_stat) // If table is open
+ /* Do not handle locks of MERGE children. */
+ if (thd_table->db_stat && !thd_table->parent) // If table is open
mysql_lock_abort_for_thread(lpt->thd, thd_table);
}
}
@@ -7538,8 +8513,10 @@ void mysql_wait_completed_table(ALTER_PARTITION_PARAM_TYPE *lpt, TABLE *my_table
those in use for removal after completion. Now we also need to abort
all that are locked and are not progressing due to being locked
by our lock. We don't upgrade our lock here.
+ If MERGE child, forward lock handling to parent.
*/
- mysql_lock_abort(lpt->thd, my_table, FALSE);
+ mysql_lock_abort(lpt->thd, my_table->parent ? my_table->parent : my_table,
+ FALSE);
VOID(pthread_mutex_unlock(&LOCK_open));
DBUG_VOID_RETURN;
}
@@ -7748,7 +8725,17 @@ open_performance_schema_table(THD *thd, TABLE_LIST *one_table,
table->timestamp_field_type= TIMESTAMP_NO_AUTO_SET;
}
else
+ {
+ /*
+ If error in mysql_lock_tables(), open_ltable doesn't close the
+ table. Thread kill during mysql_lock_tables() is such error. But
+ open tables cannot be accepted when restoring the open tables
+ state.
+ */
+ if (thd->killed)
+ close_thread_tables(thd);
thd->restore_backup_open_tables_state(backup);
+ }
thd->utime_after_lock= save_utime_after_lock;
DBUG_RETURN(table);
@@ -7788,6 +8775,13 @@ void close_performance_schema_table(THD *thd, Open_tables_state *backup)
pthread_mutex_lock(&LOCK_open);
found_old_table= false;
+ /*
+ Note that we need to hold LOCK_open while changing the
+ open_tables list. Another thread may work on it.
+ (See: remove_table_from_cache(), mysql_wait_completed_table())
+ Closing a MERGE child before the parent would be fatal if the
+ other thread tries to abort the MERGE lock in between.
+ */
while (thd->open_tables)
found_old_table|= close_thread_table(thd, &thd->open_tables);
diff --git a/sql/sql_binlog.cc b/sql/sql_binlog.cc
index a3a804db8f0..fa6aa8f5881 100644
--- a/sql/sql_binlog.cc
+++ b/sql/sql_binlog.cc
@@ -37,6 +37,9 @@ void mysql_client_binlog_statement(THD* thd)
thd->lex->comment.length : 2048),
thd->lex->comment.str));
+ if (check_global_access(thd, SUPER_ACL))
+ DBUG_VOID_RETURN;
+
/*
Temporarily turn off send_ok, since different events handle this
differently
diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc
index ada927fa467..56b048a4f9d 100644
--- a/sql/sql_cache.cc
+++ b/sql/sql_cache.cc
@@ -3240,7 +3240,7 @@ Query_cache::process_and_count_tables(THD *thd, TABLE_LIST *tables_used,
for (; tables_used; tables_used= tables_used->next_global)
{
table_count++;
-#ifdef HAVE_QUERY_CACHE
+#ifndef NO_EMBEDDED_ACCESS_CHECKS
/*
Disable any attempt to store this statement if there are
column level grants on any referenced tables.
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index df134f82217..d3458126eee 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -395,7 +395,7 @@ THD::THD()
count_cuted_fields= CHECK_FIELD_IGNORE;
killed= NOT_KILLED;
col_access=0;
- query_error= thread_specific_used= FALSE;
+ is_slave_error= thread_specific_used= FALSE;
hash_clear(&handler_tables_hash);
tmp_table=0;
used_tables=0;
@@ -499,12 +499,12 @@ void THD::push_internal_handler(Internal_error_handler *handler)
}
-bool THD::handle_error(uint sql_errno,
+bool THD::handle_error(uint sql_errno, const char *message,
MYSQL_ERROR::enum_warning_level level)
{
if (m_internal_handler)
{
- return m_internal_handler->handle_error(sql_errno, level, this);
+ return m_internal_handler->handle_error(sql_errno, message, level, this);
}
return FALSE; // 'FALSE', as per coding style
@@ -586,6 +586,12 @@ void THD::init(void)
if (variables.sql_mode & MODE_NO_BACKSLASH_ESCAPES)
server_status|= SERVER_STATUS_NO_BACKSLASH_ESCAPES;
options= thd_startup_options;
+
+ if (variables.max_join_size == HA_POS_ERROR)
+ options |= OPTION_BIG_SELECTS;
+ else
+ options &= ~OPTION_BIG_SELECTS;
+
transaction.all.modified_non_trans_table= transaction.stmt.modified_non_trans_table= FALSE;
open_options=ha_open_options;
update_lock_default= (variables.low_priority_updates ?
@@ -673,9 +679,7 @@ void THD::cleanup(void)
lock=locked_tables; locked_tables=0;
close_thread_tables(this);
}
- mysql_ha_flush(this, (TABLE_LIST*) 0,
- MYSQL_HA_CLOSE_FINAL | MYSQL_HA_FLUSH_ALL, FALSE);
- hash_free(&handler_tables_hash);
+ mysql_ha_cleanup(this);
delete_dynamic(&user_var_events);
hash_free(&user_vars);
close_temporary_tables(this);
@@ -693,6 +697,7 @@ void THD::cleanup(void)
pthread_mutex_lock(&LOCK_user_locks);
item_user_lock_release(ull);
pthread_mutex_unlock(&LOCK_user_locks);
+ ull= NULL;
}
cleanup_done=1;
@@ -812,7 +817,20 @@ void THD::awake(THD::killed_state state_to_set)
if (!slave_thread)
thread_scheduler.post_kill_notification(this);
#ifdef SIGNAL_WITH_VIO_CLOSE
- close_active_vio();
+ if (this != current_thd)
+ {
+ /*
+ In addition to a signal, let's close the socket of the thread that
+ is being killed. This is to make sure it does not block if the
+ signal is lost. This needs to be done only on platforms where
+ signals are not a reliable interruption mechanism.
+
+ If we're killing ourselves, we know that we're not blocked, so this
+ hack is not used.
+ */
+
+ close_active_vio();
+ }
#endif
}
if (mysys_var)
@@ -1299,23 +1317,26 @@ bool select_send::send_fields(List<Item> &list, uint flags)
{
bool res;
if (!(res= thd->protocol->send_fields(&list, flags)))
- status= 1;
+ is_result_set_started= 1;
return res;
}
void select_send::abort()
{
DBUG_ENTER("select_send::abort");
- if (status && thd->spcont &&
+ if (is_result_set_started && thd->spcont &&
thd->spcont->find_handler(thd, thd->net.last_errno,
MYSQL_ERROR::WARN_LEVEL_ERROR))
{
/*
- Executing stored procedure without a handler.
- Here we should actually send an error to the client,
- but as an error will break a multiple result set, the only thing we
- can do for now is to nicely end the current data set and remembering
- the error so that the calling routine will abort
+ We're executing a stored procedure, have an open result
+ set, an SQL exception conditiona and a handler for it.
+ In this situation we must abort the current statement,
+ silence the error and start executing the continue/exit
+ handler.
+ Before aborting the statement, let's end the open result set, as
+ otherwise the client will hang due to the violation of the
+ client/server protocol.
*/
thd->net.report_error= 0;
send_eof();
@@ -1325,6 +1346,17 @@ void select_send::abort()
}
+/**
+ Cleanup an instance of this class for re-use
+ at next execution of a prepared statement/
+ stored procedure statement.
+*/
+
+void select_send::cleanup()
+{
+ is_result_set_started= FALSE;
+}
+
/* Send data to client. Returns 0 if ok */
bool select_send::send_data(List<Item> &items)
@@ -1362,7 +1394,7 @@ bool select_send::send_data(List<Item> &items)
thd->sent_row_count++;
if (!thd->vio_ok())
DBUG_RETURN(0);
- if (!thd->net.report_error)
+ if (! thd->is_error())
DBUG_RETURN(protocol->write());
protocol->remove_last_row();
DBUG_RETURN(1);
@@ -1383,10 +1415,10 @@ bool select_send::send_eof()
mysql_unlock_tables(thd, thd->lock);
thd->lock=0;
}
- if (!thd->net.report_error)
+ if (! thd->is_error())
{
::send_eof(thd);
- status= 0;
+ is_result_set_started= 0;
return 0;
}
else
@@ -1417,7 +1449,14 @@ bool select_to_file::send_eof()
if (my_close(file,MYF(MY_WME)))
error= 1;
if (!error)
+ {
+ /*
+ In order to remember the value of affected rows for ROW_COUNT()
+ function, SELECT INTO has to have an own SQLCOM.
+ TODO: split from SQLCOM_SELECT
+ */
::send_ok(thd,row_count);
+ }
file= -1;
return error;
}
@@ -1527,6 +1566,7 @@ int
select_export::prepare(List<Item> &list, SELECT_LEX_UNIT *u)
{
bool blob_flag=0;
+ bool string_results= FALSE, non_string_results= FALSE;
unit= u;
if ((uint) strlen(exchange->file_name) + NAME_LEN >= FN_REFLEN)
strmake(path,exchange->file_name,FN_REFLEN-1);
@@ -1544,30 +1584,50 @@ select_export::prepare(List<Item> &list, SELECT_LEX_UNIT *u)
blob_flag=1;
break;
}
+ if (item->result_type() == STRING_RESULT)
+ string_results= TRUE;
+ else
+ non_string_results= TRUE;
}
}
field_term_length=exchange->field_term->length();
+ field_term_char= field_term_length ?
+ (int) (uchar) (*exchange->field_term)[0] : INT_MAX;
if (!exchange->line_term->length())
exchange->line_term=exchange->field_term; // Use this if it exists
- field_sep_char= (exchange->enclosed->length() ? (*exchange->enclosed)[0] :
- field_term_length ? (*exchange->field_term)[0] : INT_MAX);
- escape_char= (exchange->escaped->length() ? (*exchange->escaped)[0] : -1);
+ field_sep_char= (exchange->enclosed->length() ?
+ (int) (uchar) (*exchange->enclosed)[0] : field_term_char);
+ escape_char= (exchange->escaped->length() ?
+ (int) (uchar) (*exchange->escaped)[0] : -1);
is_ambiguous_field_sep= test(strchr(ESCAPE_CHARS, field_sep_char));
is_unsafe_field_sep= test(strchr(NUMERIC_CHARS, field_sep_char));
line_sep_char= (exchange->line_term->length() ?
- (*exchange->line_term)[0] : INT_MAX);
+ (int) (uchar) (*exchange->line_term)[0] : INT_MAX);
if (!field_term_length)
exchange->opt_enclosed=0;
if (!exchange->enclosed->length())
exchange->opt_enclosed=1; // A little quicker loop
fixed_row_size= (!field_term_length && !exchange->enclosed->length() &&
!blob_flag);
+ if ((is_ambiguous_field_sep && exchange->enclosed->is_empty() &&
+ (string_results || is_unsafe_field_sep)) ||
+ (exchange->opt_enclosed && non_string_results &&
+ field_term_length && strchr(NUMERIC_CHARS, field_term_char)))
+ {
+ push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
+ ER_AMBIGUOUS_FIELD_TERM, ER(ER_AMBIGUOUS_FIELD_TERM));
+ is_ambiguous_field_term= TRUE;
+ }
+ else
+ is_ambiguous_field_term= FALSE;
+
return 0;
}
#define NEED_ESCAPING(x) ((int) (uchar) (x) == escape_char || \
- (int) (uchar) (x) == field_sep_char || \
+ (enclosed ? (int) (uchar) (x) == field_sep_char \
+ : (int) (uchar) (x) == field_term_char) || \
(int) (uchar) (x) == line_sep_char || \
!(x))
@@ -1596,8 +1656,10 @@ bool select_export::send_data(List<Item> &items)
while ((item=li++))
{
Item_result result_type=item->result_type();
+ bool enclosed = (exchange->enclosed->length() &&
+ (!exchange->opt_enclosed || result_type == STRING_RESULT));
res=item->str_result(&tmp);
- if (res && (!exchange->opt_enclosed || result_type == STRING_RESULT))
+ if (res && enclosed)
{
if (my_b_write(&cache,(uchar*) exchange->enclosed->ptr(),
exchange->enclosed->length()))
@@ -1688,14 +1750,20 @@ bool select_export::send_data(List<Item> &items)
DBUG_ASSERT before the loop makes that sure.
*/
- if (NEED_ESCAPING(*pos) ||
- (check_second_byte &&
- my_mbcharlen(character_set_client, (uchar) *pos) == 2 &&
- pos + 1 < end &&
- NEED_ESCAPING(pos[1])))
+ if ((NEED_ESCAPING(*pos) ||
+ (check_second_byte &&
+ my_mbcharlen(character_set_client, (uchar) *pos) == 2 &&
+ pos + 1 < end &&
+ NEED_ESCAPING(pos[1]))) &&
+ /*
+ Don't escape field_term_char by doubling - doubling is only
+ valid for ENCLOSED BY characters:
+ */
+ (enclosed || !is_ambiguous_field_term ||
+ (int) (uchar) *pos != field_term_char))
{
char tmp_buff[2];
- tmp_buff[0]= ((int) *pos == field_sep_char &&
+ tmp_buff[0]= ((int) (uchar) *pos == field_sep_char &&
is_ambiguous_field_sep) ?
field_sep_char : escape_char;
tmp_buff[1]= *pos ? *pos : '0';
@@ -1731,7 +1799,7 @@ bool select_export::send_data(List<Item> &items)
goto err;
}
}
- if (res && (!exchange->opt_enclosed || result_type == STRING_RESULT))
+ if (res && enclosed)
{
if (my_b_write(&cache, (uchar*) exchange->enclosed->ptr(),
exchange->enclosed->length()))
@@ -1860,7 +1928,7 @@ bool select_max_min_finder_subselect::send_data(List<Item> &items)
{
if (!cache)
{
- cache= Item_cache::get_cache(val_item->result_type());
+ cache= Item_cache::get_cache(val_item);
switch (val_item->result_type())
{
case REAL_RESULT:
@@ -2332,6 +2400,11 @@ bool select_dumpvar::send_eof()
if (! row_count)
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_SP_FETCH_NO_DATA, ER(ER_SP_FETCH_NO_DATA));
+ /*
+ In order to remember the value of affected rows for ROW_COUNT()
+ function, SELECT INTO has to have an own SQLCOM.
+ TODO: split from SQLCOM_SELECT
+ */
::send_ok(thd,row_count);
return 0;
}
@@ -2386,6 +2459,7 @@ void Security_context::init()
host= user= priv_user= ip= 0;
host_or_ip= "connecting host";
priv_host[0]= '\0';
+ master_access= 0;
#ifndef NO_EMBEDDED_ACCESS_CHECKS
db_access= NO_ACCESS;
#endif
@@ -2726,8 +2800,11 @@ void THD::restore_sub_statement_state(Sub_statement_state *backup)
void mark_transaction_to_rollback(THD *thd, bool all)
{
- thd->is_fatal_sub_stmt_error= TRUE;
- thd->transaction_rollback_request= all;
+ if (thd)
+ {
+ thd->is_fatal_sub_stmt_error= TRUE;
+ thd->transaction_rollback_request= all;
+ }
}
/***************************************************************************
Handling of XA id cacheing
diff --git a/sql/sql_class.h b/sql/sql_class.h
index d4950ec0f60..fdc76309593 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -969,6 +969,7 @@ public:
@return true if the error is handled
*/
virtual bool handle_error(uint sql_errno,
+ const char *message,
MYSQL_ERROR::enum_warning_level level,
THD *thd) = 0;
};
@@ -1171,8 +1172,6 @@ public:
THD_TRANS all; // Trans since BEGIN WORK
THD_TRANS stmt; // Trans for current statement
bool on; // see ha_enable_transaction()
- XID xid; // transaction identifier
- enum xa_states xa_state; // used by external XA only
XID_STATE xid_state;
Rows_log_event *m_pending_rows_event;
@@ -1263,14 +1262,16 @@ public:
We follow this logic:
- when stmt starts, first_successful_insert_id_in_prev_stmt contains the
first insert id successfully inserted by the previous stmt.
- - as stmt makes progress, handler::insert_id_for_cur_row changes; every
- time get_auto_increment() is called, auto_inc_intervals_for_binlog is
- augmented with the reserved interval (if statement-based binlogging).
+ - as stmt makes progress, handler::insert_id_for_cur_row changes;
+ every time get_auto_increment() is called,
+ auto_inc_intervals_in_cur_stmt_for_binlog is augmented with the
+ reserved interval (if statement-based binlogging).
- at first successful insertion of an autogenerated value,
first_successful_insert_id_in_cur_stmt is set to
handler::insert_id_for_cur_row.
- - when stmt goes to binlog, auto_inc_intervals_for_binlog is
- binlogged if non-empty.
+ - when stmt goes to binlog,
+ auto_inc_intervals_in_cur_stmt_for_binlog is binlogged if
+ non-empty.
- when stmt ends, first_successful_insert_id_in_prev_stmt is set to
first_successful_insert_id_in_cur_stmt.
*/
@@ -1365,9 +1366,20 @@ public:
ulonglong limit_found_rows;
ulonglong options; /* Bitmap of states */
- longlong row_count_func; /* For the ROW_COUNT() function */
- ha_rows cuted_fields,
- sent_row_count, examined_row_count;
+ longlong row_count_func; /* For the ROW_COUNT() function */
+ ha_rows cuted_fields;
+
+ /*
+ number of rows we actually sent to the client, including "synthetic"
+ rows in ROLLUP etc.
+ */
+ ha_rows sent_row_count;
+
+ /*
+ number of rows we read, sent or not, including in create_sort_index()
+ */
+ ha_rows examined_row_count;
+
/*
The set of those tables whose fields are referenced in all subqueries
of the query.
@@ -1403,7 +1415,11 @@ public:
/* Statement id is thread-wide. This counter is used to generate ids */
ulong statement_id_counter;
ulong rand_saved_seed1, rand_saved_seed2;
- ulong row_count; // Row counter, mainly for errors and warnings
+ /*
+ Row counter, mainly for errors and warnings. Not increased in
+ create_sort_index(); may differ from examined_row_count.
+ */
+ ulong row_count;
pthread_t real_id; /* For debugging */
my_thread_id thread_id;
uint tmp_table, global_read_lock;
@@ -1466,7 +1482,14 @@ public:
/* for IS NULL => = last_insert_id() fix in remove_eq_conds() */
bool substitute_null_with_insert_id;
bool in_lock_tables;
- bool query_error, bootstrap, cleanup_done;
+ /**
+ True if a slave error. Causes the slave to stop. Not the same
+ as the statement execution error (is_error()), since
+ a statement may be expected to return an error, e.g. because
+ it returned an error on master, and this is OK on the slave.
+ */
+ bool is_slave_error;
+ bool bootstrap, cleanup_done;
/** is set if some thread specific value(s) used in a statement. */
bool thread_specific_used;
@@ -1695,7 +1718,7 @@ public:
net.last_error[0]= 0;
net.last_errno= 0;
net.report_error= 0;
- query_error= 0;
+ is_slave_error= 0;
DBUG_VOID_RETURN;
}
inline bool vio_ok() const { return net.vio != 0; }
@@ -1709,6 +1732,20 @@ public:
net.report_error= 1;
DBUG_PRINT("error",("Fatal error set"));
}
+ /**
+ TRUE if there is an error in the error stack.
+
+ Please use this method instead of direct access to
+ net.report_error.
+
+ If TRUE, the current (sub)-statement should be aborted.
+ The main difference between this member and is_fatal_error
+ is that a fatal error can not be handled by a stored
+ procedure continue handler, whereas a normal error can.
+
+ To raise this flag, use my_error().
+ */
+ inline bool is_error() const { return net.report_error; }
inline CHARSET_INFO *charset() { return variables.character_set_client; }
void update_charset();
@@ -1902,7 +1939,7 @@ public:
@param level the error level
@return true if the error is handled
*/
- virtual bool handle_error(uint sql_errno,
+ virtual bool handle_error(uint sql_errno, const char *message,
MYSQL_ERROR::enum_warning_level level);
/**
@@ -2029,14 +2066,20 @@ public:
class select_send :public select_result {
- int status;
+ /**
+ True if we have sent result set metadata to the client.
+ In this case the client always expects us to end the result
+ set with an eof or error packet
+ */
+ bool is_result_set_started;
public:
- select_send() :status(0) {}
+ select_send() :is_result_set_started(FALSE) {}
bool send_fields(List<Item> &list, uint flags);
bool send_data(List<Item> &items);
bool send_eof();
virtual bool check_simple_select() const { return FALSE; }
void abort();
+ virtual void cleanup();
};
@@ -2070,6 +2113,7 @@ public:
class select_export :public select_to_file {
uint field_term_length;
int field_sep_char,escape_char,line_sep_char;
+ int field_term_char; // first char of FIELDS TERMINATED BY or MAX_INT
/*
The is_ambiguous_field_sep field is true if a value of the field_sep_char
field is one of the 'n', 't', 'r' etc characters
@@ -2077,6 +2121,12 @@ class select_export :public select_to_file {
*/
bool is_ambiguous_field_sep;
/*
+ The is_ambiguous_field_term is true if field_sep_char contains the first
+ char of the FIELDS TERMINATED BY (ENCLOSED BY is empty), and items can
+ contain this character.
+ */
+ bool is_ambiguous_field_term;
+ /*
The is_unsafe_field_sep field is true if a value of the field_sep_char
field is one of the '0'..'9', '+', '-', '.' and 'e' characters
(see the NUMERIC_CHARS constant value).
@@ -2107,14 +2157,13 @@ class select_insert :public select_result_interceptor {
ulonglong autoinc_value_of_last_inserted_row; // autogenerated or not
COPY_INFO info;
bool insert_into_view;
-
select_insert(TABLE_LIST *table_list_par,
TABLE *table_par, List<Item> *fields_par,
List<Item> *update_fields, List<Item> *update_values,
enum_duplicates duplic, bool ignore);
~select_insert();
int prepare(List<Item> &list, SELECT_LEX_UNIT *u);
- int prepare2(void);
+ virtual int prepare2(void);
bool send_data(List<Item> &items);
virtual void store_values(List<Item> &values);
virtual bool can_rollback_data() { return 0; }
@@ -2133,6 +2182,10 @@ class select_create: public select_insert {
TABLE_LIST *select_tables;
Alter_info *alter_info;
Field **field;
+ /* lock data for tmp table */
+ MYSQL_LOCK *m_lock;
+ /* m_lock or thd->extra_lock */
+ MYSQL_LOCK **m_plock;
public:
select_create (TABLE_LIST *table_arg,
HA_CREATE_INFO *create_info_par,
@@ -2143,7 +2196,8 @@ public:
create_table(table_arg),
create_info(create_info_par),
select_tables(select_tables_arg),
- alter_info(alter_info_arg)
+ alter_info(alter_info_arg),
+ m_plock(NULL)
{}
int prepare(List<Item> &list, SELECT_LEX_UNIT *u);
@@ -2157,6 +2211,7 @@ public:
// Needed for access from local class MY_HOOKS in prepare(), since thd is proteted.
const THD *get_thd(void) { return thd; }
const HA_CREATE_INFO *get_create_info() { return create_info; };
+ int prepare2(void) { return 0; }
};
#include <myisam.h>
@@ -2436,6 +2491,11 @@ class multi_delete :public select_result_interceptor
/* True if at least one table we delete from is not transactional */
bool normal_tables;
bool delete_while_scanning;
+ /*
+ error handling (rollback and binlogging) can happen in send_eof()
+ so that afterward send_error() needs to find out that.
+ */
+ bool error_handled;
public:
multi_delete(TABLE_LIST *dt, uint num_of_tables);
@@ -2471,6 +2531,11 @@ class multi_update :public select_result_interceptor
/* True if the update operation has made a change in a transactional table */
bool transactional_tables;
bool ignore;
+ /*
+ error handling (rollback and binlogging) can happen in send_eof()
+ so that afterward send_error() needs to find out that.
+ */
+ bool error_handled;
public:
multi_update(TABLE_LIST *ut, TABLE_LIST *leaves_list,
diff --git a/sql/sql_connect.cc b/sql/sql_connect.cc
index 6bb0f62d843..76237576764 100644
--- a/sql/sql_connect.cc
+++ b/sql/sql_connect.cc
@@ -87,7 +87,7 @@ static int get_or_create_user_conn(THD *thd, const char *user,
my_malloc(sizeof(struct user_conn) + temp_len+1,
MYF(MY_WME)))))
{
- net_send_error(thd, 0, NullS); // Out of memory
+ /* MY_WME ensures an error is set in THD. */
return_val= 1;
goto end;
}
@@ -100,8 +100,8 @@ static int get_or_create_user_conn(THD *thd, const char *user,
uc->reset_utime= thd->thr_create_utime;
if (my_hash_insert(&hash_user_connections, (uchar*) uc))
{
+ /* The only possible error is out of memory, MY_WME sets an error. */
my_free((char*) uc,0);
- net_send_error(thd, 0, NullS); // Out of memory
return_val= 1;
goto end;
}
@@ -132,6 +132,7 @@ end:
1 error
*/
+static
int check_for_max_user_connections(THD *thd, USER_CONN *uc)
{
int error=0;
@@ -141,7 +142,7 @@ int check_for_max_user_connections(THD *thd, USER_CONN *uc)
if (max_user_connections && !uc->user_resources.user_conn &&
max_user_connections < (uint) uc->connections)
{
- net_printf_error(thd, ER_TOO_MANY_USER_CONNECTIONS, uc->user);
+ my_error(ER_TOO_MANY_USER_CONNECTIONS, MYF(0), uc->user);
error=1;
goto end;
}
@@ -149,24 +150,24 @@ int check_for_max_user_connections(THD *thd, USER_CONN *uc)
if (uc->user_resources.user_conn &&
uc->user_resources.user_conn < uc->connections)
{
- net_printf_error(thd, ER_USER_LIMIT_REACHED, uc->user,
- "max_user_connections",
- (long) uc->user_resources.user_conn);
+ my_error(ER_USER_LIMIT_REACHED, MYF(0), uc->user,
+ "max_user_connections",
+ (long) uc->user_resources.user_conn);
error= 1;
goto end;
}
if (uc->user_resources.conn_per_hour &&
uc->user_resources.conn_per_hour <= uc->conn_per_hour)
{
- net_printf_error(thd, ER_USER_LIMIT_REACHED, uc->user,
- "max_connections_per_hour",
- (long) uc->user_resources.conn_per_hour);
+ my_error(ER_USER_LIMIT_REACHED, MYF(0), uc->user,
+ "max_connections_per_hour",
+ (long) uc->user_resources.conn_per_hour);
error=1;
goto end;
}
uc->conn_per_hour++;
- end:
+end:
if (error)
uc->connections--; // no need for decrease_user_connections() here
(void) pthread_mutex_unlock(&LOCK_user_conn);
@@ -258,8 +259,8 @@ bool check_mqh(THD *thd, uint check_command)
if (uc->user_resources.questions &&
uc->questions++ >= uc->user_resources.questions)
{
- net_printf_error(thd, ER_USER_LIMIT_REACHED, uc->user, "max_questions",
- (long) uc->user_resources.questions);
+ my_error(ER_USER_LIMIT_REACHED, MYF(0), uc->user, "max_questions",
+ (long) uc->user_resources.questions);
error=1;
goto end;
}
@@ -270,8 +271,8 @@ bool check_mqh(THD *thd, uint check_command)
(sql_command_flags[check_command] & CF_CHANGES_DATA) &&
uc->updates++ >= uc->user_resources.updates)
{
- net_printf_error(thd, ER_USER_LIMIT_REACHED, uc->user, "max_updates",
- (long) uc->user_resources.updates);
+ my_error(ER_USER_LIMIT_REACHED, MYF(0), uc->user, "max_updates",
+ (long) uc->user_resources.updates);
error=1;
goto end;
}
@@ -284,55 +285,54 @@ end:
#endif /* NO_EMBEDDED_ACCESS_CHECKS */
-/*
- Check if user exist and password supplied is correct.
-
- SYNOPSIS
- check_user()
- thd thread handle, thd->security_ctx->{host,user,ip} are used
- command originator of the check: now check_user is called
- during connect and change user procedures; used for
- logging.
- passwd scrambled password received from client
- passwd_len length of scrambled password
- db database name to connect to, may be NULL
- check_count dont know exactly
-
- Note, that host, user and passwd may point to communication buffer.
- Current implementation does not depend on that, but future changes
- should be done with this in mind; 'thd' is INOUT, all other params
- are 'IN'.
-
- RETURN VALUE
- 0 OK; thd->security_ctx->user/master_access/priv_user/db_access and
- thd->db are updated; OK is sent to client;
- -1 access denied or handshake error; error is sent to client;
- >0 error, not sent to client
+/**
+ Check if user exist and password supplied is correct.
+
+ @param thd thread handle, thd->security_ctx->{host,user,ip} are used
+ @param command originator of the check: now check_user is called
+ during connect and change user procedures; used for
+ logging.
+ @param passwd scrambled password received from client
+ @param passwd_len length of scrambled password
+ @param db database name to connect to, may be NULL
+ @param check_count TRUE if establishing a new connection. In this case
+ check that we have not exceeded the global
+ max_connections limist
+
+ @note Host, user and passwd may point to communication buffer.
+ Current implementation does not depend on that, but future changes
+ should be done with this in mind; 'thd' is INOUT, all other params
+ are 'IN'.
+
+ @retval 0 OK; thd->security_ctx->user/master_access/priv_user/db_access and
+ thd->db are updated; OK is sent to the client.
+ @retval 1 error, e.g. access denied or handshake error, not sent to
+ the client. A message is pushed into the error stack.
*/
-int check_user(THD *thd, enum enum_server_command command,
+int
+check_user(THD *thd, enum enum_server_command command,
const char *passwd, uint passwd_len, const char *db,
bool check_count)
{
DBUG_ENTER("check_user");
LEX_STRING db_str= { (char *) db, db ? strlen(db) : 0 };
-
+
+ /*
+ Clear thd->db as it points to something, that will be freed when
+ connection is closed. We don't want to accidentally free a wrong
+ pointer if connect failed. Also in case of 'CHANGE USER' failure,
+ current database will be switched to 'no database selected'.
+ */
+ thd->reset_db(NULL, 0);
+
#ifdef NO_EMBEDDED_ACCESS_CHECKS
thd->main_security_ctx.master_access= GLOBAL_ACLS; // Full rights
/* Change database if necessary */
if (db && db[0])
{
- /*
- thd->db is saved in caller and needs to be freed by caller if this
- function returns 0
- */
- thd->reset_db(NULL, 0);
if (mysql_change_db(thd, &db_str, FALSE))
- {
- /* Send the error to the client */
- net_send_error(thd);
- DBUG_RETURN(-1);
- }
+ DBUG_RETURN(1);
}
send_ok(thd);
DBUG_RETURN(0);
@@ -349,22 +349,17 @@ int check_user(THD *thd, enum enum_server_command command,
*/
if (opt_secure_auth_local && passwd_len == SCRAMBLE_LENGTH_323)
{
- net_printf_error(thd, ER_NOT_SUPPORTED_AUTH_MODE);
+ my_error(ER_NOT_SUPPORTED_AUTH_MODE, MYF(0));
general_log_print(thd, COM_CONNECT, ER(ER_NOT_SUPPORTED_AUTH_MODE));
- DBUG_RETURN(-1);
+ DBUG_RETURN(1);
}
if (passwd_len != 0 &&
passwd_len != SCRAMBLE_LENGTH &&
passwd_len != SCRAMBLE_LENGTH_323)
- DBUG_RETURN(ER_HANDSHAKE_ERROR);
-
- /*
- Clear thd->db as it points to something, that will be freed when
- connection is closed. We don't want to accidentally free a wrong pointer
- if connect failed. Also in case of 'CHANGE USER' failure, current
- database will be switched to 'no database selected'.
- */
- thd->reset_db(NULL, 0);
+ {
+ my_error(ER_HANDSHAKE_ERROR, MYF(0), thd->main_security_ctx.host_or_ip);
+ DBUG_RETURN(1);
+ }
USER_RESOURCES ur;
int res= acl_getroot(thd, &ur, passwd, passwd_len);
@@ -380,20 +375,21 @@ int check_user(THD *thd, enum enum_server_command command,
NET *net= &thd->net;
if (opt_secure_auth_local)
{
- net_printf_error(thd, ER_SERVER_IS_IN_SECURE_AUTH_MODE,
- thd->main_security_ctx.user,
- thd->main_security_ctx.host_or_ip);
+ my_error(ER_SERVER_IS_IN_SECURE_AUTH_MODE, MYF(0),
+ thd->main_security_ctx.user,
+ thd->main_security_ctx.host_or_ip);
general_log_print(thd, COM_CONNECT, ER(ER_SERVER_IS_IN_SECURE_AUTH_MODE),
thd->main_security_ctx.user,
thd->main_security_ctx.host_or_ip);
- DBUG_RETURN(-1);
+ DBUG_RETURN(1);
}
/* We have to read very specific packet size */
if (send_old_password_request(thd) ||
my_net_read(net) != SCRAMBLE_LENGTH_323 + 1)
{
inc_host_errors(&thd->remote.sin_addr);
- DBUG_RETURN(ER_HANDSHAKE_ERROR);
+ my_error(ER_HANDSHAKE_ERROR, MYF(0), thd->main_security_ctx.host_or_ip);
+ DBUG_RETURN(1);
}
/* Final attempt to check the user based on reply */
/* So as passwd is short, errcode is always >= 0 */
@@ -427,8 +423,8 @@ int check_user(THD *thd, enum enum_server_command command,
VOID(pthread_mutex_unlock(&LOCK_thread_count));
if (!count_ok)
{ // too many connections
- net_send_error(thd, ER_CON_COUNT_ERROR);
- DBUG_RETURN(-1);
+ my_error(ER_CON_COUNT_ERROR, MYF(0));
+ DBUG_RETURN(1);
}
}
@@ -462,24 +458,29 @@ int check_user(THD *thd, enum enum_server_command command,
(opt_old_style_user_limits ? thd->main_security_ctx.host_or_ip :
thd->main_security_ctx.priv_host),
&ur))
- DBUG_RETURN(-1);
+ {
+ /* The error is set by get_or_create_user_conn(). */
+ DBUG_RETURN(1);
+ }
if (thd->user_connect &&
(thd->user_connect->user_resources.conn_per_hour ||
thd->user_connect->user_resources.user_conn ||
max_user_connections) &&
check_for_max_user_connections(thd, thd->user_connect))
- DBUG_RETURN(-1);
+ {
+ /* The error is set in check_for_max_user_connections(). */
+ DBUG_RETURN(1);
+ }
/* Change database if necessary */
if (db && db[0])
{
if (mysql_change_db(thd, &db_str, FALSE))
{
- /* Send error to the client */
- net_send_error(thd);
+ /* mysql_change_db() has pushed the error message. */
if (thd->user_connect)
decrease_user_connections(thd->user_connect);
- DBUG_RETURN(-1);
+ DBUG_RETURN(1);
}
}
send_ok(thd);
@@ -490,19 +491,19 @@ int check_user(THD *thd, enum enum_server_command command,
}
else if (res == 2) // client gave short hash, server has long hash
{
- net_printf_error(thd, ER_NOT_SUPPORTED_AUTH_MODE);
+ my_error(ER_NOT_SUPPORTED_AUTH_MODE, MYF(0));
general_log_print(thd, COM_CONNECT, ER(ER_NOT_SUPPORTED_AUTH_MODE));
- DBUG_RETURN(-1);
+ DBUG_RETURN(1);
}
- net_printf_error(thd, ER_ACCESS_DENIED_ERROR,
- thd->main_security_ctx.user,
- thd->main_security_ctx.host_or_ip,
- passwd_len ? ER(ER_YES) : ER(ER_NO));
+ my_error(ER_ACCESS_DENIED_ERROR, MYF(0),
+ thd->main_security_ctx.user,
+ thd->main_security_ctx.host_or_ip,
+ passwd_len ? ER(ER_YES) : ER(ER_NO));
general_log_print(thd, COM_CONNECT, ER(ER_ACCESS_DENIED_ERROR),
thd->main_security_ctx.user,
thd->main_security_ctx.host_or_ip,
passwd_len ? ER(ER_YES) : ER(ER_NO));
- DBUG_RETURN(-1);
+ DBUG_RETURN(1);
#endif /* NO_EMBEDDED_ACCESS_CHECKS */
}
@@ -666,9 +667,12 @@ static int check_connection(THD *thd)
char ip[30];
if (vio_peer_addr(net->vio, ip, &thd->peer_port))
- return (ER_BAD_HOST_ERROR);
- if (!(thd->main_security_ctx.ip= my_strdup(ip,MYF(0))))
- return (ER_OUT_OF_RESOURCES);
+ {
+ my_error(ER_BAD_HOST_ERROR, MYF(0), thd->main_security_ctx.host_or_ip);
+ return 1;
+ }
+ if (!(thd->main_security_ctx.ip= my_strdup(ip,MYF(MY_WME))))
+ return 1; /* The error is set by my_strdup(). */
thd->main_security_ctx.host_or_ip= thd->main_security_ctx.ip;
vio_in_addr(net->vio,&thd->remote.sin_addr);
if (!(specialflag & SPECIAL_NO_RESOLVE))
@@ -685,7 +689,10 @@ static int check_connection(THD *thd)
thd->main_security_ctx.host_or_ip= thd->main_security_ctx.host;
}
if (connect_errors > max_connect_errors)
- return(ER_HOST_IS_BLOCKED);
+ {
+ my_error(ER_HOST_IS_BLOCKED, MYF(0), thd->main_security_ctx.host_or_ip);
+ return 1;
+ }
}
DBUG_PRINT("info",("Host: %s ip: %s",
(thd->main_security_ctx.host ?
@@ -693,7 +700,11 @@ static int check_connection(THD *thd)
(thd->main_security_ctx.ip ?
thd->main_security_ctx.ip : "unknown ip")));
if (acl_check_host(thd->main_security_ctx.host, thd->main_security_ctx.ip))
- return(ER_HOST_NOT_PRIVILEGED);
+ {
+ my_error(ER_HOST_NOT_PRIVILEGED, MYF(0),
+ thd->main_security_ctx.host_or_ip);
+ return 1;
+ }
}
else /* Hostname given means that the connection was on a socket */
{
@@ -753,7 +764,9 @@ static int check_connection(THD *thd)
pkt_len < MIN_HANDSHAKE_SIZE)
{
inc_host_errors(&thd->remote.sin_addr);
- return(ER_HANDSHAKE_ERROR);
+ my_error(ER_HANDSHAKE_ERROR, MYF(0),
+ thd->main_security_ctx.host_or_ip);
+ return 1;
}
}
#ifdef _CUSTOMCONFIG_
@@ -762,7 +775,7 @@ static int check_connection(THD *thd)
if (connect_errors)
reset_host_errors(&thd->remote.sin_addr);
if (thd->packet.alloc(thd->variables.net_buffer_length))
- return(ER_OUT_OF_RESOURCES);
+ return 1; /* The error is set by alloc(). */
thd->client_capabilities=uint2korr(net->read_pos);
if (thd->client_capabilities & CLIENT_PROTOCOL_41)
@@ -790,14 +803,16 @@ static int check_connection(THD *thd)
if (!ssl_acceptor_fd)
{
inc_host_errors(&thd->remote.sin_addr);
- return(ER_HANDSHAKE_ERROR);
+ my_error(ER_HANDSHAKE_ERROR, MYF(0), thd->main_security_ctx.host_or_ip);
+ return 1;
}
DBUG_PRINT("info", ("IO layer change in progress..."));
if (sslaccept(ssl_acceptor_fd, net->vio, net->read_timeout))
{
DBUG_PRINT("error", ("Failed to accept new SSL connection"));
inc_host_errors(&thd->remote.sin_addr);
- return(ER_HANDSHAKE_ERROR);
+ my_error(ER_HANDSHAKE_ERROR, MYF(0), thd->main_security_ctx.host_or_ip);
+ return 1;
}
DBUG_PRINT("info", ("Reading user information over SSL layer"));
if ((pkt_len= my_net_read(net)) == packet_error ||
@@ -806,7 +821,8 @@ static int check_connection(THD *thd)
DBUG_PRINT("error", ("Failed to read user information (pkt_len= %lu)",
pkt_len));
inc_host_errors(&thd->remote.sin_addr);
- return(ER_HANDSHAKE_ERROR);
+ my_error(ER_HANDSHAKE_ERROR, MYF(0), thd->main_security_ctx.host_or_ip);
+ return 1;
}
}
#endif /* HAVE_OPENSSL */
@@ -814,7 +830,8 @@ static int check_connection(THD *thd)
if (end >= (char*) net->read_pos+ pkt_len +2)
{
inc_host_errors(&thd->remote.sin_addr);
- return(ER_HANDSHAKE_ERROR);
+ my_error(ER_HANDSHAKE_ERROR, MYF(0), thd->main_security_ctx.host_or_ip);
+ return 1;
}
if (thd->client_capabilities & CLIENT_INTERACTIVE)
@@ -851,7 +868,8 @@ static int check_connection(THD *thd)
if (passwd + passwd_len + db_len > (char *)net->read_pos + pkt_len)
{
inc_host_errors(&thd->remote.sin_addr);
- return ER_HANDSHAKE_ERROR;
+ my_error(ER_HANDSHAKE_ERROR, MYF(0), thd->main_security_ctx.host_or_ip);
+ return 1;
}
/* Since 4.1 all database names are stored in utf8 */
@@ -879,8 +897,8 @@ static int check_connection(THD *thd)
if (thd->main_security_ctx.user)
x_free(thd->main_security_ctx.user);
- if (!(thd->main_security_ctx.user= my_strdup(user, MYF(0))))
- return (ER_OUT_OF_RESOURCES);
+ if (!(thd->main_security_ctx.user= my_strdup(user, MYF(MY_WME))))
+ return 1; /* The error is set by my_strdup(). */
return check_user(thd, COM_CONNECT, passwd, passwd_len, db, TRUE);
}
@@ -929,11 +947,9 @@ bool setup_connection_thread_globals(THD *thd)
bool login_connection(THD *thd)
{
- int error;
NET *net= &thd->net;
- Security_context *sctx= thd->security_ctx;
DBUG_ENTER("login_connection");
- DBUG_PRINT("info", ("handle_one_connection called by thread %lu",
+ DBUG_PRINT("info", ("login_connection called by thread %lu",
thd->thread_id));
net->no_send_error= 0;
@@ -942,10 +958,9 @@ bool login_connection(THD *thd)
my_net_set_read_timeout(net, connect_timeout);
my_net_set_write_timeout(net, connect_timeout);
- if ((error=check_connection(thd)))
+ if (check_connection(thd))
{ // Wrong permissions
- if (error > 0)
- net_printf_error(thd, error, sctx->host_or_ip);
+ net_send_error(thd);
#ifdef __NT__
if (vio_type(net->vio) == VIO_TYPE_NAMEDPIPE)
my_sleep(1000); /* must wait after eof() */
@@ -973,21 +988,29 @@ void end_connection(THD *thd)
plugin_thdvar_cleanup(thd);
if (thd->user_connect)
decrease_user_connections(thd->user_connect);
- if (net->error && net->vio != 0 && net->report_error)
+
+ if (thd->killed ||
+ net->error && net->vio != 0 && thd->is_error())
+ {
+ statistic_increment(aborted_threads,&LOCK_status);
+ }
+
+ if (net->error && net->vio != 0 && thd->is_error())
{
- Security_context *sctx= thd->security_ctx;
if (!thd->killed && thd->variables.log_warnings > 1)
+ {
+ Security_context *sctx= thd->security_ctx;
+
sql_print_warning(ER(ER_NEW_ABORTING_CONNECTION),
thd->thread_id,(thd->db ? thd->db : "unconnected"),
sctx->user ? sctx->user : "unauthenticated",
sctx->host_or_ip,
(net->last_errno ? ER(net->last_errno) :
ER(ER_UNKNOWN_ERROR)));
+ }
+
net_send_error(thd, net->last_errno, NullS);
- statistic_increment(aborted_threads,&LOCK_status);
}
- else if (thd->killed)
- statistic_increment(aborted_threads,&LOCK_status);
}
@@ -995,7 +1018,7 @@ void end_connection(THD *thd)
Initialize THD to handle queries
*/
-void prepare_new_connection_state(THD* thd)
+static void prepare_new_connection_state(THD* thd)
{
Security_context *sctx= thd->security_ctx;
@@ -1022,7 +1045,17 @@ void prepare_new_connection_state(THD* thd)
if (sys_init_connect.value_length && !(sctx->master_access & SUPER_ACL))
{
execute_init_command(thd, &sys_init_connect, &LOCK_sys_init_connect);
- if (thd->query_error)
+ /*
+ execute_init_command calls net_send_error.
+ If there was an error during execution of the init statements,
+ the error at this moment is present in thd->net.last_error and also
+ thd->is_slave_error and thd->net.report_error are set.
+ net_send_error sends the contents of thd->net.last_error and
+ clears thd->net.report_error. It doesn't, however, clean
+ thd->is_slave_error or thd->net.last_error. Here we make use of this
+ fact.
+ */
+ if (thd->is_slave_error)
{
thd->killed= THD::KILL_CONNECTION;
sql_print_warning(ER(ER_NEW_ABORTING_CONNECTION),
@@ -1087,6 +1120,7 @@ pthread_handler_t handle_one_connection(void *arg)
{
NET *net= &thd->net;
+ lex_start(thd);
if (login_connection(thd))
goto end_thread;
diff --git a/sql/sql_db.cc b/sql/sql_db.cc
index cd7ad048802..7686dc695ad 100644
--- a/sql/sql_db.cc
+++ b/sql/sql_db.cc
@@ -883,6 +883,13 @@ bool mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent)
VOID(pthread_mutex_lock(&LOCK_mysql_create_db));
+ /*
+ This statement will be replicated as a statement, even when using
+ row-based replication. The flag will be reset at the end of the
+ statement.
+ */
+ thd->clear_current_stmt_binlog_row_based();
+
length= build_table_filename(path, sizeof(path), db, "", "", 0);
strmov(path+length, MY_DB_OPT_FILE); // Append db option file name
del_dbopt(path); // Remove dboption hash entry
@@ -1111,6 +1118,7 @@ static long mysql_rm_known_files(THD *thd, MY_DIR *dirp, const char *db,
VOID(filename_to_tablename(file->name, table_list->table_name,
strlen(file->name) + 1));
table_list->alias= table_list->table_name; // If lower_case_table_names=2
+ table_list->internal_tmp_table= is_prefix(file->name, tmp_file_prefix);
/* Link into list */
(*tot_list_next)= table_list;
tot_list_next= &table_list->next_local;
@@ -1727,41 +1735,21 @@ lock_databases(THD *thd, const char *db1, uint length1,
}
-/*
- Rename database.
-
- SYNOPSIS
- mysql_rename_db()
- thd Thread handler
- olddb Old database name
- newdb New database name
-
- DESCRIPTION
- This function is invoked whenever a RENAME DATABASE query is executed:
-
- RENAME DATABASE 'olddb' TO 'newdb'.
-
- NOTES
-
- If we have managed to rename (move) tables to the new database
- but something failed on a later step, then we store the
- RENAME DATABASE event in the log. mysql_rename_db() is atomic in
- the sense that it will rename all or none of the tables.
-
- TODO:
- - Better trigger, stored procedure, event, grant handling,
- see the comments below.
- NOTE: It's probably a good idea to call wait_if_global_read_lock()
- once in mysql_rename_db(), instead of locking inside all
- the required functions for renaming triggerts, SP, events, grants, etc.
-
- RETURN VALUES
- 0 ok
- 1 error
+/**
+ Upgrade a 5.0 database.
+ This function is invoked whenever an ALTER DATABASE UPGRADE query is executed:
+ ALTER DATABASE 'olddb' UPGRADE DATA DIRECTORY NAME.
+
+ If we have managed to rename (move) tables to the new database
+ but something failed on a later step, then we store the
+ RENAME DATABASE event in the log. mysql_rename_db() is atomic in
+ the sense that it will rename all or none of the tables.
+
+ @param thd Current thread
+ @param old_db 5.0 database name, in #mysql50#name format
+ @return 0 on success, 1 on error
*/
-
-
-bool mysql_rename_db(THD *thd, LEX_STRING *old_db, LEX_STRING *new_db)
+bool mysql_upgrade_db(THD *thd, LEX_STRING *old_db)
{
int error= 0, change_to_newdb= 0;
char path[FN_REFLEN+16];
@@ -1770,11 +1758,27 @@ bool mysql_rename_db(THD *thd, LEX_STRING *old_db, LEX_STRING *new_db)
MY_DIR *dirp;
TABLE_LIST *table_list;
SELECT_LEX *sl= thd->lex->current_select;
- DBUG_ENTER("mysql_rename_db");
+ LEX_STRING new_db;
+ DBUG_ENTER("mysql_upgrade_db");
+
+ if ((old_db->length <= MYSQL50_TABLE_NAME_PREFIX_LENGTH) ||
+ (strncmp(old_db->str,
+ MYSQL50_TABLE_NAME_PREFIX,
+ MYSQL50_TABLE_NAME_PREFIX_LENGTH) != 0))
+ {
+ my_error(ER_WRONG_USAGE, MYF(0),
+ "ALTER DATABASE UPGRADE DATA DIRECTORY NAME",
+ "name");
+ DBUG_RETURN(1);
+ }
+
+ /* `#mysql50#<name>` converted to encoded `<name>` */
+ new_db.str= old_db->str + MYSQL50_TABLE_NAME_PREFIX_LENGTH;
+ new_db.length= old_db->length - MYSQL50_TABLE_NAME_PREFIX_LENGTH;
if (lock_databases(thd, old_db->str, old_db->length,
- new_db->str, new_db->length))
- return 1;
+ new_db.str, new_db.length))
+ DBUG_RETURN(1);
/*
Let's remember if we should do "USE newdb" afterwards.
@@ -1798,7 +1802,7 @@ bool mysql_rename_db(THD *thd, LEX_STRING *old_db, LEX_STRING *new_db)
}
/* Step1: Create the new database */
- if ((error= mysql_create_db(thd, new_db->str, &create_info, 1)))
+ if ((error= mysql_create_db(thd, new_db.str, &create_info, 1)))
goto exit;
/* Step2: Move tables to the new database */
@@ -1819,12 +1823,12 @@ bool mysql_rename_db(THD *thd, LEX_STRING *old_db, LEX_STRING *new_db)
/* A frm file found, add the table info rename list */
*extension= '\0';
-
+
table_str.length= filename_to_tablename(file->name,
tname, sizeof(tname)-1);
table_str.str= (char*) sql_memdup(tname, table_str.length + 1);
Table_ident *old_ident= new Table_ident(thd, *old_db, table_str, 0);
- Table_ident *new_ident= new Table_ident(thd, *new_db, table_str, 0);
+ Table_ident *new_ident= new Table_ident(thd, new_db, table_str, 0);
if (!old_ident || !new_ident ||
!sl->add_table_to_list(thd, old_ident, NULL,
TL_OPTION_UPDATING, TL_IGNORE) ||
@@ -1854,9 +1858,9 @@ bool mysql_rename_db(THD *thd, LEX_STRING *old_db, LEX_STRING *new_db)
It garantees we never loose any tables.
*/
build_table_filename(path, sizeof(path)-1,
- new_db->str,"",MY_DB_OPT_FILE, 0);
+ new_db.str,"",MY_DB_OPT_FILE, 0);
my_delete(path, MYF(MY_WME));
- length= build_table_filename(path, sizeof(path)-1, new_db->str, "", "", 0);
+ length= build_table_filename(path, sizeof(path)-1, new_db.str, "", "", 0);
if (length && path[length-1] == FN_LIBCHAR)
path[length-1]=0; // remove ending '\'
rmdir(path);
@@ -1910,47 +1914,13 @@ bool mysql_rename_db(THD *thd, LEX_STRING *old_db, LEX_STRING *new_db)
build_table_filename(oldname, sizeof(oldname)-1,
old_db->str, "", file->name, 0);
build_table_filename(newname, sizeof(newname)-1,
- new_db->str, "", file->name, 0);
+ new_db.str, "", file->name, 0);
my_rename(oldname, newname, MYF(MY_WME));
}
- my_dirend(dirp);
+ my_dirend(dirp);
}
/*
- Step4: TODO: moving stored procedures in the 'proc' system table
- We need a new function: sp_move_db_routines(thd, olddb, newdb)
- Which will basically have the same effect with:
- UPDATE proc SET db='newdb' WHERE db='olddb'
- Note, for 5.0 to 5.1 upgrade purposes we don't really need it.
-
- The biggest problem here is that we can't have a lock on LOCK_open() while
- calling open_table() for 'proc'.
-
- Two solutions:
- - Start by opening the 'event' and 'proc' (and other) tables for write
- even before creating the 'to' database. (This will have the nice
- effect of blocking another 'rename database' while the lock is active).
- - Use the solution "Disable create of new tables during lock table"
-
- For an example of how to read through all rows, see:
- sql_help.cc::search_topics()
- */
-
- /*
- Step5: TODO: moving events in the 'event' system table
- We need a new function evex_move_db_events(thd, olddb, newdb)
- Which will have the same effect with:
- UPDATE event SET db='newdb' WHERE db='olddb'
- Note, for 5.0 to 5.1 upgrade purposes we don't really need it.
- */
-
- /*
- Step6: TODO: moving grants in the 'db', 'tables_priv', 'columns_priv'.
- Update each grant table, doing the same with:
- UPDATE system_table SET db='newdb' WHERE db='olddb'
- */
-
- /*
Step7: drop the old database.
remove_db_from_cache(olddb) and query_cache_invalidate(olddb)
are done inside mysql_rm_db(), no needs to execute them again.
@@ -1968,13 +1938,13 @@ bool mysql_rename_db(THD *thd, LEX_STRING *old_db, LEX_STRING *new_db)
/* Step9: Let's do "use newdb" if we renamed the current database */
if (change_to_newdb)
- error|= mysql_change_db(thd, new_db, FALSE);
+ error|= mysql_change_db(thd, & new_db, FALSE);
exit:
pthread_mutex_lock(&LOCK_lock_db);
/* Remove the databases from db lock cache */
lock_db_delete(old_db->str, old_db->length);
- lock_db_delete(new_db->str, new_db->length);
+ lock_db_delete(new_db.str, new_db.length);
creating_database--;
/* Signal waiting CREATE TABLE's to continue */
pthread_cond_signal(&COND_refresh);
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index ad5dcb06097..98e9c7629bc 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -35,9 +35,11 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
READ_RECORD info;
bool using_limit=limit != HA_POS_ERROR;
bool transactional_table, safe_update, const_cond;
+ bool const_cond_result;
ha_rows deleted= 0;
uint usable_index= MAX_KEY;
SELECT_LEX *select_lex= &thd->lex->select_lex;
+ THD::killed_state killed_status= THD::NOT_KILLED;
DBUG_ENTER("mysql_delete");
if (open_and_lock_tables(thd, table_list))
@@ -86,6 +88,12 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
select_lex->no_error= thd->lex->ignore;
+ const_cond_result= const_cond && (!conds || conds->val_int());
+ if (thd->is_error())
+ {
+ /* Error evaluating val_int(). */
+ DBUG_RETURN(TRUE);
+ }
/*
Test if the user wants to delete all rows and deletion doesn't have
any side-effects (because of triggers), so we can use optimized
@@ -105,7 +113,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
- We should not be binlogging this statement row-based, and
- there should be no delete triggers associated with the table.
*/
- if (!using_limit && const_cond && (!conds || conds->val_int()) &&
+ if (!using_limit && const_cond_result &&
!(specialflag & (SPECIAL_NO_NEW_FUNC | SPECIAL_SAFE_MODE)) &&
(thd->lex->sql_command == SQLCOM_TRUNCATE ||
(!thd->current_stmt_binlog_row_based &&
@@ -142,7 +150,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
{
free_underlaid_joins(thd, select_lex);
thd->row_count_func= 0;
- send_ok(thd); // No matching records
+ send_ok(thd, (ha_rows) thd->row_count_func); // No matching records
DBUG_RETURN(0);
}
#endif
@@ -159,7 +167,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
delete select;
free_underlaid_joins(thd, select_lex);
thd->row_count_func= 0;
- send_ok(thd,0L);
+ send_ok(thd, (ha_rows) thd->row_count_func);
/*
We don't need to call reset_auto_increment in this case, because
mysql_truncate always gives a NULL conds argument, hence we never
@@ -252,10 +260,10 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
table->mark_columns_needed_for_delete();
while (!(error=info.read_record(&info)) && !thd->killed &&
- !thd->net.report_error)
+ ! thd->is_error())
{
- // thd->net.report_error is tested to disallow delete row on error
- if (!(select && select->skip_record())&& !thd->net.report_error )
+ // thd->is_error() is tested to disallow delete row on error
+ if (!(select && select->skip_record())&& ! thd->is_error() )
{
if (table->triggers &&
@@ -300,7 +308,8 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
else
table->file->unlock_row(); // Row failed selection, release lock on it
}
- if (thd->killed && !error)
+ killed_status= thd->killed;
+ if (killed_status != THD::NOT_KILLED || thd->is_error())
error= 1; // Aborted
if (will_batch && (loc_error= table->file->end_bulk_delete()))
{
@@ -345,13 +354,12 @@ cleanup:
thd->transaction.stmt.modified_non_trans_table= TRUE;
/* See similar binlogging code in sql_update.cc, for comments */
- if ((error < 0) || (deleted && !transactional_table))
+ if ((error < 0) || thd->transaction.stmt.modified_non_trans_table)
{
if (mysql_bin_log.is_open())
{
if (error < 0)
thd->clear_error();
-
/*
[binlog]: If 'handler::delete_all_rows()' was called and the
storage engine does not inject the rows itself, we replicate
@@ -360,7 +368,7 @@ cleanup:
*/
int log_result= thd->binlog_query(THD::ROW_QUERY_TYPE,
thd->query, thd->query_length,
- transactional_table, FALSE);
+ transactional_table, FALSE, killed_status);
if (log_result && transactional_table)
{
@@ -386,10 +394,10 @@ cleanup:
if (error < 0 || (thd->lex->ignore && !thd->is_fatal_error))
{
thd->row_count_func= deleted;
- send_ok(thd,deleted);
+ send_ok(thd, (ha_rows) thd->row_count_func);
DBUG_PRINT("info",("%ld records deleted",(long) deleted));
}
- DBUG_RETURN(error >= 0 || thd->net.report_error);
+ DBUG_RETURN(error >= 0 || thd->is_error());
}
@@ -541,7 +549,7 @@ bool mysql_multi_delete_prepare(THD *thd)
multi_delete::multi_delete(TABLE_LIST *dt, uint num_of_tables_arg)
: delete_tables(dt), deleted(0), found(0),
num_of_tables(num_of_tables_arg), error(0),
- do_delete(0), transactional_tables(0), normal_tables(0)
+ do_delete(0), transactional_tables(0), normal_tables(0), error_handled(0)
{
tempfiles= (Unique **) sql_calloc(sizeof(Unique *) * num_of_tables);
}
@@ -720,12 +728,14 @@ void multi_delete::send_error(uint errcode,const char *err)
/* First send error what ever it is ... */
my_message(errcode, err, MYF(0));
- /* If nothing deleted return */
- if (!deleted)
+ /* the error was handled or nothing deleted and no side effects return */
+ if (error_handled ||
+ !thd->transaction.stmt.modified_non_trans_table && !deleted)
DBUG_VOID_RETURN;
/* Something already deleted so we have to invalidate cache */
- query_cache_invalidate3(thd, delete_tables, 1);
+ if (deleted)
+ query_cache_invalidate3(thd, delete_tables, 1);
/*
If rows from the first table only has been deleted and it is
@@ -745,12 +755,30 @@ void multi_delete::send_error(uint errcode,const char *err)
*/
error= 1;
send_eof();
+ DBUG_ASSERT(error_handled);
+ DBUG_VOID_RETURN;
+ }
+
+ if (thd->transaction.stmt.modified_non_trans_table)
+ {
+ /*
+ there is only side effects; to binlog with the error
+ */
+ if (mysql_bin_log.is_open())
+ {
+ thd->binlog_query(THD::ROW_QUERY_TYPE,
+ thd->query, thd->query_length,
+ transactional_tables, FALSE);
+ }
+ thd->transaction.all.modified_non_trans_table= true;
}
- DBUG_ASSERT(!normal_tables || !deleted || thd->transaction.stmt.modified_non_trans_table);
+ DBUG_ASSERT(!normal_tables || !deleted ||
+ thd->transaction.stmt.modified_non_trans_table);
DBUG_VOID_RETURN;
}
+
/*
Do delete from other tables.
Returns values:
@@ -843,6 +871,7 @@ int multi_delete::do_deletes()
bool multi_delete::send_eof()
{
+ THD::killed_state killed_status= THD::NOT_KILLED;
thd->proc_info="deleting from reference tables";
/* Does deletes for the last n - 1 tables, returns 0 if ok */
@@ -850,7 +879,7 @@ bool multi_delete::send_eof()
/* compute a total error to know if something failed */
local_error= local_error || error;
-
+ killed_status= (local_error == 0)? THD::NOT_KILLED : thd->killed;
/* reset used flags */
thd->proc_info="end";
@@ -862,7 +891,9 @@ bool multi_delete::send_eof()
{
query_cache_invalidate3(thd, delete_tables, 1);
}
- if ((local_error == 0) || (deleted && normal_tables))
+ DBUG_ASSERT(!normal_tables || !deleted ||
+ thd->transaction.stmt.modified_non_trans_table);
+ if ((local_error == 0) || thd->transaction.stmt.modified_non_trans_table)
{
if (mysql_bin_log.is_open())
{
@@ -870,7 +901,7 @@ bool multi_delete::send_eof()
thd->clear_error();
if (thd->binlog_query(THD::ROW_QUERY_TYPE,
thd->query, thd->query_length,
- transactional_tables, FALSE) &&
+ transactional_tables, FALSE, killed_status) &&
!normal_tables)
{
local_error=1; // Log write failed: roll back the SQL statement
@@ -879,7 +910,8 @@ bool multi_delete::send_eof()
if (thd->transaction.stmt.modified_non_trans_table)
thd->transaction.all.modified_non_trans_table= TRUE;
}
- DBUG_ASSERT(!normal_tables || !deleted || thd->transaction.stmt.modified_non_trans_table);
+ if (local_error != 0)
+ error_handled= TRUE; // to force early leave from ::send_error()
/* Commit or rollback the current SQL statement */
if (transactional_tables)
@@ -889,7 +921,7 @@ bool multi_delete::send_eof()
if (!local_error)
{
thd->row_count_func= deleted;
- ::send_ok(thd, deleted);
+ ::send_ok(thd, (ha_rows) thd->row_count_func);
}
return 0;
}
diff --git a/sql/sql_error.cc b/sql/sql_error.cc
index 8bdb2e59ed5..89cff73d153 100644
--- a/sql/sql_error.cc
+++ b/sql/sql_error.cc
@@ -137,7 +137,7 @@ MYSQL_ERROR *push_warning(THD *thd, MYSQL_ERROR::enum_warning_level level,
level= MYSQL_ERROR::WARN_LEVEL_ERROR;
}
- if (thd->handle_error(code, level))
+ if (thd->handle_error(code, msg, level))
DBUG_RETURN(NULL);
if (thd->spcont &&
diff --git a/sql/sql_handler.cc b/sql/sql_handler.cc
index 1adce48c539..a4ba6f1140b 100644
--- a/sql/sql_handler.cc
+++ b/sql/sql_handler.cc
@@ -65,14 +65,6 @@
static enum enum_ha_read_modes rkey_to_rnext[]=
{ RNEXT_SAME, RNEXT, RPREV, RNEXT, RPREV, RNEXT, RPREV, RPREV };
-#define HANDLER_TABLES_HACK(thd) { \
- TABLE *tmp=thd->open_tables; \
- thd->open_tables=thd->handler_tables; \
- thd->handler_tables=tmp; }
-
-static int mysql_ha_flush_table(THD *thd, TABLE **table_ptr, uint mode_flags);
-
-
/*
Get hash key and hash key length.
@@ -124,13 +116,15 @@ static void mysql_ha_hash_free(TABLE_LIST *tables)
@param thd Thread identifier.
@param tables A list of tables with the first entry to close.
+ @param is_locked If LOCK_open is locked.
@note Though this function takes a list of tables, only the first list entry
will be closed.
- @note Broadcasts refresh if it closed the table.
+ @note Broadcasts refresh if it closed a table with old version.
*/
-static void mysql_ha_close_table(THD *thd, TABLE_LIST *tables)
+static void mysql_ha_close_table(THD *thd, TABLE_LIST *tables,
+ bool is_locked)
{
TABLE **table_ptr;
@@ -148,13 +142,23 @@ static void mysql_ha_close_table(THD *thd, TABLE_LIST *tables)
if (*table_ptr)
{
(*table_ptr)->file->ha_index_or_rnd_end();
- VOID(pthread_mutex_lock(&LOCK_open));
+ if (! is_locked)
+ VOID(pthread_mutex_lock(&LOCK_open));
if (close_thread_table(thd, table_ptr))
{
/* Tell threads waiting for refresh that something has happened */
broadcast_refresh();
}
- VOID(pthread_mutex_unlock(&LOCK_open));
+ if (! is_locked)
+ VOID(pthread_mutex_unlock(&LOCK_open));
+ }
+ else if (tables->table)
+ {
+ /* Must be a temporary table */
+ TABLE *table= tables->table;
+ table->file->ha_index_or_rnd_end();
+ table->query_id= thd->query_id;
+ table->open_by_handler= 0;
}
}
@@ -187,6 +191,7 @@ bool mysql_ha_open(THD *thd, TABLE_LIST *tables, bool reopen)
char *db, *name, *alias;
uint dblen, namelen, aliaslen, counter;
int error;
+ TABLE *backup_open_tables;
DBUG_ENTER("mysql_ha_open");
DBUG_PRINT("enter",("'%s'.'%s' as '%s' reopen: %d",
tables->db, tables->table_name, tables->alias,
@@ -216,16 +221,37 @@ bool mysql_ha_open(THD *thd, TABLE_LIST *tables, bool reopen)
}
/*
+ Save and reset the open_tables list so that open_tables() won't
+ be able to access (or know about) the previous list. And on return
+ from open_tables(), thd->open_tables will contain only the opened
+ table.
+
+ The thd->handler_tables list is kept as-is to avoid deadlocks if
+ open_table(), called by open_tables(), needs to back-off because
+ of a pending name-lock on the table being opened.
+
+ See open_table() back-off comments for more details.
+ */
+ backup_open_tables= thd->open_tables;
+ thd->open_tables= NULL;
+
+ /*
open_tables() will set 'tables->table' if successful.
It must be NULL for a real open when calling open_tables().
*/
DBUG_ASSERT(! tables->table);
- HANDLER_TABLES_HACK(thd);
/* for now HANDLER can be used only for real TABLES */
tables->required_type= FRMTYPE_TABLE;
error= open_tables(thd, &tables, &counter, 0);
- HANDLER_TABLES_HACK(thd);
+ /* restore the state and merge the opened table into handler_tables list */
+ if (thd->open_tables)
+ {
+ thd->open_tables->next= thd->handler_tables;
+ thd->handler_tables= thd->open_tables;
+ }
+
+ thd->open_tables= backup_open_tables;
if (error)
goto err;
@@ -265,6 +291,12 @@ bool mysql_ha_open(THD *thd, TABLE_LIST *tables, bool reopen)
goto err;
}
+ /*
+ If it's a temp table, don't reset table->query_id as the table is
+ being used by this handler. Otherwise, no meaning at all.
+ */
+ tables->table->open_by_handler= 1;
+
if (! reopen)
send_ok(thd);
DBUG_PRINT("exit",("OK"));
@@ -274,7 +306,7 @@ err:
if (hash_tables)
my_free((char*) hash_tables, MYF(0));
if (tables->table)
- mysql_ha_close_table(thd, tables);
+ mysql_ha_close_table(thd, tables, FALSE);
DBUG_PRINT("exit",("ERROR"));
DBUG_RETURN(TRUE);
}
@@ -308,7 +340,7 @@ bool mysql_ha_close(THD *thd, TABLE_LIST *tables)
(uchar*) tables->alias,
strlen(tables->alias) + 1)))
{
- mysql_ha_close_table(thd, hash_tables);
+ mysql_ha_close_table(thd, hash_tables, FALSE);
hash_delete(&thd->handler_tables_hash, (uchar*) hash_tables);
}
else
@@ -351,7 +383,7 @@ bool mysql_ha_read(THD *thd, TABLE_LIST *tables,
ha_rows select_limit_cnt, ha_rows offset_limit_cnt)
{
TABLE_LIST *hash_tables;
- TABLE *table;
+ TABLE *table, *backup_open_tables;
MYSQL_LOCK *lock;
List<Item> list;
Protocol *protocol= thd->protocol;
@@ -361,7 +393,7 @@ bool mysql_ha_read(THD *thd, TABLE_LIST *tables,
uint num_rows;
uchar *key;
uint key_len;
- bool not_used;
+ bool need_reopen;
DBUG_ENTER("mysql_ha_read");
DBUG_PRINT("enter",("'%s'.'%s' as '%s'",
tables->db, tables->table_name, tables->alias));
@@ -375,6 +407,7 @@ bool mysql_ha_read(THD *thd, TABLE_LIST *tables,
List_iterator<Item> it(list);
it++;
+retry:
if ((hash_tables= (TABLE_LIST*) hash_search(&thd->handler_tables_hash,
(uchar*) tables->alias,
strlen(tables->alias) + 1)))
@@ -428,9 +461,34 @@ bool mysql_ha_read(THD *thd, TABLE_LIST *tables,
}
tables->table=table;
- HANDLER_TABLES_HACK(thd);
- lock= mysql_lock_tables(thd, &tables->table, 1, 0, &not_used);
- HANDLER_TABLES_HACK(thd);
+ /* save open_tables state */
+ backup_open_tables= thd->open_tables;
+ /*
+ mysql_lock_tables() needs thd->open_tables to be set correctly to
+ be able to handle aborts properly. When the abort happens, it's
+ safe to not protect thd->handler_tables because it won't close any
+ tables.
+ */
+ thd->open_tables= thd->handler_tables;
+
+ lock= mysql_lock_tables(thd, &tables->table, 1,
+ MYSQL_LOCK_NOTIFY_IF_NEED_REOPEN, &need_reopen);
+
+ /* restore previous context */
+ thd->open_tables= backup_open_tables;
+
+ if (need_reopen)
+ {
+ mysql_ha_close_table(thd, tables, FALSE);
+ hash_tables->table= NULL;
+ /*
+ The lock might have been aborted, we need to manually reset
+ thd->some_tables_deleted because handler's tables are closed
+ in a non-standard way. Otherwise we might loop indefinitely.
+ */
+ thd->some_tables_deleted= 0;
+ goto retry;
+ }
if (!lock)
goto err0; // mysql_lock_tables() printed error message already
@@ -612,163 +670,130 @@ err0:
}
-/*
- Flush (close) a list of HANDLER tables.
-
- SYNOPSIS
- mysql_ha_flush()
- thd Thread identifier.
- tables The list of tables to close. If NULL,
- close all HANDLER tables [marked as flushed].
- mode_flags MYSQL_HA_CLOSE_FINAL finally close the table.
- MYSQL_HA_REOPEN_ON_USAGE mark for reopen.
- MYSQL_HA_FLUSH_ALL flush all tables, not only
- those marked for flush.
- is_locked If LOCK_open is locked.
-
- DESCRIPTION
- The list of HANDLER tables may be NULL, in which case all HANDLER
- tables are closed (if MYSQL_HA_FLUSH_ALL) is set.
- If 'tables' is NULL and MYSQL_HA_FLUSH_ALL is not set,
- all HANDLER tables marked for flush are closed.
- Broadcasts refresh for every table closed.
+/**
+ Scan the handler tables hash for matching tables.
- NOTE
- Since mysql_ha_flush() is called when the base table has to be closed,
- we compare real table names, not aliases. Hence, database names matter.
+ @param thd Thread identifier.
+ @param tables The list of tables to remove.
- RETURN
- 0 ok
+ @return Pointer to head of linked list (TABLE_LIST::next_local) of matching
+ TABLE_LIST elements from handler_tables_hash. Otherwise, NULL if no
+ table was matched.
*/
-int mysql_ha_flush(THD *thd, TABLE_LIST *tables, uint mode_flags,
- bool is_locked)
+static TABLE_LIST *mysql_ha_find(THD *thd, TABLE_LIST *tables)
{
- TABLE_LIST *tmp_tables;
- TABLE **table_ptr;
- bool did_lock= FALSE;
- DBUG_ENTER("mysql_ha_flush");
- DBUG_PRINT("enter", ("tables: 0x%lx mode_flags: 0x%02x",
- (long) tables, mode_flags));
+ TABLE_LIST *hash_tables, *head= NULL, *first= tables;
+ DBUG_ENTER("mysql_ha_find");
- if (tables)
+ /* search for all handlers with matching table names */
+ for (uint i= 0; i < thd->handler_tables_hash.records; i++)
{
- /* Close all tables in the list. */
- for (tmp_tables= tables ; tmp_tables; tmp_tables= tmp_tables->next_local)
+ hash_tables= (TABLE_LIST*) hash_element(&thd->handler_tables_hash, i);
+ for (tables= first; tables; tables= tables->next_local)
{
- DBUG_PRINT("info-in-tables-list",("'%s'.'%s' as '%s'",
- tmp_tables->db, tmp_tables->table_name,
- tmp_tables->alias));
- /* Close all currently open handler tables with the same base table. */
- table_ptr= &(thd->handler_tables);
- while (*table_ptr)
- {
- if ((!*tmp_tables->db ||
- !my_strcasecmp(&my_charset_latin1, (*table_ptr)->s->db.str,
- tmp_tables->db)) &&
- ! my_strcasecmp(&my_charset_latin1,
- (*table_ptr)->s->table_name.str,
- tmp_tables->table_name))
- {
- DBUG_PRINT("info",("*table_ptr '%s'.'%s' as '%s'",
- (*table_ptr)->s->db.str,
- (*table_ptr)->s->table_name.str,
- (*table_ptr)->alias));
- /* The first time it is required, lock for close_thread_table(). */
- if (! did_lock && ! is_locked)
- {
- VOID(pthread_mutex_lock(&LOCK_open));
- did_lock= TRUE;
- }
- mysql_ha_flush_table(thd, table_ptr, mode_flags);
- continue;
- }
- table_ptr= &(*table_ptr)->next;
- }
- /* end of handler_tables list */
+ if ((! *tables->db ||
+ ! my_strcasecmp(&my_charset_latin1, hash_tables->db, tables->db)) &&
+ ! my_strcasecmp(&my_charset_latin1, hash_tables->table_name,
+ tables->table_name))
+ break;
}
- /* end of flush tables list */
- }
- else
- {
- /* Close all currently open tables [which are marked for flush]. */
- table_ptr= &(thd->handler_tables);
- while (*table_ptr)
+ if (tables)
{
- if ((mode_flags & MYSQL_HA_FLUSH_ALL) ||
- (*table_ptr)->needs_reopen_or_name_lock())
- {
- /* The first time it is required, lock for close_thread_table(). */
- if (! did_lock && ! is_locked)
- {
- VOID(pthread_mutex_lock(&LOCK_open));
- did_lock= TRUE;
- }
- mysql_ha_flush_table(thd, table_ptr, mode_flags);
- continue;
- }
- table_ptr= &(*table_ptr)->next;
+ hash_tables->next_local= head;
+ head= hash_tables;
}
}
- /* Release the lock if it was taken by this function. */
- if (did_lock)
- VOID(pthread_mutex_unlock(&LOCK_open));
+ DBUG_RETURN(head);
+}
+
+
+/**
+ Remove matching tables from the HANDLER's hash table.
+
+ @param thd Thread identifier.
+ @param tables The list of tables to remove.
+ @param is_locked If LOCK_open is locked.
+
+ @note Broadcasts refresh if it closed a table with old version.
+*/
+
+void mysql_ha_rm_tables(THD *thd, TABLE_LIST *tables, bool is_locked)
+{
+ TABLE_LIST *hash_tables, *next;
+ DBUG_ENTER("mysql_ha_rm_tables");
+
+ DBUG_ASSERT(tables);
+
+ hash_tables= mysql_ha_find(thd, tables);
- DBUG_RETURN(0);
+ while (hash_tables)
+ {
+ next= hash_tables->next_local;
+ if (hash_tables->table)
+ mysql_ha_close_table(thd, hash_tables, is_locked);
+ hash_delete(&thd->handler_tables_hash, (uchar*) hash_tables);
+ hash_tables= next;
+ }
+
+ DBUG_VOID_RETURN;
}
-/*
- Flush (close) a table.
- SYNOPSIS
- mysql_ha_flush_table()
- thd Thread identifier.
- table The table to close.
- mode_flags MYSQL_HA_CLOSE_FINAL finally close the table.
- MYSQL_HA_REOPEN_ON_USAGE mark for reopen.
+/**
+ Flush (close and mark for re-open) all tables that should be should
+ be reopen.
- DESCRIPTION
- Broadcasts refresh if it closed the table.
- The caller must lock LOCK_open.
+ @param thd Thread identifier.
- RETURN
- 0 ok
+ @note Broadcasts refresh if it closed a table with old version.
*/
-static int mysql_ha_flush_table(THD *thd, TABLE **table_ptr, uint mode_flags)
+void mysql_ha_flush(THD *thd)
{
- TABLE_LIST *hash_tables;
- TABLE *table= *table_ptr;
- DBUG_ENTER("mysql_ha_flush_table");
- DBUG_PRINT("enter",("'%s'.'%s' as '%s' flags: 0x%02x",
- table->s->db.str, table->s->table_name.str,
- table->alias, mode_flags));
+ TABLE_LIST *hash_tables;
+ DBUG_ENTER("mysql_ha_flush");
- if ((hash_tables= (TABLE_LIST*) hash_search(&thd->handler_tables_hash,
- (uchar*) table->alias,
- strlen(table->alias) + 1)))
+ safe_mutex_assert_owner(&LOCK_open);
+
+ for (uint i= 0; i < thd->handler_tables_hash.records; i++)
{
- if (! (mode_flags & MYSQL_HA_REOPEN_ON_USAGE))
- {
- /* This is a final close. Remove from hash. */
- hash_delete(&thd->handler_tables_hash, (uchar*) hash_tables);
- }
- else
+ hash_tables= (TABLE_LIST*) hash_element(&thd->handler_tables_hash, i);
+ if (hash_tables->table && hash_tables->table->needs_reopen_or_name_lock())
{
+ mysql_ha_close_table(thd, hash_tables, TRUE);
/* Mark table as closed, ready for re-open. */
hash_tables->table= NULL;
}
- }
+ }
- safe_mutex_assert_owner(&LOCK_open);
- (*table_ptr)->file->ha_index_or_rnd_end();
- safe_mutex_assert_owner(&LOCK_open);
- if (close_thread_table(thd, table_ptr))
+ DBUG_VOID_RETURN;
+}
+
+
+/**
+ Close all HANDLER's tables.
+
+ @param thd Thread identifier.
+
+ @note Broadcasts refresh if it closed a table with old version.
+*/
+
+void mysql_ha_cleanup(THD *thd)
+{
+ TABLE_LIST *hash_tables;
+ DBUG_ENTER("mysql_ha_cleanup");
+
+ for (uint i= 0; i < thd->handler_tables_hash.records; i++)
{
- /* Tell threads waiting for refresh that something has happened */
- broadcast_refresh();
- }
+ hash_tables= (TABLE_LIST*) hash_element(&thd->handler_tables_hash, i);
+ if (hash_tables->table)
+ mysql_ha_close_table(thd, hash_tables, FALSE);
+ }
+
+ hash_free(&thd->handler_tables_hash);
- DBUG_RETURN(0);
+ DBUG_VOID_RETURN;
}
+
diff --git a/sql/sql_help.cc b/sql/sql_help.cc
index c1962c8c650..0d633ce86ac 100644
--- a/sql/sql_help.cc
+++ b/sql/sql_help.cc
@@ -528,7 +528,7 @@ int send_variant_2_list(MEM_ROOT *mem_root, Protocol *protocol,
List_iterator<String> it(*names);
for (pos= pointers; pos!=end; (*pos++= it++));
- qsort(pointers,names->elements,sizeof(String*),string_ptr_cmp);
+ my_qsort(pointers,names->elements,sizeof(String*),string_ptr_cmp);
for (pos= pointers; pos!=end; pos++)
{
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index 0774b5ae42e..3b54252cba5 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -189,11 +189,9 @@ static int check_insert_fields(THD *thd, TABLE_LIST *table_list,
return -1;
}
#ifndef NO_EMBEDDED_ACCESS_CHECKS
- Field_iterator_table field_it;
- field_it.set_table(table);
- if (check_grant_all_columns(thd, INSERT_ACL, &table->grant,
- table->s->db.str, table->s->table_name.str,
- &field_it))
+ Field_iterator_table_ref field_it;
+ field_it.set(table_list);
+ if (check_grant_all_columns(thd, INSERT_ACL, &field_it))
return -1;
#endif
clear_timestamp_auto_bits(table->timestamp_field_type,
@@ -576,7 +574,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
bool log_on= ((thd->options & OPTION_BIN_LOG) ||
(!(thd->security_ctx->master_access & SUPER_ACL)));
#endif
- thr_lock_type lock_type = table_list->lock_type;
+ thr_lock_type lock_type;
Item *unused_conds= 0;
DBUG_ENTER("mysql_insert");
@@ -611,6 +609,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
if (open_and_lock_tables(thd, table_list))
DBUG_RETURN(TRUE);
}
+ lock_type= table_list->lock_type;
thd->proc_info="init";
thd->used_tables=0;
@@ -628,7 +627,6 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
/* mysql_prepare_insert set table_list->table if it was not set */
table= table_list->table;
- lock_type= table_list->lock_type;
context= &thd->lex->select_lex.context;
/*
@@ -740,7 +738,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
table->triggers,
TRG_EVENT_INSERT))
{
- if (values_list.elements != 1 && !thd->net.report_error)
+ if (values_list.elements != 1 && ! thd->is_error())
{
info.records++;
continue;
@@ -771,7 +769,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
table->triggers,
TRG_EVENT_INSERT))
{
- if (values_list.elements != 1 && ! thd->net.report_error)
+ if (values_list.elements != 1 && ! thd->is_error())
{
info.records++;
continue;
@@ -839,59 +837,58 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
}
transactional_table= table->file->has_transactions();
- if ((changed= (info.copied || info.deleted || info.updated)) ||
- was_insert_delayed)
+ if ((changed= (info.copied || info.deleted || info.updated)))
{
/*
Invalidate the table in the query cache if something changed.
For the transactional algorithm to work the invalidation must be
before binlog writing and ha_autocommit_or_rollback
*/
- if (changed)
- query_cache_invalidate3(thd, table_list, 1);
- if (error <= 0 || !transactional_table)
+ query_cache_invalidate3(thd, table_list, 1);
+ }
+ if (changed && error <= 0 || thd->transaction.stmt.modified_non_trans_table
+ || was_insert_delayed)
+ {
+ if (mysql_bin_log.is_open())
{
- if (mysql_bin_log.is_open())
+ if (error <= 0)
{
- if (error <= 0)
- {
- /*
- [Guilhem wrote] Temporary errors may have filled
- thd->net.last_error/errno. For example if there has
- been a disk full error when writing the row, and it was
- MyISAM, then thd->net.last_error/errno will be set to
- "disk full"... and the my_pwrite() will wait until free
- space appears, and so when it finishes then the
- write_row() was entirely successful
- */
- /* todo: consider removing */
- thd->clear_error();
- }
- /* bug#22725:
-
- A query which per-row-loop can not be interrupted with
- KILLED, like INSERT, and that does not invoke stored
- routines can be binlogged with neglecting the KILLED error.
-
- If there was no error (error == zero) until after the end of
- inserting loop the KILLED flag that appeared later can be
- disregarded since previously possible invocation of stored
- routines did not result in any error due to the KILLED. In
- such case the flag is ignored for constructing binlog event.
- */
- DBUG_ASSERT(thd->killed != THD::KILL_BAD_DATA || error > 0);
- if (thd->binlog_query(THD::ROW_QUERY_TYPE,
- thd->query, thd->query_length,
- transactional_table, FALSE,
- (error>0) ? thd->killed : THD::NOT_KILLED) &&
- transactional_table)
- {
- error=1;
- }
- }
- if (thd->transaction.stmt.modified_non_trans_table)
- thd->transaction.all.modified_non_trans_table= TRUE;
+ /*
+ [Guilhem wrote] Temporary errors may have filled
+ thd->net.last_error/errno. For example if there has
+ been a disk full error when writing the row, and it was
+ MyISAM, then thd->net.last_error/errno will be set to
+ "disk full"... and the my_pwrite() will wait until free
+ space appears, and so when it finishes then the
+ write_row() was entirely successful
+ */
+ /* todo: consider removing */
+ thd->clear_error();
+ }
+ /* bug#22725:
+
+ A query which per-row-loop can not be interrupted with
+ KILLED, like INSERT, and that does not invoke stored
+ routines can be binlogged with neglecting the KILLED error.
+
+ If there was no error (error == zero) until after the end of
+ inserting loop the KILLED flag that appeared later can be
+ disregarded since previously possible invocation of stored
+ routines did not result in any error due to the KILLED. In
+ such case the flag is ignored for constructing binlog event.
+ */
+ DBUG_ASSERT(thd->killed != THD::KILL_BAD_DATA || error > 0);
+ if (thd->binlog_query(THD::ROW_QUERY_TYPE,
+ thd->query, thd->query_length,
+ transactional_table, FALSE,
+ (error>0) ? thd->killed : THD::NOT_KILLED) &&
+ transactional_table)
+ {
+ error=1;
+ }
}
+ if (thd->transaction.stmt.modified_non_trans_table)
+ thd->transaction.all.modified_non_trans_table= TRUE;
}
DBUG_ASSERT(transactional_table || !changed ||
thd->transaction.stmt.modified_non_trans_table);
@@ -1639,6 +1636,8 @@ public:
char *record;
enum_duplicates dup;
time_t start_time;
+ ulong sql_mode;
+ bool auto_increment_field_not_null;
bool query_start_used, ignore, log_query;
bool stmt_depends_on_first_successful_insert_id_in_prev_stmt;
ulonglong first_successful_insert_id_in_prev_stmt;
@@ -1909,7 +1908,7 @@ bool delayed_get_table(THD *thd, TABLE_LIST *table_list)
thd->proc_info="got old table";
if (di->thd.killed)
{
- if (di->thd.net.report_error)
+ if (di->thd.is_error())
{
/*
Copy the error message. Note that we don't treat fatal
@@ -1940,7 +1939,7 @@ bool delayed_get_table(THD *thd, TABLE_LIST *table_list)
pthread_mutex_unlock(&di->mutex);
if (table_list->table)
{
- DBUG_ASSERT(thd->net.report_error == 0);
+ DBUG_ASSERT(! thd->is_error());
thd->di= di;
}
/* Unlock the delayed insert object after its last access. */
@@ -1949,7 +1948,7 @@ bool delayed_get_table(THD *thd, TABLE_LIST *table_list)
end_create:
pthread_mutex_unlock(&LOCK_delayed_create);
- DBUG_RETURN(thd->net.report_error);
+ DBUG_RETURN(thd->is_error());
}
@@ -2141,6 +2140,9 @@ int write_delayed(THD *thd, TABLE *table, enum_duplicates duplic,
/* Copy session variables. */
row->auto_increment_increment= thd->variables.auto_increment_increment;
row->auto_increment_offset= thd->variables.auto_increment_offset;
+ row->sql_mode= thd->variables.sql_mode;
+ row->auto_increment_field_not_null= table->auto_increment_field_not_null;
+
/* Copy the next forced auto increment value, if any. */
if ((forced_auto_inc= thd->auto_inc_intervals_forced.get_next()))
{
@@ -2264,8 +2266,23 @@ pthread_handler_t handle_delayed_insert(void *arg)
goto err;
}
- /* open table */
- if (!(di->table=open_ltable(thd, &di->table_list, TL_WRITE_DELAYED, 0)))
+ /*
+ Open table requires an initialized lex in case the table is
+ partitioned. The .frm file contains a partial SQL string which is
+ parsed using a lex, that depends on initialized thd->lex.
+ */
+ lex_start(thd);
+ thd->lex->sql_command= SQLCOM_INSERT; // For innodb::store_lock()
+ /*
+ Statement-based replication of INSERT DELAYED has problems with RAND()
+ and user vars, so in mixed mode we go to row-based.
+ */
+ thd->lex->set_stmt_unsafe();
+ thd->set_current_stmt_binlog_row_based_if_mixed();
+
+ /* Open table */
+ if (!(di->table= open_n_lock_single_table(thd, &di->table_list,
+ TL_WRITE_DELAYED)))
{
thd->fatal_error(); // Abort waiting inserts
goto err;
@@ -2555,10 +2572,13 @@ bool Delayed_insert::handle_inserts(void)
thd.stmt_depends_on_first_successful_insert_id_in_prev_stmt=
row->stmt_depends_on_first_successful_insert_id_in_prev_stmt;
table->timestamp_field_type= row->timestamp_field_type;
+ table->auto_increment_field_not_null= row->auto_increment_field_not_null;
/* Copy the session variables. */
thd.variables.auto_increment_increment= row->auto_increment_increment;
thd.variables.auto_increment_offset= row->auto_increment_offset;
+ thd.variables.sql_mode= row->sql_mode;
+
/* Copy a forced insert_id, if any. */
if (row->forced_insert_id)
{
@@ -2891,14 +2911,14 @@ select_insert::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
Is table which we are changing used somewhere in other parts of
query
*/
- if (!(lex->current_select->options & OPTION_BUFFER_RESULT) &&
- unique_table(thd, table_list, table_list->next_global, 0))
+ if (unique_table(thd, table_list, table_list->next_global, 0))
{
/* Using same table for INSERT and SELECT */
lex->current_select->options|= OPTION_BUFFER_RESULT;
lex->current_select->join->select_options|= OPTION_BUFFER_RESULT;
}
- else if (!thd->prelocked_mode)
+ else if (!(lex->current_select->options & OPTION_BUFFER_RESULT) &&
+ !thd->prelocked_mode)
{
/*
We must not yet prepare the result table if it is the same as one of the
@@ -3005,7 +3025,7 @@ bool select_insert::send_data(List<Item> &values)
thd->count_cuted_fields= CHECK_FIELD_WARN; // Calculate cuted fields
store_values(values);
thd->count_cuted_fields= CHECK_FIELD_IGNORE;
- if (thd->net.report_error)
+ if (thd->is_error())
DBUG_RETURN(1);
if (table_list) // Not CREATE ... SELECT
{
@@ -3079,6 +3099,7 @@ bool select_insert::send_eof()
bool const trans_table= table->file->has_transactions();
ulonglong id;
bool changed;
+ THD::killed_state killed_status= thd->killed;
DBUG_ENTER("select_insert::send_eof");
DBUG_PRINT("enter", ("trans_table=%d, table_type='%s'",
trans_table, table->file->table_type()));
@@ -3112,7 +3133,7 @@ bool select_insert::send_eof()
thd->clear_error();
thd->binlog_query(THD::ROW_QUERY_TYPE,
thd->query, thd->query_length,
- trans_table, FALSE);
+ trans_table, FALSE, killed_status);
}
/*
We will call ha_autocommit_or_rollback() also for
@@ -3164,6 +3185,7 @@ void select_insert::abort() {
*/
if (table)
{
+ bool changed, transactional_table;
/*
If we are not in prelocked mode, we end the bulk insert started
before.
@@ -3185,20 +3207,20 @@ void select_insert::abort() {
If table creation failed, the number of rows modified will also be
zero, so no check for that is made.
*/
- if (info.copied || info.deleted || info.updated)
+ changed= (info.copied || info.deleted || info.updated);
+ transactional_table= table->file->has_transactions();
+ if (thd->transaction.stmt.modified_non_trans_table)
{
- DBUG_ASSERT(table != NULL);
- if (!table->file->has_transactions())
- {
if (mysql_bin_log.is_open())
thd->binlog_query(THD::ROW_QUERY_TYPE, thd->query, thd->query_length,
- table->file->has_transactions(), FALSE);
- if (!thd->current_stmt_binlog_row_based && !table->s->tmp_table &&
- !can_rollback_data())
+ transactional_table, FALSE);
+ if (!thd->current_stmt_binlog_row_based && !can_rollback_data())
thd->transaction.all.modified_non_trans_table= TRUE;
- query_cache_invalidate3(thd, table, 1);
- }
+ if (changed)
+ query_cache_invalidate3(thd, table, 1);
}
+ DBUG_ASSERT(transactional_table || !changed ||
+ thd->transaction.stmt.modified_non_trans_table);
table->file->ha_release_auto_increment();
}
@@ -3293,7 +3315,7 @@ static TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info,
tmp_table.alias= 0;
tmp_table.timestamp_field= 0;
tmp_table.s= &share;
- init_tmp_table_share(&share, "", 0, "", "");
+ init_tmp_table_share(thd, &share, "", 0, "", "");
tmp_table.s->db_create_options=0;
tmp_table.s->blob_ptr_size= portable_sizeof_char_ptr;
@@ -3307,7 +3329,10 @@ static TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info,
Create_field *cr_field;
Field *field, *def_field;
if (item->type() == Item::FUNC_ITEM)
- field= item->tmp_table_field(&tmp_table);
+ if (item->result_type() != STRING_RESULT)
+ field= item->tmp_table_field(&tmp_table);
+ else
+ field= item->tmp_table_field_from_field_type(&tmp_table, 0);
else
field= create_tmp_field(thd, &tmp_table, item, item->type(),
(Item ***) 0, &tmp_field, &def_field, 0, 0, 0, 0,
@@ -3385,7 +3410,7 @@ static TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info,
it preparable for open. But let us do close_temporary_table() here
just in case.
*/
- close_temporary_table(thd, create_table);
+ drop_temporary_table(thd, create_table);
}
}
}
@@ -3419,6 +3444,7 @@ static TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info,
int
select_create::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
{
+ MYSQL_LOCK *extra_lock= NULL;
DBUG_ENTER("select_create::prepare");
TABLEOP_HOOKS *hook_ptr= NULL;
@@ -3497,9 +3523,21 @@ select_create::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
if (!(table= create_table_from_items(thd, create_info, create_table,
alter_info, &values,
- &thd->extra_lock, hook_ptr)))
+ &extra_lock, hook_ptr)))
DBUG_RETURN(-1); // abort() deletes table
+ if (extra_lock)
+ {
+ DBUG_ASSERT(m_plock == NULL);
+
+ if (create_info->options & HA_LEX_CREATE_TMP_TABLE)
+ m_plock= &m_lock;
+ else
+ m_plock= &thd->extra_lock;
+
+ *m_plock= extra_lock;
+ }
+
if (table->s->fields < values.elements)
{
my_error(ER_WRONG_VALUE_COUNT_ON_ROW, MYF(0), 1);
@@ -3640,10 +3678,11 @@ bool select_create::send_eof()
}
table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY);
table->file->extra(HA_EXTRA_WRITE_CANNOT_REPLACE);
- if (thd->extra_lock)
+ if (m_plock)
{
- mysql_unlock_tables(thd, thd->extra_lock);
- thd->extra_lock=0;
+ mysql_unlock_tables(thd, *m_plock);
+ *m_plock= NULL;
+ m_plock= NULL;
}
}
return tmp;
@@ -3681,10 +3720,11 @@ void select_create::abort()
if (thd->current_stmt_binlog_row_based)
ha_rollback_stmt(thd);
- if (thd->extra_lock)
+ if (m_plock)
{
- mysql_unlock_tables(thd, thd->extra_lock);
- thd->extra_lock=0;
+ mysql_unlock_tables(thd, *m_plock);
+ *m_plock= NULL;
+ m_plock= NULL;
}
if (table)
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index 0a5f83af400..7d6f21cad05 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -338,6 +338,7 @@ void lex_start(THD *thd)
lex->query_tables= 0;
lex->reset_query_tables_list(FALSE);
lex->expr_allows_subselect= TRUE;
+ lex->use_only_table_context= FALSE;
lex->name.str= 0;
lex->name.length= 0;
@@ -362,6 +363,7 @@ void lex_start(THD *thd)
lex->server_options.owner= 0;
lex->server_options.port= -1;
+ lex->is_lex_started= TRUE;
DBUG_VOID_RETURN;
}
@@ -2138,7 +2140,7 @@ void Query_tables_list::destroy_query_tables_list()
st_lex::st_lex()
:result(0), yacc_yyss(0), yacc_yyvs(0),
- sql_command(SQLCOM_END), option_type(OPT_DEFAULT)
+ sql_command(SQLCOM_END), option_type(OPT_DEFAULT), is_lex_started(0)
{
my_init_dynamic_array2(&plugins, sizeof(plugin_ref),
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index 08104769704..cdae7449cc7 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -78,7 +78,6 @@ enum enum_sql_command {
SQLCOM_LOAD,SQLCOM_SET_OPTION,SQLCOM_LOCK_TABLES,SQLCOM_UNLOCK_TABLES,
SQLCOM_GRANT,
SQLCOM_CHANGE_DB, SQLCOM_CREATE_DB, SQLCOM_DROP_DB, SQLCOM_ALTER_DB,
- SQLCOM_RENAME_DB,
SQLCOM_REPAIR, SQLCOM_REPLACE, SQLCOM_REPLACE_SELECT,
SQLCOM_CREATE_FUNCTION, SQLCOM_DROP_FUNCTION,
SQLCOM_REVOKE,SQLCOM_OPTIMIZE, SQLCOM_CHECK,
@@ -117,6 +116,7 @@ enum enum_sql_command {
SQLCOM_CREATE_EVENT, SQLCOM_ALTER_EVENT, SQLCOM_DROP_EVENT,
SQLCOM_SHOW_CREATE_EVENT, SQLCOM_SHOW_EVENTS,
SQLCOM_SHOW_CREATE_TRIGGER,
+ SQLCOM_ALTER_DB_UPGRADE,
/* This should be the last !!! */
@@ -259,6 +259,8 @@ public:
key_name.str= str;
key_name.length= length;
}
+
+ void print(THD *thd, String *str);
};
/*
@@ -1550,7 +1552,6 @@ typedef struct st_lex : public Query_tables_list
required a local context, the parser pops the top-most context.
*/
List<Name_resolution_context> context_stack;
- List<LEX_STRING> db_list;
SQL_LIST proc_list, auxiliary_table_list, save_list;
Create_field *last_field;
@@ -1615,7 +1616,7 @@ typedef struct st_lex : public Query_tables_list
uint8 create_view_algorithm;
uint8 create_view_check;
bool drop_if_exists, drop_temporary, local_file, one_shot_set;
-
+ bool autocommit;
bool verbose, no_write_to_binlog;
bool tx_chain, tx_release;
@@ -1693,6 +1694,14 @@ typedef struct st_lex : public Query_tables_list
*/
const char *fname_start;
const char *fname_end;
+
+ /**
+ During name resolution search only in the table list given by
+ Name_resolution_context::first_name_resolution_table and
+ Name_resolution_context::last_name_resolution_table
+ (see Item_field::fix_fields()).
+ */
+ bool use_only_table_context;
LEX_STRING view_body_utf8;
@@ -1703,6 +1712,7 @@ typedef struct st_lex : public Query_tables_list
st_alter_tablespace *alter_tablespace_info;
bool escape_used;
+ bool is_lex_started; /* If lex_start() did run. For debugging. */
st_lex();
@@ -1824,11 +1834,11 @@ typedef struct st_lex : public Query_tables_list
struct st_lex_local: public st_lex
{
- static void *operator new(size_t size)
+ static void *operator new(size_t size) throw()
{
return sql_alloc(size);
}
- static void *operator new(size_t size, MEM_ROOT *mem_root)
+ static void *operator new(size_t size, MEM_ROOT *mem_root) throw()
{
return (void*) alloc_root(mem_root, (uint) size);
}
diff --git a/sql/sql_load.cc b/sql/sql_load.cc
index 8bbe1e413b3..c96fbb80b0c 100644
--- a/sql/sql_load.cc
+++ b/sql/sql_load.cc
@@ -85,7 +85,8 @@ static int read_sep_field(THD *thd, COPY_INFO &info, TABLE_LIST *table_list,
#ifndef EMBEDDED_LIBRARY
static bool write_execute_load_query_log_event(THD *thd,
bool duplicates, bool ignore,
- bool transactional_table);
+ bool transactional_table,
+ THD::killed_state killed_status);
#endif /* EMBEDDED_LIBRARY */
/*
@@ -134,6 +135,7 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
char *tdb= thd->db ? thd->db : db; // Result is never null
ulong skip_lines= ex->skip_lines;
bool transactional_table;
+ THD::killed_state killed_status= THD::NOT_KILLED;
DBUG_ENTER("mysql_load");
#ifdef EMBEDDED_LIBRARY
@@ -403,7 +405,16 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
free_blobs(table); /* if pack_blob was used */
table->copy_blobs=0;
thd->count_cuted_fields= CHECK_FIELD_IGNORE;
-
+ /*
+ simulated killing in the middle of per-row loop
+ must be effective for binlogging
+ */
+ DBUG_EXECUTE_IF("simulate_kill_bug27571",
+ {
+ error=1;
+ thd->killed= THD::KILL_QUERY;
+ };);
+ killed_status= (error == 0)? THD::NOT_KILLED : thd->killed;
/*
We must invalidate the table in query cache before binlog writing and
ha_autocommit_...
@@ -445,9 +456,10 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
/* If the file was not empty, wrote_create_file is true */
if (lf_info.wrote_create_file)
{
- if ((info.copied || info.deleted) && !transactional_table)
+ if (thd->transaction.stmt.modified_non_trans_table)
write_execute_load_query_log_event(thd, handle_duplicates,
- ignore, transactional_table);
+ ignore, transactional_table,
+ killed_status);
else
{
Delete_file_log_event d(thd, db, transactional_table);
@@ -492,8 +504,8 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
read_info.end_io_cache();
if (lf_info.wrote_create_file)
{
- write_execute_load_query_log_event(thd, handle_duplicates,
- ignore, transactional_table);
+ write_execute_load_query_log_event(thd, handle_duplicates, ignore,
+ transactional_table,killed_status);
}
}
}
@@ -523,7 +535,8 @@ err:
/* Not a very useful function; just to avoid duplication of code */
static bool write_execute_load_query_log_event(THD *thd,
bool duplicates, bool ignore,
- bool transactional_table)
+ bool transactional_table,
+ THD::killed_state killed_err_arg)
{
Execute_load_query_log_event
e(thd, thd->query, thd->query_length,
@@ -531,7 +544,7 @@ static bool write_execute_load_query_log_event(THD *thd,
(char*)thd->lex->fname_end - (char*)thd->query,
(duplicates == DUP_REPLACE) ? LOAD_DUP_REPLACE :
(ignore ? LOAD_DUP_IGNORE : LOAD_DUP_ERROR),
- transactional_table, FALSE);
+ transactional_table, FALSE, killed_err_arg);
e.flags|= LOG_EVENT_UPDATE_TABLE_MAP_VERSION_F;
return mysql_bin_log.write(&e);
}
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index ad0ba27651f..38cd46dec0c 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -86,7 +86,6 @@ const char *xa_state_names[]={
"NON-EXISTING", "ACTIVE", "IDLE", "PREPARED"
};
-
static void unlock_locked_tables(THD *thd)
{
if (thd->locked_tables)
@@ -321,8 +320,6 @@ void execute_init_command(THD *thd, sys_var_str *init_command_var,
values of init_command_var can't be changed
*/
rw_rdlock(var_mutex);
- thd->query= init_command_var->value;
- thd->query_length= init_command_var->value_length;
save_client_capabilities= thd->client_capabilities;
thd->client_capabilities|= CLIENT_MULTI_QUERIES;
/*
@@ -332,7 +329,9 @@ void execute_init_command(THD *thd, sys_var_str *init_command_var,
save_vio= thd->net.vio;
thd->net.vio= 0;
thd->net.no_send_error= 0;
- dispatch_command(COM_QUERY, thd, thd->query, thd->query_length+1);
+ dispatch_command(COM_QUERY, thd,
+ init_command_var->value,
+ init_command_var->value_length);
rw_unlock(var_mutex);
thd->client_capabilities= save_client_capabilities;
thd->net.vio= save_vio;
@@ -437,7 +436,7 @@ pthread_handler_t handle_bootstrap(void *arg)
if (thd->is_fatal_error)
break;
- if (thd->net.report_error)
+ if (thd->is_error())
{
/* The query failed, send error to log and abort bootstrap */
net_send_error(thd);
@@ -471,6 +470,46 @@ end:
}
+/**
+ @brief Check access privs for a MERGE table and fix children lock types.
+
+ @param[in] thd thread handle
+ @param[in] db database name
+ @param[in,out] table_list list of child tables (merge_list)
+ lock_type and optionally db set per table
+
+ @return status
+ @retval 0 OK
+ @retval != 0 Error
+
+ @detail
+ This function is used for write access to MERGE tables only
+ (CREATE TABLE, ALTER TABLE ... UNION=(...)). Set TL_WRITE for
+ every child. Set 'db' for every child if not present.
+*/
+#ifndef NO_EMBEDDED_ACCESS_CHECKS
+static bool check_merge_table_access(THD *thd, char *db,
+ TABLE_LIST *table_list)
+{
+ int error= 0;
+
+ if (table_list)
+ {
+ /* Check that all tables use the current database */
+ TABLE_LIST *tlist;
+
+ for (tlist= table_list; tlist; tlist= tlist->next_local)
+ {
+ if (!tlist->db || !tlist->db[0])
+ tlist->db= db; /* purecov: inspected */
+ }
+ error= check_table_access(thd, SELECT_ACL | UPDATE_ACL | DELETE_ACL,
+ table_list,0);
+ }
+ return error;
+}
+#endif
+
/* This works because items are allocated with sql_alloc() */
void free_items(Item *item)
@@ -681,40 +720,49 @@ bool do_command(THD *thd)
DBUG_PRINT("info",("Got error %d reading command from socket %s",
net->error,
vio_description(net->vio)));
+
/* Check if we can continue without closing the connection */
+
if (net->error != 3)
- {
- statistic_increment(aborted_threads,&LOCK_status);
DBUG_RETURN(TRUE); // We have to close it.
- }
+
net_send_error(thd, net->last_errno, NullS);
net->error= 0;
DBUG_RETURN(FALSE);
}
- else
+
+ packet= (char*) net->read_pos;
+ /*
+ 'packet_length' contains length of data, as it was stored in packet
+ header. In case of malformed header, my_net_read returns zero.
+ If packet_length is not zero, my_net_read ensures that the returned
+ number of bytes was actually read from network.
+ There is also an extra safety measure in my_net_read:
+ it sets packet[packet_length]= 0, but only for non-zero packets.
+ */
+ if (packet_length == 0) /* safety */
{
- packet=(char*) net->read_pos;
- command = (enum enum_server_command) (uchar) packet[0];
- if (command >= COM_END)
- command= COM_END; // Wrong command
- DBUG_PRINT("info",("Command on %s = %d (%s)",
- vio_description(net->vio), command,
- command_name[command].str));
+ /* Initialize with COM_SLEEP packet */
+ packet[0]= (uchar) COM_SLEEP;
+ packet_length= 1;
}
+ /* Do not rely on my_net_read, extra safety against programming errors. */
+ packet[packet_length]= '\0'; /* safety */
+
+ command= (enum enum_server_command) (uchar) packet[0];
+
+ if (command >= COM_END)
+ command= COM_END; // Wrong command
+
+ DBUG_PRINT("info",("Command on %s = %d (%s)",
+ vio_description(net->vio), command,
+ command_name[command].str));
/* Restore read timeout value */
my_net_set_read_timeout(net, thd->variables.net_read_timeout);
- /*
- packet_length contains length of data, as it was stored in packet
- header. In case of malformed header, packet_length can be zero.
- If packet_length is not zero, my_net_read ensures that this number
- of bytes was actually read from network. Additionally my_net_read
- sets packet[packet_length]= 0 (thus if packet_length == 0,
- command == packet[0] == COM_SLEEP).
- In dispatch_command packet[packet_length] points beyond the end of packet.
- */
- DBUG_RETURN(dispatch_command(command,thd, packet+1, (uint) packet_length));
+ DBUG_ASSERT(packet_length);
+ DBUG_RETURN(dispatch_command(command, thd, packet+1, (uint) (packet_length-1)));
}
#endif /* EMBEDDED_LIBRARY */
@@ -727,9 +775,7 @@ bool do_command(THD *thd)
thd connection handle
command type of command to perform
packet data for the command, packet is always null-terminated
- packet_length length of packet + 1 (to show that data is
- null-terminated) except for COM_SLEEP, where it
- can be zero.
+ packet_length length of packet. Can be zero, e.g. in case of COM_SLEEP.
RETURN VALUE
0 ok
1 request of thread shutdown, i. e. if command is
@@ -742,12 +788,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
NET *net= &thd->net;
bool error= 0;
DBUG_ENTER("dispatch_command");
-
- if (thd->killed == THD::KILL_QUERY || thd->killed == THD::KILL_BAD_DATA)
- {
- thd->killed= THD::NOT_KILLED;
- thd->mysys_var->abort= 0;
- }
+ DBUG_PRINT("info",("packet: '%*.s'; command: %d", packet_length, packet, command));
thd->command=command;
/*
@@ -773,10 +814,10 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
LEX_STRING tmp;
status_var_increment(thd->status_var.com_stat[SQLCOM_CHANGE_DB]);
thd->convert_string(&tmp, system_charset_info,
- packet, packet_length-1, thd->charset());
+ packet, packet_length, thd->charset());
if (!mysql_change_db(thd, &tmp, FALSE))
{
- general_log_print(thd, command, "%s",thd->db);
+ general_log_write(thd, command, thd->db, thd->db_length);
send_ok(thd);
}
break;
@@ -793,14 +834,16 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
{
char *tbl_name;
LEX_STRING db;
+ /* Safe because there is always a trailing \0 at the end of the packet */
uint db_len= *(uchar*) packet;
- if (db_len >= packet_length || db_len > NAME_LEN)
+ if (db_len + 1 > packet_length || db_len > NAME_LEN)
{
my_message(ER_UNKNOWN_COM_ERROR, ER(ER_UNKNOWN_COM_ERROR), MYF(0));
break;
}
+ /* Safe because there is always a trailing \0 at the end of the packet */
uint tbl_len= *(uchar*) (packet + db_len + 1);
- if (db_len+tbl_len+2 > packet_length || tbl_len > NAME_LEN)
+ if (db_len + tbl_len + 2 > packet_length || tbl_len > NAME_LEN)
{
my_message(ER_UNKNOWN_COM_ERROR, ER(ER_UNKNOWN_COM_ERROR), MYF(0));
break;
@@ -823,7 +866,8 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
case COM_CHANGE_USER:
{
status_var_increment(thd->status_var.com_other);
- char *user= (char*) packet, *packet_end= packet+ packet_length;
+ char *user= (char*) packet, *packet_end= packet + packet_length;
+ /* Safe because there is always a trailing \0 at the end of the packet */
char *passwd= strend(user)+1;
thd->change_user();
@@ -840,6 +884,15 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
char db_buff[NAME_LEN+1]; // buffer to store db in utf8
char *db= passwd;
char *save_db;
+ /*
+ If there is no password supplied, the packet must contain '\0',
+ in any type of handshake (4.1 or pre-4.1).
+ */
+ if (passwd >= packet_end)
+ {
+ my_message(ER_UNKNOWN_COM_ERROR, ER(ER_UNKNOWN_COM_ERROR), MYF(0));
+ break;
+ }
uint passwd_len= (thd->client_capabilities & CLIENT_SECURE_CONNECTION ?
(uchar)(*passwd++) : strlen(passwd));
uint dummy_errors, save_db_length, db_length;
@@ -848,22 +901,32 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
USER_CONN *save_user_connect;
db+= passwd_len + 1;
-#ifndef EMBEDDED_LIBRARY
- /* Small check for incoming packet */
- if ((uint) ((uchar*) db - net->read_pos) > packet_length)
+ /*
+ Database name is always NUL-terminated, so in case of empty database
+ the packet must contain at least the trailing '\0'.
+ */
+ if (db >= packet_end)
{
my_message(ER_UNKNOWN_COM_ERROR, ER(ER_UNKNOWN_COM_ERROR), MYF(0));
break;
}
-#endif
+ db_length= strlen(db);
+
+ char *ptr= db + db_length + 1;
+ uint cs_number= 0;
+
+ if (ptr < packet_end)
+ {
+ if (ptr + 2 > packet_end)
+ {
+ my_message(ER_UNKNOWN_COM_ERROR, ER(ER_UNKNOWN_COM_ERROR), MYF(0));
+ break;
+ }
+
+ cs_number= uint2korr(ptr);
+ }
+
/* Convert database name to utf8 */
- /*
- Handle problem with old bug in client protocol where db had an extra
- \0
- */
- db_length= (packet_end - db);
- if (db_length > 0 && db[db_length-1] == 0)
- db_length--;
db_buff[copy_and_convert(db_buff, sizeof(db_buff)-1,
system_charset_info, db, db_length,
thd->charset(), &dummy_errors)]= 0;
@@ -883,15 +946,11 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
/* Clear variables that are allocated */
thd->user_connect= 0;
+ thd->security_ctx->priv_user= thd->security_ctx->user;
res= check_user(thd, COM_CHANGE_USER, passwd, passwd_len, db, FALSE);
if (res)
{
- /* authentication failure, we shall restore old user */
- if (res > 0)
- my_message(ER_UNKNOWN_COM_ERROR, ER(ER_UNKNOWN_COM_ERROR), MYF(0));
- else
- thd->clear_error(); // Error already sent to client
x_free(thd->security_ctx->user);
*thd->security_ctx= save_security_ctx;
thd->user_connect= save_user_connect;
@@ -905,8 +964,14 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
if (save_user_connect)
decrease_user_connections(save_user_connect);
#endif /* NO_EMBEDDED_ACCESS_CHECKS */
- x_free((uchar*) save_db);
- x_free((uchar*) save_security_ctx.user);
+ x_free(save_db);
+ x_free(save_security_ctx.user);
+
+ if (cs_number)
+ {
+ thd_init_client_charset(thd, cs_number);
+ thd->update_charset();
+ }
}
break;
}
@@ -946,10 +1011,9 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
break; // fatal error is set
char *packet_end= thd->query + thd->query_length;
/* 'b' stands for 'buffer' parameter', special for 'my_snprintf' */
- const char *format= "%.*b";
const char* found_semicolon= NULL;
- general_log_print(thd, command, format, thd->query_length, thd->query);
+ general_log_write(thd, command, thd->query, thd->query_length);
DBUG_PRINT("query",("%-.4096s",thd->query));
if (!(specialflag & SPECIAL_NO_PRIOR))
@@ -957,16 +1021,14 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
mysql_parse(thd, thd->query, thd->query_length, & found_semicolon);
- while (!thd->killed && found_semicolon && !thd->net.report_error)
+ while (!thd->killed && found_semicolon && ! thd->is_error())
{
char *next_packet= (char*) found_semicolon;
net->no_send_error= 0;
/*
Multiple queries exits, execute them individually
*/
- if (thd->lock || thd->open_tables || thd->derived_tables ||
- thd->prelocked_mode)
- close_thread_tables(thd);
+ close_thread_tables(thd);
ulong length= (ulong)(packet_end - next_packet);
log_slow_statement(thd);
@@ -999,7 +1061,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
break;
#else
{
- char *fields, *packet_end= packet + packet_length - 1, *arg_end;
+ char *fields, *packet_end= packet + packet_length, *arg_end;
/* Locked closure of all tables */
TABLE_LIST table_list;
LEX_STRING conv_name;
@@ -1073,7 +1135,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
HA_CREATE_INFO create_info;
status_var_increment(thd->status_var.com_stat[SQLCOM_CREATE_DB]);
- if (thd->make_lex_string(&db, packet, packet_length - 1, FALSE) ||
+ if (thd->make_lex_string(&db, packet, packet_length, FALSE) ||
thd->make_lex_string(&alias, db.str, db.length, FALSE) ||
check_db_name(&db))
{
@@ -1094,7 +1156,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
status_var_increment(thd->status_var.com_stat[SQLCOM_DROP_DB]);
LEX_STRING db;
- if (thd->make_lex_string(&db, packet, packet_length - 1, FALSE) ||
+ if (thd->make_lex_string(&db, packet, packet_length, FALSE) ||
check_db_name(&db))
{
my_error(ER_WRONG_DB_NAME, MYF(0), db.str ? db.str : "NULL");
@@ -1108,7 +1170,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
ER(ER_LOCK_OR_ACTIVE_TRANSACTION), MYF(0));
break;
}
- general_log_print(thd, command, db.str);
+ general_log_write(thd, command, db.str, db.length);
mysql_rm_db(thd, db.str, 0, 0);
break;
}
@@ -1163,7 +1225,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
break; /* purecov: inspected */
/*
If the client is < 4.1.3, it is going to send us no argument; then
- packet_length is 1, packet[0] is the end 0 of the packet. Note that
+ packet_length is 0, packet[0] is the end 0 of the packet. Note that
SHUTDOWN_DEFAULT is 0. If client is >= 4.1.3, the shutdown level is in
packet[0].
*/
@@ -1303,12 +1365,11 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
my_message(ER_UNKNOWN_COM_ERROR, ER(ER_UNKNOWN_COM_ERROR), MYF(0));
break;
}
- if (thd->lock || thd->open_tables || thd->derived_tables ||
- thd->prelocked_mode)
- {
- thd->proc_info="closing tables";
- close_thread_tables(thd); /* Free tables */
- }
+
+ thd->proc_info= "closing tables";
+ /* Free tables */
+ close_thread_tables(thd);
+
/*
assume handlers auto-commit (if some doesn't - transaction handling
in MySQL should be redesigned to support it; it's a big change,
@@ -1322,9 +1383,9 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
thd->transaction.xid_state.xid.null();
/* report error issued during command execution */
- if (thd->killed_errno() && !thd->net.report_error)
+ if (thd->killed_errno() && ! thd->is_error())
thd->send_kill_message();
- if (thd->net.report_error)
+ if (thd->is_error())
net_send_error(thd);
log_slow_statement(thd);
@@ -1521,9 +1582,8 @@ int prepare_schema_table(THD *thd, LEX *lex, Table_ident *table_ident,
bool alloc_query(THD *thd, const char *packet, uint packet_length)
{
- packet_length--; // Remove end null
/* Remove garbage at start and end of query */
- while (my_isspace(thd->charset(),packet[0]) && packet_length > 0)
+ while (packet_length > 0 && my_isspace(thd->charset(), packet[0]))
{
packet++;
packet_length--;
@@ -1830,10 +1890,6 @@ mysql_execute_command(THD *thd)
switch (lex->sql_command) {
case SQLCOM_SHOW_EVENTS:
- if ((res= check_access(thd, EVENT_ACL, thd->lex->select_lex.db, 0, 0, 0,
- is_schema_db(thd->lex->select_lex.db))))
- break;
- /* fall through */
case SQLCOM_SHOW_STATUS_PROC:
case SQLCOM_SHOW_STATUS_FUNC:
res= execute_sqlcom_select(thd, all_tables);
@@ -2055,7 +2111,16 @@ mysql_execute_command(THD *thd)
if (check_global_access(thd, SUPER_ACL | REPL_CLIENT_ACL))
goto error;
pthread_mutex_lock(&LOCK_active_mi);
- res = show_master_info(thd,active_mi);
+ if (active_mi != NULL)
+ {
+ res = show_master_info(thd, active_mi);
+ }
+ else
+ {
+ push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 0,
+ "the master info structure does not exist");
+ send_ok(thd);
+ }
pthread_mutex_unlock(&LOCK_active_mi);
break;
}
@@ -2229,6 +2294,19 @@ mysql_execute_command(THD *thd)
select_lex->options|= SELECT_NO_UNLOCK;
unit->set_limit(select_lex);
+ /*
+ Disable non-empty MERGE tables with CREATE...SELECT. Too
+ complicated. See Bug #26379. Empty MERGE tables are read-only
+ and don't allow CREATE...SELECT anyway.
+ */
+ if (create_info.used_fields & HA_CREATE_USED_UNION)
+ {
+ my_error(ER_WRONG_OBJECT, MYF(0), create_table->db,
+ create_table->table_name, "BASE TABLE");
+ res= 1;
+ goto end_with_restore_list;
+ }
+
if (!(create_info.options & HA_LEX_CREATE_TMP_TABLE))
{
lex->link_first_table_back(create_table, link_to_local);
@@ -2910,6 +2988,13 @@ end_with_restore_list:
SELECT_NO_JOIN_CACHE | SELECT_NO_UNLOCK |
OPTION_SETUP_TABLES_DONE,
del_result, unit, select_lex);
+ res|= thd->net.report_error;
+ if (unlikely(res))
+ {
+ /* If we had a another error reported earlier then this will be ignored */
+ del_result->send_error(ER_UNKNOWN_ERROR, "Execution of the query failed");
+ del_result->abort();
+ }
delete del_result;
}
else
@@ -3021,6 +3106,10 @@ end_with_restore_list:
case SQLCOM_SET_OPTION:
{
List<set_var_base> *lex_var_list= &lex->var_list;
+
+ if (lex->autocommit && end_active_trans(thd))
+ goto error;
+
if ((check_table_access(thd, SELECT_ACL, all_tables, 0) ||
open_and_lock_tables(thd, all_tables)))
goto error;
@@ -3173,12 +3262,9 @@ end_with_restore_list:
res= mysql_rm_db(thd, lex->name.str, lex->drop_if_exists, 0);
break;
}
- case SQLCOM_RENAME_DB:
+ case SQLCOM_ALTER_DB_UPGRADE:
{
- LEX_STRING *olddb, *newdb;
- List_iterator <LEX_STRING> db_list(lex->db_list);
- olddb= db_list++;
- newdb= db_list++;
+ LEX_STRING *db= & lex->name;
if (end_active_trans(thd))
{
res= 1;
@@ -3186,24 +3272,22 @@ end_with_restore_list:
}
#ifdef HAVE_REPLICATION
if (thd->slave_thread &&
- (!rpl_filter->db_ok(olddb->str) ||
- !rpl_filter->db_ok(newdb->str) ||
- !rpl_filter->db_ok_with_wild_table(olddb->str) ||
- !rpl_filter->db_ok_with_wild_table(newdb->str)))
+ (!rpl_filter->db_ok(db->str) ||
+ !rpl_filter->db_ok_with_wild_table(db->str)))
{
res= 1;
my_message(ER_SLAVE_IGNORED_TABLE, ER(ER_SLAVE_IGNORED_TABLE), MYF(0));
break;
}
#endif
- if (check_db_name(newdb))
+ if (check_db_name(db))
{
- my_error(ER_WRONG_DB_NAME, MYF(0), newdb->str);
+ my_error(ER_WRONG_DB_NAME, MYF(0), db->str);
break;
}
- if (check_access(thd,ALTER_ACL,olddb->str,0,1,0,is_schema_db(olddb->str)) ||
- check_access(thd,DROP_ACL,olddb->str,0,1,0,is_schema_db(olddb->str)) ||
- check_access(thd,CREATE_ACL,newdb->str,0,1,0,is_schema_db(newdb->str)))
+ if (check_access(thd, ALTER_ACL, db->str, 0, 1, 0, is_schema_db(db->str)) ||
+ check_access(thd, DROP_ACL, db->str, 0, 1, 0, is_schema_db(db->str)) ||
+ check_access(thd, CREATE_ACL, db->str, 0, 1, 0, is_schema_db(db->str)))
{
res= 1;
break;
@@ -3215,7 +3299,8 @@ end_with_restore_list:
ER(ER_LOCK_OR_ACTIVE_TRANSACTION), MYF(0));
goto error;
}
- res= mysql_rename_db(thd, olddb, newdb);
+
+ res= mysql_upgrade_db(thd, db);
if (!res)
send_ok(thd);
break;
@@ -3328,12 +3413,6 @@ end_with_restore_list:
if (check_access(thd,INSERT_ACL,"mysql",0,1,0,0))
break;
#ifdef HAVE_DLOPEN
- if (sp_find_routine(thd, TYPE_ENUM_FUNCTION, lex->spname,
- &thd->sp_func_cache, FALSE))
- {
- my_error(ER_UDF_EXISTS, MYF(0), lex->spname->m_name.str);
- goto error;
- }
if (!(res = mysql_create_function(thd, &lex->udf)))
send_ok(thd);
#else
@@ -3789,6 +3868,9 @@ end_with_restore_list:
case SP_BODY_TOO_LONG:
my_error(ER_TOO_LONG_BODY, MYF(0), name);
break;
+ case SP_FLD_STORE_FAILED:
+ my_error(ER_CANT_CREATE_SROUTINE, MYF(0), name);
+ break;
default:
my_error(ER_SP_STORE_FAILED, MYF(0), SP_TYPE_STRING(lex), name);
break;
@@ -3868,14 +3950,12 @@ create_sp_error:
thd->server_status|= SERVER_MORE_RESULTS_EXISTS;
}
-#ifndef NO_EMBEDDED_ACCESS_CHECKS
if (check_routine_access(thd, EXECUTE_ACL,
sp->m_db.str, sp->m_name.str, TRUE, FALSE))
{
thd->net.no_send_ok= save_no_send_ok;
goto error;
}
-#endif
select_limit= thd->variables.select_limit;
thd->variables.select_limit= HA_POS_ERROR;
@@ -3905,7 +3985,7 @@ create_sp_error:
thd->row_count_func));
else
{
- DBUG_ASSERT(thd->net.report_error == 1 || thd->killed);
+ DBUG_ASSERT(thd->is_error() || thd->killed);
goto error; // Substatement should already have sent error
}
}
@@ -4498,7 +4578,7 @@ finish:
*/
start_waiting_global_read_lock(thd);
}
- DBUG_RETURN(res || thd->net.report_error);
+ DBUG_RETURN(res || thd->is_error());
}
@@ -4555,6 +4635,7 @@ static bool execute_sqlcom_select(THD *thd, TABLE_LIST *all_tables)
}
+#ifndef NO_EMBEDDED_ACCESS_CHECKS
/*
Check grants for commands which work only with one table.
@@ -4672,7 +4753,6 @@ check_access(THD *thd, ulong want_access, const char *db, ulong *save_priv,
bool dont_check_global_grants, bool no_errors, bool schema_db)
{
Security_context *sctx= thd->security_ctx;
-#ifndef NO_EMBEDDED_ACCESS_CHECKS
ulong db_access;
/*
GRANT command:
@@ -4684,7 +4764,6 @@ check_access(THD *thd, ulong want_access, const char *db, ulong *save_priv,
set db_is_pattern according to 'dont_check_global_grants' value.
*/
bool db_is_pattern= ((want_access & GRANT_ACL) && dont_check_global_grants);
-#endif
ulong dummy;
DBUG_ENTER("check_access");
DBUG_PRINT("enter",("db: %s want_access: %lu master_access: %lu",
@@ -4723,9 +4802,6 @@ check_access(THD *thd, ulong want_access, const char *db, ulong *save_priv,
}
}
-#ifdef NO_EMBEDDED_ACCESS_CHECKS
- DBUG_RETURN(0);
-#else
if ((sctx->master_access & want_access) == want_access)
{
/*
@@ -4783,7 +4859,6 @@ check_access(THD *thd, ulong want_access, const char *db, ulong *save_priv,
thd->db :
"unknown"))); /* purecov: tested */
DBUG_RETURN(TRUE); /* purecov: tested */
-#endif /* NO_EMBEDDED_ACCESS_CHECKS */
}
@@ -4808,16 +4883,12 @@ check_access(THD *thd, ulong want_access, const char *db, ulong *save_priv,
bool check_global_access(THD *thd, ulong want_access)
{
-#ifdef NO_EMBEDDED_ACCESS_CHECKS
- return 0;
-#else
char command[128];
if ((thd->security_ctx->master_access & want_access))
return 0;
get_privilege_desc(command, sizeof(command), want_access);
my_error(ER_SPECIFIC_ACCESS_DENIED_ERROR, MYF(0), command);
return 1;
-#endif /* NO_EMBEDDED_ACCESS_CHECKS */
}
@@ -4907,9 +4978,7 @@ bool
check_table_access(THD *thd, ulong want_access,TABLE_LIST *tables,
bool no_errors)
{
-#ifndef NO_EMBEDDED_ACCESS_CHECKS
TABLE_LIST *org_tables= tables;
-#endif
TABLE_LIST *first_not_own_table= thd->lex->first_not_own_table();
Security_context *sctx= thd->security_ctx, *backup_ctx= thd->security_ctx;
/*
@@ -4996,11 +5065,7 @@ check_routine_access(THD *thd, ulong want_access,char *db, char *name,
0, no_errors, 0))
return TRUE;
-#ifndef NO_EMBEDDED_ACCESS_CHECKS
return check_grant_routine(thd, want_access, tables, is_proc, no_errors);
-#else
- return FALSE;
-#endif
}
@@ -5070,26 +5135,7 @@ bool check_some_access(THD *thd, ulong want_access, TABLE_LIST *table)
DBUG_RETURN(1);
}
-
-bool check_merge_table_access(THD *thd, char *db,
- TABLE_LIST *table_list)
-{
- int error=0;
- if (table_list)
- {
- /* Check that all tables use the current database */
- TABLE_LIST *tmp;
- for (tmp= table_list; tmp; tmp= tmp->next_local)
- {
- if (!tmp->db || !tmp->db[0])
- tmp->db=db;
- }
- error=check_table_access(thd, SELECT_ACL | UPDATE_ACL | DELETE_ACL,
- table_list,0);
- }
- return error;
-}
-
+#endif /*NO_EMBEDDED_ACCESS_CHECKS*/
/****************************************************************************
Check stack size; Send error if there isn't enough stack to continue
@@ -5441,7 +5487,7 @@ void mysql_parse(THD *thd, const char *inBuf, uint length,
else
#endif
{
- if (! thd->net.report_error)
+ if (! thd->is_error())
{
/*
Binlog logs a string starting from thd->query and having length
@@ -5465,7 +5511,7 @@ void mysql_parse(THD *thd, const char *inBuf, uint length,
}
else
{
- DBUG_ASSERT(thd->net.report_error);
+ DBUG_ASSERT(thd->is_error());
DBUG_PRINT("info",("Command aborted. Fatal_error: %d",
thd->is_fatal_error));
@@ -5765,7 +5811,12 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd,
ST_SCHEMA_TABLE *schema_table= find_schema_table(thd, ptr->table_name);
if (!schema_table ||
(schema_table->hidden &&
- (sql_command_flags[lex->sql_command] & CF_STATUS_COMMAND) == 0))
+ ((sql_command_flags[lex->sql_command] & CF_STATUS_COMMAND) == 0 ||
+ /*
+ this check is used for show columns|keys from I_S hidden table
+ */
+ lex->sql_command == SQLCOM_SHOW_FIELDS ||
+ lex->sql_command == SQLCOM_SHOW_KEYS)))
{
my_error(ER_UNKNOWN_TABLE, MYF(0),
ptr->table_name, INFORMATION_SCHEMA_NAME.str);
@@ -6263,24 +6314,23 @@ void add_join_natural(TABLE_LIST *a, TABLE_LIST *b, List<String> *using_fields,
}
-/*
- Reload/resets privileges and the different caches.
-
- SYNOPSIS
- reload_acl_and_cache()
- thd Thread handler (can be NULL!)
- options What should be reset/reloaded (tables, privileges,
- slave...)
- tables Tables to flush (if any)
- write_to_binlog Depending on 'options', it may be very bad to write the
- query to the binlog (e.g. FLUSH SLAVE); this is a
- pointer where reload_acl_and_cache() will put 0 if
- it thinks we really should not write to the binlog.
- Otherwise it will put 1.
-
- RETURN
- 0 ok
- !=0 error. thd->killed or thd->net.report_error is set
+/**
+ @brief Reload/resets privileges and the different caches.
+
+ @param thd Thread handler (can be NULL!)
+ @param options What should be reset/reloaded (tables, privileges, slave...)
+ @param tables Tables to flush (if any)
+ @param write_to_binlog True if we can write to the binlog.
+
+ @note Depending on 'options', it may be very bad to write the
+ query to the binlog (e.g. FLUSH SLAVE); this is a
+ pointer where reload_acl_and_cache() will put 0 if
+ it thinks we really should not write to the binlog.
+ Otherwise it will put 1.
+
+ @return Error status code
+ @retval 0 Ok
+ @retval !=0 Error; thd->killed is set or thd->is_error() is true
*/
bool reload_acl_and_cache(THD *thd, ulong options, TABLE_LIST *tables,
@@ -6384,7 +6434,7 @@ bool reload_acl_and_cache(THD *thd, ulong options, TABLE_LIST *tables,
for (; lock_p < end_p; lock_p++)
{
- if ((*lock_p)->type == TL_WRITE)
+ if ((*lock_p)->type >= TL_WRITE_ALLOW_WRITE)
{
my_error(ER_LOCK_OR_ACTIVE_TRANSACTION, MYF(0));
return 1;
@@ -6954,8 +7004,15 @@ bool create_table_precheck(THD *thd, TABLE_LIST *tables,
bool error= TRUE; // Error message is given
DBUG_ENTER("create_table_precheck");
+ /*
+ Require CREATE [TEMPORARY] privilege on new table; for
+ CREATE TABLE ... SELECT, also require INSERT.
+ */
+
want_priv= ((lex->create_info.options & HA_LEX_CREATE_TMP_TABLE) ?
- CREATE_TMP_ACL : CREATE_ACL);
+ CREATE_TMP_ACL : CREATE_ACL) |
+ (select_lex->item_list.elements ? INSERT_ACL : 0);
+
if (check_access(thd, want_priv, create_table->db,
&create_table->grant.privilege, 0, 0,
test(create_table->schema_table)) ||
@@ -7241,7 +7298,12 @@ bool parse_sql(THD *thd,
/* Parse the query. */
- bool err_status= MYSQLparse(thd) != 0 || thd->is_fatal_error;
+ bool mysql_parse_status= MYSQLparse(thd) != 0;
+
+ /* Check that if MYSQLparse() failed, thd->is_error() is set. */
+
+ DBUG_ASSERT(!mysql_parse_status ||
+ mysql_parse_status && thd->is_error());
/* Reset Lex_input_stream. */
@@ -7254,7 +7316,7 @@ bool parse_sql(THD *thd,
/* That's it. */
- return err_status;
+ return mysql_parse_status || thd->is_fatal_error;
}
/**
diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc
index 8a8a03cb4e4..67190c94a56 100644
--- a/sql/sql_partition.cc
+++ b/sql/sql_partition.cc
@@ -902,6 +902,7 @@ bool fix_fields_part_func(THD *thd, Item* func_expr, TABLE *table,
const char *save_where;
char* db_name;
char db_name_string[FN_REFLEN];
+ bool save_use_only_table_context;
DBUG_ENTER("fix_fields_part_func");
if (part_info->fixed)
@@ -958,8 +959,14 @@ bool fix_fields_part_func(THD *thd, Item* func_expr, TABLE *table,
This is a tricky call to prepare for since it can have a large number
of interesting side effects, both desirable and undesirable.
*/
+
+ save_use_only_table_context= thd->lex->use_only_table_context;
+ thd->lex->use_only_table_context= TRUE;
+
error= func_expr->fix_fields(thd, (Item**)0);
+ thd->lex->use_only_table_context= save_use_only_table_context;
+
context->table_list= save_table_list;
context->first_name_resolution_table= save_first_table;
context->last_name_resolution_table= save_last_table;
@@ -1395,7 +1402,7 @@ static void set_up_partition_func_pointers(partition_info *part_info)
NONE
*/
-static void set_linear_hash_mask(partition_info *part_info, uint no_parts)
+void set_linear_hash_mask(partition_info *part_info, uint no_parts)
{
uint mask;
@@ -1849,6 +1856,20 @@ static int add_uint(File fptr, ulonglong number)
return add_string(fptr, buff);
}
+/*
+ Must escape strings in partitioned tables frm-files,
+ parsing it later with mysql_unpack_partition will fail otherwise.
+*/
+static int add_quoted_string(File fptr, const char *quotestr)
+{
+ String orgstr(quotestr, system_charset_info);
+ String escapedstr;
+ int err= add_string(fptr, "'");
+ err+= append_escaped(&escapedstr, &orgstr);
+ err+= add_string(fptr, escapedstr.c_ptr_safe());
+ return err + add_string(fptr, "'");
+}
+
static int add_keyword_string(File fptr, const char *keyword,
bool should_use_quotes,
const char *keystr)
@@ -1859,10 +1880,9 @@ static int add_keyword_string(File fptr, const char *keyword,
err+= add_equal(fptr);
err+= add_space(fptr);
if (should_use_quotes)
- err+= add_string(fptr, "'");
- err+= add_string(fptr, keystr);
- if (should_use_quotes)
- err+= add_string(fptr, "'");
+ err+= add_quoted_string(fptr, keystr);
+ else
+ err+= add_string(fptr, keystr);
return err + add_space(fptr);
}
@@ -2814,8 +2834,8 @@ int get_partition_id_range(partition_info *part_info,
loc_part_id++;
*part_id= (uint32)loc_part_id;
if (loc_part_id == max_partition &&
- range_array[loc_part_id] != LONGLONG_MAX &&
- part_func_value >= range_array[loc_part_id])
+ part_func_value >= range_array[loc_part_id] &&
+ !part_info->defined_max_value)
DBUG_RETURN(HA_ERR_NO_PARTITION_FOUND);
DBUG_PRINT("exit",("partition: %d", *part_id));
@@ -2921,7 +2941,13 @@ uint32 get_partition_id_range_for_endpoint(partition_info *part_info,
}
if (left_endpoint)
{
- if (part_func_value >= range_array[loc_part_id])
+ longlong bound= range_array[loc_part_id];
+ /*
+ In case of PARTITION p VALUES LESS THAN MAXVALUE
+ the maximum value is in the current partition.
+ */
+ if (part_func_value > bound ||
+ (part_func_value == bound && !part_info->defined_max_value))
loc_part_id++;
}
else
@@ -3964,6 +3990,7 @@ static int fast_end_partition(THD *thd, ulonglong copied,
DBUG_RETURN(FALSE);
}
table->file->print_error(error, MYF(0));
+ close_thread_tables(thd);
DBUG_RETURN(TRUE);
}
@@ -4931,7 +4958,7 @@ the generated partition syntax in a correct manner.
We use the old partitioning also for the new table. We do this
by assigning the partition_info from the table loaded in
- open_ltable to the partition_info struct used by mysql_create_table
+ open_table to the partition_info struct used by mysql_create_table
later in this method.
Case IIb:
@@ -5024,7 +5051,10 @@ the generated partition syntax in a correct manner.
*partition_changed= TRUE;
}
if (create_info->db_type == partition_hton)
- part_info->default_engine_type= table->part_info->default_engine_type;
+ {
+ if (!part_info->default_engine_type)
+ part_info->default_engine_type= table->part_info->default_engine_type;
+ }
else
part_info->default_engine_type= create_info->db_type;
if (check_native_partitioned(create_info, &is_native_partitioned,
@@ -6083,7 +6113,7 @@ uint fast_alter_partition_table(THD *thd, TABLE *table,
(error= table->file->repair_partitions(thd))))
{
table->file->print_error(error, MYF(0));
- DBUG_RETURN(TRUE);
+ goto err;
}
}
else if (fast_alter_partition & HA_PARTITION_ONE_PHASE)
@@ -6130,7 +6160,7 @@ uint fast_alter_partition_table(THD *thd, TABLE *table,
if (mysql_write_frm(lpt, WFRM_WRITE_SHADOW | WFRM_PACK_FRM) ||
mysql_change_partitions(lpt))
{
- DBUG_RETURN(TRUE);
+ goto err;
}
}
else if (alter_info->flags == ALTER_DROP_PARTITION)
@@ -6223,7 +6253,7 @@ uint fast_alter_partition_table(THD *thd, TABLE *table,
(release_name_lock(lpt), FALSE))
{
handle_alter_part_error(lpt, not_completed, TRUE, frm_install);
- DBUG_RETURN(TRUE);
+ goto err;
}
}
else if ((alter_info->flags & ALTER_ADD_PARTITION) &&
@@ -6292,7 +6322,7 @@ uint fast_alter_partition_table(THD *thd, TABLE *table,
(release_name_lock(lpt), FALSE))
{
handle_alter_part_error(lpt, not_completed, FALSE, frm_install);
- DBUG_RETURN(TRUE);
+ goto err;
}
}
else
@@ -6385,7 +6415,7 @@ uint fast_alter_partition_table(THD *thd, TABLE *table,
(release_name_lock(lpt), FALSE))
{
handle_alter_part_error(lpt, not_completed, FALSE, frm_install);
- DBUG_RETURN(TRUE);
+ goto err;
}
}
/*
@@ -6395,6 +6425,9 @@ uint fast_alter_partition_table(THD *thd, TABLE *table,
DBUG_RETURN(fast_end_partition(thd, lpt->copied, lpt->deleted,
table, table_list, FALSE, NULL,
written_bin_log));
+err:
+ close_thread_tables(thd);
+ DBUG_RETURN(TRUE);
}
#endif
diff --git a/sql/sql_partition.h b/sql/sql_partition.h
index 56f24181b93..282e24f1853 100644
--- a/sql/sql_partition.h
+++ b/sql/sql_partition.h
@@ -65,6 +65,7 @@ int get_part_for_delete(const uchar *buf, const uchar *rec0,
void prune_partition_set(const TABLE *table, part_id_range *part_spec);
bool check_partition_info(partition_info *part_info,handlerton **eng_type,
TABLE *table, handler *file, HA_CREATE_INFO *info);
+void set_linear_hash_mask(partition_info *part_info, uint no_parts);
bool fix_partition_func(THD *thd, TABLE *table, bool create_table_ind);
char *generate_partition_syntax(partition_info *part_info,
uint *buf_length, bool use_sql_alloc,
diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc
index 1ec56e0caea..2a86844c8c6 100644
--- a/sql/sql_plugin.cc
+++ b/sql/sql_plugin.cc
@@ -1330,6 +1330,7 @@ static void plugin_load(MEM_ROOT *tmp_root, int *argc, char **argv)
}
new_thd->thread_stack= (char*) &tables;
new_thd->store_globals();
+ lex_start(new_thd);
new_thd->db= my_strdup("mysql", MYF(0));
new_thd->db_length= 5;
bzero((uchar*)&tables, sizeof(tables));
@@ -1875,11 +1876,26 @@ err:
static int check_func_int(THD *thd, struct st_mysql_sys_var *var,
void *save, st_mysql_value *value)
{
+ bool fixed;
long long tmp;
struct my_option options;
value->val_int(value, &tmp);
plugin_opt_set_limits(&options, var);
- *(int *)save= (int) getopt_ull_limit_value(tmp, &options);
+
+ if (var->flags & PLUGIN_VAR_UNSIGNED)
+ *(uint *)save= (uint) getopt_ull_limit_value((ulonglong) tmp, &options,
+ &fixed);
+ else
+ *(int *)save= (int) getopt_ll_limit_value(tmp, &options, &fixed);
+
+ if (fixed)
+ {
+ char buf[22];
+ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
+ ER_TRUNCATED_WRONG_VALUE,
+ ER(ER_TRUNCATED_WRONG_VALUE), var->name,
+ ullstr(tmp, buf));
+ }
return (thd->variables.sql_mode & MODE_STRICT_ALL_TABLES) &&
(*(int *)save != (int) tmp);
}
@@ -1888,24 +1904,55 @@ static int check_func_int(THD *thd, struct st_mysql_sys_var *var,
static int check_func_long(THD *thd, struct st_mysql_sys_var *var,
void *save, st_mysql_value *value)
{
+ bool fixed;
long long tmp;
struct my_option options;
value->val_int(value, &tmp);
plugin_opt_set_limits(&options, var);
- *(long *)save= (long) getopt_ull_limit_value(tmp, &options);
+
+ if (var->flags & PLUGIN_VAR_UNSIGNED)
+ *(ulong *)save= (ulong) getopt_ull_limit_value((ulonglong) tmp, &options,
+ &fixed);
+ else
+ *(long *)save= (long) getopt_ll_limit_value(tmp, &options, &fixed);
+
+ if (fixed)
+ {
+ char buf[22];
+ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
+ ER_TRUNCATED_WRONG_VALUE,
+ ER(ER_TRUNCATED_WRONG_VALUE), var->name,
+ ullstr(tmp, buf));
+ }
return (thd->variables.sql_mode & MODE_STRICT_ALL_TABLES) &&
(*(long *)save != (long) tmp);
}
static int check_func_longlong(THD *thd, struct st_mysql_sys_var *var,
- void *save, st_mysql_value *value)
+ void *save, st_mysql_value *value)
{
+ bool fixed;
long long tmp;
struct my_option options;
value->val_int(value, &tmp);
plugin_opt_set_limits(&options, var);
- *(ulonglong *)save= getopt_ull_limit_value(tmp, &options);
+ *(ulonglong *)save= getopt_ull_limit_value(tmp, &options, &fixed);
+
+ if (var->flags & PLUGIN_VAR_UNSIGNED)
+ *(ulonglong *)save= getopt_ull_limit_value((ulonglong) tmp, &options,
+ &fixed);
+ else
+ *(longlong *)save= getopt_ll_limit_value(tmp, &options, &fixed);
+
+ if (fixed)
+ {
+ char buf[22];
+ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
+ ER_TRUNCATED_WRONG_VALUE,
+ ER(ER_TRUNCATED_WRONG_VALUE), var->name,
+ ullstr(tmp, buf));
+ }
return (thd->variables.sql_mode & MODE_STRICT_ALL_TABLES) &&
(*(long long *)save != tmp);
}
@@ -1945,7 +1992,7 @@ static int check_func_enum(THD *thd, struct st_mysql_sys_var *var,
length= sizeof(buff);
if (!(str= value->val_str(value, buff, &length)))
goto err;
- if ((result= find_type(typelib, str, length, 1)-1) < 0)
+ if ((result= (long)find_type(typelib, str, length, 1)-1) < 0)
{
strvalue= str;
goto err;
@@ -2684,6 +2731,8 @@ bool sys_var_pluginvar::update(THD *thd, set_var *var)
static void plugin_opt_set_limits(struct my_option *options,
const struct st_mysql_sys_var *opt)
{
+ options->sub_size= 0;
+
switch (opt->flags & (PLUGIN_VAR_TYPEMASK |
PLUGIN_VAR_UNSIGNED | PLUGIN_VAR_THDLOCAL)) {
/* global system variables */
@@ -3059,7 +3108,7 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp,
MEM_ROOT *mem_root= alloc_root_inited(&tmp->mem_root) ?
&tmp->mem_root : &plugin_mem_root;
st_mysql_sys_var **opt;
- my_option *opts;
+ my_option *opts= NULL;
char *p, *varname;
int error;
st_mysql_sys_var *o;
@@ -3098,7 +3147,7 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp,
{
sql_print_error("Parsing options for plugin '%s' failed.",
tmp->name.str);
- DBUG_RETURN(error);
+ goto err;
}
}
@@ -3108,6 +3157,8 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp,
*enabled= TRUE;
}
+ error= 1;
+
if (*enabled)
{
for (opt= tmp->plugin->system_vars; opt && *opt; opt++)
@@ -3146,7 +3197,7 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp,
{
sql_print_error("Plugin '%s' has conflicting system variables",
tmp->name.str);
- DBUG_RETURN(1);
+ goto err;
}
tmp->system_vars= chain.first;
}
@@ -3156,7 +3207,10 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp,
if (enabled_saved && global_system_variables.log_warnings)
sql_print_information("Plugin '%s' disabled by command line option",
tmp->name.str);
- DBUG_RETURN(1);
+err:
+ if (opts)
+ my_cleanup_options(opts);
+ DBUG_RETURN(error);
}
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc
index 9337a2aa329..9d4d62e57b6 100644
--- a/sql/sql_prepare.cc
+++ b/sql/sql_prepare.cc
@@ -1799,7 +1799,7 @@ static bool check_prepared_statement(Prepared_statement *stmt,
case SQLCOM_UNINSTALL_PLUGIN:
case SQLCOM_CREATE_DB:
case SQLCOM_DROP_DB:
- case SQLCOM_RENAME_DB:
+ case SQLCOM_ALTER_DB_UPGRADE:
case SQLCOM_CHECKSUM:
case SQLCOM_CREATE_USER:
case SQLCOM_RENAME_USER:
@@ -2107,7 +2107,7 @@ void mysql_sql_stmt_prepare(THD *thd)
DBUG_VOID_RETURN;
}
- if (stmt->prepare(query, query_len+1))
+ if (stmt->prepare(query, query_len))
{
/* Statement map deletes the statement on erase */
thd->stmt_map.erase(stmt);
@@ -2270,7 +2270,7 @@ void mysql_stmt_execute(THD *thd, char *packet_arg, uint packet_length)
/* Query text for binary, general or slow log, if any of them is open */
String expanded_query;
#ifndef EMBEDDED_LIBRARY
- uchar *packet_end= packet + packet_length - 1;
+ uchar *packet_end= packet + packet_length;
#endif
Prepared_statement *stmt;
bool error;
@@ -2585,14 +2585,14 @@ void mysql_stmt_get_longdata(THD *thd, char *packet, ulong packet_length)
Prepared_statement *stmt;
Item_param *param;
#ifndef EMBEDDED_LIBRARY
- char *packet_end= packet + packet_length - 1;
+ char *packet_end= packet + packet_length;
#endif
DBUG_ENTER("mysql_stmt_get_longdata");
status_var_increment(thd->status_var.com_stmt_send_long_data);
#ifndef EMBEDDED_LIBRARY
/* Minimal size of long data packet is 6 bytes */
- if (packet_length <= MYSQL_LONG_DATA_HEADER)
+ if (packet_length < MYSQL_LONG_DATA_HEADER)
{
my_error(ER_WRONG_ARGUMENTS, MYF(0), "mysql_stmt_send_long_data");
DBUG_VOID_RETURN;
@@ -2700,7 +2700,7 @@ Prepared_statement::Prepared_statement(THD *thd_arg, Protocol *protocol_arg)
last_errno(0),
flags((uint) IS_IN_USE)
{
- init_alloc_root(&main_mem_root, thd_arg->variables.query_alloc_block_size,
+ init_sql_alloc(&main_mem_root, thd_arg->variables.query_alloc_block_size,
thd_arg->variables.query_prealloc_size);
*last_error= '\0';
}
@@ -2864,8 +2864,9 @@ bool Prepared_statement::prepare(const char *packet, uint packet_len)
lex_start(thd);
error= parse_sql(thd, &lip, NULL) ||
- thd->net.report_error ||
+ thd->is_error() ||
init_param_array(this);
+
lex->set_trg_event_type_for_tables();
/* Remember the current database. */
@@ -2946,12 +2947,7 @@ bool Prepared_statement::prepare(const char *packet, uint packet_len)
the general log.
*/
if (thd->spcont == NULL)
- {
- const char *format= "[%lu] %.*b";
- general_log_print(thd, COM_STMT_PREPARE, format, id,
- query_length, query);
-
- }
+ general_log_write(thd, COM_STMT_PREPARE, query, query_length);
}
DBUG_RETURN(error);
}
@@ -3059,7 +3055,7 @@ bool Prepared_statement::execute(String *expanded_query, bool open_cursor)
if (expanded_query->length() &&
alloc_query(thd, (char*) expanded_query->ptr(),
- expanded_query->length()+1))
+ expanded_query->length()))
{
my_error(ER_OUTOFMEMORY, 0, expanded_query->length());
goto error;
@@ -3149,11 +3145,7 @@ bool Prepared_statement::execute(String *expanded_query, bool open_cursor)
the general log.
*/
if (error == 0 && thd->spcont == NULL)
- {
- const char *format= "[%lu] %.*b";
- general_log_print(thd, COM_STMT_EXECUTE, format, id,
- thd->query_length, thd->query);
- }
+ general_log_write(thd, COM_STMT_EXECUTE, thd->query, thd->query_length);
error:
flags&= ~ (uint) IS_IN_USE;
diff --git a/sql/sql_rename.cc b/sql/sql_rename.cc
index 750bcd50479..9dd8e1b70d4 100644
--- a/sql/sql_rename.cc
+++ b/sql/sql_rename.cc
@@ -51,6 +51,8 @@ bool mysql_rename_tables(THD *thd, TABLE_LIST *table_list, bool silent)
DBUG_RETURN(1);
}
+ mysql_ha_rm_tables(thd, table_list, FALSE);
+
if (wait_if_global_read_lock(thd,0,1))
DBUG_RETURN(1);
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc
index a6e52c05219..88040e2933c 100644
--- a/sql/sql_repl.cc
+++ b/sql/sql_repl.cc
@@ -369,7 +369,6 @@ void mysql_binlog_send(THD* thd, char* log_ident, my_off_t pos,
name=0; // Find first log
linfo.index_file_offset = 0;
- thd->current_linfo = &linfo;
if (mysql_bin_log.find_log_pos(&linfo, name, 1))
{
@@ -378,6 +377,10 @@ void mysql_binlog_send(THD* thd, char* log_ident, my_off_t pos,
goto err;
}
+ pthread_mutex_lock(&LOCK_thread_count);
+ thd->current_linfo = &linfo;
+ pthread_mutex_unlock(&LOCK_thread_count);
+
if ((file=open_binlog(&log, log_file_name, &errmsg)) < 0)
{
my_errno= ER_MASTER_FATAL_ERROR_READING_BINLOG;
@@ -1359,7 +1362,6 @@ bool mysql_show_binlog_events(THD* thd)
name=0; // Find first log
linfo.index_file_offset = 0;
- thd->current_linfo = &linfo;
if (mysql_bin_log.find_log_pos(&linfo, name, 1))
{
@@ -1367,6 +1369,10 @@ bool mysql_show_binlog_events(THD* thd)
goto err;
}
+ pthread_mutex_lock(&LOCK_thread_count);
+ thd->current_linfo = &linfo;
+ pthread_mutex_unlock(&LOCK_thread_count);
+
if ((file=open_binlog(&log, linfo.log_file_name, &errmsg)) < 0)
goto err;
@@ -1651,6 +1657,9 @@ static int show_slave_skip_errors(THD *thd, SHOW_VAR *var, char *buff);
static SHOW_VAR fixed_vars[]= {
{"log_slave_updates", (char*) &opt_log_slave_updates, SHOW_MY_BOOL},
+ {"relay_log" , (char*) &opt_relay_logname, SHOW_CHAR_PTR},
+ {"relay_log_index", (char*) &opt_relaylog_index_name, SHOW_CHAR_PTR},
+ {"relay_log_info_file", (char*) &relay_log_info_file, SHOW_CHAR_PTR},
{"relay_log_space_limit", (char*) &relay_log_space_limit, SHOW_LONGLONG},
{"slave_load_tmpdir", (char*) &slave_load_tmpdir, SHOW_CHAR_PTR},
{"slave_skip_errors", (char*) &show_slave_skip_errors, SHOW_FUNC},
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 1f206e2ec17..ff15789df97 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -123,7 +123,7 @@ static int do_select(JOIN *join,List<Item> *fields,TABLE *tmp_table,
static enum_nested_loop_state
evaluate_join_record(JOIN *join, JOIN_TAB *join_tab,
- int error, my_bool *report_error);
+ int error);
static enum_nested_loop_state
evaluate_null_complemented_join_record(JOIN *join, JOIN_TAB *join_tab);
static enum_nested_loop_state
@@ -224,6 +224,7 @@ static void select_describe(JOIN *join, bool need_tmp_table,bool need_order,
bool distinct, const char *message=NullS);
static Item *remove_additional_cond(Item* conds);
static void add_group_and_distinct_keys(JOIN *join, JOIN_TAB *join_tab);
+static bool test_if_ref(Item_field *left_item,Item *right_item);
/*
@@ -264,8 +265,8 @@ bool handle_select(THD *thd, LEX *lex, select_result *result,
result, unit, select_lex);
}
DBUG_PRINT("info",("res: %d report_error: %d", res,
- thd->net.report_error));
- res|= thd->net.report_error;
+ thd->is_error()));
+ res|= thd->is_error();
if (unlikely(res))
result->abort();
@@ -492,7 +493,7 @@ JOIN::prepare(Item ***rref_pointer_array,
(having->fix_fields(thd, &having) ||
having->check_cols(1)));
select_lex->having_fix_field= 0;
- if (having_fix_rc || thd->net.report_error)
+ if (having_fix_rc || thd->is_error())
DBUG_RETURN(-1); /* purecov: inspected */
thd->lex->allow_sum_func= save_allow_sum_func;
}
@@ -572,11 +573,12 @@ JOIN::prepare(Item ***rref_pointer_array,
/*
- Check if one one uses a not constant column with group functions
- and no GROUP BY.
+ Check if there are references to un-aggregated columns when computing
+ aggregate functions with implicit grouping (there is no GROUP BY).
TODO: Add check of calculation of GROUP functions and fields:
SELECT COUNT(*)+table.col1 from table1;
*/
+ if (thd->variables.sql_mode & MODE_ONLY_FULL_GROUP_BY)
{
if (!group_list)
{
@@ -590,6 +592,13 @@ JOIN::prepare(Item ***rref_pointer_array,
else if (!(flag & 2) && !item->const_during_execution())
flag|=2;
}
+ if (having)
+ {
+ if (having->with_sum_func)
+ flag |= 1;
+ else if (!having->const_during_execution())
+ flag |= 2;
+ }
if (flag == 3)
{
my_message(ER_MIX_OF_GROUP_FUNC_AND_FIELDS,
@@ -673,9 +682,6 @@ err:
without "checking NULL", remove the predicates that were pushed down
into the subquery.
- We can remove the equalities that will be guaranteed to be true by the
- fact that subquery engine will be using index lookup.
-
If the subquery compares scalar values, we can remove the condition that
was wrapped into trig_cond (it will be checked when needed by the subquery
engine)
@@ -685,6 +691,12 @@ err:
and non-NULL values, we'll do a full table scan and will rely on the
equalities corresponding to non-NULL parts of left tuple to filter out
non-matching records.
+
+ TODO: We can remove the equalities that will be guaranteed to be true by the
+ fact that subquery engine will be using index lookup. This must be done only
+ for cases where there are no conversion errors of significance, e.g. 257
+ that is searched in a byte. But this requires homogenization of the return
+ codes of all Field*::store() methods.
*/
void JOIN::remove_subq_pushed_predicates(Item **where)
@@ -692,17 +704,13 @@ void JOIN::remove_subq_pushed_predicates(Item **where)
if (conds->type() == Item::FUNC_ITEM &&
((Item_func *)this->conds)->functype() == Item_func::EQ_FUNC &&
((Item_func *)conds)->arguments()[0]->type() == Item::REF_ITEM &&
- ((Item_func *)conds)->arguments()[1]->type() == Item::FIELD_ITEM)
+ ((Item_func *)conds)->arguments()[1]->type() == Item::FIELD_ITEM &&
+ test_if_ref ((Item_field *)((Item_func *)conds)->arguments()[1],
+ ((Item_func *)conds)->arguments()[0]))
{
*where= 0;
return;
}
- if (conds->type() == Item::COND_ITEM &&
- ((class Item_func *)this->conds)->functype() ==
- Item_func::COND_AND_FUNC)
- {
- *where= remove_additional_cond(conds);
- }
}
@@ -818,7 +826,7 @@ JOIN::optimize()
}
conds= optimize_cond(this, conds, join_list, &cond_value);
- if (thd->net.report_error)
+ if (thd->is_error())
{
error= 1;
DBUG_PRINT("error",("Error from optimize_cond"));
@@ -827,7 +835,7 @@ JOIN::optimize()
{
having= optimize_cond(this, having, join_list, &having_value);
- if (thd->net.report_error)
+ if (thd->is_error())
{
error= 1;
DBUG_PRINT("error",("Error from optimize_cond"));
@@ -1032,7 +1040,7 @@ JOIN::optimize()
{
ORDER *org_order= order;
order=remove_const(this, order,conds,1, &simple_order);
- if (thd->net.report_error)
+ if (thd->is_error())
{
error= 1;
DBUG_PRINT("error",("Error from remove_const"));
@@ -1074,10 +1082,19 @@ JOIN::optimize()
We have found that grouping can be removed since groups correspond to
only one row anyway, but we still have to guarantee correct result
order. The line below effectively rewrites the query from GROUP BY
- <fields> to ORDER BY <fields>. One exception is if skip_sort_order is
- set (see above), then we can simply skip GROUP BY.
- */
- order= skip_sort_order ? 0 : group_list;
+ <fields> to ORDER BY <fields>. There are two exceptions:
+ - if skip_sort_order is set (see above), then we can simply skip
+ GROUP BY;
+ - we can only rewrite ORDER BY if the ORDER BY fields are 'compatible'
+ with the GROUP BY ones, i.e. either one is a prefix of another.
+ We only check if the ORDER BY is a prefix of GROUP BY. In this case
+ test_if_subpart() copies the ASC/DESC attributes from the original
+ ORDER BY fields.
+ If GROUP BY is a prefix of ORDER BY, then it is safe to leave
+ 'order' as is.
+ */
+ if (!order || test_if_subpart(group_list, order))
+ order= skip_sort_order ? 0 : group_list;
/*
If we have an IGNORE INDEX FOR GROUP BY(fields) clause, this must be
rewritten to IGNORE INDEX FOR ORDER BY(fields).
@@ -1163,7 +1180,7 @@ JOIN::optimize()
group_list= remove_const(this, (old_group_list= group_list), conds,
rollup.state == ROLLUP::STATE_NONE,
&simple_group);
- if (thd->net.report_error)
+ if (thd->is_error())
{
error= 1;
DBUG_PRINT("error",("Error from remove_const"));
@@ -1186,7 +1203,7 @@ JOIN::optimize()
{
group_list= procedure->group= remove_const(this, procedure->group, conds,
1, &simple_group);
- if (thd->net.report_error)
+ if (thd->is_error())
{
error= 1;
DBUG_PRINT("error",("Error from remove_const"));
@@ -1243,7 +1260,7 @@ JOIN::optimize()
{
if (!having)
{
- Item *where= 0;
+ Item *where= conds;
if (join_tab[0].type == JT_EQ_REF &&
join_tab[0].ref.items[0]->name == in_left_expr_name)
{
@@ -1696,7 +1713,7 @@ JOIN::exec()
test_if_skip_sort_order(&join_tab[const_tables], order,
select_limit, 0,
&join_tab[const_tables].table->
- keys_in_use_for_order_by))))
+ keys_in_use_for_query))))
order=0;
having= tmp_having;
select_describe(this, need_tmp,
@@ -2099,10 +2116,10 @@ JOIN::exec()
}
}
}
- /* XXX: When can we have here thd->net.report_error not zero? */
- if (thd->net.report_error)
+ /* XXX: When can we have here thd->is_error() not zero? */
+ if (thd->is_error())
{
- error= thd->net.report_error;
+ error= thd->is_error();
DBUG_VOID_RETURN;
}
curr_join->having= curr_join->tmp_having;
@@ -2308,7 +2325,7 @@ mysql_select(THD *thd, Item ***rref_pointer_array,
join->having_history= (join->having?join->having:join->tmp_having);
}
- if (thd->net.report_error)
+ if (thd->is_error())
goto err;
join->exec();
@@ -2334,7 +2351,7 @@ err:
{
thd->proc_info="end";
err|= select_lex->cleanup();
- DBUG_RETURN(err || thd->net.report_error);
+ DBUG_RETURN(err || thd->is_error());
}
DBUG_RETURN(join->error);
}
@@ -2350,6 +2367,11 @@ static ha_rows get_quick_record_count(THD *thd, SQL_SELECT *select,
{
int error;
DBUG_ENTER("get_quick_record_count");
+#ifndef EMBEDDED_LIBRARY // Avoid compiler warning
+ uchar buff[STACK_BUFF_ALLOC];
+#endif
+ if (check_stack_overrun(thd, STACK_MIN_SIZE, buff))
+ DBUG_RETURN(0); // Fatal error flag is set
if (select)
{
select->head=table;
@@ -3707,7 +3729,7 @@ update_ref_and_keys(THD *thd, DYNAMIC_ARRAY *keyuse,JOIN_TAB *join_tab,
{
KEYUSE key_end,*prev,*save_pos,*use;
- qsort(keyuse->buffer,keyuse->elements,sizeof(KEYUSE),
+ my_qsort(keyuse->buffer,keyuse->elements,sizeof(KEYUSE),
(qsort_cmp) sort_keyuse);
bzero((char*) &key_end,sizeof(key_end)); /* Add for easy testing */
@@ -3718,7 +3740,7 @@ update_ref_and_keys(THD *thd, DYNAMIC_ARRAY *keyuse,JOIN_TAB *join_tab,
found_eq_constant=0;
for (i=0 ; i < keyuse->elements-1 ; i++,use++)
{
- if (!use->used_tables)
+ if (!use->used_tables && use->optimize != KEY_OPTIMIZE_REF_OR_NULL)
use->table->const_key_parts[use->key]|= use->keypart_map;
if (use->keypart != FT_KEYPART)
{
@@ -4476,8 +4498,9 @@ choose_plan(JOIN *join, table_map join_tables)
Apply heuristic: pre-sort all access plans with respect to the number of
records accessed.
*/
- qsort(join->best_ref + join->const_tables, join->tables - join->const_tables,
- sizeof(JOIN_TAB*), straight_join?join_tab_cmp_straight:join_tab_cmp);
+ my_qsort(join->best_ref + join->const_tables,
+ join->tables - join->const_tables, sizeof(JOIN_TAB*),
+ straight_join ? join_tab_cmp_straight : join_tab_cmp);
if (straight_join)
{
@@ -4524,6 +4547,17 @@ choose_plan(JOIN *join, table_map join_tables)
ptr1 pointer to first JOIN_TAB object
ptr2 pointer to second JOIN_TAB object
+ NOTES
+ The order relation implemented by join_tab_cmp() is not transitive,
+ i.e. it is possible to choose such a, b and c that (a < b) && (b < c)
+ but (c < a). This implies that result of a sort using the relation
+ implemented by join_tab_cmp() depends on the order in which
+ elements are compared, i.e. the result is implementation-specific.
+ Example:
+ a: dependent = 0x0 table->map = 0x1 found_records = 3 ptr = 0x907e6b0
+ b: dependent = 0x0 table->map = 0x2 found_records = 3 ptr = 0x907e838
+ c: dependent = 0x6 table->map = 0x10 found_records = 2 ptr = 0x907ecd0
+
RETURN
1 if first is bigger
-1 if second is bigger
@@ -6283,10 +6317,9 @@ make_join_readinfo(JOIN *join, ulonglong options)
ordered. If there is a temp table the ordering is done as a last
operation and doesn't prevent join cache usage.
*/
- if (!ordered_set && !join->need_tmp &&
- ((table == join->sort_by_table &&
- (!join->order || join->skip_sort_order)) ||
- (join->sort_by_table == (TABLE *) 1 && i != join->const_tables)))
+ if (!ordered_set && !join->need_tmp &&
+ (table == join->sort_by_table ||
+ (join->sort_by_table == (TABLE *) 1 && i != join->const_tables)))
ordered_set= 1;
tab->sorted= sorted;
@@ -6425,7 +6458,15 @@ make_join_readinfo(JOIN *join, ulonglong options)
else if (!table->covering_keys.is_clear_all() &&
!(tab->select && tab->select->quick))
{ // Only read index tree
- tab->index=find_shortest_key(table, & table->covering_keys);
+ /*
+ See bug #26447: "Using the clustered index for a table scan
+ is always faster than using a secondary index".
+ */
+ if (table->s->primary_key != MAX_KEY &&
+ table->file->primary_key_is_clustered())
+ tab->index= table->s->primary_key;
+ else
+ tab->index=find_shortest_key(table, & table->covering_keys);
tab->read_first_record= join_read_first;
tab->type=JT_NEXT; // Read with index_first / index_next
}
@@ -6652,7 +6693,7 @@ void JOIN::cleanup(bool full)
for (tab= join_tab, end= tab+tables; tab != end; tab++)
{
if (tab->table)
- tab->table->file->ha_index_or_rnd_end();
+ tab->table->file->ha_index_or_rnd_end();
}
}
}
@@ -9186,9 +9227,43 @@ static Field *create_tmp_field_from_item(THD *thd, Item *item, TABLE *table,
new_field->set_derivation(item->collation.derivation);
break;
case DECIMAL_RESULT:
- new_field= new Field_new_decimal(item->max_length, maybe_null, item->name,
- item->decimals, item->unsigned_flag);
+ {
+ uint8 dec= item->decimals;
+ uint8 intg= ((Item_decimal *) item)->decimal_precision() - dec;
+ uint32 len= item->max_length;
+
+ /*
+ Trying to put too many digits overall in a DECIMAL(prec,dec)
+ will always throw a warning. We must limit dec to
+ DECIMAL_MAX_SCALE however to prevent an assert() later.
+ */
+
+ if (dec > 0)
+ {
+ signed int overflow;
+
+ dec= min(dec, DECIMAL_MAX_SCALE);
+
+ /*
+ If the value still overflows the field with the corrected dec,
+ we'll throw out decimals rather than integers. This is still
+ bad and of course throws a truncation warning.
+ +1: for decimal point
+ */
+
+ overflow= my_decimal_precision_to_length(intg + dec, dec,
+ item->unsigned_flag) - len;
+
+ if (overflow > 0)
+ dec= max(0, dec - overflow); // too long, discard fract
+ else
+ len -= item->decimals - dec; // corrected value fits
+ }
+
+ new_field= new Field_new_decimal(len, maybe_null, item->name,
+ dec, item->unsigned_flag);
break;
+ }
case ROW_RESULT:
default:
// This case should never be choosen
@@ -9344,6 +9419,36 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type,
}
/* Fall through */
case Item::FUNC_ITEM:
+ if (((Item_func *) item)->functype() == Item_func::FUNC_SP)
+ {
+ Item_func_sp *item_func_sp= (Item_func_sp *) item;
+ Field *sp_result_field= item_func_sp->get_sp_result_field();
+
+ if (make_copy_field)
+ {
+ DBUG_ASSERT(item_func_sp->result_field);
+ *from_field= item_func_sp->result_field;
+ }
+ else
+ {
+ *((*copy_func)++)= item;
+ }
+
+ Field *result_field=
+ create_tmp_field_from_field(thd,
+ sp_result_field,
+ item_func_sp->name,
+ table,
+ NULL,
+ convert_blob_length);
+
+ if (modify_item)
+ item->set_result_field(result_field);
+
+ return result_field;
+ }
+
+ /* Fall through */
case Item::COND_ITEM:
case Item::FIELD_AVG_ITEM:
case Item::FIELD_STD_ITEM:
@@ -9579,7 +9684,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
table->keys_in_use_for_query.init();
table->s= share;
- init_tmp_table_share(share, "", 0, tmpname, tmpname);
+ init_tmp_table_share(thd, share, "", 0, tmpname, tmpname);
share->blob_field= blob_field;
share->blob_ptr_size= portable_sizeof_char_ptr;
share->db_low_byte_first=1; // True for HEAP and MyISAM
@@ -10520,7 +10625,8 @@ Next_select_func setup_end_select_func(JOIN *join)
/* Set up select_end */
if (table)
{
- if (table->group && tmp_tbl->sum_func_count)
+ if (table->group && tmp_tbl->sum_func_count &&
+ !tmp_tbl->precomputed_group_by)
{
if (table->s->keys)
{
@@ -10619,6 +10725,15 @@ do_select(JOIN *join,List<Item> *fields,TABLE *table,Procedure *procedure)
error= (*end_select)(join, 0, 0);
if (error == NESTED_LOOP_OK || error == NESTED_LOOP_QUERY_LIMIT)
error= (*end_select)(join, 0, 1);
+
+ /*
+ If we don't go through evaluate_join_record(), do the counting
+ here. join->send_records is increased on success in end_send(),
+ so we don't touch it here.
+ */
+ join->examined_rows++;
+ join->thd->row_count++;
+ DBUG_ASSERT(join->examined_rows <= 1);
}
else if (join->send_row_on_empty_set())
{
@@ -10681,7 +10796,7 @@ do_select(JOIN *join,List<Item> *fields,TABLE *table,Procedure *procedure)
DBUG_PRINT("error",("Error: do_select() failed"));
}
#endif
- DBUG_RETURN(join->thd->net.report_error ? -1 : rc);
+ DBUG_RETURN(join->thd->is_error() ? -1 : rc);
}
@@ -10835,7 +10950,6 @@ sub_select(JOIN *join,JOIN_TAB *join_tab,bool end_of_records)
int error;
enum_nested_loop_state rc;
- my_bool *report_error= &(join->thd->net.report_error);
READ_RECORD *info= &join_tab->read_record;
if (join->resume_nested_loop)
@@ -10867,13 +10981,13 @@ sub_select(JOIN *join,JOIN_TAB *join_tab,bool end_of_records)
join->thd->row_count= 0;
error= (*join_tab->read_first_record)(join_tab);
- rc= evaluate_join_record(join, join_tab, error, report_error);
+ rc= evaluate_join_record(join, join_tab, error);
}
while (rc == NESTED_LOOP_OK)
{
error= info->read_record(info);
- rc= evaluate_join_record(join, join_tab, error, report_error);
+ rc= evaluate_join_record(join, join_tab, error);
}
if (rc == NESTED_LOOP_NO_MORE_ROWS &&
@@ -10897,13 +11011,13 @@ sub_select(JOIN *join,JOIN_TAB *join_tab,bool end_of_records)
static enum_nested_loop_state
evaluate_join_record(JOIN *join, JOIN_TAB *join_tab,
- int error, my_bool *report_error)
+ int error)
{
bool not_used_in_distinct=join_tab->not_used_in_distinct;
ha_rows found_records=join->found_records;
COND *select_cond= join_tab->select_cond;
- if (error > 0 || (*report_error)) // Fatal error
+ if (error > 0 || (join->thd->is_error())) // Fatal error
return NESTED_LOOP_ERROR;
if (error < 0)
return NESTED_LOOP_NO_MORE_ROWS;
@@ -12153,8 +12267,12 @@ static bool test_if_ref(Item_field *left_item,Item *right_item)
Item *ref_item=part_of_refkey(field->table,field);
if (ref_item && ref_item->eq(right_item,1))
{
+ right_item= right_item->real_item();
if (right_item->type() == Item::FIELD_ITEM)
return (field->eq_def(((Item_field *) right_item)->field));
+ /* remove equalities injected by IN->EXISTS transformation */
+ else if (right_item->type() == Item::CACHE_ITEM)
+ return ((Item_cache *)right_item)->eq_def (field);
if (right_item->const_item() && !(right_item->is_null()))
{
/*
@@ -12615,6 +12733,8 @@ find_field_in_item_list (Field *field, void *data)
If we can use an index, the JOIN_TAB / tab->select struct
is changed to use the index.
+ The index must cover all fields in <order>, or it will not be considered.
+
Return:
0 We have to use filesort to do the sorting
1 We can use an index.
@@ -12774,12 +12894,6 @@ test_if_skip_sort_order(JOIN_TAB *tab,ORDER *order,ha_rows select_limit,
LINT_INIT(best_key_direction);
LINT_INIT(best_records);
- /*
- filesort() and join cache are usually faster than reading in
- index order and not using join cache
- */
- if (tab->type == JT_ALL && tab->join->tables > tab->join->const_tables + 1)
- DBUG_RETURN(0);
/*
If not used with LIMIT, only use keys if the whole query can be
resolved with a key; This is because filesort() is usually faster than
@@ -12787,6 +12901,12 @@ test_if_skip_sort_order(JOIN_TAB *tab,ORDER *order,ha_rows select_limit,
*/
if (select_limit >= table_records)
{
+ /*
+ filesort() and join cache are usually faster than reading in
+ index order and not using join cache
+ */
+ if (tab->type == JT_ALL && tab->join->tables > tab->join->const_tables + 1)
+ DBUG_RETURN(0);
keys= *table->file->keys_to_use_for_scanning();
keys.merge(table->covering_keys);
@@ -14371,13 +14491,31 @@ calc_group_buffer(JOIN *join,ORDER *group)
group_item->decimals);
break;
case STRING_RESULT:
+ {
+ enum enum_field_types type= group_item->field_type();
/*
- Group strings are taken as varstrings and require an length field.
- A field is not yet created by create_tmp_field()
- and the sizes should match up.
+ As items represented as DATE/TIME fields in the group buffer
+ have STRING_RESULT result type, we increase the length
+ by 8 as maximum pack length of such fields.
*/
- key_length+= group_item->max_length + HA_KEY_BLOB_LENGTH;
+ if (type == MYSQL_TYPE_TIME ||
+ type == MYSQL_TYPE_DATE ||
+ type == MYSQL_TYPE_DATETIME ||
+ type == MYSQL_TYPE_TIMESTAMP)
+ {
+ key_length+= 8;
+ }
+ else
+ {
+ /*
+ Group strings are taken as varstrings and require an length field.
+ A field is not yet created by create_tmp_field()
+ and the sizes should match up.
+ */
+ key_length+= group_item->max_length + HA_KEY_BLOB_LENGTH;
+ }
break;
+ }
default:
/* This case should never be choosen */
DBUG_ASSERT(0);
@@ -14799,6 +14937,9 @@ change_to_use_tmp_fields(THD *thd, Item **ref_pointer_array,
item_field= (Item*) new Item_field(field);
if (!item_field)
DBUG_RETURN(TRUE); // Fatal error
+
+ if (item->real_item()->type() != Item::FIELD_ITEM)
+ field->orig_table= 0;
item_field->name= item->name;
if (item->type() == Item::REF_ITEM)
{
@@ -15767,6 +15908,10 @@ static void select_describe(JOIN *join, bool need_tmp_table, bool need_order,
/* Add "rows" field to item_list. */
if (table_list->schema_table)
{
+ /* in_rows */
+ if (join->thd->lex->describe & DESCRIBE_EXTENDED)
+ item_list.push_back(item_null);
+ /* rows */
item_list.push_back(item_null);
}
else
@@ -15835,7 +15980,8 @@ static void select_describe(JOIN *join, bool need_tmp_table, bool need_order,
{
if (tab->use_quick == 2)
{
- char buf[MAX_KEY/8+1];
+ /* 4 bits per 1 hex digit + terminating '\0' */
+ char buf[MAX_KEY / 4 + 1];
extra.append(STRING_WITH_LEN("; Range checked for each "
"record (index map: 0x"));
extra.append(tab->keys.print(buf));
@@ -15991,7 +16137,7 @@ bool mysql_explain_union(THD *thd, SELECT_LEX_UNIT *unit, select_result *result)
first->options | thd->options | SELECT_DESCRIBE,
result, unit, first);
}
- DBUG_RETURN(res || thd->net.report_error);
+ DBUG_RETURN(res || thd->is_error());
}
@@ -16044,6 +16190,43 @@ static void print_join(THD *thd, String *str, List<TABLE_LIST> *tables)
}
+/**
+ @brief Print an index hint
+
+ @details Prints out the USE|FORCE|IGNORE index hint.
+
+ @param thd the current thread
+ @param[out] str appends the index hint here
+ @param hint what the hint is (as string : "USE INDEX"|
+ "FORCE INDEX"|"IGNORE INDEX")
+ @param hint_length the length of the string in 'hint'
+ @param indexes a list of index names for the hint
+*/
+
+void
+Index_hint::print(THD *thd, String *str)
+{
+ switch (type)
+ {
+ case INDEX_HINT_IGNORE: str->append(STRING_WITH_LEN("IGNORE INDEX")); break;
+ case INDEX_HINT_USE: str->append(STRING_WITH_LEN("USE INDEX")); break;
+ case INDEX_HINT_FORCE: str->append(STRING_WITH_LEN("FORCE INDEX")); break;
+ }
+ str->append (STRING_WITH_LEN(" ("));
+ if (key_name.length)
+ {
+ if (thd && !my_strnncoll(system_charset_info,
+ (const uchar *)key_name.str, key_name.length,
+ (const uchar *)primary_key_name,
+ strlen(primary_key_name)))
+ str->append(primary_key_name);
+ else
+ append_identifier(thd, str, key_name.str, key_name.length);
+ }
+ str->append(')');
+}
+
+
/*
Print table as it should be in join list
@@ -16108,8 +16291,33 @@ void TABLE_LIST::print(THD *thd, String *str)
}
if (my_strcasecmp(table_alias_charset, cmp_name, alias))
{
+ char t_alias_buff[MAX_ALIAS_NAME];
+ const char *t_alias= alias;
+
str->append(' ');
- append_identifier(thd, str, alias, strlen(alias));
+ if (lower_case_table_names== 1)
+ {
+ if (alias && alias[0])
+ {
+ strmov(t_alias_buff, alias);
+ my_casedn_str(files_charset_info, t_alias_buff);
+ t_alias= t_alias_buff;
+ }
+ }
+
+ append_identifier(thd, str, t_alias, strlen(t_alias));
+ }
+
+ if (index_hints)
+ {
+ List_iterator<Index_hint> it(*index_hints);
+ Index_hint *hint;
+
+ while ((hint= it++))
+ {
+ str->append (STRING_WITH_LEN(" "));
+ hint->print (thd, str);
+ }
}
}
}
diff --git a/sql/sql_select.h b/sql/sql_select.h
index efa92432e2b..cb59032315a 100644
--- a/sql/sql_select.h
+++ b/sql/sql_select.h
@@ -566,9 +566,13 @@ public:
store_key(THD *thd, Field *field_arg, uchar *ptr, uchar *null, uint length)
:null_key(0), null_ptr(null), err(0)
{
- if (field_arg->type() == MYSQL_TYPE_BLOB)
+ if (field_arg->type() == MYSQL_TYPE_BLOB
+ || field_arg->type() == MYSQL_TYPE_GEOMETRY)
{
- /* Key segments are always packed with a 2 byte length prefix */
+ /*
+ Key segments are always packed with a 2 byte length prefix.
+ See mi_rkey for details.
+ */
to_field= new Field_varstring(ptr, length, 2, null, 1,
Field::NONE, field_arg->field_name,
field_arg->table->s, field_arg->charset());
@@ -590,14 +594,17 @@ public:
enum store_key_result copy()
{
enum store_key_result result;
- enum_check_fields saved_count_cuted_fields=
- to_field->table->in_use->count_cuted_fields;
+ THD *thd= to_field->table->in_use;
+ enum_check_fields saved_count_cuted_fields= thd->count_cuted_fields;
+ ulong sql_mode= thd->variables.sql_mode;
+ thd->variables.sql_mode&= ~(MODE_NO_ZERO_IN_DATE | MODE_NO_ZERO_DATE);
- to_field->table->in_use->count_cuted_fields= CHECK_FIELD_IGNORE;
+ thd->count_cuted_fields= CHECK_FIELD_IGNORE;
result= copy_inner();
- to_field->table->in_use->count_cuted_fields= saved_count_cuted_fields;
+ thd->count_cuted_fields= saved_count_cuted_fields;
+ thd->variables.sql_mode= sql_mode;
return result;
}
diff --git a/sql/sql_servers.cc b/sql/sql_servers.cc
index a780c561ffe..602c289a605 100644
--- a/sql/sql_servers.cc
+++ b/sql/sql_servers.cc
@@ -140,6 +140,7 @@ bool servers_init(bool dont_read_servers_table)
DBUG_RETURN(TRUE);
thd->thread_stack= (char*) &thd;
thd->store_globals();
+ lex_start(thd);
/*
It is safe to call servers_reload() since servers_* arrays and hashes which
will be freed there are global static objects and thus are initialized
@@ -289,7 +290,7 @@ get_server_from_table_to_cache(TABLE *table)
{
/* alloc a server struct */
char *ptr;
- char *blank= (char*)"";
+ char * const blank= (char*)"";
FOREIGN_SERVER *server= (FOREIGN_SERVER *)alloc_root(&mem,
sizeof(FOREIGN_SERVER));
DBUG_ENTER("get_server_from_table_to_cache");
@@ -312,7 +313,7 @@ get_server_from_table_to_cache(TABLE *table)
server->port= server->sport ? atoi(server->sport) : 0;
ptr= get_field(&mem, table->field[6]);
- server->socket= ptr && strlen(ptr) ? ptr : NULL;
+ server->socket= ptr && strlen(ptr) ? ptr : blank;
ptr= get_field(&mem, table->field[7]);
server->scheme= ptr ? ptr : blank;
ptr= get_field(&mem, table->field[8]);
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 38db2fe85a5..f57359231f8 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -29,6 +29,8 @@
#include "event_data_objects.h"
#include <my_dir.h>
+#define STR_OR_NIL(S) ((S) ? (S) : "<nil>")
+
#ifdef WITH_PARTITION_STORAGE_ENGINE
#include "ha_partition.h"
#endif
@@ -2280,10 +2282,12 @@ int make_table_list(THD *thd, SELECT_LEX *sel,
@param[in] table I_S table
@param[in, out] lookup_field_vals Struct which holds lookup values
- @return void
+ @return
+ 0 success
+ 1 error, there can be no matching records for the condition
*/
-void get_lookup_value(THD *thd, Item_func *item_func,
+bool get_lookup_value(THD *thd, Item_func *item_func,
TABLE_LIST *table,
LOOKUP_FIELD_VALUES *lookup_field_vals)
{
@@ -2316,13 +2320,17 @@ void get_lookup_value(THD *thd, Item_func *item_func,
idx_val= 0;
}
else
- return;
+ return 0;
item_field= (Item_field*) item_func->arguments()[idx_field];
if (table->table != item_field->field->table)
- return;
+ return 0;
tmp_str= item_func->arguments()[idx_val]->val_str(&str_buff);
+ /* impossible value */
+ if (!tmp_str)
+ return 1;
+
/* Lookup value is database name */
if (!cs->coll->strnncollsp(cs, (uchar *) field_name1, strlen(field_name1),
(uchar *) item_field->field_name,
@@ -2341,7 +2349,7 @@ void get_lookup_value(THD *thd, Item_func *item_func,
tmp_str->length(), FALSE);
}
}
- return;
+ return 0;
}
@@ -2357,14 +2365,16 @@ void get_lookup_value(THD *thd, Item_func *item_func,
@param[in] table I_S table
@param[in, out] lookup_field_vals Struct which holds lookup values
- @return void
+ @return
+ 0 success
+ 1 error, there can be no matching records for the condition
*/
-void calc_lookup_values_from_cond(THD *thd, COND *cond, TABLE_LIST *table,
+bool calc_lookup_values_from_cond(THD *thd, COND *cond, TABLE_LIST *table,
LOOKUP_FIELD_VALUES *lookup_field_vals)
{
if (!cond)
- return;
+ return 0;
if (cond->type() == Item::COND_ITEM)
{
@@ -2375,16 +2385,23 @@ void calc_lookup_values_from_cond(THD *thd, COND *cond, TABLE_LIST *table,
while ((item= li++))
{
if (item->type() == Item::FUNC_ITEM)
- get_lookup_value(thd, (Item_func*)item, table, lookup_field_vals);
+ {
+ if (get_lookup_value(thd, (Item_func*)item, table, lookup_field_vals))
+ return 1;
+ }
else
- calc_lookup_values_from_cond(thd, item, table, lookup_field_vals);
+ {
+ if (calc_lookup_values_from_cond(thd, item, table, lookup_field_vals))
+ return 1;
+ }
}
}
- return;
+ return 0;
}
- else if (cond->type() == Item::FUNC_ITEM)
- get_lookup_value(thd, (Item_func*) cond, table, lookup_field_vals);
- return;
+ else if (cond->type() == Item::FUNC_ITEM &&
+ get_lookup_value(thd, (Item_func*) cond, table, lookup_field_vals))
+ return 1;
+ return 0;
}
@@ -2497,10 +2514,12 @@ static COND * make_cond_for_info_schema(COND *cond, TABLE_LIST *table)
@param[in] tables I_S table
@param[in, out] lookup_field_values Struct which holds lookup values
- @return void
+ @return
+ 0 success
+ 1 error, there can be no matching records for the condition
*/
-void get_lookup_field_values(THD *thd, COND *cond, TABLE_LIST *tables,
+bool get_lookup_field_values(THD *thd, COND *cond, TABLE_LIST *tables,
LOOKUP_FIELD_VALUES *lookup_field_values)
{
LEX *lex= thd->lex;
@@ -2514,7 +2533,7 @@ void get_lookup_field_values(THD *thd, COND *cond, TABLE_LIST *tables,
lookup_field_values->db_value.length= strlen(wild);
lookup_field_values->wild_db_value= 1;
}
- break;
+ return 0;
case SQLCOM_SHOW_TABLES:
case SQLCOM_SHOW_TABLE_STATUS:
case SQLCOM_SHOW_TRIGGERS:
@@ -2527,14 +2546,13 @@ void get_lookup_field_values(THD *thd, COND *cond, TABLE_LIST *tables,
lookup_field_values->table_value.length= strlen(wild);
lookup_field_values->wild_table_value= 1;
}
- break;
+ return 0;
default:
/*
The "default" is for queries over I_S.
All previous cases handle SHOW commands.
*/
- calc_lookup_values_from_cond(thd, cond, tables, lookup_field_values);
- break;
+ return calc_lookup_values_from_cond(thd, cond, tables, lookup_field_values);
}
}
@@ -3124,10 +3142,14 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond)
}
schema_table_idx= get_schema_table_idx(schema_table);
- get_lookup_field_values(thd, cond, tables, &lookup_field_vals);
+ if (get_lookup_field_values(thd, cond, tables, &lookup_field_vals))
+ {
+ error= 0;
+ goto err;
+ }
DBUG_PRINT("INDEX VALUES",("db_name='%s', table_name='%s'",
- lookup_field_vals.db_value.str,
- lookup_field_vals.table_value.str));
+ STR_OR_NIL(lookup_field_vals.db_value.str),
+ STR_OR_NIL(lookup_field_vals.table_value.str)));
if (!lookup_field_vals.wild_db_value && !lookup_field_vals.wild_table_value)
{
@@ -3339,7 +3361,8 @@ int fill_schema_schemata(THD *thd, TABLE_LIST *tables, COND *cond)
#endif
DBUG_ENTER("fill_schema_shemata");
- get_lookup_field_values(thd, cond, tables, &lookup_field_vals);
+ if (get_lookup_field_values(thd, cond, tables, &lookup_field_vals))
+ DBUG_RETURN(0);
DBUG_PRINT("INDEX VALUES",("db_name='%s', table_name='%s'",
lookup_field_vals.db_value.str,
lookup_field_vals.table_value.str));
@@ -3350,7 +3373,8 @@ int fill_schema_schemata(THD *thd, TABLE_LIST *tables, COND *cond)
/*
If we have lookup db value we should check that the database exists
*/
- if(lookup_field_vals.db_value.str && !lookup_field_vals.wild_db_value)
+ if(lookup_field_vals.db_value.str && !lookup_field_vals.wild_db_value &&
+ !with_i_schema)
{
char path[FN_REFLEN+16];
uint path_len;
@@ -3504,6 +3528,10 @@ static int get_schema_tables_record(THD *thd, TABLE_LIST *tables,
(ptr == option_buff ? 0 :
(uint) (ptr-option_buff)-1), cs);
+ tmp_buff= (share->table_charset ?
+ share->table_charset->name : "default");
+ table->field[17]->store(tmp_buff, strlen(tmp_buff), cs);
+
if (share->comment.str)
table->field[20]->store(share->comment.str, share->comment.length, cs);
@@ -3581,9 +3609,6 @@ static int get_schema_tables_record(THD *thd, TABLE_LIST *tables,
table->field[16]->store_time(&time, MYSQL_TIMESTAMP_DATETIME);
table->field[16]->set_notnull();
}
- tmp_buff= (share->table_charset ?
- share->table_charset->name : "default");
- table->field[17]->store(tmp_buff, strlen(tmp_buff), cs);
if (file->ha_table_flags() & (ulong) HA_HAS_CHECKSUM)
{
table->field[18]->store((longlong) file->checksum(), TRUE);
@@ -3772,8 +3797,11 @@ static int get_schema_column_record(THD *thd, TABLE_LIST *tables,
end= tmp;
if (field->unireg_check == Field::NEXT_NUMBER)
- end=strmov(tmp,"auto_increment");
- table->field[16]->store(tmp, (uint) (end-tmp), cs);
+ table->field[16]->store(STRING_WITH_LEN("auto_increment"), cs);
+ if (show_table->timestamp_field == field &&
+ field->unireg_check != Field::TIMESTAMP_DN_FIELD)
+ table->field[16]->store(STRING_WITH_LEN("on update CURRENT_TIMESTAMP"),
+ cs);
table->field[18]->store(field->comment.str, field->comment.length, cs);
if (schema_table_store_record(thd, table))
@@ -5976,7 +6004,7 @@ ST_FIELD_INFO columns_fields_info[]=
{"COLLATION_NAME", 64, MYSQL_TYPE_STRING, 0, 1, "Collation", OPEN_FRM_ONLY},
{"COLUMN_TYPE", 65535, MYSQL_TYPE_STRING, 0, 0, "Type", OPEN_FRM_ONLY},
{"COLUMN_KEY", 3, MYSQL_TYPE_STRING, 0, 0, "Key", OPEN_FRM_ONLY},
- {"EXTRA", 20, MYSQL_TYPE_STRING, 0, 0, "Extra", OPEN_FRM_ONLY},
+ {"EXTRA", 27, MYSQL_TYPE_STRING, 0, 0, "Extra", OPEN_FRM_ONLY},
{"PRIVILEGES", 80, MYSQL_TYPE_STRING, 0, 0, "Privileges", OPEN_FRM_ONLY},
{"COLUMN_COMMENT", 255, MYSQL_TYPE_STRING, 0, 0, "Comment", OPEN_FRM_ONLY},
{0, 0, MYSQL_TYPE_STRING, 0, 0, 0, SKIP_OPEN_TABLE}
@@ -6857,6 +6885,9 @@ bool show_create_trigger(THD *thd, const sp_name *trg_name)
{
TABLE_LIST *lst= get_trigger_table(thd, trg_name);
+ if (!lst)
+ return TRUE;
+
/*
Open the table by name in order to load Table_triggers_list object.
diff --git a/sql/sql_string.cc b/sql/sql_string.cc
index a8eb7360339..2e076af45eb 100644
--- a/sql/sql_string.cc
+++ b/sql/sql_string.cc
@@ -846,7 +846,7 @@ outp:
with optional left padding (for binary -> UCS2 conversion)
SYNOPSIS
- well_formed_copy_nhars()
+ well_formed_copy_nchars()
to Store result here
to_length Maxinum length of "to" string
to_cs Character set of "to" string
@@ -983,7 +983,10 @@ outp:
goto outp;
}
else
+ {
+ from= from_prev;
break;
+ }
}
*from_end_pos= from;
res= to - to_start;
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 26f9833fd3d..ed5cbfcf8b4 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -279,7 +279,7 @@ uint build_tmptable_filename(THD* thd, char *buff, size_t bufflen)
*/
-typedef struct st_global_ddl_log
+struct st_global_ddl_log
{
/*
We need to adjust buffer size to be able to handle downgrades/upgrades
@@ -297,10 +297,12 @@ typedef struct st_global_ddl_log
uint name_len;
uint io_size;
bool inited;
+ bool do_release;
bool recovery_phase;
-} GLOBAL_DDL_LOG;
+ st_global_ddl_log() : inited(false), do_release(false) {}
+};
-GLOBAL_DDL_LOG global_ddl_log;
+st_global_ddl_log global_ddl_log;
pthread_mutex_t LOCK_gdl;
@@ -434,7 +436,7 @@ static uint read_ddl_log_header()
create_ddl_log_file_name(file_name);
if ((global_ddl_log.file_id= my_open(file_name,
- O_RDWR | O_BINARY, MYF(MY_WME))) >= 0)
+ O_RDWR | O_BINARY, MYF(0))) >= 0)
{
if (read_ddl_log_file_entry(0UL))
{
@@ -460,6 +462,7 @@ static uint read_ddl_log_header()
global_ddl_log.first_used= NULL;
global_ddl_log.num_entries= 0;
VOID(pthread_mutex_init(&LOCK_gdl, MY_MUTEX_INIT_FAST));
+ global_ddl_log.do_release= true;
DBUG_RETURN(entry_no);
}
@@ -1150,6 +1153,9 @@ void release_ddl_log()
DDL_LOG_MEMORY_ENTRY *used_list= global_ddl_log.first_used;
DBUG_ENTER("release_ddl_log");
+ if (!global_ddl_log.do_release)
+ DBUG_VOID_RETURN;
+
pthread_mutex_lock(&LOCK_gdl);
while (used_list)
{
@@ -1167,6 +1173,7 @@ void release_ddl_log()
global_ddl_log.inited= 0;
pthread_mutex_unlock(&LOCK_gdl);
VOID(pthread_mutex_destroy(&LOCK_gdl));
+ global_ddl_log.do_release= false;
DBUG_VOID_RETURN;
}
@@ -1241,6 +1248,10 @@ bool mysql_write_frm(ALTER_PARTITION_PARAM_TYPE *lpt, uint flags)
char shadow_path[FN_REFLEN+1];
char shadow_frm_name[FN_REFLEN+1];
char frm_name[FN_REFLEN+1];
+#ifdef WITH_PARTITION_STORAGE_ENGINE
+ char *part_syntax_buf;
+ uint syntax_len;
+#endif
DBUG_ENTER("mysql_write_frm");
/*
@@ -1264,12 +1275,8 @@ bool mysql_write_frm(ALTER_PARTITION_PARAM_TYPE *lpt, uint flags)
#ifdef WITH_PARTITION_STORAGE_ENGINE
{
partition_info *part_info= lpt->table->part_info;
- char *part_syntax_buf;
- uint syntax_len;
-
if (part_info)
{
- TABLE_SHARE *share= lpt->table->s;
if (!(part_syntax_buf= generate_partition_syntax(part_info,
&syntax_len,
TRUE, TRUE)))
@@ -1277,16 +1284,7 @@ bool mysql_write_frm(ALTER_PARTITION_PARAM_TYPE *lpt, uint flags)
DBUG_RETURN(TRUE);
}
part_info->part_info_string= part_syntax_buf;
- share->partition_info_len= part_info->part_info_len= syntax_len;
- if (share->partition_info_buffer_size < syntax_len + 1)
- {
- share->partition_info_buffer_size= syntax_len+1;
- if (!(share->partition_info=
- (char*) alloc_root(&share->mem_root, syntax_len+1)))
- DBUG_RETURN(TRUE);
-
- }
- memcpy((char*) share->partition_info, part_syntax_buf, syntax_len + 1);
+ part_info->part_info_len= syntax_len;
}
}
#endif
@@ -1364,7 +1362,40 @@ bool mysql_write_frm(ALTER_PARTITION_PARAM_TYPE *lpt, uint flags)
#endif
{
error= 1;
+ goto err;
+ }
+#ifdef WITH_PARTITION_STORAGE_ENGINE
+ if (part_info)
+ {
+ TABLE_SHARE *share= lpt->table->s;
+ char *tmp_part_syntax_str;
+ if (!(part_syntax_buf= generate_partition_syntax(part_info,
+ &syntax_len,
+ TRUE, TRUE)))
+ {
+ error= 1;
+ goto err;
+ }
+ if (share->partition_info_buffer_size < syntax_len + 1)
+ {
+ share->partition_info_buffer_size= syntax_len+1;
+ if (!(tmp_part_syntax_str= (char*) strmake_root(&share->mem_root,
+ part_syntax_buf,
+ syntax_len)))
+ {
+ error= 1;
+ goto err;
+ }
+ share->partition_info= tmp_part_syntax_str;
+ }
+ else
+ memcpy((char*) share->partition_info, part_syntax_buf, syntax_len + 1);
+ share->partition_info_len= part_info->part_info_len= syntax_len;
+ part_info->part_info_string= part_syntax_buf;
}
+#endif
+
+err:
VOID(pthread_mutex_unlock(&LOCK_open));
#ifdef WITH_PARTITION_STORAGE_ENGINE
deactivate_ddl_log_entry(part_info->frm_log_entry->entry_pos);
@@ -1503,7 +1534,7 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
char path[FN_REFLEN], *alias;
uint path_length;
String wrong_tables;
- int error;
+ int error= 0;
int non_temp_tables_count= 0;
bool some_tables_deleted=0, tmp_table_deleted=0, foreign_key_error=0;
String built_query;
@@ -1521,6 +1552,8 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
built_query.append("DROP TABLE ");
}
+ mysql_ha_rm_tables(thd, tables, FALSE);
+
pthread_mutex_lock(&LOCK_open);
/*
@@ -1562,11 +1595,24 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
handlerton *table_type;
enum legacy_db_type frm_db_type;
- mysql_ha_flush(thd, table, MYSQL_HA_CLOSE_FINAL, 1);
- if (!close_temporary_table(thd, table))
- {
- tmp_table_deleted=1;
- continue; // removed temporary table
+ DBUG_PRINT("table", ("table_l: '%s'.'%s' table: 0x%lx s: 0x%lx",
+ table->db, table->table_name, (long) table->table,
+ table->table ? (long) table->table->s : (long) -1));
+
+ error= drop_temporary_table(thd, table);
+
+ switch (error) {
+ case 0:
+ // removed temporary table
+ tmp_table_deleted= 1;
+ continue;
+ case -1:
+ DBUG_ASSERT(thd->in_sub_stmt);
+ error= 1;
+ goto err_with_placeholders;
+ default:
+ // temporary table not found
+ error= 0;
}
/*
@@ -1593,7 +1639,6 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
built_query.append("`,");
}
- error=0;
table_type= table->db_type;
if (!drop_temporary)
{
@@ -1616,8 +1661,9 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
}
alias= (lower_case_table_names == 2) ? table->alias : table->table_name;
/* remove .frm file and engine files */
- path_length= build_table_filename(path, sizeof(path),
- db, alias, reg_ext, 0);
+ path_length= build_table_filename(path, sizeof(path), db, alias, reg_ext,
+ table->internal_tmp_table ?
+ FN_IS_TMP : 0);
}
if (drop_temporary ||
(table_type == NULL &&
@@ -1674,6 +1720,8 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
wrong_tables.append(',');
wrong_tables.append(String(table->table_name,system_charset_info));
}
+ DBUG_PRINT("table", ("table: 0x%lx s: 0x%lx", (long) table->table,
+ table->table ? (long) table->table->s : (long) -1));
}
/*
It's safe to unlock LOCK_open: we have an exclusive lock
@@ -1782,7 +1830,8 @@ bool quick_rm_table(handlerton *base,const char *db,
/*
Sort keys in the following order:
- PRIMARY KEY
- - UNIQUE keyws where all column are NOT NULL
+ - UNIQUE keys where all column are NOT NULL
+ - UNIQUE keys that don't contain partial segments
- Other UNIQUE keys
- Normal keys
- Fulltext keys
@@ -1793,26 +1842,31 @@ bool quick_rm_table(handlerton *base,const char *db,
static int sort_keys(KEY *a, KEY *b)
{
- if (a->flags & HA_NOSAME)
+ ulong a_flags= a->flags, b_flags= b->flags;
+
+ if (a_flags & HA_NOSAME)
{
- if (!(b->flags & HA_NOSAME))
+ if (!(b_flags & HA_NOSAME))
return -1;
- if ((a->flags ^ b->flags) & (HA_NULL_PART_KEY | HA_END_SPACE_KEY))
+ if ((a_flags ^ b_flags) & (HA_NULL_PART_KEY | HA_END_SPACE_KEY))
{
/* Sort NOT NULL keys before other keys */
- return (a->flags & (HA_NULL_PART_KEY | HA_END_SPACE_KEY)) ? 1 : -1;
+ return (a_flags & (HA_NULL_PART_KEY | HA_END_SPACE_KEY)) ? 1 : -1;
}
if (a->name == primary_key_name)
return -1;
if (b->name == primary_key_name)
return 1;
+ /* Sort keys don't containing partial segments before others */
+ if ((a_flags ^ b_flags) & HA_KEY_HAS_PART_KEY_SEG)
+ return (a_flags & HA_KEY_HAS_PART_KEY_SEG) ? 1 : -1;
}
- else if (b->flags & HA_NOSAME)
+ else if (b_flags & HA_NOSAME)
return 1; // Prefer b
- if ((a->flags ^ b->flags) & HA_FULLTEXT)
+ if ((a_flags ^ b_flags) & HA_FULLTEXT)
{
- return (a->flags & HA_FULLTEXT) ? 1 : -1;
+ return (a_flags & HA_FULLTEXT) ? 1 : -1;
}
/*
Prefer original key order. usable_key_parts contains here
@@ -2380,8 +2434,8 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
sql_field->length= dup_field->char_length;
sql_field->pack_length= dup_field->pack_length;
sql_field->key_length= dup_field->key_length;
- sql_field->create_length_to_internal_length();
sql_field->decimals= dup_field->decimals;
+ sql_field->create_length_to_internal_length();
sql_field->unireg_check= dup_field->unireg_check;
/*
We're making one field from two, the result field will have
@@ -2740,7 +2794,7 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
}
if (f_is_geom(sql_field->pack_flag) && sql_field->geom_type ==
Field::GEOM_POINT)
- column->length= 21;
+ column->length= 25;
if (!column->length)
{
my_error(ER_BLOB_KEY_WITHOUT_LENGTH, MYF(0), column->field_name);
@@ -2876,6 +2930,10 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
else
key_info->flags|= HA_PACK_KEY;
}
+ /* Check if the key segment is partial, set the key flag accordingly */
+ if (length != sql_field->key_length)
+ key_info->flags|= HA_KEY_HAS_PART_KEY_SEG;
+
key_length+=length;
key_part_info++;
@@ -2931,8 +2989,8 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
DBUG_RETURN(TRUE);
}
/* Sort keys in optimized order */
- qsort((uchar*) *key_info_buffer, *key_count, sizeof(KEY),
- (qsort_cmp) sort_keys);
+ my_qsort((uchar*) *key_info_buffer, *key_count, sizeof(KEY),
+ (qsort_cmp) sort_keys);
create_info->null_bits= null_fields;
DBUG_RETURN(FALSE);
@@ -3690,14 +3748,16 @@ mysql_rename_table(handlerton *base, const char *old_db,
Win32 clients must also have a WRITE LOCK on the table !
*/
-static void wait_while_table_is_used(THD *thd,TABLE *table,
- enum ha_extra_function function)
+void wait_while_table_is_used(THD *thd,TABLE *table,
+ enum ha_extra_function function)
{
DBUG_ENTER("wait_while_table_is_used");
DBUG_PRINT("enter", ("table: '%s' share: 0x%lx db_stat: %u version: %lu",
table->s->table_name.str, (ulong) table->s,
table->db_stat, table->s->version));
+ safe_mutex_assert_owner(&LOCK_open);
+
/* Mark all tables that are in use as 'old' */
mysql_lock_abort(thd, table, TRUE); /* end threads waiting on lock */
@@ -3821,6 +3881,8 @@ static int prepare_for_restore(THD* thd, TABLE_LIST* table,
DBUG_RETURN(send_check_errmsg(thd, table, "restore",
"Failed to open partially restored table"));
}
+ /* A MERGE table must not come here. */
+ DBUG_ASSERT(!table->table || !table->table->child_l);
pthread_mutex_unlock(&LOCK_open);
DBUG_RETURN(0);
}
@@ -3863,6 +3925,10 @@ static int prepare_for_repair(THD *thd, TABLE_LIST *table_list,
table= &tmp_table;
pthread_mutex_unlock(&LOCK_open);
}
+
+ /* A MERGE table must not come here. */
+ DBUG_ASSERT(!table->child_l);
+
/*
REPAIR TABLE ... USE_FRM for temporary tables makes little sense.
*/
@@ -4010,13 +4076,16 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))
DBUG_RETURN(TRUE);
- mysql_ha_flush(thd, tables, MYSQL_HA_CLOSE_FINAL, FALSE);
+ mysql_ha_rm_tables(thd, tables, FALSE);
+
for (table= tables; table; table= table->next_local)
{
char table_name[NAME_LEN*2+2];
char* db = table->db;
bool fatal_error=0;
+ DBUG_PRINT("admin", ("table: '%s'.'%s'", table->db, table->table_name));
+ DBUG_PRINT("admin", ("extra_open_options: %u", extra_open_options));
strxmov(table_name, db, ".", table->table_name, NullS);
thd->open_options|= extra_open_options;
table->lock_type= lock_type;
@@ -4047,16 +4116,24 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
table->next_local= save_next_local;
thd->open_options&= ~extra_open_options;
}
+ DBUG_PRINT("admin", ("table: 0x%lx", (long) table->table));
+
if (prepare_func)
{
+ DBUG_PRINT("admin", ("calling prepare_func"));
switch ((*prepare_func)(thd, table, check_opt)) {
case 1: // error, message written to net
ha_autocommit_or_rollback(thd, 1);
close_thread_tables(thd);
+ DBUG_PRINT("admin", ("simple error, admin next table"));
continue;
case -1: // error, message could be written to net
+ /* purecov: begin inspected */
+ DBUG_PRINT("admin", ("severe error, stop"));
goto err;
+ /* purecov: end */
default: // should be 0 otherwise
+ DBUG_PRINT("admin", ("prepare_func succeeded"));
;
}
}
@@ -4071,6 +4148,7 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
*/
if (!table->table)
{
+ DBUG_PRINT("admin", ("open table failed"));
if (!thd->warn_list.elements)
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
ER_CHECK_NO_SUCH_TABLE, ER(ER_CHECK_NO_SUCH_TABLE));
@@ -4085,14 +4163,17 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
if (table->view)
{
+ DBUG_PRINT("admin", ("calling view_operator_func"));
result_code= (*view_operator_func)(thd, table);
goto send_result;
}
if ((table->table->db_stat & HA_READ_ONLY) && open_for_modify)
{
+ /* purecov: begin inspected */
char buff[FN_REFLEN + MYSQL_ERRMSG_SIZE];
uint length;
+ DBUG_PRINT("admin", ("sending error message"));
protocol->prepare_for_resend();
protocol->store(table_name, system_charset_info);
protocol->store(operator_name, system_charset_info);
@@ -4107,11 +4188,13 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
if (protocol->write())
goto err;
continue;
+ /* purecov: end */
}
/* Close all instances of the table to allow repair to rename files */
if (lock_type == TL_WRITE && table->table->s->version)
{
+ DBUG_PRINT("admin", ("removing table from cache"));
pthread_mutex_lock(&LOCK_open);
const char *old_message=thd->enter_cond(&COND_refresh, &LOCK_open,
"Waiting to get writelock");
@@ -4131,6 +4214,8 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
if (table->table->s->crashed && operator_func == &handler::ha_check)
{
+ /* purecov: begin inspected */
+ DBUG_PRINT("admin", ("sending crashed warning"));
protocol->prepare_for_resend();
protocol->store(table_name, system_charset_info);
protocol->store(operator_name, system_charset_info);
@@ -4139,6 +4224,7 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
system_charset_info);
if (protocol->write())
goto err;
+ /* purecov: end */
}
if (operator_func == &handler::ha_repair &&
@@ -4149,6 +4235,7 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
HA_ADMIN_NEEDS_ALTER))
{
my_bool save_no_send_ok= thd->net.no_send_ok;
+ DBUG_PRINT("admin", ("recreating table"));
ha_autocommit_or_rollback(thd, 1);
close_thread_tables(thd);
tmp_disable_binlog(thd); // binlogging is done by caller if wanted
@@ -4161,7 +4248,9 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
}
+ DBUG_PRINT("admin", ("calling operator_func '%s'", operator_name));
result_code = (table->table->file->*operator_func)(thd, check_opt);
+ DBUG_PRINT("admin", ("operator_func returned: %d", result_code));
send_result:
@@ -4518,6 +4607,55 @@ bool mysql_preload_keys(THD* thd, TABLE_LIST* tables)
}
+
+/**
+ @brief Create frm file based on I_S table
+
+ @param[in] thd thread handler
+ @param[in] schema_table I_S table
+ @param[in] dst_path path where frm should be created
+ @param[in] create_info Create info
+
+ @return Operation status
+ @retval 0 success
+ @retval 1 error
+*/
+
+
+bool mysql_create_like_schema_frm(THD* thd, TABLE_LIST* schema_table,
+ char *dst_path, HA_CREATE_INFO *create_info)
+{
+ HA_CREATE_INFO local_create_info;
+ Alter_info alter_info;
+ bool tmp_table= (create_info->options & HA_LEX_CREATE_TMP_TABLE);
+ uint keys= schema_table->table->s->keys;
+ uint db_options= 0;
+ DBUG_ENTER("mysql_create_like_schema_frm");
+
+ bzero((char*) &local_create_info, sizeof(local_create_info));
+ local_create_info.db_type= schema_table->table->s->db_type();
+ local_create_info.row_type= schema_table->table->s->row_type;
+ local_create_info.default_table_charset=default_charset_info;
+ alter_info.flags= (ALTER_CHANGE_COLUMN | ALTER_RECREATE);
+ schema_table->table->use_all_columns();
+ if (mysql_prepare_alter_table(thd, schema_table->table,
+ &local_create_info, &alter_info))
+ DBUG_RETURN(1);
+ if (mysql_prepare_create_table(thd, &local_create_info, &alter_info,
+ tmp_table, &db_options,
+ schema_table->table->file,
+ &schema_table->table->s->key_info, &keys, 0))
+ DBUG_RETURN(1);
+ local_create_info.max_rows= 0;
+ if (mysql_create_frm(thd, dst_path, NullS, NullS,
+ &local_create_info, alter_info.create_list,
+ keys, schema_table->table->s->key_info,
+ schema_table->table->file))
+ DBUG_RETURN(1);
+ DBUG_RETURN(0);
+}
+
+
/*
Create a table identical to the specified table
@@ -4621,7 +4759,15 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table, TABLE_LIST* src_table,
during the call to ha_create_table(). See bug #28614 for more info.
*/
VOID(pthread_mutex_lock(&LOCK_open));
- if (my_copy(src_path, dst_path, MYF(MY_DONT_OVERWRITE_FILE)))
+ if (src_table->schema_table)
+ {
+ if (mysql_create_like_schema_frm(thd, src_table, dst_path, create_info))
+ {
+ VOID(pthread_mutex_unlock(&LOCK_open));
+ goto err;
+ }
+ }
+ else if (my_copy(src_path, dst_path, MYF(MY_DONT_OVERWRITE_FILE)))
{
if (my_errno == ENOENT)
my_error(ER_BAD_DB_ERROR,MYF(0),db);
@@ -4986,6 +5132,7 @@ compare_tables(TABLE *table,
create_info->used_fields & HA_CREATE_USED_ENGINE ||
create_info->used_fields & HA_CREATE_USED_CHARSET ||
create_info->used_fields & HA_CREATE_USED_DEFAULT_CHARSET ||
+ create_info->used_fields & HA_CREATE_USED_ROW_FORMAT ||
(alter_info->flags & (ALTER_RECREATE | ALTER_FOREIGN_KEY)) ||
order_num ||
!table->s->mysql_version ||
@@ -5201,7 +5348,8 @@ bool alter_table_manage_keys(TABLE *table, int indexes_were_disabled,
if (error == HA_ERR_WRONG_COMMAND)
{
push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
- ER_ILLEGAL_HA, ER(ER_ILLEGAL_HA), table->s->table_name);
+ ER_ILLEGAL_HA, ER(ER_ILLEGAL_HA),
+ table->s->table_name.str);
error= 0;
} else if (error)
table->file->print_error(error, MYF(0));
@@ -5393,7 +5541,7 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
{
if (def->change && ! def->field)
{
- my_error(ER_BAD_FIELD_ERROR, MYF(0), def->change, table->s->table_name);
+ my_error(ER_BAD_FIELD_ERROR, MYF(0), def->change, table->s->table_name.str);
goto err;
}
/*
@@ -5428,7 +5576,7 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
}
if (!find)
{
- my_error(ER_BAD_FIELD_ERROR, MYF(0), def->after, table->s->table_name);
+ my_error(ER_BAD_FIELD_ERROR, MYF(0), def->after, table->s->table_name.str);
goto err;
}
find_it.after(def); // Put element after this
@@ -5438,7 +5586,7 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
if (alter_info->alter_list.elements)
{
my_error(ER_BAD_FIELD_ERROR, MYF(0),
- alter_info->alter_list.head()->name, table->s->table_name);
+ alter_info->alter_list.head()->name, table->s->table_name.str);
goto err;
}
if (!new_create_list.elements)
@@ -5749,8 +5897,7 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
build_table_filename(reg_path, sizeof(reg_path), db, table_name, reg_ext, 0);
build_table_filename(path, sizeof(path), db, table_name, "", 0);
-
- mysql_ha_flush(thd, table_list, MYSQL_HA_CLOSE_FINAL, FALSE);
+ mysql_ha_rm_tables(thd, table_list, FALSE);
/* DISCARD/IMPORT TABLESPACE is always alone in an ALTER TABLE */
if (alter_info->tablespace_op != NO_TABLESPACE_OP)
@@ -5817,10 +5964,25 @@ view_err:
start_waiting_global_read_lock(thd);
DBUG_RETURN(error);
}
- if (!(table=open_ltable(thd, table_list, TL_WRITE_ALLOW_READ, 0)))
+
+ if (!(table= open_n_lock_single_table(thd, table_list, TL_WRITE_ALLOW_READ)))
DBUG_RETURN(TRUE);
table->use_all_columns();
+ /*
+ Prohibit changing of the UNION list of a non-temporary MERGE table
+ under LOCK tables. It would be quite difficult to reuse a shrinked
+ set of tables from the old table or to open a new TABLE object for
+ an extended list and verify that they belong to locked tables.
+ */
+ if (thd->locked_tables &&
+ (create_info->used_fields & HA_CREATE_USED_UNION) &&
+ (table->s->tmp_table == NO_TMP_TABLE))
+ {
+ my_error(ER_LOCK_OR_ACTIVE_TRANSACTION, MYF(0));
+ DBUG_RETURN(TRUE);
+ }
+
/* Check that we are not trying to rename to an existing table */
if (new_name)
{
@@ -5907,7 +6069,8 @@ view_err:
goto err;
new_db_type= create_info->db_type;
- if (new_db_type != old_db_type &&
+ if ((new_db_type != old_db_type ||
+ alter_info->flags & ALTER_PARTITION) &&
!table->file->can_switch_engines())
{
my_error(ER_ROW_IS_REFERENCED, MYF(0));
@@ -6288,6 +6451,7 @@ view_err:
goto err;
/* Open the table if we need to copy the data. */
+ DBUG_PRINT("info", ("need_copy_table: %u", need_copy_table));
if (need_copy_table != ALTER_TABLE_METADATA_ONLY)
{
if (table->s->tmp_table)
@@ -6311,6 +6475,10 @@ view_err:
}
if (!new_table)
goto err1;
+ /*
+ Note: In case of MERGE table, we do not attach children. We do not
+ copy data for MERGE tables. Only the children have data.
+ */
}
/* Copy the data if necessary. */
@@ -6318,6 +6486,10 @@ view_err:
thd->cuted_fields=0L;
thd->proc_info="copy to tmp table";
copied=deleted=0;
+ /*
+ We do not copy data for MERGE tables. Only the children have data.
+ MERGE tables have HA_NO_COPY_ON_ALTER set.
+ */
if (new_table && !(new_table->file->ha_table_flags() & HA_NO_COPY_ON_ALTER))
{
/* We don't want update TIMESTAMP fields during ALTER TABLE. */
@@ -6455,7 +6627,10 @@ view_err:
if (new_table)
{
- /* Close the intermediate table that will be the new table */
+ /*
+ Close the intermediate table that will be the new table.
+ Note that MERGE tables do not have their children attached here.
+ */
intern_close_table(new_table);
my_free(new_table,MYF(0));
}
@@ -6548,6 +6723,7 @@ view_err:
/*
Now we have to inform handler that new .FRM file is in place.
To do this we need to obtain a handler object for it.
+ NO need to tamper with MERGE tables. The real open is done later.
*/
TABLE *t_table;
if (new_name != table_name || new_db != db)
@@ -6615,7 +6791,7 @@ view_err:
/*
For the alter table to be properly flushed to the logs, we
have to open the new table. If not, we get a problem on server
- shutdown.
+ shutdown. But we do not need to attach MERGE children.
*/
char path[FN_REFLEN];
TABLE *t_table;
@@ -6804,23 +6980,35 @@ copy_data_between_tables(TABLE *from,TABLE *to,
if (order)
{
- from->sort.io_cache=(IO_CACHE*) my_malloc(sizeof(IO_CACHE),
- MYF(MY_FAE | MY_ZEROFILL));
- bzero((char*) &tables,sizeof(tables));
- tables.table= from;
- tables.alias= tables.table_name= from->s->table_name.str;
- tables.db= from->s->db.str;
- error=1;
+ if (to->s->primary_key != MAX_KEY && to->file->primary_key_is_clustered())
+ {
+ char warn_buff[MYSQL_ERRMSG_SIZE];
+ my_snprintf(warn_buff, sizeof(warn_buff),
+ "ORDER BY ignored as there is a user-defined clustered index"
+ " in the table '%-.192s'", from->s->table_name.str);
+ push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, ER_UNKNOWN_ERROR,
+ warn_buff);
+ }
+ else
+ {
+ from->sort.io_cache=(IO_CACHE*) my_malloc(sizeof(IO_CACHE),
+ MYF(MY_FAE | MY_ZEROFILL));
+ bzero((char *) &tables, sizeof(tables));
+ tables.table= from;
+ tables.alias= tables.table_name= from->s->table_name.str;
+ tables.db= from->s->db.str;
+ error= 1;
- if (thd->lex->select_lex.setup_ref_array(thd, order_num) ||
- setup_order(thd, thd->lex->select_lex.ref_pointer_array,
- &tables, fields, all_fields, order) ||
- !(sortorder=make_unireg_sortorder(order, &length, NULL)) ||
- (from->sort.found_records = filesort(thd, from, sortorder, length,
- (SQL_SELECT *) 0, HA_POS_ERROR, 1,
- &examined_rows)) ==
- HA_POS_ERROR)
- goto err;
+ if (thd->lex->select_lex.setup_ref_array(thd, order_num) ||
+ setup_order(thd, thd->lex->select_lex.ref_pointer_array,
+ &tables, fields, all_fields, order) ||
+ !(sortorder= make_unireg_sortorder(order, &length, NULL)) ||
+ (from->sort.found_records= filesort(thd, from, sortorder, length,
+ (SQL_SELECT *) 0, HA_POS_ERROR,
+ 1, &examined_rows)) ==
+ HA_POS_ERROR)
+ goto err;
+ }
};
/* Tell handler that we have values for all columns in the to table */
@@ -6945,6 +7133,12 @@ bool mysql_recreate_table(THD *thd, TABLE_LIST *table_list)
Alter_info alter_info;
DBUG_ENTER("mysql_recreate_table");
+ DBUG_ASSERT(!table_list->next_global);
+ /*
+ table_list->table has been closed and freed. Do not reference
+ uninitialized data. open_tables() could fail.
+ */
+ table_list->table= NULL;
bzero((char*) &create_info, sizeof(create_info));
create_info.row_type=ROW_TYPE_NOT_USED;
@@ -6975,6 +7169,7 @@ bool mysql_checksum_table(THD *thd, TABLE_LIST *tables,
Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))
DBUG_RETURN(TRUE);
+ /* Open one table after the other to keep lock time as short as possible. */
for (table= tables; table; table= table->next_local)
{
char table_name[NAME_LEN*2+2];
@@ -6982,7 +7177,7 @@ bool mysql_checksum_table(THD *thd, TABLE_LIST *tables,
strxmov(table_name, table->db ,".", table->table_name, NullS);
- t= table->table= open_ltable(thd, table, TL_READ, 0);
+ t= table->table= open_n_lock_single_table(thd, table, TL_READ);
thd->clear_error(); // these errors shouldn't get client
protocol->prepare_for_resend();
diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc
index ce26b025430..b421f57b7ab 100644
--- a/sql/sql_trigger.cc
+++ b/sql/sql_trigger.cc
@@ -323,6 +323,7 @@ bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create)
TABLE *table;
bool result= TRUE;
String stmt_query;
+ bool need_start_waiting= FALSE;
DBUG_ENTER("mysql_create_or_drop_trigger");
@@ -374,10 +375,12 @@ bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create)
/*
We don't want perform our operations while global read lock is held
so we have to wait until its end and then prevent it from occurring
- again until we are done. (Acquiring LOCK_open is not enough because
- global read lock is held without holding LOCK_open).
+ again until we are done, unless we are under lock tables. (Acquiring
+ LOCK_open is not enough because global read lock is held without holding
+ LOCK_open).
*/
- if (wait_if_global_read_lock(thd, 0, 1))
+ if (!thd->locked_tables &&
+ !(need_start_waiting= !wait_if_global_read_lock(thd, 0, 1)))
DBUG_RETURN(TRUE);
VOID(pthread_mutex_lock(&LOCK_open));
@@ -433,16 +436,30 @@ bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create)
goto end;
}
- if (lock_table_names(thd, tables))
- goto end;
-
/* We also don't allow creation of triggers on views. */
tables->required_type= FRMTYPE_TABLE;
- if (reopen_name_locked_table(thd, tables, TRUE))
+ /* Keep consistent with respect to other DDL statements */
+ mysql_ha_rm_tables(thd, tables, TRUE);
+
+ if (thd->locked_tables)
{
- unlock_table_name(thd, tables);
- goto end;
+ /* Table must be write locked */
+ if (name_lock_locked_table(thd, tables))
+ goto end;
+ }
+ else
+ {
+ /* Grab the name lock and insert the placeholder*/
+ if (lock_table_names(thd, tables))
+ goto end;
+
+ /* Convert the placeholder to a real table */
+ if (reopen_name_locked_table(thd, tables, TRUE))
+ {
+ unlock_table_name(thd, tables);
+ goto end;
+ }
}
table= tables->table;
@@ -462,6 +479,26 @@ bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create)
table->triggers->create_trigger(thd, tables, &stmt_query):
table->triggers->drop_trigger(thd, tables, &stmt_query));
+ /* Under LOCK TABLES we must reopen the table to activate the trigger. */
+ if (!result && thd->locked_tables)
+ {
+ /* Make table suitable for reopening */
+ close_data_files_and_morph_locks(thd, tables->db, tables->table_name);
+ thd->in_lock_tables= 1;
+ if (reopen_tables(thd, 1, 1))
+ {
+ /* To be safe remove this table from the set of LOCKED TABLES */
+ unlink_open_table(thd, tables->table, FALSE);
+
+ /*
+ Ignore reopen_tables errors for now. It's better not leave master/slave
+ in a inconsistent state.
+ */
+ thd->clear_error();
+ }
+ thd->in_lock_tables= 0;
+ }
+
end:
if (!result)
@@ -470,7 +507,9 @@ end:
}
VOID(pthread_mutex_unlock(&LOCK_open));
- start_waiting_global_read_lock(thd);
+
+ if (need_start_waiting)
+ start_waiting_global_read_lock(thd);
if (!result)
send_ok(thd);
diff --git a/sql/sql_udf.cc b/sql/sql_udf.cc
index 19582af38f4..30e8829d764 100644
--- a/sql/sql_udf.cc
+++ b/sql/sql_udf.cc
@@ -135,6 +135,7 @@ void udf_init()
initialized = 1;
new_thd->thread_stack= (char*) &new_thd;
new_thd->store_globals();
+ lex_start(new_thd);
new_thd->set_db(db, sizeof(db)-1);
bzero((uchar*) &tables,sizeof(tables));
@@ -393,7 +394,12 @@ int mysql_create_function(THD *thd,udf_func *udf)
if (!initialized)
{
- my_message(ER_OUT_OF_RESOURCES, ER(ER_OUT_OF_RESOURCES), MYF(0));
+ if (opt_noacl)
+ my_error(ER_CANT_INITIALIZE_UDF, MYF(0),
+ udf->name.str,
+ "UDFs are unavailable with the --skip-grant-tables option");
+ else
+ my_message(ER_OUT_OF_RESOURCES, ER(ER_OUT_OF_RESOURCES), MYF(0));
DBUG_RETURN(1);
}
@@ -415,7 +421,7 @@ int mysql_create_function(THD *thd,udf_func *udf)
if (check_string_char_length(&udf->name, "", NAME_CHAR_LEN,
system_charset_info, 1))
{
- my_error(ER_TOO_LONG_IDENT, MYF(0), udf->name);
+ my_error(ER_TOO_LONG_IDENT, MYF(0), udf->name.str);
DBUG_RETURN(1);
}
@@ -429,7 +435,7 @@ int mysql_create_function(THD *thd,udf_func *udf)
rw_wrlock(&THR_LOCK_udf);
if ((hash_search(&udf_hash,(uchar*) udf->name.str, udf->name.length)))
{
- my_error(ER_UDF_EXISTS, MYF(0), udf->name);
+ my_error(ER_UDF_EXISTS, MYF(0), udf->name.str);
goto err;
}
if (!(dl = find_udf_dl(udf->dl)))
@@ -516,7 +522,10 @@ int mysql_drop_function(THD *thd,const LEX_STRING *udf_name)
if (!initialized)
{
- my_message(ER_OUT_OF_RESOURCES, ER(ER_OUT_OF_RESOURCES), MYF(0));
+ if (opt_noacl)
+ my_error(ER_FUNCTION_NOT_DEFINED, MYF(0), udf_name->str);
+ else
+ my_message(ER_OUT_OF_RESOURCES, ER(ER_OUT_OF_RESOURCES), MYF(0));
DBUG_RETURN(1);
}
diff --git a/sql/sql_union.cc b/sql/sql_union.cc
index 5da4b97cc5d..a48cff82715 100644
--- a/sql/sql_union.cc
+++ b/sql/sql_union.cc
@@ -58,7 +58,7 @@ bool select_union::send_data(List<Item> &values)
return 0;
}
fill_record(thd, table->field, values, 1);
- if (thd->net.report_error)
+ if (thd->is_error())
return 1;
if ((error= table->file->ha_write_row(table->record[0])))
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index 4071bb86c90..ecb7acda61b 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -203,6 +203,7 @@ int mysql_update(THD *thd,
bool need_reopen;
ulonglong id;
List<Item> all_fields;
+ THD::killed_state killed_status= THD::NOT_KILLED;
DBUG_ENTER("mysql_update");
for ( ; ; )
@@ -679,7 +680,7 @@ int mysql_update(THD *thd,
*/
if (will_batch &&
((error= table->file->exec_bulk_update(&dup_key_found)) ||
- !dup_key_found))
+ dup_key_found))
{
if (error)
{
@@ -714,45 +715,25 @@ int mysql_update(THD *thd,
thd->row_count++;
}
dup_key_found= 0;
-
- if (!transactional_table && updated > 0)
- thd->transaction.stmt.modified_non_trans_table= TRUE;
-
-
/*
- todo bug#27571: to avoid asynchronization of `error' and
- `error_code' of binlog event constructor
-
- The concept, which is a bit different for insert(!), is to
- replace `error' assignment with the following lines
-
- killed_status= thd->killed; // get the status of the volatile
-
- Notice: thd->killed is type of "state" whereas the lhs has
- "status" the suffix which translates according to WordNet: a state
- at a particular time - at the time of the end of per-row loop in
- our case. Binlogging ops are conducted with the status.
-
- error= (killed_status == THD::NOT_KILLED)? error : 1;
-
- which applies to most mysql_$query functions.
- Event's constructor will accept `killed_status' as an argument:
-
- Query_log_event qinfo(..., killed_status);
-
- thd->killed might be changed after killed_status had got cached and this
- won't affect binlogging event but other effects remain.
-
- Open issue: In a case the error happened not because of KILLED -
- and then KILLED was caught later still within the loop - we shall
- do something to avoid binlogging of incorrect ER_SERVER_SHUTDOWN
- error_code.
+ Caching the killed status to pass as the arg to query event constuctor;
+ The cached value can not change whereas the killed status can
+ (externally) since this point and change of the latter won't affect
+ binlogging.
+ It's assumed that if an error was set in combination with an effective
+ killed status then the error is due to killing.
*/
-
- if (thd->killed && !error)
- error= 1; // Aborted
- else if (will_batch &&
- (loc_error= table->file->exec_bulk_update(&dup_key_found)))
+ killed_status= thd->killed; // get the status of the volatile
+ // simulated killing after the loop must be ineffective for binlogging
+ DBUG_EXECUTE_IF("simulate_kill_bug27571",
+ {
+ thd->killed= THD::KILL_QUERY;
+ };);
+ error= (killed_status == THD::NOT_KILLED)? error : 1;
+
+ if (error &&
+ will_batch &&
+ (loc_error= table->file->exec_bulk_update(&dup_key_found)))
/*
An error has occurred when a batched update was performed and returned
an error indication. It cannot be an allowed duplicate key error since
@@ -774,6 +755,10 @@ int mysql_update(THD *thd,
if (will_batch)
table->file->end_bulk_update();
table->file->try_semi_consistent_read(0);
+
+ if (!transactional_table && updated > 0)
+ thd->transaction.stmt.modified_non_trans_table= TRUE;
+
end_read_record(&info);
delete select;
thd->proc_info= "end";
@@ -797,7 +782,7 @@ int mysql_update(THD *thd,
Sometimes we want to binlog even if we updated no rows, in case user used
it to be sure master and slave are in same state.
*/
- if ((error < 0) || (updated && !transactional_table))
+ if ((error < 0) || thd->transaction.stmt.modified_non_trans_table)
{
if (mysql_bin_log.is_open())
{
@@ -805,7 +790,7 @@ int mysql_update(THD *thd,
thd->clear_error();
if (thd->binlog_query(THD::ROW_QUERY_TYPE,
thd->query, thd->query_length,
- transactional_table, FALSE) &&
+ transactional_table, FALSE, killed_status) &&
transactional_table)
{
error=1; // Rollback update
@@ -844,7 +829,7 @@ int mysql_update(THD *thd,
}
thd->count_cuted_fields= CHECK_FIELD_IGNORE; /* calc cuted fields */
thd->abort_on_warning= 0;
- DBUG_RETURN((error >= 0 || thd->net.report_error) ? 1 : 0);
+ DBUG_RETURN((error >= 0 || thd->is_error()) ? 1 : 0);
err:
delete select;
@@ -1193,8 +1178,8 @@ bool mysql_multi_update(THD *thd,
OPTION_SETUP_TABLES_DONE,
result, unit, select_lex);
DBUG_PRINT("info",("res: %d report_error: %d", res,
- thd->net.report_error));
- res|= thd->net.report_error;
+ (int) thd->is_error()));
+ res|= thd->is_error();
if (unlikely(res))
{
/* If we had a another error reported earlier then this will be ignored */
@@ -1215,8 +1200,8 @@ multi_update::multi_update(TABLE_LIST *table_list,
:all_tables(table_list), leaves(leaves_list), update_tables(0),
tmp_tables(0), updated(0), found(0), fields(field_list),
values(value_list), table_count(0), copy_field(0),
- handle_duplicates(handle_duplicates_arg), do_update(1), trans_safe(0),
- transactional_tables(1), ignore(ignore_arg)
+ handle_duplicates(handle_duplicates_arg), do_update(1), trans_safe(1),
+ transactional_tables(1), ignore(ignore_arg), error_handled(0)
{}
@@ -1418,7 +1403,6 @@ multi_update::initialize_tables(JOIN *join)
if ((thd->options & OPTION_SAFE_UPDATES) && error_if_full_join(join))
DBUG_RETURN(1);
main_table=join->join_tab->table;
- trans_safe= transactional_tables= main_table->file->has_transactions();
table_to_update= 0;
/* Any update has at least one pair (field, value) */
@@ -1713,12 +1697,14 @@ void multi_update::send_error(uint errcode,const char *err)
/* First send error what ever it is ... */
my_error(errcode, MYF(0), err);
- /* If nothing updated return */
- if (updated == 0) /* the counter might be reset in send_eof */
- return; /* and then the query has been binlogged */
+ /* the error was handled or nothing deleted and no side effects return */
+ if (error_handled ||
+ !thd->transaction.stmt.modified_non_trans_table && !updated)
+ return;
/* Something already updated so we have to invalidate cache */
- query_cache_invalidate3(thd, update_tables, 1);
+ if (updated)
+ query_cache_invalidate3(thd, update_tables, 1);
/*
If all tables that has been updated are trans safe then just do rollback.
If not attempt to do remaining updates.
@@ -1750,12 +1736,16 @@ void multi_update::send_error(uint errcode,const char *err)
*/
if (mysql_bin_log.is_open())
{
+ /*
+ THD::killed status might not have been set ON at time of an error
+ got caught and if happens later the killed error is written
+ into repl event.
+ */
thd->binlog_query(THD::ROW_QUERY_TYPE,
thd->query, thd->query_length,
transactional_tables, FALSE);
}
- if (!trans_safe)
- thd->transaction.all.modified_non_trans_table= TRUE;
+ thd->transaction.all.modified_non_trans_table= TRUE;
}
DBUG_ASSERT(trans_safe || !updated || thd->transaction.stmt.modified_non_trans_table);
@@ -1947,11 +1937,20 @@ bool multi_update::send_eof()
{
char buff[STRING_BUFFER_USUAL_SIZE];
ulonglong id;
+ THD::killed_state killed_status= THD::NOT_KILLED;
DBUG_ENTER("multi_update::send_eof");
thd->proc_info="updating reference tables";
- /* Does updates for the last n - 1 tables, returns 0 if ok */
+ /*
+ Does updates for the last n - 1 tables, returns 0 if ok;
+ error takes into account killed status gained in do_updates()
+ */
int local_error = (table_count) ? do_updates(0) : 0;
+ /*
+ if local_error is not set ON until after do_updates() then
+ later carried out killing should not affect binlogging.
+ */
+ killed_status= (local_error == 0)? THD::NOT_KILLED : thd->killed;
thd->proc_info= "end";
/* We must invalidate the query cache before binlog writing and
@@ -1978,11 +1977,9 @@ bool multi_update::send_eof()
{
if (local_error == 0)
thd->clear_error();
- else
- updated= 0; /* if there's an error binlog it here not in ::send_error */
if (thd->binlog_query(THD::ROW_QUERY_TYPE,
thd->query, thd->query_length,
- transactional_tables, FALSE) &&
+ transactional_tables, FALSE, killed_status) &&
trans_safe)
{
local_error= 1; // Rollback update
@@ -1991,6 +1988,8 @@ bool multi_update::send_eof()
if (thd->transaction.stmt.modified_non_trans_table)
thd->transaction.all.modified_non_trans_table= TRUE;
}
+ if (local_error != 0)
+ error_handled= TRUE; // to force early leave from ::send_error()
if (transactional_tables)
{
diff --git a/sql/sql_view.cc b/sql/sql_view.cc
index 56d50761d95..f7223cafb5e 100644
--- a/sql/sql_view.cc
+++ b/sql/sql_view.cc
@@ -223,9 +223,6 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views,
{
LEX *lex= thd->lex;
bool link_to_local;
-#ifndef NO_EMBEDDED_ACCESS_CHECKS
- bool definer_check_is_needed= mode != VIEW_ALTER || lex->definer;
-#endif
/* first table in list is target VIEW name => cut off it */
TABLE_LIST *view= lex->unlink_first_table(&link_to_local);
TABLE_LIST *tables= lex->query_tables;
@@ -280,7 +277,7 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views,
- same as current user
- current user has SUPER_ACL
*/
- if (definer_check_is_needed &&
+ if (lex->definer &&
(strcmp(lex->definer->user.str, thd->security_ctx->priv_user) != 0 ||
my_strcasecmp(system_charset_info,
lex->definer->host.str,
@@ -610,7 +607,7 @@ err:
thd->proc_info= "end";
lex->link_first_table_back(view, link_to_local);
unit->cleanup();
- DBUG_RETURN(res || thd->net.report_error);
+ DBUG_RETURN(res || thd->is_error());
}
@@ -672,7 +669,7 @@ static File_option view_parameters[]=
FILE_OPTIONS_STRING},
{{(char*) STRING_WITH_LEN("view_body_utf8")},
my_offsetof(TABLE_LIST, view_body_utf8),
- FILE_OPTIONS_STRING},
+ FILE_OPTIONS_ESTRING},
{{NullS, 0}, 0,
FILE_OPTIONS_STRING}
};
@@ -826,7 +823,7 @@ loop_out:
view_parameters + revision_number_position, 1,
&file_parser_dummy_hook))
{
- error= thd->net.report_error? -1 : 0;
+ error= thd->is_error() ? -1 : 0;
goto err;
}
}
@@ -889,7 +886,7 @@ loop_out:
if (sql_create_definition_file(&dir, &file, view_file_type,
(uchar*)view, view_parameters, num_view_backups))
{
- error= thd->net.report_error? -1 : 1;
+ error= thd->is_error() ? -1 : 1;
goto err;
}
DBUG_RETURN(0);
@@ -953,6 +950,12 @@ bool mysql_make_view(THD *thd, File_parser *parser, TABLE_LIST *table,
DBUG_RETURN(0);
}
+ if (table->index_hints && table->index_hints->elements)
+ {
+ my_error(ER_WRONG_USAGE, MYF(0), "index hints", "VIEW");
+ DBUG_RETURN(TRUE);
+ }
+
/* check loop via view definition */
for (TABLE_LIST *precedent= table->referencing_view;
precedent;
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index 560aebcc456..d12070438fc 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -509,10 +509,10 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
%pure_parser /* We have threads */
/*
- Currently there are 280 shift/reduce conflicts.
+ Currently there are 177 shift/reduce conflicts.
We should not introduce new conflicts any more.
*/
-%expect 280
+%expect 177
/*
Comments for TOKENS.
@@ -1162,7 +1162,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
variable variable_aux bool_pri
predicate bit_expr
table_wild simple_expr udf_expr
- expr_or_default set_expr_or_default interval_expr
+ expr_or_default set_expr_or_default
param_marker geometry_function
signed_literal now_or_signed_literal opt_escape
sp_opt_default
@@ -1216,8 +1216,6 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
%type <cast_type> cast_type
-%type <udf_type> udf_func_type
-
%type <symbol> keyword keyword_sp
%type <lex_user> user grant_user
@@ -1235,7 +1233,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
%type <variable> internal_variable_name
-%type <select_lex> subselect subselect_init
+%type <select_lex> subselect take_first_select
get_select_lex
%type <boolfunc2creator> comp_op
@@ -1259,14 +1257,14 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
ref_list opt_on_delete opt_on_delete_list opt_on_delete_item use
opt_delete_options opt_delete_option varchar nchar nvarchar
opt_outer table_list table_name table_alias_ref_list table_alias_ref
- opt_option opt_place
+ opt_option opt_place
opt_attribute opt_attribute_list attribute column_list column_list_id
opt_column_list grant_privileges grant_ident grant_list grant_option
object_privilege object_privilege_list user_list rename_list
clear_privileges flush_options flush_option
equal optional_braces
opt_mi_check_type opt_to mi_check_types normal_join
- db_to_db table_to_table_list table_to_table opt_table_list opt_as
+ table_to_table_list table_to_table opt_table_list opt_as
handler_rkey_function handler_read_or_scan
single_multi table_wild_list table_wild_one opt_wild
union_clause union_list
@@ -1277,14 +1275,15 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
statement sp_suid
sp_c_chistics sp_a_chistics sp_chistic sp_c_chistic xa
load_data opt_field_or_var_spec fields_or_vars opt_load_data_set_spec
- definer view_replace_or_algorithm view_replace
+ view_replace_or_algorithm view_replace
view_algorithm view_or_trigger_or_sp_or_event
- view_or_trigger_or_sp_or_event_tail
+ definer_tail no_definer_tail
view_suid view_tail view_list_opt view_list view_select
- view_check_option trigger_tail sp_tail
+ view_check_option trigger_tail sp_tail sf_tail udf_tail event_tail
install uninstall partition_entry binlog_base64_event
init_key_options key_options key_opts key_opt key_using_alg
server_def server_options_list server_option
+ definer_opt no_definer definer
END_OF_INPUT
%type <NONE> call sp_proc_stmts sp_proc_stmts1 sp_proc_stmt
@@ -2007,181 +2006,6 @@ sp_name:
}
;
-create_function_tail:
- RETURNS_SYM udf_type SONAME_SYM TEXT_STRING_sys
- {
- THD *thd= YYTHD;
- LEX *lex= thd->lex;
- if (lex->definer != NULL)
- {
- /*
- DEFINER is a concept meaningful when interpreting SQL code.
- UDF functions are compiled.
- Using DEFINER with UDF has therefore no semantic,
- and is considered a parsing error.
- */
- my_error(ER_WRONG_USAGE, MYF(0), "SONAME", "DEFINER");
- MYSQL_YYABORT;
- }
- if (is_native_function(thd, & lex->spname->m_name))
- {
- my_error(ER_NATIVE_FCT_NAME_COLLISION, MYF(0),
- lex->spname->m_name.str);
- MYSQL_YYABORT;
- }
- lex->sql_command = SQLCOM_CREATE_FUNCTION;
- lex->udf.name = lex->spname->m_name;
- lex->udf.returns=(Item_result) $2;
- lex->udf.dl=$4.str;
- }
- | '('
- {
- THD *thd= YYTHD;
- LEX *lex= thd->lex;
- Lex_input_stream *lip= thd->m_lip;
- sp_head *sp;
- const char* tmp_param_begin;
-
- /*
- First check if AGGREGATE was used, in that case it's a
- syntax error.
- */
- if (lex->udf.type == UDFTYPE_AGGREGATE)
- {
- my_error(ER_SP_NO_AGGREGATE, MYF(0));
- MYSQL_YYABORT;
- }
-
- if (lex->sphead)
- {
- my_error(ER_SP_NO_RECURSIVE_CREATE, MYF(0), "FUNCTION");
- MYSQL_YYABORT;
- }
- /* Order is important here: new - reset - init */
- sp= new sp_head();
- sp->reset_thd_mem_root(thd);
- sp->init(lex);
- sp->init_sp_name(thd, lex->spname);
-
- sp->m_type= TYPE_ENUM_FUNCTION;
- lex->sphead= sp;
- /*
- We have to turn off CLIENT_MULTI_QUERIES while parsing a
- stored procedure, otherwise yylex will chop it into pieces
- at each ';'.
- */
- $<ulong_num>$= thd->client_capabilities & CLIENT_MULTI_QUERIES;
- thd->client_capabilities &= ~CLIENT_MULTI_QUERIES;
-
- tmp_param_begin= lip->get_cpp_tok_start();
- tmp_param_begin++;
- lex->sphead->m_param_begin= tmp_param_begin;
- }
- sp_fdparam_list ')'
- {
- THD *thd= YYTHD;
- LEX *lex= thd->lex;
- Lex_input_stream *lip= thd->m_lip;
-
- lex->sphead->m_param_end= lip->get_cpp_tok_start();
- }
- RETURNS_SYM
- {
- LEX *lex= Lex;
- lex->charset= NULL;
- lex->length= lex->dec= NULL;
- lex->interval_list.empty();
- lex->type= 0;
- }
- type
- {
- LEX *lex= Lex;
- sp_head *sp= lex->sphead;
- /*
- This was disabled in 5.1.12. See bug #20701
- When collation support in SP is implemented, then this test
- should be removed.
- */
- if (($8 == MYSQL_TYPE_STRING || $8 == MYSQL_TYPE_VARCHAR)
- && (lex->type & BINCMP_FLAG))
- {
- my_error(ER_NOT_SUPPORTED_YET, MYF(0), "return value collation");
- MYSQL_YYABORT;
- }
-
- if (sp->fill_field_definition(YYTHD, lex,
- (enum enum_field_types) $8,
- &sp->m_return_field_def))
- MYSQL_YYABORT;
-
- bzero((char *)&lex->sp_chistics, sizeof(st_sp_chistics));
- }
- sp_c_chistics
- {
- THD *thd= YYTHD;
- LEX *lex= thd->lex;
- Lex_input_stream *lip= thd->m_lip;
-
- lex->sphead->m_chistics= &lex->sp_chistics;
- lex->sphead->set_body_start(thd, lip->get_cpp_tok_start());
- }
- sp_proc_stmt
- {
- THD *thd= YYTHD;
- LEX *lex= thd->lex;
- sp_head *sp= lex->sphead;
-
- if (sp->is_not_allowed_in_function("function"))
- MYSQL_YYABORT;
-
- lex->sql_command= SQLCOM_CREATE_SPFUNCTION;
- sp->set_stmt_end(thd);
- if (!(sp->m_flags & sp_head::HAS_RETURN))
- {
- my_error(ER_SP_NORETURN, MYF(0), sp->m_qname.str);
- MYSQL_YYABORT;
- }
- if (is_native_function(thd, & sp->m_name))
- {
- /*
- This warning will be printed when
- [1] A client query is parsed,
- [2] A stored function is loaded by db_load_routine.
- Printing the warning for [2] is intentional, to cover the
- following scenario:
- - A user define a SF 'foo' using MySQL 5.N
- - An application uses select foo(), and works.
- - MySQL 5.{N+1} defines a new native function 'foo', as
- part of a new feature.
- - MySQL 5.{N+1} documentation is updated, and should mention
- that there is a potential incompatible change in case of
- existing stored function named 'foo'.
- - The user deploys 5.{N+1}. At this point, 'select foo()'
- means something different, and the user code is most likely
- broken (it's only safe if the code is 'select db.foo()').
- With a warning printed when the SF is loaded (which has to occur
- before the call), the warning will provide a hint explaining
- the root cause of a later failure of 'select foo()'.
- With no warning printed, the user code will fail with no
- apparent reason.
- Printing a warning each time db_load_routine is executed for
- an ambiguous function is annoying, since that can happen a lot,
- but in practice should not happen unless there *are* name
- collisions.
- If a collision exists, it should not be silenced but fixed.
- */
- push_warning_printf(thd,
- MYSQL_ERROR::WARN_LEVEL_NOTE,
- ER_NATIVE_FCT_NAME_COLLISION,
- ER(ER_NATIVE_FCT_NAME_COLLISION),
- sp->m_name.str);
- }
- /* Restore flag if it was cleared above */
- thd->client_capabilities |= $<ulong_num>2;
- sp->restore_thd_mem_root(thd);
- }
- ;
-
sp_a_chistics:
/* Empty */ {}
| sp_a_chistics sp_chistic {}
@@ -2545,25 +2369,13 @@ sp_decl:
sp_cursor_stmt:
{
Lex->sphead->reset_lex(YYTHD);
-
- /*
- We use statement here just be able to get a better
- error message. Using 'select' works too, but will then
- result in a generic "syntax error" if a non-select
- statement is given.
- */
}
- statement
+ select
{
LEX *lex= Lex;
- if (lex->sql_command != SQLCOM_SELECT &&
- !(sql_command_flags[lex->sql_command] & CF_STATUS_COMMAND))
- {
- my_message(ER_SP_BAD_CURSOR_QUERY, ER(ER_SP_BAD_CURSOR_QUERY),
- MYF(0));
- MYSQL_YYABORT;
- }
+ DBUG_ASSERT(lex->sql_command == SQLCOM_SELECT);
+
if (lex->result)
{
my_message(ER_SP_BAD_CURSOR_SELECT, ER(ER_SP_BAD_CURSOR_SELECT),
@@ -3367,7 +3179,6 @@ change_ts_option:
;
tablespace_option_list:
- /* empty */ {}
tablespace_options
;
@@ -3389,7 +3200,6 @@ tablespace_option:
;
alter_tablespace_option_list:
- /* empty */ {}
alter_tablespace_options
;
@@ -3408,7 +3218,6 @@ alter_tablespace_option:
;
logfile_group_option_list:
- /* empty */ {}
logfile_group_options
;
@@ -3429,7 +3238,6 @@ logfile_group_option:
;
alter_logfile_group_option_list:
- /* empty */ {}
alter_logfile_group_options
;
@@ -3674,7 +3482,7 @@ size_number:
create2:
'(' create2a {}
| opt_create_table_options
- opt_partitioning {}
+ opt_partitioning
create3 {}
| LIKE table_ident
{
@@ -3698,19 +3506,22 @@ create2:
create2a:
field_list ')' opt_create_table_options
- opt_partitioning {}
+ opt_partitioning
create3 {}
- | opt_partitioning {}
+ | opt_partitioning
create_select ')'
- { Select->set_braces(1);} union_opt {}
+ { Select->set_braces(1);}
+ union_opt {}
;
create3:
/* empty */ {}
| opt_duplicate opt_as create_select
- { Select->set_braces(0);} union_clause {}
+ { Select->set_braces(0);}
+ union_clause {}
| opt_duplicate opt_as '(' create_select ')'
- { Select->set_braces(1);} union_opt {}
+ { Select->set_braces(1);}
+ union_opt {}
;
/*
@@ -3792,7 +3603,7 @@ partition_entry:
;
partition:
- BY part_type_def opt_no_parts {} opt_sub_part {} part_defs
+ BY part_type_def opt_no_parts opt_sub_part part_defs
;
part_type_def:
@@ -3993,10 +3804,11 @@ part_definition:
part_info->use_default_partitions= FALSE;
part_info->use_default_no_partitions= FALSE;
}
- part_name {}
- opt_part_values {}
- opt_part_options {}
- opt_sub_partition {}
+ part_name
+ opt_part_values
+ opt_part_options
+ opt_sub_partition
+ {}
;
part_name:
@@ -4600,7 +4412,7 @@ row_types:
| COMPRESSED_SYM { $$= ROW_TYPE_COMPRESSED; }
| REDUNDANT_SYM { $$= ROW_TYPE_REDUNDANT; }
| COMPACT_SYM { $$= ROW_TYPE_COMPACT; }
- | PAGE_SYM { $$= ROW_TYPE_PAGE; }
+ | PAGE_SYM { $$= ROW_TYPE_PAGE; }
;
merge_insert_types:
@@ -4614,10 +4426,6 @@ opt_select_from:
| select_from select_lock_type
;
-udf_func_type:
- /* empty */ { $$ = UDFTYPE_FUNCTION; }
- | AGGREGATE_SYM { $$ = UDFTYPE_AGGREGATE; };
-
udf_type:
STRING_SYM {$$ = (int) STRING_RESULT; }
| REAL {$$ = (int) REAL_RESULT; }
@@ -4670,8 +4478,9 @@ key_def:
| opt_constraint FOREIGN KEY_SYM opt_ident '(' key_list ')' references
{
LEX *lex=Lex;
- const char *key_name= $4 ? $4 : $1;
- Key *key= new Foreign_key(key_name, lex->col_list,
+ const char *key_name= $1 ? $1 : $4;
+ const char *fkey_name = $4 ? $4 : key_name;
+ Key *key= new Foreign_key(fkey_name, lex->col_list,
$8,
lex->ref_list,
lex->fk_delete_opt,
@@ -4909,7 +4718,7 @@ spatial_type:
| GEOMETRYCOLLECTION { $$= Field::GEOM_GEOMETRYCOLLECTION; }
| POINT_SYM
{
- Lex->length= (char*)"21";
+ Lex->length= (char*)"25";
$$= Field::GEOM_POINT;
}
| MULTIPOINT { $$= Field::GEOM_MULTIPOINT; }
@@ -5414,6 +5223,17 @@ alter:
lex->copy_db_to(&lex->name.str, &lex->name.length))
MYSQL_YYABORT;
}
+ | ALTER DATABASE ident UPGRADE_SYM DATA_SYM DIRECTORY_SYM NAME_SYM
+ {
+ LEX *lex= Lex;
+ if (lex->sphead)
+ {
+ my_error(ER_SP_NO_DROP_SP, MYF(0), "DATABASE");
+ MYSQL_YYABORT;
+ }
+ lex->sql_command= SQLCOM_ALTER_DB_UPGRADE;
+ lex->name= $3;
+ }
| ALTER PROCEDURE sp_name
{
LEX *lex= Lex;
@@ -5450,7 +5270,7 @@ alter:
lex->sql_command= SQLCOM_ALTER_FUNCTION;
lex->spname= $3;
}
- | ALTER view_algorithm definer
+ | ALTER view_algorithm definer_opt
{
LEX *lex= Lex;
@@ -5463,7 +5283,7 @@ alter:
}
view_tail
{}
- | ALTER definer
+ | ALTER definer_opt
/*
We have two separate rules for ALTER VIEW rather that
optional view_algorithm above, to resolve the ambiguity
@@ -5482,7 +5302,7 @@ alter:
}
view_tail
{}
- | ALTER definer EVENT_SYM sp_name
+ | ALTER definer_opt EVENT_SYM sp_name
/*
BE CAREFUL when you add a new rule to update the block where
YYTHD->client_capabilities is set back to original value
@@ -5518,7 +5338,7 @@ alter:
{
/*
$1 - ALTER
- $2 - definer
+ $2 - definer_opt
$3 - EVENT_SYM
$4 - sp_name
$5 - the block above
@@ -5633,7 +5453,7 @@ alter_commands:
lex->no_write_to_binlog= $3;
lex->check_opt.init();
}
- opt_no_write_to_binlog opt_mi_check_type
+ opt_no_write_to_binlog
| ANALYZE_SYM PARTITION_SYM opt_no_write_to_binlog
all_or_alt_part_name_list
{
@@ -5642,7 +5462,6 @@ alter_commands:
lex->no_write_to_binlog= $3;
lex->check_opt.init();
}
- opt_mi_check_type
| CHECK_SYM PARTITION_SYM all_or_alt_part_name_list
{
LEX *lex= Lex;
@@ -6125,7 +5944,7 @@ analyze:
lex->no_write_to_binlog= $2;
lex->check_opt.init();
}
- table_list opt_mi_check_type
+ table_list
{}
;
@@ -6181,7 +6000,7 @@ optimize:
lex->no_write_to_binlog= $2;
lex->check_opt.init();
}
- table_list opt_mi_check_type
+ table_list
{}
;
@@ -6198,13 +6017,6 @@ rename:
}
table_to_table_list
{}
- | RENAME DATABASE
- {
- Lex->db_list.empty();
- Lex->sql_command= SQLCOM_RENAME_DB;
- }
- db_to_db
- {}
| RENAME USER clear_privileges rename_list
{
Lex->sql_command = SQLCOM_RENAME_USER;
@@ -6242,18 +6054,6 @@ table_to_table:
}
;
-db_to_db:
- ident TO_SYM ident
- {
- LEX *lex=Lex;
- if (lex->db_list.push_back((LEX_STRING*)
- sql_memdup(&$1, sizeof(LEX_STRING))) ||
- lex->db_list.push_back((LEX_STRING*)
- sql_memdup(&$3, sizeof(LEX_STRING))))
- MYSQL_YYABORT;
- }
- ;
-
keycache:
CACHE_SYM INDEX_SYM keycache_list IN_SYM key_cache_name
{
@@ -6536,6 +6336,12 @@ select_item:
MYSQL_YYABORT;
if ($4.str)
{
+ if (Lex->sql_command == SQLCOM_CREATE_VIEW &&
+ check_column_name($4.str))
+ {
+ my_error(ER_WRONG_COLUMN_NAME, MYF(0), $4.str);
+ MYSQL_YYABORT;
+ }
$2->is_autogenerated_name= FALSE;
$2->set_name($4.str, $4.length, system_charset_info);
}
@@ -6705,7 +6511,7 @@ bool_pri:
{ $$= (*$2)(0)->create($1,$3); }
| bool_pri comp_op all_or_any '(' subselect ')' %prec EQ
{ $$= all_any_subquery_creator($1, $2, $3, $5); }
- | predicate ;
+ | predicate
;
predicate:
@@ -6777,10 +6583,10 @@ bit_expr:
{ $$= new Item_func_plus($1,$3); }
| bit_expr '-' bit_expr %prec '-'
{ $$= new Item_func_minus($1,$3); }
- | bit_expr '+' interval_expr interval %prec '+'
- { $$= new Item_date_add_interval($1,$3,$4,0); }
- | bit_expr '-' interval_expr interval %prec '-'
- { $$= new Item_date_add_interval($1,$3,$4,1); }
+ | bit_expr '+' INTERVAL_SYM expr interval %prec '+'
+ { $$= new Item_date_add_interval($1,$4,$5,0); }
+ | bit_expr '-' INTERVAL_SYM expr interval %prec '-'
+ { $$= new Item_date_add_interval($1,$4,$5,1); }
| bit_expr '*' bit_expr %prec '*'
{ $$= new Item_func_mul($1,$3); }
| bit_expr '/' bit_expr %prec '/'
@@ -6830,11 +6636,6 @@ all_or_any:
| ANY_SYM { $$ = 0; }
;
-interval_expr:
- INTERVAL_SYM expr %prec INTERVAL_SYM
- { $$=$2; }
- ;
-
simple_expr:
simple_ident
| function_call_keyword
@@ -6930,18 +6731,9 @@ simple_expr:
$$= new (YYTHD->mem_root) Item_insert_value(Lex->current_context(),
$3);
}
- | interval_expr interval '+' expr
+ | INTERVAL_SYM expr interval '+' expr %prec INTERVAL_SYM
/* we cannot put interval before - */
- { $$= new (YYTHD->mem_root) Item_date_add_interval($4,$1,$2,0); }
- | interval_expr
- {
- if ($1->type() != Item::ROW_ITEM)
- {
- my_parse_error(ER(ER_SYNTAX_ERROR));
- MYSQL_YYABORT;
- }
- $$= new (YYTHD->mem_root) Item_func_interval((Item_row *)$1);
- }
+ { $$= new (YYTHD->mem_root) Item_date_add_interval($5,$2,$3,0); }
;
/*
@@ -6958,6 +6750,7 @@ function_call_keyword:
| CURRENT_USER optional_braces
{
$$= new (YYTHD->mem_root) Item_func_current_user(Lex->current_context());
+ Lex->set_stmt_unsafe();
Lex->safe_to_cache_query= 0;
}
| DATE_SYM '(' expr ')'
@@ -6968,6 +6761,23 @@ function_call_keyword:
{ $$= new (YYTHD->mem_root) Item_func_hour($3); }
| INSERT '(' expr ',' expr ',' expr ',' expr ')'
{ $$= new (YYTHD->mem_root) Item_func_insert($3,$5,$7,$9); }
+ | INTERVAL_SYM '(' expr ',' expr ')' %prec INTERVAL_SYM
+ {
+ THD *thd= YYTHD;
+ List<Item> *list= new (thd->mem_root) List<Item>;
+ list->push_front($5);
+ list->push_front($3);
+ Item_row *item= new (thd->mem_root) Item_row(*list);
+ $$= new (thd->mem_root) Item_func_interval(item);
+ }
+ | INTERVAL_SYM '(' expr ',' expr ',' expr_list ')' %prec INTERVAL_SYM
+ {
+ THD *thd= YYTHD;
+ $7->push_front($5);
+ $7->push_front($3);
+ Item_row *item= new (thd->mem_root) Item_row(*$7);
+ $$= new (thd->mem_root) Item_func_interval(item);
+ }
| LEFT '(' expr ',' expr ')'
{ $$= new (YYTHD->mem_root) Item_func_left($3,$5); }
| MINUTE_SYM '(' expr ')'
@@ -7003,6 +6813,7 @@ function_call_keyword:
| USER '(' ')'
{
$$= new (YYTHD->mem_root) Item_func_user();
+ Lex->set_stmt_unsafe();
Lex->safe_to_cache_query=0;
}
| YEAR_SYM '(' expr ')'
@@ -7044,10 +6855,10 @@ function_call_nonkeyword:
$$= new (YYTHD->mem_root) Item_func_curtime_local($3);
Lex->safe_to_cache_query=0;
}
- | DATE_ADD_INTERVAL '(' expr ',' interval_expr interval ')'
- { $$= new (YYTHD->mem_root) Item_date_add_interval($3,$5,$6,0); }
- | DATE_SUB_INTERVAL '(' expr ',' interval_expr interval ')'
- { $$= new (YYTHD->mem_root) Item_date_add_interval($3,$5,$6,1); }
+ | DATE_ADD_INTERVAL '(' expr ',' INTERVAL_SYM expr interval ')' %prec INTERVAL_SYM
+ { $$= new (YYTHD->mem_root) Item_date_add_interval($3,$6,$7,0); }
+ | DATE_SUB_INTERVAL '(' expr ',' INTERVAL_SYM expr interval ')' %prec INTERVAL_SYM
+ { $$= new (YYTHD->mem_root) Item_date_add_interval($3,$6,$7,1); }
| EXTRACT_SYM '(' interval FROM expr ')'
{ $$=new (YYTHD->mem_root) Item_extract( $3, $5); }
| GET_FORMAT '(' date_time_type ',' expr ')'
@@ -8596,9 +8407,11 @@ drop:
lex->drop_if_exists=$3;
lex->name= $4;
}
- | DROP FUNCTION_SYM if_exists sp_name
+ | DROP FUNCTION_SYM if_exists ident '.' ident
{
- LEX *lex=Lex;
+ THD *thd= YYTHD;
+ LEX *lex= thd->lex;
+ sp_name *spname;
if (lex->sphead)
{
my_error(ER_SP_NO_DROP_SP, MYF(0), "FUNCTION");
@@ -8606,7 +8419,28 @@ drop:
}
lex->sql_command = SQLCOM_DROP_FUNCTION;
lex->drop_if_exists= $3;
- lex->spname= $4;
+ spname= new sp_name($4, $6, true);
+ spname->init_qname(thd);
+ lex->spname= spname;
+ }
+ | DROP FUNCTION_SYM if_exists ident
+ {
+ THD *thd= YYTHD;
+ LEX *lex= thd->lex;
+ LEX_STRING db= {0, 0};
+ sp_name *spname;
+ if (lex->sphead)
+ {
+ my_error(ER_SP_NO_DROP_SP, MYF(0), "FUNCTION");
+ MYSQL_YYABORT;
+ }
+ if (thd->db && lex->copy_db_to(&db.str, &db.length))
+ MYSQL_YYABORT;
+ lex->sql_command = SQLCOM_DROP_FUNCTION;
+ lex->drop_if_exists= $3;
+ spname= new sp_name(db, $4, false);
+ spname->init_qname(thd);
+ lex->spname= spname;
}
| DROP PROCEDURE if_exists sp_name
{
@@ -8676,18 +8510,19 @@ table_name:
;
table_alias_ref_list:
- table_alias_ref
- | table_alias_ref_list ',' table_alias_ref;
+ table_alias_ref
+ | table_alias_ref_list ',' table_alias_ref
+ ;
table_alias_ref:
- table_ident
- {
- if (!Select->add_table_to_list(YYTHD, $1, NULL,
- TL_OPTION_UPDATING | TL_OPTION_ALIAS,
- Lex->lock_option ))
- MYSQL_YYABORT;
- }
- ;
+ table_ident
+ {
+ if (!Select->add_table_to_list(YYTHD, $1, NULL,
+ TL_OPTION_UPDATING | TL_OPTION_ALIAS,
+ Lex->lock_option ))
+ MYSQL_YYABORT;
+ }
+ ;
if_exists:
/* empty */ { $$= 0; }
@@ -9949,11 +9784,15 @@ literal:
String *str= tmp ?
tmp->quick_fix_field(), tmp->val_str((String*) 0) :
(String*) 0;
- $$= new Item_string(str ? str->ptr() : "",
+ $$= new Item_string(NULL, /* name will be set in select_item */
+ str ? str->ptr() : "",
str ? str->length() : 0,
$1);
- if ($$)
- ((Item_string *) $$)->set_repertoire_from_value();
+ if (!$$ || !$$->check_well_formed_result(&$$->str_value, TRUE))
+ {
+ MYSQL_YYABORT;
+ }
+ ((Item_string *) $$)->set_repertoire_from_value();
}
| UNDERSCORE_CHARSET BIN_NUM
{
@@ -9965,9 +9804,14 @@ literal:
String *str= tmp ?
tmp->quick_fix_field(), tmp->val_str((String*) 0) :
(String*) 0;
- $$= new Item_string(str ? str->ptr() : "",
+ $$= new Item_string(NULL, /* name will be set in select_item */
+ str ? str->ptr() : "",
str ? str->length() : 0,
- Lex->charset);
+ $1);
+ if (!$$ || !$$->check_well_formed_result(&$$->str_value, TRUE))
+ {
+ MYSQL_YYABORT;
+ }
}
| DATE_SYM text_literal { $$ = $2; }
| TIME_SYM text_literal { $$ = $2; }
@@ -9990,7 +9834,7 @@ NUM_literal:
| DECIMAL_NUM
{
$$= new Item_decimal($1.str, $1.length, YYTHD->charset());
- if (YYTHD->net.report_error)
+ if (YYTHD->is_error())
{
MYSQL_YYABORT;
}
@@ -9998,7 +9842,7 @@ NUM_literal:
| FLOAT_NUM
{
$$ = new Item_float($1.str, $1.length);
- if (YYTHD->net.report_error)
+ if (YYTHD->is_error())
{
MYSQL_YYABORT;
}
@@ -10664,7 +10508,7 @@ keyword_sp:
| TEXT_SYM {}
| THAN_SYM {}
| TRANSACTION_SYM {}
- | TRANSACTIONAL_SYM {}
+ | TRANSACTIONAL_SYM {}
| TRIGGERS_SYM {}
| TIMESTAMP {}
| TIMESTAMP_ADD {}
@@ -10704,6 +10548,7 @@ set:
lex->option_type=OPT_SESSION;
lex->var_list.empty();
lex->one_shot_set= 0;
+ lex->autocommit= 0;
}
option_value_list
{}
@@ -10746,6 +10591,7 @@ option_type_value:
lex->option_type=OPT_SESSION;
lex->var_list.empty();
lex->one_shot_set= 0;
+ lex->autocommit= 0;
lex->sphead->m_tmp_query= lip->get_tok_start();
}
}
@@ -10987,10 +10833,16 @@ option_value:
user->host=null_lex_str;
user->user.str=thd->security_ctx->priv_user;
thd->lex->var_list.push_back(new set_var_password(user, $3));
+ thd->lex->autocommit= TRUE;
+ if (lex->sphead)
+ lex->sphead->m_flags|= sp_head::HAS_SET_AUTOCOMMIT_STMT;
}
| PASSWORD FOR_SYM user equal text_or_password
{
Lex->var_list.push_back(new set_var_password($3,$5));
+ Lex->autocommit= TRUE;
+ if (Lex->sphead)
+ Lex->sphead->m_flags|= sp_head::HAS_SET_AUTOCOMMIT_STMT;
}
;
@@ -11817,37 +11669,22 @@ union_option:
| ALL { $$=0; }
;
-subselect:
- SELECT_SYM subselect_start subselect_init subselect_end
- {
- $$= $3;
- }
- | '(' subselect_start subselect ')'
- {
- THD *thd= YYTHD;
- /*
- note that a local variable can't be used for
- $3 as it's used in local variable construction
- and some compilers can't guarnatee the order
- in which the local variables are initialized.
- */
- List_iterator<Item> it($3->item_list);
- Item *item;
- /*
- we must fill the items list for the "derived table".
- */
- while ((item= it++))
- add_item_to_list(thd, item);
- }
- union_clause subselect_end { $$= $3; }
- ;
+take_first_select: /* empty */
+ {
+ $$= Lex->current_select->master_unit()->first_select();
+ };
-subselect_init:
- select_init2
- {
- $$= Lex->current_select->master_unit()->first_select();
- }
- ;
+subselect:
+ SELECT_SYM subselect_start select_init2 take_first_select
+ subselect_end
+ {
+ $$= $4;
+ }
+ | '(' subselect_start select_paren take_first_select
+ subselect_end ')'
+ {
+ $$= $4;
+ };
subselect_start:
{
@@ -11894,21 +11731,29 @@ subselect_end:
**************************************************************************/
view_or_trigger_or_sp_or_event:
- definer view_or_trigger_or_sp_or_event_tail
+ definer definer_tail
+ {}
+ | no_definer no_definer_tail
{}
- | view_replace_or_algorithm definer view_tail
+ | view_replace_or_algorithm definer_opt view_tail
{}
;
-view_or_trigger_or_sp_or_event_tail:
+definer_tail:
view_tail
- {}
| trigger_tail
- {}
| sp_tail
- {}
+ | sf_tail
+ | event_tail
+ ;
+
+no_definer_tail:
+ view_tail
+ | trigger_tail
+ | sp_tail
+ | sf_tail
+ | udf_tail
| event_tail
- {}
;
/**************************************************************************
@@ -11917,7 +11762,12 @@ view_or_trigger_or_sp_or_event_tail:
**************************************************************************/
-definer:
+definer_opt:
+ no_definer
+ | definer
+ ;
+
+no_definer:
/* empty */
{
/*
@@ -11929,7 +11779,10 @@ definer:
*/
YYTHD->lex->definer= 0;
}
- | DEFINER_SYM EQ user
+ ;
+
+definer:
+ DEFINER_SYM EQ user
{
YYTHD->lex->definer= get_current_user(YYTHD, $3);
}
@@ -12166,17 +12019,193 @@ trigger_tail:
**************************************************************************/
-sp_tail:
- udf_func_type remember_name FUNCTION_SYM sp_name
+udf_tail:
+ AGGREGATE_SYM remember_name FUNCTION_SYM ident
+ RETURNS_SYM udf_type SONAME_SYM TEXT_STRING_sys
{
- LEX *lex=Lex;
- lex->udf.type= $1;
+ THD *thd= YYTHD;
+ LEX *lex= thd->lex;
+ if (is_native_function(thd, & $4))
+ {
+ my_error(ER_NATIVE_FCT_NAME_COLLISION, MYF(0),
+ $4.str);
+ MYSQL_YYABORT;
+ }
+ lex->sql_command = SQLCOM_CREATE_FUNCTION;
+ lex->udf.type= UDFTYPE_AGGREGATE;
lex->stmt_definition_begin= $2;
- lex->spname= $4;
+ lex->udf.name = $4;
+ lex->udf.returns=(Item_result) $6;
+ lex->udf.dl=$8.str;
}
- create_function_tail
- {}
- | PROCEDURE remember_name sp_name
+ | remember_name FUNCTION_SYM ident
+ RETURNS_SYM udf_type SONAME_SYM TEXT_STRING_sys
+ {
+ THD *thd= YYTHD;
+ LEX *lex= thd->lex;
+ if (is_native_function(thd, & $3))
+ {
+ my_error(ER_NATIVE_FCT_NAME_COLLISION, MYF(0),
+ $3.str);
+ MYSQL_YYABORT;
+ }
+ lex->sql_command = SQLCOM_CREATE_FUNCTION;
+ lex->udf.type= UDFTYPE_FUNCTION;
+ lex->stmt_definition_begin= $1;
+ lex->udf.name = $3;
+ lex->udf.returns=(Item_result) $5;
+ lex->udf.dl=$7.str;
+ }
+ ;
+
+sf_tail:
+ remember_name /* $1 */
+ FUNCTION_SYM /* $2 */
+ sp_name /* $3 */
+ '(' /* $4 */
+ { /* $5 */
+ THD *thd= YYTHD;
+ LEX *lex= thd->lex;
+ Lex_input_stream *lip= thd->m_lip;
+ sp_head *sp;
+ const char* tmp_param_begin;
+
+ lex->stmt_definition_begin= $1;
+ lex->spname= $3;
+
+ if (lex->sphead)
+ {
+ my_error(ER_SP_NO_RECURSIVE_CREATE, MYF(0), "FUNCTION");
+ MYSQL_YYABORT;
+ }
+ /* Order is important here: new - reset - init */
+ sp= new sp_head();
+ sp->reset_thd_mem_root(thd);
+ sp->init(lex);
+ sp->init_sp_name(thd, lex->spname);
+
+ sp->m_type= TYPE_ENUM_FUNCTION;
+ lex->sphead= sp;
+ /*
+ We have to turn off CLIENT_MULTI_QUERIES while parsing a
+ stored procedure, otherwise yylex will chop it into pieces
+ at each ';'.
+ */
+ $<ulong_num>$= thd->client_capabilities & CLIENT_MULTI_QUERIES;
+ thd->client_capabilities &= ~CLIENT_MULTI_QUERIES;
+
+ tmp_param_begin= lip->get_cpp_tok_start();
+ tmp_param_begin++;
+ lex->sphead->m_param_begin= tmp_param_begin;
+ }
+ sp_fdparam_list /* $6 */
+ ')' /* $7 */
+ { /* $8 */
+ THD *thd= YYTHD;
+ LEX *lex= thd->lex;
+ Lex_input_stream *lip= thd->m_lip;
+
+ lex->sphead->m_param_end= lip->get_cpp_tok_start();
+ }
+ RETURNS_SYM /* $9 */
+ { /* $10 */
+ LEX *lex= Lex;
+ lex->charset= NULL;
+ lex->length= lex->dec= NULL;
+ lex->interval_list.empty();
+ lex->type= 0;
+ }
+ type /* $11 */
+ { /* $12 */
+ LEX *lex= Lex;
+ sp_head *sp= lex->sphead;
+ /*
+ This was disabled in 5.1.12. See bug #20701
+ When collation support in SP is implemented, then this test
+ should be removed.
+ */
+ if (($11 == MYSQL_TYPE_STRING || $11 == MYSQL_TYPE_VARCHAR)
+ && (lex->type & BINCMP_FLAG))
+ {
+ my_error(ER_NOT_SUPPORTED_YET, MYF(0), "return value collation");
+ MYSQL_YYABORT;
+ }
+
+ if (sp->fill_field_definition(YYTHD, lex,
+ (enum enum_field_types) $11,
+ &sp->m_return_field_def))
+ MYSQL_YYABORT;
+
+ bzero((char *)&lex->sp_chistics, sizeof(st_sp_chistics));
+ }
+ sp_c_chistics /* $13 */
+ { /* $14 */
+ THD *thd= YYTHD;
+ LEX *lex= thd->lex;
+ Lex_input_stream *lip= thd->m_lip;
+
+ lex->sphead->m_chistics= &lex->sp_chistics;
+ lex->sphead->set_body_start(thd, lip->get_cpp_tok_start());
+ }
+ sp_proc_stmt /* $15 */
+ {
+ THD *thd= YYTHD;
+ LEX *lex= thd->lex;
+ sp_head *sp= lex->sphead;
+
+ if (sp->is_not_allowed_in_function("function"))
+ MYSQL_YYABORT;
+
+ lex->sql_command= SQLCOM_CREATE_SPFUNCTION;
+ sp->set_stmt_end(thd);
+ if (!(sp->m_flags & sp_head::HAS_RETURN))
+ {
+ my_error(ER_SP_NORETURN, MYF(0), sp->m_qname.str);
+ MYSQL_YYABORT;
+ }
+ if (is_native_function(thd, & sp->m_name))
+ {
+ /*
+ This warning will be printed when
+ [1] A client query is parsed,
+ [2] A stored function is loaded by db_load_routine.
+ Printing the warning for [2] is intentional, to cover the
+ following scenario:
+ - A user define a SF 'foo' using MySQL 5.N
+ - An application uses select foo(), and works.
+ - MySQL 5.{N+1} defines a new native function 'foo', as
+ part of a new feature.
+ - MySQL 5.{N+1} documentation is updated, and should mention
+ that there is a potential incompatible change in case of
+ existing stored function named 'foo'.
+ - The user deploys 5.{N+1}. At this point, 'select foo()'
+ means something different, and the user code is most likely
+ broken (it's only safe if the code is 'select db.foo()').
+ With a warning printed when the SF is loaded (which has to occur
+ before the call), the warning will provide a hint explaining
+ the root cause of a later failure of 'select foo()'.
+ With no warning printed, the user code will fail with no
+ apparent reason.
+ Printing a warning each time db_load_routine is executed for
+ an ambiguous function is annoying, since that can happen a lot,
+ but in practice should not happen unless there *are* name
+ collisions.
+ If a collision exists, it should not be silenced but fixed.
+ */
+ push_warning_printf(thd,
+ MYSQL_ERROR::WARN_LEVEL_NOTE,
+ ER_NATIVE_FCT_NAME_COLLISION,
+ ER(ER_NATIVE_FCT_NAME_COLLISION),
+ sp->m_name.str);
+ }
+ /* Restore flag if it was cleared above */
+ thd->client_capabilities |= $<ulong_num>5;
+ sp->restore_thd_mem_root(thd);
+ }
+ ;
+
+sp_tail:
+ PROCEDURE remember_name sp_name
{
LEX *lex= Lex;
sp_head *sp;
diff --git a/sql/structs.h b/sql/structs.h
index 09a3c4d7285..662d0a680b8 100644
--- a/sql/structs.h
+++ b/sql/structs.h
@@ -71,7 +71,7 @@ typedef struct st_key_part_info { /* Info about a key part */
typedef struct st_key {
uint key_length; /* Tot length of key */
- uint flags; /* dupp key and pack flags */
+ ulong flags; /* dupp key and pack flags */
uint key_parts; /* How many key_parts */
uint extra_length;
uint usable_key_parts; /* Should normally be = key_parts */
diff --git a/sql/table.cc b/sql/table.cc
index b734f5209d7..e3a3757b2ac 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -329,6 +329,7 @@ TABLE_SHARE *alloc_table_share(TABLE_LIST *table_list, char *key,
SYNOPSIS
init_tmp_table_share()
+ thd thread handle
share Share to fill
key Table_cache_key, as generated from create_table_def_key.
must start with db name.
@@ -346,7 +347,7 @@ TABLE_SHARE *alloc_table_share(TABLE_LIST *table_list, char *key,
use key_length= 0 as neither table_cache_key or key_length will be used).
*/
-void init_tmp_table_share(TABLE_SHARE *share, const char *key,
+void init_tmp_table_share(THD *thd, TABLE_SHARE *share, const char *key,
uint key_length, const char *table_name,
const char *path)
{
@@ -373,9 +374,14 @@ void init_tmp_table_share(TABLE_SHARE *share, const char *key,
anyway to be able to catch errors.
*/
share->table_map_version= ~(ulonglong)0;
- share->table_map_id= ~0UL;
share->cached_row_logging_check= -1;
+ /*
+ table_map_id is also used for MERGE tables to suppress repeated
+ compatibility checks.
+ */
+ share->table_map_id= (ulong) thd->query_id;
+
DBUG_VOID_RETURN;
}
@@ -970,6 +976,7 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head,
}
parser_name.str= (char*) next_chunk;
parser_name.length= strlen((char*) next_chunk);
+ next_chunk+= parser_name.length + 1;
keyinfo->parser= my_plugin_lock_by_name(NULL, &parser_name,
MYSQL_FTPARSER_PLUGIN);
if (! keyinfo->parser)
@@ -1352,9 +1359,11 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head,
keyinfo->key_length+= HA_KEY_NULL_LENGTH;
}
if (field->type() == MYSQL_TYPE_BLOB ||
- field->real_type() == MYSQL_TYPE_VARCHAR)
+ field->real_type() == MYSQL_TYPE_VARCHAR ||
+ field->type() == MYSQL_TYPE_GEOMETRY)
{
- if (field->type() == MYSQL_TYPE_BLOB)
+ if (field->type() == MYSQL_TYPE_BLOB ||
+ field->type() == MYSQL_TYPE_GEOMETRY)
key_part->key_part_flag|= HA_BLOB_PART;
else
key_part->key_part_flag|= HA_VAR_LENGTH_PART;
@@ -1608,6 +1617,9 @@ int open_table_from_share(THD *thd, TABLE_SHARE *share, const char *alias,
DBUG_PRINT("enter",("name: '%s.%s' form: 0x%lx", share->db.str,
share->table_name.str, (long) outparam));
+ /* Parsing of partitioning information from .frm needs thd->lex set up. */
+ DBUG_ASSERT(thd->lex->is_lex_started);
+
error= 1;
bzero((char*) outparam, sizeof(*outparam));
outparam->in_use= thd;
@@ -1782,12 +1794,18 @@ int open_table_from_share(THD *thd, TABLE_SHARE *share, const char *alias,
outparam, is_create_table,
share->default_part_db_type,
&work_part_info_used);
+ if (tmp)
+ {
+ thd->stmt_arena= backup_stmt_arena_ptr;
+ thd->restore_active_arena(&part_func_arena, &backup_arena);
+ goto partititon_err;
+ }
outparam->part_info->is_auto_partitioned= share->auto_partitioned;
DBUG_PRINT("info", ("autopartitioned: %u", share->auto_partitioned));
/* we should perform the fix_partition_func in either local or
caller's arena depending on work_part_info_used value
*/
- if (!tmp && !work_part_info_used)
+ if (!work_part_info_used)
tmp= fix_partition_func(thd, outparam, is_create_table);
thd->stmt_arena= backup_stmt_arena_ptr;
thd->restore_active_arena(&part_func_arena, &backup_arena);
@@ -1797,6 +1815,7 @@ int open_table_from_share(THD *thd, TABLE_SHARE *share, const char *alias,
tmp= fix_partition_func(thd, outparam, is_create_table);
outparam->part_info->item_free_list= part_func_arena.free_list;
}
+partititon_err:
if (tmp)
{
if (is_create_table)
@@ -4476,6 +4495,25 @@ void st_table::mark_columns_needed_for_insert()
mark_auto_increment_column();
}
+
+/**
+ @brief Check if this is part of a MERGE table with attached children.
+
+ @return status
+ @retval TRUE children are attached
+ @retval FALSE no MERGE part or children not attached
+
+ @detail
+ A MERGE table consists of a parent TABLE and zero or more child
+ TABLEs. Each of these TABLEs is called a part of a MERGE table.
+*/
+
+bool st_table::is_children_attached(void)
+{
+ return((child_l && children_attached) ||
+ (parent && parent->children_attached));
+}
+
/*
Cleanup this table for re-execution.
diff --git a/sql/table.h b/sql/table.h
index b9c15ea2b6d..6073a805610 100644
--- a/sql/table.h
+++ b/sql/table.h
@@ -432,6 +432,12 @@ typedef struct st_table_share
{
return (table_category == TABLE_CATEGORY_PERFORMANCE);
}
+
+ inline ulong get_table_def_version()
+ {
+ return table_map_id;
+ }
+
} TABLE_SHARE;
@@ -456,6 +462,11 @@ struct st_table {
#endif
struct st_table *next, *prev;
+ /* For the below MERGE related members see top comment in ha_myisammrg.cc */
+ struct st_table *parent; /* Set in MERGE child. Ptr to parent */
+ TABLE_LIST *child_l; /* Set in MERGE parent. List of children */
+ TABLE_LIST **child_last_l; /* Set in MERGE parent. End of list */
+
THD *in_use; /* Which thread uses this */
Field **field; /* Pointer to fields */
@@ -500,6 +511,24 @@ struct st_table {
my_bitmap_map *bitmap_init_value;
MY_BITMAP def_read_set, def_write_set, tmp_set; /* containers */
MY_BITMAP *read_set, *write_set; /* Active column sets */
+ /*
+ The ID of the query that opened and is using this table. Has different
+ meanings depending on the table type.
+
+ Temporary tables:
+
+ table->query_id is set to thd->query_id for the duration of a statement
+ and is reset to 0 once it is closed by the same statement. A non-zero
+ table->query_id means that a statement is using the table even if it's
+ not the current statement (table is in use by some outer statement).
+
+ Non-temporary tables:
+
+ Under pre-locked or LOCK TABLES mode: query_id is set to thd->query_id
+ for the duration of a statement and is reset to 0 once it is closed by
+ the same statement. A non-zero query_id is used to control which tables
+ in the list of pre-opened and locked tables are actually being used.
+ */
query_id_t query_id;
/*
@@ -594,8 +623,8 @@ struct st_table {
my_bool locked_by_name;
my_bool fulltext_searched;
my_bool no_cache;
- /* To signal that we should reset query_id for tables and cols */
- my_bool clear_query_id;
+ /* To signal that the table is associated with a HANDLER statement */
+ my_bool open_by_handler;
/*
To indicate that a non-null value of the auto_increment field
was provided by the user or retrieved from the current record.
@@ -605,6 +634,8 @@ struct st_table {
my_bool insert_or_update; /* Can be used by the handler */
my_bool alias_name_used; /* true if table_name is alias */
my_bool get_fields_in_item_tree; /* Signal to fix_field */
+ /* If MERGE children attached to parent. See top comment in ha_myisammrg.cc */
+ my_bool children_attached;
REGINFO reginfo; /* field connections */
MEM_ROOT mem_root;
@@ -656,6 +687,7 @@ struct st_table {
*/
inline bool needs_reopen_or_name_lock()
{ return s->version != refresh_version; }
+ bool is_children_attached(void);
};
enum enum_schema_table_state
@@ -979,6 +1011,8 @@ struct TABLE_LIST
(non-zero only for merged underlying tables of a view).
*/
TABLE_LIST *referencing_view;
+ /* Ptr to parent MERGE table list item. See top comment in ha_myisammrg.cc */
+ TABLE_LIST *parent_l;
/*
Security context (non-zero only for tables which belong
to view with SQL SECURITY DEFINER)
@@ -1064,6 +1098,7 @@ struct TABLE_LIST
... SELECT implementation).
*/
bool create;
+ bool internal_tmp_table;
/* View creation context. */
@@ -1159,6 +1194,20 @@ struct TABLE_LIST
*/
bool process_index_hints(TABLE *table);
+ /* Access MERGE child def version. See top comment in ha_myisammrg.cc */
+ inline ulong get_child_def_version()
+ {
+ return child_def_version;
+ }
+ inline void set_child_def_version(ulong version)
+ {
+ child_def_version= version;
+ }
+ inline void init_child_def_version()
+ {
+ child_def_version= ~0UL;
+ }
+
private:
bool prep_check_option(THD *thd, uint8 check_opt_type);
bool prep_where(THD *thd, Item **conds, bool no_where_clause);
@@ -1166,6 +1215,9 @@ private:
Cleanup for re-execution in a prepared statement or a stored
procedure.
*/
+
+ /* Remembered MERGE child def version. See top comment in ha_myisammrg.cc */
+ ulong child_def_version;
};
class Item;
diff --git a/sql/tztime.cc b/sql/tztime.cc
index 9eb38e97827..920f8e87d13 100644
--- a/sql/tztime.cc
+++ b/sql/tztime.cc
@@ -1575,6 +1575,7 @@ my_tz_init(THD *org_thd, const char *default_tzname, my_bool bootstrap)
DBUG_RETURN(1);
thd->thread_stack= (char*) &thd;
thd->store_globals();
+ lex_start(thd);
/* Init all memory structures that require explicit destruction */
if (hash_init(&tz_names, &my_charset_latin1, 20,
diff --git a/sql/udf_example.c b/sql/udf_example.c
index 6c07a929b04..a3d149f0971 100644
--- a/sql/udf_example.c
+++ b/sql/udf_example.c
@@ -648,13 +648,11 @@ my_bool sequence_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
return 1;
}
bzero(initid->ptr,sizeof(longlong));
- /*
- Fool MySQL to think that this function is a constant
- This will ensure that MySQL only evalutes the function
- when the rows are sent to the client and not before any ORDER BY
- clauses
+ /*
+ sequence() is a non-deterministic function : it has different value
+ even if called with the same arguments.
*/
- initid->const_item=1;
+ initid->const_item=0;
return 0;
}
@@ -1106,11 +1104,12 @@ char * is_const(UDF_INIT *initid, UDF_ARGS *args __attribute__((unused)),
}
+
my_bool check_const_len_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
{
if (args->arg_count != 1)
{
- strmov(message, "IS_CONST accepts only one argument");
+ strmov(message, "CHECK_CONST_LEN accepts only one argument");
return 1;
}
if (args->args[0] == 0)
@@ -1140,5 +1139,4 @@ char * check_const_len(UDF_INIT *initid, UDF_ARGS *args __attribute__((unused)),
}
-
#endif /* HAVE_DLOPEN */
diff --git a/sql/unireg.cc b/sql/unireg.cc
index ae7d3d9d062..e5f230841f6 100644
--- a/sql/unireg.cc
+++ b/sql/unireg.cc
@@ -47,6 +47,35 @@ static bool make_empty_rec(THD *thd, int file, enum legacy_db_type table_type,
uint reclength, ulong data_offset,
handler *handler);
+/**
+ An interceptor to hijack ER_TOO_MANY_FIELDS error from
+ pack_screens and retry again without UNIREG screens.
+
+ XXX: what is a UNIREG screen?
+*/
+
+struct Pack_header_error_handler: public Internal_error_handler
+{
+ virtual bool handle_error(uint sql_errno,
+ const char *message,
+ MYSQL_ERROR::enum_warning_level level,
+ THD *thd);
+ bool is_handled;
+ Pack_header_error_handler() :is_handled(FALSE) {}
+};
+
+
+bool
+Pack_header_error_handler::
+handle_error(uint sql_errno,
+ const char * /* message */,
+ MYSQL_ERROR::enum_warning_level /* level */,
+ THD * /* thd */)
+{
+ is_handled= (sql_errno == ER_TOO_MANY_FIELDS);
+ return is_handled;
+}
+
/*
Create a frm (table definition) file
@@ -86,6 +115,8 @@ bool mysql_create_frm(THD *thd, const char *file_name,
#ifdef WITH_PARTITION_STORAGE_ENGINE
partition_info *part_info= thd->work_part_info;
#endif
+ Pack_header_error_handler pack_header_error_handler;
+ int error;
DBUG_ENTER("mysql_create_frm");
DBUG_ASSERT(*fn_rext((char*)file_name)); // Check .frm extension
@@ -99,17 +130,22 @@ bool mysql_create_frm(THD *thd, const char *file_name,
create_info->null_bits++;
data_offset= (create_info->null_bits + 7) / 8;
- if (pack_header(forminfo, ha_legacy_type(create_info->db_type),
- create_fields,info_length,
- screens, create_info->table_options,
- data_offset, db_file))
+ thd->push_internal_handler(&pack_header_error_handler);
+
+ error= pack_header(forminfo, ha_legacy_type(create_info->db_type),
+ create_fields,info_length,
+ screens, create_info->table_options,
+ data_offset, db_file);
+
+ thd->pop_internal_handler();
+
+ if (error)
{
my_free(screen_buff, MYF(0));
- if (thd->net.last_errno != ER_TOO_MANY_FIELDS)
+ if (! pack_header_error_handler.is_handled)
DBUG_RETURN(1);
// Try again without UNIREG screens (to get more columns)
- thd->net.last_error[0]=0;
if (!(screen_buff=pack_screens(create_fields,&info_length,&screens,1)))
DBUG_RETURN(1);
if (pack_header(forminfo, ha_legacy_type(create_info->db_type),
@@ -471,7 +507,7 @@ static uint pack_keys(uchar *keybuff, uint key_count, KEY *keyinfo,
int2store(pos+6, key->block_size);
pos+=8;
key_parts+=key->key_parts;
- DBUG_PRINT("loop", ("flags: %d key_parts: %d key_part: 0x%lx",
+ DBUG_PRINT("loop", ("flags: %lu key_parts: %d key_part: 0x%lx",
key->flags, key->key_parts,
(long) key->key_part));
for (key_part=key->key_part,key_part_end=key_part+key->key_parts ;
diff --git a/storage/archive/azio.c b/storage/archive/azio.c
index c04749444cb..cada6c57918 100644
--- a/storage/archive/azio.c
+++ b/storage/archive/azio.c
@@ -262,7 +262,7 @@ void check_header(azio_stream *s)
if (len) s->inbuf[0] = s->stream.next_in[0];
errno = 0;
len = (uInt)my_read(s->file, (uchar *)s->inbuf + len, AZ_BUFSIZE_READ >> len, MYF(0));
- if (len == 0) s->z_err = Z_ERRNO;
+ if (len == (uInt)-1) s->z_err = Z_ERRNO;
s->stream.avail_in += len;
s->stream.next_in = s->inbuf;
if (s->stream.avail_in < 2) {
@@ -681,8 +681,8 @@ my_off_t azseek (s, offset, whence)
/* There was a zmemzero here if inbuf was null -Brian */
while (offset > 0)
{
- uInt size = AZ_BUFSIZE_WRITE;
- if (offset < AZ_BUFSIZE_WRITE) size = (uInt)offset;
+ uInt size = AZ_BUFSIZE_READ;
+ if (offset < AZ_BUFSIZE_READ) size = (uInt)offset;
size = azwrite(s, s->inbuf, size);
if (size == 0) return -1L;
@@ -725,11 +725,11 @@ my_off_t azseek (s, offset, whence)
}
while (offset > 0) {
int error;
- unsigned int size = AZ_BUFSIZE_READ;
- if (offset < AZ_BUFSIZE_READ) size = (int)offset;
+ unsigned int size = AZ_BUFSIZE_WRITE;
+ if (offset < AZ_BUFSIZE_WRITE) size = (int)offset;
size = azread(s, s->outbuf, size, &error);
- if (error <= 0) return -1L;
+ if (error < 0) return -1L;
offset -= size;
}
return s->out;
diff --git a/storage/archive/ha_archive.cc b/storage/archive/ha_archive.cc
index 6696eac2fbb..967e315d4a4 100644
--- a/storage/archive/ha_archive.cc
+++ b/storage/archive/ha_archive.cc
@@ -357,7 +357,7 @@ ARCHIVE_SHARE *ha_archive::get_share(const char *table_name, int *rc)
{
DBUG_RETURN(NULL);
}
- stats.auto_increment_value= archive_tmp.auto_increment;
+ stats.auto_increment_value= archive_tmp.auto_increment + 1;
share->rows_recorded= (ha_rows)archive_tmp.rows;
share->crashed= archive_tmp.dirty;
azclose(&archive_tmp);
@@ -586,9 +586,7 @@ int ha_archive::create(const char *name, TABLE *table_arg,
DBUG_ENTER("ha_archive::create");
- stats.auto_increment_value= (create_info->auto_increment_value ?
- create_info->auto_increment_value -1 :
- (ulonglong) 0);
+ stats.auto_increment_value= create_info->auto_increment_value;
for (uint key= 0; key < table_arg->s->keys; key++)
{
@@ -673,7 +671,8 @@ int ha_archive::create(const char *name, TABLE *table_arg,
Yes you need to do this, because the starting value
for the autoincrement may not be zero.
*/
- create_stream.auto_increment= stats.auto_increment_value;
+ create_stream.auto_increment= stats.auto_increment_value ?
+ stats.auto_increment_value - 1 : 0;
if (azclose(&create_stream))
{
error= errno;
@@ -871,8 +870,8 @@ int ha_archive::write_row(uchar *buf)
else
{
if (temp_auto > share->archive_write.auto_increment)
- stats.auto_increment_value= share->archive_write.auto_increment=
- temp_auto;
+ stats.auto_increment_value=
+ (share->archive_write.auto_increment= temp_auto) + 1;
}
}
@@ -896,7 +895,7 @@ void ha_archive::get_auto_increment(ulonglong offset, ulonglong increment,
ulonglong *first_value,
ulonglong *nb_reserved_values)
{
- *nb_reserved_values= 1;
+ *nb_reserved_values= ULONGLONG_MAX;
*first_value= share->archive_write.auto_increment + 1;
}
@@ -1241,8 +1240,8 @@ int ha_archive::rnd_pos(uchar * buf, uchar *pos)
DBUG_ENTER("ha_archive::rnd_pos");
ha_statistic_increment(&SSV::ha_read_rnd_next_count);
current_position= (my_off_t)my_get_ptr(pos, ref_length);
- (void)azseek(&archive, current_position, SEEK_SET);
-
+ if (azseek(&archive, current_position, SEEK_SET) == (my_off_t)(-1L))
+ DBUG_RETURN(HA_ERR_CRASHED_ON_USAGE);
DBUG_RETURN(get_row(&archive, buf));
}
@@ -1315,7 +1314,8 @@ int ha_archive::optimize(THD* thd, HA_CHECK_OPT* check_opt)
if (!rc)
{
share->rows_recorded= 0;
- stats.auto_increment_value= share->archive_write.auto_increment= 0;
+ stats.auto_increment_value= 1;
+ share->archive_write.auto_increment= 0;
my_bitmap_map *org_bitmap= dbug_tmp_use_all_columns(table, table->read_set);
while (!(rc= get_row(&archive, table->record[0])))
@@ -1332,8 +1332,8 @@ int ha_archive::optimize(THD* thd, HA_CHECK_OPT* check_opt)
(ulonglong) field->val_int(table->record[0] +
field->offset(table->record[0]));
if (share->archive_write.auto_increment < auto_value)
- stats.auto_increment_value= share->archive_write.auto_increment=
- auto_value;
+ stats.auto_increment_value=
+ (share->archive_write.auto_increment= auto_value) + 1;
}
}
@@ -1418,18 +1418,9 @@ void ha_archive::update_create_info(HA_CREATE_INFO *create_info)
DBUG_ENTER("ha_archive::update_create_info");
ha_archive::info(HA_STATUS_AUTO);
- if (create_info->used_fields & HA_CREATE_USED_AUTO)
+ if (!(create_info->used_fields & HA_CREATE_USED_AUTO))
{
- /*
- Internally Archive keeps track of last used, not next used.
- To make the output look like MyISAM we add 1 here.
-
- This is not completely compatible with MYISAM though, since
- MyISAM will record on "SHOW CREATE TABLE" the last position,
- where we will report the original position the table was
- created with.
- */
- create_info->auto_increment_value= stats.auto_increment_value + 1;
+ create_info->auto_increment_value= stats.auto_increment_value;
}
if (!(my_readlink(share->real_path, share->data_file_name, MYF(0))))
@@ -1494,7 +1485,7 @@ int ha_archive::info(uint flag)
pthread_mutex_lock(&share->mutex);
azflush(&archive, Z_SYNC_FLUSH);
pthread_mutex_unlock(&share->mutex);
- stats.auto_increment_value= archive.auto_increment;
+ stats.auto_increment_value= archive.auto_increment + 1;
}
DBUG_RETURN(0);
diff --git a/storage/csv/ha_tina.cc b/storage/csv/ha_tina.cc
index 394d00d20b7..56d77c2b8b1 100644
--- a/storage/csv/ha_tina.cc
+++ b/storage/csv/ha_tina.cc
@@ -471,22 +471,22 @@ int ha_tina::encode_quote(uchar *buf)
{
const char *ptr;
const char *end_ptr;
-
+ const bool was_null= (*field)->is_null();
+
/*
- CSV does not support nulls. Write quoted 0 to the buffer. In fact,
- (*field)->val_str(&attribute,&attribute) would usually return 0
- in this case but we write it explicitly here.
- Basically this is a safety check, as no one ensures that the
- field content is cleaned up every time we use Field::set_null()
- in the code.
+ assistance for backwards compatibility in production builds.
+ note: this will not work for ENUM columns.
*/
- if ((*field)->is_null())
+ if (was_null)
{
- buffer.append(STRING_WITH_LEN("\"0\","));
- continue;
+ (*field)->set_default();
+ (*field)->set_notnull();
}
(*field)->val_str(&attribute,&attribute);
+
+ if (was_null)
+ (*field)->set_null();
if ((*field)->str_needs_quotes())
{
@@ -1195,8 +1195,8 @@ int ha_tina::rnd_end()
The sort is needed when there were updates/deletes with random orders.
It sorts so that we move the firts blocks to the beginning.
*/
- qsort(chain, (size_t)(chain_ptr - chain), sizeof(tina_set),
- (qsort_cmp)sort_set);
+ my_qsort(chain, (size_t)(chain_ptr - chain), sizeof(tina_set),
+ (qsort_cmp)sort_set);
off_t write_begin= 0, write_end;
@@ -1488,6 +1488,19 @@ int ha_tina::create(const char *name, TABLE *table_arg,
File create_file;
DBUG_ENTER("ha_tina::create");
+ /*
+ check columns
+ */
+ for (Field **field= table_arg->s->field; *field; field++)
+ {
+ if ((*field)->real_maybe_null())
+ {
+ my_error(ER_CHECK_NOT_IMPLEMENTED, MYF(0), "nullable columns");
+ DBUG_RETURN(HA_ERR_UNSUPPORTED);
+ }
+ }
+
+
if ((create_file= my_create(fn_format(name_buff, name, "", CSM_EXT,
MY_REPLACE_EXT|MY_UNPACK_FILENAME), 0,
O_RDWR | O_TRUNC,MYF(MY_WME))) < 0)
diff --git a/storage/example/ha_example.cc b/storage/example/ha_example.cc
index b7186dda676..6d9f4841e06 100644
--- a/storage/example/ha_example.cc
+++ b/storage/example/ha_example.cc
@@ -848,6 +848,34 @@ int ha_example::create(const char *name, TABLE *table_arg,
struct st_mysql_storage_engine example_storage_engine=
{ MYSQL_HANDLERTON_INTERFACE_VERSION };
+static ulong srv_enum_var= 0;
+
+const char *enum_var_names[]=
+{
+ "e1", "e2", NullS
+};
+
+TYPELIB enum_var_typelib=
+{
+ array_elements(enum_var_names) - 1, "enum_var_typelib",
+ enum_var_names, NULL
+};
+
+static MYSQL_SYSVAR_ENUM(
+ enum_var, // name
+ srv_enum_var, // varname
+ PLUGIN_VAR_RQCMDARG, // opt
+ "Sample ENUM system variable.", // comment
+ NULL, // check
+ NULL, // update
+ 0, // def
+ &enum_var_typelib); // typelib
+
+static struct st_mysql_sys_var* example_system_variables[]= {
+ MYSQL_SYSVAR(enum_var),
+ NULL
+};
+
mysql_declare_plugin(example)
{
MYSQL_STORAGE_ENGINE_PLUGIN,
@@ -860,7 +888,7 @@ mysql_declare_plugin(example)
example_done_func, /* Plugin Deinit */
0x0001 /* 0.1 */,
NULL, /* status variables */
- NULL, /* system variables */
+ example_system_variables, /* system variables */
NULL /* config options */
}
mysql_declare_plugin_end;
diff --git a/storage/federated/ha_federated.cc b/storage/federated/ha_federated.cc
index 3fc17e18e76..091a26f6f36 100644
--- a/storage/federated/ha_federated.cc
+++ b/storage/federated/ha_federated.cc
@@ -2408,6 +2408,24 @@ error:
}
+/*
+ This method is used exlusevely by filesort() to check if we
+ can create sorting buffers of necessary size.
+ If the handler returns more records that it declares
+ here server can just crash on filesort().
+ We cannot guarantee that's not going to happen with
+ the FEDERATED engine, as we have records==0 always if the
+ client is a VIEW, and for the table the number of
+ records can inpredictably change during execution.
+ So we return maximum possible value here.
+*/
+
+ha_rows ha_federated::estimate_rows_upper_bound()
+{
+ return HA_POS_ERROR;
+}
+
+
/* Initialized at each key walk (called multiple times unlike rnd_init()) */
int ha_federated::index_init(uint keynr, bool sorted)
@@ -2769,7 +2787,12 @@ int ha_federated::info(uint flag)
status_query_string.length(0);
result= mysql_store_result(mysql);
- if (!result)
+
+ /*
+ We're going to use fields num. 4, 12 and 13 of the resultset,
+ so make sure we have these fields.
+ */
+ if (!result || (mysql_num_fields(result) < 14))
goto error;
if (!mysql_num_rows(result))
diff --git a/storage/federated/ha_federated.h b/storage/federated/ha_federated.h
index 40bcf9cc402..1974f9936fc 100644
--- a/storage/federated/ha_federated.h
+++ b/storage/federated/ha_federated.h
@@ -210,6 +210,7 @@ public:
int update_row(const uchar *old_data, uchar *new_data);
int delete_row(const uchar *buf);
int index_init(uint keynr, bool sorted);
+ ha_rows estimate_rows_upper_bound();
int index_read(uchar *buf, const uchar *key,
uint key_len, enum ha_rkey_function find_flag);
int index_read_idx(uchar *buf, uint idx, const uchar *key,
diff --git a/storage/heap/hp_delete.c b/storage/heap/hp_delete.c
index 1dd79a42e0b..9e9e28da335 100644
--- a/storage/heap/hp_delete.c
+++ b/storage/heap/hp_delete.c
@@ -72,10 +72,7 @@ int hp_rb_delete_key(HP_INFO *info, register HP_KEYDEF *keyinfo,
int res;
if (flag)
- {
info->last_pos= NULL; /* For heap_rnext/heap_rprev */
- info->lastkey_len= 0;
- }
custom_arg.keyseg= keyinfo->seg;
custom_arg.key_length= hp_rb_make_key(keyinfo, info->recbuf, record, recpos);
diff --git a/storage/heap/hp_rfirst.c b/storage/heap/hp_rfirst.c
index 48c1e625bd8..d0d2ec9b506 100644
--- a/storage/heap/hp_rfirst.c
+++ b/storage/heap/hp_rfirst.c
@@ -35,6 +35,17 @@ int heap_rfirst(HP_INFO *info, uchar *record, int inx)
sizeof(uchar*));
info->current_ptr = pos;
memcpy(record, pos, (size_t)share->reclength);
+ /*
+ If we're performing index_first on a table that was taken from
+ table cache, info->lastkey_len is initialized to previous query.
+ Thus we set info->lastkey_len to proper value for subsequent
+ heap_rnext() calls.
+ This is needed for DELETE queries only, otherwise this variable is
+ not used.
+ Note that the same workaround may be needed for heap_rlast(), but
+ for now heap_rlast() is never used for DELETE queries.
+ */
+ info->lastkey_len= 0;
info->update = HA_STATE_AKTIV;
}
else
diff --git a/storage/heap/hp_rnext.c b/storage/heap/hp_rnext.c
index 262754e9e64..3d715f4e6d3 100644
--- a/storage/heap/hp_rnext.c
+++ b/storage/heap/hp_rnext.c
@@ -33,11 +33,40 @@ int heap_rnext(HP_INFO *info, uchar *record)
heap_rb_param custom_arg;
if (info->last_pos)
+ {
+ /*
+ We enter this branch for non-DELETE queries after heap_rkey()
+ or heap_rfirst(). As last key position (info->last_pos) is available,
+ we only need to climb the tree using tree_search_next().
+ */
pos = tree_search_next(&keyinfo->rb_tree, &info->last_pos,
offsetof(TREE_ELEMENT, left),
offsetof(TREE_ELEMENT, right));
+ }
+ else if (!info->lastkey_len)
+ {
+ /*
+ We enter this branch only for DELETE queries after heap_rfirst(). E.g.
+ DELETE FROM t1 WHERE a<10. As last key position is not available
+ (last key is removed by heap_delete()), we must restart search as it
+ is done in heap_rfirst().
+
+ It should be safe to handle this situation without this branch. That is
+ branch below should find smallest element in a tree as lastkey_len is
+ zero. tree_search_edge() is a kind of optimisation here as it should be
+ faster than tree_search_key().
+ */
+ pos= tree_search_edge(&keyinfo->rb_tree, info->parents,
+ &info->last_pos, offsetof(TREE_ELEMENT, left));
+ }
else
{
+ /*
+ We enter this branch only for DELETE queries after heap_rkey(). E.g.
+ DELETE FROM t1 WHERE a=10. As last key position is not available
+ (last key is removed by heap_delete()), we must restart search as it
+ is done in heap_rkey().
+ */
custom_arg.keyseg = keyinfo->seg;
custom_arg.key_length = info->lastkey_len;
custom_arg.search_flag = SEARCH_SAME | SEARCH_FIND;
diff --git a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c
index 7b49a7641af..f3913ed49b7 100644
--- a/storage/innobase/buf/buf0lru.c
+++ b/storage/innobase/buf/buf0lru.c
@@ -881,7 +881,7 @@ buf_LRU_block_free_non_file_page(
UT_LIST_ADD_FIRST(free, buf_pool->free, block);
block->in_free_list = TRUE;
- UNIV_MEM_FREE(block->frame, UNIV_PAGE_SIZE);
+ UNIV_MEM_ASSERT_AND_FREE(block->frame, UNIV_PAGE_SIZE);
if (srv_use_awe && block->frame) {
/* Add to the list of mapped pages */
diff --git a/storage/innobase/dict/dict0dict.c b/storage/innobase/dict/dict0dict.c
index 595dfb06ee5..8aba5ac1c85 100644
--- a/storage/innobase/dict/dict0dict.c
+++ b/storage/innobase/dict/dict0dict.c
@@ -84,16 +84,6 @@ innobase_convert_from_id(
ulint len); /* in: length of 'to', in bytes;
should be at least 3 * strlen(to) + 1 */
/**********************************************************************
-Removes the filename encoding of a table or database name.
-
-NOTE: the prototype of this function is copied from ha_innodb.cc! If you change
-this function, you MUST change also the prototype here! */
-extern
-void
-innobase_convert_from_filename(
-/*===========================*/
- char* s); /* in: identifier; out: decoded identifier */
-/**********************************************************************
Compares NUL-terminated UTF-8 strings case insensitively.
NOTE: the prototype of this function is copied from ha_innodb.cc! If you change
@@ -441,6 +431,8 @@ dict_table_autoinc_initialize(
dict_table_t* table, /* in: table */
ib_longlong value) /* in: next value to assign to a row */
{
+ ut_ad(mutex_own(&table->autoinc_mutex));
+
table->autoinc_inited = TRUE;
table->autoinc = value;
}
@@ -457,6 +449,8 @@ dict_table_autoinc_read(
{
ib_longlong value;
+ ut_ad(mutex_own(&table->autoinc_mutex));
+
if (!table->autoinc_inited) {
value = 0;
diff --git a/storage/innobase/dict/dict0load.c b/storage/innobase/dict/dict0load.c
index 1ff1fd54cec..f594e64f517 100644
--- a/storage/innobase/dict/dict0load.c
+++ b/storage/innobase/dict/dict0load.c
@@ -551,11 +551,13 @@ dict_load_fields(
Loads definitions for table indexes. Adds them to the data dictionary
cache. */
static
-ibool
+ulint
dict_load_indexes(
/*==============*/
- /* out: TRUE if ok, FALSE if corruption
- of dictionary table */
+ /* out: DB_SUCCESS if ok, DB_CORRUPTION
+ if corruption of dictionary table or
+ DB_UNSUPPORTED if table has unknown index
+ type */
dict_table_t* table, /* in: table */
mem_heap_t* heap) /* in: memory heap for temporary storage */
{
@@ -578,6 +580,7 @@ dict_load_indexes(
ibool is_sys_table;
dulint id;
mtr_t mtr;
+ ulint error = DB_SUCCESS;
ut_ad(mutex_own(&(dict_sys->mutex)));
@@ -624,10 +627,8 @@ dict_load_indexes(
dict_load_report_deleted_index(table->name,
ULINT_UNDEFINED);
- btr_pcur_close(&pcur);
- mtr_commit(&mtr);
-
- return(FALSE);
+ error = DB_CORRUPTION;
+ goto func_exit;
}
field = rec_get_nth_field_old(rec, 1, &len);
@@ -653,7 +654,18 @@ dict_load_indexes(
field = rec_get_nth_field_old(rec, 8, &len);
page_no = mach_read_from_4(field);
- if (page_no == FIL_NULL) {
+ /* We check for unsupported types first, so that the
+ subsequent checks are relevant for the supported types. */
+ if (type & ~(DICT_CLUSTERED | DICT_UNIQUE)) {
+
+ fprintf(stderr,
+ "InnoDB: Error: unknown type %lu"
+ " of index %s of table %s\n",
+ (ulong) type, name_buf, table->name);
+
+ error = DB_UNSUPPORTED;
+ goto func_exit;
+ } else if (page_no == FIL_NULL) {
fprintf(stderr,
"InnoDB: Error: trying to load index %s"
@@ -661,14 +673,10 @@ dict_load_indexes(
"InnoDB: but the index tree has been freed!\n",
name_buf, table->name);
- btr_pcur_close(&pcur);
- mtr_commit(&mtr);
-
- return(FALSE);
- }
-
- if ((type & DICT_CLUSTERED) == 0
- && NULL == dict_table_get_first_index(table)) {
+ error = DB_CORRUPTION;
+ goto func_exit;
+ } else if ((type & DICT_CLUSTERED) == 0
+ && NULL == dict_table_get_first_index(table)) {
fprintf(stderr,
"InnoDB: Error: trying to load index %s"
@@ -677,18 +685,14 @@ dict_load_indexes(
" is not clustered!\n",
name_buf, table->name);
- btr_pcur_close(&pcur);
- mtr_commit(&mtr);
-
- return(FALSE);
- }
-
- if (is_sys_table
- && ((type & DICT_CLUSTERED)
- || ((table == dict_sys->sys_tables)
- && (name_len == (sizeof "ID_IND") - 1)
- && (0 == ut_memcmp(name_buf, "ID_IND",
- name_len))))) {
+ error = DB_CORRUPTION;
+ goto func_exit;
+ } else if (is_sys_table
+ && ((type & DICT_CLUSTERED)
+ || ((table == dict_sys->sys_tables)
+ && (name_len == (sizeof "ID_IND") - 1)
+ && (0 == ut_memcmp(name_buf,
+ "ID_IND", name_len))))) {
/* The index was created in memory already at booting
of the database server */
@@ -704,10 +708,11 @@ dict_load_indexes(
btr_pcur_move_to_next_user_rec(&pcur, &mtr);
}
+func_exit:
btr_pcur_close(&pcur);
mtr_commit(&mtr);
- return(TRUE);
+ return(error);
}
/************************************************************************
@@ -857,11 +862,20 @@ err_exit:
mem_heap_empty(heap);
- dict_load_indexes(table, heap);
-
- err = dict_load_foreigns(table->name, TRUE);
+ err = dict_load_indexes(table, heap);
+
+ /* If the force recovery flag is set, we open the table irrespective
+ of the error condition, since the user may want to dump data from the
+ clustered index. However we load the foreign key information only if
+ all indexes were loaded. */
+ if (err != DB_SUCCESS && !srv_force_recovery) {
+ dict_mem_table_free(table);
+ table = NULL;
+ } else if (err == DB_SUCCESS) {
+ err = dict_load_foreigns(table->name, TRUE);
+ }
#if 0
- if (err != DB_SUCCESS) {
+ if (err != DB_SUCCESS && table != NULL) {
mutex_enter(&dict_foreign_err_mutex);
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index 783553f5d87..205cfc91e52 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -129,6 +129,7 @@ static my_bool innobase_locks_unsafe_for_binlog = FALSE;
static my_bool innobase_rollback_on_timeout = FALSE;
static my_bool innobase_create_status_file = FALSE;
static my_bool innobase_stats_on_metadata = TRUE;
+static my_bool innobase_use_adaptive_hash_indexes = TRUE;
static char* internal_innobase_data_file_path = NULL;
@@ -678,6 +679,9 @@ convert_error_code_to_mysql(
return(HA_ERR_RECORD_FILE_FULL);
#endif
+ } else if (error == DB_UNSUPPORTED) {
+
+ return(HA_ERR_UNSUPPORTED);
} else {
return(-1); // Unknown error
}
@@ -801,23 +805,6 @@ innobase_convert_from_id(
}
/**********************************************************************
-Removes the filename encoding of a table or database name.
-
-NOTE that the exact prototype of this function has to be in
-/innobase/dict/dict0dict.c! */
-extern "C"
-void
-innobase_convert_from_filename(
-/*===========================*/
- char* s) /* in: identifier; out: decoded identifier */
-{
- uint errors;
-
- strconvert(&my_charset_filename, s,
- system_charset_info, s, strlen(s), &errors);
-}
-
-/**********************************************************************
Compares NUL-terminated UTF-8 strings case insensitively.
NOTE that the exact prototype of this function has to be in
@@ -1143,7 +1130,6 @@ innobase_query_caching_of_table_permitted(
}
if (trx->has_search_latch) {
- ut_print_timestamp(stderr);
sql_print_error("The calling thread is holding the adaptive "
"search, latch though calling "
"innobase_query_caching_of_table_permitted.");
@@ -1246,8 +1232,7 @@ innobase_invalidate_query_cache(
}
/*********************************************************************
-Display an SQL identifier.
-This definition must match the one in innobase/ut/ut0ut.c! */
+Display an SQL identifier. */
extern "C"
void
innobase_print_identifier(
@@ -1635,6 +1620,9 @@ innobase_init(
srv_stats_on_metadata = (ibool) innobase_stats_on_metadata;
+ srv_use_adaptive_hash_indexes =
+ (ibool) innobase_use_adaptive_hash_indexes;
+
srv_print_verbose_log = mysqld_embedded ? 0 : 1;
/* Store the default charset-collation number of this MySQL
@@ -2319,14 +2307,18 @@ ha_innobase::open(
ib_table = dict_table_get(norm_name, TRUE);
if (NULL == ib_table) {
- ut_print_timestamp(stderr);
- sql_print_error("Cannot find table %s from the internal data "
- "dictionary\nof InnoDB though the .frm file "
- "for the table exists. Maybe you\nhave "
- "deleted and recreated InnoDB data files but "
- "have forgotten\nto delete the corresponding "
- ".frm files of InnoDB tables, or you\n"
- "have moved .frm files to another database?\n"
+ sql_print_error("Cannot find or open table %s from\n"
+ "the internal data dictionary of InnoDB "
+ "though the .frm file for the\n"
+ "table exists. Maybe you have deleted and "
+ "recreated InnoDB data\n"
+ "files but have forgotten to delete the "
+ "corresponding .frm files\n"
+ "of InnoDB tables, or you have moved .frm "
+ "files to another database?\n"
+ "or, the table contains indexes that this "
+ "version of the engine\n"
+ "doesn't support.\n"
"See http://dev.mysql.com/doc/refman/5.1/en/innodb-troubleshooting.html\n"
"how you can resolve the problem.\n",
norm_name);
@@ -2338,7 +2330,6 @@ ha_innobase::open(
}
if (ib_table->ibd_file_missing && !thd_tablespace_op(thd)) {
- ut_print_timestamp(stderr);
sql_print_error("MySQL is trying to open a table handle but "
"the .ibd file for\ntable %s does not exist.\n"
"Have you deleted the .ibd file from the "
@@ -3412,7 +3403,7 @@ no_commit:
/*
ut_print_timestamp(stderr);
fprintf(stderr,
- " InnoDB error: ALTER TABLE is holding lock"
+ " InnoDB: ALTER TABLE is holding lock"
" on %lu tables!\n",
prebuilt->trx->mysql_n_tables_locked);
*/
@@ -3476,6 +3467,7 @@ no_commit:
/* Handle duplicate key errors */
if (auto_inc_used) {
+ ulint err;
ulonglong auto_inc;
/* Note the number of rows processed for this statement, used
@@ -3529,7 +3521,11 @@ set_max_autoinc:
ut_a(prebuilt->table->autoinc_increment > 0);
auto_inc += prebuilt->table->autoinc_increment;
- innobase_set_max_autoinc(auto_inc);
+ err = innobase_set_max_autoinc(auto_inc);
+
+ if (err != DB_SUCCESS) {
+ error = (int) err;
+ }
}
break;
}
@@ -3765,7 +3761,7 @@ ha_innobase::update_row(
if (auto_inc != 0) {
auto_inc += prebuilt->table->autoinc_increment;
- innobase_set_max_autoinc(auto_inc);
+ error = innobase_set_max_autoinc(auto_inc);
}
}
@@ -3952,33 +3948,51 @@ convert_search_mode_to_innobase(
enum ha_rkey_function find_flag)
{
switch (find_flag) {
- case HA_READ_KEY_EXACT: return(PAGE_CUR_GE);
- /* the above does not require the index to be UNIQUE */
- case HA_READ_KEY_OR_NEXT: return(PAGE_CUR_GE);
- case HA_READ_KEY_OR_PREV: return(PAGE_CUR_LE);
- case HA_READ_AFTER_KEY: return(PAGE_CUR_G);
- case HA_READ_BEFORE_KEY: return(PAGE_CUR_L);
- case HA_READ_PREFIX: return(PAGE_CUR_GE);
- case HA_READ_PREFIX_LAST: return(PAGE_CUR_LE);
- case HA_READ_PREFIX_LAST_OR_PREV:return(PAGE_CUR_LE);
- /* In MySQL-4.0 HA_READ_PREFIX and HA_READ_PREFIX_LAST always
- pass a complete-field prefix of a key value as the search
- tuple. I.e., it is not allowed that the last field would
- just contain n first bytes of the full field value.
- MySQL uses a 'padding' trick to convert LIKE 'abc%'
- type queries so that it can use as a search tuple
- a complete-field-prefix of a key value. Thus, the InnoDB
- search mode PAGE_CUR_LE_OR_EXTENDS is never used.
- TODO: when/if MySQL starts to use also partial-field
- prefixes, we have to deal with stripping of spaces
- and comparison of non-latin1 char type fields in
- innobase_mysql_cmp() to get PAGE_CUR_LE_OR_EXTENDS to
- work correctly. */
-
- default: assert(0);
- }
-
- return(0);
+ case HA_READ_KEY_EXACT:
+ /* this does not require the index to be UNIQUE */
+ return(PAGE_CUR_GE);
+ case HA_READ_KEY_OR_NEXT:
+ return(PAGE_CUR_GE);
+ case HA_READ_KEY_OR_PREV:
+ return(PAGE_CUR_LE);
+ case HA_READ_AFTER_KEY:
+ return(PAGE_CUR_G);
+ case HA_READ_BEFORE_KEY:
+ return(PAGE_CUR_L);
+ case HA_READ_PREFIX:
+ return(PAGE_CUR_GE);
+ case HA_READ_PREFIX_LAST:
+ return(PAGE_CUR_LE);
+ case HA_READ_PREFIX_LAST_OR_PREV:
+ return(PAGE_CUR_LE);
+ /* In MySQL-4.0 HA_READ_PREFIX and HA_READ_PREFIX_LAST always
+ pass a complete-field prefix of a key value as the search
+ tuple. I.e., it is not allowed that the last field would
+ just contain n first bytes of the full field value.
+ MySQL uses a 'padding' trick to convert LIKE 'abc%'
+ type queries so that it can use as a search tuple
+ a complete-field-prefix of a key value. Thus, the InnoDB
+ search mode PAGE_CUR_LE_OR_EXTENDS is never used.
+ TODO: when/if MySQL starts to use also partial-field
+ prefixes, we have to deal with stripping of spaces
+ and comparison of non-latin1 char type fields in
+ innobase_mysql_cmp() to get PAGE_CUR_LE_OR_EXTENDS to
+ work correctly. */
+ case HA_READ_MBR_CONTAIN:
+ case HA_READ_MBR_INTERSECT:
+ case HA_READ_MBR_WITHIN:
+ case HA_READ_MBR_DISJOINT:
+ case HA_READ_MBR_EQUAL:
+ my_error(ER_TABLE_CANT_HANDLE_SPKEYS, MYF(0));
+ return(PAGE_CUR_UNSUPP);
+ /* do not use "default:" in order to produce a gcc warning:
+ enumeration value '...' not handled in switch
+ (if -Wswitch or -Wall is used) */
+ }
+
+ my_error(ER_CHECK_NOT_IMPLEMENTED, MYF(0), "this functionality");
+
+ return(PAGE_CUR_UNSUPP);
}
/*
@@ -4106,11 +4120,18 @@ ha_innobase::index_read(
last_match_mode = (uint) match_mode;
- innodb_srv_conc_enter_innodb(prebuilt->trx);
+ if (mode != PAGE_CUR_UNSUPP) {
- ret = row_search_for_mysql((byte*) buf, mode, prebuilt, match_mode, 0);
+ innodb_srv_conc_enter_innodb(prebuilt->trx);
- innodb_srv_conc_exit_innodb(prebuilt->trx);
+ ret = row_search_for_mysql((byte*) buf, mode, prebuilt,
+ match_mode, 0);
+
+ innodb_srv_conc_exit_innodb(prebuilt->trx);
+ } else {
+
+ ret = DB_UNSUPPORTED;
+ }
if (ret == DB_SUCCESS) {
error = 0;
@@ -5460,8 +5481,16 @@ ha_innobase::records_in_range(
mode2 = convert_search_mode_to_innobase(max_key ? max_key->flag :
HA_READ_KEY_EXACT);
- n_rows = btr_estimate_n_rows_in_range(index, range_start,
- mode1, range_end, mode2);
+ if (mode1 != PAGE_CUR_UNSUPP && mode2 != PAGE_CUR_UNSUPP) {
+
+ n_rows = btr_estimate_n_rows_in_range(index, range_start,
+ mode1, range_end,
+ mode2);
+ } else {
+
+ n_rows = 0;
+ }
+
dtuple_free_for_mysql(heap1);
dtuple_free_for_mysql(heap2);
@@ -5710,7 +5739,6 @@ ha_innobase::info(
for (i = 0; i < table->s->keys; i++) {
if (index == NULL) {
- ut_print_timestamp(stderr);
sql_print_error("Table %s contains fewer "
"indexes inside InnoDB than "
"are defined in the MySQL "
@@ -5726,7 +5754,6 @@ ha_innobase::info(
for (j = 0; j < table->key_info[i].key_parts; j++) {
if (j + 1 > index->n_uniq) {
- ut_print_timestamp(stderr);
sql_print_error(
"Index %s of %s has %lu columns unique inside InnoDB, but MySQL is asking "
"statistics for %lu columns. Have you mixed up .frm files from different "
@@ -5791,7 +5818,6 @@ ha_innobase::info(
ret = innobase_read_and_init_auto_inc(&auto_inc);
if (ret != 0) {
- ut_print_timestamp(stderr);
sql_print_error("Cannot get table %s auto-inc"
"counter value in ::info\n",
ib_table->name);
@@ -6304,6 +6330,9 @@ ha_innobase::start_stmt(
innobase_release_stat_resources(trx);
+ /* Reset the AUTOINC statement level counter for multi-row INSERTs. */
+ trx->n_autoinc_rows = 0;
+
prebuilt->sql_stat_start = TRUE;
prebuilt->hint_need_to_fetch_extra_cols = 0;
reset_template(prebuilt);
@@ -6446,9 +6475,6 @@ ha_innobase::external_lock(
innobase_register_stmt(ht, thd);
}
- trx->n_mysql_tables_in_use++;
- prebuilt->mysql_has_locked = TRUE;
-
if (trx->isolation_level == TRX_ISO_SERIALIZABLE
&& prebuilt->select_lock_type == LOCK_NONE
&& thd_test_options(thd,
@@ -6497,6 +6523,9 @@ ha_innobase::external_lock(
trx->mysql_n_tables_locked++;
}
+ trx->n_mysql_tables_in_use++;
+ prebuilt->mysql_has_locked = TRUE;
+
DBUG_RETURN(0);
}
@@ -6562,14 +6591,17 @@ ha_innobase::transactional_table_lock(
if (prebuilt->table->ibd_file_missing && !thd_tablespace_op(thd)) {
ut_print_timestamp(stderr);
- fprintf(stderr, " InnoDB error:\n"
-"MySQL is trying to use a table handle but the .ibd file for\n"
-"table %s does not exist.\n"
-"Have you deleted the .ibd file from the database directory under\n"
-"the MySQL datadir?"
-"See http://dev.mysql.com/doc/refman/5.1/en/innodb-troubleshooting.html\n"
-"how you can resolve the problem.\n",
- prebuilt->table->name);
+ fprintf(stderr,
+ " InnoDB: MySQL is trying to use a table handle"
+ " but the .ibd file for\n"
+ "InnoDB: table %s does not exist.\n"
+ "InnoDB: Have you deleted the .ibd file"
+ " from the database directory under\n"
+ "InnoDB: the MySQL datadir?"
+ "InnoDB: See"
+ " http://dev.mysql.com/doc/refman/5.1/en/innodb-troubleshooting.html\n"
+ "InnoDB: how you can resolve the problem.\n",
+ prebuilt->table->name);
DBUG_RETURN(HA_ERR_CRASHED);
}
@@ -7120,8 +7152,8 @@ the value of the auto-inc counter. */
int
ha_innobase::innobase_read_and_init_auto_inc(
/*=========================================*/
- /* out: 0 or error code:
- deadlock or lock wait timeout */
+ /* out: 0 or generic MySQL
+ error code */
longlong* value) /* out: the autoinc value */
{
longlong auto_inc;
@@ -7178,9 +7210,10 @@ ha_innobase::innobase_read_and_init_auto_inc(
++auto_inc;
dict_table_autoinc_initialize(innodb_table, auto_inc);
} else {
- fprintf(stderr, " InnoDB error: Couldn't read the "
- "max AUTOINC value from index (%s).\n",
- index->name);
+ ut_print_timestamp(stderr);
+ fprintf(stderr, " InnoDB: Error: (%lu) Couldn't read "
+ "the max AUTOINC value from the index (%s).\n",
+ error, index->name);
mysql_error = 1;
}
@@ -7217,6 +7250,11 @@ ha_innobase::innobase_get_auto_increment(
{
ulong error;
+ *value = 0;
+
+ /* Note: If the table is not initialized when we attempt the
+ read below. We initialize the table's auto-inc counter and
+ always do a reread of the AUTOINC value. */
do {
error = innobase_autoinc_lock();
@@ -7256,7 +7294,15 @@ ha_innobase::innobase_get_auto_increment(
} else {
*value = (ulonglong) autoinc;
}
+ /* A deadlock error during normal processing is OK
+ and can be ignored. */
+ } else if (error != DB_DEADLOCK) {
+
+ sql_print_error("InnoDB: Error: %lu in "
+ "::innobase_get_auto_increment()",
+ error);
}
+
} while (*value == 0 && error == DB_SUCCESS);
return(error);
@@ -7272,7 +7318,7 @@ we have a table-level lock). offset, increment, nb_desired_values are ignored.
void
ha_innobase::get_auto_increment(
-/*=================================*/
+/*============================*/
ulonglong offset, /* in: */
ulonglong increment, /* in: table autoinc increment */
ulonglong nb_desired_values, /* in: number of values reqd */
@@ -7289,13 +7335,6 @@ ha_innobase::get_auto_increment(
error = innobase_get_auto_increment(&autoinc);
if (error != DB_SUCCESS) {
- /* This should never happen in the code > ver 5.0.6,
- since we call this function only after the counter
- has been initialized. */
-
- ut_print_timestamp(stderr);
- sql_print_error("Error %lu in ::get_auto_increment()", error);
-
*first_value = (~(ulonglong) 0);
return;
}
@@ -7310,6 +7349,11 @@ ha_innobase::get_auto_increment(
trx = prebuilt->trx;
+ /* Note: We can't rely on *first_value since some MySQL engines,
+ in particular the partition engine, don't initialize it to 0 when
+ invoking this method. So we are not sure if it's guaranteed to
+ be 0 or not. */
+
/* Called for the first time ? */
if (trx->n_autoinc_rows == 0) {
@@ -7318,16 +7362,16 @@ ha_innobase::get_auto_increment(
/* It's possible for nb_desired_values to be 0:
e.g., INSERT INTO T1(C) SELECT C FROM T2; */
if (nb_desired_values == 0) {
-
+
trx->n_autoinc_rows = 1;
}
-
+
set_if_bigger(*first_value, autoinc);
/* Not in the middle of a mult-row INSERT. */
} else if (prebuilt->last_value == 0) {
set_if_bigger(*first_value, autoinc);
}
-
+
*nb_reserved_values = trx->n_autoinc_rows;
/* With old style AUTOINC locking we only update the table's
@@ -7359,7 +7403,9 @@ ha_innobase::get_auto_increment(
/* See comment in handler.h */
int
-ha_innobase::reset_auto_increment(ulonglong value)
+ha_innobase::reset_auto_increment(
+/*==============================*/
+ ulonglong value) /* in: new value for table autoinc */
{
DBUG_ENTER("ha_innobase::reset_auto_increment");
@@ -7923,6 +7969,11 @@ static MYSQL_SYSVAR_BOOL(stats_on_metadata, innobase_stats_on_metadata,
"Enable statistics gathering for metadata commands such as SHOW TABLE STATUS (on by default)",
NULL, NULL, TRUE);
+static MYSQL_SYSVAR_BOOL(use_adaptive_hash_indexes, innobase_use_adaptive_hash_indexes,
+ PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_READONLY,
+ "Enable the InnoDB adaptive hash indexes (enabled by default)",
+ NULL, NULL, TRUE);
+
static MYSQL_SYSVAR_LONG(additional_mem_pool_size, innobase_additional_mem_pool_size,
PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
"Size of a memory pool InnoDB uses to store data dictionary information and other internal data structures.",
@@ -8051,6 +8102,7 @@ static struct st_mysql_sys_var* innobase_system_variables[]= {
MYSQL_SYSVAR(open_files),
MYSQL_SYSVAR(rollback_on_timeout),
MYSQL_SYSVAR(stats_on_metadata),
+ MYSQL_SYSVAR(use_adaptive_hash_indexes),
MYSQL_SYSVAR(status_file),
MYSQL_SYSVAR(support_xa),
MYSQL_SYSVAR(sync_spin_loops),
diff --git a/storage/innobase/handler/ha_innodb.h b/storage/innobase/handler/ha_innodb.h
index fe5ebd57990..773884b6584 100644
--- a/storage/innobase/handler/ha_innodb.h
+++ b/storage/innobase/handler/ha_innodb.h
@@ -250,17 +250,3 @@ int thd_binlog_format(const MYSQL_THD thd);
*/
void thd_mark_transaction_to_rollback(MYSQL_THD thd, bool all);
}
-
-/*
- don't delete it - it may be re-enabled later
- as an optimization for the most common case InnoDB+binlog
-*/
-#if 0
-int innobase_report_binlog_offset_and_commit(
- THD* thd,
- void* trx_handle,
- char* log_file_name,
- my_off_t end_offset);
-int innobase_commit_complete(void* trx_handle);
-void innobase_store_binlog_offset_and_flush_log(char *binlog_name,longlong offset);
-#endif
diff --git a/storage/innobase/ibuf/ibuf0ibuf.c b/storage/innobase/ibuf/ibuf0ibuf.c
index 44972356304..126fd9fdd33 100644
--- a/storage/innobase/ibuf/ibuf0ibuf.c
+++ b/storage/innobase/ibuf/ibuf0ibuf.c
@@ -2900,7 +2900,7 @@ dump:
ut_print_timestamp(stderr);
fprintf(stderr,
- "InnoDB: Error: Insert buffer insert"
+ " InnoDB: Error: Insert buffer insert"
" fails; page free %lu,"
" dtuple size %lu\n",
(ulong) page_get_max_insert_size(
@@ -2925,7 +2925,7 @@ dump:
buf_frame_get_page_no(page),
IBUF_BITMAP_FREE, mtr);
- fprintf(stderr, "Bitmap bits %lu\n",
+ fprintf(stderr, "InnoDB: Bitmap bits %lu\n",
(ulong) old_bits);
fputs("InnoDB: Submit a detailed bug report"
diff --git a/storage/innobase/include/db0err.h b/storage/innobase/include/db0err.h
index 0aa1b87e470..ed7ce151718 100644
--- a/storage/innobase/include/db0err.h
+++ b/storage/innobase/include/db0err.h
@@ -61,12 +61,14 @@ Created 5/24/1996 Heikki Tuuri
activated by the operation would
lead to a duplicate key in some
table */
-
#define DB_TOO_MANY_CONCURRENT_TRXS 47 /* when InnoDB runs out of the
preconfigured undo slots, this can
only happen when there are too many
concurrent transactions */
-
+#define DB_UNSUPPORTED 48 /* when InnoDB sees any artefact or
+ a feature that it can't recoginize or
+ work with e.g., FT indexes created by
+ a later version of the engine. */
/* The following are partial failure codes */
#define DB_FAIL 1000
#define DB_OVERFLOW 1001
diff --git a/storage/innobase/include/ha_prototypes.h b/storage/innobase/include/ha_prototypes.h
index 7fb50988941..ef0722321af 100644
--- a/storage/innobase/include/ha_prototypes.h
+++ b/storage/innobase/include/ha_prototypes.h
@@ -1,6 +1,8 @@
#ifndef HA_INNODB_PROTOTYPES_H
#define HA_INNODB_PROTOTYPES_H
+#ifndef UNIV_HOTBACKUP
+
#include "univ.i" /* ulint, uint */
#include "m_ctype.h" /* CHARSET_INFO */
@@ -22,6 +24,19 @@ innobase_convert_string(
CHARSET_INFO* from_cs,
uint* errors);
+/*********************************************************************
+Display an SQL identifier. */
+
+void
+innobase_print_identifier(
+/*======================*/
+ FILE* f, /* in: output stream */
+ trx_t* trx, /* in: transaction */
+ ibool table_id,/* in: TRUE=print a table name,
+ FALSE=print other identifier */
+ const char* name, /* in: name to print */
+ ulint namelen);/* in: length of name */
+
/**********************************************************************
Returns true if the thread is the replication thread on the slave
server. Used in srv_conc_enter_innodb() to determine if the thread
@@ -49,3 +64,4 @@ thd_has_edited_nontrans_tables(
void* thd); /* in: thread handle (THD*) */
#endif
+#endif
diff --git a/storage/innobase/include/mach0data.h b/storage/innobase/include/mach0data.h
index 8377114a723..37d862cc678 100644
--- a/storage/innobase/include/mach0data.h
+++ b/storage/innobase/include/mach0data.h
@@ -327,6 +327,17 @@ mach_write_to_2_little_endian(
byte* dest, /* in: where to write */
ulint n); /* in: unsigned long int to write */
+/*************************************************************
+Convert integral type from storage byte order (big endian) to
+host byte order. */
+UNIV_INLINE
+void
+mach_read_int_type(
+/*===============*/
+ byte* dest, /* out: where to write */
+ const byte* src, /* in: where to read from */
+ ulint len, /* in: length of src */
+ ibool unsigned_type); /* in: signed or unsigned flag */
#ifndef UNIV_NONINL
#include "mach0data.ic"
#endif
diff --git a/storage/innobase/include/mach0data.ic b/storage/innobase/include/mach0data.ic
index 03ece7529a8..64fb87f56ed 100644
--- a/storage/innobase/include/mach0data.ic
+++ b/storage/innobase/include/mach0data.ic
@@ -7,6 +7,8 @@ to the machine format.
Created 11/28/1995 Heikki Tuuri
***********************************************************************/
+#include "ut0mem.h"
+
/***********************************************************
The following function is used to store data in one byte. */
UNIV_INLINE
@@ -689,3 +691,38 @@ mach_write_to_2_little_endian(
*dest = (byte)(n & 0xFFUL);
}
+
+/*************************************************************
+Convert integral type from storage byte order (big endian) to
+host byte order. */
+UNIV_INLINE
+void
+mach_read_int_type(
+/*===============*/
+ byte* dest, /* out: where to write */
+ const byte* src, /* in: where to read from */
+ ulint len, /* in: length of src */
+ ibool unsigned_type) /* in: signed or unsigned flag */
+{
+#ifdef WORDS_BIGENDIAN
+ memcpy(dest, src, len);
+
+ if (!unsigned_type) {
+ dest[0] ^= 128;
+ }
+#else
+ byte* ptr;
+
+ /* Convert integer data from Innobase to a little-endian format,
+ sign bit restored to normal. */
+
+ for (ptr = dest + len; ptr != dest; ++src) {
+ --ptr;
+ *ptr = *src;
+ }
+
+ if (!unsigned_type) {
+ dest[len - 1] ^= 128;
+ }
+#endif
+}
diff --git a/storage/innobase/include/mem0dbg.h b/storage/innobase/include/mem0dbg.h
index 36cd7a89565..2393e4edb54 100644
--- a/storage/innobase/include/mem0dbg.h
+++ b/storage/innobase/include/mem0dbg.h
@@ -60,6 +60,14 @@ mem_heap_validate_or_print(
ulint* n_blocks); /* out: number of blocks in the heap,
if a NULL pointer is passed as this
argument, it is ignored */
+/******************************************************************
+Validates the contents of a memory heap. */
+
+ibool
+mem_heap_validate(
+/*==============*/
+ /* out: TRUE if ok */
+ mem_heap_t* heap); /* in: memory heap */
#endif /* UNIV_MEM_DEBUG || UNIV_DEBUG */
#ifdef UNIV_DEBUG
/******************************************************************
@@ -71,14 +79,6 @@ mem_heap_check(
/* out: TRUE if ok */
mem_heap_t* heap); /* in: memory heap */
#endif /* UNIV_DEBUG */
-/******************************************************************
-Validates the contents of a memory heap. */
-
-ibool
-mem_heap_validate(
-/*==============*/
- /* out: TRUE if ok */
- mem_heap_t* heap); /* in: memory heap */
#ifdef UNIV_MEM_DEBUG
/*********************************************************************
TRUE if no memory is currently allocated. */
diff --git a/storage/innobase/include/mem0mem.ic b/storage/innobase/include/mem0mem.ic
index adae9ad8a33..6227a27f277 100644
--- a/storage/innobase/include/mem0mem.ic
+++ b/storage/innobase/include/mem0mem.ic
@@ -271,19 +271,16 @@ mem_heap_free_heap_top(
ut_ad(mem_block_get_start(block) <= mem_block_get_free(block));
/* In the debug version erase block from top up */
- {
- ulint len = (byte*)block + block->len - old_top;
- mem_erase_buf(old_top, len);
- UNIV_MEM_FREE(old_top, len);
- }
+ mem_erase_buf(old_top, (byte*)block + block->len - old_top);
/* Update allocated memory count */
mutex_enter(&mem_hash_mutex);
mem_current_allocated_memory -= (total_size - size);
mutex_exit(&mem_hash_mutex);
#else /* UNIV_MEM_DEBUG */
- UNIV_MEM_FREE(old_top, (byte*)block + block->len - old_top);
+ UNIV_MEM_ASSERT_W(old_top, (byte*)block + block->len - old_top);
#endif /* UNIV_MEM_DEBUG */
+ UNIV_MEM_ALLOC(old_top, (byte*)block + block->len - old_top);
/* If free == start, we may free the block if it is not the first
one */
@@ -363,6 +360,7 @@ mem_heap_free_top(
/* Subtract the free field of block */
mem_block_set_free(block, mem_block_get_free(block)
- MEM_SPACE_NEEDED(n));
+ UNIV_MEM_ASSERT_W((byte*) block + mem_block_get_free(block), n);
#ifdef UNIV_MEM_DEBUG
ut_ad(mem_block_get_start(block) <= mem_block_get_free(block));
@@ -378,7 +376,11 @@ mem_heap_free_top(
== mem_block_get_start(block))) {
mem_heap_block_free(heap, block);
} else {
- UNIV_MEM_FREE((byte*) block + mem_block_get_free(block), n);
+ /* Avoid a bogus UNIV_MEM_ASSERT_W() warning in a
+ subsequent invocation of mem_heap_free_top().
+ Originally, this was UNIV_MEM_FREE(), to catch writes
+ to freed memory. */
+ UNIV_MEM_ALLOC((byte*) block + mem_block_get_free(block), n);
}
}
diff --git a/storage/innobase/include/page0cur.h b/storage/innobase/include/page0cur.h
index 36370201d9b..04f731414a3 100644
--- a/storage/innobase/include/page0cur.h
+++ b/storage/innobase/include/page0cur.h
@@ -22,6 +22,7 @@ Created 10/4/1994 Heikki Tuuri
/* Page cursor search modes; the values must be in this order! */
+#define PAGE_CUR_UNSUPP 0
#define PAGE_CUR_G 1
#define PAGE_CUR_GE 2
#define PAGE_CUR_L 3
diff --git a/storage/innobase/include/rem0rec.ic b/storage/innobase/include/rem0rec.ic
index 95aa65fabba..5a4a0a0b5df 100644
--- a/storage/innobase/include/rem0rec.ic
+++ b/storage/innobase/include/rem0rec.ic
@@ -801,6 +801,7 @@ rec_offs_set_n_alloc(
{
ut_ad(offsets);
ut_ad(n_alloc > 0);
+ UNIV_MEM_ASSERT_AND_ALLOC(offsets, n_alloc * sizeof *offsets);
offsets[0] = n_alloc;
}
diff --git a/storage/innobase/include/row0mysql.h b/storage/innobase/include/row0mysql.h
index aabb7f5f047..fd7ec8918ee 100644
--- a/storage/innobase/include/row0mysql.h
+++ b/storage/innobase/include/row0mysql.h
@@ -319,9 +319,11 @@ row_mysql_unfreeze_data_dictionary(
/*===============================*/
trx_t* trx); /* in: transaction */
/*************************************************************************
-Does a table creation operation for MySQL. If the name of the created
-table ends to characters INNODB_MONITOR, then this also starts
-printing of monitor output by the master thread. */
+Drops a table for MySQL. If the name of the table ends in
+one of "innodb_monitor", "innodb_lock_monitor", "innodb_tablespace_monitor",
+"innodb_table_monitor", then this will also start the printing of monitor
+output by the master thread. If the table name ends in "innodb_mem_validate",
+InnoDB will try to invoke mem_validate(). */
int
row_create_table_for_mysql(
@@ -399,8 +401,9 @@ row_truncate_table_for_mysql(
dict_table_t* table, /* in: table handle */
trx_t* trx); /* in: transaction handle */
/*************************************************************************
-Drops a table for MySQL. If the name of the dropped table ends to
-characters INNODB_MONITOR, then this also stops printing of monitor
+Drops a table for MySQL. If the name of the dropped table ends in
+one of "innodb_monitor", "innodb_lock_monitor", "innodb_tablespace_monitor",
+"innodb_table_monitor", then this will also stop the printing of monitor
output by the master thread. */
int
diff --git a/storage/innobase/include/sync0rw.h b/storage/innobase/include/sync0rw.h
index abf04253141..7d2f63803d0 100644
--- a/storage/innobase/include/sync0rw.h
+++ b/storage/innobase/include/sync0rw.h
@@ -101,6 +101,7 @@ void
rw_lock_free(
/*=========*/
rw_lock_t* lock); /* in: rw-lock */
+#ifdef UNIV_DEBUG
/**********************************************************************
Checks that the rw-lock has been initialized and that there are no
simultaneous shared and exclusive locks. */
@@ -109,6 +110,7 @@ ibool
rw_lock_validate(
/*=============*/
rw_lock_t* lock);
+#endif /* UNIV_DEBUG */
/******************************************************************
NOTE! The following macros should be used in rw s-locking, not the
corresponding function. */
diff --git a/storage/innobase/include/univ.i b/storage/innobase/include/univ.i
index ba8e6e56219..8163ae16e4e 100644
--- a/storage/innobase/include/univ.i
+++ b/storage/innobase/include/univ.i
@@ -308,11 +308,39 @@ typedef void* os_thread_ret_t;
# define UNIV_MEM_INVALID(addr, size) VALGRIND_MAKE_MEM_UNDEFINED(addr, size)
# define UNIV_MEM_FREE(addr, size) VALGRIND_MAKE_MEM_NOACCESS(addr, size)
# define UNIV_MEM_ALLOC(addr, size) VALGRIND_MAKE_MEM_UNDEFINED(addr, size)
+# define UNIV_MEM_ASSERT_RW(addr, size) do { \
+ const void* _p = (const void*) (ulint) \
+ VALGRIND_CHECK_MEM_IS_DEFINED(addr, size); \
+ if (UNIV_LIKELY_NULL(_p)) \
+ fprintf(stderr, "%s:%d: %p[%u] undefined at %ld\n", \
+ __FILE__, __LINE__, \
+ (const void*) (addr), (unsigned) (size), (long) \
+ (((const char*) _p) - ((const char*) (addr)))); \
+ } while (0)
+# define UNIV_MEM_ASSERT_W(addr, size) do { \
+ const void* _p = (const void*) (ulint) \
+ VALGRIND_CHECK_MEM_IS_ADDRESSABLE(addr, size); \
+ if (UNIV_LIKELY_NULL(_p)) \
+ fprintf(stderr, "%s:%d: %p[%u] unwritable at %ld\n", \
+ __FILE__, __LINE__, \
+ (const void*) (addr), (unsigned) (size), (long) \
+ (((const char*) _p) - ((const char*) (addr)))); \
+ } while (0)
#else
# define UNIV_MEM_VALID(addr, size) do {} while(0)
# define UNIV_MEM_INVALID(addr, size) do {} while(0)
# define UNIV_MEM_FREE(addr, size) do {} while(0)
# define UNIV_MEM_ALLOC(addr, size) do {} while(0)
+# define UNIV_MEM_ASSERT_RW(addr, size) do {} while(0)
+# define UNIV_MEM_ASSERT_W(addr, size) do {} while(0)
#endif
+#define UNIV_MEM_ASSERT_AND_FREE(addr, size) do { \
+ UNIV_MEM_ASSERT_W(addr, size); \
+ UNIV_MEM_FREE(addr, size); \
+} while (0)
+#define UNIV_MEM_ASSERT_AND_ALLOC(addr, size) do { \
+ UNIV_MEM_ASSERT_W(addr, size); \
+ UNIV_MEM_ALLOC(addr, size); \
+} while (0)
#endif
diff --git a/storage/innobase/include/ut0ut.h b/storage/innobase/include/ut0ut.h
index 825c10d5f11..a60ce73c35a 100644
--- a/storage/innobase/include/ut0ut.h
+++ b/storage/innobase/include/ut0ut.h
@@ -263,6 +263,24 @@ ut_copy_file(
FILE* dest, /* in: output file */
FILE* src); /* in: input file to be appended to output */
+/**************************************************************************
+snprintf(). */
+
+#ifdef __WIN__
+int
+ut_snprintf(
+ /* out: number of characters that would
+ have been printed if the size were
+ unlimited, not including the terminating
+ '\0'. */
+ char* str, /* out: string */
+ size_t size, /* in: str size */
+ const char* fmt, /* in: format */
+ ...); /* in: format values */
+#else
+#define ut_snprintf snprintf
+#endif /* __WIN__ */
+
#ifndef UNIV_NONINL
#include "ut0ut.ic"
#endif
diff --git a/storage/innobase/mem/mem0dbg.c b/storage/innobase/mem/mem0dbg.c
index eb77dd01f6d..72452907c3f 100644
--- a/storage/innobase/mem/mem0dbg.c
+++ b/storage/innobase/mem/mem0dbg.c
@@ -223,6 +223,8 @@ mem_init_buf(
{
byte* ptr;
+ UNIV_MEM_ASSERT_W(buf, n);
+
for (ptr = buf; ptr < buf + n; ptr++) {
if (ut_rnd_gen_ibool()) {
@@ -231,6 +233,8 @@ mem_init_buf(
*ptr = 0xBE;
}
}
+
+ UNIV_MEM_INVALID(buf, n);
}
/*******************************************************************
@@ -245,6 +249,8 @@ mem_erase_buf(
{
byte* ptr;
+ UNIV_MEM_ASSERT_W(buf, n);
+
for (ptr = buf; ptr < buf + n; ptr++) {
if (ut_rnd_gen_ibool()) {
*ptr = 0xDE;
@@ -252,6 +258,8 @@ mem_erase_buf(
*ptr = 0xAD;
}
}
+
+ UNIV_MEM_FREE(buf, n);
}
/*******************************************************************
@@ -546,9 +554,7 @@ completed:
}
*error = FALSE;
}
-#endif /* UNIV_MEM_DEBUG || UNIV_DEBUG */
-#ifdef UNIV_DEBUG
/******************************************************************
Prints the contents of a memory heap. */
static
@@ -575,20 +581,6 @@ mem_heap_print(
}
/******************************************************************
-Checks that an object is a memory heap (or a block of it). */
-
-ibool
-mem_heap_check(
-/*===========*/
- /* out: TRUE if ok */
- mem_heap_t* heap) /* in: memory heap */
-{
- ut_a(heap->magic_n == MEM_BLOCK_MAGIC_N);
-
- return(TRUE);
-}
-
-/******************************************************************
Validates the contents of a memory heap. */
ibool
@@ -614,6 +606,22 @@ mem_heap_validate(
return(TRUE);
}
+#endif /* UNIV_MEM_DEBUG || UNIV_DEBUG */
+
+#ifdef UNIV_DEBUG
+/******************************************************************
+Checks that an object is a memory heap (or a block of it). */
+
+ibool
+mem_heap_check(
+/*===========*/
+ /* out: TRUE if ok */
+ mem_heap_t* heap) /* in: memory heap */
+{
+ ut_a(heap->magic_n == MEM_BLOCK_MAGIC_N);
+
+ return(TRUE);
+}
#endif /* UNIV_DEBUG */
#ifdef UNIV_MEM_DEBUG
diff --git a/storage/innobase/mem/mem0mem.c b/storage/innobase/mem/mem0mem.c
index d89a3a55d88..f4fd178a39c 100644
--- a/storage/innobase/mem/mem0mem.c
+++ b/storage/innobase/mem/mem0mem.c
@@ -512,9 +512,9 @@ mem_heap_block_free(
of hex 0xDE and 0xAD. */
mem_erase_buf((byte*)block, len);
-
-#endif
- UNIV_MEM_FREE(block, len);
+#else /* UNIV_MEM_DEBUG */
+ UNIV_MEM_ASSERT_AND_FREE(block, len);
+#endif /* UNIV_MEM_DEBUG */
if (init_block) {
/* Do not have to free: do nothing */
diff --git a/storage/innobase/row/row0mysql.c b/storage/innobase/row/row0mysql.c
index b8d201e3da2..b3cf20b78b8 100644
--- a/storage/innobase/row/row0mysql.c
+++ b/storage/innobase/row/row0mysql.c
@@ -1728,10 +1728,11 @@ row_mysql_unlock_data_dictionary(
}
/*************************************************************************
-Does a table creation operation for MySQL. If the name of the table
-to be created is equal with one of the predefined magic table names,
-then this also starts printing the corresponding monitor output by
-the master thread. */
+Drops a table for MySQL. If the name of the table ends in
+one of "innodb_monitor", "innodb_lock_monitor", "innodb_tablespace_monitor",
+"innodb_table_monitor", then this will also start the printing of monitor
+output by the master thread. If the table name ends in "innodb_mem_validate",
+InnoDB will try to invoke mem_validate(). */
int
row_create_table_for_mysql(
@@ -1756,13 +1757,11 @@ row_create_table_for_mysql(
ut_ad(trx->dict_operation_lock_mode == RW_X_LATCH);
if (srv_created_new_raw) {
- fputs("InnoDB: A new raw disk partition was initialized or\n"
- "InnoDB: innodb_force_recovery is on: we do not allow\n"
- "InnoDB: database modifications by the user. Shut down\n"
- "InnoDB: mysqld and edit my.cnf so that newraw"
- " is replaced\n"
- "InnoDB: with raw, and innodb_force_... is removed.\n",
- stderr);
+ fputs("InnoDB: A new raw disk partition was initialized:\n"
+ "InnoDB: we do not allow database modifications"
+ " by the user.\n"
+ "InnoDB: Shut down mysqld and edit my.cnf so that newraw"
+ " is replaced with raw.\n", stderr);
dict_mem_table_free(table);
trx_commit_for_mysql(trx);
@@ -2703,13 +2702,11 @@ row_truncate_table_for_mysql(
ut_ad(table);
if (srv_created_new_raw) {
- fputs("InnoDB: A new raw disk partition was initialized or\n"
- "InnoDB: innodb_force_recovery is on: we do not allow\n"
- "InnoDB: database modifications by the user. Shut down\n"
- "InnoDB: mysqld and edit my.cnf so that newraw"
- " is replaced\n"
- "InnoDB: with raw, and innodb_force_... is removed.\n",
- stderr);
+ fputs("InnoDB: A new raw disk partition was initialized:\n"
+ "InnoDB: we do not allow database modifications"
+ " by the user.\n"
+ "InnoDB: Shut down mysqld and edit my.cnf so that newraw"
+ " is replaced with raw.\n", stderr);
return(DB_ERROR);
}
@@ -2898,7 +2895,9 @@ next_rec:
/* MySQL calls ha_innobase::reset_auto_increment() which does
the same thing. */
+ dict_table_autoinc_lock(table);
dict_table_autoinc_initialize(table, 0);
+ dict_table_autoinc_unlock(table);
dict_update_statistics(table);
trx_commit_for_mysql(trx);
@@ -2916,9 +2915,10 @@ funct_exit:
#endif /* !UNIV_HOTBACKUP */
/*************************************************************************
-Drops a table for MySQL. If the name of the table to be dropped is equal
-with one of the predefined magic table names, then this also stops printing
-the corresponding monitor output by the master thread. */
+Drops a table for MySQL. If the name of the dropped table ends in
+one of "innodb_monitor", "innodb_lock_monitor", "innodb_tablespace_monitor",
+"innodb_table_monitor", then this will also stop the printing of monitor
+output by the master thread. */
int
row_drop_table_for_mysql(
@@ -2934,21 +2934,17 @@ row_drop_table_for_mysql(
ulint err;
const char* table_name;
ulint namelen;
- char* dir_path_of_temp_table = NULL;
- ibool success;
ibool locked_dictionary = FALSE;
pars_info_t* info = NULL;
ut_a(name != NULL);
if (srv_created_new_raw) {
- fputs("InnoDB: A new raw disk partition was initialized or\n"
- "InnoDB: innodb_force_recovery is on: we do not allow\n"
- "InnoDB: database modifications by the user. Shut down\n"
- "InnoDB: mysqld and edit my.cnf so that newraw"
- " is replaced\n"
- "InnoDB: with raw, and innodb_force_... is removed.\n",
- stderr);
+ fputs("InnoDB: A new raw disk partition was initialized:\n"
+ "InnoDB: we do not allow database modifications"
+ " by the user.\n"
+ "InnoDB: Shut down mysqld and edit my.cnf so that newraw"
+ " is replaced with raw.\n", stderr);
return(DB_ERROR);
}
@@ -3232,14 +3228,20 @@ check_next_foreign:
} else {
ibool is_path;
const char* name_or_path;
+ mem_heap_t* heap;
+ heap = mem_heap_create(200);
+
+ /* Clone the name, in case it has been allocated
+ from table->heap, which will be freed by
+ dict_table_remove_from_cache(table) below. */
+ name = mem_heap_strdup(heap, name);
space_id = table->space;
if (table->dir_path_of_temp_table != NULL) {
- dir_path_of_temp_table = mem_strdup(
- table->dir_path_of_temp_table);
is_path = TRUE;
- name_or_path = dir_path_of_temp_table;
+ name_or_path = mem_heap_strdup(
+ heap, table->dir_path_of_temp_table);
} else {
is_path = FALSE;
name_or_path = name;
@@ -3272,13 +3274,7 @@ check_next_foreign:
"InnoDB: of table ");
ut_print_name(stderr, trx, TRUE, name);
fprintf(stderr, ".\n");
-
- goto funct_exit;
- }
-
- success = fil_delete_tablespace(space_id);
-
- if (!success) {
+ } else if (!fil_delete_tablespace(space_id)) {
fprintf(stderr,
"InnoDB: We removed now the InnoDB"
" internal data dictionary entry\n"
@@ -3296,6 +3292,8 @@ check_next_foreign:
err = DB_ERROR;
}
}
+
+ mem_heap_free(heap);
}
funct_exit:
@@ -3305,10 +3303,6 @@ funct_exit:
row_mysql_unlock_data_dictionary(trx);
}
- if (dir_path_of_temp_table) {
- mem_free(dir_path_of_temp_table);
- }
-
trx->op_info = "";
#ifndef UNIV_HOTBACKUP
diff --git a/storage/innobase/row/row0sel.c b/storage/innobase/row/row0sel.c
index fdf6aa46351..29bded114e0 100644
--- a/storage/innobase/row/row0sel.c
+++ b/storage/innobase/row/row0sel.c
@@ -531,12 +531,13 @@ row_sel_build_prev_vers(
/*====================*/
/* out: DB_SUCCESS or error code */
read_view_t* read_view, /* in: read view */
- plan_t* plan, /* in: plan node for table */
+ dict_index_t* index, /* in: plan node for table */
rec_t* rec, /* in: record in a clustered index */
ulint** offsets, /* in/out: offsets returned by
rec_get_offsets(rec, plan->index) */
mem_heap_t** offset_heap, /* in/out: memory heap from which
the offsets are allocated */
+ mem_heap_t** old_vers_heap, /* out: old version heap to use */
rec_t** old_vers, /* out: old version, or NULL if the
record does not exist in the view:
i.e., it was freshly inserted
@@ -545,15 +546,15 @@ row_sel_build_prev_vers(
{
ulint err;
- if (plan->old_vers_heap) {
- mem_heap_empty(plan->old_vers_heap);
+ if (*old_vers_heap) {
+ mem_heap_empty(*old_vers_heap);
} else {
- plan->old_vers_heap = mem_heap_create(512);
+ *old_vers_heap = mem_heap_create(512);
}
err = row_vers_build_for_consistent_read(
- rec, mtr, plan->index, offsets, read_view, offset_heap,
- plan->old_vers_heap, old_vers);
+ rec, mtr, index, offsets, read_view, offset_heap,
+ *old_vers_heap, old_vers);
return(err);
}
@@ -765,9 +766,11 @@ row_sel_get_clust_rec(
if (!lock_clust_rec_cons_read_sees(clust_rec, index, offsets,
node->read_view)) {
- err = row_sel_build_prev_vers(node->read_view, plan,
- clust_rec, &offsets,
- &heap, &old_vers, mtr);
+ err = row_sel_build_prev_vers(
+ node->read_view, index, clust_rec,
+ &offsets, &heap, &plan->old_vers_heap,
+ &old_vers, mtr);
+
if (err != DB_SUCCESS) {
goto err_exit;
@@ -1490,10 +1493,11 @@ skip_lock:
if (!lock_clust_rec_cons_read_sees(rec, index, offsets,
node->read_view)) {
- err = row_sel_build_prev_vers(node->read_view,
- plan, rec,
- &offsets, &heap,
- &old_vers, &mtr);
+ err = row_sel_build_prev_vers(
+ node->read_view, index, rec,
+ &offsets, &heap, &plan->old_vers_heap,
+ &old_vers, &mtr);
+
if (err != DB_SUCCESS) {
goto lock_wait_or_error;
@@ -3999,6 +4003,7 @@ no_gap_lock:
mutex_enter(&kernel_mutex);
if (trx->was_chosen_as_deadlock_victim) {
mutex_exit(&kernel_mutex);
+ err = DB_DEADLOCK;
goto lock_wait_or_error;
}
@@ -4521,7 +4526,8 @@ row_search_check_if_query_cache_permitted(
}
/***********************************************************************
-Read the AUTOINC column from the current row. */
+Read the AUTOINC column from the current row. If the value is less than
+0 and the type is not unsigned then we reset the value to 0. */
static
ib_longlong
row_search_autoinc_read_column(
@@ -4536,6 +4542,7 @@ row_search_autoinc_read_column(
const byte* data;
ib_longlong value;
mem_heap_t* heap = NULL;
+ /* Our requirement is that dest should be word aligned. */
byte dest[sizeof(value)];
ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_;
@@ -4554,26 +4561,43 @@ row_search_autoinc_read_column(
ut_a(len != UNIV_SQL_NULL);
ut_a(len <= sizeof value);
- /* Copy integer data and restore sign bit */
- if (unsigned_type || (data[0] & 128))
- memset(dest, 0x00, sizeof(dest));
- else
- memset(dest, 0xff, sizeof(dest));
+ mach_read_int_type(dest, data, len, unsigned_type);
+
+ /* The assumption here is that the AUTOINC value can't be negative
+ and that dest is word aligned. */
+ switch (len) {
+ case 8:
+ value = *(ib_longlong*) dest;
+ break;
+
+ case 4:
+ value = *(ib_uint32_t*) dest;
+ break;
- memcpy(dest + (sizeof(value) - len), data, len);
+ case 3:
+ value = *(ib_uint32_t*) dest;
+ value &= 0xFFFFFF;
+ break;
- if (!unsigned_type)
- dest[sizeof(value) - len] ^= 128;
+ case 2:
+ value = *(uint16 *) dest;
+ break;
- /* The assumption here is that the AUTOINC value can't be negative.*/
- value = (((ib_longlong) mach_read_from_4(dest)) << 32) |
- ((ib_longlong) mach_read_from_4(dest + 4));
+ case 1:
+ value = *dest;
+ break;
+
+ default:
+ ut_error;
+ }
if (UNIV_LIKELY_NULL(heap)) {
mem_heap_free(heap);
}
- ut_a(value >= 0);
+ if (!unsigned_type && value < 0) {
+ value = 0;
+ }
return(value);
}
diff --git a/storage/innobase/sync/sync0rw.c b/storage/innobase/sync/sync0rw.c
index 4db780c8b3f..8dbc69816e9 100644
--- a/storage/innobase/sync/sync0rw.c
+++ b/storage/innobase/sync/sync0rw.c
@@ -174,9 +174,7 @@ rw_lock_free(
/*=========*/
rw_lock_t* lock) /* in: rw-lock */
{
-#ifdef UNIV_DEBUG
- ut_a(rw_lock_validate(lock));
-#endif /* UNIV_DEBUG */
+ ut_ad(rw_lock_validate(lock));
ut_a(rw_lock_get_writer(lock) == RW_LOCK_NOT_LOCKED);
ut_a(rw_lock_get_waiters(lock) == 0);
ut_a(rw_lock_get_reader_count(lock) == 0);
@@ -199,6 +197,7 @@ rw_lock_free(
mutex_exit(&rw_lock_list_mutex);
}
+#ifdef UNIV_DEBUG
/**********************************************************************
Checks that the rw-lock has been initialized and that there are no
simultaneous shared and exclusive locks. */
@@ -226,6 +225,7 @@ rw_lock_validate(
return(TRUE);
}
+#endif /* UNIV_DEBUG */
/**********************************************************************
Lock an rw-lock in shared mode for the current thread. If the rw-lock is
diff --git a/storage/innobase/sync/sync0sync.c b/storage/innobase/sync/sync0sync.c
index bf3f4d1ff20..39872f72204 100644
--- a/storage/innobase/sync/sync0sync.c
+++ b/storage/innobase/sync/sync0sync.c
@@ -830,7 +830,7 @@ sync_thread_levels_g(
mutex = slot->latch;
fprintf(stderr,
- "InnoDB error: sync levels should be"
+ "InnoDB: sync levels should be"
" > %lu but a level is %lu\n",
(ulong) limit, (ulong) slot->level);
diff --git a/storage/innobase/ut/ut0ut.c b/storage/innobase/ut/ut0ut.c
index 389063ad821..1ca278cd633 100644
--- a/storage/innobase/ut/ut0ut.c
+++ b/storage/innobase/ut/ut0ut.c
@@ -18,6 +18,7 @@ Created 5/11/1994 Heikki Tuuri
#include "ut0sort.h"
#include "trx0trx.h"
+#include "ha_prototypes.h"
ibool ut_always_false = FALSE;
@@ -70,22 +71,6 @@ ut_gettimeofday(
#define ut_gettimeofday gettimeofday
#endif
-#ifndef UNIV_HOTBACKUP
-/*********************************************************************
-Display an SQL identifier.
-This definition must match the one in sql/ha_innodb.cc! */
-extern
-void
-innobase_print_identifier(
-/*======================*/
- FILE* f, /* in: output stream */
- trx_t* trx, /* in: transaction */
- ibool table_id,/* in: TRUE=print a table name,
- FALSE=print other identifier */
- const char* name, /* in: name to print */
- ulint namelen);/* in: length of name */
-#endif /* !UNIV_HOTBACKUP */
-
/************************************************************
Gets the high 32 bits in a ulint. That is makes a shift >> 32,
but since there seem to be compiler bugs in both gcc and Visual C++,
@@ -360,6 +345,8 @@ ut_print_buf(
const byte* data;
ulint i;
+ UNIV_MEM_ASSERT_RW(buf, len);
+
fprintf(file, " len %lu; hex ", len);
for (data = (const byte*)buf, i = 0; i < len; i++) {
@@ -474,17 +461,20 @@ ut_print_namel(
#ifdef UNIV_HOTBACKUP
fwrite(name, 1, namelen, f);
#else
- char* slash = memchr(name, '/', namelen);
+ if (table_id) {
+ char* slash = memchr(name, '/', namelen);
+ if (!slash) {
- if (UNIV_LIKELY_NULL(slash)) {
- /* Print the database name and table name separately. */
- ut_ad(table_id);
+ goto no_db_name;
+ }
+ /* Print the database name and table name separately. */
innobase_print_identifier(f, trx, TRUE, name, slash - name);
putc('.', f);
innobase_print_identifier(f, trx, TRUE, slash + 1,
namelen - (slash - name) - 1);
} else {
+no_db_name:
innobase_print_identifier(f, trx, table_id, name, namelen);
}
#endif
@@ -515,3 +505,44 @@ ut_copy_file(
}
} while (len > 0);
}
+
+/**************************************************************************
+snprintf(). */
+
+#ifdef __WIN__
+#include <stdarg.h>
+int
+ut_snprintf(
+ /* out: number of characters that would
+ have been printed if the size were
+ unlimited, not including the terminating
+ '\0'. */
+ char* str, /* out: string */
+ size_t size, /* in: str size */
+ const char* fmt, /* in: format */
+ ...) /* in: format values */
+{
+ int res;
+ va_list ap1;
+ va_list ap2;
+
+ va_start(ap1, fmt);
+ va_start(ap2, fmt);
+
+ res = _vscprintf(fmt, ap1);
+ ut_a(res != -1);
+
+ if (size > 0) {
+ _vsnprintf(str, size, fmt, ap2);
+
+ if ((size_t) res >= size) {
+ str[size - 1] = '\0';
+ }
+ }
+
+ va_end(ap1);
+ va_end(ap2);
+
+ return(res);
+}
+#endif /* __WIN__ */
diff --git a/storage/myisam/ft_boolean_search.c b/storage/myisam/ft_boolean_search.c
index 85342c6e0ca..03d6bdb2cde 100644
--- a/storage/myisam/ft_boolean_search.c
+++ b/storage/myisam/ft_boolean_search.c
@@ -575,8 +575,8 @@ FT_INFO * ft_init_boolean_search(MI_INFO *info, uint keynr, uchar *query,
ftb->list=(FTB_WORD **)alloc_root(&ftb->mem_root,
sizeof(FTB_WORD *)*ftb->queue.elements);
memcpy(ftb->list, ftb->queue.root+1, sizeof(FTB_WORD *)*ftb->queue.elements);
- qsort2(ftb->list, ftb->queue.elements, sizeof(FTB_WORD *),
- (qsort2_cmp)FTB_WORD_cmp_list, ftb->charset);
+ my_qsort2(ftb->list, ftb->queue.elements, sizeof(FTB_WORD *),
+ (qsort2_cmp)FTB_WORD_cmp_list, ftb->charset);
if (ftb->queue.elements<2) ftb->with_scan &= ~FTB_FLAG_TRUNC;
ftb->state=READY;
return ftb;
diff --git a/storage/myisam/ft_nlq_search.c b/storage/myisam/ft_nlq_search.c
index b3a2e47a382..eb563638d36 100644
--- a/storage/myisam/ft_nlq_search.c
+++ b/storage/myisam/ft_nlq_search.c
@@ -294,7 +294,8 @@ FT_INFO *ft_init_nlq_search(MI_INFO *info, uint keynr, uchar *query,
&dptr, left_root_right);
if (flags & FT_SORTED)
- qsort2(dlist->doc, dlist->ndocs, sizeof(FT_DOC), (qsort2_cmp)&FT_DOC_cmp, 0);
+ my_qsort2(dlist->doc, dlist->ndocs, sizeof(FT_DOC), (qsort2_cmp)&FT_DOC_cmp,
+ 0);
err:
delete_tree(&aio.dtree);
diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc
index 5e58565364c..9278c717e85 100644
--- a/storage/myisam/ha_myisam.cc
+++ b/storage/myisam/ha_myisam.cc
@@ -120,6 +120,10 @@ static void mi_check_print_msg(HA_CHECK *param, const char* msg_type,
definition for further use in mi_create or for a check for underlying
table conformance in merge engine.
+ The caller needs to free *recinfo_out after use. Since *recinfo_out
+ and *keydef_out are allocated with a my_multi_malloc, *keydef_out
+ is freed automatically when *recinfo_out is freed.
+
RETURN VALUE
0 OK
!0 error code
@@ -150,7 +154,7 @@ int table2myisam(TABLE *table_arg, MI_KEYDEF **keydef_out,
pos= table_arg->key_info;
for (i= 0; i < share->keys; i++, pos++)
{
- keydef[i].flag= (pos->flags & (HA_NOSAME | HA_FULLTEXT | HA_SPATIAL));
+ keydef[i].flag= ((uint16) pos->flags & (HA_NOSAME | HA_FULLTEXT | HA_SPATIAL));
keydef[i].key_alg= pos->algorithm == HA_KEY_ALG_UNDEF ?
(pos->flags & HA_SPATIAL ? HA_KEY_ALG_RTREE : HA_KEY_ALG_BTREE) :
pos->algorithm;
@@ -1652,9 +1656,13 @@ int ha_myisam::index_next_same(uchar *buf,
const uchar *key __attribute__((unused)),
uint length __attribute__((unused)))
{
+ int error;
DBUG_ASSERT(inited==INDEX);
ha_statistic_increment(&SSV::ha_read_next_count);
- int error=mi_rnext_same(file,buf);
+ do
+ {
+ error= mi_rnext_same(file,buf);
+ } while (error == HA_ERR_RECORD_DELETED);
table->status=error ? STATUS_NOT_FOUND: 0;
return error;
}
diff --git a/storage/myisam/ha_myisam.h b/storage/myisam/ha_myisam.h
index 96440b74c9d..729ad2ee87e 100644
--- a/storage/myisam/ha_myisam.h
+++ b/storage/myisam/ha_myisam.h
@@ -141,4 +141,8 @@ class ha_myisam: public handler
*engine_callback,
ulonglong *engine_data);
#endif
+ MI_INFO *file_ptr(void)
+ {
+ return file;
+ }
};
diff --git a/storage/myisam/mi_check.c b/storage/myisam/mi_check.c
index 152ffd3bb55..4ba84ab6ca8 100644
--- a/storage/myisam/mi_check.c
+++ b/storage/myisam/mi_check.c
@@ -455,7 +455,7 @@ int chk_key(HA_CHECK *param, register MI_INFO *info)
if ((!(param->testflag & T_SILENT)))
printf ("- check data record references index: %d\n",key+1);
- if (keyinfo->flag & HA_FULLTEXT)
+ if (keyinfo->flag & (HA_FULLTEXT | HA_SPATIAL))
full_text_keys++;
if (share->state.key_root[key] == HA_OFFSET_ERROR &&
(info->state->records == 0 || keyinfo->flag & HA_FULLTEXT))
@@ -941,7 +941,7 @@ int chk_data_link(HA_CHECK *param, MI_INFO *info,int extend)
ha_rows records,del_blocks;
my_off_t used,empty,pos,splits,start_recpos,
del_length,link_used,start_block;
- uchar *record,*to;
+ uchar *record= 0, *to;
char llbuff[22],llbuff2[22],llbuff3[22];
ha_checksum intern_record_checksum;
ha_checksum key_checksum[HA_MAX_POSSIBLE_KEY];
@@ -958,7 +958,7 @@ int chk_data_link(HA_CHECK *param, MI_INFO *info,int extend)
puts("- check record links");
}
- if (!(record= (uchar*) my_malloc(info->s->base.pack_reclength,MYF(0))))
+ if (!mi_alloc_rec_buff(info, -1, &record))
{
mi_check_print_error(param,"Not enough memory for record");
DBUG_RETURN(-1);
@@ -1365,17 +1365,150 @@ int chk_data_link(HA_CHECK *param, MI_INFO *info,int extend)
printf("Lost space: %12s Linkdata: %10s\n",
llstr(empty,llbuff),llstr(link_used,llbuff2));
}
- my_free((uchar*) record,MYF(0));
+ my_free(mi_get_rec_buff_ptr(info, record), MYF(0));
DBUG_RETURN (error);
err:
mi_check_print_error(param,"got error: %d when reading datafile at record: %s",my_errno, llstr(records,llbuff));
err2:
- my_free((uchar*) record,MYF(0));
+ my_free(mi_get_rec_buff_ptr(info, record), MYF(0));
param->testflag|=T_RETRY_WITHOUT_QUICK;
DBUG_RETURN(1);
} /* chk_data_link */
+/**
+ @brief Drop all indexes
+
+ @param[in] param check parameters
+ @param[in] info MI_INFO handle
+ @param[in] force if to force drop all indexes
+
+ @return status
+ @retval 0 OK
+ @retval != 0 Error
+
+ @note
+ Once allocated, index blocks remain part of the key file forever.
+ When indexes are disabled, no block is freed. When enabling indexes,
+ no block is freed either. The new indexes are create from new
+ blocks. (Bug #4692)
+
+ Before recreating formerly disabled indexes, the unused blocks
+ must be freed. There are two options to do this:
+ - Follow the tree of disabled indexes, add all blocks to the
+ deleted blocks chain. Would require a lot of random I/O.
+ - Drop all blocks by clearing all index root pointers and all
+ delete chain pointers and resetting key_file_length to the end
+ of the index file header. This requires to recreate all indexes,
+ even those that may still be intact.
+ The second method is probably faster in most cases.
+
+ When disabling indexes, MySQL disables either all indexes or all
+ non-unique indexes. When MySQL [re-]enables disabled indexes
+ (T_CREATE_MISSING_KEYS), then we either have "lost" blocks in the
+ index file, or there are no non-unique indexes. In the latter case,
+ mi_repair*() would not be called as there would be no disabled
+ indexes.
+
+ If there would be more unique indexes than disabled (non-unique)
+ indexes, we could do the first method. But this is not implemented
+ yet. By now we drop and recreate all indexes when repair is called.
+
+ However, there is an exception. Sometimes MySQL disables non-unique
+ indexes when the table is empty (e.g. when copying a table in
+ mysql_alter_table()). When enabling the non-unique indexes, they
+ are still empty. So there is no index block that can be lost. This
+ optimization is implemented in this function.
+
+ Note that in normal repair (T_CREATE_MISSING_KEYS not set) we
+ recreate all enabled indexes unconditonally. We do not change the
+ key_map. Otherwise we invert the key map temporarily (outside of
+ this function) and recreate the then "seemingly" enabled indexes.
+ When we cannot use the optimization, and drop all indexes, we
+ pretend that all indexes were disabled. By the inversion, we will
+ then recrate all indexes.
+*/
+
+static int mi_drop_all_indexes(MI_CHECK *param, MI_INFO *info, my_bool force)
+{
+ MYISAM_SHARE *share= info->s;
+ MI_STATE_INFO *state= &share->state;
+ uint i;
+ int error;
+ DBUG_ENTER("mi_drop_all_indexes");
+
+ /*
+ If any of the disabled indexes has a key block assigned, we must
+ drop and recreate all indexes to avoid losing index blocks.
+
+ If we want to recreate disabled indexes only _and_ all of these
+ indexes are empty, we don't need to recreate the existing indexes.
+ */
+ if (!force && (param->testflag & T_CREATE_MISSING_KEYS))
+ {
+ DBUG_PRINT("repair", ("creating missing indexes"));
+ for (i= 0; i < share->base.keys; i++)
+ {
+ DBUG_PRINT("repair", ("index #: %u key_root: 0x%lx active: %d",
+ i, (long) state->key_root[i],
+ mi_is_key_active(state->key_map, i)));
+ if ((state->key_root[i] != HA_OFFSET_ERROR) &&
+ !mi_is_key_active(state->key_map, i))
+ {
+ /*
+ This index has at least one key block and it is disabled.
+ We would lose its block(s) if would just recreate it.
+ So we need to drop and recreate all indexes.
+ */
+ DBUG_PRINT("repair", ("nonempty and disabled: recreate all"));
+ break;
+ }
+ }
+ if (i >= share->base.keys)
+ {
+ /*
+ All of the disabled indexes are empty. We can just recreate them.
+ Flush dirty blocks of this index file from key cache and remove
+ all blocks of this index file from key cache.
+ */
+ DBUG_PRINT("repair", ("all disabled are empty: create missing"));
+ error= flush_key_blocks(share->key_cache, share->kfile,
+ FLUSH_FORCE_WRITE);
+ goto end;
+ }
+ /*
+ We do now drop all indexes and declare them disabled. With the
+ T_CREATE_MISSING_KEYS flag, mi_repair*() will recreate all
+ disabled indexes and enable them.
+ */
+ mi_clear_all_keys_active(state->key_map);
+ DBUG_PRINT("repair", ("declared all indexes disabled"));
+ }
+
+ /* Remove all key blocks of this index file from key cache. */
+ if ((error= flush_key_blocks(share->key_cache, share->kfile,
+ FLUSH_IGNORE_CHANGED)))
+ goto end; /* purecov: inspected */
+
+ /* Clear index root block pointers. */
+ for (i= 0; i < share->base.keys; i++)
+ state->key_root[i]= HA_OFFSET_ERROR;
+
+ /* Clear the delete chains. */
+ for (i= 0; i < state->header.max_block_size_index; i++)
+ state->key_del[i]= HA_OFFSET_ERROR;
+
+ /* Reset index file length to end of index file header. */
+ info->state->key_file_length= share->base.keystart;
+
+ DBUG_PRINT("repair", ("dropped all indexes"));
+ /* error= 0; set by last (error= flush_key_bocks()). */
+
+ end:
+ DBUG_RETURN(error);
+}
+
+
/* Recover old table by reading each record and writing all keys */
/* Save new datafile-name in temp_filename */
@@ -1383,7 +1516,6 @@ int mi_repair(HA_CHECK *param, register MI_INFO *info,
char * name, int rep_quick)
{
int error,got_error;
- uint i;
ha_rows start_records,new_header_length;
my_off_t del;
File new_file;
@@ -1429,8 +1561,7 @@ int mi_repair(HA_CHECK *param, register MI_INFO *info,
MYF(MY_WME | MY_WAIT_IF_FULL)))
goto err;
info->opt_flag|=WRITE_CACHE_USED;
- if (!(sort_param.record=(uchar*) my_malloc((uint) share->base.pack_reclength,
- MYF(0))) ||
+ if (!mi_alloc_rec_buff(info, -1, &sort_param.record) ||
!mi_alloc_rec_buff(info, -1, &sort_param.rec_buff))
{
mi_check_print_error(param, "Not enough memory for extra record");
@@ -1487,25 +1618,10 @@ int mi_repair(HA_CHECK *param, register MI_INFO *info,
info->update= (short) (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED);
- /*
- Clear all keys. Note that all key blocks allocated until now remain
- "dead" parts of the key file. (Bug #4692)
- */
- for (i=0 ; i < info->s->base.keys ; i++)
- share->state.key_root[i]= HA_OFFSET_ERROR;
-
- /* Drop the delete chain. */
- for (i=0 ; i < share->state.header.max_block_size_index ; i++)
- share->state.key_del[i]= HA_OFFSET_ERROR;
-
- /*
- If requested, activate (enable) all keys in key_map. In this case,
- all indexes will be (re-)built.
- */
+ /* This function always recreates all enabled indexes. */
if (param->testflag & T_CREATE_MISSING_KEYS)
mi_set_all_keys_active(share->state.key_map, share->base.keys);
-
- info->state->key_file_length=share->base.keystart;
+ mi_drop_all_indexes(param, info, TRUE);
lock_memory(param); /* Everything is alloced */
@@ -1637,7 +1753,8 @@ err:
}
my_free(mi_get_rec_buff_ptr(info, sort_param.rec_buff),
MYF(MY_ALLOW_ZERO_PTR));
- my_free(sort_param.record,MYF(MY_ALLOW_ZERO_PTR));
+ my_free(mi_get_rec_buff_ptr(info, sort_param.record),
+ MYF(MY_ALLOW_ZERO_PTR));
my_free(sort_info.buff,MYF(MY_ALLOW_ZERO_PTR));
VOID(end_io_cache(&param->read_cache));
info->opt_flag&= ~(READ_CACHE_USED | WRITE_CACHE_USED);
@@ -2106,8 +2223,9 @@ int mi_repair_by_sort(HA_CHECK *param, register MI_INFO *info,
ulong *rec_per_key_part;
char llbuff[22];
MI_SORT_INFO sort_info;
- ulonglong key_map=share->state.key_map;
+ ulonglong key_map;
DBUG_ENTER("mi_repair_by_sort");
+ LINT_INIT(key_map);
start_records=info->state->records;
got_error=1;
@@ -2143,8 +2261,7 @@ int mi_repair_by_sort(HA_CHECK *param, register MI_INFO *info,
info->opt_flag|=WRITE_CACHE_USED;
info->rec_cache.file=info->dfile; /* for sort_delete_record */
- if (!(sort_param.record=(uchar*) my_malloc((uint) share->base.pack_reclength,
- MYF(0))) ||
+ if (!mi_alloc_rec_buff(info, -1, &sort_param.record) ||
!mi_alloc_rec_buff(info, -1, &sort_param.rec_buff))
{
mi_check_print_error(param, "Not enough memory for extra record");
@@ -2180,25 +2297,14 @@ int mi_repair_by_sort(HA_CHECK *param, register MI_INFO *info,
}
info->update= (short) (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED);
- if (!(param->testflag & T_CREATE_MISSING_KEYS))
- {
- /*
- Flush key cache for this file if we are calling this outside
- myisamchk
- */
- flush_key_blocks(share->key_cache,share->kfile, FLUSH_IGNORE_CHANGED);
- /* Clear the pointers to the given rows */
- for (i=0 ; i < share->base.keys ; i++)
- share->state.key_root[i]= HA_OFFSET_ERROR;
- for (i=0 ; i < share->state.header.max_block_size_index ; i++)
- share->state.key_del[i]= HA_OFFSET_ERROR;
- info->state->key_file_length=share->base.keystart;
- }
- else
+
+ /* Optionally drop indexes and optionally modify the key_map. */
+ mi_drop_all_indexes(param, info, FALSE);
+ key_map= share->state.key_map;
+ if (param->testflag & T_CREATE_MISSING_KEYS)
{
- if (flush_key_blocks(share->key_cache,share->kfile, FLUSH_FORCE_WRITE))
- goto err;
- key_map= ~key_map; /* Create the missing keys */
+ /* Invert the copied key_map to recreate all disabled indexes. */
+ key_map= ~key_map;
}
sort_info.info=info;
@@ -2242,6 +2348,10 @@ int mi_repair_by_sort(HA_CHECK *param, register MI_INFO *info,
sort_param.read_cache=param->read_cache;
sort_param.keyinfo=share->keyinfo+sort_param.key;
sort_param.seg=sort_param.keyinfo->seg;
+ /*
+ Skip this index if it is marked disabled in the copied
+ (and possibly inverted) key_map.
+ */
if (! mi_is_key_active(key_map, sort_param.key))
{
/* Remember old statistics for key */
@@ -2249,6 +2359,8 @@ int mi_repair_by_sort(HA_CHECK *param, register MI_INFO *info,
(char*) (share->state.rec_per_key_part +
(uint) (rec_per_key_part - param->rec_per_key_part)),
sort_param.keyinfo->keysegs*sizeof(*rec_per_key_part));
+ DBUG_PRINT("repair", ("skipping seemingly disabled index #: %u",
+ sort_param.key));
continue;
}
@@ -2329,8 +2441,11 @@ int mi_repair_by_sort(HA_CHECK *param, register MI_INFO *info,
if (param->testflag & T_STATISTICS)
update_key_parts(sort_param.keyinfo, rec_per_key_part, sort_param.unique,
param->stats_method == MI_STATS_METHOD_IGNORE_NULLS?
- sort_param.notnull: NULL,(ulonglong) info->state->records);
+ sort_param.notnull: NULL,
+ (ulonglong) info->state->records);
+ /* Enable this index in the permanent (not the copied) key_map. */
mi_set_key_active(share->state.key_map, sort_param.key);
+ DBUG_PRINT("repair", ("set enabled index #: %u", sort_param.key));
if (sort_param.fix_datafile)
{
@@ -2455,7 +2570,8 @@ err:
my_free(mi_get_rec_buff_ptr(info, sort_param.rec_buff),
MYF(MY_ALLOW_ZERO_PTR));
- my_free(sort_param.record,MYF(MY_ALLOW_ZERO_PTR));
+ my_free(mi_get_rec_buff_ptr(info, sort_param.record),
+ MYF(MY_ALLOW_ZERO_PTR));
my_free((uchar*) sort_info.key_block,MYF(MY_ALLOW_ZERO_PTR));
my_free((uchar*) sort_info.ft_buf, MYF(MY_ALLOW_ZERO_PTR));
my_free(sort_info.buff,MYF(MY_ALLOW_ZERO_PTR));
@@ -2531,9 +2647,11 @@ int mi_repair_parallel(HA_CHECK *param, register MI_INFO *info,
IO_CACHE new_data_cache; /* For non-quick repair. */
IO_CACHE_SHARE io_share;
MI_SORT_INFO sort_info;
- ulonglong key_map=share->state.key_map;
+ ulonglong key_map;
pthread_attr_t thr_attr;
+ ulong max_pack_reclength;
DBUG_ENTER("mi_repair_parallel");
+ LINT_INIT(key_map);
start_records=info->state->records;
got_error=1;
@@ -2635,25 +2753,14 @@ int mi_repair_parallel(HA_CHECK *param, register MI_INFO *info,
}
info->update= (short) (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED);
- if (!(param->testflag & T_CREATE_MISSING_KEYS))
- {
- /*
- Flush key cache for this file if we are calling this outside
- myisamchk
- */
- flush_key_blocks(share->key_cache,share->kfile, FLUSH_IGNORE_CHANGED);
- /* Clear the pointers to the given rows */
- for (i=0 ; i < share->base.keys ; i++)
- share->state.key_root[i]= HA_OFFSET_ERROR;
- for (i=0 ; i < share->state.header.max_block_size_index ; i++)
- share->state.key_del[i]= HA_OFFSET_ERROR;
- info->state->key_file_length=share->base.keystart;
- }
- else
+
+ /* Optionally drop indexes and optionally modify the key_map. */
+ mi_drop_all_indexes(param, info, FALSE);
+ key_map= share->state.key_map;
+ if (param->testflag & T_CREATE_MISSING_KEYS)
{
- if (flush_key_blocks(share->key_cache,share->kfile, FLUSH_FORCE_WRITE))
- goto err;
- key_map= ~key_map; /* Create the missing keys */
+ /* Invert the copied key_map to recreate all disabled indexes. */
+ key_map= ~key_map;
}
sort_info.info=info;
@@ -2689,10 +2796,13 @@ int mi_repair_parallel(HA_CHECK *param, register MI_INFO *info,
del=info->state->del;
param->glob_crc=0;
-
+ /* for compressed tables */
+ max_pack_reclength= share->base.pack_reclength;
+ if (share->options & HA_OPTION_COMPRESS_RECORD)
+ set_if_bigger(max_pack_reclength, share->max_pack_length);
if (!(sort_param=(MI_SORT_PARAM *)
my_malloc((uint) share->base.keys *
- (sizeof(MI_SORT_PARAM) + share->base.pack_reclength),
+ (sizeof(MI_SORT_PARAM) + max_pack_reclength),
MYF(MY_ZEROFILL))))
{
mi_check_print_error(param,"Not enough memory for key!");
@@ -2709,6 +2819,10 @@ int mi_repair_parallel(HA_CHECK *param, register MI_INFO *info,
sort_param[i].key=key;
sort_param[i].keyinfo=share->keyinfo+key;
sort_param[i].seg=sort_param[i].keyinfo->seg;
+ /*
+ Skip this index if it is marked disabled in the copied
+ (and possibly inverted) key_map.
+ */
if (! mi_is_key_active(key_map, key))
{
/* Remember old statistics for key */
@@ -2744,7 +2858,7 @@ int mi_repair_parallel(HA_CHECK *param, register MI_INFO *info,
sort_param[i].max_pos=sort_param[i].pos=share->pack.header_length;
sort_param[i].record= (((uchar *)(sort_param+share->base.keys))+
- (share->base.pack_reclength * i));
+ (max_pack_reclength * i));
if (!mi_alloc_rec_buff(info, -1, &sort_param[i].rec_buff))
{
mi_check_print_error(param,"Not enough memory!");
@@ -4370,7 +4484,7 @@ err:
void update_auto_increment_key(HA_CHECK *param, MI_INFO *info,
my_bool repair_only)
{
- uchar *record;
+ uchar *record= 0;
DBUG_ENTER("update_auto_increment_key");
if (!info->s->base.auto_key ||
@@ -4389,8 +4503,7 @@ void update_auto_increment_key(HA_CHECK *param, MI_INFO *info,
We have to use an allocated buffer instead of info->rec_buff as
_mi_put_key_in_record() may use info->rec_buff
*/
- if (!(record= (uchar*) my_malloc((uint) info->s->base.pack_reclength,
- MYF(0))))
+ if (!mi_alloc_rec_buff(info, -1, &record))
{
mi_check_print_error(param,"Not enough memory for extra record");
DBUG_VOID_RETURN;
@@ -4402,7 +4515,7 @@ void update_auto_increment_key(HA_CHECK *param, MI_INFO *info,
if (my_errno != HA_ERR_END_OF_FILE)
{
mi_extra(info,HA_EXTRA_NO_KEYREAD,0);
- my_free((char*) record, MYF(0));
+ my_free(mi_get_rec_buff_ptr(info, record), MYF(0));
mi_check_print_error(param,"%d when reading last record",my_errno);
DBUG_VOID_RETURN;
}
@@ -4417,7 +4530,7 @@ void update_auto_increment_key(HA_CHECK *param, MI_INFO *info,
set_if_bigger(info->s->state.auto_increment, param->auto_increment_value);
}
mi_extra(info,HA_EXTRA_NO_KEYREAD,0);
- my_free((char*) record, MYF(0));
+ my_free(mi_get_rec_buff_ptr(info, record), MYF(0));
update_state_info(param, info, UPDATE_AUTO_INC);
DBUG_VOID_RETURN;
}
diff --git a/storage/myisam/mi_dynrec.c b/storage/myisam/mi_dynrec.c
index 0811de2b968..dbfc62b4fda 100644
--- a/storage/myisam/mi_dynrec.c
+++ b/storage/myisam/mi_dynrec.c
@@ -326,6 +326,29 @@ static int write_dynamic_record(MI_INFO *info, const uchar *record,
DBUG_ENTER("write_dynamic_record");
flag=0;
+
+ /*
+ Check if we have enough room for the new record.
+ First we do simplified check to make usual case faster.
+ Then we do more precise check for the space left.
+ Though it still is not absolutely precise, as
+ we always use MI_MAX_DYN_BLOCK_HEADER while it can be
+ less in the most of the cases.
+ */
+
+ if (unlikely(info->s->base.max_data_file_length -
+ info->state->data_file_length <
+ reclength + MI_MAX_DYN_BLOCK_HEADER))
+ {
+ if (info->s->base.max_data_file_length - info->state->data_file_length +
+ info->state->empty - info->state->del * MI_MAX_DYN_BLOCK_HEADER <
+ reclength + MI_MAX_DYN_BLOCK_HEADER)
+ {
+ my_errno=HA_ERR_RECORD_FILE_FULL;
+ DBUG_RETURN(1);
+ }
+ }
+
do
{
if (_mi_find_writepos(info,reclength,&filepos,&length))
@@ -762,6 +785,51 @@ static int update_dynamic_record(MI_INFO *info, my_off_t filepos, uchar *record,
DBUG_ENTER("update_dynamic_record");
flag=block_info.second_read=0;
+ /*
+ Check if we have enough room for the record.
+ First we do simplified check to make usual case faster.
+ Then we do more precise check for the space left.
+ Though it still is not absolutely precise, as
+ we always use MI_MAX_DYN_BLOCK_HEADER while it can be
+ less in the most of the cases.
+ */
+
+ /*
+ compare with just the reclength as we're going
+ to get some space from the old replaced record
+ */
+ if (unlikely(info->s->base.max_data_file_length -
+ info->state->data_file_length < reclength))
+ {
+ /*
+ let's read the old record's block to find out the length of the
+ old record
+ */
+ if ((error=_mi_get_block_info(&block_info,info->dfile,filepos))
+ & (BLOCK_DELETED | BLOCK_ERROR | BLOCK_SYNC_ERROR | BLOCK_FATAL_ERROR))
+ {
+ DBUG_PRINT("error",("Got wrong block info"));
+ if (!(error & BLOCK_FATAL_ERROR))
+ my_errno=HA_ERR_WRONG_IN_RECORD;
+ goto err;
+ }
+
+ /*
+ if new record isn't longer, we can go on safely
+ */
+ if (block_info.rec_len < reclength)
+ {
+ if (info->s->base.max_data_file_length - info->state->data_file_length +
+ info->state->empty - info->state->del * MI_MAX_DYN_BLOCK_HEADER <
+ reclength - block_info.rec_len + MI_MAX_DYN_BLOCK_HEADER)
+ {
+ my_errno=HA_ERR_RECORD_FILE_FULL;
+ goto err;
+ }
+ }
+ block_info.second_read=0;
+ }
+
while (reclength > 0)
{
if (filepos != info->s->state.dellink)
diff --git a/storage/myisam/mi_open.c b/storage/myisam/mi_open.c
index 5ce8ec0275a..68ecc1d6a2a 100644
--- a/storage/myisam/mi_open.c
+++ b/storage/myisam/mi_open.c
@@ -698,8 +698,11 @@ uchar *mi_alloc_rec_buff(MI_INFO *info, ulong length, uchar **buf)
/* to simplify initial init of info->rec_buf in mi_open and mi_extra */
if (length == (ulong) -1)
{
- length= max(info->s->base.pack_reclength,
- info->s->base.max_key_length);
+ if (info->s->options & HA_OPTION_COMPRESS_RECORD)
+ length= max(info->s->base.pack_reclength, info->s->max_pack_length);
+ else
+ length= info->s->base.pack_reclength;
+ length= max(length, info->s->base.max_key_length);
/* Avoid unnecessary realloc */
if (newptr && length == old_length)
return newptr;
@@ -924,7 +927,7 @@ uchar *mi_state_info_read(uchar *ptr, MI_STATE_INFO *state)
key_blocks=state->header.max_block_size_index;
state->open_count = mi_uint2korr(ptr); ptr +=2;
- state->changed= (bool) *ptr++;
+ state->changed= *ptr++;
state->sortkey = (uint) *ptr++;
state->state.records= mi_rowkorr(ptr); ptr +=8;
state->state.del = mi_rowkorr(ptr); ptr +=8;
diff --git a/storage/myisam/mi_packrec.c b/storage/myisam/mi_packrec.c
index a1bfb9e2c9b..387b82de5ee 100644
--- a/storage/myisam/mi_packrec.c
+++ b/storage/myisam/mi_packrec.c
@@ -167,7 +167,6 @@ my_bool _mi_read_pack_info(MI_INFO *info, pbool fix_keys)
share->pack.header_length= uint4korr(header+4);
share->min_pack_length=(uint) uint4korr(header+8);
share->max_pack_length=(uint) uint4korr(header+12);
- set_if_bigger(share->base.pack_reclength,share->max_pack_length);
elements=uint4korr(header+16);
intervall_length=uint4korr(header+20);
trees=uint2korr(header+24);
@@ -566,7 +565,7 @@ static void fill_quick_table(uint16 *table, uint bits, uint max_bits,
*/
value|= (max_bits - bits) << 8 | IS_CHAR;
- for (end= table + (uint) (((uint) 1 << bits)); table < end; table++)
+ for (end= table + ((my_ptrdiff_t) 1 << bits); table < end; table++)
{
*table= (uint16) value;
}
diff --git a/storage/myisam/myisamchk.c b/storage/myisam/myisamchk.c
index 6ddb7cb743b..9f86f14d2ba 100644
--- a/storage/myisam/myisamchk.c
+++ b/storage/myisam/myisamchk.c
@@ -1534,8 +1534,8 @@ static int mi_sort_records(HA_CHECK *param,
mi_check_print_error(param,"Not enough memory for key block");
goto err;
}
- if (!(sort_param.record=(uchar*) my_malloc((uint) share->base.pack_reclength,
- MYF(0))))
+
+ if (!mi_alloc_rec_buff(info, -1, &sort_param.record))
{
mi_check_print_error(param,"Not enough memory for record");
goto err;
@@ -1630,7 +1630,8 @@ err:
{
my_afree((uchar*) temp_buff);
}
- my_free(sort_param.record,MYF(MY_ALLOW_ZERO_PTR));
+ my_free(mi_get_rec_buff_ptr(info, sort_param.record),
+ MYF(MY_ALLOW_ZERO_PTR));
info->opt_flag&= ~(READ_CACHE_USED | WRITE_CACHE_USED);
VOID(end_io_cache(&info->rec_cache));
my_free(sort_info.buff,MYF(MY_ALLOW_ZERO_PTR));
diff --git a/storage/myisam/myisampack.c b/storage/myisam/myisampack.c
index 841fb45c184..8deddcc9f1d 100644
--- a/storage/myisam/myisampack.c
+++ b/storage/myisam/myisampack.c
@@ -3148,7 +3148,7 @@ static void fakebigcodes(HUFF_COUNTS *huff_counts, HUFF_COUNTS *end_count)
cur_sort_p= sort_counts;
while (cur_count_p < end_count_p)
*(cur_sort_p++)= cur_count_p++;
- (void) qsort(sort_counts, 256, sizeof(my_off_t*), (qsort_cmp) fakecmp);
+ (void) my_qsort(sort_counts, 256, sizeof(my_off_t*), (qsort_cmp) fakecmp);
/*
Assign faked counts.
diff --git a/storage/myisam/rt_index.c b/storage/myisam/rt_index.c
index 35a70b8c2bf..9db7fe88030 100644
--- a/storage/myisam/rt_index.c
+++ b/storage/myisam/rt_index.c
@@ -483,15 +483,16 @@ static uchar *rtree_pick_key(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *key,
uint key_length, uchar *page_buf, uint nod_flag)
{
double increase;
- double best_incr = DBL_MAX;
+ double best_incr;
double area;
double best_area;
- uchar *best_key;
+ uchar *best_key= NULL;
uchar *k = rt_PAGE_FIRST_KEY(page_buf, nod_flag);
uchar *last = rt_PAGE_END(page_buf);
LINT_INIT(best_area);
LINT_INIT(best_key);
+ LINT_INIT(best_incr);
for (; k < last; k = rt_PAGE_NEXT_KEY(k, key_length, nod_flag))
{
@@ -500,22 +501,13 @@ static uchar *rtree_pick_key(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *key,
&area)) == -1.0)
return NULL;
/* The following should be safe, even if we compare doubles */
- if (increase < best_incr)
+ if (!best_key || increase < best_incr ||
+ ((increase == best_incr) && (area < best_area)))
{
best_key = k;
best_area = area;
best_incr = increase;
}
- else
- {
- /* The following should be safe, even if we compare doubles */
- if ((increase == best_incr) && (area < best_area))
- {
- best_key = k;
- best_area = area;
- best_incr = increase;
- }
- }
}
return best_key;
}
diff --git a/storage/myisam/rt_mbr.c b/storage/myisam/rt_mbr.c
index 1855e24feb0..deca23bbec7 100644
--- a/storage/myisam/rt_mbr.c
+++ b/storage/myisam/rt_mbr.c
@@ -523,7 +523,10 @@ double rtree_overlapping_area(HA_KEYSEG *keyseg, uchar* a, uchar* b,
}
/*
-Calculates MBR_AREA(a+b) - MBR_AREA(a)
+ Calculates MBR_AREA(a+b) - MBR_AREA(a)
+ Note: when 'a' and 'b' objects are far from each other,
+ the area increase can be really big, so this function
+ can return 'inf' as a result.
*/
double rtree_area_increase(HA_KEYSEG *keyseg, uchar* a, uchar* b,
uint key_length, double *ab_area)
diff --git a/storage/myisam/sort.c b/storage/myisam/sort.c
index f11014570e6..b2507ad8886 100644
--- a/storage/myisam/sort.c
+++ b/storage/myisam/sort.c
@@ -565,9 +565,10 @@ int thr_write_keys(MI_SORT_PARAM *sort_param)
if (!mergebuf)
{
length=param->sort_buffer_length;
- while (length >= MIN_SORT_MEMORY && !mergebuf)
+ while (length >= MIN_SORT_MEMORY)
{
- mergebuf=my_malloc(length, MYF(0));
+ if ((mergebuf= my_malloc(length, MYF(0))))
+ break;
length=length*3/4;
}
if (!mergebuf)
@@ -649,8 +650,8 @@ static int NEAR_F write_keys(MI_SORT_PARAM *info, register uchar **sort_keys,
uint sort_length=info->key_length;
DBUG_ENTER("write_keys");
- qsort2((uchar*) sort_keys,count,sizeof(uchar*),(qsort2_cmp) info->key_cmp,
- info);
+ my_qsort2((uchar*) sort_keys,count,sizeof(uchar*),(qsort2_cmp) info->key_cmp,
+ info);
if (!my_b_inited(tempfile) &&
open_cached_file(tempfile, my_tmpdir(info->tmpdir), "ST",
DISK_BUFFER_SIZE, info->sort_info->param->myf_rw))
@@ -692,8 +693,8 @@ static int NEAR_F write_keys_varlen(MI_SORT_PARAM *info,
int err;
DBUG_ENTER("write_keys_varlen");
- qsort2((uchar*) sort_keys,count,sizeof(uchar*),(qsort2_cmp) info->key_cmp,
- info);
+ my_qsort2((uchar*) sort_keys,count,sizeof(uchar*),(qsort2_cmp) info->key_cmp,
+ info);
if (!my_b_inited(tempfile) &&
open_cached_file(tempfile, my_tmpdir(info->tmpdir), "ST",
DISK_BUFFER_SIZE, info->sort_info->param->myf_rw))
@@ -735,8 +736,8 @@ static int NEAR_F write_index(MI_SORT_PARAM *info, register uchar **sort_keys,
{
DBUG_ENTER("write_index");
- qsort2((uchar*) sort_keys,(size_t) count,sizeof(uchar*),
- (qsort2_cmp) info->key_cmp,info);
+ my_qsort2((uchar*) sort_keys,(size_t) count,sizeof(uchar*),
+ (qsort2_cmp) info->key_cmp,info);
while (count--)
{
if ((*info->key_write)(info,*sort_keys++))
@@ -904,6 +905,7 @@ merge_buffers(MI_SORT_PARAM *info, uint keys, IO_CACHE *from_file,
count=error=0;
maxcount=keys/((uint) (Tb-Fb) +1);
+ DBUG_ASSERT(maxcount > 0);
LINT_INIT(to_start_filepos);
if (to_file)
to_start_filepos=my_b_tell(to_file);
diff --git a/storage/myisammrg/ha_myisammrg.cc b/storage/myisammrg/ha_myisammrg.cc
index b8119466d11..30c9e6f4943 100644
--- a/storage/myisammrg/ha_myisammrg.cc
+++ b/storage/myisammrg/ha_myisammrg.cc
@@ -14,6 +14,82 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+/*
+ MyISAM MERGE tables
+
+ A MyISAM MERGE table is kind of a union of zero or more MyISAM tables.
+
+ Besides the normal form file (.frm) a MERGE table has a meta file
+ (.MRG) with a list of tables. These are paths to the MyISAM table
+ files. The last two components of the path contain the database name
+ and the table name respectively.
+
+ When a MERGE table is open, there exists an TABLE object for the MERGE
+ table itself and a TABLE object for each of the MyISAM tables. For
+ abbreviated writing, I call the MERGE table object "parent" and the
+ MyISAM table objects "children".
+
+ A MERGE table is almost always opened through open_and_lock_tables()
+ and hence through open_tables(). When the parent appears in the list
+ of tables to open, the initial open of the handler does nothing but
+ read the meta file and collect a list of TABLE_LIST objects for the
+ children. This list is attached to the parent TABLE object as
+ TABLE::child_l. The end of the children list is saved in
+ TABLE::child_last_l.
+
+ Back in open_tables(), add_merge_table_list() is called. It updates
+ each list member with the lock type and a back pointer to the parent
+ TABLE_LIST object TABLE_LIST::parent_l. The list is then inserted in
+ the list of tables to open, right behind the parent. Consequently,
+ open_tables() opens the children, one after the other. The TABLE
+ references of the TABLE_LIST objects are implicitly set to the open
+ tables. The children are opened as independent MyISAM tables, right as
+ if they are used by the SQL statement.
+
+ TABLE_LIST::parent_l is required to find the parent 1. when the last
+ child has been opened and children are to be attached, and 2. when an
+ error happens during child open and the child list must be removed
+ from the queuery list. In these cases the current child does not have
+ TABLE::parent set or does not have a TABLE at all respectively.
+
+ When the last child is open, attach_merge_children() is called. It
+ removes the list of children from the open list. Then the children are
+ "attached" to the parent. All required references between parent and
+ children are set up.
+
+ The MERGE storage engine sets up an array with references to the
+ low-level MyISAM table objects (MI_INFO). It remembers the state of
+ the table in MYRG_INFO::children_attached.
+
+ Every child TABLE::parent references the parent TABLE object. That way
+ TABLE objects belonging to a MERGE table can be identified.
+ TABLE::parent is required because the parent and child TABLE objects
+ can live longer than the parent TABLE_LIST object. So the path
+ child->pos_in_table_list->parent_l->table can be broken.
+
+ If necessary, the compatibility of parent and children is checked.
+ This check is necessary when any of the objects are reopend. This is
+ detected by comparing the current table def version against the
+ remembered child def version. On parent open, the list members are
+ initialized to an "impossible"/"undefined" version value. So the check
+ is always executed on the first attach.
+
+ The version check is done in myisammrg_attach_children_callback(),
+ which is called for every child. ha_myisammrg::attach_children()
+ initializes 'need_compat_check' to FALSE and
+ myisammrg_attach_children_callback() sets it ot TRUE if a table
+ def version mismatches the remembered child def version.
+
+ Finally the parent TABLE::children_attached is set.
+
+ ---
+
+ On parent open the storage engine structures are allocated and initialized.
+ They stay with the open table until its final close.
+
+
+*/
+
#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
@@ -22,14 +98,11 @@
#include "mysql_priv.h"
#include <mysql/plugin.h>
#include <m_ctype.h>
+#include "../myisam/ha_myisam.h"
#include "ha_myisammrg.h"
#include "myrg_def.h"
-/*****************************************************************************
-** MyISAM MERGE tables
-*****************************************************************************/
-
static handler *myisammrg_create_handler(handlerton *hton,
TABLE_SHARE *table,
MEM_ROOT *mem_root)
@@ -38,10 +111,23 @@ static handler *myisammrg_create_handler(handlerton *hton,
}
+/**
+ @brief Constructor
+*/
+
ha_myisammrg::ha_myisammrg(handlerton *hton, TABLE_SHARE *table_arg)
:handler(hton, table_arg), file(0)
{}
+
+/**
+ @brief Destructor
+*/
+
+ha_myisammrg::~ha_myisammrg(void)
+{}
+
+
static const char *ha_myisammrg_exts[] = {
".MRG",
NullS
@@ -91,25 +177,311 @@ const char *ha_myisammrg::index_type(uint key_number)
}
-int ha_myisammrg::open(const char *name, int mode, uint test_if_locked)
+/**
+ @brief Callback function for open of a MERGE parent table.
+
+ @detail This function adds a TABLE_LIST object for a MERGE child table
+ to a list of tables of the parent TABLE object. It is called for
+ each child table.
+
+ The list of child TABLE_LIST objects is kept in the TABLE object of
+ the parent for the whole life time of the MERGE table. It is
+ inserted in the statement list behind the MERGE parent TABLE_LIST
+ object when the MERGE table is opened. It is removed from the
+ statement list after the last child is opened.
+
+ All memeory used for the child TABLE_LIST objects and the strings
+ referred by it are taken from the parent TABLE::mem_root. Thus they
+ are all freed implicitly at the final close of the table.
+
+ TABLE::child_l -> TABLE_LIST::next_global -> TABLE_LIST::next_global
+ # # ^ # ^
+ # # | # |
+ # # +--------- TABLE_LIST::prev_global
+ # # |
+ # |<--- TABLE_LIST::prev_global |
+ # |
+ TABLE::child_last_l -----------------------------------------+
+
+ @param[in] callback_param data pointer as given to myrg_parent_open()
+ @param[in] filename file name of MyISAM table
+ without extension.
+
+ @return status
+ @retval 0 OK
+ @retval != 0 Error
+*/
+
+static int myisammrg_parent_open_callback(void *callback_param,
+ const char *filename)
{
- MI_KEYDEF *keyinfo;
- MI_COLUMNDEF *recinfo;
- MYRG_TABLE *u_table;
- uint recs;
- uint keys= table->s->keys;
- int error;
- char name_buff[FN_REFLEN];
+ ha_myisammrg *ha_myrg;
+ TABLE *parent;
+ TABLE_LIST *child_l;
+ const char *db;
+ const char *table_name;
+ uint dirlen;
+ char dir_path[FN_REFLEN];
+ DBUG_ENTER("myisammrg_parent_open_callback");
+
+ /* Extract child table name and database name from filename. */
+ dirlen= dirname_length(filename);
+ if (dirlen >= FN_REFLEN)
+ {
+ /* purecov: begin inspected */
+ DBUG_PRINT("error", ("name too long: '%.64s'", filename));
+ my_errno= ENAMETOOLONG;
+ DBUG_RETURN(1);
+ /* purecov: end */
+ }
+ table_name= filename + dirlen;
+ dirlen--; /* Strip off trailing '/'. */
+ memcpy(dir_path, filename, dirlen);
+ dir_path[dirlen]= '\0';
+ db= base_name(dir_path);
+ dirlen-= db - dir_path; /* This is now the length of 'db'. */
+ DBUG_PRINT("myrg", ("open: '%s'.'%s'", db, table_name));
+
+ ha_myrg= (ha_myisammrg*) callback_param;
+ parent= ha_myrg->table_ptr();
+
+ /* Get a TABLE_LIST object. */
+ if (!(child_l= (TABLE_LIST*) alloc_root(&parent->mem_root,
+ sizeof(TABLE_LIST))))
+ {
+ /* purecov: begin inspected */
+ DBUG_PRINT("error", ("my_malloc error: %d", my_errno));
+ DBUG_RETURN(1);
+ /* purecov: end */
+ }
+ bzero((char*) child_l, sizeof(TABLE_LIST));
+
+ /* Set database (schema) name. */
+ child_l->db_length= dirlen;
+ child_l->db= strmake_root(&parent->mem_root, db, dirlen);
+ /* Set table name. */
+ child_l->table_name_length= strlen(table_name);
+ child_l->table_name= strmake_root(&parent->mem_root, table_name,
+ child_l->table_name_length);
+ /* Convert to lowercase if required. */
+ if (lower_case_table_names && child_l->table_name_length)
+ child_l->table_name_length= my_casedn_str(files_charset_info,
+ child_l->table_name);
+ /* Set alias. */
+ child_l->alias= child_l->table_name;
+
+ /* Initialize table map to 'undefined'. */
+ child_l->init_child_def_version();
+
+ /* Link TABLE_LIST object into the parent list. */
+ if (!parent->child_last_l)
+ {
+ /* Initialize parent->child_last_l when handling first child. */
+ parent->child_last_l= &parent->child_l;
+ }
+ *parent->child_last_l= child_l;
+ child_l->prev_global= parent->child_last_l;
+ parent->child_last_l= &child_l->next_global;
+
+ DBUG_RETURN(0);
+}
+
+
+/**
+ @brief Callback function for attaching a MERGE child table.
+
+ @detail This function retrieves the MyISAM table handle from the
+ next child table. It is called for each child table.
+
+ @param[in] callback_param data pointer as given to
+ myrg_attach_children()
+
+ @return pointer to open MyISAM table structure
+ @retval !=NULL OK, returning pointer
+ @retval NULL, my_errno == 0 Ok, no more child tables
+ @retval NULL, my_errno != 0 error
+*/
+
+static MI_INFO *myisammrg_attach_children_callback(void *callback_param)
+{
+ ha_myisammrg *ha_myrg;
+ TABLE *parent;
+ TABLE *child;
+ TABLE_LIST *child_l;
+ MI_INFO *myisam;
+ DBUG_ENTER("myisammrg_attach_children_callback");
+
+ my_errno= 0;
+ ha_myrg= (ha_myisammrg*) callback_param;
+ parent= ha_myrg->table_ptr();
+
+ /* Get child list item. */
+ child_l= ha_myrg->next_child_attach;
+ if (!child_l)
+ {
+ DBUG_PRINT("myrg", ("No more children to attach"));
+ DBUG_RETURN(NULL);
+ }
+ child= child_l->table;
+ DBUG_PRINT("myrg", ("child table: '%s'.'%s' 0x%lx", child->s->db.str,
+ child->s->table_name.str, (long) child));
+ /*
+ Prepare for next child. Used as child_l in next call to this function.
+ We cannot rely on a NULL-terminated chain.
+ */
+ if (&child_l->next_global == parent->child_last_l)
+ {
+ DBUG_PRINT("myrg", ("attaching last child"));
+ ha_myrg->next_child_attach= NULL;
+ }
+ else
+ ha_myrg->next_child_attach= child_l->next_global;
+
+ /* Set parent reference. */
+ child->parent= parent;
+
+ /*
+ Do a quick compatibility check. The table def version is set when
+ the table share is created. The child def version is copied
+ from the table def version after a sucessful compatibility check.
+ We need to repeat the compatibility check only if a child is opened
+ from a different share than last time it was used with this MERGE
+ table.
+ */
+ DBUG_PRINT("myrg", ("table_def_version last: %lu current: %lu",
+ (ulong) child_l->get_child_def_version(),
+ (ulong) child->s->get_table_def_version()));
+ if (child_l->get_child_def_version() != child->s->get_table_def_version())
+ ha_myrg->need_compat_check= TRUE;
+
+ /*
+ If parent is temporary, children must be temporary too and vice
+ versa. This check must be done for every child on every open because
+ the table def version can overlap between temporary and
+ non-temporary tables. We need to detect the case where a
+ non-temporary table has been replaced with a temporary table of the
+ same version. Or vice versa. A very unlikely case, but it could
+ happen.
+ */
+ if (child->s->tmp_table != parent->s->tmp_table)
+ {
+ DBUG_PRINT("error", ("temporary table mismatch parent: %d child: %d",
+ parent->s->tmp_table, child->s->tmp_table));
+ my_errno= HA_ERR_WRONG_MRG_TABLE_DEF;
+ goto err;
+ }
+
+ /* Extract the MyISAM table structure pointer from the handler object. */
+ if ((child->file->ht->db_type != DB_TYPE_MYISAM) ||
+ !(myisam= ((ha_myisam*) child->file)->file_ptr()))
+ {
+ DBUG_PRINT("error", ("no MyISAM handle for child table: '%s'.'%s' 0x%lx",
+ child->s->db.str, child->s->table_name.str,
+ (long) child));
+ my_errno= HA_ERR_WRONG_MRG_TABLE_DEF;
+ }
+ DBUG_PRINT("myrg", ("MyISAM handle: 0x%lx my_errno: %d",
+ (long) myisam, my_errno));
+
+ err:
+ DBUG_RETURN(my_errno ? NULL : myisam);
+}
+
+
+/**
+ @brief Open a MERGE parent table, not its children.
+
+ @detail This function initializes the MERGE storage engine structures
+ and adds a child list of TABLE_LIST to the parent TABLE.
+
+ @param[in] name MERGE table path name
+ @param[in] mode read/write mode, unused
+ @param[in] test_if_locked open flags
+
+ @return status
+ @retval 0 OK
+ @retval -1 Error, my_errno gives reason
+*/
+
+int ha_myisammrg::open(const char *name, int mode __attribute__((unused)),
+ uint test_if_locked)
+{
+ DBUG_ENTER("ha_myisammrg::open");
+ DBUG_PRINT("myrg", ("name: '%s' table: 0x%lx", name, (long) table));
+ DBUG_PRINT("myrg", ("test_if_locked: %u", test_if_locked));
+
+ /* Save for later use. */
+ this->test_if_locked= test_if_locked;
+
+ /* retrieve children table list. */
+ my_errno= 0;
+ if (!(file= myrg_parent_open(name, myisammrg_parent_open_callback, this)))
+ {
+ DBUG_PRINT("error", ("my_errno %d", my_errno));
+ DBUG_RETURN(my_errno ? my_errno : -1);
+ }
+ DBUG_PRINT("myrg", ("MYRG_INFO: 0x%lx", (long) file));
+ DBUG_RETURN(0);
+}
+
+
+/**
+ @brief Attach children to a MERGE table.
+
+ @detail Let the storage engine attach its children through a callback
+ function. Check table definitions for consistency.
+
+ @note Special thd->open_options may be in effect. We can make use of
+ them in attach. I.e. we use HA_OPEN_FOR_REPAIR to report the names
+ of mismatching child tables. We cannot transport these options in
+ ha_myisammrg::test_if_locked because they may change after the
+ parent is opened. The parent is kept open in the table cache over
+ multiple statements and can be used by other threads. Open options
+ can change over time.
+
+ @return status
+ @retval 0 OK
+ @retval != 0 Error, my_errno gives reason
+*/
+
+int ha_myisammrg::attach_children(void)
+{
+ MYRG_TABLE *u_table;
+ MI_COLUMNDEF *recinfo;
+ MI_KEYDEF *keyinfo;
+ uint recs;
+ uint keys= table->s->keys;
+ int error;
+ DBUG_ENTER("ha_myisammrg::attach_children");
+ DBUG_PRINT("myrg", ("table: '%s'.'%s' 0x%lx", table->s->db.str,
+ table->s->table_name.str, (long) table));
+ DBUG_PRINT("myrg", ("test_if_locked: %u", this->test_if_locked));
+ DBUG_ASSERT(!this->file->children_attached);
- DBUG_PRINT("info", ("ha_myisammrg::open"));
- if (!(file=myrg_open(fn_format(name_buff,name,"","",
- MY_UNPACK_FILENAME|MY_APPEND_EXT),
- mode, test_if_locked)))
+ /*
+ Initialize variables that are used, modified, and/or set by
+ myisammrg_attach_children_callback().
+ 'next_child_attach' traverses the chain of TABLE_LIST objects
+ that has been compiled during myrg_parent_open(). Every call
+ to myisammrg_attach_children_callback() moves the pointer to
+ the next object.
+ 'need_compat_check' is set by myisammrg_attach_children_callback()
+ if a child fails the table def version check.
+ 'my_errno' is set by myisammrg_attach_children_callback() in
+ case of an error.
+ */
+ next_child_attach= table->child_l;
+ need_compat_check= FALSE;
+ my_errno= 0;
+
+ if (myrg_attach_children(this->file, this->test_if_locked |
+ current_thd->open_options,
+ myisammrg_attach_children_callback, this))
{
- DBUG_PRINT("info", ("ha_myisammrg::open exit %d", my_errno));
- return (my_errno ? my_errno : -1);
+ DBUG_PRINT("error", ("my_errno %d", my_errno));
+ DBUG_RETURN(my_errno ? my_errno : -1);
}
- DBUG_PRINT("info", ("ha_myisammrg::open myrg_extrafunc..."));
+ DBUG_PRINT("myrg", ("calling myrg_extrafunc"));
myrg_extrafunc(file, query_cache_invalidate_by_MyISAM_filename_ref);
if (!(test_if_locked == HA_OPEN_WAIT_IF_LOCKED ||
test_if_locked == HA_OPEN_ABORT_IF_LOCKED))
@@ -118,69 +490,147 @@ int ha_myisammrg::open(const char *name, int mode, uint test_if_locked)
if (!(test_if_locked & HA_OPEN_WAIT_IF_LOCKED))
myrg_extra(file,HA_EXTRA_WAIT_LOCK,0);
- if (table->s->reclength != stats.mean_rec_length && stats.mean_rec_length)
- {
- DBUG_PRINT("error",("reclength: %lu mean_rec_length: %lu",
- table->s->reclength, stats.mean_rec_length));
- if (test_if_locked & HA_OPEN_FOR_REPAIR)
- myrg_print_wrong_table(file->open_tables->table->filename);
- error= HA_ERR_WRONG_MRG_TABLE_DEF;
- goto err;
- }
- if ((error= table2myisam(table, &keyinfo, &recinfo, &recs)))
- {
- /* purecov: begin inspected */
- DBUG_PRINT("error", ("Failed to convert TABLE object to MyISAM "
- "key and column definition"));
- goto err;
- /* purecov: end */
- }
- for (u_table= file->open_tables; u_table < file->end_table; u_table++)
+ /*
+ The compatibility check is required only if one or more children do
+ not match their table def version from the last check. This will
+ always happen at the first attach because the reference child def
+ version is initialized to 'undefined' at open.
+ */
+ DBUG_PRINT("myrg", ("need_compat_check: %d", need_compat_check));
+ if (need_compat_check)
{
- if (check_definition(keyinfo, recinfo, keys, recs,
- u_table->table->s->keyinfo, u_table->table->s->rec,
- u_table->table->s->base.keys,
- u_table->table->s->base.fields, false))
+ TABLE_LIST *child_l;
+
+ if (table->s->reclength != stats.mean_rec_length && stats.mean_rec_length)
{
- error= HA_ERR_WRONG_MRG_TABLE_DEF;
+ DBUG_PRINT("error",("reclength: %lu mean_rec_length: %lu",
+ table->s->reclength, stats.mean_rec_length));
if (test_if_locked & HA_OPEN_FOR_REPAIR)
- myrg_print_wrong_table(u_table->table->filename);
- else
+ myrg_print_wrong_table(file->open_tables->table->filename);
+ error= HA_ERR_WRONG_MRG_TABLE_DEF;
+ goto err;
+ }
+ /*
+ Both recinfo and keyinfo are allocated by my_multi_malloc(), thus
+ only recinfo must be freed.
+ */
+ if ((error= table2myisam(table, &keyinfo, &recinfo, &recs)))
+ {
+ /* purecov: begin inspected */
+ DBUG_PRINT("error", ("failed to convert TABLE object to MyISAM "
+ "key and column definition"));
+ goto err;
+ /* purecov: end */
+ }
+ for (u_table= file->open_tables; u_table < file->end_table; u_table++)
+ {
+ if (check_definition(keyinfo, recinfo, keys, recs,
+ u_table->table->s->keyinfo, u_table->table->s->rec,
+ u_table->table->s->base.keys,
+ u_table->table->s->base.fields, false))
{
- my_free((uchar*) recinfo, MYF(0));
- goto err;
+ DBUG_PRINT("error", ("table definition mismatch: '%s'",
+ u_table->table->filename));
+ error= HA_ERR_WRONG_MRG_TABLE_DEF;
+ if (!(this->test_if_locked & HA_OPEN_FOR_REPAIR))
+ {
+ my_free((uchar*) recinfo, MYF(0));
+ goto err;
+ }
+ myrg_print_wrong_table(u_table->table->filename);
}
}
+ my_free((uchar*) recinfo, MYF(0));
+ if (error == HA_ERR_WRONG_MRG_TABLE_DEF)
+ goto err;
+
+ /* All checks passed so far. Now update child def version. */
+ for (child_l= table->child_l; ; child_l= child_l->next_global)
+ {
+ child_l->set_child_def_version(
+ child_l->table->s->get_table_def_version());
+
+ if (&child_l->next_global == table->child_last_l)
+ break;
+ }
}
- my_free((uchar*) recinfo, MYF(0));
- if (error == HA_ERR_WRONG_MRG_TABLE_DEF)
- goto err;
#if !defined(BIG_TABLES) || SIZEOF_OFF_T == 4
/* Merge table has more than 2G rows */
if (table->s->crashed)
{
+ DBUG_PRINT("error", ("MERGE table marked crashed"));
error= HA_ERR_WRONG_MRG_TABLE_DEF;
goto err;
}
#endif
- return (0);
+ DBUG_RETURN(0);
+
err:
- myrg_close(file);
- file=0;
- return (my_errno= error);
+ myrg_detach_children(file);
+ DBUG_RETURN(my_errno= error);
+}
+
+
+/**
+ @brief Detach all children from a MERGE table.
+
+ @note Detach must not touch the children in any way.
+ They may have been closed at ths point already.
+ All references to the children should be removed.
+
+ @return status
+ @retval 0 OK
+ @retval != 0 Error, my_errno gives reason
+*/
+
+int ha_myisammrg::detach_children(void)
+{
+ DBUG_ENTER("ha_myisammrg::detach_children");
+ DBUG_ASSERT(this->file && this->file->children_attached);
+
+ if (myrg_detach_children(this->file))
+ {
+ /* purecov: begin inspected */
+ DBUG_PRINT("error", ("my_errno %d", my_errno));
+ DBUG_RETURN(my_errno ? my_errno : -1);
+ /* purecov: end */
+ }
+ DBUG_RETURN(0);
}
+
+/**
+ @brief Close a MERGE parent table, not its children.
+
+ @note The children are expected to be closed separately by the caller.
+
+ @return status
+ @retval 0 OK
+ @retval != 0 Error, my_errno gives reason
+*/
+
int ha_myisammrg::close(void)
{
- return myrg_close(file);
+ int rc;
+ DBUG_ENTER("ha_myisammrg::close");
+ /*
+ Children must not be attached here. Unless the MERGE table has no
+ children. In this case children_attached is always true.
+ */
+ DBUG_ASSERT(!this->file->children_attached || !this->file->tables);
+ rc= myrg_close(file);
+ file= 0;
+ DBUG_RETURN(rc);
}
int ha_myisammrg::write_row(uchar * buf)
{
+ DBUG_ENTER("ha_myisammrg::write_row");
+ DBUG_ASSERT(this->file->children_attached);
ha_statistic_increment(&SSV::ha_write_count);
if (file->merge_insert_method == MERGE_INSERT_DISABLED || !file->tables)
- return (HA_ERR_TABLE_READONLY);
+ DBUG_RETURN(HA_ERR_TABLE_READONLY);
if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_INSERT)
table->timestamp_field->set_time();
@@ -188,13 +638,14 @@ int ha_myisammrg::write_row(uchar * buf)
{
int error;
if ((error= update_auto_increment()))
- return error;
+ DBUG_RETURN(error); /* purecov: inspected */
}
- return myrg_write(file,buf);
+ DBUG_RETURN(myrg_write(file,buf));
}
int ha_myisammrg::update_row(const uchar * old_data, uchar * new_data)
{
+ DBUG_ASSERT(this->file->children_attached);
ha_statistic_increment(&SSV::ha_update_count);
if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_UPDATE)
table->timestamp_field->set_time();
@@ -203,6 +654,7 @@ int ha_myisammrg::update_row(const uchar * old_data, uchar * new_data)
int ha_myisammrg::delete_row(const uchar * buf)
{
+ DBUG_ASSERT(this->file->children_attached);
ha_statistic_increment(&SSV::ha_delete_count);
return myrg_delete(file,buf);
}
@@ -211,6 +663,7 @@ int ha_myisammrg::index_read_map(uchar * buf, const uchar * key,
key_part_map keypart_map,
enum ha_rkey_function find_flag)
{
+ DBUG_ASSERT(this->file->children_attached);
ha_statistic_increment(&SSV::ha_read_key_count);
int error=myrg_rkey(file,buf,active_index, key, keypart_map, find_flag);
table->status=error ? STATUS_NOT_FOUND: 0;
@@ -221,6 +674,7 @@ int ha_myisammrg::index_read_idx_map(uchar * buf, uint index, const uchar * key,
key_part_map keypart_map,
enum ha_rkey_function find_flag)
{
+ DBUG_ASSERT(this->file->children_attached);
ha_statistic_increment(&SSV::ha_read_key_count);
int error=myrg_rkey(file,buf,index, key, keypart_map, find_flag);
table->status=error ? STATUS_NOT_FOUND: 0;
@@ -230,6 +684,7 @@ int ha_myisammrg::index_read_idx_map(uchar * buf, uint index, const uchar * key,
int ha_myisammrg::index_read_last_map(uchar *buf, const uchar *key,
key_part_map keypart_map)
{
+ DBUG_ASSERT(this->file->children_attached);
ha_statistic_increment(&SSV::ha_read_key_count);
int error=myrg_rkey(file,buf,active_index, key, keypart_map,
HA_READ_PREFIX_LAST);
@@ -239,6 +694,7 @@ int ha_myisammrg::index_read_last_map(uchar *buf, const uchar *key,
int ha_myisammrg::index_next(uchar * buf)
{
+ DBUG_ASSERT(this->file->children_attached);
ha_statistic_increment(&SSV::ha_read_next_count);
int error=myrg_rnext(file,buf,active_index);
table->status=error ? STATUS_NOT_FOUND: 0;
@@ -247,6 +703,7 @@ int ha_myisammrg::index_next(uchar * buf)
int ha_myisammrg::index_prev(uchar * buf)
{
+ DBUG_ASSERT(this->file->children_attached);
ha_statistic_increment(&SSV::ha_read_prev_count);
int error=myrg_rprev(file,buf, active_index);
table->status=error ? STATUS_NOT_FOUND: 0;
@@ -255,6 +712,7 @@ int ha_myisammrg::index_prev(uchar * buf)
int ha_myisammrg::index_first(uchar * buf)
{
+ DBUG_ASSERT(this->file->children_attached);
ha_statistic_increment(&SSV::ha_read_first_count);
int error=myrg_rfirst(file, buf, active_index);
table->status=error ? STATUS_NOT_FOUND: 0;
@@ -263,6 +721,7 @@ int ha_myisammrg::index_first(uchar * buf)
int ha_myisammrg::index_last(uchar * buf)
{
+ DBUG_ASSERT(this->file->children_attached);
ha_statistic_increment(&SSV::ha_read_last_count);
int error=myrg_rlast(file, buf, active_index);
table->status=error ? STATUS_NOT_FOUND: 0;
@@ -273,8 +732,13 @@ int ha_myisammrg::index_next_same(uchar * buf,
const uchar *key __attribute__((unused)),
uint length __attribute__((unused)))
{
+ int error;
+ DBUG_ASSERT(this->file->children_attached);
ha_statistic_increment(&SSV::ha_read_next_count);
- int error=myrg_rnext_same(file,buf);
+ do
+ {
+ error= myrg_rnext_same(file,buf);
+ } while (error == HA_ERR_RECORD_DELETED);
table->status=error ? STATUS_NOT_FOUND: 0;
return error;
}
@@ -282,12 +746,14 @@ int ha_myisammrg::index_next_same(uchar * buf,
int ha_myisammrg::rnd_init(bool scan)
{
+ DBUG_ASSERT(this->file->children_attached);
return myrg_reset(file);
}
int ha_myisammrg::rnd_next(uchar *buf)
{
+ DBUG_ASSERT(this->file->children_attached);
ha_statistic_increment(&SSV::ha_read_rnd_next_count);
int error=myrg_rrnd(file, buf, HA_OFFSET_ERROR);
table->status=error ? STATUS_NOT_FOUND: 0;
@@ -297,6 +763,7 @@ int ha_myisammrg::rnd_next(uchar *buf)
int ha_myisammrg::rnd_pos(uchar * buf, uchar *pos)
{
+ DBUG_ASSERT(this->file->children_attached);
ha_statistic_increment(&SSV::ha_read_rnd_count);
int error=myrg_rrnd(file, buf, my_get_ptr(pos,ref_length));
table->status=error ? STATUS_NOT_FOUND: 0;
@@ -305,6 +772,7 @@ int ha_myisammrg::rnd_pos(uchar * buf, uchar *pos)
void ha_myisammrg::position(const uchar *record)
{
+ DBUG_ASSERT(this->file->children_attached);
ulonglong row_position= myrg_position(file);
my_store_ptr(ref, ref_length, (my_off_t) row_position);
}
@@ -313,6 +781,7 @@ void ha_myisammrg::position(const uchar *record)
ha_rows ha_myisammrg::records_in_range(uint inx, key_range *min_key,
key_range *max_key)
{
+ DBUG_ASSERT(this->file->children_attached);
return (ha_rows) myrg_records_in_range(file, (int) inx, min_key, max_key);
}
@@ -320,6 +789,7 @@ ha_rows ha_myisammrg::records_in_range(uint inx, key_range *min_key,
int ha_myisammrg::info(uint flag)
{
MYMERGE_INFO mrg_info;
+ DBUG_ASSERT(this->file->children_attached);
(void) myrg_status(file,&mrg_info,flag);
/*
The following fails if one has not compiled MySQL with -DBIG_TABLES
@@ -389,6 +859,23 @@ int ha_myisammrg::info(uint flag)
int ha_myisammrg::extra(enum ha_extra_function operation)
{
+ if (operation == HA_EXTRA_ATTACH_CHILDREN)
+ {
+ int rc= attach_children();
+ if (!rc)
+ (void) extra(HA_EXTRA_NO_READCHECK); // Not needed in SQL
+ return(rc);
+ }
+ else if (operation == HA_EXTRA_DETACH_CHILDREN)
+ {
+ /*
+ Note that detach must not touch the children in any way.
+ They may have been closed at ths point already.
+ */
+ int rc= detach_children();
+ return(rc);
+ }
+
/* As this is just a mapping, we don't have to force the underlying
tables to be closed */
if (operation == HA_EXTRA_FORCE_REOPEN ||
@@ -407,6 +894,7 @@ int ha_myisammrg::reset(void)
int ha_myisammrg::extra_opt(enum ha_extra_function operation, ulong cache_size)
{
+ DBUG_ASSERT(this->file->children_attached);
if ((specialflag & SPECIAL_SAFE_MODE) && operation == HA_EXTRA_WRITE_CACHE)
return 0;
return myrg_extra(file, operation, (void*) &cache_size);
@@ -414,11 +902,20 @@ int ha_myisammrg::extra_opt(enum ha_extra_function operation, ulong cache_size)
int ha_myisammrg::external_lock(THD *thd, int lock_type)
{
+ DBUG_ASSERT(this->file->children_attached);
return myrg_lock_database(file,lock_type);
}
uint ha_myisammrg::lock_count(void) const
{
+ /*
+ Return the real lock count even if the children are not attached.
+ This method is used for allocating memory. If we would return 0
+ to another thread (e.g. doing FLUSH TABLE), and attach the children
+ before the other thread calls store_lock(), then we would return
+ more locks in store_lock() than we claimed by lock_count(). The
+ other tread would overrun its memory.
+ */
return file->tables;
}
@@ -429,6 +926,24 @@ THR_LOCK_DATA **ha_myisammrg::store_lock(THD *thd,
{
MYRG_TABLE *open_table;
+ /*
+ This method can be called while another thread is attaching the
+ children. If the processor reorders instructions or write to memory,
+ 'children_attached' could be set before 'open_tables' has all the
+ pointers to the children. Use of a mutex here and in
+ myrg_attach_children() forces consistent data.
+ */
+ pthread_mutex_lock(&this->file->mutex);
+
+ /*
+ When MERGE table is open, but not yet attached, other threads
+ could flush it, which means call mysql_lock_abort_for_thread()
+ on this threads TABLE. 'children_attached' is FALSE in this
+ situaton. Since the table is not locked, return no lock data.
+ */
+ if (!this->file->children_attached)
+ goto end; /* purecov: tested */
+
for (open_table=file->open_tables ;
open_table != file->end_table ;
open_table++)
@@ -437,6 +952,9 @@ THR_LOCK_DATA **ha_myisammrg::store_lock(THD *thd,
if (lock_type != TL_IGNORE && open_table->table->lock.type == TL_UNLOCK)
open_table->table->lock.type=lock_type;
}
+
+ end:
+ pthread_mutex_unlock(&this->file->mutex);
return to;
}
@@ -522,47 +1040,50 @@ int ha_myisammrg::create(const char *name, register TABLE *form,
uint dirlgt= dirname_length(name);
DBUG_ENTER("ha_myisammrg::create");
+ /* Allocate a table_names array in thread mem_root. */
if (!(table_names= (const char**)
thd->alloc((create_info->merge_list.elements+1) * sizeof(char*))))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+
+ /* Create child path names. */
for (pos= table_names; tables; tables= tables->next_local)
{
const char *table_name;
- TABLE *tbl= 0;
- if (create_info->options & HA_LEX_CREATE_TMP_TABLE)
- tbl= find_temporary_table(thd, tables);
- if (!tbl)
- {
- /*
- Construct the path to the MyISAM table. Try to meet two conditions:
- 1.) Allow to include MyISAM tables from different databases, and
- 2.) allow for moving DATADIR around in the file system.
- The first means that we need paths in the .MRG file. The second
- means that we should not have absolute paths in the .MRG file.
- The best, we can do, is to use 'mysql_data_home', which is '.'
- in mysqld and may be an absolute path in an embedded server.
- This means that it might not be possible to move the DATADIR of
- an embedded server without changing the paths in the .MRG file.
- */
- uint length= build_table_filename(buff, sizeof(buff),
- tables->db, tables->table_name, "", 0);
- /*
- If a MyISAM table is in the same directory as the MERGE table,
- we use the table name without a path. This means that the
- DATADIR can easily be moved even for an embedded server as long
- as the MyISAM tables are from the same database as the MERGE table.
- */
- if ((dirname_length(buff) == dirlgt) && ! memcmp(buff, name, dirlgt))
- table_name= tables->table_name;
- else
- if (! (table_name= thd->strmake(buff, length)))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- }
+
+ /*
+ Construct the path to the MyISAM table. Try to meet two conditions:
+ 1.) Allow to include MyISAM tables from different databases, and
+ 2.) allow for moving DATADIR around in the file system.
+ The first means that we need paths in the .MRG file. The second
+ means that we should not have absolute paths in the .MRG file.
+ The best, we can do, is to use 'mysql_data_home', which is '.'
+ in mysqld and may be an absolute path in an embedded server.
+ This means that it might not be possible to move the DATADIR of
+ an embedded server without changing the paths in the .MRG file.
+
+ Do the same even for temporary tables. MERGE children are now
+ opened through the table cache. They are opened by db.table_name,
+ not by their path name.
+ */
+ uint length= build_table_filename(buff, sizeof(buff),
+ tables->db, tables->table_name, "", 0);
+ /*
+ If a MyISAM table is in the same directory as the MERGE table,
+ we use the table name without a path. This means that the
+ DATADIR can easily be moved even for an embedded server as long
+ as the MyISAM tables are from the same database as the MERGE table.
+ */
+ if ((dirname_length(buff) == dirlgt) && ! memcmp(buff, name, dirlgt))
+ table_name= tables->table_name;
else
- table_name= tbl->s->path.str;
+ if (! (table_name= thd->strmake(buff, length)))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM); /* purecov: inspected */
+
*pos++= table_name;
}
*pos=0;
+
+ /* Create a MERGE meta file from the table_names array. */
DBUG_RETURN(myrg_create(fn_format(buff,name,"","",
MY_RESOLVE_SYMLINKS|
MY_UNPACK_FILENAME|MY_APPEND_EXT),
@@ -645,7 +1166,7 @@ static int myisammrg_init(void *p)
myisammrg_hton->db_type= DB_TYPE_MRG_MYISAM;
myisammrg_hton->create= myisammrg_create_handler;
myisammrg_hton->panic= myisammrg_panic;
- myisammrg_hton->flags= HTON_CAN_RECREATE|HTON_NO_PARTITION;
+ myisammrg_hton->flags= HTON_NO_PARTITION;
return 0;
}
diff --git a/storage/myisammrg/ha_myisammrg.h b/storage/myisammrg/ha_myisammrg.h
index 1207ca96851..7516b8193c7 100644
--- a/storage/myisammrg/ha_myisammrg.h
+++ b/storage/myisammrg/ha_myisammrg.h
@@ -27,8 +27,12 @@ class ha_myisammrg: public handler
MYRG_INFO *file;
public:
+ TABLE_LIST *next_child_attach; /* next child to attach */
+ uint test_if_locked; /* flags from ::open() */
+ bool need_compat_check; /* if need compatibility check */
+
ha_myisammrg(handlerton *hton, TABLE_SHARE *table_arg);
- ~ha_myisammrg() {}
+ ~ha_myisammrg();
const char *table_type() const { return "MRG_MyISAM"; }
const char **bas_ext() const;
const char *index_type(uint key_number);
@@ -53,6 +57,8 @@ class ha_myisammrg: public handler
{ return ulonglong2double(stats.data_file_length) / IO_SIZE + file->tables; }
int open(const char *name, int mode, uint test_if_locked);
+ int attach_children(void);
+ int detach_children(void);
int close(void);
int write_row(uchar * buf);
int update_row(const uchar * old_data, uchar * new_data);
@@ -85,6 +91,7 @@ class ha_myisammrg: public handler
void update_create_info(HA_CREATE_INFO *create_info);
void append_create_info(String *packet);
MYRG_INFO *myrg_info() { return file; }
+ TABLE *table_ptr() { return table; }
bool check_if_incompatible_data(HA_CREATE_INFO *info, uint table_changes);
int check(THD* thd, HA_CHECK_OPT* check_opt);
};
diff --git a/storage/myisammrg/myrg_close.c b/storage/myisammrg/myrg_close.c
index baae24634b3..97216ed47fe 100644
--- a/storage/myisammrg/myrg_close.c
+++ b/storage/myisammrg/myrg_close.c
@@ -23,13 +23,42 @@ int myrg_close(MYRG_INFO *info)
MYRG_TABLE *file;
DBUG_ENTER("myrg_close");
- for (file=info->open_tables ; file != info->end_table ; file++)
- if ((new_error=mi_close(file->table)))
- error=new_error;
+ /*
+ Assume that info->children_attached means that this is called from
+ direct use of MERGE, not from a MySQL server. In this case the
+ children must be closed and info->rec_per_key_part is part of the
+ 'info' multi_alloc.
+ If info->children_attached is false, this is called from a MySQL
+ server. Children are closed independently but info->rec_per_key_part
+ must be freed.
+ Just in case of a server panic (myrg_panic()) info->children_attached
+ might be true. We would close the children though they should be
+ closed independently and info->rec_per_key_part is not freed.
+ This should be acceptable for a panic.
+ In case of a MySQL server and no children, children_attached is
+ always true. In this case no rec_per_key_part has been allocated.
+ So it is correct to use the branch where an empty list of tables is
+ (not) closed.
+ */
+ if (info->children_attached)
+ {
+ for (file= info->open_tables; file != info->end_table; file++)
+ {
+ /* purecov: begin inspected */
+ if ((new_error= mi_close(file->table)))
+ error= new_error;
+ else
+ file->table= NULL;
+ /* purecov: end */
+ }
+ }
+ else
+ my_free((uchar*) info->rec_per_key_part, MYF(MY_ALLOW_ZERO_PTR));
delete_queue(&info->by_key);
pthread_mutex_lock(&THR_LOCK_open);
myrg_open_list=list_delete(myrg_open_list,&info->open_list);
pthread_mutex_unlock(&THR_LOCK_open);
+ VOID(pthread_mutex_destroy(&info->mutex));
my_free((uchar*) info,MYF(0));
if (error)
{
diff --git a/storage/myisammrg/myrg_extra.c b/storage/myisammrg/myrg_extra.c
index a1e6e3f8d4d..3d14f6a56e6 100644
--- a/storage/myisammrg/myrg_extra.c
+++ b/storage/myisammrg/myrg_extra.c
@@ -29,6 +29,8 @@ int myrg_extra(MYRG_INFO *info,enum ha_extra_function function,
DBUG_ENTER("myrg_extra");
DBUG_PRINT("info",("function: %lu", (ulong) function));
+ if (!info->children_attached)
+ DBUG_RETURN(1);
if (function == HA_EXTRA_CACHE)
{
info->cache_in_use=1;
@@ -73,6 +75,8 @@ int myrg_reset(MYRG_INFO *info)
MYRG_TABLE *file;
DBUG_ENTER("myrg_reset");
+ if (!info->children_attached)
+ DBUG_RETURN(1);
info->cache_in_use=0;
info->current_table=0;
info->last_used_table= info->open_tables;
diff --git a/storage/myisammrg/myrg_open.c b/storage/myisammrg/myrg_open.c
index 500d3a29327..b5002116164 100644
--- a/storage/myisammrg/myrg_open.c
+++ b/storage/myisammrg/myrg_open.c
@@ -26,8 +26,14 @@
open a MyISAM MERGE table
if handle_locking is 0 then exit with error if some table is locked
if handle_locking is 1 then wait if table is locked
-*/
+ NOTE: This function is not used in the MySQL server. It is for
+ MERGE use independent from MySQL. Currently there is some code
+ duplication between myrg_open() and myrg_parent_open() +
+ myrg_attach_children(). Please duplicate changes in these
+ functions or make common sub-functions.
+*/
+/* purecov: begin deadcode */ /* not used in MySQL server */
MYRG_INFO *myrg_open(const char *name, int mode, int handle_locking)
{
@@ -107,13 +113,11 @@ MYRG_INFO *myrg_open(const char *name, int mode, int handle_locking)
key_parts*sizeof(long),
MYF(MY_WME|MY_ZEROFILL))))
goto err;
- if (files)
- {
- m_info->open_tables=(MYRG_TABLE *) (m_info+1);
- m_info->rec_per_key_part=(ulong *) (m_info->open_tables+files);
- m_info->tables= files;
- files= 0;
- }
+ DBUG_ASSERT(files);
+ m_info->open_tables=(MYRG_TABLE *) (m_info+1);
+ m_info->rec_per_key_part=(ulong *) (m_info->open_tables+files);
+ m_info->tables= files;
+ files= 0;
m_info->reclength=isam->s->base.reclength;
min_keys= isam->s->base.keys;
errpos=3;
@@ -163,9 +167,11 @@ MYRG_INFO *myrg_open(const char *name, int mode, int handle_locking)
/* this works ok if the table list is empty */
m_info->end_table=m_info->open_tables+files;
m_info->last_used_table=m_info->open_tables;
+ m_info->children_attached= TRUE;
VOID(my_close(fd,MYF(0)));
end_io_cache(&file);
+ VOID(pthread_mutex_init(&m_info->mutex, MY_MUTEX_INIT_FAST));
m_info->open_list.data=(void*) m_info;
pthread_mutex_lock(&THR_LOCK_open);
myrg_open_list=list_add(myrg_open_list,&m_info->open_list);
@@ -189,3 +195,330 @@ err:
my_errno=save_errno;
DBUG_RETURN (NULL);
}
+/* purecov: end */
+
+
+/**
+ @brief Open parent table of a MyISAM MERGE table.
+
+ @detail Open MERGE meta file to get the table name paths for the child
+ tables. Count the children. Allocate and initialize MYRG_INFO
+ structure. Call a callback function for each child table.
+
+ @param[in] parent_name merge table name path as "database/table"
+ @param[in] callback function to call for each child table
+ @param[in] callback_param data pointer to give to the callback
+
+ @return MYRG_INFO pointer
+ @retval != NULL OK
+ @retval NULL Error
+
+ @note: Currently there is some code duplication between myrg_open()
+ and myrg_parent_open() + myrg_attach_children(). Please duplicate
+ changes in these functions or make common sub-functions.
+*/
+
+MYRG_INFO *myrg_parent_open(const char *parent_name,
+ int (*callback)(void*, const char*),
+ void *callback_param)
+{
+ MYRG_INFO *m_info;
+ int rc;
+ int errpos;
+ int save_errno;
+ int insert_method;
+ uint length;
+ uint dir_length;
+ uint child_count;
+ size_t name_buff_length;
+ File fd;
+ IO_CACHE file_cache;
+ char parent_name_buff[FN_REFLEN * 2];
+ char child_name_buff[FN_REFLEN];
+ DBUG_ENTER("myrg_parent_open");
+
+ rc= 1;
+ errpos= 0;
+ bzero((char*) &file_cache, sizeof(file_cache));
+
+ /* Open MERGE meta file. */
+ if ((fd= my_open(fn_format(parent_name_buff, parent_name, "", MYRG_NAME_EXT,
+ MY_UNPACK_FILENAME|MY_APPEND_EXT),
+ O_RDONLY | O_SHARE, MYF(0))) < 0)
+ goto err; /* purecov: inspected */
+ errpos= 1;
+
+ if (init_io_cache(&file_cache, fd, 4 * IO_SIZE, READ_CACHE, 0, 0,
+ MYF(MY_WME | MY_NABP)))
+ goto err; /* purecov: inspected */
+ errpos= 2;
+
+ /* Count children. Determine insert method. */
+ child_count= 0;
+ insert_method= 0;
+ while ((length= my_b_gets(&file_cache, child_name_buff, FN_REFLEN - 1)))
+ {
+ /* Remove line terminator. */
+ if (child_name_buff[length - 1] == '\n')
+ child_name_buff[--length]= '\0';
+
+ /* Skip empty lines. */
+ if (!child_name_buff[0])
+ continue; /* purecov: inspected */
+
+ /* Skip comments, but evaluate insert method. */
+ if (child_name_buff[0] == '#')
+ {
+ if (!strncmp(child_name_buff + 1, "INSERT_METHOD=", 14))
+ {
+ /* Compare buffer with global methods list: merge_insert_method. */
+ insert_method= find_type(child_name_buff + 15,
+ &merge_insert_method, 2);
+ }
+ continue;
+ }
+
+ /* Count the child. */
+ child_count++;
+ }
+
+ /* Allocate MERGE parent table structure. */
+ if (!(m_info= (MYRG_INFO*) my_malloc(sizeof(MYRG_INFO) +
+ child_count * sizeof(MYRG_TABLE),
+ MYF(MY_WME | MY_ZEROFILL))))
+ goto err; /* purecov: inspected */
+ errpos= 3;
+ m_info->open_tables= (MYRG_TABLE*) (m_info + 1);
+ m_info->tables= child_count;
+ m_info->merge_insert_method= insert_method > 0 ? insert_method : 0;
+ /* This works even if the table list is empty. */
+ m_info->end_table= m_info->open_tables + child_count;
+ if (!child_count)
+ {
+ /* Do not attach/detach an empty child list. */
+ m_info->children_attached= TRUE;
+ }
+
+ /* Call callback for each child. */
+ dir_length= dirname_part(parent_name_buff, parent_name, &name_buff_length);
+ my_b_seek(&file_cache, 0);
+ while ((length= my_b_gets(&file_cache, child_name_buff, FN_REFLEN - 1)))
+ {
+ /* Remove line terminator. */
+ if (child_name_buff[length - 1] == '\n')
+ child_name_buff[--length]= '\0';
+
+ /* Skip empty lines and comments. */
+ if (!child_name_buff[0] || (child_name_buff[0] == '#'))
+ continue;
+
+ if (!has_path(child_name_buff))
+ {
+ VOID(strmake(parent_name_buff + dir_length, child_name_buff,
+ sizeof(parent_name_buff) - 1 - dir_length));
+ VOID(cleanup_dirname(child_name_buff, parent_name_buff));
+ }
+ else
+ fn_format(child_name_buff, child_name_buff, "", "", 0);
+ DBUG_PRINT("info", ("child: '%s'", child_name_buff));
+
+ /* Callback registers child with handler table. */
+ if ((rc= (*callback)(callback_param, child_name_buff)))
+ goto err; /* purecov: inspected */
+ }
+
+ end_io_cache(&file_cache);
+ VOID(my_close(fd, MYF(0)));
+ VOID(pthread_mutex_init(&m_info->mutex, MY_MUTEX_INIT_FAST));
+
+ m_info->open_list.data= (void*) m_info;
+ pthread_mutex_lock(&THR_LOCK_open);
+ myrg_open_list= list_add(myrg_open_list, &m_info->open_list);
+ pthread_mutex_unlock(&THR_LOCK_open);
+
+ DBUG_RETURN(m_info);
+
+ /* purecov: begin inspected */
+ err:
+ save_errno= my_errno;
+ switch (errpos) {
+ case 3:
+ my_free((char*) m_info, MYF(0));
+ /* Fall through */
+ case 2:
+ end_io_cache(&file_cache);
+ /* Fall through */
+ case 1:
+ VOID(my_close(fd, MYF(0)));
+ }
+ my_errno= save_errno;
+ DBUG_RETURN (NULL);
+ /* purecov: end */
+}
+
+
+/**
+ @brief Attach children to a MyISAM MERGE parent table.
+
+ @detail Call a callback function for each child table.
+ The callback returns the MyISAM table handle of the child table.
+ Check table definition match.
+
+ @param[in] m_info MERGE parent table structure
+ @param[in] handle_locking if contains HA_OPEN_FOR_REPAIR, warn about
+ incompatible child tables, but continue
+ @param[in] callback function to call for each child table
+ @param[in] callback_param data pointer to give to the callback
+
+ @return status
+ @retval 0 OK
+ @retval != 0 Error
+
+ @note: Currently there is some code duplication between myrg_open()
+ and myrg_parent_open() + myrg_attach_children(). Please duplicate
+ changes in these functions or make common sub-functions.
+*/
+
+int myrg_attach_children(MYRG_INFO *m_info, int handle_locking,
+ MI_INFO *(*callback)(void*),
+ void *callback_param)
+{
+ ulonglong file_offset;
+ MI_INFO *myisam;
+ int rc;
+ int errpos;
+ int save_errno;
+ uint idx;
+ uint child_nr;
+ uint key_parts;
+ uint min_keys;
+ DBUG_ENTER("myrg_attach_children");
+ DBUG_PRINT("myrg", ("handle_locking: %d", handle_locking));
+
+ /*
+ This function can be called while another thread is trying to abort
+ locks of this MERGE table. If the processor reorders instructions or
+ write to memory, 'children_attached' could be set before
+ 'open_tables' has all the pointers to the children. Use of a mutex
+ here and in ha_myisammrg::store_lock() forces consistent data.
+ */
+ pthread_mutex_lock(&m_info->mutex);
+ rc= 1;
+ errpos= 0;
+ file_offset= 0;
+ LINT_INIT(key_parts);
+ min_keys= 0;
+ child_nr= 0;
+ while ((myisam= (*callback)(callback_param)))
+ {
+ DBUG_PRINT("myrg", ("child_nr: %u table: '%s'",
+ child_nr, myisam->filename));
+ DBUG_ASSERT(child_nr < m_info->tables);
+
+ /* Special handling when the first child is attached. */
+ if (!child_nr)
+ {
+ m_info->reclength= myisam->s->base.reclength;
+ min_keys= myisam->s->base.keys;
+ key_parts= myisam->s->base.key_parts;
+ if (!m_info->rec_per_key_part)
+ {
+ if(!(m_info->rec_per_key_part= (ulong*)
+ my_malloc(key_parts * sizeof(long), MYF(MY_WME|MY_ZEROFILL))))
+ goto err; /* purecov: inspected */
+ errpos= 1;
+ }
+ }
+
+ /* Add MyISAM table info. */
+ m_info->open_tables[child_nr].table= myisam;
+ m_info->open_tables[child_nr].file_offset= (my_off_t) file_offset;
+ file_offset+= myisam->state->data_file_length;
+
+ /* Check table definition match. */
+ if (m_info->reclength != myisam->s->base.reclength)
+ {
+ DBUG_PRINT("error", ("definition mismatch table: '%s' repair: %d",
+ myisam->filename,
+ (handle_locking & HA_OPEN_FOR_REPAIR)));
+ my_errno= HA_ERR_WRONG_MRG_TABLE_DEF;
+ if (handle_locking & HA_OPEN_FOR_REPAIR)
+ {
+ myrg_print_wrong_table(myisam->filename);
+ continue;
+ }
+ goto err;
+ }
+
+ m_info->options|= myisam->s->options;
+ m_info->records+= myisam->state->records;
+ m_info->del+= myisam->state->del;
+ m_info->data_file_length+= myisam->state->data_file_length;
+ if (min_keys > myisam->s->base.keys)
+ min_keys= myisam->s->base.keys; /* purecov: inspected */
+ for (idx= 0; idx < key_parts; idx++)
+ m_info->rec_per_key_part[idx]+= (myisam->s->state.rec_per_key_part[idx] /
+ m_info->tables);
+ child_nr++;
+ }
+
+ if (my_errno == HA_ERR_WRONG_MRG_TABLE_DEF)
+ goto err;
+ if (sizeof(my_off_t) == 4 && file_offset > (ulonglong) (ulong) ~0L)
+ {
+ my_errno= HA_ERR_RECORD_FILE_FULL;
+ goto err;
+ }
+ /* Don't mark table readonly, for ALTER TABLE ... UNION=(...) to work */
+ m_info->options&= ~(HA_OPTION_COMPRESS_RECORD | HA_OPTION_READ_ONLY_DATA);
+ m_info->keys= min_keys;
+ m_info->last_used_table= m_info->open_tables;
+ m_info->children_attached= TRUE;
+ pthread_mutex_unlock(&m_info->mutex);
+ DBUG_RETURN(0);
+
+err:
+ save_errno= my_errno;
+ switch (errpos) {
+ case 1:
+ my_free((char*) m_info->rec_per_key_part, MYF(0));
+ m_info->rec_per_key_part= NULL;
+ }
+ pthread_mutex_unlock(&m_info->mutex);
+ my_errno= save_errno;
+ DBUG_RETURN(1);
+}
+
+
+/**
+ @brief Detach children from a MyISAM MERGE parent table.
+
+ @param[in] m_info MERGE parent table structure
+
+ @note Detach must not touch the children in any way.
+ They may have been closed at ths point already.
+ All references to the children should be removed.
+
+ @return status
+ @retval 0 OK
+*/
+
+int myrg_detach_children(MYRG_INFO *m_info)
+{
+ DBUG_ENTER("myrg_detach_children");
+ /* For symmetry with myrg_attach_children() we use the mutex here. */
+ pthread_mutex_lock(&m_info->mutex);
+ if (m_info->tables)
+ {
+ /* Do not attach/detach an empty child list. */
+ m_info->children_attached= FALSE;
+ bzero((char*) m_info->open_tables, m_info->tables * sizeof(MYRG_TABLE));
+ }
+ m_info->records= 0;
+ m_info->del= 0;
+ m_info->data_file_length= 0;
+ m_info->options= 0;
+ pthread_mutex_unlock(&m_info->mutex);
+ DBUG_RETURN(0);
+}
+
diff --git a/storage/ndb/include/kernel/AttributeHeader.hpp b/storage/ndb/include/kernel/AttributeHeader.hpp
index 613e3d19d1b..52f93b6cd05 100644
--- a/storage/ndb/include/kernel/AttributeHeader.hpp
+++ b/storage/ndb/include/kernel/AttributeHeader.hpp
@@ -52,8 +52,7 @@ public:
// NOTE: in 5.1 ctors and init take size in bytes
/** Initialize AttributeHeader at location aHeaderPtr */
- static AttributeHeader& init(void* aHeaderPtr, Uint32 anAttributeId,
- Uint32 aByteSize);
+ static void init(Uint32* aHeaderPtr, Uint32 anAttributeId, Uint32 aByteSize);
/** Returns size of AttributeHeader (usually one or two words) */
Uint32 getHeaderSize() const; // In 32-bit words
@@ -113,10 +112,11 @@ public:
*/
inline
-AttributeHeader& AttributeHeader::init(void* aHeaderPtr, Uint32 anAttributeId,
- Uint32 aByteSize)
+void AttributeHeader::init(Uint32* aHeaderPtr, Uint32 anAttributeId,
+ Uint32 aByteSize)
{
- return * new (aHeaderPtr) AttributeHeader(anAttributeId, aByteSize);
+ AttributeHeader ah(anAttributeId, aByteSize);
+ *aHeaderPtr = ah.m_value;
}
inline
diff --git a/storage/ndb/include/kernel/GlobalSignalNumbers.h b/storage/ndb/include/kernel/GlobalSignalNumbers.h
index aa0596f102a..9653c20260f 100644
--- a/storage/ndb/include/kernel/GlobalSignalNumbers.h
+++ b/storage/ndb/include/kernel/GlobalSignalNumbers.h
@@ -195,9 +195,11 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES;
/* 132 not unused */
/* 133 not unused */
#define GSN_CM_HEARTBEAT 134 /* distr. */
-/* 135 unused */
-/* 136 unused */
-/* 137 unused */
+
+#define GSN_PREPARE_COPY_FRAG_REQ 135
+#define GSN_PREPARE_COPY_FRAG_REF 136
+#define GSN_PREPARE_COPY_FRAG_CONF 137
+
#define GSN_CM_NODEINFOCONF 138 /* distr. */
#define GSN_CM_NODEINFOREF 139 /* distr. */
#define GSN_CM_NODEINFOREQ 140 /* distr. */
diff --git a/storage/ndb/include/kernel/signaldata/AccScan.hpp b/storage/ndb/include/kernel/signaldata/AccScan.hpp
index 73d69825069..a0aa38c8d8e 100644
--- a/storage/ndb/include/kernel/signaldata/AccScan.hpp
+++ b/storage/ndb/include/kernel/signaldata/AccScan.hpp
@@ -49,6 +49,7 @@ private:
Uint32 savePointId;
Uint32 gci;
};
+ Uint32 maxPage;
/**
* Previously there where also a scan type
diff --git a/storage/ndb/include/kernel/signaldata/CopyFrag.hpp b/storage/ndb/include/kernel/signaldata/CopyFrag.hpp
index 06dd4070264..d985358dce4 100644
--- a/storage/ndb/include/kernel/signaldata/CopyFrag.hpp
+++ b/storage/ndb/include/kernel/signaldata/CopyFrag.hpp
@@ -29,7 +29,7 @@ class CopyFragReq {
*/
friend class Dblqh;
public:
- STATIC_CONST( SignalLength = 9 );
+ STATIC_CONST( SignalLength = 10 );
private:
Uint32 userPtr;
@@ -42,6 +42,7 @@ private:
Uint32 gci;
Uint32 nodeCount;
Uint32 nodeList[1];
+ //Uint32 maxPage; is stored in nodeList[nodeCount]
};
class CopyFragConf {
@@ -95,4 +96,42 @@ struct UpdateFragDistKeyOrd
STATIC_CONST( SignalLength = 3 );
};
+struct PrepareCopyFragReq
+{
+ STATIC_CONST( SignalLength = 6 );
+
+ Uint32 senderRef;
+ Uint32 senderData;
+ Uint32 tableId;
+ Uint32 fragId;
+ Uint32 copyNodeId;
+ Uint32 startingNodeId;
+};
+
+struct PrepareCopyFragRef
+{
+ Uint32 senderRef;
+ Uint32 senderData;
+ Uint32 tableId;
+ Uint32 fragId;
+ Uint32 copyNodeId;
+ Uint32 startingNodeId;
+ Uint32 errorCode;
+
+ STATIC_CONST( SignalLength = 7 );
+};
+
+struct PrepareCopyFragConf
+{
+ STATIC_CONST( SignalLength = 7 );
+
+ Uint32 senderRef;
+ Uint32 senderData;
+ Uint32 tableId;
+ Uint32 fragId;
+ Uint32 copyNodeId;
+ Uint32 startingNodeId;
+ Uint32 maxPageNo;
+};
+
#endif
diff --git a/storage/ndb/include/kernel/signaldata/ScanTab.hpp b/storage/ndb/include/kernel/signaldata/ScanTab.hpp
index 0074078533f..3d2071ca019 100644
--- a/storage/ndb/include/kernel/signaldata/ScanTab.hpp
+++ b/storage/ndb/include/kernel/signaldata/ScanTab.hpp
@@ -46,6 +46,7 @@ public:
* Length of signal
*/
STATIC_CONST( StaticLength = 11 );
+ STATIC_CONST( MaxTotalAttrInfo = 0xFFFF );
private:
diff --git a/storage/ndb/include/kernel/signaldata/TcKeyConf.hpp b/storage/ndb/include/kernel/signaldata/TcKeyConf.hpp
index b8562875ef5..fd8932c3c87 100644
--- a/storage/ndb/include/kernel/signaldata/TcKeyConf.hpp
+++ b/storage/ndb/include/kernel/signaldata/TcKeyConf.hpp
@@ -46,7 +46,7 @@ public:
*/
STATIC_CONST( StaticLength = 5 );
STATIC_CONST( OperationLength = 2 );
- STATIC_CONST( SimpleReadBit = (((Uint32)1) << 31) );
+ STATIC_CONST( DirtyReadBit = (((Uint32)1) << 31) );
private:
diff --git a/storage/ndb/include/ndb_version.h.in b/storage/ndb/include/ndb_version.h.in
index 5405ad4d7aa..6a479433b3b 100644
--- a/storage/ndb/include/ndb_version.h.in
+++ b/storage/ndb/include/ndb_version.h.in
@@ -88,5 +88,52 @@ Uint32 ndbGetOwnVersion();
#define NDBD_NODE_VERSION_REP NDB_MAKE_VERSION(6,1,1)
+#define NDBD_PREPARE_COPY_FRAG_VERSION NDB_MAKE_VERSION(6,2,1)
+#define NDBD_PREPARE_COPY_FRAG_V2_51 NDB_MAKE_VERSION(5,1,23)
+#define NDBD_PREPARE_COPY_FRAG_V2_62 NDB_MAKE_VERSION(6,2,8)
+#define NDBD_PREPARE_COPY_FRAG_V2_63 NDB_MAKE_VERSION(6,3,6)
+
+/**
+ * 0 = NO PREP COPY FRAG SUPPORT
+ * 1 = NO MAX PAGE SUPPORT
+ * 2 = LATEST VERSION
+ */
+static
+inline
+int
+ndb_check_prep_copy_frag_version(Uint32 version)
+{
+ if (version == NDB_VERSION_D)
+ return 2;
+
+ const Uint32 major = (version >> 16) & 0xFF;
+ const Uint32 minor = (version >> 8) & 0xFF;
+ if (major >= 6)
+ {
+ if (minor == 2)
+ {
+ if (version >= NDBD_PREPARE_COPY_FRAG_V2_62)
+ return 2;
+ if (version >= NDBD_PREPARE_COPY_FRAG_VERSION)
+ return 1;
+ return 0;
+ }
+ else if (minor == 3)
+ {
+ if (version >= NDBD_PREPARE_COPY_FRAG_V2_63)
+ return 2;
+ return 1;
+ }
+ return 2;
+ }
+ else if (major == 5 && minor == 1)
+ {
+ if (version >= NDBD_PREPARE_COPY_FRAG_V2_51)
+ return 2;
+ }
+
+ return 0;
+}
+
#endif
diff --git a/storage/ndb/include/ndbapi/Ndb.hpp b/storage/ndb/include/ndbapi/Ndb.hpp
index 4d0219d1a3c..dca19c2ead0 100644
--- a/storage/ndb/include/ndbapi/Ndb.hpp
+++ b/storage/ndb/include/ndbapi/Ndb.hpp
@@ -17,7 +17,7 @@
@mainpage NDB API Programmers' Guide
This guide assumes a basic familiarity with MySQL Cluster concepts found
- on http://dev.mysql.com/doc/mysql/en/NDBCluster.html .
+ on http://dev.mysql.com/doc/mysql/en/mysql-cluster.html.
Some of the fundamental ones are also described in section @ref secConcepts.
The NDB API is a MySQL Cluster application interface
@@ -1056,6 +1056,7 @@ class Ndb
friend class NdbBlob;
friend class NdbImpl;
friend class Ndb_internal;
+ friend class NdbScanFilterImpl;
#endif
public:
diff --git a/storage/ndb/include/ndbapi/NdbOperation.hpp b/storage/ndb/include/ndbapi/NdbOperation.hpp
index 06111941df4..78dbadfd7ab 100644
--- a/storage/ndb/include/ndbapi/NdbOperation.hpp
+++ b/storage/ndb/include/ndbapi/NdbOperation.hpp
@@ -93,8 +93,9 @@ public:
,LM_CommittedRead ///< Ignore locks, read last committed value
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
= 2,
- LM_Dirty = 2
+ LM_Dirty = 2,
#endif
+ LM_SimpleRead = 3 ///< Read with shared lock, but release lock directly
};
/**
@@ -842,8 +843,10 @@ protected:
virtual ~NdbOperation();
void next(NdbOperation*); // Set next pointer
NdbOperation* next(); // Get next pointer
+
public:
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
+ NdbTransaction* getNdbTransaction();
const NdbOperation* next() const;
const NdbRecAttr* getFirstRecAttr() const;
#endif
diff --git a/storage/ndb/include/ndbapi/NdbPool.hpp b/storage/ndb/include/ndbapi/NdbPool.hpp
index 1963bf26448..44b6d7488f0 100644
--- a/storage/ndb/include/ndbapi/NdbPool.hpp
+++ b/storage/ndb/include/ndbapi/NdbPool.hpp
@@ -17,7 +17,8 @@ class Ndb;
class NdbPool;
bool
-create_instance(Uint32 max_ndb_objects,
+create_instance(Ndb_cluster_connection* cc,
+ Uint32 max_ndb_objects,
Uint32 no_conn_obj,
Uint32 init_no_ndb_objects);
diff --git a/storage/ndb/include/ndbapi/NdbScanFilter.hpp b/storage/ndb/include/ndbapi/NdbScanFilter.hpp
index 1ef62558560..4527012a6c4 100644
--- a/storage/ndb/include/ndbapi/NdbScanFilter.hpp
+++ b/storage/ndb/include/ndbapi/NdbScanFilter.hpp
@@ -17,6 +17,7 @@
#define NDB_SCAN_FILTER_HPP
#include <ndb_types.h>
+#include <ndbapi_limits.h>
/**
* @class NdbScanFilter
@@ -31,8 +32,13 @@ public:
/**
* Constructor
* @param op The NdbOperation that the filter belongs to (is applied to).
+ * @param abort_on_too_large abort transaction on filter too large
+ * default: true
+ * @param max_size Maximum size of generated filter in words
*/
- NdbScanFilter(class NdbOperation * op);
+ NdbScanFilter(class NdbOperation * op,
+ bool abort_on_too_large = true,
+ Uint32 max_size = NDB_MAX_SCANFILTER_SIZE_IN_WORDS);
~NdbScanFilter();
/**
@@ -166,6 +172,27 @@ public:
/** @} *********************************************************************/
#endif
+ enum Error {
+ FilterTooLarge = 4294
+ };
+
+ /**
+ * Get filter level error.
+ *
+ * Most errors are set only on operation level, and they abort the
+ * transaction. The error FilterTooLarge is set on filter level and
+ * by default it propagates to operation level and also aborts the
+ * transaction.
+ *
+ * If option abort_on_too_large is set to false, then FilterTooLarge
+ * does not propagate. One can then either ignore this error (in
+ * which case no filtering is done) or try to define a new filter
+ * immediately.
+ */
+ const class NdbError & getNdbError() const;
+#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
+ NdbOperation * getNdbOperation();
+#endif
private:
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
friend class NdbScanFilterImpl;
diff --git a/storage/ndb/include/ndbapi/NdbTransaction.hpp b/storage/ndb/include/ndbapi/NdbTransaction.hpp
index 20c9c709e51..6a057655398 100644
--- a/storage/ndb/include/ndbapi/NdbTransaction.hpp
+++ b/storage/ndb/include/ndbapi/NdbTransaction.hpp
@@ -170,6 +170,15 @@ public:
#endif
};
+#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
+ /**
+ * Convenience method to fetch this transaction's Ndb* object
+ */
+ Ndb * getNdb() {
+ return theNdb;
+ }
+#endif
+
#ifndef DOXYGEN_SHOULD_SKIP_DEPRECATED
/**
* Get an NdbOperation for a table.
diff --git a/storage/ndb/include/ndbapi/ndbapi_limits.h b/storage/ndb/include/ndbapi/ndbapi_limits.h
index 63399e4bd0a..e283913d059 100644
--- a/storage/ndb/include/ndbapi/ndbapi_limits.h
+++ b/storage/ndb/include/ndbapi/ndbapi_limits.h
@@ -26,4 +26,6 @@
#define NDB_MAX_TUPLE_SIZE (NDB_MAX_TUPLE_SIZE_IN_WORDS*4)
#define NDB_MAX_ACTIVE_EVENTS 100
+#define NDB_MAX_SCANFILTER_SIZE_IN_WORDS 50000
+
#endif
diff --git a/storage/ndb/include/util/ndb_rand.h b/storage/ndb/include/util/ndb_rand.h
new file mode 100644
index 00000000000..1521ca9c4ff
--- /dev/null
+++ b/storage/ndb/include/util/ndb_rand.h
@@ -0,0 +1,33 @@
+/* Copyright (C) 2003 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
+#ifndef NDB_RAND_H
+#define NDB_RAND_H
+
+#define NDB_RAND_MAX 32767
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int ndb_rand(void);
+
+void ndb_srand(unsigned seed);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/storage/ndb/src/common/debugger/EventLogger.cpp b/storage/ndb/src/common/debugger/EventLogger.cpp
index 0964a54f906..068b0c6ac18 100644
--- a/storage/ndb/src/common/debugger/EventLogger.cpp
+++ b/storage/ndb/src/common/debugger/EventLogger.cpp
@@ -498,10 +498,10 @@ void getTextTransReportCounters(QQQQ) {
// -------------------------------------------------------------------
BaseString::snprintf(m_text, m_text_len,
"Trans. Count = %u, Commit Count = %u, "
- "Read Count = %u, Simple Read Count = %u,\n"
+ "Read Count = %u, Simple Read Count = %u, "
"Write Count = %u, AttrInfo Count = %u, "
- "Concurrent Operations = %u, Abort Count = %u\n"
- " Scans: %u Range scans: %u",
+ "Concurrent Operations = %u, Abort Count = %u"
+ " Scans = %u Range scans = %u",
theData[1],
theData[2],
theData[3],
@@ -797,9 +797,9 @@ void getTextBackupFailedToStart(QQQQ) {
}
void getTextBackupCompleted(QQQQ) {
BaseString::snprintf(m_text, m_text_len,
- "Backup %u started from node %u completed\n"
- " StartGCP: %u StopGCP: %u\n"
- " #Records: %u #LogRecords: %u\n"
+ "Backup %u started from node %u completed."
+ " StartGCP: %u StopGCP: %u"
+ " #Records: %u #LogRecords: %u"
" Data: %u bytes Log: %u bytes",
theData[2], refToNode(theData[1]),
theData[3], theData[4], theData[6], theData[8],
diff --git a/storage/ndb/src/common/debugger/signaldata/SignalNames.cpp b/storage/ndb/src/common/debugger/signaldata/SignalNames.cpp
index 0d31cd5de7f..b4221cbec8e 100644
--- a/storage/ndb/src/common/debugger/signaldata/SignalNames.cpp
+++ b/storage/ndb/src/common/debugger/signaldata/SignalNames.cpp
@@ -640,5 +640,9 @@ const GsnName SignalNames [] = {
,{ GSN_ROUTE_ORD, "ROUTE_ORD" }
,{ GSN_NODE_VERSION_REP, "NODE_VERSION_REP" }
+
+ ,{ GSN_PREPARE_COPY_FRAG_REQ, "PREPARE_COPY_FRAG_REQ" }
+ ,{ GSN_PREPARE_COPY_FRAG_REF, "PREPARE_COPY_FRAG_REF" }
+ ,{ GSN_PREPARE_COPY_FRAG_CONF, "PREPARE_COPY_FRAG_CONF" }
};
const unsigned short NO_OF_SIGNAL_NAMES = sizeof(SignalNames)/sizeof(GsnName);
diff --git a/storage/ndb/src/common/debugger/signaldata/TcKeyConf.cpp b/storage/ndb/src/common/debugger/signaldata/TcKeyConf.cpp
index 65589f8cd6e..377863f9446 100644
--- a/storage/ndb/src/common/debugger/signaldata/TcKeyConf.cpp
+++ b/storage/ndb/src/common/debugger/signaldata/TcKeyConf.cpp
@@ -51,11 +51,11 @@ printTCKEYCONF(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receive
(TcKeyConf::getMarkerFlag(confInfo) == 0)?"false":"true");
fprintf(output, "Operations:\n");
for(i = 0; i < noOfOp; i++) {
- if(sig->operations[i].attrInfoLen > TcKeyConf::SimpleReadBit)
+ if(sig->operations[i].attrInfoLen > TcKeyConf::DirtyReadBit)
fprintf(output,
" apiOperationPtr: H'%.8x, simplereadnode: %u\n",
sig->operations[i].apiOperationPtr,
- sig->operations[i].attrInfoLen & (~TcKeyConf::SimpleReadBit));
+ sig->operations[i].attrInfoLen & (~TcKeyConf::DirtyReadBit));
else
fprintf(output,
" apiOperationPtr: H'%.8x, attrInfoLen: %u\n",
diff --git a/storage/ndb/src/common/util/Makefile.am b/storage/ndb/src/common/util/Makefile.am
index d331cce7e5c..5379a425c49 100644
--- a/storage/ndb/src/common/util/Makefile.am
+++ b/storage/ndb/src/common/util/Makefile.am
@@ -24,7 +24,8 @@ libgeneral_la_SOURCES = \
uucode.c random.c version.c \
strdup.c \
ConfigValues.cpp ndb_init.c basestring_vsnprintf.c \
- Bitmask.cpp
+ Bitmask.cpp \
+ ndb_rand.c
EXTRA_PROGRAMS = testBitmask
testBitmask_SOURCES = testBitmask.cpp
diff --git a/storage/ndb/src/common/util/ndb_rand.c b/storage/ndb/src/common/util/ndb_rand.c
new file mode 100644
index 00000000000..4fcc483cd49
--- /dev/null
+++ b/storage/ndb/src/common/util/ndb_rand.c
@@ -0,0 +1,40 @@
+/* Copyright (C) 2003 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
+#include <ndb_rand.h>
+
+static unsigned long next= 1;
+
+/**
+ * ndb_rand
+ *
+ * constant time, cheap, pseudo-random number generator.
+ *
+ * NDB_RAND_MAX assumed to be 32767
+ *
+ * This is the POSIX example for "generating the same sequence on
+ * different machines". Although that is not one of our requirements.
+ */
+int ndb_rand(void)
+{
+ next= next * 1103515245 + 12345;
+ return((unsigned)(next/65536) % 32768);
+}
+
+void ndb_srand(unsigned seed)
+{
+ next= seed;
+}
+
diff --git a/storage/ndb/src/cw/cpcd/APIService.cpp b/storage/ndb/src/cw/cpcd/APIService.cpp
index 1c1cfb94cd4..f60abc08817 100644
--- a/storage/ndb/src/cw/cpcd/APIService.cpp
+++ b/storage/ndb/src/cw/cpcd/APIService.cpp
@@ -145,7 +145,7 @@ CPCDAPISession::CPCDAPISession(NDB_SOCKET_TYPE sock,
: SocketServer::Session(sock)
, m_cpcd(cpcd)
{
- m_input = new SocketInputStream(sock);
+ m_input = new SocketInputStream(sock, 7*24*60*60000);
m_output = new SocketOutputStream(sock);
m_parser = new Parser<CPCDAPISession>(commands, *m_input, true, true, true);
}
diff --git a/storage/ndb/src/kernel/blocks/ERROR_codes.txt b/storage/ndb/src/kernel/blocks/ERROR_codes.txt
index acfbf649522..4d4d4fcafc4 100644
--- a/storage/ndb/src/kernel/blocks/ERROR_codes.txt
+++ b/storage/ndb/src/kernel/blocks/ERROR_codes.txt
@@ -3,15 +3,15 @@ Next NDBCNTR 1002
Next NDBFS 2000
Next DBACC 3002
Next DBTUP 4029
-Next DBLQH 5045
+Next DBLQH 5047
Next DBDICT 6008
-Next DBDIH 7186
-Next DBTC 8053
+Next DBDIH 7193
+Next DBTC 8054
Next CMVMI 9000
Next BACKUP 10038
Next DBUTIL 11002
Next DBTUX 12008
-Next SUMA 13001
+Next SUMA 13034
TESTING NODE FAILURE, ARBITRATION
---------------------------------
@@ -157,6 +157,9 @@ And crash when all have "not" been sent
7027: Crash in master when changing state to LCP_TAB_SAVED
7018: Crash in master when changing state to LCP_TAB_SAVED
+7191: Crash when receiving LCP_COMPLETE_REP
+7192: Crash in setLcpActiveStatusStart - when dead node missed to LCP's
+
ERROR CODES FOR TESTING NODE FAILURE, FAILURE IN COPY FRAGMENT PROCESS:
-----------------------------------------------------------------------
@@ -183,6 +186,8 @@ handling in DBTC to ensure that node failures are also well handled in
time-out handling. They can also be used to test multiple node failure
handling.
+5045: Crash in PREPARE_COPY_FRAG_REQ
+5046: Crash if LQHKEYREQ (NrCopy) comes when frag-state is incorrect
ERROR CODES FOR TESTING TIME-OUT HANDLING IN DBLQH
-------------------------------------------------
@@ -248,6 +253,8 @@ Delay execution of ABORTCONF signal 2 seconds to generate time-out.
8050: Send ZABORT_TIMEOUT_BREAK delayed
+8053: Crash in timeOutFoundLab, state CS_WAIT_COMMIT_CONF
+
ERROR CODES FOR TESTING TIME-OUT HANDLING IN DBTC
-------------------------------------------------
diff --git a/storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp b/storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
index 7a992587010..3406176d7a8 100644
--- a/storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
+++ b/storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
@@ -1124,6 +1124,38 @@ Cmvmi::execDUMP_STATE_ORD(Signal* signal)
}
#endif
#endif
+
+ if (arg == 9999)
+ {
+ Uint32 delay = 1000;
+ switch(signal->getLength()){
+ case 1:
+ break;
+ case 2:
+ delay = signal->theData[1];
+ break;
+ default:{
+ Uint32 dmin = signal->theData[1];
+ Uint32 dmax = signal->theData[2];
+ delay = dmin + (rand() % (dmax - dmin));
+ break;
+ }
+ }
+
+ signal->theData[0] = 9999;
+ if (delay == 0)
+ {
+ execNDB_TAMPER(signal);
+ }
+ else if (delay < 10)
+ {
+ sendSignal(reference(), GSN_NDB_TAMPER, signal, 1, JBB);
+ }
+ else
+ {
+ sendSignalWithDelay(reference(), GSN_NDB_TAMPER, signal, delay, 1);
+ }
+ }
}//Cmvmi::execDUMP_STATE_ORD()
void
diff --git a/storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp b/storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp
index 5bef13cd0b9..21826df28f9 100644
--- a/storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp
+++ b/storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp
@@ -318,6 +318,7 @@ public:
Uint8 noOfStartedChkpt;
MasterLCPConf::State lcpStateAtTakeOver;
+ Uint32 m_remove_node_from_table_lcp_id;
};
typedef Ptr<NodeRecord> NodeRecordPtr;
/**********************************************************************/
@@ -544,7 +545,8 @@ public:
TO_WAIT_ENDING = 21,
ENDING = 22,
- STARTING_LOCAL_FRAGMENTS = 24
+ STARTING_LOCAL_FRAGMENTS = 24,
+ PREPARE_COPY = 25
};
enum ToSlaveStatus {
TO_SLAVE_IDLE = 0,
@@ -555,6 +557,7 @@ public:
TO_SLAVE_COPY_COMPLETED = 5
};
Uint32 startGci;
+ Uint32 maxPage;
Uint32 toCopyNode;
Uint32 toCurrentFragid;
Uint32 toCurrentReplica;
@@ -671,6 +674,8 @@ private:
void execNODE_FAILREP(Signal *);
void execCOPY_FRAGCONF(Signal *);
void execCOPY_FRAGREF(Signal *);
+ void execPREPARE_COPY_FRAG_REF(Signal*);
+ void execPREPARE_COPY_FRAG_CONF(Signal*);
void execDIADDTABREQ(Signal *);
void execDIGETNODESREQ(Signal *);
void execDIRELEASEREQ(Signal *);
@@ -1113,6 +1118,7 @@ private:
void sendStartTo(Signal *, Uint32 takeOverPtr);
void startNextCopyFragment(Signal *, Uint32 takeOverPtr);
void toCopyFragLab(Signal *, Uint32 takeOverPtr);
+ void toStartCopyFrag(Signal *, TakeOverRecordPtr);
void startHsAddFragConfLab(Signal *);
void prepareSendCreateFragReq(Signal *, Uint32 takeOverPtr);
void sendUpdateTo(Signal *, Uint32 takeOverPtr, Uint32 updateState);
diff --git a/storage/ndb/src/kernel/blocks/dbdih/DbdihInit.cpp b/storage/ndb/src/kernel/blocks/dbdih/DbdihInit.cpp
index aff31d625f4..6ce281434c2 100644
--- a/storage/ndb/src/kernel/blocks/dbdih/DbdihInit.cpp
+++ b/storage/ndb/src/kernel/blocks/dbdih/DbdihInit.cpp
@@ -259,6 +259,11 @@ Dbdih::Dbdih(Block_context& ctx):
addRecSignal(GSN_START_FRAGREF,
&Dbdih::execSTART_FRAGREF);
+
+ addRecSignal(GSN_PREPARE_COPY_FRAG_REF,
+ &Dbdih::execPREPARE_COPY_FRAG_REF);
+ addRecSignal(GSN_PREPARE_COPY_FRAG_CONF,
+ &Dbdih::execPREPARE_COPY_FRAG_CONF);
apiConnectRecord = 0;
connectRecord = 0;
diff --git a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
index 762d4ea5141..5403ac5cc38 100644
--- a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
+++ b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
@@ -3155,6 +3155,94 @@ void Dbdih::toCopyFragLab(Signal* signal,
TakeOverRecordPtr takeOverPtr;
RETURN_IF_TAKE_OVER_INTERRUPTED(takeOverPtrI, takeOverPtr);
+ /**
+ * Inform starting node that TakeOver is about to start
+ */
+ Uint32 nodeId = takeOverPtr.p->toStartingNode;
+
+ Uint32 version = getNodeInfo(nodeId).m_version;
+ if (ndb_check_prep_copy_frag_version(version))
+ {
+ jam();
+ TabRecordPtr tabPtr;
+ tabPtr.i = takeOverPtr.p->toCurrentTabref;
+ ptrCheckGuard(tabPtr, ctabFileSize, tabRecord);
+
+ FragmentstorePtr fragPtr;
+ getFragstore(tabPtr.p, takeOverPtr.p->toCurrentFragid, fragPtr);
+ Uint32 nodes[MAX_REPLICAS];
+ extractNodeInfo(fragPtr.p, nodes);
+
+ PrepareCopyFragReq* req= (PrepareCopyFragReq*)signal->getDataPtrSend();
+ req->senderRef = reference();
+ req->senderData = takeOverPtrI;
+ req->tableId = takeOverPtr.p->toCurrentTabref;
+ req->fragId = takeOverPtr.p->toCurrentFragid;
+ req->copyNodeId = nodes[0]; // Src
+ req->startingNodeId = takeOverPtr.p->toStartingNode; // Dst
+ Uint32 ref = calcLqhBlockRef(takeOverPtr.p->toStartingNode);
+
+ sendSignal(ref, GSN_PREPARE_COPY_FRAG_REQ, signal,
+ PrepareCopyFragReq::SignalLength, JBB);
+
+ takeOverPtr.p->toMasterStatus = TakeOverRecord::PREPARE_COPY;
+ return;
+ }
+
+ takeOverPtr.p->maxPage = RNIL;
+ toStartCopyFrag(signal, takeOverPtr);
+}
+
+void
+Dbdih::execPREPARE_COPY_FRAG_REF(Signal* signal)
+{
+ jamEntry();
+ PrepareCopyFragRef ref = *(PrepareCopyFragRef*)signal->getDataPtr();
+
+ TakeOverRecordPtr takeOverPtr;
+ RETURN_IF_TAKE_OVER_INTERRUPTED(ref.senderData, takeOverPtr);
+
+ ndbrequire(takeOverPtr.p->toMasterStatus == TakeOverRecord::PREPARE_COPY);
+
+ /**
+ * Treat this as copy frag ref
+ */
+ CopyFragRef * cfref = (CopyFragRef*)signal->getDataPtrSend();
+ cfref->userPtr = ref.senderData;
+ cfref->startingNodeId = ref.startingNodeId;
+ cfref->errorCode = ref.errorCode;
+ cfref->tableId = ref.tableId;
+ cfref->fragId = ref.fragId;
+ cfref->sendingNodeId = ref.copyNodeId;
+ takeOverPtr.p->toMasterStatus = TakeOverRecord::COPY_FRAG;
+ execCOPY_FRAGREF(signal);
+}
+
+void
+Dbdih::execPREPARE_COPY_FRAG_CONF(Signal* signal)
+{
+ PrepareCopyFragConf conf = *(PrepareCopyFragConf*)signal->getDataPtr();
+
+ TakeOverRecordPtr takeOverPtr;
+ RETURN_IF_TAKE_OVER_INTERRUPTED(conf.senderData, takeOverPtr);
+
+ Uint32 version = getNodeInfo(refToNode(conf.senderRef)).m_version;
+ if (ndb_check_prep_copy_frag_version(version) >= 2)
+ {
+ jam();
+ takeOverPtr.p->maxPage = conf.maxPageNo;
+ }
+ else
+ {
+ jam();
+ takeOverPtr.p->maxPage = RNIL;
+ }
+ toStartCopyFrag(signal, takeOverPtr);
+}
+
+void
+Dbdih::toStartCopyFrag(Signal* signal, TakeOverRecordPtr takeOverPtr)
+{
CreateReplicaRecordPtr createReplicaPtr;
createReplicaPtr.i = 0;
ptrAss(createReplicaPtr, createReplicaRecord);
@@ -3178,8 +3266,8 @@ void Dbdih::toCopyFragLab(Signal* signal,
createReplicaPtr.p->hotSpareUse = true;
createReplicaPtr.p->dataNodeId = takeOverPtr.p->toStartingNode;
- prepareSendCreateFragReq(signal, takeOverPtrI);
-}//Dbdih::toCopyFragLab()
+ prepareSendCreateFragReq(signal, takeOverPtr.i);
+}//Dbdih::toStartCopy()
void Dbdih::prepareSendCreateFragReq(Signal* signal, Uint32 takeOverPtrI)
{
@@ -3412,10 +3500,12 @@ void Dbdih::execCREATE_FRAGCONF(Signal* signal)
copyFragReq->schemaVersion = tabPtr.p->schemaVersion;
copyFragReq->distributionKey = fragPtr.p->distributionKey;
copyFragReq->gci = gci;
- copyFragReq->nodeCount = extractNodeInfo(fragPtr.p,
- copyFragReq->nodeList);
+ Uint32 len = copyFragReq->nodeCount =
+ extractNodeInfo(fragPtr.p,
+ copyFragReq->nodeList);
+ copyFragReq->nodeList[len] = takeOverPtr.p->maxPage;
sendSignal(ref, GSN_COPY_FRAGREQ, signal,
- CopyFragReq::SignalLength + copyFragReq->nodeCount, JBB);
+ CopyFragReq::SignalLength + len, JBB);
} else {
ndbrequire(takeOverPtr.p->toMasterStatus == TakeOverRecord::COMMIT_CREATE);
jam();
@@ -4576,13 +4666,22 @@ void Dbdih::checkTakeOverInMasterStartNodeFailure(Signal* signal,
ok = true;
jam();
//-----------------------------------------------------------------------
- // The starting node will discover the problem. We will receive either
+ // The copying node will discover the problem. We will receive either
// COPY_FRAGREQ or COPY_FRAGCONF and then we can release the take over
// record and end the process. If the copying node should also die then
// we will try to send prepare create fragment and will then discover
// that the starting node has failed.
//-----------------------------------------------------------------------
break;
+ case TakeOverRecord::PREPARE_COPY:
+ ok = true;
+ jam();
+ /**
+ * We're waiting for the starting node...which just died...
+ * endTakeOver
+ */
+ endTakeOver(takeOverPtr.i);
+ break;
case TakeOverRecord::COPY_ACTIVE:
ok = true;
jam();
@@ -5069,6 +5168,18 @@ void Dbdih::startRemoveFailedNode(Signal* signal, NodeRecordPtr failedNodePtr)
return;
}
+ /**
+ * If node has node complete LCP
+ * we need to remove it as undo might not be complete
+ * bug#31257
+ */
+ failedNodePtr.p->m_remove_node_from_table_lcp_id = RNIL;
+ if (c_lcpState.m_LCP_COMPLETE_REP_Counter_LQH.isWaitingFor(failedNodePtr.i))
+ {
+ jam();
+ failedNodePtr.p->m_remove_node_from_table_lcp_id = SYSFILE->latestLCP_ID;
+ }
+
jam();
signal->theData[0] = DihContinueB::ZREMOVE_NODE_FROM_TABLE;
signal->theData[1] = failedNodePtr.i;
@@ -5710,6 +5821,11 @@ void Dbdih::removeNodeFromTable(Signal* signal,
return;
}//if
+ NodeRecordPtr nodePtr;
+ nodePtr.i = nodeId;
+ ptrCheckGuard(nodePtr, MAX_NDB_NODES, nodeRecord);
+ const Uint32 lcpId = nodePtr.p->m_remove_node_from_table_lcp_id;
+
/**
* For each fragment
*/
@@ -5717,7 +5833,6 @@ void Dbdih::removeNodeFromTable(Signal* signal,
Uint32 noOfRemovedLcpReplicas = 0; // No of replicas in LCP removed
Uint32 noOfRemainingLcpReplicas = 0;// No of replicas in LCP remaining
- //const Uint32 lcpId = SYSFILE->latestLCP_ID;
const bool lcpOngoingFlag = (tabPtr.p->tabLcpStatus== TabRecord::TLS_ACTIVE);
const bool unlogged = (tabPtr.p->tabStorage != TabRecord::ST_NORMAL);
@@ -5752,6 +5867,23 @@ void Dbdih::removeNodeFromTable(Signal* signal,
noOfRemovedLcpReplicas ++;
replicaPtr.p->lcpOngoingFlag = false;
}
+
+ if (lcpId != RNIL)
+ {
+ jam();
+ Uint32 lcpNo = prevLcpNo(replicaPtr.p->nextLcp);
+ if (replicaPtr.p->lcpStatus[lcpNo] == ZVALID &&
+ replicaPtr.p->lcpId[lcpNo] == SYSFILE->latestLCP_ID)
+ {
+ jam();
+ replicaPtr.p->lcpStatus[lcpNo] = ZINVALID;
+ replicaPtr.p->lcpId[lcpNo] = 0;
+ replicaPtr.p->nextLcp = lcpNo;
+ ndbout_c("REMOVING lcp: %u from table: %u frag: %u node: %u",
+ SYSFILE->latestLCP_ID,
+ tabPtr.i, fragNo, nodeId);
+ }
+ }
}
}
if (!found)
@@ -10898,6 +11030,8 @@ void Dbdih::execLCP_COMPLETE_REP(Signal* signal)
{
jamEntry();
+ CRASH_INSERTION(7191);
+
#if 0
g_eventLogger.info("LCP_COMPLETE_REP");
printLCP_COMPLETE_REP(stdout,
@@ -13657,6 +13791,7 @@ void Dbdih::setLcpActiveStatusStart(Signal* signal)
// It must be taken over with the copy fragment process after a system
// crash. We indicate this by setting the active status to TAKE_OVER.
/*-------------------------------------------------------------------*/
+ c_lcpState.m_participatingLQH.set(nodePtr.i);
nodePtr.p->activeStatus = Sysfile::NS_TakeOver;
//break; // Fall through
case Sysfile::NS_TakeOver:{
@@ -13699,6 +13834,7 @@ void Dbdih::setLcpActiveStatusStart(Signal* signal)
break;
case Sysfile::NS_ActiveMissed_2:
jam();
+ CRASH_INSERTION(7192);
if ((nodePtr.p->nodeStatus == NodeRecord::ALIVE) &&
(!nodePtr.p->copyCompleted)) {
jam();
diff --git a/storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp b/storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp
index 6f8e5569831..95cad98b81c 100644
--- a/storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp
+++ b/storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp
@@ -2025,7 +2025,6 @@ public:
Uint8 reclenAiLqhkey;
Uint8 m_offset_current_keybuf;
Uint8 replicaType;
- Uint8 simpleRead;
Uint8 seqNoReplica;
Uint8 tcNodeFailrec;
Uint8 m_disk_table;
@@ -2145,6 +2144,7 @@ private:
void execSTORED_PROCCONF(Signal* signal);
void execSTORED_PROCREF(Signal* signal);
void execCOPY_FRAGREQ(Signal* signal);
+ void execPREPARE_COPY_FRAG_REQ(Signal* signal);
void execUPDATE_FRAG_DIST_KEY_ORD(Signal*);
void execCOPY_ACTIVEREQ(Signal* signal);
void execCOPY_STATEREQ(Signal* signal);
diff --git a/storage/ndb/src/kernel/blocks/dblqh/DblqhInit.cpp b/storage/ndb/src/kernel/blocks/dblqh/DblqhInit.cpp
index d6411ee1cb9..db6d201575f 100644
--- a/storage/ndb/src/kernel/blocks/dblqh/DblqhInit.cpp
+++ b/storage/ndb/src/kernel/blocks/dblqh/DblqhInit.cpp
@@ -310,6 +310,9 @@ Dblqh::Dblqh(Block_context& ctx):
addRecSignal(GSN_UPDATE_FRAG_DIST_KEY_ORD,
&Dblqh::execUPDATE_FRAG_DIST_KEY_ORD);
+ addRecSignal(GSN_PREPARE_COPY_FRAG_REQ,
+ &Dblqh::execPREPARE_COPY_FRAG_REQ);
+
initData();
#ifdef VM_TRACE
diff --git a/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp b/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
index efb88bfccd2..e0449e08ddd 100644
--- a/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
+++ b/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
@@ -3496,7 +3496,6 @@ void Dblqh::execLQHKEYREQ(Signal* signal)
regTcPtr->dirtyOp = LqhKeyReq::getDirtyFlag(Treqinfo);
regTcPtr->opExec = LqhKeyReq::getInterpretedFlag(Treqinfo);
regTcPtr->opSimple = LqhKeyReq::getSimpleFlag(Treqinfo);
- regTcPtr->simpleRead = op == ZREAD && regTcPtr->opSimple;
regTcPtr->seqNoReplica = LqhKeyReq::getSeqNoReplica(Treqinfo);
UintR TreclenAiLqhkey = LqhKeyReq::getAIInLqhKeyReq(Treqinfo);
regTcPtr->apiVersionNo = 0;
@@ -3513,9 +3512,15 @@ void Dblqh::execLQHKEYREQ(Signal* signal)
regTcPtr->lockType =
op == ZREAD_EX ? ZUPDATE : (Operation_t) op == ZWRITE ? ZINSERT : (Operation_t) op;
}
+
+ if (regTcPtr->dirtyOp)
+ {
+ ndbrequire(regTcPtr->opSimple);
+ }
- CRASH_INSERTION2(5041, regTcPtr->simpleRead &&
- refToNode(signal->senderBlockRef()) != cownNodeid);
+ CRASH_INSERTION2(5041, (op == ZREAD &&
+ (regTcPtr->opSimple || regTcPtr->dirtyOp) &&
+ refToNode(signal->senderBlockRef()) != cownNodeid));
regTcPtr->reclenAiLqhkey = TreclenAiLqhkey;
regTcPtr->currReclenAi = TreclenAiLqhkey;
@@ -3665,6 +3670,7 @@ void Dblqh::execLQHKEYREQ(Signal* signal)
{
ndbout_c("fragptr.p->fragStatus: %d",
fragptr.p->fragStatus);
+ CRASH_INSERTION(5046);
}
ndbassert(fragptr.p->fragStatus == Fragrecord::ACTIVE_CREATION);
fragptr.p->m_copy_started_state = Fragrecord::AC_NR_COPY;
@@ -3687,8 +3693,8 @@ void Dblqh::execLQHKEYREQ(Signal* signal)
Uint8 TdistKey = LqhKeyReq::getDistributionKey(TtotReclenAi);
if ((tfragDistKey != TdistKey) &&
(regTcPtr->seqNoReplica == 0) &&
- (regTcPtr->dirtyOp == ZFALSE) &&
- (regTcPtr->simpleRead == ZFALSE)) {
+ (regTcPtr->dirtyOp == ZFALSE))
+ {
/* ----------------------------------------------------------------------
* WE HAVE DIFFERENT OPINION THAN THE DIH THAT STARTED THE TRANSACTION.
* THE REASON COULD BE THAT THIS IS AN OLD DISTRIBUTION WHICH IS NO LONGER
@@ -4778,7 +4784,18 @@ void Dblqh::tupkeyConfLab(Signal* signal)
TRACE_OP(regTcPtr, "TUPKEYCONF");
- if (regTcPtr->simpleRead) {
+ if (readLen != 0)
+ {
+ jam();
+
+ /* SET BIT 15 IN REQINFO */
+ LqhKeyReq::setApplicationAddressFlag(regTcPtr->reqinfo, 1);
+ regTcPtr->readlenAi = readLen;
+ }//if
+
+ if (regTcPtr->operation == ZREAD &&
+ (regTcPtr->opSimple || regTcPtr->dirtyOp))
+ {
jam();
/* ----------------------------------------------------------------------
* THE OPERATION IS A SIMPLE READ.
@@ -4792,14 +4809,6 @@ void Dblqh::tupkeyConfLab(Signal* signal)
commitContinueAfterBlockedLab(signal);
return;
}//if
- if (readLen != 0)
- {
- jam();
-
- /* SET BIT 15 IN REQINFO */
- LqhKeyReq::setApplicationAddressFlag(regTcPtr->reqinfo, 1);
- regTcPtr->readlenAi = readLen;
- }//if
regTcPtr->totSendlenAi = writeLen;
ndbrequire(regTcPtr->totSendlenAi == regTcPtr->currTupAiLen);
@@ -5178,12 +5187,15 @@ void Dblqh::packLqhkeyreqLab(Signal* signal)
/* */
/* ------------------------------------------------------------------------- */
sendLqhkeyconfTc(signal, regTcPtr->tcBlockref);
- if (regTcPtr->dirtyOp != ZTRUE) {
+ if (! (regTcPtr->dirtyOp ||
+ (regTcPtr->operation == ZREAD && regTcPtr->opSimple)))
+ {
jam();
regTcPtr->transactionState = TcConnectionrec::PREPARED;
releaseOprec(signal);
} else {
jam();
+
/*************************************************************>*/
/* DIRTY WRITES ARE USED IN TWO SITUATIONS. THE FIRST */
/* SITUATION IS WHEN THEY ARE USED TO UPDATE COUNTERS AND*/
@@ -6406,8 +6418,8 @@ void Dblqh::commitContinueAfterBlockedLab(Signal* signal)
Ptr<TcConnectionrec> regTcPtr = tcConnectptr;
Ptr<Fragrecord> regFragptr = fragptr;
Uint32 operation = regTcPtr.p->operation;
- Uint32 simpleRead = regTcPtr.p->simpleRead;
Uint32 dirtyOp = regTcPtr.p->dirtyOp;
+ Uint32 opSimple = regTcPtr.p->opSimple;
if (regTcPtr.p->activeCreat != Fragrecord::AC_IGNORED) {
if (operation != ZREAD) {
TupCommitReq * const tupCommitReq =
@@ -6465,20 +6477,29 @@ void Dblqh::commitContinueAfterBlockedLab(Signal* signal)
EXECUTE_DIRECT(acc, GSN_ACC_COMMITREQ, signal, 1);
}
- if (simpleRead) {
+ if (dirtyOp)
+ {
jam();
-/* ------------------------------------------------------------------------- */
-/*THE OPERATION WAS A SIMPLE READ THUS THE COMMIT PHASE IS ONLY NEEDED TO */
-/*RELEASE THE LOCKS. AT THIS POINT IN THE CODE THE LOCKS ARE RELEASED AND WE */
-/*ARE IN A POSITION TO SEND LQHKEYCONF TO TC. WE WILL ALSO RELEASE ALL */
-/*RESOURCES BELONGING TO THIS OPERATION SINCE NO MORE WORK WILL BE */
-/*PERFORMED. */
-/* ------------------------------------------------------------------------- */
+ /**
+ * The dirtyRead does not send anything but TRANSID_AI from LDM
+ */
fragptr = regFragptr;
tcConnectptr = regTcPtr;
cleanUp(signal);
return;
- }//if
+ }
+
+ /**
+ * The simpleRead will send a LQHKEYCONF
+ * but have already released the locks
+ */
+ if (opSimple)
+ {
+ fragptr = regFragptr;
+ tcConnectptr = regTcPtr;
+ packLqhkeyreqLab(signal);
+ return;
+ }
}
}//if
jamEntry();
@@ -7088,7 +7109,7 @@ void Dblqh::abortStateHandlerLab(Signal* signal)
/* ------------------------------------------------------------------------- */
return;
}//if
- if (regTcPtr->simpleRead) {
+ if (regTcPtr->opSimple) {
jam();
/* ------------------------------------------------------------------------- */
/*A SIMPLE READ IS CURRENTLY RELEASING THE LOCKS OR WAITING FOR ACCESS TO */
@@ -7356,7 +7377,8 @@ void Dblqh::continueAbortLab(Signal* signal)
void Dblqh::continueAfterLogAbortWriteLab(Signal* signal)
{
TcConnectionrec * const regTcPtr = tcConnectptr.p;
- if (regTcPtr->simpleRead) {
+ if (regTcPtr->operation == ZREAD && regTcPtr->dirtyOp)
+ {
jam();
TcKeyRef * const tcKeyRef = (TcKeyRef *) signal->getDataPtrSend();
@@ -10062,6 +10084,86 @@ Dblqh::calculateHash(Uint32 tableId, const Uint32* src)
return md5_hash(Tmp, keyLen);
}//Dblqh::calculateHash()
+/**
+ * PREPARE COPY FRAG REQ
+ */
+void
+Dblqh::execPREPARE_COPY_FRAG_REQ(Signal* signal)
+{
+ jamEntry();
+ PrepareCopyFragReq req = *(PrepareCopyFragReq*)signal->getDataPtr();
+
+ CRASH_INSERTION(5045);
+
+ tabptr.i = req.tableId;
+ ptrCheckGuard(tabptr, ctabrecFileSize, tablerec);
+
+ Uint32 max_page = RNIL;
+
+ if (getOwnNodeId() != req.startingNodeId)
+ {
+ jam();
+ /**
+ * This is currently dead code...
+ * but is provided so we can impl. a better scan+delete on
+ * starting node wo/ having to change running node
+ */
+ ndbrequire(getOwnNodeId() == req.copyNodeId);
+ c_tup->get_frag_info(req.tableId, req.fragId, &max_page);
+
+ PrepareCopyFragConf* conf = (PrepareCopyFragConf*)signal->getDataPtrSend();
+ conf->senderData = req.senderData;
+ conf->senderRef = reference();
+ conf->tableId = req.tableId;
+ conf->fragId = req.fragId;
+ conf->copyNodeId = req.copyNodeId;
+ conf->startingNodeId = req.startingNodeId;
+ conf->maxPageNo = max_page;
+ sendSignal(req.senderRef, GSN_PREPARE_COPY_FRAG_CONF,
+ signal, PrepareCopyFragConf::SignalLength, JBB);
+
+ return;
+ }
+
+ if (! DictTabInfo::isOrderedIndex(tabptr.p->tableType))
+ {
+ jam();
+ ndbrequire(getFragmentrec(signal, req.fragId));
+
+ /**
+ *
+ */
+ if (cstartType == NodeState::ST_SYSTEM_RESTART)
+ {
+ jam();
+ signal->theData[0] = fragptr.p->tabRef;
+ signal->theData[1] = fragptr.p->fragId;
+ sendSignal(DBACC_REF, GSN_EXPANDCHECK2, signal, 2, JBB);
+ }
+
+
+ /**
+ *
+ */
+ fragptr.p->m_copy_started_state = Fragrecord::AC_IGNORED;
+ fragptr.p->fragStatus = Fragrecord::ACTIVE_CREATION;
+ fragptr.p->logFlag = Fragrecord::STATE_FALSE;
+
+ c_tup->get_frag_info(req.tableId, req.fragId, &max_page);
+ }
+
+ PrepareCopyFragConf* conf = (PrepareCopyFragConf*)signal->getDataPtrSend();
+ conf->senderData = req.senderData;
+ conf->senderRef = reference();
+ conf->tableId = req.tableId;
+ conf->fragId = req.fragId;
+ conf->copyNodeId = req.copyNodeId;
+ conf->startingNodeId = req.startingNodeId;
+ conf->maxPageNo = max_page;
+ sendSignal(req.senderRef, GSN_PREPARE_COPY_FRAG_CONF,
+ signal, PrepareCopyFragConf::SignalLength, JBB);
+}
+
/* *************************************** */
/* COPY_FRAGREQ: Start copying a fragment */
/* *************************************** */
@@ -10097,6 +10199,13 @@ void Dblqh::execCOPY_FRAGREQ(Signal* signal)
for (i = 0; i<nodeCount; i++)
nodemask.set(copyFragReq->nodeList[i]);
}
+ Uint32 maxPage = copyFragReq->nodeList[nodeCount];
+ Uint32 version = getNodeInfo(refToNode(userRef)).m_version;
+ if (ndb_check_prep_copy_frag_version(version) < 2)
+ {
+ jam();
+ maxPage = RNIL;
+ }
if (DictTabInfo::isOrderedIndex(tabptr.p->tableType)) {
jam();
@@ -10172,14 +10281,15 @@ void Dblqh::execCOPY_FRAGREQ(Signal* signal)
req->requestInfo = 0;
AccScanReq::setLockMode(req->requestInfo, 0);
AccScanReq::setReadCommittedFlag(req->requestInfo, 0);
- AccScanReq::setNRScanFlag(req->requestInfo, gci ? 1 : 0);
+ AccScanReq::setNRScanFlag(req->requestInfo, 1);
AccScanReq::setNoDiskScanFlag(req->requestInfo, 1);
req->transId1 = tcConnectptr.p->transid[0];
req->transId2 = tcConnectptr.p->transid[1];
req->savePointId = tcConnectptr.p->savePointId;
+ req->maxPage = maxPage;
sendSignal(scanptr.p->scanBlockref, GSN_ACC_SCANREQ, signal,
- AccScanReq::SignalLength, JBB);
+ AccScanReq::SignalLength + 1, JBB);
if (! nodemask.isclear())
{
@@ -14084,11 +14194,16 @@ void Dblqh::execSTART_FRAGREQ(Signal* signal)
fragptr.p->fragStatus = Fragrecord::ACTIVE_CREATION;
}
- c_tup->disk_restart_mark_no_lcp(tabptr.i, fragId);
+ c_tup->disk_restart_lcp_id(tabptr.i, fragId, RNIL);
jamEntry();
-
return;
- }//if
+ }
+ else
+ {
+ jam();
+ c_tup->disk_restart_lcp_id(tabptr.i, fragId, lcpId);
+ jamEntry();
+ }
c_lcpId = (c_lcpId == 0 ? lcpId : c_lcpId);
c_lcpId = (c_lcpId < lcpId ? c_lcpId : lcpId);
@@ -19022,7 +19137,6 @@ Dblqh::execDUMP_STATE_ORD(Signal* signal)
ndbout << " operation = " << tcRec.p->operation<<endl;
ndbout << " tcNodeFailrec = " << tcRec.p->tcNodeFailrec
<< " seqNoReplica = " << tcRec.p->seqNoReplica
- << " simpleRead = " << tcRec.p->simpleRead
<< endl;
ndbout << " replicaType = " << tcRec.p->replicaType
<< " reclenAiLqhkey = " << tcRec.p->reclenAiLqhkey
diff --git a/storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp b/storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp
index 75d79ba737f..3d5e52a525d 100644
--- a/storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp
+++ b/storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp
@@ -786,6 +786,7 @@ public:
UintR apiConnect; /* POINTER TO API CONNECT RECORD */
UintR nextTcConnect; /* NEXT TC RECORD*/
Uint8 dirtyOp;
+ Uint8 opSimple;
Uint8 lastReplicaNo; /* NUMBER OF THE LAST REPLICA IN THE OPERATION */
Uint8 noOfNodes; /* TOTAL NUMBER OF NODES IN OPERATION */
Uint8 operation; /* OPERATION TYPE */
@@ -886,13 +887,8 @@ public:
Uint8 opExec;
Uint8 unused;
+ Uint8 unused1;
- /**
- * IS THE OPERATION A SIMPLE TRANSACTION
- * 0 = NO, 1 = YES
- */
- Uint8 opSimple;
-
//---------------------------------------------------
// Second 16 byte cache line in second 64 byte cache
// line. Diverse use.
@@ -1464,7 +1460,7 @@ private:
void releaseAttrinfo();
void releaseGcp(Signal* signal);
void releaseKeys();
- void releaseSimpleRead(Signal*, ApiConnectRecordPtr, TcConnectRecord*);
+ void releaseDirtyRead(Signal*, ApiConnectRecordPtr, TcConnectRecord*);
void releaseDirtyWrite(Signal* signal);
void releaseTcCon();
void releaseTcConnectFail(Signal* signal);
@@ -1620,7 +1616,7 @@ private:
void startphase1x010Lab(Signal* signal);
void lqhKeyConf_checkTransactionState(Signal * signal,
- ApiConnectRecord * const regApiPtr);
+ Ptr<ApiConnectRecord> regApiPtr);
void checkDropTab(Signal* signal);
diff --git a/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp b/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
index 887e6f848b1..ce20059e663 100644
--- a/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
+++ b/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
@@ -20,6 +20,7 @@
#include <RefConvert.hpp>
#include <ndb_limits.h>
#include <my_sys.h>
+#include <ndb_rand.h>
#include <signaldata/EventReport.hpp>
#include <signaldata/TcKeyReq.hpp>
@@ -2790,9 +2791,9 @@ void Dbtc::execTCKEYREQ(Signal* signal)
Uint8 TNoDiskFlag = TcKeyReq::getNoDiskFlag(Treqinfo);
Uint8 TexecuteFlag = TexecFlag;
- regCachePtr->opSimple = TSimpleFlag;
- regCachePtr->opExec = TInterpretedFlag;
regTcPtr->dirtyOp = TDirtyFlag;
+ regTcPtr->opSimple = TSimpleFlag;
+ regCachePtr->opExec = TInterpretedFlag;
regCachePtr->distributionKeyIndicator = TDistrKeyFlag;
regCachePtr->m_no_disk_flag = TNoDiskFlag;
@@ -3246,9 +3247,10 @@ void Dbtc::sendlqhkeyreq(Signal* signal,
LqhKeyReq::setScanTakeOverFlag(tslrAttrLen, regCachePtr->scanTakeOverInd);
Tdata10 = 0;
- sig0 = regCachePtr->opSimple;
+ sig0 = regTcPtr->opSimple;
sig1 = regTcPtr->operation;
- bool simpleRead = (sig1 == ZREAD && sig0 == ZTRUE);
+ sig2 = regTcPtr->dirtyOp;
+ bool dirtyRead = (sig1 == ZREAD && sig2 == ZTRUE);
LqhKeyReq::setKeyLen(Tdata10, regCachePtr->keylen);
LqhKeyReq::setLastReplicaNo(Tdata10, regTcPtr->lastReplicaNo);
if (unlikely(version < NDBD_ROWID_VERSION))
@@ -3261,7 +3263,7 @@ void Dbtc::sendlqhkeyreq(Signal* signal,
// Indicate Application Reference is present in bit 15
/* ---------------------------------------------------------------------- */
LqhKeyReq::setApplicationAddressFlag(Tdata10, 1);
- LqhKeyReq::setDirtyFlag(Tdata10, regTcPtr->dirtyOp);
+ LqhKeyReq::setDirtyFlag(Tdata10, sig2);
LqhKeyReq::setInterpretedFlag(Tdata10, regCachePtr->opExec);
LqhKeyReq::setSimpleFlag(Tdata10, sig0);
LqhKeyReq::setOperation(Tdata10, sig1);
@@ -3322,7 +3324,7 @@ void Dbtc::sendlqhkeyreq(Signal* signal,
sig5 = regTcPtr->clientData;
sig6 = regCachePtr->scanInfo;
- if (! simpleRead)
+ if (! dirtyRead)
{
regApiPtr->m_transaction_nodes.set(regTcPtr->tcNodedata[0]);
regApiPtr->m_transaction_nodes.set(regTcPtr->tcNodedata[1]);
@@ -3395,7 +3397,6 @@ void Dbtc::packLqhkeyreq040Lab(Signal* signal,
BlockReference TBRef)
{
TcConnectRecord * const regTcPtr = tcConnectptr.p;
- CacheRecord * const regCachePtr = cachePtr.p;
#ifdef ERROR_INSERT
ApiConnectRecord * const regApiPtr = apiConnectptr.p;
if (ERROR_INSERTED(8009)) {
@@ -3420,8 +3421,8 @@ void Dbtc::packLqhkeyreq040Lab(Signal* signal,
if (anAttrBufIndex == RNIL) {
UintR TtcTimer = ctcTimer;
UintR Tread = (regTcPtr->operation == ZREAD);
- UintR Tsimple = (regCachePtr->opSimple == ZTRUE);
- UintR Tboth = Tread & Tsimple;
+ UintR Tdirty = (regTcPtr->dirtyOp == ZTRUE);
+ UintR Tboth = Tread & Tdirty;
setApiConTimer(apiConnectptr.i, TtcTimer, __LINE__);
jam();
/*--------------------------------------------------------------------
@@ -3430,7 +3431,7 @@ void Dbtc::packLqhkeyreq040Lab(Signal* signal,
releaseAttrinfo();
if (Tboth) {
jam();
- releaseSimpleRead(signal, apiConnectptr, tcConnectptr.p);
+ releaseDirtyRead(signal, apiConnectptr, tcConnectptr.p);
return;
}//if
regTcPtr->tcConnectstate = OS_OPERATING;
@@ -3490,11 +3491,11 @@ void Dbtc::releaseAttrinfo()
}//Dbtc::releaseAttrinfo()
/* ========================================================================= */
-/* ------- RELEASE ALL RECORDS CONNECTED TO A SIMPLE OPERATION ------- */
+/* ------- RELEASE ALL RECORDS CONNECTED TO A DIRTY OPERATION ------- */
/* ========================================================================= */
-void Dbtc::releaseSimpleRead(Signal* signal,
- ApiConnectRecordPtr regApiPtr,
- TcConnectRecord* regTcPtr)
+void Dbtc::releaseDirtyRead(Signal* signal,
+ ApiConnectRecordPtr regApiPtr,
+ TcConnectRecord* regTcPtr)
{
Uint32 Ttckeyrec = regApiPtr.p->tckeyrec;
Uint32 TclientData = regTcPtr->clientData;
@@ -3504,7 +3505,7 @@ void Dbtc::releaseSimpleRead(Signal* signal,
ConnectionState state = regApiPtr.p->apiConnectstate;
regApiPtr.p->tcSendArray[Ttckeyrec] = TclientData;
- regApiPtr.p->tcSendArray[Ttckeyrec + 1] = TcKeyConf::SimpleReadBit | Tnode;
+ regApiPtr.p->tcSendArray[Ttckeyrec + 1] = TcKeyConf::DirtyReadBit | Tnode;
regApiPtr.p->tckeyrec = Ttckeyrec + 2;
unlinkReadyTcCon(signal);
@@ -3534,8 +3535,8 @@ void Dbtc::releaseSimpleRead(Signal* signal,
/**
* Emulate LQHKEYCONF
*/
- lqhKeyConf_checkTransactionState(signal, regApiPtr.p);
-}//Dbtc::releaseSimpleRead()
+ lqhKeyConf_checkTransactionState(signal, regApiPtr);
+}//Dbtc::releaseDirtyRead()
/* ------------------------------------------------------------------------- */
/* ------- CHECK IF ALL TC CONNECTIONS ARE COMPLETED ------- */
@@ -3717,12 +3718,13 @@ void Dbtc::execLQHKEYCONF(Signal* signal)
TCKEY_abort(signal, 29);
return;
}//if
- ApiConnectRecord * const regApiPtr =
- &localApiConnectRecord[TapiConnectptrIndex];
+ Ptr<ApiConnectRecord> regApiPtr;
+ regApiPtr.i = TapiConnectptrIndex;
+ regApiPtr.p = &localApiConnectRecord[TapiConnectptrIndex];
apiConnectptr.i = TapiConnectptrIndex;
- apiConnectptr.p = regApiPtr;
- compare_transid1 = regApiPtr->transid[0] ^ Ttrans1;
- compare_transid2 = regApiPtr->transid[1] ^ Ttrans2;
+ apiConnectptr.p = regApiPtr.p;
+ compare_transid1 = regApiPtr.p->transid[0] ^ Ttrans1;
+ compare_transid2 = regApiPtr.p->transid[1] ^ Ttrans2;
compare_transid1 = compare_transid1 | compare_transid2;
if (compare_transid1 != 0) {
warningReport(signal, 24);
@@ -3734,25 +3736,25 @@ void Dbtc::execLQHKEYCONF(Signal* signal)
systemErrorLab(signal, __LINE__);
}//if
if (ERROR_INSERTED(8003)) {
- if (regApiPtr->apiConnectstate == CS_STARTED) {
+ if (regApiPtr.p->apiConnectstate == CS_STARTED) {
CLEAR_ERROR_INSERT_VALUE;
return;
}//if
}//if
if (ERROR_INSERTED(8004)) {
- if (regApiPtr->apiConnectstate == CS_RECEIVING) {
+ if (regApiPtr.p->apiConnectstate == CS_RECEIVING) {
CLEAR_ERROR_INSERT_VALUE;
return;
}//if
}//if
if (ERROR_INSERTED(8005)) {
- if (regApiPtr->apiConnectstate == CS_REC_COMMITTING) {
+ if (regApiPtr.p->apiConnectstate == CS_REC_COMMITTING) {
CLEAR_ERROR_INSERT_VALUE;
return;
}//if
}//if
if (ERROR_INSERTED(8006)) {
- if (regApiPtr->apiConnectstate == CS_START_COMMITTING) {
+ if (regApiPtr.p->apiConnectstate == CS_START_COMMITTING) {
CLEAR_ERROR_INSERT_VALUE;
return;
}//if
@@ -3767,10 +3769,12 @@ void Dbtc::execLQHKEYCONF(Signal* signal)
regTcPtr->lastLqhNodeId = refToNode(tlastLqhBlockref);
regTcPtr->noFiredTriggers = noFired;
- UintR Ttckeyrec = (UintR)regApiPtr->tckeyrec;
+ UintR Ttckeyrec = (UintR)regApiPtr.p->tckeyrec;
UintR TclientData = regTcPtr->clientData;
UintR TdirtyOp = regTcPtr->dirtyOp;
- ConnectionState TapiConnectstate = regApiPtr->apiConnectstate;
+ Uint32 TopSimple = regTcPtr->opSimple;
+ Uint32 Toperation = regTcPtr->operation;
+ ConnectionState TapiConnectstate = regApiPtr.p->apiConnectstate;
if (Ttckeyrec > (ZTCOPCONF_SIZE - 2)) {
TCKEY_abort(signal, 30);
return;
@@ -3795,23 +3799,34 @@ void Dbtc::execLQHKEYCONF(Signal* signal)
* since they will enter execLQHKEYCONF a second time
* Skip counting internally generated TcKeyReq
*/
- regApiPtr->tcSendArray[Ttckeyrec] = TclientData;
- regApiPtr->tcSendArray[Ttckeyrec + 1] = treadlenAi;
- regApiPtr->tckeyrec = Ttckeyrec + 2;
+ regApiPtr.p->tcSendArray[Ttckeyrec] = TclientData;
+ regApiPtr.p->tcSendArray[Ttckeyrec + 1] = treadlenAi;
+ regApiPtr.p->tckeyrec = Ttckeyrec + 2;
}//if
}//if
- if (TdirtyOp == ZTRUE) {
- UintR Tlqhkeyreqrec = regApiPtr->lqhkeyreqrec;
+ if (TdirtyOp == ZTRUE)
+ {
+ UintR Tlqhkeyreqrec = regApiPtr.p->lqhkeyreqrec;
jam();
releaseDirtyWrite(signal);
- regApiPtr->lqhkeyreqrec = Tlqhkeyreqrec - 1;
- } else {
+ regApiPtr.p->lqhkeyreqrec = Tlqhkeyreqrec - 1;
+ }
+ else if (Toperation == ZREAD && TopSimple)
+ {
+ UintR Tlqhkeyreqrec = regApiPtr.p->lqhkeyreqrec;
+ jam();
+ unlinkReadyTcCon(signal);
+ releaseTcCon();
+ regApiPtr.p->lqhkeyreqrec = Tlqhkeyreqrec - 1;
+ }
+ else
+ {
jam();
if (noFired == 0) {
jam();
// No triggers to execute
- UintR Tlqhkeyconfrec = regApiPtr->lqhkeyconfrec;
- regApiPtr->lqhkeyconfrec = Tlqhkeyconfrec + 1;
+ UintR Tlqhkeyconfrec = regApiPtr.p->lqhkeyconfrec;
+ regApiPtr.p->lqhkeyconfrec = Tlqhkeyconfrec + 1;
regTcPtr->tcConnectstate = OS_PREPARED;
}
}//if
@@ -3841,21 +3856,18 @@ void Dbtc::execLQHKEYCONF(Signal* signal)
jam();
if (regTcPtr->isIndexOp) {
jam();
- setupIndexOpReturn(regApiPtr, regTcPtr);
+ setupIndexOpReturn(regApiPtr.p, regTcPtr);
}
lqhKeyConf_checkTransactionState(signal, regApiPtr);
} else {
// We have fired triggers
jam();
saveTriggeringOpState(signal, regTcPtr);
- if (regTcPtr->noReceivedTriggers == noFired) {
- ApiConnectRecordPtr transPtr;
-
+ if (regTcPtr->noReceivedTriggers == noFired)
+ {
// We have received all data
jam();
- transPtr.i = TapiConnectptrIndex;
- transPtr.p = regApiPtr;
- executeTriggers(signal, &transPtr);
+ executeTriggers(signal, &regApiPtr);
}
// else wait for more trigger data
}
@@ -3879,7 +3891,7 @@ void Dbtc::setupIndexOpReturn(ApiConnectRecord* regApiPtr,
*/
void
Dbtc::lqhKeyConf_checkTransactionState(Signal * signal,
- ApiConnectRecord * const apiConnectPtrP)
+ Ptr<ApiConnectRecord> regApiPtr)
{
/*---------------------------------------------------------------*/
/* IF THE COMMIT FLAG IS SET IN SIGNAL TCKEYREQ THEN DBTC HAS TO */
@@ -3890,9 +3902,9 @@ Dbtc::lqhKeyConf_checkTransactionState(Signal * signal,
/* FOR ALL OPERATIONS, AND THEN WAIT FOR THE API TO CONCLUDE THE */
/* TRANSACTION */
/*---------------------------------------------------------------*/
- ConnectionState TapiConnectstate = apiConnectPtrP->apiConnectstate;
- UintR Tlqhkeyconfrec = apiConnectPtrP->lqhkeyconfrec;
- UintR Tlqhkeyreqrec = apiConnectPtrP->lqhkeyreqrec;
+ ConnectionState TapiConnectstate = regApiPtr.p->apiConnectstate;
+ UintR Tlqhkeyconfrec = regApiPtr.p->lqhkeyconfrec;
+ UintR Tlqhkeyreqrec = regApiPtr.p->lqhkeyreqrec;
int TnoOfOutStanding = Tlqhkeyreqrec - Tlqhkeyconfrec;
switch (TapiConnectstate) {
@@ -3902,11 +3914,11 @@ Dbtc::lqhKeyConf_checkTransactionState(Signal * signal,
diverify010Lab(signal);
return;
} else if (TnoOfOutStanding > 0) {
- if (apiConnectPtrP->tckeyrec == ZTCOPCONF_SIZE) {
+ if (regApiPtr.p->tckeyrec == ZTCOPCONF_SIZE) {
jam();
sendtckeyconf(signal, 0);
return;
- } else if (apiConnectPtrP->indexOpReturn) {
+ } else if (regApiPtr.p->indexOpReturn) {
jam();
sendtckeyconf(signal, 0);
return;
@@ -3925,11 +3937,11 @@ Dbtc::lqhKeyConf_checkTransactionState(Signal * signal,
sendtckeyconf(signal, 2);
return;
} else {
- if (apiConnectPtrP->tckeyrec == ZTCOPCONF_SIZE) {
+ if (regApiPtr.p->tckeyrec == ZTCOPCONF_SIZE) {
jam();
sendtckeyconf(signal, 0);
return;
- } else if (apiConnectPtrP->indexOpReturn) {
+ } else if (regApiPtr.p->indexOpReturn) {
jam();
sendtckeyconf(signal, 0);
return;
@@ -3939,11 +3951,11 @@ Dbtc::lqhKeyConf_checkTransactionState(Signal * signal,
return;
case CS_REC_COMMITTING:
if (TnoOfOutStanding > 0) {
- if (apiConnectPtrP->tckeyrec == ZTCOPCONF_SIZE) {
+ if (regApiPtr.p->tckeyrec == ZTCOPCONF_SIZE) {
jam();
sendtckeyconf(signal, 0);
return;
- } else if (apiConnectPtrP->indexOpReturn) {
+ } else if (regApiPtr.p->indexOpReturn) {
jam();
sendtckeyconf(signal, 0);
return;
@@ -3960,7 +3972,7 @@ Dbtc::lqhKeyConf_checkTransactionState(Signal * signal,
/* CONSISTING OF DIRTY WRITES AND ALL OF THOSE WERE */
/* COMPLETED. ENSURE TCKEYREC IS ZERO TO PREVENT ERRORS. */
/*---------------------------------------------------------------*/
- apiConnectPtrP->tckeyrec = 0;
+ regApiPtr.p->tckeyrec = 0;
return;
default:
TCKEY_abort(signal, 46);
@@ -4218,34 +4230,46 @@ void Dbtc::diverify010Lab(Signal* signal)
jam();
systemErrorLab(signal, __LINE__);
}//if
- if (TfirstfreeApiConnectCopy != RNIL) {
- seizeApiConnectCopy(signal);
- regApiPtr->apiConnectstate = CS_PREPARE_TO_COMMIT;
- /*-----------------------------------------------------------------------
- * WE COME HERE ONLY IF THE TRANSACTION IS PREPARED ON ALL TC CONNECTIONS.
- * THUS WE CAN START THE COMMIT PHASE BY SENDING DIVERIFY ON ALL TC
- * CONNECTIONS AND THEN WHEN ALL DIVERIFYCONF HAVE BEEN RECEIVED THE
- * COMMIT MESSAGE CAN BE SENT TO ALL INVOLVED PARTS.
- *-----------------------------------------------------------------------*/
- EXECUTE_DIRECT(DBDIH, GSN_DIVERIFYREQ, signal, 1);
- if (signal->theData[2] == 0) {
- execDIVERIFYCONF(signal);
+
+ if (regApiPtr->lqhkeyreqrec)
+ {
+ if (TfirstfreeApiConnectCopy != RNIL) {
+ seizeApiConnectCopy(signal);
+ regApiPtr->apiConnectstate = CS_PREPARE_TO_COMMIT;
+ /*-----------------------------------------------------------------------
+ * WE COME HERE ONLY IF THE TRANSACTION IS PREPARED ON ALL TC CONNECTIONS
+ * THUS WE CAN START THE COMMIT PHASE BY SENDING DIVERIFY ON ALL TC
+ * CONNECTIONS AND THEN WHEN ALL DIVERIFYCONF HAVE BEEN RECEIVED THE
+ * COMMIT MESSAGE CAN BE SENT TO ALL INVOLVED PARTS.
+ *---------------------------------------------------------------------*/
+ EXECUTE_DIRECT(DBDIH, GSN_DIVERIFYREQ, signal, 1);
+ if (signal->theData[2] == 0) {
+ execDIVERIFYCONF(signal);
+ }
+ return;
+ } else {
+ /*-----------------------------------------------------------------------
+ * There were no free copy connections available. We must abort the
+ * transaction since otherwise we will have a problem with the report
+ * to the application.
+ * This should more or less not happen but if it happens we do
+ * not want to crash and we do not want to create code to handle it
+ * properly since it is difficult to test it and will be complex to
+ * handle a problem more or less not occurring.
+ *---------------------------------------------------------------------*/
+ terrorCode = ZSEIZE_API_COPY_ERROR;
+ abortErrorLab(signal);
+ return;
}
- return;
- } else {
- /*-----------------------------------------------------------------------
- * There were no free copy connections available. We must abort the
- * transaction since otherwise we will have a problem with the report
- * to the application.
- * This should more or less not happen but if it happens we do not want to
- * crash and we do not want to create code to handle it properly since
- * it is difficult to test it and will be complex to handle a problem
- * more or less not occurring.
- *-----------------------------------------------------------------------*/
- terrorCode = ZSEIZE_API_COPY_ERROR;
- abortErrorLab(signal);
- return;
- }//if
+ }
+ else
+ {
+ jam();
+ sendtckeyconf(signal, 1);
+ regApiPtr->apiConnectstate = CS_CONNECTED;
+ regApiPtr->m_transaction_nodes.clear();
+ setApiConTimer(apiConnectptr.i, 0,__LINE__);
+ }
}//Dbtc::diverify010Lab()
/* ------------------------------------------------------------------------- */
@@ -5260,16 +5284,8 @@ void Dbtc::execLQHKEYREF(Signal* signal)
regApiPtr->lqhkeyreqrec--;
if (regApiPtr->lqhkeyconfrec == regApiPtr->lqhkeyreqrec) {
if (regApiPtr->apiConnectstate == CS_START_COMMITTING) {
- if(regApiPtr->lqhkeyconfrec) {
- jam();
- diverify010Lab(signal);
- } else {
- jam();
- sendtckeyconf(signal, 1);
- regApiPtr->apiConnectstate = CS_CONNECTED;
- regApiPtr->m_transaction_nodes.clear();
- setApiConTimer(apiConnectptr.i, 0,__LINE__);
- }
+ jam();
+ diverify010Lab(signal);
return;
} else if (regApiPtr->tckeyrec > 0 || regApiPtr->m_exec_flag) {
jam();
@@ -6278,7 +6294,7 @@ void Dbtc::timeOutLoopStartLab(Signal* signal, Uint32 api_con_ptr)
jam();
if (api_timer != 0) {
Uint32 error= ZTIME_OUT_ERROR;
- time_out_value= time_out_param + (api_con_ptr & mask_value);
+ time_out_value= time_out_param + (ndb_rand() & mask_value);
if (unlikely(old_mask_value)) // abort during single user mode
{
apiConnectptr.i = api_con_ptr;
@@ -6481,6 +6497,7 @@ void Dbtc::timeOutFoundLab(Signal* signal, Uint32 TapiConPtr, Uint32 errCode)
return;
case CS_WAIT_COMMIT_CONF:
jam();
+ CRASH_INSERTION(8053);
tcConnectptr.i = apiConnectptr.p->currentTcConnect;
ptrCheckGuard(tcConnectptr, ctcConnectFilesize, tcConnectRecord);
arrGuard(apiConnectptr.p->currentReplicaNo, MAX_REPLICAS);
diff --git a/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp b/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp
index f28687dca0d..45d124b8d7d 100644
--- a/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp
+++ b/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp
@@ -518,6 +518,7 @@ typedef Ptr<Fragoperrec> FragoperrecPtr;
Uint32 m_savePointId;
Uint32 m_scanGCI;
};
+ Uint32 m_endPage;
// lock waited for or obtained and not yet passed to LQH
Uint32 m_accLockOp;
@@ -641,6 +642,8 @@ typedef Ptr<Fragoperrec> FragoperrecPtr;
*/
Page_request_list::Head m_page_requests[MAX_FREE_LIST];
+ DLList<Page>::Head m_unmap_pages;
+
/**
* Current extent
*/
@@ -702,7 +705,8 @@ struct Fragrecord {
DLList<ScanOp>::Head m_scanList;
- enum { UC_LCP = 1, UC_CREATE = 2 };
+ enum { UC_LCP = 1, UC_CREATE = 2, UC_SET_LCP = 3 };
+ Uint32 m_restore_lcp_id;
Uint32 m_undo_complete;
Uint32 m_tablespace_id;
Uint32 m_logfile_group_id;
@@ -1573,6 +1577,8 @@ public:
void nr_delete_page_callback(Signal*, Uint32 op, Uint32 page);
void nr_delete_log_buffer_callback(Signal*, Uint32 op, Uint32 page);
+
+ bool get_frag_info(Uint32 tableId, Uint32 fragId, Uint32* maxPage);
private:
BLOCK_DEFINES(Dbtup);
@@ -2830,7 +2836,7 @@ private:
public:
int disk_page_load_hook(Uint32 page_id);
- void disk_page_unmap_callback(Uint32 page_id, Uint32 dirty_count);
+ void disk_page_unmap_callback(Uint32 when, Uint32 page, Uint32 dirty_count);
int disk_restart_alloc_extent(Uint32 tableId, Uint32 fragId,
const Local_key* key, Uint32 pages);
@@ -2851,11 +2857,11 @@ public:
Local_key m_key;
};
- void disk_restart_mark_no_lcp(Uint32 table, Uint32 frag);
+ void disk_restart_lcp_id(Uint32 table, Uint32 frag, Uint32 lcpId);
private:
void disk_restart_undo_next(Signal*);
- void disk_restart_undo_lcp(Uint32, Uint32, Uint32 flag);
+ void disk_restart_undo_lcp(Uint32, Uint32, Uint32 flag, Uint32 lcpId);
void disk_restart_undo_callback(Signal* signal, Uint32, Uint32);
void disk_restart_undo_alloc(Apply_undo*);
void disk_restart_undo_update(Apply_undo*);
diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp
index 87705232de2..8420e7f2bde 100644
--- a/storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp
+++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp
@@ -903,8 +903,10 @@ Dbtup::disk_page_set_dirty(PagePtr pagePtr)
}
void
-Dbtup::disk_page_unmap_callback(Uint32 page_id, Uint32 dirty_count)
+Dbtup::disk_page_unmap_callback(Uint32 when,
+ Uint32 page_id, Uint32 dirty_count)
{
+ jamEntry();
Ptr<GlobalPage> gpage;
m_global_page_pool.getPtr(gpage, page_id);
PagePtr pagePtr;
@@ -918,17 +920,9 @@ Dbtup::disk_page_unmap_callback(Uint32 page_id, Uint32 dirty_count)
{
return ;
}
-
- Local_key key;
- key.m_page_no = pagePtr.p->m_page_no;
- key.m_file_no = pagePtr.p->m_file_no;
- Uint32 idx = pagePtr.p->list_index;
- ndbassert((idx & 0x8000) == 0);
+ Uint32 idx = pagePtr.p->list_index;
- if (DBG_DISK)
- ndbout << "disk_page_unmap_callback " << key << endl;
-
Ptr<Tablerec> tabPtr;
tabPtr.i= pagePtr.p->m_table_id;
ptrCheckGuard(tabPtr, cnoOfTablerec, tablerec);
@@ -938,26 +932,89 @@ Dbtup::disk_page_unmap_callback(Uint32 page_id, Uint32 dirty_count)
Disk_alloc_info& alloc= fragPtr.p->m_disk_alloc_info;
- if (dirty_count == 0)
+ if (when == 0)
{
- Uint32 free = pagePtr.p->free_space;
- Uint32 used = pagePtr.p->uncommitted_used_space;
- ddassert(free >= used);
- ddassert(alloc.calc_page_free_bits(free - used) == idx);
+ /**
+ * Before pageout
+ */
+ jam();
+
+ if (DBG_DISK)
+ {
+ Local_key key;
+ key.m_page_no = pagePtr.p->m_page_no;
+ key.m_file_no = pagePtr.p->m_file_no;
+ ndbout << "disk_page_unmap_callback(before) " << key
+ << " cnt: " << dirty_count << " " << (idx & ~0x8000) << endl;
+ }
+
+ ndbassert((idx & 0x8000) == 0);
+
+ ArrayPool<Page> *pool= (ArrayPool<Page>*)&m_global_page_pool;
+ LocalDLList<Page> list(*pool, alloc.m_dirty_pages[idx]);
+ LocalDLList<Page> list2(*pool, alloc.m_unmap_pages);
+ list.remove(pagePtr);
+ list2.add(pagePtr);
+
+ if (dirty_count == 0)
+ {
+ jam();
+ pagePtr.p->list_index = idx | 0x8000;
+
+ Local_key key;
+ key.m_page_no = pagePtr.p->m_page_no;
+ key.m_file_no = pagePtr.p->m_file_no;
+
+ Uint32 free = pagePtr.p->free_space;
+ Uint32 used = pagePtr.p->uncommitted_used_space;
+ ddassert(free >= used);
+ ddassert(alloc.calc_page_free_bits(free - used) == idx);
+
+ Tablespace_client tsman(0, c_tsman,
+ fragPtr.p->fragTableId,
+ fragPtr.p->fragmentId,
+ fragPtr.p->m_tablespace_id);
+
+ tsman.unmap_page(&key, idx);
+ jamEntry();
+ }
+ }
+ else if (when == 1)
+ {
+ /**
+ * After page out
+ */
+ jam();
+
+ Local_key key;
+ key.m_page_no = pagePtr.p->m_page_no;
+ key.m_file_no = pagePtr.p->m_file_no;
+ Uint32 real_free = pagePtr.p->free_space;
+ if (DBG_DISK)
+ {
+ ndbout << "disk_page_unmap_callback(after) " << key
+ << " cnt: " << dirty_count << " " << (idx & ~0x8000) << endl;
+ }
+
+ ArrayPool<Page> *pool= (ArrayPool<Page>*)&m_global_page_pool;
+ LocalDLList<Page> list(*pool, alloc.m_unmap_pages);
+ list.remove(pagePtr);
+
Tablespace_client tsman(0, c_tsman,
fragPtr.p->fragTableId,
fragPtr.p->fragmentId,
fragPtr.p->m_tablespace_id);
- tsman.unmap_page(&key, idx);
- jamEntry();
- pagePtr.p->list_index = idx | 0x8000;
+ if (DBG_DISK && alloc.calc_page_free_bits(real_free) != (idx & ~0x8000))
+ {
+ ndbout << key
+ << " calc: " << alloc.calc_page_free_bits(real_free)
+ << " idx: " << (idx & ~0x8000)
+ << endl;
+ }
+ tsman.update_page_free_bits(&key, alloc.calc_page_free_bits(real_free));
}
-
- ArrayPool<Page> *pool= (ArrayPool<Page>*)&m_global_page_pool;
- LocalDLList<Page> list(*pool, alloc.m_dirty_pages[idx]);
- list.remove(pagePtr);
}
void
@@ -969,8 +1026,6 @@ Dbtup::disk_page_alloc(Signal* signal,
Disk_alloc_info& alloc= fragPtrP->m_disk_alloc_info;
Uint64 lsn;
- Uint32 old_free = pagePtr.p->free_space;
- Uint32 old_bits= alloc.calc_page_free_bits(old_free);
if (tabPtrP->m_attributes[DD].m_no_of_varsize == 0)
{
ddassert(pagePtr.p->uncommitted_used_space > 0);
@@ -988,20 +1043,6 @@ Dbtup::disk_page_alloc(Signal* signal,
lsn= disk_page_undo_alloc(pagePtr.p, key, sz, gci, logfile_group_id);
}
-
- Uint32 new_free = pagePtr.p->free_space;
- Uint32 new_bits= alloc.calc_page_free_bits(new_free);
-
- if (old_bits != new_bits)
- {
- Tablespace_client tsman(signal, c_tsman,
- fragPtrP->fragTableId,
- fragPtrP->fragmentId,
- fragPtrP->m_tablespace_id);
-
- tsman.update_page_free_bits(key, new_bits, lsn);
- jamEntry();
- }
}
void
@@ -1016,7 +1057,6 @@ Dbtup::disk_page_free(Signal *signal,
Uint32 logfile_group_id= fragPtrP->m_logfile_group_id;
Disk_alloc_info& alloc= fragPtrP->m_disk_alloc_info;
Uint32 old_free= pagePtr.p->free_space;
- Uint32 old_bits= alloc.calc_page_free_bits(old_free);
Uint32 sz;
Uint64 lsn;
@@ -1043,19 +1083,7 @@ Dbtup::disk_page_free(Signal *signal,
}
Uint32 new_free = pagePtr.p->free_space;
- Uint32 new_bits = alloc.calc_page_free_bits(new_free);
- if (old_bits != new_bits)
- {
- Tablespace_client tsman(signal, c_tsman,
- fragPtrP->fragTableId,
- fragPtrP->fragmentId,
- fragPtrP->m_tablespace_id);
-
- tsman.update_page_free_bits(key, new_bits, lsn);
- jamEntry();
- }
-
Uint32 ext = pagePtr.p->m_extent_info_ptr;
Uint32 used = pagePtr.p->uncommitted_used_space;
Uint32 old_idx = pagePtr.p->list_index;
@@ -1341,15 +1369,23 @@ Dbtup::disk_restart_undo(Signal* signal, Uint64 lsn,
case File_formats::Undofile::UNDO_LCP_FIRST:
case File_formats::Undofile::UNDO_LCP:
{
+ jam();
ndbrequire(len == 3);
+ Uint32 lcp = ptr[0];
Uint32 tableId = ptr[1] >> 16;
Uint32 fragId = ptr[1] & 0xFFFF;
- disk_restart_undo_lcp(tableId, fragId, Fragrecord::UC_LCP);
+ disk_restart_undo_lcp(tableId, fragId, Fragrecord::UC_LCP, lcp);
disk_restart_undo_next(signal);
+
+ if (DBG_UNDO)
+ {
+ ndbout_c("UNDO LCP %u (%u, %u)", lcp, tableId, fragId);
+ }
return;
}
case File_formats::Undofile::UNDO_TUP_ALLOC:
{
+ jam();
Disk_undo::Alloc* rec= (Disk_undo::Alloc*)ptr;
preq.m_page.m_page_no = rec->m_page_no;
preq.m_page.m_file_no = rec->m_file_no_page_idx >> 16;
@@ -1358,6 +1394,7 @@ Dbtup::disk_restart_undo(Signal* signal, Uint64 lsn,
}
case File_formats::Undofile::UNDO_TUP_UPDATE:
{
+ jam();
Disk_undo::Update* rec= (Disk_undo::Update*)ptr;
preq.m_page.m_page_no = rec->m_page_no;
preq.m_page.m_file_no = rec->m_file_no_page_idx >> 16;
@@ -1366,6 +1403,7 @@ Dbtup::disk_restart_undo(Signal* signal, Uint64 lsn,
}
case File_formats::Undofile::UNDO_TUP_FREE:
{
+ jam();
Disk_undo::Free* rec= (Disk_undo::Free*)ptr;
preq.m_page.m_page_no = rec->m_page_no;
preq.m_page.m_file_no = rec->m_file_no_page_idx >> 16;
@@ -1377,6 +1415,7 @@ Dbtup::disk_restart_undo(Signal* signal, Uint64 lsn,
*
*/
{
+ jam();
Disk_undo::Create* rec= (Disk_undo::Create*)ptr;
Ptr<Tablerec> tabPtr;
tabPtr.i= rec->m_table;
@@ -1384,12 +1423,34 @@ Dbtup::disk_restart_undo(Signal* signal, Uint64 lsn,
for(Uint32 i = 0; i<MAX_FRAG_PER_NODE; i++)
if (tabPtr.p->fragrec[i] != RNIL)
disk_restart_undo_lcp(tabPtr.i, tabPtr.p->fragid[i],
- Fragrecord::UC_CREATE);
+ Fragrecord::UC_CREATE, 0);
disk_restart_undo_next(signal);
+
+ if (DBG_UNDO)
+ {
+ ndbout_c("UNDO CREATE (%u)", tabPtr.i);
+ }
return;
}
case File_formats::Undofile::UNDO_TUP_DROP:
+ {
jam();
+ Disk_undo::Drop* rec = (Disk_undo::Drop*)ptr;
+ Ptr<Tablerec> tabPtr;
+ tabPtr.i= rec->m_table;
+ ptrCheckGuard(tabPtr, cnoOfTablerec, tablerec);
+ for(Uint32 i = 0; i<MAX_FRAG_PER_NODE; i++)
+ if (tabPtr.p->fragrec[i] != RNIL)
+ disk_restart_undo_lcp(tabPtr.i, tabPtr.p->fragid[i],
+ Fragrecord::UC_CREATE, 0);
+ disk_restart_undo_next(signal);
+
+ if (DBG_UNDO)
+ {
+ ndbout_c("UNDO DROP (%u)", tabPtr.i);
+ }
+ return;
+ }
case File_formats::Undofile::UNDO_TUP_ALLOC_EXTENT:
jam();
case File_formats::Undofile::UNDO_TUP_FREE_EXTENT:
@@ -1398,6 +1459,7 @@ Dbtup::disk_restart_undo(Signal* signal, Uint64 lsn,
return;
case File_formats::Undofile::UNDO_END:
+ jam();
f_undo_done = true;
return;
default:
@@ -1431,14 +1493,32 @@ Dbtup::disk_restart_undo_next(Signal* signal)
}
void
-Dbtup::disk_restart_mark_no_lcp(Uint32 tableId, Uint32 fragId)
+Dbtup::disk_restart_lcp_id(Uint32 tableId, Uint32 fragId, Uint32 lcpId)
{
jamEntry();
- disk_restart_undo_lcp(tableId, fragId, Fragrecord::UC_CREATE);
+
+ if (lcpId == RNIL)
+ {
+ disk_restart_undo_lcp(tableId, fragId, Fragrecord::UC_CREATE, 0);
+ if (DBG_UNDO)
+ {
+ ndbout_c("mark_no_lcp (%u, %u)", tableId, fragId);
+ }
+ }
+ else
+ {
+ disk_restart_undo_lcp(tableId, fragId, Fragrecord::UC_SET_LCP, lcpId);
+ if (DBG_UNDO)
+ {
+ ndbout_c("mark_no_lcp (%u, %u)", tableId, fragId);
+ }
+
+ }
}
void
-Dbtup::disk_restart_undo_lcp(Uint32 tableId, Uint32 fragId, Uint32 flag)
+Dbtup::disk_restart_undo_lcp(Uint32 tableId, Uint32 fragId, Uint32 flag,
+ Uint32 lcpId)
{
Ptr<Tablerec> tabPtr;
tabPtr.i= tableId;
@@ -1446,11 +1526,43 @@ Dbtup::disk_restart_undo_lcp(Uint32 tableId, Uint32 fragId, Uint32 flag)
if (tabPtr.p->tableStatus == DEFINED)
{
+ jam();
FragrecordPtr fragPtr;
getFragmentrec(fragPtr, fragId, tabPtr.p);
if (!fragPtr.isNull())
{
- fragPtr.p->m_undo_complete |= flag;
+ jam();
+ switch(flag){
+ case Fragrecord::UC_CREATE:
+ jam();
+ fragPtr.p->m_undo_complete |= flag;
+ return;
+ case Fragrecord::UC_LCP:
+ jam();
+ if (fragPtr.p->m_undo_complete == 0 &&
+ fragPtr.p->m_restore_lcp_id == lcpId)
+ {
+ jam();
+ fragPtr.p->m_undo_complete |= flag;
+ if (DBG_UNDO)
+ ndbout_c("table: %u fragment: %u lcp: %u -> done",
+ tableId, fragId, lcpId);
+ }
+ return;
+ case Fragrecord::UC_SET_LCP:
+ {
+ jam();
+ if (DBG_UNDO)
+ ndbout_c("table: %u fragment: %u restore to lcp: %u",
+ tableId, fragId, lcpId);
+ ndbrequire(fragPtr.p->m_undo_complete == 0);
+ ndbrequire(fragPtr.p->m_restore_lcp_id == RNIL);
+ fragPtr.p->m_restore_lcp_id = lcpId;
+ return;
+ }
+ }
+ jamLine(flag);
+ ndbrequire(false);
}
}
}
@@ -1474,6 +1586,7 @@ Dbtup::disk_restart_undo_callback(Signal* signal,
pagePtr.p->nextList != RNIL ||
pagePtr.p->prevList != RNIL)
{
+ jam();
update = true;
pagePtr.p->list_index |= 0x8000;
pagePtr.p->nextList = pagePtr.p->prevList = RNIL;
@@ -1484,6 +1597,9 @@ Dbtup::disk_restart_undo_callback(Signal* signal,
if (tableId >= cnoOfTablerec)
{
+ jam();
+ if (DBG_UNDO)
+ ndbout_c("UNDO table> %u", tableId);
disk_restart_undo_next(signal);
return;
}
@@ -1492,6 +1608,9 @@ Dbtup::disk_restart_undo_callback(Signal* signal,
if (undo->m_table_ptr.p->tableStatus != DEFINED)
{
+ jam();
+ if (DBG_UNDO)
+ ndbout_c("UNDO !defined (%u) ", tableId);
disk_restart_undo_next(signal);
return;
}
@@ -1499,19 +1618,25 @@ Dbtup::disk_restart_undo_callback(Signal* signal,
getFragmentrec(undo->m_fragment_ptr, fragId, undo->m_table_ptr.p);
if(undo->m_fragment_ptr.isNull())
{
+ jam();
+ if (DBG_UNDO)
+ ndbout_c("UNDO fragment null %u/%u", tableId, fragId);
disk_restart_undo_next(signal);
return;
}
if (undo->m_fragment_ptr.p->m_undo_complete)
{
+ jam();
+ if (DBG_UNDO)
+ ndbout_c("UNDO undo complete %u/%u", tableId, fragId);
disk_restart_undo_next(signal);
return;
}
- Local_key key;
- key.m_page_no = pagePtr.p->m_page_no;
- key.m_file_no = pagePtr.p->m_file_no;
+ Local_key key = undo->m_key;
+// key.m_page_no = pagePtr.p->m_page_no;
+// key.m_file_no = pagePtr.p->m_file_no;
Uint64 lsn = 0;
lsn += pagePtr.p->m_page_header.m_page_lsn_hi; lsn <<= 32;
@@ -1521,6 +1646,7 @@ Dbtup::disk_restart_undo_callback(Signal* signal,
if (undo->m_lsn <= lsn)
{
+ jam();
if (DBG_UNDO)
{
ndbout << "apply: " << undo->m_lsn << "(" << lsn << " )"
@@ -1535,12 +1661,15 @@ Dbtup::disk_restart_undo_callback(Signal* signal,
*/
switch(undo->m_type){
case File_formats::Undofile::UNDO_TUP_ALLOC:
+ jam();
disk_restart_undo_alloc(undo);
break;
case File_formats::Undofile::UNDO_TUP_UPDATE:
+ jam();
disk_restart_undo_update(undo);
break;
case File_formats::Undofile::UNDO_TUP_FREE:
+ jam();
disk_restart_undo_free(undo);
break;
default:
@@ -1555,14 +1684,17 @@ Dbtup::disk_restart_undo_callback(Signal* signal,
m_pgman.update_lsn(undo->m_key, lsn);
jamEntry();
+
+ disk_restart_undo_page_bits(signal, undo);
}
else if (DBG_UNDO)
{
+ jam();
ndbout << "ignore: " << undo->m_lsn << "(" << lsn << " )"
- << key << " type: " << undo->m_type << endl;
+ << key << " type: " << undo->m_type
+ << " tab: " << tableId << endl;
}
- disk_restart_undo_page_bits(signal, undo);
disk_restart_undo_next(signal);
}
@@ -1637,16 +1769,12 @@ Dbtup::disk_restart_undo_page_bits(Signal* signal, Apply_undo* undo)
Uint32 new_bits = alloc.calc_page_free_bits(free);
pageP->list_index = 0x8000 | new_bits;
- Uint64 lsn = 0;
- lsn += pageP->m_page_header.m_page_lsn_hi; lsn <<= 32;
- lsn += pageP->m_page_header.m_page_lsn_lo;
-
Tablespace_client tsman(signal, c_tsman,
fragPtrP->fragTableId,
fragPtrP->fragmentId,
fragPtrP->m_tablespace_id);
- tsman.restart_undo_page_free_bits(&undo->m_key, new_bits, undo->m_lsn, lsn);
+ tsman.restart_undo_page_free_bits(&undo->m_key, new_bits);
jamEntry();
}
@@ -1683,6 +1811,7 @@ Dbtup::disk_restart_alloc_extent(Uint32 tableId, Uint32 fragId,
if (alloc.m_curr_extent_info_ptr_i != RNIL)
{
+ jam();
Ptr<Extent_info> old;
c_extent_pool.getPtr(old, alloc.m_curr_extent_info_ptr_i);
ndbassert(old.p->m_free_matrix_pos == RNIL);
@@ -1709,6 +1838,7 @@ void
Dbtup::disk_restart_page_bits(Uint32 tableId, Uint32 fragId,
const Local_key*, Uint32 bits)
{
+ jam();
TablerecPtr tabPtr;
FragrecordPtr fragPtr;
tabPtr.i = tableId;
diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
index 45766e5e9c4..a642d704eb9 100644
--- a/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
+++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
@@ -1957,9 +1957,8 @@ int Dbtup::interpreterNextLab(Signal* signal,
Uint32 TdataForUpdate[3];
Uint32 Tlen;
- AttributeHeader& ah= AttributeHeader::init(&TdataForUpdate[0],
- TattrId,
- TattrNoOfWords << 2);
+ AttributeHeader ah(TattrId, TattrNoOfWords << 2);
+ TdataForUpdate[0]= ah.m_value;
TdataForUpdate[1]= TregMemBuffer[theRegister + 2];
TdataForUpdate[2]= TregMemBuffer[theRegister + 3];
Tlen= TattrNoOfWords + 1;
@@ -1975,6 +1974,7 @@ int Dbtup::interpreterNextLab(Signal* signal,
// Write a NULL value into the attribute
/* --------------------------------------------------------- */
ah.setNULL();
+ TdataForUpdate[0]= ah.m_value;
Tlen= 1;
}
int TnoDataRW= updateAttributes(req_struct,
diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp
index 6866236f15e..176efac8058 100644
--- a/storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp
+++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp
@@ -143,6 +143,7 @@ void Dbtup::execTUPFRAGREQ(Signal* signal)
regFragPtr.p->m_lcp_scan_op = RNIL;
regFragPtr.p->m_lcp_keep_list = RNIL;
regFragPtr.p->m_var_page_chunks = RNIL;
+ regFragPtr.p->m_restore_lcp_id = RNIL;
if (ERROR_INSERTED(4007) && regTabPtr.p->fragid[0] == fragId ||
ERROR_INSERTED(4008) && regTabPtr.p->fragid[1] == fragId) {
@@ -674,11 +675,11 @@ Dbtup::undo_createtable_callback(Signal* signal, Uint32 opPtrI, Uint32 unused)
switch(ret){
case 0:
return;
+ case -1:
+ warningEvent("Failed to sync log for create of table: %u", regTabPtr.i);
default:
- ndbout_c("ret: %d", ret);
- ndbrequire(false);
+ execute(signal, req.m_callback, regFragPtr.p->m_logfile_group_id);
}
-
}
void
@@ -959,8 +960,6 @@ void Dbtup::releaseFragment(Signal* signal, Uint32 tableId,
return;
}
-#if NOT_YET_UNDO_DROP_TABLE
-#error "This code is complete, but I prefer not to enable it until I need it"
if (logfile_group_id != RNIL)
{
Callback cb;
@@ -968,8 +967,15 @@ void Dbtup::releaseFragment(Signal* signal, Uint32 tableId,
cb.m_callbackFunction =
safe_cast(&Dbtup::drop_table_log_buffer_callback);
Uint32 sz= sizeof(Disk_undo::Drop) >> 2;
- (void) c_lgman->alloc_log_space(logfile_group_id, sz);
-
+ int r0 = c_lgman->alloc_log_space(logfile_group_id, sz);
+ if (r0)
+ {
+ jam();
+ warningEvent("Failed to alloc log space for drop table: %u",
+ tabPtr.i);
+ goto done;
+ }
+
Logfile_client lgman(this, c_lgman, logfile_group_id);
int res= lgman.get_log_buffer(signal, sz, &cb);
switch(res){
@@ -977,15 +983,18 @@ void Dbtup::releaseFragment(Signal* signal, Uint32 tableId,
jam();
return;
case -1:
- ndbrequire("NOT YET IMPLEMENTED" == 0);
+ warningEvent("Failed to get log buffer for drop table: %u",
+ tabPtr.i);
+ c_lgman->free_log_space(logfile_group_id, sz);
+ goto done;
break;
default:
execute(signal, cb, logfile_group_id);
return;
}
}
-#endif
-
+
+done:
drop_table_logsync_callback(signal, tabPtr.i, RNIL);
}
@@ -997,7 +1006,20 @@ Dbtup::drop_fragment_unmap_pages(Signal *signal,
{
if (tabPtr.p->m_no_of_disk_attributes)
{
+ jam();
Disk_alloc_info& alloc_info= fragPtr.p->m_disk_alloc_info;
+
+ if (!alloc_info.m_unmap_pages.isEmpty())
+ {
+ jam();
+ ndbout_c("waiting for unmape pages");
+ signal->theData[0] = ZUNMAP_PAGES;
+ signal->theData[1] = tabPtr.i;
+ signal->theData[2] = fragPtr.i;
+ signal->theData[3] = pos;
+ sendSignal(cownref, GSN_CONTINUEB, signal, 4, JBB);
+ return;
+ }
while(alloc_info.m_dirty_pages[pos].isEmpty() && pos < MAX_FREE_LIST)
pos++;
@@ -1164,9 +1186,10 @@ Dbtup::drop_table_log_buffer_callback(Signal* signal, Uint32 tablePtrI,
switch(ret){
case 0:
return;
+ case -1:
+ warningEvent("Failed to syn log for drop of table: %u", tablePtrI);
default:
- ndbout_c("ret: %d", ret);
- ndbrequire(false);
+ execute(signal, req.m_callback, logfile_group_id);
}
}
@@ -1441,3 +1464,22 @@ Dbtup::complete_restore_lcp(Uint32 tableId, Uint32 fragId)
tabDesc += 2;
}
}
+
+bool
+Dbtup::get_frag_info(Uint32 tableId, Uint32 fragId, Uint32* maxPage)
+{
+ jamEntry();
+ TablerecPtr tabPtr;
+ tabPtr.i= tableId;
+ ptrCheckGuard(tabPtr, cnoOfTablerec, tablerec);
+
+ FragrecordPtr fragPtr;
+ getFragmentrec(fragPtr, fragId, tabPtr.p);
+
+ if (maxPage)
+ {
+ * maxPage = fragPtr.p->noOfPages;
+ }
+
+ return true;
+}
diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp
index b0b0cec6b76..64f81dc11ab 100644
--- a/storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp
+++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp
@@ -818,9 +818,7 @@ Dbtup::checkUpdateOfPrimaryKey(KeyReqStruct* req_struct,
Tablerec* const regTabPtr)
{
Uint32 keyReadBuffer[MAX_KEY_SIZE_IN_WORDS];
- Uint32 attributeHeader;
TableDescriptor* attr_descr = req_struct->attr_descr;
- AttributeHeader* ahOut = (AttributeHeader*)&attributeHeader;
AttributeHeader ahIn(*updateBuffer);
Uint32 attributeId = ahIn.getAttributeId();
Uint32 attrDescriptorIndex = attributeId << ZAD_LOG_SIZE;
@@ -843,7 +841,7 @@ Dbtup::checkUpdateOfPrimaryKey(KeyReqStruct* req_struct,
ReadFunction f = regTabPtr->readFunctionArray[attributeId];
- AttributeHeader::init(&attributeHeader, attributeId, 0);
+ AttributeHeader attributeHeader(attributeId, 0);
req_struct->out_buf_index = 0;
req_struct->max_read = MAX_KEY_SIZE_IN_WORDS;
req_struct->attr_descriptor = attrDescriptor;
@@ -852,12 +850,12 @@ Dbtup::checkUpdateOfPrimaryKey(KeyReqStruct* req_struct,
req_struct->xfrm_flag = true;
ndbrequire((this->*f)(&keyReadBuffer[0],
req_struct,
- ahOut,
+ &attributeHeader,
attributeOffset));
req_struct->xfrm_flag = tmp;
- ndbrequire(req_struct->out_buf_index == ahOut->getDataSize());
- if (ahIn.getDataSize() != ahOut->getDataSize()) {
+ ndbrequire(req_struct->out_buf_index == attributeHeader.getDataSize());
+ if (ahIn.getDataSize() != attributeHeader.getDataSize()) {
jam();
return true;
}
diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp
index 6e53531e118..5e9306909b4 100644
--- a/storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp
+++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp
@@ -95,7 +95,23 @@ Dbtup::execACC_SCANREQ(Signal* signal)
}
}
- bits |= AccScanReq::getNRScanFlag(req->requestInfo) ? ScanOp::SCAN_NR : 0;
+ if (AccScanReq::getNRScanFlag(req->requestInfo))
+ {
+ jam();
+ bits |= ScanOp::SCAN_NR;
+ scanPtr.p->m_endPage = req->maxPage;
+ if (req->maxPage != RNIL && req->maxPage > frag.noOfPages)
+ {
+ ndbout_c("%u %u endPage: %u (noOfPages: %u)",
+ tablePtr.i, fragId,
+ req->maxPage, fragPtr.p->noOfPages);
+ }
+ }
+ else
+ {
+ jam();
+ scanPtr.p->m_endPage = RNIL;
+ }
// set up scan op
new (scanPtr.p) ScanOp();
@@ -540,7 +556,7 @@ Dbtup::scanFirst(Signal*, ScanOpPtr scanPtr)
ptrCheckGuard(fragPtr, cnoOfFragrec, fragrecord);
Fragrecord& frag = *fragPtr.p;
// in the future should not pre-allocate pages
- if (frag.noOfPages == 0) {
+ if (frag.noOfPages == 0 && ((bits & ScanOp::SCAN_NR) == 0)) {
jam();
scan.m_state = ScanOp::Last;
return;
@@ -632,11 +648,23 @@ Dbtup::scanNext(Signal* signal, ScanOpPtr scanPtr)
key.m_page_no++;
if (key.m_page_no >= frag.noOfPages) {
jam();
+
+ if ((bits & ScanOp::SCAN_NR) && (scan.m_endPage != RNIL))
+ {
+ jam();
+ if (key.m_page_no < scan.m_endPage)
+ {
+ jam();
+ ndbout_c("scanning page %u", key.m_page_no);
+ goto cont;
+ }
+ }
// no more pages, scan ends
pos.m_get = ScanPos::Get_undef;
scan.m_state = ScanOp::Last;
return true;
}
+ cont:
key.m_page_idx = 0;
pos.m_get = ScanPos::Get_page_mm;
// clear cached value
@@ -649,7 +677,13 @@ Dbtup::scanNext(Signal* signal, ScanOpPtr scanPtr)
{
if (pos.m_realpid_mm == RNIL) {
jam();
- pos.m_realpid_mm = getRealpid(fragPtr.p, key.m_page_no);
+ if (key.m_page_no < frag.noOfPages)
+ pos.m_realpid_mm = getRealpid(fragPtr.p, key.m_page_no);
+ else
+ {
+ ndbassert(bits & ScanOp::SCAN_NR);
+ goto nopage;
+ }
}
PagePtr pagePtr;
c_page_pool.getPtr(pagePtr, pos.m_realpid_mm);
@@ -657,9 +691,18 @@ Dbtup::scanNext(Signal* signal, ScanOpPtr scanPtr)
if (pagePtr.p->page_state == ZEMPTY_MM) {
// skip empty page
jam();
- pos.m_get = ScanPos::Get_next_page_mm;
- break; // incr loop count
+ if (! (bits & ScanOp::SCAN_NR))
+ {
+ pos.m_get = ScanPos::Get_next_page_mm;
+ break; // incr loop count
+ }
+ else
+ {
+ jam();
+ pos.m_realpid_mm = RNIL;
+ }
}
+ nopage:
pos.m_page = pagePtr.p;
pos.m_get = ScanPos::Get_tuple;
}
@@ -772,7 +815,7 @@ Dbtup::scanNext(Signal* signal, ScanOpPtr scanPtr)
uncommitted = committed = ~(unsigned)0;
int ret = tsman.get_page_free_bits(&key, &uncommitted, &committed);
ndbrequire(ret == 0);
- if (committed == 0) {
+ if (committed == 0 && uncommitted == 0) {
// skip empty page
jam();
pos.m_get = ScanPos::Get_next_page_dd;
@@ -820,11 +863,11 @@ Dbtup::scanNext(Signal* signal, ScanOpPtr scanPtr)
{
pos.m_get = ScanPos::Get_next_tuple_fs;
th = (Tuple_header*)&page->m_data[key.m_page_idx];
- thbits = th->m_header_bits;
if (likely(! (bits & ScanOp::SCAN_NR)))
{
jam();
+ thbits = th->m_header_bits;
if (! (thbits & Tuple_header::FREE))
{
goto found_tuple;
@@ -832,7 +875,15 @@ Dbtup::scanNext(Signal* signal, ScanOpPtr scanPtr)
}
else
{
- if ((foundGCI = *th->get_mm_gci(tablePtr.p)) > scanGCI)
+ if (pos.m_realpid_mm == RNIL)
+ {
+ jam();
+ foundGCI = 0;
+ goto found_deleted_rowid;
+ }
+ thbits = th->m_header_bits;
+ if ((foundGCI = *th->get_mm_gci(tablePtr.p)) > scanGCI ||
+ foundGCI == 0)
{
if (! (thbits & Tuple_header::FREE))
{
@@ -904,7 +955,8 @@ Dbtup::scanNext(Signal* signal, ScanOpPtr scanPtr)
Fix_page *mmpage = (Fix_page*)c_page_pool.getPtr(pos.m_realpid_mm);
th = (Tuple_header*)(mmpage->m_data + key_mm.m_page_idx);
- if ((foundGCI = *th->get_mm_gci(tablePtr.p)) > scanGCI)
+ if ((foundGCI = *th->get_mm_gci(tablePtr.p)) > scanGCI ||
+ foundGCI == 0)
{
if (! (thbits & Tuple_header::FREE))
break;
diff --git a/storage/ndb/src/kernel/blocks/dbutil/DbUtil.cpp b/storage/ndb/src/kernel/blocks/dbutil/DbUtil.cpp
index 550e255061f..f34bc41af06 100644
--- a/storage/ndb/src/kernel/blocks/dbutil/DbUtil.cpp
+++ b/storage/ndb/src/kernel/blocks/dbutil/DbUtil.cpp
@@ -1169,9 +1169,7 @@ DbUtil::prepareOperation(Signal* signal, PreparePtr prepPtr)
/**************************************************************
* Attribute found - store in mapping (AttributeId, Position)
**************************************************************/
- AttributeHeader & attrMap =
- AttributeHeader::init(attrMappingIt.data,
- attrDesc.AttributeId, // 1. Store AttrId
+ AttributeHeader attrMap(attrDesc.AttributeId, // 1. Store AttrId
0);
if (attrDesc.AttributeKeyFlag) {
@@ -1200,6 +1198,7 @@ DbUtil::prepareOperation(Signal* signal, PreparePtr prepPtr)
return;
}
}
+ *(attrMappingIt.data) = attrMap.m_value;
#if 0
ndbout << "BEFORE: attrLength: " << attrLength << endl;
#endif
diff --git a/storage/ndb/src/kernel/blocks/lgman.cpp b/storage/ndb/src/kernel/blocks/lgman.cpp
index 23738717580..0481f7b399b 100644
--- a/storage/ndb/src/kernel/blocks/lgman.cpp
+++ b/storage/ndb/src/kernel/blocks/lgman.cpp
@@ -2701,8 +2701,16 @@ Lgman::execute_undo_record(Signal* signal)
Uint32 lcp = * (ptr - len + 1);
if(m_latest_lcp && lcp > m_latest_lcp)
{
- // Just ignore
- break;
+ if (0)
+ {
+ const Uint32 * base = ptr - len + 1;
+ Uint32 lcp = base[0];
+ Uint32 tableId = base[1] >> 16;
+ Uint32 fragId = base[1] & 0xFFFF;
+
+ ndbout_c("NOT! ignoring lcp: %u tab: %u frag: %u",
+ lcp, tableId, fragId);
+ }
}
if(m_latest_lcp == 0 ||
diff --git a/storage/ndb/src/kernel/blocks/pgman.cpp b/storage/ndb/src/kernel/blocks/pgman.cpp
index d8e0c053984..aa1f04c720c 100644
--- a/storage/ndb/src/kernel/blocks/pgman.cpp
+++ b/storage/ndb/src/kernel/blocks/pgman.cpp
@@ -238,6 +238,13 @@ Pgman::execCONTINUEB(Signal* signal)
}
else
{
+ if (ERROR_INSERTED(11007))
+ {
+ ndbout << "No more writes..." << endl;
+ SET_ERROR_INSERT_VALUE(11008);
+ signal->theData[0] = 9999;
+ sendSignalWithDelay(CMVMI_REF, GSN_NDB_TAMPER, signal, 10000, 1);
+ }
signal->theData[0] = m_end_lcp_req.senderData;
sendSignal(m_end_lcp_req.senderRef, GSN_END_LCP_CONF, signal, 1, JBB);
}
@@ -493,6 +500,11 @@ Pgman::release_page_entry(Ptr<Page_entry>& ptr)
if (! (state & Page_entry::LOCKED))
ndbrequire(! (state & Page_entry::REQUEST));
+
+ if (ptr.p->m_copy_page_i != RNIL)
+ {
+ m_global_page_pool.release(ptr.p->m_copy_page_i);
+ }
set_page_state(ptr, 0);
m_page_hashlist.remove(ptr);
@@ -1142,7 +1154,8 @@ Pgman::process_cleanup(Signal* signal)
#ifdef VM_TRACE
debugOut << "PGMAN: " << ptr << " : process_cleanup" << endl;
#endif
- c_tup->disk_page_unmap_callback(ptr.p->m_real_page_i,
+ c_tup->disk_page_unmap_callback(0,
+ ptr.p->m_real_page_i,
ptr.p->m_dirty_count);
pageout(signal, ptr);
max_count--;
@@ -1180,6 +1193,11 @@ Pgman::move_cleanup_ptr(Ptr<Page_entry> ptr)
void
Pgman::execLCP_FRAG_ORD(Signal* signal)
{
+ if (ERROR_INSERTED(11008))
+ {
+ ndbout_c("Ignore LCP_FRAG_ORD");
+ return;
+ }
LcpFragOrd* ord = (LcpFragOrd*)signal->getDataPtr();
ndbrequire(ord->lcpId >= m_last_lcp_complete + 1 || m_last_lcp_complete == 0);
m_last_lcp = ord->lcpId;
@@ -1196,6 +1214,12 @@ Pgman::execLCP_FRAG_ORD(Signal* signal)
void
Pgman::execEND_LCP_REQ(Signal* signal)
{
+ if (ERROR_INSERTED(11008))
+ {
+ ndbout_c("Ignore END_LCP");
+ return;
+ }
+
EndLcpReq* req = (EndLcpReq*)signal->getDataPtr();
m_end_lcp_req = *req;
@@ -1274,7 +1298,8 @@ Pgman::process_lcp(Signal* signal)
{
DBG_LCP(" pageout()" << endl);
ptr.p->m_state |= Page_entry::LCP;
- c_tup->disk_page_unmap_callback(ptr.p->m_real_page_i,
+ c_tup->disk_page_unmap_callback(0,
+ ptr.p->m_real_page_i,
ptr.p->m_dirty_count);
pageout(signal, ptr);
}
@@ -1301,6 +1326,13 @@ Pgman::process_lcp(Signal* signal)
}
else
{
+ if (ERROR_INSERTED(11007))
+ {
+ ndbout << "No more writes..." << endl;
+ signal->theData[0] = 9999;
+ sendSignalWithDelay(CMVMI_REF, GSN_NDB_TAMPER, signal, 10000, 1);
+ SET_ERROR_INSERT_VALUE(11008);
+ }
signal->theData[0] = m_end_lcp_req.senderData;
sendSignal(m_end_lcp_req.senderRef, GSN_END_LCP_CONF, signal, 1, JBB);
}
@@ -1489,6 +1521,10 @@ Pgman::fswriteconf(Signal* signal, Ptr<Page_entry> ptr)
Page_state state = ptr.p->m_state;
ndbrequire(state & Page_entry::PAGEOUT);
+ c_tup->disk_page_unmap_callback(1,
+ ptr.p->m_real_page_i,
+ ptr.p->m_dirty_count);
+
state &= ~ Page_entry::PAGEOUT;
state &= ~ Page_entry::EMPTY;
state &= ~ Page_entry::DIRTY;
@@ -1588,8 +1624,11 @@ Pgman::fswritereq(Signal* signal, Ptr<Page_entry> ptr)
}
#endif
- sendSignal(NDBFS_REF, GSN_FSWRITEREQ, signal,
- FsReadWriteReq::FixedLength + 1, JBA);
+ if (!ERROR_INSERTED(11008))
+ {
+ sendSignal(NDBFS_REF, GSN_FSWRITEREQ, signal,
+ FsReadWriteReq::FixedLength + 1, JBA);
+ }
}
void
@@ -1739,7 +1778,7 @@ Pgman::get_page(Signal* signal, Ptr<Page_entry> ptr, Page_request page_req)
#endif
state |= Page_entry::REQUEST;
- if (only_request && req_flags & Page_request::EMPTY_PAGE)
+ if (only_request && (req_flags & Page_request::EMPTY_PAGE))
{
state |= Page_entry::EMPTY;
}
@@ -2401,7 +2440,8 @@ Pgman::execDUMP_STATE_ORD(Signal* signal)
if (pl_hash.find(ptr, key))
{
ndbout << "pageout " << ptr << endl;
- c_tup->disk_page_unmap_callback(ptr.p->m_real_page_i,
+ c_tup->disk_page_unmap_callback(0,
+ ptr.p->m_real_page_i,
ptr.p->m_dirty_count);
pageout(signal, ptr);
}
@@ -2452,6 +2492,16 @@ Pgman::execDUMP_STATE_ORD(Signal* signal)
{
SET_ERROR_INSERT_VALUE(11006);
}
+
+ if (signal->theData[0] == 11007)
+ {
+ SET_ERROR_INSERT_VALUE(11007);
+ }
+
+ if (signal->theData[0] == 11008)
+ {
+ SET_ERROR_INSERT_VALUE(11008);
+ }
}
// page cache client
diff --git a/storage/ndb/src/kernel/blocks/suma/Suma.cpp b/storage/ndb/src/kernel/blocks/suma/Suma.cpp
index b8cc438f514..7845b83693c 100644
--- a/storage/ndb/src/kernel/blocks/suma/Suma.cpp
+++ b/storage/ndb/src/kernel/blocks/suma/Suma.cpp
@@ -3655,6 +3655,8 @@ Suma::execSUB_GCP_COMPLETE_REP(Signal* signal)
if(m_gcp_complete_rep_count && !c_subscriber_nodes.isclear())
{
+ CRASH_INSERTION(13033);
+
NodeReceiverGroup rg(API_CLUSTERMGR, c_subscriber_nodes);
sendSignal(rg, GSN_SUB_GCP_COMPLETE_REP, signal,
SubGcpCompleteRep::SignalLength, JBB);
@@ -3674,8 +3676,8 @@ Suma::execSUB_GCP_COMPLETE_REP(Signal* signal)
{
if(m_active_buckets.get(i))
continue;
-
- if(c_buckets[i].m_buffer_tail != RNIL)
+
+ if (!c_subscriber_nodes.isclear())
{
//Uint32* dst;
get_buffer_ptr(signal, i, gci, 0);
diff --git a/storage/ndb/src/kernel/blocks/tsman.cpp b/storage/ndb/src/kernel/blocks/tsman.cpp
index 8f61ec0cf7b..3a7003d56c8 100644
--- a/storage/ndb/src/kernel/blocks/tsman.cpp
+++ b/storage/ndb/src/kernel/blocks/tsman.cpp
@@ -299,7 +299,7 @@ Tsman::execDUMP_STATE_ORD(Signal* signal){
Uint32 new_bits = curr_bits ^ rand();
Local_key key = chunks[chunk].start_page;
key.m_page_no += page;
- ndbrequire(update_page_free_bits(signal, &key, new_bits, 0) == 0);
+ ndbrequire(update_page_free_bits(signal, &key, new_bits) == 0);
}
}
}
@@ -366,6 +366,20 @@ Tsman::execCREATE_FILEGROUP_REQ(Signal* signal){
CreateFilegroupImplRef::SignalLength, JBB);
}
+NdbOut&
+operator<<(NdbOut& out, const File_formats::Datafile::Extent_header & obj)
+{
+ out << "table: " << obj.m_table
+ << " fragment: " << obj.m_fragment_id << " ";
+ for(Uint32 i = 0; i<32; i++)
+ {
+ char t[2];
+ BaseString::snprintf(t, sizeof(t), "%x", obj.get_free_bits(i));
+ out << t;
+ }
+ return out;
+}
+
void
Tsman::execDROP_FILEGROUP_REQ(Signal* signal){
jamEntry();
@@ -1590,8 +1604,7 @@ Tsman::execFREE_EXTENT_REQ(Signal* signal)
int
Tsman::update_page_free_bits(Signal* signal,
Local_key *key,
- unsigned committed_bits,
- Uint64 lsn)
+ unsigned committed_bits)
{
jamEntry();
@@ -1626,6 +1639,18 @@ Tsman::update_page_free_bits(Signal* signal,
File_formats::Datafile::Extent_header* header =
page->get_header(val.m_extent_no, val.m_extent_size);
+ if (header->m_table == RNIL)
+ {
+ ndbout << "update page free bits page: " << *key
+ << " " << *header << endl;
+ }
+
+ if (0)
+ {
+ ndbout << "update page free bits page(" << committed_bits << ") "
+ << *key << " " << *header << endl;
+ }
+
ndbrequire(header->m_table != RNIL);
Uint32 page_no_in_extent = calc_page_no_in_extent(key->m_page_no, &val);
@@ -1637,7 +1662,7 @@ Tsman::update_page_free_bits(Signal* signal,
Uint32 src = header->get_free_bits(page_no_in_extent) & UNCOMMITTED_MASK;
header->update_free_bits(page_no_in_extent, src | committed_bits);
- m_page_cache_client.update_lsn(preq.m_page, lsn);
+ m_page_cache_client.update_lsn(preq.m_page, 0);
return 0;
}
@@ -1725,6 +1750,11 @@ Tsman::unmap_page(Signal* signal, Local_key *key, Uint32 uncommitted_bits)
File_formats::Datafile::Extent_header* header =
page->get_header(val.m_extent_no, val.m_extent_size);
+ if (header->m_table == RNIL)
+ {
+ ndbout << "trying to unmap page: " << *key
+ << " " << *header << endl;
+ }
ndbrequire(header->m_table != RNIL);
Uint32 page_no_in_extent = calc_page_no_in_extent(key->m_page_no, &val);
@@ -1746,9 +1776,7 @@ Tsman::restart_undo_page_free_bits(Signal* signal,
Uint32 tableId,
Uint32 fragId,
Local_key *key,
- unsigned bits,
- Uint64 undo_lsn,
- Uint64 page_lsn)
+ unsigned bits)
{
jamEntry();
@@ -1782,21 +1810,7 @@ Tsman::restart_undo_page_free_bits(Signal* signal,
(File_formats::Datafile::Extent_page*)ptr_p;
File_formats::Datafile::Extent_header* header =
page->get_header(val.m_extent_no, val.m_extent_size);
-
- Uint64 lsn = 0;
- lsn += page->m_page_header.m_page_lsn_hi; lsn <<= 32;
- lsn += page->m_page_header.m_page_lsn_lo;
-
- if (undo_lsn > lsn && undo_lsn > page_lsn)
- {
- if (DBG_UNDO)
- ndbout << "tsman: ignore " << undo_lsn << "(" << lsn << ", "
- << page_lsn << ") "
- << *key << " "
- << " -> " << bits << endl;
- return 0;
- }
-
+
if (header->m_table == RNIL)
{
if (DBG_UNDO)
@@ -1815,7 +1829,7 @@ Tsman::restart_undo_page_free_bits(Signal* signal,
*/
if (DBG_UNDO)
{
- ndbout << "tsman: apply " << undo_lsn << "(" << lsn << ") "
+ ndbout << "tsman: apply "
<< *key << " " << (src & COMMITTED_MASK)
<< " -> " << bits << endl;
}
@@ -1863,7 +1877,7 @@ Tsman::execALLOC_PAGE_REQ(Signal* signal)
/**
* Handling of unmapped extent header pages is not implemented
*/
- int flags = 0;
+ int flags = Page_cache_client::DIRTY_REQ;
int real_page_id;
Uint32 page_no;
Uint32 src_bits;
diff --git a/storage/ndb/src/kernel/blocks/tsman.hpp b/storage/ndb/src/kernel/blocks/tsman.hpp
index 1293cc54141..20019e6d4d1 100644
--- a/storage/ndb/src/kernel/blocks/tsman.hpp
+++ b/storage/ndb/src/kernel/blocks/tsman.hpp
@@ -209,12 +209,12 @@ private:
void load_extent_page_callback(Signal*, Uint32, Uint32);
void create_file_ref(Signal*, Ptr<Tablespace>, Ptr<Datafile>,
Uint32,Uint32,Uint32);
- int update_page_free_bits(Signal*, Local_key*, unsigned committed_bits,
- Uint64 lsn);
+ int update_page_free_bits(Signal*, Local_key*, unsigned committed_bits);
+
int get_page_free_bits(Signal*, Local_key*, unsigned*, unsigned*);
int unmap_page(Signal*, Local_key*, unsigned uncommitted_bits);
int restart_undo_page_free_bits(Signal*, Uint32, Uint32, Local_key*,
- unsigned committed_bits, Uint64, Uint64);
+ unsigned committed_bits);
int alloc_extent(Signal* signal, Uint32 tablespace, Local_key* key);
int alloc_page_from_extent(Signal*, Uint32, Local_key*, Uint32 bits);
@@ -320,7 +320,7 @@ public:
/**
* Update page free bits
*/
- int update_page_free_bits(Local_key*, unsigned bits, Uint64 lsn);
+ int update_page_free_bits(Local_key*, unsigned bits);
/**
* Get page free bits
@@ -336,8 +336,7 @@ public:
/**
* Undo handling of page bits
*/
- int restart_undo_page_free_bits(Local_key*, unsigned bits,
- Uint64 lsn, Uint64 page_lsn);
+ int restart_undo_page_free_bits(Local_key*, unsigned bits);
/**
* Get tablespace info
@@ -417,10 +416,9 @@ Tablespace_client::free_extent(Local_key* key, Uint64 lsn)
inline
int
Tablespace_client::update_page_free_bits(Local_key *key,
- unsigned committed_bits,
- Uint64 lsn)
+ unsigned committed_bits)
{
- return m_tsman->update_page_free_bits(m_signal, key, committed_bits, lsn);
+ return m_tsman->update_page_free_bits(m_signal, key, committed_bits);
}
inline
@@ -442,17 +440,13 @@ Tablespace_client::unmap_page(Local_key *key, unsigned uncommitted_bits)
inline
int
Tablespace_client::restart_undo_page_free_bits(Local_key* key,
- unsigned committed_bits,
- Uint64 lsn,
- Uint64 page_lsn)
+ unsigned committed_bits)
{
return m_tsman->restart_undo_page_free_bits(m_signal,
m_table_id,
m_fragment_id,
key,
- committed_bits,
- lsn,
- page_lsn);
+ committed_bits);
}
#endif
diff --git a/storage/ndb/src/mgmclient/CommandInterpreter.cpp b/storage/ndb/src/mgmclient/CommandInterpreter.cpp
index 875cc2771ae..9e8910c9649 100644
--- a/storage/ndb/src/mgmclient/CommandInterpreter.cpp
+++ b/storage/ndb/src/mgmclient/CommandInterpreter.cpp
@@ -269,8 +269,8 @@ static const char* helpText =
"CLUSTERLOG TOGGLE [<severity>] ... Toggle severity filter on/off\n"
"CLUSTERLOG INFO Print cluster log information\n"
"<id> START Start data node (started with -n)\n"
-"<id> RESTART [-n] [-i] Restart data or management server node\n"
-"<id> STOP Stop data or management server node\n"
+"<id> RESTART [-n] [-i] [-a] Restart data or management server node\n"
+"<id> STOP [-a] Stop data or management server node\n"
"ENTER SINGLE USER MODE <id> Enter single user mode\n"
"EXIT SINGLE USER MODE Exit single user mode\n"
"<id> STATUS Print status\n"
@@ -434,7 +434,7 @@ static const char* helpTextRestart =
" NDB Cluster -- Management Client -- Help for RESTART command\n"
"---------------------------------------------------------------------------\n"
"RESTART Restart data or management server node\n\n"
-"<id> RESTART [-n] [-i] \n"
+"<id> RESTART [-n] [-i] [-a]\n"
" Restart the data or management node <id>(or All data nodes).\n\n"
" -n (--nostart) restarts the node but does not\n"
" make it join the cluster. Use '<id> START' to\n"
@@ -445,6 +445,7 @@ static const char* helpTextRestart =
" in the same node group during start up.\n\n"
" Consult the documentation before using -i.\n\n"
" INCORRECT USE OF -i WILL CAUSE DATA LOSS!\n"
+" -a Aborts the node, not syncing GCP.\n"
;
static const char* helpTextStop =
@@ -452,10 +453,11 @@ static const char* helpTextStop =
" NDB Cluster -- Management Client -- Help for STOP command\n"
"---------------------------------------------------------------------------\n"
"STOP Stop data or management server node\n\n"
-"<id> STOP Stop the data or management server node <id>.\n\n"
+"<id> STOP [-a] Stop the data or management server node <id>.\n\n"
" ALL STOP will just stop all data nodes.\n\n"
" If you desire to also shut down management servers,\n"
-" use SHUTDOWN instead.\n"
+" use SHUTDOWN instead.\n"
+" -a Aborts the node, not syncing GCP.\n"
;
static const char* helpTextEnterSingleUserMode =
diff --git a/storage/ndb/src/mgmsrv/MgmtSrvr.cpp b/storage/ndb/src/mgmsrv/MgmtSrvr.cpp
index af708664a69..ee5bb5103d8 100644
--- a/storage/ndb/src/mgmsrv/MgmtSrvr.cpp
+++ b/storage/ndb/src/mgmsrv/MgmtSrvr.cpp
@@ -234,10 +234,10 @@ MgmtSrvr::startEventLog()
}
}
-void
-MgmtSrvr::stopEventLog()
+void
+MgmtSrvr::stopEventLog()
{
- // Nothing yet
+ g_eventLogger.close();
}
bool
diff --git a/storage/ndb/src/mgmsrv/Services.cpp b/storage/ndb/src/mgmsrv/Services.cpp
index 9272b5ab532..eeae61025b1 100644
--- a/storage/ndb/src/mgmsrv/Services.cpp
+++ b/storage/ndb/src/mgmsrv/Services.cpp
@@ -968,7 +968,6 @@ printNodeStatus(OutputStream *output,
MgmtSrvr &mgmsrv,
enum ndb_mgm_node_type type) {
NodeId nodeId = 0;
- mgmsrv.updateStatus();
while(mgmsrv.getNextNodeId(&nodeId, type)) {
enum ndb_mgm_node_status status;
Uint32 startPhase = 0,
@@ -1018,6 +1017,7 @@ MgmApiSession::getStatus(Parser<MgmApiSession>::Context &,
m_output->println("node status");
SLEEP_ERROR_INSERTED(6);
m_output->println("nodes: %d", noOfNodes);
+ m_mgmsrv.updateStatus();
SLEEP_ERROR_INSERTED(7);
printNodeStatus(m_output, m_mgmsrv, NDB_MGM_NODE_TYPE_NDB);
printNodeStatus(m_output, m_mgmsrv, NDB_MGM_NODE_TYPE_MGM);
diff --git a/storage/ndb/src/ndbapi/ClusterMgr.cpp b/storage/ndb/src/ndbapi/ClusterMgr.cpp
index 448bc1025e8..f5cc44f70d7 100644
--- a/storage/ndb/src/ndbapi/ClusterMgr.cpp
+++ b/storage/ndb/src/ndbapi/ClusterMgr.cpp
@@ -204,7 +204,10 @@ ClusterMgr::forceHB()
theFacade.sendSignalUnCond(&signal, nodeId);
}
- NdbCondition_WaitTimeout(waitForHBCond, theFacade.theMutexPtr, 1000);
+ /* Wait for nodes to reply - if any heartbeats was sent */
+ if (!waitForHBFromNodes.isclear())
+ NdbCondition_WaitTimeout(waitForHBCond, theFacade.theMutexPtr, 1000);
+
waitingForHB= false;
#ifdef DEBUG_REG
ndbout << "Still waiting for HB from " << waitForHBFromNodes.getText(buf) << endl;
diff --git a/storage/ndb/src/ndbapi/NdbBlob.cpp b/storage/ndb/src/ndbapi/NdbBlob.cpp
index 0fc96add084..f3d1dbe3dd1 100644
--- a/storage/ndb/src/ndbapi/NdbBlob.cpp
+++ b/storage/ndb/src/ndbapi/NdbBlob.cpp
@@ -1141,7 +1141,7 @@ NdbBlob::readTableParts(char* buf, Uint32 part, Uint32 count)
* table tuple does not fully protect blob parts since DBTUP
* commits each tuple separately.
*/
- tOp->readTuple() == -1 ||
+ tOp->readTuple(NdbOperation::LM_SimpleRead) == -1 ||
setPartKeyValue(tOp, part + n) == -1 ||
tOp->getValue((Uint32)3, buf) == NULL) {
setErrorCode(tOp);
diff --git a/storage/ndb/src/ndbapi/NdbIndexOperation.cpp b/storage/ndb/src/ndbapi/NdbIndexOperation.cpp
index fc19bd251d4..921769f09e3 100644
--- a/storage/ndb/src/ndbapi/NdbIndexOperation.cpp
+++ b/storage/ndb/src/ndbapi/NdbIndexOperation.cpp
@@ -85,6 +85,9 @@ int NdbIndexOperation::readTuple(NdbOperation::LockMode lm)
case LM_CommittedRead:
return readTuple();
break;
+ case LM_SimpleRead:
+ return readTuple();
+ break;
default:
return -1;
};
diff --git a/storage/ndb/src/ndbapi/NdbOperation.cpp b/storage/ndb/src/ndbapi/NdbOperation.cpp
index 50531292e40..ddaf5d0b233 100644
--- a/storage/ndb/src/ndbapi/NdbOperation.cpp
+++ b/storage/ndb/src/ndbapi/NdbOperation.cpp
@@ -429,3 +429,9 @@ NdbOperation::getTable() const
{
return m_currentTable;
}
+
+NdbTransaction*
+NdbOperation::getNdbTransaction()
+{
+ return theNdbCon;
+}
diff --git a/storage/ndb/src/ndbapi/NdbOperationDefine.cpp b/storage/ndb/src/ndbapi/NdbOperationDefine.cpp
index c9459ff911c..21a6185347e 100644
--- a/storage/ndb/src/ndbapi/NdbOperationDefine.cpp
+++ b/storage/ndb/src/ndbapi/NdbOperationDefine.cpp
@@ -131,6 +131,8 @@ NdbOperation::readTuple(NdbOperation::LockMode lm)
case LM_CommittedRead:
return committedRead();
break;
+ case LM_SimpleRead:
+ return simpleRead();
default:
return -1;
};
@@ -185,24 +187,22 @@ NdbOperation::readTupleExclusive()
int
NdbOperation::simpleRead()
{
- /**
- * Currently/still disabled
- */
- return readTuple();
-#if 0
+ NdbTransaction* tNdbCon = theNdbCon;
int tErrorLine = theErrorLine;
if (theStatus == Init) {
theStatus = OperationDefined;
theOperationType = ReadRequest;
theSimpleIndicator = 1;
+ theDirtyIndicator = 0;
theErrorLine = tErrorLine++;
- theLockMode = LM_Read;
+ theLockMode = LM_SimpleRead;
+ m_abortOption = AO_IgnoreError;
+ tNdbCon->theSimpleState = 0;
return 0;
} else {
setErrorCode(4200);
return -1;
}//if
-#endif
}//NdbOperation::simpleRead()
/*****************************************************************************
@@ -338,28 +338,32 @@ NdbOperation::setReadLockMode(LockMode lockMode)
{
/* We only support changing lock mode for read operations at this time. */
assert(theOperationType == ReadRequest || theOperationType == ReadExclusive);
- switch (lockMode)
- {
- case LM_CommittedRead:
- theOperationType= ReadRequest;
- theSimpleIndicator= 1;
- theDirtyIndicator= 1;
- break;
- case LM_Read:
- theNdbCon->theSimpleState= 0;
- theOperationType= ReadRequest;
- theSimpleIndicator= 0;
- theDirtyIndicator= 0;
- break;
- case LM_Exclusive:
- theNdbCon->theSimpleState= 0;
- theOperationType= ReadExclusive;
- theSimpleIndicator= 0;
- theDirtyIndicator= 0;
- break;
- default:
- /* Not supported / invalid. */
- assert(false);
+ switch (lockMode) {
+ case LM_CommittedRead: /* TODO, check theNdbCon->theSimpleState */
+ theOperationType= ReadRequest;
+ theSimpleIndicator= 1;
+ theDirtyIndicator= 1;
+ break;
+ case LM_SimpleRead: /* TODO, check theNdbCon->theSimpleState */
+ theOperationType= ReadRequest;
+ theSimpleIndicator= 1;
+ theDirtyIndicator= 0;
+ break;
+ case LM_Read:
+ theNdbCon->theSimpleState= 0;
+ theOperationType= ReadRequest;
+ theSimpleIndicator= 0;
+ theDirtyIndicator= 0;
+ break;
+ case LM_Exclusive:
+ theNdbCon->theSimpleState= 0;
+ theOperationType= ReadExclusive;
+ theSimpleIndicator= 0;
+ theDirtyIndicator= 0;
+ break;
+ default:
+ /* Not supported / invalid. */
+ assert(false);
}
theLockMode= lockMode;
}
@@ -404,9 +408,8 @@ NdbOperation::getValue_impl(const NdbColumnImpl* tAttrInfo, char* aValue)
return NULL;
}//if
}//if
- Uint32 ah;
- AttributeHeader::init(&ah, tAttrInfo->m_attrId, 0);
- if (insertATTRINFO(ah) != -1) {
+ AttributeHeader ah(tAttrInfo->m_attrId, 0);
+ if (insertATTRINFO(ah.m_value) != -1) {
// Insert Attribute Id into ATTRINFO part.
/************************************************************************
@@ -532,12 +535,11 @@ NdbOperation::setValue( const NdbColumnImpl* tAttrInfo,
tAttrId = tAttrInfo->m_attrId;
m_no_disk_flag &= (tAttrInfo->m_storageType == NDB_STORAGETYPE_DISK ? 0:1);
const char *aValue = aValuePassed;
- Uint32 ahValue;
if (aValue == NULL) {
if (tAttrInfo->m_nullable) {
- AttributeHeader& ah = AttributeHeader::init(&ahValue, tAttrId, 0);
+ AttributeHeader ah(tAttrId, 0);
ah.setNULL();
- insertATTRINFO(ahValue);
+ insertATTRINFO(ah.m_value);
// Insert Attribute Id with the value
// NULL into ATTRINFO part.
DBUG_RETURN(0);
@@ -573,8 +575,8 @@ NdbOperation::setValue( const NdbColumnImpl* tAttrInfo,
// Excluding bits in last word
const Uint32 sizeInWords = sizeInBytes / 4;
- (void) AttributeHeader::init(&ahValue, tAttrId, sizeInBytes);
- insertATTRINFO( ahValue );
+ AttributeHeader ah(tAttrId, sizeInBytes);
+ insertATTRINFO( ah.m_value );
/***********************************************************************
* Check if the pointer of the value passed is aligned on a 4 byte boundary.
diff --git a/storage/ndb/src/ndbapi/NdbOperationExec.cpp b/storage/ndb/src/ndbapi/NdbOperationExec.cpp
index 9fe85265a0c..27672e0458c 100644
--- a/storage/ndb/src/ndbapi/NdbOperationExec.cpp
+++ b/storage/ndb/src/ndbapi/NdbOperationExec.cpp
@@ -175,12 +175,11 @@ NdbOperation::prepareSend(Uint32 aTC_ConnectPtr,
Uint8 tInterpretIndicator = theInterpretIndicator;
Uint8 tNoDisk = m_no_disk_flag;
-//-------------------------------------------------------------
-// Simple state is set if start and commit is set and it is
-// a read request. Otherwise it is set to zero.
-//-------------------------------------------------------------
+ /**
+ * A dirty read, can not abort the transaction
+ */
Uint8 tReadInd = (theOperationType == ReadRequest);
- Uint8 tSimpleState = tReadInd & tSimpleIndicator;
+ Uint8 tDirtyState = tReadInd & tDirtyIndicator;
tcKeyReq->transId1 = tTransId1;
tcKeyReq->transId2 = tTransId2;
@@ -206,8 +205,8 @@ NdbOperation::prepareSend(Uint32 aTC_ConnectPtr,
tcKeyReq->setOperationType(tReqInfo, tOperationType);
tcKeyReq->setKeyLength(tReqInfo, tTupKeyLen);
- // A simple read is always ignore error
- abortOption = tSimpleState ? (Uint8) AO_IgnoreError : (Uint8) abortOption;
+ // A dirty read is always ignore error
+ abortOption = tDirtyState ? (Uint8) AO_IgnoreError : (Uint8) abortOption;
tcKeyReq->setAbortOption(tReqInfo, abortOption);
m_abortOption = abortOption;
@@ -549,8 +548,8 @@ NdbOperation::receiveTCKEYREF( NdbApiSignal* aSignal)
theStatus = Finished;
theReceiver.m_received_result_length = ~0;
- // not simple read
- if(! (theOperationType == ReadRequest && theSimpleIndicator))
+ // not dirty read
+ if(! (theOperationType == ReadRequest && theDirtyIndicator))
{
theNdbCon->OpCompleteFailure(this);
return -1;
diff --git a/storage/ndb/src/ndbapi/NdbReceiver.cpp b/storage/ndb/src/ndbapi/NdbReceiver.cpp
index 34b3a14ac6e..5a311bcbefe 100644
--- a/storage/ndb/src/ndbapi/NdbReceiver.cpp
+++ b/storage/ndb/src/ndbapi/NdbReceiver.cpp
@@ -283,7 +283,7 @@ NdbReceiver::execTRANSID_AI(const Uint32* aDataPtr, Uint32 aLength)
Uint32 tmp = m_received_result_length + aLength;
m_received_result_length = tmp;
- return (tmp == exp || (exp > TcKeyConf::SimpleReadBit) ? 1 : 0);
+ return (tmp == exp || (exp > TcKeyConf::DirtyReadBit) ? 1 : 0);
}
int
diff --git a/storage/ndb/src/ndbapi/NdbScanFilter.cpp b/storage/ndb/src/ndbapi/NdbScanFilter.cpp
index fb47772fdea..25f74ce71a4 100644
--- a/storage/ndb/src/ndbapi/NdbScanFilter.cpp
+++ b/storage/ndb/src/ndbapi/NdbScanFilter.cpp
@@ -14,11 +14,15 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <NdbScanFilter.hpp>
+#include <Ndb.hpp>
#include <NdbOperation.hpp>
#include "NdbDictionaryImpl.hpp"
#include <Vector.hpp>
#include <NdbOut.hpp>
#include <Interpreter.hpp>
+#include <signaldata/AttrInfo.hpp>
+#include "NdbApiSignal.hpp"
+#include "NdbUtil.hpp"
#ifdef VM_TRACE
#include <NdbEnv.h>
@@ -52,14 +56,37 @@ public:
int cond_col_const(Interpreter::BinaryCondition, Uint32 attrId,
const void * value, Uint32 len);
+
+ bool m_abort_on_too_large;
+
+ NdbOperation::OperationStatus m_initial_op_status;
+ Uint32 m_initial_AI_size;
+ Uint32 m_max_size;
+
+ Uint32 get_size() {
+ assert(m_operation->theTotalCurrAI_Len >= m_initial_AI_size);
+ return m_operation->theTotalCurrAI_Len - m_initial_AI_size;
+ }
+ bool check_size() {
+ if (get_size() <= m_max_size)
+ return true;
+ handle_filter_too_large();
+ return false;
+ }
+ void handle_filter_too_large();
+
+ NdbError m_error;
};
const Uint32 LabelExit = ~0;
-NdbScanFilter::NdbScanFilter(class NdbOperation * op)
+NdbScanFilter::NdbScanFilter(class NdbOperation * op,
+ bool abort_on_too_large,
+ Uint32 max_size)
: m_impl(* new NdbScanFilterImpl())
{
+ DBUG_ENTER("NdbScanFilter::NdbScanFilter");
m_impl.m_current.m_group = (NdbScanFilter::Group)0;
m_impl.m_current.m_popCount = 0;
m_impl.m_current.m_ownLabel = 0;
@@ -69,6 +96,21 @@ NdbScanFilter::NdbScanFilter(class NdbOperation * op)
m_impl.m_latestAttrib = ~0;
m_impl.m_operation = op;
m_impl.m_negative = 0;
+
+ DBUG_PRINT("info", ("op status: %d tot AI: %u in curr: %u",
+ op->theStatus,
+ op->theTotalCurrAI_Len, op->theAI_LenInCurrAI));
+
+ m_impl.m_abort_on_too_large = abort_on_too_large;
+
+ m_impl.m_initial_op_status = op->theStatus;
+ m_impl.m_initial_AI_size = op->theTotalCurrAI_Len;
+ if (max_size > NDB_MAX_SCANFILTER_SIZE_IN_WORDS)
+ max_size = NDB_MAX_SCANFILTER_SIZE_IN_WORDS;
+ m_impl.m_max_size = max_size;
+
+ m_impl.m_error.code = 0;
+ DBUG_VOID_RETURN;
}
NdbScanFilter::~NdbScanFilter(){
@@ -200,30 +242,38 @@ NdbScanFilter::end(){
switch(tmp.m_group){
case NdbScanFilter::AND:
if(tmp.m_trueLabel == (Uint32)~0){
- m_impl.m_operation->interpret_exit_ok();
+ if (m_impl.m_operation->interpret_exit_ok() == -1)
+ return -1;
} else {
- m_impl.m_operation->branch_label(tmp.m_trueLabel);
+ if (m_impl.m_operation->branch_label(tmp.m_trueLabel) == -1)
+ return -1;
}
break;
case NdbScanFilter::NAND:
if(tmp.m_trueLabel == (Uint32)~0){
- m_impl.m_operation->interpret_exit_nok();
+ if (m_impl.m_operation->interpret_exit_nok() == -1)
+ return -1;
} else {
- m_impl.m_operation->branch_label(tmp.m_falseLabel);
+ if (m_impl.m_operation->branch_label(tmp.m_falseLabel) == -1)
+ return -1;
}
break;
case NdbScanFilter::OR:
if(tmp.m_falseLabel == (Uint32)~0){
- m_impl.m_operation->interpret_exit_nok();
+ if (m_impl.m_operation->interpret_exit_nok() == -1)
+ return -1;
} else {
- m_impl.m_operation->branch_label(tmp.m_falseLabel);
+ if (m_impl.m_operation->branch_label(tmp.m_falseLabel) == -1)
+ return -1;
}
break;
case NdbScanFilter::NOR:
if(tmp.m_falseLabel == (Uint32)~0){
- m_impl.m_operation->interpret_exit_ok();
+ if (m_impl.m_operation->interpret_exit_ok() == -1)
+ return -1;
} else {
- m_impl.m_operation->branch_label(tmp.m_trueLabel);
+ if (m_impl.m_operation->branch_label(tmp.m_trueLabel) == -1)
+ return -1;
}
break;
default:
@@ -231,24 +281,29 @@ NdbScanFilter::end(){
return -1;
}
- m_impl.m_operation->def_label(tmp.m_ownLabel);
+ if (m_impl.m_operation->def_label(tmp.m_ownLabel) == -1)
+ return -1;
if(m_impl.m_stack.size() == 0){
switch(tmp.m_group){
case NdbScanFilter::AND:
case NdbScanFilter::NOR:
- m_impl.m_operation->interpret_exit_nok();
+ if (m_impl.m_operation->interpret_exit_nok() == -1)
+ return -1;
break;
case NdbScanFilter::OR:
case NdbScanFilter::NAND:
- m_impl.m_operation->interpret_exit_ok();
+ if (m_impl.m_operation->interpret_exit_ok() == -1)
+ return -1;
break;
default:
m_impl.m_operation->setErrorCodeAbort(4260);
return -1;
}
}
-
+
+ if (!m_impl.check_size())
+ return -1;
return 0;
}
@@ -261,10 +316,16 @@ NdbScanFilter::istrue(){
}
if(m_impl.m_current.m_trueLabel == (Uint32)~0){
- return m_impl.m_operation->interpret_exit_ok();
+ if (m_impl.m_operation->interpret_exit_ok() == -1)
+ return -1;
} else {
- return m_impl.m_operation->branch_label(m_impl.m_current.m_trueLabel);
+ if (m_impl.m_operation->branch_label(m_impl.m_current.m_trueLabel) == -1)
+ return -1;
}
+
+ if (!m_impl.check_size())
+ return -1;
+ return 0;
}
int
@@ -276,12 +337,22 @@ NdbScanFilter::isfalse(){
}
if(m_impl.m_current.m_falseLabel == (Uint32)~0){
- return m_impl.m_operation->interpret_exit_nok();
+ if (m_impl.m_operation->interpret_exit_nok() == -1)
+ return -1;
} else {
- return m_impl.m_operation->branch_label(m_impl.m_current.m_falseLabel);
+ if (m_impl.m_operation->branch_label(m_impl.m_current.m_falseLabel) == -1)
+ return -1;
}
+
+ if (!m_impl.check_size())
+ return -1;
+ return 0;
}
+NdbOperation *
+NdbScanFilter::getNdbOperation(){
+ return m_impl.m_operation;
+}
#define action(x, y, z)
@@ -330,7 +401,11 @@ NdbScanFilterImpl::cond_col(Interpreter::UnaryCondition op, Uint32 AttrId){
}
Branch1 branch = table2[op].m_branches[m_current.m_group];
- (m_operation->* branch)(AttrId, m_current.m_ownLabel);
+ if ((m_operation->* branch)(AttrId, m_current.m_ownLabel) == -1)
+ return -1;
+
+ if (!check_size())
+ return -1;
return 0;
}
@@ -463,8 +538,12 @@ NdbScanFilterImpl::cond_col_const(Interpreter::BinaryCondition op,
return -1;
}
- int ret = (m_operation->* branch)(AttrId, value, len, false, m_current.m_ownLabel);
- return ret;
+ if ((m_operation->* branch)(AttrId, value, len, false, m_current.m_ownLabel) == -1)
+ return -1;
+
+ if (!check_size())
+ return -1;
+ return 0;
}
int
@@ -490,7 +569,130 @@ NdbScanFilter::cmp(BinaryCondition cond, int ColId,
return m_impl.cond_col_const(Interpreter::NOT_LIKE, ColId, val, len);
}
return -1;
-}
+}
+
+void
+NdbScanFilterImpl::handle_filter_too_large()
+{
+ DBUG_ENTER("NdbScanFilterImpl::handle_filter_too_large");
+
+ NdbOperation* const op = m_operation;
+ m_error.code = NdbScanFilter::FilterTooLarge;
+ if (m_abort_on_too_large)
+ op->setErrorCodeAbort(m_error.code);
+
+ /*
+ * Possible interpreted parts at this point are:
+ *
+ * 1. initial read
+ * 2. interpreted program
+ *
+ * It is assumed that NdbScanFilter has created all of 2
+ * so that we don't have to save interpreter state.
+ */
+
+ const Uint32 size = get_size();
+ assert(size != 0);
+
+ // new ATTRINFO size
+ const Uint32 new_size = m_initial_AI_size;
+
+ // find last signal for new size
+ assert(op->theFirstATTRINFO != NULL);
+ NdbApiSignal* lastSignal = op->theFirstATTRINFO;
+ Uint32 n = 0;
+ while (n + AttrInfo::DataLength < new_size) {
+ lastSignal = lastSignal->next();
+ assert(lastSignal != NULL);
+ n += AttrInfo::DataLength;
+ }
+ assert(n < size);
+
+ // release remaining signals
+ NdbApiSignal* tSignal = lastSignal->next();
+ op->theNdb->releaseSignalsInList(&tSignal);
+ lastSignal->next(NULL);
+
+ // length of lastSignal
+ const Uint32 new_curr = AttrInfo::HeaderLength + new_size - n;
+ assert(new_curr <= 25);
+
+ DBUG_PRINT("info", ("op status: %d->%d tot AI: %u->%u in curr: %u->%u",
+ op->theStatus, m_initial_op_status,
+ op->theTotalCurrAI_Len, new_size,
+ op->theAI_LenInCurrAI, new_curr));
+
+ // reset op state
+ op->theStatus = m_initial_op_status;
+
+ // reset interpreter state to initial
+
+ NdbBranch* tBranch = op->theFirstBranch;
+ while (tBranch != NULL) {
+ NdbBranch* tmp = tBranch;
+ tBranch = tBranch->theNext;
+ op->theNdb->releaseNdbBranch(tmp);
+ }
+ op->theFirstBranch = NULL;
+ op->theLastBranch = NULL;
+
+ NdbLabel* tLabel = op->theFirstLabel;
+ while (tLabel != NULL) {
+ NdbLabel* tmp = tLabel;
+ tLabel = tLabel->theNext;
+ op->theNdb->releaseNdbLabel(tmp);
+ }
+ op->theFirstLabel = NULL;
+ op->theLastLabel = NULL;
+
+ NdbCall* tCall = op->theFirstCall;
+ while (tCall != NULL) {
+ NdbCall* tmp = tCall;
+ tCall = tCall->theNext;
+ op->theNdb->releaseNdbCall(tmp);
+ }
+ op->theFirstCall = NULL;
+ op->theLastCall = NULL;
+
+ NdbSubroutine* tSubroutine = op->theFirstSubroutine;
+ while (tSubroutine != NULL) {
+ NdbSubroutine* tmp = tSubroutine;
+ tSubroutine = tSubroutine->theNext;
+ op->theNdb->releaseNdbSubroutine(tmp);
+ }
+ op->theFirstSubroutine = NULL;
+ op->theLastSubroutine = NULL;
+
+ op->theNoOfLabels = 0;
+ op->theNoOfSubroutines = 0;
+
+ // reset AI size
+ op->theTotalCurrAI_Len = new_size;
+ op->theAI_LenInCurrAI = new_curr;
+
+ // reset signal pointers
+ op->theCurrentATTRINFO = lastSignal;
+ op->theATTRINFOptr = &lastSignal->getDataPtrSend()[new_curr];
+
+ // interpreter sizes are set later somewhere
+
+ DBUG_VOID_RETURN;
+}
+
+static void
+update(const NdbError & _err){
+ NdbError & error = (NdbError &) _err;
+ ndberror_struct ndberror = (ndberror_struct)error;
+ ndberror_update(&ndberror);
+ error = NdbError(ndberror);
+}
+
+const NdbError &
+NdbScanFilter::getNdbError() const
+{
+ update(m_impl.m_error);
+ return m_impl.m_error;
+}
#if 0
diff --git a/storage/ndb/src/ndbapi/NdbScanOperation.cpp b/storage/ndb/src/ndbapi/NdbScanOperation.cpp
index 89782453a72..afbec070ac8 100644
--- a/storage/ndb/src/ndbapi/NdbScanOperation.cpp
+++ b/storage/ndb/src/ndbapi/NdbScanOperation.cpp
@@ -237,6 +237,7 @@ NdbScanOperation::setReadLockMode(LockMode lockMode)
lockHoldMode= false;
readCommitted= true;
break;
+ case LM_SimpleRead:
case LM_Read:
lockExcl= false;
lockHoldMode= true;
@@ -872,6 +873,10 @@ NdbScanOperation::doSendScan(int aProcessorId)
// sending it. This could not be done in openScan because
// we created the ATTRINFO signals after the SCAN_TABREQ signal.
ScanTabReq * const req = CAST_PTR(ScanTabReq, tSignal->getDataPtrSend());
+ if (unlikely(theTotalCurrAI_Len > ScanTabReq::MaxTotalAttrInfo)) {
+ setErrorCode(4257);
+ return -1;
+ }
req->attrLenKeyLen = (tupKeyLen << 16) | theTotalCurrAI_Len;
Uint32 tmp = req->requestInfo;
ScanTabReq::setDistributionKeyFlag(tmp, theDistrKeyIndicator_);
diff --git a/storage/ndb/src/ndbapi/NdbTransaction.cpp b/storage/ndb/src/ndbapi/NdbTransaction.cpp
index 55c6f0f4b99..bc59df722aa 100644
--- a/storage/ndb/src/ndbapi/NdbTransaction.cpp
+++ b/storage/ndb/src/ndbapi/NdbTransaction.cpp
@@ -1787,8 +1787,8 @@ from other transactions.
const Uint32 tAttrInfoLen = *tPtr++;
if (tOp && tOp->checkMagicNumber()) {
Uint32 done = tOp->execTCOPCONF(tAttrInfoLen);
- if(tAttrInfoLen > TcKeyConf::SimpleReadBit){
- Uint32 node = tAttrInfoLen & (~TcKeyConf::SimpleReadBit);
+ if(tAttrInfoLen > TcKeyConf::DirtyReadBit){
+ Uint32 node = tAttrInfoLen & (~TcKeyConf::DirtyReadBit);
NdbNodeBitmask::set(m_db_nodes, node);
if(NdbNodeBitmask::get(m_failed_db_nodes, node) && !done)
{
@@ -2182,7 +2182,7 @@ NdbTransaction::report_node_failure(Uint32 id){
* 4) X X
*/
NdbOperation* tmp = theFirstExecOpInList;
- const Uint32 len = TcKeyConf::SimpleReadBit | id;
+ const Uint32 len = TcKeyConf::DirtyReadBit | id;
Uint32 tNoComp = theNoOfOpCompleted;
Uint32 tNoSent = theNoOfOpSent;
Uint32 count = 0;
diff --git a/storage/ndb/src/ndbapi/ndberror.c b/storage/ndb/src/ndbapi/ndberror.c
index a0417e5b118..0ad2faff76a 100644
--- a/storage/ndb/src/ndbapi/ndberror.c
+++ b/storage/ndb/src/ndbapi/ndberror.c
@@ -624,6 +624,7 @@ ErrorBundle ErrorCodes[] = {
{ 4273, DMEC, IE, "No blob table in dict cache" },
{ 4274, DMEC, IE, "Corrupted main table PK in blob operation" },
{ 4275, DMEC, AE, "The blob method is incompatible with operation type or lock mode" },
+ { 4294, DMEC, AE, "Scan filter is too large, discarded" },
{ NO_CONTACT_WITH_PROCESS, DMEC, AE,
"No contact with the process (dead ?)."},
diff --git a/storage/ndb/test/include/HugoTransactions.hpp b/storage/ndb/test/include/HugoTransactions.hpp
index e2b12f261a8..e8f7b33e0ed 100644
--- a/storage/ndb/test/include/HugoTransactions.hpp
+++ b/storage/ndb/test/include/HugoTransactions.hpp
@@ -36,6 +36,16 @@ public:
int updateValue = 0,
bool abort = false);
+ int loadTableStartFrom(Ndb*,
+ int startFrom,
+ int records,
+ int batch = 512,
+ bool allowConstraintViolation = true,
+ int doSleep = 0,
+ bool oneTrans = false,
+ int updateValue = 0,
+ bool abort = false);
+
int scanReadRecords(Ndb*,
int records,
int abort = 0,
@@ -56,6 +66,11 @@ public:
int batchsize = 1,
NdbOperation::LockMode = NdbOperation::LM_Read);
+ int scanUpdateRecords(Ndb*, NdbScanOperation::ScanFlag,
+ int records,
+ int abort = 0,
+ int parallelism = 0);
+
int scanUpdateRecords(Ndb*,
int records,
int abort = 0,
@@ -90,9 +105,12 @@ public:
int records,
int percentToLock = 1,
int lockTime = 1000);
+
int fillTable(Ndb*,
int batch=512);
+ int fillTableStartFrom(Ndb*, int startFrom, int batch=512);
+
/**
* Reading using UniqHashIndex with key = pk
*/
diff --git a/storage/ndb/test/include/UtilTransactions.hpp b/storage/ndb/test/include/UtilTransactions.hpp
index 75bbcd9c776..193398c3da2 100644
--- a/storage/ndb/test/include/UtilTransactions.hpp
+++ b/storage/ndb/test/include/UtilTransactions.hpp
@@ -30,6 +30,11 @@ public:
int closeTransaction(Ndb*);
int clearTable(Ndb*,
+ NdbScanOperation::ScanFlag,
+ int records = 0,
+ int parallelism = 0);
+
+ int clearTable(Ndb*,
int records = 0,
int parallelism = 0);
diff --git a/storage/ndb/test/include/dbutil.hpp b/storage/ndb/test/include/dbutil.hpp
new file mode 100755
index 00000000000..2b36965715f
--- /dev/null
+++ b/storage/ndb/test/include/dbutil.hpp
@@ -0,0 +1,97 @@
+// dbutil.h: interface for the database utilities class.
+//////////////////////////////////////////////////////////////////////
+// Supplies a database to the test application
+//////////////////////////////////////////////////////////////////////
+
+#ifndef DBUTIL_HPP
+#define DBUTIL_HPP
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+#include <time.h>
+#include <stdio.h>
+#include <string.h>
+#include <mysql.h>
+//include "rand.h"
+#include <stdlib.h>
+
+//#define DEBUG
+#define DIE_UNLESS(expr) \
+ ((void) ((expr) ? 0 : (Die(__FILE__, __LINE__, #expr), 0)))
+#define DIE(expr) \
+ Die(__FILE__, __LINE__, #expr)
+#define myerror(msg) PrintError(msg)
+#define mysterror(stmt, msg) PrintStError(stmt, msg)
+#define CheckStmt(stmt) \
+{ \
+if ( stmt == 0) \
+ myerror(NULL); \
+DIE_UNLESS(stmt != 0); \
+}
+
+#define check_execute(stmt, r) \
+{ \
+if (r) \
+ mysterror(stmt, NULL); \
+DIE_UNLESS(r == 0);\
+}
+
+#define TRUE 1
+#define FALSE 0
+
+
+class dbutil
+{
+public:
+
+ dbutil(const char * databaseName);
+ ~dbutil();
+
+ void DatabaseLogin(const char * system,
+ const char * usr,
+ const char * password,
+ unsigned int portIn,
+ const char * sockIn,
+ bool transactional);
+ char * GetDbName(){return dbs;};
+ char * GetUser(){return user;};
+ char * GetPassword(){return pass;};
+ char * GetHost(){return host;};
+ char * GetSocket(){return socket;};
+ const char * GetServerType(){return mysql_get_server_info(myDbHandel);};
+ MYSQL* GetDbHandel(){return myDbHandel;};
+ MYSQL_STMT *STDCALL MysqlSimplePrepare(const char *query);
+ int Select_DB();
+ int Do_Query(char * stm);
+ const char * GetError();
+ int GetErrorNumber();
+ unsigned long SelectCountTable(const char * table);
+
+private:
+
+ //Connect variables
+ char * databaseName; //hold results file name
+ char host[256]; // Computer to connect to
+ char user[256]; // MySQL User
+ char pass[256]; // MySQL User Password
+ char dbs[256]; // Database to use (TPCB)
+ unsigned int port; // MySQL Server port
+ char socket[256]; // MySQL Server Unix Socket
+ MYSQL *myDbHandel;
+
+ void DatabaseLogout();
+
+ void SetDbName(const char * name){strcpy((char *)dbs, name);};
+ void SetUser(const char * userName){strcpy((char *)user, userName);};
+ void SetPassword(const char * password){strcpy((char *)pass,password);};
+ void SetHost(const char * system){strcpy((char*)host, system);};
+ void SetPort(unsigned int portIn){port=portIn;};
+ void SetSocket(const char * sockIn){strcpy((char *)socket, sockIn);};
+ void PrintError(const char *msg);
+ void PrintStError(MYSQL_STMT *stmt, const char *msg);
+ void Die(const char *file, int line, const char *expr); // stop program
+
+};
+#endif
+
diff --git a/storage/ndb/test/ndbapi/testBasic.cpp b/storage/ndb/test/ndbapi/testBasic.cpp
index 952b5a50dc5..ac23ceaad18 100644
--- a/storage/ndb/test/ndbapi/testBasic.cpp
+++ b/storage/ndb/test/ndbapi/testBasic.cpp
@@ -136,31 +136,13 @@ int runPkRead(NDBT_Context* ctx, NDBT_Step* step){
int loops = ctx->getNumLoops();
int records = ctx->getNumRecords();
int batchSize = ctx->getProperty("BatchSize", 1);
+ int lm = ctx->getProperty("LockMode", NdbOperation::LM_Read);
int i = 0;
HugoTransactions hugoTrans(*ctx->getTab());
while (i<loops) {
g_info << i << ": ";
- if (hugoTrans.pkReadRecords(GETNDB(step), records, batchSize) != NDBT_OK){
- g_info << endl;
- return NDBT_FAILED;
- }
- i++;
- }
- g_info << endl;
- return NDBT_OK;
-}
-
-int runPkDirtyRead(NDBT_Context* ctx, NDBT_Step* step){
- int loops = ctx->getNumLoops();
- int records = ctx->getNumRecords();
- int batchSize = ctx->getProperty("BatchSize", 1);
- int i = 0;
- bool dirty = true;
- HugoTransactions hugoTrans(*ctx->getTab());
- while (i<loops) {
- g_info << i << ": ";
- if (hugoTrans.pkReadRecords(GETNDB(step), records, batchSize,
- NdbOperation::LM_CommittedRead) != NDBT_OK){
+ if (hugoTrans.pkReadRecords(GETNDB(step), records, batchSize,
+ (NdbOperation::LockMode)lm) != NDBT_OK){
g_info << endl;
return NDBT_FAILED;
}
@@ -1552,14 +1534,23 @@ TESTCASE("PkInsert",
}
TESTCASE("PkRead",
"Verify that we can insert, read and delete from this table using PK"){
+ TC_PROPERTY("LockMode", NdbOperation::LM_Read);
INITIALIZER(runLoadTable);
STEP(runPkRead);
FINALIZER(runClearTable);
}
TESTCASE("PkDirtyRead",
"Verify that we can insert, dirty read and delete from this table using PK"){
+ TC_PROPERTY("LockMode", NdbOperation::LM_Dirty);
INITIALIZER(runLoadTable);
- STEP(runPkDirtyRead);
+ STEP(runPkRead);
+ FINALIZER(runClearTable);
+}
+TESTCASE("PkSimpleRead",
+ "Verify that we can insert, simple read and delete from this table using PK"){
+ TC_PROPERTY("LockMode", NdbOperation::LM_SimpleRead);
+ INITIALIZER(runLoadTable);
+ STEP(runPkRead);
FINALIZER(runClearTable);
}
TESTCASE("PkUpdate",
diff --git a/storage/ndb/test/ndbapi/testDict.cpp b/storage/ndb/test/ndbapi/testDict.cpp
index 13c071f968e..16b6e129605 100644
--- a/storage/ndb/test/ndbapi/testDict.cpp
+++ b/storage/ndb/test/ndbapi/testDict.cpp
@@ -684,7 +684,7 @@ int runTestFragmentTypes(NDBT_Context* ctx, NDBT_Step* step){
CHECK(utilTrans.selectCount(pNdb, 64, &count) == 0);
CHECK(count == records);
CHECK(hugoTrans.pkDelRecords(pNdb, records/2) == 0);
- CHECK(hugoTrans.scanUpdateRecords(pNdb, records) == 0);
+ CHECK(hugoTrans.scanUpdateRecords(pNdb, records/2) == 0);
CHECK(utilTrans.selectCount(pNdb, 64, &count) == 0);
CHECK(count == (records/2));
@@ -862,7 +862,7 @@ int runPkSizes(NDBT_Context* ctx, NDBT_Step* step){
CHECK(utilTrans.selectCount(pNdb, 64, &count) == 0);
CHECK(count == records);
CHECK(hugoTrans.pkDelRecords(pNdb, records/2) == 0);
- CHECK(hugoTrans.scanUpdateRecords(pNdb, records) == 0);
+ CHECK(hugoTrans.scanUpdateRecords(pNdb, records/2) == 0);
CHECK(utilTrans.selectCount(pNdb, 64, &count) == 0);
CHECK(count == (records/2));
CHECK(utilTrans.clearTable(pNdb, records) == 0);
@@ -2706,7 +2706,262 @@ runDictRestart(NDBT_Context* ctx, NDBT_Step* step)
return NDBT_OK;
}
+int
+runBug29501(NDBT_Context* ctx, NDBT_Step* step) {
+ NdbRestarter res;
+ NdbDictionary::LogfileGroup lg;
+ lg.setName("DEFAULT-LG");
+ lg.setUndoBufferSize(8*1024*1024);
+
+ if (res.getNumDbNodes() < 2)
+ return NDBT_OK;
+
+ Ndb* pNdb = GETNDB(step);
+ NdbDictionary::Dictionary* pDict = pNdb->getDictionary();
+
+ int node = res.getRandomNotMasterNodeId(rand());
+ res.restartOneDbNode(node, true, true, false);
+
+ if(pDict->createLogfileGroup(lg) != 0){
+ g_err << "Failed to create logfilegroup:"
+ << endl << pDict->getNdbError() << endl;
+ return NDBT_FAILED;
+ }
+
+ NdbDictionary::Undofile uf;
+ uf.setPath("undofile01.dat");
+ uf.setSize(5*1024*1024);
+ uf.setLogfileGroup("DEFAULT-LG");
+
+ if(pDict->createUndofile(uf) != 0){
+ g_err << "Failed to create undofile:"
+ << endl << pDict->getNdbError() << endl;
+ return NDBT_FAILED;
+ }
+
+ res.waitNodesNoStart(&node, 1);
+ res.startNodes(&node, 1);
+
+ if (res.waitClusterStarted()){
+ g_err << "Node restart failed"
+ << endl << pDict->getNdbError() << endl;
+ return NDBT_FAILED;
+ }
+
+ if (pDict->dropLogfileGroup(pDict->getLogfileGroup(lg.getName())) != 0){
+ g_err << "Drop of LFG Failed"
+ << endl << pDict->getNdbError() << endl;
+ return NDBT_FAILED;
+ }
+
+ return NDBT_OK;
+}
+
+int
+runDropDDObjects(NDBT_Context* ctx, NDBT_Step* step){
+ //Purpose is to drop all tables, data files, Table spaces and LFG's
+ Uint32 i = 0;
+
+ Ndb* pNdb = GETNDB(step);
+ NdbDictionary::Dictionary* pDict = pNdb->getDictionary();
+
+ NdbDictionary::Dictionary::List list;
+ if (pDict->listObjects(list) == -1)
+ return NDBT_FAILED;
+
+ //Search the list and drop all tables found
+ const char * tableFound = 0;
+ for (i = 0; i < list.count; i++){
+ switch(list.elements[i].type){
+ case NdbDictionary::Object::UserTable:
+ tableFound = list.elements[i].name;
+ if(tableFound != 0){
+ if(pDict->dropTable(tableFound) != 0){
+ g_err << "Failed to drop table: " << pDict->getNdbError() << endl;
+ return NDBT_FAILED;
+ }
+ }
+ tableFound = 0;
+ break;
+ default:
+ break;
+ }
+ }
+
+ //Search the list and drop all data file found
+ const char * dfFound = 0;
+ for (i = 0; i < list.count; i++){
+ switch(list.elements[i].type){
+ case NdbDictionary::Object::Datafile:
+ dfFound = list.elements[i].name;
+ if(dfFound != 0){
+ if(pDict->dropDatafile(pDict->getDatafile(0, dfFound)) != 0){
+ g_err << "Failed to drop datafile: " << pDict->getNdbError() << endl;
+ return NDBT_FAILED;
+ }
+ }
+ dfFound = 0;
+ break;
+ default:
+ break;
+ }
+ }
+
+ //Search the list and drop all Table Spaces Found
+ const char * tsFound = 0;
+ for (i = 0; i <list.count; i++){
+ switch(list.elements[i].type){
+ case NdbDictionary::Object::Tablespace:
+ tsFound = list.elements[i].name;
+ if(tsFound != 0){
+ if(pDict->dropTablespace(pDict->getTablespace(tsFound)) != 0){
+ g_err << "Failed to drop tablespace: " << pDict->getNdbError() << endl;
+ return NDBT_FAILED;
+ }
+ }
+ tsFound = 0;
+ break;
+ default:
+ break;
+ }
+ }
+
+ //Search the list and drop all LFG Found
+ //Currently only 1 LGF is supported, but written for future
+ //when more then one is supported.
+ const char * lgFound = 0;
+ for (i = 0; i < list.count; i++){
+ switch(list.elements[i].type){
+ case NdbDictionary::Object::LogfileGroup:
+ lgFound = list.elements[i].name;
+ if(lgFound != 0){
+ if (pDict->dropLogfileGroup(pDict->getLogfileGroup(lgFound)) != 0){
+ g_err << "Failed to drop tablespace: " << pDict->getNdbError() << endl;
+ return NDBT_FAILED;
+ }
+ }
+ lgFound = 0;
+ break;
+ default:
+ break;
+ }
+ }
+
+ return NDBT_OK;
+}
+
+int
+runWaitStarted(NDBT_Context* ctx, NDBT_Step* step){
+
+ NdbRestarter restarter;
+ restarter.waitClusterStarted(300);
+
+ NdbSleep_SecSleep(3);
+ return NDBT_OK;
+}
+
+int
+testDropDDObjectsSetup(NDBT_Context* ctx, NDBT_Step* step){
+ //Purpose is to setup to test DropDDObjects
+ char tsname[256];
+ char dfname[256];
+
+ Ndb* pNdb = GETNDB(step);
+ NdbDictionary::Dictionary* pDict = pNdb->getDictionary();
+
+ NdbDictionary::LogfileGroup lg;
+ lg.setName("DEFAULT-LG");
+ lg.setUndoBufferSize(8*1024*1024);
+
+
+ if(pDict->createLogfileGroup(lg) != 0){
+ g_err << "Failed to create logfilegroup:"
+ << endl << pDict->getNdbError() << endl;
+ return NDBT_FAILED;
+ }
+
+ NdbDictionary::Undofile uf;
+ uf.setPath("undofile01.dat");
+ uf.setSize(5*1024*1024);
+ uf.setLogfileGroup("DEFAULT-LG");
+
+ if(pDict->createUndofile(uf) != 0){
+ g_err << "Failed to create undofile:"
+ << endl << pDict->getNdbError() << endl;
+ return NDBT_FAILED;
+ }
+
+ BaseString::snprintf(tsname, sizeof(tsname), "TS-%u", rand());
+ BaseString::snprintf(dfname, sizeof(dfname), "%s-%u.dat", tsname, rand());
+
+ if (create_tablespace(pDict, lg.getName(), tsname, dfname)){
+ g_err << "Failed to create undofile:"
+ << endl << pDict->getNdbError() << endl;
+ return NDBT_FAILED;
+ }
+
+ return NDBT_OK;
+}
+
+int
+DropDDObjectsVerify(NDBT_Context* ctx, NDBT_Step* step){
+ //Purpose is to verify test DropDDObjects worked
+ Uint32 i = 0;
+
+ Ndb* pNdb = GETNDB(step);
+ NdbDictionary::Dictionary* pDict = pNdb->getDictionary();
+
+ NdbDictionary::Dictionary::List list;
+ if (pDict->listObjects(list) == -1)
+ return NDBT_FAILED;
+
+ bool ddFound = false;
+ for (i = 0; i <list.count; i++){
+ switch(list.elements[i].type){
+ case NdbDictionary::Object::Tablespace:
+ ddFound = true;
+ break;
+ case NdbDictionary::Object::LogfileGroup:
+ ddFound = true;
+ break;
+ default:
+ break;
+ }
+ if(ddFound == true){
+ g_err << "DropDDObjects Failed: DD found:"
+ << endl;
+ return NDBT_FAILED;
+ }
+ }
+ return NDBT_OK;
+}
+
NDBT_TESTSUITE(testDict);
+TESTCASE("testDropDDObjects",
+ "* 1. start cluster\n"
+ "* 2. Create LFG\n"
+ "* 3. create TS\n"
+ "* 4. run DropDDObjects\n"
+ "* 5. Verify DropDDObjectsRestart worked\n"){
+INITIALIZER(runWaitStarted);
+INITIALIZER(runDropDDObjects);
+INITIALIZER(testDropDDObjectsSetup);
+STEP(runDropDDObjects);
+FINALIZER(DropDDObjectsVerify);
+}
+
+TESTCASE("Bug29501",
+ "* 1. start cluster\n"
+ "* 2. Restart 1 node -abort -nostart\n"
+ "* 3. create LFG\n"
+ "* 4. Restart data node\n"
+ "* 5. Restart 1 node -nostart\n"
+ "* 6. Drop LFG\n"){
+INITIALIZER(runWaitStarted);
+INITIALIZER(runDropDDObjects);
+STEP(runBug29501);
+FINALIZER(runDropDDObjects);
+}
TESTCASE("CreateAndDrop",
"Try to create and drop the table loop number of times\n"){
INITIALIZER(runCreateAndDrop);
diff --git a/storage/ndb/test/ndbapi/testIndex.cpp b/storage/ndb/test/ndbapi/testIndex.cpp
index 00e559c7a0f..bd9ff7ac607 100644
--- a/storage/ndb/test/ndbapi/testIndex.cpp
+++ b/storage/ndb/test/ndbapi/testIndex.cpp
@@ -809,7 +809,7 @@ int runSystemRestart1(NDBT_Context* ctx, NDBT_Step* step){
CHECK(hugoTrans.pkUpdateRecords(pNdb, records) == 0);
CHECK(utilTrans.verifyIndex(pNdb, idxName, 16, false) == 0);
CHECK(hugoTrans.pkDelRecords(pNdb, records/2) == 0);
- CHECK(hugoTrans.scanUpdateRecords(pNdb, records) == 0);
+ CHECK(hugoTrans.scanUpdateRecords(pNdb, records/2) == 0);
CHECK(utilTrans.verifyIndex(pNdb, idxName, 16, false) == 0);
CHECK(utilTrans.clearTable(pNdb, records) == 0);
CHECK(hugoTrans.loadTable(pNdb, records, 1) == 0);
@@ -834,7 +834,7 @@ int runSystemRestart1(NDBT_Context* ctx, NDBT_Step* step){
CHECK(utilTrans.verifyIndex(pNdb, idxName, 16, false) == 0);
CHECK(hugoTrans.pkDelRecords(pNdb, records/2) == 0);
CHECK(utilTrans.verifyIndex(pNdb, idxName, 16, false) == 0);
- CHECK(hugoTrans.scanUpdateRecords(pNdb, records) == 0);
+ CHECK(hugoTrans.scanUpdateRecords(pNdb, records/2) == 0);
CHECK(utilTrans.verifyIndex(pNdb, idxName, 16, false) == 0);
CHECK(utilTrans.clearTable(pNdb, records) == 0);
CHECK(hugoTrans.loadTable(pNdb, records, 1) == 0);
diff --git a/storage/ndb/test/ndbapi/testNodeRestart.cpp b/storage/ndb/test/ndbapi/testNodeRestart.cpp
index 99b72699762..419196e00eb 100644
--- a/storage/ndb/test/ndbapi/testNodeRestart.cpp
+++ b/storage/ndb/test/ndbapi/testNodeRestart.cpp
@@ -1762,6 +1762,80 @@ runBug28717(NDBT_Context* ctx, NDBT_Step* step)
return NDBT_OK;
}
+int
+runBug31525(NDBT_Context* ctx, NDBT_Step* step)
+{
+ int result = NDBT_OK;
+ int loops = ctx->getNumLoops();
+ int records = ctx->getNumRecords();
+ Ndb* pNdb = GETNDB(step);
+ NdbRestarter res;
+
+ if (res.getNumDbNodes() < 2)
+ {
+ return NDBT_OK;
+ }
+
+ int nodes[2];
+ nodes[0] = res.getMasterNodeId();
+ nodes[1] = res.getNextMasterNodeId(nodes[0]);
+
+ while (res.getNodeGroup(nodes[0]) != res.getNodeGroup(nodes[1]))
+ {
+ ndbout_c("Restarting %u as it not in same node group as %u",
+ nodes[1], nodes[0]);
+ if (res.restartOneDbNode(nodes[1], false, true, true))
+ return NDBT_FAILED;
+
+ if (res.waitNodesNoStart(nodes+1, 1))
+ return NDBT_FAILED;
+
+ if (res.startNodes(nodes+1, 1))
+ return NDBT_FAILED;
+
+ if (res.waitClusterStarted())
+ return NDBT_FAILED;
+
+ nodes[1] = res.getNextMasterNodeId(nodes[0]);
+ }
+
+ ndbout_c("nodes[0]: %u nodes[1]: %u", nodes[0], nodes[1]);
+
+ int val = DumpStateOrd::DihMinTimeBetweenLCP;
+ if (res.dumpStateAllNodes(&val, 1))
+ return NDBT_FAILED;
+
+ int val2[] = { DumpStateOrd::CmvmiSetRestartOnErrorInsert, 1 };
+ if (res.dumpStateAllNodes(val2, 2))
+ return NDBT_FAILED;
+
+ if (res.insertErrorInAllNodes(932))
+ return NDBT_FAILED;
+
+ if (res.insertErrorInNode(nodes[1], 7192))
+ return NDBT_FAILED;
+
+ if (res.insertErrorInNode(nodes[0], 7191))
+ return NDBT_FAILED;
+
+ if (res.waitClusterNoStart())
+ return NDBT_FAILED;
+
+ if (res.startAll())
+ return NDBT_FAILED;
+
+ if (res.waitClusterStarted())
+ return NDBT_FAILED;
+
+ if (res.restartOneDbNode(nodes[1], false, false, true))
+ return NDBT_FAILED;
+
+ if (res.waitClusterStarted())
+ return NDBT_FAILED;
+
+ return NDBT_OK;
+}
+
NDBT_TESTSUITE(testNodeRestart);
TESTCASE("NoLoad",
"Test that one node at a time can be stopped and then restarted "\
@@ -2085,6 +2159,9 @@ TESTCASE("Bug21271",
STEP(runPkUpdateUntilStopped);
FINALIZER(runClearTable);
}
+TESTCASE("Bug31525", ""){
+ INITIALIZER(runBug31525);
+}
TESTCASE("Bug24717", ""){
INITIALIZER(runBug24717);
}
diff --git a/storage/ndb/test/ndbapi/testScan.cpp b/storage/ndb/test/ndbapi/testScan.cpp
index 2561869fa5f..df6dbe2e550 100644
--- a/storage/ndb/test/ndbapi/testScan.cpp
+++ b/storage/ndb/test/ndbapi/testScan.cpp
@@ -579,7 +579,7 @@ int runScanUpdateUntilStopped(NDBT_Context* ctx, NDBT_Step* step){
para = myRandom48(239)+1;
g_info << i << ": ";
- if (hugoTrans.scanUpdateRecords(GETNDB(step), records, 0, para) == NDBT_FAILED){
+ if (hugoTrans.scanUpdateRecords(GETNDB(step), 0, 0, para) == NDBT_FAILED){
return NDBT_FAILED;
}
i++;
diff --git a/storage/ndb/test/ndbapi/testSystemRestart.cpp b/storage/ndb/test/ndbapi/testSystemRestart.cpp
index 901c0e35568..89580c0cef8 100644
--- a/storage/ndb/test/ndbapi/testSystemRestart.cpp
+++ b/storage/ndb/test/ndbapi/testSystemRestart.cpp
@@ -20,6 +20,7 @@
#include <NdbRestarter.hpp>
#include <Vector.hpp>
#include <signaldata/DumpStateOrd.hpp>
+#include <NdbBackup.hpp>
int runLoadTable(NDBT_Context* ctx, NDBT_Step* step){
@@ -121,7 +122,7 @@ int runSystemRestart1(NDBT_Context* ctx, NDBT_Step* step){
CHECK(hugoTrans.loadTable(pNdb, records) == 0);
CHECK(hugoTrans.pkUpdateRecords(pNdb, records) == 0);
CHECK(hugoTrans.pkDelRecords(pNdb, records/2) == 0);
- CHECK(hugoTrans.scanUpdateRecords(pNdb, records) == 0);
+ CHECK(hugoTrans.scanUpdateRecords(pNdb, records/2) == 0);
CHECK(utilTrans.clearTable(pNdb, records) == 0);
CHECK(hugoTrans.loadTable(pNdb, records) == 0);
CHECK(utilTrans.clearTable(pNdb, records) == 0);
@@ -142,7 +143,7 @@ int runSystemRestart1(NDBT_Context* ctx, NDBT_Step* step){
CHECK(hugoTrans.loadTable(pNdb, records) == 0);
CHECK(hugoTrans.pkUpdateRecords(pNdb, records) == 0);
CHECK(hugoTrans.pkDelRecords(pNdb, records/2) == 0);
- CHECK(hugoTrans.scanUpdateRecords(pNdb, records) == 0);
+ CHECK(hugoTrans.scanUpdateRecords(pNdb, records/2) == 0);
CHECK(utilTrans.clearTable(pNdb, records) == 0);
CHECK(hugoTrans.loadTable(pNdb, records) == 0);
CHECK(utilTrans.clearTable(pNdb, records) == 0);
@@ -265,7 +266,7 @@ int runSystemRestart2(NDBT_Context* ctx, NDBT_Step* step){
CHECK(hugoTrans.loadTable(pNdb, records) == 0);
CHECK(hugoTrans.pkUpdateRecords(pNdb, records) == 0);
CHECK(hugoTrans.pkDelRecords(pNdb, records/2) == 0);
- CHECK(hugoTrans.scanUpdateRecords(pNdb, records) == 0);
+ CHECK(hugoTrans.scanUpdateRecords(pNdb, records/2) == 0);
CHECK(utilTrans.clearTable(pNdb, records) == 0);
CHECK(hugoTrans.loadTable(pNdb, records) == 0);
CHECK(utilTrans.clearTable(pNdb, records) == 0);
@@ -329,7 +330,7 @@ int runSystemRestartTestUndoLog(NDBT_Context* ctx, NDBT_Step* step){
CHECK(hugoTrans.loadTable(pNdb, records) == 0);
CHECK(hugoTrans.pkUpdateRecords(pNdb, records) == 0);
CHECK(hugoTrans.pkDelRecords(pNdb, records/2) == 0);
- CHECK(hugoTrans.scanUpdateRecords(pNdb, records) == 0);
+ CHECK(hugoTrans.scanUpdateRecords(pNdb, records/2) == 0);
CHECK(utilTrans.clearTable(pNdb, records) == 0);
CHECK(hugoTrans.loadTable(pNdb, records) == 0);
CHECK(utilTrans.clearTable(pNdb, records) == 0);
@@ -1293,6 +1294,260 @@ runBug28770(NDBT_Context* ctx, NDBT_Step* step) {
return result;
}
+int
+runStopper(NDBT_Context* ctx, NDBT_Step* step)
+{
+ NdbRestarter restarter;
+ Uint32 stop = 0;
+loop:
+ while (!ctx->isTestStopped() &&
+ ((stop = ctx->getProperty("StopAbort", Uint32(0))) == 0))
+ {
+ NdbSleep_MilliSleep(30);
+ }
+
+ if (ctx->isTestStopped())
+ {
+ return NDBT_OK;
+ }
+
+ ndbout << "Killing in " << stop << "ms..." << flush;
+ NdbSleep_MilliSleep(stop);
+ restarter.restartAll(false, true, true);
+ ctx->setProperty("StopAbort", Uint32(0));
+ goto loop;
+}
+
+int runSR_DD_1(NDBT_Context* ctx, NDBT_Step* step)
+{
+ Ndb* pNdb = GETNDB(step);
+ int result = NDBT_OK;
+ Uint32 loops = ctx->getNumLoops();
+ int count;
+ NdbRestarter restarter;
+ NdbBackup backup(GETNDB(step)->getNodeId()+1);
+ bool lcploop = ctx->getProperty("LCP", (unsigned)0);
+ bool all = ctx->getProperty("ALL", (unsigned)0);
+
+ Uint32 i = 1;
+ Uint32 backupId;
+
+ int val[] = { DumpStateOrd::CmvmiSetRestartOnErrorInsert, 1 };
+ int lcp = DumpStateOrd::DihMinTimeBetweenLCP;
+
+ int startFrom = 0;
+
+ HugoTransactions hugoTrans(*ctx->getTab());
+ while(i<=loops && result != NDBT_FAILED)
+ {
+
+ if (lcploop)
+ {
+ CHECK(restarter.dumpStateAllNodes(&lcp, 1) == 0);
+ }
+
+ int nodeId = restarter.getDbNodeId(rand() % restarter.getNumDbNodes());
+ //CHECK(restarter.dumpStateAllNodes(&val, 1) == 0);
+
+ ndbout << "Loop " << i << "/"<< loops <<" started" << endl;
+ ndbout << "Loading records..." << startFrom << endl;
+ CHECK(hugoTrans.loadTable(pNdb, startFrom) == 0);
+
+ if (!all)
+ {
+ ndbout << "Making " << nodeId << " crash" << endl;
+ int kill[] = { 9999, 1000, 3000 };
+ CHECK(restarter.dumpStateOneNode(nodeId, val, 2) == 0);
+ CHECK(restarter.dumpStateOneNode(nodeId, kill, 3) == 0);
+ }
+ else
+ {
+ ndbout << "Crashing cluster" << endl;
+ ctx->setProperty("StopAbort", 1000 + rand() % (3000 - 1000));
+ }
+ Uint64 end = NdbTick_CurrentMillisecond() + 4000;
+ Uint32 row = startFrom;
+ do {
+ ndbout << "Loading from " << row << " to " << row + 1000 << endl;
+ if (hugoTrans.loadTableStartFrom(pNdb, row, 1000) != 0)
+ break;
+ row += 1000;
+ } while (NdbTick_CurrentMillisecond() < end);
+
+ if (!all)
+ {
+ ndbout << "Waiting for " << nodeId << " to restart" << endl;
+ CHECK(restarter.waitNodesNoStart(&nodeId, 1) == 0);
+ ndbout << "Restarting cluster" << endl;
+ CHECK(restarter.restartAll(false, true, true) == 0);
+ }
+ else
+ {
+ ndbout << "Waiting for cluster to restart" << endl;
+ }
+ CHECK(restarter.waitClusterNoStart() == 0);
+ CHECK(restarter.startAll() == 0);
+ CHECK(restarter.waitClusterStarted() == 0);
+
+ ndbout << "Starting backup..." << flush;
+ CHECK(backup.start(backupId) == 0);
+ ndbout << "done" << endl;
+
+ int cnt = 0;
+ CHECK(hugoTrans.selectCount(pNdb, 0, &cnt) == 0);
+ ndbout << "Found " << cnt << " records..." << endl;
+ ndbout << "Clearing..." << endl;
+ CHECK(hugoTrans.clearTable(pNdb,
+ NdbScanOperation::SF_TupScan, cnt) == 0);
+
+ if (cnt > startFrom)
+ {
+ startFrom = cnt;
+ }
+ startFrom += 1000;
+ i++;
+ }
+
+ ndbout << "runSR_DD_1 finished" << endl;
+ ctx->stopTest();
+ return result;
+}
+
+int runSR_DD_2(NDBT_Context* ctx, NDBT_Step* step)
+{
+ Ndb* pNdb = GETNDB(step);
+ int result = NDBT_OK;
+ Uint32 loops = ctx->getNumLoops();
+ Uint32 rows = ctx->getNumRecords();
+ int count;
+ NdbRestarter restarter;
+ NdbBackup backup(GETNDB(step)->getNodeId()+1);
+ bool lcploop = ctx->getProperty("LCP", (unsigned)0);
+ bool all = ctx->getProperty("ALL", (unsigned)0);
+
+ Uint32 i = 1;
+ Uint32 backupId;
+
+ int val[] = { DumpStateOrd::CmvmiSetRestartOnErrorInsert, 1 };
+ int lcp = DumpStateOrd::DihMinTimeBetweenLCP;
+
+ int startFrom = 0;
+
+ HugoTransactions hugoTrans(*ctx->getTab());
+ while(i<=loops && result != NDBT_FAILED)
+ {
+
+ if (lcploop)
+ {
+ CHECK(restarter.dumpStateAllNodes(&lcp, 1) == 0);
+ }
+
+ int nodeId = restarter.getDbNodeId(rand() % restarter.getNumDbNodes());
+
+ if (!all)
+ {
+ ndbout << "Making " << nodeId << " crash" << endl;
+ int kill[] = { 9999, 3000, 10000 };
+ CHECK(restarter.dumpStateOneNode(nodeId, val, 2) == 0);
+ CHECK(restarter.dumpStateOneNode(nodeId, kill, 3) == 0);
+ }
+ else
+ {
+ ndbout << "Crashing cluster" << endl;
+ ctx->setProperty("StopAbort", 1000 + rand() % (3000 - 1000));
+ }
+
+ Uint64 end = NdbTick_CurrentMillisecond() + 11000;
+ Uint32 row = startFrom;
+ do {
+ if (hugoTrans.loadTable(pNdb, rows) != 0)
+ break;
+
+ if (hugoTrans.clearTable(pNdb, NdbScanOperation::SF_TupScan, rows) != 0)
+ break;
+ } while (NdbTick_CurrentMillisecond() < end);
+
+ if (!all)
+ {
+ ndbout << "Waiting for " << nodeId << " to restart" << endl;
+ CHECK(restarter.waitNodesNoStart(&nodeId, 1) == 0);
+ ndbout << "Restarting cluster" << endl;
+ CHECK(restarter.restartAll(false, true, true) == 0);
+ }
+ else
+ {
+ ndbout << "Waiting for cluster to restart" << endl;
+ }
+
+ CHECK(restarter.waitClusterNoStart() == 0);
+ CHECK(restarter.startAll() == 0);
+ CHECK(restarter.waitClusterStarted() == 0);
+
+ ndbout << "Starting backup..." << flush;
+ CHECK(backup.start(backupId) == 0);
+ ndbout << "done" << endl;
+
+ int cnt = 0;
+ CHECK(hugoTrans.selectCount(pNdb, 0, &cnt) == 0);
+ ndbout << "Found " << cnt << " records..." << endl;
+ ndbout << "Clearing..." << endl;
+ CHECK(hugoTrans.clearTable(pNdb,
+ NdbScanOperation::SF_TupScan, cnt) == 0);
+ i++;
+ }
+
+ ndbout << "runSR_DD_2 finished" << endl;
+ ctx->stopTest();
+ return result;
+}
+
+int
+runBug27434(NDBT_Context* ctx, NDBT_Step* step)
+{
+ int result = NDBT_OK;
+ NdbRestarter restarter;
+ Ndb* pNdb = GETNDB(step);
+ const Uint32 nodeCount = restarter.getNumDbNodes();
+
+ if (nodeCount < 2)
+ return NDBT_OK;
+
+ int args[] = { DumpStateOrd::DihMaxTimeBetweenLCP };
+ int dump[] = { DumpStateOrd::DihStartLcpImmediately };
+
+ int filter[] = { 15, NDB_MGM_EVENT_CATEGORY_CHECKPOINT, 0 };
+ NdbLogEventHandle handle =
+ ndb_mgm_create_logevent_handle(restarter.handle, filter);
+
+ struct ndb_logevent event;
+
+ do {
+ int node1 = restarter.getDbNodeId(rand() % nodeCount);
+ CHECK(restarter.restartOneDbNode(node1, false, true, true) == 0);
+ NdbSleep_SecSleep(3);
+ CHECK(restarter.waitNodesNoStart(&node1, 1) == 0);
+
+ CHECK(restarter.dumpStateAllNodes(args, 1) == 0);
+
+ for (Uint32 i = 0; i<3; i++)
+ {
+ CHECK(restarter.dumpStateAllNodes(dump, 1) == 0);
+ while(ndb_logevent_get_next(handle, &event, 0) >= 0 &&
+ event.type != NDB_LE_LocalCheckpointStarted);
+ while(ndb_logevent_get_next(handle, &event, 0) >= 0 &&
+ event.type != NDB_LE_LocalCheckpointCompleted);
+ }
+
+ restarter.restartAll(false, true, true);
+ NdbSleep_SecSleep(3);
+ CHECK(restarter.waitClusterNoStart() == 0);
+ restarter.insertErrorInNode(node1, 5046);
+ restarter.startAll();
+ CHECK(restarter.waitClusterStarted() == 0);
+ } while(false);
+
+ return result;
+}
NDBT_TESTSUITE(testSystemRestart);
TESTCASE("SR1",
@@ -1474,6 +1729,72 @@ TESTCASE("Bug24664",
STEP(runBug24664);
FINALIZER(runClearTable);
}
+TESTCASE("Bug27434",
+ "")
+{
+ INITIALIZER(runWaitStarted);
+ STEP(runBug27434);
+}
+TESTCASE("SR_DD_1", "")
+{
+ TC_PROPERTY("ALL", 1);
+ INITIALIZER(runWaitStarted);
+ STEP(runStopper);
+ STEP(runSR_DD_1);
+ FINALIZER(runClearTable);
+}
+TESTCASE("SR_DD_1b", "")
+{
+ INITIALIZER(runWaitStarted);
+ STEP(runSR_DD_1);
+ FINALIZER(runClearTable);
+}
+TESTCASE("SR_DD_1_LCP", "")
+{
+ TC_PROPERTY("ALL", 1);
+ TC_PROPERTY("LCP", 1);
+ INITIALIZER(runWaitStarted);
+ STEP(runStopper);
+ STEP(runSR_DD_1);
+ FINALIZER(runClearTable);
+}
+TESTCASE("SR_DD_1b_LCP", "")
+{
+ TC_PROPERTY("LCP", 1);
+ INITIALIZER(runWaitStarted);
+ STEP(runSR_DD_1);
+ FINALIZER(runClearTable);
+}
+TESTCASE("SR_DD_2", "")
+{
+ TC_PROPERTY("ALL", 1);
+ INITIALIZER(runWaitStarted);
+ STEP(runStopper);
+ STEP(runSR_DD_2);
+ FINALIZER(runClearTable);
+}
+TESTCASE("SR_DD_2b", "")
+{
+ INITIALIZER(runWaitStarted);
+ STEP(runSR_DD_2);
+ FINALIZER(runClearTable);
+}
+TESTCASE("SR_DD_2_LCP", "")
+{
+ TC_PROPERTY("ALL", 1);
+ TC_PROPERTY("LCP", 1);
+ INITIALIZER(runWaitStarted);
+ STEP(runStopper);
+ STEP(runSR_DD_2);
+ FINALIZER(runClearTable);
+}
+TESTCASE("SR_DD_2b_LCP", "")
+{
+ TC_PROPERTY("LCP", 1);
+ INITIALIZER(runWaitStarted);
+ STEP(runSR_DD_2);
+ FINALIZER(runClearTable);
+}
TESTCASE("Bug29167", "")
{
INITIALIZER(runWaitStarted);
diff --git a/storage/ndb/test/ndbapi/test_event.cpp b/storage/ndb/test/ndbapi/test_event.cpp
index e1e0012d0d8..18825d734a4 100644
--- a/storage/ndb/test/ndbapi/test_event.cpp
+++ b/storage/ndb/test/ndbapi/test_event.cpp
@@ -21,6 +21,7 @@
#include <NdbAutoPtr.hpp>
#include <NdbRestarter.hpp>
#include <NdbRestarts.hpp>
+#include <signaldata/DumpStateOrd.hpp>
#define GETNDB(ps) ((NDBT_NdbApiStep*)ps)->getNdb()
@@ -1730,7 +1731,7 @@ runScanUpdateUntilStopped(NDBT_Context* ctx, NDBT_Step* step){
HugoTransactions hugoTrans(*ctx->getTab());
while (ctx->isTestStopped() == false)
{
- if (hugoTrans.scanUpdateRecords(GETNDB(step), records, abort,
+ if (hugoTrans.scanUpdateRecords(GETNDB(step), 0, abort,
parallelism) == NDBT_FAILED){
return NDBT_FAILED;
}
@@ -1758,6 +1759,85 @@ runInsertDeleteUntilStopped(NDBT_Context* ctx, NDBT_Step* step)
return NDBT_OK;
}
+int
+runBug31701(NDBT_Context* ctx, NDBT_Step* step)
+{
+ int result = NDBT_OK;
+
+ NdbRestarter restarter;
+
+ if (restarter.getNumDbNodes() < 2){
+ ctx->stopTest();
+ return NDBT_OK;
+ }
+ // This should really wait for applier to start...10s is likely enough
+ NdbSleep_SecSleep(10);
+
+ int nodeId = restarter.getDbNodeId(rand() % restarter.getNumDbNodes());
+
+ int val2[] = { DumpStateOrd::CmvmiSetRestartOnErrorInsert, 1 };
+ if (restarter.dumpStateOneNode(nodeId, val2, 2))
+ return NDBT_FAILED;
+
+ restarter.insertErrorInNode(nodeId, 13033);
+ if (restarter.waitNodesNoStart(&nodeId, 1))
+ return NDBT_FAILED;
+
+ if (restarter.startNodes(&nodeId, 1))
+ return NDBT_FAILED;
+
+ if (restarter.waitClusterStarted())
+ return NDBT_FAILED;
+
+
+ int records = ctx->getNumRecords();
+ HugoTransactions hugoTrans(*ctx->getTab());
+
+ if(ctx->getPropertyWait("LastGCI", ~(Uint32)0))
+ {
+ g_err << "FAIL " << __LINE__ << endl;
+ return NDBT_FAILED;
+ }
+
+ hugoTrans.clearTable(GETNDB(step), 0);
+
+ if (hugoTrans.loadTable(GETNDB(step), 3*records, 1, true, 1) != 0){
+ g_err << "FAIL " << __LINE__ << endl;
+ return NDBT_FAILED;
+ }
+
+ if (hugoTrans.pkDelRecords(GETNDB(step), 3*records, 1, true, 1) != 0){
+ g_err << "FAIL " << __LINE__ << endl;
+ return NDBT_FAILED;
+ }
+ if (hugoTrans.loadTable(GETNDB(step), records, 1, true, 1) != 0){
+ g_err << "FAIL " << __LINE__ << endl;
+ return NDBT_FAILED;
+ }
+ if (hugoTrans.pkUpdateRecords(GETNDB(step), records, 1, 1) != 0){
+ g_err << "FAIL " << __LINE__ << endl;
+ return NDBT_FAILED;
+ }
+ if (hugoTrans.pkUpdateRecords(GETNDB(step), records, 1, 1) != 0){
+ g_err << "FAIL " << __LINE__ << endl;
+ return NDBT_FAILED;
+ }
+ if (hugoTrans.pkUpdateRecords(GETNDB(step), records, 1, 1) != 0){
+ g_err << "FAIL " << __LINE__ << endl;
+ return NDBT_FAILED;
+ }
+
+ ctx->setProperty("LastGCI", hugoTrans.m_latest_gci);
+ if(ctx->getPropertyWait("LastGCI", ~(Uint32)0))
+ {
+ g_err << "FAIL " << __LINE__ << endl;
+ return NDBT_FAILED;
+ }
+
+ ctx->stopTest();
+ return NDBT_OK;
+}
+
NDBT_TESTSUITE(test_event);
TESTCASE("BasicEventOperation",
"Verify that we can listen to Events"
@@ -1887,6 +1967,14 @@ TESTCASE("Bug27169", ""){
STEP(runRestarterLoop);
FINALIZER(runDropEvent);
}
+TESTCASE("Bug31701", ""){
+ INITIALIZER(runCreateEvent);
+ INITIALIZER(runCreateShadowTable);
+ STEP(runEventApplier);
+ STEP(runBug31701);
+ FINALIZER(runDropEvent);
+ FINALIZER(runDropShadowTable);
+}
NDBT_TESTSUITE_END(test_event);
int main(int argc, const char** argv){
diff --git a/storage/ndb/test/run-test/daily-basic-tests.txt b/storage/ndb/test/run-test/daily-basic-tests.txt
index b7a3a15dae7..103675d8e35 100644
--- a/storage/ndb/test/run-test/daily-basic-tests.txt
+++ b/storage/ndb/test/run-test/daily-basic-tests.txt
@@ -65,6 +65,14 @@ args: -n PkRead
max-time: 500
cmd: testBasic
+args: -n PkSimpleRead
+
+max-time: 500
+cmd: testBasic
+args: -n PkDirtyRead
+
+max-time: 500
+cmd: testBasic
args: -n PkUpdate
max-time: 500
@@ -555,7 +563,7 @@ args: -n Bug25554 T1
max-time: 3000
cmd: testNodeRestart
-args: -n Bug25984
+args: -n Bug25984 T1
max-time: 1000
cmd: testNodeRestart
@@ -575,6 +583,14 @@ args: -n Bug29364 T1
#
# DICT TESTS
+max-time: 500
+cmd: testDict
+args: -n Bug29501 T1
+
+max-time: 500
+cmd: testDict
+args: -n testDropDDObjects T1
+
max-time: 1500
cmd: testDict
args: -n CreateAndDrop
@@ -864,6 +880,10 @@ max-time: 1000
cmd: testNodeRestart
args: -n Bug27466 T1
+max-time: 1500
+cmd: testSystemRestart
+args: -n Bug27434 T1
+
max-time: 1000
cmd: test_event
args: -l 10 -n Bug27169 T1
@@ -945,3 +965,77 @@ args: -n Bug28804 T1 T3
max-time: 180
cmd: testIndex
args: -n Bug28804_ATTRINFO T1 T3
+
+max-time: 1500
+cmd: testSystemRestart
+args: -n SR_DD_1 D1
+
+max-time: 1500
+cmd: testSystemRestart
+args: -n SR_DD_1b D1
+
+max-time: 1500
+cmd: testSystemRestart
+args: -n SR_DD_1 D2
+
+max-time: 1500
+cmd: testSystemRestart
+args: -n SR_DD_1b D2
+
+max-time: 1500
+cmd: testSystemRestart
+args: -n SR_DD_1_LCP D1
+
+max-time: 1500
+cmd: testSystemRestart
+args: -n SR_DD_1b_LCP D1
+
+max-time: 1500
+cmd: testSystemRestart
+args: -n SR_DD_1_LCP D2
+
+max-time: 1500
+cmd: testSystemRestart
+args: -n SR_DD_1b_LCP D2
+
+max-time: 1500
+cmd: testSystemRestart
+args: -n SR_DD_2 D1
+
+max-time: 1500
+cmd: testSystemRestart
+args: -n SR_DD_2b D1
+
+max-time: 1500
+cmd: testSystemRestart
+args: -n SR_DD_2 D2
+
+max-time: 1500
+cmd: testSystemRestart
+args: -n SR_DD_2b D2
+
+max-time: 1500
+cmd: testSystemRestart
+args: -n SR_DD_2_LCP D1
+
+max-time: 1500
+cmd: testSystemRestart
+args: -n SR_DD_2b_LCP D1
+
+max-time: 1500
+cmd: testSystemRestart
+args: -n SR_DD_2_LCP D2
+
+max-time: 1500
+cmd: testSystemRestart
+args: -n SR_DD_2b_LCP D2
+
+max-time: 600
+cmd: testNodeRestart
+args: -n Bug31525 T1
+
+max-time: 300
+cmd: test_event
+args: -n Bug31701 T1
+
+
diff --git a/storage/ndb/test/src/HugoOperations.cpp b/storage/ndb/test/src/HugoOperations.cpp
index 1a2e5180f1f..93a9eaf435a 100644
--- a/storage/ndb/test/src/HugoOperations.cpp
+++ b/storage/ndb/test/src/HugoOperations.cpp
@@ -93,6 +93,7 @@ rand_lock_mode:
case NdbOperation::LM_Read:
case NdbOperation::LM_Exclusive:
case NdbOperation::LM_CommittedRead:
+ case NdbOperation::LM_SimpleRead:
if(idx && idx->getType() == NdbDictionary::Index::OrderedIndex &&
pIndexScanOp == 0)
{
diff --git a/storage/ndb/test/src/HugoTransactions.cpp b/storage/ndb/test/src/HugoTransactions.cpp
index 3a1600815e0..0e5f7cd8115 100644
--- a/storage/ndb/test/src/HugoTransactions.cpp
+++ b/storage/ndb/test/src/HugoTransactions.cpp
@@ -341,50 +341,14 @@ HugoTransactions::scanReadRecords(Ndb* pNdb,
int
HugoTransactions::scanUpdateRecords(Ndb* pNdb,
- int records,
- int abortPercent,
- int parallelism){
- if(m_defaultScanUpdateMethod == 1){
- return scanUpdateRecords1(pNdb, records, abortPercent, parallelism);
- } else if(m_defaultScanUpdateMethod == 2){
- return scanUpdateRecords2(pNdb, records, abortPercent, parallelism);
- } else {
- return scanUpdateRecords3(pNdb, records, abortPercent, parallelism);
- }
-}
-
-// Scan all records exclusive and update
-// them one by one
-int
-HugoTransactions::scanUpdateRecords1(Ndb* pNdb,
- int records,
- int abortPercent,
- int parallelism){
- return scanUpdateRecords3(pNdb, records, abortPercent, 1);
-}
-
-// Scan all records exclusive and update
-// them batched by asking nextScanResult to
-// give us all cached records before fetching new
-// records from db
-int
-HugoTransactions::scanUpdateRecords2(Ndb* pNdb,
- int records,
- int abortPercent,
- int parallelism){
- return scanUpdateRecords3(pNdb, records, abortPercent, parallelism);
-}
-
-int
-HugoTransactions::scanUpdateRecords3(Ndb* pNdb,
- int records,
- int abortPercent,
- int parallelism){
- int retryAttempt = 0;
+ NdbScanOperation::ScanFlag flags,
+ int records,
+ int abortPercent,
+ int parallelism){
+ int retryAttempt = 0;
int check, a;
NdbScanOperation *pOp;
-
while (true){
restart:
if (retryAttempt++ >= m_retryMax){
@@ -411,8 +375,9 @@ restart:
return NDBT_FAILED;
}
- if( pOp->readTuplesExclusive(parallelism) ) {
- ERR(pTrans->getNdbError());
+ if( pOp->readTuples(NdbOperation::LM_Exclusive, flags,
+ parallelism))
+ {
closeTransaction(pNdb);
return NDBT_FAILED;
}
@@ -429,15 +394,18 @@ restart:
check = pTrans->execute(NoCommit, AbortOnError);
if( check == -1 ) {
const NdbError err = pTrans->getNdbError();
- ERR(err);
- closeTransaction(pNdb);
if (err.status == NdbError::TemporaryError){
+ ERR(err);
+ closeTransaction(pNdb);
NdbSleep_MilliSleep(50);
+ retryAttempt++;
continue;
}
+ ERR(err);
+ closeTransaction(pNdb);
return NDBT_FAILED;
}
-
+
// Abort after 1-100 or 1-records rows
int ranVal = rand();
int abortCount = ranVal % (records == 0 ? 100 : records);
@@ -448,75 +416,114 @@ restart:
abortTrans = true;
}
+ int eof;
int rows = 0;
- while((check = pOp->nextResult(true)) == 0){
- do {
- rows++;
- NdbOperation* pUp = pOp->updateCurrentTuple();
- if(pUp == 0){
+ while((eof = pOp->nextResult(true)) == 0){
+ rows++;
+ if (calc.verifyRowValues(&row) != 0){
+ closeTransaction(pNdb);
+ return NDBT_FAILED;
+ }
+
+ if (abortCount == rows && abortTrans == true){
+ ndbout << "Scan is aborted" << endl;
+ g_info << "Scan is aborted" << endl;
+ pOp->close();
+ if( check == -1 ) {
ERR(pTrans->getNdbError());
closeTransaction(pNdb);
return NDBT_FAILED;
}
- const int updates = calc.getUpdatesValue(&row) + 1;
- const int r = calc.getIdValue(&row);
- for(a = 0; a<tab.getNoOfColumns(); a++){
- if (tab.getColumn(a)->getPrimaryKey() == false){
- if(setValueForAttr(pUp, a, r, updates ) != 0){
- ERR(pTrans->getNdbError());
- closeTransaction(pNdb);
- return NDBT_FAILED;
- }
- }
- }
-
- if (rows == abortCount && abortTrans == true){
- g_info << "Scan is aborted" << endl;
- // This scan should be aborted
- closeTransaction(pNdb);
- return NDBT_OK;
- }
- } while((check = pOp->nextResult(false)) == 0);
-
- if(check != -1){
- check = pTrans->execute(Commit, AbortOnError);
- if(check != -1)
- m_latest_gci = pTrans->getGCI();
- pTrans->restart();
- }
-
- const NdbError err = pTrans->getNdbError();
- if( check == -1 ) {
+
closeTransaction(pNdb);
- ERR(err);
- if (err.status == NdbError::TemporaryError){
- NdbSleep_MilliSleep(50);
- goto restart;
- }
- return NDBT_FAILED;
+ return NDBT_OK;
}
}
-
- const NdbError err = pTrans->getNdbError();
- if( check == -1 ) {
- closeTransaction(pNdb);
- ERR(err);
+ if (eof == -1) {
+ const NdbError err = pTrans->getNdbError();
+
if (err.status == NdbError::TemporaryError){
+ ERR_INFO(err);
+ closeTransaction(pNdb);
NdbSleep_MilliSleep(50);
- goto restart;
+ switch (err.code){
+ case 488:
+ case 245:
+ case 490:
+ // Too many active scans, no limit on number of retry attempts
+ break;
+ default:
+ retryAttempt++;
+ }
+ continue;
}
+ ERR(err);
+ closeTransaction(pNdb);
return NDBT_FAILED;
}
-
+
closeTransaction(pNdb);
+
+ g_info << rows << " rows have been read" << endl;
+ if (records != 0 && rows != records){
+ g_err << "Check expected number of records failed" << endl
+ << " expected=" << records <<", " << endl
+ << " read=" << rows << endl;
+ return NDBT_FAILED;
+ }
- g_info << rows << " rows have been updated" << endl;
return NDBT_OK;
}
return NDBT_FAILED;
}
int
+HugoTransactions::scanUpdateRecords(Ndb* pNdb,
+ int records,
+ int abortPercent,
+ int parallelism){
+
+ return scanUpdateRecords(pNdb,
+ (NdbScanOperation::ScanFlag)0,
+ records, abortPercent, parallelism);
+}
+
+// Scan all records exclusive and update
+// them one by one
+int
+HugoTransactions::scanUpdateRecords1(Ndb* pNdb,
+ int records,
+ int abortPercent,
+ int parallelism){
+ return scanUpdateRecords(pNdb,
+ (NdbScanOperation::ScanFlag)0,
+ records, abortPercent, 1);
+}
+
+// Scan all records exclusive and update
+// them batched by asking nextScanResult to
+// give us all cached records before fetching new
+// records from db
+int
+HugoTransactions::scanUpdateRecords2(Ndb* pNdb,
+ int records,
+ int abortPercent,
+ int parallelism){
+ return scanUpdateRecords(pNdb, (NdbScanOperation::ScanFlag)0,
+ records, abortPercent, parallelism);
+}
+
+int
+HugoTransactions::scanUpdateRecords3(Ndb* pNdb,
+ int records,
+ int abortPercent,
+ int parallelism)
+{
+ return scanUpdateRecords(pNdb, (NdbScanOperation::ScanFlag)0,
+ records, abortPercent, parallelism);
+}
+
+int
HugoTransactions::loadTable(Ndb* pNdb,
int records,
int batch,
@@ -524,7 +531,22 @@ HugoTransactions::loadTable(Ndb* pNdb,
int doSleep,
bool oneTrans,
int value,
- bool abort){
+ bool abort)
+{
+ return loadTableStartFrom(pNdb, 0, records, batch, allowConstraintViolation,
+ doSleep, oneTrans, value, abort);
+}
+
+int
+HugoTransactions::loadTableStartFrom(Ndb* pNdb,
+ int startFrom,
+ int records,
+ int batch,
+ bool allowConstraintViolation,
+ int doSleep,
+ bool oneTrans,
+ int value,
+ bool abort){
int check;
int retryAttempt = 0;
int retryMax = 5;
@@ -543,8 +565,9 @@ HugoTransactions::loadTable(Ndb* pNdb,
<< " -> rows/commit = " << batch << endl;
}
+ Uint32 orgbatch = batch;
g_info << "|- Inserting records..." << endl;
- for (int c=0 ; c<records ; ){
+ for (int c=0 ; c<records; ){
bool closeTrans = true;
if(c + batch > records)
@@ -578,7 +601,7 @@ HugoTransactions::loadTable(Ndb* pNdb,
}
}
- if(pkInsertRecord(pNdb, c, batch, value) != NDBT_OK)
+ if(pkInsertRecord(pNdb, c + startFrom, batch, value) != NDBT_OK)
{
ERR(pTrans->getNdbError());
closeTransaction(pNdb);
@@ -625,6 +648,7 @@ HugoTransactions::loadTable(Ndb* pNdb,
ERR(err);
NdbSleep_MilliSleep(50);
retryAttempt++;
+ batch = 1;
continue;
break;
@@ -670,7 +694,14 @@ HugoTransactions::loadTable(Ndb* pNdb,
int
HugoTransactions::fillTable(Ndb* pNdb,
- int batch){
+ int batch){
+ return fillTableStartFrom(pNdb, 0, batch);
+}
+
+int
+HugoTransactions::fillTableStartFrom(Ndb* pNdb,
+ int startFrom,
+ int batch){
int check;
int retryAttempt = 0;
int retryMax = 5;
@@ -688,7 +719,7 @@ HugoTransactions::fillTable(Ndb* pNdb,
<< " -> rows/commit = " << batch << endl;
}
- for (int c=0 ; ; ){
+ for (int c=startFrom ; ; ){
if (retryAttempt >= retryMax){
g_info << "Record " << c << " could not be inserted, has retried "
diff --git a/storage/ndb/test/src/Makefile.am b/storage/ndb/test/src/Makefile.am
index a025579cb72..aa486108235 100644
--- a/storage/ndb/test/src/Makefile.am
+++ b/storage/ndb/test/src/Makefile.am
@@ -24,7 +24,7 @@ libNDBT_a_SOURCES = \
NdbRestarter.cpp NdbRestarts.cpp NDBT_Output.cpp \
NdbBackup.cpp NdbConfig.cpp NdbGrep.cpp NDBT_Table.cpp \
NdbSchemaCon.cpp NdbSchemaOp.cpp getarg.c \
- CpcClient.cpp NdbMixRestarter.cpp NDBT_Thread.cpp
+ CpcClient.cpp NdbMixRestarter.cpp NDBT_Thread.cpp dbutil.cpp
INCLUDES_LOC = -I$(top_srcdir)/storage/ndb/src/common/mgmcommon -I$(top_srcdir)/storage/ndb/include/mgmcommon -I$(top_srcdir)/storage/ndb/include/kernel -I$(top_srcdir)/storage/ndb/src/mgmapi
diff --git a/storage/ndb/test/src/NDBT_Thread.cpp b/storage/ndb/test/src/NDBT_Thread.cpp
index 56cf2f6815b..ff6785724ba 100644
--- a/storage/ndb/test/src/NDBT_Thread.cpp
+++ b/storage/ndb/test/src/NDBT_Thread.cpp
@@ -131,7 +131,7 @@ NDBT_Thread::exit()
m_state = Exit;
signal();
unlock();
-};
+}
void
NDBT_Thread::join()
diff --git a/storage/ndb/test/src/NdbRestarts.cpp b/storage/ndb/test/src/NdbRestarts.cpp
index 6ec520887b5..86e71f4b3fc 100644
--- a/storage/ndb/test/src/NdbRestarts.cpp
+++ b/storage/ndb/test/src/NdbRestarts.cpp
@@ -607,6 +607,7 @@ NFDuringNR_codes[] = {
5026,
7139,
7132,
+ 5045,
//LCP
8000,
diff --git a/storage/ndb/test/src/UtilTransactions.cpp b/storage/ndb/test/src/UtilTransactions.cpp
index 5a408140c8e..776ffd176b3 100644
--- a/storage/ndb/test/src/UtilTransactions.cpp
+++ b/storage/ndb/test/src/UtilTransactions.cpp
@@ -42,38 +42,9 @@ UtilTransactions::UtilTransactions(Ndb* ndb,
int
UtilTransactions::clearTable(Ndb* pNdb,
- int records,
- int parallelism){
- if(m_defaultClearMethod == 1){
- return clearTable1(pNdb, records, parallelism);
- } else if(m_defaultClearMethod == 2){
- return clearTable2(pNdb, records, parallelism);
- } else {
- return clearTable3(pNdb, records, parallelism);
- }
-}
-
-
-int
-UtilTransactions::clearTable1(Ndb* pNdb,
- int records,
- int parallelism)
-{
- return clearTable3(pNdb, records, 1);
-}
-
-int
-UtilTransactions::clearTable2(Ndb* pNdb,
- int records,
- int parallelism)
-{
- return clearTable3(pNdb, records, parallelism);
-}
-
-int
-UtilTransactions::clearTable3(Ndb* pNdb,
- int records,
- int parallelism){
+ NdbScanOperation::ScanFlag flags,
+ int records,
+ int parallelism){
// Scan all records exclusive and delete
// them one by one
int retryAttempt = 0;
@@ -116,7 +87,7 @@ UtilTransactions::clearTable3(Ndb* pNdb,
goto failed;
}
- if( pOp->readTuplesExclusive(par) ) {
+ if( pOp->readTuples(NdbOperation::LM_Exclusive, flags, par) ) {
err = pTrans->getNdbError();
goto failed;
}
@@ -180,6 +151,43 @@ UtilTransactions::clearTable3(Ndb* pNdb,
}
int
+UtilTransactions::clearTable(Ndb* pNdb,
+ int records,
+ int parallelism){
+
+ return clearTable(pNdb, (NdbScanOperation::ScanFlag)0,
+ records, parallelism);
+}
+
+
+int
+UtilTransactions::clearTable1(Ndb* pNdb,
+ int records,
+ int parallelism)
+{
+ return clearTable(pNdb, (NdbScanOperation::ScanFlag)0,
+ records, 1);
+}
+
+int
+UtilTransactions::clearTable2(Ndb* pNdb,
+ int records,
+ int parallelism)
+{
+ return clearTable(pNdb, (NdbScanOperation::ScanFlag)0,
+ records, parallelism);
+}
+
+int
+UtilTransactions::clearTable3(Ndb* pNdb,
+ int records,
+ int parallelism)
+{
+ return clearTable(pNdb, (NdbScanOperation::ScanFlag)0,
+ records, parallelism);
+}
+
+int
UtilTransactions::copyTableData(Ndb* pNdb,
const char* destName){
// Scan all records and copy
diff --git a/storage/ndb/test/src/dbutil.cpp b/storage/ndb/test/src/dbutil.cpp
new file mode 100755
index 00000000000..0c936f53182
--- /dev/null
+++ b/storage/ndb/test/src/dbutil.cpp
@@ -0,0 +1,176 @@
+// dbutil.cpp: implementation of the database utilities class.
+//
+//////////////////////////////////////////////////////////////////////
+
+#include "dbutil.hpp"
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+dbutil::dbutil(const char * dbname)
+{
+ memset(host,' ',sizeof(host));
+ memset(user,' ',sizeof(pass));
+ memset(dbs,' ',sizeof(dbs));
+ port = 0;
+ memset(socket,' ',sizeof(socket));
+ this->SetDbName(dbname);
+}
+
+dbutil::~dbutil()
+{
+ this->DatabaseLogout();
+}
+
+//////////////////////////////////////////////////////////////////////
+// Database Login
+//////////////////////////////////////////////////////////////////////
+void dbutil::DatabaseLogin(const char* system,
+ const char* usr,
+ const char* password,
+ unsigned int portIn,
+ const char* sockIn,
+ bool transactional
+ ){
+ if (!(myDbHandel = mysql_init(NULL))){
+ myerror("mysql_init() failed");
+ exit(1);
+ }
+ this->SetUser(usr);
+ this->SetHost(system);
+ this->SetPassword(password);
+ this->SetPort(portIn);
+ this->SetSocket(sockIn);
+
+ if (!(mysql_real_connect(myDbHandel, host, user, pass, "test", port, socket, 0))){
+ myerror("connection failed");
+ mysql_close(myDbHandel);
+ fprintf(stdout, "\n Check the connection options using --help or -?\n");
+ exit(1);
+ }
+
+ myDbHandel->reconnect= 1;
+
+ /* set AUTOCOMMIT */
+ if(!transactional){
+ mysql_autocommit(myDbHandel, TRUE);
+ }
+ else{
+ mysql_autocommit(myDbHandel, FALSE);
+ }
+
+ fprintf(stdout, "\n\tConnected to MySQL server version: %s (%lu)\n\n",
+ mysql_get_server_info(myDbHandel),
+ (unsigned long) mysql_get_server_version(myDbHandel));
+}
+
+//////////////////////////////////////////////////////////////////////
+// Database Logout
+//////////////////////////////////////////////////////////////////////
+void dbutil::DatabaseLogout(){
+ if (myDbHandel){
+ fprintf(stdout, "\n\tClosing the MySQL database connection ...\n\n");
+ mysql_close(myDbHandel);
+ }
+}
+
+//////////////////////////////////////////////////////////////////////
+// Prepare MySQL Statements Cont
+//////////////////////////////////////////////////////////////////////
+MYSQL_STMT *STDCALL dbutil::MysqlSimplePrepare(const char *query){
+#ifdef DEBUG
+printf("Inside dbutil::MysqlSimplePrepare\n");
+#endif
+int result = 0;
+ MYSQL_STMT *my_stmt= mysql_stmt_init(this->GetDbHandel());
+ if (my_stmt && (result = mysql_stmt_prepare(my_stmt, query, strlen(query)))){
+ printf("res = %s\n",mysql_stmt_error(my_stmt));
+ mysql_stmt_close(my_stmt);
+ return 0;
+ }
+ return my_stmt;
+}
+//////////////////////////////////////////////////////////////////////
+// Error Printing
+//////////////////////////////////////////////////////////////////////
+void dbutil::PrintError(const char *msg){
+ if (this->GetDbHandel()
+ && mysql_errno(this->GetDbHandel())){
+ if (this->GetDbHandel()->server_version){
+ fprintf(stdout, "\n [MySQL-%s]",
+ this->GetDbHandel()->server_version);
+ }
+ else
+ fprintf(stdout, "\n [MySQL]");
+ fprintf(stdout, "[%d] %s\n",
+ mysql_errno(this->GetDbHandel()),
+ mysql_error(this->GetDbHandel()));
+ }
+ else if (msg)
+ fprintf(stderr, " [MySQL] %s\n", msg);
+}
+
+void dbutil::PrintStError(MYSQL_STMT *stmt, const char *msg)
+{
+ if (stmt && mysql_stmt_errno(stmt))
+ {
+ if (this->GetDbHandel()
+ && this->GetDbHandel()->server_version)
+ fprintf(stdout, "\n [MySQL-%s]",
+ this->GetDbHandel()->server_version);
+ else
+ fprintf(stdout, "\n [MySQL]");
+
+ fprintf(stdout, "[%d] %s\n", mysql_stmt_errno(stmt),
+ mysql_stmt_error(stmt));
+ }
+ else if (msg)
+ fprintf(stderr, " [MySQL] %s\n", msg);
+}
+/////////////////////////////////////////////////////
+int dbutil::Select_DB()
+{
+ return mysql_select_db(this->GetDbHandel(),
+ this->GetDbName());
+}
+////////////////////////////////////////////////////
+int dbutil::Do_Query(char * stm)
+{
+ return mysql_query(this->GetDbHandel(), stm);
+}
+////////////////////////////////////////////////////
+const char * dbutil::GetError()
+{
+ return mysql_error(this->GetDbHandel());
+}
+////////////////////////////////////////////////////
+int dbutil::GetErrorNumber()
+{
+ return mysql_errno(this->GetDbHandel());
+}
+////////////////////////////////////////////////////
+unsigned long dbutil::SelectCountTable(const char * table)
+{
+ unsigned long count = 0;
+ MYSQL_RES *result;
+ char query[1024];
+ MYSQL_ROW row;
+
+ sprintf(query,"select count(*) from `%s`", table);
+ if (mysql_query(this->GetDbHandel(),query) || !(result=mysql_store_result(this->GetDbHandel())))
+ {
+ printf("error\n");
+ return 1;
+ }
+ row= mysql_fetch_row(result);
+ count= (ulong) strtoull(row[0], (char**) 0, 10);
+ mysql_free_result(result);
+
+ return count;
+}
+void dbutil::Die(const char *file, int line, const char *expr){
+ fprintf(stderr, "%s:%d: check failed: '%s'\n", file, line, expr);
+ abort();
+}
+
+
diff --git a/strings/ctype-big5.c b/strings/ctype-big5.c
index 7bb811a3064..ecfd3d648e0 100644
--- a/strings/ctype-big5.c
+++ b/strings/ctype-big5.c
@@ -6272,12 +6272,12 @@ my_mb_wc_big5(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc,const uchar *s,const uchar *e)
{
- int hi=s[0];
+ int hi;
if (s >= e)
return MY_CS_TOOSMALL;
- if (hi<0x80)
+ if ((hi= s[0]) < 0x80)
{
pwc[0]=hi;
return 1;
diff --git a/strings/ctype-cp932.c b/strings/ctype-cp932.c
index a0ff0314246..c1aba0b35c6 100644
--- a/strings/ctype-cp932.c
+++ b/strings/ctype-cp932.c
@@ -5360,12 +5360,12 @@ my_wc_mb_cp932(CHARSET_INFO *cs __attribute__((unused)),
static int
my_mb_wc_cp932(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s, const uchar *e){
- int hi=s[0];
+ int hi;
if (s >= e)
return MY_CS_TOOSMALL;
- if (hi < 0x80)
+ if ((hi= s[0]) < 0x80)
{
pwc[0]=hi;
return 1;
diff --git a/strings/ctype-euc_kr.c b/strings/ctype-euc_kr.c
index 844d8cc3ff5..247fb041896 100644
--- a/strings/ctype-euc_kr.c
+++ b/strings/ctype-euc_kr.c
@@ -179,20 +179,40 @@ static uchar NEAR sort_order_euc_kr[]=
/* Support for Korean(EUC_KR) characters, by powerm90@tinc.co.kr and mrpark@tinc.co.kr */
-#define iseuc_kr(c) ((0xa1<=(uchar)(c) && (uchar)(c)<=0xfe))
+/*
+ Unicode mapping is done according to:
+ ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/KSC/KSC5601.TXT
+
+ Valid multi-byte characters:
+
+ [A1..FE][41..5A,61..7A,81..FE]
+
+ Note, 0x5C is not a valid MB tail,
+ so escape_with_backslash_is_dangerous is not set.
+*/
+
+#define iseuc_kr_head(c) ((0xa1<=(uchar)(c) && (uchar)(c)<=0xfe))
+
+#define iseuc_kr_tail1(c) ((uchar) (c) >= 0x41 && (uchar) (c) <= 0x5A)
+#define iseuc_kr_tail2(c) ((uchar) (c) >= 0x61 && (uchar) (c) <= 0x7A)
+#define iseuc_kr_tail3(c) ((uchar) (c) >= 0x81 && (uchar) (c) <= 0xFE)
+
+#define iseuc_kr_tail(c) (iseuc_kr_tail1(c) || \
+ iseuc_kr_tail2(c) || \
+ iseuc_kr_tail3(c))
static uint ismbchar_euc_kr(CHARSET_INFO *cs __attribute__((unused)),
const char* p, const char *e)
{
return ((*(uchar*)(p)<0x80)? 0:\
- iseuc_kr(*(p)) && (e)-(p)>1 && iseuc_kr(*((p)+1))? 2:\
+ iseuc_kr_head(*(p)) && (e)-(p)>1 && iseuc_kr_tail(*((p)+1))? 2:\
0);
}
static uint mbcharlen_euc_kr(CHARSET_INFO *cs __attribute__((unused)),uint c)
{
- return (iseuc_kr(c) ? 2 : 1);
+ return (iseuc_kr_head(c) ? 2 : 1);
}
@@ -8614,12 +8634,12 @@ my_mb_wc_euc_kr(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s, const uchar *e)
{
- int hi=s[0];
+ int hi;
if (s >= e)
return MY_CS_TOOSMALL;
- if (hi<0x80)
+ if ((hi= s[0]) < 0x80)
{
pwc[0]=hi;
return 1;
@@ -8654,7 +8674,7 @@ my_well_formed_len_euckr(CHARSET_INFO *cs __attribute__((unused)),
/* Single byte ascii character */
b++;
}
- else if (b < emb && iseuc_kr(*b) && iseuc_kr(b[1]))
+ else if (b < emb && iseuc_kr_head(*b) && iseuc_kr_tail(b[1]))
{
/* Double byte character */
b+= 2;
diff --git a/strings/ctype-gb2312.c b/strings/ctype-gb2312.c
index 21aeb8b7990..4b3518ce3d2 100644
--- a/strings/ctype-gb2312.c
+++ b/strings/ctype-gb2312.c
@@ -5664,12 +5664,10 @@ my_mb_wc_gb2312(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s, const uchar *e){
int hi;
- hi=(int) s[0];
-
if (s >= e)
return MY_CS_TOOSMALL;
- if (hi<0x80)
+ if ((hi= s[0]) < 0x80)
{
pwc[0]=hi;
return 1;
diff --git a/strings/ctype-simple.c b/strings/ctype-simple.c
index 6b71f29f0d2..7de00025eda 100644
--- a/strings/ctype-simple.c
+++ b/strings/ctype-simple.c
@@ -845,6 +845,7 @@ size_t my_long10_to_str_8bit(CHARSET_INFO *cs __attribute__((unused)),
register char *p, *e;
long int new_val;
uint sign=0;
+ unsigned long int uval = (unsigned long int) val;
e = p = &buffer[sizeof(buffer)-1];
*p= 0;
@@ -853,15 +854,16 @@ size_t my_long10_to_str_8bit(CHARSET_INFO *cs __attribute__((unused)),
{
if (val < 0)
{
- val= -val;
+ /* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */
+ uval= (unsigned long int)0 - uval;
*dst++= '-';
len--;
sign= 1;
}
}
- new_val = (long) ((unsigned long int) val / 10);
- *--p = '0'+ (char) ((unsigned long int) val - (unsigned long) new_val * 10);
+ new_val = (long) (uval / 10);
+ *--p = '0'+ (char) (uval - (unsigned long) new_val * 10);
val = new_val;
while (val != 0)
@@ -885,12 +887,14 @@ size_t my_longlong10_to_str_8bit(CHARSET_INFO *cs __attribute__((unused)),
register char *p, *e;
long long_val;
uint sign= 0;
+ ulonglong uval = (ulonglong)val;
if (radix < 0)
{
if (val < 0)
{
- val = -val;
+ /* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */
+ uval = (ulonglong)0 - uval;
*dst++= '-';
len--;
sign= 1;
@@ -900,22 +904,22 @@ size_t my_longlong10_to_str_8bit(CHARSET_INFO *cs __attribute__((unused)),
e = p = &buffer[sizeof(buffer)-1];
*p= 0;
- if (val == 0)
+ if (uval == 0)
{
*--p= '0';
len= 1;
goto cnv;
}
- while ((ulonglong) val > (ulonglong) LONG_MAX)
+ while (uval > (ulonglong) LONG_MAX)
{
- ulonglong quo=(ulonglong) val/(uint) 10;
- uint rem= (uint) (val- quo* (uint) 10);
+ ulonglong quo= uval/(uint) 10;
+ uint rem= (uint) (uval- quo* (uint) 10);
*--p = '0' + rem;
- val= quo;
+ uval= quo;
}
- long_val= (long) val;
+ long_val= (long) uval;
while (long_val != 0)
{
long quo= long_val/10;
@@ -1561,14 +1565,18 @@ my_strntoull10rnd_8bit(CHARSET_INFO *cs __attribute__((unused)),
}
else
addon= (*str >= '5');
- for ( ; str < end && (ch= (uchar) (*str - '0')) < 10; str++)
+ if (!dot)
{
- if (!dot)
- shift++;
+ for ( ; str < end && (ch= (uchar) (*str - '0')) < 10; shift++, str++);
+ if (str < end && *str == '.')
+ {
+ str++;
+ for ( ; str < end && (ch= (uchar) (*str - '0')) < 10; str++);
+ }
}
- if (str < end && *str == '.' && !dot)
+ else
{
- str++;
+ shift= dot - str;
for ( ; str < end && (ch= (uchar) (*str - '0')) < 10; str++);
}
goto exp;
diff --git a/strings/ctype-sjis.c b/strings/ctype-sjis.c
index ace457af63c..3925b76869c 100644
--- a/strings/ctype-sjis.c
+++ b/strings/ctype-sjis.c
@@ -4527,12 +4527,12 @@ mb:
static int
my_mb_wc_sjis(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s, const uchar *e){
- int hi=s[0];
+ int hi;
if (s >= e)
return MY_CS_TOOSMALL;
- if (hi < 0x80)
+ if ((hi= s[0]) < 0x80)
{
pwc[0]=hi;
return 1;
diff --git a/strings/ctype-ucs2.c b/strings/ctype-ucs2.c
index 1df8221072e..d1579afe4c2 100644
--- a/strings/ctype-ucs2.c
+++ b/strings/ctype-ucs2.c
@@ -1019,6 +1019,7 @@ size_t my_l10tostr_ucs2(CHARSET_INFO *cs,
register char *p, *db, *de;
long int new_val;
int sl=0;
+ unsigned long int uval = (unsigned long int) val;
p = &buffer[sizeof(buffer)-1];
*p='\0';
@@ -1028,12 +1029,13 @@ size_t my_l10tostr_ucs2(CHARSET_INFO *cs,
if (val < 0)
{
sl = 1;
- val = -val;
+ /* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */
+ uval = (unsigned long int)0 - uval;
}
}
- new_val = (long) ((unsigned long int) val / 10);
- *--p = '0'+ (char) ((unsigned long int) val - (unsigned long) new_val * 10);
+ new_val = (long) (uval / 10);
+ *--p = '0'+ (char) (uval - (unsigned long) new_val * 10);
val = new_val;
while (val != 0)
@@ -1067,34 +1069,36 @@ size_t my_ll10tostr_ucs2(CHARSET_INFO *cs __attribute__((unused)),
register char *p, *db, *de;
long long_val;
int sl=0;
+ ulonglong uval= (ulonglong) val;
if (radix < 0)
{
if (val < 0)
{
sl=1;
- val = -val;
+ /* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */
+ uval = (ulonglong)0 - uval;
}
}
p = &buffer[sizeof(buffer)-1];
*p='\0';
- if (val == 0)
+ if (uval == 0)
{
*--p='0';
goto cnv;
}
- while ((ulonglong) val > (ulonglong) LONG_MAX)
+ while (uval > (ulonglong) LONG_MAX)
{
- ulonglong quo=(ulonglong) val/(size_t) 10;
- uint rem= (uint) (val- quo* (uint) 10);
+ ulonglong quo= uval/(uint) 10;
+ uint rem= (uint) (uval- quo* (uint) 10);
*--p = '0' + rem;
- val= quo;
+ uval= quo;
}
- long_val= (long) val;
+ long_val= (long) uval;
while (long_val != 0)
{
long quo= long_val/10;
diff --git a/strings/decimal.c b/strings/decimal.c
index f1753c619d1..f457014b2b1 100644
--- a/strings/decimal.c
+++ b/strings/decimal.c
@@ -2329,11 +2329,12 @@ static int do_div_mod(decimal_t *from1, decimal_t *from2,
}
if (unlikely(intg0+frac0 > to->len))
{
- stop1-=to->len-frac0-intg0;
+ stop1-=frac0+intg0-to->len;
frac0=to->len-intg0;
to->frac=frac0*DIG_PER_DEC1;
error=E_DEC_TRUNCATED;
}
+ DBUG_ASSERT(buf0 + (stop1 - start1) <= to->buf + to->len);
while (start1 < stop1)
*buf0++=*start1++;
}
diff --git a/strings/int2str.c b/strings/int2str.c
index 9fc53032819..fba98aac3f1 100644
--- a/strings/int2str.c
+++ b/strings/int2str.c
@@ -57,6 +57,7 @@ int2str(register long int val, register char *dst, register int radix,
register char *p;
long int new_val;
char *dig_vec= upcase ? _dig_vec_upper : _dig_vec_lower;
+ ulong uval= (ulong) val;
if (radix < 0)
{
@@ -65,7 +66,8 @@ int2str(register long int val, register char *dst, register int radix,
if (val < 0)
{
*dst++ = '-';
- val = -val;
+ /* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */
+ uval = (ulong)0 - uval;
}
radix = -radix;
}
@@ -86,8 +88,8 @@ int2str(register long int val, register char *dst, register int radix,
*/
p = &buffer[sizeof(buffer)-1];
*p = '\0';
- new_val=(ulong) val / (ulong) radix;
- *--p = dig_vec[(uchar) ((ulong) val- (ulong) new_val*(ulong) radix)];
+ new_val= uval / (ulong) radix;
+ *--p = dig_vec[(uchar) (uval- (ulong) new_val*(ulong) radix)];
val = new_val;
#ifdef HAVE_LDIV
while (val != 0)
@@ -133,20 +135,22 @@ char *int10_to_str(long int val,char *dst,int radix)
char buffer[65];
register char *p;
long int new_val;
+ unsigned long int uval = (unsigned long int) val;
if (radix < 0) /* -10 */
{
if (val < 0)
{
*dst++ = '-';
- val = -val;
+ /* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */
+ uval = (unsigned long int)0 - uval;
}
}
p = &buffer[sizeof(buffer)-1];
*p = '\0';
- new_val= (long) ((unsigned long int) val / 10);
- *--p = '0'+ (char) ((unsigned long int) val - (unsigned long) new_val * 10);
+ new_val= (long) (uval / 10);
+ *--p = '0'+ (char) (uval - (unsigned long) new_val * 10);
val = new_val;
while (val != 0)
diff --git a/strings/longlong2str.c b/strings/longlong2str.c
index c464abcfccd..d7de5bb0f7c 100644
--- a/strings/longlong2str.c
+++ b/strings/longlong2str.c
@@ -51,13 +51,15 @@ char *longlong2str(longlong val,char *dst,int radix)
char buffer[65];
register char *p;
long long_val;
+ ulonglong uval= (ulonglong) val;
if (radix < 0)
{
if (radix < -36 || radix > -2) return (char*) 0;
if (val < 0) {
*dst++ = '-';
- val = -val;
+ /* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */
+ uval = (ulonglong)0 - uval;
}
radix = -radix;
}
@@ -65,7 +67,7 @@ char *longlong2str(longlong val,char *dst,int radix)
{
if (radix > 36 || radix < 2) return (char*) 0;
}
- if (val == 0)
+ if (uval == 0)
{
*dst++='0';
*dst='\0';
@@ -74,14 +76,14 @@ char *longlong2str(longlong val,char *dst,int radix)
p = &buffer[sizeof(buffer)-1];
*p = '\0';
- while ((ulonglong) val > (ulonglong) LONG_MAX)
+ while (uval > (ulonglong) LONG_MAX)
{
- ulonglong quo=(ulonglong) val/(uint) radix;
- uint rem= (uint) (val- quo* (uint) radix);
+ ulonglong quo= uval/(uint) radix;
+ uint rem= (uint) (uval- quo* (uint) radix);
*--p = _dig_vec_upper[rem];
- val= quo;
+ uval= quo;
}
- long_val= (long) val;
+ long_val= (long) uval;
while (long_val != 0)
{
long quo= long_val/radix;
@@ -100,17 +102,19 @@ char *longlong10_to_str(longlong val,char *dst,int radix)
char buffer[65];
register char *p;
long long_val;
+ ulonglong uval= (ulonglong) val;
if (radix < 0)
{
if (val < 0)
{
*dst++ = '-';
- val = -val;
+ /* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */
+ uval = (ulonglong)0 - uval;
}
}
- if (val == 0)
+ if (uval == 0)
{
*dst++='0';
*dst='\0';
@@ -119,14 +123,14 @@ char *longlong10_to_str(longlong val,char *dst,int radix)
p = &buffer[sizeof(buffer)-1];
*p = '\0';
- while ((ulonglong) val > (ulonglong) LONG_MAX)
+ while (uval > (ulonglong) LONG_MAX)
{
- ulonglong quo=(ulonglong) val/(uint) 10;
- uint rem= (uint) (val- quo* (uint) 10);
+ ulonglong quo= uval/(uint) 10;
+ uint rem= (uint) (uval- quo* (uint) 10);
*--p = _dig_vec_upper[rem];
- val= quo;
+ uval= quo;
}
- long_val= (long) val;
+ long_val= (long) uval;
while (long_val != 0)
{
long quo= long_val/10;
diff --git a/support-files/MacOSX/ReadMe.txt b/support-files/MacOSX/ReadMe.txt
new file mode 100644
index 00000000000..b3dcba21705
--- /dev/null
+++ b/support-files/MacOSX/ReadMe.txt
@@ -0,0 +1,8 @@
+
+You can find information about how to install on Mac OS X at
+
+ http://dev.mysql.com/doc/refman/5.1/en/mac-os-x-installation.html
+
+The MySQL Reference Manual is also available in various formats on
+http://dev.mysql.com/doc; if you're interested in the DocBook XML
+sources go to http://svn.mysql.com.
diff --git a/support-files/compiler_warnings.supp b/support-files/compiler_warnings.supp
index a4048c2fbc0..703f6c2a272 100644
--- a/support-files/compiler_warnings.supp
+++ b/support-files/compiler_warnings.supp
@@ -36,6 +36,11 @@ pars0lex.l: .*conversion from 'ulint' to 'int', possible loss of data.*
db_vrfy.c : .*comparison is always false due to limited range of data type.*
#
+# readline is not maintained by us
+#
+.*/cmd-line-utils/readline/.* : .*
+
+#
# Ignore all conversion warnings on windows 64
# (Is safe as we are not yet supporting strings >= 2G)
#
@@ -82,3 +87,4 @@ mi_packrec.c : .*result of 32-bit shift implicitly converted to 64 bits.* : 560-
# Wrong compiler warnings
#
.* : .*no matching operator delete found; memory will not be freed if initialization throws an exception.*
+ctype-simple.c : .*unary minus operator applied to unsigned type, result still unsigned.*
diff --git a/support-files/mysql.server.sh b/support-files/mysql.server.sh
index e0933aff8a4..65e13aaaca0 100644
--- a/support-files/mysql.server.sh
+++ b/support-files/mysql.server.sh
@@ -314,7 +314,7 @@ case "$mode" in
fi
exit $return_value
else
- log_failure_msg "Couldn't find MySQL manager or server"
+ log_failure_msg "Couldn't find MySQL manager ($manager) or server ($bindir/mysqld_safe)"
fi
;;
diff --git a/tests/bug25714.c b/tests/bug25714.c
index 4782178e2f2..03d28f59aa4 100644
--- a/tests/bug25714.c
+++ b/tests/bug25714.c
@@ -29,8 +29,12 @@ int main (int argc, char **argv)
MY_INIT(argv[0]);
- if (argc != 2)
+ if (argc != 2 || !strcmp(argv[1], "--help"))
+ {
+ fprintf(stderr, "This program is a part of the MySQL test suite. "
+ "It is not intended to be executed directly by a user.\n");
return -1;
+ }
mysql_init(&conn);
if (!mysql_real_connect(
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
index 7f0289d93db..9284b2182b1 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -119,6 +119,8 @@ static void client_disconnect(void);
#define DIE_UNLESS(expr) \
((void) ((expr) ? 0 : (die(__FILE__, __LINE__, #expr), 0)))
+#define DIE_IF(expr) \
+ ((void) ((expr) ? (die(__FILE__, __LINE__, #expr), 0) : 0))
#define DIE(expr) \
die(__FILE__, __LINE__, #expr)
@@ -127,7 +129,7 @@ static void die(const char *file, int line, const char *expr)
fflush(stdout);
fprintf(stderr, "%s:%d: check failed: '%s'\n", file, line, expr);
fflush(stderr);
- abort();
+ exit(1);
}
@@ -177,8 +179,8 @@ if (stmt == 0) \
DIE_UNLESS(stmt == 0);\
}
-#define mytest(x) if (!x) {myerror(NULL);DIE_UNLESS(FALSE);}
-#define mytest_r(x) if (x) {myerror(NULL);DIE_UNLESS(FALSE);}
+#define mytest(x) if (!(x)) {myerror(NULL);DIE_UNLESS(FALSE);}
+#define mytest_r(x) if ((x)) {myerror(NULL);DIE_UNLESS(FALSE);}
/* A workaround for Sun Forte 5.6 on Solaris x86 */
@@ -5912,6 +5914,20 @@ DROP TABLE IF EXISTS test_multi_tab";
(void) my_process_result_set(result);
mysql_free_result(result);
+ /*
+ Check if errors in one of the queries handled properly.
+ */
+ rc= mysql_query(mysql_local, "select 1; select * from not_existing_table");
+ myquery(rc);
+ result= mysql_store_result(mysql_local);
+ mysql_free_result(result);
+
+ rc= mysql_next_result(mysql_local);
+ DIE_UNLESS(rc > 0);
+
+ rc= mysql_next_result(mysql_local);
+ DIE_UNLESS(rc < 0);
+
mysql_close(mysql_local);
}
@@ -7785,7 +7801,7 @@ static void test_explain_bug()
verify_prepare_field(result, 5, "Extra", "EXTRA",
mysql_get_server_version(mysql) <= 50000 ?
MYSQL_TYPE_STRING : MYSQL_TYPE_VAR_STRING,
- 0, 0, "", 20, 0);
+ 0, 0, "", 27, 0);
mysql_free_result(result);
mysql_stmt_close(stmt);
@@ -9550,7 +9566,7 @@ static void test_subqueries_ref()
{
MYSQL_STMT *stmt;
int rc, i;
- const char *query= "SELECT a as ccc from t1 where a+1=(SELECT 1+ccc from t1 where ccc+1=a+1 and a=1)";
+ const char *query= "SELECT a as ccc from t1 outr where a+1=(SELECT 1+outr.a from t1 where outr.a+1=a+1 and a=1)";
myheader("test_subqueries_ref");
@@ -11928,7 +11944,7 @@ static void test_bug5194()
MAX_PARAM_COUNT * CHARS_PER_PARAM + 1);
param_str= (char*) malloc(COLUMN_COUNT * CHARS_PER_PARAM);
- if (bind == 0 || query == 0 || param_str == 0)
+ if (my_bind == 0 || query == 0 || param_str == 0)
{
fprintf(stderr, "Can't allocate enough memory for query structs\n");
if (my_bind)
@@ -13534,7 +13550,7 @@ static void test_bug9478()
{
char buff[8];
- /* Fill in the fethc packet */
+ /* Fill in the fetch packet */
int4store(buff, stmt->stmt_id);
buff[4]= 1; /* prefetch rows */
rc= ((*mysql->methods->advanced_command)(mysql, COM_STMT_FETCH,
@@ -15867,6 +15883,8 @@ static void test_status()
Test that client gets updated value of insert_id on UPDATE that uses
LAST_INSERT_ID(expr).
+ select_query added to test for bug
+ #26921 Problem in mysql_insert_id() Embedded C API function
*/
static void test_bug21726()
{
@@ -15879,6 +15897,8 @@ static void test_bug21726()
const char *update_query= "UPDATE t1 SET i= LAST_INSERT_ID(i + 1)";
int rc;
my_ulonglong insert_id;
+ const char *select_query= "SELECT * FROM t1";
+ MYSQL_RES *result;
DBUG_ENTER("test_bug21726");
myheader("test_bug21726");
@@ -15895,6 +15915,13 @@ static void test_bug21726()
insert_id= mysql_insert_id(mysql);
DIE_UNLESS(insert_id == 3);
+ rc= mysql_query(mysql, select_query);
+ myquery(rc);
+ insert_id= mysql_insert_id(mysql);
+ DIE_UNLESS(insert_id == 3);
+ result= mysql_store_result(mysql);
+ mysql_free_result(result);
+
DBUG_VOID_RETURN;
}
@@ -15999,7 +16026,7 @@ static void test_bug21635()
char *query_end;
MYSQL_RES *result;
MYSQL_FIELD *field;
- unsigned int field_count, i;
+ unsigned int field_count, i, j;
int rc;
DBUG_ENTER("test_bug21635");
@@ -16015,30 +16042,39 @@ static void test_bug21635()
myquery(rc);
rc= mysql_query(mysql, "CREATE TABLE t1 (i INT)");
myquery(rc);
- rc= mysql_query(mysql, "INSERT INTO t1 VALUES (1)");
- myquery(rc);
+ /*
+ We need this loop to ensure correct behavior with both constant and
+ non-constant tables.
+ */
+ for (j= 0; j < 2 ; j++)
+ {
+ rc= mysql_query(mysql, "INSERT INTO t1 VALUES (1)");
+ myquery(rc);
- rc= mysql_real_query(mysql, query, query_end - query);
- myquery(rc);
+ rc= mysql_real_query(mysql, query, query_end - query);
+ myquery(rc);
- result= mysql_use_result(mysql);
- DIE_UNLESS(result);
+ result= mysql_use_result(mysql);
+ DIE_UNLESS(result);
field_count= mysql_field_count(mysql);
for (i= 0; i < field_count; ++i)
{
field= mysql_fetch_field_direct(result, i);
if (!opt_silent)
- printf("%s -> %s ... ", expr[i * 2], field->name);
+ if (!opt_silent)
+ printf("%s -> %s ... ", expr[i * 2], field->name);
fflush(stdout);
DIE_UNLESS(field->db[0] == 0 && field->org_table[0] == 0 &&
field->table[0] == 0 && field->org_name[0] == 0);
DIE_UNLESS(strcmp(field->name, expr[i * 2 + 1]) == 0);
if (!opt_silent)
- puts("OK");
+ if (!opt_silent)
+ puts("OK");
}
- mysql_free_result(result);
+ mysql_free_result(result);
+ }
rc= mysql_query(mysql, "DROP TABLE t1");
myquery(rc);
@@ -16214,6 +16250,204 @@ static void test_bug28934()
myquery(mysql_query(mysql, "drop table t1"));
}
+/*
+ Test mysql_change_user() C API and COM_CHANGE_USER
+*/
+
+static void test_change_user()
+{
+ char buff[256];
+ const char *user_pw= "mysqltest_pw";
+ const char *user_no_pw= "mysqltest_no_pw";
+ const char *pw= "password";
+ const char *db= "mysqltest_user_test_database";
+ int rc;
+
+ DBUG_ENTER("test_change_user");
+ myheader("test_change_user");
+
+ /* Prepare environment */
+ sprintf(buff, "drop database if exists %s", db);
+ rc= mysql_query(mysql, buff);
+ myquery(rc);
+
+ sprintf(buff, "create database %s", db);
+ rc= mysql_query(mysql, buff);
+ myquery(rc);
+
+ sprintf(buff,
+ "grant select on %s.* to %s@'%%' identified by '%s'",
+ db,
+ user_pw,
+ pw);
+ rc= mysql_query(mysql, buff);
+ myquery(rc);
+
+ sprintf(buff,
+ "grant select on %s.* to %s@'%%'",
+ db,
+ user_no_pw);
+ rc= mysql_query(mysql, buff);
+ myquery(rc);
+
+
+ /* Try some combinations */
+ rc= mysql_change_user(mysql, NULL, NULL, NULL);
+ DIE_UNLESS(rc);
+ if (! opt_silent)
+ printf("Got error (as expected): %s\n", mysql_error(mysql));
+
+
+ rc= mysql_change_user(mysql, "", NULL, NULL);
+ DIE_UNLESS(rc);
+ if (! opt_silent)
+ printf("Got error (as expected): %s\n", mysql_error(mysql));
+
+ rc= mysql_change_user(mysql, "", "", NULL);
+ DIE_UNLESS(rc);
+ if (! opt_silent)
+ printf("Got error (as expected): %s\n", mysql_error(mysql));
+
+ rc= mysql_change_user(mysql, "", "", "");
+ DIE_UNLESS(rc);
+ if (! opt_silent)
+ printf("Got error (as expected): %s\n", mysql_error(mysql));
+
+ rc= mysql_change_user(mysql, NULL, "", "");
+ DIE_UNLESS(rc);
+ if (! opt_silent)
+ printf("Got error (as expected): %s\n", mysql_error(mysql));
+
+
+ rc= mysql_change_user(mysql, NULL, NULL, "");
+ DIE_UNLESS(rc);
+ if (! opt_silent)
+ printf("Got error (as expected): %s\n", mysql_error(mysql));
+
+ rc= mysql_change_user(mysql, "", NULL, "");
+ DIE_UNLESS(rc);
+ if (! opt_silent)
+ printf("Got error (as expected): %s\n", mysql_error(mysql));
+
+ rc= mysql_change_user(mysql, user_pw, NULL, "");
+ DIE_UNLESS(rc);
+ if (! opt_silent)
+ printf("Got error (as expected): %s\n", mysql_error(mysql));
+
+ rc= mysql_change_user(mysql, user_pw, "", "");
+ DIE_UNLESS(rc);
+ if (! opt_silent)
+ printf("Got error (as expected): %s\n", mysql_error(mysql));
+
+ rc= mysql_change_user(mysql, user_pw, "", NULL);
+ DIE_UNLESS(rc);
+ if (! opt_silent)
+ printf("Got error (as expected): %s\n", mysql_error(mysql));
+
+ rc= mysql_change_user(mysql, user_pw, NULL, NULL);
+ DIE_UNLESS(rc);
+ if (! opt_silent)
+ printf("Got error (as expected): %s\n", mysql_error(mysql));
+
+ rc= mysql_change_user(mysql, user_pw, "", db);
+ DIE_UNLESS(rc);
+ if (! opt_silent)
+ printf("Got error (as expected): %s\n", mysql_error(mysql));
+
+ rc= mysql_change_user(mysql, user_pw, NULL, db);
+ DIE_UNLESS(rc);
+ if (! opt_silent)
+ printf("Got error (as expected): %s\n", mysql_error(mysql));
+
+ rc= mysql_change_user(mysql, user_pw, pw, db);
+ myquery(rc);
+
+ rc= mysql_change_user(mysql, user_pw, pw, NULL);
+ myquery(rc);
+
+ rc= mysql_change_user(mysql, user_pw, pw, "");
+ myquery(rc);
+
+ rc= mysql_change_user(mysql, user_no_pw, pw, db);
+ DIE_UNLESS(rc);
+ if (! opt_silent)
+ printf("Got error (as expected): %s\n", mysql_error(mysql));
+
+ rc= mysql_change_user(mysql, user_no_pw, pw, "");
+ DIE_UNLESS(rc);
+ if (! opt_silent)
+ printf("Got error (as expected): %s\n", mysql_error(mysql));
+
+ rc= mysql_change_user(mysql, user_no_pw, pw, NULL);
+ DIE_UNLESS(rc);
+ if (! opt_silent)
+ printf("Got error (as expected): %s\n", mysql_error(mysql));
+
+ rc= mysql_change_user(mysql, user_no_pw, "", NULL);
+ myquery(rc);
+
+ rc= mysql_change_user(mysql, user_no_pw, "", "");
+ myquery(rc);
+
+ rc= mysql_change_user(mysql, user_no_pw, "", db);
+ myquery(rc);
+
+ rc= mysql_change_user(mysql, user_no_pw, NULL, db);
+ myquery(rc);
+
+ rc= mysql_change_user(mysql, "", pw, db);
+ DIE_UNLESS(rc);
+ if (! opt_silent)
+ printf("Got error (as expected): %s\n", mysql_error(mysql));
+
+ rc= mysql_change_user(mysql, "", pw, "");
+ DIE_UNLESS(rc);
+ if (! opt_silent)
+ printf("Got error (as expected): %s\n", mysql_error(mysql));
+
+ rc= mysql_change_user(mysql, "", pw, NULL);
+ DIE_UNLESS(rc);
+ if (! opt_silent)
+ printf("Got error (as expected): %s\n", mysql_error(mysql));
+
+ rc= mysql_change_user(mysql, NULL, pw, NULL);
+ DIE_UNLESS(rc);
+ if (! opt_silent)
+ printf("Got error (as expected): %s\n", mysql_error(mysql));
+
+ rc= mysql_change_user(mysql, NULL, NULL, db);
+ DIE_UNLESS(rc);
+ if (! opt_silent)
+ printf("Got error (as expected): %s\n", mysql_error(mysql));
+
+ rc= mysql_change_user(mysql, NULL, "", db);
+ DIE_UNLESS(rc);
+ if (! opt_silent)
+ printf("Got error (as expected): %s\n", mysql_error(mysql));
+
+ rc= mysql_change_user(mysql, "", "", db);
+ DIE_UNLESS(rc);
+ if (! opt_silent)
+ printf("Got error (as expected): %s\n", mysql_error(mysql));
+
+ /* Cleanup the environment */
+
+ mysql_change_user(mysql, opt_user, opt_password, current_db);
+
+ sprintf(buff, "drop database %s", db);
+ rc= mysql_query(mysql, buff);
+ myquery(rc);
+
+ sprintf(buff, "drop user %s@'%%'", user_pw);
+ rc= mysql_query(mysql, buff);
+ myquery(rc);
+
+ sprintf(buff, "drop user %s@'%%'", user_no_pw);
+ rc= mysql_query(mysql, buff);
+ myquery(rc);
+
+ DBUG_VOID_RETURN;
+}
/*
Bug#27592 (stack overrun when storing datetime value using prepared statements)
@@ -16452,6 +16686,552 @@ static void test_bug29306()
DBUG_VOID_RETURN;
}
/*
+ Bug#30472: libmysql doesn't reset charset, insert_id after succ.
+ mysql_change_user() call row insertions.
+*/
+
+static void bug30472_retrieve_charset_info(MYSQL *con,
+ char *character_set_name,
+ char *character_set_client,
+ char *character_set_results,
+ char *collation_connection)
+{
+ MYSQL_RES *rs;
+ MYSQL_ROW row;
+
+ /* Get the cached client character set name. */
+
+ strcpy(character_set_name, mysql_character_set_name(con));
+
+ /* Retrieve server character set information. */
+
+ DIE_IF(mysql_query(con, "SHOW VARIABLES LIKE 'character_set_client'"));
+ DIE_UNLESS(rs= mysql_store_result(con));
+ DIE_UNLESS(row= mysql_fetch_row(rs));
+ strcpy(character_set_client, row[1]);
+ mysql_free_result(rs);
+
+ DIE_IF(mysql_query(con, "SHOW VARIABLES LIKE 'character_set_results'"));
+ DIE_UNLESS(rs= mysql_store_result(con));
+ DIE_UNLESS(row= mysql_fetch_row(rs));
+ strcpy(character_set_results, row[1]);
+ mysql_free_result(rs);
+
+ DIE_IF(mysql_query(con, "SHOW VARIABLES LIKE 'collation_connection'"));
+ DIE_UNLESS(rs= mysql_store_result(con));
+ DIE_UNLESS(row= mysql_fetch_row(rs));
+ strcpy(collation_connection, row[1]);
+ mysql_free_result(rs);
+}
+
+static void test_bug30472()
+{
+ MYSQL con;
+
+ char character_set_name_1[MY_CS_NAME_SIZE];
+ char character_set_client_1[MY_CS_NAME_SIZE];
+ char character_set_results_1[MY_CS_NAME_SIZE];
+ char collation_connnection_1[MY_CS_NAME_SIZE];
+
+ char character_set_name_2[MY_CS_NAME_SIZE];
+ char character_set_client_2[MY_CS_NAME_SIZE];
+ char character_set_results_2[MY_CS_NAME_SIZE];
+ char collation_connnection_2[MY_CS_NAME_SIZE];
+
+ char character_set_name_3[MY_CS_NAME_SIZE];
+ char character_set_client_3[MY_CS_NAME_SIZE];
+ char character_set_results_3[MY_CS_NAME_SIZE];
+ char collation_connnection_3[MY_CS_NAME_SIZE];
+
+ char character_set_name_4[MY_CS_NAME_SIZE];
+ char character_set_client_4[MY_CS_NAME_SIZE];
+ char character_set_results_4[MY_CS_NAME_SIZE];
+ char collation_connnection_4[MY_CS_NAME_SIZE];
+
+ /* Create a new connection. */
+
+ DIE_UNLESS(mysql_init(&con));
+
+ DIE_UNLESS(mysql_real_connect(&con,
+ opt_host,
+ opt_user,
+ opt_password,
+ opt_db ? opt_db : "test",
+ opt_port,
+ opt_unix_socket,
+ CLIENT_FOUND_ROWS));
+
+ /* Retrieve character set information. */
+
+ bug30472_retrieve_charset_info(&con,
+ character_set_name_1,
+ character_set_client_1,
+ character_set_results_1,
+ collation_connnection_1);
+
+ /* Switch client character set. */
+
+ DIE_IF(mysql_set_character_set(&con, "utf8"));
+
+ /* Retrieve character set information. */
+
+ bug30472_retrieve_charset_info(&con,
+ character_set_name_2,
+ character_set_client_2,
+ character_set_results_2,
+ collation_connnection_2);
+
+ /*
+ Check that
+ 1) character set has been switched and
+ 2) new character set is different from the original one.
+ */
+
+ DIE_UNLESS(strcmp(character_set_name_2, "utf8") == 0);
+ DIE_UNLESS(strcmp(character_set_client_2, "utf8") == 0);
+ DIE_UNLESS(strcmp(character_set_results_2, "utf8") == 0);
+ DIE_UNLESS(strcmp(collation_connnection_2, "utf8_general_ci") == 0);
+
+ DIE_UNLESS(strcmp(character_set_name_1, character_set_name_2) != 0);
+ DIE_UNLESS(strcmp(character_set_client_1, character_set_client_2) != 0);
+ DIE_UNLESS(strcmp(character_set_results_1, character_set_results_2) != 0);
+ DIE_UNLESS(strcmp(collation_connnection_1, collation_connnection_2) != 0);
+
+ /* Call mysql_change_user() with the same username, password, database. */
+
+ DIE_IF(mysql_change_user(&con,
+ opt_user,
+ opt_password,
+ opt_db ? opt_db : "test"));
+
+ /* Retrieve character set information. */
+
+ bug30472_retrieve_charset_info(&con,
+ character_set_name_3,
+ character_set_client_3,
+ character_set_results_3,
+ collation_connnection_3);
+
+ /* Check that character set information has been reset. */
+
+ DIE_UNLESS(strcmp(character_set_name_1, character_set_name_3) == 0);
+ DIE_UNLESS(strcmp(character_set_client_1, character_set_client_3) == 0);
+ DIE_UNLESS(strcmp(character_set_results_1, character_set_results_3) == 0);
+ DIE_UNLESS(strcmp(collation_connnection_1, collation_connnection_3) == 0);
+
+ /* Change connection-default character set in the client. */
+
+ con.options.charset_name= my_strdup("utf8", MYF(MY_FAE));
+
+ /*
+ Call mysql_change_user() in order to check that new connection will
+ have UTF8 character set on the client and on the server.
+ */
+
+ DIE_IF(mysql_change_user(&con,
+ opt_user,
+ opt_password,
+ opt_db ? opt_db : "test"));
+
+ /* Retrieve character set information. */
+
+ bug30472_retrieve_charset_info(&con,
+ character_set_name_4,
+ character_set_client_4,
+ character_set_results_4,
+ collation_connnection_4);
+
+ /* Check that we have UTF8 on the server and on the client. */
+
+ DIE_UNLESS(strcmp(character_set_name_4, "utf8") == 0);
+ DIE_UNLESS(strcmp(character_set_client_4, "utf8") == 0);
+ DIE_UNLESS(strcmp(character_set_results_4, "utf8") == 0);
+ DIE_UNLESS(strcmp(collation_connnection_4, "utf8_general_ci") == 0);
+
+ /* That's it. Cleanup. */
+
+ mysql_close(&con);
+}
+
+static void bug20023_change_user(MYSQL *con)
+{
+ DIE_IF(mysql_change_user(con,
+ opt_user,
+ opt_password,
+ opt_db ? opt_db : "test"));
+}
+
+static bool query_int_variable(MYSQL *con,
+ const char *var_name,
+ int *var_value)
+{
+ MYSQL_RES *rs;
+ MYSQL_ROW row;
+
+ char query_buffer[MAX_TEST_QUERY_LENGTH];
+
+ bool is_null;
+
+ my_snprintf(query_buffer,
+ sizeof (query_buffer),
+ "SELECT %s",
+ (const char *) var_name);
+
+ DIE_IF(mysql_query(con, query_buffer));
+ DIE_UNLESS(rs= mysql_store_result(con));
+ DIE_UNLESS(row= mysql_fetch_row(rs));
+
+ is_null= row[0] == NULL;
+
+ if (!is_null)
+ *var_value= atoi(row[0]);
+
+ mysql_free_result(rs);
+
+ return is_null;
+}
+
+static void test_bug20023()
+{
+ MYSQL con;
+
+ int sql_big_selects_orig;
+ int max_join_size_orig;
+
+ int sql_big_selects_2;
+ int sql_big_selects_3;
+ int sql_big_selects_4;
+ int sql_big_selects_5;
+
+#if NOT_USED
+ char query_buffer[MAX_TEST_QUERY_LENGTH];
+#endif
+
+ /* Create a new connection. */
+
+ DIE_UNLESS(mysql_init(&con));
+
+ DIE_UNLESS(mysql_real_connect(&con,
+ opt_host,
+ opt_user,
+ opt_password,
+ opt_db ? opt_db : "test",
+ opt_port,
+ opt_unix_socket,
+ CLIENT_FOUND_ROWS));
+
+ /***********************************************************************
+ Remember original SQL_BIG_SELECTS, MAX_JOIN_SIZE values.
+ ***********************************************************************/
+
+ query_int_variable(&con,
+ "@@session.sql_big_selects",
+ &sql_big_selects_orig);
+
+ query_int_variable(&con,
+ "@@global.max_join_size",
+ &max_join_size_orig);
+
+ /***********************************************************************
+ Test that COM_CHANGE_USER resets the SQL_BIG_SELECTS to the initial value.
+ ***********************************************************************/
+
+ /* Issue COM_CHANGE_USER. */
+
+ bug20023_change_user(&con);
+
+ /* Query SQL_BIG_SELECTS. */
+
+ query_int_variable(&con,
+ "@@session.sql_big_selects",
+ &sql_big_selects_2);
+
+ /* Check that SQL_BIG_SELECTS is reset properly. */
+
+ DIE_UNLESS(sql_big_selects_orig == sql_big_selects_2);
+
+ /***********************************************************************
+ Test that if MAX_JOIN_SIZE set to non-default value,
+ SQL_BIG_SELECTS will be 0.
+ ***********************************************************************/
+
+ /* Set MAX_JOIN_SIZE to some non-default value. */
+
+ DIE_IF(mysql_query(&con, "SET @@global.max_join_size = 10000"));
+ DIE_IF(mysql_query(&con, "SET @@session.max_join_size = default"));
+
+ /* Issue COM_CHANGE_USER. */
+
+ bug20023_change_user(&con);
+
+ /* Query SQL_BIG_SELECTS. */
+
+ query_int_variable(&con,
+ "@@session.sql_big_selects",
+ &sql_big_selects_3);
+
+ /* Check that SQL_BIG_SELECTS is 0. */
+
+ DIE_UNLESS(sql_big_selects_3 == 0);
+
+ /***********************************************************************
+ Test that if MAX_JOIN_SIZE set to default value,
+ SQL_BIG_SELECTS will be 1.
+ ***********************************************************************/
+
+ /* Set MAX_JOIN_SIZE to the default value (-1). */
+
+ DIE_IF(mysql_query(&con, "SET @@global.max_join_size = -1"));
+ DIE_IF(mysql_query(&con, "SET @@session.max_join_size = default"));
+
+ /* Issue COM_CHANGE_USER. */
+
+ bug20023_change_user(&con);
+
+ /* Query SQL_BIG_SELECTS. */
+
+ query_int_variable(&con,
+ "@@session.sql_big_selects",
+ &sql_big_selects_4);
+
+ /* Check that SQL_BIG_SELECTS is 1. */
+
+ DIE_UNLESS(sql_big_selects_4 == 1);
+
+ /***********************************************************************
+ Restore MAX_JOIN_SIZE.
+ Check that SQL_BIG_SELECTS will be the original one.
+ ***********************************************************************/
+
+#if NOT_USED
+ /*
+ max_join_size is a ulong or better.
+ my_snprintf() only goes up to ul.
+ */
+
+ /* Restore MAX_JOIN_SIZE. */
+
+ my_snprintf(query_buffer,
+ sizeof (query_buffer),
+ "SET @@global.max_join_size = %d",
+ (int) max_join_size_orig);
+
+ DIE_IF(mysql_query(&con, query_buffer));
+
+#else
+ DIE_IF(mysql_query(&con, "SET @@global.max_join_size = -1"));
+#endif
+
+ DIE_IF(mysql_query(&con, "SET @@session.max_join_size = default"));
+
+ /* Issue COM_CHANGE_USER. */
+
+ bug20023_change_user(&con);
+
+ /* Query SQL_BIG_SELECTS. */
+
+ query_int_variable(&con,
+ "@@session.sql_big_selects",
+ &sql_big_selects_5);
+
+ /* Check that SQL_BIG_SELECTS is 1. */
+
+ DIE_UNLESS(sql_big_selects_5 == sql_big_selects_orig);
+
+ /***********************************************************************
+ That's it. Cleanup.
+ ***********************************************************************/
+
+ mysql_close(&con);
+}
+
+static void bug31418_impl()
+{
+ MYSQL con;
+
+ bool is_null;
+ int rc;
+
+ /* Create a new connection. */
+
+ DIE_UNLESS(mysql_init(&con));
+
+ DIE_UNLESS(mysql_real_connect(&con,
+ opt_host,
+ opt_user,
+ opt_password,
+ opt_db ? opt_db : "test",
+ opt_port,
+ opt_unix_socket,
+ CLIENT_FOUND_ROWS));
+
+ /***********************************************************************
+ Check that lock is free:
+ - IS_FREE_LOCK() should return 1;
+ - IS_USED_LOCK() should return NULL;
+ ***********************************************************************/
+
+ is_null= query_int_variable(&con,
+ "IS_FREE_LOCK('bug31418')",
+ &rc);
+ DIE_UNLESS(!is_null && rc);
+
+ is_null= query_int_variable(&con,
+ "IS_USED_LOCK('bug31418')",
+ &rc);
+ DIE_UNLESS(is_null);
+
+ /***********************************************************************
+ Acquire lock and check the lock status (the lock must be in use):
+ - IS_FREE_LOCK() should return 0;
+ - IS_USED_LOCK() should return non-zero thread id;
+ ***********************************************************************/
+
+ query_int_variable(&con, "GET_LOCK('bug31418', 1)", &rc);
+ DIE_UNLESS(rc);
+
+ is_null= query_int_variable(&con,
+ "IS_FREE_LOCK('bug31418')",
+ &rc);
+ DIE_UNLESS(!is_null && !rc);
+
+ is_null= query_int_variable(&con,
+ "IS_USED_LOCK('bug31418')",
+ &rc);
+ DIE_UNLESS(!is_null && rc);
+
+ /***********************************************************************
+ Issue COM_CHANGE_USER command and check the lock status
+ (the lock must be free):
+ - IS_FREE_LOCK() should return 1;
+ - IS_USED_LOCK() should return NULL;
+ **********************************************************************/
+
+ bug20023_change_user(&con);
+
+ is_null= query_int_variable(&con,
+ "IS_FREE_LOCK('bug31418')",
+ &rc);
+ DIE_UNLESS(!is_null && rc);
+
+ is_null= query_int_variable(&con,
+ "IS_USED_LOCK('bug31418')",
+ &rc);
+ DIE_UNLESS(is_null);
+
+ /***********************************************************************
+ That's it. Cleanup.
+ ***********************************************************************/
+
+ mysql_close(&con);
+}
+
+static void test_bug31418()
+{
+ /* Run test case for BUG#31418 for three different connections. */
+
+ bug31418_impl();
+
+ bug31418_impl();
+
+ bug31418_impl();
+}
+
+
+
+/**
+ Bug#31669 Buffer overflow in mysql_change_user()
+*/
+
+#define LARGE_BUFFER_SIZE 2048
+
+static void test_bug31669()
+{
+ int rc;
+ static char buff[LARGE_BUFFER_SIZE+1];
+#ifndef EMBEDDED_LIBRARY
+ static char user[USERNAME_CHAR_LENGTH+1];
+ static char db[NAME_CHAR_LEN+1];
+ static char query[LARGE_BUFFER_SIZE*2];
+#endif
+
+ DBUG_ENTER("test_bug31669");
+ myheader("test_bug31669");
+
+ rc= mysql_change_user(mysql, NULL, NULL, NULL);
+ DIE_UNLESS(rc);
+
+ rc= mysql_change_user(mysql, "", "", "");
+ DIE_UNLESS(rc);
+
+ memset(buff, 'a', sizeof(buff));
+
+ rc= mysql_change_user(mysql, buff, buff, buff);
+ DIE_UNLESS(rc);
+
+ rc = mysql_change_user(mysql, opt_user, opt_password, current_db);
+ DIE_UNLESS(!rc);
+
+#ifndef EMBEDDED_LIBRARY
+ memset(db, 'a', sizeof(db));
+ db[NAME_CHAR_LEN]= 0;
+ strxmov(query, "CREATE DATABASE IF NOT EXISTS ", db, NullS);
+ rc= mysql_query(mysql, query);
+ myquery(rc);
+
+ memset(user, 'b', sizeof(user));
+ user[USERNAME_CHAR_LENGTH]= 0;
+ memset(buff, 'c', sizeof(buff));
+ buff[LARGE_BUFFER_SIZE]= 0;
+ strxmov(query, "GRANT ALL PRIVILEGES ON *.* TO '", user, "'@'%' IDENTIFIED BY "
+ "'", buff, "' WITH GRANT OPTION", NullS);
+ rc= mysql_query(mysql, query);
+ myquery(rc);
+
+ rc= mysql_query(mysql, "FLUSH PRIVILEGES");
+ myquery(rc);
+
+ rc= mysql_change_user(mysql, user, buff, db);
+ DIE_UNLESS(!rc);
+
+ user[USERNAME_CHAR_LENGTH-1]= 'a';
+ rc= mysql_change_user(mysql, user, buff, db);
+ DIE_UNLESS(rc);
+
+ user[USERNAME_CHAR_LENGTH-1]= 'b';
+ buff[LARGE_BUFFER_SIZE-1]= 'd';
+ rc= mysql_change_user(mysql, user, buff, db);
+ DIE_UNLESS(rc);
+
+ buff[LARGE_BUFFER_SIZE-1]= 'c';
+ db[NAME_CHAR_LEN-1]= 'e';
+ rc= mysql_change_user(mysql, user, buff, db);
+ DIE_UNLESS(rc);
+
+ db[NAME_CHAR_LEN-1]= 'a';
+ rc= mysql_change_user(mysql, user, buff, db);
+ DIE_UNLESS(!rc);
+
+ rc= mysql_change_user(mysql, user + 1, buff + 1, db + 1);
+ DIE_UNLESS(rc);
+
+ rc = mysql_change_user(mysql, opt_user, opt_password, current_db);
+ DIE_UNLESS(!rc);
+
+ strxmov(query, "DROP DATABASE ", db, NullS);
+ rc= mysql_query(mysql, query);
+ myquery(rc);
+
+ strxmov(query, "DELETE FROM mysql.user WHERE User='", user, "'", NullS);
+ rc= mysql_query(mysql, query);
+ myquery(rc);
+ DIE_UNLESS(mysql_affected_rows(mysql) == 1);
+#endif
+
+ DBUG_VOID_RETURN;
+}
+
+/*
Read and parse arguments and MySQL options from my.cnf
*/
@@ -16475,7 +17255,13 @@ static struct my_option client_test_long_options[] =
{"password", 'p',
"Password to use when connecting to server. If password is not given it's asked from the tty.",
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
- {"port", 'P', "Port number to use for connection", (uchar **) &opt_port,
+ {"port", 'P', "Port number to use for connection or 0 for default to, in "
+ "order of preference, my.cnf, $MYSQL_TCP_PORT, "
+#if MYSQL_PORT_DEFAULT == 0
+ "/etc/services, "
+#endif
+ "built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
+ (uchar **) &opt_port,
(uchar **) &opt_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"server-arg", 'A', "Send embedded server this as a parameter.",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@@ -16744,6 +17530,11 @@ static struct my_tests_st my_tests[]= {
{ "test_bug29687", test_bug29687 },
{ "test_bug29692", test_bug29692 },
{ "test_bug29306", test_bug29306 },
+ { "test_change_user", test_change_user },
+ { "test_bug30472", test_bug30472 },
+ { "test_bug20023", test_bug20023 },
+ { "test_bug31418", test_bug31418 },
+ { "test_bug31669", test_bug31669 },
{ 0, 0 }
};
diff --git a/tests/ssl_test.c b/tests/ssl_test.c
index 136f0a83cbe..ad6bc925cc6 100644
--- a/tests/ssl_test.c
+++ b/tests/ssl_test.c
@@ -44,7 +44,7 @@ int main(int argc, char **argv)
"../SSL/MySQL-client-cert.pem",
"../SSL/MySQL-ca-cert.pem", 0, 0);
#endif
- if (!(sock = mysql_real_connect(&mysql,"127.0.0.1",0,0,argv[1],3306,NULL,0)))
+ if (!(sock = mysql_real_connect(&mysql,"127.0.0.1",0,0,argv[1],MYSQL_PORT,NULL,0)))
{
fprintf(stderr,"Couldn't connect to engine!\n%s\n\n",mysql_error(&mysql));
perror("");
diff --git a/tests/thread_test.c b/tests/thread_test.c
index b3a34447271..8e1c58ebbec 100644
--- a/tests/thread_test.c
+++ b/tests/thread_test.c
@@ -103,7 +103,13 @@ static struct my_option my_long_options[] =
(uchar**) &verbose, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"query", 'Q', "Query to execute in each threads", (uchar**) &query,
(uchar**) &query, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"port", 'P', "Port number to use for connection", (uchar**) &tcp_port,
+ {"port", 'P', "Port number to use for connection or 0 for default to, in "
+ "order of preference, my.cnf, $MYSQL_TCP_PORT, "
+#if MYSQL_PORT_DEFAULT == 0
+ "/etc/services, "
+#endif
+ "built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
+ (uchar**) &tcp_port,
(uchar**) &tcp_port, 0, GET_UINT, REQUIRED_ARG, MYSQL_PORT, 0, 0, 0, 0, 0},
{"socket", 'S', "Socket file to use for connection", (uchar**) &unix_socket,
(uchar**) &unix_socket, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
diff --git a/win/configure.js b/win/configure.js
index 7e10ac34697..c86ec0cf47c 100644
--- a/win/configure.js
+++ b/win/configure.js
@@ -31,6 +31,7 @@ try
configureInTS.Close();
var default_comment = "Source distribution";
var default_port = GetValue(configureIn, "MYSQL_TCP_PORT_DEFAULT");
+ var actual_port = 0;
var configfile = fso.CreateTextFile("win\\configure.data", true);
for (i=0; i < args.Count(); i++)
@@ -59,10 +60,41 @@ try
default_comment = parts[1];
break;
case "MYSQL_TCP_PORT":
- default_port = parts[1];
+ actual_port = parts[1];
break;
}
}
+ if (actual_port == 0)
+ {
+ // if we actually defaulted (as opposed to the pathological case of
+ // --with-tcp-port=<MYSQL_TCP_PORT_DEFAULT> which might in theory
+ // happen if whole batch of servers was built from a script), set
+ // the default to zero to indicate that; we don't lose information
+ // that way, because 0 obviously indicates that we can get the
+ // default value from MYSQL_TCP_PORT. this seems really evil, but
+ // testing for MYSQL_TCP_PORT==MYSQL_TCP_PORT_DEFAULT would make a
+ // a port of MYSQL_TCP_PORT_DEFAULT magic even if the builder did not
+ // intend it to mean "use the default, in fact, look up a good default
+ // from /etc/services if you can", but really, really meant 3306 when
+ // they passed in 3306. When they pass in a specific value, let them
+ // have it; don't second guess user and think we know better, this will
+ // just make people cross. this makes the the logic work like this
+ // (which is complicated enough):
+ //
+ // - if a port was set during build, use that as a default.
+ //
+ // - otherwise, try to look up a port in /etc/services; if that fails,
+ // use MYSQL_TCP_PORT_DEFAULT (at the time of this writing 3306)
+ //
+ // - allow the MYSQL_TCP_PORT environment variable to override that.
+ //
+ // - allow command-line parameters to override all of the above.
+ //
+ // the top-most MYSQL_TCP_PORT_DEFAULT is read from win/configure.js,
+ // so don't mess with that.
+ actual_port = default_port;
+ default_port = 0;
+ }
configfile.WriteLine("SET (COMPILATION_COMMENT \"" +
default_comment + "\")");
@@ -71,7 +103,8 @@ try
GetValue(configureIn, "PROTOCOL_VERSION") + "\")");
configfile.WriteLine("SET (DOT_FRM_VERSION \"" +
GetValue(configureIn, "DOT_FRM_VERSION") + "\")");
- configfile.WriteLine("SET (MYSQL_TCP_PORT \"" + default_port + "\")");
+ configfile.WriteLine("SET (MYSQL_TCP_PORT_DEFAULT \"" + default_port + "\")");
+ configfile.WriteLine("SET (MYSQL_TCP_PORT \"" + actual_port + "\")");
configfile.WriteLine("SET (MYSQL_UNIX_ADDR \"" +
GetValue(configureIn, "MYSQL_UNIX_ADDR_DEFAULT") + "\")");
var version = GetVersion(configureIn);