summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.bzrignore1
-rwxr-xr-xBUILD/autorun.sh23
-rwxr-xr-xBUILD/compile-dist11
-rwxr-xr-xBitKeeper/triggers/pre-commit.check-case.pl26
-rwxr-xr-xCMakeLists.txt17
-rw-r--r--Makefile.am20
-rw-r--r--client/client_priv.h3
-rw-r--r--client/mysql.cc11
-rw-r--r--client/mysql_upgrade.c13
-rw-r--r--client/mysqladmin.cc8
-rw-r--r--client/mysqlbinlog.cc11
-rw-r--r--client/mysqlcheck.c8
-rw-r--r--client/mysqldump.c32
-rw-r--r--client/mysqlimport.c8
-rw-r--r--client/mysqlshow.c8
-rw-r--r--client/mysqlslap.c18
-rw-r--r--client/mysqltest.c95
-rw-r--r--cmd-line-utils/libedit/Makefile.am12
-rw-r--r--config/ac-macros/large_file.m411
-rw-r--r--config/ac-macros/plugins.m411
-rw-r--r--configure.in52
-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_getopt.h1
-rw-r--r--include/my_global.h9
-rw-r--r--include/my_pthread.h9
-rw-r--r--include/mysql_com.h2
-rw-r--r--include/mysql_h.ic2
-rw-r--r--include/mysql_version.h.in1
-rw-r--r--include/sql_common.h6
-rw-r--r--libmysql/libmysql.c194
-rw-r--r--libmysqld/lib_sql.cc26
-rw-r--r--mysql-test/Makefile.am1
-rw-r--r--mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test840
-rw-r--r--mysql-test/extra/rpl_tests/rpl_row_charset.test6
-rw-r--r--mysql-test/include/ctype_common.inc9
-rw-r--r--mysql-test/include/gis_keys.inc46
-rw-r--r--mysql-test/include/handler.inc194
-rw-r--r--mysql-test/include/mix1.inc173
-rw-r--r--mysql-test/include/windows.inc9
-rw-r--r--mysql-test/lib/mtr_cases.pl187
-rw-r--r--mysql-test/lib/mtr_report.pl2
-rw-r--r--mysql-test/mysql-test-run-shell.sh13
-rwxr-xr-xmysql-test/mysql-test-run.pl31
-rw-r--r--mysql-test/r/archive.result9
-rw-r--r--mysql-test/r/change_user.result46
-rw-r--r--mysql-test/r/compress.result4
-rw-r--r--mysql-test/r/create.result2
-rw-r--r--mysql-test/r/csv.result106
-rw-r--r--mysql-test/r/ctype_big5.result13
-rw-r--r--mysql-test/r/ctype_euckr.result13
-rw-r--r--mysql-test/r/ctype_gb2312.result13
-rw-r--r--mysql-test/r/ctype_gbk.result13
-rw-r--r--mysql-test/r/ctype_uca.result13
-rw-r--r--mysql-test/r/ctype_ucs.result9
-rw-r--r--mysql-test/r/ctype_utf8.result42
-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/delete.result8
-rw-r--r--mysql-test/r/derived.result3
-rw-r--r--mysql-test/r/events_bugs.result107
-rw-r--r--mysql-test/r/federated_server.result10
-rw-r--r--mysql-test/r/fulltext.result6
-rw-r--r--mysql-test/r/func_gconcat.result42
-rw-r--r--mysql-test/r/func_group.result10
-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.result22
-rw-r--r--mysql-test/r/func_regexp.result5
-rw-r--r--mysql-test/r/func_sapdb.result5
-rw-r--r--mysql-test/r/func_str.result12
-rw-r--r--mysql-test/r/func_time.result9
-rw-r--r--mysql-test/r/gis-rtree.result35
-rw-r--r--mysql-test/r/gis.result45
-rw-r--r--mysql-test/r/grant.result3
-rw-r--r--mysql-test/r/grant2.result18
-rw-r--r--mysql-test/r/grant3.result122
-rw-r--r--mysql-test/r/group_by.result150
-rw-r--r--mysql-test/r/group_min_max.result3
-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/information_schema.result74
-rw-r--r--mysql-test/r/innodb_gis.result39
-rw-r--r--mysql-test/r/innodb_mysql.result115
-rw-r--r--mysql-test/r/insert_select.result12
-rw-r--r--mysql-test/r/join.result164
-rw-r--r--mysql-test/r/key.result29
-rw-r--r--mysql-test/r/kill.result9
-rw-r--r--mysql-test/r/log_tables.result315
-rw-r--r--mysql-test/r/merge.result5
-rw-r--r--mysql-test/r/myisam.result25
-rw-r--r--mysql-test/r/mysqlbinlog.result23
-rw-r--r--mysql-test/r/mysqldump.result22
-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.result11
-rw-r--r--mysql-test/r/order_by.result285
-rw-r--r--mysql-test/r/partition.result90
-rw-r--r--mysql-test/r/partition_archive.result13
-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.result3
-rw-r--r--mysql-test/r/partition_innodb.result7
-rw-r--r--mysql-test/r/partition_mgm.result10
-rw-r--r--mysql-test/r/partition_symlink.result83
-rw-r--r--mysql-test/r/ps.result17
-rw-r--r--mysql-test/r/ps_2myisam.result3
-rw-r--r--mysql-test/r/ps_3innodb.result3
-rw-r--r--mysql-test/r/ps_4heap.result3
-rw-r--r--mysql-test/r/ps_5merge.result6
-rw-r--r--mysql-test/r/query_cache.result44
-rw-r--r--mysql-test/r/query_cache_notembedded.result33
-rw-r--r--mysql-test/r/repair.result27
-rw-r--r--mysql-test/r/select.result39
-rw-r--r--mysql-test/r/shm.result2155
-rw-r--r--mysql-test/r/sp-error.result94
-rw-r--r--mysql-test/r/sp.result243
-rw-r--r--mysql-test/r/ssl.result4
-rw-r--r--mysql-test/r/ssl_compress.result4
-rw-r--r--mysql-test/r/symlink.result6
-rw-r--r--mysql-test/r/system_mysql_db.result20
-rw-r--r--mysql-test/r/type_date.result79
-rw-r--r--mysql-test/r/type_datetime.result79
-rw-r--r--mysql-test/r/type_decimal.result14
-rw-r--r--mysql-test/r/type_float.result16
-rw-r--r--mysql-test/r/udf.result25
-rw-r--r--mysql-test/r/variables.result5
-rw-r--r--mysql-test/r/view.result66
-rw-r--r--mysql-test/r/view_grant.result53
-rw-r--r--mysql-test/r/windows_shm.result2
-rw-r--r--mysql-test/r/xml.result11
-rw-r--r--mysql-test/suite/funcs_1/datadict/datadict_priv.inc5
-rw-r--r--mysql-test/suite/funcs_1/r/a_processlist_priv_no_prot.result4
-rw-r--r--mysql-test/suite/funcs_1/r/b_processlist_priv_ps.result4
-rw-r--r--mysql-test/suite/funcs_1/r/innodb__datadict.result340
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_trig_03e.result2
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_views.result274
-rw-r--r--mysql-test/suite/funcs_1/r/memory__datadict.result340
-rw-r--r--mysql-test/suite/funcs_1/r/memory_trig_03e.result2
-rw-r--r--mysql-test/suite/funcs_1/r/memory_views.result274
-rw-r--r--mysql-test/suite/funcs_1/r/myisam__datadict.result340
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_trig_03e.result2
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_views.result274
-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.result318
-rw-r--r--mysql-test/suite/funcs_1/t/disabled.def1
-rw-r--r--mysql-test/suite/funcs_1/views/views_master.inc584
-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/ndb/r/ndb_condition_pushdown.result22
-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_update.result8
-rw-r--r--mysql-test/suite/ndb/r/ndb_update_no_read.result75
-rw-r--r--mysql-test/suite/ndb/r/ps_7ndb.result3
-rw-r--r--mysql-test/suite/ndb/t/disabled.def3
-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/parts/inc/partition.pre18
-rw-r--r--mysql-test/suite/parts/inc/partition_alter_1.inc20
-rw-r--r--mysql-test/suite/parts/inc/partition_check.inc20
-rw-r--r--mysql-test/suite/parts/inc/partition_syntax.inc38
-rw-r--r--mysql-test/suite/parts/inc/partition_syntax_1.inc28
-rw-r--r--mysql-test/suite/parts/r/partition_alter1_innodb.result5
-rw-r--r--mysql-test/suite/parts/r/partition_alter1_myisam.result5
-rw-r--r--mysql-test/suite/parts/r/partition_alter2_innodb.result5
-rw-r--r--mysql-test/suite/parts/r/partition_alter2_myisam.result5
-rw-r--r--mysql-test/suite/parts/r/partition_alter3_innodb.result5
-rw-r--r--mysql-test/suite/parts/r/partition_alter3_myisam.result5
-rw-r--r--mysql-test/suite/parts/r/partition_alter4_innodb.result5
-rw-r--r--mysql-test/suite/parts/r/partition_alter4_myisam.result5
-rw-r--r--mysql-test/suite/parts/r/partition_basic_innodb.result5
-rw-r--r--mysql-test/suite/parts/r/partition_basic_myisam.result5
-rw-r--r--mysql-test/suite/parts/r/partition_engine_innodb.result5
-rw-r--r--mysql-test/suite/parts/r/partition_engine_myisam.result5
-rw-r--r--mysql-test/suite/parts/r/partition_syntax_innodb.result5
-rw-r--r--mysql-test/suite/parts/r/partition_syntax_myisam.result5
-rw-r--r--mysql-test/suite/rpl/include/rpl_mixed_dml.inc2
-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_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_extraColmaster_ndb.resultbin19129 -> 0 bytes
-rw-r--r--mysql-test/suite/rpl/t/disabled.def4
-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_innodb_bug28430.test1
-rw-r--r--mysql-test/suite/rpl/t/rpl_innodb_bug30919.test1
-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.test9
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_extraColmaster_ndb.test12
-rw-r--r--mysql-test/suite/rpl/t/rpl_stm_extraColmaster_ndb.test13
-rw-r--r--mysql-test/suite/rpl_ndb/r/rpl_ndb_charset.result34
-rw-r--r--mysql-test/suite/rpl_ndb/r/rpl_ndb_extraColMaster.result2286
-rw-r--r--mysql-test/suite/rpl_ndb/t/disabled.def6
-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/archive.test14
-rw-r--r--mysql-test/t/change_user.test35
-rw-r--r--mysql-test/t/csv.test87
-rw-r--r--mysql-test/t/ctype_ucs.test13
-rw-r--r--mysql-test/t/ctype_utf8.test27
-rw-r--r--mysql-test/t/delete.test15
-rw-r--r--mysql-test/t/derived.test3
-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/federated_server.test14
-rw-r--r--mysql-test/t/fulltext.test8
-rw-r--r--mysql-test/t/func_gconcat.test28
-rw-r--r--mysql-test/t/func_group.test13
-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.test15
-rw-r--r--mysql-test/t/func_regexp.test11
-rw-r--r--mysql-test/t/func_sapdb.test1
-rw-r--r--mysql-test/t/func_str.test12
-rw-r--r--mysql-test/t/func_time.test10
-rw-r--r--mysql-test/t/gis-rtree.test36
-rw-r--r--mysql-test/t/gis.test10
-rw-r--r--mysql-test/t/grant.test3
-rw-r--r--mysql-test/t/grant2.test32
-rw-r--r--mysql-test/t/grant3.test100
-rw-r--r--mysql-test/t/group_by.test1
-rw-r--r--mysql-test/t/group_min_max.test1
-rw-r--r--mysql-test/t/heap_btree.test18
-rw-r--r--mysql-test/t/information_schema.test57
-rw-r--r--mysql-test/t/innodb_gis.test1
-rw-r--r--mysql-test/t/insert_select.test12
-rw-r--r--mysql-test/t/join.test29
-rw-r--r--mysql-test/t/key.test40
-rw-r--r--mysql-test/t/kill.test16
-rw-r--r--mysql-test/t/log_tables.test191
-rw-r--r--mysql-test/t/merge.test14
-rw-r--r--mysql-test/t/myisam.test27
-rw-r--r--mysql-test/t/mysqlbinlog.test28
-rw-r--r--mysql-test/t/mysqldump.test17
-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.test9
-rw-r--r--mysql-test/t/order_by.test57
-rw-r--r--mysql-test/t/partition.test169
-rw-r--r--mysql-test/t/partition_archive.test32
-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.test10
-rw-r--r--mysql-test/t/partition_innodb.test8
-rw-r--r--mysql-test/t/partition_mgm.test19
-rw-r--r--mysql-test/t/partition_symlink.test121
-rw-r--r--mysql-test/t/ps.test34
-rw-r--r--mysql-test/t/query_cache.test69
-rw-r--r--mysql-test/t/query_cache_notembedded.test36
-rw-r--r--mysql-test/t/repair.test31
-rw-r--r--mysql-test/t/select.test48
-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/sp-error.test139
-rw-r--r--mysql-test/t/sp.test391
-rw-r--r--mysql-test/t/sp_notembedded.test23
-rw-r--r--mysql-test/t/symlink.test12
-rw-r--r--mysql-test/t/type_date.test55
-rw-r--r--mysql-test/t/type_datetime.test56
-rw-r--r--mysql-test/t/type_decimal.test21
-rw-r--r--mysql-test/t/type_float.test16
-rw-r--r--mysql-test/t/udf.test33
-rw-r--r--mysql-test/t/upgrade.test6
-rw-r--r--mysql-test/t/variables.test10
-rw-r--r--mysql-test/t/view.test57
-rw-r--r--mysql-test/t/view_grant.test50
-rw-r--r--mysql-test/t/windows_shm.test9
-rw-r--r--mysql-test/t/xml.test11
-rw-r--r--mysys/my_getopt.c62
-rw-r--r--mysys/my_init.c2
-rw-r--r--mysys/my_symlink2.c11
-rw-r--r--mysys/my_winthread.c23
-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
-rw-r--r--scripts/mysql_config.sh7
-rw-r--r--scripts/mysql_fix_privilege_tables.sh1
-rw-r--r--scripts/mysql_system_tables.sql6
-rw-r--r--scripts/mysql_system_tables_data.sql3
-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.c254
-rwxr-xr-xsql/CMakeLists.txt2
-rw-r--r--sql/event_data_objects.cc16
-rw-r--r--sql/event_db_repository.cc9
-rw-r--r--sql/event_scheduler.cc8
-rw-r--r--sql/events.cc19
-rw-r--r--sql/field.cc70
-rw-r--r--sql/field.h1
-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.cc5
-rw-r--r--sql/ha_ndbcluster_cond.cc20
-rw-r--r--sql/ha_partition.cc62
-rw-r--r--sql/handler.cc124
-rw-r--r--sql/item.cc77
-rw-r--r--sql/item.h10
-rw-r--r--sql/item_cmpfunc.cc58
-rw-r--r--sql/item_cmpfunc.h9
-rw-r--r--sql/item_create.cc19
-rw-r--r--sql/item_func.cc38
-rw-r--r--sql/item_func.h8
-rw-r--r--sql/item_geofunc.cc18
-rw-r--r--sql/item_geofunc.h7
-rw-r--r--sql/item_strfunc.cc95
-rw-r--r--sql/item_strfunc.h3
-rw-r--r--sql/item_subselect.cc2
-rw-r--r--sql/item_sum.cc40
-rw-r--r--sql/item_timefunc.cc5
-rw-r--r--sql/item_timefunc.h11
-rw-r--r--sql/item_xmlfunc.cc3
-rw-r--r--sql/log.cc204
-rw-r--r--sql/log.h4
-rw-r--r--sql/log_event.cc56
-rw-r--r--sql/log_event_old.cc12
-rw-r--r--sql/my_decimal.cc43
-rw-r--r--sql/mysql_priv.h26
-rw-r--r--sql/mysqld.cc48
-rw-r--r--sql/net_serv.cc2
-rw-r--r--sql/opt_range.cc12
-rw-r--r--sql/protocol.cc125
-rw-r--r--sql/protocol.h1
-rw-r--r--sql/scheduler.h2
-rw-r--r--sql/set_var.cc19
-rw-r--r--sql/share/errmsg.txt9
-rw-r--r--sql/slave.cc9
-rw-r--r--sql/sp.cc146
-rw-r--r--sql/sp.h1
-rw-r--r--sql/sp_head.cc50
-rw-r--r--sql/sp_head.h11
-rw-r--r--sql/sql_acl.cc150
-rw-r--r--sql/sql_acl.h5
-rw-r--r--sql/sql_base.cc194
-rw-r--r--sql/sql_binlog.cc3
-rw-r--r--sql/sql_cache.cc2
-rw-r--r--sql/sql_class.cc86
-rw-r--r--sql/sql_class.h40
-rw-r--r--sql/sql_connect.cc248
-rw-r--r--sql/sql_delete.cc27
-rw-r--r--sql/sql_error.cc2
-rw-r--r--sql/sql_handler.cc324
-rw-r--r--sql/sql_insert.cc46
-rw-r--r--sql/sql_lex.cc4
-rw-r--r--sql/sql_lex.h13
-rw-r--r--sql/sql_parse.cc81
-rw-r--r--sql/sql_partition.cc28
-rw-r--r--sql/sql_plugin.cc14
-rw-r--r--sql/sql_prepare.cc15
-rw-r--r--sql/sql_rename.cc2
-rw-r--r--sql/sql_repl.cc3
-rw-r--r--sql/sql_select.cc137
-rw-r--r--sql/sql_select.h8
-rw-r--r--sql/sql_servers.cc5
-rw-r--r--sql/sql_show.cc75
-rw-r--r--sql/sql_table.cc46
-rw-r--r--sql/sql_udf.cc5
-rw-r--r--sql/sql_union.cc2
-rw-r--r--sql/sql_update.cc8
-rw-r--r--sql/sql_view.cc19
-rw-r--r--sql/sql_yacc.yy536
-rw-r--r--sql/table.cc13
-rw-r--r--sql/table.h22
-rw-r--r--sql/tztime.cc1
-rw-r--r--sql/udf_example.c4
-rw-r--r--sql/unireg.cc48
-rw-r--r--storage/csv/ha_tina.cc36
-rw-r--r--storage/federated/ha_federated.cc7
-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/myisam/mi_check.c224
-rw-r--r--storage/myisam/rt_index.c18
-rw-r--r--storage/myisam/rt_mbr.c5
-rw-r--r--storage/myisam/sort.c6
-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/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-euc_kr.c4
-rw-r--r--strings/ctype-gb2312.c4
-rw-r--r--strings/ctype-sjis.c4
-rw-r--r--strings/decimal.c3
-rw-r--r--tests/mysql_client_test.c404
-rw-r--r--tests/ssl_test.c2
-rw-r--r--tests/thread_test.c8
-rw-r--r--win/configure.js37
589 files changed, 24331 insertions, 16409 deletions
diff --git a/.bzrignore b/.bzrignore
index e1ad5a89015..c0bac9d05f1 100644
--- a/.bzrignore
+++ b/.bzrignore
@@ -3004,3 +3004,4 @@ win/vs71cache.txt
win/vs8cache.txt
zlib/*.ds?
zlib/*.vcproj
+libmysql_r/client_settings.h
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 2da2259a3f7..d9103e0a419 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..a06495021b3 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -135,6 +135,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 +193,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/Makefile.am b/Makefile.am
index f29764e4143..0125f37d44c 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
@@ -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,15 @@ test-binlog-statement:
cd mysql-test ; \
@PERL@ ./mysql-test-run.pl $(force) --mysqld=--binlog-format=statement
+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-unit test-ns test-pr
test-full: test test-nr test-ps
@@ -132,11 +140,7 @@ test-bt:
-cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --comment=NDB --force --timer \
--with-ndbcluster-only
- -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 ; \
- fi
+ -$(MAKE) test-embedded
-cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --force --comment=funcs1_ps --ps-protocol --suite=funcs_1
-cd mysql-test ; MTR_BUILD_THREAD=auto \
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..1dd33593b83 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -692,9 +692,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},
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 91fb7386916..b3b699f61fd 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 6d85e30c033..fb2071ce10f 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).",
diff --git a/client/mysqldump.c b/client/mysqldump.c
index 582e9e3b3b9..d504d177490 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,
@@ -424,6 +424,9 @@ static struct my_option my_long_options[] =
"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 +654,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);
}
@@ -1888,7 +1896,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 +4377,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 702eab0078f..04226719888 100644
--- a/client/mysqltest.c
+++ b/client/mysqltest.c
@@ -263,7 +263,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. */
@@ -352,6 +352,7 @@ const char *command_names[]=
"cat_file",
"diff_files",
"send_quit",
+ "change_user",
0
};
@@ -1563,10 +1564,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 */
@@ -3030,6 +3043,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
@@ -4946,7 +5022,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,
@@ -6836,6 +6918,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/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 e8693f1fa71..161a70dae5f 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
@@ -95,6 +95,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 +104,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 +344,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 +594,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 +681,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.
@@ -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.
@@ -2638,7 +2681,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 9d638c299d3..7f4292d18b1 100644
--- a/dbug/dbug.c
+++ b/dbug/dbug.c
@@ -1826,7 +1826,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("");
@@ -2231,23 +2237,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_getopt.h b/include/my_getopt.h
index c74f3ed672e..30c2eb9531a 100644
--- a/include/my_getopt.h
+++ b/include/my_getopt.h
@@ -68,6 +68,7 @@ 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,
diff --git a/include/my_global.h b/include/my_global.h
index 12129523939..ce76aeaec20 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -107,6 +107,11 @@
#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.
@@ -854,8 +859,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 eb390c2acc4..88abddc9e25 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))
@@ -472,7 +473,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);
-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,
@@ -495,12 +496,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__)
-#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/mysql_com.h b/include/mysql_com.h
index 5850d48fbf5..f76486b9ec2 100644
--- a/include/mysql_com.h
+++ b/include/mysql_com.h
@@ -203,7 +203,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
diff --git a/include/mysql_h.ic b/include/mysql_h.ic
index 8b1c36fdaab..12e16df878a 100644
--- a/include/mysql_h.ic
+++ b/include/mysql_h.ic
@@ -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;
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/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/libmysql.c b/libmysql/libmysql.c
index 4153bd773d5..cb326fa4685 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 */
@@ -688,7 +699,8 @@ int cli_read_change_user_result(MYSQL *mysql, char *buff, const char *passwd)
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;
@@ -710,7 +722,7 @@ my_bool STDCALL mysql_change_user(MYSQL *mysql, const char *user,
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])
@@ -730,7 +742,7 @@ 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. */
@@ -847,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);
}
@@ -874,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;
}
}
@@ -884,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;
}
@@ -1387,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;
@@ -1835,24 +1840,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)
@@ -1863,18 +1861,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);
@@ -1883,21 +1884,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;
}
@@ -2072,7 +2076,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);
}
@@ -2110,23 +2114,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);
}
@@ -2141,7 +2142,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;
@@ -2271,7 +2272,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);
}
@@ -2504,7 +2505,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);
@@ -2541,7 +2542,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);
@@ -2564,13 +2565,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);
}
@@ -2579,7 +2580,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);
@@ -2592,7 +2593,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);
}
/*
@@ -2615,7 +2616,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);
@@ -2679,20 +2680,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
@@ -2753,7 +2753,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))
@@ -2784,7 +2784,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;
}
@@ -2834,7 +2834,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;
}
@@ -3219,7 +3219,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);
@@ -3384,7 +3384,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);
}
@@ -3420,8 +3420,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);
}
}
@@ -3884,7 +3883,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;
}
}
@@ -4376,6 +4388,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;
@@ -4448,6 +4461,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:
@@ -4475,7 +4489,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);
}
@@ -4655,12 +4669,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);
}
@@ -4706,7 +4720,7 @@ int cli_read_binary_rows(MYSQL_STMT *stmt)
if (!mysql)
{
- set_stmt_error(stmt, CR_SERVER_LOST, unknown_sqlstate);
+ set_stmt_error(stmt, CR_SERVER_LOST, unknown_sqlstate, NULL);
DBUG_RETURN(1);
}
@@ -4721,7 +4735,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);
@@ -4742,7 +4756,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);
@@ -4809,7 +4823,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);
}
@@ -4829,13 +4843,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);
}
@@ -5016,8 +5030,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;
}
@@ -5090,8 +5103,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);
}
}
}
@@ -5112,7 +5124,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 */
@@ -5216,15 +5228,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/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc
index 9c26febe627..4963d7fc978 100644
--- a/libmysqld/lib_sql.cc
+++ b/libmysqld/lib_sql.cc
@@ -81,8 +81,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 +89,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 +111,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)
@@ -245,8 +245,7 @@ static my_bool emb_read_query_result(MYSQL *mysql)
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;
+ net_clear_error(&mysql->net);
mysql->info= 0;
if (res->embedded_info->info[0])
@@ -288,7 +287,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 +298,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 +317,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);
}
@@ -586,6 +581,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 */
diff --git a/mysql-test/Makefile.am b/mysql-test/Makefile.am
index eb31e9057cc..900ee14bd4e 100644
--- a/mysql-test/Makefile.am
+++ b/mysql-test/Makefile.am
@@ -154,6 +154,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/rpl_tests/rpl_extraMaster_Col.test b/mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test
index 26b1e6d5ba0..d3959d10306 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;
@@ -469,24 +413,33 @@ binary data';
select * from t31 order by f1;
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_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/include/ctype_common.inc b/mysql-test/include/ctype_common.inc
index 202c508a9c9..9ee0a40c8ce 100644
--- a/mysql-test/include/ctype_common.inc
+++ b/mysql-test/include/ctype_common.inc
@@ -51,6 +51,15 @@ 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
+#
+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;
+drop table t1;
+
DROP DATABASE d1;
# Restore settings
USE test;
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/mix1.inc b/mysql-test/include/mix1.inc
index aee5613ff35..7998baa6ccf 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
@@ -1019,6 +1020,55 @@ 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;
+
+###########################################################################
+
--echo End of 5.0 tests
# Fix for BUG#19243 "wrong LAST_INSERT_ID() after ON DUPLICATE KEY
@@ -1147,6 +1197,129 @@ 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
#
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..3d5752b4ec8 100644
--- a/mysql-test/lib/mtr_cases.pl
+++ b/mysql-test/lib/mtr_cases.pl
@@ -28,6 +28,26 @@ 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";
+ }
+ else {
+ # 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 +55,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 +71,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 +168,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,20 +214,17 @@ sub collect_one_suite($$)
mtr_verbose("Collecting: $suite");
- my $testdir;
- my $resdir;
-
- if ( $suite eq "main" )
- {
- $testdir= "$::glob_mysql_test_dir/t";
- $resdir= "$::glob_mysql_test_dir/r";
- }
- else
+ my $suitedir= "$::glob_mysql_test_dir"; # Default
+ if ( $suite ne "main" )
{
- $testdir= "$::glob_mysql_test_dir/suite/$suite/t";
- $resdir= "$::glob_mysql_test_dir/suite/$suite/r";
+ $suitedir= mtr_path_exists("$suitedir/suite/$suite",
+ "$suitedir/$suite");
+ mtr_verbose("suitedir: $suitedir");
}
+ my $testdir= "$suitedir/t";
+ my $resdir= "$suitedir/r";
+
# ----------------------------------------------------------------------
# Build a hash of disabled testcases for this suite
# ----------------------------------------------------------------------
@@ -192,77 +252,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.
+ my ($sname, $tname, $extension)= split_testname($test_name_spec);
- $tname = basename($tname);
+ # The test name parts have now been defined
+ #print " suite_name: $sname\n";
+ #print " tname: $tname\n";
+ #print " extension: $extension\n";
- # Get rid of suite part
- $tname =~ s/^$suite\.//;
+ # Check cirrect suite if suitename is defined
+ next if (defined $sname and $suite ne $sname);
- # 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") )
+ my $component_id;
+ if ( defined $extension )
{
- $elem= $tname;
- $tname =~ s/\.imtest$//;
- $component_id= 'im';
- }
-
- # If target component is known, check that the specified test case
- # exists.
- #
- # Otherwise, try to guess the target component.
-
- if ( $component_id )
- {
- 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 +326,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,
@@ -333,7 +370,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 +379,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 dcd7d1ec842..7cd6c1362b3 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)
{
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 7b6ddf70d53..f6ea5550007 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -1019,12 +1019,14 @@ sub command_line_setup () {
{
$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 )
@@ -1354,6 +1356,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
@@ -1364,7 +1367,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))
{
@@ -1419,7 +1422,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;
@@ -3743,6 +3746,20 @@ 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);
@@ -5039,7 +5056,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', $opt_valgrind_options);
mtr_add_arg($args, $$exe);
@@ -5112,14 +5129,18 @@ 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.
diff --git a/mysql-test/r/archive.result b/mysql-test/r/archive.result
index 36b013703d8..0a473a16771 100644
--- a/mysql-test/r/archive.result
+++ b/mysql-test/r/archive.result
@@ -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),
diff --git a/mysql-test/r/change_user.result b/mysql-test/r/change_user.result
new file mode 100644
index 00000000000..cb409621d56
--- /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
+-1
+change_user
+SELECT @@session.sql_big_selects;
+@@session.sql_big_selects
+1
+SELECT @@global.max_join_size;
+@@global.max_join_size
+-1
+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 e79a255967b..ca3b344af53 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
diff --git a/mysql-test/r/csv.result b/mysql-test/r/csv.result
index 86ba5002af8..69f77dc3cd8 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,62 @@ 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 HY000: Can't create table 'test.t1' (errno: -1)
+create table t1(a enum('foo','bar') default 'foo') engine=csv;
+ERROR HY000: Can't create table 'test.t1' (errno: -1)
+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;
End of 5.1 tests
diff --git a/mysql-test/r/ctype_big5.result b/mysql-test/r/ctype_big5.result
index 6d318a445f5..b190273cc64 100644
--- a/mysql-test/r/ctype_big5.result
+++ b/mysql-test/r/ctype_big5.result
@@ -52,6 +52,19 @@ 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
+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..b9619370d4c 100644
--- a/mysql-test/r/ctype_euckr.result
+++ b/mysql-test/r/ctype_euckr.result
@@ -52,6 +52,19 @@ 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
+drop table t1;
DROP DATABASE d1;
USE test;
SET character_set_server= @safe_character_set_server;
diff --git a/mysql-test/r/ctype_gb2312.result b/mysql-test/r/ctype_gb2312.result
index 314c336bab9..90c94c3b299 100644
--- a/mysql-test/r/ctype_gb2312.result
+++ b/mysql-test/r/ctype_gb2312.result
@@ -52,6 +52,19 @@ 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
+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..fe90c7bff29 100644
--- a/mysql-test/r/ctype_gbk.result
+++ b/mysql-test/r/ctype_gbk.result
@@ -52,6 +52,19 @@ 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
+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..e676d5a5ca0 100644
--- a/mysql-test/r/ctype_uca.result
+++ b/mysql-test/r/ctype_uca.result
@@ -2587,6 +2587,19 @@ 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
+drop table t1;
DROP DATABASE d1;
USE test;
SET character_set_server= @safe_character_set_server;
diff --git a/mysql-test/r/ctype_ucs.result b/mysql-test/r/ctype_ucs.result
index 1097486f185..59b1bfa183d 100644
--- a/mysql-test/r/ctype_ucs.result
+++ b/mysql-test/r/ctype_ucs.result
@@ -811,6 +811,12 @@ quote(name)
????????
????????????????
drop table bug20536;
+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 +928,7 @@ 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;
+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..8243b2bc015 100644
--- a/mysql-test/r/ctype_utf8.result
+++ b/mysql-test/r/ctype_utf8.result
@@ -1538,12 +1538,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 +1730,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/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/events_bugs.result b/mysql-test/r/events_bugs.result
index 3c9e6384c64..b0de2358777 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
@@ -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/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/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..7ae7806baea 100644
--- a/mysql-test/r/func_gconcat.result
+++ b/mysql-test/r/func_gconcat.result
@@ -825,4 +825,46 @@ 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;
End of 5.0 tests
diff --git a/mysql-test/r/func_group.result b/mysql-test/r/func_group.result
index fce01ffd171..ce29d25b736 100644
--- a/mysql-test/r/func_group.result
+++ b/mysql-test/r/func_group.result
@@ -1368,4 +1368,14 @@ 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;
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..aa75cde0525 100644
--- a/mysql-test/r/func_misc.result
+++ b/mysql-test/r/func_misc.result
@@ -190,6 +190,28 @@ 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
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..05e56f05457 100644
--- a/mysql-test/r/func_regexp.result
+++ b/mysql-test/r/func_regexp.result
@@ -98,3 +98,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_str.result b/mysql-test/r/func_str.result
index 6fbb9c811a7..78d86d3f342 100644
--- a/mysql-test/r/func_str.result
+++ b/mysql-test/r/func_str.result
@@ -726,7 +726,7 @@ t1 CREATE TABLE `t1` (
`oct(130)` varchar(64) NOT NULL DEFAULT '',
`conv(130,16,10)` varchar(64) NOT NULL DEFAULT '',
`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 '',
@@ -2486,4 +2486,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..a355d7929b5 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);
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..61394409947 100644
--- a/mysql-test/r/gis.result
+++ b/mysql-test/r/gis.result
@@ -736,6 +736,12 @@ 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;
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 +895,45 @@ 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
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..4e25ada43a0 100644
--- a/mysql-test/r/grant.result
+++ b/mysql-test/r/grant.result
@@ -1210,6 +1210,9 @@ 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 DATABASE db27878;
use test;
DROP TABLE t1;
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..7498267c91d 100644
--- a/mysql-test/r/group_by.result
+++ b/mysql-test/r/group_by.result
@@ -1093,10 +1093,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..a3744b36e87 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
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/information_schema.result b/mysql-test/r/information_schema.result
index 885acf5c744..7693fe628ef 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
@@ -1466,6 +1470,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 +1548,60 @@ 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
End of 5.1 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 3a6758b38f4..3f9e9b404f0 100644
--- a/mysql-test/r/innodb_mysql.result
+++ b/mysql-test/r/innodb_mysql.result
@@ -1,5 +1,6 @@
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,
@@ -1287,6 +1288,40 @@ a b
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;
End of 5.0 tests
CREATE TABLE `t2` (
`k` int(11) NOT NULL auto_increment,
@@ -1419,6 +1454,86 @@ 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;
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/key.result b/mysql-test/r/key.result
index a2bed75a709..3db5e926d30 100644
--- a/mysql-test/r/key.result
+++ b/mysql-test/r/key.result
@@ -530,3 +530,32 @@ 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;
+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/kill.result b/mysql-test/r/kill.result
index a08be429a83..8376eb7c0de 100644
--- a/mysql-test/r/kill.result
+++ b/mysql-test/r/kill.result
@@ -125,3 +125,12 @@ 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();
+SELECT 1;
+ERROR HY000: Lost connection to MySQL server during query
diff --git a/mysql-test/r/log_tables.result b/mysql-test/r/log_tables.result
index 5e18e1273c0..261e3292f4d 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
+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,10 +65,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 fields from mysql.slow_log;
@@ -79,10 +79,10 @@ 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,218 @@ 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;
+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;
+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;
diff --git a/mysql-test/r/merge.result b/mysql-test/r/merge.result
index 5aa4288500c..d6e19107ec4 100644
--- a/mysql-test/r/merge.result
+++ b/mysql-test/r/merge.result
@@ -879,4 +879,9 @@ 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;
End of 5.0 tests
diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result
index 73661897ee1..3125660643c 100644
--- a/mysql-test/r/myisam.result
+++ b/mysql-test/r/myisam.result
@@ -1794,6 +1794,31 @@ 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 # # # # # # #
+DROP TABLE t1;
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/mysqlbinlog.result b/mysql-test/r/mysqlbinlog.result
index f10ae4b4df5..1deb9401aa1 100644
--- a/mysql-test/r/mysqlbinlog.result
+++ b/mysql-test/r/mysqlbinlog.result
@@ -328,4 +328,27 @@ drop table t1;
drop table t1;
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/mysqldump.result b/mysql-test/r/mysqldump.result
index d8688ea5509..c0856314ba5 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;
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..63c9590401c 100644
--- a/mysql-test/r/olap.result
+++ b/mysql-test/r/olap.result
@@ -715,3 +715,14 @@ 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;
+##############################################################
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/partition.result b/mysql-test/r/partition.result
index 5d985d053fc..aa6a64ac76e 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;
@@ -319,18 +337,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 +715,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 +723,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 +1056,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 +1253,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 +1265,24 @@ 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;
End of 5.1 tests
diff --git a/mysql-test/r/partition_archive.result b/mysql-test/r/partition_archive.result
new file mode 100644
index 00000000000..dd063f6224c
--- /dev/null
+++ b/mysql-test/r/partition_archive.result
@@ -0,0 +1,13 @@
+drop database if exists db99;
+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;
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..72f036be099 100644
--- a/mysql-test/r/partition_hash.result
+++ b/mysql-test/r/partition_hash.result
@@ -183,3 +183,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..5b755b6bfd5 100644
--- a/mysql-test/r/partition_innodb.result
+++ b/mysql-test/r/partition_innodb.result
@@ -129,3 +129,10 @@ 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;
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_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/ps.result b/mysql-test/r/ps.result
index edac68a88d6..9d0906ad5e7 100644
--- a/mysql-test/r/ps.result
+++ b/mysql-test/r/ps.result
@@ -2680,4 +2680,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 afc248c027e..6f0bad71f23 100644
--- a/mysql-test/r/ps_2myisam.result
+++ b/mysql-test/r/ps_2myisam.result
@@ -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 e3f55cee898..85a109b0630 100644
--- a/mysql-test/r/ps_3innodb.result
+++ b/mysql-test/r/ps_3innodb.result
@@ -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 fa33dcc395a..980b89ad504 100644
--- a/mysql-test/r/ps_4heap.result
+++ b/mysql-test/r/ps_4heap.result
@@ -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 968342c8a93..e95f8766a24 100644
--- a/mysql-test/r/ps_5merge.result
+++ b/mysql-test/r/ps_5merge.result
@@ -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
@@ -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 5a15a87bd3c..1a728354c7b 100644
--- a/mysql-test/r/query_cache.result
+++ b/mysql-test/r/query_cache.result
@@ -1650,37 +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
+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
+1
+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/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..1acb82e4137 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
@@ -4081,6 +4081,41 @@ SELECT `x` FROM v3;
x
1
DROP VIEW v1, v2, v3;
+
+#
+# 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;
+
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/sp-error.result b/mysql-test/r/sp-error.result
index bfcd64e89d3..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:
@@ -1491,3 +1493,89 @@ 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 21af61d39f6..412f6b94fa2 100644
--- a/mysql-test/r/sp.result
+++ b/mysql-test/r/sp.result
@@ -6620,6 +6620,198 @@ 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
#
@@ -6668,4 +6860,55 @@ 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/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/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/type_date.result b/mysql-test/r/type_date.result
index d6a01727813..904db1a14d0 100644
--- a/mysql-test/r/type_date.result
+++ b/mysql-test/r/type_date.result
@@ -145,3 +145,82 @@ 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
+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;
+End of 5.0 tests
diff --git a/mysql-test/r/type_datetime.result b/mysql-test/r/type_datetime.result
index ffe4bac142d..c15deb8b1e5 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,83 @@ 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;
+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..42276a004bb 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,16 @@ 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;
+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/udf.result b/mysql-test/r/udf.result
index f1e47905f5d..cb5afcf5f17 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),
diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result
index 19b48efe6b4..bdaec70021b 100644
--- a/mysql-test/r/variables.result
+++ b/mysql-test/r/variables.result
@@ -286,6 +286,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
@@ -797,6 +799,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..60c3ff68e67 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`;
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_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..552f4896698 100644
--- a/mysql-test/r/xml.result
+++ b/mysql-test/r/xml.result
@@ -1012,3 +1012,14 @@ 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
+End of 5.1 tests
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/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/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/innodb__datadict.result b/mysql-test/suite/funcs_1/r/innodb__datadict.result
index 4ac0f2e16ea..b105e00caf7 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,7 +2266,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
@@ -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
@@ -3213,7 +3141,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;
@@ -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
@@ -3479,9 +3400,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"
@@ -4371,7 +4293,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 +4465,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
@@ -5743,10 +5582,10 @@ 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
@@ -5823,10 +5662,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 +5779,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'
@@ -7892,7 +7731,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 +7754,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
@@ -8037,7 +7876,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 +7894,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
@@ -8703,6 +8542,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
@@ -9484,6 +9324,7 @@ utf8_roman_ci
utf8_persian_ci
utf8_esperanto_ci
utf8_hungarian_ci
+utf8_general_cs
ucs2_general_ci
ucs2_bin
ucs2_unicode_ci
@@ -9849,6 +9690,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
@@ -10012,6 +9854,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
@@ -10247,7 +10090,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
@@ -10300,7 +10143,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
@@ -10355,7 +10198,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
@@ -10379,12 +10222,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 +10365,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 +10442,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 +10450,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 +10462,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
@@ -11197,7 +11040,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
@@ -11221,12 +11064,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 +11207,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 +11284,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 +11292,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 +11304,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
@@ -11769,7 +11612,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
@@ -11793,12 +11636,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 +11779,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 +11856,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 +11864,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 +11876,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
@@ -13423,7 +13266,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 +13327,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 +14179,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 +14190,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 +14236,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 +14271,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 +14418,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 +14441,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 +15044,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 +15052,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 +15103,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 +15111,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..275192365e8 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
@@ -10413,9 +10463,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 +10924,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 +10933,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 +10941,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 +10949,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 +10957,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 +10965,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 +10973,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 +10981,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 +10989,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 +10997,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 +11166,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..af0673a393b 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,7 +2264,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
@@ -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
@@ -3196,7 +3124,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;
@@ -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
@@ -3462,9 +3383,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"
@@ -4354,7 +4276,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 +4448,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
@@ -5726,10 +5565,10 @@ 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
@@ -5806,10 +5645,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 +5762,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'
@@ -7875,7 +7714,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 +7737,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
@@ -8020,7 +7859,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 +7877,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
@@ -8686,6 +8525,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
@@ -9452,6 +9292,7 @@ utf8_roman_ci
utf8_persian_ci
utf8_esperanto_ci
utf8_hungarian_ci
+utf8_general_cs
ucs2_general_ci
ucs2_bin
ucs2_unicode_ci
@@ -9817,6 +9658,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
@@ -9980,6 +9822,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
@@ -10215,7 +10058,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
@@ -10268,7 +10111,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
@@ -10323,7 +10166,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
@@ -10347,12 +10190,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 +10333,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 +10410,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 +10418,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 +10430,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
@@ -11150,7 +10993,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
@@ -11174,12 +11017,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 +11160,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 +11237,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 +11245,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 +11257,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
@@ -11707,7 +11550,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
@@ -11731,12 +11574,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 +11717,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 +11794,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 +11802,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 +11814,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
@@ -13321,7 +13164,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 +13225,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 +14077,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 +14088,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 +14134,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 +14169,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 +14316,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 +14339,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 +14942,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 +14950,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 +15001,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 +15009,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..2ec3c714e46 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
@@ -10418,9 +10468,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 +10929,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 +10938,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 +10946,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 +10954,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 +10962,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 +10970,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 +10978,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 +10986,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 +10994,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 +11002,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 +11171,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..da478bb2779 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,7 +2294,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
@@ -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
@@ -3266,7 +3194,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;
@@ -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
@@ -3532,9 +3453,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"
@@ -4424,7 +4346,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 +4518,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
@@ -5796,10 +5635,10 @@ 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
@@ -5876,10 +5715,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 +5832,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'
@@ -7945,7 +7784,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 +7807,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
@@ -8090,7 +7929,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 +7947,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
@@ -8756,6 +8595,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
@@ -9554,6 +9394,7 @@ utf8_roman_ci
utf8_persian_ci
utf8_esperanto_ci
utf8_hungarian_ci
+utf8_general_cs
ucs2_general_ci
ucs2_bin
ucs2_unicode_ci
@@ -9919,6 +9760,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
@@ -10082,6 +9924,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
@@ -10317,7 +10160,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
@@ -10370,7 +10213,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
@@ -10425,7 +10268,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
@@ -10449,12 +10292,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 +10435,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 +10512,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 +10520,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 +10532,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
@@ -11292,7 +11135,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
@@ -11316,12 +11159,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 +11302,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 +11379,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 +11387,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 +11399,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
@@ -11881,7 +11724,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
@@ -11905,12 +11748,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 +11891,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 +11968,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 +11976,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 +11988,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
@@ -13575,7 +13418,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 +13479,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 +14331,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 +14342,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 +14388,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 +14423,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 +14570,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 +14593,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 +15196,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 +15204,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 +15255,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 +15263,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..bba9238e685 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
@@ -10421,9 +10471,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 +10925,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 +10934,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 +10942,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 +10950,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 +10958,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 +10966,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 +10974,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 +10982,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 +10990,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 +10998,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 +11167,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..3a558ea7883 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 1477 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..7b1b3caf058 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 1477 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..c0d2575bc38 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 1477 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..601e8fe7ce7 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 1477 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..1fefd964a40 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 1477 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..9c9ceedd586 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 1477 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..1f48a72ea12 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 1477 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..35193fa7a76 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
@@ -10412,9 +10462,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 +10923,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 +10932,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 +10940,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 +10948,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 +10956,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 +10964,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 +10972,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 +10980,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 +10988,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 +10996,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 +11165,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..e3917170812 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
@@ -2704,7 +2707,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 +2754,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 +2784,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 +2796,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 +2882,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 +3045,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 +3058,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 +3073,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 +3539,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 +3580,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 +3633,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 +3671,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 +3774,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 +3805,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 +3831,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 +3856,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 +3898,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 +3912,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 +3949,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/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_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_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/ps_7ndb.result b/mysql-test/suite/ndb/r/ps_7ndb.result
index 82d2d14b075..e6bcb7f035e 100644
--- a/mysql-test/suite/ndb/r/ps_7ndb.result
+++ b/mysql-test/suite/ndb/r/ps_7ndb.result
@@ -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..f876039a042 100644
--- a/mysql-test/suite/ndb/t/disabled.def
+++ b/mysql-test/suite/ndb/t/disabled.def
@@ -9,9 +9,6 @@
# 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
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/parts/inc/partition.pre b/mysql-test/suite/parts/inc/partition.pre
index c09cfed29e6..ade4a1592be 100644
--- a/mysql-test/suite/parts/inc/partition.pre
+++ b/mysql-test/suite/parts/inc/partition.pre
@@ -12,11 +12,14 @@
# 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
@@ -31,9 +34,6 @@ 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)
@@ -164,7 +164,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;
diff --git a/mysql-test/suite/parts/inc/partition_alter_1.inc b/mysql-test/suite/parts/inc/partition_alter_1.inc
index 1498970547a..206073d6775 100644
--- a/mysql-test/suite/parts/inc/partition_alter_1.inc
+++ b/mysql-test/suite/parts/inc/partition_alter_1.inc
@@ -26,19 +26,21 @@
# are also to be set outside (source ./include/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,11 +50,11 @@ 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)`;
+let $unexpected_error= `SELECT @my_errno NOT IN (0,1030,1502,1506)`;
if ($unexpected_error)
{
--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,1030,1502,1506
SELECT '# SQL code we got was: ' AS "", @my_errno AS "";
--echo # Sorry, have to abort.
exit;
diff --git a/mysql-test/suite/parts/inc/partition_check.inc b/mysql-test/suite/parts/inc/partition_check.inc
index 6f03ed58241..87d8c5a3c5a 100644
--- a/mysql-test/suite/parts/inc/partition_check.inc
+++ b/mysql-test/suite/parts/inc/partition_check.inc
@@ -35,11 +35,15 @@
# 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 #
################################################################################
@@ -495,7 +499,7 @@ 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 (1525)
# "Table has no partition for value ...."
# or ER_SAME_NAME_PARTITION (1514)
--disable_abort_on_error
@@ -506,11 +510,11 @@ if ($no_debug)
--disable_query_log
}
eval SET @my_errno = $mysql_errno;
-let $unexpected_error= `SELECT @my_errno NOT IN (0,1514,1523)`;
+let $unexpected_error= `SELECT @my_errno NOT IN (0,1514,1525)`;
if ($unexpected_error)
{
--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,1514,1525
SELECT '# SQL code we got was: ' AS "", @my_errno AS "";
--echo # Sorry, have to abort.
exit;
diff --git a/mysql-test/suite/parts/inc/partition_syntax.inc b/mysql-test/suite/parts/inc/partition_syntax.inc
index a2a29d25e48..26bf57f3ef2 100644
--- a/mysql-test/suite/parts/inc/partition_syntax.inc
+++ b/mysql-test/suite/parts/inc/partition_syntax.inc
@@ -249,7 +249,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 +324,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 +332,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
)
@@ -456,17 +456,17 @@ 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
@@ -640,12 +640,12 @@ let $part_number= "GARBAGE";
--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
)
@@ -685,13 +685,13 @@ DROP TABLE t1;
--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 +703,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 +717,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 +729,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 +747,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 +761,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..79fdcdf1b91 100644
--- a/mysql-test/suite/parts/inc/partition_syntax_1.inc
+++ b/mysql-test/suite/parts/inc/partition_syntax_1.inc
@@ -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
@@ -30,13 +32,13 @@ let $run= `SELECT @my_errno = 0`;
# 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)`;
+# 1498 ER_TOO_MANY_PARTITIONS_ERROR
+# 1503 ER_NO_PARTS_ERROR
+let $unexpected_error= `SELECT @my_errno NOT IN (0,1064,1498,1503)`;
if ($unexpected_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,1064,1498,1503
SELECT '# SQL code we got was: ' AS "", @my_errno AS "";
--echo # Sorry, have to abort.
exit;
@@ -68,13 +70,13 @@ let $run= `SELECT @my_errno = 0`;
# 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)`;
+# 1498 ER_TOO_MANY_PARTITIONS_ERROR
+# 1503 ER_NO_PARTS_ERROR
+let $unexpected_error= `SELECT @my_errno NOT IN (0,1064,1498,1503)`;
if ($unexpected_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,1064,1498,1503
SELECT '# SQL code we got was: ' AS "", @my_errno AS "";
--echo # Sorry, have to abort.
exit;
diff --git a/mysql-test/suite/parts/r/partition_alter1_innodb.result b/mysql-test/suite/parts/r/partition_alter1_innodb.result
index 22f02356b77..84765c14e16 100644
--- a/mysql-test/suite/parts/r/partition_alter1_innodb.result
+++ b/mysql-test/suite/parts/r/partition_alter1_innodb.result
@@ -4,9 +4,6 @@ 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.
#------------------------------------------------------------------------
#------------------------------------------------------------------------
@@ -31,7 +28,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_alter1_myisam.result b/mysql-test/suite/parts/r/partition_alter1_myisam.result
index b2f1d657151..29c5f09eb3b 100644
--- a/mysql-test/suite/parts/r/partition_alter1_myisam.result
+++ b/mysql-test/suite/parts/r/partition_alter1_myisam.result
@@ -4,9 +4,6 @@ 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.
#------------------------------------------------------------------------
#------------------------------------------------------------------------
@@ -31,7 +28,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_alter2_innodb.result b/mysql-test/suite/parts/r/partition_alter2_innodb.result
index cdddae40467..833e82c6a89 100644
--- a/mysql-test/suite/parts/r/partition_alter2_innodb.result
+++ b/mysql-test/suite/parts/r/partition_alter2_innodb.result
@@ -4,9 +4,6 @@ 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.
#------------------------------------------------------------------------
#------------------------------------------------------------------------
@@ -31,7 +28,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_alter2_myisam.result b/mysql-test/suite/parts/r/partition_alter2_myisam.result
index 741ce2d8963..65bf85e61e5 100644
--- a/mysql-test/suite/parts/r/partition_alter2_myisam.result
+++ b/mysql-test/suite/parts/r/partition_alter2_myisam.result
@@ -4,9 +4,6 @@ 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.
#------------------------------------------------------------------------
#------------------------------------------------------------------------
@@ -31,7 +28,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_alter3_innodb.result b/mysql-test/suite/parts/r/partition_alter3_innodb.result
index 7228462c61d..3cff9aa3b0a 100644
--- a/mysql-test/suite/parts/r/partition_alter3_innodb.result
+++ b/mysql-test/suite/parts/r/partition_alter3_innodb.result
@@ -4,9 +4,6 @@ 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.
#------------------------------------------------------------------------
#------------------------------------------------------------------------
@@ -31,7 +28,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_alter3_myisam.result b/mysql-test/suite/parts/r/partition_alter3_myisam.result
index c24858aa2ca..8e93af1f3d0 100644
--- a/mysql-test/suite/parts/r/partition_alter3_myisam.result
+++ b/mysql-test/suite/parts/r/partition_alter3_myisam.result
@@ -4,9 +4,6 @@ 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.
#------------------------------------------------------------------------
#------------------------------------------------------------------------
@@ -31,7 +28,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..aa8ba992808 100644
--- a/mysql-test/suite/parts/r/partition_alter4_innodb.result
+++ b/mysql-test/suite/parts/r/partition_alter4_innodb.result
@@ -4,9 +4,6 @@ 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.
#------------------------------------------------------------------------
#------------------------------------------------------------------------
@@ -31,7 +28,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_myisam.result b/mysql-test/suite/parts/r/partition_alter4_myisam.result
index 32da415443d..6697bb9805c 100644
--- a/mysql-test/suite/parts/r/partition_alter4_myisam.result
+++ b/mysql-test/suite/parts/r/partition_alter4_myisam.result
@@ -4,9 +4,6 @@ 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.
#------------------------------------------------------------------------
#------------------------------------------------------------------------
@@ -31,7 +28,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_basic_innodb.result b/mysql-test/suite/parts/r/partition_basic_innodb.result
index dc875980678..adcac5cccad 100644
--- a/mysql-test/suite/parts/r/partition_basic_innodb.result
+++ b/mysql-test/suite/parts/r/partition_basic_innodb.result
@@ -4,9 +4,6 @@ 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.
#------------------------------------------------------------------------
#------------------------------------------------------------------------
@@ -31,7 +28,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_basic_myisam.result b/mysql-test/suite/parts/r/partition_basic_myisam.result
index 471eb4973f6..db8918029f1 100644
--- a/mysql-test/suite/parts/r/partition_basic_myisam.result
+++ b/mysql-test/suite/parts/r/partition_basic_myisam.result
@@ -4,9 +4,6 @@ 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.
#------------------------------------------------------------------------
#------------------------------------------------------------------------
@@ -31,7 +28,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_engine_innodb.result b/mysql-test/suite/parts/r/partition_engine_innodb.result
index bea9a59da9b..be95f5baae5 100644
--- a/mysql-test/suite/parts/r/partition_engine_innodb.result
+++ b/mysql-test/suite/parts/r/partition_engine_innodb.result
@@ -4,9 +4,6 @@ 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.
#------------------------------------------------------------------------
#------------------------------------------------------------------------
@@ -31,7 +28,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_engine_myisam.result b/mysql-test/suite/parts/r/partition_engine_myisam.result
index 343077c5e4d..a61ec2e5cef 100644
--- a/mysql-test/suite/parts/r/partition_engine_myisam.result
+++ b/mysql-test/suite/parts/r/partition_engine_myisam.result
@@ -4,9 +4,6 @@ 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.
#------------------------------------------------------------------------
#------------------------------------------------------------------------
@@ -31,7 +28,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_syntax_innodb.result b/mysql-test/suite/parts/r/partition_syntax_innodb.result
index c6fb2d38e4c..402ab2f524f 100644
--- a/mysql-test/suite/parts/r/partition_syntax_innodb.result
+++ b/mysql-test/suite/parts/r/partition_syntax_innodb.result
@@ -4,9 +4,6 @@ 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.
#------------------------------------------------------------------------
#------------------------------------------------------------------------
@@ -31,7 +28,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_syntax_myisam.result b/mysql-test/suite/parts/r/partition_syntax_myisam.result
index 49a7b155a58..ceac1b4f1b9 100644
--- a/mysql-test/suite/parts/r/partition_syntax_myisam.result
+++ b/mysql-test/suite/parts/r/partition_syntax_myisam.result
@@ -4,9 +4,6 @@ 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.
#------------------------------------------------------------------------
#------------------------------------------------------------------------
@@ -31,7 +28,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/rpl/include/rpl_mixed_dml.inc b/mysql-test/suite/rpl/include/rpl_mixed_dml.inc
index 96dfdbed541..a3ff022c43c 100644
--- a/mysql-test/suite/rpl/include/rpl_mixed_dml.inc
+++ b/mysql-test/suite/rpl/include/rpl_mixed_dml.inc
@@ -53,7 +53,7 @@ DELETE FROM t2 WHERE a = 2;
--echo ******************** LOAD DATA INFILE ********************
--exec cp ./suite/rpl/data/rpl_mixed.dat $MYSQLTEST_VARDIR/tmp/
LOAD DATA INFILE '../tmp/rpl_mixed.dat' INTO TABLE t1 FIELDS TERMINATED BY '|' ;
---exec rm $MYSQLTEST_VARDIR/tmp/rpl_mixed.dat
+--remove_file $MYSQLTEST_VARDIR/tmp/rpl_mixed.dat
SELECT * FROM t1;
--source suite/rpl/include/rpl_mixed_check_select.inc
--source suite/rpl/include/rpl_mixed_clear_tables.inc
diff --git a/mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result b/mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result
index 18906617925..a7d9e12aabd 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..a8762d447d6 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_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_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/t/disabled.def b/mysql-test/suite/rpl/t/disabled.def
index 0c90eaa4378..426bf93ae97 100644
--- a/mysql-test/suite/rpl/t/disabled.def
+++ b/mysql-test/suite/rpl/t/disabled.def
@@ -13,5 +13,5 @@
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_extraColmaster_innodb : BUG#30854 : Tables name show as binary in slave err msg on vm-win2003-64-b and Solaris
+rpl_extraColmaster_myisam : BUG#30854
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_innodb_bug28430.test b/mysql-test/suite/rpl/t/rpl_innodb_bug28430.test
index fe3881ab08f..74954299920 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
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_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..1465500d0eb
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_row_charset_innodb.test
@@ -0,0 +1,9 @@
+########################################################
+# 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/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_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_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_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/t/disabled.def b/mysql-test/suite/rpl_ndb/t/disabled.def
index f372d44cb90..05e8297bf0e 100644
--- a/mysql-test/suite/rpl_ndb/t/disabled.def
+++ b/mysql-test/suite/rpl_ndb/t/disabled.def
@@ -11,8 +11,8 @@
##############################################################################
-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_2innodb : Bug#29549 rpl_ndb_myisam2ndb,rpl_ndb_innodb2ndb failed on Solaris for pack_length issue
+rpl_ndb_2myisam : Bug#29549 rpl_ndb_myisam2ndb,rpl_ndb_innodb2ndb failed on Solaris for pack_length issue
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
@@ -20,7 +20,7 @@ rpl_ndb_myisam2ndb : Bug#29549 rpl_ndb_myisam2ndb,rpl_ndb_innodb2ndb faile
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
# 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/archive.test b/mysql-test/t/archive.test
index 23c591856a7..e0a2e877af5 100644
--- a/mysql-test/t/archive.test
+++ b/mysql-test/t/archive.test
@@ -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
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/csv.test b/mysql-test/t/csv.test
index 5c877557dfc..6c83fbfdc9c 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,43 @@ 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_CANT_CREATE_TABLE
+create table t1(a enum('foo','bar') default null) engine=csv;
+--error ER_CANT_CREATE_TABLE
+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;
+
+
--echo End of 5.1 tests
diff --git a/mysql-test/t/ctype_ucs.test b/mysql-test/t/ctype_ucs.test
index bca3a9c3a96..7827ff0d31e 100644
--- a/mysql-test/t/ctype_ucs.test
+++ b/mysql-test/t/ctype_ucs.test
@@ -547,6 +547,14 @@ select quote(name) from bug20536;
drop table bug20536;
+#
+# 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 +659,9 @@ 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;
+#
+# 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..5c35bf82343 100644
--- a/mysql-test/t/ctype_utf8.test
+++ b/mysql-test/t/ctype_utf8.test
@@ -1404,3 +1404,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/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/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/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/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..4c5dd6467bd 100644
--- a/mysql-test/t/func_gconcat.test
+++ b/mysql-test/t/func_gconcat.test
@@ -562,4 +562,32 @@ 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;
+
+
--echo End of 5.0 tests
diff --git a/mysql-test/t/func_group.test b/mysql-test/t/func_group.test
index d1b4919c83e..e1ec6906cd6 100644
--- a/mysql-test/t/func_group.test
+++ b/mysql-test/t/func_group.test
@@ -867,5 +867,18 @@ 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;
+
###
--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..4b7685c3633 100644
--- a/mysql-test/t/func_misc.test
+++ b/mysql-test/t/func_misc.test
@@ -198,6 +198,21 @@ 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');
+
--echo End of 5.0 tests
#
diff --git a/mysql-test/t/func_regexp.test b/mysql-test/t/func_regexp.test
index 23070c71fe9..5eff404bc0f 100644
--- a/mysql-test/t/func_regexp.test
+++ b/mysql-test/t/func_regexp.test
@@ -74,4 +74,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_str.test b/mysql-test/t/func_str.test
index 945f5a050f4..0ba0ba30cd2 100644
--- a/mysql-test/t/func_str.test
+++ b/mysql-test/t/func_str.test
@@ -1231,4 +1231,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..5c1a5c2200b 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
#
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..b4c515d2e8c 100644
--- a/mysql-test/t/gis.test
+++ b/mysql-test/t/gis.test
@@ -432,6 +432,14 @@ 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;
+
--echo End of 4.1 tests
#
@@ -591,6 +599,8 @@ SELECT AsText(GeometryFromText(CONCAT(
--enable_query_log
SELECT 1;
+-- source include/gis_keys.inc
+
--echo End of 5.0 tests
diff --git a/mysql-test/t/grant.test b/mysql-test/t/grant.test
index e33712e1ebf..8d909d63f51 100644
--- a/mysql-test/t/grant.test
+++ b/mysql-test/t/grant.test
@@ -1257,6 +1257,9 @@ 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 DATABASE db27878;
use test;
DROP TABLE t1;
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..2ea7aed6bd2 100644
--- a/mysql-test/t/group_by.test
+++ b/mysql-test/t/group_by.test
@@ -811,6 +811,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..9d1e065797d 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%';
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..55334916913 100644
--- a/mysql-test/t/information_schema.test
+++ b/mysql-test/t/information_schema.test
@@ -953,7 +953,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 +1090,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 +1142,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 +1187,50 @@ 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;
+
--echo End of 5.1 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_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..31d5ac5201b 100644
--- a/mysql-test/t/key.test
+++ b/mysql-test/t/key.test
@@ -501,3 +501,43 @@ ORDER BY c.b, c.d
;
DROP TABLE t1, t2;
+
+#
+# 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..219412e5afa 100644
--- a/mysql-test/t/kill.test
+++ b/mysql-test/t/kill.test
@@ -304,3 +304,19 @@ 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();
+
+--error 2013
+SELECT 1;
diff --git a/mysql-test/t/log_tables.test b/mysql-test/t/log_tables.test
index 89c7c255554..12098b4543b 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,120 @@ 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.
+#
+
+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;
+deallocate prepare long_query;
+set global general_log = @old_general_log_state;
diff --git a/mysql-test/t/merge.test b/mysql-test/t/merge.test
index fd479276b3b..a50588b1e78 100644
--- a/mysql-test/t/merge.test
+++ b/mysql-test/t/merge.test
@@ -511,4 +511,18 @@ 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;
+
--echo End of 5.0 tests
diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test
index b06fd536f45..6f24d84f4c0 100644
--- a/mysql-test/t/myisam.test
+++ b/mysql-test/t/myisam.test
@@ -1146,6 +1146,32 @@ 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
+DROP TABLE t1;
+
--echo End of 5.0 tests
@@ -1256,3 +1282,4 @@ CHECK TABLE t1;
DROP TABLE t1;
--echo End of 5.1 tests
+
diff --git a/mysql-test/t/mysqlbinlog.test b/mysql-test/t/mysqlbinlog.test
index 25bd9a402ae..edaf07a64db 100644
--- a/mysql-test/t/mysqlbinlog.test
+++ b/mysql-test/t/mysqlbinlog.test
@@ -250,4 +250,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/mysqldump.test b/mysql-test/t/mysqldump.test
index 0440b0fb63a..158e8a769bd 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 #
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..1ac99d9c39f 100644
--- a/mysql-test/t/olap.test
+++ b/mysql-test/t/olap.test
@@ -358,3 +358,12 @@ 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 ##############################################################
+
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/partition.test b/mysql-test/t/partition.test
index 42db23dadef..f986215ee89 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)
@@ -413,34 +444,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 +769,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 +813,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 +878,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 +940,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 +1129,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 +1225,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 +1467,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 +1488,26 @@ 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;
+
--echo End of 5.1 tests
diff --git a/mysql-test/t/partition_archive.test b/mysql-test/t/partition_archive.test
new file mode 100644
index 00000000000..3109894d9c9
--- /dev/null
+++ b/mysql-test/t/partition_archive.test
@@ -0,0 +1,32 @@
+# 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;
+--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;
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..52caaa8c8e9 100644
--- a/mysql-test/t/partition_hash.test
+++ b/mysql-test/t/partition_hash.test
@@ -144,3 +144,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..4a50332b3df 100644
--- a/mysql-test/t/partition_innodb.test
+++ b/mysql-test/t/partition_innodb.test
@@ -134,3 +134,11 @@ 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;
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_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/ps.test b/mysql-test/t/ps.test
index dea86bdd2fa..fd7caeb195e 100644
--- a/mysql-test/t/ps.test
+++ b/mysql-test/t/ps.test
@@ -2778,4 +2778,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 2cfe1ff4ccc..9e250372d51 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,43 +1251,8 @@ disconnect user2;
disconnect user3;
#
-# 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;
---echo End of 5.0 tests
-
-#
# Bug #28211 RENAME DATABASE and query cache don't play nicely together
+#
# TODO: enable these tests when RENAME DATABASE is implemented.
# --disable_warnings
# drop database if exists db1;
@@ -1332,3 +1292,30 @@ set GLOBAL query_cache_size=default;
# 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 #31157: Crash when select+order by the avg of some field within the
+# group by
+#
+
+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/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..71a7caba399 100644
--- a/mysql-test/t/select.test
+++ b/mysql-test/t/select.test
@@ -3473,6 +3473,54 @@ DROP VIEW v1, v2, v3;
--enable_ps_protocol
+###########################################################################
+
+--echo
+--echo #
+--echo # Bug#30736: Row Size Too Large Error Creating a Table and
+--echo # Inserting Data.
+--echo #
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t2;
+--enable_warnings
+
+--echo
+
+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
+
+###########################################################################
+
--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/sp-error.test b/mysql-test/t/sp-error.test
index c9145859405..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)
#
@@ -2179,6 +2175,137 @@ 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
#
#--disable_warnings
diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test
index 78ac419e451..004e1c4ddd2 100644
--- a/mysql-test/t/sp.test
+++ b/mysql-test/t/sp.test
@@ -7581,6 +7581,327 @@ 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
###########################################################################
@@ -7665,4 +7986,74 @@ DROP VIEW v2;
###########################################################################
+#
+# 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/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/type_date.test b/mysql-test/t/type_date.test
index dcee4fd2ffc..b21f21d2f3d 100644
--- a/mysql-test/t/type_date.test
+++ b/mysql-test/t/type_date.test
@@ -139,3 +139,58 @@ 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;
+
+--echo End of 5.0 tests
diff --git a/mysql-test/t/type_datetime.test b/mysql-test/t/type_datetime.test
index d8d137d81e6..fada7983c2c 100644
--- a/mysql-test/t/type_datetime.test
+++ b/mysql-test/t/type_datetime.test
@@ -283,6 +283,62 @@ 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;
+
+--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..4d61350a613 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,22 @@ 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;
+
+--echo End of 5.0 tests
+
diff --git a/mysql-test/t/type_float.test b/mysql-test/t/type_float.test
index a55200c8853..ed3abb12140 100644
--- a/mysql-test/t/type_float.test
+++ b/mysql-test/t/type_float.test
@@ -224,6 +224,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/udf.test b/mysql-test/t/udf.test
index 2f1d197cb9e..32cfca57546 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
diff --git a/mysql-test/t/upgrade.test b/mysql-test/t/upgrade.test
index 40bd17fc3a5..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`;
@@ -60,7 +65,6 @@ drop table t1;
# Bug#28360 (RENAME DATABASE destroys routines)
#
-
--disable_warnings
drop database if exists `tabc`;
drop database if exists `a-b-c`;
diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test
index 81db143b518..c1580390f63 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..e388aa61803 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.
#
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_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..6c7d9af1b63 100644
--- a/mysql-test/t/xml.test
+++ b/mysql-test/t/xml.test
@@ -533,3 +533,14 @@ 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);
+
+--echo End of 5.1 tests
diff --git a/mysys/my_getopt.c b/mysys/my_getopt.c
index 3a5b130e067..3aad6152dfd 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;
@@ -33,7 +37,12 @@ static longlong getopt_ll(char *arg, const struct my_option *optp, int *err);
static ulonglong getopt_ull(char *arg, const struct my_option *optp,
int *err);
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 *opts, uchar* *value, char *argument,
my_bool set_maximum_value);
static char *check_struct_option(char *cur_arg, char *key_name);
@@ -117,7 +126,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++)
{
@@ -730,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')
@@ -767,7 +784,14 @@ static longlong getopt_ll(char *arg, const struct my_option *optp, int *err)
num= eval_num_suffix(arg, err, (char*) optp->name);
if (num > 0 && (ulonglong) num > (ulonglong) optp->max_value &&
optp->max_value) /* if max value is not set -> no upper limit */
+ {
+ char buf[22];
+ my_getopt_error_reporter(WARNING_LEVEL,
+ "Truncated incorrect %s value: '%s'",
+ optp->name, llstr(num, buf));
+
num= (ulonglong) optp->max_value;
+ }
num= ((num - optp->sub_size) / block_size);
num= (longlong) (num * block_size);
return max(num, optp->min_value);
@@ -906,6 +930,37 @@ static void init_one_value(const struct my_option *option, 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
@@ -919,7 +974,8 @@ static void init_one_value(const struct my_option *option, 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 b2eefe97ee8..6d1b9ec04be 100644
--- a/mysys/my_init.c
+++ b/mysys/my_init.c
@@ -299,7 +299,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_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/thr_mutex.c b/mysys/thr_mutex.c
index e7a927e562a..49003553f0b 100644
--- a/mysys/thr_mutex.c
+++ b/mysys/thr_mutex.c
@@ -91,7 +91,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;
if (!mp->file)
@@ -104,15 +104,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 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();
+ 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 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/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_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..89558f99603 100644
--- a/scripts/mysql_system_tables_data.sql
+++ b/scripts/mysql_system_tables_data.sql
@@ -14,8 +14,9 @@ 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 @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 (@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,'');
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..0ca7ef16c0d 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;
@@ -1717,7 +1729,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 +1772,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 +1919,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 +1935,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 +1950,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 +1995,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 +2021,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 +2035,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 +2100,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 +2626,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 +3143,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/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..adac2b596c1 100644
--- a/sql/event_data_objects.cc
+++ b/sql/event_data_objects.cc
@@ -2017,6 +2017,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 +2025,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..73b8f2cda84 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;
@@ -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..e04162d5e14 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -1457,15 +1457,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();
@@ -5600,7 +5609,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 +5657,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 +5694,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
{
@@ -8005,36 +8031,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;
diff --git a/sql/field.h b/sql/field.h
index 8aad6783291..d0d867d0b32 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -1522,7 +1522,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; };
diff --git a/sql/filesort.cc b/sql/filesort.cc
index b6a5d844eac..2e6f0ecaf05 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..55af0c38aed 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;
@@ -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 200e8a97c67..b53a5e3da97 100644
--- a/sql/ha_partition.cc
+++ b/sql/ha_partition.cc
@@ -1599,6 +1599,7 @@ error:
void ha_partition::update_create_info(HA_CREATE_INFO *create_info)
{
m_file[0]->update_create_info(create_info);
+ create_info->data_file_name= create_info->index_file_name = NULL;
return;
}
@@ -2678,7 +2679,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 +2707,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 +2726,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
@@ -2924,12 +2935,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 +3397,22 @@ 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 && m_table_flags & HA_PARTIAL_COLUMN_READ)
+ {
+ /*
+ An ordered scan is requested and necessary fields aren't in read_set.
+ This may happen e.g. with SELECT COUNT(*) FROM t1. We must ensure
+ that all fields of current key are included into read_set, as
+ partitioning requires them for sorting
+ (see ha_partition::handle_ordered_index_scan).
+
+ 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
{
@@ -4540,6 +4562,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).
@@ -4806,6 +4830,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)
@@ -4890,6 +4923,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 75c3a64bc27..8a2355c8a87 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -1414,6 +1414,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
@@ -1442,23 +1472,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;
@@ -1471,16 +1489,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);
@@ -2203,7 +2223,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;
@@ -2522,15 +2542,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);
}
@@ -2641,8 +2702,7 @@ 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));
@@ -3145,6 +3205,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.
@@ -3152,10 +3214,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,
diff --git a/sql/item.cc b/sql/item.cc
index d8080d62c39..95c8cd582cd 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;
}
@@ -3859,7 +3863,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 +4319,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 +4503,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);
@@ -4865,6 +4911,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())
@@ -6585,10 +6644,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 655159ab752..c8294eabb6a 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);
};
@@ -1243,6 +1246,8 @@ public:
Item_name_const(Item *name_arg, Item *val):
value_item(val), name_item(name_arg)
{
+ if(!value_item->basic_const_item())
+ my_error(ER_WRONG_ARGUMENTS, MYF(0), "NAME_CONST");
Item::maybe_null= TRUE;
}
@@ -1467,7 +1472,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();
@@ -2019,6 +2024,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;}
@@ -2805,7 +2811,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..04e0011f1a7 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -146,6 +146,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
@@ -2046,10 +2075,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 +2104,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 +2252,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 +2272,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 )
@@ -2582,7 +2622,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
@@ -2751,6 +2791,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:
@@ -4367,6 +4408,7 @@ Item_func_regex::fix_fields(THD *thd, Item **ref)
if (args[1]->null_value)
{ // Will always return NULL
maybe_null=1;
+ fixed= 1;
return FALSE;
}
int error;
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h
index 40d0c2dfe91..e9aeef7fc3e 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 */
@@ -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,6 +1139,7 @@ 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);
@@ -1442,6 +1448,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 efc42c1b73f..ec0ecc89394 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -187,7 +187,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;
@@ -1377,7 +1377,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;
}
@@ -2238,6 +2242,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);
}
@@ -2892,6 +2897,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++)
{
@@ -2944,10 +2950,10 @@ 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);
}
@@ -3619,10 +3625,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()
@@ -4061,7 +4074,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.
@@ -5592,8 +5605,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);
}
@@ -5601,8 +5619,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 66a417f31fa..b2ba57af817 100644
--- a/sql/item_func.h
+++ b/sql/item_func.h
@@ -436,6 +436,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 +700,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 +714,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 +757,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]->null_value;
}
};
@@ -930,6 +935,7 @@ public:
if (arg_count)
max_length= args[0]->max_length;
}
+ bool fix_fields(THD *thd, Item **ref);
};
diff --git a/sql/item_geofunc.cc b/sql/item_geofunc.cc
index 78741483c0b..332e88c950d 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;
}
@@ -41,10 +41,6 @@ void Item_geometry_func::fix_length_and_dec()
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 d1c8e7a37e8..a7624c5bbcd 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..1a264fa2c01 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"; }
};
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc
index 843c6ced263..8eb7421f854 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;
diff --git a/sql/item_sum.cc b/sql/item_sum.cc
index 2684cce16ac..0e1daadd8e7 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).
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc
index 300d0788f55..8240b7178c7 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);
}
@@ -3239,7 +3238,7 @@ void Item_func_str_to_date::fix_length_and_dec()
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);
diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h
index 36556269d07..844c3d84313 100644
--- a/sql/item_timefunc.h
+++ b/sql/item_timefunc.h
@@ -847,7 +847,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 +940,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 +1012,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..1a6c15a4d2e 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;
diff --git a/sql/log.cc b/sql/log.cc
index 95204e89d0e..688ed03d5d1 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;
@@ -2900,8 +2892,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;
@@ -3737,12 +3729,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);
@@ -3750,6 +3774,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..bef0101c8b5 100644
--- a/sql/log.h
+++ b/sql/log.h
@@ -499,6 +499,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 +520,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..a6d07e72033 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -148,7 +148,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();
}
@@ -2106,14 +2106,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 +2138,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 +2153,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 +2171,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
@@ -2215,7 +2215,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)
@@ -3255,7 +3255,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 +3429,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 +3468,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;
@@ -5655,7 +5655,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 +5703,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 +5951,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 +5995,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 +6006,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 +6029,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);
}
@@ -6159,7 +6159,7 @@ int Rows_log_event::do_apply_event(Relay_log_info const *rli)
"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;
}
@@ -6221,7 +6221,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);
}
@@ -6519,9 +6519,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 +6804,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 +6816,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;
}
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 6a7e3e00f6f..f19e11357cd 100644
--- a/sql/mysql_priv.h
+++ b/sql/mysql_priv.h
@@ -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,7 +679,7 @@ 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);
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);
@@ -740,6 +745,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,12 +920,10 @@ 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);
@@ -1283,12 +1289,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);
+void mysql_ha_cleanup(THD *thd);
/* sql_base.cc */
#define TMP_TABLE_KEY_EXTRA 8
@@ -1413,7 +1416,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 +1676,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,
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 6767934e9f0..5da23fd1a7c 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -1361,8 +1361,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 */
}
@@ -2216,7 +2229,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 */
@@ -2236,7 +2249,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 */
@@ -2570,7 +2583,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,
+ if (thd->handle_error(error, str,
MYSQL_ERROR::WARN_LEVEL_ERROR))
DBUG_RETURN(0);
@@ -2580,7 +2593,7 @@ int my_message_sql(uint error, const char *str, myf MyFlags)
DBUG_RETURN(0);
}
- 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)
{
@@ -4294,6 +4307,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++;
@@ -4312,7 +4326,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;
@@ -5635,7 +5652,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. "
@@ -5979,7 +6002,7 @@ 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",
@@ -6254,7 +6277,7 @@ The minimum value for this variable is 4096.",
"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",
@@ -6266,12 +6289,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.",
@@ -7732,12 +7755,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 5a772501e48..b89e8b3dcbb 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -3344,18 +3344,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;
/*
@@ -5053,7 +5051,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, ...)",
diff --git a/sql/protocol.cc b/sql/protocol.cc
index 2ed241c4c98..bf8faec006a 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
@@ -84,7 +84,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)
@@ -120,124 +120,6 @@ void net_send_error(THD *thd, uint sql_errno, const char *err)
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 +228,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));
@@ -827,6 +709,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/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 697de9cda97..11874b1020c 100644
--- a/sql/set_var.cc
+++ b/sql/set_var.cc
@@ -1188,16 +1188,31 @@ bool sys_var_thd_ulong::check(THD *thd, set_var *var)
bool sys_var_thd_ulong::update(THD *thd, set_var *var)
{
ulonglong tmp= var->save_result.ulonglong_value;
+ char buf[22];
+ bool truncated= false;
/* Don't use bigger value than given with --maximum-variable-name=.. */
if ((ulong) tmp > max_system_variables.*offset)
+ {
+ truncated= true;
+ llstr(tmp, buf);
tmp= max_system_variables.*offset;
+ }
#if SIZEOF_LONG == 4
/* Avoid overflows on 32 bit systems */
if (tmp > (ulonglong) ~(ulong) 0)
+ {
+ truncated= true;
+ llstr(tmp, buf);
tmp= ((ulonglong) ~(ulong) 0);
+ }
#endif
+ if (truncated)
+ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
+ ER_TRUNCATED_WRONG_VALUE,
+ ER(ER_TRUNCATED_WRONG_VALUE), name,
+ buf);
if (option_limits)
tmp= (ulong) getopt_ull_limit_value(tmp, option_limits);
@@ -1405,7 +1420,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;
}
}
@@ -3036,7 +3051,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/share/errmsg.txt b/sql/share/errmsg.txt
index 30cf85f3181..257cea7c27b 100644
--- a/sql/share/errmsg.txt
+++ b/sql/share/errmsg.txt
@@ -5667,9 +5667,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 +6109,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..2512954f805 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -980,7 +980,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,7 +1009,7 @@ 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";
@@ -1510,6 +1510,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";
@@ -2353,7 +2354,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;
@@ -2501,7 +2502,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");
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 d82a5e4d532..991c885b8a4 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -370,7 +370,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 +386,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);
}
@@ -1091,7 +1117,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;
/*
@@ -1258,9 +1284,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;
@@ -1855,7 +1881,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));
@@ -2669,7 +2695,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());
}
@@ -2729,7 +2755,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)
diff --git a/sql/sp_head.h b/sql/sp_head.h
index 93040bc3ca0..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
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index 7e017d7d028..311b76c6149 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
@@ -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
@@ -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))
@@ -3493,6 +3494,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 */
@@ -3991,47 +3993,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 +4527,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 +4569,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 +4597,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 +4684,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 +4740,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 +4790,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 +5052,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 +5121,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 +5769,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 +5801,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 +5847,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_base.cc b/sql/sql_base.cc
index 7df11eeb79a..6776fb6cc37 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 */)
{
@@ -927,8 +928,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",
@@ -1053,6 +1054,29 @@ 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();
+ }
+ }
+}
+
+
/*
Mark all tables in the list which were used by current substatement
as free for reuse.
@@ -1089,6 +1113,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.
@@ -1096,26 +1156,19 @@ 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;
prelocked_mode_type prelocked_mode= thd->prelocked_mode;
DBUG_ENTER("close_thread_tables");
@@ -1130,7 +1183,7 @@ 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;
/*
@@ -1145,13 +1198,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)
{
@@ -1215,28 +1265,8 @@ 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)); */
+ if (thd->open_tables)
+ close_open_tables(thd);
if (prelocked_mode == PRELOCKED)
{
@@ -1673,6 +1703,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.
@@ -1687,24 +1718,34 @@ 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");
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);
}
/*
@@ -2247,6 +2288,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;
@@ -2283,8 +2327,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",
@@ -2294,7 +2337,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;
@@ -2465,9 +2507,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.
@@ -2532,6 +2580,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);
/*
@@ -3083,7 +3135,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);
@@ -4294,7 +4346,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);
}
@@ -6249,7 +6300,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()));
}
@@ -6552,10 +6603,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
@@ -6796,7 +6844,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;
@@ -6878,7 +6926,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;
@@ -6963,7 +7011,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;
@@ -6972,7 +7020,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)
@@ -7382,7 +7430,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);
@@ -7747,7 +7795,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);
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 66a51d5bb00..b1db831318c 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;
@@ -498,12 +498,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
@@ -585,6 +585,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 ?
@@ -672,9 +678,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);
@@ -692,6 +696,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;
@@ -811,7 +816,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)
@@ -1298,23 +1316,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();
@@ -1324,6 +1345,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)
@@ -1361,7 +1393,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);
@@ -1382,10 +1414,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
@@ -1416,7 +1448,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;
}
@@ -2331,6 +2370,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;
}
@@ -2385,6 +2429,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
@@ -2725,8 +2770,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 97a63ed9448..632c440266f 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;
};
@@ -1466,7 +1467,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 +1703,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 +1717,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 +1924,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 +2051,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();
};
@@ -2107,7 +2135,7 @@ class select_insert :public select_result_interceptor {
ulonglong autoinc_value_of_last_inserted_row; // autogenerated or not
COPY_INFO info;
bool insert_into_view;
-
+ bool is_bulk_insert_mode;
select_insert(TABLE_LIST *table_list_par,
TABLE *table_par, List<Item> *fields_par,
List<Item> *update_fields, List<Item> *update_values,
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_delete.cc b/sql/sql_delete.cc
index 303918f42a2..f183cb3142f 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -35,6 +35,7 @@ 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;
@@ -86,6 +87,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 +112,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 +149,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 +166,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 +259,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 +307,7 @@ 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)
+ if (thd->killed || thd->is_error())
error= 1; // Aborted
if (will_batch && (loc_error= table->file->end_bulk_delete()))
{
@@ -386,10 +393,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());
}
@@ -889,7 +896,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..31d6b28a73c 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,131 @@ 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);
+}
- DBUG_RETURN(0);
+
+/**
+ Remove matching tables from the HANDLER's hash table.
+
+ @param thd Thread identifier.
+ @param tables The list of tables to remove.
+
+ @note Broadcasts refresh if it closed a table with old version.
+*/
+
+void mysql_ha_rm_tables(THD *thd, TABLE_LIST *tables)
+{
+ TABLE_LIST *hash_tables, *next;
+ DBUG_ENTER("mysql_ha_rm_tables");
+
+ safe_mutex_assert_not_owner(&LOCK_open);
+
+ DBUG_ASSERT(tables);
+
+ hash_tables= mysql_ha_find(thd, tables);
+
+ while (hash_tables)
+ {
+ next= hash_tables->next_local;
+ if (hash_tables->table)
+ mysql_ha_close_table(thd, hash_tables, FALSE);
+ 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_insert.cc b/sql/sql_insert.cc
index b4f2d8c65f2..11e70a2e5da 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,
@@ -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;
@@ -1911,7 +1909,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
@@ -1942,7 +1940,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. */
@@ -1951,7 +1949,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());
}
@@ -2269,7 +2267,12 @@ pthread_handler_t handle_delayed_insert(void *arg)
goto err;
}
- /* open table */
+ /*
+ 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);
if (!(di->table=open_ltable(thd, &di->table_list, TL_WRITE_DELAYED, 0)))
{
thd->fatal_error(); // Abort waiting inserts
@@ -2786,7 +2789,8 @@ select_insert::select_insert(TABLE_LIST *table_list_par, TABLE *table_par,
bool ignore_check_option_errors)
:table_list(table_list_par), table(table_par), fields(fields_par),
autoinc_value_of_last_inserted_row(0),
- insert_into_view(table_list_par && table_list_par->view != 0)
+ insert_into_view(table_list_par && table_list_par->view != 0),
+ is_bulk_insert_mode(FALSE)
{
bzero((char*) &info,sizeof(info));
info.handle_duplicates= duplic;
@@ -2972,8 +2976,11 @@ int select_insert::prepare2(void)
{
DBUG_ENTER("select_insert::prepare2");
if (thd->lex->current_select->options & OPTION_BUFFER_RESULT &&
- !thd->prelocked_mode)
+ !thd->prelocked_mode && !is_bulk_insert_mode)
+ {
table->file->ha_start_bulk_insert((ha_rows) 0);
+ is_bulk_insert_mode= TRUE;
+ }
DBUG_RETURN(0);
}
@@ -3013,7 +3020,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
{
@@ -3092,6 +3099,7 @@ bool select_insert::send_eof()
trans_table, table->file->table_type()));
error= (!thd->prelocked_mode) ? table->file->ha_end_bulk_insert():0;
+ is_bulk_insert_mode= FALSE;
table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY);
table->file->extra(HA_EXTRA_WRITE_CANNOT_REPLACE);
@@ -3315,7 +3323,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,
@@ -3393,7 +3404,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);
}
}
}
@@ -3539,7 +3550,10 @@ select_create::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
if (info.handle_duplicates == DUP_UPDATE)
table->file->extra(HA_EXTRA_INSERT_WITH_UPDATE);
if (!thd->prelocked_mode)
+ {
table->file->ha_start_bulk_insert((ha_rows) 0);
+ is_bulk_insert_mode= TRUE;
+ }
thd->abort_on_warning= (!info.ignore &&
(thd->variables.sql_mode &
(MODE_STRICT_TRANS_TABLES |
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 85c8064a8de..cdae7449cc7 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -259,6 +259,8 @@ public:
key_name.str= str;
key_name.length= length;
}
+
+ void print(THD *thd, String *str);
};
/*
@@ -1614,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;
@@ -1692,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;
@@ -1702,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();
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 10c59d6a374..7e194ac76dc 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)
@@ -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);
@@ -681,12 +680,12 @@ 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);
@@ -783,7 +782,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
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;
@@ -912,15 +911,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;
@@ -934,8 +929,8 @@ 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)
{
@@ -981,10 +976,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))
@@ -992,16 +986,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);
@@ -1143,7 +1135,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;
}
@@ -1338,12 +1330,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,
@@ -1357,9 +1348,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);
@@ -3055,6 +3046,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;
@@ -3358,12 +3353,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
@@ -3819,6 +3808,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;
@@ -3935,7 +3927,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
}
}
@@ -4528,7 +4520,7 @@ finish:
*/
start_waiting_global_read_lock(thd);
}
- DBUG_RETURN(res || thd->net.report_error);
+ DBUG_RETURN(res || thd->is_error());
}
@@ -5472,7 +5464,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
@@ -5496,7 +5488,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));
@@ -5796,7 +5788,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);
@@ -6311,7 +6308,7 @@ void add_join_natural(TABLE_LIST *a, TABLE_LIST *b, List<String> *using_fields,
RETURN
0 ok
- !=0 error. thd->killed or thd->net.report_error is set
+ !=0 error. thd->killed or thd->is_error() is set
*/
bool reload_acl_and_cache(THD *thd, ulong options, TABLE_LIST *tables,
@@ -7274,10 +7271,10 @@ bool parse_sql(THD *thd,
bool mysql_parse_status= MYSQLparse(thd) != 0;
- /* Check that if MYSQLparse() failed, thd->net.report_error is set. */
+ /* Check that if MYSQLparse() failed, thd->is_error() is set. */
DBUG_ASSERT(!mysql_parse_status ||
- mysql_parse_status && thd->net.report_error);
+ mysql_parse_status && thd->is_error());
/* Reset Lex_input_stream. */
diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc
index 8a8a03cb4e4..ad9eec1906a 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;
@@ -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);
}
diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc
index 2d33da29b77..c8d9116f196 100644
--- a/sql/sql_plugin.cc
+++ b/sql/sql_plugin.cc
@@ -1329,6 +1329,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));
@@ -3053,7 +3054,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;
@@ -3092,7 +3093,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;
}
}
@@ -3102,6 +3103,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++)
@@ -3140,7 +3143,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;
}
@@ -3150,7 +3153,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 3ae4f152edf..9d4d62e57b6 100644
--- a/sql/sql_prepare.cc
+++ b/sql/sql_prepare.cc
@@ -2864,7 +2864,7 @@ 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();
@@ -2947,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);
}
@@ -3150,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..66d89edc146 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);
+
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..0249af147b0 100644
--- a/sql/sql_repl.cc
+++ b/sql/sql_repl.cc
@@ -1651,6 +1651,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 1e024c81a26..862948e48a4 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -122,7 +122,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
@@ -263,8 +263,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();
@@ -491,7 +491,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;
}
@@ -817,7 +817,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"));
@@ -826,7 +826,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"));
@@ -1031,7 +1031,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"));
@@ -1162,7 +1162,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"));
@@ -1185,7 +1185,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"));
@@ -1695,7 +1695,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,
@@ -2098,10 +2098,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;
@@ -2307,7 +2307,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();
@@ -2333,7 +2333,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);
}
@@ -6651,7 +6651,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();
}
}
}
@@ -10710,7 +10710,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);
}
@@ -10864,7 +10864,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)
@@ -10896,13 +10895,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 &&
@@ -10926,13 +10925,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;
@@ -12644,6 +12643,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.
@@ -12803,12 +12804,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
@@ -12816,6 +12811,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);
@@ -14400,13 +14401,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);
@@ -14828,6 +14847,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)
{
@@ -16020,7 +16042,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());
}
@@ -16073,6 +16095,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
@@ -16140,6 +16199,18 @@ void TABLE_LIST::print(THD *thd, String *str)
str->append(' ');
append_identifier(thd, str, alias, strlen(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..256d57cc10a 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());
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 f7813b73089..049c050c288 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -2269,10 +2269,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)
{
@@ -2305,13 +2307,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,
@@ -2330,7 +2336,7 @@ void get_lookup_value(THD *thd, Item_func *item_func,
tmp_str->length(), FALSE);
}
}
- return;
+ return 0;
}
@@ -2346,14 +2352,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)
{
@@ -2364,16 +2372,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;
}
@@ -2486,10 +2501,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;
@@ -2503,7 +2520,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:
@@ -2516,14 +2533,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);
}
}
@@ -3113,7 +3129,11 @@ 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));
@@ -3328,7 +3348,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));
@@ -3339,7 +3360,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;
@@ -3486,6 +3508,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);
@@ -3563,9 +3589,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);
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index cd39623f2b4..9d26273e809 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -434,7 +434,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))
{
@@ -1503,7 +1503,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 +1521,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);
+
pthread_mutex_lock(&LOCK_open);
/*
@@ -1562,11 +1564,20 @@ 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
+ 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 +1604,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)
{
@@ -2380,8 +2390,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 +2750,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);
@@ -4009,7 +4019,8 @@ 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);
+
for (table= tables; table; table= table->next_local)
{
char table_name[NAME_LEN*2+2];
@@ -4985,6 +4996,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 ||
@@ -5200,7 +5212,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));
@@ -5392,7 +5405,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;
}
/*
@@ -5427,7 +5440,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
@@ -5437,7 +5450,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)
@@ -5748,8 +5761,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);
/* DISCARD/IMPORT TABLESPACE is always alone in an ALTER TABLE */
if (alter_info->tablespace_op != NO_TABLESPACE_OP)
diff --git a/sql/sql_udf.cc b/sql/sql_udf.cc
index 19582af38f4..18511063117 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));
@@ -415,7 +416,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 +430,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)))
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..46022c9f743 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -679,7 +679,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)
{
@@ -844,7 +844,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 +1193,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 */
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 39175297753..04af253fec9 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -1211,8 +1211,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
@@ -1254,7 +1252,7 @@ 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
@@ -1272,14 +1270,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
@@ -2002,181 +2001,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 {}
@@ -2540,25 +2364,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),
@@ -4501,11 +4313,10 @@ create_table_option:
}
| TRANSACTIONAL_SYM opt_equal ulong_num
{
- Lex->create_info.used_fields|= HA_CREATE_USED_TRANSACTIONAL;
+ Lex->create_info.used_fields|= HA_CREATE_USED_TRANSACTIONAL;
Lex->create_info.transactional= ($3 != 0 ? HA_CHOICE_YES :
- HA_CHOICE_NO);
+ HA_CHOICE_NO);
}
-
;
default_charset:
@@ -4587,7 +4398,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:
@@ -4601,10 +4412,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; }
@@ -4897,7 +4704,7 @@ spatial_type:
| GEOMETRYCOLLECTION { $$= Field::GEOM_GEOMETRYCOLLECTION; }
| POINT_SYM
{
- Lex->length= (char*)"21";
+ Lex->length= (char*)"25";
$$= Field::GEOM_POINT;
}
| MULTIPOINT { $$= Field::GEOM_MULTIPOINT; }
@@ -5449,7 +5256,7 @@ alter:
lex->sql_command= SQLCOM_ALTER_FUNCTION;
lex->spname= $3;
}
- | ALTER view_algorithm definer
+ | ALTER view_algorithm definer_opt
{
LEX *lex= Lex;
@@ -5462,7 +5269,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
@@ -5481,7 +5288,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
@@ -5517,7 +5324,7 @@ alter:
{
/*
$1 - ALTER
- $2 - definer
+ $2 - definer_opt
$3 - EVENT_SYM
$4 - sp_name
$5 - the block above
@@ -6685,7 +6492,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:
@@ -8571,9 +8378,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");
@@ -8581,7 +8390,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
{
@@ -8651,18 +8481,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; }
@@ -9924,11 +9755,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
{
@@ -9940,9 +9775,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; }
@@ -9965,7 +9805,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;
}
@@ -9973,7 +9813,7 @@ NUM_literal:
| FLOAT_NUM
{
$$ = new Item_float($1.str, $1.length);
- if (YYTHD->net.report_error)
+ if (YYTHD->is_error())
{
MYSQL_YYABORT;
}
@@ -10637,7 +10477,7 @@ keyword_sp:
| TEXT_SYM {}
| THAN_SYM {}
| TRANSACTION_SYM {}
- | TRANSACTIONAL_SYM {}
+ | TRANSACTIONAL_SYM {}
| TRIGGERS_SYM {}
| TIMESTAMP {}
| TIMESTAMP_ADD {}
@@ -10677,6 +10517,7 @@ set:
lex->option_type=OPT_SESSION;
lex->var_list.empty();
lex->one_shot_set= 0;
+ lex->autocommit= 0;
}
option_value_list
{}
@@ -10719,6 +10560,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();
}
}
@@ -10960,10 +10802,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;
}
;
@@ -11867,21 +11715,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
- {}
;
/**************************************************************************
@@ -11890,7 +11746,12 @@ view_or_trigger_or_sp_or_event_tail:
**************************************************************************/
-definer:
+definer_opt:
+ no_definer
+ | definer
+ ;
+
+no_definer:
/* empty */
{
/*
@@ -11902,7 +11763,10 @@ definer:
*/
YYTHD->lex->definer= 0;
}
- | DEFINER_SYM EQ user
+ ;
+
+definer:
+ DEFINER_SYM EQ user
{
YYTHD->lex->definer= get_current_user(YYTHD, $3);
}
@@ -12139,17 +12003,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/table.cc b/sql/table.cc
index c1d8e3abe94..c3ddb809b9e 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -969,6 +969,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)
@@ -1351,9 +1352,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;
@@ -1607,6 +1610,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;
@@ -1781,7 +1787,8 @@ 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);
- outparam->part_info->is_auto_partitioned= share->auto_partitioned;
+ if (!tmp)
+ 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
diff --git a/sql/table.h b/sql/table.h
index 6554b6ed578..2bbd71b70c6 100644
--- a/sql/table.h
+++ b/sql/table.h
@@ -499,6 +499,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;
/*
@@ -593,8 +611,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.
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..6f2093cc92f 100644
--- a/sql/udf_example.c
+++ b/sql/udf_example.c
@@ -1106,11 +1106,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 +1141,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 f9e8e54439a..f2238d69973 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),
diff --git a/storage/csv/ha_tina.cc b/storage/csv/ha_tina.cc
index 9a7781e017d..6a87b8ecc72 100644
--- a/storage/csv/ha_tina.cc
+++ b/storage/csv/ha_tina.cc
@@ -471,22 +471,30 @@ 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.
+ CSV does not support nulls. ::create() prevents creation of a table
+ with nullable columns so if we encounter them here, there is a bug.
+ This may only occur if the frm was created by an older version of
+ mysqld which permitted table creation with nullable columns.
*/
- if ((*field)->is_null())
+ DBUG_ASSERT(!(*field)->maybe_null());
+
+ /*
+ assistance for backwards compatibility in production builds.
+ note: this will not work for ENUM columns.
+ */
+ 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())
{
@@ -1480,6 +1488,16 @@ 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())
+ DBUG_RETURN(-1);
+ }
+
+
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/federated/ha_federated.cc b/storage/federated/ha_federated.cc
index 3fc17e18e76..8673847fcac 100644
--- a/storage/federated/ha_federated.cc
+++ b/storage/federated/ha_federated.cc
@@ -2769,7 +2769,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/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/myisam/mi_check.c b/storage/myisam/mi_check.c
index fe6b716877c..7cd35295cb0 100644
--- a/storage/myisam/mi_check.c
+++ b/storage/myisam/mi_check.c
@@ -1376,6 +1376,139 @@ int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend)
} /* 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;
+
+ /* 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(MI_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;
@@ -1487,25 +1619,10 @@ int mi_repair(MI_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 */
@@ -2106,8 +2223,9 @@ int mi_repair_by_sort(MI_CHECK *param, register MI_INFO *info,
ulong *rec_per_key_part;
char llbuff[22];
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;
@@ -2180,25 +2298,14 @@ int mi_repair_by_sort(MI_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 +2349,10 @@ int mi_repair_by_sort(MI_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 +2360,8 @@ int mi_repair_by_sort(MI_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 +2442,11 @@ int mi_repair_by_sort(MI_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)
{
@@ -2531,9 +2647,10 @@ int mi_repair_parallel(MI_CHECK *param, register MI_INFO *info,
IO_CACHE new_data_cache; /* For non-quick repair. */
IO_CACHE_SHARE io_share;
SORT_INFO sort_info;
- ulonglong key_map=share->state.key_map;
+ ulonglong key_map;
pthread_attr_t thr_attr;
DBUG_ENTER("mi_repair_parallel");
+ LINT_INIT(key_map);
start_records=info->state->records;
got_error=1;
@@ -2635,25 +2752,14 @@ int mi_repair_parallel(MI_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;
@@ -2709,6 +2815,10 @@ int mi_repair_parallel(MI_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 */
diff --git a/storage/myisam/rt_index.c b/storage/myisam/rt_index.c
index 63ed60586d6..25f9d7c19e4 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 2146a8d16cb..941b6a7616c 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)
@@ -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/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/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-euc_kr.c b/strings/ctype-euc_kr.c
index 844d8cc3ff5..fd783015bf4 100644
--- a/strings/ctype-euc_kr.c
+++ b/strings/ctype-euc_kr.c
@@ -8614,12 +8614,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;
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-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/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/tests/mysql_client_test.c b/tests/mysql_client_test.c
index eff8df8109a..0cb9ff49128 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -16001,7 +16001,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");
@@ -16017,30 +16017,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);
@@ -16819,6 +16828,370 @@ static void test_bug30472()
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;
+
+ char query_buffer[MAX_TEST_QUERY_LENGTH];
+
+ /* 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.
+ ***********************************************************************/
+
+ /* 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));
+ 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
@@ -16844,7 +17217,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},
@@ -17115,6 +17494,9 @@ static struct my_tests_st my_tests[]= {
{ "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);